content
stringlengths
7
1.05M
""" 题目:找出数组中出现次数超过一半的数,现在有一个数组,已知一个数出现的次数超过了一半,请用O(n)的复杂度的算法找出这个数。 出题人:阿里巴巴新零售技术质量部 """ def find_number(arr): map = {} total = len(arr) for i in arr: if map.get(i) is None: map[i] = 1 else: map[i] = map[i] + 1 half = total / 2 for k,v in map.items(): if map[k] > half: return k return None if __name__ == "__main__": arr = [1,2,3,2,2,3,2,4,2] print(find_number(arr))
# import time as t # a= ["sonic","CN","pogo","hungama","nick","disney","zetX","discovery"] # b= iter(a) # c = reversed(a) # for channels in a: # print(next(c)) # t.sleep(1) class RemoteControl(): def __init__(self): self.channels = ["sonic","CN","pogo","hungama","nick","disney","zetX","discovery"] self.index= -1 def __iter__(self): return self def __next__(self): self.index += 1 if self.index == len(self.channels): self.index=0 return self.channels[self.index] r = RemoteControl() itr = iter(r) print(next(itr)) print(next(itr)) print(next(itr)) print(next(itr)) print(next(itr)) print(next(itr)) print(next(itr)) print(next(itr)) print(next(itr))
class StartLimitException(Exception): def __init__(self, start_limit) -> None: super().__init__(f"Start limit {start_limit} is invalid.\ Start limit should not be less than 0.") class LimitInvalidException(Exception): def __init__(self, limit) -> None: super().__init__(f"Limit {limit} is invalid.\ Limit should not be less than 0.")
DOC_HEADER = 'Checks if an object has the attribute{}.' DOC_BODY = ('\n\n' 'Parameters\n' '----------\n' 'value\n' ' The literal or variable to check the attribute(s) of.\n' 'name : str, optional\n' ' Name of the variable to check the attributes(s) of.\n' ' Defaults to None.\n' '\n' 'Returns\n' '-------\n' 'value\n' ' The `value` passed in.\n' '\n' 'Attributes\n' '----------\n' 'attrs : tuple(str)\n' ' The attribute(s) to check for.\n' '\n' 'Methods\n' '-------\n' 'o(callable) : CompositionOf\n' ' Daisy-chains the attribute checker to another `callable`,\n' ' returning the functional composition of both.\n' '\n' 'Raises\n' '------\n' 'MissingAttrError\n' ' If the variable or literal does not have (one of) the\n' ' required attribute(s).\n' '\n' 'See also\n' '--------\n' 'Just, CompositionOf')
#!/usr/bin/python # -*- coding: utf-8 -*- """ __author__= 'jiangyixin' __time__ = 2019/2/25 22:18 """
"""Kata url: https://www.codewars.com/kata/5933a1f8552bc2750a0000ed.""" def nth_even(n: int) -> int: return (n - 1) * 2
def normalize(string: str): """ Normalize the value of the provided utf8 encoded string. """ return string.decode("utf8").strip("\n")
{ 'name': 'Chapter 06, Recipe 9 code', 'summary': 'Traverse recordset relations', 'depends': ['base'], }
def pcd_to_xyz(infile, outfile): pcd = open(infile, 'r').read() pcd = pcd.split('DATA ascii\n')[1].split('\n') xyz = open(outfile, 'w') for line in pcd: coords = line.split(' ')[:3] xyz.write(f'H {(" ").join(coords)}\n') xyz.close()
class Solution: def maxA(self, N): """ :type N: int :rtype: int """ ans = list(range(N + 1)) for i in range(7, N + 1): ans[i] = max(ans[i - 3] * 2, ans[i - 4] * 3, ans[i - 5] * 4) return ans[N]
'''Faça um programa que pergunte o preço de três produtos e informe qual produto você deve comprar, sabendo que a de9cisão é sempre pelo mais barato.''' produto1 = float(input('Digite o preço do produto: ')) produto2 = float(input('Digite o preço do produto: ')) produto3 = float(input('Digite o preço do produto: ')) if produto1 < produto2 and produto1 < produto3: print('Mais barato',produto1) elif produto2 < produto1 and produto2 < produto3: print('Mais barato',produto2) else: print('Mais barato', produto3)
class StartingInfos: """ author: Noé Lüthold class: giving informations on how to play, at the start of the program. """ # this function prints out some basic onfromation about the program at the program start def info(self): print("Author: Noé Lüthold") print("Last Updated: 14.08.2019") print("\n") print("It's recommended to play with the num-pad") print("\n") # this function asks the user if he wants instructions on how to play and if he answers yes it prints it out def instructions(self): instructionShow = input("Do you want to read the instructions? y/n ") if instructionShow.lower() == "y" or instructionShow.lower() == "yes" or instructionShow == "": print("Instructions:") print("TicTacToe is a game for two players, X and O, who take turns marking the spaces in a 3×3 grid.\n" "The player who succeeds in placing three of their marks \n" "in a horizontal, vertical, or diagonal row wins the game.\n\n") # start with the game once he presses enter because we want to give him enough time to read it. input("Press Enter to continue...")
DEFAULT_HOSTS = [ 'dataverse.harvard.edu', # Harvard PRODUCTION server 'demo.dataverse.org', # Harvard DEMO server 'apitest.dataverse.org', # Dataverse TEST server ] REQUEST_TIMEOUT = 15
#!/usr/bin/env python3 def count_me(void): print('hello') count_me()
class Playground: def __init__(self, size=5): """ Initialize a randomly generated playground with a given playground size (default = 5x5) """ self.size = size-1 self.world = [] for x in range(self.size): row = [] for y in range(self.size): row.append(Tile({x: x, y: y}, 0, 1, 0, 1)) self.world.append(row) def print(self): """ Prints the world map """ for row in self.world: for tile in row: print(f'Tile[{tile.position.x}, {tile.position.y}] = {tile.north}') class Tile: def __init__(self, position, north, south, east, west): self.position = position self.north = north self.south = south self.east = east self.west = west
# To print all the unique elements in an array. def uni_nums(n): ans = [] for i in n: if i not in ans: ans.append(i) return ans n = list(map(int,input().split())) print(uni_nums(n))
def delegate(method_name, attribute): def to_attribute(self, *args, **kwargs): bound_method = getattr(getattr(self, attribute), method_name) return bound_method(*args, **kwargs) return to_attribute
""" Question 17 : Write a program that computes the net amount of a bank account based a transaction log from console input. The transaction log format is shown as following : D : 100 W : 200. D means deposit while W means withdrawal. Suppose the following input is supplied to the program : D : 300, D : 300, W : 200, D : 100 Then, the output should be : 500. Hints : In case of input data being supplied to the question, it should be assumed to be a console input. """ # Solution : net_amount = 0 while True: choice = input("Enter a choice (like {D 100} or {W 100}): ") if not choice: break values = choice.split(" ") operation = values[0] amount = int(values[1]) if operation == "D": net_amount += amount elif operation == "W": net_amount -= amount else: pass print(net_amount) """ Output : Enter a choice : D 300 Enter a choice : D 300 Enter a choice : W 200 Enter a choice : D 100 Enter a choice : 500 """
print('Olá Fiec!') """ Você recebe duas notas (nota1 e nota2). Se a média for no mínimo 6 imprima "passou" Caso contrário, imprima Errou """ # O \r\n faz com que se pule uma linha (CRLF) nota1 = float(input("insira nota1: \r\n")) nota2 = float(input("insira nota2: \r\n")) media = (nota1+nota2)/2 if media >= 6: print("Passou") else: print("Errou")
""" Given three integers x, y, and bound, return a list of all the powerful integers that have a value less than or equal to bound. An integer is powerful if it can be represented as xi + yj for some integers i >= 0 and j >= 0. You may return the answer in any order. In your answer, each value should occur at most once.   Example 1: Input: x = 2, y = 3, bound = 10 Output: [2,3,4,5,7,9,10] Explanation: 2 = 20 + 30 3 = 21 + 30 4 = 20 + 31 5 = 21 + 31 7 = 22 + 31 9 = 23 + 30 10 = 20 + 32 Example 2: Input: x = 3, y = 5, bound = 15 Output: [2,4,6,8,10,14]   Constraints: 1 <= x, y <= 100 0 <= bound <= 106 """ class Solution: def powerfulIntegers(self, x: int, y: int, bound: int) -> List[int]: ret = set() a = 1 while True: if a >= bound: break b = 1 while True: t = a + b if t <= bound: ret.add(t) else: break b *= y if b == 1: break a *= x if a == 1: break return list(ret)
class Tree: ''' This is realization of a tree for exact project ''' def __init__(self, data): ''' obj, str -> None This method initializes an object ''' self.data = data self._left = None self._right = None def set_left(self, value): ''' obj, str -> None This puts needed value on the left ''' self._left = value def get_left(self): ''' obj, str -> None This returns needed value on the left ''' return self._left left = property(fset=set_left, fget=get_left) def set_right(self, value): ''' obj, str -> None This puts needed value on the right ''' self._right = value def get_right(self): ''' obj, str -> None This returns needed value on the right ''' return self._right def __repr__(self): ''' obj -> str This method represents object ''' return f"{self.data}" right = property(fset=set_right, fget=get_right) def is_empty(self): ''' obj -> bool This method checks whether tree is empty ''' return self._left is None and self._right is None
{ "targets": [ { "target_name": "serialtty", "sources": [ "src/serial.c", "src/serialtty.cc" ] } ] }
#class Solution: # def getMinDistance(self, nums: List[int], target: int, start: int) -> int: def getMinDistance(nums, target, start): if nums[start] == target: return 0 for i in range(1, len(nums)): try: positive_index = min(start + i, len(nums) - 1) if nums[positive_index] == target: return i except: pass try: positive_index = max(start - i, 0) if nums[positive_index] == target: return i except: pass def test(nums, target, start, expected): sol = getMinDistance(nums, target, start) if sol == expected : print("Congrats!") else: print(f"sol = {sol}") print(f"expected = {expected}") print() if __name__ == "__main__": nums = [1,2,3,4,5] target = 5 start = 3 expected = 1 test(nums, target, start, expected) nums = [1] target = 1 start = 0 expected = 0 test(nums, target, start, expected) nums = [2202,9326,1034,4180,1932,8118,7365,7738,6220,3440] target = 3440 start = 0 expected = 9 test(nums, target, start, expected)
def main(): # input while True: w, h = map(int, input().split()) if w == h == 0: return else: k = w + h - 1 xyns = [] for _ in range(k): x, y, n = map(int, input().split()) xyns.append([x-1, y-1, n]) # compute cols = [0] * w rows = [0] * h xys = [] for x, y, _ in xyns: xys.append([x, y]) ## 左端は必ず0が入る si = 0 cols[si] = 1 ## 行と列を交互に調べる for k in range(w*h): for hj in range(h): if [si, hj] in xys: rows[hj] = 1 xys.remove([si, hj]) if k == 0: sj = min(hj for hj in range(h) if rows[hj] == 1) else: for j in range(sj+1, h): if rows[j]: sj = j break for wi in range(w): if [wi, sj] in xys: cols[wi] = 1 xys.remove([wi, sj]) for i in range(si+1, w): if cols[i]: si = i break # output if sum(cols) == w and sum(rows) == h: print('YES') else: print('NO') print(xys) print(cols) print(rows) if __name__ == '__main__': main()
class Solution: def checkRecord(self, s: str) -> bool: consecutiveLate, absent = 0, 0 for character in s: if character == 'L': consecutiveLate += 1 else: if character == 'A': absent += 1 consecutiveLate = 0 if consecutiveLate >= 3 or absent >= 2: return False return True
# Programa para adicionar numeros a lista, no final o programa mostra todos os valores, # Os pares e os impares, em ordem. listat = [] listap = [] listai = [] while True: n = int(input('Digite um numero: ')) if n not in listat: listat.append(n) if (n%2) == 0: listap.append(n) else: listai.append(n) r = str(input('Deseja recomeçar? (Sim / Não): ')).split()[0].upper() if r[0] == 'N': break listat.sort() listap.sort() listai.sort() print(f'A lista de todos os numeros: {listat}') print(f'A lista dos numeros pares: {listap}') print(f'A lista dos numeros impares: {listai}') print()
# Create Node class containing # data # left pointer # right pointer class Node: def __init__(self, value): self.value = value self.right = None self.left = None class BinaryTree: def __init__(self): self.root = None def insert(self, value): if not self.root: self.root = Node(value) return q = [] q.append(self.root) while len(q): temp = q[0] q.pop(0) if not temp.left: temp.left = Node(value) break else: q.append(temp.left) if not temp.right: temp.right = Node(value) break else: q.append(temp.right) def print_order(self, temp, order): if temp is None: return if order == "pre": print(f"{temp.value}", end=" ") self.print_order(temp.left, order) if order == "in": print(f"{temp.value}", end=" ") self.print_order(temp.right, order) if order == "post": print(f"{temp.value}", end=" ") def traverse_by_stack(self, root): current = root stack = [] while True: if current: stack.append(current) current = current.left elif stack: current = stack.pop() print(current.value, end=" ") current = current.right else: break print() def showTree(self, msg, type=None): print(msg) if type is None: print("not implemented yet") elif type == "stack": self.traverse_by_stack(self.root) else: self.print_order(self.root, type) print() def popDeep(self, lastNode): q = [] q.append(self.root) while len(q): temp = q[0] q.pop(0) if temp == lastNode: temp = None return if temp.left == lastNode: temp.left = None return else: q.append(temp.left) if temp.right == lastNode: temp.right = None return else: q.append(temp.right) def delete(self, value): if not self.root: return if not self.root.left and not self.root.right: if self.root == value: self.root = None return q = [] q.append(self.root) d = None while len(q): temp = q[0] q.pop(0) if temp.value == value: d = temp if temp.left: q.append(temp.left) if temp.right: q.append(temp.right) if d: x = temp.value self.popDeep(temp) d.value = x if __name__ == "__main__": bt = BinaryTree() bt.insert(10) bt.insert(11) bt.insert(9) bt.insert(7) bt.insert(12) bt.insert(15) bt.insert(8) bt.showTree("before", "in") bt.delete(8) bt.showTree("after", "in") print("with orders") bt.showTree("Preorder", "pre") bt.showTree("Inorder", "in") bt.showTree("stack", "stack") bt.showTree("Postorder", "post")
def dev_only(func, *args, **kwargs): def inner(*args, **kwargs): request = kwargs.get("request", args[0]) # Check host host = request.get_host() if env_from_host(host) != "DEV": raise Http404 else: return func(*args, **kwargs) return inner def non_production(func, *args, **kwargs): def inner(*args, **kwargs): request = kwargs.get("request", args[0]) # Check host host = request.get_host() if env_from_host(host) not in ["DEV", "BETA"]: raise Http404 else: return func(*args, **kwargs) return inner def prod_only(func, *args, **kwargs): def inner(*args, **kwargs): request = kwargs.get("request", args[0]) # Check host host = request.get_host() if env_from_host(host) != "PROD": raise Http404 else: return func(*args, **kwargs) return inner
class element: def __init__(self, content, liste_categories): self.raw = content self.liste = content.split(",") self.liste_categories = liste_categories self.lien = self.liste[0] self.sujet = self.liste[1] self.description = self.liste[2] self.timestamp = self.liste[3] self.createur = self.liste[4] self.approuvé = self.liste[5] class fichier: def __init__(self, nom): self.nom=nom self.contenu = open(nom, "r", encoding="UTF-8") self.contenu_liste = [x.split("\n")[0] for x in self.contenu.readlines()] self.liste_categories = self.contenu_liste[0].split(",") self.nombre_categories = len(self.liste_categories) self.classer() def print_liste(self): print(self.contenu_liste) def print_categories(self): print(self.liste_categories) def classer(self): self.classé = [element(self.contenu_liste[i], self.liste_categories) for i in range(1, len(self.contenu_liste))] contenu = fichier("content.csv") for element in contenu.classé: print(element.lien)
#UTF-8 def objects_data(map_number, mode, save_meta1): if mode == 'stoper': adres = 'data/stoper_old/stoper' + str(map_number[0]) + '_' + str(map_number[1]) + '.frls' try: file = open(adres) except FileNotFoundError: return [''] else: file = open(adres, 'rb') stop_cords = save_meta1.decrypt(file.read()).decode('utf8').strip().split('+') return stop_cords elif mode == 'objects': adres = 'data/objects_old/objects' + str(map_number[0]) + '_' + str(map_number[1]) + '.frls' try: file = open(adres) except FileNotFoundError: return [['']] else: file = open(adres, 'rb') objects = [] temp1 = save_meta1.decrypt(file.read()).decode('utf8').strip().split('+') for temp2 in temp1: objects.append(temp2.split('_')) return objects def stoper(x_object, y_object, side, stop_cords=False): if stop_cords != False and stop_cords != ['']: stop = True if side == 0: for i in stop_cords: if i == '': continue temp = i.split('_') x1 = int(temp[0]) y1 = int(temp[1]) x2 = int(temp[2]) y2 = int(temp[3]) if x_object + 50 >= x1 and x_object + 10 <= x2 and y_object + 59 >= y1 and y_object + 33 <= y2: stop = False if side == 1: for i in stop_cords: if i == '': continue temp = i.split('_') x1 = int(temp[0]) y1 = int(temp[1]) x2 = int(temp[2]) y2 = int(temp[3]) if x_object + 50 >= x1 and x_object + 10 <= x2 and y_object + 50 >= y1 and y_object + 30 <= y2: stop = False if side == 2: for i in stop_cords: if i == '': continue temp = i.split('_') x1 = int(temp[0]) y1 = int(temp[1]) x2 = int(temp[2]) y2 = int(temp[3]) if x_object + 53 >= x1 and x_object + 10 <= x2 and y_object + 50 >= y1 and y_object + 33 <= y2: stop = False if side == 3: for i in stop_cords: if i == '': continue temp = i.split('_') x1 = int(temp[0]) y1 = int(temp[1]) x2 = int(temp[2]) y2 = int(temp[3]) if x_object + 50 >= x1 and x_object + 7 <= x2 and y_object + 50 >= y1 and y_object + 33 <= y2: stop = False return stop else: return True
class Solution: def convert_to_title(self, n: int) -> str: """ 1 -> 'A' 27 -> 'AA' 703 -> 'AAA' """ ans = [] while n > 0: n, mod = divmod(n, 26) if mod == 0: mod = 26 n -= 1 ans.append(chr(64 + mod)) return "".join(ans[::-1])
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'CRM', 'version': '1.0', 'category': 'Sales', 'sequence': 5, 'summary': 'Track leads and close opportunities', 'description': "", 'website': 'https://www.odoo.com/page/crm', 'depends': [ 'base_setup', 'sales_team', 'mail', 'calendar', 'resource', 'fetchmail', 'utm', 'web_tour', 'contacts', 'digest', ], 'data': [ 'security/crm_security.xml', 'security/ir.model.access.csv', 'data/crm_data.xml', 'data/crm_stage_data.xml', 'data/crm_lead_data.xml', 'data/digest_data.xml', 'wizard/crm_lead_lost_views.xml', 'wizard/crm_lead_to_opportunity_views.xml', 'wizard/crm_merge_opportunities_views.xml', 'views/crm_templates.xml', 'views/res_config_settings_views.xml', 'views/crm_views.xml', 'views/crm_stage_views.xml', 'views/crm_lead_views.xml', 'views/calendar_views.xml', 'views/res_partner_views.xml', 'report/crm_activity_report_views.xml', 'report/crm_opportunity_report_views.xml', 'views/crm_team_views.xml', 'views/digest_views.xml', ], 'demo': [ 'data/crm_demo.xml', 'data/mail_activity_demo.xml', 'data/crm_lead_demo.xml', ], 'css': ['static/src/css/crm.css'], 'installable': True, 'application': True, 'auto_install': False, 'uninstall_hook': 'uninstall_hook', }
class OptionContractTrade(object): def __init__(self, trade_date, original_purchasing_price, option_contract): """ :param trade_date: :param original_purchasing_price: :param option_contract: """ self.trade_date = trade_date self.original_purchasing_price = original_purchasing_price self.option_contract = option_contract
def count_substring(string, sub_string): # if list(sub_string) not in list(string): # return 0 count = 0 for i in range(len(string)): if string[i:].startswith(sub_string): count += 1 return count if __name__ == '__main__': string = input().strip() sub_string = input().strip() count = count_substring(string, sub_string) print(count)
# Author : thepmsquare # Question Link : https://leetcode.com/problems/reverse-integer/ class Solution: def reverse(self, x: int) -> int: answer = list() if(x<0): answer.append("-") x=x*-1 tempList = list(str(x)) tempList.reverse() answer.extend(tempList) returnThis = int("".join(answer)) if returnThis < pow(-2,31) or returnThis > (pow(2,31)-1): return 0 else: return returnThis
def in_array(array1, array2): new = set() for sub in array1: for sup in array2: if sub in sup: new.add(sub) return sorted(list(new))
class Solution: def maxConsecutiveAnswers(self, answerKey: str, k: int) -> int: return max(self.maxConsecutiveChar(answerKey, 'T', k), self.maxConsecutiveChar(answerKey, 'F', k)) def maxConsecutiveChar(self, answerKey, ch, k): ch_sum, left, result = 0, 0, 0 for i in range(len(answerKey)): ch_sum += answerKey[i] != ch while ch_sum > k: ch_sum -= answerKey[left] != ch left += 1 result = max(result, i - left + 1) return result s = Solution() print(s.maxConsecutiveAnswers(answerKey="TTFF", k=2))
setup(name='hashcode_template', version='0.1', description='Template library for the HashCode challenge', author='Nikos Koukis', author_email='nickkouk@gmail.com', license='MIT', install_requires=( "sh", "numpy", "scipy", "matplotlib", "pygal", ), url='https://github.org/bergercookie/googlehash_template', packages=['googlehash_template', ], )
#!/usr/bin/python class FilterModule(object): def filters(self): return { 'wrap': self.wrap } def wrap(self, list): return [ "'" + x + "'" for x in list]
# Python Program To Create A Binary File And Store A Few Records ''' Function Name : Create A Binary File And Store A Few Records Function Date : 25 Sep 2020 Function Author : Prasad Dangare Input : String,Integer Output : String ''' reclen = 20 # Open The File In wb Mode As Binary File with open("cities.bin", "wb") as f: # Write Data Into The File n = int(input("How Many Entries ? ")) for i in range(n): city = input('Enter City Names : ') # Find The Length Of City ln = len(city) # Increase The City Name To 20 Chars # By Adding Remaining Spaces city = city + (reclen-ln)*' ' # Convert City Name Into Bytes String city = city.encode() # Write The City Name Into The File f.write(city)
pedidos = [] def adiciona_pedido(nome, sabor, observacao=None): pedido = {} pedido['nome'] = nome pedido['sabor'] = sabor pedido['observacao'] = observacao return pedido pedidos.append(adiciona_pedido('Mario', 'Portuguesa')) pedidos.append(adiciona_pedido('Marcos', 'Peperoni', 'Dobro de peperoni')) for pedido in pedidos: template = 'Nome: {nome}\nSabor: {sabor}' print(template.format(**pedido)) if pedido['observacao']: print('Observacao: {}'.format(pedido['observacao'])) print('-'*75)
class Coin(object): def __init__(self, json): self.id = json["id"] self.name = json["name"] self.symbol = json["symbol"] self.price_usd = json["price_usd"] self.price_eur = json["price_eur"] self.percent_change_1h = json["percent_change_1h"] self.percent_change_24h = json["percent_change_24h"] self.percent_change_7d = json["percent_change_7d"] self.last_updated = json["last_updated"] def __str__(self): return '%s(%s)' % (type(self).__name__, ', '.join('%s=%s' % item for item in vars(self).items()))
# Input: prevA = 116 prevB = 299 factorA = 16807 factorB = 48271 divisor = 2147483647 judge = 0 for _ in range(40000000): A = (prevA*factorA)%divisor B = (prevB*factorB)%divisor prevA = A prevB = B binA = bin(A).split("b")[-1][-16:] binB = bin(B).split("b")[-1][-16:] binA = '0'*(16-len(binA))+binA binB = '0'*(16-len(binB))+binB if binA == binB: judge += 1 print(judge)
#============================================================================== # Copyright 2019 Intel Corporation # # 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. # ============================================================================= def parse_logs(log_lines): if type(log_lines) == type(''): log_lines = log_lines.split('\n') else: assert type(log_lines) == type( [] ), "If log_lines if not a string, it should have been a list, but instead it is a " + type( log_lines) assert all([ type(i) == type('') and '\n' not in i for i in log_lines ]), 'Each element of the list should be a string and not contain new lines' all_results = {} curr_result = {} ctr = 0 for line in log_lines: start_of_subgraph = "NGTF_SUMMARY: Op_not_supported:" in line # If logs of a new sub-graph is starting, save the old one if start_of_subgraph: if len(curr_result) > 0: all_results[str(ctr)] = curr_result curr_result = {} ctr += 1 # keep collecting information in curr_result if line.startswith('NGTF_SUMMARY'): if 'Number of nodes in the graph' in line: curr_result['num_nodes_in_graph'] = int( line.split(':')[-1].strip()) elif 'Number of nodes marked for clustering' in line: curr_result['num_nodes_marked_for_clustering'] = int( line.split(':')[-1].strip().split(' ')[0].strip()) elif 'Number of ngraph clusters' in line: curr_result['num_ng_clusters'] = int( line.split(':')[-1].strip()) # TODO: fill other information as needed # add the last subgraph to all_results all_results[str(ctr)] = curr_result return all_results def compare_parsed_values(parsed_vals, expected_vals): # Both inputs are expected to be 2 dictionaries (representing jsons) # The constraints in expected is <= parsed_vals. Parsed_vals should have all possible values that the parser can spit out. However expected_vals can be relaxed (even empty) and choose to only verify/match certain fields match = lambda current, expected: all( [expected[k] == current[k] for k in expected]) for graph_id_1 in expected_vals: # The ordering is not important and could be different, hence search through all elements of parsed_vals matching_id = None for graph_id_2 in parsed_vals: if match(expected_vals[graph_id_1], parsed_vals[graph_id_2]): matching_id = graph_id_2 break if matching_id is None: return False, 'Failed to match expected graph info ' + graph_id_1 + " which was: " + str( expected_vals[graph_id_1] ) + "\n. Got the following parsed results: " + str(parsed_vals) else: parsed_vals.pop(matching_id) return True, ''
class DepotPolicy: def __init__(self, depot): self.depot = depot def next_locations(self, cur_ts, cur_locations, already_spent_costs): pass
sum_of_lines = 0 sum_of_lines2 = 0 def calculate(expr): result = 0 if expr.count("(") == 0: expr = expr.split() n = len(expr) i = 0 while i < (n-2): expr[i] = int(expr[i]) expr[i+2] = int(expr[i+2]) if expr[i+1] == "+": expr[i+2] += expr[i] elif expr[i+1] == "*": expr[i+2] *= expr[i] i += 2 return expr[n-1] while expr.count(")") > 0: expr = expr.split("(") for i, e in enumerate(expr): if e.count(")") > 0: loc = e.index(")") partial = calculate(e[:loc]) if loc == len(e) - 1: expr[i] = str(partial) else: expr[i] = str(partial) + e[loc+1:] break new = expr[0] for j, a in enumerate(expr[1:]): if j + 1 == i: new += a else: new += "(" + a expr = new expr = expr.replace("(", "") return calculate(expr) def calculate_add(expr): result = 0 if expr.count("(") == 0: #1st calulate all + expr = expr.split() for i, a in enumerate(expr): if i % 2 == 0: expr[i] = int(a) new = [] n = len(expr) i = 0 while i < (n-2): if expr[i+1] == "+": expr[i+2] += expr[i] elif expr[i+1] == "*": new.append(expr[i]) new.append("*") i += 2 new.append(expr[n-1]) #2nd calculate * n = len(new) i = 0 while i < (n-2): new[i+2] *= new[i] i += 2 return new[n-1] while expr.count(")") > 0: expr = expr.split("(") for i, e in enumerate(expr): if e.count(")") > 0: loc = e.index(")") partial = calculate_add(e[:loc]) if loc == len(e) - 1: expr[i] = str(partial) else: expr[i] = str(partial) + e[loc+1:] break new = expr[0] for j, a in enumerate(expr[1:]): if j + 1 == i: new += a else: new += "(" + a expr = new expr = expr.replace("(", "") return calculate_add(expr) # print(calculate_add("5 + (8 * 3 + 9 + 3 * 4 * 3)")) while True: try: line = input() sum_of_lines += calculate(line) sum_of_lines2 += calculate_add(line) except: break print(sum_of_lines) print(sum_of_lines2)
LANIA = 1032201 sm.forcedInput(2) sm.sendDelay(30) sm.forcedInput(0) sm.removeEscapeButton() sm.setSpeakerID(LANIA) sm.sendNext("Don't take too long, okay? I know how you like to dilly-dally in town!") sm.flipDialoguePlayerAsSpeaker() sm.sendSay("I will return as swiftly as I can, dear Lania.") sm.sendSay("Lania, since I've started living here, for the first time in my life I'm--ARGH!") sm.setSpeakerID(LANIA) sm.sendSay("Luminous?") sm.forcedAction(4, 6000) sm.showEffect("Effect/Direction8.img/effect/tuto/floodEffect/0", 5400, 0, 20, -2, -2, False, 0) sm.showEffect("Effect/Direction8.img/effect/tuto/BalloonMsg1/1", 1400, 0, -120, -2, -2, False, 0) sm.moveNpcByTemplateId(LANIA, True, 50, 100) sm.reservedEffect("Effect/Direction8.img/lightningTutorial2/Scene2") sm.playExclSoundWithDownBGM("Bgm26.img/Flood", 100) sm.sendDelay(500) sm.showEffect("Effect/Direction8.img/effect/tuto/BalloonMsg1/2", 0, 0, -120, 0, sm.getNpcObjectIdByTemplateId(LANIA), False, 0) sm.sendDelay(2000) sm.showEffect("Effect/Direction8.img/effect/tuto/BalloonMsg1/3", 0, 0, -180, -2, -2, False, 0) sm.sendDelay(2300) sm.faceOff(21066) sm.showEffect("Effect/Direction8.img/effect/tuto/floodEffect/1", 0, 0, 0, -2, -2, False, 0) sm.showEffect("Effect/Direction8.img/effect/tuto/floodEffect/2", 0, 0, 0, -2, -2, False, 0) sm.sendDelay(3000) sm.removeNpc(LANIA) sm.warp(910141060, 0)
TIPO_DOCUMENTO_CPF = 1 TIPO_DOCUMENTO_CNPJ = 2 class Cedente(object): def __init__(self): self.tipoDocumento = None self.documento = None self.nome = None self.agencia = None self.agenciaDigito = None self.conta = None self.contaDigito = None self.convenio = None self.convenioDigito = None @property def documentoTexto(self): if self.tipoDocumento == 1: return '%011d' % self.documento elif self.tipoDocumento == 2: return '%014d' % self.documento else: return str(self.documento) class Sacado(object): def __init__(self): self.tipoDocumento = None self.documento = None self.nome = None self.logradouro = None self.endereco = None self.bairro = None self.cidade = None self.uf = None self.cep = None self.email = None self.informacoes = "" @property def documentoTexto(self): if self.tipoDocumento == 1: return '%011d' % self.documento elif self.tipoDocumento == 2: return '%014d' % self.documento else: return str(self.documento) class Boleto(object): def __init__(self): self.carteira = "" self.nossoNumero = "" self.dataVencimento = None self.dataDocumento = None self.dataProcessamento = None self.valorBoleto = 0.0 self.quantidadeMoeda = 1 self.valorMoeda = "" self.instrucoes = [] #self.especieCodigo = 0 #self.especieSigla = "" self.especieDocumento = "" self.aceite = "N" self.numeroDocumento = "" self.especie = "R$" self.moeda = 9 #self.usoBanco self.cedente = None self.categoria = 0 self.agencia = None self.agenciaDigito = None self.conta = None self.contaDigito = None self.banco = 33 self.valorDesconto = None self.tipoDesconto1 = None self.valorDesconto1 = None self.tipoDesconto2 = None self.valorDesconto2 = None self.sacado = None self.jurosMora = 0.0 self.iof = 0.0 self.abatimento = 0.0 self.valorMulta = 0.0 self.outrosAcrescimos = 0.0 self.outrosDescontos = 0.0 self.dataJurosMora = None self.dataMulta = None self.dataOutrosAcrescimos = None self.dataOutrosDescontos = None self.retJurosMoltaEncargos = None self.retValorDescontoConcedido = None self.retValorAbatimentoConcedido = None self.retValorPagoPeloSacado = None self.retValorLiquidoASerCreditado = None self.retValorOutrasDespesas = None self.retValorOutrosCreditos = None self.retDataOcorrencia = None self.retDataOcorrenciaS = None self.retDataCredito = None self.retCodigoOcorrenciaSacado = None self.retDescricaoOcorrenciaSacado = None self.retValorOcorrenciaSacado = None def carrega_segmento(self, specs, tipo, valores): if tipo == "P": carteiras = specs['carteiras'] tipo_cobranca = str(valores['tipo_cobranca']) self.carteira = carteiras.get(tipo_cobranca, "0") self.nossoNumero = valores['nosso_numero'] self.dataVencimento = valores['data_vencimento'] self.dataDocumento = valores['data_emissao'] self.valorBoleto = valores['valor_nominal'] cedente = self.cedente cedente.agencia = valores['agencia_benef'] cedente.agenciaDigito = valores.get('agencia_benef_dig') cedente.conta = valores['numero_conta'] cedente.contaDigito = valores.get('digito_conta') cedente.convenio = 0 cedente.convenioDigito = -1 self.especieDocumento = valores.get('tipo_documento') # or ""? self.numeroDocumento = valores['seu_numero'] #self.moeda = valores['cod_moeda'] #TODO: checar se tem de/para #self.categoria = 0 self.banco = valores['codigo_banco'] self.agencia = valores['agencia_benef'] self.agenciaDigito = valores.get('agencia_benef_dig') self.conta = valores['numero_conta'] self.contaDigito = valores.get('digito_conta') self.valorDesconto = valores['desconto'] #TODO: distinguir entre percentagem e valor self.jurosMora = valores['valor_mora_dia'] #TODO: distinguir entre percentagem e valor self.iof = valores.get('valor_iof', 0) self.abatimento = valores['valor_abatimento'] #self.outrosAcrescimos = 0 #? #TODO: verificar se soma outros campos ou nao #self.outrosDescontos = 0 #? #TODO: verificar se soma outros campos ou nao self.dataJurosMora = valores['data_juros'] #self.dataOutrosDescontos = None #self.dataOutrosAcrescimos = None self.aceite = valores['aceite'] #? elif tipo == "Q": sacado = Sacado() sacado.nome = valores['nome'] sacado.tipoDocumento = valores['tipo_inscricao'] sacado.documento = valores['numero_inscricao'] sacado.logradouro = valores['endereco'] sacado.endereco = valores['endereco'] sacado.bairro = valores['bairro'] sacado.cidade = valores['cidade'] sacado.uf = valores['uf'] sacado.cep = ('%05d' % valores['cep']) + ('%03d' % valores['cep_sufixo']) self.sacado = sacado elif tipo == "R": self.valorMulta = valores['multa'] self.dataMulta = valores['data_multa'] pass elif tipo == "S": pass elif tipo == "T": #carteiras = specs['carteiras'] #tipo_cobranca = str(valores['tipo_cobranca']) #self.carteira = carteiras.get(tipo_cobranca, "0") self.nossoNumero = valores['nosso_numero'] self.dataVencimento = valores['data_vencimento'] self.valorBoleto = valores['valor_nominal'] cedente = self.cedente cedente.agencia = valores['agencia_benef'] cedente.agenciaDigito = valores.get('agencia_benef_dig') cedente.conta = valores['numero_conta'] cedente.contaDigito = valores.get('digito_conta') cedente.convenio = 0 cedente.convenioDigito = -1 self.banco = valores['codigo_banco'] self.agencia = valores['agencia_benef'] self.agenciaDigito = valores.get('agencia_benef_dig') self.conta = valores['numero_conta'] self.contaDigito = valores.get('digito_conta') elif tipo == "U": self.retJurosMoltaEncargos = valores['valor_encargos'] self.retValorDescontoConcedido = valores['valor_desconto'] self.retValorAbatimentoConcedido = valores['valor_abatimento'] self.retValorPagoPeloSacado = valores['valor_pago'] self.retValorLiquidoASerCreditado = valores['valor_liquido'] self.retValorOutrasDespesas = valores['valor_despesas'] self.retValorOutrosCreditos = valores['valor_creditos'] self.retDataOcorrencia = valores['data_ocorrencia'] self.retDataOcorrenciaS = valores['data_ocorrencia_s'] self.retDataCredito = valores['data_efetivacao'] self.retCodigoOcorrenciaSacado = valores['cod_movimento'] self.retDescricaoOcorrenciaSacado = valores['comp_ocorrencia'] self.retValorOcorrenciaSacado = valores['valor_ocorrencia'] elif tipo == "Y": pass @property def valorCobrado(self): return valorBoleto #TODO @property def nossoNumeroTexto(self): return "%013d" % self.nossoNumero
""" This file contains the code name. """ def show(): """ Show the title of the model pipeline. Based on F.R. NIKA soft. See also http://patorjk.com/software/taag Parameters ---------- Outputs ---------- """ print("=====================================================================") print(" ___ __ ___ __ __ ") print(" / __) / _\ / __) / \ ( ) ") print(" ( (__ / \( (_ \( O )/ (_/\ ") print(" \___)\_/\_/ \___/ \__/ \____/ ") print("=====================================================================") print(" Cluster Atmosphere modeling for Gamma-ray Observations Libraries ") print("---------------------------------------------------------------------") print(" ") #print("=================================================================") #print(" ______ _____ _____ ______ _____ ") #print(" | ___ \ ___| __ \| ___ \ ___| ") #print(" | |_/ / |__ | | \/| |_/ / |__ ") #print(" | __/| __|| | __ | /| __| ") #print(" | | | |___| |_\ \| |\ \| |___ ") #print(" \_| \____/ \____/\_| \_\____/ ") #print("=================================================================") #print(" Pipeline for the Estimation of Gamma Ray Emission in clusters ") #print("-----------------------------------------------------------------") #print(" ") # Galaxy Cluster Hot Gas Modeling Pipeline Gamma Ray Observations Analysis and Multi-Wavelength
# Belle Pan # 260839939 history = input("Family history?") # complete the program by writing your own code here if history == "No": print("Low risk") elif history == "Yes": ancestry = input("European ancestry?") if ancestry == "No": try: AR_GCCRepeat = int(input("AR_GCC repeat copy number?")) if AR_GCCRepeat <16 and AR_GCCRepeat >=0: print("High risk") elif AR_GCCRepeat >=16: print("Medium risk") else: print("Invalid") except ValueError: print("Invalid") elif ancestry == "Mixed": try: AR_GCCRepeat = int(input("AR_GCC repeat copy number?")) if AR_GCCRepeat <16 and AR_GCCRepeat >=0: CYP3A4type = input("CYP3A4 haplotype?") if CYP3A4type == "AA": print("Medium risk") elif CYP3A4type == "GA" or CYP3A4type == "AG" or CYP3A4type == "GG": print("High risk") else: print("Invalid") elif AR_GCCRepeat >=16: print("Medium risk") else: print("Invalid") except ValueError: print("Invalid") elif ancestry == "Yes": CYP3A4type = input("CYP3A4 haplotype?") if CYP3A4type == "AA": print("Low risk") elif CYP3A4type == "GA" or CYP3A4type == "AG" or CYP3A4type == "GG": print("High risk") else: print("Invalid") else: print("Invalid") else: print("Invalid")
''' fibonacci.py: Prints the Fibonacci sequence to the limit specified by the user. Uses a generator function for fun. Based on https://redd.it/19r3qg. ''' def fib(n): a, b = 0, 1 for i in range(n): yield a a, b = b, a + b if __name__ == '__main__': n = None while n is None: try: n = int(input('How many numbers would you like to print? ')) except ValueError: print('Error: Please enter integers only!') pass for i in fib(n): print(i, end=' ') print(' ')
expected_output = { "interface": { "Tunnel100": { "max_send_limit": "10000Pkts/10Sec", "usage": "0%", "sent": { "total": 5266, "resolution_request": 69, "resolution_reply": 73, "registration_request": 5083, "registration_reply": 0, "purge_request": 41, "purge_reply": 0, "error_indication": 0, "traffic_indication": 0, "redirect_supress": 0, }, "rcvd": { "total": 5251, "resolution_request": 73, "resolution_reply": 41, "registration_request": 0, "registration_reply": 5055, "purge_request": 41, "purge_reply": 0, "error_indication": 0, "traffic_indication": 41, "redirect_supress": 0, }, } } }
start_num = int(input()) end_num = int(input()) magic_num = int(input()) counter = 0 flag = False for first_num in range (start_num, end_num + 1): for second_num in range (start_num, end_num + 1): counter += 1 if first_num + second_num == magic_num: print(f'Combination N:{counter} ({first_num} + {second_num} = {magic_num})') flag = True break if flag: break if not flag: print(f'{counter} combinations - neither equals {magic_num}')
""" The thief has found himself a new place for his thievery again. There is only one entrance to this area, called the "root." Besides the root, each house has one and only one parent house. After a tour, the smart thief realized that "all houses in this place forms a binary tree". It will automatically contact the police if two directly-linked houses were broken into on the same night. Determine the maximum amount of money the thief can rob tonight without alerting the police. Algorithm Use a helper function which receives a node as input and returns a two-element array, where the first element represents the maximum amount of money the thief can rob if starting from this node without robbing this node, and the second element represents the maximum amount of money the thief can rob if starting from this node and robbing this node. The basic case of the helper function should be null node, and in this case, it returns two zeros. Finally, call the helper(root) in the main function, and return its maximum value. IDEA: construct a repeatable situation where there is a need to make a choice 1) cost to rob this node and not robe neighbors 2) cost not to rob this node, and investigate the cost of robbing neighbors in different combinations """ class Solution337: pass
class TreeNode(object): def __init__(self, x): self.val = x self.left = None self.right = None def __repr__(self): return f'{self.val} -> [{self.left}, {self.right}]' def constructMaximumBinaryTree(nums): """O(N) time | O(1) space""" stack = [] for num in nums: last = None num = TreeNode(num) while stack and num.val > stack[-1].val: last = stack.pop() if last: num.left = last if stack: stack[-1].right = num stack.append(num) return stack[0] constructMaximumBinaryTree([3,2,1,6,0,5])
# # Copyright (c) Ionplus AG and contributors. All rights reserved. # Licensed under the MIT license. See LICENSE file in the project root for details. # def test_defaults(orm): assert orm.query(orm.sample_type).get('sample').sort_order == 0 assert orm.query(orm.sample_type).get('oxa2').sort_order == 20 assert orm.query(orm.sample_type).get('bl').sort_order == 30 assert orm.query(orm.sample_type).get('lnz').sort_order == 110 assert orm.query(orm.sample_type).get('nb').sort_order == 400
languages = { "aa": "0-9a-z", "ab": "0-9a-z", "ae": "0-9a-z", "af": "0-9a-z", "ak": "0-9a-z", "am": "0-9a-z", "an": "0-9a-z", "ar": "0-9a-z", "as": "0-9a-z", "av": "0-9a-z", "ay": "0-9a-z", "az": "0-9a-z", "ba": "0-9a-z", "be": "0-9a-z", "bg": "0-9a-z", "bh": "0-9a-z", "bi": "0-9a-z", "bm": "0-9a-z", "bn": "0-9a-z", "bo": "0-9a-z", "br": "0-9a-z", "bs": "0-9a-z", "ca": "0-9a-z", "ce": "0-9a-z", "ch": "0-9a-z", "co": "0-9a-z", "cr": "0-9a-z", "cs": "0-9a-z", "cu": "0-9a-z", "cv": "0-9a-z", "cy": "0-9a-z", "da": "0-9a-z", "de": "0-9a-z", "dv": "0-9a-z", "dz": "0-9a-z", "ee": "0-9a-z", "el": "0-9a-z", "en": "0-9a-z", "eo": "0-9a-z", "es": "0-9a-z", "et": "0-9a-zäöõüšž", "eu": "0-9a-z", "fa": "0-9a-z۰۱۲۳۴۵۶۷۸۹ءآئابتثجحخدذرزسشصضطظعغفقلمنهوپچژکگیە\u200c", "ff": "0-9a-z", "fi": "0-9a-z", "fj": "0-9a-z", "fo": "0-9a-z", "fr": "0-9a-z", "fy": "0-9a-z", "ga": "0-9a-záéíóú", "gd": "0-9a-z", "gl": "0-9a-z", "gn": "0-9a-z", "gu": "0-9a-z", "gv": "0-9a-z", "ha": "0-9a-z", "he": "0-9a-z", "hi": "0-9a-z", "ho": "0-9a-z", "hr": "0-9a-z", "ht": "0-9a-z", "hu": "0-9a-z", "hy": "0-9a-z", "hz": "0-9a-z", "ia": "0-9a-z", "id": "0-9a-z", "ie": "0-9a-z", "ig": "0-9a-z", "ii": "0-9a-z", "ik": "0-9a-z", "io": "0-9a-z", "is": "0-9a-zádðéíóúýþæö", "it": "0-9a-z", "iu": "0-9a-z", "ja": "0-9a-z", "jv": "0-9a-z", "ka": "0-9a-zაბგდევზთიკლმნოპჟრსტუფქღყშჩცძწჭხჯჰ", "kg": "0-9a-z", "ki": "0-9a-z", "kj": "0-9a-z", "kk": "0-9a-z", "kl": "0-9a-z", "km": "0-9a-z", "kn": "0-9a-z", "ko": "0-9a-z", "kr": "0-9a-z", "ks": "0-9a-z", "ku": "0-9a-z", "kv": "0-9a-z", "kw": "0-9a-z", "ky": "0-9a-z", "la": "0-9a-z", "lb": "0-9a-z", "lg": "0-9a-z", "li": "0-9a-z", "ln": "0-9a-z", "lo": "0-9a-z", "lt": "0-9a-ząčęėįšųūž", "lu": "0-9a-z", "lv": "0-9a-z", "mg": "0-9a-z", "mh": "0-9a-z", "mi": "0-9a-z", "mk": "0-9a-z", "ml": "0-9a-z", "mn": "0-9a-z", "mr": "0-9a-z", "ms": "0-9a-z", "mt": "0-9a-z", "my": "0-9a-z", "na": "0-9a-z", "nb": "0-9a-z", "nd": "0-9a-z", "ne": "0-9a-z", "ng": "0-9a-z", "nl": "0-9a-z", "nn": "0-9a-z", "no": "0-9a-z", "nr": "0-9a-z", "nv": "0-9a-z", "ny": "0-9a-z", "oc": "0-9a-z", "oj": "0-9a-z", "om": "0-9a-z", "or": "0-9a-z", "os": "0-9a-z", "pa": "0-9a-z", "pi": "0-9a-z", "pl": "0-9a-z", "ps": "0-9a-z", "pt": "0-9a-z", "qu": "0-9a-z", "rm": "0-9a-z", "rn": "0-9a-z", "ro": "0-9a-z", "ru": "0-9a-z", "rw": "0-9a-z", "sa": "0-9a-z", "sc": "0-9a-z", "sd": "0-9a-z", "se": "0-9a-z", "sg": "0-9a-z", "si": "0-9a-z", "sk": "0-9a-z", "sl": "0-9a-z", "sm": "0-9a-z", "sn": "0-9a-z", "so": "0-9a-z", "sq": "0-9a-z", "sr": "0-9a-z", "ss": "0-9a-z", "st": "0-9a-z", "su": "0-9a-z", "sv": "0-9a-z", "sw": "0-9a-z", "ta": "0-9a-z", "te": "0-9a-z", "tg": "0-9a-z", "th": "0-9a-z", "ti": "0-9a-z", "tk": "0-9a-z", "tl": "0-9a-z", "tn": "0-9a-z", "to": "0-9a-z", "tr": "0-9a-zçğüöşı", "ts": "0-9a-z", "tt": "0-9a-z", "tw": "0-9a-z", "ty": "0-9a-z", "ug": "0-9a-z", "uk": "0-9a-z", "ur": "0-9a-z", "uz": "0-9a-z", "ve": "0-9a-z", "vi": "0-9a-z", "vo": "0-9a-z", "wa": "0-9a-z", "wo": "0-9a-z", "xh": "0-9a-z", "yi": "0-9a-z", "yo": "0-9a-z", "za": "0-9a-z", "zh": "0-9a-z", "zu": "0-9a-z", }
class HelpReference: description = "\ Model-leaf uses the Tensorflow implementation of Mask-RCNN by MatterPort and a handful of integration scripts and utilities to simplify training and inference of leaf datasets.\ For information on the different subcommands read the according manual pages\ " help_description = "\ Prints the synopsis and the list of possible options and commands." class GenerateRGBDReference: description = "Dataset preparation and point-cloud generation from the RGB-D images" output = "Set output directory [default: current]" location = "Location to save the dataset files" task = "task id for agrinet datasets" config = "specify config file" dataset_config = "dataset configuration file path" class TrainReference: description = "Creates a dataset of synthetic pictures, and runs the training model on the dataset. The best result model is saved as a .h5 file." output = "specify path to .h5 model location [default: current]" dataset_keep = "specify how many samples to keep [default: 0]" test_set = "specify path to test set" config = "specify path to the model (mask-r cnn) config file" synthetic = "Set the synthetic dataset generator to scatter the leaves randomly (cucumber), or to group the leaves around a base (banana)" leaf_size_min = "Set the minimum size of leaves in the synthetic picture" leaf_size_max = "Set the maximum size of leaves in the synthetic picture" preview_only = "generate samples of training set without training the model" dataset_class = "dataset module and class name to use [eg: 'BananaDataset']" dataset_config = "dataset configuration file path" epochs = "number of training epochs" steps_per_epoch = "number of training steps to perform per epoch" layers = "layers of model to train. Other layers will remain unchanged" pretrain = "path to a .h5 file with a pretrained model, or just 'COCO' to retrieve\ the coco pretrain file. [default: COCO]" class InferReference: description = "Loads a dataset, loads a model, runs inference on all the pictures located in a directory. Outputs a set of pictures with a translucent mask on every detected leaf. Additionally, a json annotation file is generated." output = "Set output directory [default: current]" no_pictures = "Create only infered pictures with colorful transparent masks" no_contours = "Create contour annotation file only" path = "path to directory containing images to infer or path to image to infer" model = "path to .h5 trained model to infer with" no_masks = "do not save mask images" task = "task id for agrinet datasets" gt = "Dataset adapter name" class CutReference: description = "Cut single leaf pictures from an annotated dataset" normalize = "Normalize the generated pictures to the specified width-size. By default pictures are not normalized, every leaf stays at its original size" background = "Specify the background of the leaf, transparent means keep the alpha channel [default: transparent]" limit = "Maximum number of object files to create. Not specifying this argument will result in cutting all the available objects" path = "path to json file in COCO format, with relative image paths" output = "Set output directory [default: current]" adapter = "Type of annotation - specify in order to correctly parse the annotation file" rotate = "Rotate output files to match 2 points from annotation" task = "task id for agrinet datasets" class InfoReference: description = "Prints information about the model saved in the model-info variable" model_path = "Path to a .h5 trained model file" class DownloadReference: description = "Download specific task id to local directory" task_id = "Task id number e.g: 103" location = "Location to save the files"
''' Function: 从尾到头打印链表 Author: Charles ''' # Definition for singly-linked list. # class ListNode: # def __init__(self, x): # self.val = x # self.next = None class Solution: def reversePrint(self, head: ListNode) -> List[int]: if not head: return [] return self.reversePrint(head.next) + [head.val]
# # PySNMP MIB module CTRON-IP-ROUTER-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CTRON-IP-ROUTER-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 17:26:48 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueRangeConstraint, SingleValueConstraint, ConstraintsIntersection, ValueSizeConstraint, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "SingleValueConstraint", "ConstraintsIntersection", "ValueSizeConstraint", "ConstraintsUnion") nwRtrProtoSuites, = mibBuilder.importSymbols("ROUTER-OIDS", "nwRtrProtoSuites") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") Unsigned32, iso, IpAddress, MibScalar, MibTable, MibTableRow, MibTableColumn, NotificationType, Bits, TimeTicks, MibIdentifier, ObjectIdentity, ModuleIdentity, Gauge32, Integer32, Counter32, Counter64 = mibBuilder.importSymbols("SNMPv2-SMI", "Unsigned32", "iso", "IpAddress", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "NotificationType", "Bits", "TimeTicks", "MibIdentifier", "ObjectIdentity", "ModuleIdentity", "Gauge32", "Integer32", "Counter32", "Counter64") DisplayString, PhysAddress, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "PhysAddress", "TextualConvention") nwIpRouter = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1)) nwIpMibs = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 1)) nwIpComponents = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2)) nwIpSystem = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 1)) nwIpForwarding = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2)) nwIpTopology = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4)) nwIpFib = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 5)) nwIpEndSystems = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 6)) nwIpAccessControl = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 7)) nwIpFilters = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 8)) nwIpRedirector = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 9)) nwIpEvent = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 10)) nwIpWorkGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 11)) nwIpClientServices = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 12)) nwIpSysConfig = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 1, 1)) nwIpSysAdministration = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 1, 2)) nwIpFwdSystem = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 1)) nwIpFwdInterfaces = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 2)) nwIpFwdCounters = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 1, 1)) nwIpFwdIfConfig = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 2, 1)) nwIpFwdIfCounters = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 2, 2)) nwIpDistanceVector = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1)) nwIpLinkState = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 2)) nwIpRip = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1)) nwIpRipSystem = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 1)) nwIpRipInterfaces = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 2)) nwIpRipDatabase = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 3)) nwIpRipFilters = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 4)) nwIpRipConfig = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 1, 1)) nwIpRipCounters = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 1, 2)) nwIpRipIfConfig = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 2, 1)) nwIpRipIfCounters = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 2, 2)) nwIpOspf = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 2, 1)) nwIpOspfSystem = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 2, 1, 1)) nwIpOspfInterfaces = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 2, 1, 2)) nwIpOspfDatabase = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 2, 1, 3)) nwIpOspfFilters = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 2, 1, 4)) nwIpOspfConfig = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 2, 1, 1, 1)) nwIpOspfCounters = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 2, 1, 1, 2)) nwIpOspfIfConfig = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 2, 1, 2, 1)) nwIpOspfIfCounters = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 2, 1, 2, 2)) nwIpFibSystem = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 5, 1)) nwIpOspfFib = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 5, 2)) nwIpOspfFibControl = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 5, 2, 1)) nwIpOspfFibEntries = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 5, 2, 2)) nwIpHostsSystem = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 6, 1)) nwIpHostsInterfaces = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 6, 2)) nwIpHostsToMedia = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 6, 3)) nwIpRedirectorSystem = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 9, 1)) nwIpRedirectorInterface = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 9, 2)) nwIpEventLogConfig = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 10, 1)) nwIpEventLogFilterTable = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 10, 2)) nwIpEventLogTable = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 10, 3)) nwIpMibRevText = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 1, 1), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpMibRevText.setStatus('mandatory') nwIpSysRouterId = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 1, 1, 1), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpSysRouterId.setStatus('mandatory') nwIpSysAdminStatus = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 1, 2, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("disabled", 2), ("enabled", 3))).clone('enabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpSysAdminStatus.setStatus('mandatory') nwIpSysOperStatus = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 1, 2, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("other", 1), ("disabled", 2), ("enabled", 3), ("pending-disable", 4), ("pending-enable", 5), ("invalid-config", 6)))).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpSysOperStatus.setStatus('mandatory') nwIpSysAdminReset = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 1, 2, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("other", 1), ("reset", 2))).clone('other')).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpSysAdminReset.setStatus('mandatory') nwIpSysOperationalTime = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 1, 2, 4), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpSysOperationalTime.setStatus('mandatory') nwIpSysVersion = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 1, 2, 5), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpSysVersion.setStatus('mandatory') nwIpFwdCtrAdminStatus = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 1, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("disabled", 2), ("enabled", 3))).clone('enabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpFwdCtrAdminStatus.setStatus('mandatory') nwIpFwdCtrReset = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("other", 1), ("reset", 2))).clone('other')).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpFwdCtrReset.setStatus('mandatory') nwIpFwdCtrOperationalTime = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 1, 1, 3), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpFwdCtrOperationalTime.setStatus('mandatory') nwIpFwdCtrInPkts = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 1, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpFwdCtrInPkts.setStatus('mandatory') nwIpFwdCtrOutPkts = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 1, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpFwdCtrOutPkts.setStatus('mandatory') nwIpFwdCtrFwdPkts = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 1, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpFwdCtrFwdPkts.setStatus('mandatory') nwIpFwdCtrFilteredPkts = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 1, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpFwdCtrFilteredPkts.setStatus('mandatory') nwIpFwdCtrDiscardPkts = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 1, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpFwdCtrDiscardPkts.setStatus('mandatory') nwIpFwdCtrAddrErrPkts = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 1, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpFwdCtrAddrErrPkts.setStatus('mandatory') nwIpFwdCtrLenErrPkts = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 1, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpFwdCtrLenErrPkts.setStatus('mandatory') nwIpFwdCtrHdrErrPkts = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 1, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpFwdCtrHdrErrPkts.setStatus('mandatory') nwIpFwdCtrInBytes = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 1, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpFwdCtrInBytes.setStatus('mandatory') nwIpFwdCtrOutBytes = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 1, 1, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpFwdCtrOutBytes.setStatus('mandatory') nwIpFwdCtrFwdBytes = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 1, 1, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpFwdCtrFwdBytes.setStatus('mandatory') nwIpFwdCtrFilteredBytes = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 1, 1, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpFwdCtrFilteredBytes.setStatus('mandatory') nwIpFwdCtrDiscardBytes = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 1, 1, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpFwdCtrDiscardBytes.setStatus('mandatory') nwIpFwdCtrHostInPkts = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 1, 1, 17), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpFwdCtrHostInPkts.setStatus('mandatory') nwIpFwdCtrHostOutPkts = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 1, 1, 18), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpFwdCtrHostOutPkts.setStatus('mandatory') nwIpFwdCtrHostDiscardPkts = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 1, 1, 19), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpFwdCtrHostDiscardPkts.setStatus('mandatory') nwIpFwdCtrHostInBytes = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 1, 1, 20), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpFwdCtrHostInBytes.setStatus('mandatory') nwIpFwdCtrHostOutBytes = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 1, 1, 21), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpFwdCtrHostOutBytes.setStatus('mandatory') nwIpFwdCtrHostDiscardBytes = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 1, 1, 22), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpFwdCtrHostDiscardBytes.setStatus('mandatory') nwIpFwdIfTable = MibTable((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 2, 1, 1), ) if mibBuilder.loadTexts: nwIpFwdIfTable.setStatus('mandatory') nwIpFwdIfEntry = MibTableRow((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 2, 1, 1, 1), ).setIndexNames((0, "CTRON-IP-ROUTER-MIB", "nwIpFwdIfIndex")) if mibBuilder.loadTexts: nwIpFwdIfEntry.setStatus('mandatory') nwIpFwdIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 2, 1, 1, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpFwdIfIndex.setStatus('mandatory') nwIpFwdIfAdminStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 2, 1, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("disabled", 2), ("enabled", 3))).clone('enabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpFwdIfAdminStatus.setStatus('mandatory') nwIpFwdIfOperStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 2, 1, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("other", 1), ("disabled", 2), ("enabled", 3), ("pending-disable", 4), ("pending-enable", 5), ("invalid-config", 6)))).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpFwdIfOperStatus.setStatus('mandatory') nwIpFwdIfOperationalTime = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 2, 1, 1, 1, 4), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpFwdIfOperationalTime.setStatus('mandatory') nwIpFwdIfControl = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 2, 1, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("add", 2), ("delete", 3))).clone('add')).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpFwdIfControl.setStatus('mandatory') nwIpFwdIfMtu = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 2, 1, 1, 1, 6), Integer32().clone(1500)).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpFwdIfMtu.setStatus('mandatory') nwIpFwdIfForwarding = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 2, 1, 1, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("disabled", 2), ("enabled", 3))).clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpFwdIfForwarding.setStatus('mandatory') nwIpFwdIfFrameType = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 2, 1, 1, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 5, 7, 8, 9, 11, 14, 16, 17))).clone(namedValues=NamedValues(("other", 1), ("ethernet", 2), ("snap", 3), ("slip", 5), ("localtalk", 7), ("nativewan", 8), ("encapenet", 9), ("encapenetsnap", 11), ("encaptrsnap", 14), ("encapfddisnap", 16), ("canonical", 17))).clone('ethernet')).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpFwdIfFrameType.setStatus('mandatory') nwIpFwdIfAclIdentifier = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 2, 1, 1, 1, 9), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpFwdIfAclIdentifier.setStatus('mandatory') nwIpFwdIfAclStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 2, 1, 1, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("disabled", 2), ("enabled", 3))).clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpFwdIfAclStatus.setStatus('mandatory') nwIpFwdIfCacheControl = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 2, 1, 1, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("disable", 2), ("enable", 3))).clone('enable')).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpFwdIfCacheControl.setStatus('mandatory') nwIpFwdIfCacheEntries = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 2, 1, 1, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpFwdIfCacheEntries.setStatus('mandatory') nwIpFwdIfCacheHits = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 2, 1, 1, 1, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpFwdIfCacheHits.setStatus('mandatory') nwIpFwdIfCacheMisses = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 2, 1, 1, 1, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpFwdIfCacheMisses.setStatus('mandatory') nwIpAddressTable = MibTable((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 2, 1, 2), ) if mibBuilder.loadTexts: nwIpAddressTable.setStatus('mandatory') nwIpAddrEntry = MibTableRow((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 2, 1, 2, 1), ).setIndexNames((0, "CTRON-IP-ROUTER-MIB", "nwIpAddrIfIndex"), (0, "CTRON-IP-ROUTER-MIB", "nwIpAddrIfAddress")) if mibBuilder.loadTexts: nwIpAddrEntry.setStatus('mandatory') nwIpAddrIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 2, 1, 2, 1, 1), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpAddrIfIndex.setStatus('mandatory') nwIpAddrIfAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 2, 1, 2, 1, 2), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpAddrIfAddress.setStatus('mandatory') nwIpAddrIfControl = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 2, 1, 2, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("add", 2), ("delete", 3))).clone('add')).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpAddrIfControl.setStatus('mandatory') nwIpAddrIfAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 2, 1, 2, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("other", 1), ("primary", 2), ("secondary", 3), ("workgroup", 4))).clone('primary')).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpAddrIfAddrType.setStatus('mandatory') nwIpAddrIfMask = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 2, 1, 2, 1, 5), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpAddrIfMask.setStatus('mandatory') nwIpAddrIfBcastAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 2, 1, 2, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("zeros", 2), ("ones", 3))).clone('ones')).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpAddrIfBcastAddr.setStatus('mandatory') nwIpFwdIfCtrTable = MibTable((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 2, 2, 1), ) if mibBuilder.loadTexts: nwIpFwdIfCtrTable.setStatus('mandatory') nwIpFwdIfCtrEntry = MibTableRow((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 2, 2, 1, 1), ).setIndexNames((0, "CTRON-IP-ROUTER-MIB", "nwIpFwdIfCtrIfIndex")) if mibBuilder.loadTexts: nwIpFwdIfCtrEntry.setStatus('mandatory') nwIpFwdIfCtrIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 2, 2, 1, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpFwdIfCtrIfIndex.setStatus('mandatory') nwIpFwdIfCtrAdminStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 2, 2, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("disabled", 2), ("enabled", 3))).clone('enabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpFwdIfCtrAdminStatus.setStatus('mandatory') nwIpFwdIfCtrReset = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 2, 2, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("other", 1), ("reset", 2))).clone('other')).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpFwdIfCtrReset.setStatus('mandatory') nwIpFwdIfCtrOperationalTime = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 2, 2, 1, 1, 4), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpFwdIfCtrOperationalTime.setStatus('mandatory') nwIpFwdIfCtrInPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 2, 2, 1, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpFwdIfCtrInPkts.setStatus('mandatory') nwIpFwdIfCtrOutPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 2, 2, 1, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpFwdIfCtrOutPkts.setStatus('mandatory') nwIpFwdIfCtrFwdPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 2, 2, 1, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpFwdIfCtrFwdPkts.setStatus('mandatory') nwIpFwdIfCtrFilteredPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 2, 2, 1, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpFwdIfCtrFilteredPkts.setStatus('mandatory') nwIpFwdIfCtrDiscardPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 2, 2, 1, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpFwdIfCtrDiscardPkts.setStatus('mandatory') nwIpFwdIfCtrAddrErrPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 2, 2, 1, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpFwdIfCtrAddrErrPkts.setStatus('mandatory') nwIpFwdIfCtrLenErrPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 2, 2, 1, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpFwdIfCtrLenErrPkts.setStatus('mandatory') nwIpFwdIfCtrHdrErrPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 2, 2, 1, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpFwdIfCtrHdrErrPkts.setStatus('mandatory') nwIpFwdIfCtrInBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 2, 2, 1, 1, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpFwdIfCtrInBytes.setStatus('mandatory') nwIpFwdIfCtrOutBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 2, 2, 1, 1, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpFwdIfCtrOutBytes.setStatus('mandatory') nwIpFwdIfCtrFwdBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 2, 2, 1, 1, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpFwdIfCtrFwdBytes.setStatus('mandatory') nwIpFwdIfCtrFilteredBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 2, 2, 1, 1, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpFwdIfCtrFilteredBytes.setStatus('mandatory') nwIpFwdIfCtrDiscardBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 2, 2, 1, 1, 17), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpFwdIfCtrDiscardBytes.setStatus('mandatory') nwIpFwdIfCtrHostInPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 2, 2, 1, 1, 18), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpFwdIfCtrHostInPkts.setStatus('mandatory') nwIpFwdIfCtrHostOutPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 2, 2, 1, 1, 19), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpFwdIfCtrHostOutPkts.setStatus('mandatory') nwIpFwdIfCtrHostDiscardPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 2, 2, 1, 1, 20), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpFwdIfCtrHostDiscardPkts.setStatus('mandatory') nwIpFwdIfCtrHostInBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 2, 2, 1, 1, 21), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpFwdIfCtrHostInBytes.setStatus('mandatory') nwIpFwdIfCtrHostOutBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 2, 2, 1, 1, 22), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpFwdIfCtrHostOutBytes.setStatus('mandatory') nwIpFwdIfCtrHostDiscardBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 2, 2, 2, 1, 1, 23), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpFwdIfCtrHostDiscardBytes.setStatus('mandatory') nwIpRipAdminStatus = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 1, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("disabled", 2), ("enabled", 3))).clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpRipAdminStatus.setStatus('mandatory') nwIpRipOperStatus = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("other", 1), ("disabled", 2), ("enabled", 3), ("pending-disable", 4), ("pending-enable", 5), ("invalid-config", 6)))).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpRipOperStatus.setStatus('mandatory') nwIpRipAdminReset = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("other", 1), ("reset", 2))).clone('other')).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpRipAdminReset.setStatus('mandatory') nwIpRipOperationalTime = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 1, 1, 4), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpRipOperationalTime.setStatus('mandatory') nwIpRipVersion = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 1, 1, 5), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpRipVersion.setStatus('mandatory') nwIpRipStackSize = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 1, 1, 6), Integer32().clone(4096)).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpRipStackSize.setStatus('mandatory') nwIpRipThreadPriority = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 1, 1, 7), Integer32().clone(127)).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpRipThreadPriority.setStatus('mandatory') nwIpRipDatabaseThreshold = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 1, 1, 8), Integer32().clone(2000)).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpRipDatabaseThreshold.setStatus('mandatory') nwIpRipAgeOut = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 1, 1, 9), Integer32().clone(210)).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpRipAgeOut.setStatus('mandatory') nwIpRipHoldDown = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 1, 1, 10), Integer32().clone(120)).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpRipHoldDown.setStatus('mandatory') nwIpRipCtrAdminStatus = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 1, 2, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("disabled", 2), ("enabled", 3))).clone('enabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpRipCtrAdminStatus.setStatus('mandatory') nwIpRipCtrReset = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 1, 2, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("other", 1), ("reset", 2))).clone('other')).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpRipCtrReset.setStatus('mandatory') nwIpRipCtrOperationalTime = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 1, 2, 3), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpRipCtrOperationalTime.setStatus('mandatory') nwIpRipCtrInPkts = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 1, 2, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpRipCtrInPkts.setStatus('mandatory') nwIpRipCtrOutPkts = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 1, 2, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpRipCtrOutPkts.setStatus('mandatory') nwIpRipCtrFilteredPkts = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 1, 2, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpRipCtrFilteredPkts.setStatus('mandatory') nwIpRipCtrDiscardPkts = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 1, 2, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpRipCtrDiscardPkts.setStatus('mandatory') nwIpRipCtrInBytes = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 1, 2, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpRipCtrInBytes.setStatus('mandatory') nwIpRipCtrOutBytes = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 1, 2, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpRipCtrOutBytes.setStatus('mandatory') nwIpRipCtrFilteredBytes = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 1, 2, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpRipCtrFilteredBytes.setStatus('mandatory') nwIpRipCtrDiscardBytes = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 1, 2, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpRipCtrDiscardBytes.setStatus('mandatory') nwIpRipIfTable = MibTable((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 2, 1, 1), ) if mibBuilder.loadTexts: nwIpRipIfTable.setStatus('mandatory') nwIpRipIfEntry = MibTableRow((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 2, 1, 1, 1), ).setIndexNames((0, "CTRON-IP-ROUTER-MIB", "nwIpRipIfIndex")) if mibBuilder.loadTexts: nwIpRipIfEntry.setStatus('mandatory') nwIpRipIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 2, 1, 1, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpRipIfIndex.setStatus('mandatory') nwIpRipIfAdminStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 2, 1, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("disabled", 2), ("enabled", 3))).clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpRipIfAdminStatus.setStatus('mandatory') nwIpRipIfOperStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 2, 1, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("other", 1), ("disabled", 2), ("enabled", 3), ("pending-disable", 4), ("pending-enable", 5)))).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpRipIfOperStatus.setStatus('mandatory') nwIpRipIfOperationalTime = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 2, 1, 1, 1, 4), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpRipIfOperationalTime.setStatus('mandatory') nwIpRipIfVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 2, 1, 1, 1, 5), Integer32().clone(1)).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpRipIfVersion.setStatus('mandatory') nwIpRipIfAdvertisement = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 2, 1, 1, 1, 6), Integer32().clone(30)).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpRipIfAdvertisement.setStatus('mandatory') nwIpRipIfFloodDelay = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 2, 1, 1, 1, 7), Integer32().clone(2)).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpRipIfFloodDelay.setStatus('mandatory') nwIpRipIfRequestDelay = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 2, 1, 1, 1, 8), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpRipIfRequestDelay.setStatus('mandatory') nwIpRipIfPriority = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 2, 1, 1, 1, 9), Integer32().clone(1)).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpRipIfPriority.setStatus('mandatory') nwIpRipIfHelloTimer = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 2, 1, 1, 1, 10), Integer32().clone(10)).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpRipIfHelloTimer.setStatus('mandatory') nwIpRipIfSplitHorizon = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 2, 1, 1, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("disabled", 2), ("enabled", 3))).clone('enabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpRipIfSplitHorizon.setStatus('mandatory') nwIpRipIfPoisonReverse = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 2, 1, 1, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("disabled", 2), ("enabled", 3))).clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpRipIfPoisonReverse.setStatus('mandatory') nwIpRipIfSnooping = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 2, 1, 1, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("disabled", 2), ("enabled", 3))).clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpRipIfSnooping.setStatus('mandatory') nwIpRipIfType = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 2, 1, 1, 1, 14), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("bma", 2), ("nbma", 3))).clone('bma')).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpRipIfType.setStatus('mandatory') nwIpRipIfXmitCost = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 2, 1, 1, 1, 15), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpRipIfXmitCost.setStatus('mandatory') nwIpRipIfAclIdentifier = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 2, 1, 1, 1, 16), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpRipIfAclIdentifier.setStatus('mandatory') nwIpRipIfAclStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 2, 1, 1, 1, 17), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("disabled", 2), ("enabled", 3))).clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpRipIfAclStatus.setStatus('mandatory') nwIpRipIfCtrTable = MibTable((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 2, 2, 1), ) if mibBuilder.loadTexts: nwIpRipIfCtrTable.setStatus('mandatory') nwIpRipIfCtrEntry = MibTableRow((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 2, 2, 1, 1), ).setIndexNames((0, "CTRON-IP-ROUTER-MIB", "nwIpRipIfCtrIfIndex")) if mibBuilder.loadTexts: nwIpRipIfCtrEntry.setStatus('mandatory') nwIpRipIfCtrIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 2, 2, 1, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpRipIfCtrIfIndex.setStatus('mandatory') nwIpRipIfCtrAdminStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 2, 2, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("disabled", 2), ("enabled", 3))).clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpRipIfCtrAdminStatus.setStatus('mandatory') nwIpRipIfCtrReset = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 2, 2, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("other", 1), ("reset", 2))).clone('other')).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpRipIfCtrReset.setStatus('mandatory') nwIpRipIfCtrOperationalTime = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 2, 2, 1, 1, 4), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpRipIfCtrOperationalTime.setStatus('mandatory') nwIpRipIfCtrInPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 2, 2, 1, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpRipIfCtrInPkts.setStatus('mandatory') nwIpRipIfCtrOutPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 2, 2, 1, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpRipIfCtrOutPkts.setStatus('mandatory') nwIpRipIfCtrFilteredPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 2, 2, 1, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpRipIfCtrFilteredPkts.setStatus('mandatory') nwIpRipIfCtrDiscardPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 2, 2, 1, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpRipIfCtrDiscardPkts.setStatus('mandatory') nwIpRipIfCtrInBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 2, 2, 1, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpRipIfCtrInBytes.setStatus('mandatory') nwIpRipIfCtrOutBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 2, 2, 1, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpRipIfCtrOutBytes.setStatus('mandatory') nwIpRipIfCtrFilteredBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 2, 2, 1, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpRipIfCtrFilteredBytes.setStatus('mandatory') nwIpRipIfCtrDiscardBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 2, 2, 1, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpRipIfCtrDiscardBytes.setStatus('mandatory') nwIpRipRouteTable = MibTable((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 3, 1), ) if mibBuilder.loadTexts: nwIpRipRouteTable.setStatus('mandatory') nwIpRipRouteEntry = MibTableRow((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 3, 1, 1), ).setIndexNames((0, "CTRON-IP-ROUTER-MIB", "nwIpRipRtNetId"), (0, "CTRON-IP-ROUTER-MIB", "nwIpRipRtIfIndex"), (0, "CTRON-IP-ROUTER-MIB", "nwIpRipRtSrcNode")) if mibBuilder.loadTexts: nwIpRipRouteEntry.setStatus('mandatory') nwIpRipRtNetId = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 3, 1, 1, 1), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpRipRtNetId.setStatus('mandatory') nwIpRipRtIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 3, 1, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpRipRtIfIndex.setStatus('mandatory') nwIpRipRtSrcNode = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 3, 1, 1, 3), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpRipRtSrcNode.setStatus('mandatory') nwIpRipRtMask = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 3, 1, 1, 4), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpRipRtMask.setStatus('mandatory') nwIpRipRtHops = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 3, 1, 1, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpRipRtHops.setStatus('mandatory') nwIpRipRtAge = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 3, 1, 1, 6), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpRipRtAge.setStatus('mandatory') nwIpRipRtType = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 3, 1, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("other", 1), ("invalid", 2), ("direct", 3), ("remote", 4), ("static", 5), ("ospf", 6)))).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpRipRtType.setStatus('mandatory') nwIpRipRtFlags = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 1, 1, 3, 1, 1, 8), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpRipRtFlags.setStatus('mandatory') nwIpOspfAdminStatus = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 2, 1, 1, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("disabled", 2), ("enabled", 3))).clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpOspfAdminStatus.setStatus('mandatory') nwIpOspfOperStatus = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 2, 1, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("other", 1), ("disabled", 2), ("enabled", 3), ("pending-disable", 4), ("pending-enable", 5)))).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpOspfOperStatus.setStatus('mandatory') nwIpOspfAdminReset = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 2, 1, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("other", 1), ("reset", 2))).clone('other')).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpOspfAdminReset.setStatus('mandatory') nwIpOspfOperationalTime = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 2, 1, 1, 1, 4), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpOspfOperationalTime.setStatus('mandatory') nwIpOspfVersion = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 2, 1, 1, 1, 5), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpOspfVersion.setStatus('mandatory') nwIpOspfStackSize = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 2, 1, 1, 1, 6), Integer32().clone(50000)).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpOspfStackSize.setStatus('mandatory') nwIpOspfThreadPriority = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 2, 1, 1, 1, 7), Integer32().clone(127)).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpOspfThreadPriority.setStatus('mandatory') nwIpOspfCtrAdminStatus = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 2, 1, 1, 2, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("disabled", 2), ("enabled", 3))).clone('enabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpOspfCtrAdminStatus.setStatus('mandatory') nwIpOspfCtrReset = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 2, 1, 1, 2, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("other", 1), ("reset", 2))).clone('other')).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpOspfCtrReset.setStatus('mandatory') nwIpOspfCtrOperationalTime = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 2, 1, 1, 2, 3), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpOspfCtrOperationalTime.setStatus('mandatory') nwIpOspfCtrInPkts = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 2, 1, 1, 2, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpOspfCtrInPkts.setStatus('mandatory') nwIpOspfCtrOutPkts = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 2, 1, 1, 2, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpOspfCtrOutPkts.setStatus('mandatory') nwIpOspfCtrFilteredPkts = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 2, 1, 1, 2, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpOspfCtrFilteredPkts.setStatus('mandatory') nwIpOspfCtrDiscardPkts = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 2, 1, 1, 2, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpOspfCtrDiscardPkts.setStatus('mandatory') nwIpOspfCtrInBytes = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 2, 1, 1, 2, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpOspfCtrInBytes.setStatus('mandatory') nwIpOspfCtrOutBytes = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 2, 1, 1, 2, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpOspfCtrOutBytes.setStatus('mandatory') nwIpOspfCtrFilteredBytes = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 2, 1, 1, 2, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpOspfCtrFilteredBytes.setStatus('mandatory') nwIpOspfCtrDiscardBytes = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 2, 1, 1, 2, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpOspfCtrDiscardBytes.setStatus('mandatory') nwIpOspfIfTable = MibTable((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 2, 1, 2, 1, 1), ) if mibBuilder.loadTexts: nwIpOspfIfTable.setStatus('mandatory') nwIpOspfIfEntry = MibTableRow((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 2, 1, 2, 1, 1, 1), ).setIndexNames((0, "CTRON-IP-ROUTER-MIB", "nwIpOspfIfIndex")) if mibBuilder.loadTexts: nwIpOspfIfEntry.setStatus('mandatory') nwIpOspfIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 2, 1, 2, 1, 1, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpOspfIfIndex.setStatus('mandatory') nwIpOspfIfAdminStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 2, 1, 2, 1, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("disabled", 2), ("enabled", 3))).clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpOspfIfAdminStatus.setStatus('mandatory') nwIpOspfIfOperStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 2, 1, 2, 1, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("other", 1), ("disabled", 2), ("enabled", 3), ("pending-disable", 4), ("pending-enable", 5)))).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpOspfIfOperStatus.setStatus('mandatory') nwIpOspfIfOperationalTime = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 2, 1, 2, 1, 1, 1, 4), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpOspfIfOperationalTime.setStatus('mandatory') nwIpOspfIfVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 2, 1, 2, 1, 1, 1, 5), Integer32().clone(1)).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpOspfIfVersion.setStatus('mandatory') nwIpOspfIfSnooping = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 2, 1, 2, 1, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("disabled", 2), ("enabled", 3))).clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpOspfIfSnooping.setStatus('mandatory') nwIpOspfIfType = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 2, 1, 2, 1, 1, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("bma", 2), ("nbma", 3))).clone('bma')).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpOspfIfType.setStatus('mandatory') nwIpOspfIfAclIdentifier = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 2, 1, 2, 1, 1, 1, 8), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpOspfIfAclIdentifier.setStatus('mandatory') nwIpOspfIfAclStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 2, 1, 2, 1, 1, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("disabled", 2), ("enabled", 3))).clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpOspfIfAclStatus.setStatus('mandatory') nwIpOspfIfCtrTable = MibTable((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 2, 1, 2, 2, 1), ) if mibBuilder.loadTexts: nwIpOspfIfCtrTable.setStatus('mandatory') nwIpOspfIfCtrEntry = MibTableRow((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 2, 1, 2, 2, 1, 1), ).setIndexNames((0, "CTRON-IP-ROUTER-MIB", "nwIpOspfIfCtrIfIndex")) if mibBuilder.loadTexts: nwIpOspfIfCtrEntry.setStatus('mandatory') nwIpOspfIfCtrIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 2, 1, 2, 2, 1, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpOspfIfCtrIfIndex.setStatus('mandatory') nwIpOspfIfCtrAdminStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 2, 1, 2, 2, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("disabled", 2), ("enabled", 3))).clone('enabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpOspfIfCtrAdminStatus.setStatus('mandatory') nwIpOspfIfCtrReset = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 2, 1, 2, 2, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("other", 1), ("reset", 2))).clone('other')).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpOspfIfCtrReset.setStatus('mandatory') nwIpOspfIfCtrOperationalTime = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 2, 1, 2, 2, 1, 1, 4), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpOspfIfCtrOperationalTime.setStatus('mandatory') nwIpOspfIfCtrInPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 2, 1, 2, 2, 1, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpOspfIfCtrInPkts.setStatus('mandatory') nwIpOspfIfCtrOutPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 2, 1, 2, 2, 1, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpOspfIfCtrOutPkts.setStatus('mandatory') nwIpOspfIfCtrFilteredPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 2, 1, 2, 2, 1, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpOspfIfCtrFilteredPkts.setStatus('mandatory') nwIpOspfIfCtrDiscardPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 2, 1, 2, 2, 1, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpOspfIfCtrDiscardPkts.setStatus('mandatory') nwIpOspfIfCtrInBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 2, 1, 2, 2, 1, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpOspfIfCtrInBytes.setStatus('mandatory') nwIpOspfIfCtrOutBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 2, 1, 2, 2, 1, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpOspfIfCtrOutBytes.setStatus('mandatory') nwIpOspfIfCtrFilteredBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 2, 1, 2, 2, 1, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpOspfIfCtrFilteredBytes.setStatus('mandatory') nwIpOspfIfCtrDiscardBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 4, 2, 1, 2, 2, 1, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpOspfIfCtrDiscardBytes.setStatus('mandatory') nwIpRipRoutePriority = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 5, 1, 1), Integer32().clone(16)).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpRipRoutePriority.setStatus('mandatory') nwIpOSPFRoutePriority = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 5, 1, 2), Integer32().clone(32)).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpOSPFRoutePriority.setStatus('mandatory') nwIpStaticRoutePriority = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 5, 1, 3), Integer32().clone(48)).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpStaticRoutePriority.setStatus('mandatory') nwIpOspfForward = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 5, 2, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpOspfForward.setStatus('mandatory') nwIpOspfLeakAllStaticRoutes = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 5, 2, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(2, 1))).clone(namedValues=NamedValues(("disabled", 2), ("enabled", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpOspfLeakAllStaticRoutes.setStatus('mandatory') nwIpOspfLeakAllRipRoutes = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 5, 2, 1, 3), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpOspfLeakAllRipRoutes.setStatus('mandatory') nwIpOspfLeakAllBgp4Routes = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 5, 2, 1, 4), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpOspfLeakAllBgp4Routes.setStatus('mandatory') nwIpOspfStaticTable = MibTable((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 5, 2, 2, 1), ) if mibBuilder.loadTexts: nwIpOspfStaticTable.setStatus('mandatory') nwIpOspfStaticEntry = MibTableRow((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 5, 2, 2, 1, 1), ).setIndexNames((0, "CTRON-IP-ROUTER-MIB", "nwIpOspfStaticDest"), (0, "CTRON-IP-ROUTER-MIB", "nwIpOspfStaticForwardMask"), (0, "CTRON-IP-ROUTER-MIB", "nwIpOspfStaticNextHop")) if mibBuilder.loadTexts: nwIpOspfStaticEntry.setStatus('mandatory') nwIpOspfStaticDest = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 5, 2, 2, 1, 1, 1), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpOspfStaticDest.setStatus('mandatory') nwIpOspfStaticForwardMask = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 5, 2, 2, 1, 1, 2), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpOspfStaticForwardMask.setStatus('mandatory') nwIpOspfStaticNextHop = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 5, 2, 2, 1, 1, 3), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpOspfStaticNextHop.setStatus('mandatory') nwIpOspfStaticMetric = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 5, 2, 2, 1, 1, 4), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpOspfStaticMetric.setStatus('mandatory') nwIpOspfStaticMetricType = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 5, 2, 2, 1, 1, 5), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpOspfStaticMetricType.setStatus('mandatory') nwIpOspfStaticStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 5, 2, 2, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("inactive", 1), ("active", 2), ("delete", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpOspfStaticStatus.setStatus('mandatory') nwIpOspfDynamicTable = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 5, 2, 2, 2)) nwIpOspfRipTable = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 5, 2, 2, 3)) nwIpOspfBgp4Table = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 5, 2, 2, 4)) nwIpHostsTimeToLive = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 6, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpHostsTimeToLive.setStatus('mandatory') nwIpHostsRetryCount = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 6, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpHostsRetryCount.setStatus('mandatory') nwIpHostCtlTable = MibTable((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 6, 2, 1), ) if mibBuilder.loadTexts: nwIpHostCtlTable.setStatus('mandatory') nwIpHostCtlEntry = MibTableRow((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 6, 2, 1, 1), ).setIndexNames((0, "CTRON-IP-ROUTER-MIB", "nwIpHostCtlIfIndex")) if mibBuilder.loadTexts: nwIpHostCtlEntry.setStatus('mandatory') nwIpHostCtlIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 6, 2, 1, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpHostCtlIfIndex.setStatus('mandatory') nwIpHostCtlAdminStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 6, 2, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("disable", 2), ("enable", 3))).clone('enable')).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpHostCtlAdminStatus.setStatus('mandatory') nwIpHostCtlOperStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 6, 2, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("other", 1), ("disabled", 2), ("enabled", 3), ("pending-disable", 4), ("pending-enable", 5)))).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpHostCtlOperStatus.setStatus('mandatory') nwIpHostCtlOperationalTime = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 6, 2, 1, 1, 4), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpHostCtlOperationalTime.setStatus('mandatory') nwIpHostCtlProtocol = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 6, 2, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("disable", 2), ("enable", 3))).clone('enable')).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpHostCtlProtocol.setStatus('mandatory') nwIpHostCtlSnooping = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 6, 2, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("disable", 2), ("enable", 3))).clone('disable')).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpHostCtlSnooping.setStatus('mandatory') nwIpHostCtlProxy = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 6, 2, 1, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("disable", 2), ("enable", 3))).clone('disable')).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpHostCtlProxy.setStatus('mandatory') nwIpHostCtlCacheMax = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 6, 2, 1, 1, 8), Integer32().clone(1024)).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpHostCtlCacheMax.setStatus('mandatory') nwIpHostCtlCacheSize = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 6, 2, 1, 1, 9), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpHostCtlCacheSize.setStatus('mandatory') nwIpHostCtlNumStatics = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 6, 2, 1, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpHostCtlNumStatics.setStatus('mandatory') nwIpHostCtlNumDynamics = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 6, 2, 1, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpHostCtlNumDynamics.setStatus('mandatory') nwIpHostCtlCacheHits = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 6, 2, 1, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpHostCtlCacheHits.setStatus('mandatory') nwIpHostCtlCacheMisses = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 6, 2, 1, 1, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpHostCtlCacheMisses.setStatus('mandatory') nwIpHostMapTable = MibTable((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 6, 3, 1), ) if mibBuilder.loadTexts: nwIpHostMapTable.setStatus('mandatory') nwIpHostMapEntry = MibTableRow((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 6, 3, 1, 1), ).setIndexNames((0, "CTRON-IP-ROUTER-MIB", "nwIpHostMapIfIndex"), (0, "CTRON-IP-ROUTER-MIB", "nwIpHostMapIpAddr")) if mibBuilder.loadTexts: nwIpHostMapEntry.setStatus('mandatory') nwIpHostMapIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 6, 3, 1, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpHostMapIfIndex.setStatus('mandatory') nwIpHostMapIpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 6, 3, 1, 1, 2), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpHostMapIpAddr.setStatus('mandatory') nwIpHostMapPhysAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 6, 3, 1, 1, 3), PhysAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpHostMapPhysAddr.setStatus('mandatory') nwIpHostMapType = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 6, 3, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("other", 1), ("invalid", 2), ("dynamic", 3), ("static", 4), ("inactive", 5)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpHostMapType.setStatus('mandatory') nwIpHostMapCircuitID = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 6, 3, 1, 1, 5), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpHostMapCircuitID.setStatus('mandatory') nwIpHostMapFraming = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 6, 3, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 5, 7, 8, 9, 11, 14, 16, 17))).clone(namedValues=NamedValues(("other", 1), ("ethernet", 2), ("snap", 3), ("slip", 5), ("localtalk", 7), ("nativewan", 8), ("encapenet", 9), ("encapenetsnap", 11), ("encaptrsnap", 14), ("encapfddisnap", 16), ("canonical", 17)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpHostMapFraming.setStatus('mandatory') nwIpHostMapPortNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 6, 3, 1, 1, 7), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpHostMapPortNumber.setStatus('mandatory') nwIpAclValidEntries = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 7, 1), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpAclValidEntries.setStatus('mandatory') nwIpAclTable = MibTable((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 7, 2), ) if mibBuilder.loadTexts: nwIpAclTable.setStatus('mandatory') nwIpAclEntry = MibTableRow((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 7, 2, 1), ).setIndexNames((0, "CTRON-IP-ROUTER-MIB", "nwIpAclIdentifier"), (0, "CTRON-IP-ROUTER-MIB", "nwIpAclSequence")) if mibBuilder.loadTexts: nwIpAclEntry.setStatus('mandatory') nwIpAclIdentifier = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 7, 2, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpAclIdentifier.setStatus('mandatory') nwIpAclSequence = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 7, 2, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpAclSequence.setStatus('mandatory') nwIpAclPermission = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 7, 2, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("other", 1), ("invalid", 2), ("permit", 3), ("deny", 4), ("permit-bidirectional", 5), ("deny-bidirectional", 6))).clone('permit')).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpAclPermission.setStatus('mandatory') nwIpAclMatches = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 7, 2, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpAclMatches.setStatus('mandatory') nwIpAclDestAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 7, 2, 1, 5), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpAclDestAddress.setStatus('mandatory') nwIpAclDestMask = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 7, 2, 1, 6), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpAclDestMask.setStatus('mandatory') nwIpAclSrcAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 7, 2, 1, 7), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpAclSrcAddress.setStatus('mandatory') nwIpAclSrcMask = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 7, 2, 1, 8), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpAclSrcMask.setStatus('mandatory') nwIpAclProtocol = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 7, 2, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("other", 1), ("all", 2), ("icmp", 3), ("udp", 4), ("tcp", 5))).clone('all')).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpAclProtocol.setStatus('mandatory') nwIpAclPortNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 7, 2, 1, 10), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpAclPortNumber.setStatus('mandatory') nwIpRedirectTable = MibTable((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 9, 1, 1), ) if mibBuilder.loadTexts: nwIpRedirectTable.setStatus('mandatory') nwIpRedirectEntry = MibTableRow((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 9, 1, 1, 1), ).setIndexNames((0, "CTRON-IP-ROUTER-MIB", "nwIpRedirectPort")) if mibBuilder.loadTexts: nwIpRedirectEntry.setStatus('mandatory') nwIpRedirectPort = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 9, 1, 1, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpRedirectPort.setStatus('mandatory') nwIpRedirectAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 9, 1, 1, 1, 2), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpRedirectAddress.setStatus('mandatory') nwIpRedirectType = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 9, 1, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("forward", 1), ("delete", 2))).clone('forward')).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpRedirectType.setStatus('mandatory') nwIpRedirectCount = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 9, 1, 1, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpRedirectCount.setStatus('mandatory') nwIpEventAdminStatus = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 10, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("disabled", 2), ("enabled", 3))).clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpEventAdminStatus.setStatus('mandatory') nwIpEventMaxEntries = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 10, 1, 2), Integer32().clone(100)).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpEventMaxEntries.setStatus('mandatory') nwIpEventTraceAll = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 10, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("disabled", 2), ("enabled", 3))).clone('enabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpEventTraceAll.setStatus('mandatory') nwIpEventFilterTable = MibTable((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 10, 2, 1), ) if mibBuilder.loadTexts: nwIpEventFilterTable.setStatus('mandatory') nwIpEventFilterEntry = MibTableRow((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 10, 2, 1, 1), ).setIndexNames((0, "CTRON-IP-ROUTER-MIB", "nwIpEventFltrProtocol"), (0, "CTRON-IP-ROUTER-MIB", "nwIpEventFltrIfNum")) if mibBuilder.loadTexts: nwIpEventFilterEntry.setStatus('mandatory') nwIpEventFltrProtocol = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 10, 2, 1, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpEventFltrProtocol.setStatus('mandatory') nwIpEventFltrIfNum = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 10, 2, 1, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpEventFltrIfNum.setStatus('mandatory') nwIpEventFltrControl = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 10, 2, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("delete", 2), ("add", 3))).clone('add')).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpEventFltrControl.setStatus('mandatory') nwIpEventFltrType = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 10, 2, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 4, 8, 16, 32, 64))).clone(namedValues=NamedValues(("misc", 1), ("timer", 2), ("rcv", 4), ("xmit", 8), ("event", 16), ("diags", 32), ("error", 64))).clone('error')).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpEventFltrType.setStatus('mandatory') nwIpEventFltrSeverity = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 10, 2, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("highest", 1), ("highmed", 2), ("highlow", 3))).clone('highest')).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpEventFltrSeverity.setStatus('mandatory') nwIpEventFltrAction = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 10, 2, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("log", 1), ("trap", 2), ("log-trap", 3))).clone('log')).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpEventFltrAction.setStatus('mandatory') nwIpEventTable = MibTable((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 10, 3, 1), ) if mibBuilder.loadTexts: nwIpEventTable.setStatus('mandatory') nwIpEventEntry = MibTableRow((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 10, 3, 1, 1), ).setIndexNames((0, "CTRON-IP-ROUTER-MIB", "nwIpEventNumber")) if mibBuilder.loadTexts: nwIpEventEntry.setStatus('mandatory') nwIpEventNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 10, 3, 1, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpEventNumber.setStatus('mandatory') nwIpEventTime = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 10, 3, 1, 1, 2), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpEventTime.setStatus('mandatory') nwIpEventType = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 10, 3, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 4, 8, 16, 32, 64))).clone(namedValues=NamedValues(("misc", 1), ("timer", 2), ("rcv", 4), ("xmit", 8), ("event", 16), ("diags", 32), ("error", 64)))).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpEventType.setStatus('mandatory') nwIpEventSeverity = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 10, 3, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("highest", 1), ("highmed", 2), ("highlow", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpEventSeverity.setStatus('mandatory') nwIpEventProtocol = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 10, 3, 1, 1, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpEventProtocol.setStatus('mandatory') nwIpEventIfNum = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 10, 3, 1, 1, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpEventIfNum.setStatus('mandatory') nwIpEventTextString = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 10, 3, 1, 1, 7), OctetString()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpEventTextString.setStatus('mandatory') nwIpWgDefTable = MibTable((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 11, 1), ) if mibBuilder.loadTexts: nwIpWgDefTable.setStatus('mandatory') nwIpWgDefEntry = MibTableRow((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 11, 1, 1), ).setIndexNames((0, "CTRON-IP-ROUTER-MIB", "nwIpWgDefIdentifier")) if mibBuilder.loadTexts: nwIpWgDefEntry.setStatus('mandatory') nwIpWgDefIdentifier = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 11, 1, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpWgDefIdentifier.setStatus('mandatory') nwIpWgDefHostAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 11, 1, 1, 2), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpWgDefHostAddress.setStatus('mandatory') nwIpWgDefSubnetMask = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 11, 1, 1, 3), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpWgDefSubnetMask.setStatus('mandatory') nwIpWgDefSecurity = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 11, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("none", 1), ("low", 2), ("medium", 3), ("high", 4))).clone('low')).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpWgDefSecurity.setStatus('mandatory') nwIpWgDefFastPath = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 11, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("disabled", 2), ("enabled", 3))).clone('enabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpWgDefFastPath.setStatus('mandatory') nwIpWgDefRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 11, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("active", 1), ("notInService", 2), ("notReady", 3), ("createAndGo", 4), ("createAndWait", 5), ("destroy", 6))).clone('notReady')).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpWgDefRowStatus.setStatus('mandatory') nwIpWgDefOperStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 11, 1, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("ok", 1), ("disabled", 2), ("subnetConflict", 3), ("internalError", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpWgDefOperStatus.setStatus('mandatory') nwIpWgDefNumActiveIntf = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 11, 1, 1, 8), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpWgDefNumActiveIntf.setStatus('mandatory') nwIpWgDefNumTotalIntf = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 11, 1, 1, 9), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpWgDefNumTotalIntf.setStatus('mandatory') nwIpWgIfTable = MibTable((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 11, 2), ) if mibBuilder.loadTexts: nwIpWgIfTable.setStatus('mandatory') nwIpWgIfEntry = MibTableRow((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 11, 2, 1), ).setIndexNames((0, "CTRON-IP-ROUTER-MIB", "nwIpWgIfDefIdent"), (0, "CTRON-IP-ROUTER-MIB", "nwIpWgIfIfIndex")) if mibBuilder.loadTexts: nwIpWgIfEntry.setStatus('mandatory') nwIpWgIfDefIdent = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 11, 2, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpWgIfDefIdent.setStatus('mandatory') nwIpWgIfIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 11, 2, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpWgIfIfIndex.setStatus('mandatory') nwIpWgIfNumActiveHosts = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 11, 2, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpWgIfNumActiveHosts.setStatus('mandatory') nwIpWgIfNumKnownHosts = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 11, 2, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpWgIfNumKnownHosts.setStatus('mandatory') nwIpWgIfRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 11, 2, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("active", 1), ("notInService", 2), ("notReady", 3), ("createAndGo", 4), ("createAndWait", 5), ("destroy", 6))).clone('notInService')).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpWgIfRowStatus.setStatus('mandatory') nwIpWgIfOperStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 11, 2, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8))).clone(namedValues=NamedValues(("ok", 1), ("disabled", 2), ("workgroupInvalid", 3), ("addressConflict", 4), ("resetRequired", 5), ("linkDown", 6), ("routingDown", 7), ("internalError", 8)))).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpWgIfOperStatus.setStatus('mandatory') nwIpWgRngTable = MibTable((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 11, 3), ) if mibBuilder.loadTexts: nwIpWgRngTable.setStatus('mandatory') nwIpWgRngEntry = MibTableRow((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 11, 3, 1), ).setIndexNames((0, "CTRON-IP-ROUTER-MIB", "nwIpWgRngBegHostAddr"), (0, "CTRON-IP-ROUTER-MIB", "nwIpWgRngEndHostAddr"), (0, "CTRON-IP-ROUTER-MIB", "nwIpWgRngIfIndex")) if mibBuilder.loadTexts: nwIpWgRngEntry.setStatus('mandatory') nwIpWgRngBegHostAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 11, 3, 1, 1), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpWgRngBegHostAddr.setStatus('mandatory') nwIpWgRngEndHostAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 11, 3, 1, 2), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpWgRngEndHostAddr.setStatus('mandatory') nwIpWgRngIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 11, 3, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpWgRngIfIndex.setStatus('mandatory') nwIpWgRngPhysAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 11, 3, 1, 4), OctetString().clone(hexValue="000000000000")).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpWgRngPhysAddr.setStatus('mandatory') nwIpWgRngRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 11, 3, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("active", 1), ("notInService", 2), ("notReady", 3), ("createAndGo", 4), ("createAndWait", 5), ("destroy", 6))).clone('notInService')).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwIpWgRngRowStatus.setStatus('mandatory') nwIpWgRngOperStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 11, 3, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("ok", 1), ("disabled", 2), ("workgroupInvalid", 3), ("interfaceInvalid", 4), ("physAddrRequired", 5), ("internalError", 6)))).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpWgRngOperStatus.setStatus('mandatory') nwIpWgHostTable = MibTable((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 11, 4), ) if mibBuilder.loadTexts: nwIpWgHostTable.setStatus('mandatory') nwIpWgHostEntry = MibTableRow((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 11, 4, 1), ).setIndexNames((0, "CTRON-IP-ROUTER-MIB", "nwIpWgHostHostAddr"), (0, "CTRON-IP-ROUTER-MIB", "nwIpWgHostIfIndex")) if mibBuilder.loadTexts: nwIpWgHostEntry.setStatus('mandatory') nwIpWgHostHostAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 11, 4, 1, 1), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpWgHostHostAddr.setStatus('mandatory') nwIpWgHostIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 11, 4, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpWgHostIfIndex.setStatus('mandatory') nwIpWgHostDefIdent = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 11, 4, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpWgHostDefIdent.setStatus('mandatory') nwIpWgHostPhysAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 11, 4, 1, 4), OctetString()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpWgHostPhysAddr.setStatus('mandatory') nwIpWgHostStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 2, 2, 3, 1, 2, 11, 4, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9))).clone(namedValues=NamedValues(("other", 1), ("unknown", 2), ("valid", 3), ("invalid-multiple", 4), ("invalid-physaddr", 5), ("invalid-range", 6), ("invalid-interface", 7), ("invalid-workgroup", 8), ("invalid-expired", 9)))).setMaxAccess("readonly") if mibBuilder.loadTexts: nwIpWgHostStatus.setStatus('mandatory') mibBuilder.exportSymbols("CTRON-IP-ROUTER-MIB", nwIpRipIfCtrDiscardBytes=nwIpRipIfCtrDiscardBytes, nwIpOspfCounters=nwIpOspfCounters, nwIpRipIfFloodDelay=nwIpRipIfFloodDelay, nwIpOspfCtrInBytes=nwIpOspfCtrInBytes, nwIpFwdIfCtrInPkts=nwIpFwdIfCtrInPkts, nwIpEventAdminStatus=nwIpEventAdminStatus, nwIpRipRtFlags=nwIpRipRtFlags, nwIpWorkGroup=nwIpWorkGroup, nwIpHostCtlAdminStatus=nwIpHostCtlAdminStatus, nwIpOspfCtrOutPkts=nwIpOspfCtrOutPkts, nwIpRipIfOperStatus=nwIpRipIfOperStatus, nwIpFwdIfCtrTable=nwIpFwdIfCtrTable, nwIpEventProtocol=nwIpEventProtocol, nwIpRipRouteTable=nwIpRipRouteTable, nwIpComponents=nwIpComponents, nwIpRipIfAclStatus=nwIpRipIfAclStatus, nwIpAclProtocol=nwIpAclProtocol, nwIpWgRngIfIndex=nwIpWgRngIfIndex, nwIpWgIfRowStatus=nwIpWgIfRowStatus, nwIpAddrIfAddress=nwIpAddrIfAddress, nwIpEventLogTable=nwIpEventLogTable, nwIpHostsToMedia=nwIpHostsToMedia, nwIpAclEntry=nwIpAclEntry, nwIpFwdCtrHostOutBytes=nwIpFwdCtrHostOutBytes, nwIpFwdIfAclStatus=nwIpFwdIfAclStatus, nwIpOspfOperStatus=nwIpOspfOperStatus, nwIpOspfIfSnooping=nwIpOspfIfSnooping, nwIpHostCtlCacheSize=nwIpHostCtlCacheSize, nwIpEventTime=nwIpEventTime, nwIpAclDestMask=nwIpAclDestMask, nwIpRipAgeOut=nwIpRipAgeOut, nwIpWgHostEntry=nwIpWgHostEntry, nwIpFwdCounters=nwIpFwdCounters, nwIpRipIfRequestDelay=nwIpRipIfRequestDelay, nwIpRipIfCounters=nwIpRipIfCounters, nwIpWgDefNumTotalIntf=nwIpWgDefNumTotalIntf, nwIpWgRngTable=nwIpWgRngTable, nwIpFwdIfCtrEntry=nwIpFwdIfCtrEntry, nwIpFwdIfCtrOutPkts=nwIpFwdIfCtrOutPkts, nwIpWgDefSubnetMask=nwIpWgDefSubnetMask, nwIpOspfOperationalTime=nwIpOspfOperationalTime, nwIpEventFilterTable=nwIpEventFilterTable, nwIpRipIfCtrInBytes=nwIpRipIfCtrInBytes, nwIpRipOperationalTime=nwIpRipOperationalTime, nwIpSysConfig=nwIpSysConfig, nwIpOspfIfAdminStatus=nwIpOspfIfAdminStatus, nwIpFwdCtrFwdPkts=nwIpFwdCtrFwdPkts, nwIpFwdCtrFwdBytes=nwIpFwdCtrFwdBytes, nwIpRipRoutePriority=nwIpRipRoutePriority, nwIpOspfIfAclIdentifier=nwIpOspfIfAclIdentifier, nwIpSystem=nwIpSystem, nwIpFwdCtrDiscardBytes=nwIpFwdCtrDiscardBytes, nwIpFwdCtrFilteredPkts=nwIpFwdCtrFilteredPkts, nwIpRipDatabase=nwIpRipDatabase, nwIpStaticRoutePriority=nwIpStaticRoutePriority, nwIpOspfFibControl=nwIpOspfFibControl, nwIpOSPFRoutePriority=nwIpOSPFRoutePriority, nwIpHostMapPhysAddr=nwIpHostMapPhysAddr, nwIpRedirectorInterface=nwIpRedirectorInterface, nwIpOspfFilters=nwIpOspfFilters, nwIpEventEntry=nwIpEventEntry, nwIpRipCtrOperationalTime=nwIpRipCtrOperationalTime, nwIpRipCtrOutBytes=nwIpRipCtrOutBytes, nwIpOspfCtrAdminStatus=nwIpOspfCtrAdminStatus, nwIpRipRtType=nwIpRipRtType, nwIpRipCtrOutPkts=nwIpRipCtrOutPkts, nwIpEventType=nwIpEventType, nwIpRipIfCtrOutPkts=nwIpRipIfCtrOutPkts, nwIpAclDestAddress=nwIpAclDestAddress, nwIpRipStackSize=nwIpRipStackSize, nwIpRipIfHelloTimer=nwIpRipIfHelloTimer, nwIpRouter=nwIpRouter, nwIpSysAdminStatus=nwIpSysAdminStatus, nwIpRedirectPort=nwIpRedirectPort, nwIpWgDefSecurity=nwIpWgDefSecurity, nwIpRipRtHops=nwIpRipRtHops, nwIpFwdIfCtrAddrErrPkts=nwIpFwdIfCtrAddrErrPkts, nwIpFwdIfCacheHits=nwIpFwdIfCacheHits, nwIpAclPortNumber=nwIpAclPortNumber, nwIpWgHostStatus=nwIpWgHostStatus, nwIpHostMapCircuitID=nwIpHostMapCircuitID, nwIpRipCtrInBytes=nwIpRipCtrInBytes, nwIpWgRngEndHostAddr=nwIpWgRngEndHostAddr, nwIpEventTraceAll=nwIpEventTraceAll, nwIpWgDefNumActiveIntf=nwIpWgDefNumActiveIntf, nwIpRedirectorSystem=nwIpRedirectorSystem, nwIpForwarding=nwIpForwarding, nwIpOspfAdminStatus=nwIpOspfAdminStatus, nwIpWgHostIfIndex=nwIpWgHostIfIndex, nwIpWgIfIfIndex=nwIpWgIfIfIndex, nwIpRipInterfaces=nwIpRipInterfaces, nwIpFwdIfCtrHostInBytes=nwIpFwdIfCtrHostInBytes, nwIpLinkState=nwIpLinkState, nwIpFwdIfCtrOperationalTime=nwIpFwdIfCtrOperationalTime, nwIpFwdCtrHostInBytes=nwIpFwdCtrHostInBytes, nwIpWgDefOperStatus=nwIpWgDefOperStatus, nwIpFwdIfConfig=nwIpFwdIfConfig, nwIpFwdCtrReset=nwIpFwdCtrReset, nwIpRipIfType=nwIpRipIfType, nwIpFwdCtrHostInPkts=nwIpFwdCtrHostInPkts, nwIpFwdIfCtrHostOutBytes=nwIpFwdIfCtrHostOutBytes, nwIpOspfIfCtrOperationalTime=nwIpOspfIfCtrOperationalTime, nwIpEventFltrIfNum=nwIpEventFltrIfNum, nwIpFwdIfAdminStatus=nwIpFwdIfAdminStatus, nwIpMibRevText=nwIpMibRevText, nwIpWgIfNumKnownHosts=nwIpWgIfNumKnownHosts, nwIpHostCtlIfIndex=nwIpHostCtlIfIndex, nwIpWgRngEntry=nwIpWgRngEntry, nwIpWgRngBegHostAddr=nwIpWgRngBegHostAddr, nwIpRipIfAdvertisement=nwIpRipIfAdvertisement, nwIpOspfSystem=nwIpOspfSystem, nwIpOspfBgp4Table=nwIpOspfBgp4Table, nwIpRedirectType=nwIpRedirectType, nwIpHostCtlEntry=nwIpHostCtlEntry, nwIpHostCtlNumStatics=nwIpHostCtlNumStatics, nwIpOspfCtrInPkts=nwIpOspfCtrInPkts, nwIpHostCtlOperStatus=nwIpHostCtlOperStatus, nwIpAclTable=nwIpAclTable, nwIpAddrIfBcastAddr=nwIpAddrIfBcastAddr, nwIpFwdIfMtu=nwIpFwdIfMtu, nwIpOspfIfCtrReset=nwIpOspfIfCtrReset, nwIpFwdIfIndex=nwIpFwdIfIndex, nwIpEventFltrProtocol=nwIpEventFltrProtocol, nwIpFwdIfCtrFwdBytes=nwIpFwdIfCtrFwdBytes, nwIpRipIfOperationalTime=nwIpRipIfOperationalTime, nwIpOspfIfCtrFilteredBytes=nwIpOspfIfCtrFilteredBytes, nwIpRedirectEntry=nwIpRedirectEntry, nwIpAccessControl=nwIpAccessControl, nwIpOspfAdminReset=nwIpOspfAdminReset, nwIpOspfCtrReset=nwIpOspfCtrReset, nwIpHostCtlProtocol=nwIpHostCtlProtocol, nwIpOspfIfOperStatus=nwIpOspfIfOperStatus, nwIpWgDefEntry=nwIpWgDefEntry, nwIpWgIfEntry=nwIpWgIfEntry, nwIpHostsTimeToLive=nwIpHostsTimeToLive, nwIpOspfIfEntry=nwIpOspfIfEntry, nwIpOspfIfCtrInBytes=nwIpOspfIfCtrInBytes, nwIpRipCtrFilteredPkts=nwIpRipCtrFilteredPkts, nwIpOspfCtrOutBytes=nwIpOspfCtrOutBytes, nwIpRipCtrDiscardPkts=nwIpRipCtrDiscardPkts, nwIpEndSystems=nwIpEndSystems, nwIpFwdIfCounters=nwIpFwdIfCounters, nwIpEventFltrAction=nwIpEventFltrAction, nwIpEvent=nwIpEvent, nwIpOspfIfCounters=nwIpOspfIfCounters, nwIpHostMapTable=nwIpHostMapTable, nwIpRipIfCtrOutBytes=nwIpRipIfCtrOutBytes, nwIpEventLogConfig=nwIpEventLogConfig, nwIpFwdIfCtrReset=nwIpFwdIfCtrReset, nwIpWgHostHostAddr=nwIpWgHostHostAddr, nwIpHostMapPortNumber=nwIpHostMapPortNumber, nwIpFwdCtrAddrErrPkts=nwIpFwdCtrAddrErrPkts, nwIpOspfIfCtrOutPkts=nwIpOspfIfCtrOutPkts, nwIpFwdIfCtrHdrErrPkts=nwIpFwdIfCtrHdrErrPkts, nwIpHostCtlProxy=nwIpHostCtlProxy, nwIpRipCtrDiscardBytes=nwIpRipCtrDiscardBytes, nwIpRipIfCtrReset=nwIpRipIfCtrReset, nwIpFwdIfCtrHostOutPkts=nwIpFwdIfCtrHostOutPkts, nwIpFwdIfOperationalTime=nwIpFwdIfOperationalTime, nwIpFwdCtrOperationalTime=nwIpFwdCtrOperationalTime, nwIpFibSystem=nwIpFibSystem, nwIpRipCtrFilteredBytes=nwIpRipCtrFilteredBytes, nwIpOspfIfIndex=nwIpOspfIfIndex, nwIpOspfStaticMetric=nwIpOspfStaticMetric, nwIpClientServices=nwIpClientServices, nwIpMibs=nwIpMibs, nwIpRipCtrAdminStatus=nwIpRipCtrAdminStatus, nwIpRipIfPriority=nwIpRipIfPriority, nwIpHostCtlTable=nwIpHostCtlTable, nwIpHostCtlCacheMax=nwIpHostCtlCacheMax, nwIpFwdCtrAdminStatus=nwIpFwdCtrAdminStatus, nwIpFwdIfFrameType=nwIpFwdIfFrameType, nwIpOspfCtrFilteredBytes=nwIpOspfCtrFilteredBytes, nwIpOspfStaticStatus=nwIpOspfStaticStatus, nwIpRedirectAddress=nwIpRedirectAddress, nwIpAclMatches=nwIpAclMatches, nwIpOspfIfCtrFilteredPkts=nwIpOspfIfCtrFilteredPkts, nwIpOspfDatabase=nwIpOspfDatabase, nwIpRipIfPoisonReverse=nwIpRipIfPoisonReverse, nwIpRipIfAdminStatus=nwIpRipIfAdminStatus, nwIpFwdIfCtrFilteredBytes=nwIpFwdIfCtrFilteredBytes, nwIpRipIfAclIdentifier=nwIpRipIfAclIdentifier, nwIpAddressTable=nwIpAddressTable, nwIpTopology=nwIpTopology, nwIpRipAdminReset=nwIpRipAdminReset, nwIpRipIfCtrFilteredPkts=nwIpRipIfCtrFilteredPkts, nwIpSysOperStatus=nwIpSysOperStatus, nwIpFwdIfTable=nwIpFwdIfTable, nwIpWgDefHostAddress=nwIpWgDefHostAddress, nwIpFwdIfForwarding=nwIpFwdIfForwarding, nwIpOspfIfCtrIfIndex=nwIpOspfIfCtrIfIndex, nwIpOspfIfCtrDiscardPkts=nwIpOspfIfCtrDiscardPkts, nwIpOspfIfOperationalTime=nwIpOspfIfOperationalTime, nwIpHostMapEntry=nwIpHostMapEntry, nwIpRipIfCtrIfIndex=nwIpRipIfCtrIfIndex, nwIpEventTable=nwIpEventTable, nwIpAclSequence=nwIpAclSequence, nwIpFwdIfCacheEntries=nwIpFwdIfCacheEntries, nwIpRipIfTable=nwIpRipIfTable, nwIpOspfStackSize=nwIpOspfStackSize, nwIpAclSrcMask=nwIpAclSrcMask, nwIpRipIfSnooping=nwIpRipIfSnooping, nwIpRipCounters=nwIpRipCounters, nwIpOspfIfCtrEntry=nwIpOspfIfCtrEntry, nwIpRipIfCtrEntry=nwIpRipIfCtrEntry, nwIpFwdCtrDiscardPkts=nwIpFwdCtrDiscardPkts, nwIpFwdIfCtrIfIndex=nwIpFwdIfCtrIfIndex, nwIpWgIfNumActiveHosts=nwIpWgIfNumActiveHosts, nwIpFwdInterfaces=nwIpFwdInterfaces, nwIpFwdIfControl=nwIpFwdIfControl, nwIpEventLogFilterTable=nwIpEventLogFilterTable, nwIpRipIfSplitHorizon=nwIpRipIfSplitHorizon, nwIpEventFltrType=nwIpEventFltrType, nwIpRipRtSrcNode=nwIpRipRtSrcNode, nwIpWgIfTable=nwIpWgIfTable, nwIpHostMapIpAddr=nwIpHostMapIpAddr, nwIpRipOperStatus=nwIpRipOperStatus, nwIpFwdCtrInBytes=nwIpFwdCtrInBytes, nwIpAclIdentifier=nwIpAclIdentifier, nwIpFwdIfAclIdentifier=nwIpFwdIfAclIdentifier, nwIpHostsRetryCount=nwIpHostsRetryCount, nwIpHostsSystem=nwIpHostsSystem, nwIpOspfInterfaces=nwIpOspfInterfaces, nwIpOspfIfCtrOutBytes=nwIpOspfIfCtrOutBytes, nwIpOspfLeakAllStaticRoutes=nwIpOspfLeakAllStaticRoutes, nwIpFwdIfCacheControl=nwIpFwdIfCacheControl, nwIpRipRouteEntry=nwIpRipRouteEntry, nwIpOspfIfCtrInPkts=nwIpOspfIfCtrInPkts, nwIpRipIfCtrInPkts=nwIpRipIfCtrInPkts, nwIpWgIfDefIdent=nwIpWgIfDefIdent, nwIpWgRngRowStatus=nwIpWgRngRowStatus, nwIpFwdCtrInPkts=nwIpFwdCtrInPkts, nwIpRedirectTable=nwIpRedirectTable, nwIpOspfForward=nwIpOspfForward, nwIpOspfIfCtrAdminStatus=nwIpOspfIfCtrAdminStatus, nwIpSysAdminReset=nwIpSysAdminReset, nwIpRipRtIfIndex=nwIpRipRtIfIndex, nwIpFib=nwIpFib, nwIpSysVersion=nwIpSysVersion, nwIpOspfCtrDiscardPkts=nwIpOspfCtrDiscardPkts, nwIpRipDatabaseThreshold=nwIpRipDatabaseThreshold, nwIpHostMapType=nwIpHostMapType, nwIpEventIfNum=nwIpEventIfNum, nwIpRedirectCount=nwIpRedirectCount, nwIpOspfStaticForwardMask=nwIpOspfStaticForwardMask, nwIpHostCtlCacheHits=nwIpHostCtlCacheHits, nwIpEventSeverity=nwIpEventSeverity, nwIpRipIfCtrFilteredBytes=nwIpRipIfCtrFilteredBytes, nwIpRipIfCtrTable=nwIpRipIfCtrTable, nwIpAclSrcAddress=nwIpAclSrcAddress, nwIpOspfIfTable=nwIpOspfIfTable, nwIpHostMapIfIndex=nwIpHostMapIfIndex, nwIpOspfIfVersion=nwIpOspfIfVersion, nwIpHostCtlOperationalTime=nwIpHostCtlOperationalTime) mibBuilder.exportSymbols("CTRON-IP-ROUTER-MIB", nwIpOspfStaticTable=nwIpOspfStaticTable, nwIpWgHostDefIdent=nwIpWgHostDefIdent, nwIpAddrIfControl=nwIpAddrIfControl, nwIpRipIfConfig=nwIpRipIfConfig, nwIpFwdIfCtrLenErrPkts=nwIpFwdIfCtrLenErrPkts, nwIpHostMapFraming=nwIpHostMapFraming, nwIpRipVersion=nwIpRipVersion, nwIpOspfFib=nwIpOspfFib, nwIpRipIfCtrDiscardPkts=nwIpRipIfCtrDiscardPkts, nwIpRipSystem=nwIpRipSystem, nwIpWgHostPhysAddr=nwIpWgHostPhysAddr, nwIpWgDefRowStatus=nwIpWgDefRowStatus, nwIpOspfLeakAllRipRoutes=nwIpOspfLeakAllRipRoutes, nwIpOspfCtrOperationalTime=nwIpOspfCtrOperationalTime, nwIpWgHostTable=nwIpWgHostTable, nwIpRipRtMask=nwIpRipRtMask, nwIpEventFltrSeverity=nwIpEventFltrSeverity, nwIpOspfIfConfig=nwIpOspfIfConfig, nwIpFwdIfCtrHostDiscardPkts=nwIpFwdIfCtrHostDiscardPkts, nwIpRipRtAge=nwIpRipRtAge, nwIpHostCtlCacheMisses=nwIpHostCtlCacheMisses, nwIpEventTextString=nwIpEventTextString, nwIpOspfVersion=nwIpOspfVersion, nwIpOspfStaticNextHop=nwIpOspfStaticNextHop, nwIpRipIfIndex=nwIpRipIfIndex, nwIpAclPermission=nwIpAclPermission, nwIpHostsInterfaces=nwIpHostsInterfaces, nwIpRipRtNetId=nwIpRipRtNetId, nwIpFwdIfCtrHostDiscardBytes=nwIpFwdIfCtrHostDiscardBytes, nwIpWgDefTable=nwIpWgDefTable, nwIpRipCtrInPkts=nwIpRipCtrInPkts, nwIpRipAdminStatus=nwIpRipAdminStatus, nwIpFwdIfCtrInBytes=nwIpFwdIfCtrInBytes, nwIpOspfThreadPriority=nwIpOspfThreadPriority, nwIpEventFltrControl=nwIpEventFltrControl, nwIpWgRngPhysAddr=nwIpWgRngPhysAddr, nwIpOspfIfCtrTable=nwIpOspfIfCtrTable, nwIpSysRouterId=nwIpSysRouterId, nwIpOspfRipTable=nwIpOspfRipTable, nwIpFilters=nwIpFilters, nwIpRedirector=nwIpRedirector, nwIpFwdIfEntry=nwIpFwdIfEntry, nwIpFwdIfCtrFilteredPkts=nwIpFwdIfCtrFilteredPkts, nwIpHostCtlSnooping=nwIpHostCtlSnooping, nwIpRipIfVersion=nwIpRipIfVersion, nwIpEventMaxEntries=nwIpEventMaxEntries, nwIpAddrIfAddrType=nwIpAddrIfAddrType, nwIpSysAdministration=nwIpSysAdministration, nwIpRipThreadPriority=nwIpRipThreadPriority, nwIpOspfIfType=nwIpOspfIfType, nwIpOspfIfCtrDiscardBytes=nwIpOspfIfCtrDiscardBytes, nwIpFwdSystem=nwIpFwdSystem, nwIpFwdCtrHostOutPkts=nwIpFwdCtrHostOutPkts, nwIpWgDefIdentifier=nwIpWgDefIdentifier, nwIpFwdCtrLenErrPkts=nwIpFwdCtrLenErrPkts, nwIpRipHoldDown=nwIpRipHoldDown, nwIpRipIfEntry=nwIpRipIfEntry, nwIpFwdIfOperStatus=nwIpFwdIfOperStatus, nwIpRip=nwIpRip, nwIpFwdIfCacheMisses=nwIpFwdIfCacheMisses, nwIpFwdIfCtrDiscardBytes=nwIpFwdIfCtrDiscardBytes, nwIpOspfCtrDiscardBytes=nwIpOspfCtrDiscardBytes, nwIpFwdCtrFilteredBytes=nwIpFwdCtrFilteredBytes, nwIpOspfIfAclStatus=nwIpOspfIfAclStatus, nwIpEventFilterEntry=nwIpEventFilterEntry, nwIpWgIfOperStatus=nwIpWgIfOperStatus, nwIpOspfStaticEntry=nwIpOspfStaticEntry, nwIpFwdCtrHostDiscardPkts=nwIpFwdCtrHostDiscardPkts, nwIpFwdCtrHostDiscardBytes=nwIpFwdCtrHostDiscardBytes, nwIpFwdCtrOutPkts=nwIpFwdCtrOutPkts, nwIpDistanceVector=nwIpDistanceVector, nwIpAclValidEntries=nwIpAclValidEntries, nwIpSysOperationalTime=nwIpSysOperationalTime, nwIpOspfFibEntries=nwIpOspfFibEntries, nwIpOspfConfig=nwIpOspfConfig, nwIpFwdIfCtrAdminStatus=nwIpFwdIfCtrAdminStatus, nwIpWgRngOperStatus=nwIpWgRngOperStatus, nwIpFwdIfCtrFwdPkts=nwIpFwdIfCtrFwdPkts, nwIpOspfLeakAllBgp4Routes=nwIpOspfLeakAllBgp4Routes, nwIpFwdCtrHdrErrPkts=nwIpFwdCtrHdrErrPkts, nwIpAddrIfIndex=nwIpAddrIfIndex, nwIpOspfStaticDest=nwIpOspfStaticDest, nwIpOspfDynamicTable=nwIpOspfDynamicTable, nwIpRipIfXmitCost=nwIpRipIfXmitCost, nwIpOspfCtrFilteredPkts=nwIpOspfCtrFilteredPkts, nwIpFwdIfCtrHostInPkts=nwIpFwdIfCtrHostInPkts, nwIpFwdIfCtrDiscardPkts=nwIpFwdIfCtrDiscardPkts, nwIpFwdIfCtrOutBytes=nwIpFwdIfCtrOutBytes, nwIpRipFilters=nwIpRipFilters, nwIpOspf=nwIpOspf, nwIpRipIfCtrAdminStatus=nwIpRipIfCtrAdminStatus, nwIpRipIfCtrOperationalTime=nwIpRipIfCtrOperationalTime, nwIpHostCtlNumDynamics=nwIpHostCtlNumDynamics, nwIpEventNumber=nwIpEventNumber, nwIpWgDefFastPath=nwIpWgDefFastPath, nwIpRipConfig=nwIpRipConfig, nwIpFwdCtrOutBytes=nwIpFwdCtrOutBytes, nwIpRipCtrReset=nwIpRipCtrReset, nwIpOspfStaticMetricType=nwIpOspfStaticMetricType, nwIpAddrEntry=nwIpAddrEntry, nwIpAddrIfMask=nwIpAddrIfMask)
def func_to_list(text,default,data): ''' 给定字典data和需要的key名text,从字典获取对应的值,如果没有,则使用default作为值. :param text: 键 :param default: 作为键的默认值 :param data: 字典 :return: 用spilt切好的表(用逗号隔开) ''' get_data = data.get(text,default) data_list = get_data.split('\n') return data_list def getfunctions(setdata): x_fm_list=func_to_list('x_fm','',setdata) y_gm_list=func_to_list('y_gm','',setdata) list0 = [] xfunlist = [] yfunlist = [] paralist = [] for x_fm in x_fm_list: xfuninput = x_fm if xfuninput == '': break else: xfunction = xfuninput xfunlist.append(xfunction) xlenfunlist = len(xfunlist) for y_gm in y_gm_list: yfuninput = y_gm if yfuninput == '': break else: yfunction = yfuninput yfunlist.append(yfunction) ylenfunlist = len(yfunlist) # 输入参变量 for i in range(1): # 该功能暂时弃用 parainput = 'f' print() if parainput == 'f': break else: parameter = parainput print(parameter) paralist.append(parameter) paralistall = '' for i in range(len(paralist)): paralistall += paralist[i] + '\n' if xlenfunlist != ylenfunlist: print('the number of the function f(m) and g(m) is not equal') return 0 else: lenfunlist = xlenfunlist list0.append(xfunlist) list0.append(yfunlist) list0.append(lenfunlist) list0.append(paralistall) return list0 def makefunlist(xfunlist, yfunlist, configdict): gifname, fps, duration = configdict['gifname'], int(configdict['fps']), float(configdict['duration']) # 准备funlist xfunlist = xfunlist * int(fps * duration+1) yfunlist = yfunlist * int(fps * duration+1) return xfunlist, yfunlist
def factorial(n): if n in (0, 1): return 1 result = n for k in range(2, n): result *= k return result f5 = factorial(5) # f5 = 120 print(f5)
def revisar(function): def test(): print("Se esta ejecutando la fucnion {}".format(function.__name__)) function() print("Se acaba de ejecutar la fucnion {}".format(function.__name__)) return test def revisar_args(function): def test(*args, **kwargs): print("Se esta ejecutando la fucnion {}".format(function.__name__)) function(*args, **kwargs) print("Se acaba de ejecutar la fucnion {}".format(function.__name__)) return test @revisar_args def hola(nombre): print("Hola {}!".format(nombre)) @revisar_args def adios(nombre): print("Adios! {}".format(nombre)) hola("Fernando") print("") adios("Contreras")
# Основные настройки token = 'OTQ3OTU5MTAxNzY0MzA0OTY3.Yh01tg.UR7cs5oradlOTRDkYFfhhhXCZOw' # Токен бота version = '1.0.2' # Версия бота logsg = 'false' # Записывать в файлы при входе/выходе гильдий? [true для включения, false для выключения] Работает только с включенным logs logsm = 'false' # Записывать в файлы при входе/выходе участников? [true для включения, false для выключения] Работает только с включенным logs logsgc = 'false' # Записывать в файлы чаты с гильдий? [true для включения, false для выключения] Работает только с включенным logs # База-данных database = 'data/db/main/Database.db' # Путь к базе данных lang = 'ru' # Язык по стандарту [Доступные: ru, en, ua] prefix = '.' # Префикс по стандарту status = ["help | bot | stats"] # Статус бота [Временно вырезал] currency = '<:better_moneyb:937110288807907378> ' # Стандартный эмодзи в Экономике # Эмодзи okay = '<:better_okay:937110425881952327> ' # Эмодзи для успешных выполнений warning = '<:better_warning:937110425542213703> ' # Эмодзи для предупреждений error = '<:better_error:937110425940656188> ' # Эмодзи для ошибок servers = '<:better_serves:937110288447193089> ' # Эмодзи в команде bot users = '<:better_users:937110288669483059> ' # Эмодзи в команде bot ecommands = '<:better_command:937110288728211487> ' # Эмодзи в команде bot off = '<:better_off:937693053546823790> ' # Эмодзи выключенного палзунка on = '<:better_on:937693053609730058> ' # Эмодзи включеного палзунка levelup = '<:better_up:937110425458311179> ' # Эмодзи для повышения уровня # Включение/Выключение каналов vchange = 'false' # Для включения true, для выключения false [Канал версий и смена названия] glogs = 'false' # Для включения true, для выключения false [guildlogs] elogs = 'false' # Для включения true, для выключения false [errorlogs] blogs = 'false' # Для включения true, для выключения false [bdlogs] # Каналы versionname = 'Версия' # Название канала с версией versionid = 941133100275097650 # ID-канала который отвечает за опцию version (Устанавливается название с версией) guildlogs = 941133302306316288 # ID-канала в который отправляются сообщения о добавлении/удалении гильдий. errorlogs = 941133302306316288 # ID-канала в который отправляются ошибки вызванные в ходе запуска когов или выполнении команд bdlogs = 941133302306316288 #ID-канала в который отправляются сообщения о успешной записи в базу данных [Временно вырезал]
class Events: # SAP_ITSAMInstance/Alert ccms_alerts = { "SAP name": {"description": "description is optional: Alternative name for stackstate", "field": "field is mandatory: Name of field with value"}, # example entry "Oracle|Performance|Locks": {"field": "Value"}, "R3Services|Dialog|ResponseTimeDialog": {"field": "ActualValue"}, "R3Services|Spool": {"description": "SAP:Spool utilization", "field": "ActualValue"}, "R3Services|Spool|SpoolService|ErrorsInWpSPO": {"description": "SAP:ErrorsInWpSPO", "field": "ActualValue"}, "R3Services|Spool|SpoolService|ErrorFreqInWpSPO": {"description": "SAP:ErrorsFreqInWpSPO", "field": "ActualValue"}, "Shortdumps Frequency": {"field": "ActualValue"} } # SAP_ITSAMInstance/Parameter instance_events = { "SAP name": {"description": "description is optional: Alternative name for stackstate"} # example entry } # SAP_ITSAMDatabaseMetric dbmetric_events = { "SAP name": {"description": "description is optional: Alternative name for stackstate"}, # example entry "db.ora.tablespace.status": {"field": "Value"}, "35": {"description": "HDB:Backup_exist", "field": "Value"}, "36": {"description": "HDB:Recent_backup", "field": "Value"}, "38": {"description": "HDB:Recent_log_backup", "field": "Value"}, "102": {"description": "HDB:System_backup_Exists", "field": "Value"}, "1015": {"description": "HDB:System replication", "field": "Value"} } # GetComputerSystem system_events = { "SAP name": {"description": "description is optional: Alternative name for stackstate"} # example entry }
""" 33.11% """ class Solution(object): def longestConsecutive(self, nums): """ :type nums: List[int] :rtype: int """ maxlen = 0 cur = [] nums = sorted(set(nums)) for num in nums: if not cur: cur.append(num) else: if cur[-1] + 1 == num or cur[-1] == num: cur.append(num) else: cur[:] = [] cur.append(num) maxlen = max(maxlen, len(cur)) return maxlen
class Solution: def lengthOfLongestSubstring(self, s): hashmap = {} left, right, max_length = 0, 0, 0 while left < len(s) and right < len(s): char = s[right] if char in hashmap: left = max(left, hashmap[char] + 1) hashmap[char] = right max_length = max(max_length, right - left + 1) right += 1 return max_length
class Book: def __init__(self, id_book, title, author): self.__id_book = id_book self.__title = title self.__author = author def get_id_book(self): return self.__id_book def get_title(self): return self.__title def get_author(self): return self.__author def set_title(self, title): self.__title = title def set_author(self, author): self.__author = author def __eq__(self, other): return self.__id_book == other.__id_book def __str__(self) -> str: return "Id book:{0}, Title:{1}, Author:{2}".format(self.__id_book, self.__title, self.__author) class Client: def __init__(self, id_client, name): self.__id_client = id_client self.__name = name def get_id_client(self): return self.__id_client def get_name(self): return self.__name def set_name(self, name): self.__name = name def __eq__(self, other): return self.__id_client == other.__id_client def __str__(self) -> str: return "ID client: {0}, Name: {1}".format(self.__id_client, self.__name) class Rental: def __init__(self, id_rental, id_book, id_client, rented_date, returned_date): self.__id_rental = id_rental self.__id_book = id_book self.__id_client = id_client self.__rented_date = rented_date self.__returned_date = returned_date def get_id_rental(self): return self.__id_rental def get_id_book(self): return self.__id_book def get_id_client(self): return self.__id_client def get_rented_date(self): return self.__rented_date def get_returned_date(self): return self.__returned_date def set_returned_date(self, date): self.__returned_date = date def __eq__(self, other): return self.__id_rental == other.__id_rental def __str__(self) -> str: return "ID rent: {0}, ID book:{1}, ID client{2}, rented date:{3}, returned date:{4}".format(self.__id_rental, self.__id_book, self.__id_client, self.__rented_date, self.__returned_date)
name = "Eiad" test = input("Enter your password:\n") if name == test: print("Welcome in\n") else: print("Access denied\n") del test
def test(): assert Doc.has_extension("has_number"), "docに拡張属性を登録しましたか?" ext = Doc.get_extension("has_number") assert ext[2] is not None, "ゲッターをきちんと設定しましたか?" assert "getter=get_has_number" in __solution__, "get_has_numberを拡張プロパティとして登録しましたか?" assert "doc._.has_number" in __solution__, "カスタム属性にアクセスしましたか?" assert doc._.has_number, "ゲッターの返り値が誤っているようです" __msg__.good("Nice work!")
""" A linked list is given such that each node contains an additional random pointer which could point to any node in the list or null. Return a deep copy of the list. The Linked List is represented in the input/output as a list of n nodes. Each node is represented as a pair of [val, random_index] where: * val: an integer representing Node.val * random_index: the index of the node (range from 0 to n-1) where random pointer points to, or null if it does not point to any node. Example 1: Input: head = [[7,null],[13,0],[11,4],[10,2],[1,0]] Output: [[7,null],[13,0],[11,4],[10,2],[1,0]] """ # Definition for a Node. class Node: def __init__(self, x: int, next: 'Node' = None, random: 'Node' = None): self.val = int(x) self.next = next self.random = random class Solution: """ 2-pass approach. On first pass we creating shallow copies of nodes (without links, just values), on second pass we link (new nodes) as they are in the original list. Runtime: 36 ms, faster than 59.90% of Python3 Memory Usage: 14.9 MB, less than 32.19% of Python3 Time and space complexity: O(n) """ def copyRandomList(self, head: 'Node') -> 'Node': if not head: return copies = dict() node = head while node: copies[node] = Node(node.val) node = node.next node = head while node: copies[node].next = copies[node.next] if node.next else None copies[node].random = copies[node.random] if node.random else None node = node.next return copies[head]
def get(which): try: with open("marvel/keys/%s" % which, "r") as key: return key.read() except(OSError, IOError): return None
pessoas = list() dados = list() maiorPesoNome = list() menorPesoNome = list() maior_peso = menor_peso = cont = 0 while True: while True: nome = input('Nome: ') if nome.isalpha(): dados.append(nome) break else: print('Informe um nome válido. Tente Novamente!') while True: peso = input('Peso: ') if peso.isnumeric(): dados.append(peso) peso = int(peso) if cont == 0: maior_peso = menor_peso = int(peso) maiorPesoNome.append(nome) menorPesoNome.append(nome) cont += 1 elif peso > maior_peso: maior_peso = peso maiorPesoNome.pop() maiorPesoNome.append(nome) elif peso < menor_peso: menor_peso = peso menorPesoNome.pop() menorPesoNome.append(nome) elif peso == maior_peso: maiorPesoNome.append(nome) elif peso == menor_peso: menorPesoNome.append(nome) break else: print('Informe um valor válido. Tente Novamente!') pessoas.append(dados[:]) while True: resposta = input('Deseja continuar [S/N]: ').strip().lower()[0] if resposta != 's' and resposta != 'n': print('Informe uma resposta válida!') else: break dados.clear() if resposta in 'n': break print(f'Foram cadastradas {len(pessoas)} pessoas no sistema') print(f'O maior peso cadastrado foi {maior_peso} Kg. Peso de {maiorPesoNome}') print(f'O menor peso cadastrado foi {menor_peso} Kg. Peso de {menorPesoNome}')
# Acorn tree reactor | edelstein if sm.hasQuest(23003): sm.dropItem(4034738, sm.getPosition(objectID).getX(), sm.getPosition(objectID).getY()) sm.removeReactor()
class Perro: # Atributo de Clase genero= "Canis" def __init__(self, nombre, edad): self.nombre = nombre self.edad = edad myDog = Perro("Firulais", 5) print(myDog.nombre) print(myDog.edad) print(myDog.genero) Perro.genero = "Mamifero" myOtherDog = Perro("Pepito", 15) print(myOtherDog.nombre) print(myOtherDog.edad) print(myOtherDog.genero) print(myDog.genero)
print('*'*23) print('* Triangle Analyzer *') print('*'*23) a = float(input('First straight: ')) b = float(input('Second straight: ')) c = float(input('Third straight: ')) if a + b > c and b + c > a and a + c > b: print('The above segments MAY form a triangle!') else: print('The above segments CANNOT FORM a triangle!')
class Neighbour: def __init__(self, *args): self.IPaddress = None self.portnumber = None self.lastComm = None self.isonline = False def setIP(self, ip): self.IPaddress = ip def setPort(self, port): self.portnumber = port def setLastTalk(self, timestamp): lastComm = timestamp def checkOnline(self): #TODO: try to ping, or connect to the ip:port and update status return None
class Solution: def maxProfit(self, prices): """ :type prices: List[int] :rtype: int """ paid = math.inf profit = 0 for price in prices: if paid < price: profit = max(profit, price - paid) else: paid = price return profit
__all__ = [ 'DataAgent', 'DataUtility', 'DataAgentBuilder', 'UniversalDataCenter', ]
""" API module """ __all__ = ['access_token', 'account', 'block', 'contract', 'transaction']
x = {"apple", "banana", "cherry"} y = {"google", "microsoft", "apple"} x.symmetric_difference_update(y) print(x)
def maxProduct(nums): n = len(nums) ans = nums[0] maxy = mini = ans for i in range(1, n): if nums[i] < 0: maxy, mini = mini, maxy maxy = max(nums[i], maxy * nums[i]) mini = min(nums[i], mini * nums[i]) ans = max(ans, maxy) return ans if __name__ == '__main__': ans = maxProduct([2, 3, -2, 4]) assert ans == 6, 'Wrong answer' print(ans)
class Solution: """ @param: nodes: a array of Undirected graph node @return: a connected set of a Undirected graph """ def __init__(self): self.d = {} def connectedSet(self, nodes): # write your code here for n in nodes: self.d[n.label] = None for node in nodes: for n in node.neighbors: a = self.find_parent(node.label) b = self.find_parent(n.label) if a != b: self.d[a] = b result = {} for k in self.d: key = self.find_parent(k) result[key] = result.get(key, []) + [k] # Not sure why the result must be sorted to pass... Maybe set? return sorted([sorted(i) for i in result.values()]) def find_parent(self, n): if self.d[n] is not None: return self.find_parent(self.d[n]) return n
# (c) [Muhammed] @PR0FESS0R-99 # (s) @Mo_Tech_YT , @Mo_Tech_Group, @MT_Botz # Copyright permission under MIT License # All rights reserved by PR0FESS0R-99 # License -> https://github.com/PR0FESS0R-99/DonLee-Robot-V2/blob/Professor-99/LICENSE VERIFY = {}
# Space: O(n) # Time: O(n) class Solution: def getSmallestString(self, n: int, k: int) -> str: char_cache = {i + 1: chr(97 + i) for i in range(26)} if n == 1: return char_cache[k] res = [None for _ in range(n)] for i in range(n - 1, -1, -1): if k > (i + 1): temp_res = k - i if temp_res <= 26: res[i] = char_cache[temp_res] k -= temp_res else: res[i] = char_cache[26] k -= 26 elif k == (i + 1): res[i] = char_cache[1] k -= 1 return ''.join(res)
print(1+1) print() print(52, 273, "Hello") print() print("안녕하세요", "저의", "이름은", "윤인성입니다!") print() print("안녕하세요",'\n',"윤인성입니다!",sep=" ")#띄어쓰기 print("안녕하세요",'\n',"윤인성입니다!",sep="") print() print("Hello world") print() #굳이 변수를 c언어처럼 선언할 필요가 없다. a=2 print(a) a="asdlasdjk" print(a) a=1.23456 print(a) a='a' print(a) print() a= input() #input 문자열로 받는다 print(type(a)) print(a + '1234') print() #정수형으로 바꿔주기 a= int( input()) print(a) print(a + 1234) print() print('"안녕하세요" 라고 말했습니다') #따옴표 출력과 같이 출력하기 print("'안녕하세요'라고 말했습니다") print("\"안녕하세요\"라고 말했습니다") print('\'배가 고픕니다\'라고 생각했습니다') print() print("asdf" * 3)#반복연산자:* print() print("안녕하세요"[0]) #문자 선택 연산자(인덱싱):[] print("안녕하세요"[1]) print("안녕하세요"[2]) print("안녕하세요"[3]) print("안녕하세요"[4]) print() alp = 'abcdefghijklmnopqrstuvwxyz' #문자열 범위 선택 연산자(슬라이싱): [숫자:숫자] print(alp[5:11]) print(alp[17:26]) print(alp[-26:-18]) print() print(len(alp)) #문자열의 길이 구하기 print() a= 15 #숫자 연산자 b= 8 print("a+b=", a+b) print("a-b=", a-b) print("a*b=", a*b) print("a/b=", a/b) print("a%b=", a%b) print("a//b=", a//b) print("a**b=", a**b) print() print(a+b, a-b, a*b, a/b, a%b, a//b, a**b) print() alp = 'abcdefghijklmnopqrstuvwxyz' tmp='' for i in alp: tmp += i print(tmp) print() a= input("숫자를 입력하시오: ") #사용자 입력: input() print() print(a)
class FileObject: def __init__(self, name, attributes, location, data=None, memory=None, size=None, timestamp=None, owner=None): self.name = name self.attributes = attributes self.loc = location # TODO: Find size of obj/file self.size = size if size else size self.memory = memory self.timestamp = timestamp self.owner = owner self.group = owner if memory is True: with open(data, 'r') as f: self._data = f.read() else: self._data = data def to_list(self): return [self.name, self.attributes, self._data] def to_dict(self): return {'name': self.name, 'attribute': self.attributes, 'type': __class__, 'data': self._data} @property def data(self): if self.memory is False: with open(self._data, 'r') as f: return f.read() else: return self._data
def encode(json, schema): payload = schema.Main() payload.coord = schema.Coord() payload.coord.lon = json['coord']['lon'] payload.coord.lat = json['coord']['lat'] payload.weather = [schema.Weather()] payload.weather[0].id = json['weather'][0]['id'] payload.weather[0].main = json['weather'][0]['main'] payload.weather[0].description = json['weather'][0]['description'] payload.weather[0].icon = json['weather'][0]['icon'] payload.base = json['base'] payload.main = schema.MainObject() payload.main.temp = json['main']['temp'] payload.main.feels_like = json['main']['feels_like'] payload.main.temp_min = json['main']['temp_min'] payload.main.temp_max = json['main']['temp_max'] payload.main.pressure = json['main']['pressure'] payload.main.humidity = json['main']['humidity'] payload.visibility = json['visibility'] payload.wind = schema.Wind() payload.wind.speed = json['wind']['speed'] payload.wind.deg = json['wind']['deg'] payload.clouds = schema.Clouds() payload.clouds.all = json['clouds']['all'] payload.dt = json['dt'] payload.sys = schema.Sys() payload.sys.type = json['sys']['type'] payload.sys.id = json['sys']['id'] payload.sys.message = json['sys']['message'] payload.sys.country = json['sys']['country'] payload.sys.sunrise = json['sys']['sunrise'] payload.sys.sunset = json['sys']['sunset'] payload.timezone = json['timezone'] payload.id = json['id'] payload.name = json['name'] payload.cod = json['cod'] return payload def decode(payload): return { 'coord': payload.coord.__dict__, 'weather': [ payload.weather[0].__dict__ ], 'base': payload.base, 'main': payload.main.__dict__, 'visibility': payload.visibility, 'wind': payload.wind.__dict__, 'clouds': payload.clouds.__dict__, 'dt': payload.dt, 'sys': payload.sys.__dict__, 'timezone': payload.timezone, 'id': payload.id, 'name': payload.name, 'cod': payload.cod }
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class BSTIterator: """ BST的最小结点就是最左侧的结点 BST的中序遍历结果是一个递增的序列, 借助栈来完成 """ def __init__(self, root: TreeNode): self.s = [] #将最左侧的结点入栈, 这样栈顶总是某一棵树的最小结点 while root != None: self.s.append(root) root = root.left def next(self) -> int: """ @return the next smallest number """ smallest = self.s.pop() #将smallest的右子树的最左侧结点入栈, 即稍大的结点 node = smallest.right while node != None: self.s.append(node) node = node.left return smallest.val def hasNext(self) -> bool: """ @return whether we have a next smallest number """ return self.s != [] # Your BSTIterator object will be instantiated and called as such: # obj = BSTIterator(root) # param_1 = obj.next() # param_2 = obj.hasNext()
''' Exceptions definitions for the MusicCast package. All are inherited from the Exception class, with the member 'message' available. Types of Errors: * CommsError: any type of communication error which should not be due to a bad command or a command issued at the wrong time. * ''' # TODO: Categorise errors ===================================================== # Connection not working # Device offline? # Wrong commands, not recognised # Data read not as expected # Arguments from commands missing or wrong type class AnyError(Exception): ''' Docstring''' pass class CommsError(AnyError): ''' Docstring''' pass class LogicError(AnyError): ''' Docstring''' pass class ConfigError(AnyError): ''' Docstring''' pass class MusicCastError(AnyError): ''' Docstring''' pass #=============================================================================== # # # class mcConfigError(AnyError): #DONE # pass # # class mcConnectError(AnyError): # DONE # ''' There is no connection, so network might be down, or # local interface not working...''' # pass # # class mcDeviceError(AnyError): # DONE # ''' The device responds but could not execute whatever was asked.''' # pass # # class mcSyntaxError(AnyError): #DONE # pass # # class mcHTTPError(AnyError): # DONE # ''' Protocol error, there was misunderstanding in the communication.''' # pass # # class mcLogicError(AnyError): # DONE # pass # # class mcProtocolError(AnyError): # pass #===============================================================================
a = 1 b = 32 c = 33 name = '王春勇到此一游!'
N, M, T = [int(n) for n in input().split()] AB = N p = 0 ans = 'Yes' for m in range(M): a, b = [int(n) for n in input().split()] AB -= (a-p) if AB <= 0: ans = 'No' break AB = min(AB+(b-a), N) p = b if AB - (T-b) <= 0: ans = 'No' print(ans)
def pow(n,m): if(m < 0): raise("m must be greater than or equal to 0") elif(m == 0): return 1 elif(m % 2 == 0): # this is an optimization to reduce the number of calls x = pow(n, m/2) return (x * x) else: return n * pow(n, m - 1) print(pow(2,3)) print(pow(4,3)) print(pow(10,5)) print(pow(1000,0))
"""Custom exceptions for compute driver implementations.""" class ResourceNotFound(Exception): pass class ExactMatchFailed(Exception): pass class VolumeOpFailure(Exception): pass class NetworkOpFailure(Exception): pass class NodeError(Exception): pass class NodeDeleteFailure(Exception): pass
# customize string representations of objects class myColor(): def __init__(self): self.red = 50 self.green = 75 self.blue = 100 # TODO: use getattr to dynamically return a value def __getattr__(self, attr): pass # TODO: use setattr to dynamically return a value def __setattr__(self, attr, val): super().__setattr__(attr, val) # TODO: use dir to list the available properties def __dir__(self): pass def main(): # create an instance of myColor cls1 = myColor() # TODO: print the value of a computed attribute # TODO: set the value of a computed attribute # TODO: access a regular attribute # TODO: list the available attributes if __name__ == "__main__": main()
# TO DO - error handling?? class VMWriter(list): """ TO DO """ def __init__(self): pass def write_push(self, segment, index): """TO DO""" self.append('push {} {}'.format(segment, index)) def write_pop(self, segment, index): """TO DO""" self.append('pop {} {}'.format(segment, index)) def write_arithmetic_logic(self, command): """TO DO""" self.append(command) def write_label(self, label): """TO DO""" self.append('label ' + label) def write_goto(self, label): """TO DO""" self.append('goto ' + label) def write_if_goto(self, label): """TO DO""" self.append('if-goto ' + label) def write_call(self, name, n_args): """TO DO""" self.append('call {} {}'.format(name, n_args)) def write_function(self, name, n_local_vars): """TO DO""" self.append('function {} {}'.format(name, n_local_vars)) def write_return(self): """TO DO""" self.append('return') # TESTS if __name__ == '__main__': w = VMWriter() w.write_push('local', 99) w.write_pop('local', 100) w.write_arithmetic_logic('add') w.write_label('Banana') w.write_goto('Banana') w.write_if_goto('Banana') w.write_call('PeelBanana', 4) w.write_function('PeelBanana', 4) w.write_return() print(w)
#Faca um programa que leia um numero inteiro qualquer e mostre na tela a sua tabuada. valor = int(input('Digite um valor: ')) print(50 * '=') print('A tabuada de {} é: '.format(valor)) print("{} x {:2} = {}".format(valor, 1, valor * 1)) print("{} x {:2} = {}".format(valor, 2, valor * 2)) print("{} x {:2} = {}".format(valor, 3, valor * 3)) print("{} x {:2} = {}".format(valor, 4, valor * 4)) print("{} x {:2} = {}".format(valor, 5, valor * 5)) print("{} x {:2} = {}".format(valor, 6, valor * 6)) print("{} x {:2} = {}".format(valor, 7, valor * 7)) print("{} x {:2} = {}".format(valor, 8, valor * 8)) print("{} x {:2} = {}".format(valor, 9, valor * 9)) print("{} x {:2} = {}".format(valor, 10, valor * 10)) print(50 * '=')
'''面试题20:表示数值的字符串 请实现一个函数用来判断字符串是否表示数值(包括整数和小数) ---------------- Example input:"+100"、"5e2"、"-123"、"3.1416"、"-1E-16" output:True,True,True,True,True input:"12e"、"1a3.14"、"1.2.3"、"+-5"、"12e+5.4" output:False,False,False,False,False ------------------- python 字符可以直接比较,ord()可以获取unicode值 ''' def is_numeric(string): if string is None or len(string) < 1: return False numeric, idx = __int_judge(string,0) if idx < len(string) and string[idx] == '.': temp_judge, idx = __unsigned_int_judge(string,idx+1) numeric = temp_judge or numeric if idx < len(string) and (string[idx] == 'e' or string[idx] == 'E'): temp_judge, idx = __int_judge(string,idx+1) numeric = temp_judge and numeric return idx == len(string) and numeric def __int_judge(string, idx): if idx < len(string) and (string[idx] == '+' or string[idx] == '-'): idx += 1 return __unsigned_int_judge(string,idx) def __unsigned_int_judge(string, idx): before = idx while idx < len(string) and string[idx] >= '0' and string[idx] <= '9': idx += 1 return idx > before, idx if __name__ == '__main__': datas = ["+100","5e2","-123","3.1416","-1E-16", "12e","1a3.14","1.2.3","+-5","12e+5.4"] for data in datas: print('%s:%s'%(data, is_numeric(data)))
def diviser(numero): lista = [] a = 0 while a < numero // 2: a = a + 1 if numero % a == 0: lista.append(a) #let's not forget the last number: the number itself! lista.append(numero) return lista years = [1995, 1973, 2006, 1953, 1939, 1931, 1962, 1951] #num = int(input("Numero da dividere? ")) for elemento in years: print(diviser(elemento))
# used by tests abc = 1