content
stringlengths
7
1.05M
fixed_cases
stringlengths
1
1.28M
class Token(object): Name = 'name' String = 'string' Number = 'number' Operator = 'operator' Boolean = 'boolean' Undefined = 'undefined' Null = 'null' Regex = 'regex' EOF = '(end)' LITERALS = [String, Number, Boolean, Regex, Null, Undefined] def __init__(self, source, type, line=0, char=0): self.value = source self.type = type self.line = line self.char = char def __repr__(self): return '<%s: %s (line %d, char %d)>' % (self.type, self.value.replace('\n', '\\n'), self.line, self.char) def __str__(self): return self.value def tokenize(stream): operators = ['>>>=', '>>=', '<<=', '%=', '/=', '*=', '+=', '-=', '===', '==', '!==', '!=', '++', '--', '>=', '<=', '&=', '|=', '^=', '&&', '||', '&', '|', '^', '~', '!', '{', '[', ']', '}', '(', ')', ':', '*', '/', '%', '+', '-', '?', '<', '>', ';', '=', ',', '.'] in_comment = False in_string = False building_name = False escaped = False length = len(stream) skip = 0 str = [] numrange = range(ord('0'), ord('9')+1) octrange = range(ord('0'), ord('7')+1) hexrange = range(ord('a'), ord('f')+1) + range(ord('A'), ord('F')+1) + numrange whitespace = [' ', '\n', '\t', '\r', '"', "'"] get_operators_for = lambda c : filter(lambda x : ord(c) is ord(x[0]), operators) is_operator = lambda c : c is not None and any(get_operators_for(c)) is_separator = lambda c : c is None or (c in whitespace or is_operator(c)) is_number = lambda c : c is not None and ord(c) in numrange is_hexnumber = lambda c : c is not None and ord(c) in hexrange is_octnum = lambda c : c is not None and ord(c) in octrange tokens = [] line = 1 char = 0 for idx, character in enumerate(stream): if character == '\n': line += 1 char = 0 else: char += 1 if skip: skip = skip - 1 continue next = lambda i=1 : idx+i < length and stream[idx+i] or None if in_comment: if escaped: escaped = False continue if character == '\\': escaped = True elif in_comment == '/*' and character == '*' and next() == '/': skip = 1 in_comment = False elif in_comment == '//' and character == '\n': in_comment = False elif in_string: if escaped: escaped = False if character == 'x': hex_0 = next() hex_1 = next(1) if hex_0 is None or hex_1 is None: raise TokenizeError("Unexpected EOF during hex parse") try: hex_0 = int(hex_0, 16) << 4 hex_1 = int(hex_1, 16) str.append(unichr(hex_1 | hex_0)) skip = 2 except ValueError: str.append(unicode(character)) elif character == 'u': hex_0 = next() hex_1 = next(1) hex_2 = next(2) hex_3 = next(3) if not all(reduce(lambda x : x is not None, [hex_0, hex_1, hex_2, hex_3])): raise TokenizeError("Unexpected EOF during unicode parse") try: hex = (int(hex_0, 16) << 12) | (int(hex_1, 16) << 8) | \ (int(hex_2, 16) << 4) | (int(hex_0, 16)) str.append(unichr(hex)) skip = 4 except ValueError: str.append(unicode(character)) elif character == '\\': str.append(u'\\') elif character == in_string: str.append(unicode(in_string)) else: str.append(unicode(character)) else: if character == '\\': escaped = True elif character == in_string: in_string = False tokens.append(Token(u''.join(str), Token.String, line, char)) str = [] else: str.append(unicode(character)) else: is_sep = is_separator(character) if not building_name and not is_sep: if is_number(character): if character == '0': if next() == 'x': # build hex skip = 2 c = next(skip) while is_hexnum(c): str.append(c) skip += 1 c = next(skip) skip -= 1 tokens.append(Token(u''.join(str), Token.Number, line, char)) str = [] continue elif is_number(next(1)): # build octal skip = 0 c = next(skip) is_octal = True while is_number(c): str.append(c) is_octal = is_octal and is_octnum(c) skip += 1 c = next(skip) skip -= 1 if not is_octal: str = str[1:] tokens.append(Token(u''.join(str), Token.Number, line, char)) str = [] continue # build plain number seen_e = False seen_dot = False skip = 0 okay = lambda : is_number(next(skip)) or (not seen_e and next(skip) == '.') or (not seen_dot and next(skip).lower() == 'e') while okay(): c = next(skip) str.append(c) if c == '.': seen_dot = True elif c.lower() == 'e': seen_e = True skip += 1 skip -= 1 tokens.append(Token(u''.join(str), Token.Number, line, char)) str = [] else: building_name = True str.append(character) elif is_sep: ops = get_operators_for(character) if building_name: building_name = False ustr = u''.join(str) type = Token.Name if ustr == u'Infinity' or ustr == u'NaN': type = Token.Number elif ustr == u'undefined': type = Token.Undefined elif ustr == u'null': type = Token.Null tokens.append(Token(ustr, type, line, char)) str = [] if character == '/' and tokens[-1].type == Token.Operator: in_regex = True regex_escape = False skip = 1 c = next(skip) while (c != '/' or regex_escape): if regex_escape: str.append('\\') str.append(c) regex_escape = False elif c == '\\': regex_escape = True elif c == '\n': in_regex = False break else: str.append(c) skip += 1 c = next(skip) if len(str) < 1: in_regex = False str = [] if not in_regex: skip = 0 else: skip += 1 flags = [] c = next(skip) while c in ['g', 'i', 'm', 'y']: flags.append(c) skip += 1 c = next(skip) skip -= 1 str.append('/') str = ['/'] + str + flags tokens.append(Token(u''.join(str), Token.Regex, line, char)) str = [] continue if character == '"' or character == "'": in_string = character elif character == '/' and (next(1) == '/' or next(1) == '*'): in_comment = character + next(1) else: if len(ops): for possibility in ops: bad = False for pidx, pchar in enumerate(possibility): c = next(pidx) if c != pchar: bad = True break if not bad: tokens.append(Token(possibility, Token.Operator, line, char)) skip = len(possibility) - 1 str = [] break elif building_name: str.append(character) tokens.append(Token('', Token.EOF, line, char)) return tokens
class Token(object): name = 'name' string = 'string' number = 'number' operator = 'operator' boolean = 'boolean' undefined = 'undefined' null = 'null' regex = 'regex' eof = '(end)' literals = [String, Number, Boolean, Regex, Null, Undefined] def __init__(self, source, type, line=0, char=0): self.value = source self.type = type self.line = line self.char = char def __repr__(self): return '<%s: %s (line %d, char %d)>' % (self.type, self.value.replace('\n', '\\n'), self.line, self.char) def __str__(self): return self.value def tokenize(stream): operators = ['>>>=', '>>=', '<<=', '%=', '/=', '*=', '+=', '-=', '===', '==', '!==', '!=', '++', '--', '>=', '<=', '&=', '|=', '^=', '&&', '||', '&', '|', '^', '~', '!', '{', '[', ']', '}', '(', ')', ':', '*', '/', '%', '+', '-', '?', '<', '>', ';', '=', ',', '.'] in_comment = False in_string = False building_name = False escaped = False length = len(stream) skip = 0 str = [] numrange = range(ord('0'), ord('9') + 1) octrange = range(ord('0'), ord('7') + 1) hexrange = range(ord('a'), ord('f') + 1) + range(ord('A'), ord('F') + 1) + numrange whitespace = [' ', '\n', '\t', '\r', '"', "'"] get_operators_for = lambda c: filter(lambda x: ord(c) is ord(x[0]), operators) is_operator = lambda c: c is not None and any(get_operators_for(c)) is_separator = lambda c: c is None or (c in whitespace or is_operator(c)) is_number = lambda c: c is not None and ord(c) in numrange is_hexnumber = lambda c: c is not None and ord(c) in hexrange is_octnum = lambda c: c is not None and ord(c) in octrange tokens = [] line = 1 char = 0 for (idx, character) in enumerate(stream): if character == '\n': line += 1 char = 0 else: char += 1 if skip: skip = skip - 1 continue next = lambda i=1: idx + i < length and stream[idx + i] or None if in_comment: if escaped: escaped = False continue if character == '\\': escaped = True elif in_comment == '/*' and character == '*' and (next() == '/'): skip = 1 in_comment = False elif in_comment == '//' and character == '\n': in_comment = False elif in_string: if escaped: escaped = False if character == 'x': hex_0 = next() hex_1 = next(1) if hex_0 is None or hex_1 is None: raise tokenize_error('Unexpected EOF during hex parse') try: hex_0 = int(hex_0, 16) << 4 hex_1 = int(hex_1, 16) str.append(unichr(hex_1 | hex_0)) skip = 2 except ValueError: str.append(unicode(character)) elif character == 'u': hex_0 = next() hex_1 = next(1) hex_2 = next(2) hex_3 = next(3) if not all(reduce(lambda x: x is not None, [hex_0, hex_1, hex_2, hex_3])): raise tokenize_error('Unexpected EOF during unicode parse') try: hex = int(hex_0, 16) << 12 | int(hex_1, 16) << 8 | int(hex_2, 16) << 4 | int(hex_0, 16) str.append(unichr(hex)) skip = 4 except ValueError: str.append(unicode(character)) elif character == '\\': str.append(u'\\') elif character == in_string: str.append(unicode(in_string)) else: str.append(unicode(character)) elif character == '\\': escaped = True elif character == in_string: in_string = False tokens.append(token(u''.join(str), Token.String, line, char)) str = [] else: str.append(unicode(character)) else: is_sep = is_separator(character) if not building_name and (not is_sep): if is_number(character): if character == '0': if next() == 'x': skip = 2 c = next(skip) while is_hexnum(c): str.append(c) skip += 1 c = next(skip) skip -= 1 tokens.append(token(u''.join(str), Token.Number, line, char)) str = [] continue elif is_number(next(1)): skip = 0 c = next(skip) is_octal = True while is_number(c): str.append(c) is_octal = is_octal and is_octnum(c) skip += 1 c = next(skip) skip -= 1 if not is_octal: str = str[1:] tokens.append(token(u''.join(str), Token.Number, line, char)) str = [] continue seen_e = False seen_dot = False skip = 0 okay = lambda : is_number(next(skip)) or (not seen_e and next(skip) == '.') or (not seen_dot and next(skip).lower() == 'e') while okay(): c = next(skip) str.append(c) if c == '.': seen_dot = True elif c.lower() == 'e': seen_e = True skip += 1 skip -= 1 tokens.append(token(u''.join(str), Token.Number, line, char)) str = [] else: building_name = True str.append(character) elif is_sep: ops = get_operators_for(character) if building_name: building_name = False ustr = u''.join(str) type = Token.Name if ustr == u'Infinity' or ustr == u'NaN': type = Token.Number elif ustr == u'undefined': type = Token.Undefined elif ustr == u'null': type = Token.Null tokens.append(token(ustr, type, line, char)) str = [] if character == '/' and tokens[-1].type == Token.Operator: in_regex = True regex_escape = False skip = 1 c = next(skip) while c != '/' or regex_escape: if regex_escape: str.append('\\') str.append(c) regex_escape = False elif c == '\\': regex_escape = True elif c == '\n': in_regex = False break else: str.append(c) skip += 1 c = next(skip) if len(str) < 1: in_regex = False str = [] if not in_regex: skip = 0 else: skip += 1 flags = [] c = next(skip) while c in ['g', 'i', 'm', 'y']: flags.append(c) skip += 1 c = next(skip) skip -= 1 str.append('/') str = ['/'] + str + flags tokens.append(token(u''.join(str), Token.Regex, line, char)) str = [] continue if character == '"' or character == "'": in_string = character elif character == '/' and (next(1) == '/' or next(1) == '*'): in_comment = character + next(1) elif len(ops): for possibility in ops: bad = False for (pidx, pchar) in enumerate(possibility): c = next(pidx) if c != pchar: bad = True break if not bad: tokens.append(token(possibility, Token.Operator, line, char)) skip = len(possibility) - 1 str = [] break elif building_name: str.append(character) tokens.append(token('', Token.EOF, line, char)) return tokens
super_value = '<value>' class Program: def __init__(self) -> None: self.ty_list = [] self.types = {} self.data_list = [] self.data = {} self.func_list = [] self.functions = {} def __str__(self) -> str: result = ".TYPE\n" for ty in self.ty_list: result += str(self.types[ty]) + '\n' result += ".DATA\n" for data in self.data_list: result += str(self.data[data]) + '\n' result += ".FUNCTION\n" for func in self.func_list: result += str(self.functions[func]) + '\n' return result def try_add_data(self, name, value): try: _ = self.data[name] except KeyError: self.data[name] = Data(name, value) def add_data(self, name, value): index = 0 while f'{name}_{index}' in self.data_list: index += 1 self.data_list.append(f'{name}_{index}') self.data[self.data_list[-1]] = Data(self.data_list[-1], value) return self.data_list[-1] def force_data(self, name, value): self.data_list.append(name) self.data[self.data_list[-1]] = Data(self.data_list[-1], value) return self.data_list[-1] def add_type(self, type): self.ty_list.append(type.name) self.types[type.name] = type def add_func(self, func): self.func_list.append(func.name) self.functions[func.name] = func class Type: def __init__(self, name) -> None: self.name = name self.attributes = [] self.attr = {} self.method_list = [] self.methods = {} def attr_push(self, name, _name): if not name in self.attributes: self.attributes.append(name) self.attr[name] = _name def method_push(self, name, f): try: self.methods[name] except KeyError: self.method_list.append(name) self.methods[name] = f def __str__(self) -> str: result = f'type {self.name}: ' + '{\n' for att in self.attributes: result += '\tattribute ' + str(att) + ' '*(14 - len(str(att))) + '-> ' + str(self.attr[att]) + '\n' for func in self.method_list: result += '\tfunction ' + str(func) + ' '*(15 - len(str(func))) + '-> ' + str(self.methods[func]) + '\n' return result + '}' class Data: def __init__(self, name, value) -> None: self.name = name self.value = value def __str__(self) -> str: return f'\tdata {self.name}: {self.value}' class Function: def __init__(self, name) -> None: self.name = name self.var_dir = {} self.param = [] self.local = [] self.expr = [] def get_name(self, name): index = 0 while True: try: _ = self.var_dir[f'{name}@{index}'] index += 1 except KeyError: return f'{name}@{index}' def force_local(self,name, scope): scope.define_variable(name, name) self.var_dir[name] = 1 self.local.append(name) return name def force_parma(self,name, scope): self.var_dir[name] = 1 scope.define_variable(name, name) self.param.append(name) return name def param_push(self, name, scope): new_name = self.get_name(name) scope.define_variable(name, new_name) self.var_dir[new_name] = 1 self.param.append(new_name) return new_name def local_push(self, name, scope): new_name = self.get_name(name) scope.define_variable(name, new_name) self.var_dir[new_name] = 1 self.local.append(new_name) return new_name def expr_push(self, expr): self.expr.append(expr) def __str__(self) -> str: result = f'function {self.name}: ' + '{\n' for param in self.param: result += f'\tPARAM {str(param)}\n' for local in self.local: result += f'\tLOCAL {str(local)}\n' for exp in self.expr: result += '\t' + str(exp) + '\n' return result + '}' class Expression: def __init__(self, x = None, y = None, z = None) -> None: self.x = x self.y = y self.z = z def try_set_value(self, name): if self.x == super_value: self.x = name return True return False def set_value(self, name): if not self.x == super_value: raise Exception("The expression is'nt set expression") self.x = name @property def can_fusion(self): return False def __str__(self) -> str: result = self.__class__.__name__ + ' ' if not self.x is None: result += str(self.x) + " " if not self.y is None: result += str(self.y) + " " if not self.z is None: result += str(self.z) + " " return result class Assign(Expression): @property def can_fusion(self): return True class GetAttr(Expression): pass class SetAttr(Expression): pass class Sum(Expression): pass class Rest(Expression): pass class Div(Expression): pass class Mult(Expression): pass class Less(Expression): pass class LessOrEqual(Expression): pass class Equals(Expression): pass class CheckType(Expression): pass class Return(Expression): pass class Arg(Expression): pass class VCall(Expression): pass class Call(Expression): pass class SimpleCall(Expression): pass class New(Expression): pass class Load(Expression): pass class ALLOCATE(Expression): pass class IfGoTo(Expression): pass class GoTo(Expression): pass class Label(Expression): pass class TypeOf(Expression): pass class Neg(Expression): pass class Complemnet(Expression): pass class Comment(Expression): def __str__(self) -> str: return ""
super_value = '<value>' class Program: def __init__(self) -> None: self.ty_list = [] self.types = {} self.data_list = [] self.data = {} self.func_list = [] self.functions = {} def __str__(self) -> str: result = '.TYPE\n' for ty in self.ty_list: result += str(self.types[ty]) + '\n' result += '.DATA\n' for data in self.data_list: result += str(self.data[data]) + '\n' result += '.FUNCTION\n' for func in self.func_list: result += str(self.functions[func]) + '\n' return result def try_add_data(self, name, value): try: _ = self.data[name] except KeyError: self.data[name] = data(name, value) def add_data(self, name, value): index = 0 while f'{name}_{index}' in self.data_list: index += 1 self.data_list.append(f'{name}_{index}') self.data[self.data_list[-1]] = data(self.data_list[-1], value) return self.data_list[-1] def force_data(self, name, value): self.data_list.append(name) self.data[self.data_list[-1]] = data(self.data_list[-1], value) return self.data_list[-1] def add_type(self, type): self.ty_list.append(type.name) self.types[type.name] = type def add_func(self, func): self.func_list.append(func.name) self.functions[func.name] = func class Type: def __init__(self, name) -> None: self.name = name self.attributes = [] self.attr = {} self.method_list = [] self.methods = {} def attr_push(self, name, _name): if not name in self.attributes: self.attributes.append(name) self.attr[name] = _name def method_push(self, name, f): try: self.methods[name] except KeyError: self.method_list.append(name) self.methods[name] = f def __str__(self) -> str: result = f'type {self.name}: ' + '{\n' for att in self.attributes: result += '\tattribute ' + str(att) + ' ' * (14 - len(str(att))) + '-> ' + str(self.attr[att]) + '\n' for func in self.method_list: result += '\tfunction ' + str(func) + ' ' * (15 - len(str(func))) + '-> ' + str(self.methods[func]) + '\n' return result + '}' class Data: def __init__(self, name, value) -> None: self.name = name self.value = value def __str__(self) -> str: return f'\tdata {self.name}: {self.value}' class Function: def __init__(self, name) -> None: self.name = name self.var_dir = {} self.param = [] self.local = [] self.expr = [] def get_name(self, name): index = 0 while True: try: _ = self.var_dir[f'{name}@{index}'] index += 1 except KeyError: return f'{name}@{index}' def force_local(self, name, scope): scope.define_variable(name, name) self.var_dir[name] = 1 self.local.append(name) return name def force_parma(self, name, scope): self.var_dir[name] = 1 scope.define_variable(name, name) self.param.append(name) return name def param_push(self, name, scope): new_name = self.get_name(name) scope.define_variable(name, new_name) self.var_dir[new_name] = 1 self.param.append(new_name) return new_name def local_push(self, name, scope): new_name = self.get_name(name) scope.define_variable(name, new_name) self.var_dir[new_name] = 1 self.local.append(new_name) return new_name def expr_push(self, expr): self.expr.append(expr) def __str__(self) -> str: result = f'function {self.name}: ' + '{\n' for param in self.param: result += f'\tPARAM {str(param)}\n' for local in self.local: result += f'\tLOCAL {str(local)}\n' for exp in self.expr: result += '\t' + str(exp) + '\n' return result + '}' class Expression: def __init__(self, x=None, y=None, z=None) -> None: self.x = x self.y = y self.z = z def try_set_value(self, name): if self.x == super_value: self.x = name return True return False def set_value(self, name): if not self.x == super_value: raise exception("The expression is'nt set expression") self.x = name @property def can_fusion(self): return False def __str__(self) -> str: result = self.__class__.__name__ + ' ' if not self.x is None: result += str(self.x) + ' ' if not self.y is None: result += str(self.y) + ' ' if not self.z is None: result += str(self.z) + ' ' return result class Assign(Expression): @property def can_fusion(self): return True class Getattr(Expression): pass class Setattr(Expression): pass class Sum(Expression): pass class Rest(Expression): pass class Div(Expression): pass class Mult(Expression): pass class Less(Expression): pass class Lessorequal(Expression): pass class Equals(Expression): pass class Checktype(Expression): pass class Return(Expression): pass class Arg(Expression): pass class Vcall(Expression): pass class Call(Expression): pass class Simplecall(Expression): pass class New(Expression): pass class Load(Expression): pass class Allocate(Expression): pass class Ifgoto(Expression): pass class Goto(Expression): pass class Label(Expression): pass class Typeof(Expression): pass class Neg(Expression): pass class Complemnet(Expression): pass class Comment(Expression): def __str__(self) -> str: return ''
class ExternalID: def __init__(self, config, connection): self._config = config self._connection = connection def get(self): return self._connection.get(url='/organisation/external-id') def create(self, data): return self._connection.post(url='/organisation/external-id', payload=None)
class Externalid: def __init__(self, config, connection): self._config = config self._connection = connection def get(self): return self._connection.get(url='/organisation/external-id') def create(self, data): return self._connection.post(url='/organisation/external-id', payload=None)
result = 0 ROWS = 6 COLUMNS = 50 screen = [[0 for _ in range(COLUMNS)] for __ in range(ROWS)] with open("input.txt", "r") as input: for line in input: line = line.strip() parsing = line.split() if parsing[0] == "rect": [x, y] = [int(n) for n in parsing[1].split("x")] for i in range(x): for j in range(y): screen[j][i] = 1 elif parsing[1] == "row": (_, row) = parsing[2].split("=") row = int(row) shift = int(parsing[4]) screen[row] = screen[row][-shift:] + screen[row][:-shift] else: (_, col) = parsing[2].split("=") col = int(col) shift = int(parsing[4]) for _ in range(shift): next = screen[-1][col] for row in range(ROWS): temp = screen[row][col] screen[row][col] = next next = temp def printScreen(screen): return "\n".join(["".join([str(p) for p in r]) for r in screen]).replace("0", " ").replace("1", "*") result = printScreen(screen) with open("output2.txt", "w") as output: output.write(str(result)) print(str(result))
result = 0 rows = 6 columns = 50 screen = [[0 for _ in range(COLUMNS)] for __ in range(ROWS)] with open('input.txt', 'r') as input: for line in input: line = line.strip() parsing = line.split() if parsing[0] == 'rect': [x, y] = [int(n) for n in parsing[1].split('x')] for i in range(x): for j in range(y): screen[j][i] = 1 elif parsing[1] == 'row': (_, row) = parsing[2].split('=') row = int(row) shift = int(parsing[4]) screen[row] = screen[row][-shift:] + screen[row][:-shift] else: (_, col) = parsing[2].split('=') col = int(col) shift = int(parsing[4]) for _ in range(shift): next = screen[-1][col] for row in range(ROWS): temp = screen[row][col] screen[row][col] = next next = temp def print_screen(screen): return '\n'.join([''.join([str(p) for p in r]) for r in screen]).replace('0', ' ').replace('1', '*') result = print_screen(screen) with open('output2.txt', 'w') as output: output.write(str(result)) print(str(result))
expected_output = { 'switch': { "1": { 'fan': { "1": { 'state': 'ok' }, "2": { 'state': 'ok' }, "3": { 'state': 'ok' } }, 'power_supply': { "1": { 'state': 'not present' }, "2": { 'state': 'ok' } } } } }
expected_output = {'switch': {'1': {'fan': {'1': {'state': 'ok'}, '2': {'state': 'ok'}, '3': {'state': 'ok'}}, 'power_supply': {'1': {'state': 'not present'}, '2': {'state': 'ok'}}}}}
DEBUG=False SQLALCHEMY_ECHO=False SQLALCHEMY_DATABASE_URI="sqlite:///:memory:" SQLALCHEMY_TRACK_MODIFICATIONS=False # FLASK_ADMIN_SWATCH="cerulean" MQTT_CLIENT_ID="shelfie_server" # MQTT_BROKER_URL="mosquitto" # MQTT_BROKER_PORT=1883 # MQTT_USERNAME="mosquitto_userid" # MQTT_PASSWORD="mosquitto_password" MQTT_KEEPALIVE=15 MQTT_TLS_ENABLED=False SHELF_LABELS=["a","b","c"]
debug = False sqlalchemy_echo = False sqlalchemy_database_uri = 'sqlite:///:memory:' sqlalchemy_track_modifications = False mqtt_client_id = 'shelfie_server' mqtt_keepalive = 15 mqtt_tls_enabled = False shelf_labels = ['a', 'b', 'c']
VERSION = "0.0.1" # Application ENVADMIN_DB_NAME = "envadmin.json" DEFAULT_TABLE = "__default"
version = '0.0.1' envadmin_db_name = 'envadmin.json' default_table = '__default'
class Solution: def closestValue(self, root: TreeNode, target: float) -> int: upper = root.val lower = root.val while root : if target > root.val : lower = root.val root = root.right elif target < root.val : upper = root.val root = root.left else : return root.val if abs(target - lower) < abs(upper - target) : return lower else : return upper
class Solution: def closest_value(self, root: TreeNode, target: float) -> int: upper = root.val lower = root.val while root: if target > root.val: lower = root.val root = root.right elif target < root.val: upper = root.val root = root.left else: return root.val if abs(target - lower) < abs(upper - target): return lower else: return upper
# Engine class Engine(object): def __init__(self, room_map): self.room_map = room_map def play(self): current_room = self.room_map.opening_room() last_room = self.room_map.next_room('finished') while current_room != last_room: next_room_name = current_room.enter() current_room = self.room_map.next_room(next_room_name) current_room.enter()
class Engine(object): def __init__(self, room_map): self.room_map = room_map def play(self): current_room = self.room_map.opening_room() last_room = self.room_map.next_room('finished') while current_room != last_room: next_room_name = current_room.enter() current_room = self.room_map.next_room(next_room_name) current_room.enter()
#!/usr/bin/env python # _*_ coding:utf-8 _*_ class Solution(object): def isValid(self, s): if not s: return True length = len(s) if length % 2 == 1: return False l = [''] * length last = -1 for c in s: if c == '(' or c == '{' or c == '[': last += 1 l[last] = c continue elif c == ')': if l[last] != '(': return False l[last] = '' elif c == '}': if l[last] != '{': return False l[last] = '' elif c == ']': if l[last] != '[': return False l[last] = '' else: return False last -= 1 return l[0] == '' if __name__ == '__main__': so =Solution() assert(so.isValid("") == True) assert(so.isValid("()") == True) assert(so.isValid("(}") == False) assert(so.isValid("()(){}") == True) assert(so.isValid("({[]})") == True) assert(so.isValid("({[}])") == False) assert(so.isValid("([)]") == False) assert(so.isValid("([[{((") == False) assert(so.isValid("[[{((") == False) assert(so.isValid("}]))]}") == False) assert(so.isValid("(()(") == False)
class Solution(object): def is_valid(self, s): if not s: return True length = len(s) if length % 2 == 1: return False l = [''] * length last = -1 for c in s: if c == '(' or c == '{' or c == '[': last += 1 l[last] = c continue elif c == ')': if l[last] != '(': return False l[last] = '' elif c == '}': if l[last] != '{': return False l[last] = '' elif c == ']': if l[last] != '[': return False l[last] = '' else: return False last -= 1 return l[0] == '' if __name__ == '__main__': so = solution() assert so.isValid('') == True assert so.isValid('()') == True assert so.isValid('(}') == False assert so.isValid('()(){}') == True assert so.isValid('({[]})') == True assert so.isValid('({[}])') == False assert so.isValid('([)]') == False assert so.isValid('([[{((') == False assert so.isValid('[[{((') == False assert so.isValid('}]))]}') == False assert so.isValid('(()(') == False
lr = 0.0001 dropout_rate = 0.5 max_epoch = 3136 #3317 batch_size = 4096 w = 19 u = 9 glimpse_hidden = 128 bp_hidden = 128 glimpse_out = 128 nGlimpse = 7 lstm_cell_size = 128 action_hidden_1 = 256 action_hidden_2 = 256
lr = 0.0001 dropout_rate = 0.5 max_epoch = 3136 batch_size = 4096 w = 19 u = 9 glimpse_hidden = 128 bp_hidden = 128 glimpse_out = 128 n_glimpse = 7 lstm_cell_size = 128 action_hidden_1 = 256 action_hidden_2 = 256
contestsData={}; individualData={} while True: data=input() if data!="no more time": dataList=data.split(" -> ") username=dataList[0]; contest=dataList[1]; pts=dataList[2] contestFound=False; userFound=False for j in contestsData: if j==contest: contestFound=True for k in range(0,len(contestsData[j])): if username in contestsData[j][k]: userFound=True if int(pts)>contestsData[j][k][1]: contestsData[j][k][1]=int(pts) break if userFound==False: contestsData[j].append([username,int(pts)]) break if contestFound==False: contestsData[contest]=[[username,int(pts)]] userFound=False for j in individualData: if j==username: userFound=True break if userFound==False: individualData[username]=0 else: for i in individualData: for j in contestsData: for k in range(0,len(contestsData[j])): if i==contestsData[j][k][0]: individualData[i]+=contestsData[j][k][1] break for j in contestsData: tempData={} print(f"{j}: {len(contestsData[j])} participants") for k in range(0,len(contestsData[j])): tempData[contestsData[j][k][0]]=contestsData[j][k][1] participantsSorted=sorted(tempData.items(),key=lambda x: x[1], reverse=True) participantsSorted=dict(participantsSorted) n=1 for j in participantsSorted: print(f"{n}. {j} <::> {participantsSorted[j]}") n+=1 print("Individual standings: ") individualDataSort = sorted(individualData.items(), key=lambda x: x[1], reverse=True) individualDataSort=dict(individualDataSort) n=1 for j in individualDataSort: print(f"{n}. {j} -> {individualDataSort[j]}") n+=1 break
contests_data = {} individual_data = {} while True: data = input() if data != 'no more time': data_list = data.split(' -> ') username = dataList[0] contest = dataList[1] pts = dataList[2] contest_found = False user_found = False for j in contestsData: if j == contest: contest_found = True for k in range(0, len(contestsData[j])): if username in contestsData[j][k]: user_found = True if int(pts) > contestsData[j][k][1]: contestsData[j][k][1] = int(pts) break if userFound == False: contestsData[j].append([username, int(pts)]) break if contestFound == False: contestsData[contest] = [[username, int(pts)]] user_found = False for j in individualData: if j == username: user_found = True break if userFound == False: individualData[username] = 0 else: for i in individualData: for j in contestsData: for k in range(0, len(contestsData[j])): if i == contestsData[j][k][0]: individualData[i] += contestsData[j][k][1] break for j in contestsData: temp_data = {} print(f'{j}: {len(contestsData[j])} participants') for k in range(0, len(contestsData[j])): tempData[contestsData[j][k][0]] = contestsData[j][k][1] participants_sorted = sorted(tempData.items(), key=lambda x: x[1], reverse=True) participants_sorted = dict(participantsSorted) n = 1 for j in participantsSorted: print(f'{n}. {j} <::> {participantsSorted[j]}') n += 1 print('Individual standings: ') individual_data_sort = sorted(individualData.items(), key=lambda x: x[1], reverse=True) individual_data_sort = dict(individualDataSort) n = 1 for j in individualDataSort: print(f'{n}. {j} -> {individualDataSort[j]}') n += 1 break
# # PySNMP MIB module HPNSASCSI-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HPNSASCSI-MIB # Produced by pysmi-0.3.4 at Wed May 1 13:42:18 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # Integer, ObjectIdentifier, OctetString = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueSizeConstraint, SingleValueConstraint, ValueRangeConstraint, ConstraintsUnion, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "SingleValueConstraint", "ValueRangeConstraint", "ConstraintsUnion", "ConstraintsIntersection") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") Gauge32, Unsigned32, enterprises, Bits, ObjectIdentity, NotificationType, Integer32, TimeTicks, ModuleIdentity, MibIdentifier, Counter32, iso, MibScalar, MibTable, MibTableRow, MibTableColumn, Counter64, IpAddress = mibBuilder.importSymbols("SNMPv2-SMI", "Gauge32", "Unsigned32", "enterprises", "Bits", "ObjectIdentity", "NotificationType", "Integer32", "TimeTicks", "ModuleIdentity", "MibIdentifier", "Counter32", "iso", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter64", "IpAddress") DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") hp = MibIdentifier((1, 3, 6, 1, 4, 1, 11)) nm = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2)) hpnsa = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 23)) hpnsaScsi = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 23, 14)) hpnsaScsiMibRev = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 1)) hpnsaScsiAgent = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 2)) hpnsaScsiHba = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 3)) hpnsaScsiDev = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4)) hpnsaScsiMibRevMajor = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnsaScsiMibRevMajor.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiMibRevMajor.setDescription('The major revision level of the MIB. A change in the major revision level represents a major change in the architecture or functions of the MIB.') hpnsaScsiMibRevMinor = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnsaScsiMibRevMinor.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiMibRevMinor.setDescription('The minor revision level of the MIB. A change in the minor revision level may represent some minor additional support, no changes to any pre-existing information has occurred.') hpnsaScsiAgentModuleTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 2, 1), ) if mibBuilder.loadTexts: hpnsaScsiAgentModuleTable.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiAgentModuleTable.setDescription('A table of SNMP Agents that satisfy request pertaining to this MIB.') hpnsaScsiAgentModuleEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 2, 1, 1), ).setIndexNames((0, "HPNSASCSI-MIB", "hpnsaScsiAgentModuleIndex")) if mibBuilder.loadTexts: hpnsaScsiAgentModuleEntry.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiAgentModuleEntry.setDescription('A description of the Agents that access system information.') hpnsaScsiAgentModuleIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 2, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnsaScsiAgentModuleIndex.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiAgentModuleIndex.setDescription('A unique index for this module description.') hpnsaScsiAgentModuleName = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 2, 1, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnsaScsiAgentModuleName.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiAgentModuleName.setDescription('The module name.') hpnsaScsiAgentModuleVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 2, 1, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 10))).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnsaScsiAgentModuleVersion.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiAgentModuleVersion.setDescription('The module version in XX.YY format. Where XX is the major version number and YY is the minor version number. This field will be a null (size 0) string if the agent cannot provide the module version.') hpnsaScsiAgentModuleDate = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 2, 1, 1, 4), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 7))).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnsaScsiAgentModuleDate.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiAgentModuleDate.setDescription('The module date. field octets contents range _________________________________________________ 1 1-2 year 0..65536 2 3 month 1..12 3 4 day 1..31 4 5 hour 0..23 5 6 minute 0..59 6 7 second 0..60 (use 60 for leap-second) This field will be set to year = 0 if the agent cannot provide the module date. The hour, minute, and second field will be set to zero (0) if they are not relevant. The year field is set with the most significant octet first.') hpnsaScsiHbaTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 3, 1), ) if mibBuilder.loadTexts: hpnsaScsiHbaTable.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiHbaTable.setDescription('A list of SCSI Host Bus Adapter entries.') hpnsaScsiHbaEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 3, 1, 1), ).setIndexNames((0, "HPNSASCSI-MIB", "hpnsaScsiHbaIndex")) if mibBuilder.loadTexts: hpnsaScsiHbaEntry.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiHbaEntry.setDescription('A description of an SCSI device/function.') hpnsaScsiHbaIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 3, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnsaScsiHbaIndex.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiHbaIndex.setDescription('The SCSI HBA number that this entry describes.') hpnsaScsiHbaTargetId = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 3, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 7))).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnsaScsiHbaTargetId.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiHbaTargetId.setDescription('The SCSI target ID or SCSI address for this HBA.') hpnsaScsiHbaManagerId = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 3, 1, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 15))).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnsaScsiHbaManagerId.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiHbaManagerId.setDescription('String that describes the SCSI Manager.') hpnsaScsiHbaHostAdapterId = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 3, 1, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 15))).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnsaScsiHbaHostAdapterId.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiHbaHostAdapterId.setDescription('String that describes the SCSI host adapter.') hpnsaScsiDevTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1), ) if mibBuilder.loadTexts: hpnsaScsiDevTable.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiDevTable.setDescription('A list of SCSI device entries.') hpnsaScsiDevEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1), ).setIndexNames((0, "HPNSASCSI-MIB", "hpnsaScsiDevHbaIndex"), (0, "HPNSASCSI-MIB", "hpnsaScsiDevTargIdIndex"), (0, "HPNSASCSI-MIB", "hpnsaScsiDevLunIndex")) if mibBuilder.loadTexts: hpnsaScsiDevEntry.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiDevEntry.setDescription('A description of a SCSI device.') hpnsaScsiDevHbaIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnsaScsiDevHbaIndex.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiDevHbaIndex.setDescription('The SCSI HBA number that this entry describes.') hpnsaScsiDevTargIdIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 7))).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnsaScsiDevTargIdIndex.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiDevTargIdIndex.setDescription('The SCSI target ID or SCSI address for this HBA.') hpnsaScsiDevLunIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 7))).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnsaScsiDevLunIndex.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiDevLunIndex.setDescription('The SCSI LUN for this HBA.') hpnsaScsiDevType = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 31))).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnsaScsiDevType.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiDevType.setDescription('Identifies the type of SCSI device: Code Description ---- ----------- 00h Direct-access device (e.g. magnetic disk) 01h Sequential-access device (e.g. magnetic tape) 02h Printer device 03h Processor device 04h Write-once read-multiple device (e.g. some optical disks) 05h CD-ROM device 06h Scanner device 07h Optical Memory device (e.g. some optical disks) 08h Medium Changer device (e.g. jukeboxes) 09h Communications device 0A-1Eh Reserved 1Fh Unknown or no device type') hpnsaScsiDevRmb = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 1))).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnsaScsiDevRmb.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiDevRmb.setDescription('Identifies whether the medium is removable or not. 0 = medium is not removable 1 = medium is removable') hpnsaScsiDevAnsiVer = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 7))).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnsaScsiDevAnsiVer.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiDevAnsiVer.setDescription('Indicates the implemented ANSI version of this device. 0 = might or might not comply to an ANSI standard 1 = complies to ANSI X3.131-1986 (SCSI-1) 2 = comples to ANSI ?????? (SCSI-II) 3-7 = reserved') hpnsaScsiDevEcmaVer = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 7))).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnsaScsiDevEcmaVer.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiDevEcmaVer.setDescription('Indicates the implemented ECMA version of this device. Zero code indicates that this device does not comply with this standard.') hpnsaScsiDevIsoVer = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 3))).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnsaScsiDevIsoVer.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiDevIsoVer.setDescription('Indicates the implemented ISO version of this device. Zero code indicates that this device does not comply with this standard.') hpnsaScsiDevVendorId = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 9), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 8))).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnsaScsiDevVendorId.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiDevVendorId.setDescription('Identifies the vendor of the product.') hpnsaScsiDevProductId = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 10), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 16))).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnsaScsiDevProductId.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiDevProductId.setDescription('Identifies the product as defined by the vendor.') hpnsaScsiDevProductRev = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 11), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 7))).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnsaScsiDevProductRev.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiDevProductRev.setDescription('Identifies the product revision level.') hpnsaScsiDevLogicalBlocks = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 12), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnsaScsiDevLogicalBlocks.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiDevLogicalBlocks.setDescription('A 32-bit value that represents the total number of logical blocks for this device. Octet 1 is the LSB, and octet 4 is the MSB.') hpnsaScsiDevBlockLength = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 13), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnsaScsiDevBlockLength.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiDevBlockLength.setDescription('A 32-bit value that represents the size of a logical block for this device. Octet 1 is the LSB, and octet 4 is the MSB.') hpnsaScsiDevCapacity = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 14), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnsaScsiDevCapacity.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiDevCapacity.setDescription('A value that represents the capacity of the device in megabytes. One megabyte equals to 1,048,576 when calculating this value.') mibBuilder.exportSymbols("HPNSASCSI-MIB", hpnsaScsiDevLunIndex=hpnsaScsiDevLunIndex, hpnsaScsiDevBlockLength=hpnsaScsiDevBlockLength, hpnsaScsiHbaHostAdapterId=hpnsaScsiHbaHostAdapterId, hpnsaScsiAgentModuleEntry=hpnsaScsiAgentModuleEntry, hpnsaScsi=hpnsaScsi, hpnsaScsiHbaManagerId=hpnsaScsiHbaManagerId, hpnsaScsiAgentModuleTable=hpnsaScsiAgentModuleTable, hpnsaScsiDev=hpnsaScsiDev, hpnsaScsiDevVendorId=hpnsaScsiDevVendorId, hpnsaScsiHbaIndex=hpnsaScsiHbaIndex, hpnsaScsiAgent=hpnsaScsiAgent, hpnsaScsiAgentModuleIndex=hpnsaScsiAgentModuleIndex, hpnsaScsiDevProductRev=hpnsaScsiDevProductRev, hpnsaScsiDevTargIdIndex=hpnsaScsiDevTargIdIndex, hpnsa=hpnsa, hpnsaScsiDevLogicalBlocks=hpnsaScsiDevLogicalBlocks, hpnsaScsiMibRevMinor=hpnsaScsiMibRevMinor, hpnsaScsiDevHbaIndex=hpnsaScsiDevHbaIndex, hp=hp, hpnsaScsiHba=hpnsaScsiHba, hpnsaScsiAgentModuleName=hpnsaScsiAgentModuleName, hpnsaScsiDevRmb=hpnsaScsiDevRmb, hpnsaScsiMibRev=hpnsaScsiMibRev, hpnsaScsiAgentModuleDate=hpnsaScsiAgentModuleDate, hpnsaScsiHbaTargetId=hpnsaScsiHbaTargetId, hpnsaScsiDevCapacity=hpnsaScsiDevCapacity, hpnsaScsiDevTable=hpnsaScsiDevTable, hpnsaScsiDevEcmaVer=hpnsaScsiDevEcmaVer, hpnsaScsiDevProductId=hpnsaScsiDevProductId, hpnsaScsiMibRevMajor=hpnsaScsiMibRevMajor, hpnsaScsiDevType=hpnsaScsiDevType, nm=nm, hpnsaScsiHbaTable=hpnsaScsiHbaTable, hpnsaScsiDevIsoVer=hpnsaScsiDevIsoVer, hpnsaScsiDevAnsiVer=hpnsaScsiDevAnsiVer, hpnsaScsiDevEntry=hpnsaScsiDevEntry, hpnsaScsiHbaEntry=hpnsaScsiHbaEntry, hpnsaScsiAgentModuleVersion=hpnsaScsiAgentModuleVersion)
(integer, object_identifier, octet_string) = mibBuilder.importSymbols('ASN1', 'Integer', 'ObjectIdentifier', 'OctetString') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (value_size_constraint, single_value_constraint, value_range_constraint, constraints_union, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueSizeConstraint', 'SingleValueConstraint', 'ValueRangeConstraint', 'ConstraintsUnion', 'ConstraintsIntersection') (notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance') (gauge32, unsigned32, enterprises, bits, object_identity, notification_type, integer32, time_ticks, module_identity, mib_identifier, counter32, iso, mib_scalar, mib_table, mib_table_row, mib_table_column, counter64, ip_address) = mibBuilder.importSymbols('SNMPv2-SMI', 'Gauge32', 'Unsigned32', 'enterprises', 'Bits', 'ObjectIdentity', 'NotificationType', 'Integer32', 'TimeTicks', 'ModuleIdentity', 'MibIdentifier', 'Counter32', 'iso', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Counter64', 'IpAddress') (display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention') hp = mib_identifier((1, 3, 6, 1, 4, 1, 11)) nm = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2)) hpnsa = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 23)) hpnsa_scsi = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 23, 14)) hpnsa_scsi_mib_rev = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 1)) hpnsa_scsi_agent = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 2)) hpnsa_scsi_hba = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 3)) hpnsa_scsi_dev = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4)) hpnsa_scsi_mib_rev_major = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535))).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnsaScsiMibRevMajor.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiMibRevMajor.setDescription('The major revision level of the MIB. A change in the major revision level represents a major change in the architecture or functions of the MIB.') hpnsa_scsi_mib_rev_minor = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnsaScsiMibRevMinor.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiMibRevMinor.setDescription('The minor revision level of the MIB. A change in the minor revision level may represent some minor additional support, no changes to any pre-existing information has occurred.') hpnsa_scsi_agent_module_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 2, 1)) if mibBuilder.loadTexts: hpnsaScsiAgentModuleTable.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiAgentModuleTable.setDescription('A table of SNMP Agents that satisfy request pertaining to this MIB.') hpnsa_scsi_agent_module_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 2, 1, 1)).setIndexNames((0, 'HPNSASCSI-MIB', 'hpnsaScsiAgentModuleIndex')) if mibBuilder.loadTexts: hpnsaScsiAgentModuleEntry.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiAgentModuleEntry.setDescription('A description of the Agents that access system information.') hpnsa_scsi_agent_module_index = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 2, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnsaScsiAgentModuleIndex.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiAgentModuleIndex.setDescription('A unique index for this module description.') hpnsa_scsi_agent_module_name = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 2, 1, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnsaScsiAgentModuleName.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiAgentModuleName.setDescription('The module name.') hpnsa_scsi_agent_module_version = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 2, 1, 1, 3), display_string().subtype(subtypeSpec=value_size_constraint(0, 10))).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnsaScsiAgentModuleVersion.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiAgentModuleVersion.setDescription('The module version in XX.YY format. Where XX is the major version number and YY is the minor version number. This field will be a null (size 0) string if the agent cannot provide the module version.') hpnsa_scsi_agent_module_date = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 2, 1, 1, 4), octet_string().subtype(subtypeSpec=value_size_constraint(0, 7))).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnsaScsiAgentModuleDate.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiAgentModuleDate.setDescription('The module date. field octets contents range _________________________________________________ 1 1-2 year 0..65536 2 3 month 1..12 3 4 day 1..31 4 5 hour 0..23 5 6 minute 0..59 6 7 second 0..60 (use 60 for leap-second) This field will be set to year = 0 if the agent cannot provide the module date. The hour, minute, and second field will be set to zero (0) if they are not relevant. The year field is set with the most significant octet first.') hpnsa_scsi_hba_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 3, 1)) if mibBuilder.loadTexts: hpnsaScsiHbaTable.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiHbaTable.setDescription('A list of SCSI Host Bus Adapter entries.') hpnsa_scsi_hba_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 3, 1, 1)).setIndexNames((0, 'HPNSASCSI-MIB', 'hpnsaScsiHbaIndex')) if mibBuilder.loadTexts: hpnsaScsiHbaEntry.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiHbaEntry.setDescription('A description of an SCSI device/function.') hpnsa_scsi_hba_index = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 3, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnsaScsiHbaIndex.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiHbaIndex.setDescription('The SCSI HBA number that this entry describes.') hpnsa_scsi_hba_target_id = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 3, 1, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 7))).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnsaScsiHbaTargetId.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiHbaTargetId.setDescription('The SCSI target ID or SCSI address for this HBA.') hpnsa_scsi_hba_manager_id = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 3, 1, 1, 3), display_string().subtype(subtypeSpec=value_size_constraint(0, 15))).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnsaScsiHbaManagerId.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiHbaManagerId.setDescription('String that describes the SCSI Manager.') hpnsa_scsi_hba_host_adapter_id = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 3, 1, 1, 4), display_string().subtype(subtypeSpec=value_size_constraint(0, 15))).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnsaScsiHbaHostAdapterId.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiHbaHostAdapterId.setDescription('String that describes the SCSI host adapter.') hpnsa_scsi_dev_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1)) if mibBuilder.loadTexts: hpnsaScsiDevTable.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiDevTable.setDescription('A list of SCSI device entries.') hpnsa_scsi_dev_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1)).setIndexNames((0, 'HPNSASCSI-MIB', 'hpnsaScsiDevHbaIndex'), (0, 'HPNSASCSI-MIB', 'hpnsaScsiDevTargIdIndex'), (0, 'HPNSASCSI-MIB', 'hpnsaScsiDevLunIndex')) if mibBuilder.loadTexts: hpnsaScsiDevEntry.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiDevEntry.setDescription('A description of a SCSI device.') hpnsa_scsi_dev_hba_index = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnsaScsiDevHbaIndex.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiDevHbaIndex.setDescription('The SCSI HBA number that this entry describes.') hpnsa_scsi_dev_targ_id_index = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 7))).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnsaScsiDevTargIdIndex.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiDevTargIdIndex.setDescription('The SCSI target ID or SCSI address for this HBA.') hpnsa_scsi_dev_lun_index = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 7))).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnsaScsiDevLunIndex.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiDevLunIndex.setDescription('The SCSI LUN for this HBA.') hpnsa_scsi_dev_type = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 31))).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnsaScsiDevType.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiDevType.setDescription('Identifies the type of SCSI device: Code Description ---- ----------- 00h Direct-access device (e.g. magnetic disk) 01h Sequential-access device (e.g. magnetic tape) 02h Printer device 03h Processor device 04h Write-once read-multiple device (e.g. some optical disks) 05h CD-ROM device 06h Scanner device 07h Optical Memory device (e.g. some optical disks) 08h Medium Changer device (e.g. jukeboxes) 09h Communications device 0A-1Eh Reserved 1Fh Unknown or no device type') hpnsa_scsi_dev_rmb = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(0, 1))).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnsaScsiDevRmb.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiDevRmb.setDescription('Identifies whether the medium is removable or not. 0 = medium is not removable 1 = medium is removable') hpnsa_scsi_dev_ansi_ver = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(0, 7))).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnsaScsiDevAnsiVer.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiDevAnsiVer.setDescription('Indicates the implemented ANSI version of this device. 0 = might or might not comply to an ANSI standard 1 = complies to ANSI X3.131-1986 (SCSI-1) 2 = comples to ANSI ?????? (SCSI-II) 3-7 = reserved') hpnsa_scsi_dev_ecma_ver = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 7), integer32().subtype(subtypeSpec=value_range_constraint(0, 7))).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnsaScsiDevEcmaVer.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiDevEcmaVer.setDescription('Indicates the implemented ECMA version of this device. Zero code indicates that this device does not comply with this standard.') hpnsa_scsi_dev_iso_ver = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 8), integer32().subtype(subtypeSpec=value_range_constraint(0, 3))).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnsaScsiDevIsoVer.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiDevIsoVer.setDescription('Indicates the implemented ISO version of this device. Zero code indicates that this device does not comply with this standard.') hpnsa_scsi_dev_vendor_id = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 9), display_string().subtype(subtypeSpec=value_size_constraint(0, 8))).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnsaScsiDevVendorId.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiDevVendorId.setDescription('Identifies the vendor of the product.') hpnsa_scsi_dev_product_id = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 10), display_string().subtype(subtypeSpec=value_size_constraint(0, 16))).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnsaScsiDevProductId.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiDevProductId.setDescription('Identifies the product as defined by the vendor.') hpnsa_scsi_dev_product_rev = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 11), display_string().subtype(subtypeSpec=value_size_constraint(0, 7))).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnsaScsiDevProductRev.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiDevProductRev.setDescription('Identifies the product revision level.') hpnsa_scsi_dev_logical_blocks = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 12), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnsaScsiDevLogicalBlocks.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiDevLogicalBlocks.setDescription('A 32-bit value that represents the total number of logical blocks for this device. Octet 1 is the LSB, and octet 4 is the MSB.') hpnsa_scsi_dev_block_length = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 13), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnsaScsiDevBlockLength.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiDevBlockLength.setDescription('A 32-bit value that represents the size of a logical block for this device. Octet 1 is the LSB, and octet 4 is the MSB.') hpnsa_scsi_dev_capacity = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 23, 14, 4, 1, 1, 14), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnsaScsiDevCapacity.setStatus('mandatory') if mibBuilder.loadTexts: hpnsaScsiDevCapacity.setDescription('A value that represents the capacity of the device in megabytes. One megabyte equals to 1,048,576 when calculating this value.') mibBuilder.exportSymbols('HPNSASCSI-MIB', hpnsaScsiDevLunIndex=hpnsaScsiDevLunIndex, hpnsaScsiDevBlockLength=hpnsaScsiDevBlockLength, hpnsaScsiHbaHostAdapterId=hpnsaScsiHbaHostAdapterId, hpnsaScsiAgentModuleEntry=hpnsaScsiAgentModuleEntry, hpnsaScsi=hpnsaScsi, hpnsaScsiHbaManagerId=hpnsaScsiHbaManagerId, hpnsaScsiAgentModuleTable=hpnsaScsiAgentModuleTable, hpnsaScsiDev=hpnsaScsiDev, hpnsaScsiDevVendorId=hpnsaScsiDevVendorId, hpnsaScsiHbaIndex=hpnsaScsiHbaIndex, hpnsaScsiAgent=hpnsaScsiAgent, hpnsaScsiAgentModuleIndex=hpnsaScsiAgentModuleIndex, hpnsaScsiDevProductRev=hpnsaScsiDevProductRev, hpnsaScsiDevTargIdIndex=hpnsaScsiDevTargIdIndex, hpnsa=hpnsa, hpnsaScsiDevLogicalBlocks=hpnsaScsiDevLogicalBlocks, hpnsaScsiMibRevMinor=hpnsaScsiMibRevMinor, hpnsaScsiDevHbaIndex=hpnsaScsiDevHbaIndex, hp=hp, hpnsaScsiHba=hpnsaScsiHba, hpnsaScsiAgentModuleName=hpnsaScsiAgentModuleName, hpnsaScsiDevRmb=hpnsaScsiDevRmb, hpnsaScsiMibRev=hpnsaScsiMibRev, hpnsaScsiAgentModuleDate=hpnsaScsiAgentModuleDate, hpnsaScsiHbaTargetId=hpnsaScsiHbaTargetId, hpnsaScsiDevCapacity=hpnsaScsiDevCapacity, hpnsaScsiDevTable=hpnsaScsiDevTable, hpnsaScsiDevEcmaVer=hpnsaScsiDevEcmaVer, hpnsaScsiDevProductId=hpnsaScsiDevProductId, hpnsaScsiMibRevMajor=hpnsaScsiMibRevMajor, hpnsaScsiDevType=hpnsaScsiDevType, nm=nm, hpnsaScsiHbaTable=hpnsaScsiHbaTable, hpnsaScsiDevIsoVer=hpnsaScsiDevIsoVer, hpnsaScsiDevAnsiVer=hpnsaScsiDevAnsiVer, hpnsaScsiDevEntry=hpnsaScsiDevEntry, hpnsaScsiHbaEntry=hpnsaScsiHbaEntry, hpnsaScsiAgentModuleVersion=hpnsaScsiAgentModuleVersion)
''' Merge sort of singly linked list Merge sort is often prefered for sorting a linked list. The slow random access performance of linked list make other algorithms such as quicksort perform poorly and others such as heapsort completely impossible. ''' #Code class Node: def __init__(self,data): self.data = data self.next = None class LinkedList: def __init__(self): self.head = None def Push(self,new_data): if(self.head==None): self.head = Node(new_data) else: new_node = Node(new_data) new_node.next = None temp = self.head while(temp.next): temp = temp.next temp.next = new_node def PrintList(self): # function for printing linked list. temp = self.head while(temp): print(temp.data,end=" ") temp = temp.next print('') def MergeSort(self,h): # main Merge Sort function if h is None or h.next is None : return h self.PrintList() middle = self.GetMiddle(h) nexttomiddle = middle.next middle.next = None left = self.MergeSort(h) right = self.MergeSort(nexttomiddle) sortedlist = self.SortedMerge(left,right) return sortedlist def GetMiddle(self,head): # function to get middle of linked list if (head == None): return head slow = fast = head while(fast.next != None and fast.next.next != None): slow = slow.next fast = fast.next.next return slow def SortedMerge(self,a,b): result = None if a == None: return b if b == None: return a if (a.data <= b.data): result = a result.next = self.SortedMerge(a.next,b) else: result = b result.next = self.SortedMerge(a,b.next) return result # Driver if(__name__=="__main__"): list1 = LinkedList() values = [8,2,3,1,7] # 8 2 3 1 7 for i in values: list1.Push(i) list1.PrintList() list1.head = list1.MergeSort(list1.head) list1.PrintList()
""" Merge sort of singly linked list Merge sort is often prefered for sorting a linked list. The slow random access performance of linked list make other algorithms such as quicksort perform poorly and others such as heapsort completely impossible. """ class Node: def __init__(self, data): self.data = data self.next = None class Linkedlist: def __init__(self): self.head = None def push(self, new_data): if self.head == None: self.head = node(new_data) else: new_node = node(new_data) new_node.next = None temp = self.head while temp.next: temp = temp.next temp.next = new_node def print_list(self): temp = self.head while temp: print(temp.data, end=' ') temp = temp.next print('') def merge_sort(self, h): if h is None or h.next is None: return h self.PrintList() middle = self.GetMiddle(h) nexttomiddle = middle.next middle.next = None left = self.MergeSort(h) right = self.MergeSort(nexttomiddle) sortedlist = self.SortedMerge(left, right) return sortedlist def get_middle(self, head): if head == None: return head slow = fast = head while fast.next != None and fast.next.next != None: slow = slow.next fast = fast.next.next return slow def sorted_merge(self, a, b): result = None if a == None: return b if b == None: return a if a.data <= b.data: result = a result.next = self.SortedMerge(a.next, b) else: result = b result.next = self.SortedMerge(a, b.next) return result if __name__ == '__main__': list1 = linked_list() values = [8, 2, 3, 1, 7] for i in values: list1.Push(i) list1.PrintList() list1.head = list1.MergeSort(list1.head) list1.PrintList()
# regular if/else statement a = 10 if a > 5: print('a > 5') else: print('a <= 5') # if/elif/else a = 3 if a > 5: print('a > 5') elif a > 0: print('a > 0') else: print('a <= 0') # assignment with if/else - ternary statement b = 'a is positive' if a >= 0 else 'a is negative' print(b)
a = 10 if a > 5: print('a > 5') else: print('a <= 5') a = 3 if a > 5: print('a > 5') elif a > 0: print('a > 0') else: print('a <= 0') b = 'a is positive' if a >= 0 else 'a is negative' print(b)
# Definition for singly-linked list. class ListNode: def __init__(self, val=0, next=None): self.val = val self.next = next class Solution: def insertionSortList(self, head: ListNode) -> ListNode: node = head shead = None dummy = ListNode(0, head) while node: nodeNext = node.next if not shead: shead = node shead.next = None else: dummy = ListNode(0, shead) pnode = dummy snode = shead while snode: if node.val < snode.val: pnode.next = node node.next = snode break pnode = snode snode = snode.next if not snode and node.val >= pnode.val: pnode.next = node node.next = None shead = dummy.next node = nodeNext return dummy.next
class Listnode: def __init__(self, val=0, next=None): self.val = val self.next = next class Solution: def insertion_sort_list(self, head: ListNode) -> ListNode: node = head shead = None dummy = list_node(0, head) while node: node_next = node.next if not shead: shead = node shead.next = None else: dummy = list_node(0, shead) pnode = dummy snode = shead while snode: if node.val < snode.val: pnode.next = node node.next = snode break pnode = snode snode = snode.next if not snode and node.val >= pnode.val: pnode.next = node node.next = None shead = dummy.next node = nodeNext return dummy.next
#import wx Q3_IMPL_QT="ui.pyqt5" Q3_IMPL_WX="ui.wx" #Q3_IMPL="wx" #default impl #global Q3_IMPL Q3_IMPL=Q3_IMPL_QT Q3_IMPL_SIM='sim.default' #from wx import ID_EXIT #from wx import ID_ABOUT ID_EXIT = 1 ID_ABOUT = 2 MAX_PINS = 256 MAX_INPUTS = 256 MAX_OUTPUTS = 256 MAX_DYNAMICS = 256 MAX_SIGNAL_SIZE = 64
q3_impl_qt = 'ui.pyqt5' q3_impl_wx = 'ui.wx' q3_impl = Q3_IMPL_QT q3_impl_sim = 'sim.default' id_exit = 1 id_about = 2 max_pins = 256 max_inputs = 256 max_outputs = 256 max_dynamics = 256 max_signal_size = 64
# This test is here so we don't get a non-zero code from Pytest in Travis CI build. def test_dummy(): assert 5 == 5
def test_dummy(): assert 5 == 5
__metaclass__ = type #classes inherting from _UIBase are expected to also inherit UIBase separately. class _UIBase(object): id_gen = 0 def __init__(self): #protocol self._content_id = _UIBase.id_gen _UIBase.id_gen += 1 def _copy_values_deep(self, other): pass def _clone(self): result = self.__class__() result._copy_values_deep(self) return result
__metaclass__ = type class _Uibase(object): id_gen = 0 def __init__(self): self._content_id = _UIBase.id_gen _UIBase.id_gen += 1 def _copy_values_deep(self, other): pass def _clone(self): result = self.__class__() result._copy_values_deep(self) return result
#!/usr/bin/env python3 class Node(object): def __init__(self, ip, port): self.ip = ip self.port=port self.name="Node: %s:%d" % (ip, port) def __name__(self): return self.name def start(self): return def stop(self): return
class Node(object): def __init__(self, ip, port): self.ip = ip self.port = port self.name = 'Node: %s:%d' % (ip, port) def __name__(self): return self.name def start(self): return def stop(self): return
description = 'PANDA Heusler-analyzer' group = 'lowlevel' includes = ['monofoci', 'monoturm', 'panda_mtt'] extended = dict(dynamic_loaded = True) devices = dict( ana_heusler = device('nicos.devices.tas.Monochromator', description = 'PANDA\'s Heusler ana', unit = 'A-1', theta = 'ath', twotheta = 'att', focush = 'afh_heusler', focusv = None, abslimits = (1, 10), # hfocuspars = [44.8615, 4.64632, 2.22023], # 2009 # hfocuspars = [-66.481, 36.867, -2.8148], # 2013-11 hfocuspars = [-478, 483.74, -154.68, 16.644], # 2013-11 2nd dvalue = 3.45, scatteringsense = -1, crystalside = -1, ), afh_heusler_step = device('nicos.devices.generic.VirtualMotor', description = 'stepper for horizontal focus of heusler ana', unit = 'deg', abslimits = (-179, 179), speed = 1, lowlevel = True, ), afh_heusler = device('nicos_mlz.panda.devices.rot_axis.RotAxis', description = 'horizontal focus of heusler ana', motor = 'afh_heusler_step', dragerror = 5, abslimits = (-179, 179), precision = 1, fmtstr = '%.1f', autoref = None, # disable autoref since there is no refswitch lowlevel = True, ), ) startupcode = ''' try: _ = (ana, mono, mfv, mfh, focibox) except NameError as e: printerror("The requested setup 'panda' is not fully loaded!") raise NameError('One of the required devices is not loaded : %s, please check!' % e) from nicos import session ana.alias = session.getDevice('ana_heusler') afh.alias = session.getDevice('afh_heusler') del session '''
description = 'PANDA Heusler-analyzer' group = 'lowlevel' includes = ['monofoci', 'monoturm', 'panda_mtt'] extended = dict(dynamic_loaded=True) devices = dict(ana_heusler=device('nicos.devices.tas.Monochromator', description="PANDA's Heusler ana", unit='A-1', theta='ath', twotheta='att', focush='afh_heusler', focusv=None, abslimits=(1, 10), hfocuspars=[-478, 483.74, -154.68, 16.644], dvalue=3.45, scatteringsense=-1, crystalside=-1), afh_heusler_step=device('nicos.devices.generic.VirtualMotor', description='stepper for horizontal focus of heusler ana', unit='deg', abslimits=(-179, 179), speed=1, lowlevel=True), afh_heusler=device('nicos_mlz.panda.devices.rot_axis.RotAxis', description='horizontal focus of heusler ana', motor='afh_heusler_step', dragerror=5, abslimits=(-179, 179), precision=1, fmtstr='%.1f', autoref=None, lowlevel=True)) startupcode = '\ntry:\n _ = (ana, mono, mfv, mfh, focibox)\nexcept NameError as e:\n printerror("The requested setup \'panda\' is not fully loaded!")\n raise NameError(\'One of the required devices is not loaded : %s, please check!\' % e)\n\nfrom nicos import session\nana.alias = session.getDevice(\'ana_heusler\')\nafh.alias = session.getDevice(\'afh_heusler\')\ndel session\n'
# -*- coding: utf-8 -*- def test_cookies_group(testdir): result = testdir.runpytest( '--help', ) # fnmatch_lines does an assertion internally result.stdout.fnmatch_lines([ 'cookies:', '*--template=TEMPLATE*', ])
def test_cookies_group(testdir): result = testdir.runpytest('--help') result.stdout.fnmatch_lines(['cookies:', '*--template=TEMPLATE*'])
class TestFixupsToPywb: # Test random fixups we've made to improve `pywb` behavior def test_we_do_not_try_and_rewrite_rel_manifest(self, proxied_content): # The '_id' here means a transparent rewrite, and no insertion of # wombat stuff assert ( '<link rel="manifest" href="/proxy/id_/http://localhost:8080/manifest.json"' in proxied_content ) def test_we_do_rewrite_other_rels(self, proxied_content): assert ( '<link rel="other" href="/proxy/oe_/http://localhost:8080/other.json"' in proxied_content )
class Testfixupstopywb: def test_we_do_not_try_and_rewrite_rel_manifest(self, proxied_content): assert '<link rel="manifest" href="/proxy/id_/http://localhost:8080/manifest.json"' in proxied_content def test_we_do_rewrite_other_rels(self, proxied_content): assert '<link rel="other" href="/proxy/oe_/http://localhost:8080/other.json"' in proxied_content
#################################################### # package version -- named "pkgdir.testapi" # this function is loaded and run by testapi.c; # change this file between calls: auto-reload mode # gets the new version each time 'func' is called; # for the test, the last line was changed to: # return x + y # return x * y # return x \ y - syntax error # return x / 0 - zero-divide error # return pow(x, y) #################################################### def func(x, y): # called by C return x + y # change me
def func(x, y): return x + y
def part1(input) -> int: count1 = count3 = 0 for i in range(len(input) - 1): if input[i+1] - input[i] == 1: count1 += 1 elif input[i+1] - input[i] == 3: count3 += 1 return count1 * count3 def part2(input) -> int: valid = {} def possibleArrangements(input) -> int: if len(input) <= 1: return 1 if input[0] in valid: return valid[input[0]] i = 1 res = 0 while i < len(input) and input[i] - input[0] <= 3: res += possibleArrangements(input[i:]) i += 1 valid[input[0]] = res return res return possibleArrangements(input) f = open("input.txt", "r") input = f.read().splitlines() for i in range(len(input)): input[i] = int(input[i]) input.append(0) input.sort() input.append(input[-1] + 3) print(part1(input)) #2310 print(part2(input)) #64793042714624
def part1(input) -> int: count1 = count3 = 0 for i in range(len(input) - 1): if input[i + 1] - input[i] == 1: count1 += 1 elif input[i + 1] - input[i] == 3: count3 += 1 return count1 * count3 def part2(input) -> int: valid = {} def possible_arrangements(input) -> int: if len(input) <= 1: return 1 if input[0] in valid: return valid[input[0]] i = 1 res = 0 while i < len(input) and input[i] - input[0] <= 3: res += possible_arrangements(input[i:]) i += 1 valid[input[0]] = res return res return possible_arrangements(input) f = open('input.txt', 'r') input = f.read().splitlines() for i in range(len(input)): input[i] = int(input[i]) input.append(0) input.sort() input.append(input[-1] + 3) print(part1(input)) print(part2(input))
#!/usr/bin/python # -*- coding: UTF-8 -*- # Function: formatted text document by adding newline # Author: king def main(): print('This python script help you formatted text document.') fin = input('Input the file location : ') fout = input('Input the new file location: ') print('begin...') MAX_SIZE = 78 newlines = '' with open(fin, encoding='utf-8') as fp: lines = fp.readlines() for line in lines: content = line.encode('gbk') while len(content) > MAX_SIZE + 1: newcontent = content[:MAX_SIZE] content = content[MAX_SIZE:] try: newline = newcontent.decode('gbk') newlines += newline + '\n' except: newcontent += content[:1] content = content[1:] newline = newcontent.decode('gbk') newlines += content.decode('gbk') with open(fout, 'w', encoding='utf-8') as fo: fo.write(newlines) print('Finish Done!') pass if __name__ == '__main__': main()
def main(): print('This python script help you formatted text document.') fin = input('Input the file location : ') fout = input('Input the new file location: ') print('begin...') max_size = 78 newlines = '' with open(fin, encoding='utf-8') as fp: lines = fp.readlines() for line in lines: content = line.encode('gbk') while len(content) > MAX_SIZE + 1: newcontent = content[:MAX_SIZE] content = content[MAX_SIZE:] try: newline = newcontent.decode('gbk') newlines += newline + '\n' except: newcontent += content[:1] content = content[1:] newline = newcontent.decode('gbk') newlines += content.decode('gbk') with open(fout, 'w', encoding='utf-8') as fo: fo.write(newlines) print('Finish Done!') pass if __name__ == '__main__': main()
s=0 i=0 v=0 while v>=0: v = float(input("digite o valor da idade: ")) if v>=0: s = s+v print(s) i = i+1 print(i) r = s/(i) print(r) print(r)
s = 0 i = 0 v = 0 while v >= 0: v = float(input('digite o valor da idade: ')) if v >= 0: s = s + v print(s) i = i + 1 print(i) r = s / i print(r) print(r)
__author__ = 'zz' class BaseVerifier: def verify(self, value): raise NotImplementedError class IntVerifier(BaseVerifier): def __index__(self, upper, bot): self.upper = upper self.bot = bot def verify(self, value): if isinstance(value, int): return False if not (self.bot <= value <= self.upper): return False return True class StringNotEmptyVerifier(BaseVerifier): def verify(self, value): if str(value).strip(): return True return False
__author__ = 'zz' class Baseverifier: def verify(self, value): raise NotImplementedError class Intverifier(BaseVerifier): def __index__(self, upper, bot): self.upper = upper self.bot = bot def verify(self, value): if isinstance(value, int): return False if not self.bot <= value <= self.upper: return False return True class Stringnotemptyverifier(BaseVerifier): def verify(self, value): if str(value).strip(): return True return False
# Definition for singly-linked list. class ListNode: def __init__(self, x): self.val = x self.next = None class Solution: # @param {ListNode} head # @param {integer} m # @param {integer} n # @return {ListNode} def reverseBetween(self, head, m, n): dumpy = ListNode(0) dumpy.next = head pre = dumpy diff = n - m while m > 1: pre = pre.next m -= 1 p = pre.next while diff > 0 and p and p.next: # print p.val diff -= 1 tmp = p.next p.next = tmp.next q = pre.next pre.next = tmp tmp.next = q return dumpy.next
class Listnode: def __init__(self, x): self.val = x self.next = None class Solution: def reverse_between(self, head, m, n): dumpy = list_node(0) dumpy.next = head pre = dumpy diff = n - m while m > 1: pre = pre.next m -= 1 p = pre.next while diff > 0 and p and p.next: diff -= 1 tmp = p.next p.next = tmp.next q = pre.next pre.next = tmp tmp.next = q return dumpy.next
class Solution: def twoSum(self, nums, target: int): d = {} for i in range(len(nums)): j = target - nums[i] if j in d: return [d[j], i] else: d[nums[i]] = i s = Solution() print(s.twoSum( [3, 2, 4], 6))
class Solution: def two_sum(self, nums, target: int): d = {} for i in range(len(nums)): j = target - nums[i] if j in d: return [d[j], i] else: d[nums[i]] = i s = solution() print(s.twoSum([3, 2, 4], 6))
def tri_bulle(L): pointer = 0 while pointer < len(L): left = 0 right = 1 while right < len(L) - pointer: if L[right] < L[left]: L[left], L[right] = L[right], L[left] left += 1 right += 1 pointer += 1 return L print(tri_bulle([8, -1, 2, 5, 3, -2]))
def tri_bulle(L): pointer = 0 while pointer < len(L): left = 0 right = 1 while right < len(L) - pointer: if L[right] < L[left]: (L[left], L[right]) = (L[right], L[left]) left += 1 right += 1 pointer += 1 return L print(tri_bulle([8, -1, 2, 5, 3, -2]))
t = int(input()) for case in range(t): s = input() numbers = '0123456789' if (s[0] == 'R' and (s[1] in numbers) and ('C' in s)): iC = 0 for i in range(len(s)): if (s[i] == 'C'): iC = i break row = s[1:iC] col = int(s[iC + 1:]) cols = '' rem = 0 while (col > 0): rem = col % 26 col //= 26 if rem == 0: col -= 1 cols = (chr(rem + 64) if rem != 0 else 'Z') + cols print(cols + row) else: iN = 0 for i in range(len(s)): if (s[i] in numbers): iN = i break pow = 0 cols = s[:iN] row = s[iN:] col = 0 for i in range(len(cols) - 1, -1, -1): col += (26 ** pow) * (ord(cols[i]) - 64) pow += 1 print('R' + row + 'C' + str(col))
t = int(input()) for case in range(t): s = input() numbers = '0123456789' if s[0] == 'R' and s[1] in numbers and ('C' in s): i_c = 0 for i in range(len(s)): if s[i] == 'C': i_c = i break row = s[1:iC] col = int(s[iC + 1:]) cols = '' rem = 0 while col > 0: rem = col % 26 col //= 26 if rem == 0: col -= 1 cols = (chr(rem + 64) if rem != 0 else 'Z') + cols print(cols + row) else: i_n = 0 for i in range(len(s)): if s[i] in numbers: i_n = i break pow = 0 cols = s[:iN] row = s[iN:] col = 0 for i in range(len(cols) - 1, -1, -1): col += 26 ** pow * (ord(cols[i]) - 64) pow += 1 print('R' + row + 'C' + str(col))
# # PySNMP MIB module STACK-TOP (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/STACK-TOP # Produced by pysmi-0.3.4 at Wed May 1 15:10:55 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") ConstraintsUnion, ValueSizeConstraint, ValueRangeConstraint, SingleValueConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "ValueSizeConstraint", "ValueRangeConstraint", "SingleValueConstraint", "ConstraintsIntersection") NotificationGroup, ObjectGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ObjectGroup", "ModuleCompliance") Counter64, ModuleIdentity, ObjectIdentity, Counter32, NotificationType, iso, Bits, IpAddress, enterprises, Gauge32, Unsigned32, TimeTicks, MibScalar, MibTable, MibTableRow, MibTableColumn, Integer32, MibIdentifier = mibBuilder.importSymbols("SNMPv2-SMI", "Counter64", "ModuleIdentity", "ObjectIdentity", "Counter32", "NotificationType", "iso", "Bits", "IpAddress", "enterprises", "Gauge32", "Unsigned32", "TimeTicks", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Integer32", "MibIdentifier") DisplayString, MacAddress, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "MacAddress", "TextualConvention") zte = MibIdentifier((1, 3, 6, 1, 4, 1, 3902)) zxr10 = MibIdentifier((1, 3, 6, 1, 4, 1, 3902, 3)) stacktop = ModuleIdentity((1, 3, 6, 1, 4, 1, 3902, 3, 301)) stacktop.setRevisions(('2004-05-14 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: stacktop.setRevisionsDescriptions(('',)) if mibBuilder.loadTexts: stacktop.setLastUpdated('200705280000Z') if mibBuilder.loadTexts: stacktop.setOrganization('ZTE Corp.') if mibBuilder.loadTexts: stacktop.setContactInfo('') if mibBuilder.loadTexts: stacktop.setDescription('') class VendorIdType(OctetString): subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(3, 3) fixedLength = 3 sysMasterVoteTimes = MibScalar((1, 3, 6, 1, 4, 1, 3902, 3, 301, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sysMasterVoteTimes.setStatus('current') if mibBuilder.loadTexts: sysMasterVoteTimes.setDescription("How many times stack system's master device be voted.") sysMasterLastVoteTime = MibScalar((1, 3, 6, 1, 4, 1, 3902, 3, 301, 2), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: sysMasterLastVoteTime.setStatus('current') if mibBuilder.loadTexts: sysMasterLastVoteTime.setDescription("The ending time when stack system's master device be voted.") sysLastDetecTopEndTime = MibScalar((1, 3, 6, 1, 4, 1, 3902, 3, 301, 3), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: sysLastDetecTopEndTime.setStatus('current') if mibBuilder.loadTexts: sysLastDetecTopEndTime.setDescription('The ending time when the system detected top at the last time.') sysTopChagTimes = MibScalar((1, 3, 6, 1, 4, 1, 3902, 3, 301, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sysTopChagTimes.setStatus('current') if mibBuilder.loadTexts: sysTopChagTimes.setDescription('How many times the system top changed.') sysTopDetecMsgCount = MibScalar((1, 3, 6, 1, 4, 1, 3902, 3, 301, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sysTopDetecMsgCount.setStatus('current') if mibBuilder.loadTexts: sysTopDetecMsgCount.setDescription('System topo detected topo protocol message count.') sysTopInfoTable = MibTable((1, 3, 6, 1, 4, 1, 3902, 3, 301, 6), ) if mibBuilder.loadTexts: sysTopInfoTable.setStatus('current') if mibBuilder.loadTexts: sysTopInfoTable.setDescription('A list of the topo information.') sysTopInfoEntry = MibTableRow((1, 3, 6, 1, 4, 1, 3902, 3, 301, 6, 1), ).setIndexNames((0, "STACK-TOP", "sysDeviceMacAddr"), (0, "STACK-TOP", "sysDeviceStkPortIndex")) if mibBuilder.loadTexts: sysTopInfoEntry.setStatus('current') if mibBuilder.loadTexts: sysTopInfoEntry.setDescription('An entry to the topo info table.') sysDeviceMacAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 3902, 3, 301, 6, 1, 1), MacAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: sysDeviceMacAddr.setStatus('current') if mibBuilder.loadTexts: sysDeviceMacAddr.setDescription('System Device mac address.') sysDeviceStkPortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 3902, 3, 301, 6, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sysDeviceStkPortIndex.setStatus('current') if mibBuilder.loadTexts: sysDeviceStkPortIndex.setDescription('System device stack interface port index.') sysDeviceType = MibTableColumn((1, 3, 6, 1, 4, 1, 3902, 3, 301, 6, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sysDeviceType.setStatus('current') if mibBuilder.loadTexts: sysDeviceType.setDescription('System device type.') sysDeviceStkPortNum = MibTableColumn((1, 3, 6, 1, 4, 1, 3902, 3, 301, 6, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sysDeviceStkPortNum.setStatus('current') if mibBuilder.loadTexts: sysDeviceStkPortNum.setDescription('System device stack interface port number.') sysDeviceID = MibTableColumn((1, 3, 6, 1, 4, 1, 3902, 3, 301, 6, 1, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sysDeviceID.setStatus('current') if mibBuilder.loadTexts: sysDeviceID.setDescription('System device ID.') sysDeviceMasterPri = MibTableColumn((1, 3, 6, 1, 4, 1, 3902, 3, 301, 6, 1, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sysDeviceMasterPri.setStatus('current') if mibBuilder.loadTexts: sysDeviceMasterPri.setDescription("System device's priority in voting master device.") sysDeviceStkIfStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 3902, 3, 301, 6, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("up", 1), ("down", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: sysDeviceStkIfStatus.setStatus('current') if mibBuilder.loadTexts: sysDeviceStkIfStatus.setDescription('System device stack interface status 1: up 2: down.') sysDeviceStkIfPanel = MibTableColumn((1, 3, 6, 1, 4, 1, 3902, 3, 301, 6, 1, 8), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sysDeviceStkIfPanel.setStatus('current') if mibBuilder.loadTexts: sysDeviceStkIfPanel.setDescription('System device stack interface panel num.') sysDeviceStkIfPortID = MibTableColumn((1, 3, 6, 1, 4, 1, 3902, 3, 301, 6, 1, 9), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sysDeviceStkIfPortID.setStatus('current') if mibBuilder.loadTexts: sysDeviceStkIfPortID.setDescription('System device stack interface port num.') sysDeviceStkPortNeibMacAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 3902, 3, 301, 6, 1, 10), MacAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: sysDeviceStkPortNeibMacAddr.setStatus('current') if mibBuilder.loadTexts: sysDeviceStkPortNeibMacAddr.setDescription('System device stack interface neighbor device mac address.') sysDeviceStkPortNeibPortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 3902, 3, 301, 6, 1, 11), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sysDeviceStkPortNeibPortIndex.setStatus('current') if mibBuilder.loadTexts: sysDeviceStkPortNeibPortIndex.setDescription('System device stack interface neighbor device port index.') sysStkPortMsgStacTable = MibTable((1, 3, 6, 1, 4, 1, 3902, 3, 301, 7), ) if mibBuilder.loadTexts: sysStkPortMsgStacTable.setStatus('current') if mibBuilder.loadTexts: sysStkPortMsgStacTable.setDescription('A list of the stack interface receive and send message statistic information.') sysStkPortMsgStacEntry = MibTableRow((1, 3, 6, 1, 4, 1, 3902, 3, 301, 7, 1), ).setIndexNames((0, "STACK-TOP", "sysStkDeviceID"), (0, "STACK-TOP", "sysStkDeviceStkIfIndex")) if mibBuilder.loadTexts: sysStkPortMsgStacEntry.setStatus('current') if mibBuilder.loadTexts: sysStkPortMsgStacEntry.setDescription('An entry to the stack interface receive and send message statistic information table.') sysStkDeviceID = MibTableColumn((1, 3, 6, 1, 4, 1, 3902, 3, 301, 7, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sysStkDeviceID.setStatus('current') if mibBuilder.loadTexts: sysStkDeviceID.setDescription('System device ID.') sysStkDeviceStkIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 3902, 3, 301, 7, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sysStkDeviceStkIfIndex.setStatus('current') if mibBuilder.loadTexts: sysStkDeviceStkIfIndex.setDescription('System device stack interface index.') sysStkPortRecMsgCount = MibTableColumn((1, 3, 6, 1, 4, 1, 3902, 3, 301, 7, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sysStkPortRecMsgCount.setStatus('current') if mibBuilder.loadTexts: sysStkPortRecMsgCount.setDescription('System stack interface received message count.') sysStkPortSendMsgCount = MibTableColumn((1, 3, 6, 1, 4, 1, 3902, 3, 301, 7, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sysStkPortSendMsgCount.setStatus('current') if mibBuilder.loadTexts: sysStkPortSendMsgCount.setDescription('System stack interface send message count.') mibBuilder.exportSymbols("STACK-TOP", sysTopChagTimes=sysTopChagTimes, zxr10=zxr10, PYSNMP_MODULE_ID=stacktop, stacktop=stacktop, VendorIdType=VendorIdType, sysLastDetecTopEndTime=sysLastDetecTopEndTime, sysStkPortMsgStacTable=sysStkPortMsgStacTable, sysStkPortSendMsgCount=sysStkPortSendMsgCount, sysTopDetecMsgCount=sysTopDetecMsgCount, sysDeviceMacAddr=sysDeviceMacAddr, sysDeviceType=sysDeviceType, sysDeviceID=sysDeviceID, sysMasterLastVoteTime=sysMasterLastVoteTime, zte=zte, sysDeviceStkIfStatus=sysDeviceStkIfStatus, sysTopInfoTable=sysTopInfoTable, sysStkPortRecMsgCount=sysStkPortRecMsgCount, sysStkPortMsgStacEntry=sysStkPortMsgStacEntry, sysStkDeviceStkIfIndex=sysStkDeviceStkIfIndex, sysDeviceMasterPri=sysDeviceMasterPri, sysMasterVoteTimes=sysMasterVoteTimes, sysDeviceStkIfPanel=sysDeviceStkIfPanel, sysTopInfoEntry=sysTopInfoEntry, sysDeviceStkPortNum=sysDeviceStkPortNum, sysDeviceStkPortNeibPortIndex=sysDeviceStkPortNeibPortIndex, sysDeviceStkIfPortID=sysDeviceStkIfPortID, sysDeviceStkPortNeibMacAddr=sysDeviceStkPortNeibMacAddr, sysStkDeviceID=sysStkDeviceID, sysDeviceStkPortIndex=sysDeviceStkPortIndex)
(octet_string, object_identifier, integer) = mibBuilder.importSymbols('ASN1', 'OctetString', 'ObjectIdentifier', 'Integer') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_union, value_size_constraint, value_range_constraint, single_value_constraint, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsUnion', 'ValueSizeConstraint', 'ValueRangeConstraint', 'SingleValueConstraint', 'ConstraintsIntersection') (notification_group, object_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ObjectGroup', 'ModuleCompliance') (counter64, module_identity, object_identity, counter32, notification_type, iso, bits, ip_address, enterprises, gauge32, unsigned32, time_ticks, mib_scalar, mib_table, mib_table_row, mib_table_column, integer32, mib_identifier) = mibBuilder.importSymbols('SNMPv2-SMI', 'Counter64', 'ModuleIdentity', 'ObjectIdentity', 'Counter32', 'NotificationType', 'iso', 'Bits', 'IpAddress', 'enterprises', 'Gauge32', 'Unsigned32', 'TimeTicks', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Integer32', 'MibIdentifier') (display_string, mac_address, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'MacAddress', 'TextualConvention') zte = mib_identifier((1, 3, 6, 1, 4, 1, 3902)) zxr10 = mib_identifier((1, 3, 6, 1, 4, 1, 3902, 3)) stacktop = module_identity((1, 3, 6, 1, 4, 1, 3902, 3, 301)) stacktop.setRevisions(('2004-05-14 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: stacktop.setRevisionsDescriptions(('',)) if mibBuilder.loadTexts: stacktop.setLastUpdated('200705280000Z') if mibBuilder.loadTexts: stacktop.setOrganization('ZTE Corp.') if mibBuilder.loadTexts: stacktop.setContactInfo('') if mibBuilder.loadTexts: stacktop.setDescription('') class Vendoridtype(OctetString): subtype_spec = OctetString.subtypeSpec + value_size_constraint(3, 3) fixed_length = 3 sys_master_vote_times = mib_scalar((1, 3, 6, 1, 4, 1, 3902, 3, 301, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sysMasterVoteTimes.setStatus('current') if mibBuilder.loadTexts: sysMasterVoteTimes.setDescription("How many times stack system's master device be voted.") sys_master_last_vote_time = mib_scalar((1, 3, 6, 1, 4, 1, 3902, 3, 301, 2), time_ticks()).setMaxAccess('readonly') if mibBuilder.loadTexts: sysMasterLastVoteTime.setStatus('current') if mibBuilder.loadTexts: sysMasterLastVoteTime.setDescription("The ending time when stack system's master device be voted.") sys_last_detec_top_end_time = mib_scalar((1, 3, 6, 1, 4, 1, 3902, 3, 301, 3), time_ticks()).setMaxAccess('readonly') if mibBuilder.loadTexts: sysLastDetecTopEndTime.setStatus('current') if mibBuilder.loadTexts: sysLastDetecTopEndTime.setDescription('The ending time when the system detected top at the last time.') sys_top_chag_times = mib_scalar((1, 3, 6, 1, 4, 1, 3902, 3, 301, 4), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sysTopChagTimes.setStatus('current') if mibBuilder.loadTexts: sysTopChagTimes.setDescription('How many times the system top changed.') sys_top_detec_msg_count = mib_scalar((1, 3, 6, 1, 4, 1, 3902, 3, 301, 5), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sysTopDetecMsgCount.setStatus('current') if mibBuilder.loadTexts: sysTopDetecMsgCount.setDescription('System topo detected topo protocol message count.') sys_top_info_table = mib_table((1, 3, 6, 1, 4, 1, 3902, 3, 301, 6)) if mibBuilder.loadTexts: sysTopInfoTable.setStatus('current') if mibBuilder.loadTexts: sysTopInfoTable.setDescription('A list of the topo information.') sys_top_info_entry = mib_table_row((1, 3, 6, 1, 4, 1, 3902, 3, 301, 6, 1)).setIndexNames((0, 'STACK-TOP', 'sysDeviceMacAddr'), (0, 'STACK-TOP', 'sysDeviceStkPortIndex')) if mibBuilder.loadTexts: sysTopInfoEntry.setStatus('current') if mibBuilder.loadTexts: sysTopInfoEntry.setDescription('An entry to the topo info table.') sys_device_mac_addr = mib_table_column((1, 3, 6, 1, 4, 1, 3902, 3, 301, 6, 1, 1), mac_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: sysDeviceMacAddr.setStatus('current') if mibBuilder.loadTexts: sysDeviceMacAddr.setDescription('System Device mac address.') sys_device_stk_port_index = mib_table_column((1, 3, 6, 1, 4, 1, 3902, 3, 301, 6, 1, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sysDeviceStkPortIndex.setStatus('current') if mibBuilder.loadTexts: sysDeviceStkPortIndex.setDescription('System device stack interface port index.') sys_device_type = mib_table_column((1, 3, 6, 1, 4, 1, 3902, 3, 301, 6, 1, 3), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sysDeviceType.setStatus('current') if mibBuilder.loadTexts: sysDeviceType.setDescription('System device type.') sys_device_stk_port_num = mib_table_column((1, 3, 6, 1, 4, 1, 3902, 3, 301, 6, 1, 4), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sysDeviceStkPortNum.setStatus('current') if mibBuilder.loadTexts: sysDeviceStkPortNum.setDescription('System device stack interface port number.') sys_device_id = mib_table_column((1, 3, 6, 1, 4, 1, 3902, 3, 301, 6, 1, 5), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sysDeviceID.setStatus('current') if mibBuilder.loadTexts: sysDeviceID.setDescription('System device ID.') sys_device_master_pri = mib_table_column((1, 3, 6, 1, 4, 1, 3902, 3, 301, 6, 1, 6), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sysDeviceMasterPri.setStatus('current') if mibBuilder.loadTexts: sysDeviceMasterPri.setDescription("System device's priority in voting master device.") sys_device_stk_if_status = mib_table_column((1, 3, 6, 1, 4, 1, 3902, 3, 301, 6, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('up', 1), ('down', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: sysDeviceStkIfStatus.setStatus('current') if mibBuilder.loadTexts: sysDeviceStkIfStatus.setDescription('System device stack interface status 1: up 2: down.') sys_device_stk_if_panel = mib_table_column((1, 3, 6, 1, 4, 1, 3902, 3, 301, 6, 1, 8), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sysDeviceStkIfPanel.setStatus('current') if mibBuilder.loadTexts: sysDeviceStkIfPanel.setDescription('System device stack interface panel num.') sys_device_stk_if_port_id = mib_table_column((1, 3, 6, 1, 4, 1, 3902, 3, 301, 6, 1, 9), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sysDeviceStkIfPortID.setStatus('current') if mibBuilder.loadTexts: sysDeviceStkIfPortID.setDescription('System device stack interface port num.') sys_device_stk_port_neib_mac_addr = mib_table_column((1, 3, 6, 1, 4, 1, 3902, 3, 301, 6, 1, 10), mac_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: sysDeviceStkPortNeibMacAddr.setStatus('current') if mibBuilder.loadTexts: sysDeviceStkPortNeibMacAddr.setDescription('System device stack interface neighbor device mac address.') sys_device_stk_port_neib_port_index = mib_table_column((1, 3, 6, 1, 4, 1, 3902, 3, 301, 6, 1, 11), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sysDeviceStkPortNeibPortIndex.setStatus('current') if mibBuilder.loadTexts: sysDeviceStkPortNeibPortIndex.setDescription('System device stack interface neighbor device port index.') sys_stk_port_msg_stac_table = mib_table((1, 3, 6, 1, 4, 1, 3902, 3, 301, 7)) if mibBuilder.loadTexts: sysStkPortMsgStacTable.setStatus('current') if mibBuilder.loadTexts: sysStkPortMsgStacTable.setDescription('A list of the stack interface receive and send message statistic information.') sys_stk_port_msg_stac_entry = mib_table_row((1, 3, 6, 1, 4, 1, 3902, 3, 301, 7, 1)).setIndexNames((0, 'STACK-TOP', 'sysStkDeviceID'), (0, 'STACK-TOP', 'sysStkDeviceStkIfIndex')) if mibBuilder.loadTexts: sysStkPortMsgStacEntry.setStatus('current') if mibBuilder.loadTexts: sysStkPortMsgStacEntry.setDescription('An entry to the stack interface receive and send message statistic information table.') sys_stk_device_id = mib_table_column((1, 3, 6, 1, 4, 1, 3902, 3, 301, 7, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sysStkDeviceID.setStatus('current') if mibBuilder.loadTexts: sysStkDeviceID.setDescription('System device ID.') sys_stk_device_stk_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 3902, 3, 301, 7, 1, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sysStkDeviceStkIfIndex.setStatus('current') if mibBuilder.loadTexts: sysStkDeviceStkIfIndex.setDescription('System device stack interface index.') sys_stk_port_rec_msg_count = mib_table_column((1, 3, 6, 1, 4, 1, 3902, 3, 301, 7, 1, 3), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sysStkPortRecMsgCount.setStatus('current') if mibBuilder.loadTexts: sysStkPortRecMsgCount.setDescription('System stack interface received message count.') sys_stk_port_send_msg_count = mib_table_column((1, 3, 6, 1, 4, 1, 3902, 3, 301, 7, 1, 4), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sysStkPortSendMsgCount.setStatus('current') if mibBuilder.loadTexts: sysStkPortSendMsgCount.setDescription('System stack interface send message count.') mibBuilder.exportSymbols('STACK-TOP', sysTopChagTimes=sysTopChagTimes, zxr10=zxr10, PYSNMP_MODULE_ID=stacktop, stacktop=stacktop, VendorIdType=VendorIdType, sysLastDetecTopEndTime=sysLastDetecTopEndTime, sysStkPortMsgStacTable=sysStkPortMsgStacTable, sysStkPortSendMsgCount=sysStkPortSendMsgCount, sysTopDetecMsgCount=sysTopDetecMsgCount, sysDeviceMacAddr=sysDeviceMacAddr, sysDeviceType=sysDeviceType, sysDeviceID=sysDeviceID, sysMasterLastVoteTime=sysMasterLastVoteTime, zte=zte, sysDeviceStkIfStatus=sysDeviceStkIfStatus, sysTopInfoTable=sysTopInfoTable, sysStkPortRecMsgCount=sysStkPortRecMsgCount, sysStkPortMsgStacEntry=sysStkPortMsgStacEntry, sysStkDeviceStkIfIndex=sysStkDeviceStkIfIndex, sysDeviceMasterPri=sysDeviceMasterPri, sysMasterVoteTimes=sysMasterVoteTimes, sysDeviceStkIfPanel=sysDeviceStkIfPanel, sysTopInfoEntry=sysTopInfoEntry, sysDeviceStkPortNum=sysDeviceStkPortNum, sysDeviceStkPortNeibPortIndex=sysDeviceStkPortNeibPortIndex, sysDeviceStkIfPortID=sysDeviceStkIfPortID, sysDeviceStkPortNeibMacAddr=sysDeviceStkPortNeibMacAddr, sysStkDeviceID=sysStkDeviceID, sysDeviceStkPortIndex=sysDeviceStkPortIndex)
def Setup(Settings,DefaultModel): # set1-test_of_models_against_datasets/models_30m_640px.py Settings["experiment_name"] = "set1c_Models_Test_30m_640px" Settings["graph_histories"] = ['together', [0,1], [1,2], [0,2]] n=0 # 5556x_minlen30_640px 5556x_minlen20_640px 5556x_reslen20_299px 5556x_reslen30_299px Settings["models"][n]["dataset_name"] = "5556x_minlen30_640px" Settings["models"][n]["dump_file_override"] = 'SegmentsData_marked_R100_4Tables.dump' Settings["models"][n]["pixels"] = 640 Settings["models"][n]["model_type"] = 'img_osm_mix' Settings["models"][n]["unique_id"] = 'mix' Settings["models"][n]["top_repeat_FC_block"] = 2 Settings["models"][n]["epochs"] = 800 # c Settings["models"][n]["loss_func"] = 'mean_absolute_error' Settings["models"][n]["metrics"] = ['mean_squared_error'] Settings["models"].append(DefaultModel.copy()) n=1 Settings["models"][n]["dataset_pointer"] = -1 # 0 - reuse the first dataset Settings["models"][n]["dataset_name"] = "5556x_minlen30_640px" Settings["models"][n]["dump_file_override"] = 'SegmentsData_marked_R100_4Tables.dump' Settings["models"][n]["pixels"] = 640 Settings["models"][n]["model_type"] = 'osm_only' Settings["models"][n]["unique_id"] = 'osm_only' Settings["models"][n]["top_repeat_FC_block"] = 2 Settings["models"][n]["epochs"] = 800 # c Settings["models"][n]["loss_func"] = 'mean_absolute_error' Settings["models"][n]["metrics"] = ['mean_squared_error'] Settings["models"].append(DefaultModel.copy()) n=2 Settings["models"][n]["dataset_pointer"] = -1 # 0 - reuse the first dataset Settings["models"][n]["dataset_name"] = "5556x_minlen30_640px" Settings["models"][n]["dump_file_override"] = 'SegmentsData_marked_R100_4Tables.dump' Settings["models"][n]["pixels"] = 640 Settings["models"][n]["model_type"] = 'simple_cnn_with_top' Settings["models"][n]["unique_id"] = 'img_only' Settings["models"][n]["top_repeat_FC_block"] = 2 Settings["models"][n]["epochs"] = 800 # c Settings["models"][n]["loss_func"] = 'mean_absolute_error' Settings["models"][n]["metrics"] = ['mean_squared_error'] return Settings
def setup(Settings, DefaultModel): Settings['experiment_name'] = 'set1c_Models_Test_30m_640px' Settings['graph_histories'] = ['together', [0, 1], [1, 2], [0, 2]] n = 0 Settings['models'][n]['dataset_name'] = '5556x_minlen30_640px' Settings['models'][n]['dump_file_override'] = 'SegmentsData_marked_R100_4Tables.dump' Settings['models'][n]['pixels'] = 640 Settings['models'][n]['model_type'] = 'img_osm_mix' Settings['models'][n]['unique_id'] = 'mix' Settings['models'][n]['top_repeat_FC_block'] = 2 Settings['models'][n]['epochs'] = 800 Settings['models'][n]['loss_func'] = 'mean_absolute_error' Settings['models'][n]['metrics'] = ['mean_squared_error'] Settings['models'].append(DefaultModel.copy()) n = 1 Settings['models'][n]['dataset_pointer'] = -1 Settings['models'][n]['dataset_name'] = '5556x_minlen30_640px' Settings['models'][n]['dump_file_override'] = 'SegmentsData_marked_R100_4Tables.dump' Settings['models'][n]['pixels'] = 640 Settings['models'][n]['model_type'] = 'osm_only' Settings['models'][n]['unique_id'] = 'osm_only' Settings['models'][n]['top_repeat_FC_block'] = 2 Settings['models'][n]['epochs'] = 800 Settings['models'][n]['loss_func'] = 'mean_absolute_error' Settings['models'][n]['metrics'] = ['mean_squared_error'] Settings['models'].append(DefaultModel.copy()) n = 2 Settings['models'][n]['dataset_pointer'] = -1 Settings['models'][n]['dataset_name'] = '5556x_minlen30_640px' Settings['models'][n]['dump_file_override'] = 'SegmentsData_marked_R100_4Tables.dump' Settings['models'][n]['pixels'] = 640 Settings['models'][n]['model_type'] = 'simple_cnn_with_top' Settings['models'][n]['unique_id'] = 'img_only' Settings['models'][n]['top_repeat_FC_block'] = 2 Settings['models'][n]['epochs'] = 800 Settings['models'][n]['loss_func'] = 'mean_absolute_error' Settings['models'][n]['metrics'] = ['mean_squared_error'] return Settings
#!/usr/bin/env python3 DEV = "/dev/input/event19" CONTROLS = { 144: [ "SELECT", "START", "CROSS", "CIRCLE", "SQUARE", "TRIANGLE", "UP", "RIGHT", "DOWN", "LEFT", ], 96: [ "CENTER", ] } def trial(n: int) -> None: for size in CONTROLS.keys(): for control in CONTROLS[size]: print(f"PRESS {control}") with open(DEV, "rb") as f: sequence = f.read(size) print(f"READ {size} BYTES") with open(f"./samples/{control}_t{n}.hex", "wb") as f: f.write(sequence) print(f"WRITTEN TO ./samples/{control}_t{n}.hex") print() def main(): for i in range(10): trial(i) if __name__ == "__main__": main()
dev = '/dev/input/event19' controls = {144: ['SELECT', 'START', 'CROSS', 'CIRCLE', 'SQUARE', 'TRIANGLE', 'UP', 'RIGHT', 'DOWN', 'LEFT'], 96: ['CENTER']} def trial(n: int) -> None: for size in CONTROLS.keys(): for control in CONTROLS[size]: print(f'PRESS {control}') with open(DEV, 'rb') as f: sequence = f.read(size) print(f'READ {size} BYTES') with open(f'./samples/{control}_t{n}.hex', 'wb') as f: f.write(sequence) print(f'WRITTEN TO ./samples/{control}_t{n}.hex') print() def main(): for i in range(10): trial(i) if __name__ == '__main__': main()
# Demo Python Functions - Keyword Arguments ''' Keyword Arguments You can also send arguments with the key = value syntax. This way the order of the arguments does not matter. ''' # Example: def my_function(child3, child2, child1): print("The youngest child is " + child3) my_function(child1 = "Emil", child2 = "Tobias", child3 = "Linus") # The phrase Keyword Arguments are often shortened to kwargs in Python documentations.
""" Keyword Arguments You can also send arguments with the key = value syntax. This way the order of the arguments does not matter. """ def my_function(child3, child2, child1): print('The youngest child is ' + child3) my_function(child1='Emil', child2='Tobias', child3='Linus')
N, L = input().split() N = int(N) L = int(L) #print(N, L) s_list = input().split() citations = [ int(s) for s in s_list] def findHIndex(citations): citations.sort(reverse=True) N = len(citations) res = N for i in range(N): if citations[i]<i+1: res = i break return res k = findHIndex(citations) while L > 0 and k>=0: citations[k] += 1 L -= 1 k -= 1 k = findHIndex(citations) print(k)
(n, l) = input().split() n = int(N) l = int(L) s_list = input().split() citations = [int(s) for s in s_list] def find_h_index(citations): citations.sort(reverse=True) n = len(citations) res = N for i in range(N): if citations[i] < i + 1: res = i break return res k = find_h_index(citations) while L > 0 and k >= 0: citations[k] += 1 l -= 1 k -= 1 k = find_h_index(citations) print(k)
####################################### ## ADD SOME COLOR # pinched and tweaked from https://github.com/impshum/Multi-Quote/blob/master/run.py class color: white, cyan, blue, red, green, yellow, magenta, black, gray, bold = '\033[0m', '\033[96m','\033[94m', '\033[91m','\033[92m','\033[93m','\033[95m', '\033[30m', '\033[30m', "\033[1m"
class Color: (white, cyan, blue, red, green, yellow, magenta, black, gray, bold) = ('\x1b[0m', '\x1b[96m', '\x1b[94m', '\x1b[91m', '\x1b[92m', '\x1b[93m', '\x1b[95m', '\x1b[30m', '\x1b[30m', '\x1b[1m')
def lex_lambda_handler(event, context): intent_name = event['currentIntent']['name'] parameters = event['currentIntent']['slots'] attributes = event['sessionAttributes'] if event['sessionAttributes'] is not None else {} response = init_contact(intent_name, parameters, attributes) return response def init_contact(intent_name, parameters, attributes): first_name = parameters.get('FirstName') last_name = parameters.get('LastName') prev_first_name = attributes.get('FirstName') prev_last_name = attributes.get('LastName') if first_name is None and prev_first_name is not None: parameters['FirstName'] = prev_first_name if last_name is None and prev_last_name is not None: parameters['LastName'] = prev_last_name if parameters['FirstName'] is not None and parameters['LastName'] is not None: response = intent_delegation(intent_name, parameters, attributes) elif parameters['FirstName'] is None: response = intent_elicitation(intent_name, parameters, attributes, 'FirstName') elif parameters['LastName'] is None: response = intent_elicitation(intent_name, parameters, attributes, 'LastName') return response ##### # lex response helper functions ##### def intent_success(intent_name, parameters, attributes): return { 'sessionAttributes': attributes, 'dialogAction': { 'type': 'Close', 'fulfillmentState': 'Fulfilled' } } def intent_failure(intent_name, parameters, attributes, message): return { 'dialogAction': { 'type': 'Close', 'fulfillmentState': 'Failed', 'message': { 'contentType': 'PlainText', 'content': message } } } def intent_delegation(intent_name, parameters, attributes): return { 'sessionAttributes': attributes, 'dialogAction': { 'type': 'Delegate', 'slots': parameters, } } def intent_elicitation(intent_name, parameters, attributes, parameter_name): return { 'sessionAttributes': attributes, 'dialogAction': { 'type': 'ElicitSlot', 'intentName': intent_name, 'slots': parameters, 'slotToElicit': parameter_name } }
def lex_lambda_handler(event, context): intent_name = event['currentIntent']['name'] parameters = event['currentIntent']['slots'] attributes = event['sessionAttributes'] if event['sessionAttributes'] is not None else {} response = init_contact(intent_name, parameters, attributes) return response def init_contact(intent_name, parameters, attributes): first_name = parameters.get('FirstName') last_name = parameters.get('LastName') prev_first_name = attributes.get('FirstName') prev_last_name = attributes.get('LastName') if first_name is None and prev_first_name is not None: parameters['FirstName'] = prev_first_name if last_name is None and prev_last_name is not None: parameters['LastName'] = prev_last_name if parameters['FirstName'] is not None and parameters['LastName'] is not None: response = intent_delegation(intent_name, parameters, attributes) elif parameters['FirstName'] is None: response = intent_elicitation(intent_name, parameters, attributes, 'FirstName') elif parameters['LastName'] is None: response = intent_elicitation(intent_name, parameters, attributes, 'LastName') return response def intent_success(intent_name, parameters, attributes): return {'sessionAttributes': attributes, 'dialogAction': {'type': 'Close', 'fulfillmentState': 'Fulfilled'}} def intent_failure(intent_name, parameters, attributes, message): return {'dialogAction': {'type': 'Close', 'fulfillmentState': 'Failed', 'message': {'contentType': 'PlainText', 'content': message}}} def intent_delegation(intent_name, parameters, attributes): return {'sessionAttributes': attributes, 'dialogAction': {'type': 'Delegate', 'slots': parameters}} def intent_elicitation(intent_name, parameters, attributes, parameter_name): return {'sessionAttributes': attributes, 'dialogAction': {'type': 'ElicitSlot', 'intentName': intent_name, 'slots': parameters, 'slotToElicit': parameter_name}}
BLACK = (0, 0, 0) GREY = (142, 142, 142) RED = (200, 72, 72) ORANGE = (198, 108, 58) BROWN = (180, 122, 48) YELLOW = (162, 162, 42) GREEN = (72, 160, 72) BLUE = (66, 72, 200)
black = (0, 0, 0) grey = (142, 142, 142) red = (200, 72, 72) orange = (198, 108, 58) brown = (180, 122, 48) yellow = (162, 162, 42) green = (72, 160, 72) blue = (66, 72, 200)
#!/usr/bin/env python def square_gen(is_true): i = 0 while True: yield i**2 i += 1 g = square_gen(False) print(next(g)) print(next(g)) print(next(g))
def square_gen(is_true): i = 0 while True: yield (i ** 2) i += 1 g = square_gen(False) print(next(g)) print(next(g)) print(next(g))
class A: def __bool__(self): print('__bool__') return True def __len__(self): print('__len__') return 1 class B: def __len__(self): print('__len__') return 0 print(bool(A())) print(len(A())) print(bool(B())) print(len(B()))
class A: def __bool__(self): print('__bool__') return True def __len__(self): print('__len__') return 1 class B: def __len__(self): print('__len__') return 0 print(bool(a())) print(len(a())) print(bool(b())) print(len(b()))
# Definition for singly-linked list. class ListNode: def __init__(self, x): self.val = x self.next = None c = 0 class Solution: def removeNthFromEnd(self, head: ListNode, n: int) -> ListNode: global c return_head = head prev = ListNode(0) prev.next = return_head c = 0 print(n) while(head): temp = head while(c != n): print("UP TOP") temp = temp.next if temp: c += 1 print(temp.val,c) # input() else: c += 1 print("NONE DA") break # if temp == None: # if n == 1: # print("INGA DA baade") # prev = head # prev = prev.next # return prev # else: # prev.next = prev.next.next # return return_head if temp == None: # fake_head = return_head # c = 0 # while(c !=n): # if fake_head == None: # break # else: # c += 1 # fake_head = fake_head.next # if c == n: # if return_head.next == None: # prev = head # prev = prev.next # return prev # else: # prev.next = prev.next.next # head1 = prev.next # return head1 prev.next = prev.next.next head1 = prev.next return head1 else: print("Down here") c = 0 prev = head head = head.next print(prev.val) print(head.val) t1 = ListNode(1) t2 = ListNode(2) # t3 = ListNode(9) t1.next = t2 # t2.next = t3 l1 = t1 s = Solution() ans = s.removeNthFromEnd(l1,2) while(ans): print(ans.val) ans = ans.next
class Listnode: def __init__(self, x): self.val = x self.next = None c = 0 class Solution: def remove_nth_from_end(self, head: ListNode, n: int) -> ListNode: global c return_head = head prev = list_node(0) prev.next = return_head c = 0 print(n) while head: temp = head while c != n: print('UP TOP') temp = temp.next if temp: c += 1 print(temp.val, c) else: c += 1 print('NONE DA') break if temp == None: prev.next = prev.next.next head1 = prev.next return head1 else: print('Down here') c = 0 prev = head head = head.next print(prev.val) print(head.val) t1 = list_node(1) t2 = list_node(2) t1.next = t2 l1 = t1 s = solution() ans = s.removeNthFromEnd(l1, 2) while ans: print(ans.val) ans = ans.next
d1 = {1:'Sugandh', 2:'Divya', 3:'Mintoo'} print("deleting a key from the dictionary...") del d1[3] print(d1) print("deleting the same key again...") del d1[3] print(d1)
d1 = {1: 'Sugandh', 2: 'Divya', 3: 'Mintoo'} print('deleting a key from the dictionary...') del d1[3] print(d1) print('deleting the same key again...') del d1[3] print(d1)
class ObtenedorDeEntrada: def getEntrada(self): f = open ('Entrada.txt','r') entrada = f.read() print(entrada) f.close() return entrada #input("Introduce el texto\n")
class Obtenedordeentrada: def get_entrada(self): f = open('Entrada.txt', 'r') entrada = f.read() print(entrada) f.close() return entrada
{ "name": "train-nn", "s3_path": "s3://tht-spark/executables/SDG_Data_Technologies_Model.py", "executors": 2, }
{'name': 'train-nn', 's3_path': 's3://tht-spark/executables/SDG_Data_Technologies_Model.py', 'executors': 2}
# parameters of the system # data files temp = np.load('./data/temp_norm.npy') y = np.load('./data/total_load_norm.npy') load_meters = np.load('./data/load_meters_norm.npy') # system parameters T, num_meters = load_meters.shape num_samples = T # training parameters hist_samples = 24 train_samples = int(0.8 * num_samples) test_samples_a = int(0.1 * num_samples) use_mse = False if use_mse: loss_f = 'mean_squared_error' loss = 'mse' else: loss_f = 'mean_absolute_error' loss = 'mae' early_stopping = EarlyStopping(monitor='val_loss', patience=10, mode='min', restore_best_weights=False, min_delta=0.001)
temp = np.load('./data/temp_norm.npy') y = np.load('./data/total_load_norm.npy') load_meters = np.load('./data/load_meters_norm.npy') (t, num_meters) = load_meters.shape num_samples = T hist_samples = 24 train_samples = int(0.8 * num_samples) test_samples_a = int(0.1 * num_samples) use_mse = False if use_mse: loss_f = 'mean_squared_error' loss = 'mse' else: loss_f = 'mean_absolute_error' loss = 'mae' early_stopping = early_stopping(monitor='val_loss', patience=10, mode='min', restore_best_weights=False, min_delta=0.001)
datas = { 'style' : 'sys', 'parent' :'boost', 'prefix' :['boost','simd'], }
datas = {'style': 'sys', 'parent': 'boost', 'prefix': ['boost', 'simd']}
class Solution: def maxProfit(self, prices: List[int]) -> int: profit = 0 buy = math.inf for price in prices: if price < buy: buy = price elif (p := price - buy) > profit: profit = p return profit
class Solution: def max_profit(self, prices: List[int]) -> int: profit = 0 buy = math.inf for price in prices: if price < buy: buy = price elif (p := (price - buy)) > profit: profit = p return profit
def maior_elemento(lista): elemento_ref = lista[0] maior_elemento = 0 for i in lista: if i >= elemento_ref: maior_elemento = i return maior_elemento
def maior_elemento(lista): elemento_ref = lista[0] maior_elemento = 0 for i in lista: if i >= elemento_ref: maior_elemento = i return maior_elemento
#!/usr/bin/env python # Copyright JS Foundation and other contributors, http://js.foundation # # Licensed 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 # # 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 _constants: default_test_count = 100 # The default value of --test-count option default_seed = 10000 # The default value of random seed test_case_in_a_file = 700 # Maximum number of test for each file operand_count_max = 11 # The --operand-count option's maximum value operand_count_min = 2 # The --operand-count option's minimum value max = (1 << 53) - 1 # The max value of random number (See also Number.MAX_SAFE_INTEGER) min = - 1 * max # The min value of random number (See also Number.MIN_SAFE_INTEGER) bitmax = (1 << 31) - 1 # The max value of random number for bitwise operations bitmin = - bitmax - 1 # The min value of random number for bitwise operations uint32max = (1 << 32) - 1 # The max value of random number for unsigned right shift (See also unsigned int 32) uint32min = 0 # The min value of random number for unsigned right shift (See also unsigned int 32) bitmax_exposant = 31 # Maximum number for safely shifting an integer in python to # be precise for JS 32 bit numbers
class _Constants: default_test_count = 100 default_seed = 10000 test_case_in_a_file = 700 operand_count_max = 11 operand_count_min = 2 max = (1 << 53) - 1 min = -1 * max bitmax = (1 << 31) - 1 bitmin = -bitmax - 1 uint32max = (1 << 32) - 1 uint32min = 0 bitmax_exposant = 31
__version__ = "11.0.2-2022.02.08" if __name__ == "__main__": print(__version__)
__version__ = '11.0.2-2022.02.08' if __name__ == '__main__': print(__version__)
array = [3,5,-4,8,11,1,-1,6] targetSum = 10 # def twoNumberSum(array, targetSum): # # Write your code here. # arrayOut = [] # for num1 in array: # for num2 in array: # if (num1+num2==targetSum) and (num1 != num2): # arrayOut.append(num1) # arrayOut.append(num2) # finalList =sorted(list(set(arrayOut))) # return finalList # def twoNumberSum(array, targetSum): # # Write your code here. # arrayOut =[] # newDict = dict.fromkeys(array) # for num1 in newDict: # num2 = targetSum- num1 # if (num2 in newDict) and (num1 != num2): # arrayOut.append(num1) # arrayOut.append(num2) # finalList =sorted(arrayOut) # return finalList # return arrayOut def twoNumberSum(array, targetSum): # Write your code here. arrayOut =[] newDict = {} for num1 in array: num2 = targetSum- num1 if (num2 in newDict): arrayOut.append(num1) arrayOut.append(num2) finalList =sorted(arrayOut) return finalList else: newDict[num1]=True return arrayOut # def twoNumberSum(array, targetSum): # # Write your code here. # array.sort() # left =0 # right = len(array) -1 # while (left < right): # currSum = array[left] + array[right] # if currSum == targetSum: # return [array[left],array[right]] # elif currSum < targetSum: # left += 1 # else: # right -= 1 # return [] print(twoNumberSum(array, targetSum))
array = [3, 5, -4, 8, 11, 1, -1, 6] target_sum = 10 def two_number_sum(array, targetSum): array_out = [] new_dict = {} for num1 in array: num2 = targetSum - num1 if num2 in newDict: arrayOut.append(num1) arrayOut.append(num2) final_list = sorted(arrayOut) return finalList else: newDict[num1] = True return arrayOut print(two_number_sum(array, targetSum))
# Print multiplication tables # 1 2 3 4 .. 10 # 2 4 6 8 20 # 3 6 9 12 30 # .. .. .. .. .. for i in range(1, 11): for j in range(1, 11): print(str(j * i) + '\t', end='') print('')
for i in range(1, 11): for j in range(1, 11): print(str(j * i) + '\t', end='') print('')
# -------------- ##File path for the file file_path #Code starts here def read_file(path): file=open(file_path,'r') sentence=file.readline() file.close() return sentence sample_message=read_file(file_path) # -------------- #Code starts here file_path_1,file_path_2 message_1=read_file(file_path_1) message_2=read_file(file_path_2) print(message_1) print(message_2) def fuse_msg(message_a,message_b): int_message_a = int(message_a) int_message_b = int(message_b) quotient=int_message_b//int_message_a return str(quotient) secret_msg_1=fuse_msg(message_1,message_2) print(secret_msg_1) # -------------- #Code starts here file_path_3 message_3=read_file(file_path_3) print(message_3) def substitute_msg(message_c): sub =' ' if message_c=='Red': sub = 'Army General' return sub elif message_c=='Green': sub = 'Data Scientist' return sub elif message_c=='Blue': sub = 'Marine Biologist' return sub secret_msg_2=substitute_msg(message_3) print(secret_msg_2) # -------------- # File path for message 4 and message 5 file_path_4 file_path_5 #Code starts here message_4=read_file(file_path_4) message_5=read_file(file_path_5) print(message_4) print(message_5) def compare_msg(message_d,message_e): a_list=message_d.split() print(a_list) b_list=message_e.split() print(b_list) c_list= [i for i in a_list if i not in b_list] print(c_list) final_msg=" ".join(c_list) return final_msg secret_msg_3=compare_msg(message_4,message_5) print(secret_msg_3) # -------------- #Code starts here file_path_6 message_6=read_file(file_path_6) print(message_6) def extract_msg(message_f): a_list=message_f.split() print(a_list) # lambda function for even words even_word=lambda x:((len(x)%2)==0) # filter() to filter out even words b_list=list(filter(even_word,a_list)) print(b_list) final_msg=" ".join(b_list) return final_msg secret_msg_4=extract_msg(message_6) print(secret_msg_4) # -------------- #Secret message parts in the correct order message_parts=[secret_msg_3, secret_msg_1, secret_msg_4, secret_msg_2] final_path= user_data_dir + '/secret_message.txt' #Code starts here secret_msg=" ".join(message_parts) def write_file(secret_msg,path): file= open(path,'a+') file.write(secret_msg) file.close() write_file(secret_msg,final_path) print(secret_msg)
file_path def read_file(path): file = open(file_path, 'r') sentence = file.readline() file.close() return sentence sample_message = read_file(file_path) (file_path_1, file_path_2) message_1 = read_file(file_path_1) message_2 = read_file(file_path_2) print(message_1) print(message_2) def fuse_msg(message_a, message_b): int_message_a = int(message_a) int_message_b = int(message_b) quotient = int_message_b // int_message_a return str(quotient) secret_msg_1 = fuse_msg(message_1, message_2) print(secret_msg_1) file_path_3 message_3 = read_file(file_path_3) print(message_3) def substitute_msg(message_c): sub = ' ' if message_c == 'Red': sub = 'Army General' return sub elif message_c == 'Green': sub = 'Data Scientist' return sub elif message_c == 'Blue': sub = 'Marine Biologist' return sub secret_msg_2 = substitute_msg(message_3) print(secret_msg_2) file_path_4 file_path_5 message_4 = read_file(file_path_4) message_5 = read_file(file_path_5) print(message_4) print(message_5) def compare_msg(message_d, message_e): a_list = message_d.split() print(a_list) b_list = message_e.split() print(b_list) c_list = [i for i in a_list if i not in b_list] print(c_list) final_msg = ' '.join(c_list) return final_msg secret_msg_3 = compare_msg(message_4, message_5) print(secret_msg_3) file_path_6 message_6 = read_file(file_path_6) print(message_6) def extract_msg(message_f): a_list = message_f.split() print(a_list) even_word = lambda x: len(x) % 2 == 0 b_list = list(filter(even_word, a_list)) print(b_list) final_msg = ' '.join(b_list) return final_msg secret_msg_4 = extract_msg(message_6) print(secret_msg_4) message_parts = [secret_msg_3, secret_msg_1, secret_msg_4, secret_msg_2] final_path = user_data_dir + '/secret_message.txt' secret_msg = ' '.join(message_parts) def write_file(secret_msg, path): file = open(path, 'a+') file.write(secret_msg) file.close() write_file(secret_msg, final_path) print(secret_msg)
# Python > Sets > The Captain's Room # Out of a list of room numbers, determine the number of the captain's room. # # https://www.hackerrank.com/challenges/py-the-captains-room/problem # k = int(input()) rooms = list(map(int, input().split())) a = set() room_group = set() for room in rooms: if room in a: room_group.add(room) else: a.add(room) a = a - room_group print(a.pop())
k = int(input()) rooms = list(map(int, input().split())) a = set() room_group = set() for room in rooms: if room in a: room_group.add(room) else: a.add(room) a = a - room_group print(a.pop())
class Config: device = 'cpu' RBF_url = "https://github.com/Practical-AI/deep_utils/releases/download/0.2.0/version-RFB-320.pth" RBF_cache = 'weights/vision/face_detection/ultra-light/torch/RBF/version-RFB-320.pth' RBF = None slim_url = "https://github.com/Practical-AI/deep_utils/releases/download/0.2.0/version-slim-320.pth" slim_cache = 'weights/vision/face_detection/ultra-light/torch/slim/version-slim-320.pth' slim = None
class Config: device = 'cpu' rbf_url = 'https://github.com/Practical-AI/deep_utils/releases/download/0.2.0/version-RFB-320.pth' rbf_cache = 'weights/vision/face_detection/ultra-light/torch/RBF/version-RFB-320.pth' rbf = None slim_url = 'https://github.com/Practical-AI/deep_utils/releases/download/0.2.0/version-slim-320.pth' slim_cache = 'weights/vision/face_detection/ultra-light/torch/slim/version-slim-320.pth' slim = None
'''https://leetcode.com/problems/unique-paths/''' class Solution: def uniquePaths(self, m: int, n: int) -> int: dp = [1 for i in range(m)] for i in range(1,n): for j in range(1,m): dp[j] += dp[j-1] return dp[-1]
"""https://leetcode.com/problems/unique-paths/""" class Solution: def unique_paths(self, m: int, n: int) -> int: dp = [1 for i in range(m)] for i in range(1, n): for j in range(1, m): dp[j] += dp[j - 1] return dp[-1]
experiments_20 = { 'data': {'n_experiments': 20, 'max_set_size': 500, 'network_filename': 'H_sapiens.net', #'S_cerevisiae.net' 'directed_interactions_filename': 'KPI_dataset', 'sources_filename': 'drug_targets.txt', 'terminals_filename': 'drug_expressions.txt', 'load_prop_scores': False, 'save_prop_scores': False, 'balance_dataset': True, 'prop_scores_filename': 'balanced_kpi_prop_scores', 'random_seed': 0, 'normalization_method': 'power', # Standard, Power 'split_type': 'normal'}, # 'regular'/harsh 'propagation': {'alpha': 0.8, 'eps': 1e-6, 'n_iterations': 200}, 'model': {'feature_extractor_layers': [64, 32], 'classifier_layers': [64, 32], 'pulling_func': 'mean', 'exp_emb_size': 4, 'feature_extractor_dropout': 0, 'classifier_dropout': 0, 'pair_degree_feature': 0 }, 'train': {'intermediate_loss_weight': 0, 'intermediate_loss_type': 'BCE', 'focal_gamma': 1, 'train_val_test_split': [0.66, 0.14, 0.2], # sum([train, val, test])=1 'train_batch_size': 32, 'test_batch_size': 32, 'n_epochs': 1000, 'eval_interval': 3, 'learning_rate': 1e-3, 'max_evals_no_imp': 3, 'optimizer' : 'ADAMW' # ADAM/WADAM }} experiments_50 = { 'data': {'n_experiments': 50, 'max_set_size': 500, 'network_filename': 'H_sapiens.net', 'directed_interactions_filename': 'KPI_dataset', 'sources_filename': 'drug_targets.txt', 'terminals_filename': 'drug_expressions.txt', 'load_prop_scores': True, 'save_prop_scores': False, 'prop_scores_filename': 'balanced_kpi_prop_scores', 'random_seed': 0, 'normalization_method': 'standard' }, 'propagation': {'alpha': 0.8, 'eps': 1e-6, 'n_iterations': 200}, 'model': {'feature_extractor_layers': [128, 64], 'classifier_layers': [128, 64], 'pulling_func': 'mean', 'exp_emb_size': 12, 'feature_extractor_dropout': 0, 'classifier_dropout': 0, 'pair_degree_feature': 0 }, 'train': {'intermediate_loss_weight': 0.5, 'intermediate_loss_type': 'BCE', 'focal_gamma': 1, 'train_val_test_split': [0.66, 0.14, 0.2], # sum([train, val, test])=1 'train_batch_size': 32, 'test_batch_size': 32, 'n_epochs': 4, 'eval_interval': 2, 'learning_rate': 5e-4, 'max_evals_no_imp': 3, 'optimizer' : 'ADAMW' # ADAM/WADAM }} experiments_0 = { 'data': {'n_experiments': 0, 'max_set_size': 500, 'network_filename': 'H_sapiens.net', 'directed_interactions_filename': ['KPI'], 'sources_filename': 'drug_targets.txt', 'terminals_filename': 'drug_expressions.txt', 'load_prop_scores': True, 'save_prop_scores': False, 'balance_dataset': True, 'prop_scores_filename': 'drug_KPI_0', 'random_seed': 0, 'normalization_method': 'power', # Standard, Power 'split_type': 'normal'}, # 'regular'/harsh 'propagation': {'alpha': 0.8, 'eps': 1e-6, 'n_iterations': 200}, 'model': {'feature_extractor_layers': [128, 64], 'classifier_layers': [64], 'pulling_func': 'mean', 'exp_emb_size': 16, 'feature_extractor_dropout': 0, 'classifier_dropout': 0, 'pair_degree_feature': 0, }, 'train': {'intermediate_loss_weight': 0.5, 'intermediate_loss_type': 'BCE', 'focal_gamma': 1, 'train_val_test_split': [0.66, 0.14, 0.2], # sum([train, val, test])=1 'train_batch_size': 4, 'test_batch_size': 32, 'n_epochs': 4, 'eval_interval': 2, 'learning_rate': 1e-3, 'max_evals_no_imp': 3, 'optimizer': 'ADAMW' # ADAM/WADAM }} experiments_all_datasets = { 'data': {'n_experiments': 0, 'max_set_size': 500, 'network_filename': 'H_sapiens.net', 'directed_interactions_filename': ['KPI', 'STKE', 'EGFR', 'E3','PDI'], 'sources_filename': 'drug_targets.txt', 'terminals_filename': 'drug_expressions.txt', 'load_prop_scores': True, 'save_prop_scores': False, 'balance_dataset': True, 'prop_scores_filename': 'balanced_KPI_STKE_EGFR_E3', 'random_seed': 0, 'normalization_method': 'power', # Standard, Power 'split_type': 'normal'}, # 'regular'/harsh 'propagation': {'alpha': 0.8, 'eps': 1e-6, 'n_iterations': 200}, 'model': {'feature_extractor_layers': [64, 32, 16], 'classifier_layers': [32, 16], 'pulling_func': 'mean', 'exp_emb_size': 12, 'feature_extractor_dropout': 0, 'classifier_dropout': 0, 'pair_degree_feature': 0, }, 'train': {'intermediate_loss_weight': 0.95, 'intermediate_loss_type': 'BCE', 'focal_gamma': 1, 'train_val_test_split': [0.66, 0.14, 0.2], # sum([train, val, test])=1 'train_batch_size': 8, 'test_batch_size': 8, 'n_epochs': 2000, 'eval_interval': 2, 'learning_rate': 1e-3, 'max_evals_no_imp': 15, }}
experiments_20 = {'data': {'n_experiments': 20, 'max_set_size': 500, 'network_filename': 'H_sapiens.net', 'directed_interactions_filename': 'KPI_dataset', 'sources_filename': 'drug_targets.txt', 'terminals_filename': 'drug_expressions.txt', 'load_prop_scores': False, 'save_prop_scores': False, 'balance_dataset': True, 'prop_scores_filename': 'balanced_kpi_prop_scores', 'random_seed': 0, 'normalization_method': 'power', 'split_type': 'normal'}, 'propagation': {'alpha': 0.8, 'eps': 1e-06, 'n_iterations': 200}, 'model': {'feature_extractor_layers': [64, 32], 'classifier_layers': [64, 32], 'pulling_func': 'mean', 'exp_emb_size': 4, 'feature_extractor_dropout': 0, 'classifier_dropout': 0, 'pair_degree_feature': 0}, 'train': {'intermediate_loss_weight': 0, 'intermediate_loss_type': 'BCE', 'focal_gamma': 1, 'train_val_test_split': [0.66, 0.14, 0.2], 'train_batch_size': 32, 'test_batch_size': 32, 'n_epochs': 1000, 'eval_interval': 3, 'learning_rate': 0.001, 'max_evals_no_imp': 3, 'optimizer': 'ADAMW'}} experiments_50 = {'data': {'n_experiments': 50, 'max_set_size': 500, 'network_filename': 'H_sapiens.net', 'directed_interactions_filename': 'KPI_dataset', 'sources_filename': 'drug_targets.txt', 'terminals_filename': 'drug_expressions.txt', 'load_prop_scores': True, 'save_prop_scores': False, 'prop_scores_filename': 'balanced_kpi_prop_scores', 'random_seed': 0, 'normalization_method': 'standard'}, 'propagation': {'alpha': 0.8, 'eps': 1e-06, 'n_iterations': 200}, 'model': {'feature_extractor_layers': [128, 64], 'classifier_layers': [128, 64], 'pulling_func': 'mean', 'exp_emb_size': 12, 'feature_extractor_dropout': 0, 'classifier_dropout': 0, 'pair_degree_feature': 0}, 'train': {'intermediate_loss_weight': 0.5, 'intermediate_loss_type': 'BCE', 'focal_gamma': 1, 'train_val_test_split': [0.66, 0.14, 0.2], 'train_batch_size': 32, 'test_batch_size': 32, 'n_epochs': 4, 'eval_interval': 2, 'learning_rate': 0.0005, 'max_evals_no_imp': 3, 'optimizer': 'ADAMW'}} experiments_0 = {'data': {'n_experiments': 0, 'max_set_size': 500, 'network_filename': 'H_sapiens.net', 'directed_interactions_filename': ['KPI'], 'sources_filename': 'drug_targets.txt', 'terminals_filename': 'drug_expressions.txt', 'load_prop_scores': True, 'save_prop_scores': False, 'balance_dataset': True, 'prop_scores_filename': 'drug_KPI_0', 'random_seed': 0, 'normalization_method': 'power', 'split_type': 'normal'}, 'propagation': {'alpha': 0.8, 'eps': 1e-06, 'n_iterations': 200}, 'model': {'feature_extractor_layers': [128, 64], 'classifier_layers': [64], 'pulling_func': 'mean', 'exp_emb_size': 16, 'feature_extractor_dropout': 0, 'classifier_dropout': 0, 'pair_degree_feature': 0}, 'train': {'intermediate_loss_weight': 0.5, 'intermediate_loss_type': 'BCE', 'focal_gamma': 1, 'train_val_test_split': [0.66, 0.14, 0.2], 'train_batch_size': 4, 'test_batch_size': 32, 'n_epochs': 4, 'eval_interval': 2, 'learning_rate': 0.001, 'max_evals_no_imp': 3, 'optimizer': 'ADAMW'}} experiments_all_datasets = {'data': {'n_experiments': 0, 'max_set_size': 500, 'network_filename': 'H_sapiens.net', 'directed_interactions_filename': ['KPI', 'STKE', 'EGFR', 'E3', 'PDI'], 'sources_filename': 'drug_targets.txt', 'terminals_filename': 'drug_expressions.txt', 'load_prop_scores': True, 'save_prop_scores': False, 'balance_dataset': True, 'prop_scores_filename': 'balanced_KPI_STKE_EGFR_E3', 'random_seed': 0, 'normalization_method': 'power', 'split_type': 'normal'}, 'propagation': {'alpha': 0.8, 'eps': 1e-06, 'n_iterations': 200}, 'model': {'feature_extractor_layers': [64, 32, 16], 'classifier_layers': [32, 16], 'pulling_func': 'mean', 'exp_emb_size': 12, 'feature_extractor_dropout': 0, 'classifier_dropout': 0, 'pair_degree_feature': 0}, 'train': {'intermediate_loss_weight': 0.95, 'intermediate_loss_type': 'BCE', 'focal_gamma': 1, 'train_val_test_split': [0.66, 0.14, 0.2], 'train_batch_size': 8, 'test_batch_size': 8, 'n_epochs': 2000, 'eval_interval': 2, 'learning_rate': 0.001, 'max_evals_no_imp': 15}}
# pylint: disable=missing-docstring TEST = map(str, (1, 2, 3)) # [bad-builtin] TEST1 = filter(str, (1, 2, 3)) # [bad-builtin]
test = map(str, (1, 2, 3)) test1 = filter(str, (1, 2, 3))
expected = [ { "xlink_href": "elife00013inf001", "type": "inline-graphic", "position": 1, "ordinal": 1, } ]
expected = [{'xlink_href': 'elife00013inf001', 'type': 'inline-graphic', 'position': 1, 'ordinal': 1}]
APIYNFLAG_YES = "Y" APIYNFLAG_NO = "N" APILOGLEVEL_NONE = "N" APILOGLEVEL_ERROR = "E" APILOGLEVEL_WARNING = "W" APILOGLEVEL_DEBUG = "D" TAPI_COMMODITY_TYPE_NONE = "N" TAPI_COMMODITY_TYPE_SPOT = "P" TAPI_COMMODITY_TYPE_FUTURES = "F" TAPI_COMMODITY_TYPE_OPTION = "O" TAPI_COMMODITY_TYPE_SPREAD_MONTH = "S" TAPI_COMMODITY_TYPE_SPREAD_COMMODITY = "M" TAPI_COMMODITY_TYPE_BUL = "U" TAPI_COMMODITY_TYPE_BER = "E" TAPI_COMMODITY_TYPE_STD = "D" TAPI_COMMODITY_TYPE_STG = "G" TAPI_COMMODITY_TYPE_PRT = "R" TAPI_COMMODITY_TYPE_BLT = "L" TAPI_COMMODITY_TYPE_BRT = "Q" TAPI_COMMODITY_TYPE_DIRECTFOREX = "X" TAPI_COMMODITY_TYPE_INDIRECTFOREX = "I" TAPI_COMMODITY_TYPE_CROSSFOREX = "C" TAPI_COMMODITY_TYPE_INDEX = "Z" TAPI_COMMODITY_TYPE_STOCK = "T" TAPI_COMMODITY_TYPE_SPOT_TRADINGDEFER = "Y" TAPI_COMMODITY_TYPE_FUTURE_LOCK = "J" TAPI_COMMODITY_TYPE_EFP = "A" TAPI_COMMODITY_TYPE_TAS = "B" TAPI_CALLPUT_FLAG_CALL = "C" TAPI_CALLPUT_FLAG_PUT = "P" TAPI_CALLPUT_FLAG_NONE = "N" TAPI_AUTHTYPE_DIRECT = "1" TAPI_AUTHTYPE_RELAY = "2"
apiynflag_yes = 'Y' apiynflag_no = 'N' apiloglevel_none = 'N' apiloglevel_error = 'E' apiloglevel_warning = 'W' apiloglevel_debug = 'D' tapi_commodity_type_none = 'N' tapi_commodity_type_spot = 'P' tapi_commodity_type_futures = 'F' tapi_commodity_type_option = 'O' tapi_commodity_type_spread_month = 'S' tapi_commodity_type_spread_commodity = 'M' tapi_commodity_type_bul = 'U' tapi_commodity_type_ber = 'E' tapi_commodity_type_std = 'D' tapi_commodity_type_stg = 'G' tapi_commodity_type_prt = 'R' tapi_commodity_type_blt = 'L' tapi_commodity_type_brt = 'Q' tapi_commodity_type_directforex = 'X' tapi_commodity_type_indirectforex = 'I' tapi_commodity_type_crossforex = 'C' tapi_commodity_type_index = 'Z' tapi_commodity_type_stock = 'T' tapi_commodity_type_spot_tradingdefer = 'Y' tapi_commodity_type_future_lock = 'J' tapi_commodity_type_efp = 'A' tapi_commodity_type_tas = 'B' tapi_callput_flag_call = 'C' tapi_callput_flag_put = 'P' tapi_callput_flag_none = 'N' tapi_authtype_direct = '1' tapi_authtype_relay = '2'
# # PySNMP MIB module ASCEND-MIBSCRTY-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ASCEND-MIBSCRTY-MIB # Produced by pysmi-0.3.4 at Wed May 1 11:28:15 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) # configuration, = mibBuilder.importSymbols("ASCEND-MIB", "configuration") ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsIntersection, ValueSizeConstraint, ValueRangeConstraint, SingleValueConstraint, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ValueSizeConstraint", "ValueRangeConstraint", "SingleValueConstraint", "ConstraintsUnion") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") ObjectIdentity, IpAddress, TimeTicks, iso, Gauge32, MibIdentifier, Integer32, ModuleIdentity, Unsigned32, Bits, Counter32, MibScalar, MibTable, MibTableRow, MibTableColumn, Counter64, NotificationType = mibBuilder.importSymbols("SNMPv2-SMI", "ObjectIdentity", "IpAddress", "TimeTicks", "iso", "Gauge32", "MibIdentifier", "Integer32", "ModuleIdentity", "Unsigned32", "Bits", "Counter32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter64", "NotificationType") TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString") class DisplayString(OctetString): pass mibsecurityProfile = MibIdentifier((1, 3, 6, 1, 4, 1, 529, 23, 107)) mibsecurityProfileTable = MibTable((1, 3, 6, 1, 4, 1, 529, 23, 107, 1), ) if mibBuilder.loadTexts: mibsecurityProfileTable.setStatus('mandatory') if mibBuilder.loadTexts: mibsecurityProfileTable.setDescription('A list of mibsecurityProfile profile entries.') mibsecurityProfileEntry = MibTableRow((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1), ).setIndexNames((0, "ASCEND-MIBSCRTY-MIB", "securityProfile-Name")) if mibBuilder.loadTexts: mibsecurityProfileEntry.setStatus('mandatory') if mibBuilder.loadTexts: mibsecurityProfileEntry.setDescription('A mibsecurityProfile entry containing objects that maps to the parameters of mibsecurityProfile profile.') securityProfile_Name = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 1), DisplayString()).setLabel("securityProfile-Name").setMaxAccess("readonly") if mibBuilder.loadTexts: securityProfile_Name.setStatus('mandatory') if mibBuilder.loadTexts: securityProfile_Name.setDescription('Profile name.') securityProfile_Password = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 2), DisplayString()).setLabel("securityProfile-Password").setMaxAccess("readwrite") if mibBuilder.loadTexts: securityProfile_Password.setStatus('mandatory') if mibBuilder.loadTexts: securityProfile_Password.setDescription('Password to access the security levels defined by this profile.') securityProfile_Operations = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("securityProfile-Operations").setMaxAccess("readwrite") if mibBuilder.loadTexts: securityProfile_Operations.setStatus('mandatory') if mibBuilder.loadTexts: securityProfile_Operations.setDescription('TRUE = able to do things other than look.') securityProfile_EditSecurity = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("securityProfile-EditSecurity").setMaxAccess("readwrite") if mibBuilder.loadTexts: securityProfile_EditSecurity.setStatus('mandatory') if mibBuilder.loadTexts: securityProfile_EditSecurity.setDescription('TRUE = able to edit the security profiles.') securityProfile_EditSystem = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("securityProfile-EditSystem").setMaxAccess("readwrite") if mibBuilder.loadTexts: securityProfile_EditSystem.setStatus('mandatory') if mibBuilder.loadTexts: securityProfile_EditSystem.setDescription('TRUE = able to edit the system profiles.') securityProfile_EditLine = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("securityProfile-EditLine").setMaxAccess("readwrite") if mibBuilder.loadTexts: securityProfile_EditLine.setStatus('mandatory') if mibBuilder.loadTexts: securityProfile_EditLine.setDescription('TRUE = able to edit the line profile.') securityProfile_EditOwnPort = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("securityProfile-EditOwnPort").setMaxAccess("readwrite") if mibBuilder.loadTexts: securityProfile_EditOwnPort.setStatus('mandatory') if mibBuilder.loadTexts: securityProfile_EditOwnPort.setDescription('TRUE = able to edit port associated port profile (for remote terminal).') securityProfile_EditAllPort = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("securityProfile-EditAllPort").setMaxAccess("readwrite") if mibBuilder.loadTexts: securityProfile_EditAllPort.setStatus('mandatory') if mibBuilder.loadTexts: securityProfile_EditAllPort.setDescription('TRUE = able to edit all port profiles.') securityProfile_EditCurCall = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("securityProfile-EditCurCall").setMaxAccess("readwrite") if mibBuilder.loadTexts: securityProfile_EditCurCall.setStatus('mandatory') if mibBuilder.loadTexts: securityProfile_EditCurCall.setDescription('TRUE = able to edit the current call profile.') securityProfile_EditOwnCall = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("securityProfile-EditOwnCall").setMaxAccess("readwrite") if mibBuilder.loadTexts: securityProfile_EditOwnCall.setStatus('mandatory') if mibBuilder.loadTexts: securityProfile_EditOwnCall.setDescription('TRUE = able to edit port associated call profiles (for remote terminal).') securityProfile_EditComCall = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("securityProfile-EditComCall").setMaxAccess("readwrite") if mibBuilder.loadTexts: securityProfile_EditComCall.setStatus('mandatory') if mibBuilder.loadTexts: securityProfile_EditComCall.setDescription('TRUE = able to edit the common call profiles (for remote terminal).') securityProfile_EditAllCall = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("securityProfile-EditAllCall").setMaxAccess("readwrite") if mibBuilder.loadTexts: securityProfile_EditAllCall.setStatus('mandatory') if mibBuilder.loadTexts: securityProfile_EditAllCall.setDescription('TRUE = able to edit all call profiles.') securityProfile_SysDiag = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("securityProfile-SysDiag").setMaxAccess("readwrite") if mibBuilder.loadTexts: securityProfile_SysDiag.setStatus('mandatory') if mibBuilder.loadTexts: securityProfile_SysDiag.setDescription('TRUE = able to perform system diagnostics.') securityProfile_OwnPortDiag = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 14), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("securityProfile-OwnPortDiag").setMaxAccess("readwrite") if mibBuilder.loadTexts: securityProfile_OwnPortDiag.setStatus('mandatory') if mibBuilder.loadTexts: securityProfile_OwnPortDiag.setDescription('TRUE = able to perform port associated port diagnostics (for remote terminal).') securityProfile_AllPortDiag = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 15), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("securityProfile-AllPortDiag").setMaxAccess("readwrite") if mibBuilder.loadTexts: securityProfile_AllPortDiag.setStatus('mandatory') if mibBuilder.loadTexts: securityProfile_AllPortDiag.setDescription('TRUE = able to perform port diagnostics for all ports.') securityProfile_Download = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 16), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("securityProfile-Download").setMaxAccess("readwrite") if mibBuilder.loadTexts: securityProfile_Download.setStatus('mandatory') if mibBuilder.loadTexts: securityProfile_Download.setDescription('TRUE = able to download configuration.') securityProfile_Upload = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 17), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("securityProfile-Upload").setMaxAccess("readwrite") if mibBuilder.loadTexts: securityProfile_Upload.setStatus('mandatory') if mibBuilder.loadTexts: securityProfile_Upload.setDescription('TRUE = able to upload configuration.') securityProfile_FieldService = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 18), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("securityProfile-FieldService").setMaxAccess("readwrite") if mibBuilder.loadTexts: securityProfile_FieldService.setStatus('mandatory') if mibBuilder.loadTexts: securityProfile_FieldService.setDescription('TRUE = able to perform field service.') securityProfile_UseTacacsPlus = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 19), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("securityProfile-UseTacacsPlus").setMaxAccess("readwrite") if mibBuilder.loadTexts: securityProfile_UseTacacsPlus.setStatus('mandatory') if mibBuilder.loadTexts: securityProfile_UseTacacsPlus.setDescription('Use TACACS+ to authenticate security level changes') securityProfile_Action_o = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 20), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("noAction", 1), ("createProfile", 2), ("deleteProfile", 3)))).setLabel("securityProfile-Action-o").setMaxAccess("readwrite") if mibBuilder.loadTexts: securityProfile_Action_o.setStatus('mandatory') if mibBuilder.loadTexts: securityProfile_Action_o.setDescription('') mibBuilder.exportSymbols("ASCEND-MIBSCRTY-MIB", securityProfile_Action_o=securityProfile_Action_o, mibsecurityProfileEntry=mibsecurityProfileEntry, securityProfile_EditComCall=securityProfile_EditComCall, securityProfile_EditLine=securityProfile_EditLine, securityProfile_FieldService=securityProfile_FieldService, securityProfile_EditOwnCall=securityProfile_EditOwnCall, securityProfile_Upload=securityProfile_Upload, DisplayString=DisplayString, mibsecurityProfile=mibsecurityProfile, securityProfile_EditCurCall=securityProfile_EditCurCall, securityProfile_Name=securityProfile_Name, securityProfile_Download=securityProfile_Download, securityProfile_UseTacacsPlus=securityProfile_UseTacacsPlus, securityProfile_OwnPortDiag=securityProfile_OwnPortDiag, securityProfile_Operations=securityProfile_Operations, securityProfile_EditSecurity=securityProfile_EditSecurity, securityProfile_AllPortDiag=securityProfile_AllPortDiag, securityProfile_Password=securityProfile_Password, securityProfile_EditSystem=securityProfile_EditSystem, securityProfile_SysDiag=securityProfile_SysDiag, securityProfile_EditAllPort=securityProfile_EditAllPort, mibsecurityProfileTable=mibsecurityProfileTable, securityProfile_EditAllCall=securityProfile_EditAllCall, securityProfile_EditOwnPort=securityProfile_EditOwnPort)
(configuration,) = mibBuilder.importSymbols('ASCEND-MIB', 'configuration') (object_identifier, octet_string, integer) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'OctetString', 'Integer') (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') (notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance') (object_identity, ip_address, time_ticks, iso, gauge32, mib_identifier, integer32, module_identity, unsigned32, bits, counter32, mib_scalar, mib_table, mib_table_row, mib_table_column, counter64, notification_type) = mibBuilder.importSymbols('SNMPv2-SMI', 'ObjectIdentity', 'IpAddress', 'TimeTicks', 'iso', 'Gauge32', 'MibIdentifier', 'Integer32', 'ModuleIdentity', 'Unsigned32', 'Bits', 'Counter32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Counter64', 'NotificationType') (textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString') class Displaystring(OctetString): pass mibsecurity_profile = mib_identifier((1, 3, 6, 1, 4, 1, 529, 23, 107)) mibsecurity_profile_table = mib_table((1, 3, 6, 1, 4, 1, 529, 23, 107, 1)) if mibBuilder.loadTexts: mibsecurityProfileTable.setStatus('mandatory') if mibBuilder.loadTexts: mibsecurityProfileTable.setDescription('A list of mibsecurityProfile profile entries.') mibsecurity_profile_entry = mib_table_row((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1)).setIndexNames((0, 'ASCEND-MIBSCRTY-MIB', 'securityProfile-Name')) if mibBuilder.loadTexts: mibsecurityProfileEntry.setStatus('mandatory') if mibBuilder.loadTexts: mibsecurityProfileEntry.setDescription('A mibsecurityProfile entry containing objects that maps to the parameters of mibsecurityProfile profile.') security_profile__name = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 1), display_string()).setLabel('securityProfile-Name').setMaxAccess('readonly') if mibBuilder.loadTexts: securityProfile_Name.setStatus('mandatory') if mibBuilder.loadTexts: securityProfile_Name.setDescription('Profile name.') security_profile__password = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 2), display_string()).setLabel('securityProfile-Password').setMaxAccess('readwrite') if mibBuilder.loadTexts: securityProfile_Password.setStatus('mandatory') if mibBuilder.loadTexts: securityProfile_Password.setDescription('Password to access the security levels defined by this profile.') security_profile__operations = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('securityProfile-Operations').setMaxAccess('readwrite') if mibBuilder.loadTexts: securityProfile_Operations.setStatus('mandatory') if mibBuilder.loadTexts: securityProfile_Operations.setDescription('TRUE = able to do things other than look.') security_profile__edit_security = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('securityProfile-EditSecurity').setMaxAccess('readwrite') if mibBuilder.loadTexts: securityProfile_EditSecurity.setStatus('mandatory') if mibBuilder.loadTexts: securityProfile_EditSecurity.setDescription('TRUE = able to edit the security profiles.') security_profile__edit_system = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('securityProfile-EditSystem').setMaxAccess('readwrite') if mibBuilder.loadTexts: securityProfile_EditSystem.setStatus('mandatory') if mibBuilder.loadTexts: securityProfile_EditSystem.setDescription('TRUE = able to edit the system profiles.') security_profile__edit_line = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('securityProfile-EditLine').setMaxAccess('readwrite') if mibBuilder.loadTexts: securityProfile_EditLine.setStatus('mandatory') if mibBuilder.loadTexts: securityProfile_EditLine.setDescription('TRUE = able to edit the line profile.') security_profile__edit_own_port = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('securityProfile-EditOwnPort').setMaxAccess('readwrite') if mibBuilder.loadTexts: securityProfile_EditOwnPort.setStatus('mandatory') if mibBuilder.loadTexts: securityProfile_EditOwnPort.setDescription('TRUE = able to edit port associated port profile (for remote terminal).') security_profile__edit_all_port = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('securityProfile-EditAllPort').setMaxAccess('readwrite') if mibBuilder.loadTexts: securityProfile_EditAllPort.setStatus('mandatory') if mibBuilder.loadTexts: securityProfile_EditAllPort.setDescription('TRUE = able to edit all port profiles.') security_profile__edit_cur_call = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('securityProfile-EditCurCall').setMaxAccess('readwrite') if mibBuilder.loadTexts: securityProfile_EditCurCall.setStatus('mandatory') if mibBuilder.loadTexts: securityProfile_EditCurCall.setDescription('TRUE = able to edit the current call profile.') security_profile__edit_own_call = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('securityProfile-EditOwnCall').setMaxAccess('readwrite') if mibBuilder.loadTexts: securityProfile_EditOwnCall.setStatus('mandatory') if mibBuilder.loadTexts: securityProfile_EditOwnCall.setDescription('TRUE = able to edit port associated call profiles (for remote terminal).') security_profile__edit_com_call = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 11), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('securityProfile-EditComCall').setMaxAccess('readwrite') if mibBuilder.loadTexts: securityProfile_EditComCall.setStatus('mandatory') if mibBuilder.loadTexts: securityProfile_EditComCall.setDescription('TRUE = able to edit the common call profiles (for remote terminal).') security_profile__edit_all_call = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 12), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('securityProfile-EditAllCall').setMaxAccess('readwrite') if mibBuilder.loadTexts: securityProfile_EditAllCall.setStatus('mandatory') if mibBuilder.loadTexts: securityProfile_EditAllCall.setDescription('TRUE = able to edit all call profiles.') security_profile__sys_diag = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 13), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('securityProfile-SysDiag').setMaxAccess('readwrite') if mibBuilder.loadTexts: securityProfile_SysDiag.setStatus('mandatory') if mibBuilder.loadTexts: securityProfile_SysDiag.setDescription('TRUE = able to perform system diagnostics.') security_profile__own_port_diag = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 14), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('securityProfile-OwnPortDiag').setMaxAccess('readwrite') if mibBuilder.loadTexts: securityProfile_OwnPortDiag.setStatus('mandatory') if mibBuilder.loadTexts: securityProfile_OwnPortDiag.setDescription('TRUE = able to perform port associated port diagnostics (for remote terminal).') security_profile__all_port_diag = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 15), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('securityProfile-AllPortDiag').setMaxAccess('readwrite') if mibBuilder.loadTexts: securityProfile_AllPortDiag.setStatus('mandatory') if mibBuilder.loadTexts: securityProfile_AllPortDiag.setDescription('TRUE = able to perform port diagnostics for all ports.') security_profile__download = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 16), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('securityProfile-Download').setMaxAccess('readwrite') if mibBuilder.loadTexts: securityProfile_Download.setStatus('mandatory') if mibBuilder.loadTexts: securityProfile_Download.setDescription('TRUE = able to download configuration.') security_profile__upload = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 17), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('securityProfile-Upload').setMaxAccess('readwrite') if mibBuilder.loadTexts: securityProfile_Upload.setStatus('mandatory') if mibBuilder.loadTexts: securityProfile_Upload.setDescription('TRUE = able to upload configuration.') security_profile__field_service = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 18), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('securityProfile-FieldService').setMaxAccess('readwrite') if mibBuilder.loadTexts: securityProfile_FieldService.setStatus('mandatory') if mibBuilder.loadTexts: securityProfile_FieldService.setDescription('TRUE = able to perform field service.') security_profile__use_tacacs_plus = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 19), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('securityProfile-UseTacacsPlus').setMaxAccess('readwrite') if mibBuilder.loadTexts: securityProfile_UseTacacsPlus.setStatus('mandatory') if mibBuilder.loadTexts: securityProfile_UseTacacsPlus.setDescription('Use TACACS+ to authenticate security level changes') security_profile__action_o = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 107, 1, 1, 20), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('noAction', 1), ('createProfile', 2), ('deleteProfile', 3)))).setLabel('securityProfile-Action-o').setMaxAccess('readwrite') if mibBuilder.loadTexts: securityProfile_Action_o.setStatus('mandatory') if mibBuilder.loadTexts: securityProfile_Action_o.setDescription('') mibBuilder.exportSymbols('ASCEND-MIBSCRTY-MIB', securityProfile_Action_o=securityProfile_Action_o, mibsecurityProfileEntry=mibsecurityProfileEntry, securityProfile_EditComCall=securityProfile_EditComCall, securityProfile_EditLine=securityProfile_EditLine, securityProfile_FieldService=securityProfile_FieldService, securityProfile_EditOwnCall=securityProfile_EditOwnCall, securityProfile_Upload=securityProfile_Upload, DisplayString=DisplayString, mibsecurityProfile=mibsecurityProfile, securityProfile_EditCurCall=securityProfile_EditCurCall, securityProfile_Name=securityProfile_Name, securityProfile_Download=securityProfile_Download, securityProfile_UseTacacsPlus=securityProfile_UseTacacsPlus, securityProfile_OwnPortDiag=securityProfile_OwnPortDiag, securityProfile_Operations=securityProfile_Operations, securityProfile_EditSecurity=securityProfile_EditSecurity, securityProfile_AllPortDiag=securityProfile_AllPortDiag, securityProfile_Password=securityProfile_Password, securityProfile_EditSystem=securityProfile_EditSystem, securityProfile_SysDiag=securityProfile_SysDiag, securityProfile_EditAllPort=securityProfile_EditAllPort, mibsecurityProfileTable=mibsecurityProfileTable, securityProfile_EditAllCall=securityProfile_EditAllCall, securityProfile_EditOwnPort=securityProfile_EditOwnPort)
while True: s = input("Ukucaj nesto: ") if s == "izlaz": break if len(s) < 3: print("Previse je kratko.") continue print("Input je zadovoljavajuce duzine.") #mozete zadavati druge komande za neki rad ovdej
while True: s = input('Ukucaj nesto: ') if s == 'izlaz': break if len(s) < 3: print('Previse je kratko.') continue print('Input je zadovoljavajuce duzine.')
pancakes = int(input()) if pancakes > 3: print("Yum!") else: #if pancakes < 3: print("Still hungry!")
pancakes = int(input()) if pancakes > 3: print('Yum!') else: print('Still hungry!')
users_calculation = {} def request_addition(user, num1, num2): users_calcs = users_calculation.get(user) if (users_calcs is None): users_calcs = list() users_calcs.append(num1+num2) users_calculation[user] = users_calcs def get_last_calculation(user): users_calcs = users_calculation.get(user) results = None if (users_calcs is not None and len(users_calcs) > 0): results = users_calcs.pop() return results
users_calculation = {} def request_addition(user, num1, num2): users_calcs = users_calculation.get(user) if users_calcs is None: users_calcs = list() users_calcs.append(num1 + num2) users_calculation[user] = users_calcs def get_last_calculation(user): users_calcs = users_calculation.get(user) results = None if users_calcs is not None and len(users_calcs) > 0: results = users_calcs.pop() return results
def x(a, b, c): p = 5 b = int(x) print(b)
def x(a, b, c): p = 5 b = int(x) print(b)
# from https://en.wikipedia.org/wiki/Test_functions_for_optimization # # takes input parameters x,y # returns value in "ans" # optimal minimum at f(3,0.5) = 0 # parameter range is -4.5 <= x,y <= 4.5 def evaluate(x,y): return (1.5 - x + x*y)**2 + (2.25 - x + x*y*y)**2 + (2.625 - x + x*y*y*y)**2 def run(self,Inputs): if abs(self.y - 0.24392555296) <= 0.00001 and abs(self.x - 0.247797586626) <= 0.00001 : print("Expected failure for testing ... x:"+str(self.x)+" | y:"+str(self.y)) raise Exception("expected failure for testing") self.ans = evaluate(self.x,self.y)
def evaluate(x, y): return (1.5 - x + x * y) ** 2 + (2.25 - x + x * y * y) ** 2 + (2.625 - x + x * y * y * y) ** 2 def run(self, Inputs): if abs(self.y - 0.24392555296) <= 1e-05 and abs(self.x - 0.247797586626) <= 1e-05: print('Expected failure for testing ... x:' + str(self.x) + ' | y:' + str(self.y)) raise exception('expected failure for testing') self.ans = evaluate(self.x, self.y)
# -*- coding: utf-8 -*- def create(): resourceDict = dict() return resourceDict def addOne(resourceDict, key, value): if (len(key)<=2): return 'err' if (key[0:2]!="##"): print("key must be like '##xx' : %s " % key) return 'err' resourceDict[key] = value return 'ok'
def create(): resource_dict = dict() return resourceDict def add_one(resourceDict, key, value): if len(key) <= 2: return 'err' if key[0:2] != '##': print("key must be like '##xx' : %s " % key) return 'err' resourceDict[key] = value return 'ok'
class DuplicateTagsWarning(UserWarning): def get_warning_message(self, duplicate_tags, name): return f"Semantic tag(s) '{', '.join(duplicate_tags)}' already present on column '{name}'" class StandardTagsChangedWarning(UserWarning): def get_warning_message(self, use_standard_tags, col_name=None): changed = "added to" if use_standard_tags else "removed from" name = ('"' + col_name + '"') if col_name is not None else "your column" return f"Standard tags have been {changed} {name}" class UpgradeSchemaWarning(UserWarning): def get_warning_message(self, saved_version_str, current_schema_version): return ( "The schema version of the saved Woodwork table " "%s is greater than the latest supported %s. " "You may need to upgrade woodwork. Attempting to load Woodwork table ..." % (saved_version_str, current_schema_version) ) class OutdatedSchemaWarning(UserWarning): def get_warning_message(self, saved_version_str): return ( "The schema version of the saved Woodwork table " "%s is no longer supported by this version " "of woodwork. Attempting to load Woodwork table ..." % (saved_version_str) ) class IndexTagRemovedWarning(UserWarning): pass class TypingInfoMismatchWarning(UserWarning): def get_warning_message(self, attr, invalid_reason, object_type): return ( f"Operation performed by {attr} has invalidated the Woodwork typing information:\n " f"{invalid_reason}.\n " f"Please initialize Woodwork with {object_type}.ww.init" ) class TypeConversionError(Exception): def __init__(self, series, new_dtype, logical_type): message = f"Error converting datatype for {series.name} from type {str(series.dtype)} " message += f"to type {new_dtype}. Please confirm the underlying data is consistent with " message += f"logical type {logical_type}." super().__init__(message) class TypeConversionWarning(UserWarning): pass class ParametersIgnoredWarning(UserWarning): pass class ColumnNotPresentError(KeyError): def __init__(self, column): if isinstance(column, str): return super().__init__( f"Column with name '{column}' not found in DataFrame" ) elif isinstance(column, list): return super().__init__(f"Column(s) '{column}' not found in DataFrame") class WoodworkNotInitError(AttributeError): pass class WoodworkNotInitWarning(UserWarning): pass
class Duplicatetagswarning(UserWarning): def get_warning_message(self, duplicate_tags, name): return f"Semantic tag(s) '{', '.join(duplicate_tags)}' already present on column '{name}'" class Standardtagschangedwarning(UserWarning): def get_warning_message(self, use_standard_tags, col_name=None): changed = 'added to' if use_standard_tags else 'removed from' name = '"' + col_name + '"' if col_name is not None else 'your column' return f'Standard tags have been {changed} {name}' class Upgradeschemawarning(UserWarning): def get_warning_message(self, saved_version_str, current_schema_version): return 'The schema version of the saved Woodwork table %s is greater than the latest supported %s. You may need to upgrade woodwork. Attempting to load Woodwork table ...' % (saved_version_str, current_schema_version) class Outdatedschemawarning(UserWarning): def get_warning_message(self, saved_version_str): return 'The schema version of the saved Woodwork table %s is no longer supported by this version of woodwork. Attempting to load Woodwork table ...' % saved_version_str class Indextagremovedwarning(UserWarning): pass class Typinginfomismatchwarning(UserWarning): def get_warning_message(self, attr, invalid_reason, object_type): return f'Operation performed by {attr} has invalidated the Woodwork typing information:\n {invalid_reason}.\n Please initialize Woodwork with {object_type}.ww.init' class Typeconversionerror(Exception): def __init__(self, series, new_dtype, logical_type): message = f'Error converting datatype for {series.name} from type {str(series.dtype)} ' message += f'to type {new_dtype}. Please confirm the underlying data is consistent with ' message += f'logical type {logical_type}.' super().__init__(message) class Typeconversionwarning(UserWarning): pass class Parametersignoredwarning(UserWarning): pass class Columnnotpresenterror(KeyError): def __init__(self, column): if isinstance(column, str): return super().__init__(f"Column with name '{column}' not found in DataFrame") elif isinstance(column, list): return super().__init__(f"Column(s) '{column}' not found in DataFrame") class Woodworknotiniterror(AttributeError): pass class Woodworknotinitwarning(UserWarning): pass
def soma(n1,n2): r = n1+n2 return r def sub(n1,n2): r = n1-n2 return r def mult(n1,n2): r = n1*n2 return r def divfra(n1,n2): r = n1/n2 return r def divint(n1,n2): r = n1//n2 return r def restodiv(n1,n2): r = n1%n2 return r def raiz1(n1,n2): r = n1**(0.5) return r def raiz2(n1,n2): r = n2**(1/2) return r
def soma(n1, n2): r = n1 + n2 return r def sub(n1, n2): r = n1 - n2 return r def mult(n1, n2): r = n1 * n2 return r def divfra(n1, n2): r = n1 / n2 return r def divint(n1, n2): r = n1 // n2 return r def restodiv(n1, n2): r = n1 % n2 return r def raiz1(n1, n2): r = n1 ** 0.5 return r def raiz2(n1, n2): r = n2 ** (1 / 2) return r
# Edit and set server name and version test_server_name = '<put server name here>' test_server_version = '201X' # Edit and direct to your test folders on your server test_folder = r'\Tests' test_mkfolder = r'\Tests\New Folder' test_newfoldername = 'Renamed folder' test_renamedfolder = r'\Tests\Renamed folder' # Edit and direct to your test models on your server test_file = r'\Tests\TestModel.rvt' test_cpyfile = r'\Tests\TestModelCopy.rvt' test_mvfile = r'\Tests\TestModelMove.rvt' test_mhistory = r'\Tests\TestModel.rvt'
test_server_name = '<put server name here>' test_server_version = '201X' test_folder = '\\Tests' test_mkfolder = '\\Tests\\New Folder' test_newfoldername = 'Renamed folder' test_renamedfolder = '\\Tests\\Renamed folder' test_file = '\\Tests\\TestModel.rvt' test_cpyfile = '\\Tests\\TestModelCopy.rvt' test_mvfile = '\\Tests\\TestModelMove.rvt' test_mhistory = '\\Tests\\TestModel.rvt'
''' Created on Aug 8, 2017 Check permutation: Given two strings, write a method to decide if one is a permutation of the other Things to learn: - a python set orders set content - in a set, one uses == to compare same content @author: igoroya ''' def check_string_permuntation(str1, str2): if len(str1) is not len(str2): return False strset1 = {i for i in str1} strset2 = {i for i in str2} if strset1 == strset2: return True else: return False if __name__ == '__main__': str1 = 'aeiou' str2 = 'aeiuo' str3 = 'pepe' str4 = 'aeiouaeiou' print(check_string_permuntation(str1, str2)) print(check_string_permuntation(str1, str3)) print(check_string_permuntation(str1, str4))
""" Created on Aug 8, 2017 Check permutation: Given two strings, write a method to decide if one is a permutation of the other Things to learn: - a python set orders set content - in a set, one uses == to compare same content @author: igoroya """ def check_string_permuntation(str1, str2): if len(str1) is not len(str2): return False strset1 = {i for i in str1} strset2 = {i for i in str2} if strset1 == strset2: return True else: return False if __name__ == '__main__': str1 = 'aeiou' str2 = 'aeiuo' str3 = 'pepe' str4 = 'aeiouaeiou' print(check_string_permuntation(str1, str2)) print(check_string_permuntation(str1, str3)) print(check_string_permuntation(str1, str4))
# # PySNMP MIB module IEEE8021-MIRP-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/IEEE8021-MIRP-MIB # Produced by pysmi-0.3.4 at Wed May 1 13:52:27 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # Integer, ObjectIdentifier, OctetString = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsIntersection, ValueRangeConstraint, ValueSizeConstraint, SingleValueConstraint, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ValueRangeConstraint", "ValueSizeConstraint", "SingleValueConstraint", "ConstraintsUnion") ieee8021BridgeBasePortEntry, = mibBuilder.importSymbols("IEEE8021-BRIDGE-MIB", "ieee8021BridgeBasePortEntry") ieee8021PbbBackboneEdgeBridgeObjects, = mibBuilder.importSymbols("IEEE8021-PBB-MIB", "ieee8021PbbBackboneEdgeBridgeObjects") IEEE8021BridgePortNumberOrZero, = mibBuilder.importSymbols("IEEE8021-TC-MIB", "IEEE8021BridgePortNumberOrZero") VlanIdOrNone, = mibBuilder.importSymbols("Q-BRIDGE-MIB", "VlanIdOrNone") ObjectGroup, ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ObjectGroup", "ModuleCompliance", "NotificationGroup") systemGroup, = mibBuilder.importSymbols("SNMPv2-MIB", "systemGroup") Counter64, Counter32, NotificationType, TimeTicks, ModuleIdentity, MibIdentifier, Gauge32, ObjectIdentity, Integer32, MibScalar, MibTable, MibTableRow, MibTableColumn, iso, Unsigned32, IpAddress, Bits = mibBuilder.importSymbols("SNMPv2-SMI", "Counter64", "Counter32", "NotificationType", "TimeTicks", "ModuleIdentity", "MibIdentifier", "Gauge32", "ObjectIdentity", "Integer32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "iso", "Unsigned32", "IpAddress", "Bits") TextualConvention, DisplayString, TruthValue = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString", "TruthValue") ieee8021MirpMib = ModuleIdentity((1, 3, 111, 2, 802, 1, 1, 23)) ieee8021MirpMib.setRevisions(('2011-04-05 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: ieee8021MirpMib.setRevisionsDescriptions(('Included in IEEE Std. 802.1Qbe-2011 Copyright (C) IEEE802.1.',)) if mibBuilder.loadTexts: ieee8021MirpMib.setLastUpdated('201104050000Z') if mibBuilder.loadTexts: ieee8021MirpMib.setOrganization('IEEE 802.1 Working Group') if mibBuilder.loadTexts: ieee8021MirpMib.setContactInfo('WG-URL: http://grouper.ieee.org/groups/802/1/index.html WG-EMail: stds-802-1@ieee.org Contact: Norman Finn c/o Tony Jeffree, IEEE 802.1 Working Group Chair Postal: IEEE Standards Board 445 Hoes Lane P.O. Box 1331 Piscataway, NJ 08855-1331 USA E-mail: tony@jeffree.co.uk ') if mibBuilder.loadTexts: ieee8021MirpMib.setDescription('Multiple I-SID Registration Protocol module for managing IEEE 802.1Qbe ') ieee8021MirpMIBObjects = MibIdentifier((1, 3, 111, 2, 802, 1, 1, 23, 1)) ieee8021MirpConformance = MibIdentifier((1, 3, 111, 2, 802, 1, 1, 23, 2)) ieee8021MirpPortTable = MibTable((1, 3, 111, 2, 802, 1, 1, 23, 1, 1), ) if mibBuilder.loadTexts: ieee8021MirpPortTable.setReference('12.9.2') if mibBuilder.loadTexts: ieee8021MirpPortTable.setStatus('current') if mibBuilder.loadTexts: ieee8021MirpPortTable.setDescription('A table that contains controls for the Multiple I-SID Registration Protocol (MIRP) state machines for all of the Ports of a Bridge.') ieee8021MirpPortEntry = MibTableRow((1, 3, 111, 2, 802, 1, 1, 23, 1, 1, 1), ) ieee8021BridgeBasePortEntry.registerAugmentions(("IEEE8021-MIRP-MIB", "ieee8021MirpPortEntry")) ieee8021MirpPortEntry.setIndexNames(*ieee8021BridgeBasePortEntry.getIndexNames()) if mibBuilder.loadTexts: ieee8021MirpPortEntry.setStatus('current') if mibBuilder.loadTexts: ieee8021MirpPortEntry.setDescription('Each entry contains the MIRP Participant controls for one Port.') ieee8021MirpPortEnabledStatus = MibTableColumn((1, 3, 111, 2, 802, 1, 1, 23, 1, 1, 1, 1), TruthValue().clone('true')).setMaxAccess("readcreate") if mibBuilder.loadTexts: ieee8021MirpPortEnabledStatus.setReference('12.7.7.1, 12.7.7.2, 39.2.1.11') if mibBuilder.loadTexts: ieee8021MirpPortEnabledStatus.setStatus('current') if mibBuilder.loadTexts: ieee8021MirpPortEnabledStatus.setDescription("The state of MIRP operation on this port. The value true(1) indicates that MIRP is enabled on this port, as long as ieee8021PbbMirpEnableStatus is also enabled for this component. When false(2) but ieee8021PbbMirpEnableStatus is still enabled for the device, MIRP is disabled on this port. If MIRP is enabled on a VIP, then the MIRP Participant is enabled on that VIP's PIP. If MIRP is enabled on none of the VIPs on a PIP, then the MIRP Participant on the PIP is diabled; any MIRP packets received will be silently discarded, and no MIRP registrations will be propagated from the PIP. A transition from all VIPs on a PIP false(2) to at least one VIP on the PIP true(1) will cause a reset of all MIRP state machines on this PIP. If MIRP is enabled on any port not a VIP, then the MIRP Participant is enabled on that port. If MIRP is disabled on a non-VIP port, then MIRP packets received will be silently discarded, and no MIRP registrations will be propagated from the port. A transition from false(2) to true(1) will cause a reset of all MIRP state machines on a non-VIP port. The value of this object MUST be retained across reinitializations of the management system.") ieee8021PbbMirpEnableStatus = MibScalar((1, 3, 111, 2, 802, 1, 1, 9, 1, 1, 1, 7), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: ieee8021PbbMirpEnableStatus.setReference('12.16.1.1.3:i, 12.16.1.2.2:b') if mibBuilder.loadTexts: ieee8021PbbMirpEnableStatus.setStatus('current') if mibBuilder.loadTexts: ieee8021PbbMirpEnableStatus.setDescription('The administrative status requested by management for MIRP. The value true(1) indicates that MIRP should be enabled on this component, on all ports for which it has not been specifically disabled. When false(2), MIRP is disabled on all ports. This object affects all MIRP Applicant and Registrar state machines. A transition from false(2) to true(1) will cause a reset of all MIRP state machines on all ports. The value of this object MUST be retained across reinitializations of the management system.') ieee8021PbbMirpBvid = MibScalar((1, 3, 111, 2, 802, 1, 1, 9, 1, 1, 1, 8), VlanIdOrNone()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ieee8021PbbMirpBvid.setReference('12.16.1.1.3:j, 12.16.1.2.2:c') if mibBuilder.loadTexts: ieee8021PbbMirpBvid.setStatus('current') if mibBuilder.loadTexts: ieee8021PbbMirpBvid.setDescription('The B-VID to which received MIRPDUs are to be assigned, or 0, if they are to be sent on the CBP PVID.') ieee8021PbbMirpDestSelector = MibScalar((1, 3, 111, 2, 802, 1, 1, 9, 1, 1, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("cbpMirpGroup", 1), ("cbpMirpVlan", 2), ("cbpMirpTable", 3))).clone('cbpMirpGroup')).setMaxAccess("readwrite") if mibBuilder.loadTexts: ieee8021PbbMirpDestSelector.setReference('Table 8-1, 12.16.1.1.3:k, 12.16.1.2.2:d') if mibBuilder.loadTexts: ieee8021PbbMirpDestSelector.setStatus('current') if mibBuilder.loadTexts: ieee8021PbbMirpDestSelector.setDescription('An enumerated value specifying what destination_address and vlan_identifier are to be used when the MIRP Participant transmits an MIRPDU towards the MAC relay entity: cbpMirpGroup (1) Use the Nearest Customer Bridge group address from Table 8-1 with the MIRP B-VID. cbpMirpVlan (2) Use the Nearest Customer Bridge group address from Table 8-1 with the Backbone VLAN Identifier field from the Backbone Service Instance table. cbpMirpTable (3) Use the Default Backbone Destination and Backbone VLAN Identifier fields from the Backbone Service Instance table. The value of this object MUST be retained across reinitializations of the management system.') ieee8021PbbMirpPnpEnable = MibScalar((1, 3, 111, 2, 802, 1, 1, 9, 1, 1, 1, 10), TruthValue().clone('true')).setMaxAccess("readwrite") if mibBuilder.loadTexts: ieee8021PbbMirpPnpEnable.setReference('12.16.1.1.3:j, 12.16.1.2.2:c') if mibBuilder.loadTexts: ieee8021PbbMirpPnpEnable.setStatus('current') if mibBuilder.loadTexts: ieee8021PbbMirpPnpEnable.setDescription('A Boolean value specifying the administrative status requested by management for attaching a MIRP Participant to a PNP if and only if this system is a Backbone Edge Bridge (BEB): true(1) The BEB is to attach a MIRP Participant to exactly one Port, either a management Port with no LAN connection external to the BEB, or a PNP. false(2) No MIRP Participant is to be present on any PNP (or on the MAC Relay-facing side of a CBP). The value of this object MUST be retained across reinitializations of the management system. ') ieee8021PbbMirpPnpPortNumber = MibScalar((1, 3, 111, 2, 802, 1, 1, 9, 1, 1, 1, 11), IEEE8021BridgePortNumberOrZero()).setMaxAccess("readonly") if mibBuilder.loadTexts: ieee8021PbbMirpPnpPortNumber.setReference('12.16.1.1.3:j, 12.16.1.2.2:c') if mibBuilder.loadTexts: ieee8021PbbMirpPnpPortNumber.setStatus('current') if mibBuilder.loadTexts: ieee8021PbbMirpPnpPortNumber.setDescription('The Bridge Port Number of the Provider Network Port (PNP) that has an associated MIRP Participant, or 0, if no Bridge Port has an associated MIRP Participant. This object indexes an entry in the Bridge Port Table. The system SHALL ensure that either ieee8021PbbMirpPnpPortNumber contains 0, or that the indexed ieee8021BridgeBasePortType object contains the value providerNetworkPort(3).') ieee8021MirpCompliances = MibIdentifier((1, 3, 111, 2, 802, 1, 1, 23, 2, 1)) ieee8021MirpGroups = MibIdentifier((1, 3, 111, 2, 802, 1, 1, 23, 2, 2)) ieee8021MirpReqdGroup = ObjectGroup((1, 3, 111, 2, 802, 1, 1, 23, 2, 2, 1)).setObjects(("IEEE8021-MIRP-MIB", "ieee8021MirpPortEnabledStatus"), ("IEEE8021-MIRP-MIB", "ieee8021PbbMirpEnableStatus"), ("IEEE8021-MIRP-MIB", "ieee8021PbbMirpBvid"), ("IEEE8021-MIRP-MIB", "ieee8021PbbMirpDestSelector"), ("IEEE8021-MIRP-MIB", "ieee8021PbbMirpPnpEnable"), ("IEEE8021-MIRP-MIB", "ieee8021PbbMirpPnpPortNumber")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ieee8021MirpReqdGroup = ieee8021MirpReqdGroup.setStatus('current') if mibBuilder.loadTexts: ieee8021MirpReqdGroup.setDescription('Objects in the MIRP augmentation required group.') ieee8021MirpBridgeCompliance = ModuleCompliance((1, 3, 111, 2, 802, 1, 1, 23, 2, 1, 1)).setObjects(("SNMPv2-MIB", "systemGroup"), ("IEEE8021-MIRP-MIB", "ieee8021MirpReqdGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ieee8021MirpBridgeCompliance = ieee8021MirpBridgeCompliance.setStatus('current') if mibBuilder.loadTexts: ieee8021MirpBridgeCompliance.setDescription('The compliance statement for support by a bridge of the IEEE8021-MIRP-MIB module.') mibBuilder.exportSymbols("IEEE8021-MIRP-MIB", ieee8021PbbMirpBvid=ieee8021PbbMirpBvid, ieee8021MirpMib=ieee8021MirpMib, ieee8021MirpPortEntry=ieee8021MirpPortEntry, ieee8021MirpGroups=ieee8021MirpGroups, ieee8021MirpMIBObjects=ieee8021MirpMIBObjects, ieee8021MirpBridgeCompliance=ieee8021MirpBridgeCompliance, ieee8021MirpReqdGroup=ieee8021MirpReqdGroup, ieee8021MirpCompliances=ieee8021MirpCompliances, ieee8021MirpPortEnabledStatus=ieee8021MirpPortEnabledStatus, PYSNMP_MODULE_ID=ieee8021MirpMib, ieee8021PbbMirpEnableStatus=ieee8021PbbMirpEnableStatus, ieee8021MirpConformance=ieee8021MirpConformance, ieee8021PbbMirpDestSelector=ieee8021PbbMirpDestSelector, ieee8021PbbMirpPnpPortNumber=ieee8021PbbMirpPnpPortNumber, ieee8021PbbMirpPnpEnable=ieee8021PbbMirpPnpEnable, ieee8021MirpPortTable=ieee8021MirpPortTable)
(integer, object_identifier, octet_string) = mibBuilder.importSymbols('ASN1', 'Integer', 'ObjectIdentifier', 'OctetString') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_intersection, value_range_constraint, value_size_constraint, single_value_constraint, constraints_union) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'ValueRangeConstraint', 'ValueSizeConstraint', 'SingleValueConstraint', 'ConstraintsUnion') (ieee8021_bridge_base_port_entry,) = mibBuilder.importSymbols('IEEE8021-BRIDGE-MIB', 'ieee8021BridgeBasePortEntry') (ieee8021_pbb_backbone_edge_bridge_objects,) = mibBuilder.importSymbols('IEEE8021-PBB-MIB', 'ieee8021PbbBackboneEdgeBridgeObjects') (ieee8021_bridge_port_number_or_zero,) = mibBuilder.importSymbols('IEEE8021-TC-MIB', 'IEEE8021BridgePortNumberOrZero') (vlan_id_or_none,) = mibBuilder.importSymbols('Q-BRIDGE-MIB', 'VlanIdOrNone') (object_group, module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ObjectGroup', 'ModuleCompliance', 'NotificationGroup') (system_group,) = mibBuilder.importSymbols('SNMPv2-MIB', 'systemGroup') (counter64, counter32, notification_type, time_ticks, module_identity, mib_identifier, gauge32, object_identity, integer32, mib_scalar, mib_table, mib_table_row, mib_table_column, iso, unsigned32, ip_address, bits) = mibBuilder.importSymbols('SNMPv2-SMI', 'Counter64', 'Counter32', 'NotificationType', 'TimeTicks', 'ModuleIdentity', 'MibIdentifier', 'Gauge32', 'ObjectIdentity', 'Integer32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'iso', 'Unsigned32', 'IpAddress', 'Bits') (textual_convention, display_string, truth_value) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString', 'TruthValue') ieee8021_mirp_mib = module_identity((1, 3, 111, 2, 802, 1, 1, 23)) ieee8021MirpMib.setRevisions(('2011-04-05 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: ieee8021MirpMib.setRevisionsDescriptions(('Included in IEEE Std. 802.1Qbe-2011 Copyright (C) IEEE802.1.',)) if mibBuilder.loadTexts: ieee8021MirpMib.setLastUpdated('201104050000Z') if mibBuilder.loadTexts: ieee8021MirpMib.setOrganization('IEEE 802.1 Working Group') if mibBuilder.loadTexts: ieee8021MirpMib.setContactInfo('WG-URL: http://grouper.ieee.org/groups/802/1/index.html WG-EMail: stds-802-1@ieee.org Contact: Norman Finn c/o Tony Jeffree, IEEE 802.1 Working Group Chair Postal: IEEE Standards Board 445 Hoes Lane P.O. Box 1331 Piscataway, NJ 08855-1331 USA E-mail: tony@jeffree.co.uk ') if mibBuilder.loadTexts: ieee8021MirpMib.setDescription('Multiple I-SID Registration Protocol module for managing IEEE 802.1Qbe ') ieee8021_mirp_mib_objects = mib_identifier((1, 3, 111, 2, 802, 1, 1, 23, 1)) ieee8021_mirp_conformance = mib_identifier((1, 3, 111, 2, 802, 1, 1, 23, 2)) ieee8021_mirp_port_table = mib_table((1, 3, 111, 2, 802, 1, 1, 23, 1, 1)) if mibBuilder.loadTexts: ieee8021MirpPortTable.setReference('12.9.2') if mibBuilder.loadTexts: ieee8021MirpPortTable.setStatus('current') if mibBuilder.loadTexts: ieee8021MirpPortTable.setDescription('A table that contains controls for the Multiple I-SID Registration Protocol (MIRP) state machines for all of the Ports of a Bridge.') ieee8021_mirp_port_entry = mib_table_row((1, 3, 111, 2, 802, 1, 1, 23, 1, 1, 1)) ieee8021BridgeBasePortEntry.registerAugmentions(('IEEE8021-MIRP-MIB', 'ieee8021MirpPortEntry')) ieee8021MirpPortEntry.setIndexNames(*ieee8021BridgeBasePortEntry.getIndexNames()) if mibBuilder.loadTexts: ieee8021MirpPortEntry.setStatus('current') if mibBuilder.loadTexts: ieee8021MirpPortEntry.setDescription('Each entry contains the MIRP Participant controls for one Port.') ieee8021_mirp_port_enabled_status = mib_table_column((1, 3, 111, 2, 802, 1, 1, 23, 1, 1, 1, 1), truth_value().clone('true')).setMaxAccess('readcreate') if mibBuilder.loadTexts: ieee8021MirpPortEnabledStatus.setReference('12.7.7.1, 12.7.7.2, 39.2.1.11') if mibBuilder.loadTexts: ieee8021MirpPortEnabledStatus.setStatus('current') if mibBuilder.loadTexts: ieee8021MirpPortEnabledStatus.setDescription("The state of MIRP operation on this port. The value true(1) indicates that MIRP is enabled on this port, as long as ieee8021PbbMirpEnableStatus is also enabled for this component. When false(2) but ieee8021PbbMirpEnableStatus is still enabled for the device, MIRP is disabled on this port. If MIRP is enabled on a VIP, then the MIRP Participant is enabled on that VIP's PIP. If MIRP is enabled on none of the VIPs on a PIP, then the MIRP Participant on the PIP is diabled; any MIRP packets received will be silently discarded, and no MIRP registrations will be propagated from the PIP. A transition from all VIPs on a PIP false(2) to at least one VIP on the PIP true(1) will cause a reset of all MIRP state machines on this PIP. If MIRP is enabled on any port not a VIP, then the MIRP Participant is enabled on that port. If MIRP is disabled on a non-VIP port, then MIRP packets received will be silently discarded, and no MIRP registrations will be propagated from the port. A transition from false(2) to true(1) will cause a reset of all MIRP state machines on a non-VIP port. The value of this object MUST be retained across reinitializations of the management system.") ieee8021_pbb_mirp_enable_status = mib_scalar((1, 3, 111, 2, 802, 1, 1, 9, 1, 1, 1, 7), truth_value().clone('false')).setMaxAccess('readwrite') if mibBuilder.loadTexts: ieee8021PbbMirpEnableStatus.setReference('12.16.1.1.3:i, 12.16.1.2.2:b') if mibBuilder.loadTexts: ieee8021PbbMirpEnableStatus.setStatus('current') if mibBuilder.loadTexts: ieee8021PbbMirpEnableStatus.setDescription('The administrative status requested by management for MIRP. The value true(1) indicates that MIRP should be enabled on this component, on all ports for which it has not been specifically disabled. When false(2), MIRP is disabled on all ports. This object affects all MIRP Applicant and Registrar state machines. A transition from false(2) to true(1) will cause a reset of all MIRP state machines on all ports. The value of this object MUST be retained across reinitializations of the management system.') ieee8021_pbb_mirp_bvid = mib_scalar((1, 3, 111, 2, 802, 1, 1, 9, 1, 1, 1, 8), vlan_id_or_none()).setMaxAccess('readwrite') if mibBuilder.loadTexts: ieee8021PbbMirpBvid.setReference('12.16.1.1.3:j, 12.16.1.2.2:c') if mibBuilder.loadTexts: ieee8021PbbMirpBvid.setStatus('current') if mibBuilder.loadTexts: ieee8021PbbMirpBvid.setDescription('The B-VID to which received MIRPDUs are to be assigned, or 0, if they are to be sent on the CBP PVID.') ieee8021_pbb_mirp_dest_selector = mib_scalar((1, 3, 111, 2, 802, 1, 1, 9, 1, 1, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('cbpMirpGroup', 1), ('cbpMirpVlan', 2), ('cbpMirpTable', 3))).clone('cbpMirpGroup')).setMaxAccess('readwrite') if mibBuilder.loadTexts: ieee8021PbbMirpDestSelector.setReference('Table 8-1, 12.16.1.1.3:k, 12.16.1.2.2:d') if mibBuilder.loadTexts: ieee8021PbbMirpDestSelector.setStatus('current') if mibBuilder.loadTexts: ieee8021PbbMirpDestSelector.setDescription('An enumerated value specifying what destination_address and vlan_identifier are to be used when the MIRP Participant transmits an MIRPDU towards the MAC relay entity: cbpMirpGroup (1) Use the Nearest Customer Bridge group address from Table 8-1 with the MIRP B-VID. cbpMirpVlan (2) Use the Nearest Customer Bridge group address from Table 8-1 with the Backbone VLAN Identifier field from the Backbone Service Instance table. cbpMirpTable (3) Use the Default Backbone Destination and Backbone VLAN Identifier fields from the Backbone Service Instance table. The value of this object MUST be retained across reinitializations of the management system.') ieee8021_pbb_mirp_pnp_enable = mib_scalar((1, 3, 111, 2, 802, 1, 1, 9, 1, 1, 1, 10), truth_value().clone('true')).setMaxAccess('readwrite') if mibBuilder.loadTexts: ieee8021PbbMirpPnpEnable.setReference('12.16.1.1.3:j, 12.16.1.2.2:c') if mibBuilder.loadTexts: ieee8021PbbMirpPnpEnable.setStatus('current') if mibBuilder.loadTexts: ieee8021PbbMirpPnpEnable.setDescription('A Boolean value specifying the administrative status requested by management for attaching a MIRP Participant to a PNP if and only if this system is a Backbone Edge Bridge (BEB): true(1) The BEB is to attach a MIRP Participant to exactly one Port, either a management Port with no LAN connection external to the BEB, or a PNP. false(2) No MIRP Participant is to be present on any PNP (or on the MAC Relay-facing side of a CBP). The value of this object MUST be retained across reinitializations of the management system. ') ieee8021_pbb_mirp_pnp_port_number = mib_scalar((1, 3, 111, 2, 802, 1, 1, 9, 1, 1, 1, 11), ieee8021_bridge_port_number_or_zero()).setMaxAccess('readonly') if mibBuilder.loadTexts: ieee8021PbbMirpPnpPortNumber.setReference('12.16.1.1.3:j, 12.16.1.2.2:c') if mibBuilder.loadTexts: ieee8021PbbMirpPnpPortNumber.setStatus('current') if mibBuilder.loadTexts: ieee8021PbbMirpPnpPortNumber.setDescription('The Bridge Port Number of the Provider Network Port (PNP) that has an associated MIRP Participant, or 0, if no Bridge Port has an associated MIRP Participant. This object indexes an entry in the Bridge Port Table. The system SHALL ensure that either ieee8021PbbMirpPnpPortNumber contains 0, or that the indexed ieee8021BridgeBasePortType object contains the value providerNetworkPort(3).') ieee8021_mirp_compliances = mib_identifier((1, 3, 111, 2, 802, 1, 1, 23, 2, 1)) ieee8021_mirp_groups = mib_identifier((1, 3, 111, 2, 802, 1, 1, 23, 2, 2)) ieee8021_mirp_reqd_group = object_group((1, 3, 111, 2, 802, 1, 1, 23, 2, 2, 1)).setObjects(('IEEE8021-MIRP-MIB', 'ieee8021MirpPortEnabledStatus'), ('IEEE8021-MIRP-MIB', 'ieee8021PbbMirpEnableStatus'), ('IEEE8021-MIRP-MIB', 'ieee8021PbbMirpBvid'), ('IEEE8021-MIRP-MIB', 'ieee8021PbbMirpDestSelector'), ('IEEE8021-MIRP-MIB', 'ieee8021PbbMirpPnpEnable'), ('IEEE8021-MIRP-MIB', 'ieee8021PbbMirpPnpPortNumber')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ieee8021_mirp_reqd_group = ieee8021MirpReqdGroup.setStatus('current') if mibBuilder.loadTexts: ieee8021MirpReqdGroup.setDescription('Objects in the MIRP augmentation required group.') ieee8021_mirp_bridge_compliance = module_compliance((1, 3, 111, 2, 802, 1, 1, 23, 2, 1, 1)).setObjects(('SNMPv2-MIB', 'systemGroup'), ('IEEE8021-MIRP-MIB', 'ieee8021MirpReqdGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ieee8021_mirp_bridge_compliance = ieee8021MirpBridgeCompliance.setStatus('current') if mibBuilder.loadTexts: ieee8021MirpBridgeCompliance.setDescription('The compliance statement for support by a bridge of the IEEE8021-MIRP-MIB module.') mibBuilder.exportSymbols('IEEE8021-MIRP-MIB', ieee8021PbbMirpBvid=ieee8021PbbMirpBvid, ieee8021MirpMib=ieee8021MirpMib, ieee8021MirpPortEntry=ieee8021MirpPortEntry, ieee8021MirpGroups=ieee8021MirpGroups, ieee8021MirpMIBObjects=ieee8021MirpMIBObjects, ieee8021MirpBridgeCompliance=ieee8021MirpBridgeCompliance, ieee8021MirpReqdGroup=ieee8021MirpReqdGroup, ieee8021MirpCompliances=ieee8021MirpCompliances, ieee8021MirpPortEnabledStatus=ieee8021MirpPortEnabledStatus, PYSNMP_MODULE_ID=ieee8021MirpMib, ieee8021PbbMirpEnableStatus=ieee8021PbbMirpEnableStatus, ieee8021MirpConformance=ieee8021MirpConformance, ieee8021PbbMirpDestSelector=ieee8021PbbMirpDestSelector, ieee8021PbbMirpPnpPortNumber=ieee8021PbbMirpPnpPortNumber, ieee8021PbbMirpPnpEnable=ieee8021PbbMirpPnpEnable, ieee8021MirpPortTable=ieee8021MirpPortTable)
def comparison(start,end, path_to_file): file = open(path_to_file) for res in file: pred_start = int(res.split(" ")[1]) pred_end = int(res.split(" ")[2].split("\t")[0]) if not (pred_end < int(start) or pred_start > int(end)): return res.split("\t")[-1] return ''
def comparison(start, end, path_to_file): file = open(path_to_file) for res in file: pred_start = int(res.split(' ')[1]) pred_end = int(res.split(' ')[2].split('\t')[0]) if not (pred_end < int(start) or pred_start > int(end)): return res.split('\t')[-1] return ''
#!/usr/bin/env python3 class Key: def __init__(self, group_name=None, item_name=None, variable_name=None): self._group_name = group_name self._item_name = item_name self._variable_name = variable_name def group_name(self): return self._group_name def item_name(self): return self._item_name def variable_name(self): return self._variable_name def __str__(self): path = [self._group_name] if self._item_name is not None: path.append(self._item_name) if self._variable_name is not None: path.append(self._variable_name)
class Key: def __init__(self, group_name=None, item_name=None, variable_name=None): self._group_name = group_name self._item_name = item_name self._variable_name = variable_name def group_name(self): return self._group_name def item_name(self): return self._item_name def variable_name(self): return self._variable_name def __str__(self): path = [self._group_name] if self._item_name is not None: path.append(self._item_name) if self._variable_name is not None: path.append(self._variable_name)
X = X[:2000,:] labels = labels[:2000] score = pca_model.transform(X) with plt.xkcd(): visualize_components(score[:,0],score[:,1],labels) plt.show()
x = X[:2000, :] labels = labels[:2000] score = pca_model.transform(X) with plt.xkcd(): visualize_components(score[:, 0], score[:, 1], labels) plt.show()
{ 'targets': [{ 'target_name': 'shoco', 'type': 'static_library', 'sources': ['shoco/shoco.c'], 'cflags': [ '-std=c99', '-fexceptions', '-Wall', '-march=native', '-Ofast' ], 'xcode_settings': { 'OTHER_CFLAGS': [ '-std=c99', '-fexceptions', '-Wall', '-march=native', '-Ofast' ] }, 'msvs_settings': { 'VCCLCompilerTool': { 'ExceptionHandling': 1, 'DisableSpecificWarnings': ['4244'] } } }] }
{'targets': [{'target_name': 'shoco', 'type': 'static_library', 'sources': ['shoco/shoco.c'], 'cflags': ['-std=c99', '-fexceptions', '-Wall', '-march=native', '-Ofast'], 'xcode_settings': {'OTHER_CFLAGS': ['-std=c99', '-fexceptions', '-Wall', '-march=native', '-Ofast']}, 'msvs_settings': {'VCCLCompilerTool': {'ExceptionHandling': 1, 'DisableSpecificWarnings': ['4244']}}}]}
# =========================================================================== # scores.py --------------------------------------------------------------- # =========================================================================== # class ------------------------------------------------------------------- # --------------------------------------------------------------------------- class Scores(): # method -------------------------------------------------------------- # ----------------------------------------------------------------------- def __init__( self, number=1, logger=None ): self._len = number self._logger = logger # method -------------------------------------------------------------- # ----------------------------------------------------------------------- def __len__(self): return self._len # method -------------------------------------------------------------- # ----------------------------------------------------------------------- def __iter__(self): self._index = -1 return self # method -------------------------------------------------------------- # ----------------------------------------------------------------------- def __next__(self): if self._index < self._len-1: self._index += 1 return self else: raise StopIteration # method -------------------------------------------------------------- # ----------------------------------------------------------------------- def __repr__(self): pass # method -------------------------------------------------------------- # ----------------------------------------------------------------------- def logger(self, log_str): if self._logger is not None: self._logger.info(log_str) return log_str
class Scores: def __init__(self, number=1, logger=None): self._len = number self._logger = logger def __len__(self): return self._len def __iter__(self): self._index = -1 return self def __next__(self): if self._index < self._len - 1: self._index += 1 return self else: raise StopIteration def __repr__(self): pass def logger(self, log_str): if self._logger is not None: self._logger.info(log_str) return log_str
def get_disc_loss(gen, disc, criterion, real, num_images, z_dim, device): ''' Return the loss of the discriminator given inputs. Parameters: gen: the generator model, which returns an image given z-dimensional noise disc: the discriminator model, which returns a single-dimensional prediction of real/fake criterion: the loss function, which should be used to compare the discriminator's predictions to the ground truth reality of the images (e.g. fake = 0, real = 1) real: a batch of real images num_images: the number of images the generator should produce, which is also the length of the real images z_dim: the dimension of the noise vector, a scalar device: the device type Returns: disc_loss: a torch scalar loss value for the current batch ''' noise_vectors = get_noise(num_images, z_dim, device) gen_out = gen(noise_vectors) disc_output_fake = disc(gen_out.detach()) loss_fake = criterion(disc_output_fake,torch.zeros_like(disc_output_fake)) disc_output_real = disc(real) loss_real = criterion(disc_output_real,torch.ones_like(disc_output_real)) disc_loss = (loss_fake+loss_real)/2 return disc_loss
def get_disc_loss(gen, disc, criterion, real, num_images, z_dim, device): """ Return the loss of the discriminator given inputs. Parameters: gen: the generator model, which returns an image given z-dimensional noise disc: the discriminator model, which returns a single-dimensional prediction of real/fake criterion: the loss function, which should be used to compare the discriminator's predictions to the ground truth reality of the images (e.g. fake = 0, real = 1) real: a batch of real images num_images: the number of images the generator should produce, which is also the length of the real images z_dim: the dimension of the noise vector, a scalar device: the device type Returns: disc_loss: a torch scalar loss value for the current batch """ noise_vectors = get_noise(num_images, z_dim, device) gen_out = gen(noise_vectors) disc_output_fake = disc(gen_out.detach()) loss_fake = criterion(disc_output_fake, torch.zeros_like(disc_output_fake)) disc_output_real = disc(real) loss_real = criterion(disc_output_real, torch.ones_like(disc_output_real)) disc_loss = (loss_fake + loss_real) / 2 return disc_loss
load("//bazel:common.bzl", "get_env_bool_value") _IS_PLATFORM_ALIBABA = "IS_PLATFORM_ALIBABA" def _blade_service_common_impl(repository_ctx): if get_env_bool_value(repository_ctx, _IS_PLATFORM_ALIBABA): repository_ctx.template("blade_service_common_workspace.bzl", Label("//bazel/blade_service_common:blade_service_common_workspace.bzl.tpl"), { }) else: repository_ctx.template("blade_service_common_workspace.bzl", Label("//bazel/blade_service_common:blade_service_common_empty_workspace.bzl.tpl"), { }) repository_ctx.template("BUILD", Label("//bazel/blade_service_common:BUILD.tpl"), { }) blade_service_common_configure = repository_rule( implementation = _blade_service_common_impl, environ = [ _IS_PLATFORM_ALIBABA, ], )
load('//bazel:common.bzl', 'get_env_bool_value') _is_platform_alibaba = 'IS_PLATFORM_ALIBABA' def _blade_service_common_impl(repository_ctx): if get_env_bool_value(repository_ctx, _IS_PLATFORM_ALIBABA): repository_ctx.template('blade_service_common_workspace.bzl', label('//bazel/blade_service_common:blade_service_common_workspace.bzl.tpl'), {}) else: repository_ctx.template('blade_service_common_workspace.bzl', label('//bazel/blade_service_common:blade_service_common_empty_workspace.bzl.tpl'), {}) repository_ctx.template('BUILD', label('//bazel/blade_service_common:BUILD.tpl'), {}) blade_service_common_configure = repository_rule(implementation=_blade_service_common_impl, environ=[_IS_PLATFORM_ALIBABA])
def defuzz(fset, type): # check for input type if not isinstance(fset, dict): raise TypeError("First input argument should be a dictionary.") # check input dictionary length if len(list(fset.keys())) < 1: raise ValueError("dictionary should have at least one member.") for key, value in fset.items(): if not isinstance(key, int) and not isinstance(value, float): raise TypeError("key :" + str(key) + " in dictionary should be a float or integer.") if not isinstance(value, int) and not isinstance(value, float): raise TypeError("value" + str(value) + " in dictionary should be a float or integer.") if value > 1 or value < 0: raise ValueError("value:" + str(value) + " should be between 0 or 1.") if not isinstance(type, str): raise TypeError("Second input argument should be a String.") if type.lower() == "centroid": # finding centroid: sum_moment_area = 0.0 sum_area = 0.0 k = list(fset.keys()) k.sort() # If the membership function is a singleton fuzzy set: if len(fset) == 1: return k[0] * fset[k[0]] / fset[k[0]] # else return the sum of moment*area/sum of area for i in range(1, len(k)): x1 = k[i - 1] x2 = k[i] y1 = fset[k[i - 1]] y2 = fset[k[i]] # if y1 == y2 == 0.0 or x1==x2: --> rectangle of zero height or width if not (y1 == y2 == 0.0 or x1 == x2): if y1 == y2: # rectangle moment = 0.5 * (x1 + x2) area = (x2 - x1) * y1 elif y1 == 0.0 and y2 != 0.0: # triangle, height y2 moment = 2.0 / 3.0 * (x2 - x1) + x1 area = 0.5 * (x2 - x1) * y2 elif y2 == 0.0 and y1 != 0.0: # triangle, height y1 moment = 1.0 / 3.0 * (x2 - x1) + x1 area = 0.5 * (x2 - x1) * y1 else: moment = (2.0 / 3.0 * (x2 - x1) * (y2 + 0.5 * y1)) / (y1 + y2) + x1 area = 0.5 * (x2 - x1) * (y1 + y2) sum_moment_area += moment * area sum_area += area return sum_moment_area / sum_area elif type.lower() == "mom": # finding mom: items = [k for k, v in fset.items() if v == max(fset.values())] return sum(items)/len(items) elif type.lower() == "som": # finding som: min_item, max_value = sorted(fset.items())[0] for item, value in sorted(fset.items()): if value > max_value: max_value = value min_item = item return min_item elif type.lower() == "lom": # finding lom: largest_item, largest_value = sorted(fset.items())[0] for item, value in sorted(fset.items()): if value >= largest_value: largest_value = value largest_item = item return largest_item else: raise ValueError("defuzzification type is unknown.")
def defuzz(fset, type): if not isinstance(fset, dict): raise type_error('First input argument should be a dictionary.') if len(list(fset.keys())) < 1: raise value_error('dictionary should have at least one member.') for (key, value) in fset.items(): if not isinstance(key, int) and (not isinstance(value, float)): raise type_error('key :' + str(key) + ' in dictionary should be a float or integer.') if not isinstance(value, int) and (not isinstance(value, float)): raise type_error('value' + str(value) + ' in dictionary should be a float or integer.') if value > 1 or value < 0: raise value_error('value:' + str(value) + ' should be between 0 or 1.') if not isinstance(type, str): raise type_error('Second input argument should be a String.') if type.lower() == 'centroid': sum_moment_area = 0.0 sum_area = 0.0 k = list(fset.keys()) k.sort() if len(fset) == 1: return k[0] * fset[k[0]] / fset[k[0]] for i in range(1, len(k)): x1 = k[i - 1] x2 = k[i] y1 = fset[k[i - 1]] y2 = fset[k[i]] if not (y1 == y2 == 0.0 or x1 == x2): if y1 == y2: moment = 0.5 * (x1 + x2) area = (x2 - x1) * y1 elif y1 == 0.0 and y2 != 0.0: moment = 2.0 / 3.0 * (x2 - x1) + x1 area = 0.5 * (x2 - x1) * y2 elif y2 == 0.0 and y1 != 0.0: moment = 1.0 / 3.0 * (x2 - x1) + x1 area = 0.5 * (x2 - x1) * y1 else: moment = 2.0 / 3.0 * (x2 - x1) * (y2 + 0.5 * y1) / (y1 + y2) + x1 area = 0.5 * (x2 - x1) * (y1 + y2) sum_moment_area += moment * area sum_area += area return sum_moment_area / sum_area elif type.lower() == 'mom': items = [k for (k, v) in fset.items() if v == max(fset.values())] return sum(items) / len(items) elif type.lower() == 'som': (min_item, max_value) = sorted(fset.items())[0] for (item, value) in sorted(fset.items()): if value > max_value: max_value = value min_item = item return min_item elif type.lower() == 'lom': (largest_item, largest_value) = sorted(fset.items())[0] for (item, value) in sorted(fset.items()): if value >= largest_value: largest_value = value largest_item = item return largest_item else: raise value_error('defuzzification type is unknown.')
freq=int(input()) list1=[] list2=[] for i in range(0,freq): row=[] fn=input().split() fn=[int(i) for i in fn] for e in fn: row.append(e) #[row.append(e) for e in fn] list1.append(row) for row in list1: for i in range(0,freq): list2.append(list1[0][i]) #for e in row: for row in list1: print(row) print(list2)
freq = int(input()) list1 = [] list2 = [] for i in range(0, freq): row = [] fn = input().split() fn = [int(i) for i in fn] for e in fn: row.append(e) list1.append(row) for row in list1: for i in range(0, freq): list2.append(list1[0][i]) for row in list1: print(row) print(list2)
# The code below almost works name = input("Enter your name") print("Hello", name)
name = input('Enter your name') print('Hello', name)
#!/usr/bin/env python3 class FilterModule(object): # my_vars: "{{ dom_dt.data.sub_domains | json_select('', ['ip','domain','phpversion','customlog','phpopenbasedirprotect']) }}" # my_vars: "{{ dom_dt | json_select(['data','sub_domains'], ['ip','domain','phpversion','customlog','phpopenbasedirprotect']) }}" # my_vars: "{{ dom_dt.data | json_select(['sub_domains',0], ['ip','domain','phpversion','customlog','phpopenbasedirprotect']) }}" # my_vars: "{{ dom_dt.data.sub_domains | json_select(0, ['ip','domain','phpversion','customlog','phpopenbasedirprotect']) }}" # def filters(self): return { 'json_select': self.json_select } def jmagik(self, jbody, jpth, jfil): countr = 0 countr1 = True if jpth != "" and type(jpth) is not int: jvar=jbody for i in jpth: jvar=jvar[i] elif type(jpth) is int: jvar=jbody[jpth] else: jvar=jbody if type(jvar) is not list: # we must convert dict to list because without it, we geting ['','','','',''.........,''] but we need [{'','','',...,''}] jvar = [jvar] countr1 = False for nm in range(len(jvar)): # chek how levels exist if it's [{'.......'},....{'......'}] for i in list((jvar[nm])): # convert jvar[nm] because it's dict(we need list) and iterate countr = 0 for j in jfil: if j != i: countr +=1 if(countr == len(jfil)): jvar[nm].pop(i) if countr1 == False: jvar=jvar[0] return jvar def json_select(self, jbody, jpth, jfil): if(jpth != "" and type(jpth) is not int ): jbody[str(jpth)] = self.jmagik(jbody, jpth, jfil) del jbody[str(jpth)] elif(type(jpth) is int): jbody[jpth] = self.jmagik(jbody, jpth, jfil) else: jbody = self.jmagik(jbody, jpth, jfil) return jbody
class Filtermodule(object): def filters(self): return {'json_select': self.json_select} def jmagik(self, jbody, jpth, jfil): countr = 0 countr1 = True if jpth != '' and type(jpth) is not int: jvar = jbody for i in jpth: jvar = jvar[i] elif type(jpth) is int: jvar = jbody[jpth] else: jvar = jbody if type(jvar) is not list: jvar = [jvar] countr1 = False for nm in range(len(jvar)): for i in list(jvar[nm]): countr = 0 for j in jfil: if j != i: countr += 1 if countr == len(jfil): jvar[nm].pop(i) if countr1 == False: jvar = jvar[0] return jvar def json_select(self, jbody, jpth, jfil): if jpth != '' and type(jpth) is not int: jbody[str(jpth)] = self.jmagik(jbody, jpth, jfil) del jbody[str(jpth)] elif type(jpth) is int: jbody[jpth] = self.jmagik(jbody, jpth, jfil) else: jbody = self.jmagik(jbody, jpth, jfil) return jbody
a = float(input()) b = float(input()) c = float(input()) d = float(input()) a = a*2 b = b*3 c = c*4 e = (a+b+c+d)/10 print("Media: %.1f"%e) if (e >= 7): print("Aluno aprovado.") elif(e < 5): print("Aluno reprovado.") else: print("Aluno em exame.") f = float(input()) print("Nota do exame: %.1f"%f) f = (e+f)/2 if (f >= 5): print("Aluno aprovado.") print("Media final: %.1f"%f) else: print("Aluno reprovado.") print("Media final: %.1f"%f)
a = float(input()) b = float(input()) c = float(input()) d = float(input()) a = a * 2 b = b * 3 c = c * 4 e = (a + b + c + d) / 10 print('Media: %.1f' % e) if e >= 7: print('Aluno aprovado.') elif e < 5: print('Aluno reprovado.') else: print('Aluno em exame.') f = float(input()) print('Nota do exame: %.1f' % f) f = (e + f) / 2 if f >= 5: print('Aluno aprovado.') print('Media final: %.1f' % f) else: print('Aluno reprovado.') print('Media final: %.1f' % f)
x=('zero','one','two','three','four','five','six','seven','eight','nine','ten','eleven','twelve','thirteen','fourteen','fifteen','sixteen','seventeen','eighteen','nineteen') y=('twenty','thirty','fourty','fifty','sixty','seventy','eighty','ninety','hundred','thousand') ins=["one","hundred","fourty","nine"] d=t=h=T=1 ans=0 for i in ins[::-1]: if d: ans+=x.index(i);d=0 print(i) print(ans)
x = ('zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten', 'eleven', 'twelve', 'thirteen', 'fourteen', 'fifteen', 'sixteen', 'seventeen', 'eighteen', 'nineteen') y = ('twenty', 'thirty', 'fourty', 'fifty', 'sixty', 'seventy', 'eighty', 'ninety', 'hundred', 'thousand') ins = ['one', 'hundred', 'fourty', 'nine'] d = t = h = t = 1 ans = 0 for i in ins[::-1]: if d: ans += x.index(i) d = 0 print(i) print(ans)
# Michael Williamson # NATO Phonetic/Morse Code Translator # 7/29/2020 MORSE_CODE_DICT = { 'A':'.-', 'B':'-...', 'C':'-.-.', 'D':'-..', 'E':'.', 'F':'..-.', 'G':'--.', 'H':'....', 'I':'..', 'J':'.---', 'K':'-.-', 'L':'.-..', 'M':'--', 'N':'-.', 'O':'---', 'P':'.--.', 'Q':'--.-', 'R':'.-.', 'S':'...', 'T':'-', 'U':'..-', 'V':'...-', 'W':'.--', 'X':'-..-', 'Y':'-.--', 'Z':'--..'} NATO_PHONETIC_DICT = { 'A':'Alpha', 'B':'Bravo', 'C':'Charlie', 'D':'Delta', 'E':'Echo', 'F':'Foxtrot', 'G':'Golf', 'H':'Hotel', 'I':'India', 'J':'Juliet', 'K':'Kilo', 'L':'Lima', 'M':'Mike', 'N':'November', 'O':'Oscar', 'P':'Papa', 'Q':'Quebec', 'R':'Romeo', 'S':'Sierra', 'T':'Tango', 'U':'Uniform', 'V':'Victor', 'W':'Whiskey', 'X':'Xray', 'Y':'Yankee', 'Z':'Zulu'} sentence = input("What phrase would you like to convert to NATO Phonetic/Morse Code or decrypt (Only alphabet)? ") sentence = sentence.upper() sentence = sentence.replace(" ", "") nato = "" morse = "" for i in sentence: nato = nato + NATO_PHONETIC_DICT[i] + " " morse = morse + MORSE_CODE_DICT[i] + " " print("Nato Phonetic: " + nato) print("Morse Code: " + morse)
morse_code_dict = {'A': '.-', 'B': '-...', 'C': '-.-.', 'D': '-..', 'E': '.', 'F': '..-.', 'G': '--.', 'H': '....', 'I': '..', 'J': '.---', 'K': '-.-', 'L': '.-..', 'M': '--', 'N': '-.', 'O': '---', 'P': '.--.', 'Q': '--.-', 'R': '.-.', 'S': '...', 'T': '-', 'U': '..-', 'V': '...-', 'W': '.--', 'X': '-..-', 'Y': '-.--', 'Z': '--..'} nato_phonetic_dict = {'A': 'Alpha', 'B': 'Bravo', 'C': 'Charlie', 'D': 'Delta', 'E': 'Echo', 'F': 'Foxtrot', 'G': 'Golf', 'H': 'Hotel', 'I': 'India', 'J': 'Juliet', 'K': 'Kilo', 'L': 'Lima', 'M': 'Mike', 'N': 'November', 'O': 'Oscar', 'P': 'Papa', 'Q': 'Quebec', 'R': 'Romeo', 'S': 'Sierra', 'T': 'Tango', 'U': 'Uniform', 'V': 'Victor', 'W': 'Whiskey', 'X': 'Xray', 'Y': 'Yankee', 'Z': 'Zulu'} sentence = input('What phrase would you like to convert to NATO Phonetic/Morse Code or decrypt (Only alphabet)? ') sentence = sentence.upper() sentence = sentence.replace(' ', '') nato = '' morse = '' for i in sentence: nato = nato + NATO_PHONETIC_DICT[i] + ' ' morse = morse + MORSE_CODE_DICT[i] + ' ' print('Nato Phonetic: ' + nato) print('Morse Code: ' + morse)
def test_lowercase_spell(client): assert "Fireball" in client.post('/spellbook', data=dict(text="fireball", team_id='test-team-id', token='test-token', user_id='asdf')).get_json()['text'] def test_uppercase_spell(client): assert "Fireball" in client.post('/spellbook', data=dict(text="FIREBALL", team_id='test-team-id', token='test-token', user_id='asdf')).get_json()['text'] def test_titlecase_spell(client): assert "Fireball" in client.post('/spellbook', data=dict(text="Fireball", team_id='test-team-id', token='test-token', user_id='asdf')).get_json()['text'] def test_apostrophe_spell(client): assert "Crusader's Mantle" in client.post('/spellbook', data=dict(text="Crusader's Mantle", team_id='test-team-id', token='test-token', user_id='asdf')).get_json()['text'] def test_blank(client): error_message = "You have to tell me what spell to look up for you. I'm not a mind flayer." assert error_message in client.post('/spellbook', data=dict(text="", team_id='test-team-id', token='test-token', user_id='asdf')).get_json()['text'] def test_bad_input(client): error_message = "No spell by that name found." assert error_message in client.post('/spellbook', data=dict(text="asdfasdfasdf", team_id='test-team-id', token='test-token', user_id='asdf')).get_json()['text'] def test_durations(client): nondetect_response = client.post('/spellbook', data=dict(text="Nondetection", team_id='test-team-id', token='test-token', user_id='asdf')).get_json()['text'] assert '*Duration:* 8 hours' in nondetect_response fireball_response = client.post('/spellbook', data=dict(text="Fireball", team_id='test-team-id', token='test-token', user_id='asdf')).get_json()['text'] assert '*Duration:* Instant' in fireball_response cloud_response = client.post('/spellbook', data=dict(text="Incendiary Cloud", team_id='test-team-id', token='test-token', user_id='asdf')).get_json()['text'] assert '*Duration:* 1 minute (concentration)' in cloud_response or '*Duration:* Concentration' in cloud_response imprisonment_response = client.post('/spellbook', data=dict(text="Imprisonment", team_id='test-team-id', token='test-token', user_id='asdf')).get_json()['text'] assert '*Duration:* Permanent' in imprisonment_response or '*Duration:* Until dispelled' in imprisonment_response def test_cantrip(client): assert "cantrip" in client.post('/spellbook', data=dict(text="Shocking Grasp", team_id='test-team-id', token='test-token', user_id='asdf')).get_json()['text'] def test_ritual(client): assert "ritual" in client.post('/spellbook', data=dict(text="Identify", team_id='test-team-id', token='test-token', user_id='asdf')).get_json()['text']
def test_lowercase_spell(client): assert 'Fireball' in client.post('/spellbook', data=dict(text='fireball', team_id='test-team-id', token='test-token', user_id='asdf')).get_json()['text'] def test_uppercase_spell(client): assert 'Fireball' in client.post('/spellbook', data=dict(text='FIREBALL', team_id='test-team-id', token='test-token', user_id='asdf')).get_json()['text'] def test_titlecase_spell(client): assert 'Fireball' in client.post('/spellbook', data=dict(text='Fireball', team_id='test-team-id', token='test-token', user_id='asdf')).get_json()['text'] def test_apostrophe_spell(client): assert "Crusader's Mantle" in client.post('/spellbook', data=dict(text="Crusader's Mantle", team_id='test-team-id', token='test-token', user_id='asdf')).get_json()['text'] def test_blank(client): error_message = "You have to tell me what spell to look up for you. I'm not a mind flayer." assert error_message in client.post('/spellbook', data=dict(text='', team_id='test-team-id', token='test-token', user_id='asdf')).get_json()['text'] def test_bad_input(client): error_message = 'No spell by that name found.' assert error_message in client.post('/spellbook', data=dict(text='asdfasdfasdf', team_id='test-team-id', token='test-token', user_id='asdf')).get_json()['text'] def test_durations(client): nondetect_response = client.post('/spellbook', data=dict(text='Nondetection', team_id='test-team-id', token='test-token', user_id='asdf')).get_json()['text'] assert '*Duration:* 8 hours' in nondetect_response fireball_response = client.post('/spellbook', data=dict(text='Fireball', team_id='test-team-id', token='test-token', user_id='asdf')).get_json()['text'] assert '*Duration:* Instant' in fireball_response cloud_response = client.post('/spellbook', data=dict(text='Incendiary Cloud', team_id='test-team-id', token='test-token', user_id='asdf')).get_json()['text'] assert '*Duration:* 1 minute (concentration)' in cloud_response or '*Duration:* Concentration' in cloud_response imprisonment_response = client.post('/spellbook', data=dict(text='Imprisonment', team_id='test-team-id', token='test-token', user_id='asdf')).get_json()['text'] assert '*Duration:* Permanent' in imprisonment_response or '*Duration:* Until dispelled' in imprisonment_response def test_cantrip(client): assert 'cantrip' in client.post('/spellbook', data=dict(text='Shocking Grasp', team_id='test-team-id', token='test-token', user_id='asdf')).get_json()['text'] def test_ritual(client): assert 'ritual' in client.post('/spellbook', data=dict(text='Identify', team_id='test-team-id', token='test-token', user_id='asdf')).get_json()['text']
x = 1 if x == 1: # indented four spaces print("x is ASDJASJDJAJSAJD JASJD ASJD JASJD JASDJ AJSDJ ASJD JASJD JASJD JASJD AJS DJASJD JASJD JASDJ AJSD JASJD JSADJ ASJD JASD AJSD JASJD JASD AJSDJ ASJD JA1.")
x = 1 if x == 1: print('x is ASDJASJDJAJSAJD JASJD ASJD JASJD JASDJ AJSDJ ASJD JASJD JASJD JASJD AJS DJASJD JASJD JASDJ AJSD JASJD JSADJ ASJD JASD AJSD JASJD JASD AJSDJ ASJD JA1.')
description = 'Laser Safety Shutter' prefix = '14IDB:B1Bi0' target = 0.0 command_value = 1.0 auto_open = 0.0 EPICS_enabled = True
description = 'Laser Safety Shutter' prefix = '14IDB:B1Bi0' target = 0.0 command_value = 1.0 auto_open = 0.0 epics_enabled = True
Matriz = [[0, 0, 0], [0, 0, 0], [0, 0, 0]] print('='*40) print('GERADOR DE MATRIZ') print('='*40) for i in range(0, 3): for j in range(0, 3): Matriz[i][j] = int(input(f'Insira um valor na linha {i}, coluna {j}: ')) print( '='*40) print('\n') print(f"{'A = ': ^17}") for i in range(0, 3): for j in range(0, 3): print(f'[{Matriz[i][j]: ^3}] ', end='') print('')
matriz = [[0, 0, 0], [0, 0, 0], [0, 0, 0]] print('=' * 40) print('GERADOR DE MATRIZ') print('=' * 40) for i in range(0, 3): for j in range(0, 3): Matriz[i][j] = int(input(f'Insira um valor na linha {i}, coluna {j}: ')) print('=' * 40) print('\n') print(f"{'A = ': ^17}") for i in range(0, 3): for j in range(0, 3): print(f'[{Matriz[i][j]: ^3}] ', end='') print('')
class ApiEndpoint(object): client = None parent = None def __init__(self, client, parent=None): self.client = client self.parent = parent
class Apiendpoint(object): client = None parent = None def __init__(self, client, parent=None): self.client = client self.parent = parent
''' This package serves two purposes: 1. Define the interface for different parser adapters to implement. 2. Implement the completion generation logic based on the defined interface. Other packages should subclass the supplied classes and implement the interface. '''
""" This package serves two purposes: 1. Define the interface for different parser adapters to implement. 2. Implement the completion generation logic based on the defined interface. Other packages should subclass the supplied classes and implement the interface. """
# @desc The 2nd character in a string is at index 1. def combine2(s1, s2): s3 = s1[1] s4 = s2[1] result = s3 + s4 return result def main(): print(combine2('Car', 'wash')) print(combine2(' Hello', ' world')) print(combine2('55', '88')) print(combine2('Snow', 'ball')) print(combine2('Rain', 'boots')) print(combine2('Reading', 'bat')) print(combine2('AA', 'HI')) print(combine2('Hi', 'there')) print(combine2(' ', ' ')) if __name__ == '__main__': main()
def combine2(s1, s2): s3 = s1[1] s4 = s2[1] result = s3 + s4 return result def main(): print(combine2('Car', 'wash')) print(combine2(' Hello', ' world')) print(combine2('55', '88')) print(combine2('Snow', 'ball')) print(combine2('Rain', 'boots')) print(combine2('Reading', 'bat')) print(combine2('AA', 'HI')) print(combine2('Hi', 'there')) print(combine2(' ', ' ')) if __name__ == '__main__': main()
class Node: def __init__(self, data): self.data = data self.next = None def create_circular_linked_list(): head = Node(1) node2 = Node(2) node3 = Node(3) node4 = Node(4) node5 = Node(5) head.next = node2 node2.next = node3 node3.next = node4 node4.next = node5 node5.next = node2 return head def check_loop(head): slow = head.next fast = slow.next while head: if slow == fast: print("Loop exists") return fast elif slow is None or fast is None: print("Loop does not exist") break else: slow = slow.next fast = fast.next.next def get_first_node_of_loop(start, mid): while start: if start == mid: print("The data of the first node of the loop is " + str(mid.data)) break else: start = start.next mid = mid.next head = create_circular_linked_list() a = check_loop(head) get_first_node_of_loop(head, a)
class Node: def __init__(self, data): self.data = data self.next = None def create_circular_linked_list(): head = node(1) node2 = node(2) node3 = node(3) node4 = node(4) node5 = node(5) head.next = node2 node2.next = node3 node3.next = node4 node4.next = node5 node5.next = node2 return head def check_loop(head): slow = head.next fast = slow.next while head: if slow == fast: print('Loop exists') return fast elif slow is None or fast is None: print('Loop does not exist') break else: slow = slow.next fast = fast.next.next def get_first_node_of_loop(start, mid): while start: if start == mid: print('The data of the first node of the loop is ' + str(mid.data)) break else: start = start.next mid = mid.next head = create_circular_linked_list() a = check_loop(head) get_first_node_of_loop(head, a)
# # PySNMP MIB module RADLAN-rlFft (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/RADLAN-rlFft # Produced by pysmi-0.3.4 at Mon Apr 29 20:42:31 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueSizeConstraint, SingleValueConstraint, ValueRangeConstraint, ConstraintsIntersection, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "SingleValueConstraint", "ValueRangeConstraint", "ConstraintsIntersection", "ConstraintsUnion") rnd, = mibBuilder.importSymbols("RADLAN-MIB", "rnd") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") iso, MibScalar, MibTable, MibTableRow, MibTableColumn, MibIdentifier, Counter32, TimeTicks, NotificationType, Bits, ObjectIdentity, Integer32, ModuleIdentity, Gauge32, Counter64, Unsigned32, IpAddress = mibBuilder.importSymbols("SNMPv2-SMI", "iso", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "MibIdentifier", "Counter32", "TimeTicks", "NotificationType", "Bits", "ObjectIdentity", "Integer32", "ModuleIdentity", "Gauge32", "Counter64", "Unsigned32", "IpAddress") TextualConvention, TruthValue, RowStatus, PhysAddress, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "TruthValue", "RowStatus", "PhysAddress", "DisplayString") class Percents(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(0, 100) class NetNumber(TextualConvention, OctetString): status = 'current' subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(4, 4) fixedLength = 4 rlFFT = ModuleIdentity((1, 3, 6, 1, 4, 1, 89, 47)) rlFFT.setRevisions(('2004-06-01 00:00',)) if mibBuilder.loadTexts: rlFFT.setLastUpdated('200406010000Z') if mibBuilder.loadTexts: rlFFT.setOrganization('') rlIpFFT = MibIdentifier((1, 3, 6, 1, 4, 1, 89, 47, 1)) rlIpFftMibVersion = MibScalar((1, 3, 6, 1, 4, 1, 89, 47, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftMibVersion.setStatus('current') rlIpMaxFftNumber = MibScalar((1, 3, 6, 1, 4, 1, 89, 47, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpMaxFftNumber.setStatus('current') rlIpFftDynamicSupported = MibScalar((1, 3, 6, 1, 4, 1, 89, 47, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("supported", 1), ("unsupported", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftDynamicSupported.setStatus('current') rlIpFftSubnetSupported = MibScalar((1, 3, 6, 1, 4, 1, 89, 47, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("supported", 1), ("unsupported", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftSubnetSupported.setStatus('current') rlIpFftUnknownAddrMsgUsed = MibScalar((1, 3, 6, 1, 4, 1, 89, 47, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("used", 1), ("unused", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftUnknownAddrMsgUsed.setStatus('current') rlIpFftAgingTimeSupported = MibScalar((1, 3, 6, 1, 4, 1, 89, 47, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("supported", 1), ("unsupported", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftAgingTimeSupported.setStatus('current') rlIpFftSrcAddrSupported = MibScalar((1, 3, 6, 1, 4, 1, 89, 47, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("supported", 1), ("unsupported", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftSrcAddrSupported.setStatus('current') rlIpFftAgingTimeout = MibScalar((1, 3, 6, 1, 4, 1, 89, 47, 1, 8), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlIpFftAgingTimeout.setStatus('current') rlIpFftRedBoundary = MibScalar((1, 3, 6, 1, 4, 1, 89, 47, 1, 9), Percents()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlIpFftRedBoundary.setStatus('current') rlIpFftYellowBoundary = MibScalar((1, 3, 6, 1, 4, 1, 89, 47, 1, 10), Percents()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlIpFftYellowBoundary.setStatus('current') rlIpFftNumTable = MibTable((1, 3, 6, 1, 4, 1, 89, 47, 1, 12), ) if mibBuilder.loadTexts: rlIpFftNumTable.setStatus('current') rlIpFftNumEntry = MibTableRow((1, 3, 6, 1, 4, 1, 89, 47, 1, 12, 1), ).setIndexNames((0, "RADLAN-rlFft", "rlIpFftNumIndex")) if mibBuilder.loadTexts: rlIpFftNumEntry.setStatus('current') rlIpFftNumIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 12, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftNumIndex.setStatus('current') rlIpFftNumStnRoutesNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 12, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftNumStnRoutesNumber.setStatus('current') rlIpFftNumSubRoutesNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 12, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftNumSubRoutesNumber.setStatus('current') rlIpFftStnTable = MibTable((1, 3, 6, 1, 4, 1, 89, 47, 1, 13), ) if mibBuilder.loadTexts: rlIpFftStnTable.setStatus('current') rlIpFftStnEntry = MibTableRow((1, 3, 6, 1, 4, 1, 89, 47, 1, 13, 1), ).setIndexNames((0, "RADLAN-rlFft", "rlIpFftStnIndex"), (0, "RADLAN-rlFft", "rlIpFftStnMrid"), (0, "RADLAN-rlFft", "rlIpFftStnDstIpAddress")) if mibBuilder.loadTexts: rlIpFftStnEntry.setStatus('current') rlIpFftStnIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 13, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftStnIndex.setStatus('current') rlIpFftStnMrid = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 13, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftStnMrid.setStatus('current') rlIpFftStnDstIpAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 13, 1, 3), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftStnDstIpAddress.setStatus('current') rlIpFftStnDstRouteIpMask = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 13, 1, 4), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftStnDstRouteIpMask.setStatus('current') rlIpFftStnDstIpAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 13, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("local", 1), ("remote", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftStnDstIpAddrType.setStatus('current') rlIpFftStnDstMacAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 13, 1, 6), PhysAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftStnDstMacAddress.setStatus('current') rlIpFftStnSrcMacAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 13, 1, 7), PhysAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftStnSrcMacAddress.setStatus('current') rlIpFftStnOutIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 13, 1, 8), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftStnOutIfIndex.setStatus('current') rlIpFftStnVid = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 13, 1, 9), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftStnVid.setStatus('current') rlIpFftStnTaggedMode = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 13, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("untagged", 1), ("tagged", 2), ("basedPortConfig", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftStnTaggedMode.setStatus('current') rlIpFftStnAge = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 13, 1, 11), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftStnAge.setStatus('current') rlIpFftSubTable = MibTable((1, 3, 6, 1, 4, 1, 89, 47, 1, 14), ) if mibBuilder.loadTexts: rlIpFftSubTable.setStatus('current') rlIpFftSubEntry = MibTableRow((1, 3, 6, 1, 4, 1, 89, 47, 1, 14, 1), ).setIndexNames((0, "RADLAN-rlFft", "rlIpFftSubMrid"), (0, "RADLAN-rlFft", "rlIpFftSubDstIpSubnet"), (0, "RADLAN-rlFft", "rlIpFftSubDstIpMask")) if mibBuilder.loadTexts: rlIpFftSubEntry.setStatus('current') rlIpFftSubMrid = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 14, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftSubMrid.setStatus('current') rlIpFftSubDstIpSubnet = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 14, 1, 2), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftSubDstIpSubnet.setStatus('current') rlIpFftSubDstIpMask = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 14, 1, 3), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftSubDstIpMask.setStatus('current') rlIpFftSubAge = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 14, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftSubAge.setStatus('current') rlIpFftSubNextHopSetRefCount = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 14, 1, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftSubNextHopSetRefCount.setStatus('current') rlIpFftSubNextHopCount = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 14, 1, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftSubNextHopCount.setStatus('current') rlIpFftSubNextHopIfindex1 = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 14, 1, 7), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftSubNextHopIfindex1.setStatus('current') rlIpFftSubNextHopIpAddr1 = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 14, 1, 8), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftSubNextHopIpAddr1.setStatus('current') rlIpFftSubNextHopIfindex2 = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 14, 1, 9), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftSubNextHopIfindex2.setStatus('current') rlIpFftSubNextHopIpAddr2 = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 14, 1, 10), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftSubNextHopIpAddr2.setStatus('current') rlIpFftSubNextHopIfindex3 = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 14, 1, 11), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftSubNextHopIfindex3.setStatus('current') rlIpFftSubNextHopIpAddr3 = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 14, 1, 12), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftSubNextHopIpAddr3.setStatus('current') rlIpFftSubNextHopIfindex4 = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 14, 1, 13), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftSubNextHopIfindex4.setStatus('current') rlIpFftSubNextHopIpAddr4 = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 14, 1, 14), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftSubNextHopIpAddr4.setStatus('current') rlIpFftSubNextHopIfindex5 = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 14, 1, 15), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftSubNextHopIfindex5.setStatus('current') rlIpFftSubNextHopIpAddr5 = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 14, 1, 16), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftSubNextHopIpAddr5.setStatus('current') rlIpFftSubNextHopIfindex6 = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 14, 1, 17), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftSubNextHopIfindex6.setStatus('current') rlIpFftSubNextHopIpAddr6 = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 14, 1, 18), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftSubNextHopIpAddr6.setStatus('current') rlIpFftSubNextHopIfindex7 = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 14, 1, 19), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftSubNextHopIfindex7.setStatus('current') rlIpFftSubNextHopIpAddr7 = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 14, 1, 20), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftSubNextHopIpAddr7.setStatus('current') rlIpFftSubNextHopIfindex8 = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 14, 1, 21), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftSubNextHopIfindex8.setStatus('current') rlIpFftSubNextHopIpAddr8 = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 14, 1, 22), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftSubNextHopIpAddr8.setStatus('current') rlIpFftCountersTable = MibTable((1, 3, 6, 1, 4, 1, 89, 47, 1, 15), ) if mibBuilder.loadTexts: rlIpFftCountersTable.setStatus('current') rlIpFftCountersEntry = MibTableRow((1, 3, 6, 1, 4, 1, 89, 47, 1, 15, 1), ).setIndexNames((0, "RADLAN-rlFft", "rlIpFftCountersIndex")) if mibBuilder.loadTexts: rlIpFftCountersEntry.setStatus('current') rlIpFftCountersIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 15, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftCountersIndex.setStatus('current') rlIpFftInReceives = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 15, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftInReceives.setStatus('current') rlIpFftForwDatagrams = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 15, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftForwDatagrams.setStatus('current') rlIpFftInDiscards = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 15, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftInDiscards.setStatus('current') rlIpFftNextHopTable = MibTable((1, 3, 6, 1, 4, 1, 89, 47, 1, 16), ) if mibBuilder.loadTexts: rlIpFftNextHopTable.setStatus('current') rlIpFftNextHopEntry = MibTableRow((1, 3, 6, 1, 4, 1, 89, 47, 1, 16, 1), ).setIndexNames((0, "RADLAN-rlFft", "rlIpFftNextHopifindex"), (0, "RADLAN-rlFft", "rlIpFftNextHopIpAddress")) if mibBuilder.loadTexts: rlIpFftNextHopEntry.setStatus('current') rlIpFftNextHopifindex = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 16, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftNextHopifindex.setStatus('current') rlIpFftNextHopIpAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 16, 1, 2), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftNextHopIpAddress.setStatus('current') rlIpFftNextHopValid = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 16, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("valid", 1), ("invalid", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftNextHopValid.setStatus('current') rlIpFftNextHopType = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 16, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("local", 1), ("remote", 2), ("reject", 3), ("drop", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftNextHopType.setStatus('current') rlIpFftNextHopReferenceCount = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 16, 1, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftNextHopReferenceCount.setStatus('current') rlIpFftNextHopNetAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 16, 1, 6), PhysAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftNextHopNetAddress.setStatus('current') rlIpFftNextHopVid = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 16, 1, 7), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftNextHopVid.setStatus('current') rlIpFftNextHopMacAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 16, 1, 8), PhysAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftNextHopMacAddress.setStatus('current') rlIpFftNextHopOutIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 16, 1, 9), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftNextHopOutIfIndex.setStatus('current') rlIpFftL2InfoTable = MibTable((1, 3, 6, 1, 4, 1, 89, 47, 1, 17), ) if mibBuilder.loadTexts: rlIpFftL2InfoTable.setStatus('current') rlIpFftL2InfoEntry = MibTableRow((1, 3, 6, 1, 4, 1, 89, 47, 1, 17, 1), ).setIndexNames((0, "RADLAN-rlFft", "rlIpFftL2InfoIfindex"), (0, "RADLAN-rlFft", "rlIpFftL2InfoDstMacAddress")) if mibBuilder.loadTexts: rlIpFftL2InfoEntry.setStatus('current') rlIpFftL2InfoIfindex = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 17, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftL2InfoIfindex.setStatus('current') rlIpFftL2InfoDstMacAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 17, 1, 2), PhysAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftL2InfoDstMacAddress.setStatus('current') rlIpFftL2InfoValid = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 17, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("valid", 1), ("invalid", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftL2InfoValid.setStatus('current') rlIpFftL2InfoType = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 17, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("other", 1), ("vlan", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftL2InfoType.setStatus('current') rlIpFftL2InfoReferenceCount = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 17, 1, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftL2InfoReferenceCount.setStatus('current') rlIpFftL2InfoVid = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 17, 1, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftL2InfoVid.setStatus('current') rlIpFftL2InfoSrcMacAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 17, 1, 7), PhysAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftL2InfoSrcMacAddress.setStatus('current') rlIpFftL2InfoOutIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 17, 1, 8), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftL2InfoOutIfIndex.setStatus('current') rlIpFftL2InfoTaggedMode = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 1, 17, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("untagged", 1), ("tagged", 2), ("basedPortConfig", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpFftL2InfoTaggedMode.setStatus('current') rlIpxFFT = MibIdentifier((1, 3, 6, 1, 4, 1, 89, 47, 2)) rlIpxFftMibVersion = MibScalar((1, 3, 6, 1, 4, 1, 89, 47, 2, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpxFftMibVersion.setStatus('current') rlIpxMaxFftNumber = MibScalar((1, 3, 6, 1, 4, 1, 89, 47, 2, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpxMaxFftNumber.setStatus('current') rlIpxFftDynamicSupported = MibScalar((1, 3, 6, 1, 4, 1, 89, 47, 2, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("supported", 1), ("unsupported", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpxFftDynamicSupported.setStatus('current') rlIpxFftNetworkSupported = MibScalar((1, 3, 6, 1, 4, 1, 89, 47, 2, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("supported", 1), ("unsupported", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpxFftNetworkSupported.setStatus('current') rlIpxFftUnknownAddrMsgUsed = MibScalar((1, 3, 6, 1, 4, 1, 89, 47, 2, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("used", 1), ("unused", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpxFftUnknownAddrMsgUsed.setStatus('current') rlIpxFftAgingTimeSupported = MibScalar((1, 3, 6, 1, 4, 1, 89, 47, 2, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("supported", 1), ("unsupported", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpxFftAgingTimeSupported.setStatus('current') rlIpxFftSrcAddrSupported = MibScalar((1, 3, 6, 1, 4, 1, 89, 47, 2, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("supported", 1), ("unsupported", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpxFftSrcAddrSupported.setStatus('current') rlIpxFftAgingTimeout = MibScalar((1, 3, 6, 1, 4, 1, 89, 47, 2, 8), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlIpxFftAgingTimeout.setStatus('current') rlIpxFftRedBoundary = MibScalar((1, 3, 6, 1, 4, 1, 89, 47, 2, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 100))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlIpxFftRedBoundary.setStatus('current') rlIpxFftYellowBoundary = MibScalar((1, 3, 6, 1, 4, 1, 89, 47, 2, 10), Percents()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlIpxFftYellowBoundary.setStatus('current') rlIpxFftNumTable = MibTable((1, 3, 6, 1, 4, 1, 89, 47, 2, 12), ) if mibBuilder.loadTexts: rlIpxFftNumTable.setStatus('current') rlIpxFftNumEntry = MibTableRow((1, 3, 6, 1, 4, 1, 89, 47, 2, 12, 1), ).setIndexNames((0, "RADLAN-rlFft", "rlIpxFftNumIndex")) if mibBuilder.loadTexts: rlIpxFftNumEntry.setStatus('current') rlIpxFftNumIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 2, 12, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpxFftNumIndex.setStatus('current') rlIpxFftNumStnRoutesNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 2, 12, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpxFftNumStnRoutesNumber.setStatus('current') rlIpxFftNumSubRoutesNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 2, 12, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpxFftNumSubRoutesNumber.setStatus('current') rlIpxFftStnTable = MibTable((1, 3, 6, 1, 4, 1, 89, 47, 2, 13), ) if mibBuilder.loadTexts: rlIpxFftStnTable.setStatus('current') rlIpxFftStnEntry = MibTableRow((1, 3, 6, 1, 4, 1, 89, 47, 2, 13, 1), ).setIndexNames((0, "RADLAN-rlFft", "rlIpxFftStnIndex"), (0, "RADLAN-rlFft", "rlIpxFftStnDstNetid"), (0, "RADLAN-rlFft", "rlIpxFftStnDstNode"), (0, "RADLAN-rlFft", "rlIpxFftStnSrcNetid"), (0, "RADLAN-rlFft", "rlIpxFftStnSrcNode")) if mibBuilder.loadTexts: rlIpxFftStnEntry.setStatus('current') rlIpxFftStnIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 2, 13, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpxFftStnIndex.setStatus('current') rlIpxFftStnDstNetid = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 2, 13, 1, 2), NetNumber()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpxFftStnDstNetid.setStatus('current') rlIpxFftStnDstNode = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 2, 13, 1, 3), PhysAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpxFftStnDstNode.setStatus('current') rlIpxFftStnSrcNetid = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 2, 13, 1, 4), NetNumber()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpxFftStnSrcNetid.setStatus('current') rlIpxFftStnSrcNode = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 2, 13, 1, 5), PhysAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpxFftStnSrcNode.setStatus('current') rlIpxFftStnDstIpxAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 2, 13, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("local", 1), ("remote", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpxFftStnDstIpxAddrType.setStatus('current') rlIpxFftStnEncapsulation = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 2, 13, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("novell", 1), ("ethernet", 2), ("llc", 3), ("snap", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpxFftStnEncapsulation.setStatus('current') rlIpxFftStnDstMacAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 2, 13, 1, 8), PhysAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpxFftStnDstMacAddress.setStatus('current') rlIpxFftStnSrcMacAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 2, 13, 1, 9), PhysAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpxFftStnSrcMacAddress.setStatus('current') rlIpxFftStnOutIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 2, 13, 1, 10), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpxFftStnOutIfIndex.setStatus('current') rlIpxFftStnTci = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 2, 13, 1, 11), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpxFftStnTci.setStatus('current') rlIpxFftStnFacsIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 2, 13, 1, 12), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpxFftStnFacsIndex.setStatus('current') rlIpxFftStnAge = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 2, 13, 1, 13), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpxFftStnAge.setStatus('current') rlIpxFftSubTable = MibTable((1, 3, 6, 1, 4, 1, 89, 47, 2, 14), ) if mibBuilder.loadTexts: rlIpxFftSubTable.setStatus('current') rlIpxFftSubEntry = MibTableRow((1, 3, 6, 1, 4, 1, 89, 47, 2, 14, 1), ).setIndexNames((0, "RADLAN-rlFft", "rlIpxFftSubIndex"), (0, "RADLAN-rlFft", "rlIpxFftSubDstNetid")) if mibBuilder.loadTexts: rlIpxFftSubEntry.setStatus('current') rlIpxFftSubIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 2, 14, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpxFftSubIndex.setStatus('current') rlIpxFftSubDstNetid = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 2, 14, 1, 2), NetNumber()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpxFftSubDstNetid.setStatus('current') rlIpxFftSubEncapsulation = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 2, 14, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("novell", 1), ("ethernet", 2), ("llc", 3), ("snap", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpxFftSubEncapsulation.setStatus('current') rlIpxFftSubDstMacAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 2, 14, 1, 4), PhysAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpxFftSubDstMacAddress.setStatus('current') rlIpxFftSubSrcMacAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 2, 14, 1, 5), PhysAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpxFftSubSrcMacAddress.setStatus('current') rlIpxFftSubOutIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 2, 14, 1, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpxFftSubOutIfIndex.setStatus('current') rlIpxFftSubTci = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 2, 14, 1, 7), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpxFftSubTci.setStatus('current') rlIpxFftSubFacsIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 2, 14, 1, 8), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpxFftSubFacsIndex.setStatus('current') rlIpxFftSubAge = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 2, 14, 1, 9), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpxFftSubAge.setStatus('current') rlIpxFftCountersTable = MibTable((1, 3, 6, 1, 4, 1, 89, 47, 2, 15), ) if mibBuilder.loadTexts: rlIpxFftCountersTable.setStatus('current') rlIpxFftCountersEntry = MibTableRow((1, 3, 6, 1, 4, 1, 89, 47, 2, 15, 1), ).setIndexNames((0, "RADLAN-rlFft", "rlIpxFftCountersIndex")) if mibBuilder.loadTexts: rlIpxFftCountersEntry.setStatus('current') rlIpxFftCountersIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 2, 15, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpxFftCountersIndex.setStatus('current') rlIpxFftInReceives = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 2, 15, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpxFftInReceives.setStatus('current') rlIpxFftForwDatagrams = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 2, 15, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpxFftForwDatagrams.setStatus('current') rlIpxFftInDiscards = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 2, 15, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpxFftInDiscards.setStatus('current') rlIpmFFT = MibIdentifier((1, 3, 6, 1, 4, 1, 89, 47, 3)) rlIpmFftMibVersion = MibScalar((1, 3, 6, 1, 4, 1, 89, 47, 3, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpmFftMibVersion.setStatus('current') rlIpmMaxFftNumber = MibScalar((1, 3, 6, 1, 4, 1, 89, 47, 3, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpmMaxFftNumber.setStatus('current') rlIpmFftDynamicSupported = MibScalar((1, 3, 6, 1, 4, 1, 89, 47, 3, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("supported", 1), ("unsupported", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpmFftDynamicSupported.setStatus('current') rlIpmFftUnknownAddrMsgUsed = MibScalar((1, 3, 6, 1, 4, 1, 89, 47, 3, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("used", 1), ("unused", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpmFftUnknownAddrMsgUsed.setStatus('current') rlIpmFftUserAgingTimeout = MibScalar((1, 3, 6, 1, 4, 1, 89, 47, 3, 5), Unsigned32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlIpmFftUserAgingTimeout.setStatus('current') rlIpmFftRouterAgingTimeout = MibScalar((1, 3, 6, 1, 4, 1, 89, 47, 3, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpmFftRouterAgingTimeout.setStatus('current') rlIpmFftNumTable = MibTable((1, 3, 6, 1, 4, 1, 89, 47, 3, 8), ) if mibBuilder.loadTexts: rlIpmFftNumTable.setStatus('current') rlIpmFftNumEntry = MibTableRow((1, 3, 6, 1, 4, 1, 89, 47, 3, 8, 1), ).setIndexNames((0, "RADLAN-rlFft", "rlIpmFftNumIndex")) if mibBuilder.loadTexts: rlIpmFftNumEntry.setStatus('current') rlIpmFftNumIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 3, 8, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpmFftNumIndex.setStatus('current') rlIpmFftNumRoutesNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 3, 8, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpmFftNumRoutesNumber.setStatus('current') rlIpmFftTable = MibTable((1, 3, 6, 1, 4, 1, 89, 47, 3, 9), ) if mibBuilder.loadTexts: rlIpmFftTable.setStatus('current') rlIpmFftEntry = MibTableRow((1, 3, 6, 1, 4, 1, 89, 47, 3, 9, 1), ).setIndexNames((0, "RADLAN-rlFft", "rlIpmFftIndex"), (0, "RADLAN-rlFft", "rlIpmFftSrcIpAddress"), (0, "RADLAN-rlFft", "rlIpmFftDstIpAddress")) if mibBuilder.loadTexts: rlIpmFftEntry.setStatus('current') rlIpmFftIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 3, 9, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpmFftIndex.setStatus('current') rlIpmFftSrcIpAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 3, 9, 1, 2), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpmFftSrcIpAddress.setStatus('current') rlIpmFftDstIpAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 3, 9, 1, 3), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpmFftDstIpAddress.setStatus('current') rlIpmFftSrcIpMask = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 3, 9, 1, 4), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpmFftSrcIpMask.setStatus('current') rlIpmFftInputIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 3, 9, 1, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpmFftInputIfIndex.setStatus('current') rlIpmFftInputVlanTag = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 3, 9, 1, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpmFftInputVlanTag.setStatus('current') rlIpmFftForwardAction = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 3, 9, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("forward", 1), ("discard", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpmFftForwardAction.setStatus('current') rlIpmFftInportAction = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 3, 9, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("sentToCPU", 1), ("discard", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpmFftInportAction.setStatus('current') rlIpmFftAge = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 3, 9, 1, 9), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpmFftAge.setStatus('current') rlIpmFftPortTagTable = MibTable((1, 3, 6, 1, 4, 1, 89, 47, 3, 10), ) if mibBuilder.loadTexts: rlIpmFftPortTagTable.setStatus('current') rlIpmFftPortTagEntry = MibTableRow((1, 3, 6, 1, 4, 1, 89, 47, 3, 10, 1), ).setIndexNames((0, "RADLAN-rlFft", "rlIpmFftPortIndex"), (0, "RADLAN-rlFft", "rlIpmFftPortSrcIpAddress"), (0, "RADLAN-rlFft", "rlIpmFftPortDstIpAddress"), (0, "RADLAN-rlFft", "rlIpmFftPortOutputifIndex"), (0, "RADLAN-rlFft", "rlIpmFftPortOutputTag")) if mibBuilder.loadTexts: rlIpmFftPortTagEntry.setStatus('current') rlIpmFftPortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 3, 10, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpmFftPortIndex.setStatus('current') rlIpmFftPortSrcIpAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 3, 10, 1, 2), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpmFftPortSrcIpAddress.setStatus('current') rlIpmFftPortDstIpAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 3, 10, 1, 3), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpmFftPortDstIpAddress.setStatus('current') rlIpmFftPortOutputifIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 3, 10, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpmFftPortOutputifIndex.setStatus('current') rlIpmFftPortOutputTag = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 3, 10, 1, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpmFftPortOutputTag.setStatus('current') rlIpmFftCountersTable = MibTable((1, 3, 6, 1, 4, 1, 89, 47, 3, 11), ) if mibBuilder.loadTexts: rlIpmFftCountersTable.setStatus('current') rlIpmFftCountersEntry = MibTableRow((1, 3, 6, 1, 4, 1, 89, 47, 3, 11, 1), ).setIndexNames((0, "RADLAN-rlFft", "rlIpmFftCountersIndex")) if mibBuilder.loadTexts: rlIpmFftCountersEntry.setStatus('current') rlIpmFftCountersIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 3, 11, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpmFftCountersIndex.setStatus('current') rlIpmFftInReceives = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 3, 11, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpmFftInReceives.setStatus('current') rlIpmFftForwDatagrams = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 3, 11, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpmFftForwDatagrams.setStatus('current') rlIpmFftInDiscards = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 47, 3, 11, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpmFftInDiscards.setStatus('current') mibBuilder.exportSymbols("RADLAN-rlFft", rlIpxFftStnDstNode=rlIpxFftStnDstNode, rlIpmFftSrcIpMask=rlIpmFftSrcIpMask, rlIpFftSubNextHopIpAddr5=rlIpFftSubNextHopIpAddr5, rlIpFftNextHopVid=rlIpFftNextHopVid, rlIpxFftNumIndex=rlIpxFftNumIndex, rlIpmFftIndex=rlIpmFftIndex, rlIpmFftRouterAgingTimeout=rlIpmFftRouterAgingTimeout, rlIpmFftInReceives=rlIpmFftInReceives, rlIpFftSubTable=rlIpFftSubTable, rlIpFftL2InfoIfindex=rlIpFftL2InfoIfindex, rlIpmFftMibVersion=rlIpmFftMibVersion, rlIpmFftTable=rlIpmFftTable, rlIpxFftStnDstMacAddress=rlIpxFftStnDstMacAddress, rlIpxFftCountersTable=rlIpxFftCountersTable, rlIpFftYellowBoundary=rlIpFftYellowBoundary, rlIpmFftInDiscards=rlIpmFftInDiscards, rlIpxFftStnFacsIndex=rlIpxFftStnFacsIndex, rlIpmFftInportAction=rlIpmFftInportAction, rlIpFftSubEntry=rlIpFftSubEntry, rlIpFftSubNextHopIpAddr1=rlIpFftSubNextHopIpAddr1, rlIpFftL2InfoOutIfIndex=rlIpFftL2InfoOutIfIndex, rlIpFftNextHopEntry=rlIpFftNextHopEntry, rlIpFftStnDstIpAddrType=rlIpFftStnDstIpAddrType, rlIpMaxFftNumber=rlIpMaxFftNumber, rlIpxFftSubAge=rlIpxFftSubAge, rlIpxFftStnSrcMacAddress=rlIpxFftStnSrcMacAddress, rlIpmFftCountersTable=rlIpmFftCountersTable, rlIpFftCountersTable=rlIpFftCountersTable, rlIpFftAgingTimeSupported=rlIpFftAgingTimeSupported, rlIpxFftForwDatagrams=rlIpxFftForwDatagrams, rlIpxFftUnknownAddrMsgUsed=rlIpxFftUnknownAddrMsgUsed, rlIpmFFT=rlIpmFFT, rlIpFftForwDatagrams=rlIpFftForwDatagrams, rlIpmMaxFftNumber=rlIpmMaxFftNumber, rlIpmFftNumIndex=rlIpmFftNumIndex, rlIpFftStnTable=rlIpFftStnTable, rlIpFftNextHopMacAddress=rlIpFftNextHopMacAddress, rlIpmFftPortTagTable=rlIpmFftPortTagTable, rlIpxFftSubSrcMacAddress=rlIpxFftSubSrcMacAddress, rlIpmFftInputIfIndex=rlIpmFftInputIfIndex, rlIpmFftForwDatagrams=rlIpmFftForwDatagrams, rlIpFftStnIndex=rlIpFftStnIndex, rlFFT=rlFFT, rlIpFftNumEntry=rlIpFftNumEntry, rlIpFftL2InfoEntry=rlIpFftL2InfoEntry, rlIpFftSubNextHopIfindex4=rlIpFftSubNextHopIfindex4, rlIpxFftNumTable=rlIpxFftNumTable, rlIpFftRedBoundary=rlIpFftRedBoundary, rlIpxFftStnEntry=rlIpxFftStnEntry, rlIpmFftAge=rlIpmFftAge, rlIpmFftPortOutputifIndex=rlIpmFftPortOutputifIndex, rlIpFftSubNextHopIfindex1=rlIpFftSubNextHopIfindex1, rlIpxFftMibVersion=rlIpxFftMibVersion, rlIpFftSubNextHopIfindex7=rlIpFftSubNextHopIfindex7, rlIpxFftSubFacsIndex=rlIpxFftSubFacsIndex, rlIpmFftNumRoutesNumber=rlIpmFftNumRoutesNumber, rlIpxFftCountersIndex=rlIpxFftCountersIndex, rlIpFftNumStnRoutesNumber=rlIpFftNumStnRoutesNumber, rlIpFftSubNextHopIpAddr2=rlIpFftSubNextHopIpAddr2, rlIpFftSubNextHopIfindex2=rlIpFftSubNextHopIfindex2, rlIpFftNextHopValid=rlIpFftNextHopValid, rlIpxFftAgingTimeSupported=rlIpxFftAgingTimeSupported, rlIpmFftNumTable=rlIpmFftNumTable, NetNumber=NetNumber, rlIpFftL2InfoReferenceCount=rlIpFftL2InfoReferenceCount, rlIpxFftCountersEntry=rlIpxFftCountersEntry, rlIpFftStnDstMacAddress=rlIpFftStnDstMacAddress, rlIpFftNextHopTable=rlIpFftNextHopTable, rlIpFftL2InfoVid=rlIpFftL2InfoVid, rlIpmFftPortIndex=rlIpmFftPortIndex, rlIpFftL2InfoTable=rlIpFftL2InfoTable, rlIpFftSubNextHopIfindex6=rlIpFftSubNextHopIfindex6, rlIpxFftInDiscards=rlIpxFftInDiscards, rlIpFftCountersEntry=rlIpFftCountersEntry, rlIpFftStnTaggedMode=rlIpFftStnTaggedMode, rlIpmFftUserAgingTimeout=rlIpmFftUserAgingTimeout, rlIpFftStnSrcMacAddress=rlIpFftStnSrcMacAddress, rlIpFftSubNextHopIpAddr3=rlIpFftSubNextHopIpAddr3, rlIpmFftSrcIpAddress=rlIpmFftSrcIpAddress, rlIpFftSubNextHopIpAddr6=rlIpFftSubNextHopIpAddr6, rlIpxFftStnSrcNetid=rlIpxFftStnSrcNetid, rlIpFftNextHopifindex=rlIpFftNextHopifindex, rlIpxFftNumSubRoutesNumber=rlIpxFftNumSubRoutesNumber, rlIpxFftSubOutIfIndex=rlIpxFftSubOutIfIndex, rlIpFftSrcAddrSupported=rlIpFftSrcAddrSupported, rlIpFftSubnetSupported=rlIpFftSubnetSupported, rlIpxFftStnEncapsulation=rlIpxFftStnEncapsulation, rlIpxMaxFftNumber=rlIpxMaxFftNumber, rlIpxFftSubTci=rlIpxFftSubTci, rlIpmFftPortDstIpAddress=rlIpmFftPortDstIpAddress, rlIpFftStnEntry=rlIpFftStnEntry, rlIpxFftSubDstNetid=rlIpxFftSubDstNetid, rlIpFftInDiscards=rlIpFftInDiscards, rlIpFftNextHopOutIfIndex=rlIpFftNextHopOutIfIndex, rlIpxFftStnTci=rlIpxFftStnTci, rlIpmFftCountersIndex=rlIpmFftCountersIndex, rlIpFftAgingTimeout=rlIpFftAgingTimeout, rlIpFftStnAge=rlIpFftStnAge, rlIpFftL2InfoTaggedMode=rlIpFftL2InfoTaggedMode, rlIpxFFT=rlIpxFFT, rlIpFftUnknownAddrMsgUsed=rlIpFftUnknownAddrMsgUsed, rlIpFftSubNextHopCount=rlIpFftSubNextHopCount, rlIpFftSubNextHopIpAddr8=rlIpFftSubNextHopIpAddr8, rlIpFftSubMrid=rlIpFftSubMrid, rlIpFftInReceives=rlIpFftInReceives, rlIpmFftPortTagEntry=rlIpmFftPortTagEntry, rlIpFftL2InfoSrcMacAddress=rlIpFftL2InfoSrcMacAddress, rlIpFftStnDstIpAddress=rlIpFftStnDstIpAddress, rlIpmFftPortSrcIpAddress=rlIpmFftPortSrcIpAddress, rlIpFftStnOutIfIndex=rlIpFftStnOutIfIndex, rlIpFftSubAge=rlIpFftSubAge, rlIpxFftYellowBoundary=rlIpxFftYellowBoundary, rlIpxFftStnSrcNode=rlIpxFftStnSrcNode, rlIpxFftStnDstIpxAddrType=rlIpxFftStnDstIpxAddrType, rlIpFftNumSubRoutesNumber=rlIpFftNumSubRoutesNumber, rlIpFftSubNextHopSetRefCount=rlIpFftSubNextHopSetRefCount, rlIpxFftNumStnRoutesNumber=rlIpxFftNumStnRoutesNumber, rlIpxFftRedBoundary=rlIpxFftRedBoundary, rlIpFftDynamicSupported=rlIpFftDynamicSupported, rlIpFftNextHopIpAddress=rlIpFftNextHopIpAddress, rlIpmFftEntry=rlIpmFftEntry, rlIpxFftStnIndex=rlIpxFftStnIndex, rlIpxFftDynamicSupported=rlIpxFftDynamicSupported, rlIpmFftUnknownAddrMsgUsed=rlIpmFftUnknownAddrMsgUsed, rlIpFftStnDstRouteIpMask=rlIpFftStnDstRouteIpMask, rlIpFftNumIndex=rlIpFftNumIndex, rlIpFftCountersIndex=rlIpFftCountersIndex, rlIpmFftDstIpAddress=rlIpmFftDstIpAddress, rlIpFftNumTable=rlIpFftNumTable, rlIpFftSubNextHopIfindex5=rlIpFftSubNextHopIfindex5, rlIpxFftInReceives=rlIpxFftInReceives, rlIpFftL2InfoType=rlIpFftL2InfoType, rlIpFftL2InfoDstMacAddress=rlIpFftL2InfoDstMacAddress, rlIpFftSubNextHopIpAddr7=rlIpFftSubNextHopIpAddr7, rlIpxFftStnAge=rlIpxFftStnAge, rlIpFftMibVersion=rlIpFftMibVersion, rlIpFftSubDstIpMask=rlIpFftSubDstIpMask, rlIpxFftNumEntry=rlIpxFftNumEntry, rlIpFftNextHopReferenceCount=rlIpFftNextHopReferenceCount, rlIpxFftNetworkSupported=rlIpxFftNetworkSupported, rlIpxFftStnTable=rlIpxFftStnTable, rlIpFftNextHopType=rlIpFftNextHopType, rlIpmFftCountersEntry=rlIpmFftCountersEntry, rlIpmFftPortOutputTag=rlIpmFftPortOutputTag, rlIpmFftInputVlanTag=rlIpmFftInputVlanTag, rlIpFFT=rlIpFFT, rlIpxFftSubEncapsulation=rlIpxFftSubEncapsulation, rlIpFftSubNextHopIfindex3=rlIpFftSubNextHopIfindex3, rlIpxFftSubTable=rlIpxFftSubTable, rlIpFftL2InfoValid=rlIpFftL2InfoValid, rlIpmFftDynamicSupported=rlIpmFftDynamicSupported, rlIpxFftSubEntry=rlIpxFftSubEntry, rlIpxFftSubIndex=rlIpxFftSubIndex, Percents=Percents, rlIpFftStnMrid=rlIpFftStnMrid, rlIpFftSubNextHopIfindex8=rlIpFftSubNextHopIfindex8, rlIpxFftStnOutIfIndex=rlIpxFftStnOutIfIndex, rlIpmFftForwardAction=rlIpmFftForwardAction, rlIpFftSubNextHopIpAddr4=rlIpFftSubNextHopIpAddr4, rlIpxFftAgingTimeout=rlIpxFftAgingTimeout, rlIpxFftSrcAddrSupported=rlIpxFftSrcAddrSupported, PYSNMP_MODULE_ID=rlFFT, rlIpFftSubDstIpSubnet=rlIpFftSubDstIpSubnet, rlIpFftNextHopNetAddress=rlIpFftNextHopNetAddress, rlIpxFftSubDstMacAddress=rlIpxFftSubDstMacAddress, rlIpmFftNumEntry=rlIpmFftNumEntry, rlIpFftStnVid=rlIpFftStnVid, rlIpxFftStnDstNetid=rlIpxFftStnDstNetid)
(integer, octet_string, object_identifier) = mibBuilder.importSymbols('ASN1', 'Integer', 'OctetString', 'ObjectIdentifier') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (value_size_constraint, single_value_constraint, value_range_constraint, constraints_intersection, constraints_union) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueSizeConstraint', 'SingleValueConstraint', 'ValueRangeConstraint', 'ConstraintsIntersection', 'ConstraintsUnion') (rnd,) = mibBuilder.importSymbols('RADLAN-MIB', 'rnd') (notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance') (iso, mib_scalar, mib_table, mib_table_row, mib_table_column, mib_identifier, counter32, time_ticks, notification_type, bits, object_identity, integer32, module_identity, gauge32, counter64, unsigned32, ip_address) = mibBuilder.importSymbols('SNMPv2-SMI', 'iso', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'MibIdentifier', 'Counter32', 'TimeTicks', 'NotificationType', 'Bits', 'ObjectIdentity', 'Integer32', 'ModuleIdentity', 'Gauge32', 'Counter64', 'Unsigned32', 'IpAddress') (textual_convention, truth_value, row_status, phys_address, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'TruthValue', 'RowStatus', 'PhysAddress', 'DisplayString') class Percents(TextualConvention, Integer32): status = 'current' subtype_spec = Integer32.subtypeSpec + value_range_constraint(0, 100) class Netnumber(TextualConvention, OctetString): status = 'current' subtype_spec = OctetString.subtypeSpec + value_size_constraint(4, 4) fixed_length = 4 rl_fft = module_identity((1, 3, 6, 1, 4, 1, 89, 47)) rlFFT.setRevisions(('2004-06-01 00:00',)) if mibBuilder.loadTexts: rlFFT.setLastUpdated('200406010000Z') if mibBuilder.loadTexts: rlFFT.setOrganization('') rl_ip_fft = mib_identifier((1, 3, 6, 1, 4, 1, 89, 47, 1)) rl_ip_fft_mib_version = mib_scalar((1, 3, 6, 1, 4, 1, 89, 47, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftMibVersion.setStatus('current') rl_ip_max_fft_number = mib_scalar((1, 3, 6, 1, 4, 1, 89, 47, 1, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpMaxFftNumber.setStatus('current') rl_ip_fft_dynamic_supported = mib_scalar((1, 3, 6, 1, 4, 1, 89, 47, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('supported', 1), ('unsupported', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftDynamicSupported.setStatus('current') rl_ip_fft_subnet_supported = mib_scalar((1, 3, 6, 1, 4, 1, 89, 47, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('supported', 1), ('unsupported', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftSubnetSupported.setStatus('current') rl_ip_fft_unknown_addr_msg_used = mib_scalar((1, 3, 6, 1, 4, 1, 89, 47, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('used', 1), ('unused', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftUnknownAddrMsgUsed.setStatus('current') rl_ip_fft_aging_time_supported = mib_scalar((1, 3, 6, 1, 4, 1, 89, 47, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('supported', 1), ('unsupported', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftAgingTimeSupported.setStatus('current') rl_ip_fft_src_addr_supported = mib_scalar((1, 3, 6, 1, 4, 1, 89, 47, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('supported', 1), ('unsupported', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftSrcAddrSupported.setStatus('current') rl_ip_fft_aging_timeout = mib_scalar((1, 3, 6, 1, 4, 1, 89, 47, 1, 8), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlIpFftAgingTimeout.setStatus('current') rl_ip_fft_red_boundary = mib_scalar((1, 3, 6, 1, 4, 1, 89, 47, 1, 9), percents()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlIpFftRedBoundary.setStatus('current') rl_ip_fft_yellow_boundary = mib_scalar((1, 3, 6, 1, 4, 1, 89, 47, 1, 10), percents()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlIpFftYellowBoundary.setStatus('current') rl_ip_fft_num_table = mib_table((1, 3, 6, 1, 4, 1, 89, 47, 1, 12)) if mibBuilder.loadTexts: rlIpFftNumTable.setStatus('current') rl_ip_fft_num_entry = mib_table_row((1, 3, 6, 1, 4, 1, 89, 47, 1, 12, 1)).setIndexNames((0, 'RADLAN-rlFft', 'rlIpFftNumIndex')) if mibBuilder.loadTexts: rlIpFftNumEntry.setStatus('current') rl_ip_fft_num_index = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 12, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftNumIndex.setStatus('current') rl_ip_fft_num_stn_routes_number = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 12, 1, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftNumStnRoutesNumber.setStatus('current') rl_ip_fft_num_sub_routes_number = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 12, 1, 3), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftNumSubRoutesNumber.setStatus('current') rl_ip_fft_stn_table = mib_table((1, 3, 6, 1, 4, 1, 89, 47, 1, 13)) if mibBuilder.loadTexts: rlIpFftStnTable.setStatus('current') rl_ip_fft_stn_entry = mib_table_row((1, 3, 6, 1, 4, 1, 89, 47, 1, 13, 1)).setIndexNames((0, 'RADLAN-rlFft', 'rlIpFftStnIndex'), (0, 'RADLAN-rlFft', 'rlIpFftStnMrid'), (0, 'RADLAN-rlFft', 'rlIpFftStnDstIpAddress')) if mibBuilder.loadTexts: rlIpFftStnEntry.setStatus('current') rl_ip_fft_stn_index = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 13, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftStnIndex.setStatus('current') rl_ip_fft_stn_mrid = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 13, 1, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftStnMrid.setStatus('current') rl_ip_fft_stn_dst_ip_address = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 13, 1, 3), ip_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftStnDstIpAddress.setStatus('current') rl_ip_fft_stn_dst_route_ip_mask = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 13, 1, 4), ip_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftStnDstRouteIpMask.setStatus('current') rl_ip_fft_stn_dst_ip_addr_type = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 13, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('local', 1), ('remote', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftStnDstIpAddrType.setStatus('current') rl_ip_fft_stn_dst_mac_address = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 13, 1, 6), phys_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftStnDstMacAddress.setStatus('current') rl_ip_fft_stn_src_mac_address = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 13, 1, 7), phys_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftStnSrcMacAddress.setStatus('current') rl_ip_fft_stn_out_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 13, 1, 8), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftStnOutIfIndex.setStatus('current') rl_ip_fft_stn_vid = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 13, 1, 9), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftStnVid.setStatus('current') rl_ip_fft_stn_tagged_mode = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 13, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('untagged', 1), ('tagged', 2), ('basedPortConfig', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftStnTaggedMode.setStatus('current') rl_ip_fft_stn_age = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 13, 1, 11), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftStnAge.setStatus('current') rl_ip_fft_sub_table = mib_table((1, 3, 6, 1, 4, 1, 89, 47, 1, 14)) if mibBuilder.loadTexts: rlIpFftSubTable.setStatus('current') rl_ip_fft_sub_entry = mib_table_row((1, 3, 6, 1, 4, 1, 89, 47, 1, 14, 1)).setIndexNames((0, 'RADLAN-rlFft', 'rlIpFftSubMrid'), (0, 'RADLAN-rlFft', 'rlIpFftSubDstIpSubnet'), (0, 'RADLAN-rlFft', 'rlIpFftSubDstIpMask')) if mibBuilder.loadTexts: rlIpFftSubEntry.setStatus('current') rl_ip_fft_sub_mrid = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 14, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftSubMrid.setStatus('current') rl_ip_fft_sub_dst_ip_subnet = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 14, 1, 2), ip_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftSubDstIpSubnet.setStatus('current') rl_ip_fft_sub_dst_ip_mask = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 14, 1, 3), ip_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftSubDstIpMask.setStatus('current') rl_ip_fft_sub_age = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 14, 1, 4), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftSubAge.setStatus('current') rl_ip_fft_sub_next_hop_set_ref_count = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 14, 1, 5), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftSubNextHopSetRefCount.setStatus('current') rl_ip_fft_sub_next_hop_count = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 14, 1, 6), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftSubNextHopCount.setStatus('current') rl_ip_fft_sub_next_hop_ifindex1 = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 14, 1, 7), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftSubNextHopIfindex1.setStatus('current') rl_ip_fft_sub_next_hop_ip_addr1 = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 14, 1, 8), ip_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftSubNextHopIpAddr1.setStatus('current') rl_ip_fft_sub_next_hop_ifindex2 = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 14, 1, 9), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftSubNextHopIfindex2.setStatus('current') rl_ip_fft_sub_next_hop_ip_addr2 = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 14, 1, 10), ip_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftSubNextHopIpAddr2.setStatus('current') rl_ip_fft_sub_next_hop_ifindex3 = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 14, 1, 11), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftSubNextHopIfindex3.setStatus('current') rl_ip_fft_sub_next_hop_ip_addr3 = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 14, 1, 12), ip_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftSubNextHopIpAddr3.setStatus('current') rl_ip_fft_sub_next_hop_ifindex4 = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 14, 1, 13), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftSubNextHopIfindex4.setStatus('current') rl_ip_fft_sub_next_hop_ip_addr4 = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 14, 1, 14), ip_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftSubNextHopIpAddr4.setStatus('current') rl_ip_fft_sub_next_hop_ifindex5 = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 14, 1, 15), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftSubNextHopIfindex5.setStatus('current') rl_ip_fft_sub_next_hop_ip_addr5 = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 14, 1, 16), ip_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftSubNextHopIpAddr5.setStatus('current') rl_ip_fft_sub_next_hop_ifindex6 = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 14, 1, 17), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftSubNextHopIfindex6.setStatus('current') rl_ip_fft_sub_next_hop_ip_addr6 = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 14, 1, 18), ip_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftSubNextHopIpAddr6.setStatus('current') rl_ip_fft_sub_next_hop_ifindex7 = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 14, 1, 19), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftSubNextHopIfindex7.setStatus('current') rl_ip_fft_sub_next_hop_ip_addr7 = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 14, 1, 20), ip_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftSubNextHopIpAddr7.setStatus('current') rl_ip_fft_sub_next_hop_ifindex8 = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 14, 1, 21), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftSubNextHopIfindex8.setStatus('current') rl_ip_fft_sub_next_hop_ip_addr8 = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 14, 1, 22), ip_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftSubNextHopIpAddr8.setStatus('current') rl_ip_fft_counters_table = mib_table((1, 3, 6, 1, 4, 1, 89, 47, 1, 15)) if mibBuilder.loadTexts: rlIpFftCountersTable.setStatus('current') rl_ip_fft_counters_entry = mib_table_row((1, 3, 6, 1, 4, 1, 89, 47, 1, 15, 1)).setIndexNames((0, 'RADLAN-rlFft', 'rlIpFftCountersIndex')) if mibBuilder.loadTexts: rlIpFftCountersEntry.setStatus('current') rl_ip_fft_counters_index = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 15, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftCountersIndex.setStatus('current') rl_ip_fft_in_receives = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 15, 1, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftInReceives.setStatus('current') rl_ip_fft_forw_datagrams = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 15, 1, 3), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftForwDatagrams.setStatus('current') rl_ip_fft_in_discards = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 15, 1, 4), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftInDiscards.setStatus('current') rl_ip_fft_next_hop_table = mib_table((1, 3, 6, 1, 4, 1, 89, 47, 1, 16)) if mibBuilder.loadTexts: rlIpFftNextHopTable.setStatus('current') rl_ip_fft_next_hop_entry = mib_table_row((1, 3, 6, 1, 4, 1, 89, 47, 1, 16, 1)).setIndexNames((0, 'RADLAN-rlFft', 'rlIpFftNextHopifindex'), (0, 'RADLAN-rlFft', 'rlIpFftNextHopIpAddress')) if mibBuilder.loadTexts: rlIpFftNextHopEntry.setStatus('current') rl_ip_fft_next_hopifindex = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 16, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftNextHopifindex.setStatus('current') rl_ip_fft_next_hop_ip_address = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 16, 1, 2), ip_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftNextHopIpAddress.setStatus('current') rl_ip_fft_next_hop_valid = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 16, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('valid', 1), ('invalid', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftNextHopValid.setStatus('current') rl_ip_fft_next_hop_type = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 16, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('local', 1), ('remote', 2), ('reject', 3), ('drop', 4)))).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftNextHopType.setStatus('current') rl_ip_fft_next_hop_reference_count = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 16, 1, 5), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftNextHopReferenceCount.setStatus('current') rl_ip_fft_next_hop_net_address = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 16, 1, 6), phys_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftNextHopNetAddress.setStatus('current') rl_ip_fft_next_hop_vid = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 16, 1, 7), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftNextHopVid.setStatus('current') rl_ip_fft_next_hop_mac_address = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 16, 1, 8), phys_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftNextHopMacAddress.setStatus('current') rl_ip_fft_next_hop_out_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 16, 1, 9), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftNextHopOutIfIndex.setStatus('current') rl_ip_fft_l2_info_table = mib_table((1, 3, 6, 1, 4, 1, 89, 47, 1, 17)) if mibBuilder.loadTexts: rlIpFftL2InfoTable.setStatus('current') rl_ip_fft_l2_info_entry = mib_table_row((1, 3, 6, 1, 4, 1, 89, 47, 1, 17, 1)).setIndexNames((0, 'RADLAN-rlFft', 'rlIpFftL2InfoIfindex'), (0, 'RADLAN-rlFft', 'rlIpFftL2InfoDstMacAddress')) if mibBuilder.loadTexts: rlIpFftL2InfoEntry.setStatus('current') rl_ip_fft_l2_info_ifindex = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 17, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftL2InfoIfindex.setStatus('current') rl_ip_fft_l2_info_dst_mac_address = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 17, 1, 2), phys_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftL2InfoDstMacAddress.setStatus('current') rl_ip_fft_l2_info_valid = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 17, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('valid', 1), ('invalid', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftL2InfoValid.setStatus('current') rl_ip_fft_l2_info_type = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 17, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('other', 1), ('vlan', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftL2InfoType.setStatus('current') rl_ip_fft_l2_info_reference_count = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 17, 1, 5), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftL2InfoReferenceCount.setStatus('current') rl_ip_fft_l2_info_vid = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 17, 1, 6), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftL2InfoVid.setStatus('current') rl_ip_fft_l2_info_src_mac_address = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 17, 1, 7), phys_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftL2InfoSrcMacAddress.setStatus('current') rl_ip_fft_l2_info_out_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 17, 1, 8), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftL2InfoOutIfIndex.setStatus('current') rl_ip_fft_l2_info_tagged_mode = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 1, 17, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('untagged', 1), ('tagged', 2), ('basedPortConfig', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpFftL2InfoTaggedMode.setStatus('current') rl_ipx_fft = mib_identifier((1, 3, 6, 1, 4, 1, 89, 47, 2)) rl_ipx_fft_mib_version = mib_scalar((1, 3, 6, 1, 4, 1, 89, 47, 2, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpxFftMibVersion.setStatus('current') rl_ipx_max_fft_number = mib_scalar((1, 3, 6, 1, 4, 1, 89, 47, 2, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpxMaxFftNumber.setStatus('current') rl_ipx_fft_dynamic_supported = mib_scalar((1, 3, 6, 1, 4, 1, 89, 47, 2, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('supported', 1), ('unsupported', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpxFftDynamicSupported.setStatus('current') rl_ipx_fft_network_supported = mib_scalar((1, 3, 6, 1, 4, 1, 89, 47, 2, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('supported', 1), ('unsupported', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpxFftNetworkSupported.setStatus('current') rl_ipx_fft_unknown_addr_msg_used = mib_scalar((1, 3, 6, 1, 4, 1, 89, 47, 2, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('used', 1), ('unused', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpxFftUnknownAddrMsgUsed.setStatus('current') rl_ipx_fft_aging_time_supported = mib_scalar((1, 3, 6, 1, 4, 1, 89, 47, 2, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('supported', 1), ('unsupported', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpxFftAgingTimeSupported.setStatus('current') rl_ipx_fft_src_addr_supported = mib_scalar((1, 3, 6, 1, 4, 1, 89, 47, 2, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('supported', 1), ('unsupported', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpxFftSrcAddrSupported.setStatus('current') rl_ipx_fft_aging_timeout = mib_scalar((1, 3, 6, 1, 4, 1, 89, 47, 2, 8), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlIpxFftAgingTimeout.setStatus('current') rl_ipx_fft_red_boundary = mib_scalar((1, 3, 6, 1, 4, 1, 89, 47, 2, 9), integer32().subtype(subtypeSpec=value_range_constraint(1, 100))).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlIpxFftRedBoundary.setStatus('current') rl_ipx_fft_yellow_boundary = mib_scalar((1, 3, 6, 1, 4, 1, 89, 47, 2, 10), percents()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlIpxFftYellowBoundary.setStatus('current') rl_ipx_fft_num_table = mib_table((1, 3, 6, 1, 4, 1, 89, 47, 2, 12)) if mibBuilder.loadTexts: rlIpxFftNumTable.setStatus('current') rl_ipx_fft_num_entry = mib_table_row((1, 3, 6, 1, 4, 1, 89, 47, 2, 12, 1)).setIndexNames((0, 'RADLAN-rlFft', 'rlIpxFftNumIndex')) if mibBuilder.loadTexts: rlIpxFftNumEntry.setStatus('current') rl_ipx_fft_num_index = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 2, 12, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpxFftNumIndex.setStatus('current') rl_ipx_fft_num_stn_routes_number = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 2, 12, 1, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpxFftNumStnRoutesNumber.setStatus('current') rl_ipx_fft_num_sub_routes_number = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 2, 12, 1, 3), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpxFftNumSubRoutesNumber.setStatus('current') rl_ipx_fft_stn_table = mib_table((1, 3, 6, 1, 4, 1, 89, 47, 2, 13)) if mibBuilder.loadTexts: rlIpxFftStnTable.setStatus('current') rl_ipx_fft_stn_entry = mib_table_row((1, 3, 6, 1, 4, 1, 89, 47, 2, 13, 1)).setIndexNames((0, 'RADLAN-rlFft', 'rlIpxFftStnIndex'), (0, 'RADLAN-rlFft', 'rlIpxFftStnDstNetid'), (0, 'RADLAN-rlFft', 'rlIpxFftStnDstNode'), (0, 'RADLAN-rlFft', 'rlIpxFftStnSrcNetid'), (0, 'RADLAN-rlFft', 'rlIpxFftStnSrcNode')) if mibBuilder.loadTexts: rlIpxFftStnEntry.setStatus('current') rl_ipx_fft_stn_index = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 2, 13, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpxFftStnIndex.setStatus('current') rl_ipx_fft_stn_dst_netid = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 2, 13, 1, 2), net_number()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpxFftStnDstNetid.setStatus('current') rl_ipx_fft_stn_dst_node = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 2, 13, 1, 3), phys_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpxFftStnDstNode.setStatus('current') rl_ipx_fft_stn_src_netid = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 2, 13, 1, 4), net_number()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpxFftStnSrcNetid.setStatus('current') rl_ipx_fft_stn_src_node = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 2, 13, 1, 5), phys_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpxFftStnSrcNode.setStatus('current') rl_ipx_fft_stn_dst_ipx_addr_type = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 2, 13, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('local', 1), ('remote', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpxFftStnDstIpxAddrType.setStatus('current') rl_ipx_fft_stn_encapsulation = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 2, 13, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('novell', 1), ('ethernet', 2), ('llc', 3), ('snap', 4)))).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpxFftStnEncapsulation.setStatus('current') rl_ipx_fft_stn_dst_mac_address = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 2, 13, 1, 8), phys_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpxFftStnDstMacAddress.setStatus('current') rl_ipx_fft_stn_src_mac_address = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 2, 13, 1, 9), phys_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpxFftStnSrcMacAddress.setStatus('current') rl_ipx_fft_stn_out_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 2, 13, 1, 10), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpxFftStnOutIfIndex.setStatus('current') rl_ipx_fft_stn_tci = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 2, 13, 1, 11), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpxFftStnTci.setStatus('current') rl_ipx_fft_stn_facs_index = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 2, 13, 1, 12), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpxFftStnFacsIndex.setStatus('current') rl_ipx_fft_stn_age = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 2, 13, 1, 13), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpxFftStnAge.setStatus('current') rl_ipx_fft_sub_table = mib_table((1, 3, 6, 1, 4, 1, 89, 47, 2, 14)) if mibBuilder.loadTexts: rlIpxFftSubTable.setStatus('current') rl_ipx_fft_sub_entry = mib_table_row((1, 3, 6, 1, 4, 1, 89, 47, 2, 14, 1)).setIndexNames((0, 'RADLAN-rlFft', 'rlIpxFftSubIndex'), (0, 'RADLAN-rlFft', 'rlIpxFftSubDstNetid')) if mibBuilder.loadTexts: rlIpxFftSubEntry.setStatus('current') rl_ipx_fft_sub_index = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 2, 14, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpxFftSubIndex.setStatus('current') rl_ipx_fft_sub_dst_netid = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 2, 14, 1, 2), net_number()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpxFftSubDstNetid.setStatus('current') rl_ipx_fft_sub_encapsulation = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 2, 14, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('novell', 1), ('ethernet', 2), ('llc', 3), ('snap', 4)))).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpxFftSubEncapsulation.setStatus('current') rl_ipx_fft_sub_dst_mac_address = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 2, 14, 1, 4), phys_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpxFftSubDstMacAddress.setStatus('current') rl_ipx_fft_sub_src_mac_address = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 2, 14, 1, 5), phys_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpxFftSubSrcMacAddress.setStatus('current') rl_ipx_fft_sub_out_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 2, 14, 1, 6), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpxFftSubOutIfIndex.setStatus('current') rl_ipx_fft_sub_tci = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 2, 14, 1, 7), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpxFftSubTci.setStatus('current') rl_ipx_fft_sub_facs_index = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 2, 14, 1, 8), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpxFftSubFacsIndex.setStatus('current') rl_ipx_fft_sub_age = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 2, 14, 1, 9), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpxFftSubAge.setStatus('current') rl_ipx_fft_counters_table = mib_table((1, 3, 6, 1, 4, 1, 89, 47, 2, 15)) if mibBuilder.loadTexts: rlIpxFftCountersTable.setStatus('current') rl_ipx_fft_counters_entry = mib_table_row((1, 3, 6, 1, 4, 1, 89, 47, 2, 15, 1)).setIndexNames((0, 'RADLAN-rlFft', 'rlIpxFftCountersIndex')) if mibBuilder.loadTexts: rlIpxFftCountersEntry.setStatus('current') rl_ipx_fft_counters_index = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 2, 15, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpxFftCountersIndex.setStatus('current') rl_ipx_fft_in_receives = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 2, 15, 1, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpxFftInReceives.setStatus('current') rl_ipx_fft_forw_datagrams = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 2, 15, 1, 3), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpxFftForwDatagrams.setStatus('current') rl_ipx_fft_in_discards = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 2, 15, 1, 4), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpxFftInDiscards.setStatus('current') rl_ipm_fft = mib_identifier((1, 3, 6, 1, 4, 1, 89, 47, 3)) rl_ipm_fft_mib_version = mib_scalar((1, 3, 6, 1, 4, 1, 89, 47, 3, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpmFftMibVersion.setStatus('current') rl_ipm_max_fft_number = mib_scalar((1, 3, 6, 1, 4, 1, 89, 47, 3, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpmMaxFftNumber.setStatus('current') rl_ipm_fft_dynamic_supported = mib_scalar((1, 3, 6, 1, 4, 1, 89, 47, 3, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('supported', 1), ('unsupported', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpmFftDynamicSupported.setStatus('current') rl_ipm_fft_unknown_addr_msg_used = mib_scalar((1, 3, 6, 1, 4, 1, 89, 47, 3, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('used', 1), ('unused', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpmFftUnknownAddrMsgUsed.setStatus('current') rl_ipm_fft_user_aging_timeout = mib_scalar((1, 3, 6, 1, 4, 1, 89, 47, 3, 5), unsigned32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlIpmFftUserAgingTimeout.setStatus('current') rl_ipm_fft_router_aging_timeout = mib_scalar((1, 3, 6, 1, 4, 1, 89, 47, 3, 6), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpmFftRouterAgingTimeout.setStatus('current') rl_ipm_fft_num_table = mib_table((1, 3, 6, 1, 4, 1, 89, 47, 3, 8)) if mibBuilder.loadTexts: rlIpmFftNumTable.setStatus('current') rl_ipm_fft_num_entry = mib_table_row((1, 3, 6, 1, 4, 1, 89, 47, 3, 8, 1)).setIndexNames((0, 'RADLAN-rlFft', 'rlIpmFftNumIndex')) if mibBuilder.loadTexts: rlIpmFftNumEntry.setStatus('current') rl_ipm_fft_num_index = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 3, 8, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpmFftNumIndex.setStatus('current') rl_ipm_fft_num_routes_number = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 3, 8, 1, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpmFftNumRoutesNumber.setStatus('current') rl_ipm_fft_table = mib_table((1, 3, 6, 1, 4, 1, 89, 47, 3, 9)) if mibBuilder.loadTexts: rlIpmFftTable.setStatus('current') rl_ipm_fft_entry = mib_table_row((1, 3, 6, 1, 4, 1, 89, 47, 3, 9, 1)).setIndexNames((0, 'RADLAN-rlFft', 'rlIpmFftIndex'), (0, 'RADLAN-rlFft', 'rlIpmFftSrcIpAddress'), (0, 'RADLAN-rlFft', 'rlIpmFftDstIpAddress')) if mibBuilder.loadTexts: rlIpmFftEntry.setStatus('current') rl_ipm_fft_index = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 3, 9, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpmFftIndex.setStatus('current') rl_ipm_fft_src_ip_address = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 3, 9, 1, 2), ip_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpmFftSrcIpAddress.setStatus('current') rl_ipm_fft_dst_ip_address = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 3, 9, 1, 3), ip_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpmFftDstIpAddress.setStatus('current') rl_ipm_fft_src_ip_mask = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 3, 9, 1, 4), ip_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpmFftSrcIpMask.setStatus('current') rl_ipm_fft_input_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 3, 9, 1, 5), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpmFftInputIfIndex.setStatus('current') rl_ipm_fft_input_vlan_tag = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 3, 9, 1, 6), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpmFftInputVlanTag.setStatus('current') rl_ipm_fft_forward_action = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 3, 9, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('forward', 1), ('discard', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpmFftForwardAction.setStatus('current') rl_ipm_fft_inport_action = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 3, 9, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('sentToCPU', 1), ('discard', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpmFftInportAction.setStatus('current') rl_ipm_fft_age = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 3, 9, 1, 9), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpmFftAge.setStatus('current') rl_ipm_fft_port_tag_table = mib_table((1, 3, 6, 1, 4, 1, 89, 47, 3, 10)) if mibBuilder.loadTexts: rlIpmFftPortTagTable.setStatus('current') rl_ipm_fft_port_tag_entry = mib_table_row((1, 3, 6, 1, 4, 1, 89, 47, 3, 10, 1)).setIndexNames((0, 'RADLAN-rlFft', 'rlIpmFftPortIndex'), (0, 'RADLAN-rlFft', 'rlIpmFftPortSrcIpAddress'), (0, 'RADLAN-rlFft', 'rlIpmFftPortDstIpAddress'), (0, 'RADLAN-rlFft', 'rlIpmFftPortOutputifIndex'), (0, 'RADLAN-rlFft', 'rlIpmFftPortOutputTag')) if mibBuilder.loadTexts: rlIpmFftPortTagEntry.setStatus('current') rl_ipm_fft_port_index = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 3, 10, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpmFftPortIndex.setStatus('current') rl_ipm_fft_port_src_ip_address = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 3, 10, 1, 2), ip_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpmFftPortSrcIpAddress.setStatus('current') rl_ipm_fft_port_dst_ip_address = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 3, 10, 1, 3), ip_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpmFftPortDstIpAddress.setStatus('current') rl_ipm_fft_port_outputif_index = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 3, 10, 1, 4), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpmFftPortOutputifIndex.setStatus('current') rl_ipm_fft_port_output_tag = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 3, 10, 1, 5), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpmFftPortOutputTag.setStatus('current') rl_ipm_fft_counters_table = mib_table((1, 3, 6, 1, 4, 1, 89, 47, 3, 11)) if mibBuilder.loadTexts: rlIpmFftCountersTable.setStatus('current') rl_ipm_fft_counters_entry = mib_table_row((1, 3, 6, 1, 4, 1, 89, 47, 3, 11, 1)).setIndexNames((0, 'RADLAN-rlFft', 'rlIpmFftCountersIndex')) if mibBuilder.loadTexts: rlIpmFftCountersEntry.setStatus('current') rl_ipm_fft_counters_index = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 3, 11, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpmFftCountersIndex.setStatus('current') rl_ipm_fft_in_receives = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 3, 11, 1, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpmFftInReceives.setStatus('current') rl_ipm_fft_forw_datagrams = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 3, 11, 1, 3), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpmFftForwDatagrams.setStatus('current') rl_ipm_fft_in_discards = mib_table_column((1, 3, 6, 1, 4, 1, 89, 47, 3, 11, 1, 4), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlIpmFftInDiscards.setStatus('current') mibBuilder.exportSymbols('RADLAN-rlFft', rlIpxFftStnDstNode=rlIpxFftStnDstNode, rlIpmFftSrcIpMask=rlIpmFftSrcIpMask, rlIpFftSubNextHopIpAddr5=rlIpFftSubNextHopIpAddr5, rlIpFftNextHopVid=rlIpFftNextHopVid, rlIpxFftNumIndex=rlIpxFftNumIndex, rlIpmFftIndex=rlIpmFftIndex, rlIpmFftRouterAgingTimeout=rlIpmFftRouterAgingTimeout, rlIpmFftInReceives=rlIpmFftInReceives, rlIpFftSubTable=rlIpFftSubTable, rlIpFftL2InfoIfindex=rlIpFftL2InfoIfindex, rlIpmFftMibVersion=rlIpmFftMibVersion, rlIpmFftTable=rlIpmFftTable, rlIpxFftStnDstMacAddress=rlIpxFftStnDstMacAddress, rlIpxFftCountersTable=rlIpxFftCountersTable, rlIpFftYellowBoundary=rlIpFftYellowBoundary, rlIpmFftInDiscards=rlIpmFftInDiscards, rlIpxFftStnFacsIndex=rlIpxFftStnFacsIndex, rlIpmFftInportAction=rlIpmFftInportAction, rlIpFftSubEntry=rlIpFftSubEntry, rlIpFftSubNextHopIpAddr1=rlIpFftSubNextHopIpAddr1, rlIpFftL2InfoOutIfIndex=rlIpFftL2InfoOutIfIndex, rlIpFftNextHopEntry=rlIpFftNextHopEntry, rlIpFftStnDstIpAddrType=rlIpFftStnDstIpAddrType, rlIpMaxFftNumber=rlIpMaxFftNumber, rlIpxFftSubAge=rlIpxFftSubAge, rlIpxFftStnSrcMacAddress=rlIpxFftStnSrcMacAddress, rlIpmFftCountersTable=rlIpmFftCountersTable, rlIpFftCountersTable=rlIpFftCountersTable, rlIpFftAgingTimeSupported=rlIpFftAgingTimeSupported, rlIpxFftForwDatagrams=rlIpxFftForwDatagrams, rlIpxFftUnknownAddrMsgUsed=rlIpxFftUnknownAddrMsgUsed, rlIpmFFT=rlIpmFFT, rlIpFftForwDatagrams=rlIpFftForwDatagrams, rlIpmMaxFftNumber=rlIpmMaxFftNumber, rlIpmFftNumIndex=rlIpmFftNumIndex, rlIpFftStnTable=rlIpFftStnTable, rlIpFftNextHopMacAddress=rlIpFftNextHopMacAddress, rlIpmFftPortTagTable=rlIpmFftPortTagTable, rlIpxFftSubSrcMacAddress=rlIpxFftSubSrcMacAddress, rlIpmFftInputIfIndex=rlIpmFftInputIfIndex, rlIpmFftForwDatagrams=rlIpmFftForwDatagrams, rlIpFftStnIndex=rlIpFftStnIndex, rlFFT=rlFFT, rlIpFftNumEntry=rlIpFftNumEntry, rlIpFftL2InfoEntry=rlIpFftL2InfoEntry, rlIpFftSubNextHopIfindex4=rlIpFftSubNextHopIfindex4, rlIpxFftNumTable=rlIpxFftNumTable, rlIpFftRedBoundary=rlIpFftRedBoundary, rlIpxFftStnEntry=rlIpxFftStnEntry, rlIpmFftAge=rlIpmFftAge, rlIpmFftPortOutputifIndex=rlIpmFftPortOutputifIndex, rlIpFftSubNextHopIfindex1=rlIpFftSubNextHopIfindex1, rlIpxFftMibVersion=rlIpxFftMibVersion, rlIpFftSubNextHopIfindex7=rlIpFftSubNextHopIfindex7, rlIpxFftSubFacsIndex=rlIpxFftSubFacsIndex, rlIpmFftNumRoutesNumber=rlIpmFftNumRoutesNumber, rlIpxFftCountersIndex=rlIpxFftCountersIndex, rlIpFftNumStnRoutesNumber=rlIpFftNumStnRoutesNumber, rlIpFftSubNextHopIpAddr2=rlIpFftSubNextHopIpAddr2, rlIpFftSubNextHopIfindex2=rlIpFftSubNextHopIfindex2, rlIpFftNextHopValid=rlIpFftNextHopValid, rlIpxFftAgingTimeSupported=rlIpxFftAgingTimeSupported, rlIpmFftNumTable=rlIpmFftNumTable, NetNumber=NetNumber, rlIpFftL2InfoReferenceCount=rlIpFftL2InfoReferenceCount, rlIpxFftCountersEntry=rlIpxFftCountersEntry, rlIpFftStnDstMacAddress=rlIpFftStnDstMacAddress, rlIpFftNextHopTable=rlIpFftNextHopTable, rlIpFftL2InfoVid=rlIpFftL2InfoVid, rlIpmFftPortIndex=rlIpmFftPortIndex, rlIpFftL2InfoTable=rlIpFftL2InfoTable, rlIpFftSubNextHopIfindex6=rlIpFftSubNextHopIfindex6, rlIpxFftInDiscards=rlIpxFftInDiscards, rlIpFftCountersEntry=rlIpFftCountersEntry, rlIpFftStnTaggedMode=rlIpFftStnTaggedMode, rlIpmFftUserAgingTimeout=rlIpmFftUserAgingTimeout, rlIpFftStnSrcMacAddress=rlIpFftStnSrcMacAddress, rlIpFftSubNextHopIpAddr3=rlIpFftSubNextHopIpAddr3, rlIpmFftSrcIpAddress=rlIpmFftSrcIpAddress, rlIpFftSubNextHopIpAddr6=rlIpFftSubNextHopIpAddr6, rlIpxFftStnSrcNetid=rlIpxFftStnSrcNetid, rlIpFftNextHopifindex=rlIpFftNextHopifindex, rlIpxFftNumSubRoutesNumber=rlIpxFftNumSubRoutesNumber, rlIpxFftSubOutIfIndex=rlIpxFftSubOutIfIndex, rlIpFftSrcAddrSupported=rlIpFftSrcAddrSupported, rlIpFftSubnetSupported=rlIpFftSubnetSupported, rlIpxFftStnEncapsulation=rlIpxFftStnEncapsulation, rlIpxMaxFftNumber=rlIpxMaxFftNumber, rlIpxFftSubTci=rlIpxFftSubTci, rlIpmFftPortDstIpAddress=rlIpmFftPortDstIpAddress, rlIpFftStnEntry=rlIpFftStnEntry, rlIpxFftSubDstNetid=rlIpxFftSubDstNetid, rlIpFftInDiscards=rlIpFftInDiscards, rlIpFftNextHopOutIfIndex=rlIpFftNextHopOutIfIndex, rlIpxFftStnTci=rlIpxFftStnTci, rlIpmFftCountersIndex=rlIpmFftCountersIndex, rlIpFftAgingTimeout=rlIpFftAgingTimeout, rlIpFftStnAge=rlIpFftStnAge, rlIpFftL2InfoTaggedMode=rlIpFftL2InfoTaggedMode, rlIpxFFT=rlIpxFFT, rlIpFftUnknownAddrMsgUsed=rlIpFftUnknownAddrMsgUsed, rlIpFftSubNextHopCount=rlIpFftSubNextHopCount, rlIpFftSubNextHopIpAddr8=rlIpFftSubNextHopIpAddr8, rlIpFftSubMrid=rlIpFftSubMrid, rlIpFftInReceives=rlIpFftInReceives, rlIpmFftPortTagEntry=rlIpmFftPortTagEntry, rlIpFftL2InfoSrcMacAddress=rlIpFftL2InfoSrcMacAddress, rlIpFftStnDstIpAddress=rlIpFftStnDstIpAddress, rlIpmFftPortSrcIpAddress=rlIpmFftPortSrcIpAddress, rlIpFftStnOutIfIndex=rlIpFftStnOutIfIndex, rlIpFftSubAge=rlIpFftSubAge, rlIpxFftYellowBoundary=rlIpxFftYellowBoundary, rlIpxFftStnSrcNode=rlIpxFftStnSrcNode, rlIpxFftStnDstIpxAddrType=rlIpxFftStnDstIpxAddrType, rlIpFftNumSubRoutesNumber=rlIpFftNumSubRoutesNumber, rlIpFftSubNextHopSetRefCount=rlIpFftSubNextHopSetRefCount, rlIpxFftNumStnRoutesNumber=rlIpxFftNumStnRoutesNumber, rlIpxFftRedBoundary=rlIpxFftRedBoundary, rlIpFftDynamicSupported=rlIpFftDynamicSupported, rlIpFftNextHopIpAddress=rlIpFftNextHopIpAddress, rlIpmFftEntry=rlIpmFftEntry, rlIpxFftStnIndex=rlIpxFftStnIndex, rlIpxFftDynamicSupported=rlIpxFftDynamicSupported, rlIpmFftUnknownAddrMsgUsed=rlIpmFftUnknownAddrMsgUsed, rlIpFftStnDstRouteIpMask=rlIpFftStnDstRouteIpMask, rlIpFftNumIndex=rlIpFftNumIndex, rlIpFftCountersIndex=rlIpFftCountersIndex, rlIpmFftDstIpAddress=rlIpmFftDstIpAddress, rlIpFftNumTable=rlIpFftNumTable, rlIpFftSubNextHopIfindex5=rlIpFftSubNextHopIfindex5, rlIpxFftInReceives=rlIpxFftInReceives, rlIpFftL2InfoType=rlIpFftL2InfoType, rlIpFftL2InfoDstMacAddress=rlIpFftL2InfoDstMacAddress, rlIpFftSubNextHopIpAddr7=rlIpFftSubNextHopIpAddr7, rlIpxFftStnAge=rlIpxFftStnAge, rlIpFftMibVersion=rlIpFftMibVersion, rlIpFftSubDstIpMask=rlIpFftSubDstIpMask, rlIpxFftNumEntry=rlIpxFftNumEntry, rlIpFftNextHopReferenceCount=rlIpFftNextHopReferenceCount, rlIpxFftNetworkSupported=rlIpxFftNetworkSupported, rlIpxFftStnTable=rlIpxFftStnTable, rlIpFftNextHopType=rlIpFftNextHopType, rlIpmFftCountersEntry=rlIpmFftCountersEntry, rlIpmFftPortOutputTag=rlIpmFftPortOutputTag, rlIpmFftInputVlanTag=rlIpmFftInputVlanTag, rlIpFFT=rlIpFFT, rlIpxFftSubEncapsulation=rlIpxFftSubEncapsulation, rlIpFftSubNextHopIfindex3=rlIpFftSubNextHopIfindex3, rlIpxFftSubTable=rlIpxFftSubTable, rlIpFftL2InfoValid=rlIpFftL2InfoValid, rlIpmFftDynamicSupported=rlIpmFftDynamicSupported, rlIpxFftSubEntry=rlIpxFftSubEntry, rlIpxFftSubIndex=rlIpxFftSubIndex, Percents=Percents, rlIpFftStnMrid=rlIpFftStnMrid, rlIpFftSubNextHopIfindex8=rlIpFftSubNextHopIfindex8, rlIpxFftStnOutIfIndex=rlIpxFftStnOutIfIndex, rlIpmFftForwardAction=rlIpmFftForwardAction, rlIpFftSubNextHopIpAddr4=rlIpFftSubNextHopIpAddr4, rlIpxFftAgingTimeout=rlIpxFftAgingTimeout, rlIpxFftSrcAddrSupported=rlIpxFftSrcAddrSupported, PYSNMP_MODULE_ID=rlFFT, rlIpFftSubDstIpSubnet=rlIpFftSubDstIpSubnet, rlIpFftNextHopNetAddress=rlIpFftNextHopNetAddress, rlIpxFftSubDstMacAddress=rlIpxFftSubDstMacAddress, rlIpmFftNumEntry=rlIpmFftNumEntry, rlIpFftStnVid=rlIpFftStnVid, rlIpxFftStnDstNetid=rlIpxFftStnDstNetid)
a=1 for i in range(325): a=a*0.1 print(a)
a = 1 for i in range(325): a = a * 0.1 print(a)
class BasicSettingsApiCredentialsBackend(object): CLIENT_ERROR_MESSAGE = "Client implementations must define a `{0}` attribute" CLIENT_SETTINGS_ERROR_MESSAGE = "Settings must contain a `{0}` attribute" def __init__(self, client): self.client = client @property def base_url(self): return self.get_setting('domain_settings_name') @property def client_id(self): return self.get_setting('client_id_settings_name') @property def private_key(self): return self.get_setting('private_key_settings_name') def get_setting(self, name): raise NotImplementedError
class Basicsettingsapicredentialsbackend(object): client_error_message = 'Client implementations must define a `{0}` attribute' client_settings_error_message = 'Settings must contain a `{0}` attribute' def __init__(self, client): self.client = client @property def base_url(self): return self.get_setting('domain_settings_name') @property def client_id(self): return self.get_setting('client_id_settings_name') @property def private_key(self): return self.get_setting('private_key_settings_name') def get_setting(self, name): raise NotImplementedError
dial = {'A': 2, 'B': 2, 'C': 2, 'D': 3, 'E': 3, 'F': 3, 'G': 4, 'H': 4, 'I': 4, 'J': 5, 'K': 5, 'L': 5, 'M': 6, 'N': 6, 'O': 6, 'P': 7, 'Q': 7, 'R': 7, 'T': 8, 'U': 8, 'V': 8, 'W': 9, 'X': 9, 'Y': 9, 'S': 7, 'Z': 9} n, s = 0, input() for c in s: n += dial[c] print(n+len(s))
dial = {'A': 2, 'B': 2, 'C': 2, 'D': 3, 'E': 3, 'F': 3, 'G': 4, 'H': 4, 'I': 4, 'J': 5, 'K': 5, 'L': 5, 'M': 6, 'N': 6, 'O': 6, 'P': 7, 'Q': 7, 'R': 7, 'T': 8, 'U': 8, 'V': 8, 'W': 9, 'X': 9, 'Y': 9, 'S': 7, 'Z': 9} (n, s) = (0, input()) for c in s: n += dial[c] print(n + len(s))