content
stringlengths
7
1.05M
fixed_cases
stringlengths
1
1.28M
class MatrixOperations: #Function which returns the transpose of given matrix A def transpose(self, A) : #T is used to store the transpose of A T = [[0, 0, 0], [0, 0, 0], [0, 0, 0]] # iterate through rows for i in range(len(A)): # iterate through columns for j in range(len(A[0])): T[j][i] = A[i][j] return T #Function for multiplication of given matrix A and its transpose T def mult(self, A,T) : result = [[0, 0, 0], [0, 0, 0], [0, 0, 0]] # iterating by row of A for i in range(len(A)): # iterating by coloum by T for j in range(len(T[0])): # iterating by rows of T for k in range(len(T)): result[i][j] += A[i][k] * T[k][j] return result
class Matrixoperations: def transpose(self, A): t = [[0, 0, 0], [0, 0, 0], [0, 0, 0]] for i in range(len(A)): for j in range(len(A[0])): T[j][i] = A[i][j] return T def mult(self, A, T): result = [[0, 0, 0], [0, 0, 0], [0, 0, 0]] for i in range(len(A)): for j in range(len(T[0])): for k in range(len(T)): result[i][j] += A[i][k] * T[k][j] return result
# Given an array with n objects colored red, white or blue, sort them in-place so # that objects of the same color are adjacent, with the colors in the order red, # white and blue. # # Here, we will use the integers 0, 1, and 2 to represent the color red, white, # and blue respectively. # # Note: You are not suppose to use the library's sort function for this problem. # # Example: # # Input: [2,0,2,1,1,0] # Output: [0,0,1,1,2,2] # Follow up: # # A rather straight forward solution is a two-pass algorithm using counting sort. # First, iterate the array counting number of 0's, 1's, and 2's, then overwrite ' # 'array with total number of 0's, then 1's and followed by 2's. # Could you come up with a one-pass algorithm using only constant space? class Solution: def sortColors(self, nums): index = 0 zero_index = 0 two_index = len(nums) - 1 while index <= two_index: if nums[index] == 0: nums[index], nums[zero_index] = nums[zero_index], nums[index] index += 1 zero_index += 1 elif nums[index] == 2: nums[index], nums[two_index] = nums[two_index], nums[index] two_index -= 1 else: index += 1
class Solution: def sort_colors(self, nums): index = 0 zero_index = 0 two_index = len(nums) - 1 while index <= two_index: if nums[index] == 0: (nums[index], nums[zero_index]) = (nums[zero_index], nums[index]) index += 1 zero_index += 1 elif nums[index] == 2: (nums[index], nums[two_index]) = (nums[two_index], nums[index]) two_index -= 1 else: index += 1
# Definition for a binary tree node # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: # @param p, a tree node # @param q, a tree node # @return a boolean def isSameTree(self, p, q): if p is None or q is None: return p is q return (p.val == q.val and self.isSameTree(p.left, q.left) and self.isSameTree(p.right, q.right))
class Solution: def is_same_tree(self, p, q): if p is None or q is None: return p is q return p.val == q.val and self.isSameTree(p.left, q.left) and self.isSameTree(p.right, q.right)
#!/usr/bin/env python actions = {} asts = [] # hgawk asts.append('''class DollarNumber(ast.expr): _fields = ("n",) def __init__(self, n, **kwds): self.n = n self.__dict__.update(kwds) ''') actions['''atom : DOLLARNUMBER'''] = ''' p[0] = DollarNumber(int(p[1][0][1:]), **p[1][1])''' # Python actions['''file_input : ENDMARKER'''] = ''' p[0] = ast.Module([], rule=inspect.currentframe().f_code.co_name, lineno=0, col_offset=0)''' actions['''file_input : file_input_star ENDMARKER'''] = ''' p[0] = ast.Module(p[1], rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], p[1][0])''' actions['''file_input_star : NEWLINE'''] = ''' p[0] = ast.Module([], rule=inspect.currentframe().f_code.co_name, lineno=0, col_offset=0)''' actions['''file_input_star : stmt'''] = ''' p[0] = p[1]''' actions['''file_input_star : file_input_star NEWLINE'''] = ''' p[0] = ast.Module(p[1], rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], p[1][0])''' actions['''file_input_star : file_input_star stmt'''] = ''' p[0] = p[1] + p[2]''' actions['''decorator : AT dotted_name NEWLINE'''] = ''' p[0] = p[2] p[0].alt = p[1][1]''' actions['''decorator : AT dotted_name LPAR RPAR NEWLINE'''] = ''' p[0] = ast.Call(p[2], [], [], None, None, rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], p[1][1])''' actions['''decorator : AT dotted_name LPAR arglist RPAR NEWLINE'''] = ''' p[4].func = p[2] p[0] = p[4] inherit_lineno(p[0], p[2]) p[0].alt = p[1][1]''' actions['''decorators : decorators_plus'''] = ''' p[0] = p[1]''' actions['''decorators_plus : decorator'''] = ''' p[0] = [p[1]]''' actions['''decorators_plus : decorators_plus decorator'''] = ''' p[0] = p[1] + [p[2]]''' actions['''decorated : decorators classdef'''] = ''' p[2].decorator_list = p[1] p[0] = p[2] inherit_lineno(p[0], p[1][0])''' actions['''decorated : decorators funcdef'''] = ''' p[2].decorator_list = p[1] p[0] = p[2] inherit_lineno(p[0], p[1][0])''' actions['''funcdef : DEF NAME parameters COLON suite'''] = ''' p[0] = ast.FunctionDef(p[2][0], p[3], p[5], [], rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''parameters : LPAR RPAR'''] = ''' p[0] = ast.arguments([], None, None, [], rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''parameters : LPAR varargslist RPAR'''] = ''' p[0] = p[2]''' actions['''varargslist : fpdef COMMA STAR NAME'''] = ''' p[0] = ast.arguments([p[1]], p[4][0], None, [], rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], p[1])''' actions['''varargslist : fpdef COMMA STAR NAME COMMA DOUBLESTAR NAME'''] = ''' p[0] = ast.arguments([p[1]], p[4][0], p[7][0], [], rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], p[1])''' actions['''varargslist : fpdef COMMA DOUBLESTAR NAME'''] = ''' p[0] = ast.arguments([p[1]], None, p[4][0], [], rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], p[1])''' actions['''varargslist : fpdef'''] = ''' p[0] = ast.arguments([p[1]], None, None, [], rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], p[1])''' actions['''varargslist : fpdef COMMA'''] = ''' p[0] = ast.arguments([p[1]], None, None, [], rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], p[1])''' actions['''varargslist : fpdef varargslist_star COMMA STAR NAME'''] = ''' p[2].args.insert(0, p[1]) p[2].vararg = p[5][0] p[0] = p[2]''' actions['''varargslist : fpdef varargslist_star COMMA STAR NAME COMMA DOUBLESTAR NAME'''] = ''' p[2].args.insert(0, p[1]) p[2].vararg = p[5][0] p[2].kwarg = p[8][0] p[0] = p[2]''' actions['''varargslist : fpdef varargslist_star COMMA DOUBLESTAR NAME'''] = ''' p[2].args.insert(0, p[1]) p[2].kwarg = p[5][0] p[0] = p[2]''' actions['''varargslist : fpdef varargslist_star'''] = ''' p[2].args.insert(0, p[1]) p[0] = p[2]''' actions['''varargslist : fpdef varargslist_star COMMA'''] = ''' p[2].args.insert(0, p[1]) p[0] = p[2]''' actions['''varargslist : fpdef EQUAL test COMMA STAR NAME'''] = ''' p[0] = ast.arguments([p[1]], p[6][0], None, [p[3]], rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], p[1])''' actions['''varargslist : fpdef EQUAL test COMMA STAR NAME COMMA DOUBLESTAR NAME'''] = ''' p[0] = ast.arguments([p[1]], p[6][0], p[9][0], [p[3]], rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], p[1])''' actions['''varargslist : fpdef EQUAL test COMMA DOUBLESTAR NAME'''] = ''' p[0] = ast.arguments([p[1]], None, p[6][0], [p[3]], rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], p[1])''' actions['''varargslist : fpdef EQUAL test'''] = ''' p[0] = ast.arguments([p[1]], None, None, [p[3]], rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], p[1])''' actions['''varargslist : fpdef EQUAL test COMMA'''] = ''' p[0] = ast.arguments([p[1]], None, None, [p[3]], rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], p[1])''' actions['''varargslist : fpdef EQUAL test varargslist_star COMMA STAR NAME'''] = ''' p[4].args.insert(0, p[1]) p[4].vararg = p[7][0] p[4].defaults.insert(0, p[3]) p[0] = p[4]''' actions['''varargslist : fpdef EQUAL test varargslist_star COMMA STAR NAME COMMA DOUBLESTAR NAME'''] = ''' p[4].args.insert(0, p[1]) p[4].vararg = p[7][0] p[4].kwarg = p[10][0] p[4].defaults.insert(0, p[3]) p[0] = p[4]''' actions['''varargslist : fpdef EQUAL test varargslist_star COMMA DOUBLESTAR NAME'''] = ''' p[4].args.insert(0, p[1]) p[4].kwarg = p[7][0] p[4].defaults.insert(0, p[3]) p[0] = p[4]''' actions['''varargslist : fpdef EQUAL test varargslist_star'''] = ''' p[4].args.insert(0, p[1]) p[4].defaults.insert(0, p[3]) p[0] = p[4]''' actions['''varargslist : fpdef EQUAL test varargslist_star COMMA'''] = ''' p[4].args.insert(0, p[1]) p[4].defaults.insert(0, p[3]) p[0] = p[4]''' actions['''varargslist : STAR NAME'''] = ''' p[0] = ast.arguments([], p[2][0], None, [], rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], p[2][1])''' actions['''varargslist : STAR NAME COMMA DOUBLESTAR NAME'''] = ''' p[0] = ast.arguments([], p[2][0], p[5][0], [], rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], p[2][1])''' actions['''varargslist : DOUBLESTAR NAME'''] = ''' p[0] = ast.arguments([], None, p[2][0], [], rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], p[2][1])''' actions['''varargslist_star : COMMA fpdef'''] = ''' p[0] = ast.arguments([p[2]], None, None, [], rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], p[2])''' actions['''varargslist_star : COMMA fpdef EQUAL test'''] = ''' p[0] = ast.arguments([p[2]], None, None, [p[4]], rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], p[2])''' actions['''varargslist_star : varargslist_star COMMA fpdef'''] = ''' p[1].args.append(p[3]) p[0] = p[1]''' actions['''varargslist_star : varargslist_star COMMA fpdef EQUAL test'''] = ''' p[1].args.append(p[3]) p[1].defaults.append(p[5]) p[0] = p[1]''' actions['''fpdef : NAME'''] = ''' p[0] = ast.Name(p[1][0], ast.Param(), rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''fpdef : LPAR fplist RPAR'''] = ''' if isinstance(p[2], ast.Tuple): p[2].paren = True ctx_to_store(p[2]) p[0] = p[2]''' actions['''fplist : fpdef'''] = ''' p[0] = p[1]''' actions['''fplist : fpdef COMMA'''] = ''' p[0] = ast.Tuple([p[1]], ast.Param(), rule=inspect.currentframe().f_code.co_name, paren=False) inherit_lineno(p[0], p[1])''' actions['''fplist : fpdef fplist_star'''] = ''' p[2].elts.insert(0, p[1]) p[0] = p[2] inherit_lineno(p[0], p[1])''' actions['''fplist : fpdef fplist_star COMMA'''] = ''' p[2].elts.insert(0, p[1]) p[0] = p[2] inherit_lineno(p[0], p[1])''' actions['''fplist_star : COMMA fpdef'''] = ''' p[0] = ast.Tuple([p[2]], ast.Param(), rule=inspect.currentframe().f_code.co_name, paren=False)''' actions['''fplist_star : fplist_star COMMA fpdef'''] = ''' p[1].elts.append(p[3]) p[0] = p[1]''' actions['''stmt : simple_stmt'''] = ''' p[0] = p[1]''' actions['''stmt : compound_stmt'''] = ''' p[0] = p[1]''' actions['''simple_stmt : small_stmt NEWLINE'''] = ''' p[0] = [p[1]]''' actions['''simple_stmt : small_stmt SEMI NEWLINE'''] = ''' p[0] = [p[1]]''' actions['''simple_stmt : small_stmt simple_stmt_star NEWLINE'''] = ''' p[0] = [p[1]] + p[2]''' actions['''simple_stmt : small_stmt simple_stmt_star SEMI NEWLINE'''] = ''' p[0] = [p[1]] + p[2]''' actions['''simple_stmt_star : SEMI small_stmt'''] = ''' p[0] = [p[2]]''' actions['''simple_stmt_star : simple_stmt_star SEMI small_stmt'''] = ''' p[0] = p[1] + [p[3]]''' actions['''small_stmt : expr_stmt'''] = ''' p[0] = p[1]''' actions['''small_stmt : print_stmt'''] = ''' p[0] = p[1]''' actions['''small_stmt : del_stmt'''] = ''' p[0] = p[1]''' actions['''small_stmt : pass_stmt'''] = ''' p[0] = p[1]''' actions['''small_stmt : flow_stmt'''] = ''' p[0] = p[1]''' actions['''small_stmt : import_stmt'''] = ''' p[0] = p[1]''' actions['''small_stmt : global_stmt'''] = ''' p[0] = p[1]''' actions['''small_stmt : exec_stmt'''] = ''' p[0] = p[1]''' actions['''small_stmt : assert_stmt'''] = ''' p[0] = p[1]''' actions['''expr_stmt : testlist augassign yield_expr'''] = ''' ctx_to_store(p[1]) p[0] = ast.AugAssign(p[1], p[2], p[3], rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], p[1])''' actions['''expr_stmt : testlist augassign testlist'''] = ''' ctx_to_store(p[1]) p[0] = ast.AugAssign(p[1], p[2], p[3], rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], p[1])''' actions['''expr_stmt : testlist'''] = ''' p[0] = ast.Expr(p[1], rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], p[1])''' actions['''expr_stmt : testlist expr_stmt_star'''] = ''' everything = [p[1]] + p[2] targets, value = everything[:-1], everything[-1] ctx_to_store(targets) p[0] = ast.Assign(targets, value, rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], targets[0])''' actions['''expr_stmt_star : EQUAL yield_expr'''] = ''' p[0] = [p[2]]''' actions['''expr_stmt_star : EQUAL testlist'''] = ''' p[0] = [p[2]]''' actions['''expr_stmt_star : expr_stmt_star EQUAL yield_expr'''] = ''' p[0] = p[1] + [p[3]]''' actions['''expr_stmt_star : expr_stmt_star EQUAL testlist'''] = ''' p[0] = p[1] + [p[3]]''' actions['''augassign : PLUSEQUAL'''] = ''' p[0] = ast.Add(rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''augassign : MINEQUAL'''] = ''' p[0] = ast.Sub(rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''augassign : STAREQUAL'''] = ''' p[0] = ast.Mult(rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''augassign : SLASHEQUAL'''] = ''' p[0] = ast.Div(rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''augassign : PERCENTEQUAL'''] = ''' p[0] = ast.Mod(rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''augassign : AMPEREQUAL'''] = ''' p[0] = ast.BitAnd(rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''augassign : VBAREQUAL'''] = ''' p[0] = ast.BitOr(rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''augassign : CIRCUMFLEXEQUAL'''] = ''' p[0] = ast.BitXor(rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''augassign : LEFTSHIFTEQUAL'''] = ''' p[0] = ast.LShift(rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''augassign : RIGHTSHIFTEQUAL'''] = ''' p[0] = ast.RShift(rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''augassign : DOUBLESTAREQUAL'''] = ''' p[0] = ast.Pow(rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''augassign : DOUBLESLASHEQUAL'''] = ''' p[0] = ast.FloorDiv(rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''print_stmt : PRINT'''] = ''' p[0] = ast.Print(None, [], True, rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''print_stmt : PRINT test'''] = ''' p[0] = ast.Print(None, [p[2]], True, rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''print_stmt : PRINT test COMMA'''] = ''' p[0] = ast.Print(None, [p[2]], False, rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''print_stmt : PRINT test print_stmt_plus'''] = ''' p[0] = ast.Print(None, [p[2]] + p[3], True, rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''print_stmt : PRINT test print_stmt_plus COMMA'''] = ''' p[0] = ast.Print(None, [p[2]] + p[3], False, rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''print_stmt : PRINT RIGHTSHIFT test'''] = ''' p[0] = ast.Print(p[3], [], True, rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''print_stmt : PRINT RIGHTSHIFT test print_stmt_plus'''] = ''' p[0] = ast.Print(p[3], p[4], True, rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''print_stmt : PRINT RIGHTSHIFT test print_stmt_plus COMMA'''] = ''' p[0] = ast.Print(p[3], p[4], False, rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''print_stmt_plus : COMMA test'''] = ''' p[0] = [p[2]]''' actions['''print_stmt_plus : print_stmt_plus COMMA test'''] = ''' p[0] = p[1] + [p[3]]''' actions['''del_stmt : DEL exprlist'''] = ''' ctx_to_store(p[2], ast.Del) # interesting fact: evaluating Delete nodes with ctx=Store() causes a segmentation fault in Python! if isinstance(p[2], ast.Tuple) and not p[2].paren: p[0] = ast.Delete(p[2].elts, rule=inspect.currentframe().f_code.co_name, **p[1][1]) else: p[0] = ast.Delete([p[2]], rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''pass_stmt : PASS'''] = ''' p[0] = ast.Pass(rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''flow_stmt : break_stmt'''] = ''' p[0] = p[1]''' actions['''flow_stmt : continue_stmt'''] = ''' p[0] = p[1]''' actions['''flow_stmt : return_stmt'''] = ''' p[0] = p[1]''' actions['''flow_stmt : raise_stmt'''] = ''' p[0] = p[1]''' actions['''flow_stmt : yield_stmt'''] = ''' p[0] = ast.Expr(p[1], rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], p[1])''' actions['''break_stmt : BREAK'''] = ''' p[0] = ast.Break(rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''continue_stmt : CONTINUE'''] = ''' p[0] = ast.Continue(rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''return_stmt : RETURN'''] = ''' p[0] = ast.Return(None, rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''return_stmt : RETURN testlist'''] = ''' p[0] = ast.Return(p[2], rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''yield_stmt : yield_expr'''] = ''' p[0] = p[1]''' actions['''raise_stmt : RAISE'''] = ''' p[0] = ast.Raise(None, None, None, rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''raise_stmt : RAISE test'''] = ''' p[0] = ast.Raise(p[2], None, None, rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''raise_stmt : RAISE test COMMA test'''] = ''' p[0] = ast.Raise(p[2], p[4], None, rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''raise_stmt : RAISE test COMMA test COMMA test'''] = ''' p[0] = ast.Raise(p[2], p[4], p[6], rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''import_stmt : import_name'''] = ''' p[0] = p[1]''' actions['''import_stmt : import_from'''] = ''' p[0] = p[1]''' actions['''import_name : IMPORT dotted_as_names'''] = ''' p[0] = ast.Import(p[2], rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''import_from : FROM dotted_name IMPORT STAR'''] = ''' dotted = [] last = p[2] while isinstance(last, ast.Attribute): dotted.insert(0, last.attr) last = last.value dotted.insert(0, last.id) p[0] = ast.ImportFrom(".".join(dotted), [ast.alias("*", None, rule=inspect.currentframe().f_code.co_name, **p[3][1])], 0, rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''import_from : FROM dotted_name IMPORT LPAR import_as_names RPAR'''] = ''' dotted = [] last = p[2] while isinstance(last, ast.Attribute): dotted.insert(0, last.attr) last = last.value dotted.insert(0, last.id) p[0] = ast.ImportFrom(".".join(dotted), p[5], 0, rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''import_from : FROM dotted_name IMPORT import_as_names'''] = ''' dotted = [] last = p[2] while isinstance(last, ast.Attribute): dotted.insert(0, last.attr) last = last.value dotted.insert(0, last.id) p[0] = ast.ImportFrom(".".join(dotted), p[4], 0, rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''import_from : FROM import_from_plus dotted_name IMPORT STAR'''] = ''' dotted = [] last = p[3] while isinstance(last, ast.Attribute): dotted.insert(0, last.attr) last = last.value dotted.insert(0, last.id) p[0] = ast.ImportFrom(".".join(dotted), [ast.alias("*", None, rule=inspect.currentframe().f_code.co_name, **p[4][1])], p[2], **p[1][1])''' actions['''import_from : FROM import_from_plus dotted_name IMPORT LPAR import_as_names RPAR'''] = ''' dotted = [] last = p[3] while isinstance(last, ast.Attribute): dotted.insert(0, last.attr) last = last.value dotted.insert(0, last.id) p[0] = ast.ImportFrom(".".join(dotted), p[6], p[2], rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''import_from : FROM import_from_plus dotted_name IMPORT import_as_names'''] = ''' dotted = [] last = p[3] while isinstance(last, ast.Attribute): dotted.insert(0, last.attr) last = last.value dotted.insert(0, last.id) p[0] = ast.ImportFrom(".".join(dotted), p[5], p[2], rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''import_from : FROM import_from_plus IMPORT STAR'''] = ''' p[0] = ast.ImportFrom(None, [ast.alias("*", None, rule=inspect.currentframe().f_code.co_name, **p[3][1])], p[2], rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''import_from : FROM import_from_plus IMPORT LPAR import_as_names RPAR'''] = ''' p[0] = ast.ImportFrom(None, p[5], p[2], rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''import_from : FROM import_from_plus IMPORT import_as_names'''] = ''' p[0] = ast.ImportFrom(None, p[4], p[2], rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''import_from_plus : DOT'''] = ''' p[0] = 1''' actions['''import_from_plus : import_from_plus DOT'''] = ''' p[0] = p[1] + 1''' actions['''import_as_name : NAME'''] = ''' p[0] = ast.alias(p[1][0], None, rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''import_as_name : NAME AS NAME'''] = ''' p[0] = ast.alias(p[1][0], p[3][0], rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''dotted_as_name : dotted_name'''] = ''' dotted = [] last = p[1] while isinstance(last, ast.Attribute): dotted.insert(0, last.attr) last = last.value dotted.insert(0, last.id) p[0] = ast.alias(".".join(dotted), None, rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], p[1])''' actions['''dotted_as_name : dotted_name AS NAME'''] = ''' dotted = [] last = p[1] while isinstance(last, ast.Attribute): dotted.insert(0, last.attr) last = last.value dotted.insert(0, last.id) p[0] = ast.alias(".".join(dotted), p[3][0], rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], p[1])''' actions['''import_as_names : import_as_name'''] = ''' p[0] = [p[1]]''' actions['''import_as_names : import_as_name COMMA'''] = ''' p[0] = [p[1]]''' actions['''import_as_names : import_as_name import_as_names_star'''] = ''' p[0] = [p[1]] + p[2]''' actions['''import_as_names : import_as_name import_as_names_star COMMA'''] = ''' p[0] = [p[1]] + p[2]''' actions['''import_as_names_star : COMMA import_as_name'''] = ''' p[0] = [p[2]]''' actions['''import_as_names_star : import_as_names_star COMMA import_as_name'''] = ''' p[0] = p[1] + [p[3]]''' actions['''dotted_as_names : dotted_as_name'''] = ''' p[0] = [p[1]]''' actions['''dotted_as_names : dotted_as_name dotted_as_names_star'''] = ''' p[0] = [p[1]] + p[2]''' actions['''dotted_as_names_star : COMMA dotted_as_name'''] = ''' p[0] = [p[2]]''' actions['''dotted_as_names_star : dotted_as_names_star COMMA dotted_as_name'''] = ''' p[0] = p[1] + [p[3]]''' actions['''dotted_name : NAME'''] = ''' p[0] = ast.Name(p[1][0], ast.Load(), rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''dotted_name : NAME dotted_name_star'''] = ''' last = p[2] if isinstance(last, ast.Attribute): inherit_lineno(last, p[1][1]) while isinstance(last.value, ast.Attribute): last = last.value inherit_lineno(last, p[1][1]) last.value = ast.Attribute(ast.Name(p[1][0], ast.Load(), rule=inspect.currentframe().f_code.co_name, **p[1][1]), last.value, ast.Load(), rule=inspect.currentframe().f_code.co_name, **p[1][1]) p[0] = p[2] else: p[0] = ast.Attribute(ast.Name(p[1][0], ast.Load(), rule=inspect.currentframe().f_code.co_name, **p[1][1]), p[2], ast.Load(), rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''dotted_name_star : DOT NAME'''] = ''' p[0] = p[2][0]''' actions['''dotted_name_star : dotted_name_star DOT NAME'''] = ''' p[0] = ast.Attribute(p[1], p[3][0], ast.Load(), rule=inspect.currentframe().f_code.co_name)''' actions['''global_stmt : GLOBAL NAME'''] = ''' p[0] = ast.Global([p[2][0]], rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''global_stmt : GLOBAL NAME global_stmt_star'''] = ''' p[0] = ast.Global([p[2][0]] + p[3], rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''global_stmt_star : COMMA NAME'''] = ''' p[0] = [p[2][0]]''' actions['''global_stmt_star : global_stmt_star COMMA NAME'''] = ''' p[0] = p[1] + [p[3][0]]''' actions['''exec_stmt : EXEC expr'''] = ''' p[0] = ast.Exec(p[2], None, None, rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''exec_stmt : EXEC expr IN test'''] = ''' p[0] = ast.Exec(p[2], p[4], None, rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''exec_stmt : EXEC expr IN test COMMA test'''] = ''' p[0] = ast.Exec(p[2], p[4], p[6], rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''assert_stmt : ASSERT test'''] = ''' p[0] = ast.Assert(p[2], None, rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''assert_stmt : ASSERT test COMMA test'''] = ''' p[0] = ast.Assert(p[2], p[4], rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''compound_stmt : if_stmt'''] = ''' p[0] = [p[1]]''' actions['''compound_stmt : while_stmt'''] = ''' p[0] = [p[1]]''' actions['''compound_stmt : for_stmt'''] = ''' p[0] = [p[1]]''' actions['''compound_stmt : try_stmt'''] = ''' p[0] = [p[1]]''' actions['''compound_stmt : with_stmt'''] = ''' p[0] = [p[1]]''' actions['''compound_stmt : funcdef'''] = ''' p[0] = [p[1]]''' actions['''compound_stmt : classdef'''] = ''' p[0] = [p[1]]''' actions['''compound_stmt : decorated'''] = ''' p[0] = [p[1]]''' actions['''if_stmt : IF test COLON suite'''] = ''' p[0] = ast.If(p[2], p[4], [], rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''if_stmt : IF test COLON suite ELSE COLON suite'''] = ''' p[0] = ast.If(p[2], p[4], p[7], rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''if_stmt : IF test COLON suite if_stmt_star'''] = ''' p[0] = ast.If(p[2], p[4], [p[5]], rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''if_stmt : IF test COLON suite if_stmt_star ELSE COLON suite'''] = ''' last = p[5] while len(last.orelse) > 0: last = last.orelse[0] last.orelse.extend(p[8]) p[0] = ast.If(p[2], p[4], [p[5]], rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''if_stmt_star : ELIF test COLON suite'''] = ''' p[0] = ast.If(p[2], p[4], [], rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], p[2])''' actions['''if_stmt_star : if_stmt_star ELIF test COLON suite'''] = ''' last = p[1] while len(last.orelse) > 0: last = last.orelse[0] last.orelse.append(ast.If(p[3], p[5], [], rule=inspect.currentframe().f_code.co_name)) inherit_lineno(last.orelse[-1], p[3]) p[0] = p[1]''' actions['''while_stmt : WHILE test COLON suite'''] = ''' p[0] = ast.While(p[2], p[4], [], rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''while_stmt : WHILE test COLON suite ELSE COLON suite'''] = ''' p[0] = ast.While(p[2], p[4], p[7], rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''for_stmt : FOR exprlist IN testlist COLON suite'''] = ''' ctx_to_store(p[2]) p[0] = ast.For(p[2], p[4], p[6], [], rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''for_stmt : FOR exprlist IN testlist COLON suite ELSE COLON suite'''] = ''' ctx_to_store(p[2]) p[0] = ast.For(p[2], p[4], p[6], p[9], rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''try_stmt : TRY COLON suite try_stmt_plus'''] = ''' p[0] = ast.TryExcept(p[3], p[4], [], rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''try_stmt : TRY COLON suite try_stmt_plus FINALLY COLON suite'''] = ''' p[0] = ast.TryFinally([ast.TryExcept(p[3], p[4], [], rule=inspect.currentframe().f_code.co_name, **p[1][1])], p[7], rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''try_stmt : TRY COLON suite try_stmt_plus ELSE COLON suite'''] = ''' p[0] = ast.TryExcept(p[3], p[4], p[7], rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''try_stmt : TRY COLON suite try_stmt_plus ELSE COLON suite FINALLY COLON suite'''] = ''' p[0] = ast.TryFinally([ast.TryExcept(p[3], p[4], p[7], rule=inspect.currentframe().f_code.co_name, **p[1][1])], p[10], rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''try_stmt : TRY COLON suite FINALLY COLON suite'''] = ''' p[0] = ast.TryFinally(p[3], p[6], rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''try_stmt_plus : except_clause COLON suite'''] = ''' p[1].body = p[3] p[0] = [p[1]]''' actions['''try_stmt_plus : try_stmt_plus except_clause COLON suite'''] = ''' p[2].body = p[4] p[0] = p[1] + [p[2]]''' actions['''with_stmt : WITH with_item COLON suite'''] = ''' p[2].body = p[4] p[0] = p[2]''' actions['''with_stmt : WITH with_item with_stmt_star COLON suite'''] = ''' p[2].body.append(p[3]) last = p[2] while len(last.body) > 0: last = last.body[0] last.body = p[5] p[0] = p[2]''' actions['''with_stmt_star : COMMA with_item'''] = ''' p[0] = p[2]''' actions['''with_stmt_star : with_stmt_star COMMA with_item'''] = ''' last = p[1] while len(last.body) > 0: last = last.body[0] last.body.append(p[3]) p[0] = p[1]''' actions['''with_item : test'''] = ''' p[0] = ast.With(p[1], None, [], rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], p[1])''' actions['''with_item : test AS expr'''] = ''' ctx_to_store(p[3]) p[0] = ast.With(p[1], p[3], [], rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], p[1])''' actions['''except_clause : EXCEPT'''] = ''' p[0] = ast.ExceptHandler(None, None, [], rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''except_clause : EXCEPT test'''] = ''' p[0] = ast.ExceptHandler(p[2], None, [], rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''except_clause : EXCEPT test AS test'''] = ''' ctx_to_store(p[4]) p[0] = ast.ExceptHandler(p[2], p[4], [], rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''except_clause : EXCEPT test COMMA test'''] = ''' ctx_to_store(p[4]) p[0] = ast.ExceptHandler(p[2], p[4], [], rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''suite : simple_stmt'''] = ''' p[0] = p[1]''' actions['''suite : NEWLINE INDENT suite_plus DEDENT'''] = ''' p[0] = p[3]''' actions['''suite_plus : stmt'''] = ''' p[0] = p[1]''' actions['''suite_plus : suite_plus stmt'''] = ''' p[0] = p[1] + p[2]''' actions['''testlist_safe : old_test'''] = ''' p[0] = p[1]''' actions['''testlist_safe : old_test testlist_safe_plus'''] = ''' p[0] = ast.Tuple([p[1]] + p[2], ast.Load(), rule=inspect.currentframe().f_code.co_name, paren=False) inherit_lineno(p[0], p[1])''' actions['''testlist_safe : old_test testlist_safe_plus COMMA'''] = ''' p[0] = ast.Tuple([p[1]] + p[2], ast.Load(), rule=inspect.currentframe().f_code.co_name, paren=False) inherit_lineno(p[0], p[1])''' actions['''testlist_safe_plus : COMMA old_test'''] = ''' p[0] = [p[2]]''' actions['''testlist_safe_plus : testlist_safe_plus COMMA old_test'''] = ''' p[0] = p[1] + [p[3]]''' actions['''old_test : or_test'''] = ''' p[0] = p[1]''' actions['''old_test : old_lambdef'''] = ''' p[0] = p[1]''' actions['''old_lambdef : LAMBDA COLON old_test'''] = ''' p[0] = ast.Lambda(ast.arguments([], None, None, [], rule=inspect.currentframe().f_code.co_name, **p[2][1]), p[3], rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''old_lambdef : LAMBDA varargslist COLON old_test'''] = ''' p[0] = ast.Lambda(p[2], p[4], rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''test : or_test'''] = ''' p[0] = p[1]''' actions['''test : or_test IF or_test ELSE test'''] = ''' p[0] = ast.IfExp(p[3], p[1], p[5], rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], p[1])''' actions['''test : lambdef'''] = ''' p[0] = p[1]''' actions['''or_test : and_test'''] = ''' p[0] = p[1]''' actions['''or_test : and_test or_test_star'''] = ''' theor = ast.Or(rule=inspect.currentframe().f_code.co_name) inherit_lineno(theor, p[2][0]) p[0] = ast.BoolOp(theor, [p[1]] + p[2], rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], p[1])''' actions['''or_test_star : OR and_test'''] = ''' p[0] = [p[2]]''' actions['''or_test_star : or_test_star OR and_test'''] = ''' p[0] = p[1] + [p[3]]''' actions['''and_test : not_test'''] = ''' p[0] = p[1]''' actions['''and_test : not_test and_test_star'''] = ''' theand = ast.And(rule=inspect.currentframe().f_code.co_name) inherit_lineno(theand, p[2][0]) p[0] = ast.BoolOp(theand, [p[1]] + p[2], rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], p[1])''' actions['''and_test_star : AND not_test'''] = ''' p[0] = [p[2]]''' actions['''and_test_star : and_test_star AND not_test'''] = ''' p[0] = p[1] + [p[3]]''' actions['''not_test : NOT not_test'''] = ''' thenot = ast.Not(rule=inspect.currentframe().f_code.co_name) inherit_lineno(thenot, p[2]) p[0] = ast.UnaryOp(thenot, p[2], rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''not_test : comparison'''] = ''' p[0] = p[1]''' actions['''comparison : expr'''] = ''' p[0] = p[1]''' actions['''comparison : expr comparison_star'''] = ''' ops, exprs = p[2] p[0] = ast.Compare(p[1], ops, exprs, rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], p[1])''' actions['''comparison_star : comp_op expr'''] = ''' inherit_lineno(p[1], p[2]) p[0] = ([p[1]], [p[2]])''' actions['''comparison_star : comparison_star comp_op expr'''] = ''' ops, exprs = p[1] inherit_lineno(p[2], p[3]) p[0] = (ops + [p[2]], exprs + [p[3]])''' actions['''comp_op : LESS'''] = ''' p[0] = ast.Lt(rule=inspect.currentframe().f_code.co_name)''' actions['''comp_op : GREATER'''] = ''' p[0] = ast.Gt(rule=inspect.currentframe().f_code.co_name)''' actions['''comp_op : EQEQUAL'''] = ''' p[0] = ast.Eq(rule=inspect.currentframe().f_code.co_name)''' actions['''comp_op : GREATEREQUAL'''] = ''' p[0] = ast.GtE(rule=inspect.currentframe().f_code.co_name)''' actions['''comp_op : LESSEQUAL'''] = ''' p[0] = ast.LtE(rule=inspect.currentframe().f_code.co_name)''' actions['''comp_op : NOTEQUAL'''] = ''' p[0] = ast.NotEq(rule=inspect.currentframe().f_code.co_name)''' actions['''comp_op : IN'''] = ''' p[0] = ast.In(rule=inspect.currentframe().f_code.co_name)''' actions['''comp_op : NOT IN'''] = ''' p[0] = ast.NotIn(rule=inspect.currentframe().f_code.co_name)''' actions['''comp_op : IS'''] = ''' p[0] = ast.Is(rule=inspect.currentframe().f_code.co_name)''' actions['''comp_op : IS NOT'''] = ''' p[0] = ast.IsNot(rule=inspect.currentframe().f_code.co_name)''' actions['''expr : xor_expr'''] = ''' p[0] = p[1]''' actions['''expr : xor_expr expr_star'''] = ''' p[0] = unwrap_left_associative([p[1]] + p[2], rule=inspect.currentframe().f_code.co_name, alt=len(p[2]) > 2)''' actions['''expr_star : VBAR xor_expr'''] = ''' p[0] = [ast.BitOr(rule=inspect.currentframe().f_code.co_name, **p[1][1]), p[2]]''' actions['''expr_star : expr_star VBAR xor_expr'''] = ''' p[0] = p[1] + [ast.BitOr(rule=inspect.currentframe().f_code.co_name, **p[2][1]), p[3]]''' actions['''xor_expr : and_expr'''] = ''' p[0] = p[1]''' actions['''xor_expr : and_expr xor_expr_star'''] = ''' p[0] = unwrap_left_associative([p[1]] + p[2], rule=inspect.currentframe().f_code.co_name, alt=len(p[2]) > 2)''' actions['''xor_expr_star : CIRCUMFLEX and_expr'''] = ''' p[0] = [ast.BitXor(rule=inspect.currentframe().f_code.co_name, **p[1][1]), p[2]]''' actions['''xor_expr_star : xor_expr_star CIRCUMFLEX and_expr'''] = ''' p[0] = p[1] + [ast.BitXor(rule=inspect.currentframe().f_code.co_name, **p[2][1]), p[3]]''' actions['''and_expr : shift_expr'''] = ''' p[0] = p[1]''' actions['''and_expr : shift_expr and_expr_star'''] = ''' p[0] = unwrap_left_associative([p[1]] + p[2], rule=inspect.currentframe().f_code.co_name, alt=len(p[2]) > 0)''' actions['''and_expr_star : AMPER shift_expr'''] = ''' p[0] = [ast.BitAnd(rule=inspect.currentframe().f_code.co_name, **p[1][1]), p[2]]''' actions['''and_expr_star : and_expr_star AMPER shift_expr'''] = ''' p[0] = p[1] + [ast.BitAnd(rule=inspect.currentframe().f_code.co_name, **p[2][1]), p[3]]''' actions['''shift_expr : arith_expr'''] = ''' p[0] = p[1]''' actions['''shift_expr : arith_expr shift_expr_star'''] = ''' p[0] = unwrap_left_associative([p[1]] + p[2], rule=inspect.currentframe().f_code.co_name, alt=len(p[2]) > 2)''' actions['''shift_expr_star : LEFTSHIFT arith_expr'''] = ''' p[0] = [ast.LShift(rule=inspect.currentframe().f_code.co_name, **p[1][1]), p[2]]''' actions['''shift_expr_star : RIGHTSHIFT arith_expr'''] = ''' p[0] = [ast.RShift(rule=inspect.currentframe().f_code.co_name, **p[1][1]), p[2]]''' actions['''shift_expr_star : shift_expr_star LEFTSHIFT arith_expr'''] = ''' p[0] = p[1] + [ast.LShift(rule=inspect.currentframe().f_code.co_name, **p[2][1]), p[3]]''' actions['''shift_expr_star : shift_expr_star RIGHTSHIFT arith_expr'''] = ''' p[0] = p[1] + [ast.RShift(rule=inspect.currentframe().f_code.co_name, **p[2][1]), p[3]]''' actions['''arith_expr : term'''] = ''' p[0] = p[1]''' actions['''arith_expr : term arith_expr_star'''] = ''' p[0] = unwrap_left_associative([p[1]] + p[2], rule=inspect.currentframe().f_code.co_name, alt=len(p[2]) > 2)''' actions['''arith_expr_star : PLUS term'''] = ''' p[0] = [ast.Add(rule=inspect.currentframe().f_code.co_name, **p[1][1]), p[2]]''' actions['''arith_expr_star : MINUS term'''] = ''' p[0] = [ast.Sub(rule=inspect.currentframe().f_code.co_name, **p[1][1]), p[2]]''' actions['''arith_expr_star : arith_expr_star PLUS term'''] = ''' p[0] = p[1] + [ast.Add(rule=inspect.currentframe().f_code.co_name, **p[2][1]), p[3]]''' actions['''arith_expr_star : arith_expr_star MINUS term'''] = ''' p[0] = p[1] + [ast.Sub(rule=inspect.currentframe().f_code.co_name, **p[2][1]), p[3]]''' actions['''term : factor'''] = ''' p[0] = p[1]''' actions['''term : factor term_star'''] = ''' p[0] = unwrap_left_associative([p[1]] + p[2], rule=inspect.currentframe().f_code.co_name, alt=len(p[2]) > 2)''' actions['''term_star : STAR factor'''] = ''' p[0] = [ast.Mult(rule=inspect.currentframe().f_code.co_name, **p[1][1]), p[2]]''' actions['''term_star : SLASH factor'''] = ''' p[0] = [ast.Div(rule=inspect.currentframe().f_code.co_name, **p[1][1]), p[2]]''' actions['''term_star : PERCENT factor'''] = ''' p[0] = [ast.Mod(rule=inspect.currentframe().f_code.co_name, **p[1][1]), p[2]]''' actions['''term_star : DOUBLESLASH factor'''] = ''' p[0] = [ast.FloorDiv(rule=inspect.currentframe().f_code.co_name, **p[1][1]), p[2]]''' actions['''term_star : term_star STAR factor'''] = ''' p[0] = p[1] + [ast.Mult(rule=inspect.currentframe().f_code.co_name, **p[2][1]), p[3]]''' actions['''term_star : term_star SLASH factor'''] = ''' p[0] = p[1] + [ast.Div(rule=inspect.currentframe().f_code.co_name, **p[2][1]), p[3]]''' actions['''term_star : term_star PERCENT factor'''] = ''' p[0] = p[1] + [ast.Mod(rule=inspect.currentframe().f_code.co_name, **p[2][1]), p[3]]''' actions['''term_star : term_star DOUBLESLASH factor'''] = ''' p[0] = p[1] + [ast.FloorDiv(rule=inspect.currentframe().f_code.co_name, **p[2][1]), p[3]]''' actions['''factor : PLUS factor'''] = ''' op = ast.UAdd(rule=inspect.currentframe().f_code.co_name, **p[1][1]) p[0] = ast.UnaryOp(op, p[2], rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], op)''' actions['''factor : MINUS factor'''] = ''' if isinstance(p[2], ast.Num) and not hasattr(p[2], "unary"): p[2].n *= -1 p[0] = p[2] p[0].unary = True inherit_lineno(p[0], p[1][1]) else: op = ast.USub(rule=inspect.currentframe().f_code.co_name, **p[1][1]) p[0] = ast.UnaryOp(op, p[2], rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], op)''' actions['''factor : TILDE factor'''] = ''' op = ast.Invert(rule=inspect.currentframe().f_code.co_name, **p[1][1]) p[0] = ast.UnaryOp(op, p[2], rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], op)''' actions['''factor : power'''] = ''' p[0] = p[1]''' actions['''power : atom'''] = ''' p[0] = p[1]''' actions['''power : atom DOUBLESTAR factor'''] = ''' p[0] = ast.BinOp(p[1], ast.Pow(rule=inspect.currentframe().f_code.co_name, **p[2][1]), p[3], rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], p[1])''' actions['''power : atom power_star'''] = ''' p[0] = unpack_trailer(p[1], p[2])''' actions['''power : atom power_star DOUBLESTAR factor'''] = ''' p[0] = ast.BinOp(unpack_trailer(p[1], p[2]), ast.Pow(rule=inspect.currentframe().f_code.co_name, **p[3][1]), p[4], rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], p[1])''' actions['''power_star : trailer'''] = ''' p[0] = [p[1]]''' actions['''power_star : power_star trailer'''] = ''' p[0] = p[1] + [p[2]]''' actions['''atom : LPAR RPAR'''] = ''' p[0] = ast.Tuple([], ast.Load(), rule=inspect.currentframe().f_code.co_name, paren=True, **p[1][1])''' actions['''atom : LPAR yield_expr RPAR'''] = ''' p[0] = p[2] if isinstance(p[0], ast.Tuple): p[0].paren = True p[0].alt = p[1][1]''' actions['''atom : LPAR testlist_comp RPAR'''] = ''' p[0] = p[2] if isinstance(p[0], ast.Tuple): p[0].paren = True p[0].alt = p[1][1]''' actions['''atom : LSQB RSQB'''] = ''' p[0] = ast.List([], ast.Load(), rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''atom : LSQB listmaker RSQB'''] = ''' if isinstance(p[2], ast.ListComp): p[0] = p[2] p[0].alt = p[1][1] else: p[0] = ast.List(p[2], ast.Load(), rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''atom : LBRACE RBRACE'''] = ''' p[0] = ast.Dict([], [], rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''atom : LBRACE dictorsetmaker RBRACE'''] = ''' if isinstance(p[2], (ast.SetComp, ast.DictComp)): p[0] = p[2] p[0].alt = p[1][1] else: keys, values = p[2] if keys is None: p[0] = ast.Set(values, rule=inspect.currentframe().f_code.co_name, **p[1][1]) else: p[0] = ast.Dict(keys, values, rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''atom : BACKQUOTE testlist1 BACKQUOTE'''] = ''' p[0] = ast.Repr(p[2], rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''atom : NAME'''] = ''' p[0] = ast.Name(p[1][0], ast.Load(), rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''atom : NUMBER'''] = ''' p[0] = ast.Num(p[1][0], rule=inspect.currentframe().f_code.co_name, **p[1][2])''' actions['''atom : atom_plus'''] = ''' p[0] = p[1]''' actions['''atom_plus : STRING'''] = ''' p[0] = ast.Str(p[1][0], rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''atom_plus : atom_plus STRING'''] = ''' p[1].s = p[1].s + p[2][0] p[0] = p[1]''' actions['''listmaker : test list_for'''] = ''' p[0] = ast.ListComp(p[1], p[2], rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], p[1])''' actions['''listmaker : test'''] = ''' p[0] = [p[1]]''' actions['''listmaker : test COMMA'''] = ''' p[0] = [p[1]]''' actions['''listmaker : test listmaker_star'''] = ''' p[0] = [p[1]] + p[2]''' actions['''listmaker : test listmaker_star COMMA'''] = ''' p[0] = [p[1]] + p[2]''' actions['''listmaker_star : COMMA test'''] = ''' p[0] = [p[2]]''' actions['''listmaker_star : listmaker_star COMMA test'''] = ''' p[0] = p[1] + [p[3]]''' actions['''testlist_comp : test comp_for'''] = ''' p[0] = ast.GeneratorExp(p[1], p[2], rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], p[1])''' actions['''testlist_comp : test'''] = ''' p[0] = p[1]''' actions['''testlist_comp : test COMMA'''] = ''' p[0] = ast.Tuple([p[1]], ast.Load(), rule=inspect.currentframe().f_code.co_name, paren=False) inherit_lineno(p[0], p[1])''' actions['''testlist_comp : test testlist_comp_star'''] = ''' p[0] = ast.Tuple([p[1]] + p[2], ast.Load(), rule=inspect.currentframe().f_code.co_name, paren=False) inherit_lineno(p[0], p[1])''' actions['''testlist_comp : test testlist_comp_star COMMA'''] = ''' p[0] = ast.Tuple([p[1]] + p[2], ast.Load(), rule=inspect.currentframe().f_code.co_name, paren=False) inherit_lineno(p[0], p[1])''' actions['''testlist_comp_star : COMMA test'''] = ''' p[0] = [p[2]]''' actions['''testlist_comp_star : testlist_comp_star COMMA test'''] = ''' p[0] = p[1] + [p[3]]''' actions['''lambdef : LAMBDA COLON test'''] = ''' p[0] = ast.Lambda(ast.arguments([], None, None, [], rule=inspect.currentframe().f_code.co_name, **p[2][1]), p[3], rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''lambdef : LAMBDA varargslist COLON test'''] = ''' p[0] = ast.Lambda(p[2], p[4], rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''trailer : LPAR RPAR'''] = ''' p[0] = ast.Call(None, [], [], None, None, rule=inspect.currentframe().f_code.co_name)''' actions['''trailer : LPAR arglist RPAR'''] = ''' p[0] = p[2]''' actions['''trailer : LSQB subscriptlist RSQB'''] = ''' p[0] = ast.Subscript(None, p[2], ast.Load(), rule=inspect.currentframe().f_code.co_name)''' actions['''trailer : DOT NAME'''] = ''' p[0] = ast.Attribute(None, p[2][0], ast.Load(), rule=inspect.currentframe().f_code.co_name)''' actions['''subscriptlist : subscript'''] = ''' p[0] = p[1]''' actions['''subscriptlist : subscript COMMA'''] = ''' if isinstance(p[1], ast.Index): tup = ast.Tuple([p[1].value], ast.Load(), rule=inspect.currentframe().f_code.co_name, paren=False) inherit_lineno(tup, p[1].value) p[0] = ast.Index(tup, rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], tup) else: p[0] = ast.ExtSlice([p[1]], rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], p[1])''' actions['''subscriptlist : subscript subscriptlist_star'''] = ''' args = [p[1]] + p[2] if all(isinstance(x, ast.Index) for x in args): tup = ast.Tuple([x.value for x in args], ast.Load(), rule=inspect.currentframe().f_code.co_name, paren=False) inherit_lineno(tup, args[0].value) p[0] = ast.Index(tup, rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], tup) else: p[0] = ast.ExtSlice(args, rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], p[1])''' actions['''subscriptlist : subscript subscriptlist_star COMMA'''] = ''' args = [p[1]] + p[2] if all(isinstance(x, ast.Index) for x in args): tup = ast.Tuple([x.value for x in args], ast.Load(), rule=inspect.currentframe().f_code.co_name, paren=False) inherit_lineno(tup, args[0].value) p[0] = ast.Index(tup, rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], tup) else: p[0] = ast.ExtSlice(args, rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], p[1])''' actions['''subscriptlist_star : COMMA subscript'''] = ''' p[0] = [p[2]]''' actions['''subscriptlist_star : subscriptlist_star COMMA subscript'''] = ''' p[0] = p[1] + [p[3]]''' actions['''subscript : DOT DOT DOT'''] = ''' p[0] = ast.Ellipsis(rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''subscript : test'''] = ''' p[0] = ast.Index(p[1], rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], p[1])''' actions['''subscript : COLON'''] = ''' p[0] = ast.Slice(None, None, None, rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''subscript : COLON sliceop'''] = ''' p[0] = ast.Slice(None, None, p[2], rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''subscript : COLON test'''] = ''' p[0] = ast.Slice(None, p[2], None, rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''subscript : COLON test sliceop'''] = ''' p[0] = ast.Slice(None, p[2], p[3], rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''subscript : test COLON'''] = ''' p[0] = ast.Slice(p[1], None, None, rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], p[1])''' actions['''subscript : test COLON sliceop'''] = ''' p[0] = ast.Slice(p[1], None, p[3], rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], p[1])''' actions['''subscript : test COLON test'''] = ''' p[0] = ast.Slice(p[1], p[3], None, rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], p[1])''' actions['''subscript : test COLON test sliceop'''] = ''' p[0] = ast.Slice(p[1], p[3], p[4], rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], p[1])''' actions['''sliceop : COLON'''] = ''' p[0] = ast.Name("None", ast.Load(), rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''sliceop : COLON test'''] = ''' p[0] = p[2]''' actions['''exprlist : expr'''] = ''' p[0] = p[1]''' actions['''exprlist : expr COMMA'''] = ''' p[0] = ast.Tuple([p[1]], ast.Load(), rule=inspect.currentframe().f_code.co_name, paren=False) inherit_lineno(p[0], p[1])''' actions['''exprlist : expr exprlist_star'''] = ''' p[0] = ast.Tuple([p[1]] + p[2], ast.Load(), rule=inspect.currentframe().f_code.co_name, paren=False) inherit_lineno(p[0], p[1])''' actions['''exprlist : expr exprlist_star COMMA'''] = ''' p[0] = ast.Tuple([p[1]] + p[2], ast.Load(), rule=inspect.currentframe().f_code.co_name, paren=False) inherit_lineno(p[0], p[1])''' actions['''exprlist_star : COMMA expr'''] = ''' p[0] = [p[2]]''' actions['''exprlist_star : exprlist_star COMMA expr'''] = ''' p[0] = p[1] + [p[3]]''' actions['''testlist : test'''] = ''' p[0] = p[1]''' actions['''testlist : test COMMA'''] = ''' p[0] = ast.Tuple([p[1]], ast.Load(), rule=inspect.currentframe().f_code.co_name, paren=False) inherit_lineno(p[0], p[1])''' actions['''testlist : test testlist_star'''] = ''' p[0] = ast.Tuple([p[1]] + p[2], ast.Load(), rule=inspect.currentframe().f_code.co_name, paren=False) inherit_lineno(p[0], p[1])''' actions['''testlist : test testlist_star COMMA'''] = ''' p[0] = ast.Tuple([p[1]] + p[2], ast.Load(), rule=inspect.currentframe().f_code.co_name, paren=False) inherit_lineno(p[0], p[1])''' actions['''testlist_star : COMMA test'''] = ''' p[0] = [p[2]]''' actions['''testlist_star : testlist_star COMMA test'''] = ''' p[0] = p[1] + [p[3]]''' actions['''dictorsetmaker : test COLON test comp_for'''] = ''' p[0] = ast.DictComp(p[1], p[3], p[4], rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], p[1])''' actions['''dictorsetmaker : test COLON test'''] = ''' p[0] = ([p[1]], [p[3]])''' actions['''dictorsetmaker : test COLON test COMMA'''] = ''' p[0] = ([p[1]], [p[3]])''' actions['''dictorsetmaker : test COLON test dictorsetmaker_star'''] = ''' keys, values = p[4] p[0] = ([p[1]] + keys, [p[3]] + values)''' actions['''dictorsetmaker : test COLON test dictorsetmaker_star COMMA'''] = ''' keys, values = p[4] p[0] = ([p[1]] + keys, [p[3]] + values)''' actions['''dictorsetmaker : test comp_for'''] = ''' p[0] = ast.SetComp(p[1], p[2], rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], p[1])''' actions['''dictorsetmaker : test'''] = ''' p[0] = (None, [p[1]])''' actions['''dictorsetmaker : test COMMA'''] = ''' p[0] = (None, [p[1]])''' actions['''dictorsetmaker : test dictorsetmaker_star2'''] = ''' keys, values = p[2] p[0] = (keys, [p[1]] + values)''' actions['''dictorsetmaker : test dictorsetmaker_star2 COMMA'''] = ''' keys, values = p[2] p[0] = (keys, [p[1]] + values)''' actions['''dictorsetmaker_star : COMMA test COLON test'''] = ''' p[0] = ([p[2]], [p[4]])''' actions['''dictorsetmaker_star : dictorsetmaker_star COMMA test COLON test'''] = ''' keys, values = p[1] p[0] = (keys + [p[3]], values + [p[5]])''' actions['''dictorsetmaker_star2 : COMMA test'''] = ''' p[0] = (None, [p[2]])''' actions['''dictorsetmaker_star2 : dictorsetmaker_star2 COMMA test'''] = ''' keys, values = p[1] p[0] = (keys, values + [p[3]])''' actions['''classdef : CLASS NAME COLON suite'''] = ''' p[0] = ast.ClassDef(p[2][0], [], p[4], [], rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''classdef : CLASS NAME LPAR RPAR COLON suite'''] = ''' p[0] = ast.ClassDef(p[2][0], [], p[6], [], rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''classdef : CLASS NAME LPAR testlist RPAR COLON suite'''] = ''' if isinstance(p[4], ast.Tuple): p[0] = ast.ClassDef(p[2][0], p[4].elts, p[7], [], rule=inspect.currentframe().f_code.co_name, **p[1][1]) else: p[0] = ast.ClassDef(p[2][0], [p[4]], p[7], [], rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''arglist : argument'''] = ''' if notkeyword(p[1]): p[0] = ast.Call(None, [p[1]], [], None, None, rule=inspect.currentframe().f_code.co_name) else: p[0] = ast.Call(None, [], [p[1]], None, None, rule=inspect.currentframe().f_code.co_name)''' actions['''arglist : argument COMMA'''] = ''' if notkeyword(p[1]): p[0] = ast.Call(None, [p[1]], [], None, None, rule=inspect.currentframe().f_code.co_name) else: p[0] = ast.Call(None, [], [p[1]], None, None, rule=inspect.currentframe().f_code.co_name)''' actions['''arglist : STAR test'''] = ''' p[0] = ast.Call(None, [], [], p[2], None, rule=inspect.currentframe().f_code.co_name)''' actions['''arglist : STAR test COMMA DOUBLESTAR test'''] = ''' p[0] = ast.Call(None, [], [], p[2], p[5], rule=inspect.currentframe().f_code.co_name)''' actions['''arglist : STAR test arglist_star'''] = ''' p[0] = ast.Call(None, filter(notkeyword, p[3]), filter(iskeyword, p[3]), p[2], None, rule=inspect.currentframe().f_code.co_name)''' actions['''arglist : STAR test arglist_star COMMA DOUBLESTAR test'''] = ''' p[0] = ast.Call(None, filter(notkeyword, p[3]), filter(iskeyword, p[3]), p[2], p[6], rule=inspect.currentframe().f_code.co_name)''' actions['''arglist : DOUBLESTAR test'''] = ''' p[0] = ast.Call(None, [], [], None, p[2], rule=inspect.currentframe().f_code.co_name)''' actions['''arglist : arglist_star2 argument'''] = ''' args = p[1] + [p[2]] p[0] = ast.Call(None, filter(notkeyword, args), filter(iskeyword, args), None, None, rule=inspect.currentframe().f_code.co_name)''' actions['''arglist : arglist_star2 argument COMMA'''] = ''' args = p[1] + [p[2]] p[0] = ast.Call(None, filter(notkeyword, args), filter(iskeyword, args), None, None, rule=inspect.currentframe().f_code.co_name)''' actions['''arglist : arglist_star2 STAR test'''] = ''' p[0] = ast.Call(None, filter(notkeyword, p[1]), filter(iskeyword, p[1]), p[3], None, rule=inspect.currentframe().f_code.co_name)''' actions['''arglist : arglist_star2 STAR test COMMA DOUBLESTAR test'''] = ''' p[0] = ast.Call(None, filter(notkeyword, p[1]), filter(iskeyword, p[1]), p[3], p[6], rule=inspect.currentframe().f_code.co_name)''' actions['''arglist : arglist_star2 STAR test arglist_star3'''] = ''' args = p[1] + p[4] p[0] = ast.Call(None, filter(notkeyword, args), filter(iskeyword, args), p[3], None, rule=inspect.currentframe().f_code.co_name)''' actions['''arglist : arglist_star2 STAR test arglist_star3 COMMA DOUBLESTAR test'''] = ''' args = p[1] + p[4] p[0] = ast.Call(None, filter(notkeyword, args), filter(iskeyword, args), p[3], p[7], rule=inspect.currentframe().f_code.co_name)''' actions['''arglist : arglist_star2 DOUBLESTAR test'''] = ''' p[0] = ast.Call(None, filter(notkeyword, p[1]), filter(iskeyword, p[1]), None, p[3], rule=inspect.currentframe().f_code.co_name)''' actions['''arglist_star : COMMA argument'''] = ''' p[0] = [p[2]]''' actions['''arglist_star : arglist_star COMMA argument'''] = ''' p[0] = p[1] + [p[3]]''' actions['''arglist_star3 : COMMA argument'''] = ''' p[0] = [p[2]]''' actions['''arglist_star3 : arglist_star3 COMMA argument'''] = ''' p[0] = p[1] + [p[3]]''' actions['''arglist_star2 : argument COMMA'''] = ''' p[0] = [p[1]]''' actions['''arglist_star2 : arglist_star2 argument COMMA'''] = ''' p[0] = p[1] + [p[2]]''' actions['''argument : test'''] = ''' p[0] = p[1]''' actions['''argument : test comp_for'''] = ''' p[0] = ast.GeneratorExp(p[1], p[2], rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], p[1])''' actions['''argument : test EQUAL test'''] = ''' p[0] = ast.keyword(p[1].id, p[3], rule=inspect.currentframe().f_code.co_name) inherit_lineno(p[0], p[1])''' actions['''list_iter : list_for'''] = ''' p[0] = ([], p[1])''' actions['''list_iter : list_if'''] = ''' p[0] = p[1]''' actions['''list_for : FOR exprlist IN testlist_safe'''] = ''' ctx_to_store(p[2]) p[0] = [ast.comprehension(p[2], p[4], [], rule=inspect.currentframe().f_code.co_name, **p[1][1])]''' actions['''list_for : FOR exprlist IN testlist_safe list_iter'''] = ''' ctx_to_store(p[2]) ifs, iters = p[5] p[0] = [ast.comprehension(p[2], p[4], ifs, rule=inspect.currentframe().f_code.co_name, **p[1][1])] + iters''' actions['''list_if : IF old_test'''] = ''' p[0] = ([p[2]], [])''' actions['''list_if : IF old_test list_iter'''] = ''' ifs, iters = p[3] p[0] = ([p[2]] + ifs, iters)''' actions['''comp_iter : comp_for'''] = ''' p[0] = ([], p[1])''' actions['''comp_iter : comp_if'''] = ''' p[0] = p[1]''' actions['''comp_for : FOR exprlist IN or_test'''] = ''' ctx_to_store(p[2]) p[0] = [ast.comprehension(p[2], p[4], [], rule=inspect.currentframe().f_code.co_name, **p[1][1])]''' actions['''comp_for : FOR exprlist IN or_test comp_iter'''] = ''' ctx_to_store(p[2]) ifs, iters = p[5] p[0] = [ast.comprehension(p[2], p[4], ifs, rule=inspect.currentframe().f_code.co_name, **p[1][1])] + iters''' actions['''comp_if : IF old_test'''] = ''' p[0] = ([p[2]], [])''' actions['''comp_if : IF old_test comp_iter'''] = ''' ifs, iters = p[3] p[0] = ([p[2]] + ifs, iters)''' actions['''testlist1 : test'''] = ''' p[0] = p[1]''' actions['''testlist1 : test testlist1_star'''] = ''' p[0] = ast.Tuple([p[1]] + p[2], ast.Load(), rule=inspect.currentframe().f_code.co_name, paren=False) inherit_lineno(p[0], p[1])''' actions['''testlist1_star : COMMA test'''] = ''' p[0] = [p[2]]''' actions['''testlist1_star : testlist1_star COMMA test'''] = ''' p[0] = p[1] + [p[3]]''' actions['''encoding_decl : NAME'''] = ''' p[0] = p[1]''' actions['''yield_expr : YIELD'''] = ''' p[0] = ast.Yield(None, rule=inspect.currentframe().f_code.co_name, **p[1][1])''' actions['''yield_expr : YIELD testlist'''] = ''' p[0] = ast.Yield(p[2], rule=inspect.currentframe().f_code.co_name, **p[1][1])'''
actions = {} asts = [] asts.append('class DollarNumber(ast.expr):\n _fields = ("n",)\n def __init__(self, n, **kwds):\n self.n = n\n self.__dict__.update(kwds)\n') actions['atom : DOLLARNUMBER'] = ' p[0] = DollarNumber(int(p[1][0][1:]), **p[1][1])' actions['file_input : ENDMARKER'] = ' p[0] = ast.Module([], rule=inspect.currentframe().f_code.co_name, lineno=0, col_offset=0)' actions['file_input : file_input_star ENDMARKER'] = ' p[0] = ast.Module(p[1], rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], p[1][0])' actions['file_input_star : NEWLINE'] = ' p[0] = ast.Module([], rule=inspect.currentframe().f_code.co_name, lineno=0, col_offset=0)' actions['file_input_star : stmt'] = ' p[0] = p[1]' actions['file_input_star : file_input_star NEWLINE'] = ' p[0] = ast.Module(p[1], rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], p[1][0])' actions['file_input_star : file_input_star stmt'] = ' p[0] = p[1] + p[2]' actions['decorator : AT dotted_name NEWLINE'] = ' p[0] = p[2]\n p[0].alt = p[1][1]' actions['decorator : AT dotted_name LPAR RPAR NEWLINE'] = ' p[0] = ast.Call(p[2], [], [], None, None, rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], p[1][1])' actions['decorator : AT dotted_name LPAR arglist RPAR NEWLINE'] = ' p[4].func = p[2]\n p[0] = p[4]\n inherit_lineno(p[0], p[2])\n p[0].alt = p[1][1]' actions['decorators : decorators_plus'] = ' p[0] = p[1]' actions['decorators_plus : decorator'] = ' p[0] = [p[1]]' actions['decorators_plus : decorators_plus decorator'] = ' p[0] = p[1] + [p[2]]' actions['decorated : decorators classdef'] = ' p[2].decorator_list = p[1]\n p[0] = p[2]\n inherit_lineno(p[0], p[1][0])' actions['decorated : decorators funcdef'] = ' p[2].decorator_list = p[1]\n p[0] = p[2]\n inherit_lineno(p[0], p[1][0])' actions['funcdef : DEF NAME parameters COLON suite'] = ' p[0] = ast.FunctionDef(p[2][0], p[3], p[5], [], rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['parameters : LPAR RPAR'] = ' p[0] = ast.arguments([], None, None, [], rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['parameters : LPAR varargslist RPAR'] = ' p[0] = p[2]' actions['varargslist : fpdef COMMA STAR NAME'] = ' p[0] = ast.arguments([p[1]], p[4][0], None, [], rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], p[1])' actions['varargslist : fpdef COMMA STAR NAME COMMA DOUBLESTAR NAME'] = ' p[0] = ast.arguments([p[1]], p[4][0], p[7][0], [], rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], p[1])' actions['varargslist : fpdef COMMA DOUBLESTAR NAME'] = ' p[0] = ast.arguments([p[1]], None, p[4][0], [], rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], p[1])' actions['varargslist : fpdef'] = ' p[0] = ast.arguments([p[1]], None, None, [], rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], p[1])' actions['varargslist : fpdef COMMA'] = ' p[0] = ast.arguments([p[1]], None, None, [], rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], p[1])' actions['varargslist : fpdef varargslist_star COMMA STAR NAME'] = ' p[2].args.insert(0, p[1])\n p[2].vararg = p[5][0]\n p[0] = p[2]' actions['varargslist : fpdef varargslist_star COMMA STAR NAME COMMA DOUBLESTAR NAME'] = ' p[2].args.insert(0, p[1])\n p[2].vararg = p[5][0]\n p[2].kwarg = p[8][0]\n p[0] = p[2]' actions['varargslist : fpdef varargslist_star COMMA DOUBLESTAR NAME'] = ' p[2].args.insert(0, p[1])\n p[2].kwarg = p[5][0]\n p[0] = p[2]' actions['varargslist : fpdef varargslist_star'] = ' p[2].args.insert(0, p[1])\n p[0] = p[2]' actions['varargslist : fpdef varargslist_star COMMA'] = ' p[2].args.insert(0, p[1])\n p[0] = p[2]' actions['varargslist : fpdef EQUAL test COMMA STAR NAME'] = ' p[0] = ast.arguments([p[1]], p[6][0], None, [p[3]], rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], p[1])' actions['varargslist : fpdef EQUAL test COMMA STAR NAME COMMA DOUBLESTAR NAME'] = ' p[0] = ast.arguments([p[1]], p[6][0], p[9][0], [p[3]], rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], p[1])' actions['varargslist : fpdef EQUAL test COMMA DOUBLESTAR NAME'] = ' p[0] = ast.arguments([p[1]], None, p[6][0], [p[3]], rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], p[1])' actions['varargslist : fpdef EQUAL test'] = ' p[0] = ast.arguments([p[1]], None, None, [p[3]], rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], p[1])' actions['varargslist : fpdef EQUAL test COMMA'] = ' p[0] = ast.arguments([p[1]], None, None, [p[3]], rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], p[1])' actions['varargslist : fpdef EQUAL test varargslist_star COMMA STAR NAME'] = ' p[4].args.insert(0, p[1])\n p[4].vararg = p[7][0]\n p[4].defaults.insert(0, p[3])\n p[0] = p[4]' actions['varargslist : fpdef EQUAL test varargslist_star COMMA STAR NAME COMMA DOUBLESTAR NAME'] = ' p[4].args.insert(0, p[1])\n p[4].vararg = p[7][0]\n p[4].kwarg = p[10][0]\n p[4].defaults.insert(0, p[3])\n p[0] = p[4]' actions['varargslist : fpdef EQUAL test varargslist_star COMMA DOUBLESTAR NAME'] = ' p[4].args.insert(0, p[1])\n p[4].kwarg = p[7][0]\n p[4].defaults.insert(0, p[3])\n p[0] = p[4]' actions['varargslist : fpdef EQUAL test varargslist_star'] = ' p[4].args.insert(0, p[1])\n p[4].defaults.insert(0, p[3])\n p[0] = p[4]' actions['varargslist : fpdef EQUAL test varargslist_star COMMA'] = ' p[4].args.insert(0, p[1])\n p[4].defaults.insert(0, p[3])\n p[0] = p[4]' actions['varargslist : STAR NAME'] = ' p[0] = ast.arguments([], p[2][0], None, [], rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], p[2][1])' actions['varargslist : STAR NAME COMMA DOUBLESTAR NAME'] = ' p[0] = ast.arguments([], p[2][0], p[5][0], [], rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], p[2][1])' actions['varargslist : DOUBLESTAR NAME'] = ' p[0] = ast.arguments([], None, p[2][0], [], rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], p[2][1])' actions['varargslist_star : COMMA fpdef'] = ' p[0] = ast.arguments([p[2]], None, None, [], rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], p[2])' actions['varargslist_star : COMMA fpdef EQUAL test'] = ' p[0] = ast.arguments([p[2]], None, None, [p[4]], rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], p[2])' actions['varargslist_star : varargslist_star COMMA fpdef'] = ' p[1].args.append(p[3])\n p[0] = p[1]' actions['varargslist_star : varargslist_star COMMA fpdef EQUAL test'] = ' p[1].args.append(p[3])\n p[1].defaults.append(p[5])\n p[0] = p[1]' actions['fpdef : NAME'] = ' p[0] = ast.Name(p[1][0], ast.Param(), rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['fpdef : LPAR fplist RPAR'] = ' if isinstance(p[2], ast.Tuple):\n p[2].paren = True\n ctx_to_store(p[2])\n p[0] = p[2]' actions['fplist : fpdef'] = ' p[0] = p[1]' actions['fplist : fpdef COMMA'] = ' p[0] = ast.Tuple([p[1]], ast.Param(), rule=inspect.currentframe().f_code.co_name, paren=False)\n inherit_lineno(p[0], p[1])' actions['fplist : fpdef fplist_star'] = ' p[2].elts.insert(0, p[1])\n p[0] = p[2]\n inherit_lineno(p[0], p[1])' actions['fplist : fpdef fplist_star COMMA'] = ' p[2].elts.insert(0, p[1])\n p[0] = p[2]\n inherit_lineno(p[0], p[1])' actions['fplist_star : COMMA fpdef'] = ' p[0] = ast.Tuple([p[2]], ast.Param(), rule=inspect.currentframe().f_code.co_name, paren=False)' actions['fplist_star : fplist_star COMMA fpdef'] = ' p[1].elts.append(p[3])\n p[0] = p[1]' actions['stmt : simple_stmt'] = ' p[0] = p[1]' actions['stmt : compound_stmt'] = ' p[0] = p[1]' actions['simple_stmt : small_stmt NEWLINE'] = ' p[0] = [p[1]]' actions['simple_stmt : small_stmt SEMI NEWLINE'] = ' p[0] = [p[1]]' actions['simple_stmt : small_stmt simple_stmt_star NEWLINE'] = ' p[0] = [p[1]] + p[2]' actions['simple_stmt : small_stmt simple_stmt_star SEMI NEWLINE'] = ' p[0] = [p[1]] + p[2]' actions['simple_stmt_star : SEMI small_stmt'] = ' p[0] = [p[2]]' actions['simple_stmt_star : simple_stmt_star SEMI small_stmt'] = ' p[0] = p[1] + [p[3]]' actions['small_stmt : expr_stmt'] = ' p[0] = p[1]' actions['small_stmt : print_stmt'] = ' p[0] = p[1]' actions['small_stmt : del_stmt'] = ' p[0] = p[1]' actions['small_stmt : pass_stmt'] = ' p[0] = p[1]' actions['small_stmt : flow_stmt'] = ' p[0] = p[1]' actions['small_stmt : import_stmt'] = ' p[0] = p[1]' actions['small_stmt : global_stmt'] = ' p[0] = p[1]' actions['small_stmt : exec_stmt'] = ' p[0] = p[1]' actions['small_stmt : assert_stmt'] = ' p[0] = p[1]' actions['expr_stmt : testlist augassign yield_expr'] = ' ctx_to_store(p[1])\n p[0] = ast.AugAssign(p[1], p[2], p[3], rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], p[1])' actions['expr_stmt : testlist augassign testlist'] = ' ctx_to_store(p[1])\n p[0] = ast.AugAssign(p[1], p[2], p[3], rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], p[1])' actions['expr_stmt : testlist'] = ' p[0] = ast.Expr(p[1], rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], p[1])' actions['expr_stmt : testlist expr_stmt_star'] = ' everything = [p[1]] + p[2]\n targets, value = everything[:-1], everything[-1]\n ctx_to_store(targets)\n p[0] = ast.Assign(targets, value, rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], targets[0])' actions['expr_stmt_star : EQUAL yield_expr'] = ' p[0] = [p[2]]' actions['expr_stmt_star : EQUAL testlist'] = ' p[0] = [p[2]]' actions['expr_stmt_star : expr_stmt_star EQUAL yield_expr'] = ' p[0] = p[1] + [p[3]]' actions['expr_stmt_star : expr_stmt_star EQUAL testlist'] = ' p[0] = p[1] + [p[3]]' actions['augassign : PLUSEQUAL'] = ' p[0] = ast.Add(rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['augassign : MINEQUAL'] = ' p[0] = ast.Sub(rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['augassign : STAREQUAL'] = ' p[0] = ast.Mult(rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['augassign : SLASHEQUAL'] = ' p[0] = ast.Div(rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['augassign : PERCENTEQUAL'] = ' p[0] = ast.Mod(rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['augassign : AMPEREQUAL'] = ' p[0] = ast.BitAnd(rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['augassign : VBAREQUAL'] = ' p[0] = ast.BitOr(rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['augassign : CIRCUMFLEXEQUAL'] = ' p[0] = ast.BitXor(rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['augassign : LEFTSHIFTEQUAL'] = ' p[0] = ast.LShift(rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['augassign : RIGHTSHIFTEQUAL'] = ' p[0] = ast.RShift(rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['augassign : DOUBLESTAREQUAL'] = ' p[0] = ast.Pow(rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['augassign : DOUBLESLASHEQUAL'] = ' p[0] = ast.FloorDiv(rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['print_stmt : PRINT'] = ' p[0] = ast.Print(None, [], True, rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['print_stmt : PRINT test'] = ' p[0] = ast.Print(None, [p[2]], True, rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['print_stmt : PRINT test COMMA'] = ' p[0] = ast.Print(None, [p[2]], False, rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['print_stmt : PRINT test print_stmt_plus'] = ' p[0] = ast.Print(None, [p[2]] + p[3], True, rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['print_stmt : PRINT test print_stmt_plus COMMA'] = ' p[0] = ast.Print(None, [p[2]] + p[3], False, rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['print_stmt : PRINT RIGHTSHIFT test'] = ' p[0] = ast.Print(p[3], [], True, rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['print_stmt : PRINT RIGHTSHIFT test print_stmt_plus'] = ' p[0] = ast.Print(p[3], p[4], True, rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['print_stmt : PRINT RIGHTSHIFT test print_stmt_plus COMMA'] = ' p[0] = ast.Print(p[3], p[4], False, rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['print_stmt_plus : COMMA test'] = ' p[0] = [p[2]]' actions['print_stmt_plus : print_stmt_plus COMMA test'] = ' p[0] = p[1] + [p[3]]' actions['del_stmt : DEL exprlist'] = ' ctx_to_store(p[2], ast.Del) # interesting fact: evaluating Delete nodes with ctx=Store() causes a segmentation fault in Python!\n if isinstance(p[2], ast.Tuple) and not p[2].paren:\n p[0] = ast.Delete(p[2].elts, rule=inspect.currentframe().f_code.co_name, **p[1][1])\n else:\n p[0] = ast.Delete([p[2]], rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['pass_stmt : PASS'] = ' p[0] = ast.Pass(rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['flow_stmt : break_stmt'] = ' p[0] = p[1]' actions['flow_stmt : continue_stmt'] = ' p[0] = p[1]' actions['flow_stmt : return_stmt'] = ' p[0] = p[1]' actions['flow_stmt : raise_stmt'] = ' p[0] = p[1]' actions['flow_stmt : yield_stmt'] = ' p[0] = ast.Expr(p[1], rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], p[1])' actions['break_stmt : BREAK'] = ' p[0] = ast.Break(rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['continue_stmt : CONTINUE'] = ' p[0] = ast.Continue(rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['return_stmt : RETURN'] = ' p[0] = ast.Return(None, rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['return_stmt : RETURN testlist'] = ' p[0] = ast.Return(p[2], rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['yield_stmt : yield_expr'] = ' p[0] = p[1]' actions['raise_stmt : RAISE'] = ' p[0] = ast.Raise(None, None, None, rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['raise_stmt : RAISE test'] = ' p[0] = ast.Raise(p[2], None, None, rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['raise_stmt : RAISE test COMMA test'] = ' p[0] = ast.Raise(p[2], p[4], None, rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['raise_stmt : RAISE test COMMA test COMMA test'] = ' p[0] = ast.Raise(p[2], p[4], p[6], rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['import_stmt : import_name'] = ' p[0] = p[1]' actions['import_stmt : import_from'] = ' p[0] = p[1]' actions['import_name : IMPORT dotted_as_names'] = ' p[0] = ast.Import(p[2], rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['import_from : FROM dotted_name IMPORT STAR'] = ' dotted = []\n last = p[2]\n while isinstance(last, ast.Attribute):\n dotted.insert(0, last.attr)\n last = last.value\n dotted.insert(0, last.id)\n p[0] = ast.ImportFrom(".".join(dotted), [ast.alias("*", None, rule=inspect.currentframe().f_code.co_name, **p[3][1])], 0, rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['import_from : FROM dotted_name IMPORT LPAR import_as_names RPAR'] = ' dotted = []\n last = p[2]\n while isinstance(last, ast.Attribute):\n dotted.insert(0, last.attr)\n last = last.value\n dotted.insert(0, last.id)\n p[0] = ast.ImportFrom(".".join(dotted), p[5], 0, rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['import_from : FROM dotted_name IMPORT import_as_names'] = ' dotted = []\n last = p[2]\n while isinstance(last, ast.Attribute):\n dotted.insert(0, last.attr)\n last = last.value\n dotted.insert(0, last.id)\n p[0] = ast.ImportFrom(".".join(dotted), p[4], 0, rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['import_from : FROM import_from_plus dotted_name IMPORT STAR'] = ' dotted = []\n last = p[3]\n while isinstance(last, ast.Attribute):\n dotted.insert(0, last.attr)\n last = last.value\n dotted.insert(0, last.id)\n p[0] = ast.ImportFrom(".".join(dotted), [ast.alias("*", None, rule=inspect.currentframe().f_code.co_name, **p[4][1])], p[2], **p[1][1])' actions['import_from : FROM import_from_plus dotted_name IMPORT LPAR import_as_names RPAR'] = ' dotted = []\n last = p[3]\n while isinstance(last, ast.Attribute):\n dotted.insert(0, last.attr)\n last = last.value\n dotted.insert(0, last.id)\n p[0] = ast.ImportFrom(".".join(dotted), p[6], p[2], rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['import_from : FROM import_from_plus dotted_name IMPORT import_as_names'] = ' dotted = []\n last = p[3]\n while isinstance(last, ast.Attribute):\n dotted.insert(0, last.attr)\n last = last.value\n dotted.insert(0, last.id)\n p[0] = ast.ImportFrom(".".join(dotted), p[5], p[2], rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['import_from : FROM import_from_plus IMPORT STAR'] = ' p[0] = ast.ImportFrom(None, [ast.alias("*", None, rule=inspect.currentframe().f_code.co_name, **p[3][1])], p[2], rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['import_from : FROM import_from_plus IMPORT LPAR import_as_names RPAR'] = ' p[0] = ast.ImportFrom(None, p[5], p[2], rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['import_from : FROM import_from_plus IMPORT import_as_names'] = ' p[0] = ast.ImportFrom(None, p[4], p[2], rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['import_from_plus : DOT'] = ' p[0] = 1' actions['import_from_plus : import_from_plus DOT'] = ' p[0] = p[1] + 1' actions['import_as_name : NAME'] = ' p[0] = ast.alias(p[1][0], None, rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['import_as_name : NAME AS NAME'] = ' p[0] = ast.alias(p[1][0], p[3][0], rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['dotted_as_name : dotted_name'] = ' dotted = []\n last = p[1]\n while isinstance(last, ast.Attribute):\n dotted.insert(0, last.attr)\n last = last.value\n dotted.insert(0, last.id)\n p[0] = ast.alias(".".join(dotted), None, rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], p[1])' actions['dotted_as_name : dotted_name AS NAME'] = ' dotted = []\n last = p[1]\n while isinstance(last, ast.Attribute):\n dotted.insert(0, last.attr)\n last = last.value\n dotted.insert(0, last.id)\n p[0] = ast.alias(".".join(dotted), p[3][0], rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], p[1])' actions['import_as_names : import_as_name'] = ' p[0] = [p[1]]' actions['import_as_names : import_as_name COMMA'] = ' p[0] = [p[1]]' actions['import_as_names : import_as_name import_as_names_star'] = ' p[0] = [p[1]] + p[2]' actions['import_as_names : import_as_name import_as_names_star COMMA'] = ' p[0] = [p[1]] + p[2]' actions['import_as_names_star : COMMA import_as_name'] = ' p[0] = [p[2]]' actions['import_as_names_star : import_as_names_star COMMA import_as_name'] = ' p[0] = p[1] + [p[3]]' actions['dotted_as_names : dotted_as_name'] = ' p[0] = [p[1]]' actions['dotted_as_names : dotted_as_name dotted_as_names_star'] = ' p[0] = [p[1]] + p[2]' actions['dotted_as_names_star : COMMA dotted_as_name'] = ' p[0] = [p[2]]' actions['dotted_as_names_star : dotted_as_names_star COMMA dotted_as_name'] = ' p[0] = p[1] + [p[3]]' actions['dotted_name : NAME'] = ' p[0] = ast.Name(p[1][0], ast.Load(), rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['dotted_name : NAME dotted_name_star'] = ' last = p[2]\n if isinstance(last, ast.Attribute):\n inherit_lineno(last, p[1][1])\n while isinstance(last.value, ast.Attribute):\n last = last.value\n inherit_lineno(last, p[1][1])\n last.value = ast.Attribute(ast.Name(p[1][0], ast.Load(), rule=inspect.currentframe().f_code.co_name, **p[1][1]), last.value, ast.Load(), rule=inspect.currentframe().f_code.co_name, **p[1][1])\n p[0] = p[2]\n else:\n p[0] = ast.Attribute(ast.Name(p[1][0], ast.Load(), rule=inspect.currentframe().f_code.co_name, **p[1][1]), p[2], ast.Load(), rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['dotted_name_star : DOT NAME'] = ' p[0] = p[2][0]' actions['dotted_name_star : dotted_name_star DOT NAME'] = ' p[0] = ast.Attribute(p[1], p[3][0], ast.Load(), rule=inspect.currentframe().f_code.co_name)' actions['global_stmt : GLOBAL NAME'] = ' p[0] = ast.Global([p[2][0]], rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['global_stmt : GLOBAL NAME global_stmt_star'] = ' p[0] = ast.Global([p[2][0]] + p[3], rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['global_stmt_star : COMMA NAME'] = ' p[0] = [p[2][0]]' actions['global_stmt_star : global_stmt_star COMMA NAME'] = ' p[0] = p[1] + [p[3][0]]' actions['exec_stmt : EXEC expr'] = ' p[0] = ast.Exec(p[2], None, None, rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['exec_stmt : EXEC expr IN test'] = ' p[0] = ast.Exec(p[2], p[4], None, rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['exec_stmt : EXEC expr IN test COMMA test'] = ' p[0] = ast.Exec(p[2], p[4], p[6], rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['assert_stmt : ASSERT test'] = ' p[0] = ast.Assert(p[2], None, rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['assert_stmt : ASSERT test COMMA test'] = ' p[0] = ast.Assert(p[2], p[4], rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['compound_stmt : if_stmt'] = ' p[0] = [p[1]]' actions['compound_stmt : while_stmt'] = ' p[0] = [p[1]]' actions['compound_stmt : for_stmt'] = ' p[0] = [p[1]]' actions['compound_stmt : try_stmt'] = ' p[0] = [p[1]]' actions['compound_stmt : with_stmt'] = ' p[0] = [p[1]]' actions['compound_stmt : funcdef'] = ' p[0] = [p[1]]' actions['compound_stmt : classdef'] = ' p[0] = [p[1]]' actions['compound_stmt : decorated'] = ' p[0] = [p[1]]' actions['if_stmt : IF test COLON suite'] = ' p[0] = ast.If(p[2], p[4], [], rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['if_stmt : IF test COLON suite ELSE COLON suite'] = ' p[0] = ast.If(p[2], p[4], p[7], rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['if_stmt : IF test COLON suite if_stmt_star'] = ' p[0] = ast.If(p[2], p[4], [p[5]], rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['if_stmt : IF test COLON suite if_stmt_star ELSE COLON suite'] = ' last = p[5]\n while len(last.orelse) > 0:\n last = last.orelse[0]\n last.orelse.extend(p[8])\n p[0] = ast.If(p[2], p[4], [p[5]], rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['if_stmt_star : ELIF test COLON suite'] = ' p[0] = ast.If(p[2], p[4], [], rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], p[2])' actions['if_stmt_star : if_stmt_star ELIF test COLON suite'] = ' last = p[1]\n while len(last.orelse) > 0:\n last = last.orelse[0]\n last.orelse.append(ast.If(p[3], p[5], [], rule=inspect.currentframe().f_code.co_name))\n inherit_lineno(last.orelse[-1], p[3])\n p[0] = p[1]' actions['while_stmt : WHILE test COLON suite'] = ' p[0] = ast.While(p[2], p[4], [], rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['while_stmt : WHILE test COLON suite ELSE COLON suite'] = ' p[0] = ast.While(p[2], p[4], p[7], rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['for_stmt : FOR exprlist IN testlist COLON suite'] = ' ctx_to_store(p[2])\n p[0] = ast.For(p[2], p[4], p[6], [], rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['for_stmt : FOR exprlist IN testlist COLON suite ELSE COLON suite'] = ' ctx_to_store(p[2])\n p[0] = ast.For(p[2], p[4], p[6], p[9], rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['try_stmt : TRY COLON suite try_stmt_plus'] = ' p[0] = ast.TryExcept(p[3], p[4], [], rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['try_stmt : TRY COLON suite try_stmt_plus FINALLY COLON suite'] = ' p[0] = ast.TryFinally([ast.TryExcept(p[3], p[4], [], rule=inspect.currentframe().f_code.co_name, **p[1][1])], p[7], rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['try_stmt : TRY COLON suite try_stmt_plus ELSE COLON suite'] = ' p[0] = ast.TryExcept(p[3], p[4], p[7], rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['try_stmt : TRY COLON suite try_stmt_plus ELSE COLON suite FINALLY COLON suite'] = ' p[0] = ast.TryFinally([ast.TryExcept(p[3], p[4], p[7], rule=inspect.currentframe().f_code.co_name, **p[1][1])], p[10], rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['try_stmt : TRY COLON suite FINALLY COLON suite'] = ' p[0] = ast.TryFinally(p[3], p[6], rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['try_stmt_plus : except_clause COLON suite'] = ' p[1].body = p[3]\n p[0] = [p[1]]' actions['try_stmt_plus : try_stmt_plus except_clause COLON suite'] = ' p[2].body = p[4]\n p[0] = p[1] + [p[2]]' actions['with_stmt : WITH with_item COLON suite'] = ' p[2].body = p[4]\n p[0] = p[2]' actions['with_stmt : WITH with_item with_stmt_star COLON suite'] = ' p[2].body.append(p[3])\n last = p[2]\n while len(last.body) > 0:\n last = last.body[0]\n last.body = p[5]\n p[0] = p[2]' actions['with_stmt_star : COMMA with_item'] = ' p[0] = p[2]' actions['with_stmt_star : with_stmt_star COMMA with_item'] = ' last = p[1]\n while len(last.body) > 0:\n last = last.body[0]\n last.body.append(p[3])\n p[0] = p[1]' actions['with_item : test'] = ' p[0] = ast.With(p[1], None, [], rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], p[1])' actions['with_item : test AS expr'] = ' ctx_to_store(p[3])\n p[0] = ast.With(p[1], p[3], [], rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], p[1])' actions['except_clause : EXCEPT'] = ' p[0] = ast.ExceptHandler(None, None, [], rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['except_clause : EXCEPT test'] = ' p[0] = ast.ExceptHandler(p[2], None, [], rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['except_clause : EXCEPT test AS test'] = ' ctx_to_store(p[4])\n p[0] = ast.ExceptHandler(p[2], p[4], [], rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['except_clause : EXCEPT test COMMA test'] = ' ctx_to_store(p[4])\n p[0] = ast.ExceptHandler(p[2], p[4], [], rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['suite : simple_stmt'] = ' p[0] = p[1]' actions['suite : NEWLINE INDENT suite_plus DEDENT'] = ' p[0] = p[3]' actions['suite_plus : stmt'] = ' p[0] = p[1]' actions['suite_plus : suite_plus stmt'] = ' p[0] = p[1] + p[2]' actions['testlist_safe : old_test'] = ' p[0] = p[1]' actions['testlist_safe : old_test testlist_safe_plus'] = ' p[0] = ast.Tuple([p[1]] + p[2], ast.Load(), rule=inspect.currentframe().f_code.co_name, paren=False)\n inherit_lineno(p[0], p[1])' actions['testlist_safe : old_test testlist_safe_plus COMMA'] = ' p[0] = ast.Tuple([p[1]] + p[2], ast.Load(), rule=inspect.currentframe().f_code.co_name, paren=False)\n inherit_lineno(p[0], p[1])' actions['testlist_safe_plus : COMMA old_test'] = ' p[0] = [p[2]]' actions['testlist_safe_plus : testlist_safe_plus COMMA old_test'] = ' p[0] = p[1] + [p[3]]' actions['old_test : or_test'] = ' p[0] = p[1]' actions['old_test : old_lambdef'] = ' p[0] = p[1]' actions['old_lambdef : LAMBDA COLON old_test'] = ' p[0] = ast.Lambda(ast.arguments([], None, None, [], rule=inspect.currentframe().f_code.co_name, **p[2][1]), p[3], rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['old_lambdef : LAMBDA varargslist COLON old_test'] = ' p[0] = ast.Lambda(p[2], p[4], rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['test : or_test'] = ' p[0] = p[1]' actions['test : or_test IF or_test ELSE test'] = ' p[0] = ast.IfExp(p[3], p[1], p[5], rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], p[1])' actions['test : lambdef'] = ' p[0] = p[1]' actions['or_test : and_test'] = ' p[0] = p[1]' actions['or_test : and_test or_test_star'] = ' theor = ast.Or(rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(theor, p[2][0])\n p[0] = ast.BoolOp(theor, [p[1]] + p[2], rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], p[1])' actions['or_test_star : OR and_test'] = ' p[0] = [p[2]]' actions['or_test_star : or_test_star OR and_test'] = ' p[0] = p[1] + [p[3]]' actions['and_test : not_test'] = ' p[0] = p[1]' actions['and_test : not_test and_test_star'] = ' theand = ast.And(rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(theand, p[2][0])\n p[0] = ast.BoolOp(theand, [p[1]] + p[2], rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], p[1])' actions['and_test_star : AND not_test'] = ' p[0] = [p[2]]' actions['and_test_star : and_test_star AND not_test'] = ' p[0] = p[1] + [p[3]]' actions['not_test : NOT not_test'] = ' thenot = ast.Not(rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(thenot, p[2])\n p[0] = ast.UnaryOp(thenot, p[2], rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['not_test : comparison'] = ' p[0] = p[1]' actions['comparison : expr'] = ' p[0] = p[1]' actions['comparison : expr comparison_star'] = ' ops, exprs = p[2]\n p[0] = ast.Compare(p[1], ops, exprs, rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], p[1])' actions['comparison_star : comp_op expr'] = ' inherit_lineno(p[1], p[2])\n p[0] = ([p[1]], [p[2]])' actions['comparison_star : comparison_star comp_op expr'] = ' ops, exprs = p[1]\n inherit_lineno(p[2], p[3])\n p[0] = (ops + [p[2]], exprs + [p[3]])' actions['comp_op : LESS'] = ' p[0] = ast.Lt(rule=inspect.currentframe().f_code.co_name)' actions['comp_op : GREATER'] = ' p[0] = ast.Gt(rule=inspect.currentframe().f_code.co_name)' actions['comp_op : EQEQUAL'] = ' p[0] = ast.Eq(rule=inspect.currentframe().f_code.co_name)' actions['comp_op : GREATEREQUAL'] = ' p[0] = ast.GtE(rule=inspect.currentframe().f_code.co_name)' actions['comp_op : LESSEQUAL'] = ' p[0] = ast.LtE(rule=inspect.currentframe().f_code.co_name)' actions['comp_op : NOTEQUAL'] = ' p[0] = ast.NotEq(rule=inspect.currentframe().f_code.co_name)' actions['comp_op : IN'] = ' p[0] = ast.In(rule=inspect.currentframe().f_code.co_name)' actions['comp_op : NOT IN'] = ' p[0] = ast.NotIn(rule=inspect.currentframe().f_code.co_name)' actions['comp_op : IS'] = ' p[0] = ast.Is(rule=inspect.currentframe().f_code.co_name)' actions['comp_op : IS NOT'] = ' p[0] = ast.IsNot(rule=inspect.currentframe().f_code.co_name)' actions['expr : xor_expr'] = ' p[0] = p[1]' actions['expr : xor_expr expr_star'] = ' p[0] = unwrap_left_associative([p[1]] + p[2], rule=inspect.currentframe().f_code.co_name, alt=len(p[2]) > 2)' actions['expr_star : VBAR xor_expr'] = ' p[0] = [ast.BitOr(rule=inspect.currentframe().f_code.co_name, **p[1][1]), p[2]]' actions['expr_star : expr_star VBAR xor_expr'] = ' p[0] = p[1] + [ast.BitOr(rule=inspect.currentframe().f_code.co_name, **p[2][1]), p[3]]' actions['xor_expr : and_expr'] = ' p[0] = p[1]' actions['xor_expr : and_expr xor_expr_star'] = ' p[0] = unwrap_left_associative([p[1]] + p[2], rule=inspect.currentframe().f_code.co_name, alt=len(p[2]) > 2)' actions['xor_expr_star : CIRCUMFLEX and_expr'] = ' p[0] = [ast.BitXor(rule=inspect.currentframe().f_code.co_name, **p[1][1]), p[2]]' actions['xor_expr_star : xor_expr_star CIRCUMFLEX and_expr'] = ' p[0] = p[1] + [ast.BitXor(rule=inspect.currentframe().f_code.co_name, **p[2][1]), p[3]]' actions['and_expr : shift_expr'] = ' p[0] = p[1]' actions['and_expr : shift_expr and_expr_star'] = ' p[0] = unwrap_left_associative([p[1]] + p[2], rule=inspect.currentframe().f_code.co_name, alt=len(p[2]) > 0)' actions['and_expr_star : AMPER shift_expr'] = ' p[0] = [ast.BitAnd(rule=inspect.currentframe().f_code.co_name, **p[1][1]), p[2]]' actions['and_expr_star : and_expr_star AMPER shift_expr'] = ' p[0] = p[1] + [ast.BitAnd(rule=inspect.currentframe().f_code.co_name, **p[2][1]), p[3]]' actions['shift_expr : arith_expr'] = ' p[0] = p[1]' actions['shift_expr : arith_expr shift_expr_star'] = ' p[0] = unwrap_left_associative([p[1]] + p[2], rule=inspect.currentframe().f_code.co_name, alt=len(p[2]) > 2)' actions['shift_expr_star : LEFTSHIFT arith_expr'] = ' p[0] = [ast.LShift(rule=inspect.currentframe().f_code.co_name, **p[1][1]), p[2]]' actions['shift_expr_star : RIGHTSHIFT arith_expr'] = ' p[0] = [ast.RShift(rule=inspect.currentframe().f_code.co_name, **p[1][1]), p[2]]' actions['shift_expr_star : shift_expr_star LEFTSHIFT arith_expr'] = ' p[0] = p[1] + [ast.LShift(rule=inspect.currentframe().f_code.co_name, **p[2][1]), p[3]]' actions['shift_expr_star : shift_expr_star RIGHTSHIFT arith_expr'] = ' p[0] = p[1] + [ast.RShift(rule=inspect.currentframe().f_code.co_name, **p[2][1]), p[3]]' actions['arith_expr : term'] = ' p[0] = p[1]' actions['arith_expr : term arith_expr_star'] = ' p[0] = unwrap_left_associative([p[1]] + p[2], rule=inspect.currentframe().f_code.co_name, alt=len(p[2]) > 2)' actions['arith_expr_star : PLUS term'] = ' p[0] = [ast.Add(rule=inspect.currentframe().f_code.co_name, **p[1][1]), p[2]]' actions['arith_expr_star : MINUS term'] = ' p[0] = [ast.Sub(rule=inspect.currentframe().f_code.co_name, **p[1][1]), p[2]]' actions['arith_expr_star : arith_expr_star PLUS term'] = ' p[0] = p[1] + [ast.Add(rule=inspect.currentframe().f_code.co_name, **p[2][1]), p[3]]' actions['arith_expr_star : arith_expr_star MINUS term'] = ' p[0] = p[1] + [ast.Sub(rule=inspect.currentframe().f_code.co_name, **p[2][1]), p[3]]' actions['term : factor'] = ' p[0] = p[1]' actions['term : factor term_star'] = ' p[0] = unwrap_left_associative([p[1]] + p[2], rule=inspect.currentframe().f_code.co_name, alt=len(p[2]) > 2)' actions['term_star : STAR factor'] = ' p[0] = [ast.Mult(rule=inspect.currentframe().f_code.co_name, **p[1][1]), p[2]]' actions['term_star : SLASH factor'] = ' p[0] = [ast.Div(rule=inspect.currentframe().f_code.co_name, **p[1][1]), p[2]]' actions['term_star : PERCENT factor'] = ' p[0] = [ast.Mod(rule=inspect.currentframe().f_code.co_name, **p[1][1]), p[2]]' actions['term_star : DOUBLESLASH factor'] = ' p[0] = [ast.FloorDiv(rule=inspect.currentframe().f_code.co_name, **p[1][1]), p[2]]' actions['term_star : term_star STAR factor'] = ' p[0] = p[1] + [ast.Mult(rule=inspect.currentframe().f_code.co_name, **p[2][1]), p[3]]' actions['term_star : term_star SLASH factor'] = ' p[0] = p[1] + [ast.Div(rule=inspect.currentframe().f_code.co_name, **p[2][1]), p[3]]' actions['term_star : term_star PERCENT factor'] = ' p[0] = p[1] + [ast.Mod(rule=inspect.currentframe().f_code.co_name, **p[2][1]), p[3]]' actions['term_star : term_star DOUBLESLASH factor'] = ' p[0] = p[1] + [ast.FloorDiv(rule=inspect.currentframe().f_code.co_name, **p[2][1]), p[3]]' actions['factor : PLUS factor'] = ' op = ast.UAdd(rule=inspect.currentframe().f_code.co_name, **p[1][1])\n p[0] = ast.UnaryOp(op, p[2], rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], op)' actions['factor : MINUS factor'] = ' if isinstance(p[2], ast.Num) and not hasattr(p[2], "unary"):\n p[2].n *= -1\n p[0] = p[2]\n p[0].unary = True\n inherit_lineno(p[0], p[1][1])\n else:\n op = ast.USub(rule=inspect.currentframe().f_code.co_name, **p[1][1])\n p[0] = ast.UnaryOp(op, p[2], rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], op)' actions['factor : TILDE factor'] = ' op = ast.Invert(rule=inspect.currentframe().f_code.co_name, **p[1][1])\n p[0] = ast.UnaryOp(op, p[2], rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], op)' actions['factor : power'] = ' p[0] = p[1]' actions['power : atom'] = ' p[0] = p[1]' actions['power : atom DOUBLESTAR factor'] = ' p[0] = ast.BinOp(p[1], ast.Pow(rule=inspect.currentframe().f_code.co_name, **p[2][1]), p[3], rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], p[1])' actions['power : atom power_star'] = ' p[0] = unpack_trailer(p[1], p[2])' actions['power : atom power_star DOUBLESTAR factor'] = ' p[0] = ast.BinOp(unpack_trailer(p[1], p[2]), ast.Pow(rule=inspect.currentframe().f_code.co_name, **p[3][1]), p[4], rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], p[1])' actions['power_star : trailer'] = ' p[0] = [p[1]]' actions['power_star : power_star trailer'] = ' p[0] = p[1] + [p[2]]' actions['atom : LPAR RPAR'] = ' p[0] = ast.Tuple([], ast.Load(), rule=inspect.currentframe().f_code.co_name, paren=True, **p[1][1])' actions['atom : LPAR yield_expr RPAR'] = ' p[0] = p[2]\n if isinstance(p[0], ast.Tuple):\n p[0].paren = True\n p[0].alt = p[1][1]' actions['atom : LPAR testlist_comp RPAR'] = ' p[0] = p[2]\n if isinstance(p[0], ast.Tuple):\n p[0].paren = True\n p[0].alt = p[1][1]' actions['atom : LSQB RSQB'] = ' p[0] = ast.List([], ast.Load(), rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['atom : LSQB listmaker RSQB'] = ' if isinstance(p[2], ast.ListComp):\n p[0] = p[2]\n p[0].alt = p[1][1]\n else:\n p[0] = ast.List(p[2], ast.Load(), rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['atom : LBRACE RBRACE'] = ' p[0] = ast.Dict([], [], rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['atom : LBRACE dictorsetmaker RBRACE'] = ' if isinstance(p[2], (ast.SetComp, ast.DictComp)):\n p[0] = p[2]\n p[0].alt = p[1][1]\n else:\n keys, values = p[2]\n if keys is None:\n p[0] = ast.Set(values, rule=inspect.currentframe().f_code.co_name, **p[1][1])\n else:\n p[0] = ast.Dict(keys, values, rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['atom : BACKQUOTE testlist1 BACKQUOTE'] = ' p[0] = ast.Repr(p[2], rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['atom : NAME'] = ' p[0] = ast.Name(p[1][0], ast.Load(), rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['atom : NUMBER'] = ' p[0] = ast.Num(p[1][0], rule=inspect.currentframe().f_code.co_name, **p[1][2])' actions['atom : atom_plus'] = ' p[0] = p[1]' actions['atom_plus : STRING'] = ' p[0] = ast.Str(p[1][0], rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['atom_plus : atom_plus STRING'] = ' p[1].s = p[1].s + p[2][0]\n p[0] = p[1]' actions['listmaker : test list_for'] = ' p[0] = ast.ListComp(p[1], p[2], rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], p[1])' actions['listmaker : test'] = ' p[0] = [p[1]]' actions['listmaker : test COMMA'] = ' p[0] = [p[1]]' actions['listmaker : test listmaker_star'] = ' p[0] = [p[1]] + p[2]' actions['listmaker : test listmaker_star COMMA'] = ' p[0] = [p[1]] + p[2]' actions['listmaker_star : COMMA test'] = ' p[0] = [p[2]]' actions['listmaker_star : listmaker_star COMMA test'] = ' p[0] = p[1] + [p[3]]' actions['testlist_comp : test comp_for'] = ' p[0] = ast.GeneratorExp(p[1], p[2], rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], p[1])' actions['testlist_comp : test'] = ' p[0] = p[1]' actions['testlist_comp : test COMMA'] = ' p[0] = ast.Tuple([p[1]], ast.Load(), rule=inspect.currentframe().f_code.co_name, paren=False)\n inherit_lineno(p[0], p[1])' actions['testlist_comp : test testlist_comp_star'] = ' p[0] = ast.Tuple([p[1]] + p[2], ast.Load(), rule=inspect.currentframe().f_code.co_name, paren=False)\n inherit_lineno(p[0], p[1])' actions['testlist_comp : test testlist_comp_star COMMA'] = ' p[0] = ast.Tuple([p[1]] + p[2], ast.Load(), rule=inspect.currentframe().f_code.co_name, paren=False)\n inherit_lineno(p[0], p[1])' actions['testlist_comp_star : COMMA test'] = ' p[0] = [p[2]]' actions['testlist_comp_star : testlist_comp_star COMMA test'] = ' p[0] = p[1] + [p[3]]' actions['lambdef : LAMBDA COLON test'] = ' p[0] = ast.Lambda(ast.arguments([], None, None, [], rule=inspect.currentframe().f_code.co_name, **p[2][1]), p[3], rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['lambdef : LAMBDA varargslist COLON test'] = ' p[0] = ast.Lambda(p[2], p[4], rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['trailer : LPAR RPAR'] = ' p[0] = ast.Call(None, [], [], None, None, rule=inspect.currentframe().f_code.co_name)' actions['trailer : LPAR arglist RPAR'] = ' p[0] = p[2]' actions['trailer : LSQB subscriptlist RSQB'] = ' p[0] = ast.Subscript(None, p[2], ast.Load(), rule=inspect.currentframe().f_code.co_name)' actions['trailer : DOT NAME'] = ' p[0] = ast.Attribute(None, p[2][0], ast.Load(), rule=inspect.currentframe().f_code.co_name)' actions['subscriptlist : subscript'] = ' p[0] = p[1]' actions['subscriptlist : subscript COMMA'] = ' if isinstance(p[1], ast.Index):\n tup = ast.Tuple([p[1].value], ast.Load(), rule=inspect.currentframe().f_code.co_name, paren=False)\n inherit_lineno(tup, p[1].value)\n p[0] = ast.Index(tup, rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], tup)\n else:\n p[0] = ast.ExtSlice([p[1]], rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], p[1])' actions['subscriptlist : subscript subscriptlist_star'] = ' args = [p[1]] + p[2]\n if all(isinstance(x, ast.Index) for x in args):\n tup = ast.Tuple([x.value for x in args], ast.Load(), rule=inspect.currentframe().f_code.co_name, paren=False)\n inherit_lineno(tup, args[0].value)\n p[0] = ast.Index(tup, rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], tup)\n else:\n p[0] = ast.ExtSlice(args, rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], p[1])' actions['subscriptlist : subscript subscriptlist_star COMMA'] = ' args = [p[1]] + p[2]\n if all(isinstance(x, ast.Index) for x in args):\n tup = ast.Tuple([x.value for x in args], ast.Load(), rule=inspect.currentframe().f_code.co_name, paren=False)\n inherit_lineno(tup, args[0].value)\n p[0] = ast.Index(tup, rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], tup)\n else:\n p[0] = ast.ExtSlice(args, rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], p[1])' actions['subscriptlist_star : COMMA subscript'] = ' p[0] = [p[2]]' actions['subscriptlist_star : subscriptlist_star COMMA subscript'] = ' p[0] = p[1] + [p[3]]' actions['subscript : DOT DOT DOT'] = ' p[0] = ast.Ellipsis(rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['subscript : test'] = ' p[0] = ast.Index(p[1], rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], p[1])' actions['subscript : COLON'] = ' p[0] = ast.Slice(None, None, None, rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['subscript : COLON sliceop'] = ' p[0] = ast.Slice(None, None, p[2], rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['subscript : COLON test'] = ' p[0] = ast.Slice(None, p[2], None, rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['subscript : COLON test sliceop'] = ' p[0] = ast.Slice(None, p[2], p[3], rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['subscript : test COLON'] = ' p[0] = ast.Slice(p[1], None, None, rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], p[1])' actions['subscript : test COLON sliceop'] = ' p[0] = ast.Slice(p[1], None, p[3], rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], p[1])' actions['subscript : test COLON test'] = ' p[0] = ast.Slice(p[1], p[3], None, rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], p[1])' actions['subscript : test COLON test sliceop'] = ' p[0] = ast.Slice(p[1], p[3], p[4], rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], p[1])' actions['sliceop : COLON'] = ' p[0] = ast.Name("None", ast.Load(), rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['sliceop : COLON test'] = ' p[0] = p[2]' actions['exprlist : expr'] = ' p[0] = p[1]' actions['exprlist : expr COMMA'] = ' p[0] = ast.Tuple([p[1]], ast.Load(), rule=inspect.currentframe().f_code.co_name, paren=False)\n inherit_lineno(p[0], p[1])' actions['exprlist : expr exprlist_star'] = ' p[0] = ast.Tuple([p[1]] + p[2], ast.Load(), rule=inspect.currentframe().f_code.co_name, paren=False)\n inherit_lineno(p[0], p[1])' actions['exprlist : expr exprlist_star COMMA'] = ' p[0] = ast.Tuple([p[1]] + p[2], ast.Load(), rule=inspect.currentframe().f_code.co_name, paren=False)\n inherit_lineno(p[0], p[1])' actions['exprlist_star : COMMA expr'] = ' p[0] = [p[2]]' actions['exprlist_star : exprlist_star COMMA expr'] = ' p[0] = p[1] + [p[3]]' actions['testlist : test'] = ' p[0] = p[1]' actions['testlist : test COMMA'] = ' p[0] = ast.Tuple([p[1]], ast.Load(), rule=inspect.currentframe().f_code.co_name, paren=False)\n inherit_lineno(p[0], p[1])' actions['testlist : test testlist_star'] = ' p[0] = ast.Tuple([p[1]] + p[2], ast.Load(), rule=inspect.currentframe().f_code.co_name, paren=False)\n inherit_lineno(p[0], p[1])' actions['testlist : test testlist_star COMMA'] = ' p[0] = ast.Tuple([p[1]] + p[2], ast.Load(), rule=inspect.currentframe().f_code.co_name, paren=False)\n inherit_lineno(p[0], p[1])' actions['testlist_star : COMMA test'] = ' p[0] = [p[2]]' actions['testlist_star : testlist_star COMMA test'] = ' p[0] = p[1] + [p[3]]' actions['dictorsetmaker : test COLON test comp_for'] = ' p[0] = ast.DictComp(p[1], p[3], p[4], rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], p[1])' actions['dictorsetmaker : test COLON test'] = ' p[0] = ([p[1]], [p[3]])' actions['dictorsetmaker : test COLON test COMMA'] = ' p[0] = ([p[1]], [p[3]])' actions['dictorsetmaker : test COLON test dictorsetmaker_star'] = ' keys, values = p[4]\n p[0] = ([p[1]] + keys, [p[3]] + values)' actions['dictorsetmaker : test COLON test dictorsetmaker_star COMMA'] = ' keys, values = p[4]\n p[0] = ([p[1]] + keys, [p[3]] + values)' actions['dictorsetmaker : test comp_for'] = ' p[0] = ast.SetComp(p[1], p[2], rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], p[1])' actions['dictorsetmaker : test'] = ' p[0] = (None, [p[1]])' actions['dictorsetmaker : test COMMA'] = ' p[0] = (None, [p[1]])' actions['dictorsetmaker : test dictorsetmaker_star2'] = ' keys, values = p[2]\n p[0] = (keys, [p[1]] + values)' actions['dictorsetmaker : test dictorsetmaker_star2 COMMA'] = ' keys, values = p[2]\n p[0] = (keys, [p[1]] + values)' actions['dictorsetmaker_star : COMMA test COLON test'] = ' p[0] = ([p[2]], [p[4]])' actions['dictorsetmaker_star : dictorsetmaker_star COMMA test COLON test'] = ' keys, values = p[1]\n p[0] = (keys + [p[3]], values + [p[5]])' actions['dictorsetmaker_star2 : COMMA test'] = ' p[0] = (None, [p[2]])' actions['dictorsetmaker_star2 : dictorsetmaker_star2 COMMA test'] = ' keys, values = p[1]\n p[0] = (keys, values + [p[3]])' actions['classdef : CLASS NAME COLON suite'] = ' p[0] = ast.ClassDef(p[2][0], [], p[4], [], rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['classdef : CLASS NAME LPAR RPAR COLON suite'] = ' p[0] = ast.ClassDef(p[2][0], [], p[6], [], rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['classdef : CLASS NAME LPAR testlist RPAR COLON suite'] = ' if isinstance(p[4], ast.Tuple):\n p[0] = ast.ClassDef(p[2][0], p[4].elts, p[7], [], rule=inspect.currentframe().f_code.co_name, **p[1][1])\n else:\n p[0] = ast.ClassDef(p[2][0], [p[4]], p[7], [], rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['arglist : argument'] = ' if notkeyword(p[1]):\n p[0] = ast.Call(None, [p[1]], [], None, None, rule=inspect.currentframe().f_code.co_name)\n else:\n p[0] = ast.Call(None, [], [p[1]], None, None, rule=inspect.currentframe().f_code.co_name)' actions['arglist : argument COMMA'] = ' if notkeyword(p[1]):\n p[0] = ast.Call(None, [p[1]], [], None, None, rule=inspect.currentframe().f_code.co_name)\n else:\n p[0] = ast.Call(None, [], [p[1]], None, None, rule=inspect.currentframe().f_code.co_name)' actions['arglist : STAR test'] = ' p[0] = ast.Call(None, [], [], p[2], None, rule=inspect.currentframe().f_code.co_name)' actions['arglist : STAR test COMMA DOUBLESTAR test'] = ' p[0] = ast.Call(None, [], [], p[2], p[5], rule=inspect.currentframe().f_code.co_name)' actions['arglist : STAR test arglist_star'] = ' p[0] = ast.Call(None, filter(notkeyword, p[3]), filter(iskeyword, p[3]), p[2], None, rule=inspect.currentframe().f_code.co_name)' actions['arglist : STAR test arglist_star COMMA DOUBLESTAR test'] = ' p[0] = ast.Call(None, filter(notkeyword, p[3]), filter(iskeyword, p[3]), p[2], p[6], rule=inspect.currentframe().f_code.co_name)' actions['arglist : DOUBLESTAR test'] = ' p[0] = ast.Call(None, [], [], None, p[2], rule=inspect.currentframe().f_code.co_name)' actions['arglist : arglist_star2 argument'] = ' args = p[1] + [p[2]]\n p[0] = ast.Call(None, filter(notkeyword, args), filter(iskeyword, args), None, None, rule=inspect.currentframe().f_code.co_name)' actions['arglist : arglist_star2 argument COMMA'] = ' args = p[1] + [p[2]]\n p[0] = ast.Call(None, filter(notkeyword, args), filter(iskeyword, args), None, None, rule=inspect.currentframe().f_code.co_name)' actions['arglist : arglist_star2 STAR test'] = ' p[0] = ast.Call(None, filter(notkeyword, p[1]), filter(iskeyword, p[1]), p[3], None, rule=inspect.currentframe().f_code.co_name)' actions['arglist : arglist_star2 STAR test COMMA DOUBLESTAR test'] = ' p[0] = ast.Call(None, filter(notkeyword, p[1]), filter(iskeyword, p[1]), p[3], p[6], rule=inspect.currentframe().f_code.co_name)' actions['arglist : arglist_star2 STAR test arglist_star3'] = ' args = p[1] + p[4]\n p[0] = ast.Call(None, filter(notkeyword, args), filter(iskeyword, args), p[3], None, rule=inspect.currentframe().f_code.co_name)' actions['arglist : arglist_star2 STAR test arglist_star3 COMMA DOUBLESTAR test'] = ' args = p[1] + p[4]\n p[0] = ast.Call(None, filter(notkeyword, args), filter(iskeyword, args), p[3], p[7], rule=inspect.currentframe().f_code.co_name)' actions['arglist : arglist_star2 DOUBLESTAR test'] = ' p[0] = ast.Call(None, filter(notkeyword, p[1]), filter(iskeyword, p[1]), None, p[3], rule=inspect.currentframe().f_code.co_name)' actions['arglist_star : COMMA argument'] = ' p[0] = [p[2]]' actions['arglist_star : arglist_star COMMA argument'] = ' p[0] = p[1] + [p[3]]' actions['arglist_star3 : COMMA argument'] = ' p[0] = [p[2]]' actions['arglist_star3 : arglist_star3 COMMA argument'] = ' p[0] = p[1] + [p[3]]' actions['arglist_star2 : argument COMMA'] = ' p[0] = [p[1]]' actions['arglist_star2 : arglist_star2 argument COMMA'] = ' p[0] = p[1] + [p[2]]' actions['argument : test'] = ' p[0] = p[1]' actions['argument : test comp_for'] = ' p[0] = ast.GeneratorExp(p[1], p[2], rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], p[1])' actions['argument : test EQUAL test'] = ' p[0] = ast.keyword(p[1].id, p[3], rule=inspect.currentframe().f_code.co_name)\n inherit_lineno(p[0], p[1])' actions['list_iter : list_for'] = ' p[0] = ([], p[1])' actions['list_iter : list_if'] = ' p[0] = p[1]' actions['list_for : FOR exprlist IN testlist_safe'] = ' ctx_to_store(p[2])\n p[0] = [ast.comprehension(p[2], p[4], [], rule=inspect.currentframe().f_code.co_name, **p[1][1])]' actions['list_for : FOR exprlist IN testlist_safe list_iter'] = ' ctx_to_store(p[2])\n ifs, iters = p[5]\n p[0] = [ast.comprehension(p[2], p[4], ifs, rule=inspect.currentframe().f_code.co_name, **p[1][1])] + iters' actions['list_if : IF old_test'] = ' p[0] = ([p[2]], [])' actions['list_if : IF old_test list_iter'] = ' ifs, iters = p[3]\n p[0] = ([p[2]] + ifs, iters)' actions['comp_iter : comp_for'] = ' p[0] = ([], p[1])' actions['comp_iter : comp_if'] = ' p[0] = p[1]' actions['comp_for : FOR exprlist IN or_test'] = ' ctx_to_store(p[2])\n p[0] = [ast.comprehension(p[2], p[4], [], rule=inspect.currentframe().f_code.co_name, **p[1][1])]' actions['comp_for : FOR exprlist IN or_test comp_iter'] = ' ctx_to_store(p[2])\n ifs, iters = p[5]\n p[0] = [ast.comprehension(p[2], p[4], ifs, rule=inspect.currentframe().f_code.co_name, **p[1][1])] + iters' actions['comp_if : IF old_test'] = ' p[0] = ([p[2]], [])' actions['comp_if : IF old_test comp_iter'] = ' ifs, iters = p[3]\n p[0] = ([p[2]] + ifs, iters)' actions['testlist1 : test'] = ' p[0] = p[1]' actions['testlist1 : test testlist1_star'] = ' p[0] = ast.Tuple([p[1]] + p[2], ast.Load(), rule=inspect.currentframe().f_code.co_name, paren=False)\n inherit_lineno(p[0], p[1])' actions['testlist1_star : COMMA test'] = ' p[0] = [p[2]]' actions['testlist1_star : testlist1_star COMMA test'] = ' p[0] = p[1] + [p[3]]' actions['encoding_decl : NAME'] = ' p[0] = p[1]' actions['yield_expr : YIELD'] = ' p[0] = ast.Yield(None, rule=inspect.currentframe().f_code.co_name, **p[1][1])' actions['yield_expr : YIELD testlist'] = ' p[0] = ast.Yield(p[2], rule=inspect.currentframe().f_code.co_name, **p[1][1])'
def printHi(): print('hi') def print2(): print('2')
def print_hi(): print('hi') def print2(): print('2')
# # PySNMP MIB module ONEACCESS-MISC-CONFIG-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ONEACCESS-MISC-CONFIG-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 20:25:14 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # OctetString, Integer, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "OctetString", "Integer", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsIntersection, SingleValueConstraint, ValueSizeConstraint, ValueRangeConstraint, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "SingleValueConstraint", "ValueSizeConstraint", "ValueRangeConstraint", "ConstraintsUnion") InterfaceIndexOrZero, InterfaceIndex = mibBuilder.importSymbols("IF-MIB", "InterfaceIndexOrZero", "InterfaceIndex") oacExpIMManagement, oacMIBModules, oacExpIMIpAcl = mibBuilder.importSymbols("ONEACCESS-GLOBAL-REG", "oacExpIMManagement", "oacMIBModules", "oacExpIMIpAcl") ObjectGroup, ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ObjectGroup", "ModuleCompliance", "NotificationGroup") MibIdentifier, MibScalar, MibTable, MibTableRow, MibTableColumn, Unsigned32, NotificationType, ModuleIdentity, iso, Counter32, TimeTicks, Bits, IpAddress, ObjectIdentity, Integer32, Counter64, Gauge32 = mibBuilder.importSymbols("SNMPv2-SMI", "MibIdentifier", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Unsigned32", "NotificationType", "ModuleIdentity", "iso", "Counter32", "TimeTicks", "Bits", "IpAddress", "ObjectIdentity", "Integer32", "Counter64", "Gauge32") RowStatus, DisplayString, DateAndTime, PhysAddress, TruthValue, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "RowStatus", "DisplayString", "DateAndTime", "PhysAddress", "TruthValue", "TextualConvention") oacMiscConfigMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 13191, 1, 100, 2003)) oacMiscConfigMIB.setRevisions(('2011-07-26 00:00', '2011-06-15 00:00', '2010-12-17 00:01',)) if mibBuilder.loadTexts: oacMiscConfigMIB.setLastUpdated('201107260000Z') if mibBuilder.loadTexts: oacMiscConfigMIB.setOrganization(' OneAccess ') oacMiscConfig = MibIdentifier((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21)) oacTelnetServerConfigObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 1)) oacSyslogServerConfigObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 2)) oacSntpClientConfigObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 3)) oacBannerConfigObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 4)) oacDateAndTimeConfigObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 5)) oacMiscConfigConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 6)) oacTelnetServerBindInterfaceTable = MibTable((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 1, 1), ) if mibBuilder.loadTexts: oacTelnetServerBindInterfaceTable.setStatus('current') oacTelnetServerBindInterfaceEntry = MibTableRow((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 1, 1, 1), ).setIndexNames((0, "ONEACCESS-MISC-CONFIG-MIB", "oacTelnetServerBindInterfaceIndex")) if mibBuilder.loadTexts: oacTelnetServerBindInterfaceEntry.setStatus('current') oacTelnetServerBindInterfaceIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 1, 1, 1, 1), InterfaceIndex()).setMaxAccess("readcreate") if mibBuilder.loadTexts: oacTelnetServerBindInterfaceIndex.setStatus('current') oacTelnetServerBindInterfaceName = MibTableColumn((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 1, 1, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 255))).setMaxAccess("readcreate") if mibBuilder.loadTexts: oacTelnetServerBindInterfaceName.setStatus('current') oacTelnetServerBindInterfaceRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 1, 1, 1, 3), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: oacTelnetServerBindInterfaceRowStatus.setStatus('current') oacTelnetServerBindAcl = MibScalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readwrite") if mibBuilder.loadTexts: oacTelnetServerBindAcl.setStatus('current') oacTelnetServerIdleTimeout = MibScalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 1, 3), Unsigned32().clone(600)).setUnits('seconds').setMaxAccess("readwrite") if mibBuilder.loadTexts: oacTelnetServerIdleTimeout.setStatus('current') oacTelnetServerLogEnable = MibScalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 1, 4), TruthValue().clone('true')).setMaxAccess("readwrite") if mibBuilder.loadTexts: oacTelnetServerLogEnable.setStatus('current') oacTelnetServerLogFileSize = MibScalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(82, 8200)).clone(8200)).setUnits('bytes').setMaxAccess("readwrite") if mibBuilder.loadTexts: oacTelnetServerLogFileSize.setStatus('current') oacSyslogServerTable = MibTable((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 2, 1), ) if mibBuilder.loadTexts: oacSyslogServerTable.setStatus('current') oacSyslogServerEntry = MibTableRow((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 2, 1, 1), ).setIndexNames((0, "ONEACCESS-MISC-CONFIG-MIB", "oacSyslogServerAddress")) if mibBuilder.loadTexts: oacSyslogServerEntry.setStatus('current') oacSyslogServerAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 2, 1, 1, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 255))).setMaxAccess("readcreate") if mibBuilder.loadTexts: oacSyslogServerAddress.setStatus('current') oacSyslogServerFacilityNum = MibTableColumn((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 2, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 23))).setMaxAccess("readcreate") if mibBuilder.loadTexts: oacSyslogServerFacilityNum.setStatus('current') oacSyslogServerInterface = MibTableColumn((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 2, 1, 1, 3), InterfaceIndex()).setMaxAccess("readcreate") if mibBuilder.loadTexts: oacSyslogServerInterface.setStatus('current') oacSyslogServerRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 2, 1, 1, 4), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: oacSyslogServerRowStatus.setStatus('current') oacSyslogMaxServers = MibScalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 2, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 20))).setMaxAccess("readwrite") if mibBuilder.loadTexts: oacSyslogMaxServers.setStatus('current') oacSntpClientBroadcastEnable = MibScalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 3, 1), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: oacSntpClientBroadcastEnable.setStatus('current') oacSntpRemoteServerTable = MibTable((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 3, 2), ) if mibBuilder.loadTexts: oacSntpRemoteServerTable.setStatus('current') oacSntpRemoteServerEntry = MibTableRow((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 3, 2, 1), ).setIndexNames((0, "ONEACCESS-MISC-CONFIG-MIB", "oacSntpRemoteServerAddress")) if mibBuilder.loadTexts: oacSntpRemoteServerEntry.setStatus('current') oacSntpRemoteServerAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 3, 2, 1, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 255))).setMaxAccess("readcreate") if mibBuilder.loadTexts: oacSntpRemoteServerAddress.setStatus('current') oacSntpRemoteServerInterface = MibTableColumn((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 3, 2, 1, 2), InterfaceIndex()).setMaxAccess("readcreate") if mibBuilder.loadTexts: oacSntpRemoteServerInterface.setStatus('current') oacSntpRemoteServerRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 3, 2, 1, 3), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: oacSntpRemoteServerRowStatus.setStatus('current') oacSntpClientPollInterval = MibScalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 3, 3), Unsigned32().clone(64)).setUnits('seconds').setMaxAccess("readwrite") if mibBuilder.loadTexts: oacSntpClientPollInterval.setStatus('current') oacConfigBannerSeqTable = MibTable((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 4, 1), ) if mibBuilder.loadTexts: oacConfigBannerSeqTable.setStatus('current') oacConfigBannerSeqEntry = MibTableRow((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 4, 1, 1), ).setIndexNames((0, "ONEACCESS-MISC-CONFIG-MIB", "oacConfigBannerSequence")) if mibBuilder.loadTexts: oacConfigBannerSeqEntry.setStatus('current') oacConfigBannerType = MibTableColumn((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 4, 1, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("motd", 1), ("exec", 2)))).setMaxAccess("readcreate") if mibBuilder.loadTexts: oacConfigBannerType.setStatus('current') oacConfigBannerSequence = MibTableColumn((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 4, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 40))).setMaxAccess("readcreate") if mibBuilder.loadTexts: oacConfigBannerSequence.setStatus('current') oacConfigBannerString = MibTableColumn((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 4, 1, 1, 3), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 255))).setMaxAccess("readcreate") if mibBuilder.loadTexts: oacConfigBannerString.setStatus('current') oacConfigBannerSeqRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 4, 1, 1, 4), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: oacConfigBannerSeqRowStatus.setStatus('current') oacConfigMotdBanner = MibScalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 4, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 230))).setMaxAccess("readwrite") if mibBuilder.loadTexts: oacConfigMotdBanner.setStatus('current') oacConfigExecBanner = MibScalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 4, 3), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 230))).setMaxAccess("readwrite") if mibBuilder.loadTexts: oacConfigExecBanner.setStatus('current') oacMiscConfigDateAndTime = MibScalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 5, 1), DateAndTime()).setMaxAccess("readwrite") if mibBuilder.loadTexts: oacMiscConfigDateAndTime.setStatus('current') oacConfigClockDstTable = MibTable((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 5, 2), ) if mibBuilder.loadTexts: oacConfigClockDstTable.setStatus('current') oacConfigClockDstEntry = MibTableRow((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 5, 2, 1), ).setIndexNames((0, "ONEACCESS-MISC-CONFIG-MIB", "oacClockDstName")) if mibBuilder.loadTexts: oacConfigClockDstEntry.setStatus('current') oacClockDstName = MibTableColumn((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 5, 2, 1, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 255))).setMaxAccess("readcreate") if mibBuilder.loadTexts: oacClockDstName.setStatus('current') oacClockDstSummerStartWeek = MibTableColumn((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 5, 2, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 255))).setMaxAccess("readcreate") if mibBuilder.loadTexts: oacClockDstSummerStartWeek.setStatus('current') oacClockDstSummerStartDate = MibTableColumn((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 5, 2, 1, 3), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 255))).setMaxAccess("readcreate") if mibBuilder.loadTexts: oacClockDstSummerStartDate.setStatus('current') oacClockDstWinterStartWeek = MibTableColumn((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 5, 2, 1, 4), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 255))).setMaxAccess("readcreate") if mibBuilder.loadTexts: oacClockDstWinterStartWeek.setStatus('current') oacClockDstWinterStartDate = MibTableColumn((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 5, 2, 1, 5), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 255))).setMaxAccess("readcreate") if mibBuilder.loadTexts: oacClockDstWinterStartDate.setStatus('current') oacClockDstRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 5, 2, 1, 6), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: oacClockDstRowStatus.setStatus('current') oacMiscConfigGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 6, 1)) oacMiscConfigGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 6, 1, 1)).setObjects(("ONEACCESS-MISC-CONFIG-MIB", "oacConfigBannerString")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): oacMiscConfigGroup = oacMiscConfigGroup.setStatus('current') oacMiscCompls = MibIdentifier((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 6, 2)) mibBuilder.exportSymbols("ONEACCESS-MISC-CONFIG-MIB", oacTelnetServerBindInterfaceRowStatus=oacTelnetServerBindInterfaceRowStatus, oacConfigExecBanner=oacConfigExecBanner, oacTelnetServerConfigObjects=oacTelnetServerConfigObjects, oacConfigBannerSeqRowStatus=oacConfigBannerSeqRowStatus, oacMiscConfigGroup=oacMiscConfigGroup, oacMiscConfigGroups=oacMiscConfigGroups, oacConfigMotdBanner=oacConfigMotdBanner, oacTelnetServerBindInterfaceEntry=oacTelnetServerBindInterfaceEntry, oacSntpRemoteServerRowStatus=oacSntpRemoteServerRowStatus, oacSyslogServerInterface=oacSyslogServerInterface, oacMiscConfigMIB=oacMiscConfigMIB, oacSntpClientBroadcastEnable=oacSntpClientBroadcastEnable, oacMiscConfigConformance=oacMiscConfigConformance, oacTelnetServerBindInterfaceIndex=oacTelnetServerBindInterfaceIndex, oacTelnetServerBindInterfaceTable=oacTelnetServerBindInterfaceTable, oacConfigBannerType=oacConfigBannerType, oacSntpRemoteServerTable=oacSntpRemoteServerTable, oacTelnetServerLogEnable=oacTelnetServerLogEnable, oacSyslogServerTable=oacSyslogServerTable, oacSntpRemoteServerAddress=oacSntpRemoteServerAddress, oacClockDstWinterStartDate=oacClockDstWinterStartDate, oacSntpRemoteServerEntry=oacSntpRemoteServerEntry, oacSyslogServerAddress=oacSyslogServerAddress, oacTelnetServerLogFileSize=oacTelnetServerLogFileSize, oacTelnetServerBindAcl=oacTelnetServerBindAcl, oacSntpClientPollInterval=oacSntpClientPollInterval, oacConfigClockDstTable=oacConfigClockDstTable, oacConfigClockDstEntry=oacConfigClockDstEntry, oacBannerConfigObjects=oacBannerConfigObjects, oacConfigBannerSeqTable=oacConfigBannerSeqTable, oacMiscCompls=oacMiscCompls, oacClockDstSummerStartWeek=oacClockDstSummerStartWeek, oacSyslogServerConfigObjects=oacSyslogServerConfigObjects, oacMiscConfigDateAndTime=oacMiscConfigDateAndTime, oacSntpRemoteServerInterface=oacSntpRemoteServerInterface, PYSNMP_MODULE_ID=oacMiscConfigMIB, oacTelnetServerBindInterfaceName=oacTelnetServerBindInterfaceName, oacMiscConfig=oacMiscConfig, oacConfigBannerSeqEntry=oacConfigBannerSeqEntry, oacSyslogServerFacilityNum=oacSyslogServerFacilityNum, oacDateAndTimeConfigObjects=oacDateAndTimeConfigObjects, oacSntpClientConfigObjects=oacSntpClientConfigObjects, oacSyslogServerEntry=oacSyslogServerEntry, oacClockDstRowStatus=oacClockDstRowStatus, oacClockDstName=oacClockDstName, oacSyslogMaxServers=oacSyslogMaxServers, oacSyslogServerRowStatus=oacSyslogServerRowStatus, oacClockDstSummerStartDate=oacClockDstSummerStartDate, oacClockDstWinterStartWeek=oacClockDstWinterStartWeek, oacConfigBannerString=oacConfigBannerString, oacTelnetServerIdleTimeout=oacTelnetServerIdleTimeout, oacConfigBannerSequence=oacConfigBannerSequence)
(octet_string, integer, object_identifier) = mibBuilder.importSymbols('ASN1', 'OctetString', 'Integer', 'ObjectIdentifier') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_intersection, single_value_constraint, value_size_constraint, value_range_constraint, constraints_union) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'SingleValueConstraint', 'ValueSizeConstraint', 'ValueRangeConstraint', 'ConstraintsUnion') (interface_index_or_zero, interface_index) = mibBuilder.importSymbols('IF-MIB', 'InterfaceIndexOrZero', 'InterfaceIndex') (oac_exp_im_management, oac_mib_modules, oac_exp_im_ip_acl) = mibBuilder.importSymbols('ONEACCESS-GLOBAL-REG', 'oacExpIMManagement', 'oacMIBModules', 'oacExpIMIpAcl') (object_group, module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ObjectGroup', 'ModuleCompliance', 'NotificationGroup') (mib_identifier, mib_scalar, mib_table, mib_table_row, mib_table_column, unsigned32, notification_type, module_identity, iso, counter32, time_ticks, bits, ip_address, object_identity, integer32, counter64, gauge32) = mibBuilder.importSymbols('SNMPv2-SMI', 'MibIdentifier', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Unsigned32', 'NotificationType', 'ModuleIdentity', 'iso', 'Counter32', 'TimeTicks', 'Bits', 'IpAddress', 'ObjectIdentity', 'Integer32', 'Counter64', 'Gauge32') (row_status, display_string, date_and_time, phys_address, truth_value, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'RowStatus', 'DisplayString', 'DateAndTime', 'PhysAddress', 'TruthValue', 'TextualConvention') oac_misc_config_mib = module_identity((1, 3, 6, 1, 4, 1, 13191, 1, 100, 2003)) oacMiscConfigMIB.setRevisions(('2011-07-26 00:00', '2011-06-15 00:00', '2010-12-17 00:01')) if mibBuilder.loadTexts: oacMiscConfigMIB.setLastUpdated('201107260000Z') if mibBuilder.loadTexts: oacMiscConfigMIB.setOrganization(' OneAccess ') oac_misc_config = mib_identifier((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21)) oac_telnet_server_config_objects = mib_identifier((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 1)) oac_syslog_server_config_objects = mib_identifier((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 2)) oac_sntp_client_config_objects = mib_identifier((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 3)) oac_banner_config_objects = mib_identifier((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 4)) oac_date_and_time_config_objects = mib_identifier((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 5)) oac_misc_config_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 6)) oac_telnet_server_bind_interface_table = mib_table((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 1, 1)) if mibBuilder.loadTexts: oacTelnetServerBindInterfaceTable.setStatus('current') oac_telnet_server_bind_interface_entry = mib_table_row((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 1, 1, 1)).setIndexNames((0, 'ONEACCESS-MISC-CONFIG-MIB', 'oacTelnetServerBindInterfaceIndex')) if mibBuilder.loadTexts: oacTelnetServerBindInterfaceEntry.setStatus('current') oac_telnet_server_bind_interface_index = mib_table_column((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 1, 1, 1, 1), interface_index()).setMaxAccess('readcreate') if mibBuilder.loadTexts: oacTelnetServerBindInterfaceIndex.setStatus('current') oac_telnet_server_bind_interface_name = mib_table_column((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 1, 1, 1, 2), octet_string().subtype(subtypeSpec=value_size_constraint(1, 255))).setMaxAccess('readcreate') if mibBuilder.loadTexts: oacTelnetServerBindInterfaceName.setStatus('current') oac_telnet_server_bind_interface_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 1, 1, 1, 3), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: oacTelnetServerBindInterfaceRowStatus.setStatus('current') oac_telnet_server_bind_acl = mib_scalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 1, 2), octet_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readwrite') if mibBuilder.loadTexts: oacTelnetServerBindAcl.setStatus('current') oac_telnet_server_idle_timeout = mib_scalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 1, 3), unsigned32().clone(600)).setUnits('seconds').setMaxAccess('readwrite') if mibBuilder.loadTexts: oacTelnetServerIdleTimeout.setStatus('current') oac_telnet_server_log_enable = mib_scalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 1, 4), truth_value().clone('true')).setMaxAccess('readwrite') if mibBuilder.loadTexts: oacTelnetServerLogEnable.setStatus('current') oac_telnet_server_log_file_size = mib_scalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(82, 8200)).clone(8200)).setUnits('bytes').setMaxAccess('readwrite') if mibBuilder.loadTexts: oacTelnetServerLogFileSize.setStatus('current') oac_syslog_server_table = mib_table((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 2, 1)) if mibBuilder.loadTexts: oacSyslogServerTable.setStatus('current') oac_syslog_server_entry = mib_table_row((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 2, 1, 1)).setIndexNames((0, 'ONEACCESS-MISC-CONFIG-MIB', 'oacSyslogServerAddress')) if mibBuilder.loadTexts: oacSyslogServerEntry.setStatus('current') oac_syslog_server_address = mib_table_column((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 2, 1, 1, 1), octet_string().subtype(subtypeSpec=value_size_constraint(1, 255))).setMaxAccess('readcreate') if mibBuilder.loadTexts: oacSyslogServerAddress.setStatus('current') oac_syslog_server_facility_num = mib_table_column((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 2, 1, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 23))).setMaxAccess('readcreate') if mibBuilder.loadTexts: oacSyslogServerFacilityNum.setStatus('current') oac_syslog_server_interface = mib_table_column((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 2, 1, 1, 3), interface_index()).setMaxAccess('readcreate') if mibBuilder.loadTexts: oacSyslogServerInterface.setStatus('current') oac_syslog_server_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 2, 1, 1, 4), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: oacSyslogServerRowStatus.setStatus('current') oac_syslog_max_servers = mib_scalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 2, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 20))).setMaxAccess('readwrite') if mibBuilder.loadTexts: oacSyslogMaxServers.setStatus('current') oac_sntp_client_broadcast_enable = mib_scalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 3, 1), truth_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: oacSntpClientBroadcastEnable.setStatus('current') oac_sntp_remote_server_table = mib_table((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 3, 2)) if mibBuilder.loadTexts: oacSntpRemoteServerTable.setStatus('current') oac_sntp_remote_server_entry = mib_table_row((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 3, 2, 1)).setIndexNames((0, 'ONEACCESS-MISC-CONFIG-MIB', 'oacSntpRemoteServerAddress')) if mibBuilder.loadTexts: oacSntpRemoteServerEntry.setStatus('current') oac_sntp_remote_server_address = mib_table_column((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 3, 2, 1, 1), octet_string().subtype(subtypeSpec=value_size_constraint(1, 255))).setMaxAccess('readcreate') if mibBuilder.loadTexts: oacSntpRemoteServerAddress.setStatus('current') oac_sntp_remote_server_interface = mib_table_column((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 3, 2, 1, 2), interface_index()).setMaxAccess('readcreate') if mibBuilder.loadTexts: oacSntpRemoteServerInterface.setStatus('current') oac_sntp_remote_server_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 3, 2, 1, 3), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: oacSntpRemoteServerRowStatus.setStatus('current') oac_sntp_client_poll_interval = mib_scalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 3, 3), unsigned32().clone(64)).setUnits('seconds').setMaxAccess('readwrite') if mibBuilder.loadTexts: oacSntpClientPollInterval.setStatus('current') oac_config_banner_seq_table = mib_table((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 4, 1)) if mibBuilder.loadTexts: oacConfigBannerSeqTable.setStatus('current') oac_config_banner_seq_entry = mib_table_row((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 4, 1, 1)).setIndexNames((0, 'ONEACCESS-MISC-CONFIG-MIB', 'oacConfigBannerSequence')) if mibBuilder.loadTexts: oacConfigBannerSeqEntry.setStatus('current') oac_config_banner_type = mib_table_column((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 4, 1, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('motd', 1), ('exec', 2)))).setMaxAccess('readcreate') if mibBuilder.loadTexts: oacConfigBannerType.setStatus('current') oac_config_banner_sequence = mib_table_column((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 4, 1, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 40))).setMaxAccess('readcreate') if mibBuilder.loadTexts: oacConfigBannerSequence.setStatus('current') oac_config_banner_string = mib_table_column((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 4, 1, 1, 3), octet_string().subtype(subtypeSpec=value_size_constraint(1, 255))).setMaxAccess('readcreate') if mibBuilder.loadTexts: oacConfigBannerString.setStatus('current') oac_config_banner_seq_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 4, 1, 1, 4), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: oacConfigBannerSeqRowStatus.setStatus('current') oac_config_motd_banner = mib_scalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 4, 2), octet_string().subtype(subtypeSpec=value_size_constraint(0, 230))).setMaxAccess('readwrite') if mibBuilder.loadTexts: oacConfigMotdBanner.setStatus('current') oac_config_exec_banner = mib_scalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 4, 3), octet_string().subtype(subtypeSpec=value_size_constraint(0, 230))).setMaxAccess('readwrite') if mibBuilder.loadTexts: oacConfigExecBanner.setStatus('current') oac_misc_config_date_and_time = mib_scalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 5, 1), date_and_time()).setMaxAccess('readwrite') if mibBuilder.loadTexts: oacMiscConfigDateAndTime.setStatus('current') oac_config_clock_dst_table = mib_table((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 5, 2)) if mibBuilder.loadTexts: oacConfigClockDstTable.setStatus('current') oac_config_clock_dst_entry = mib_table_row((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 5, 2, 1)).setIndexNames((0, 'ONEACCESS-MISC-CONFIG-MIB', 'oacClockDstName')) if mibBuilder.loadTexts: oacConfigClockDstEntry.setStatus('current') oac_clock_dst_name = mib_table_column((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 5, 2, 1, 1), octet_string().subtype(subtypeSpec=value_size_constraint(1, 255))).setMaxAccess('readcreate') if mibBuilder.loadTexts: oacClockDstName.setStatus('current') oac_clock_dst_summer_start_week = mib_table_column((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 5, 2, 1, 2), octet_string().subtype(subtypeSpec=value_size_constraint(1, 255))).setMaxAccess('readcreate') if mibBuilder.loadTexts: oacClockDstSummerStartWeek.setStatus('current') oac_clock_dst_summer_start_date = mib_table_column((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 5, 2, 1, 3), octet_string().subtype(subtypeSpec=value_size_constraint(1, 255))).setMaxAccess('readcreate') if mibBuilder.loadTexts: oacClockDstSummerStartDate.setStatus('current') oac_clock_dst_winter_start_week = mib_table_column((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 5, 2, 1, 4), octet_string().subtype(subtypeSpec=value_size_constraint(1, 255))).setMaxAccess('readcreate') if mibBuilder.loadTexts: oacClockDstWinterStartWeek.setStatus('current') oac_clock_dst_winter_start_date = mib_table_column((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 5, 2, 1, 5), octet_string().subtype(subtypeSpec=value_size_constraint(1, 255))).setMaxAccess('readcreate') if mibBuilder.loadTexts: oacClockDstWinterStartDate.setStatus('current') oac_clock_dst_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 5, 2, 1, 6), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: oacClockDstRowStatus.setStatus('current') oac_misc_config_groups = mib_identifier((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 6, 1)) oac_misc_config_group = object_group((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 6, 1, 1)).setObjects(('ONEACCESS-MISC-CONFIG-MIB', 'oacConfigBannerString')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): oac_misc_config_group = oacMiscConfigGroup.setStatus('current') oac_misc_compls = mib_identifier((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 21, 6, 2)) mibBuilder.exportSymbols('ONEACCESS-MISC-CONFIG-MIB', oacTelnetServerBindInterfaceRowStatus=oacTelnetServerBindInterfaceRowStatus, oacConfigExecBanner=oacConfigExecBanner, oacTelnetServerConfigObjects=oacTelnetServerConfigObjects, oacConfigBannerSeqRowStatus=oacConfigBannerSeqRowStatus, oacMiscConfigGroup=oacMiscConfigGroup, oacMiscConfigGroups=oacMiscConfigGroups, oacConfigMotdBanner=oacConfigMotdBanner, oacTelnetServerBindInterfaceEntry=oacTelnetServerBindInterfaceEntry, oacSntpRemoteServerRowStatus=oacSntpRemoteServerRowStatus, oacSyslogServerInterface=oacSyslogServerInterface, oacMiscConfigMIB=oacMiscConfigMIB, oacSntpClientBroadcastEnable=oacSntpClientBroadcastEnable, oacMiscConfigConformance=oacMiscConfigConformance, oacTelnetServerBindInterfaceIndex=oacTelnetServerBindInterfaceIndex, oacTelnetServerBindInterfaceTable=oacTelnetServerBindInterfaceTable, oacConfigBannerType=oacConfigBannerType, oacSntpRemoteServerTable=oacSntpRemoteServerTable, oacTelnetServerLogEnable=oacTelnetServerLogEnable, oacSyslogServerTable=oacSyslogServerTable, oacSntpRemoteServerAddress=oacSntpRemoteServerAddress, oacClockDstWinterStartDate=oacClockDstWinterStartDate, oacSntpRemoteServerEntry=oacSntpRemoteServerEntry, oacSyslogServerAddress=oacSyslogServerAddress, oacTelnetServerLogFileSize=oacTelnetServerLogFileSize, oacTelnetServerBindAcl=oacTelnetServerBindAcl, oacSntpClientPollInterval=oacSntpClientPollInterval, oacConfigClockDstTable=oacConfigClockDstTable, oacConfigClockDstEntry=oacConfigClockDstEntry, oacBannerConfigObjects=oacBannerConfigObjects, oacConfigBannerSeqTable=oacConfigBannerSeqTable, oacMiscCompls=oacMiscCompls, oacClockDstSummerStartWeek=oacClockDstSummerStartWeek, oacSyslogServerConfigObjects=oacSyslogServerConfigObjects, oacMiscConfigDateAndTime=oacMiscConfigDateAndTime, oacSntpRemoteServerInterface=oacSntpRemoteServerInterface, PYSNMP_MODULE_ID=oacMiscConfigMIB, oacTelnetServerBindInterfaceName=oacTelnetServerBindInterfaceName, oacMiscConfig=oacMiscConfig, oacConfigBannerSeqEntry=oacConfigBannerSeqEntry, oacSyslogServerFacilityNum=oacSyslogServerFacilityNum, oacDateAndTimeConfigObjects=oacDateAndTimeConfigObjects, oacSntpClientConfigObjects=oacSntpClientConfigObjects, oacSyslogServerEntry=oacSyslogServerEntry, oacClockDstRowStatus=oacClockDstRowStatus, oacClockDstName=oacClockDstName, oacSyslogMaxServers=oacSyslogMaxServers, oacSyslogServerRowStatus=oacSyslogServerRowStatus, oacClockDstSummerStartDate=oacClockDstSummerStartDate, oacClockDstWinterStartWeek=oacClockDstWinterStartWeek, oacConfigBannerString=oacConfigBannerString, oacTelnetServerIdleTimeout=oacTelnetServerIdleTimeout, oacConfigBannerSequence=oacConfigBannerSequence)
class Assembly: def __init__(self): self.name = 'UnnamedAssembly' self.methods = [] self.extern = False self.version = '1.0.0.0' self.hashAlgorithm = None self.customAttributes = [] self.classes = []
class Assembly: def __init__(self): self.name = 'UnnamedAssembly' self.methods = [] self.extern = False self.version = '1.0.0.0' self.hashAlgorithm = None self.customAttributes = [] self.classes = []
# -*- coding: utf-8 -*- class NotNullFieldError(Exception): pass class TooLargeContent(Exception): pass class NoDateTimeGiven(Exception): pass class NoBooleanGiven(Exception): pass class NoListOrTupleGiven(Exception): pass
class Notnullfielderror(Exception): pass class Toolargecontent(Exception): pass class Nodatetimegiven(Exception): pass class Nobooleangiven(Exception): pass class Nolistortuplegiven(Exception): pass
#!/usr/bin/env python3 for _ in range(int(input())): n = int(input()) # https://www.wolframalpha.com/input/?i=sum_k%3D(n(n-1)%2B1)%5E(n(n-1)%2B2n)+k print(n * (n * n * 2 + 1))
for _ in range(int(input())): n = int(input()) print(n * (n * n * 2 + 1))
class A(object): def __init__(self, b): self.b = b def a(self): print(self.b) A(2).a()
class A(object): def __init__(self, b): self.b = b def a(self): print(self.b) a(2).a()
# AUTOGENERATED BY NBDEV! DO NOT EDIT! __all__ = ["index", "modules", "custom_doc_links", "git_url"] index = {"unhex": "defaults.ipynb", "unimplemented": "defaults.ipynb", "list_to_indexdir": "factory.ipynb", "create_model": "factory.ipynb", "assemble_sunspec_model": "factory.ipynb", "assemble": "factory.ipynb", "ShadowSunspecEncoder": "factory.ipynb", "NAMESPACE": "factory.ipynb", "encode": "factory.ipynb", "ExampleValue": "values.ipynb", "ExampleValues": "values.ipynb", "get_point_value": "values.ipynb", "ShadowSunspecValueEncoder": "values.ipynb", "example_device": "values.ipynb", "ev": "values.ipynb", "example_values": "values.ipynb", "READONLY": "factory.ipynb", "WRITEABLE": "factory.ipynb", "GeneralSunspecEncoder": "factory.ipynb", "TelemetrySunspecEncoder": "factory.ipynb"} modules = ["defaults.py", "factory.py", "values.py"] doc_url = "https://WilliamG.github.io/shadowsunspec/" git_url = "https://github.com/WilliamG/shadowsunspec/tree/master/" def custom_doc_links(name): return None
__all__ = ['index', 'modules', 'custom_doc_links', 'git_url'] index = {'unhex': 'defaults.ipynb', 'unimplemented': 'defaults.ipynb', 'list_to_indexdir': 'factory.ipynb', 'create_model': 'factory.ipynb', 'assemble_sunspec_model': 'factory.ipynb', 'assemble': 'factory.ipynb', 'ShadowSunspecEncoder': 'factory.ipynb', 'NAMESPACE': 'factory.ipynb', 'encode': 'factory.ipynb', 'ExampleValue': 'values.ipynb', 'ExampleValues': 'values.ipynb', 'get_point_value': 'values.ipynb', 'ShadowSunspecValueEncoder': 'values.ipynb', 'example_device': 'values.ipynb', 'ev': 'values.ipynb', 'example_values': 'values.ipynb', 'READONLY': 'factory.ipynb', 'WRITEABLE': 'factory.ipynb', 'GeneralSunspecEncoder': 'factory.ipynb', 'TelemetrySunspecEncoder': 'factory.ipynb'} modules = ['defaults.py', 'factory.py', 'values.py'] doc_url = 'https://WilliamG.github.io/shadowsunspec/' git_url = 'https://github.com/WilliamG/shadowsunspec/tree/master/' def custom_doc_links(name): return None
myString="UHHHHHH HMMMMMM HMM" myStringLength=len(myString) print(myStringLength)
my_string = 'UHHHHHH HMMMMMM HMM' my_string_length = len(myString) print(myStringLength)
# default configuration values questions = { "number_of_options": 4, "number_show_lines": 4 } printing = { "line_width": 20 }
questions = {'number_of_options': 4, 'number_show_lines': 4} printing = {'line_width': 20}
async def example(): await channel.put(json.dumps({ 'text': data.text, 'image': image, 'username': data.user.screen_name, }))
async def example(): await channel.put(json.dumps({'text': data.text, 'image': image, 'username': data.user.screen_name}))
print('Welcome to your Fitness Guide!') arm_ne = ['arms circle', 'tricep dips', 'push-ups', 'body saw'] back_ne = ['superman','plank', 'reverse snow angels', 'aquaman' ] shoulder_ne = ['plank tap', 'side plank with lateral raise', 'crab walk', 'incline push-up' ] abs_ne = ['mountain climber twist', 'plank up', 'bicycle crunch', 'reverse crunch'] arm_e = ['biceps curls', 'triceps kickback', 'overhead extension', 'ches press'] shoulder_e = ['dumbell side raises', 'dumbbell shoulder press', ' dumbell front raise', 'bent over side raises'] back_e = ['Dumbbell Upright Row', 'Dumbbell Renegade Row', 'Alternating Bent-Over Row', 'Kneeling One Arm Row'] abs_e = ['swing', 'side bend', 'russian twist', 'wood chop'] leg_ne = 'side lunges' + '\n' + 'curtsy lunges' + '\n' + 'side leg raises each leg' + '\n'+ 'bodyweight squats' + '\n' + 'Bulgarian Split Squats' glutes_ne = ['zumo squats', 'glute bridge', 'reverse lunge', 'jumping lunge', 'jump squat' ] leg_e = [ 'dumbell lunge', 'dumbell side lunge', 'dumbell deadlift', 'dumbell cald raises', 'goblet squat'] glutes_e = [ 'dumbell Squat to Lateral Leg Lift', 'dumbell sumo squat', 'weighted glute bridge', 'weighted donkey kick'] lower_cardio = [ 'high knees', 'side to side shuffle', 'jumping squat,', 'squat knee to elbow'] upper_cardio = [ 'shadowboxing,', 'mountain climbers', 'jumpink jacks', 'burpees' ] def fitness_guide(): workout_time = 0 equipment = input('Please enter yes or no for equipment: ') while workout_time <2: if equipment.lower() == 'yes': workout_time += 1 target_body = input('Please choose upperbody or lowerbody: ') if target_body.lower() == 'upperbody': area_p = input('Choose which area: ') if area_p.lower() == 'arm' or 'arms': print(arm_e, '10 - 12 times each exercise, 4 sets') elif area_p.lower() == 'shoulder' or 'shoulders': print(shoulder_e, '10 - 12 times exercise, 4 sets') elif area_p.lower() == 'back': print(back_e, '10 - 15 times each exercise, 4 sets') elif area_p.lower() == 'abs': print(abs_e, '10 - 12 times each exercise, 4 sets') elif target_body.lower() == 'lowerbody': area_p = input('Choose which area:') if area_p.lower() == 'leg' or 'legs': print(leg_e, '12 - 18 times each exercise, 4 sets') elif area_p.lower() == 'glutes': print(glutes_e, '15 - 18 times each exercise, 4 sets') elif equipment.lower() == 'no': workout_time += 1 target_body = input('Please choose upperbody or lowerbody: ') if target_body.lower() == 'upperbody': area_p = input('Choose which area: ') if area_p.lower() == 'arm'or 'arms': print(arm_ne, ' 12 - 15 times each exercise, 4 sets') elif area_p.lower() == 'shoulder' or 'shoulders': print(shoulder_ne, '12 - 15 times each exercise, 4 sets') elif area_p.lower() == 'back': print(back_ne, ' 12 - 15 times each exercise, 5 sets') elif area_p.lower() == 'abs': print(abs_ne, ' 13 - 16 times each exercise, 4 sets') elif target_body.lower() == 'lowerbody': area_p = input('Choose which area: ') if area_p.lower() == 'leg' or 'legs': print(leg_ne +' 15 - 20 times each exercise, 5 sets') elif area_p.lower() == 'glutes': print(glutes_ne, ' 15 - 18 times each exercise, 4 sets') fitness_guide()
print('Welcome to your Fitness Guide!') arm_ne = ['arms circle', 'tricep dips', 'push-ups', 'body saw'] back_ne = ['superman', 'plank', 'reverse snow angels', 'aquaman'] shoulder_ne = ['plank tap', 'side plank with lateral raise', 'crab walk', 'incline push-up'] abs_ne = ['mountain climber twist', 'plank up', 'bicycle crunch', 'reverse crunch'] arm_e = ['biceps curls', 'triceps kickback', 'overhead extension', 'ches press'] shoulder_e = ['dumbell side raises', 'dumbbell shoulder press', ' dumbell front raise', 'bent over side raises'] back_e = ['Dumbbell Upright Row', 'Dumbbell Renegade Row', 'Alternating Bent-Over Row', 'Kneeling One Arm Row'] abs_e = ['swing', 'side bend', 'russian twist', 'wood chop'] leg_ne = 'side lunges' + '\n' + 'curtsy lunges' + '\n' + 'side leg raises each leg' + '\n' + 'bodyweight squats' + '\n' + 'Bulgarian Split Squats' glutes_ne = ['zumo squats', 'glute bridge', 'reverse lunge', 'jumping lunge', 'jump squat'] leg_e = ['dumbell lunge', 'dumbell side lunge', 'dumbell deadlift', 'dumbell cald raises', 'goblet squat'] glutes_e = ['dumbell Squat to Lateral Leg Lift', 'dumbell sumo squat', 'weighted glute bridge', 'weighted donkey kick'] lower_cardio = ['high knees', 'side to side shuffle', 'jumping squat,', 'squat knee to elbow'] upper_cardio = ['shadowboxing,', 'mountain climbers', 'jumpink jacks', 'burpees'] def fitness_guide(): workout_time = 0 equipment = input('Please enter yes or no for equipment: ') while workout_time < 2: if equipment.lower() == 'yes': workout_time += 1 target_body = input('Please choose upperbody or lowerbody: ') if target_body.lower() == 'upperbody': area_p = input('Choose which area: ') if area_p.lower() == 'arm' or 'arms': print(arm_e, '10 - 12 times each exercise, 4 sets') elif area_p.lower() == 'shoulder' or 'shoulders': print(shoulder_e, '10 - 12 times exercise, 4 sets') elif area_p.lower() == 'back': print(back_e, '10 - 15 times each exercise, 4 sets') elif area_p.lower() == 'abs': print(abs_e, '10 - 12 times each exercise, 4 sets') elif target_body.lower() == 'lowerbody': area_p = input('Choose which area:') if area_p.lower() == 'leg' or 'legs': print(leg_e, '12 - 18 times each exercise, 4 sets') elif area_p.lower() == 'glutes': print(glutes_e, '15 - 18 times each exercise, 4 sets') elif equipment.lower() == 'no': workout_time += 1 target_body = input('Please choose upperbody or lowerbody: ') if target_body.lower() == 'upperbody': area_p = input('Choose which area: ') if area_p.lower() == 'arm' or 'arms': print(arm_ne, ' 12 - 15 times each exercise, 4 sets') elif area_p.lower() == 'shoulder' or 'shoulders': print(shoulder_ne, '12 - 15 times each exercise, 4 sets') elif area_p.lower() == 'back': print(back_ne, ' 12 - 15 times each exercise, 5 sets') elif area_p.lower() == 'abs': print(abs_ne, ' 13 - 16 times each exercise, 4 sets') elif target_body.lower() == 'lowerbody': area_p = input('Choose which area: ') if area_p.lower() == 'leg' or 'legs': print(leg_ne + ' 15 - 20 times each exercise, 5 sets') elif area_p.lower() == 'glutes': print(glutes_ne, ' 15 - 18 times each exercise, 4 sets') fitness_guide()
def main(): n = int(input()) for i in range(n): a = int(input()) b = set([int(x) for x in input().split()]) if (max(b) - min(b)) < len(b): print("YES") else: print("NO") if __name__ == '__main__': main()
def main(): n = int(input()) for i in range(n): a = int(input()) b = set([int(x) for x in input().split()]) if max(b) - min(b) < len(b): print('YES') else: print('NO') if __name__ == '__main__': main()
''' n Python, we can pass a variable number of arguments to a function using special symbols. There are two special symbols: *args (Non Keyword Arguments) **kwargs (Keyword Arguments) We use *args and **kwargs as an argument when we are unsure about the number of arguments to pass in the functions. ''' def func(a,b,c,d): return sum((a,b,c,d))*0.18 print(func(12,14,45,12)) # when we don't know th number of arguments that user is going to enter then we use # args there it allows us to set an arbitrary amount of arguments # all the variables will be inserted into the tuple and the action will be performed on the tuple as a whole def func1(*args): return sum(args) * 0.18 print(func1(2323,344,534,6,7,567867,878,989,980,980)) def func1(*args): for i in args: print(i) print(func1(2323,344,534,6,7,567867,878,989,980,980)) # kwargs allows us to add a keyword argument # kwargs returns back a dictionary def func3(**kwargs): if 'fruit' in kwargs: print(f"My fruit of choice is {kwargs['fruit']}") else: print("I did not found any fruits") print(func3(fruit="apple",car="aston martin",color="red",band="maroon 5")) # Wec can use different words for args and kwargs. But args and kwargs are prefred as per the convention. # Combination of both args and kwargs def combo(*args,**kwargs): print(args) # List print(kwargs) # Dictionary print(f"These are best combinations {args[0]},{kwargs['food']}") print(combo(87,4,5,food='apple',color='red',watch='casio'))
""" n Python, we can pass a variable number of arguments to a function using special symbols. There are two special symbols: *args (Non Keyword Arguments) **kwargs (Keyword Arguments) We use *args and **kwargs as an argument when we are unsure about the number of arguments to pass in the functions. """ def func(a, b, c, d): return sum((a, b, c, d)) * 0.18 print(func(12, 14, 45, 12)) def func1(*args): return sum(args) * 0.18 print(func1(2323, 344, 534, 6, 7, 567867, 878, 989, 980, 980)) def func1(*args): for i in args: print(i) print(func1(2323, 344, 534, 6, 7, 567867, 878, 989, 980, 980)) def func3(**kwargs): if 'fruit' in kwargs: print(f"My fruit of choice is {kwargs['fruit']}") else: print('I did not found any fruits') print(func3(fruit='apple', car='aston martin', color='red', band='maroon 5')) def combo(*args, **kwargs): print(args) print(kwargs) print(f"These are best combinations {args[0]},{kwargs['food']}") print(combo(87, 4, 5, food='apple', color='red', watch='casio'))
args_count = {'documentclass':(1, 1), 'usepackage':(1, 1), 'title':(1, 0), 'author':(1, 0), 'date':(1, 0), 'color':(1, 0), 'input':(1, 0), 'part':(1, 0), 'chapter':(1, 1), 'section':(1, 1), 'subsection':(1, 1), 'subsubsection':(1, 1), 'paragraph':(1, 1), 'subparagraph':(1, 1), 'chapter*':(1, 1), 'section*':(1, 1), 'subsection*':(1, 1), 'subsubsection*':(1, 1), 'paragraph*':(1, 1), 'subparagraph*':(1, 1), 'setcounter':(2, 0), 'addcontentsline':(3, 0), 'linespread':(1, 0), 'mbox':(1, 0), 'hyphenation':(1, 0), 'todo':(1, 0), 'begin':(1, 0), 'end':(1, 0), 'emph':(1, 0), 'renewcommand':(2, 0), 'left':(1, 0), 'right':(1, 0), 'verb':(1, 0), 'frac':(2, 0), 'textsubscript':(1, 0), 'textsuperscript':(1, 0), 'hspace':(1, 0), 'vspace':(1, 0), 'setlength':(2, 0), 'textcolor':(2, 0), 'pagecolor':(1, 0), 'colorbox':(2, 0), 'fcolorbox':(3, 0), 'textit':(1, 0), 'textbf':(1, 0), 'textrm':(1, 0), 'textsf':(1, 0), 'texttt':(1, 0), 'textup':(1, 0), 'textsl':(1, 0), 'textsc':(1, 0), 'textmd':(1, 0), 'textlf':(1, 0), 'upperaces':(1, 0), 'underline':(1, 0), 'textnormal':(1, 0), 'emph':(1, 0), 'fontsize':(2, 0), 'setmainfont':(1, 1), 'setsansfont':(1, 1), 'addfontfeatures':(1, 0), 'item': (0,1), 'inputencoding': (1,0), 'url':(1,0), 'hat':(1, 0), 'widehat':(1, 0), 'check':(1, 0), 'tilde':(1, 0), 'widetilde':(1, 0), 'acute':(1, 0), 'grave':(1, 0), 'dot':(1, 0), 'ddot':(1, 0), 'breve':(1, 0), 'bar':(1, 0), 'vec':(1, 0), 'resizebox':(3,0), 'scalebox':(2,0), 'cline':(1,0), 'cellcolor':(1,1), 'caption':(1,0), 'includegraphics':(1,1), 'sqrt':(1,1), 'mathrm':(1,0), 'substack':(1,0), } env_opts = {'figure': (0, 1), 'array': (1, 1), 'minipage': (2, 0), 'tabular': (1, 1), 'spacing':(1, 0), 'turn':(1, 0), 'rotate':(1, 0), 'table':(0, 1), 'wrapfigure':(2, 0), 'subfigure':(1, 1),} shortcuts = [('\\-', '\u00AD'), ('---', '\u2014'), ('~', '\u00A0'), ('"=', '\u2010')] verb_tags = ['verb'] verb_envs = ['verbatim', 'alltt', 'lstlisting', 'listing']
args_count = {'documentclass': (1, 1), 'usepackage': (1, 1), 'title': (1, 0), 'author': (1, 0), 'date': (1, 0), 'color': (1, 0), 'input': (1, 0), 'part': (1, 0), 'chapter': (1, 1), 'section': (1, 1), 'subsection': (1, 1), 'subsubsection': (1, 1), 'paragraph': (1, 1), 'subparagraph': (1, 1), 'chapter*': (1, 1), 'section*': (1, 1), 'subsection*': (1, 1), 'subsubsection*': (1, 1), 'paragraph*': (1, 1), 'subparagraph*': (1, 1), 'setcounter': (2, 0), 'addcontentsline': (3, 0), 'linespread': (1, 0), 'mbox': (1, 0), 'hyphenation': (1, 0), 'todo': (1, 0), 'begin': (1, 0), 'end': (1, 0), 'emph': (1, 0), 'renewcommand': (2, 0), 'left': (1, 0), 'right': (1, 0), 'verb': (1, 0), 'frac': (2, 0), 'textsubscript': (1, 0), 'textsuperscript': (1, 0), 'hspace': (1, 0), 'vspace': (1, 0), 'setlength': (2, 0), 'textcolor': (2, 0), 'pagecolor': (1, 0), 'colorbox': (2, 0), 'fcolorbox': (3, 0), 'textit': (1, 0), 'textbf': (1, 0), 'textrm': (1, 0), 'textsf': (1, 0), 'texttt': (1, 0), 'textup': (1, 0), 'textsl': (1, 0), 'textsc': (1, 0), 'textmd': (1, 0), 'textlf': (1, 0), 'upperaces': (1, 0), 'underline': (1, 0), 'textnormal': (1, 0), 'emph': (1, 0), 'fontsize': (2, 0), 'setmainfont': (1, 1), 'setsansfont': (1, 1), 'addfontfeatures': (1, 0), 'item': (0, 1), 'inputencoding': (1, 0), 'url': (1, 0), 'hat': (1, 0), 'widehat': (1, 0), 'check': (1, 0), 'tilde': (1, 0), 'widetilde': (1, 0), 'acute': (1, 0), 'grave': (1, 0), 'dot': (1, 0), 'ddot': (1, 0), 'breve': (1, 0), 'bar': (1, 0), 'vec': (1, 0), 'resizebox': (3, 0), 'scalebox': (2, 0), 'cline': (1, 0), 'cellcolor': (1, 1), 'caption': (1, 0), 'includegraphics': (1, 1), 'sqrt': (1, 1), 'mathrm': (1, 0), 'substack': (1, 0)} env_opts = {'figure': (0, 1), 'array': (1, 1), 'minipage': (2, 0), 'tabular': (1, 1), 'spacing': (1, 0), 'turn': (1, 0), 'rotate': (1, 0), 'table': (0, 1), 'wrapfigure': (2, 0), 'subfigure': (1, 1)} shortcuts = [('\\-', '\xad'), ('---', '—'), ('~', '\xa0'), ('"=', '‐')] verb_tags = ['verb'] verb_envs = ['verbatim', 'alltt', 'lstlisting', 'listing']
#!/usr/bin/env python3 s = input() n = 0 base = 2 i = 0 while i < len(s): n = (base * n) + int(s[i]) i = i + 1 print(n)
s = input() n = 0 base = 2 i = 0 while i < len(s): n = base * n + int(s[i]) i = i + 1 print(n)
class Node: def __init__(self, value): self.value = value self.next = None class LinkedList: def __init__(self): self.head = None def add(self, value): node = Node(value) if not self.head: self.head = node else: current = self.head while current.next: current = current.next current.next = node def display(self): output = [] # traverse linked list and add to output current = self.head while current: output.append(current.value) current = current.next return output
class Node: def __init__(self, value): self.value = value self.next = None class Linkedlist: def __init__(self): self.head = None def add(self, value): node = node(value) if not self.head: self.head = node else: current = self.head while current.next: current = current.next current.next = node def display(self): output = [] current = self.head while current: output.append(current.value) current = current.next return output
size(800, 800) background(255) smooth() fill(86, 135, 174, 175) noStroke() # Verschiebe Nullpunkt des Koordinatensystems von der Ecke links oben des # grafischen Ausgabefensters ins Zentrum. translate(width / 2, height / 2) radius = 350.0 for i in range(0, 8): arc(radius / 2, 0.0, radius, radius, 0, PI) rotate(PI / 4.0)
size(800, 800) background(255) smooth() fill(86, 135, 174, 175) no_stroke() translate(width / 2, height / 2) radius = 350.0 for i in range(0, 8): arc(radius / 2, 0.0, radius, radius, 0, PI) rotate(PI / 4.0)
class KStacks(): def __init__(self, k, capacity): self.nextAvailable = 0 self.data = [0] * capacity self.front = [-1] * k self.rear = [-1] * k self.nextIndex = [i+1 for i in range(capacity)] self.nextIndex[capacity-1] = -1 def isFull(self): return self.nextAvailable == -1 def isEmpty(self, k): return self.front[k] == -1 def enqueue(self, k, data): if self.isFull(): return nextFree = self.nextIndex[self.nextAvailable] if self.isEmpty(k): self.front[k] = self.rear[k] = self.nextAvailable else: self.rear[k] = self.nextAvailable self.nextIndex[ self.front[k] ] = self.nextAvailable self.nextIndex[self.nextAvailable] = -1 self.data[ self.nextAvailable ] = data self.nextAvailable = nextFree def dequeue(self, k): if self.isEmpty(k): return None fetch_index = self.front[k] ret_data = self.data[fetch_index] self.front[k] = self.nextIndex[fetch_index] self.nextIndex[fetch_index] = self.nextAvailable self.nextAvailable = fetch_index return ret_data if __name__ == '__main__': k_stack = KStacks(3, 4) k_stack.enqueue(0, 10) k_stack.enqueue(1, 20) k_stack.enqueue(2, 30) k_stack.enqueue(0, 40) k_stack.enqueue(1, 50) k_stack.dequeue(0) k_stack.dequeue(1)
class Kstacks: def __init__(self, k, capacity): self.nextAvailable = 0 self.data = [0] * capacity self.front = [-1] * k self.rear = [-1] * k self.nextIndex = [i + 1 for i in range(capacity)] self.nextIndex[capacity - 1] = -1 def is_full(self): return self.nextAvailable == -1 def is_empty(self, k): return self.front[k] == -1 def enqueue(self, k, data): if self.isFull(): return next_free = self.nextIndex[self.nextAvailable] if self.isEmpty(k): self.front[k] = self.rear[k] = self.nextAvailable else: self.rear[k] = self.nextAvailable self.nextIndex[self.front[k]] = self.nextAvailable self.nextIndex[self.nextAvailable] = -1 self.data[self.nextAvailable] = data self.nextAvailable = nextFree def dequeue(self, k): if self.isEmpty(k): return None fetch_index = self.front[k] ret_data = self.data[fetch_index] self.front[k] = self.nextIndex[fetch_index] self.nextIndex[fetch_index] = self.nextAvailable self.nextAvailable = fetch_index return ret_data if __name__ == '__main__': k_stack = k_stacks(3, 4) k_stack.enqueue(0, 10) k_stack.enqueue(1, 20) k_stack.enqueue(2, 30) k_stack.enqueue(0, 40) k_stack.enqueue(1, 50) k_stack.dequeue(0) k_stack.dequeue(1)
# Copyright The Cloud Custodian Authors. # SPDX-License-Identifier: Apache-2.0 ResourceMap = { "k8s.config-map": "c7n_kube.resources.core.configmap.ConfigMap", "k8s.custom-cluster-resource": "c7n_kube.resources.crd.CustomResourceDefinition", "k8s.custom-namespaced-resource": "c7n_kube.resources.crd.CustomNamespacedResourceDefinition", "k8s.daemon-set": "c7n_kube.resources.apps.daemonset.DaemonSet", "k8s.deployment": "c7n_kube.resources.apps.deployment.Deployment", "k8s.namespace": "c7n_kube.resources.core.namespace.Namespace", "k8s.node": "c7n_kube.resources.core.node.Node", "k8s.pod": "c7n_kube.resources.core.pod.Pod", "k8s.replica-set": "c7n_kube.resources.apps.replicaset.ReplicaSet", "k8s.replication-controller": ( "c7n_kube.resources.core.replicationcontroller.ReplicationController"), "k8s.secret": "c7n_kube.resources.core.secret.Secret", "k8s.service": "c7n_kube.resources.core.service.Service", "k8s.service-account": "c7n_kube.resources.core.serviceaccount.ServiceAccount", "k8s.stateful-set": "c7n_kube.resources.apps.statefulset.StatefulSet", "k8s.volume": "c7n_kube.resources.core.volume.PersistentVolume", "k8s.volume-claim": "c7n_kube.resources.core.volume.PersistentVolumeClaim" }
resource_map = {'k8s.config-map': 'c7n_kube.resources.core.configmap.ConfigMap', 'k8s.custom-cluster-resource': 'c7n_kube.resources.crd.CustomResourceDefinition', 'k8s.custom-namespaced-resource': 'c7n_kube.resources.crd.CustomNamespacedResourceDefinition', 'k8s.daemon-set': 'c7n_kube.resources.apps.daemonset.DaemonSet', 'k8s.deployment': 'c7n_kube.resources.apps.deployment.Deployment', 'k8s.namespace': 'c7n_kube.resources.core.namespace.Namespace', 'k8s.node': 'c7n_kube.resources.core.node.Node', 'k8s.pod': 'c7n_kube.resources.core.pod.Pod', 'k8s.replica-set': 'c7n_kube.resources.apps.replicaset.ReplicaSet', 'k8s.replication-controller': 'c7n_kube.resources.core.replicationcontroller.ReplicationController', 'k8s.secret': 'c7n_kube.resources.core.secret.Secret', 'k8s.service': 'c7n_kube.resources.core.service.Service', 'k8s.service-account': 'c7n_kube.resources.core.serviceaccount.ServiceAccount', 'k8s.stateful-set': 'c7n_kube.resources.apps.statefulset.StatefulSet', 'k8s.volume': 'c7n_kube.resources.core.volume.PersistentVolume', 'k8s.volume-claim': 'c7n_kube.resources.core.volume.PersistentVolumeClaim'}
def capitalize_title(title): pass def check_sentence_ending(sentence): pass def remove_extra_spaces(sentence): pass def replace_word_choice(sentence, new_word, old_word): pass
def capitalize_title(title): pass def check_sentence_ending(sentence): pass def remove_extra_spaces(sentence): pass def replace_word_choice(sentence, new_word, old_word): pass
TASK_NAME = 'NERTaggingTask' JS_ASSETS = [''] JS_ASSETS_OUTPUT = 'scripts/vulyk-ner.js' JS_ASSETS_FILTERS = 'yui_js' CSS_ASSETS = [''] CSS_ASSETS_OUTPUT = 'styles/vulyk-ner.css' CSS_ASSETS_FILTERS = 'yui_css'
task_name = 'NERTaggingTask' js_assets = [''] js_assets_output = 'scripts/vulyk-ner.js' js_assets_filters = 'yui_js' css_assets = [''] css_assets_output = 'styles/vulyk-ner.css' css_assets_filters = 'yui_css'
# # Example file for working with conditional statements # def main(): x, y = 10, 100 # conditional flow uses if, elif, else if x<y: print("x is less than y") elif x>y: print("x is more than y") else: print("x is equal to y") # conditional statements let you use "a if C else b" print("x is less than y" if (x<y) else "x is more than y") if __name__ == "__main__": main()
def main(): (x, y) = (10, 100) if x < y: print('x is less than y') elif x > y: print('x is more than y') else: print('x is equal to y') print('x is less than y' if x < y else 'x is more than y') if __name__ == '__main__': main()
test = [1, "dog", (("tost", "tost1"), ("test", "test1")), 'c', 4, 'cat'] def mysort(eleme): if type(eleme) == int: return str(eleme) else: return eleme print(test[2][0][1]) # print(c) # print(test.count(self))
test = [1, 'dog', (('tost', 'tost1'), ('test', 'test1')), 'c', 4, 'cat'] def mysort(eleme): if type(eleme) == int: return str(eleme) else: return eleme print(test[2][0][1])
patches = [ # backwards compatibility { "op": "move", "from": "/PropertyTypes/AWS::CodeCommit::Repository.RepositoryTrigger", "path": "/PropertyTypes/AWS::CodeCommit::Repository.Trigger", }, { "op": "replace", "path": "/ResourceTypes/AWS::CodeCommit::Repository/Properties/Triggers/ItemType", "value": "Trigger", }, ]
patches = [{'op': 'move', 'from': '/PropertyTypes/AWS::CodeCommit::Repository.RepositoryTrigger', 'path': '/PropertyTypes/AWS::CodeCommit::Repository.Trigger'}, {'op': 'replace', 'path': '/ResourceTypes/AWS::CodeCommit::Repository/Properties/Triggers/ItemType', 'value': 'Trigger'}]
#!/usr/bin/env python3 _min, c = 7856, 0 for i in range(4855, 7856): if i % 8 == 0 and i % 19 == 0 and i % 7 != 0 and i % 16 != 0 and i % 24 != 0 and i % 26 != 0: _min = min(_min, i) c += 1 print(c, _min)
(_min, c) = (7856, 0) for i in range(4855, 7856): if i % 8 == 0 and i % 19 == 0 and (i % 7 != 0) and (i % 16 != 0) and (i % 24 != 0) and (i % 26 != 0): _min = min(_min, i) c += 1 print(c, _min)
def replace_links(course_id,links,title): new_links = [] for link in links: split_href = link['href'].split('dev.brightspace.com') if course_id in split_href[1]: my_href = 'data/rubrics%s.json'%split_href[1].replace(course_id,title) else: my_href = 'data/rubrics%s.json'%split_href[1] link['href'] = my_href new_links.append(link) return new_links def replace_all_links_in_json(course_id,json_data,title): def replace_links_callback(input): if type(input) is dict: for k,v in input.items(): if k == 'links': new_links = replace_links(course_id,v,title) input[k] = new_links return input return traverse_object(json_data,callback = replace_links_callback) def traverse_object(given_object,callback = None): if type(given_object) is dict: value = {k:traverse_object(v,callback) for k,v in given_object.items()} elif type(given_object) is list: value = [traverse_object(element,callback) for element in given_object] else: value = given_object if callback is None: return value else: return callback(value)
def replace_links(course_id, links, title): new_links = [] for link in links: split_href = link['href'].split('dev.brightspace.com') if course_id in split_href[1]: my_href = 'data/rubrics%s.json' % split_href[1].replace(course_id, title) else: my_href = 'data/rubrics%s.json' % split_href[1] link['href'] = my_href new_links.append(link) return new_links def replace_all_links_in_json(course_id, json_data, title): def replace_links_callback(input): if type(input) is dict: for (k, v) in input.items(): if k == 'links': new_links = replace_links(course_id, v, title) input[k] = new_links return input return traverse_object(json_data, callback=replace_links_callback) def traverse_object(given_object, callback=None): if type(given_object) is dict: value = {k: traverse_object(v, callback) for (k, v) in given_object.items()} elif type(given_object) is list: value = [traverse_object(element, callback) for element in given_object] else: value = given_object if callback is None: return value else: return callback(value)
pattern = r'</?p>' for p in re.split(pattern, TEXT): if p.startswith('We choose to go to the moon'): result = p
pattern = '</?p>' for p in re.split(pattern, TEXT): if p.startswith('We choose to go to the moon'): result = p
# Copyright 2021 san kim # # 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. _NE_TAGS = [ 'PS', # PERSON 'LC', # LOCATION 'OG', # ORGANIZATION 'DT', # DATE 'TI', # TIME 'QT', # QUANTITY 'AF', # ARTIFACT 'CV', # CIVILIZATION 'AM', # ANIMAL 'PT', # PLANT 'FD', # STUDY_FIELD 'TR', # THEORY 'EV', # EVENT 'MT', # MATERIAL 'TM' # TERM ] _NE_IOB2_TAGS = [ 'O', 'B-PS', # PERSON 'I-PS', # PERSON 'B-LC', # LOCATION 'I-LC', # LOCATION 'B-OG', # ORGANIZATION 'I-OG', # ORGANIZATION 'B-DT', # DATE 'I-DT', # DATE 'B-TI', # TIME 'I-TI', # TIME 'B-QT', # QUANTITY 'I-QT', # QUANTITY 'B-AF', # ARTIFACT 'I-AF', # ARTIFACT 'B-CV', # CIVILIZATION 'I-CV', # CIVILIZATION 'B-AM', # ANIMAL 'I-AM', # ANIMAL 'B-PT', # PLANT 'I-PT', # PLANT 'B-FD', # STUDY_FIELD 'I-FD', # STUDY_FIELD 'B-TR', # THEORY 'I-TR', # THEORY 'B-EV', # EVENT 'I-EV', # EVENT 'B-MT', # MATERIAL 'I-MT', # MATERIAL 'B-TM', # TERM 'I-TM' # TERM ] _COLA_CLASSES = ["unacceptable", "acceptable"] _NE2020_TAGS = [ "PS_NAME", "PS_CHARACTER", "PS_PET", "FD_SCIENCE", "FD_SOCIAL_SCIENCE", "FD_MEDICINE", "FD_ART", "FD_HUMANITIES", "FD_OTHERS", "TR_SCIENCE", "TR_SOCIAL_SCIENCE", "TR_MEDICINE", "TR_ART", "TR_HUMANITIES", "TR_OTHERS", "AF_BUILDING", "AF_CULTURAL_ASSET", "AF_ROAD", "AF_TRANSPORT", "AF_MUSICAL_INSTRUMENT", "AF_WEAPON", "AFA_DOCUMENT", "AFA_PERFORMANCE", "AFA_VIDEO", "AFA_ART_CRAFT", "AFA_MUSIC", "AFW_SERVICE_PRODUCTS", "AFW_OTHER_PRODUCTS", "OGG_ECONOMY", "OGG_EDUCATION", "OGG_MILITARY", "OGG_MEDIA", "OGG_SPORTS", "OGG_ART", "OGG_MEDICINE", "OGG_RELIGION", "OGG_SCIENCE", "OGG_LIBRARY", "OGG_LAW", "OGG_POLITICS", "OGG_FOOD", "OGG_HOTEL", "OGG_OTHERS", "LCP_COUNTRY", "LCP_PROVINCE", "LCP_COUNTY", "LCP_CITY", "LCP_CAPITALCITY", "LCG_RIVER", "LCG_OCEAN", "LCG_BAY", "LCG_MOUNTAIN", "LCG_ISLAND", "LCG_CONTINENT", "LC_SPACE", "LC_OTHERS", "CV_CULTURE", "CV_TRIBE", "CV_LANGUAGE", "CV_POLICY", "CV_LAW", "CV_CURRENCY", "CV_TAX", "CV_FUNDS", "CV_ART", "CV_SPORTS", "CV_SPORTS_POSITION", "CV_SPORTS_INST", "CV_PRIZE", "CV_RELATION", "CV_OCCUPATION", "CV_POSITION", "CV_FOOD", "CV_DRINK", "CV_FOOD_STYLE", "CV_CLOTHING", "CV_BUILDING_TYPE", "DT_DURATION", "DT_DAY", "DT_WEEK", "DT_MONTH", "DT_YEAR", "DT_SEASON", "DT_GEOAGE", "DT_DYNASTY", "DT_OTHERS", "TI_DURATION", "TI_HOUR", "TI_MINUTE", "TI_SECOND", "TI_OTHERS", "QT_AGE", "QT_SIZE", "QT_LENGTH", "QT_COUNT", "QT_MAN_COUNT", "QT_WEIGHT", "QT_PERCENTAGE", "QT_SPEED", "QT_TEMPERATURE", "QT_VOLUME", "QT_ORDER", "QT_PRICE", "QT_PHONE", "QT_SPORTS", "QT_CHANNEL", "QT_ALBUM", "QT_ADDRESS", "QT_OTHERS", "EV_ACTIVITY", "EV_WAR_REVOLUTION", "EV_SPORTS", "EV_FESTIVAL", "EV_OTHERS", "AM_INSECT", "AM_BIRD", "AM_FISH", "AM_MAMMALIA", "AM_AMPHIBIA", "AM_REPTILIA", "AM_TYPE", "AM_PART", "AM_OTHERS", "PT_FRUIT", "PT_FLOWER", "PT_TREE", "PT_GRASS", "PT_TYPE", "PT_PART", "PT_OTHERS", "MT_ELEMENT", "MT_METAL", "MT_ROCK", "MT_CHEMICAL", "TM_COLOR", "TM_DIRECTION", "TM_CLIMATE", "TM_SHAPE", "TM_CELL_TISSUE_ORGAN", "TMM_DISEASE", "TMM_DRUG", "TMI_HW", "TMI_SW", "TMI_SITE", "TMI_EMAIL", "TMI_MODEL", "TMI_SERVICE", "TMI_PROJECT", "TMIG_GENRE", "TM_SPORTS" ] _NE2020_IOB2_TAGS = [ "O", "B-PS_NAME", "I-PS_NAME", "B-PS_CHARACTER", "I-PS_CHARACTER", "B-PS_PET", "I-PS_PET", "B-FD_SCIENCE", "I-FD_SCIENCE", "B-FD_SOCIAL_SCIENCE", "I-FD_SOCIAL_SCIENCE", "B-FD_MEDICINE", "I-FD_MEDICINE", "B-FD_ART", "I-FD_ART", "B-FD_HUMANITIES", "I-FD_HUMANITIES", "B-FD_OTHERS", "I-FD_OTHERS", "B-TR_SCIENCE", "I-TR_SCIENCE", "B-TR_SOCIAL_SCIENCE", "I-TR_SOCIAL_SCIENCE", "B-TR_MEDICINE", "I-TR_MEDICINE", "B-TR_ART", "I-TR_ART", "B-TR_HUMANITIES", "I-TR_HUMANITIES", "B-TR_OTHERS", "I-TR_OTHERS", "B-AF_BUILDING", "I-AF_BUILDING", "B-AF_CULTURAL_ASSET", "I-AF_CULTURAL_ASSET", "B-AF_ROAD", "I-AF_ROAD", "B-AF_TRANSPORT", "I-AF_TRANSPORT", "B-AF_MUSICAL_INSTRUMENT", "I-AF_MUSICAL_INSTRUMENT", "B-AF_WEAPON", "I-AF_WEAPON", "B-AFA_DOCUMENT", "I-AFA_DOCUMENT", "B-AFA_PERFORMANCE", "I-AFA_PERFORMANCE", "B-AFA_VIDEO", "I-AFA_VIDEO", "B-AFA_ART_CRAFT", "I-AFA_ART_CRAFT", "B-AFA_MUSIC", "I-AFA_MUSIC", "B-AFW_SERVICE_PRODUCTS", "I-AFW_SERVICE_PRODUCTS", "B-AFW_OTHER_PRODUCTS", "I-AFW_OTHER_PRODUCTS", "B-OGG_ECONOMY", "I-OGG_ECONOMY", "B-OGG_EDUCATION", "I-OGG_EDUCATION", "B-OGG_MILITARY", "I-OGG_MILITARY", "B-OGG_MEDIA", "I-OGG_MEDIA", "B-OGG_SPORTS", "I-OGG_SPORTS", "B-OGG_ART", "I-OGG_ART", "B-OGG_MEDICINE", "I-OGG_MEDICINE", "B-OGG_RELIGION", "I-OGG_RELIGION", "B-OGG_SCIENCE", "I-OGG_SCIENCE", "B-OGG_LIBRARY", "I-OGG_LIBRARY", "B-OGG_LAW", "I-OGG_LAW", "B-OGG_POLITICS", "I-OGG_POLITICS", "B-OGG_FOOD", "I-OGG_FOOD", "B-OGG_HOTEL", "I-OGG_HOTEL", "B-OGG_OTHERS", "I-OGG_OTHERS", "B-LCP_COUNTRY", "I-LCP_COUNTRY", "B-LCP_PROVINCE", "I-LCP_PROVINCE", "B-LCP_COUNTY", "I-LCP_COUNTY", "B-LCP_CITY", "I-LCP_CITY", "B-LCP_CAPITALCITY", "I-LCP_CAPITALCITY", "B-LCG_RIVER", "I-LCG_RIVER", "B-LCG_OCEAN", "I-LCG_OCEAN", "B-LCG_BAY", "I-LCG_BAY", "B-LCG_MOUNTAIN", "I-LCG_MOUNTAIN", "B-LCG_ISLAND", "I-LCG_ISLAND", "B-LCG_CONTINENT", "I-LCG_CONTINENT", "B-LC_SPACE", "I-LC_SPACE", "B-LC_OTHERS", "I-LC_OTHERS", "B-CV_CULTURE", "I-CV_CULTURE", "B-CV_TRIBE", "I-CV_TRIBE", "B-CV_LANGUAGE", "I-CV_LANGUAGE", "B-CV_POLICY", "I-CV_POLICY", "B-CV_LAW", "I-CV_LAW", "B-CV_CURRENCY", "I-CV_CURRENCY", "B-CV_TAX", "I-CV_TAX", "B-CV_FUNDS", "I-CV_FUNDS", "B-CV_ART", "I-CV_ART", "B-CV_SPORTS", "I-CV_SPORTS", "B-CV_SPORTS_POSITION", "I-CV_SPORTS_POSITION", "B-CV_SPORTS_INST", "I-CV_SPORTS_INST", "B-CV_PRIZE", "I-CV_PRIZE", "B-CV_RELATION", "I-CV_RELATION", "B-CV_OCCUPATION", "I-CV_OCCUPATION", "B-CV_POSITION", "I-CV_POSITION", "B-CV_FOOD", "I-CV_FOOD", "B-CV_DRINK", "I-CV_DRINK", "B-CV_FOOD_STYLE", "I-CV_FOOD_STYLE", "B-CV_CLOTHING", "I-CV_CLOTHING", "B-CV_BUILDING_TYPE", "I-CV_BUILDING_TYPE", "B-DT_DURATION", "I-DT_DURATION", "B-DT_DAY", "I-DT_DAY", "B-DT_WEEK", "I-DT_WEEK", "B-DT_MONTH", "I-DT_MONTH", "B-DT_YEAR", "I-DT_YEAR", "B-DT_SEASON", "I-DT_SEASON", "B-DT_GEOAGE", "I-DT_GEOAGE", "B-DT_DYNASTY", "I-DT_DYNASTY", "B-DT_OTHERS", "I-DT_OTHERS", "B-TI_DURATION", "I-TI_DURATION", "B-TI_HOUR", "I-TI_HOUR", "B-TI_MINUTE", "I-TI_MINUTE", "B-TI_SECOND", "I-TI_SECOND", "B-TI_OTHERS", "I-TI_OTHERS", "B-QT_AGE", "I-QT_AGE", "B-QT_SIZE", "I-QT_SIZE", "B-QT_LENGTH", "I-QT_LENGTH", "B-QT_COUNT", "I-QT_COUNT", "B-QT_MAN_COUNT", "I-QT_MAN_COUNT", "B-QT_WEIGHT", "I-QT_WEIGHT", "B-QT_PERCENTAGE", "I-QT_PERCENTAGE", "B-QT_SPEED", "I-QT_SPEED", "B-QT_TEMPERATURE", "I-QT_TEMPERATURE", "B-QT_VOLUME", "I-QT_VOLUME", "B-QT_ORDER", "I-QT_ORDER", "B-QT_PRICE", "I-QT_PRICE", "B-QT_PHONE", "I-QT_PHONE", "B-QT_SPORTS", "I-QT_SPORTS", "B-QT_CHANNEL", "I-QT_CHANNEL", "B-QT_ALBUM", "I-QT_ALBUM", "B-QT_ADDRESS", "I-QT_ADDRESS", "B-QT_OTHERS", "I-QT_OTHERS", "B-EV_ACTIVITY", "I-EV_ACTIVITY", "B-EV_WAR_REVOLUTION", "I-EV_WAR_REVOLUTION", "B-EV_SPORTS", "I-EV_SPORTS", "B-EV_FESTIVAL", "I-EV_FESTIVAL", "B-EV_OTHERS", "I-EV_OTHERS", "B-AM_INSECT", "I-AM_INSECT", "B-AM_BIRD", "I-AM_BIRD", "B-AM_FISH", "I-AM_FISH", "B-AM_MAMMALIA", "I-AM_MAMMALIA", "B-AM_AMPHIBIA", "I-AM_AMPHIBIA", "B-AM_REPTILIA", "I-AM_REPTILIA", "B-AM_TYPE", "I-AM_TYPE", "B-AM_PART", "I-AM_PART", "B-AM_OTHERS", "I-AM_OTHERS", "B-PT_FRUIT", "I-PT_FRUIT", "B-PT_FLOWER", "I-PT_FLOWER", "B-PT_TREE", "I-PT_TREE", "B-PT_GRASS", "I-PT_GRASS", "B-PT_TYPE", "I-PT_TYPE", "B-PT_PART", "I-PT_PART", "B-PT_OTHERS", "I-PT_OTHERS", "B-MT_ELEMENT", "I-MT_ELEMENT", "B-MT_METAL", "I-MT_METAL", "B-MT_ROCK", "I-MT_ROCK", "B-MT_CHEMICAL", "I-MT_CHEMICAL", "B-TM_COLOR", "I-TM_COLOR", "B-TM_DIRECTION", "I-TM_DIRECTION", "B-TM_CLIMATE", "I-TM_CLIMATE", "B-TM_SHAPE", "I-TM_SHAPE", "B-TM_CELL_TISSUE_ORGAN", "I-TM_CELL_TISSUE_ORGAN", "B-TMM_DISEASE", "I-TMM_DISEASE", "B-TMM_DRUG", "I-TMM_DRUG", "B-TMI_HW", "I-TMI_HW", "B-TMI_SW", "I-TMI_SW", "B-TMI_SITE", "I-TMI_SITE", "B-TMI_EMAIL", "I-TMI_EMAIL", "B-TMI_MODEL", "I-TMI_MODEL", "B-TMI_SERVICE", "I-TMI_SERVICE", "B-TMI_PROJECT", "I-TMI_PROJECT", "B-TMIG_GENRE", "I-TMIG_GENRE", "B-TM_SPORTS", "I-TM_SPORTS" ] NIKL_META={ 'ne_tags': _NE_TAGS, 'ne_iob2_tags': _NE_IOB2_TAGS, 'cola_classes': _COLA_CLASSES, 'ne2020_tags': _NE2020_TAGS, 'ne2020_iob2_tags': _NE2020_IOB2_TAGS, }
_ne_tags = ['PS', 'LC', 'OG', 'DT', 'TI', 'QT', 'AF', 'CV', 'AM', 'PT', 'FD', 'TR', 'EV', 'MT', 'TM'] _ne_iob2_tags = ['O', 'B-PS', 'I-PS', 'B-LC', 'I-LC', 'B-OG', 'I-OG', 'B-DT', 'I-DT', 'B-TI', 'I-TI', 'B-QT', 'I-QT', 'B-AF', 'I-AF', 'B-CV', 'I-CV', 'B-AM', 'I-AM', 'B-PT', 'I-PT', 'B-FD', 'I-FD', 'B-TR', 'I-TR', 'B-EV', 'I-EV', 'B-MT', 'I-MT', 'B-TM', 'I-TM'] _cola_classes = ['unacceptable', 'acceptable'] _ne2020_tags = ['PS_NAME', 'PS_CHARACTER', 'PS_PET', 'FD_SCIENCE', 'FD_SOCIAL_SCIENCE', 'FD_MEDICINE', 'FD_ART', 'FD_HUMANITIES', 'FD_OTHERS', 'TR_SCIENCE', 'TR_SOCIAL_SCIENCE', 'TR_MEDICINE', 'TR_ART', 'TR_HUMANITIES', 'TR_OTHERS', 'AF_BUILDING', 'AF_CULTURAL_ASSET', 'AF_ROAD', 'AF_TRANSPORT', 'AF_MUSICAL_INSTRUMENT', 'AF_WEAPON', 'AFA_DOCUMENT', 'AFA_PERFORMANCE', 'AFA_VIDEO', 'AFA_ART_CRAFT', 'AFA_MUSIC', 'AFW_SERVICE_PRODUCTS', 'AFW_OTHER_PRODUCTS', 'OGG_ECONOMY', 'OGG_EDUCATION', 'OGG_MILITARY', 'OGG_MEDIA', 'OGG_SPORTS', 'OGG_ART', 'OGG_MEDICINE', 'OGG_RELIGION', 'OGG_SCIENCE', 'OGG_LIBRARY', 'OGG_LAW', 'OGG_POLITICS', 'OGG_FOOD', 'OGG_HOTEL', 'OGG_OTHERS', 'LCP_COUNTRY', 'LCP_PROVINCE', 'LCP_COUNTY', 'LCP_CITY', 'LCP_CAPITALCITY', 'LCG_RIVER', 'LCG_OCEAN', 'LCG_BAY', 'LCG_MOUNTAIN', 'LCG_ISLAND', 'LCG_CONTINENT', 'LC_SPACE', 'LC_OTHERS', 'CV_CULTURE', 'CV_TRIBE', 'CV_LANGUAGE', 'CV_POLICY', 'CV_LAW', 'CV_CURRENCY', 'CV_TAX', 'CV_FUNDS', 'CV_ART', 'CV_SPORTS', 'CV_SPORTS_POSITION', 'CV_SPORTS_INST', 'CV_PRIZE', 'CV_RELATION', 'CV_OCCUPATION', 'CV_POSITION', 'CV_FOOD', 'CV_DRINK', 'CV_FOOD_STYLE', 'CV_CLOTHING', 'CV_BUILDING_TYPE', 'DT_DURATION', 'DT_DAY', 'DT_WEEK', 'DT_MONTH', 'DT_YEAR', 'DT_SEASON', 'DT_GEOAGE', 'DT_DYNASTY', 'DT_OTHERS', 'TI_DURATION', 'TI_HOUR', 'TI_MINUTE', 'TI_SECOND', 'TI_OTHERS', 'QT_AGE', 'QT_SIZE', 'QT_LENGTH', 'QT_COUNT', 'QT_MAN_COUNT', 'QT_WEIGHT', 'QT_PERCENTAGE', 'QT_SPEED', 'QT_TEMPERATURE', 'QT_VOLUME', 'QT_ORDER', 'QT_PRICE', 'QT_PHONE', 'QT_SPORTS', 'QT_CHANNEL', 'QT_ALBUM', 'QT_ADDRESS', 'QT_OTHERS', 'EV_ACTIVITY', 'EV_WAR_REVOLUTION', 'EV_SPORTS', 'EV_FESTIVAL', 'EV_OTHERS', 'AM_INSECT', 'AM_BIRD', 'AM_FISH', 'AM_MAMMALIA', 'AM_AMPHIBIA', 'AM_REPTILIA', 'AM_TYPE', 'AM_PART', 'AM_OTHERS', 'PT_FRUIT', 'PT_FLOWER', 'PT_TREE', 'PT_GRASS', 'PT_TYPE', 'PT_PART', 'PT_OTHERS', 'MT_ELEMENT', 'MT_METAL', 'MT_ROCK', 'MT_CHEMICAL', 'TM_COLOR', 'TM_DIRECTION', 'TM_CLIMATE', 'TM_SHAPE', 'TM_CELL_TISSUE_ORGAN', 'TMM_DISEASE', 'TMM_DRUG', 'TMI_HW', 'TMI_SW', 'TMI_SITE', 'TMI_EMAIL', 'TMI_MODEL', 'TMI_SERVICE', 'TMI_PROJECT', 'TMIG_GENRE', 'TM_SPORTS'] _ne2020_iob2_tags = ['O', 'B-PS_NAME', 'I-PS_NAME', 'B-PS_CHARACTER', 'I-PS_CHARACTER', 'B-PS_PET', 'I-PS_PET', 'B-FD_SCIENCE', 'I-FD_SCIENCE', 'B-FD_SOCIAL_SCIENCE', 'I-FD_SOCIAL_SCIENCE', 'B-FD_MEDICINE', 'I-FD_MEDICINE', 'B-FD_ART', 'I-FD_ART', 'B-FD_HUMANITIES', 'I-FD_HUMANITIES', 'B-FD_OTHERS', 'I-FD_OTHERS', 'B-TR_SCIENCE', 'I-TR_SCIENCE', 'B-TR_SOCIAL_SCIENCE', 'I-TR_SOCIAL_SCIENCE', 'B-TR_MEDICINE', 'I-TR_MEDICINE', 'B-TR_ART', 'I-TR_ART', 'B-TR_HUMANITIES', 'I-TR_HUMANITIES', 'B-TR_OTHERS', 'I-TR_OTHERS', 'B-AF_BUILDING', 'I-AF_BUILDING', 'B-AF_CULTURAL_ASSET', 'I-AF_CULTURAL_ASSET', 'B-AF_ROAD', 'I-AF_ROAD', 'B-AF_TRANSPORT', 'I-AF_TRANSPORT', 'B-AF_MUSICAL_INSTRUMENT', 'I-AF_MUSICAL_INSTRUMENT', 'B-AF_WEAPON', 'I-AF_WEAPON', 'B-AFA_DOCUMENT', 'I-AFA_DOCUMENT', 'B-AFA_PERFORMANCE', 'I-AFA_PERFORMANCE', 'B-AFA_VIDEO', 'I-AFA_VIDEO', 'B-AFA_ART_CRAFT', 'I-AFA_ART_CRAFT', 'B-AFA_MUSIC', 'I-AFA_MUSIC', 'B-AFW_SERVICE_PRODUCTS', 'I-AFW_SERVICE_PRODUCTS', 'B-AFW_OTHER_PRODUCTS', 'I-AFW_OTHER_PRODUCTS', 'B-OGG_ECONOMY', 'I-OGG_ECONOMY', 'B-OGG_EDUCATION', 'I-OGG_EDUCATION', 'B-OGG_MILITARY', 'I-OGG_MILITARY', 'B-OGG_MEDIA', 'I-OGG_MEDIA', 'B-OGG_SPORTS', 'I-OGG_SPORTS', 'B-OGG_ART', 'I-OGG_ART', 'B-OGG_MEDICINE', 'I-OGG_MEDICINE', 'B-OGG_RELIGION', 'I-OGG_RELIGION', 'B-OGG_SCIENCE', 'I-OGG_SCIENCE', 'B-OGG_LIBRARY', 'I-OGG_LIBRARY', 'B-OGG_LAW', 'I-OGG_LAW', 'B-OGG_POLITICS', 'I-OGG_POLITICS', 'B-OGG_FOOD', 'I-OGG_FOOD', 'B-OGG_HOTEL', 'I-OGG_HOTEL', 'B-OGG_OTHERS', 'I-OGG_OTHERS', 'B-LCP_COUNTRY', 'I-LCP_COUNTRY', 'B-LCP_PROVINCE', 'I-LCP_PROVINCE', 'B-LCP_COUNTY', 'I-LCP_COUNTY', 'B-LCP_CITY', 'I-LCP_CITY', 'B-LCP_CAPITALCITY', 'I-LCP_CAPITALCITY', 'B-LCG_RIVER', 'I-LCG_RIVER', 'B-LCG_OCEAN', 'I-LCG_OCEAN', 'B-LCG_BAY', 'I-LCG_BAY', 'B-LCG_MOUNTAIN', 'I-LCG_MOUNTAIN', 'B-LCG_ISLAND', 'I-LCG_ISLAND', 'B-LCG_CONTINENT', 'I-LCG_CONTINENT', 'B-LC_SPACE', 'I-LC_SPACE', 'B-LC_OTHERS', 'I-LC_OTHERS', 'B-CV_CULTURE', 'I-CV_CULTURE', 'B-CV_TRIBE', 'I-CV_TRIBE', 'B-CV_LANGUAGE', 'I-CV_LANGUAGE', 'B-CV_POLICY', 'I-CV_POLICY', 'B-CV_LAW', 'I-CV_LAW', 'B-CV_CURRENCY', 'I-CV_CURRENCY', 'B-CV_TAX', 'I-CV_TAX', 'B-CV_FUNDS', 'I-CV_FUNDS', 'B-CV_ART', 'I-CV_ART', 'B-CV_SPORTS', 'I-CV_SPORTS', 'B-CV_SPORTS_POSITION', 'I-CV_SPORTS_POSITION', 'B-CV_SPORTS_INST', 'I-CV_SPORTS_INST', 'B-CV_PRIZE', 'I-CV_PRIZE', 'B-CV_RELATION', 'I-CV_RELATION', 'B-CV_OCCUPATION', 'I-CV_OCCUPATION', 'B-CV_POSITION', 'I-CV_POSITION', 'B-CV_FOOD', 'I-CV_FOOD', 'B-CV_DRINK', 'I-CV_DRINK', 'B-CV_FOOD_STYLE', 'I-CV_FOOD_STYLE', 'B-CV_CLOTHING', 'I-CV_CLOTHING', 'B-CV_BUILDING_TYPE', 'I-CV_BUILDING_TYPE', 'B-DT_DURATION', 'I-DT_DURATION', 'B-DT_DAY', 'I-DT_DAY', 'B-DT_WEEK', 'I-DT_WEEK', 'B-DT_MONTH', 'I-DT_MONTH', 'B-DT_YEAR', 'I-DT_YEAR', 'B-DT_SEASON', 'I-DT_SEASON', 'B-DT_GEOAGE', 'I-DT_GEOAGE', 'B-DT_DYNASTY', 'I-DT_DYNASTY', 'B-DT_OTHERS', 'I-DT_OTHERS', 'B-TI_DURATION', 'I-TI_DURATION', 'B-TI_HOUR', 'I-TI_HOUR', 'B-TI_MINUTE', 'I-TI_MINUTE', 'B-TI_SECOND', 'I-TI_SECOND', 'B-TI_OTHERS', 'I-TI_OTHERS', 'B-QT_AGE', 'I-QT_AGE', 'B-QT_SIZE', 'I-QT_SIZE', 'B-QT_LENGTH', 'I-QT_LENGTH', 'B-QT_COUNT', 'I-QT_COUNT', 'B-QT_MAN_COUNT', 'I-QT_MAN_COUNT', 'B-QT_WEIGHT', 'I-QT_WEIGHT', 'B-QT_PERCENTAGE', 'I-QT_PERCENTAGE', 'B-QT_SPEED', 'I-QT_SPEED', 'B-QT_TEMPERATURE', 'I-QT_TEMPERATURE', 'B-QT_VOLUME', 'I-QT_VOLUME', 'B-QT_ORDER', 'I-QT_ORDER', 'B-QT_PRICE', 'I-QT_PRICE', 'B-QT_PHONE', 'I-QT_PHONE', 'B-QT_SPORTS', 'I-QT_SPORTS', 'B-QT_CHANNEL', 'I-QT_CHANNEL', 'B-QT_ALBUM', 'I-QT_ALBUM', 'B-QT_ADDRESS', 'I-QT_ADDRESS', 'B-QT_OTHERS', 'I-QT_OTHERS', 'B-EV_ACTIVITY', 'I-EV_ACTIVITY', 'B-EV_WAR_REVOLUTION', 'I-EV_WAR_REVOLUTION', 'B-EV_SPORTS', 'I-EV_SPORTS', 'B-EV_FESTIVAL', 'I-EV_FESTIVAL', 'B-EV_OTHERS', 'I-EV_OTHERS', 'B-AM_INSECT', 'I-AM_INSECT', 'B-AM_BIRD', 'I-AM_BIRD', 'B-AM_FISH', 'I-AM_FISH', 'B-AM_MAMMALIA', 'I-AM_MAMMALIA', 'B-AM_AMPHIBIA', 'I-AM_AMPHIBIA', 'B-AM_REPTILIA', 'I-AM_REPTILIA', 'B-AM_TYPE', 'I-AM_TYPE', 'B-AM_PART', 'I-AM_PART', 'B-AM_OTHERS', 'I-AM_OTHERS', 'B-PT_FRUIT', 'I-PT_FRUIT', 'B-PT_FLOWER', 'I-PT_FLOWER', 'B-PT_TREE', 'I-PT_TREE', 'B-PT_GRASS', 'I-PT_GRASS', 'B-PT_TYPE', 'I-PT_TYPE', 'B-PT_PART', 'I-PT_PART', 'B-PT_OTHERS', 'I-PT_OTHERS', 'B-MT_ELEMENT', 'I-MT_ELEMENT', 'B-MT_METAL', 'I-MT_METAL', 'B-MT_ROCK', 'I-MT_ROCK', 'B-MT_CHEMICAL', 'I-MT_CHEMICAL', 'B-TM_COLOR', 'I-TM_COLOR', 'B-TM_DIRECTION', 'I-TM_DIRECTION', 'B-TM_CLIMATE', 'I-TM_CLIMATE', 'B-TM_SHAPE', 'I-TM_SHAPE', 'B-TM_CELL_TISSUE_ORGAN', 'I-TM_CELL_TISSUE_ORGAN', 'B-TMM_DISEASE', 'I-TMM_DISEASE', 'B-TMM_DRUG', 'I-TMM_DRUG', 'B-TMI_HW', 'I-TMI_HW', 'B-TMI_SW', 'I-TMI_SW', 'B-TMI_SITE', 'I-TMI_SITE', 'B-TMI_EMAIL', 'I-TMI_EMAIL', 'B-TMI_MODEL', 'I-TMI_MODEL', 'B-TMI_SERVICE', 'I-TMI_SERVICE', 'B-TMI_PROJECT', 'I-TMI_PROJECT', 'B-TMIG_GENRE', 'I-TMIG_GENRE', 'B-TM_SPORTS', 'I-TM_SPORTS'] nikl_meta = {'ne_tags': _NE_TAGS, 'ne_iob2_tags': _NE_IOB2_TAGS, 'cola_classes': _COLA_CLASSES, 'ne2020_tags': _NE2020_TAGS, 'ne2020_iob2_tags': _NE2020_IOB2_TAGS}
# GMOS geometry_conf.py module containing information # for Transform-based tileArrays/mosaicDetectors # for tileArrays(): key=detector_name(), value=gap (unbinned pixels) tile_gaps = { # GMOS-N 'EEV9273-16-03EEV9273-20-04EEV9273-20-03': 37, 'e2v 10031-23-05,10031-01-03,10031-18-04': 37, 'BI13-20-4k-1,BI12-09-4k-2,BI13-18-4k-2': 67, # GMOS-S 'EEV2037-06-03EEV8194-19-04EEV8261-07-04': 37, 'EEV8056-20-03EEV8194-19-04EEV8261-07-04': 37, 'BI5-36-4k-2,BI11-33-4k-1,BI12-34-4k-1': 61, } # for mosaicDetectors(): key=detector_name(), value=dict # In this dict, each CCD is keyed by the DETSEC coords (x,y) at its bottom-left # and can contain entries for: "shift" (x,y) -- (0,0) if absent # "rotation" (degrees counterclockwise) -- 0 if absent # "magnification" -- 1.0 if absent # "shape" (unbinned pixels) -- "default_shape" if absent # # The shifts are centre-to-centre differences between the CCDs. Rotations are # performed about the centre of each CCD. geometry = { # GMOS-N 'EEV9273-16-03EEV9273-20-04EEV9273-20-03': {'default_shape': (2048, 4608), (0, 0): {'shift': (-2087.50,-1.58), 'rotation': -0.004}, (2048, 0): {}, (4096, 0): {'shift': (2088.8723, -1.86), 'rotation': -0.046} }, 'e2v 10031-23-05,10031-01-03,10031-18-04': {'default_shape': (2048, 4608), (0, 0): {'shift': (-2087.7,-0.749), 'rotation': -0.009}, (2048, 0): {}, (4096, 0): {'shift': (2087.8014, 2.05), 'rotation': -0.003} }, 'BI13-20-4k-1,BI12-09-4k-2,BI13-18-4k-2': {'default_shape': (2048, 4224), (0, 0): {'shift': (-2115.95, -0.21739), 'rotation': -0.004}, (2048, 0): {}, (4096, 0): {'shift': (2115.48, 0.1727), 'rotation': -0.00537} }, # GMOS-S 'EEV8056-20-03EEV8194-19-04EEV8261-07-04': {'default_shape': (2048, 4608), (0, 0): {'shift': (-2086.44, 5.46), 'rotation': -0.01}, (2048, 0): {}, (4096, 0): {'shift': (2092.53, 9.57), 'rotation': 0.02} }, 'EEV2037-06-03EEV8194-19-04EEV8261-07-04': {'default_shape': (2048, 4608), (0, 0): {'shift': (-2086.49, -0.22), 'rotation': 0.011}, (2048, 0): {}, (4096, 0): {'shift': (2089.31, 2.04), 'rotation': 0.012} }, 'BI5-36-4k-2,BI11-33-4k-1,BI12-34-4k-1': {'default_shape': (2048, 4224), (0, 0): {'shift': (-2110.2, 0.71), 'rotation': 0.}, (2048, 0): {}, (4096, 0): {'shift': (2109., -0.73), 'rotation': 0.} }, }
tile_gaps = {'EEV9273-16-03EEV9273-20-04EEV9273-20-03': 37, 'e2v 10031-23-05,10031-01-03,10031-18-04': 37, 'BI13-20-4k-1,BI12-09-4k-2,BI13-18-4k-2': 67, 'EEV2037-06-03EEV8194-19-04EEV8261-07-04': 37, 'EEV8056-20-03EEV8194-19-04EEV8261-07-04': 37, 'BI5-36-4k-2,BI11-33-4k-1,BI12-34-4k-1': 61} geometry = {'EEV9273-16-03EEV9273-20-04EEV9273-20-03': {'default_shape': (2048, 4608), (0, 0): {'shift': (-2087.5, -1.58), 'rotation': -0.004}, (2048, 0): {}, (4096, 0): {'shift': (2088.8723, -1.86), 'rotation': -0.046}}, 'e2v 10031-23-05,10031-01-03,10031-18-04': {'default_shape': (2048, 4608), (0, 0): {'shift': (-2087.7, -0.749), 'rotation': -0.009}, (2048, 0): {}, (4096, 0): {'shift': (2087.8014, 2.05), 'rotation': -0.003}}, 'BI13-20-4k-1,BI12-09-4k-2,BI13-18-4k-2': {'default_shape': (2048, 4224), (0, 0): {'shift': (-2115.95, -0.21739), 'rotation': -0.004}, (2048, 0): {}, (4096, 0): {'shift': (2115.48, 0.1727), 'rotation': -0.00537}}, 'EEV8056-20-03EEV8194-19-04EEV8261-07-04': {'default_shape': (2048, 4608), (0, 0): {'shift': (-2086.44, 5.46), 'rotation': -0.01}, (2048, 0): {}, (4096, 0): {'shift': (2092.53, 9.57), 'rotation': 0.02}}, 'EEV2037-06-03EEV8194-19-04EEV8261-07-04': {'default_shape': (2048, 4608), (0, 0): {'shift': (-2086.49, -0.22), 'rotation': 0.011}, (2048, 0): {}, (4096, 0): {'shift': (2089.31, 2.04), 'rotation': 0.012}}, 'BI5-36-4k-2,BI11-33-4k-1,BI12-34-4k-1': {'default_shape': (2048, 4224), (0, 0): {'shift': (-2110.2, 0.71), 'rotation': 0.0}, (2048, 0): {}, (4096, 0): {'shift': (2109.0, -0.73), 'rotation': 0.0}}}
n, c = list(map(int, input().split())) p = list(map(int, input().split())) t = list(map(int, input().split())) limak = 0 Radewoosh = 0 sm, sm2 =0,0 for i in range(n): sm +=t[i] sm2 +=t[n-i-1] limak += max(0,p[i] - c*sm) Radewoosh += max(0,p[n-i-1] - c*sm2) if limak > Radewoosh: print("Limak") elif limak < Radewoosh: print("Radewoosh") else: print("Tie")
(n, c) = list(map(int, input().split())) p = list(map(int, input().split())) t = list(map(int, input().split())) limak = 0 radewoosh = 0 (sm, sm2) = (0, 0) for i in range(n): sm += t[i] sm2 += t[n - i - 1] limak += max(0, p[i] - c * sm) radewoosh += max(0, p[n - i - 1] - c * sm2) if limak > Radewoosh: print('Limak') elif limak < Radewoosh: print('Radewoosh') else: print('Tie')
''' @Date: 2019-08-20 09:16:33 @Author: ywyz @LastModifiedBy: ywyz @Github: https://github.com/ywyz @LastEditors: ywyz @LastEditTime: 2019-08-20 09:16:33 ''' print("\u03b1\u03b2\u03b3\u03b4\u03b5\u03b6\u03b7\u03b8")
""" @Date: 2019-08-20 09:16:33 @Author: ywyz @LastModifiedBy: ywyz @Github: https://github.com/ywyz @LastEditors: ywyz @LastEditTime: 2019-08-20 09:16:33 """ print('αβγδεζηθ')
class BlazingException(Exception): def __init__(self, http_status_code: int, message: str): super(BlazingException, self).__init__(message) self.message: str = message self.status_code: int = http_status_code def __str__(self): message = "Message: %s. Status Code: %s" % (self.message, self.status_code) return message.strip()
class Blazingexception(Exception): def __init__(self, http_status_code: int, message: str): super(BlazingException, self).__init__(message) self.message: str = message self.status_code: int = http_status_code def __str__(self): message = 'Message: %s. Status Code: %s' % (self.message, self.status_code) return message.strip()
physconst = { "h" : 6.62606896E-34, # The Planck constant (Js) "c" : 2.99792458E8, # Speed of light (ms$^{-1}$) "kb" : 1.3806504E-23, # The Boltzmann constant (JK$^{-1}$) "R" : 8.314472, # Universal gas constant (JK$^{-1}$mol$^{-1}$) "bohr2angstroms" : 0.52917720859, # Bohr to Angstroms conversion factor "bohr2m" : 0.52917720859E-10, # Bohr to meters conversion factor "bohr2cm" : 0.52917720859E-8, # Bohr to centimeters conversion factor "amu2g" : 1.660538782E-24, # Atomic mass units to grams conversion factor "amu2kg" : 1.660538782E-27, # Atomic mass units to kg conversion factor "au2amu" : 5.485799097E-4, # Atomic units (m$@@e$) to atomic mass units conversion factor "hartree2J" : 4.359744E-18, # Hartree to joule conversion factor "hartree2aJ" : 4.359744, # Hartree to attojoule (10$^{-18}$J) conversion factor "cal2J" : 4.184, # Calorie to joule conversion factor "dipmom_au2si" : 8.47835281E-30, # Atomic units to SI units (Cm) conversion factor for dipoles "dipmom_au2debye" : 2.54174623, # Atomic units to Debye conversion factor for dipoles "dipmom_debye2si" : 3.335640952E-30, # Debye to SI units (Cm) conversion factor for dipoles "c_au" : 137.035999679, # Speed of light in atomic units "hartree2ev" : 27.21138, # Hartree to eV conversion factor "hartree2wavenumbers" : 219474.6, # Hartree to cm$^{-1}$ conversion factor "hartree2kcalmol" : 627.5095, # Hartree to kcal mol$^{-1}$ conversion factor "hartree2MHz" : 6.579684E9, # Hartree to MHz conversion factor "kcalmol2wavenumbers" : 349.7551, # kcal mol$^{-1}$ to cm$^{-1}$ conversion factor "e0" : 8.854187817E-12, # Vacuum permittivity (Fm$^{-1}$) "na" : 6.02214179E23, # Avagadro's number "me" : 9.10938215E-31, # Electron rest mass (in kg) }
physconst = {'h': 6.62606896e-34, 'c': 299792458.0, 'kb': 1.3806504e-23, 'R': 8.314472, 'bohr2angstroms': 0.52917720859, 'bohr2m': 5.2917720859e-11, 'bohr2cm': 5.2917720859e-09, 'amu2g': 1.660538782e-24, 'amu2kg': 1.660538782e-27, 'au2amu': 0.0005485799097, 'hartree2J': 4.359744e-18, 'hartree2aJ': 4.359744, 'cal2J': 4.184, 'dipmom_au2si': 8.47835281e-30, 'dipmom_au2debye': 2.54174623, 'dipmom_debye2si': 3.335640952e-30, 'c_au': 137.035999679, 'hartree2ev': 27.21138, 'hartree2wavenumbers': 219474.6, 'hartree2kcalmol': 627.5095, 'hartree2MHz': 6579684000.0, 'kcalmol2wavenumbers': 349.7551, 'e0': 8.854187817e-12, 'na': 6.02214179e+23, 'me': 9.10938215e-31}
# DEBUG DEBUG = True # DJANGO SECRET KEY SECRET_KEY = 'xh=yw8#%ob65a@ijq=2r41(6#8*ghhk7an)bcupk6ifd42bid+' # ALLOWED HOSTS ALLOWED_HOSTS = [] # DBS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'db', 'USER': 'root', 'PASSWORD': 'secret', 'HOST': 'localhost', 'PORT': '3306', } }
debug = True secret_key = 'xh=yw8#%ob65a@ijq=2r41(6#8*ghhk7an)bcupk6ifd42bid+' allowed_hosts = [] databases = {'default': {'ENGINE': 'django.db.backends.mysql', 'NAME': 'db', 'USER': 'root', 'PASSWORD': 'secret', 'HOST': 'localhost', 'PORT': '3306'}}
# b 0 # f 1 # l 0 # r 1 def part1(data): return max(get_seats(data)) def get_seats(data): seats = [] for line in data: row = line[:7].replace('B', '1').replace('F', '0') col = line[7:].replace('L', '0').replace('R', '1') seats.append(int(row, 2) * 8 + int(col, 2)) return sorted(seats) def part2(data): seats = set(get_seats(data)) all_seats = set(range(min(seats), max(seats) + 1)) return (all_seats - seats).pop()
def part1(data): return max(get_seats(data)) def get_seats(data): seats = [] for line in data: row = line[:7].replace('B', '1').replace('F', '0') col = line[7:].replace('L', '0').replace('R', '1') seats.append(int(row, 2) * 8 + int(col, 2)) return sorted(seats) def part2(data): seats = set(get_seats(data)) all_seats = set(range(min(seats), max(seats) + 1)) return (all_seats - seats).pop()
for val in "string": if val == "i": break print(val) print() for val in range(1,10): if val == 5: break print(val)
for val in 'string': if val == 'i': break print(val) print() for val in range(1, 10): if val == 5: break print(val)
def base_logic(login_generator, password_generator, query): login = login_generator.generate() if login is None:return while True: password = password_generator.generate() if password is None:return if query(login, password): print('Success',login,password) return def password_then_login_logic(login_generator, password_generator, query, logins_limit=1000): success_logins = {} while True: password = password_generator.generate() if password is None:return login_generator.reset() for i in range (logins_limit): login = login_generator.generate() if login is None:break if login in success_logins: continue if query(login, password): print('Success', login, password) success_logins[login] = password return def login_then_password_logic(login_generator, password_generator, query, passwords_limit=1000): success_logins = {} while True: login = login_generator.generate() if login is None:break password = password_generator.reset() for i in range (passwords_limit): password = password_generator.generate() if password is None:break if query(login, password): print('Success', login, password) success_logins[login] = password break
def base_logic(login_generator, password_generator, query): login = login_generator.generate() if login is None: return while True: password = password_generator.generate() if password is None: return if query(login, password): print('Success', login, password) return def password_then_login_logic(login_generator, password_generator, query, logins_limit=1000): success_logins = {} while True: password = password_generator.generate() if password is None: return login_generator.reset() for i in range(logins_limit): login = login_generator.generate() if login is None: break if login in success_logins: continue if query(login, password): print('Success', login, password) success_logins[login] = password return def login_then_password_logic(login_generator, password_generator, query, passwords_limit=1000): success_logins = {} while True: login = login_generator.generate() if login is None: break password = password_generator.reset() for i in range(passwords_limit): password = password_generator.generate() if password is None: break if query(login, password): print('Success', login, password) success_logins[login] = password break
class Solution: def shortestPalindrome(self, s: str) -> str: double = s + '*' + s[::-1] lps = self.longestPrefixString(double) index = lps[-1] return s[index: ][::-1] + s def longestPrefixString(self, s): lps = [0] * len(s) i, j = 0, 1 while j < len(s): if s[i] == s[j]: lps[j] = i + 1 i += 1 j += 1 else: if i == 0: j += 1 else: i = lps[i - 1] return lps
class Solution: def shortest_palindrome(self, s: str) -> str: double = s + '*' + s[::-1] lps = self.longestPrefixString(double) index = lps[-1] return s[index:][::-1] + s def longest_prefix_string(self, s): lps = [0] * len(s) (i, j) = (0, 1) while j < len(s): if s[i] == s[j]: lps[j] = i + 1 i += 1 j += 1 elif i == 0: j += 1 else: i = lps[i - 1] return lps
class SummonerModel: def __init__(self, dbRow): self.ID = dbRow["ID"] self.User = dbRow["User"] self.SummonerName = dbRow["SummonerName"] self.SummonerID = dbRow["SummonerID"] self.Shadow = dbRow["Shadow"] self.Region = dbRow["Region"] self.Timestamp = dbRow["Timestamp"]
class Summonermodel: def __init__(self, dbRow): self.ID = dbRow['ID'] self.User = dbRow['User'] self.SummonerName = dbRow['SummonerName'] self.SummonerID = dbRow['SummonerID'] self.Shadow = dbRow['Shadow'] self.Region = dbRow['Region'] self.Timestamp = dbRow['Timestamp']
#ml = [1, 2, 3, 4, 5, 6] for num in range(10): # generators print(num) for num in range(0, 10, 2): print(num) index_count = 0 for letter in 'abcde': print('At index {} the letter is {}'.format(index_count, letter)) index_count += 1 print(list(range(0, 11, 2))) index_count = 0 word = 'abcdefg' for letter in word: print(word[index_count]) index_count += 1 # using enum word = "qwertyuiop" for i in enumerate(word): print(i) # comment added
for num in range(10): print(num) for num in range(0, 10, 2): print(num) index_count = 0 for letter in 'abcde': print('At index {} the letter is {}'.format(index_count, letter)) index_count += 1 print(list(range(0, 11, 2))) index_count = 0 word = 'abcdefg' for letter in word: print(word[index_count]) index_count += 1 word = 'qwertyuiop' for i in enumerate(word): print(i)
# # PySNMP MIB module NOKIA-UNITTYPES-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/NOKIA-UNITTYPES-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 20:13:57 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueRangeConstraint, ValueSizeConstraint, ConstraintsIntersection, ConstraintsUnion, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ValueSizeConstraint", "ConstraintsIntersection", "ConstraintsUnion", "SingleValueConstraint") ntcCommonModules, ntcHWUnitTypeMibs = mibBuilder.importSymbols("NOKIA-COMMON-MIB-OID-REGISTRATION-MIB", "ntcCommonModules", "ntcHWUnitTypeMibs") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") ObjectIdentity, Counter64, NotificationType, Unsigned32, IpAddress, ModuleIdentity, Bits, Integer32, TimeTicks, MibScalar, MibTable, MibTableRow, MibTableColumn, Gauge32, iso, MibIdentifier, Counter32 = mibBuilder.importSymbols("SNMPv2-SMI", "ObjectIdentity", "Counter64", "NotificationType", "Unsigned32", "IpAddress", "ModuleIdentity", "Bits", "Integer32", "TimeTicks", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Gauge32", "iso", "MibIdentifier", "Counter32") TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString") ntcHWUnitTypeModule = ModuleIdentity((1, 3, 6, 1, 4, 1, 94, 1, 16, 5, 3)) ntcHWUnitTypeModule.setRevisions(('1998-09-24 00:00', '1998-10-04 00:00', '1998-11-25 00:00', '1998-12-03 00:00', '1999-10-18 00:00', '1901-03-14 00:00', '1902-02-08 00:00',)) if mibBuilder.loadTexts: ntcHWUnitTypeModule.setLastUpdated('9808270000Z') if mibBuilder.loadTexts: ntcHWUnitTypeModule.setOrganization('Nokia') ntcHWUnitNone = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 1)) ntcHWUnitAny = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 2)) ntcHWSlot = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 21)) ntcHWBackplane = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 22)) ntcHWUnitIanNcaStm1Electrical = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 3)) ntcHWUnitNcaStm1SingleModeOptical = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 4)) ntcHWUnitNcaStm1MultiModeOptical = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 5)) ntcHWUnitIanASU = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 6)) ntcHWUnitIan4PortV35 = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 7)) ntcHWUnitIan4PortE1 = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 8)) ntcHWUnitIan4PortMsdsl = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 9)) ntcHWUnitIanIpFwrdingUnit = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 10)) ntcHWUnitBbanAlbaStm1E = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 11)) ntcHWUnitBbanAlbaStm1Om = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 12)) ntcHWUnitBbanAlbaStm1Os = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 13)) ntcHWUnitBbanAlbaE3 = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 14)) ntcHWUnitBbanSliuAdslMiDmt = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 15)) ntcHWUnitBbanSliuAdslAdDmt = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 16)) ntcHWUnitBbanSliuE1I75 = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 17)) ntcHWUnitBbanSliuE1I120 = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 18)) ntcHWUnitBbanBackplane8 = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 19)) ntcHWUnitBbanBackplane17 = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 20)) ntcHWUnitIprgSeqCrp = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 23)) ntcHWUnitIprgSeqGplc1 = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 24)) ntcHWUnitIprgSeqGplc2 = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 25)) ntcHWUnitIprgSeqWslc = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 26)) ntcHWUnitIprgEth1 = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 27)) ntcHWUnitIprgEth2 = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 28)) ntcHWUnitIprgEth4 = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 29)) ntcHWUnitIprgAtm = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 30)) ntcHWUnitIprgX211 = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 31)) ntcHWUnitIprgV351 = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 32)) ntcHWUnitIprgX212 = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 33)) ntcHWUnitIprgV352 = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 34)) ntcHWUnitIprgHssi = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 35)) ntcHWUnitIprgE1 = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 36)) ntcHWUnitIprgT1 = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 37)) ntcHWUnitIprgFddi = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 38)) ntcHWUnitIprgTok = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 39)) ntcHWUnitIprgIsdn = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 40)) ntcHWUnitIpsoGigEth1 = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 57)) ntcHWUnitIpsoSs7 = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 58)) ntcHWUnitIpsoCryptoAccelerator = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 59)) ntcHWUnitIprgBackplaneIP110 = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 41)) ntcHWUnitIprgBackplaneIP330 = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 42)) ntcHWUnitIprgBackplaneIP440 = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 43)) ntcHWUnitIprgBackplaneIP530 = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 44)) ntcHWUnitIprgBackplaneIP650 = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 45)) ntcHWUnitIprgBackplaneIP730 = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 46)) ntcHWUnitIprgBackplaneSeq9 = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 47)) ntcHWUnitIprgBackplaneSeq18 = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 48)) ntcHWUnitIprgChassisIP110 = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 49)) ntcHWUnitIprgChassisIP330 = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 50)) ntcHWUnitIprgChassisIP440 = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 51)) ntcHWUnitIprgChassisIP530 = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 52)) ntcHWUnitIprgChassisIP650 = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 53)) ntcHWUnitIprgChassisIP730 = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 54)) ntcHWUnitIprgChassisSeq9 = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 55)) ntcHWUnitIprgChassisSeq18 = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 56)) ntcHWUnitIpsoHardDisk = MibIdentifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 60)) mibBuilder.exportSymbols("NOKIA-UNITTYPES-MIB", ntcHWUnitBbanAlbaE3=ntcHWUnitBbanAlbaE3, ntcHWUnitIprgSeqGplc1=ntcHWUnitIprgSeqGplc1, ntcHWUnitIprgSeqCrp=ntcHWUnitIprgSeqCrp, ntcHWUnitIprgBackplaneIP730=ntcHWUnitIprgBackplaneIP730, ntcHWUnitBbanAlbaStm1E=ntcHWUnitBbanAlbaStm1E, ntcHWUnitIan4PortMsdsl=ntcHWUnitIan4PortMsdsl, PYSNMP_MODULE_ID=ntcHWUnitTypeModule, ntcHWUnitIprgHssi=ntcHWUnitIprgHssi, ntcHWUnitIprgEth1=ntcHWUnitIprgEth1, ntcHWUnitBbanSliuAdslAdDmt=ntcHWUnitBbanSliuAdslAdDmt, ntcHWUnitIprgEth2=ntcHWUnitIprgEth2, ntcHWSlot=ntcHWSlot, ntcHWUnitIprgChassisSeq9=ntcHWUnitIprgChassisSeq9, ntcHWUnitAny=ntcHWUnitAny, ntcHWUnitIprgFddi=ntcHWUnitIprgFddi, ntcHWUnitIan4PortV35=ntcHWUnitIan4PortV35, ntcHWUnitIprgBackplaneIP530=ntcHWUnitIprgBackplaneIP530, ntcHWUnitIprgBackplaneIP650=ntcHWUnitIprgBackplaneIP650, ntcHWUnitIprgT1=ntcHWUnitIprgT1, ntcHWUnitIprgChassisIP440=ntcHWUnitIprgChassisIP440, ntcHWUnitIprgSeqWslc=ntcHWUnitIprgSeqWslc, ntcHWUnitIprgChassisIP650=ntcHWUnitIprgChassisIP650, ntcHWUnitBbanSliuAdslMiDmt=ntcHWUnitBbanSliuAdslMiDmt, ntcHWUnitIprgChassisIP530=ntcHWUnitIprgChassisIP530, ntcHWUnitIprgAtm=ntcHWUnitIprgAtm, ntcHWBackplane=ntcHWBackplane, ntcHWUnitIanASU=ntcHWUnitIanASU, ntcHWUnitBbanAlbaStm1Om=ntcHWUnitBbanAlbaStm1Om, ntcHWUnitBbanSliuE1I120=ntcHWUnitBbanSliuE1I120, ntcHWUnitIpsoSs7=ntcHWUnitIpsoSs7, ntcHWUnitIprgBackplaneSeq9=ntcHWUnitIprgBackplaneSeq9, ntcHWUnitBbanBackplane8=ntcHWUnitBbanBackplane8, ntcHWUnitIprgV351=ntcHWUnitIprgV351, ntcHWUnitIpsoCryptoAccelerator=ntcHWUnitIpsoCryptoAccelerator, ntcHWUnitIprgBackplaneIP440=ntcHWUnitIprgBackplaneIP440, ntcHWUnitIprgIsdn=ntcHWUnitIprgIsdn, ntcHWUnitIpsoGigEth1=ntcHWUnitIpsoGigEth1, ntcHWUnitIprgChassisIP110=ntcHWUnitIprgChassisIP110, ntcHWUnitIprgChassisSeq18=ntcHWUnitIprgChassisSeq18, ntcHWUnitIprgV352=ntcHWUnitIprgV352, ntcHWUnitNcaStm1SingleModeOptical=ntcHWUnitNcaStm1SingleModeOptical, ntcHWUnitBbanAlbaStm1Os=ntcHWUnitBbanAlbaStm1Os, ntcHWUnitIprgSeqGplc2=ntcHWUnitIprgSeqGplc2, ntcHWUnitIprgX211=ntcHWUnitIprgX211, ntcHWUnitIprgBackplaneIP110=ntcHWUnitIprgBackplaneIP110, ntcHWUnitIprgBackplaneIP330=ntcHWUnitIprgBackplaneIP330, ntcHWUnitIan4PortE1=ntcHWUnitIan4PortE1, ntcHWUnitIprgTok=ntcHWUnitIprgTok, ntcHWUnitIpsoHardDisk=ntcHWUnitIpsoHardDisk, ntcHWUnitIprgBackplaneSeq18=ntcHWUnitIprgBackplaneSeq18, ntcHWUnitIprgEth4=ntcHWUnitIprgEth4, ntcHWUnitTypeModule=ntcHWUnitTypeModule, ntcHWUnitNcaStm1MultiModeOptical=ntcHWUnitNcaStm1MultiModeOptical, ntcHWUnitBbanSliuE1I75=ntcHWUnitBbanSliuE1I75, ntcHWUnitIprgX212=ntcHWUnitIprgX212, ntcHWUnitIanNcaStm1Electrical=ntcHWUnitIanNcaStm1Electrical, ntcHWUnitIanIpFwrdingUnit=ntcHWUnitIanIpFwrdingUnit, ntcHWUnitIprgE1=ntcHWUnitIprgE1, ntcHWUnitIprgChassisIP330=ntcHWUnitIprgChassisIP330, ntcHWUnitNone=ntcHWUnitNone, ntcHWUnitBbanBackplane17=ntcHWUnitBbanBackplane17, ntcHWUnitIprgChassisIP730=ntcHWUnitIprgChassisIP730)
(object_identifier, integer, octet_string) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'Integer', 'OctetString') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (value_range_constraint, value_size_constraint, constraints_intersection, constraints_union, single_value_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'ValueSizeConstraint', 'ConstraintsIntersection', 'ConstraintsUnion', 'SingleValueConstraint') (ntc_common_modules, ntc_hw_unit_type_mibs) = mibBuilder.importSymbols('NOKIA-COMMON-MIB-OID-REGISTRATION-MIB', 'ntcCommonModules', 'ntcHWUnitTypeMibs') (notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance') (object_identity, counter64, notification_type, unsigned32, ip_address, module_identity, bits, integer32, time_ticks, mib_scalar, mib_table, mib_table_row, mib_table_column, gauge32, iso, mib_identifier, counter32) = mibBuilder.importSymbols('SNMPv2-SMI', 'ObjectIdentity', 'Counter64', 'NotificationType', 'Unsigned32', 'IpAddress', 'ModuleIdentity', 'Bits', 'Integer32', 'TimeTicks', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Gauge32', 'iso', 'MibIdentifier', 'Counter32') (textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString') ntc_hw_unit_type_module = module_identity((1, 3, 6, 1, 4, 1, 94, 1, 16, 5, 3)) ntcHWUnitTypeModule.setRevisions(('1998-09-24 00:00', '1998-10-04 00:00', '1998-11-25 00:00', '1998-12-03 00:00', '1999-10-18 00:00', '1901-03-14 00:00', '1902-02-08 00:00')) if mibBuilder.loadTexts: ntcHWUnitTypeModule.setLastUpdated('9808270000Z') if mibBuilder.loadTexts: ntcHWUnitTypeModule.setOrganization('Nokia') ntc_hw_unit_none = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 1)) ntc_hw_unit_any = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 2)) ntc_hw_slot = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 21)) ntc_hw_backplane = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 22)) ntc_hw_unit_ian_nca_stm1_electrical = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 3)) ntc_hw_unit_nca_stm1_single_mode_optical = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 4)) ntc_hw_unit_nca_stm1_multi_mode_optical = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 5)) ntc_hw_unit_ian_asu = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 6)) ntc_hw_unit_ian4_port_v35 = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 7)) ntc_hw_unit_ian4_port_e1 = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 8)) ntc_hw_unit_ian4_port_msdsl = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 9)) ntc_hw_unit_ian_ip_fwrding_unit = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 10)) ntc_hw_unit_bban_alba_stm1_e = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 11)) ntc_hw_unit_bban_alba_stm1_om = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 12)) ntc_hw_unit_bban_alba_stm1_os = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 13)) ntc_hw_unit_bban_alba_e3 = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 14)) ntc_hw_unit_bban_sliu_adsl_mi_dmt = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 15)) ntc_hw_unit_bban_sliu_adsl_ad_dmt = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 16)) ntc_hw_unit_bban_sliu_e1_i75 = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 17)) ntc_hw_unit_bban_sliu_e1_i120 = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 18)) ntc_hw_unit_bban_backplane8 = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 19)) ntc_hw_unit_bban_backplane17 = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 20)) ntc_hw_unit_iprg_seq_crp = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 23)) ntc_hw_unit_iprg_seq_gplc1 = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 24)) ntc_hw_unit_iprg_seq_gplc2 = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 25)) ntc_hw_unit_iprg_seq_wslc = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 26)) ntc_hw_unit_iprg_eth1 = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 27)) ntc_hw_unit_iprg_eth2 = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 28)) ntc_hw_unit_iprg_eth4 = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 29)) ntc_hw_unit_iprg_atm = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 30)) ntc_hw_unit_iprg_x211 = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 31)) ntc_hw_unit_iprg_v351 = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 32)) ntc_hw_unit_iprg_x212 = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 33)) ntc_hw_unit_iprg_v352 = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 34)) ntc_hw_unit_iprg_hssi = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 35)) ntc_hw_unit_iprg_e1 = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 36)) ntc_hw_unit_iprg_t1 = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 37)) ntc_hw_unit_iprg_fddi = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 38)) ntc_hw_unit_iprg_tok = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 39)) ntc_hw_unit_iprg_isdn = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 40)) ntc_hw_unit_ipso_gig_eth1 = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 57)) ntc_hw_unit_ipso_ss7 = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 58)) ntc_hw_unit_ipso_crypto_accelerator = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 59)) ntc_hw_unit_iprg_backplane_ip110 = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 41)) ntc_hw_unit_iprg_backplane_ip330 = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 42)) ntc_hw_unit_iprg_backplane_ip440 = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 43)) ntc_hw_unit_iprg_backplane_ip530 = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 44)) ntc_hw_unit_iprg_backplane_ip650 = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 45)) ntc_hw_unit_iprg_backplane_ip730 = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 46)) ntc_hw_unit_iprg_backplane_seq9 = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 47)) ntc_hw_unit_iprg_backplane_seq18 = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 48)) ntc_hw_unit_iprg_chassis_ip110 = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 49)) ntc_hw_unit_iprg_chassis_ip330 = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 50)) ntc_hw_unit_iprg_chassis_ip440 = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 51)) ntc_hw_unit_iprg_chassis_ip530 = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 52)) ntc_hw_unit_iprg_chassis_ip650 = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 53)) ntc_hw_unit_iprg_chassis_ip730 = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 54)) ntc_hw_unit_iprg_chassis_seq9 = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 55)) ntc_hw_unit_iprg_chassis_seq18 = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 56)) ntc_hw_unit_ipso_hard_disk = mib_identifier((1, 3, 6, 1, 4, 1, 94, 1, 16, 7, 3, 60)) mibBuilder.exportSymbols('NOKIA-UNITTYPES-MIB', ntcHWUnitBbanAlbaE3=ntcHWUnitBbanAlbaE3, ntcHWUnitIprgSeqGplc1=ntcHWUnitIprgSeqGplc1, ntcHWUnitIprgSeqCrp=ntcHWUnitIprgSeqCrp, ntcHWUnitIprgBackplaneIP730=ntcHWUnitIprgBackplaneIP730, ntcHWUnitBbanAlbaStm1E=ntcHWUnitBbanAlbaStm1E, ntcHWUnitIan4PortMsdsl=ntcHWUnitIan4PortMsdsl, PYSNMP_MODULE_ID=ntcHWUnitTypeModule, ntcHWUnitIprgHssi=ntcHWUnitIprgHssi, ntcHWUnitIprgEth1=ntcHWUnitIprgEth1, ntcHWUnitBbanSliuAdslAdDmt=ntcHWUnitBbanSliuAdslAdDmt, ntcHWUnitIprgEth2=ntcHWUnitIprgEth2, ntcHWSlot=ntcHWSlot, ntcHWUnitIprgChassisSeq9=ntcHWUnitIprgChassisSeq9, ntcHWUnitAny=ntcHWUnitAny, ntcHWUnitIprgFddi=ntcHWUnitIprgFddi, ntcHWUnitIan4PortV35=ntcHWUnitIan4PortV35, ntcHWUnitIprgBackplaneIP530=ntcHWUnitIprgBackplaneIP530, ntcHWUnitIprgBackplaneIP650=ntcHWUnitIprgBackplaneIP650, ntcHWUnitIprgT1=ntcHWUnitIprgT1, ntcHWUnitIprgChassisIP440=ntcHWUnitIprgChassisIP440, ntcHWUnitIprgSeqWslc=ntcHWUnitIprgSeqWslc, ntcHWUnitIprgChassisIP650=ntcHWUnitIprgChassisIP650, ntcHWUnitBbanSliuAdslMiDmt=ntcHWUnitBbanSliuAdslMiDmt, ntcHWUnitIprgChassisIP530=ntcHWUnitIprgChassisIP530, ntcHWUnitIprgAtm=ntcHWUnitIprgAtm, ntcHWBackplane=ntcHWBackplane, ntcHWUnitIanASU=ntcHWUnitIanASU, ntcHWUnitBbanAlbaStm1Om=ntcHWUnitBbanAlbaStm1Om, ntcHWUnitBbanSliuE1I120=ntcHWUnitBbanSliuE1I120, ntcHWUnitIpsoSs7=ntcHWUnitIpsoSs7, ntcHWUnitIprgBackplaneSeq9=ntcHWUnitIprgBackplaneSeq9, ntcHWUnitBbanBackplane8=ntcHWUnitBbanBackplane8, ntcHWUnitIprgV351=ntcHWUnitIprgV351, ntcHWUnitIpsoCryptoAccelerator=ntcHWUnitIpsoCryptoAccelerator, ntcHWUnitIprgBackplaneIP440=ntcHWUnitIprgBackplaneIP440, ntcHWUnitIprgIsdn=ntcHWUnitIprgIsdn, ntcHWUnitIpsoGigEth1=ntcHWUnitIpsoGigEth1, ntcHWUnitIprgChassisIP110=ntcHWUnitIprgChassisIP110, ntcHWUnitIprgChassisSeq18=ntcHWUnitIprgChassisSeq18, ntcHWUnitIprgV352=ntcHWUnitIprgV352, ntcHWUnitNcaStm1SingleModeOptical=ntcHWUnitNcaStm1SingleModeOptical, ntcHWUnitBbanAlbaStm1Os=ntcHWUnitBbanAlbaStm1Os, ntcHWUnitIprgSeqGplc2=ntcHWUnitIprgSeqGplc2, ntcHWUnitIprgX211=ntcHWUnitIprgX211, ntcHWUnitIprgBackplaneIP110=ntcHWUnitIprgBackplaneIP110, ntcHWUnitIprgBackplaneIP330=ntcHWUnitIprgBackplaneIP330, ntcHWUnitIan4PortE1=ntcHWUnitIan4PortE1, ntcHWUnitIprgTok=ntcHWUnitIprgTok, ntcHWUnitIpsoHardDisk=ntcHWUnitIpsoHardDisk, ntcHWUnitIprgBackplaneSeq18=ntcHWUnitIprgBackplaneSeq18, ntcHWUnitIprgEth4=ntcHWUnitIprgEth4, ntcHWUnitTypeModule=ntcHWUnitTypeModule, ntcHWUnitNcaStm1MultiModeOptical=ntcHWUnitNcaStm1MultiModeOptical, ntcHWUnitBbanSliuE1I75=ntcHWUnitBbanSliuE1I75, ntcHWUnitIprgX212=ntcHWUnitIprgX212, ntcHWUnitIanNcaStm1Electrical=ntcHWUnitIanNcaStm1Electrical, ntcHWUnitIanIpFwrdingUnit=ntcHWUnitIanIpFwrdingUnit, ntcHWUnitIprgE1=ntcHWUnitIprgE1, ntcHWUnitIprgChassisIP330=ntcHWUnitIprgChassisIP330, ntcHWUnitNone=ntcHWUnitNone, ntcHWUnitBbanBackplane17=ntcHWUnitBbanBackplane17, ntcHWUnitIprgChassisIP730=ntcHWUnitIprgChassisIP730)
names = [ 'Noah', 'Liam', 'Mason', 'Jacob', 'William', 'Ethan', 'Michael', 'Alexander' ] surnames = [ 'Smith', 'Johnson', 'Williams', 'Jones', 'Brown', 'Davis', 'Miller', 'Wilson' ] streets_num = [ '357', '173', '543', '731', '276', '851', '624', '932' ] streets = [ 'Fulton St', 'Park Avenue', 'Lafayette Avenue', 'Dyer Avenue', 'Point Boulevard', 'Beaver St', 'Pearl St', 'South William St' ] cities = [ 'Chicago', 'Honolulu', 'Los Angeles', 'Atlanta', 'Nashville', 'Boston', 'San Antonio', 'New York' ] postal_codes = [ '01031', '01085', '00215', '01002', '00210', '01080', '01079', '01073' ] num_code = [ '215', '201', '209', '302', '270', '308', '316', '334' ]
names = ['Noah', 'Liam', 'Mason', 'Jacob', 'William', 'Ethan', 'Michael', 'Alexander'] surnames = ['Smith', 'Johnson', 'Williams', 'Jones', 'Brown', 'Davis', 'Miller', 'Wilson'] streets_num = ['357', '173', '543', '731', '276', '851', '624', '932'] streets = ['Fulton St', 'Park Avenue', 'Lafayette Avenue', 'Dyer Avenue', 'Point Boulevard', 'Beaver St', 'Pearl St', 'South William St'] cities = ['Chicago', 'Honolulu', 'Los Angeles', 'Atlanta', 'Nashville', 'Boston', 'San Antonio', 'New York'] postal_codes = ['01031', '01085', '00215', '01002', '00210', '01080', '01079', '01073'] num_code = ['215', '201', '209', '302', '270', '308', '316', '334']
def is_number(s): try: float(s) return True except ValueError: return False def parse_instruction(instruction): return instruction.split(' ') class Program: def __init__(self, program): self.registers = {} self.line = 0 self.program = program self.commands = {'mov': self.execute_mov, 'inc': self.execute_inc, 'dec': self.execute_dec, 'jnz': self.execute_jnz} def execute_mov(self, *params): [destination, origin] = params if is_number(origin): self.registers[destination] = int(float(origin)) else: self.registers[destination] = self.registers[origin] def execute_inc(self, *params): [register] = params self.registers[register] = self.registers[register] + 1 def execute_dec(self, *params): [register] = params self.registers[register] = self.registers[register] - 1 def execute_jnz(self, *params): [flag, inc] = params if is_number(flag): is_zero = int(float(flag)) == 0 else: is_zero = self.registers[flag] == 0 if not is_zero: self.line = self.line + int(float(inc)) - 1 def execute(self): instructions = [parse_instruction(instruction) for instruction in self.program] while self.line < len(instructions): instruction = instructions[self.line] self.commands[instruction[0]](*instruction[1:]) self.line = self.line + 1 return self.registers def simple_assembler(program): return Program(program).execute()
def is_number(s): try: float(s) return True except ValueError: return False def parse_instruction(instruction): return instruction.split(' ') class Program: def __init__(self, program): self.registers = {} self.line = 0 self.program = program self.commands = {'mov': self.execute_mov, 'inc': self.execute_inc, 'dec': self.execute_dec, 'jnz': self.execute_jnz} def execute_mov(self, *params): [destination, origin] = params if is_number(origin): self.registers[destination] = int(float(origin)) else: self.registers[destination] = self.registers[origin] def execute_inc(self, *params): [register] = params self.registers[register] = self.registers[register] + 1 def execute_dec(self, *params): [register] = params self.registers[register] = self.registers[register] - 1 def execute_jnz(self, *params): [flag, inc] = params if is_number(flag): is_zero = int(float(flag)) == 0 else: is_zero = self.registers[flag] == 0 if not is_zero: self.line = self.line + int(float(inc)) - 1 def execute(self): instructions = [parse_instruction(instruction) for instruction in self.program] while self.line < len(instructions): instruction = instructions[self.line] self.commands[instruction[0]](*instruction[1:]) self.line = self.line + 1 return self.registers def simple_assembler(program): return program(program).execute()
f2 = lambda x: (lambda : lambda y: x + y)() inc = f2(1) plus10 = f2(10) ___assertEqual(inc(1), 2) ___assertEqual(plus10(5), 15)
f2 = lambda x: (lambda : lambda y: x + y)() inc = f2(1) plus10 = f2(10) ___assert_equal(inc(1), 2) ___assert_equal(plus10(5), 15)
def staircase(n): for index in range(1, n+1): print(" " * (n-index) + "#" * index)
def staircase(n): for index in range(1, n + 1): print(' ' * (n - index) + '#' * index)
#!/usr/bin/env python def check_connected(device): return(device.connected)
def check_connected(device): return device.connected
class Deactivated(Exception): pass class NotApplicable(Exception): pass class NotUniqueError(Exception): pass
class Deactivated(Exception): pass class Notapplicable(Exception): pass class Notuniqueerror(Exception): pass
def findDecision(obj): #obj[0]: Passanger, obj[1]: Time, obj[2]: Coupon, obj[3]: Coupon_validity, obj[4]: Gender, obj[5]: Age, obj[6]: Children, obj[7]: Education, obj[8]: Occupation, obj[9]: Income, obj[10]: Bar, obj[11]: Coffeehouse, obj[12]: Restaurant20to50, obj[13]: Direction_same, obj[14]: Distance # {"feature": "Education", "instances": 34, "metric_value": 0.9975, "depth": 1} if obj[7]<=3: # {"feature": "Coupon", "instances": 28, "metric_value": 0.9403, "depth": 2} if obj[2]>1: # {"feature": "Age", "instances": 21, "metric_value": 0.9984, "depth": 3} if obj[5]<=2: # {"feature": "Occupation", "instances": 11, "metric_value": 0.8454, "depth": 4} if obj[8]<=14: # {"feature": "Passanger", "instances": 9, "metric_value": 0.5033, "depth": 5} if obj[0]<=2: return 'True' elif obj[0]>2: # {"feature": "Time", "instances": 2, "metric_value": 1.0, "depth": 6} if obj[1]<=2: return 'False' elif obj[1]>2: return 'True' else: return 'True' else: return 'False' elif obj[8]>14: return 'False' else: return 'False' elif obj[5]>2: # {"feature": "Coffeehouse", "instances": 10, "metric_value": 0.7219, "depth": 4} if obj[11]<=1.0: # {"feature": "Income", "instances": 9, "metric_value": 0.5033, "depth": 5} if obj[9]>0: return 'False' elif obj[9]<=0: # {"feature": "Bar", "instances": 3, "metric_value": 0.9183, "depth": 6} if obj[10]>0.0: return 'False' elif obj[10]<=0.0: return 'True' else: return 'True' else: return 'False' elif obj[11]>1.0: return 'True' else: return 'True' else: return 'False' elif obj[2]<=1: return 'False' else: return 'False' elif obj[7]>3: return 'True' else: return 'True'
def find_decision(obj): if obj[7] <= 3: if obj[2] > 1: if obj[5] <= 2: if obj[8] <= 14: if obj[0] <= 2: return 'True' elif obj[0] > 2: if obj[1] <= 2: return 'False' elif obj[1] > 2: return 'True' else: return 'True' else: return 'False' elif obj[8] > 14: return 'False' else: return 'False' elif obj[5] > 2: if obj[11] <= 1.0: if obj[9] > 0: return 'False' elif obj[9] <= 0: if obj[10] > 0.0: return 'False' elif obj[10] <= 0.0: return 'True' else: return 'True' else: return 'False' elif obj[11] > 1.0: return 'True' else: return 'True' else: return 'False' elif obj[2] <= 1: return 'False' else: return 'False' elif obj[7] > 3: return 'True' else: return 'True'
# Copyright (c) 2016-2017 Dustin Doloff # Licensed under Apache License v2.0 load( "@bazel_toolbox//labels:labels.bzl", "executable_label", ) load( "@io_bazel_rules_sass//sass:sass.bzl", "sass_binary", ) def _assert_descending_sizes_impl(ctx): ctx.actions.run( mnemonic = "AssertingFilesOfDescendingSizes", arguments = [ "--stamp", ctx.outputs.stamp_file.path, ] + ["--files"] + [file.path for file in ctx.files.files], inputs = ctx.files.files, tools = [ctx.executable._assert_descending_sizes], executable = ctx.executable._assert_descending_sizes, outputs = [ ctx.outputs.stamp_file, ], ) def _assert_valid_type_impl(ctx): if ctx.attr.type in ["bmp", "html", "json", "png"]: ctx.actions.run( mnemonic = "AssertingValidFile", arguments = [ "--type", ctx.attr.type, "--stamp", ctx.outputs.stamp_file.path, ] + ["--files"] + [file.path for file in ctx.files.files], inputs = ctx.files.files, tools = [ctx.executable._assert_valid_type], executable = ctx.executable._assert_valid_type, outputs = [ ctx.outputs.stamp_file, ], ) elif ctx.attr.type in ["js", "css"]: ctx.actions.run( mnemonic = "AssertingValidFile", arguments = [file.path for file in ctx.files.files] + [ "--type", ctx.attr.type, "-o", ctx.outputs.stamp_file.path, ], inputs = ctx.files.files, tools = [ctx.executable._yui_binary], executable = ctx.executable._yui_binary, outputs = [ ctx.outputs.stamp_file, ], ) else: fail("Unsupported type: " + ctx.attr.type) _assert_descending_sizes = rule( attrs = { "files": attr.label_list( allow_empty = False, allow_files = True, mandatory = True, ), "_assert_descending_sizes": executable_label(Label("//test:assert_descending_sizes")), }, outputs = { "stamp_file": "assert/descending_sizes/%{name}.stamp", }, implementation = _assert_descending_sizes_impl, ) _assert_valid_type = rule( attrs = { "files": attr.label( mandatory = True, ), "type": attr.string( mandatory = True, values = [ "bmp", "css", "html", "js", "json", "png", "scss", ], ), "_assert_valid_type": executable_label(Label("//test:assert_valid_type")), "_yui_binary": executable_label(Label("//:yui_compressor")), }, outputs = { "stamp_file": "assert/valid_type/%{name}.stamp", }, implementation = _assert_valid_type_impl, ) def _normalize_name(name): # These names can make the paths extra long so use abbreviations return name.replace(" ", "-").replace(":", "_cln_").replace("\"", "_qte_").replace("{", "_ocbr_").replace("}", "_ccbr_").replace("[", "_osbr_").replace("]", "_csbr_") def assert_descending_sizes(files): if type(files) != "list": files = [files] name = "assert_descending_sizes_{files}".format(files = "-".join(files)) name = _normalize_name(name) _assert_descending_sizes( name = name, files = files, ) def assert_valid_type(files, file_type): name = "assert_valid_type_{files}_{type}".format(files = files, type = file_type) name = _normalize_name(name) if file_type == "scss": if type(files) != "list": files = [files] for file in files: sass_binary( name = _normalize_name("{prefix}_{file}".format(prefix = name, file = file)), src = file, ) return else: _assert_valid_type( name = name, files = files, type = file_type, )
load('@bazel_toolbox//labels:labels.bzl', 'executable_label') load('@io_bazel_rules_sass//sass:sass.bzl', 'sass_binary') def _assert_descending_sizes_impl(ctx): ctx.actions.run(mnemonic='AssertingFilesOfDescendingSizes', arguments=['--stamp', ctx.outputs.stamp_file.path] + ['--files'] + [file.path for file in ctx.files.files], inputs=ctx.files.files, tools=[ctx.executable._assert_descending_sizes], executable=ctx.executable._assert_descending_sizes, outputs=[ctx.outputs.stamp_file]) def _assert_valid_type_impl(ctx): if ctx.attr.type in ['bmp', 'html', 'json', 'png']: ctx.actions.run(mnemonic='AssertingValidFile', arguments=['--type', ctx.attr.type, '--stamp', ctx.outputs.stamp_file.path] + ['--files'] + [file.path for file in ctx.files.files], inputs=ctx.files.files, tools=[ctx.executable._assert_valid_type], executable=ctx.executable._assert_valid_type, outputs=[ctx.outputs.stamp_file]) elif ctx.attr.type in ['js', 'css']: ctx.actions.run(mnemonic='AssertingValidFile', arguments=[file.path for file in ctx.files.files] + ['--type', ctx.attr.type, '-o', ctx.outputs.stamp_file.path], inputs=ctx.files.files, tools=[ctx.executable._yui_binary], executable=ctx.executable._yui_binary, outputs=[ctx.outputs.stamp_file]) else: fail('Unsupported type: ' + ctx.attr.type) _assert_descending_sizes = rule(attrs={'files': attr.label_list(allow_empty=False, allow_files=True, mandatory=True), '_assert_descending_sizes': executable_label(label('//test:assert_descending_sizes'))}, outputs={'stamp_file': 'assert/descending_sizes/%{name}.stamp'}, implementation=_assert_descending_sizes_impl) _assert_valid_type = rule(attrs={'files': attr.label(mandatory=True), 'type': attr.string(mandatory=True, values=['bmp', 'css', 'html', 'js', 'json', 'png', 'scss']), '_assert_valid_type': executable_label(label('//test:assert_valid_type')), '_yui_binary': executable_label(label('//:yui_compressor'))}, outputs={'stamp_file': 'assert/valid_type/%{name}.stamp'}, implementation=_assert_valid_type_impl) def _normalize_name(name): return name.replace(' ', '-').replace(':', '_cln_').replace('"', '_qte_').replace('{', '_ocbr_').replace('}', '_ccbr_').replace('[', '_osbr_').replace(']', '_csbr_') def assert_descending_sizes(files): if type(files) != 'list': files = [files] name = 'assert_descending_sizes_{files}'.format(files='-'.join(files)) name = _normalize_name(name) _assert_descending_sizes(name=name, files=files) def assert_valid_type(files, file_type): name = 'assert_valid_type_{files}_{type}'.format(files=files, type=file_type) name = _normalize_name(name) if file_type == 'scss': if type(files) != 'list': files = [files] for file in files: sass_binary(name=_normalize_name('{prefix}_{file}'.format(prefix=name, file=file)), src=file) return else: _assert_valid_type(name=name, files=files, type=file_type)
MIN_BRANCH_ROTATION = 3 NUM_TRIES = 100 BRANCH_RATIO_FACTOR = 0.5 NEW_BRANCH_RATIO_FACTOR = 0.7 NUM_SIDES_FACTOR = 0.05 BRANCH_MIN_THICKNESS = 0.05
min_branch_rotation = 3 num_tries = 100 branch_ratio_factor = 0.5 new_branch_ratio_factor = 0.7 num_sides_factor = 0.05 branch_min_thickness = 0.05
# class Solution: # def fibonacci(self, n): # a = 0 # b = 1 # for i in range(n - 1): # a, b = b, a + b # return a # if __name__ == "__main__": # so = Solution() # print(so.fibonacci(100)) class Solution: def fibonacci(self, n): a,b = 0,1 num = 1 while num < n: a,b = b,a+b num += 1 return a if __name__ == "__main__": so = Solution() print(so.fibonacci(100))
class Solution: def fibonacci(self, n): (a, b) = (0, 1) num = 1 while num < n: (a, b) = (b, a + b) num += 1 return a if __name__ == '__main__': so = solution() print(so.fibonacci(100))
trp_player = 0 trp_multiplayer_profile_troop_male = 1 trp_multiplayer_profile_troop_female = 2 trp_temp_troop = 3 trp_temp_array_a = 4 trp_multiplayer_data = 5 trp_british_infantry_ai = 6 trp_british_infantry2_ai = 7 trp_british_highlander_ai = 8 trp_british_foot_guard_ai = 9 trp_british_light_infantry_ai = 10 trp_british_rifle_ai = 11 trp_british_light_dragoon_ai = 12 trp_british_dragoon_ai = 13 trp_british_horseguard_ai = 14 trp_british_arty_ai = 15 trp_british_arty_alt_ai = 16 trp_british_rocket_ai = 17 trp_french_infantry_ai = 18 trp_french_infantry2_ai = 19 trp_french_infantry_vistula_ai = 20 trp_french_old_guard_ai = 21 trp_french_voltigeur_ai = 22 trp_french_hussar_ai = 23 trp_french_lancer_ai = 24 trp_french_dragoon_ai = 25 trp_french_cuirassier_ai = 26 trp_french_carabineer_ai = 27 trp_french_grenadier_a_cheval_ai = 28 trp_french_arty_ai = 29 trp_french_arty_alt_ai = 30 trp_prussian_infantry_ai = 31 trp_prussian_infantry2_ai = 32 trp_prussian_infantry_kurmark_ai = 33 trp_prussian_infantry_freikorps_ai = 34 trp_prussian_infantry_15_ai = 35 trp_prussian_infantry_rifle_ai = 36 trp_prussian_dragoon_ai = 37 trp_prussian_hussar_ai = 38 trp_prussian_landwehr_cav_ai = 39 trp_prussian_cuirassier_ai = 40 trp_prussian_arty_ai = 41 trp_prussian_arty_alt_ai = 42 trp_russian_partizan_ai = 43 trp_russian_opol_ai = 44 trp_russian_infantry_ai = 45 trp_russian_grenadier_ai = 46 trp_russian_foot_guard_ai = 47 trp_russian_infantry_rifle_ai = 48 trp_russian_hussar_ai = 49 trp_russian_uhlan_ai = 50 trp_russian_cossack_ai = 51 trp_russian_dragoon_ai = 52 trp_russian_horse_guard_ai = 53 trp_russian_arty_ai = 54 trp_russian_arty_alt_ai = 55 trp_austrian_infantry_ai = 56 trp_austrian_infantry2_ai = 57 trp_austrian_grenzer_ai = 58 trp_austrian_grenadier_ai = 59 trp_austrian_infantry_rifle_ai = 60 trp_austrian_hussar_ai = 61 trp_austrian_uhlan_ai = 62 trp_austrian_light_horse_ai = 63 trp_austrian_dragoon_ai = 64 trp_austrian_cuirassier_ai = 65 trp_austrian_arty_ai = 66 trp_austrian_arty_alt_ai = 67 trp_british_infantry = 68 trp_british_infantry_nco = 69 trp_british_infantry_officer = 70 trp_british_infantry_drum = 71 trp_british_infantry_flute = 72 trp_british_infantry2 = 73 trp_british_infantry2_nco = 74 trp_british_infantry2_officer = 75 trp_british_infantry2_drum = 76 trp_british_infantry2_flute = 77 trp_british_highlander = 78 trp_british_highlander_nco = 79 trp_british_highlander_officer = 80 trp_british_highlander_drum = 81 trp_british_highlander_pipes = 82 trp_british_foot_guard = 83 trp_british_foot_guard_nco = 84 trp_british_foot_guard_officer = 85 trp_british_foot_guard_drum = 86 trp_british_foot_guard_flute = 87 trp_british_light_infantry = 88 trp_british_light_infantry_nco = 89 trp_british_light_infantry_officer = 90 trp_british_light_infantry_horn = 91 trp_british_rifle = 92 trp_british_rifle_nco = 93 trp_british_rifle_officer = 94 trp_british_rifle_horn = 95 trp_british_light_dragoon = 96 trp_british_light_dragoon_nco = 97 trp_british_light_dragoon_officer = 98 trp_british_light_dragoon_bugle = 99 trp_british_dragoon = 100 trp_british_dragoon_nco = 101 trp_british_dragoon_officer = 102 trp_british_dragoon_bugle = 103 trp_british_horseguard = 104 trp_british_horseguard_nco = 105 trp_british_horseguard_officer = 106 trp_british_horseguard_bugle = 107 trp_british_arty = 108 trp_british_arty_nco = 109 trp_british_arty_officer = 110 trp_british_rocket = 111 trp_british_sapper = 112 trp_wellington = 113 trp_french_infantry = 114 trp_french_infantry_nco = 115 trp_french_infantry_officer = 116 trp_french_infantry_drum = 117 trp_french_infantry_flute = 118 trp_french_infantry2 = 119 trp_french_infantry2_nco = 120 trp_french_infantry2_officer = 121 trp_french_infantry2_drum = 122 trp_french_infantry2_flute = 123 trp_french_infantry_vistula = 124 trp_french_infantry_vistula_colours = 125 trp_french_infantry_vistula_officer = 126 trp_french_infantry_vistula_drum = 127 trp_french_infantry_vistula_flute = 128 trp_french_old_guard = 129 trp_french_old_guard_nco = 130 trp_french_old_guard_officer = 131 trp_french_old_guard_drum = 132 trp_french_old_guard_flute = 133 trp_french_voltigeur = 134 trp_french_voltigeur_colours = 135 trp_french_voltigeur_officer = 136 trp_french_voltigeur_horn = 137 trp_french_hussar = 138 trp_french_hussar_nco = 139 trp_french_hussar_officer = 140 trp_french_hussar_trumpet = 141 trp_french_lancer = 142 trp_french_lancer_nco = 143 trp_french_lancer_officer = 144 trp_french_lancer_trumpet = 145 trp_french_dragoon = 146 trp_french_dragoon_nco = 147 trp_french_dragoon_officer = 148 trp_french_dragoon_trumpet = 149 trp_french_cuirassier = 150 trp_french_cuirassier_nco = 151 trp_french_cuirassier_officer = 152 trp_french_cuirassier_trumpet = 153 trp_french_carabineer = 154 trp_french_carabineer_nco = 155 trp_french_carabineer_officer = 156 trp_french_carabineer_trumpet = 157 trp_french_grenadier_a_cheval = 158 trp_french_grenadier_a_cheval_nco = 159 trp_french_grenadier_a_cheval_officer = 160 trp_french_grenadier_a_cheval_trumpet = 161 trp_french_arty = 162 trp_french_arty_nco = 163 trp_french_arty_officer = 164 trp_french_sapper = 165 trp_napoleon = 166 trp_prussian_infantry = 167 trp_prussian_infantry_nco = 168 trp_prussian_infantry_officer = 169 trp_prussian_infantry_drum = 170 trp_prussian_infantry_flute = 171 trp_prussian_infantry2 = 172 trp_prussian_infantry2_nco = 173 trp_prussian_infantry2_officer = 174 trp_prussian_infantry2_drum = 175 trp_prussian_infantry2_flute = 176 trp_prussian_infantry_kurmark = 177 trp_prussian_infantry_kurmark_nco = 178 trp_prussian_infantry_kurmark_officer = 179 trp_prussian_infantry_kurmark_drum = 180 trp_prussian_infantry_kurmark_flute = 181 trp_prussian_infantry_freikorps = 182 trp_prussian_infantry_freikorps_nco = 183 trp_prussian_infantry_freikorps_officer = 184 trp_prussian_infantry_freikorps_drum = 185 trp_prussian_infantry_freikorps_flute = 186 trp_prussian_infantry_15 = 187 trp_prussian_infantry_15_nco = 188 trp_prussian_infantry_15_officer = 189 trp_prussian_infantry_15_drum = 190 trp_stupid_dummy_troop = 191 trp_prussian_infantry_15_flute = 192 trp_prussian_infantry_rifle = 193 trp_prussian_infantry_rifle_nco = 194 trp_prussian_infantry_rifle_officer = 195 trp_prussian_infantry_rifle_horn = 196 trp_prussian_dragoon = 197 trp_prussian_dragoon_nco = 198 trp_prussian_dragoon_officer = 199 trp_prussian_dragoon_trumpet = 200 trp_prussian_hussar = 201 trp_prussian_hussar_nco = 202 trp_prussian_hussar_officer = 203 trp_prussian_hussar_trumpet = 204 trp_prussian_landwehr_cav = 205 trp_prussian_landwehr_cav_nco = 206 trp_prussian_landwehr_cav_officer = 207 trp_prussian_landwehr_cav_trumpet = 208 trp_prussian_cuirassier = 209 trp_prussian_cuirassier_nco = 210 trp_prussian_cuirassier_officer = 211 trp_prussian_cuirassier_trumpet = 212 trp_prussian_arty = 213 trp_prussian_arty_nco = 214 trp_prussian_arty_officer = 215 trp_prussian_sapper = 216 trp_prussian_blucher = 217 trp_russian_partizan = 218 trp_russian_opol = 219 trp_russian_opol_nco = 220 trp_russian_opol_officer = 221 trp_russian_infantry = 222 trp_russian_infantry_nco = 223 trp_russian_infantry_officer = 224 trp_russian_infantry_drum = 225 trp_russian_infantry_flute = 226 trp_russian_grenadier = 227 trp_russian_grenadier_nco = 228 trp_russian_grenadier_officer = 229 trp_russian_grenadier_drum = 230 trp_russian_grenadier_flute = 231 trp_russian_foot_guard = 232 trp_russian_foot_guard_nco = 233 trp_russian_foot_guard_officer = 234 trp_russian_foot_guard_drum = 235 trp_russian_foot_guard_flute = 236 trp_russian_infantry_rifle = 237 trp_russian_infantry_rifle_nco = 238 trp_russian_infantry_rifle_officer = 239 trp_russian_infantry_rifle_horn = 240 trp_russian_hussar = 241 trp_russian_hussar_nco = 242 trp_russian_hussar_officer = 243 trp_russian_hussar_trumpet = 244 trp_russian_uhlan = 245 trp_russian_uhlan_nco = 246 trp_russian_uhlan_officer = 247 trp_russian_uhlan_trumpet = 248 trp_russian_cossack = 249 trp_russian_cossack_nco = 250 trp_russian_cossack_officer = 251 trp_russian_dragoon = 252 trp_russian_dragoon_nco = 253 trp_russian_dragoon_officer = 254 trp_russian_dragoon_trumpet = 255 trp_russian_horse_guard = 256 trp_russian_horse_guard_nco = 257 trp_russian_horse_guard_officer = 258 trp_russian_horse_guard_trumpet = 259 trp_russian_arty = 260 trp_russian_arty_nco = 261 trp_russian_arty_officer = 262 trp_russian_sapper = 263 trp_kutuzov = 264 trp_austrian_infantry = 265 trp_austrian_infantry_nco = 266 trp_austrian_infantry_officer = 267 trp_austrian_infantry_drum = 268 trp_austrian_infantry_flute = 269 trp_austrian_infantry2 = 270 trp_austrian_infantry2_nco = 271 trp_austrian_infantry2_officer = 272 trp_austrian_infantry2_drum = 273 trp_austrian_infantry2_flute = 274 trp_austrian_grenzer = 275 trp_austrian_grenzer_nco = 276 trp_austrian_grenzer_officer = 277 trp_austrian_grenzer_drum = 278 trp_austrian_grenzer_flute = 279 trp_austrian_grenadier = 280 trp_austrian_grenadier_nco = 281 trp_austrian_grenadier_officer = 282 trp_austrian_grenadier_drum = 283 trp_austrian_grenadier_flute = 284 trp_austrian_infantry_rifle = 285 trp_austrian_infantry_rifle_nco = 286 trp_austrian_infantry_rifle_officer = 287 trp_austrian_infantry_rifle_horn = 288 trp_austrian_hussar = 289 trp_austrian_hussar_nco = 290 trp_austrian_hussar_officer = 291 trp_austrian_hussar_trumpet = 292 trp_austrian_uhlan = 293 trp_austrian_uhlan_nco = 294 trp_austrian_uhlan_officer = 295 trp_austrian_uhlan_trumpet = 296 trp_austrian_light_horse = 297 trp_austrian_light_horse_nco = 298 trp_austrian_light_horse_officer = 299 trp_austrian_light_horse_trumpet = 300 trp_austrian_dragoon = 301 trp_austrian_dragoon_nco = 302 trp_austrian_dragoon_officer = 303 trp_austrian_dragoon_trumpet = 304 trp_austrian_cuirassier = 305 trp_austrian_cuirassier_nco = 306 trp_austrian_cuirassier_officer = 307 trp_austrian_cuirassier_trumpet = 308 trp_austrian_arty = 309 trp_austrian_arty_nco = 310 trp_austrian_arty_officer = 311 trp_austrian_sapper = 312 trp_schwarzenberg = 313 trp_british_arty_commander = 314 trp_british_arty_alt_commander = 315 trp_french_arty_commander = 316 trp_french_arty_alt_commander = 317 trp_prussian_arty_commander = 318 trp_prussian_arty_alt_commander = 319 trp_russian_arty_commander = 320 trp_russian_arty_alt_commander = 321 trp_austrian_arty_commander = 322 trp_austrian_arty_alt_commander = 323 trp_multiplayer_end = 324 trp_admin_dummy = 325 trp_flags_owned_dummy = 326 trp_entrypoints_dummy = 327 trp_entrypoints_per_flag_dummy = 328 trp_destroyed_props_dummy = 329 trp_troop_check_dummy = 330 trp_flag_select_dummy = 331 trp_track_select_dummy = 332 trp_custom_battle_dummy = 333 trp_ai_tactics_dummy = 334 trp_manual_dummy = 335 trp_x_pos = 336 trp_y_pos = 337 trp_x_size = 338 trp_y_size = 339 trp_quick_battle_troop_britain_1 = 340 trp_quick_battle_troop_france_1 = 341 trp_quick_battle_troop_prussia_1 = 342 trp_quick_battle_troop_russia_1 = 343 trp_quick_battle_troop_austria_1 = 344 trp_quick_battle_troops_end = 345 trp_companion_1 = 346 trp_companion_2 = 347 trp_companion_3 = 348 trp_companion_4 = 349 trp_companion_5 = 350 trp_companion_6 = 351 trp_companion_7 = 352 trp_companion_8 = 353 trp_companion_9 = 354 trp_companion_10 = 355 trp_companion_11 = 356 trp_companion_12 = 357 trp_companion_13 = 358 trp_companion_14 = 359 trp_companion_15 = 360 trp_companion_16 = 361 trp_companion_17 = 362 trp_companion_18 = 363 trp_companion_19 = 364 trp_companion_20 = 365 trp_companion_21 = 366 trp_companion_22 = 367 trp_companion_23 = 368 trp_companion_24 = 369 trp_companion_25 = 370 trp_companion_26 = 371 trp_companion_27 = 372 trp_companion_28 = 373 trp_companion_29 = 374 trp_companion_30 = 375 trp_companions_end = 376 trp_walker_french_infantry = 377 trp_walker_french_voltigeur = 378 trp_walker_french_hussar = 379 trp_walker_french_officer = 380 trp_walker_messenger = 381 trp_walker_peasant_male = 382 trp_walker_peasant_female = 383 trp_walkers_end = 384 trp_camp_armorer = 385 trp_camp_weaponsmith = 386 trp_camp_horse_merchant = 387 trp_merchants_end = 388
trp_player = 0 trp_multiplayer_profile_troop_male = 1 trp_multiplayer_profile_troop_female = 2 trp_temp_troop = 3 trp_temp_array_a = 4 trp_multiplayer_data = 5 trp_british_infantry_ai = 6 trp_british_infantry2_ai = 7 trp_british_highlander_ai = 8 trp_british_foot_guard_ai = 9 trp_british_light_infantry_ai = 10 trp_british_rifle_ai = 11 trp_british_light_dragoon_ai = 12 trp_british_dragoon_ai = 13 trp_british_horseguard_ai = 14 trp_british_arty_ai = 15 trp_british_arty_alt_ai = 16 trp_british_rocket_ai = 17 trp_french_infantry_ai = 18 trp_french_infantry2_ai = 19 trp_french_infantry_vistula_ai = 20 trp_french_old_guard_ai = 21 trp_french_voltigeur_ai = 22 trp_french_hussar_ai = 23 trp_french_lancer_ai = 24 trp_french_dragoon_ai = 25 trp_french_cuirassier_ai = 26 trp_french_carabineer_ai = 27 trp_french_grenadier_a_cheval_ai = 28 trp_french_arty_ai = 29 trp_french_arty_alt_ai = 30 trp_prussian_infantry_ai = 31 trp_prussian_infantry2_ai = 32 trp_prussian_infantry_kurmark_ai = 33 trp_prussian_infantry_freikorps_ai = 34 trp_prussian_infantry_15_ai = 35 trp_prussian_infantry_rifle_ai = 36 trp_prussian_dragoon_ai = 37 trp_prussian_hussar_ai = 38 trp_prussian_landwehr_cav_ai = 39 trp_prussian_cuirassier_ai = 40 trp_prussian_arty_ai = 41 trp_prussian_arty_alt_ai = 42 trp_russian_partizan_ai = 43 trp_russian_opol_ai = 44 trp_russian_infantry_ai = 45 trp_russian_grenadier_ai = 46 trp_russian_foot_guard_ai = 47 trp_russian_infantry_rifle_ai = 48 trp_russian_hussar_ai = 49 trp_russian_uhlan_ai = 50 trp_russian_cossack_ai = 51 trp_russian_dragoon_ai = 52 trp_russian_horse_guard_ai = 53 trp_russian_arty_ai = 54 trp_russian_arty_alt_ai = 55 trp_austrian_infantry_ai = 56 trp_austrian_infantry2_ai = 57 trp_austrian_grenzer_ai = 58 trp_austrian_grenadier_ai = 59 trp_austrian_infantry_rifle_ai = 60 trp_austrian_hussar_ai = 61 trp_austrian_uhlan_ai = 62 trp_austrian_light_horse_ai = 63 trp_austrian_dragoon_ai = 64 trp_austrian_cuirassier_ai = 65 trp_austrian_arty_ai = 66 trp_austrian_arty_alt_ai = 67 trp_british_infantry = 68 trp_british_infantry_nco = 69 trp_british_infantry_officer = 70 trp_british_infantry_drum = 71 trp_british_infantry_flute = 72 trp_british_infantry2 = 73 trp_british_infantry2_nco = 74 trp_british_infantry2_officer = 75 trp_british_infantry2_drum = 76 trp_british_infantry2_flute = 77 trp_british_highlander = 78 trp_british_highlander_nco = 79 trp_british_highlander_officer = 80 trp_british_highlander_drum = 81 trp_british_highlander_pipes = 82 trp_british_foot_guard = 83 trp_british_foot_guard_nco = 84 trp_british_foot_guard_officer = 85 trp_british_foot_guard_drum = 86 trp_british_foot_guard_flute = 87 trp_british_light_infantry = 88 trp_british_light_infantry_nco = 89 trp_british_light_infantry_officer = 90 trp_british_light_infantry_horn = 91 trp_british_rifle = 92 trp_british_rifle_nco = 93 trp_british_rifle_officer = 94 trp_british_rifle_horn = 95 trp_british_light_dragoon = 96 trp_british_light_dragoon_nco = 97 trp_british_light_dragoon_officer = 98 trp_british_light_dragoon_bugle = 99 trp_british_dragoon = 100 trp_british_dragoon_nco = 101 trp_british_dragoon_officer = 102 trp_british_dragoon_bugle = 103 trp_british_horseguard = 104 trp_british_horseguard_nco = 105 trp_british_horseguard_officer = 106 trp_british_horseguard_bugle = 107 trp_british_arty = 108 trp_british_arty_nco = 109 trp_british_arty_officer = 110 trp_british_rocket = 111 trp_british_sapper = 112 trp_wellington = 113 trp_french_infantry = 114 trp_french_infantry_nco = 115 trp_french_infantry_officer = 116 trp_french_infantry_drum = 117 trp_french_infantry_flute = 118 trp_french_infantry2 = 119 trp_french_infantry2_nco = 120 trp_french_infantry2_officer = 121 trp_french_infantry2_drum = 122 trp_french_infantry2_flute = 123 trp_french_infantry_vistula = 124 trp_french_infantry_vistula_colours = 125 trp_french_infantry_vistula_officer = 126 trp_french_infantry_vistula_drum = 127 trp_french_infantry_vistula_flute = 128 trp_french_old_guard = 129 trp_french_old_guard_nco = 130 trp_french_old_guard_officer = 131 trp_french_old_guard_drum = 132 trp_french_old_guard_flute = 133 trp_french_voltigeur = 134 trp_french_voltigeur_colours = 135 trp_french_voltigeur_officer = 136 trp_french_voltigeur_horn = 137 trp_french_hussar = 138 trp_french_hussar_nco = 139 trp_french_hussar_officer = 140 trp_french_hussar_trumpet = 141 trp_french_lancer = 142 trp_french_lancer_nco = 143 trp_french_lancer_officer = 144 trp_french_lancer_trumpet = 145 trp_french_dragoon = 146 trp_french_dragoon_nco = 147 trp_french_dragoon_officer = 148 trp_french_dragoon_trumpet = 149 trp_french_cuirassier = 150 trp_french_cuirassier_nco = 151 trp_french_cuirassier_officer = 152 trp_french_cuirassier_trumpet = 153 trp_french_carabineer = 154 trp_french_carabineer_nco = 155 trp_french_carabineer_officer = 156 trp_french_carabineer_trumpet = 157 trp_french_grenadier_a_cheval = 158 trp_french_grenadier_a_cheval_nco = 159 trp_french_grenadier_a_cheval_officer = 160 trp_french_grenadier_a_cheval_trumpet = 161 trp_french_arty = 162 trp_french_arty_nco = 163 trp_french_arty_officer = 164 trp_french_sapper = 165 trp_napoleon = 166 trp_prussian_infantry = 167 trp_prussian_infantry_nco = 168 trp_prussian_infantry_officer = 169 trp_prussian_infantry_drum = 170 trp_prussian_infantry_flute = 171 trp_prussian_infantry2 = 172 trp_prussian_infantry2_nco = 173 trp_prussian_infantry2_officer = 174 trp_prussian_infantry2_drum = 175 trp_prussian_infantry2_flute = 176 trp_prussian_infantry_kurmark = 177 trp_prussian_infantry_kurmark_nco = 178 trp_prussian_infantry_kurmark_officer = 179 trp_prussian_infantry_kurmark_drum = 180 trp_prussian_infantry_kurmark_flute = 181 trp_prussian_infantry_freikorps = 182 trp_prussian_infantry_freikorps_nco = 183 trp_prussian_infantry_freikorps_officer = 184 trp_prussian_infantry_freikorps_drum = 185 trp_prussian_infantry_freikorps_flute = 186 trp_prussian_infantry_15 = 187 trp_prussian_infantry_15_nco = 188 trp_prussian_infantry_15_officer = 189 trp_prussian_infantry_15_drum = 190 trp_stupid_dummy_troop = 191 trp_prussian_infantry_15_flute = 192 trp_prussian_infantry_rifle = 193 trp_prussian_infantry_rifle_nco = 194 trp_prussian_infantry_rifle_officer = 195 trp_prussian_infantry_rifle_horn = 196 trp_prussian_dragoon = 197 trp_prussian_dragoon_nco = 198 trp_prussian_dragoon_officer = 199 trp_prussian_dragoon_trumpet = 200 trp_prussian_hussar = 201 trp_prussian_hussar_nco = 202 trp_prussian_hussar_officer = 203 trp_prussian_hussar_trumpet = 204 trp_prussian_landwehr_cav = 205 trp_prussian_landwehr_cav_nco = 206 trp_prussian_landwehr_cav_officer = 207 trp_prussian_landwehr_cav_trumpet = 208 trp_prussian_cuirassier = 209 trp_prussian_cuirassier_nco = 210 trp_prussian_cuirassier_officer = 211 trp_prussian_cuirassier_trumpet = 212 trp_prussian_arty = 213 trp_prussian_arty_nco = 214 trp_prussian_arty_officer = 215 trp_prussian_sapper = 216 trp_prussian_blucher = 217 trp_russian_partizan = 218 trp_russian_opol = 219 trp_russian_opol_nco = 220 trp_russian_opol_officer = 221 trp_russian_infantry = 222 trp_russian_infantry_nco = 223 trp_russian_infantry_officer = 224 trp_russian_infantry_drum = 225 trp_russian_infantry_flute = 226 trp_russian_grenadier = 227 trp_russian_grenadier_nco = 228 trp_russian_grenadier_officer = 229 trp_russian_grenadier_drum = 230 trp_russian_grenadier_flute = 231 trp_russian_foot_guard = 232 trp_russian_foot_guard_nco = 233 trp_russian_foot_guard_officer = 234 trp_russian_foot_guard_drum = 235 trp_russian_foot_guard_flute = 236 trp_russian_infantry_rifle = 237 trp_russian_infantry_rifle_nco = 238 trp_russian_infantry_rifle_officer = 239 trp_russian_infantry_rifle_horn = 240 trp_russian_hussar = 241 trp_russian_hussar_nco = 242 trp_russian_hussar_officer = 243 trp_russian_hussar_trumpet = 244 trp_russian_uhlan = 245 trp_russian_uhlan_nco = 246 trp_russian_uhlan_officer = 247 trp_russian_uhlan_trumpet = 248 trp_russian_cossack = 249 trp_russian_cossack_nco = 250 trp_russian_cossack_officer = 251 trp_russian_dragoon = 252 trp_russian_dragoon_nco = 253 trp_russian_dragoon_officer = 254 trp_russian_dragoon_trumpet = 255 trp_russian_horse_guard = 256 trp_russian_horse_guard_nco = 257 trp_russian_horse_guard_officer = 258 trp_russian_horse_guard_trumpet = 259 trp_russian_arty = 260 trp_russian_arty_nco = 261 trp_russian_arty_officer = 262 trp_russian_sapper = 263 trp_kutuzov = 264 trp_austrian_infantry = 265 trp_austrian_infantry_nco = 266 trp_austrian_infantry_officer = 267 trp_austrian_infantry_drum = 268 trp_austrian_infantry_flute = 269 trp_austrian_infantry2 = 270 trp_austrian_infantry2_nco = 271 trp_austrian_infantry2_officer = 272 trp_austrian_infantry2_drum = 273 trp_austrian_infantry2_flute = 274 trp_austrian_grenzer = 275 trp_austrian_grenzer_nco = 276 trp_austrian_grenzer_officer = 277 trp_austrian_grenzer_drum = 278 trp_austrian_grenzer_flute = 279 trp_austrian_grenadier = 280 trp_austrian_grenadier_nco = 281 trp_austrian_grenadier_officer = 282 trp_austrian_grenadier_drum = 283 trp_austrian_grenadier_flute = 284 trp_austrian_infantry_rifle = 285 trp_austrian_infantry_rifle_nco = 286 trp_austrian_infantry_rifle_officer = 287 trp_austrian_infantry_rifle_horn = 288 trp_austrian_hussar = 289 trp_austrian_hussar_nco = 290 trp_austrian_hussar_officer = 291 trp_austrian_hussar_trumpet = 292 trp_austrian_uhlan = 293 trp_austrian_uhlan_nco = 294 trp_austrian_uhlan_officer = 295 trp_austrian_uhlan_trumpet = 296 trp_austrian_light_horse = 297 trp_austrian_light_horse_nco = 298 trp_austrian_light_horse_officer = 299 trp_austrian_light_horse_trumpet = 300 trp_austrian_dragoon = 301 trp_austrian_dragoon_nco = 302 trp_austrian_dragoon_officer = 303 trp_austrian_dragoon_trumpet = 304 trp_austrian_cuirassier = 305 trp_austrian_cuirassier_nco = 306 trp_austrian_cuirassier_officer = 307 trp_austrian_cuirassier_trumpet = 308 trp_austrian_arty = 309 trp_austrian_arty_nco = 310 trp_austrian_arty_officer = 311 trp_austrian_sapper = 312 trp_schwarzenberg = 313 trp_british_arty_commander = 314 trp_british_arty_alt_commander = 315 trp_french_arty_commander = 316 trp_french_arty_alt_commander = 317 trp_prussian_arty_commander = 318 trp_prussian_arty_alt_commander = 319 trp_russian_arty_commander = 320 trp_russian_arty_alt_commander = 321 trp_austrian_arty_commander = 322 trp_austrian_arty_alt_commander = 323 trp_multiplayer_end = 324 trp_admin_dummy = 325 trp_flags_owned_dummy = 326 trp_entrypoints_dummy = 327 trp_entrypoints_per_flag_dummy = 328 trp_destroyed_props_dummy = 329 trp_troop_check_dummy = 330 trp_flag_select_dummy = 331 trp_track_select_dummy = 332 trp_custom_battle_dummy = 333 trp_ai_tactics_dummy = 334 trp_manual_dummy = 335 trp_x_pos = 336 trp_y_pos = 337 trp_x_size = 338 trp_y_size = 339 trp_quick_battle_troop_britain_1 = 340 trp_quick_battle_troop_france_1 = 341 trp_quick_battle_troop_prussia_1 = 342 trp_quick_battle_troop_russia_1 = 343 trp_quick_battle_troop_austria_1 = 344 trp_quick_battle_troops_end = 345 trp_companion_1 = 346 trp_companion_2 = 347 trp_companion_3 = 348 trp_companion_4 = 349 trp_companion_5 = 350 trp_companion_6 = 351 trp_companion_7 = 352 trp_companion_8 = 353 trp_companion_9 = 354 trp_companion_10 = 355 trp_companion_11 = 356 trp_companion_12 = 357 trp_companion_13 = 358 trp_companion_14 = 359 trp_companion_15 = 360 trp_companion_16 = 361 trp_companion_17 = 362 trp_companion_18 = 363 trp_companion_19 = 364 trp_companion_20 = 365 trp_companion_21 = 366 trp_companion_22 = 367 trp_companion_23 = 368 trp_companion_24 = 369 trp_companion_25 = 370 trp_companion_26 = 371 trp_companion_27 = 372 trp_companion_28 = 373 trp_companion_29 = 374 trp_companion_30 = 375 trp_companions_end = 376 trp_walker_french_infantry = 377 trp_walker_french_voltigeur = 378 trp_walker_french_hussar = 379 trp_walker_french_officer = 380 trp_walker_messenger = 381 trp_walker_peasant_male = 382 trp_walker_peasant_female = 383 trp_walkers_end = 384 trp_camp_armorer = 385 trp_camp_weaponsmith = 386 trp_camp_horse_merchant = 387 trp_merchants_end = 388
class IdentifierSeparator(): identifier_name = None def __init__(self, identifier_name): self.identifier_name = identifier_name def get_separated_identifier(self): separated_word: str = self.identifier_name last_char = separated_word[0] index = 1 while index < len(separated_word): current_char = separated_word[index] if last_char.islower() and current_char.isupper(): separated_word = self.insert_underscore(separated_word, index) index += 1 if last_char.isupper() and current_char.islower(): separated_word = self.insert_underscore_before(separated_word, index) index += 1 index += 1 last_char = current_char return self.split_word_at_underscores(separated_word) def insert_underscore(self, separated_word, index): return separated_word[:index] + "_" + separated_word[index:] def insert_underscore_before(self, separated_word, index): return separated_word[:index - 1] + "_" + separated_word[index - 1:] def split_word_at_underscores(self, separated_word): return [word for word in separated_word.lower().split("_") if len(word) > 0]
class Identifierseparator: identifier_name = None def __init__(self, identifier_name): self.identifier_name = identifier_name def get_separated_identifier(self): separated_word: str = self.identifier_name last_char = separated_word[0] index = 1 while index < len(separated_word): current_char = separated_word[index] if last_char.islower() and current_char.isupper(): separated_word = self.insert_underscore(separated_word, index) index += 1 if last_char.isupper() and current_char.islower(): separated_word = self.insert_underscore_before(separated_word, index) index += 1 index += 1 last_char = current_char return self.split_word_at_underscores(separated_word) def insert_underscore(self, separated_word, index): return separated_word[:index] + '_' + separated_word[index:] def insert_underscore_before(self, separated_word, index): return separated_word[:index - 1] + '_' + separated_word[index - 1:] def split_word_at_underscores(self, separated_word): return [word for word in separated_word.lower().split('_') if len(word) > 0]
# Basket settings OSCAR_BASKET_COOKIE_LIFETIME = 7*24*60*60 OSCAR_BASKET_COOKIE_OPEN = 'oscar_open_basket' OSCAR_BASKET_COOKIE_SAVED = 'oscar_saved_basket' # Currency OSCAR_DEFAULT_CURRENCY = 'GBP' # Max number of products to keep on the user's history OSCAR_RECENTLY_VIEWED_PRODUCTS = 4 # Image paths OSCAR_IMAGE_FOLDER = 'images/products/%Y/%m/' OSCAR_PROMOTION_FOLDER = 'images/promotions/' # Search settings OSCAR_SEARCH_SUGGEST_LIMIT = 10 # Checkout OSCAR_ALLOW_ANON_CHECKOUT = False # Partners OSCAR_PARTNER_WRAPPERS = {} # Promotions COUNTDOWN, LIST, SINGLE_PRODUCT, TABBED_BLOCK = ('Countdown', 'List', 'SingleProduct', 'TabbedBlock') OSCAR_PROMOTION_MERCHANDISING_BLOCK_TYPES = ( (COUNTDOWN, "Vertical list"), (LIST, "Horizontal list"), (TABBED_BLOCK, "Tabbed block"), (SINGLE_PRODUCT, "Single product"), ) # Reviews OSCAR_ALLOW_ANON_REVIEWS = True OSCAR_MODERATE_REVIEWS = False
oscar_basket_cookie_lifetime = 7 * 24 * 60 * 60 oscar_basket_cookie_open = 'oscar_open_basket' oscar_basket_cookie_saved = 'oscar_saved_basket' oscar_default_currency = 'GBP' oscar_recently_viewed_products = 4 oscar_image_folder = 'images/products/%Y/%m/' oscar_promotion_folder = 'images/promotions/' oscar_search_suggest_limit = 10 oscar_allow_anon_checkout = False oscar_partner_wrappers = {} (countdown, list, single_product, tabbed_block) = ('Countdown', 'List', 'SingleProduct', 'TabbedBlock') oscar_promotion_merchandising_block_types = ((COUNTDOWN, 'Vertical list'), (LIST, 'Horizontal list'), (TABBED_BLOCK, 'Tabbed block'), (SINGLE_PRODUCT, 'Single product')) oscar_allow_anon_reviews = True oscar_moderate_reviews = False
# PROBLEM 1: Shortest Word # Given a string of words, return the length of the shortest word(s). def find_short(sentence): # your code here sentence = sentence.split() shortest = len(sentence[0]) for word in sentence: if len(word) < shortest: shortest = len(word) print('shortest', shortest) return shortest # l: shortest word length # optimized solution def find_short(s): return min(len(x) for x in s.split()) # PROBLEM 2: Exes and Ohs # Check to see if a string has the same amount of 'x's and 'o's. The method must return a boolean and be case insensitive. The string can contains any char. def xo(s): s = s.lower() print('x count', s.count('x')) numX = 0 numO = 0 for target in s: if target == 'x': numX += 1 elif target == 'o': numO += 1 return numX == numO # optimized solution def xo(s): s = s.lower() return s.count('x') == s.count('o') # PROBLEM 3: Vowel count # Return the number (count) of vowels in the given string def getCount(string): vowels = { 'a': 0, 'e': 0, 'i': 0, 'o': 0, 'u': 0 } tally = 0 for char in string: if char in vowels: vowels[char] += 1 for count in vowels: tally += vowels[count] return tally # optimized solution v1 def getCount(inputStr): x = 0 for letter in inputStr: if letter in 'aeiouAEIOU': x += 1 return x # optimized solution v2 def getCount(inputStr): return sum(1 for letter in inputStr if let in "aeiouAEIOU")
def find_short(sentence): sentence = sentence.split() shortest = len(sentence[0]) for word in sentence: if len(word) < shortest: shortest = len(word) print('shortest', shortest) return shortest def find_short(s): return min((len(x) for x in s.split())) def xo(s): s = s.lower() print('x count', s.count('x')) num_x = 0 num_o = 0 for target in s: if target == 'x': num_x += 1 elif target == 'o': num_o += 1 return numX == numO def xo(s): s = s.lower() return s.count('x') == s.count('o') def get_count(string): vowels = {'a': 0, 'e': 0, 'i': 0, 'o': 0, 'u': 0} tally = 0 for char in string: if char in vowels: vowels[char] += 1 for count in vowels: tally += vowels[count] return tally def get_count(inputStr): x = 0 for letter in inputStr: if letter in 'aeiouAEIOU': x += 1 return x def get_count(inputStr): return sum((1 for letter in inputStr if let in 'aeiouAEIOU'))
def main(j, args, params, tags, tasklet): page = args.page page.addMessage(str(params.requestContext.params)) page.addMessage("this is a test macro tasklet") # use the page object to add content to the page # play with it you can debug in this tasklet # use #from pylabs.Shell import ipshellDebug,ipshell # print "DEBUG NOW IN TEST TASKLET FOR MACRO" # ipshell() return params def match(j, args, params, tags, tasklet): return True
def main(j, args, params, tags, tasklet): page = args.page page.addMessage(str(params.requestContext.params)) page.addMessage('this is a test macro tasklet') return params def match(j, args, params, tags, tasklet): return True
class parent: def __init__(self): self.y=40 self.x=50 def update(self): print(self.y) class child(parent): def __init__(self): parent.__init__(self) # def update(self): # print(self.x) c=child() c.update()
class Parent: def __init__(self): self.y = 40 self.x = 50 def update(self): print(self.y) class Child(parent): def __init__(self): parent.__init__(self) c = child() c.update()
DEBUG = True CELERY_ALWAYS_EAGER = True DATABASES = { 'default': { 'ENGINE': 'giscube.db.backends.postgis', 'NAME': os.environ.get('TEST_DB_NAME', 'test'), 'USER': os.environ.get('TEST_DB_USER', 'admin'), 'PASSWORD': os.environ.get('TEST_DB_PASSWORD', 'admin'), 'HOST': os.environ.get('TEST_DB_HOST', 'localhost'), 'PORT': os.environ.get('TEST_DB_PORT', '5432'), }, } MEDIA_ROOT = os.path.join('/tmp/', 'tests', 'media') MEDIA_URL = '/media/' SECRET_KEY = os.getenv( 'SECRET_KEY', 'c^y&lf98uw@ltecrs9s^_!7k7!&ent4i$k887)d&b@123ao*vp') INSTALLED_APPS = INSTALLED_APPS + ['tests'] LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'formatters': { 'simple': { 'format': '%(levelname)s %(message)s' }, }, 'handlers': { 'console': { 'class': 'logging.StreamHandler', 'formatter': 'simple' }, }, 'loggers': { '': { 'handlers': ['console'], 'level': 'ERROR', 'propagate': False, }, } }
debug = True celery_always_eager = True databases = {'default': {'ENGINE': 'giscube.db.backends.postgis', 'NAME': os.environ.get('TEST_DB_NAME', 'test'), 'USER': os.environ.get('TEST_DB_USER', 'admin'), 'PASSWORD': os.environ.get('TEST_DB_PASSWORD', 'admin'), 'HOST': os.environ.get('TEST_DB_HOST', 'localhost'), 'PORT': os.environ.get('TEST_DB_PORT', '5432')}} media_root = os.path.join('/tmp/', 'tests', 'media') media_url = '/media/' secret_key = os.getenv('SECRET_KEY', 'c^y&lf98uw@ltecrs9s^_!7k7!&ent4i$k887)d&b@123ao*vp') installed_apps = INSTALLED_APPS + ['tests'] logging = {'version': 1, 'disable_existing_loggers': False, 'formatters': {'simple': {'format': '%(levelname)s %(message)s'}}, 'handlers': {'console': {'class': 'logging.StreamHandler', 'formatter': 'simple'}}, 'loggers': {'': {'handlers': ['console'], 'level': 'ERROR', 'propagate': False}}}
def generate_hex(content): begin = "unsigned char game["+str(len(content))+"] = {" middle = "" end = " };" for byte in content: middle = middle + str(hex(byte))+"," final = begin+middle+end print(final) def open_file(file_path): try: f = open(file_path,"rb") content = f.read() generate_hex(content) f.close() except Exception as e: print(e) f.close() def main(): file_path = input('Insert CHIP-8 FilePath: ') print("Opening file: ",file_path) open_file(file_path) if __name__ == "__main__": main()
def generate_hex(content): begin = 'unsigned char game[' + str(len(content)) + '] = {' middle = '' end = ' };' for byte in content: middle = middle + str(hex(byte)) + ',' final = begin + middle + end print(final) def open_file(file_path): try: f = open(file_path, 'rb') content = f.read() generate_hex(content) f.close() except Exception as e: print(e) f.close() def main(): file_path = input('Insert CHIP-8 FilePath: ') print('Opening file: ', file_path) open_file(file_path) if __name__ == '__main__': main()
class Station(object): ''' classdocs ''' def __init__(self): self.platformNameSet = set() #note: this is for convenience only
class Station(object): """ classdocs """ def __init__(self): self.platformNameSet = set()
class PyNFTException(Exception): def __init__(self, rc, obj, msg): self.rc = rc self.obj = obj self.msg = msg
class Pynftexception(Exception): def __init__(self, rc, obj, msg): self.rc = rc self.obj = obj self.msg = msg
def count_letters(id=''): # chars = id.split('') counts = {} for char in id: if char in counts: counts[char] = counts[char] + 1 else: counts[char] = 1 # print('id = {}, counts = {}'.format(id, counts)) return counts f = open('input.txt', 'r') ids = [line.strip() for line in f] f.close() letter_counts = [count_letters(id) for id in ids] twos = 0 threes = 0 for id_letter_count in letter_counts: has_two = False has_three = False for char, count in id_letter_count.items(): has_two = has_two or count == 2 has_three = has_three or count == 3 twos = twos + (1 if has_two else 0) threes = threes + (1 if has_three else 0) checksum = twos * threes print('checksum: {}'.format(checksum))
def count_letters(id=''): counts = {} for char in id: if char in counts: counts[char] = counts[char] + 1 else: counts[char] = 1 return counts f = open('input.txt', 'r') ids = [line.strip() for line in f] f.close() letter_counts = [count_letters(id) for id in ids] twos = 0 threes = 0 for id_letter_count in letter_counts: has_two = False has_three = False for (char, count) in id_letter_count.items(): has_two = has_two or count == 2 has_three = has_three or count == 3 twos = twos + (1 if has_two else 0) threes = threes + (1 if has_three else 0) checksum = twos * threes print('checksum: {}'.format(checksum))
# # PySNMP MIB module APPN-DLUR-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/APPN-DLUR-MIB # Produced by pysmi-0.3.4 at Wed May 1 11:24:11 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # SnaControlPointName, = mibBuilder.importSymbols("APPN-MIB", "SnaControlPointName") OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") SingleValueConstraint, ValueSizeConstraint, ConstraintsUnion, ValueRangeConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ValueSizeConstraint", "ConstraintsUnion", "ValueRangeConstraint", "ConstraintsIntersection") snanauMIB, = mibBuilder.importSymbols("SNA-NAU-MIB", "snanauMIB") NotificationGroup, ModuleCompliance, ObjectGroup = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance", "ObjectGroup") MibScalar, MibTable, MibTableRow, MibTableColumn, Integer32, Unsigned32, TimeTicks, NotificationType, Gauge32, MibIdentifier, Counter64, Bits, ModuleIdentity, IpAddress, Counter32, ObjectIdentity, iso = mibBuilder.importSymbols("SNMPv2-SMI", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Integer32", "Unsigned32", "TimeTicks", "NotificationType", "Gauge32", "MibIdentifier", "Counter64", "Bits", "ModuleIdentity", "IpAddress", "Counter32", "ObjectIdentity", "iso") TextualConvention, DisplayString, TruthValue = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString", "TruthValue") dlurMIB = ModuleIdentity((1, 3, 6, 1, 2, 1, 34, 5)) if mibBuilder.loadTexts: dlurMIB.setLastUpdated('9705101500Z') if mibBuilder.loadTexts: dlurMIB.setOrganization('IETF SNA NAU MIB WG / AIW APPN/HPR MIBs SIG') if mibBuilder.loadTexts: dlurMIB.setContactInfo(' Bob Clouston Cisco Systems 7025 Kit Creek Road P.O. Box 14987 Research Triangle Park, NC 27709, USA Tel: 1 919 472 2333 E-mail: clouston@cisco.com Bob Moore IBM Corporation 800 Park Offices Drive RHJA/664 P.O. Box 12195 Research Triangle Park, NC 27709, USA Tel: 1 919 254 4436 E-mail: remoore@ralvm6.vnet.ibm.com ') if mibBuilder.loadTexts: dlurMIB.setDescription('This is the MIB module for objects used to manage network devices with DLUR capabilities. This MIB contains information that is useful for managing an APPN product that implements a DLUR (Dependent Logical Unit Requester). The DLUR product has a client/server relationship with an APPN product that implements a DLUS (Dependent Logical Unit Server).') dlurObjects = MibIdentifier((1, 3, 6, 1, 2, 1, 34, 5, 1)) dlurNodeInfo = MibIdentifier((1, 3, 6, 1, 2, 1, 34, 5, 1, 1)) dlurNodeCapabilities = MibIdentifier((1, 3, 6, 1, 2, 1, 34, 5, 1, 1, 1)) dlurNodeCpName = MibScalar((1, 3, 6, 1, 2, 1, 34, 5, 1, 1, 1, 1), SnaControlPointName()).setMaxAccess("readonly") if mibBuilder.loadTexts: dlurNodeCpName.setStatus('current') if mibBuilder.loadTexts: dlurNodeCpName.setDescription('Administratively assigned network name for the APPN node where this DLUR implementation resides. If this object has the same value as the appnNodeCpName object in the APPN MIB, then the two objects are referring to the same APPN node.') dlurReleaseLevel = MibScalar((1, 3, 6, 1, 2, 1, 34, 5, 1, 1, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(2, 2)).setFixedLength(2)).setMaxAccess("readonly") if mibBuilder.loadTexts: dlurReleaseLevel.setStatus('current') if mibBuilder.loadTexts: dlurReleaseLevel.setDescription("The DLUR release level of this implementation. This is the value that is encoded in the DLUR/DLUS Capabilites (CV 51). To insure consistent display, this one-byte value is encoded here as two displayable characters that are equivalent to a hexadecimal display. For example, if the one-byte value as encoded in CV51 is X'01', this object will contain the displayable string '01'.") dlurAnsSupport = MibScalar((1, 3, 6, 1, 2, 1, 34, 5, 1, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("continueOrStop", 1), ("stopOnly", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: dlurAnsSupport.setStatus('current') if mibBuilder.loadTexts: dlurAnsSupport.setDescription("Automatic Network Shutdown (ANS) capability of this node. - 'continueOrStop' indicates that the DLUR implementation supports either ANS value (continue or stop) as specified by the DLUS on ACTPU for each PU. - 'stopOnly' indicates that the DLUR implementation only supports the ANS value of stop. ANS = continue means that the DLUR node will keep LU-LU sessions active even if SSCP-PU and SSCP-LU control sessions are interrupted. ANS = stop means that LU-LU sessions will be interrupted when the SSCP-PU and SSCP-LU sessions are interrupted.") dlurMultiSubnetSupport = MibScalar((1, 3, 6, 1, 2, 1, 34, 5, 1, 1, 1, 4), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: dlurMultiSubnetSupport.setStatus('current') if mibBuilder.loadTexts: dlurMultiSubnetSupport.setDescription('Indication of whether this DLUR implementation can support CPSVRMGR sessions that cross NetId boundaries.') dlurDefaultDefPrimDlusName = MibScalar((1, 3, 6, 1, 2, 1, 34, 5, 1, 1, 1, 5), SnaControlPointName()).setMaxAccess("readonly") if mibBuilder.loadTexts: dlurDefaultDefPrimDlusName.setStatus('current') if mibBuilder.loadTexts: dlurDefaultDefPrimDlusName.setDescription('The SNA name of the defined default primary DLUS for all of the PUs served by this DLUR. This can be overridden for a particular PU by a defined primary DLUS for that PU, represented by the dlurPuDefPrimDlusName object.') dlurNetworkNameForwardingSupport = MibScalar((1, 3, 6, 1, 2, 1, 34, 5, 1, 1, 1, 6), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: dlurNetworkNameForwardingSupport.setStatus('current') if mibBuilder.loadTexts: dlurNetworkNameForwardingSupport.setDescription('Indication of whether this DLUR implementation supports forwarding of Network Name control vectors on ACTPUs and ACTLUs to DLUR-served PUs and their associated LUs. This object corresponds to byte 9. bit 3 of cv51.') dlurNondisDlusDlurSessDeactSup = MibScalar((1, 3, 6, 1, 2, 1, 34, 5, 1, 1, 1, 7), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: dlurNondisDlusDlurSessDeactSup.setStatus('current') if mibBuilder.loadTexts: dlurNondisDlusDlurSessDeactSup.setDescription("Indication of whether this DLUR implementation supports nondisruptive deactivation of its DLUR-DLUS sessions. Upon receiving from a DLUS an UNBIND for the CPSVRMGR pipe with sense data X'08A0 000B', a DLUR that supports this option immediately begins attempting to activate a CPSVRMGR pipe with a DLUS other than the one that sent the UNBIND. This object corresponds to byte 9. bit 4 of cv51.") dlurDefaultDefBackupDlusTable = MibTable((1, 3, 6, 1, 2, 1, 34, 5, 1, 1, 2), ) if mibBuilder.loadTexts: dlurDefaultDefBackupDlusTable.setStatus('current') if mibBuilder.loadTexts: dlurDefaultDefBackupDlusTable.setDescription('This table contains an ordered list of defined backup DLUSs for all of the PUs served by this DLUR. These can be overridden for a particular PU by a list of defined backup DLUSs for that PU, represented by the dlurPuDefBackupDlusNameTable. Entries in this table are ordered from most preferred default backup DLUS to least preferred.') dlurDefaultDefBackupDlusEntry = MibTableRow((1, 3, 6, 1, 2, 1, 34, 5, 1, 1, 2, 1), ).setIndexNames((0, "APPN-DLUR-MIB", "dlurDefaultDefBackupDlusIndex")) if mibBuilder.loadTexts: dlurDefaultDefBackupDlusEntry.setStatus('current') if mibBuilder.loadTexts: dlurDefaultDefBackupDlusEntry.setDescription('This table is indexed by an integer-valued index, which orders the entries from most preferred default backup DLUS to least preferred.') dlurDefaultDefBackupDlusIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 34, 5, 1, 1, 2, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4294967295))) if mibBuilder.loadTexts: dlurDefaultDefBackupDlusIndex.setStatus('current') if mibBuilder.loadTexts: dlurDefaultDefBackupDlusIndex.setDescription('Index for this table. The index values start at 1, which identifies the most preferred default backup DLUS.') dlurDefaultDefBackupDlusName = MibTableColumn((1, 3, 6, 1, 2, 1, 34, 5, 1, 1, 2, 1, 2), SnaControlPointName()).setMaxAccess("readonly") if mibBuilder.loadTexts: dlurDefaultDefBackupDlusName.setStatus('current') if mibBuilder.loadTexts: dlurDefaultDefBackupDlusName.setDescription('Fully qualified name of a default backup DLUS for PUs served by this DLUR.') dlurPuInfo = MibIdentifier((1, 3, 6, 1, 2, 1, 34, 5, 1, 2)) dlurPuTable = MibTable((1, 3, 6, 1, 2, 1, 34, 5, 1, 2, 1), ) if mibBuilder.loadTexts: dlurPuTable.setStatus('current') if mibBuilder.loadTexts: dlurPuTable.setDescription('Information about the PUs supported by this DLUR.') dlurPuEntry = MibTableRow((1, 3, 6, 1, 2, 1, 34, 5, 1, 2, 1, 1), ).setIndexNames((0, "APPN-DLUR-MIB", "dlurPuName")) if mibBuilder.loadTexts: dlurPuEntry.setStatus('current') if mibBuilder.loadTexts: dlurPuEntry.setDescription('Entry in a table of PU information, indexed by PU name.') dlurPuName = MibTableColumn((1, 3, 6, 1, 2, 1, 34, 5, 1, 2, 1, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 17))) if mibBuilder.loadTexts: dlurPuName.setStatus('current') if mibBuilder.loadTexts: dlurPuName.setDescription('Locally administered name of the PU.') dlurPuSscpSuppliedName = MibTableColumn((1, 3, 6, 1, 2, 1, 34, 5, 1, 2, 1, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 17))).setMaxAccess("readonly") if mibBuilder.loadTexts: dlurPuSscpSuppliedName.setStatus('current') if mibBuilder.loadTexts: dlurPuSscpSuppliedName.setDescription('The SNA name of the PU. This value is supplied to a PU by the SSCP that activated it. If a value has not been supplied, a zero-length string is returned.') dlurPuStatus = MibTableColumn((1, 3, 6, 1, 2, 1, 34, 5, 1, 2, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9))).clone(namedValues=NamedValues(("reset", 1), ("pendReqActpuRsp", 2), ("pendActpu", 3), ("pendActpuRsp", 4), ("active", 5), ("pendLinkact", 6), ("pendDactpuRsp", 7), ("pendInop", 8), ("pendInopActpu", 9)))).setMaxAccess("readonly") if mibBuilder.loadTexts: dlurPuStatus.setStatus('current') if mibBuilder.loadTexts: dlurPuStatus.setDescription('Status of the DLUR-supported PU. The following values are defined: reset(1) - reset pendReqActpuRsp(2) - pending a response from the DLUS to a Request ACTPU pendActpu(3) - pending an ACTPU from the DLUS pendActpuRsp(4) - pending an ACTPU response from the PU active(5) - active pendLinkact(6) - pending activation of the link to a downstream PU pendDactpuRsp(7) - pending a DACTPU response from the PU pendInop(8) - the CPSVRMGR pipe became inoperative while the DLUR was pending an ACTPU response from the PU pendInopActpu(9) - when the DLUR was in the pendInop state, a CPSVRMGR pipe became active and a new ACTPU was received over it, before a response to the previous ACTPU was received from the PU.') dlurPuAnsSupport = MibTableColumn((1, 3, 6, 1, 2, 1, 34, 5, 1, 2, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("continue", 1), ("stop", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: dlurPuAnsSupport.setStatus('current') if mibBuilder.loadTexts: dlurPuAnsSupport.setDescription("The Automatic Network Shutdown (ANS) support configured for this PU. This value (as configured by the network administrator) is sent by DLUS with ACTPU for each PU. - 'continue' means that the DLUR node will attempt to keep LU-LU sessions active even if SSCP-PU and SSCP-LU control sessions are interrupted. - 'stop' means that LU-LU sessions will be interrupted when the SSCP-PU and SSCP-LU sessions are interrupted.") dlurPuLocation = MibTableColumn((1, 3, 6, 1, 2, 1, 34, 5, 1, 2, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("internal", 1), ("downstream", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: dlurPuLocation.setStatus('current') if mibBuilder.loadTexts: dlurPuLocation.setDescription('Location of the DLUR-support PU: internal(1) - internal to the APPN node itself (no link) downstream(2) - downstream of the APPN node (connected via a link).') dlurPuLsName = MibTableColumn((1, 3, 6, 1, 2, 1, 34, 5, 1, 2, 1, 1, 6), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 10))).setMaxAccess("readonly") if mibBuilder.loadTexts: dlurPuLsName.setStatus('current') if mibBuilder.loadTexts: dlurPuLsName.setDescription('Administratively assigned name of the link station through which a downstream PU is connected to this DLUR. A zero-length string is returned for internal PUs. If this object has the same value as the appnLsName object in the APPN MIB, then the two are identifying the same link station.') dlurPuDlusSessnStatus = MibTableColumn((1, 3, 6, 1, 2, 1, 34, 5, 1, 2, 1, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("reset", 1), ("pendingActive", 2), ("active", 3), ("pendingInactive", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: dlurPuDlusSessnStatus.setStatus('current') if mibBuilder.loadTexts: dlurPuDlusSessnStatus.setDescription("Status of the control session to the DLUS identified in dlurPuActiveDlusName. This is a combination of the separate states for the contention-winner and contention-loser sessions: reset(1) - none of the cases below pendingActive(2) - either contention-winner session or contention-loser session is pending active active(3) - contention-winner and contention-loser sessions are both active pendingInactive(4) - either contention-winner session or contention-loser session is pending inactive - this test is made AFTER the 'pendingActive' test. The following matrix provides a different representation of how the values of this object are related to the individual states of the contention-winner and contention-loser sessions: Conwinner | pA | pI | A | X = !(pA | pI | A) C ++++++++++++++++++++++++++++++++++ o pA | 2 | 2 | 2 | 2 n ++++++++++++++++++++++++++++++++++ l pI | 2 | 4 | 4 | 4 o ++++++++++++++++++++++++++++++++++ s A | 2 | 4 | 3 | 1 e ++++++++++++++++++++++++++++++++++ r X | 2 | 4 | 1 | 1 ++++++++++++++++++++++++++++++++++ ") dlurPuActiveDlusName = MibTableColumn((1, 3, 6, 1, 2, 1, 34, 5, 1, 2, 1, 1, 8), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 17))).setMaxAccess("readonly") if mibBuilder.loadTexts: dlurPuActiveDlusName.setStatus('current') if mibBuilder.loadTexts: dlurPuActiveDlusName.setDescription('The SNA name of the active DLUS for this PU. If its length is not zero, this name follows the SnaControlPointName textual convention. A zero-length string indicates that the PU does not currently have an active DLUS.') dlurPuDefPrimDlusName = MibTableColumn((1, 3, 6, 1, 2, 1, 34, 5, 1, 2, 1, 1, 9), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 17))).setMaxAccess("readonly") if mibBuilder.loadTexts: dlurPuDefPrimDlusName.setStatus('current') if mibBuilder.loadTexts: dlurPuDefPrimDlusName.setDescription('The SNA name of the defined primary DLUS for this PU, if one has been defined. If present, this name follows the SnaControlPointName textual convention. A zero-length string indicates that no primary DLUS has been defined for this PU, in which case the global default represented by the dlurDefaultDefPrimDlusName object is used.') dlurPuDefBackupDlusTable = MibTable((1, 3, 6, 1, 2, 1, 34, 5, 1, 2, 2), ) if mibBuilder.loadTexts: dlurPuDefBackupDlusTable.setStatus('current') if mibBuilder.loadTexts: dlurPuDefBackupDlusTable.setDescription('This table contains an ordered list of defined backup DLUSs for those PUs served by this DLUR that have their own defined backup DLUSs. PUs that have no entries in this table use the global default backup DLUSs for the DLUR, represented by the dlurDefaultDefBackupDlusNameTable. Entries in this table are ordered from most preferred backup DLUS to least preferred for each PU.') dlurPuDefBackupDlusEntry = MibTableRow((1, 3, 6, 1, 2, 1, 34, 5, 1, 2, 2, 1), ).setIndexNames((0, "APPN-DLUR-MIB", "dlurPuDefBackupDlusPuName"), (0, "APPN-DLUR-MIB", "dlurPuDefBackupDlusIndex")) if mibBuilder.loadTexts: dlurPuDefBackupDlusEntry.setStatus('current') if mibBuilder.loadTexts: dlurPuDefBackupDlusEntry.setDescription('This table is indexed by PU name and by an integer-valued index, which orders the entries from most preferred backup DLUS for the PU to least preferred.') dlurPuDefBackupDlusPuName = MibTableColumn((1, 3, 6, 1, 2, 1, 34, 5, 1, 2, 2, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 17))) if mibBuilder.loadTexts: dlurPuDefBackupDlusPuName.setStatus('current') if mibBuilder.loadTexts: dlurPuDefBackupDlusPuName.setDescription('Locally administered name of the PU. If this object has the same value as the dlurPuName object, then the two are identifying the same PU.') dlurPuDefBackupDlusIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 34, 5, 1, 2, 2, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4294967295))) if mibBuilder.loadTexts: dlurPuDefBackupDlusIndex.setStatus('current') if mibBuilder.loadTexts: dlurPuDefBackupDlusIndex.setDescription('Secondary index for this table. The index values start at 1, which identifies the most preferred backup DLUS for the PU.') dlurPuDefBackupDlusName = MibTableColumn((1, 3, 6, 1, 2, 1, 34, 5, 1, 2, 2, 1, 3), SnaControlPointName()).setMaxAccess("readonly") if mibBuilder.loadTexts: dlurPuDefBackupDlusName.setStatus('current') if mibBuilder.loadTexts: dlurPuDefBackupDlusName.setDescription('Fully qualified name of a backup DLUS for this PU.') dlurDlusInfo = MibIdentifier((1, 3, 6, 1, 2, 1, 34, 5, 1, 3)) dlurDlusTable = MibTable((1, 3, 6, 1, 2, 1, 34, 5, 1, 3, 1), ) if mibBuilder.loadTexts: dlurDlusTable.setStatus('current') if mibBuilder.loadTexts: dlurDlusTable.setDescription('Information about DLUS control sessions.') dlurDlusEntry = MibTableRow((1, 3, 6, 1, 2, 1, 34, 5, 1, 3, 1, 1), ).setIndexNames((0, "APPN-DLUR-MIB", "dlurDlusName")) if mibBuilder.loadTexts: dlurDlusEntry.setStatus('current') if mibBuilder.loadTexts: dlurDlusEntry.setDescription('This entry is indexed by the name of the DLUS.') dlurDlusName = MibTableColumn((1, 3, 6, 1, 2, 1, 34, 5, 1, 3, 1, 1, 1), SnaControlPointName()) if mibBuilder.loadTexts: dlurDlusName.setStatus('current') if mibBuilder.loadTexts: dlurDlusName.setDescription('The SNA name of a DLUS with which this DLUR currently has a CPSVRMGR pipe established.') dlurDlusSessnStatus = MibTableColumn((1, 3, 6, 1, 2, 1, 34, 5, 1, 3, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("reset", 1), ("pendingActive", 2), ("active", 3), ("pendingInactive", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: dlurDlusSessnStatus.setStatus('current') if mibBuilder.loadTexts: dlurDlusSessnStatus.setDescription("Status of the CPSVRMGR pipe between the DLUR and this DLUS. This is a combination of the separate states for the contention-winner and contention-loser sessions: reset(1) - none of the cases below pendingActive(2) - either contention-winner session or contention-loser session is pending active active(3) - contention-winner and contention-loser sessions are both active pendingInactive(4) - either contention-winner session or contention-loser session is pending inactive - this test is made AFTER the 'pendingActive' test. The following matrix provides a different representation of how the values of this object are related to the individual states of the contention-winner and contention-loser sessions: Conwinner | pA | pI | A | X = !(pA | pI | A) C ++++++++++++++++++++++++++++++++++ o pA | 2 | 2 | 2 | 2 n ++++++++++++++++++++++++++++++++++ l pI | 2 | 4 | 4 | 4 o ++++++++++++++++++++++++++++++++++ s A | 2 | 4 | 3 | 1 e ++++++++++++++++++++++++++++++++++ r X | 2 | 4 | 1 | 1 ++++++++++++++++++++++++++++++++++ ") dlurConformance = MibIdentifier((1, 3, 6, 1, 2, 1, 34, 5, 2)) dlurCompliances = MibIdentifier((1, 3, 6, 1, 2, 1, 34, 5, 2, 1)) dlurGroups = MibIdentifier((1, 3, 6, 1, 2, 1, 34, 5, 2, 2)) dlurCompliance = ModuleCompliance((1, 3, 6, 1, 2, 1, 34, 5, 2, 1, 1)).setObjects(("APPN-DLUR-MIB", "dlurConfGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): dlurCompliance = dlurCompliance.setStatus('current') if mibBuilder.loadTexts: dlurCompliance.setDescription('The compliance statement for the SNMPv2 entities which implement the DLUR MIB.') dlurConfGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 34, 5, 2, 2, 1)).setObjects(("APPN-DLUR-MIB", "dlurNodeCpName"), ("APPN-DLUR-MIB", "dlurReleaseLevel"), ("APPN-DLUR-MIB", "dlurAnsSupport"), ("APPN-DLUR-MIB", "dlurMultiSubnetSupport"), ("APPN-DLUR-MIB", "dlurNetworkNameForwardingSupport"), ("APPN-DLUR-MIB", "dlurNondisDlusDlurSessDeactSup"), ("APPN-DLUR-MIB", "dlurDefaultDefPrimDlusName"), ("APPN-DLUR-MIB", "dlurDefaultDefBackupDlusName"), ("APPN-DLUR-MIB", "dlurPuSscpSuppliedName"), ("APPN-DLUR-MIB", "dlurPuStatus"), ("APPN-DLUR-MIB", "dlurPuAnsSupport"), ("APPN-DLUR-MIB", "dlurPuLocation"), ("APPN-DLUR-MIB", "dlurPuLsName"), ("APPN-DLUR-MIB", "dlurPuDlusSessnStatus"), ("APPN-DLUR-MIB", "dlurPuActiveDlusName"), ("APPN-DLUR-MIB", "dlurPuDefPrimDlusName"), ("APPN-DLUR-MIB", "dlurPuDefBackupDlusName"), ("APPN-DLUR-MIB", "dlurDlusSessnStatus")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): dlurConfGroup = dlurConfGroup.setStatus('current') if mibBuilder.loadTexts: dlurConfGroup.setDescription('A collection of objects providing information on an implementation of APPN DLUR.') mibBuilder.exportSymbols("APPN-DLUR-MIB", dlurNondisDlusDlurSessDeactSup=dlurNondisDlusDlurSessDeactSup, dlurPuStatus=dlurPuStatus, dlurPuEntry=dlurPuEntry, dlurPuTable=dlurPuTable, dlurDefaultDefBackupDlusName=dlurDefaultDefBackupDlusName, dlurGroups=dlurGroups, dlurDlusName=dlurDlusName, dlurPuDlusSessnStatus=dlurPuDlusSessnStatus, dlurPuDefPrimDlusName=dlurPuDefPrimDlusName, dlurDefaultDefPrimDlusName=dlurDefaultDefPrimDlusName, dlurNodeInfo=dlurNodeInfo, dlurPuAnsSupport=dlurPuAnsSupport, dlurReleaseLevel=dlurReleaseLevel, dlurConformance=dlurConformance, dlurObjects=dlurObjects, dlurDlusSessnStatus=dlurDlusSessnStatus, dlurMultiSubnetSupport=dlurMultiSubnetSupport, dlurPuDefBackupDlusPuName=dlurPuDefBackupDlusPuName, dlurPuDefBackupDlusName=dlurPuDefBackupDlusName, dlurCompliances=dlurCompliances, dlurDefaultDefBackupDlusEntry=dlurDefaultDefBackupDlusEntry, dlurDefaultDefBackupDlusIndex=dlurDefaultDefBackupDlusIndex, dlurPuDefBackupDlusTable=dlurPuDefBackupDlusTable, dlurPuInfo=dlurPuInfo, dlurPuDefBackupDlusEntry=dlurPuDefBackupDlusEntry, dlurConfGroup=dlurConfGroup, dlurDlusEntry=dlurDlusEntry, dlurDefaultDefBackupDlusTable=dlurDefaultDefBackupDlusTable, dlurPuDefBackupDlusIndex=dlurPuDefBackupDlusIndex, dlurPuActiveDlusName=dlurPuActiveDlusName, dlurAnsSupport=dlurAnsSupport, dlurNodeCapabilities=dlurNodeCapabilities, dlurPuSscpSuppliedName=dlurPuSscpSuppliedName, dlurNetworkNameForwardingSupport=dlurNetworkNameForwardingSupport, dlurCompliance=dlurCompliance, dlurMIB=dlurMIB, dlurNodeCpName=dlurNodeCpName, dlurPuLocation=dlurPuLocation, dlurPuName=dlurPuName, PYSNMP_MODULE_ID=dlurMIB, dlurPuLsName=dlurPuLsName, dlurDlusInfo=dlurDlusInfo, dlurDlusTable=dlurDlusTable)
(sna_control_point_name,) = mibBuilder.importSymbols('APPN-MIB', 'SnaControlPointName') (octet_string, object_identifier, integer) = mibBuilder.importSymbols('ASN1', 'OctetString', 'ObjectIdentifier', 'Integer') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (single_value_constraint, value_size_constraint, constraints_union, value_range_constraint, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'SingleValueConstraint', 'ValueSizeConstraint', 'ConstraintsUnion', 'ValueRangeConstraint', 'ConstraintsIntersection') (snanau_mib,) = mibBuilder.importSymbols('SNA-NAU-MIB', 'snanauMIB') (notification_group, module_compliance, object_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance', 'ObjectGroup') (mib_scalar, mib_table, mib_table_row, mib_table_column, integer32, unsigned32, time_ticks, notification_type, gauge32, mib_identifier, counter64, bits, module_identity, ip_address, counter32, object_identity, iso) = mibBuilder.importSymbols('SNMPv2-SMI', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Integer32', 'Unsigned32', 'TimeTicks', 'NotificationType', 'Gauge32', 'MibIdentifier', 'Counter64', 'Bits', 'ModuleIdentity', 'IpAddress', 'Counter32', 'ObjectIdentity', 'iso') (textual_convention, display_string, truth_value) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString', 'TruthValue') dlur_mib = module_identity((1, 3, 6, 1, 2, 1, 34, 5)) if mibBuilder.loadTexts: dlurMIB.setLastUpdated('9705101500Z') if mibBuilder.loadTexts: dlurMIB.setOrganization('IETF SNA NAU MIB WG / AIW APPN/HPR MIBs SIG') if mibBuilder.loadTexts: dlurMIB.setContactInfo(' Bob Clouston Cisco Systems 7025 Kit Creek Road P.O. Box 14987 Research Triangle Park, NC 27709, USA Tel: 1 919 472 2333 E-mail: clouston@cisco.com Bob Moore IBM Corporation 800 Park Offices Drive RHJA/664 P.O. Box 12195 Research Triangle Park, NC 27709, USA Tel: 1 919 254 4436 E-mail: remoore@ralvm6.vnet.ibm.com ') if mibBuilder.loadTexts: dlurMIB.setDescription('This is the MIB module for objects used to manage network devices with DLUR capabilities. This MIB contains information that is useful for managing an APPN product that implements a DLUR (Dependent Logical Unit Requester). The DLUR product has a client/server relationship with an APPN product that implements a DLUS (Dependent Logical Unit Server).') dlur_objects = mib_identifier((1, 3, 6, 1, 2, 1, 34, 5, 1)) dlur_node_info = mib_identifier((1, 3, 6, 1, 2, 1, 34, 5, 1, 1)) dlur_node_capabilities = mib_identifier((1, 3, 6, 1, 2, 1, 34, 5, 1, 1, 1)) dlur_node_cp_name = mib_scalar((1, 3, 6, 1, 2, 1, 34, 5, 1, 1, 1, 1), sna_control_point_name()).setMaxAccess('readonly') if mibBuilder.loadTexts: dlurNodeCpName.setStatus('current') if mibBuilder.loadTexts: dlurNodeCpName.setDescription('Administratively assigned network name for the APPN node where this DLUR implementation resides. If this object has the same value as the appnNodeCpName object in the APPN MIB, then the two objects are referring to the same APPN node.') dlur_release_level = mib_scalar((1, 3, 6, 1, 2, 1, 34, 5, 1, 1, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(2, 2)).setFixedLength(2)).setMaxAccess('readonly') if mibBuilder.loadTexts: dlurReleaseLevel.setStatus('current') if mibBuilder.loadTexts: dlurReleaseLevel.setDescription("The DLUR release level of this implementation. This is the value that is encoded in the DLUR/DLUS Capabilites (CV 51). To insure consistent display, this one-byte value is encoded here as two displayable characters that are equivalent to a hexadecimal display. For example, if the one-byte value as encoded in CV51 is X'01', this object will contain the displayable string '01'.") dlur_ans_support = mib_scalar((1, 3, 6, 1, 2, 1, 34, 5, 1, 1, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('continueOrStop', 1), ('stopOnly', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: dlurAnsSupport.setStatus('current') if mibBuilder.loadTexts: dlurAnsSupport.setDescription("Automatic Network Shutdown (ANS) capability of this node. - 'continueOrStop' indicates that the DLUR implementation supports either ANS value (continue or stop) as specified by the DLUS on ACTPU for each PU. - 'stopOnly' indicates that the DLUR implementation only supports the ANS value of stop. ANS = continue means that the DLUR node will keep LU-LU sessions active even if SSCP-PU and SSCP-LU control sessions are interrupted. ANS = stop means that LU-LU sessions will be interrupted when the SSCP-PU and SSCP-LU sessions are interrupted.") dlur_multi_subnet_support = mib_scalar((1, 3, 6, 1, 2, 1, 34, 5, 1, 1, 1, 4), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: dlurMultiSubnetSupport.setStatus('current') if mibBuilder.loadTexts: dlurMultiSubnetSupport.setDescription('Indication of whether this DLUR implementation can support CPSVRMGR sessions that cross NetId boundaries.') dlur_default_def_prim_dlus_name = mib_scalar((1, 3, 6, 1, 2, 1, 34, 5, 1, 1, 1, 5), sna_control_point_name()).setMaxAccess('readonly') if mibBuilder.loadTexts: dlurDefaultDefPrimDlusName.setStatus('current') if mibBuilder.loadTexts: dlurDefaultDefPrimDlusName.setDescription('The SNA name of the defined default primary DLUS for all of the PUs served by this DLUR. This can be overridden for a particular PU by a defined primary DLUS for that PU, represented by the dlurPuDefPrimDlusName object.') dlur_network_name_forwarding_support = mib_scalar((1, 3, 6, 1, 2, 1, 34, 5, 1, 1, 1, 6), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: dlurNetworkNameForwardingSupport.setStatus('current') if mibBuilder.loadTexts: dlurNetworkNameForwardingSupport.setDescription('Indication of whether this DLUR implementation supports forwarding of Network Name control vectors on ACTPUs and ACTLUs to DLUR-served PUs and their associated LUs. This object corresponds to byte 9. bit 3 of cv51.') dlur_nondis_dlus_dlur_sess_deact_sup = mib_scalar((1, 3, 6, 1, 2, 1, 34, 5, 1, 1, 1, 7), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: dlurNondisDlusDlurSessDeactSup.setStatus('current') if mibBuilder.loadTexts: dlurNondisDlusDlurSessDeactSup.setDescription("Indication of whether this DLUR implementation supports nondisruptive deactivation of its DLUR-DLUS sessions. Upon receiving from a DLUS an UNBIND for the CPSVRMGR pipe with sense data X'08A0 000B', a DLUR that supports this option immediately begins attempting to activate a CPSVRMGR pipe with a DLUS other than the one that sent the UNBIND. This object corresponds to byte 9. bit 4 of cv51.") dlur_default_def_backup_dlus_table = mib_table((1, 3, 6, 1, 2, 1, 34, 5, 1, 1, 2)) if mibBuilder.loadTexts: dlurDefaultDefBackupDlusTable.setStatus('current') if mibBuilder.loadTexts: dlurDefaultDefBackupDlusTable.setDescription('This table contains an ordered list of defined backup DLUSs for all of the PUs served by this DLUR. These can be overridden for a particular PU by a list of defined backup DLUSs for that PU, represented by the dlurPuDefBackupDlusNameTable. Entries in this table are ordered from most preferred default backup DLUS to least preferred.') dlur_default_def_backup_dlus_entry = mib_table_row((1, 3, 6, 1, 2, 1, 34, 5, 1, 1, 2, 1)).setIndexNames((0, 'APPN-DLUR-MIB', 'dlurDefaultDefBackupDlusIndex')) if mibBuilder.loadTexts: dlurDefaultDefBackupDlusEntry.setStatus('current') if mibBuilder.loadTexts: dlurDefaultDefBackupDlusEntry.setDescription('This table is indexed by an integer-valued index, which orders the entries from most preferred default backup DLUS to least preferred.') dlur_default_def_backup_dlus_index = mib_table_column((1, 3, 6, 1, 2, 1, 34, 5, 1, 1, 2, 1, 1), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4294967295))) if mibBuilder.loadTexts: dlurDefaultDefBackupDlusIndex.setStatus('current') if mibBuilder.loadTexts: dlurDefaultDefBackupDlusIndex.setDescription('Index for this table. The index values start at 1, which identifies the most preferred default backup DLUS.') dlur_default_def_backup_dlus_name = mib_table_column((1, 3, 6, 1, 2, 1, 34, 5, 1, 1, 2, 1, 2), sna_control_point_name()).setMaxAccess('readonly') if mibBuilder.loadTexts: dlurDefaultDefBackupDlusName.setStatus('current') if mibBuilder.loadTexts: dlurDefaultDefBackupDlusName.setDescription('Fully qualified name of a default backup DLUS for PUs served by this DLUR.') dlur_pu_info = mib_identifier((1, 3, 6, 1, 2, 1, 34, 5, 1, 2)) dlur_pu_table = mib_table((1, 3, 6, 1, 2, 1, 34, 5, 1, 2, 1)) if mibBuilder.loadTexts: dlurPuTable.setStatus('current') if mibBuilder.loadTexts: dlurPuTable.setDescription('Information about the PUs supported by this DLUR.') dlur_pu_entry = mib_table_row((1, 3, 6, 1, 2, 1, 34, 5, 1, 2, 1, 1)).setIndexNames((0, 'APPN-DLUR-MIB', 'dlurPuName')) if mibBuilder.loadTexts: dlurPuEntry.setStatus('current') if mibBuilder.loadTexts: dlurPuEntry.setDescription('Entry in a table of PU information, indexed by PU name.') dlur_pu_name = mib_table_column((1, 3, 6, 1, 2, 1, 34, 5, 1, 2, 1, 1, 1), display_string().subtype(subtypeSpec=value_size_constraint(1, 17))) if mibBuilder.loadTexts: dlurPuName.setStatus('current') if mibBuilder.loadTexts: dlurPuName.setDescription('Locally administered name of the PU.') dlur_pu_sscp_supplied_name = mib_table_column((1, 3, 6, 1, 2, 1, 34, 5, 1, 2, 1, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 17))).setMaxAccess('readonly') if mibBuilder.loadTexts: dlurPuSscpSuppliedName.setStatus('current') if mibBuilder.loadTexts: dlurPuSscpSuppliedName.setDescription('The SNA name of the PU. This value is supplied to a PU by the SSCP that activated it. If a value has not been supplied, a zero-length string is returned.') dlur_pu_status = mib_table_column((1, 3, 6, 1, 2, 1, 34, 5, 1, 2, 1, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9))).clone(namedValues=named_values(('reset', 1), ('pendReqActpuRsp', 2), ('pendActpu', 3), ('pendActpuRsp', 4), ('active', 5), ('pendLinkact', 6), ('pendDactpuRsp', 7), ('pendInop', 8), ('pendInopActpu', 9)))).setMaxAccess('readonly') if mibBuilder.loadTexts: dlurPuStatus.setStatus('current') if mibBuilder.loadTexts: dlurPuStatus.setDescription('Status of the DLUR-supported PU. The following values are defined: reset(1) - reset pendReqActpuRsp(2) - pending a response from the DLUS to a Request ACTPU pendActpu(3) - pending an ACTPU from the DLUS pendActpuRsp(4) - pending an ACTPU response from the PU active(5) - active pendLinkact(6) - pending activation of the link to a downstream PU pendDactpuRsp(7) - pending a DACTPU response from the PU pendInop(8) - the CPSVRMGR pipe became inoperative while the DLUR was pending an ACTPU response from the PU pendInopActpu(9) - when the DLUR was in the pendInop state, a CPSVRMGR pipe became active and a new ACTPU was received over it, before a response to the previous ACTPU was received from the PU.') dlur_pu_ans_support = mib_table_column((1, 3, 6, 1, 2, 1, 34, 5, 1, 2, 1, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('continue', 1), ('stop', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: dlurPuAnsSupport.setStatus('current') if mibBuilder.loadTexts: dlurPuAnsSupport.setDescription("The Automatic Network Shutdown (ANS) support configured for this PU. This value (as configured by the network administrator) is sent by DLUS with ACTPU for each PU. - 'continue' means that the DLUR node will attempt to keep LU-LU sessions active even if SSCP-PU and SSCP-LU control sessions are interrupted. - 'stop' means that LU-LU sessions will be interrupted when the SSCP-PU and SSCP-LU sessions are interrupted.") dlur_pu_location = mib_table_column((1, 3, 6, 1, 2, 1, 34, 5, 1, 2, 1, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('internal', 1), ('downstream', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: dlurPuLocation.setStatus('current') if mibBuilder.loadTexts: dlurPuLocation.setDescription('Location of the DLUR-support PU: internal(1) - internal to the APPN node itself (no link) downstream(2) - downstream of the APPN node (connected via a link).') dlur_pu_ls_name = mib_table_column((1, 3, 6, 1, 2, 1, 34, 5, 1, 2, 1, 1, 6), display_string().subtype(subtypeSpec=value_size_constraint(0, 10))).setMaxAccess('readonly') if mibBuilder.loadTexts: dlurPuLsName.setStatus('current') if mibBuilder.loadTexts: dlurPuLsName.setDescription('Administratively assigned name of the link station through which a downstream PU is connected to this DLUR. A zero-length string is returned for internal PUs. If this object has the same value as the appnLsName object in the APPN MIB, then the two are identifying the same link station.') dlur_pu_dlus_sessn_status = mib_table_column((1, 3, 6, 1, 2, 1, 34, 5, 1, 2, 1, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('reset', 1), ('pendingActive', 2), ('active', 3), ('pendingInactive', 4)))).setMaxAccess('readonly') if mibBuilder.loadTexts: dlurPuDlusSessnStatus.setStatus('current') if mibBuilder.loadTexts: dlurPuDlusSessnStatus.setDescription("Status of the control session to the DLUS identified in dlurPuActiveDlusName. This is a combination of the separate states for the contention-winner and contention-loser sessions: reset(1) - none of the cases below pendingActive(2) - either contention-winner session or contention-loser session is pending active active(3) - contention-winner and contention-loser sessions are both active pendingInactive(4) - either contention-winner session or contention-loser session is pending inactive - this test is made AFTER the 'pendingActive' test. The following matrix provides a different representation of how the values of this object are related to the individual states of the contention-winner and contention-loser sessions: Conwinner | pA | pI | A | X = !(pA | pI | A) C ++++++++++++++++++++++++++++++++++ o pA | 2 | 2 | 2 | 2 n ++++++++++++++++++++++++++++++++++ l pI | 2 | 4 | 4 | 4 o ++++++++++++++++++++++++++++++++++ s A | 2 | 4 | 3 | 1 e ++++++++++++++++++++++++++++++++++ r X | 2 | 4 | 1 | 1 ++++++++++++++++++++++++++++++++++ ") dlur_pu_active_dlus_name = mib_table_column((1, 3, 6, 1, 2, 1, 34, 5, 1, 2, 1, 1, 8), display_string().subtype(subtypeSpec=value_size_constraint(0, 17))).setMaxAccess('readonly') if mibBuilder.loadTexts: dlurPuActiveDlusName.setStatus('current') if mibBuilder.loadTexts: dlurPuActiveDlusName.setDescription('The SNA name of the active DLUS for this PU. If its length is not zero, this name follows the SnaControlPointName textual convention. A zero-length string indicates that the PU does not currently have an active DLUS.') dlur_pu_def_prim_dlus_name = mib_table_column((1, 3, 6, 1, 2, 1, 34, 5, 1, 2, 1, 1, 9), display_string().subtype(subtypeSpec=value_size_constraint(0, 17))).setMaxAccess('readonly') if mibBuilder.loadTexts: dlurPuDefPrimDlusName.setStatus('current') if mibBuilder.loadTexts: dlurPuDefPrimDlusName.setDescription('The SNA name of the defined primary DLUS for this PU, if one has been defined. If present, this name follows the SnaControlPointName textual convention. A zero-length string indicates that no primary DLUS has been defined for this PU, in which case the global default represented by the dlurDefaultDefPrimDlusName object is used.') dlur_pu_def_backup_dlus_table = mib_table((1, 3, 6, 1, 2, 1, 34, 5, 1, 2, 2)) if mibBuilder.loadTexts: dlurPuDefBackupDlusTable.setStatus('current') if mibBuilder.loadTexts: dlurPuDefBackupDlusTable.setDescription('This table contains an ordered list of defined backup DLUSs for those PUs served by this DLUR that have their own defined backup DLUSs. PUs that have no entries in this table use the global default backup DLUSs for the DLUR, represented by the dlurDefaultDefBackupDlusNameTable. Entries in this table are ordered from most preferred backup DLUS to least preferred for each PU.') dlur_pu_def_backup_dlus_entry = mib_table_row((1, 3, 6, 1, 2, 1, 34, 5, 1, 2, 2, 1)).setIndexNames((0, 'APPN-DLUR-MIB', 'dlurPuDefBackupDlusPuName'), (0, 'APPN-DLUR-MIB', 'dlurPuDefBackupDlusIndex')) if mibBuilder.loadTexts: dlurPuDefBackupDlusEntry.setStatus('current') if mibBuilder.loadTexts: dlurPuDefBackupDlusEntry.setDescription('This table is indexed by PU name and by an integer-valued index, which orders the entries from most preferred backup DLUS for the PU to least preferred.') dlur_pu_def_backup_dlus_pu_name = mib_table_column((1, 3, 6, 1, 2, 1, 34, 5, 1, 2, 2, 1, 1), display_string().subtype(subtypeSpec=value_size_constraint(1, 17))) if mibBuilder.loadTexts: dlurPuDefBackupDlusPuName.setStatus('current') if mibBuilder.loadTexts: dlurPuDefBackupDlusPuName.setDescription('Locally administered name of the PU. If this object has the same value as the dlurPuName object, then the two are identifying the same PU.') dlur_pu_def_backup_dlus_index = mib_table_column((1, 3, 6, 1, 2, 1, 34, 5, 1, 2, 2, 1, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4294967295))) if mibBuilder.loadTexts: dlurPuDefBackupDlusIndex.setStatus('current') if mibBuilder.loadTexts: dlurPuDefBackupDlusIndex.setDescription('Secondary index for this table. The index values start at 1, which identifies the most preferred backup DLUS for the PU.') dlur_pu_def_backup_dlus_name = mib_table_column((1, 3, 6, 1, 2, 1, 34, 5, 1, 2, 2, 1, 3), sna_control_point_name()).setMaxAccess('readonly') if mibBuilder.loadTexts: dlurPuDefBackupDlusName.setStatus('current') if mibBuilder.loadTexts: dlurPuDefBackupDlusName.setDescription('Fully qualified name of a backup DLUS for this PU.') dlur_dlus_info = mib_identifier((1, 3, 6, 1, 2, 1, 34, 5, 1, 3)) dlur_dlus_table = mib_table((1, 3, 6, 1, 2, 1, 34, 5, 1, 3, 1)) if mibBuilder.loadTexts: dlurDlusTable.setStatus('current') if mibBuilder.loadTexts: dlurDlusTable.setDescription('Information about DLUS control sessions.') dlur_dlus_entry = mib_table_row((1, 3, 6, 1, 2, 1, 34, 5, 1, 3, 1, 1)).setIndexNames((0, 'APPN-DLUR-MIB', 'dlurDlusName')) if mibBuilder.loadTexts: dlurDlusEntry.setStatus('current') if mibBuilder.loadTexts: dlurDlusEntry.setDescription('This entry is indexed by the name of the DLUS.') dlur_dlus_name = mib_table_column((1, 3, 6, 1, 2, 1, 34, 5, 1, 3, 1, 1, 1), sna_control_point_name()) if mibBuilder.loadTexts: dlurDlusName.setStatus('current') if mibBuilder.loadTexts: dlurDlusName.setDescription('The SNA name of a DLUS with which this DLUR currently has a CPSVRMGR pipe established.') dlur_dlus_sessn_status = mib_table_column((1, 3, 6, 1, 2, 1, 34, 5, 1, 3, 1, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('reset', 1), ('pendingActive', 2), ('active', 3), ('pendingInactive', 4)))).setMaxAccess('readonly') if mibBuilder.loadTexts: dlurDlusSessnStatus.setStatus('current') if mibBuilder.loadTexts: dlurDlusSessnStatus.setDescription("Status of the CPSVRMGR pipe between the DLUR and this DLUS. This is a combination of the separate states for the contention-winner and contention-loser sessions: reset(1) - none of the cases below pendingActive(2) - either contention-winner session or contention-loser session is pending active active(3) - contention-winner and contention-loser sessions are both active pendingInactive(4) - either contention-winner session or contention-loser session is pending inactive - this test is made AFTER the 'pendingActive' test. The following matrix provides a different representation of how the values of this object are related to the individual states of the contention-winner and contention-loser sessions: Conwinner | pA | pI | A | X = !(pA | pI | A) C ++++++++++++++++++++++++++++++++++ o pA | 2 | 2 | 2 | 2 n ++++++++++++++++++++++++++++++++++ l pI | 2 | 4 | 4 | 4 o ++++++++++++++++++++++++++++++++++ s A | 2 | 4 | 3 | 1 e ++++++++++++++++++++++++++++++++++ r X | 2 | 4 | 1 | 1 ++++++++++++++++++++++++++++++++++ ") dlur_conformance = mib_identifier((1, 3, 6, 1, 2, 1, 34, 5, 2)) dlur_compliances = mib_identifier((1, 3, 6, 1, 2, 1, 34, 5, 2, 1)) dlur_groups = mib_identifier((1, 3, 6, 1, 2, 1, 34, 5, 2, 2)) dlur_compliance = module_compliance((1, 3, 6, 1, 2, 1, 34, 5, 2, 1, 1)).setObjects(('APPN-DLUR-MIB', 'dlurConfGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): dlur_compliance = dlurCompliance.setStatus('current') if mibBuilder.loadTexts: dlurCompliance.setDescription('The compliance statement for the SNMPv2 entities which implement the DLUR MIB.') dlur_conf_group = object_group((1, 3, 6, 1, 2, 1, 34, 5, 2, 2, 1)).setObjects(('APPN-DLUR-MIB', 'dlurNodeCpName'), ('APPN-DLUR-MIB', 'dlurReleaseLevel'), ('APPN-DLUR-MIB', 'dlurAnsSupport'), ('APPN-DLUR-MIB', 'dlurMultiSubnetSupport'), ('APPN-DLUR-MIB', 'dlurNetworkNameForwardingSupport'), ('APPN-DLUR-MIB', 'dlurNondisDlusDlurSessDeactSup'), ('APPN-DLUR-MIB', 'dlurDefaultDefPrimDlusName'), ('APPN-DLUR-MIB', 'dlurDefaultDefBackupDlusName'), ('APPN-DLUR-MIB', 'dlurPuSscpSuppliedName'), ('APPN-DLUR-MIB', 'dlurPuStatus'), ('APPN-DLUR-MIB', 'dlurPuAnsSupport'), ('APPN-DLUR-MIB', 'dlurPuLocation'), ('APPN-DLUR-MIB', 'dlurPuLsName'), ('APPN-DLUR-MIB', 'dlurPuDlusSessnStatus'), ('APPN-DLUR-MIB', 'dlurPuActiveDlusName'), ('APPN-DLUR-MIB', 'dlurPuDefPrimDlusName'), ('APPN-DLUR-MIB', 'dlurPuDefBackupDlusName'), ('APPN-DLUR-MIB', 'dlurDlusSessnStatus')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): dlur_conf_group = dlurConfGroup.setStatus('current') if mibBuilder.loadTexts: dlurConfGroup.setDescription('A collection of objects providing information on an implementation of APPN DLUR.') mibBuilder.exportSymbols('APPN-DLUR-MIB', dlurNondisDlusDlurSessDeactSup=dlurNondisDlusDlurSessDeactSup, dlurPuStatus=dlurPuStatus, dlurPuEntry=dlurPuEntry, dlurPuTable=dlurPuTable, dlurDefaultDefBackupDlusName=dlurDefaultDefBackupDlusName, dlurGroups=dlurGroups, dlurDlusName=dlurDlusName, dlurPuDlusSessnStatus=dlurPuDlusSessnStatus, dlurPuDefPrimDlusName=dlurPuDefPrimDlusName, dlurDefaultDefPrimDlusName=dlurDefaultDefPrimDlusName, dlurNodeInfo=dlurNodeInfo, dlurPuAnsSupport=dlurPuAnsSupport, dlurReleaseLevel=dlurReleaseLevel, dlurConformance=dlurConformance, dlurObjects=dlurObjects, dlurDlusSessnStatus=dlurDlusSessnStatus, dlurMultiSubnetSupport=dlurMultiSubnetSupport, dlurPuDefBackupDlusPuName=dlurPuDefBackupDlusPuName, dlurPuDefBackupDlusName=dlurPuDefBackupDlusName, dlurCompliances=dlurCompliances, dlurDefaultDefBackupDlusEntry=dlurDefaultDefBackupDlusEntry, dlurDefaultDefBackupDlusIndex=dlurDefaultDefBackupDlusIndex, dlurPuDefBackupDlusTable=dlurPuDefBackupDlusTable, dlurPuInfo=dlurPuInfo, dlurPuDefBackupDlusEntry=dlurPuDefBackupDlusEntry, dlurConfGroup=dlurConfGroup, dlurDlusEntry=dlurDlusEntry, dlurDefaultDefBackupDlusTable=dlurDefaultDefBackupDlusTable, dlurPuDefBackupDlusIndex=dlurPuDefBackupDlusIndex, dlurPuActiveDlusName=dlurPuActiveDlusName, dlurAnsSupport=dlurAnsSupport, dlurNodeCapabilities=dlurNodeCapabilities, dlurPuSscpSuppliedName=dlurPuSscpSuppliedName, dlurNetworkNameForwardingSupport=dlurNetworkNameForwardingSupport, dlurCompliance=dlurCompliance, dlurMIB=dlurMIB, dlurNodeCpName=dlurNodeCpName, dlurPuLocation=dlurPuLocation, dlurPuName=dlurPuName, PYSNMP_MODULE_ID=dlurMIB, dlurPuLsName=dlurPuLsName, dlurDlusInfo=dlurDlusInfo, dlurDlusTable=dlurDlusTable)
class ExtractedNoti: def __init__(self, title, date, href): self.title = title self.date = date self.href = href class ExtractedNotiList: def __init__(self): self.numOfNoti = 0 self.category = '' self.extractedNotiList = []
class Extractednoti: def __init__(self, title, date, href): self.title = title self.date = date self.href = href class Extractednotilist: def __init__(self): self.numOfNoti = 0 self.category = '' self.extractedNotiList = []
#!python3 def main(): with open('16.txt', 'r') as f, open('16_out.txt', 'w') as f_out: line = f.readline() dance_moves = line.strip().split(',') letters = [chr(c) for c in range(97, 113)] # Part 1 programs = letters.copy() # programs = ['a', 'b', 'c', 'd', 'e'] # dance_moves = ['s1', 'x3/4', 'pe/b'] for move in dance_moves: if move[0] == 's': spin_size = int(move[1:]) programs = programs[-spin_size:] + programs[:len(programs) - spin_size] elif move[0] == 'x': a, b = [int(n) for n in move[1:].split('/')] programs[a], programs[b] = programs[b], programs[a] elif move[0] == 'p': swap_a, swap_b = move[1], move[3] a, b = programs.index(swap_a), programs.index(swap_b) programs[a], programs[b] = programs[b], programs[a] print(''.join(programs)) print(''.join(programs), file=f_out) # Part 2 seen = set() cycle_len = 0 programs = letters.copy() for i in range(1000000000): programs_str = ''.join(programs) if programs_str in seen: cycle_len = i break seen.add(programs_str) for move in dance_moves: if move[0] == 's': spin_size = int(move[1:]) programs = programs[-spin_size:] + programs[:len(programs) - spin_size] elif move[0] == 'x': a, b = [int(n) for n in move[1:].split('/')] programs[a], programs[b] = programs[b], programs[a] elif move[0] == 'p': swap_a, swap_b = move[1], move[3] a, b = programs.index(swap_a), programs.index(swap_b) programs[a], programs[b] = programs[b], programs[a] print(f'Cycle length: {cycle_len}') # Sure I mean I guess I could do a better job but hey, copy pasta is easy programs = letters.copy() for i in range(1000000000 % cycle_len): for move in dance_moves: if move[0] == 's': spin_size = int(move[1:]) programs = programs[-spin_size:] + programs[:len(programs) - spin_size] elif move[0] == 'x': a, b = [int(n) for n in move[1:].split('/')] programs[a], programs[b] = programs[b], programs[a] elif move[0] == 'p': swap_a, swap_b = move[1], move[3] a, b = programs.index(swap_a), programs.index(swap_b) programs[a], programs[b] = programs[b], programs[a] print(''.join(programs)) print(''.join(programs), file=f_out) if __name__ == '__main__': main()
def main(): with open('16.txt', 'r') as f, open('16_out.txt', 'w') as f_out: line = f.readline() dance_moves = line.strip().split(',') letters = [chr(c) for c in range(97, 113)] programs = letters.copy() for move in dance_moves: if move[0] == 's': spin_size = int(move[1:]) programs = programs[-spin_size:] + programs[:len(programs) - spin_size] elif move[0] == 'x': (a, b) = [int(n) for n in move[1:].split('/')] (programs[a], programs[b]) = (programs[b], programs[a]) elif move[0] == 'p': (swap_a, swap_b) = (move[1], move[3]) (a, b) = (programs.index(swap_a), programs.index(swap_b)) (programs[a], programs[b]) = (programs[b], programs[a]) print(''.join(programs)) print(''.join(programs), file=f_out) seen = set() cycle_len = 0 programs = letters.copy() for i in range(1000000000): programs_str = ''.join(programs) if programs_str in seen: cycle_len = i break seen.add(programs_str) for move in dance_moves: if move[0] == 's': spin_size = int(move[1:]) programs = programs[-spin_size:] + programs[:len(programs) - spin_size] elif move[0] == 'x': (a, b) = [int(n) for n in move[1:].split('/')] (programs[a], programs[b]) = (programs[b], programs[a]) elif move[0] == 'p': (swap_a, swap_b) = (move[1], move[3]) (a, b) = (programs.index(swap_a), programs.index(swap_b)) (programs[a], programs[b]) = (programs[b], programs[a]) print(f'Cycle length: {cycle_len}') programs = letters.copy() for i in range(1000000000 % cycle_len): for move in dance_moves: if move[0] == 's': spin_size = int(move[1:]) programs = programs[-spin_size:] + programs[:len(programs) - spin_size] elif move[0] == 'x': (a, b) = [int(n) for n in move[1:].split('/')] (programs[a], programs[b]) = (programs[b], programs[a]) elif move[0] == 'p': (swap_a, swap_b) = (move[1], move[3]) (a, b) = (programs.index(swap_a), programs.index(swap_b)) (programs[a], programs[b]) = (programs[b], programs[a]) print(''.join(programs)) print(''.join(programs), file=f_out) if __name__ == '__main__': main()
a=int(input('enter a?')); b=int(input('enter b?')); c=int(input('enter c?')); if a>b and a>c: print('a is largest'); if b>a and b>c: print('b is largest'); if c>a and c>b: print('c is largest');
a = int(input('enter a?')) b = int(input('enter b?')) c = int(input('enter c?')) if a > b and a > c: print('a is largest') if b > a and b > c: print('b is largest') if c > a and c > b: print('c is largest')
class Solution: def missingNumber(self, nums: List[int]) -> int: arr = list(range(0, len(nums), 1)) for i in range(0, len(nums), 1): if nums[i] in arr: arr.remove(nums[i]) else: continue try: return arr[0] except IndexError: return max(nums) + 1
class Solution: def missing_number(self, nums: List[int]) -> int: arr = list(range(0, len(nums), 1)) for i in range(0, len(nums), 1): if nums[i] in arr: arr.remove(nums[i]) else: continue try: return arr[0] except IndexError: return max(nums) + 1
''' Created on Sep 26, 2016 @author: matth ''' #plan # auto find com port (atelast ask for port number) # verify that port is good # background thread the serial read ''' import serial import threading from threading import Thread from queue import Queue import AFSK.afsk as afsk class AudioTNC(): def __init__(self,portname,baud): self.qin=Queue() self.qout=Queue() self.AudioReader=AudioThread(self.qin,self.qout,portname,baud) self.threader = Thread(target=self.AudioReader.thread, args=()) def _handle_signal(self,signal, frame): # mark the loop stopped # cleanup self.cleanup() def cleanup(self): print("cleaning up ...") self.threading.ser.close() def startAudioDat(self): self.threader.start() def stopAudioDat(self): self.qin.put(False) def transmitAudioDat(self,line): self.qin.put(line.encode()) def getAudioDat(self): if(self.qout.empty()==False): return self.qout.get() ''' #This is the thread that is created to handle the continous loop for the serial data. ''' class AudioThread(threading.Thread): #serialListen(ser,x) def __init__(self,qin,qout,portname,baud): self.qin=qin self.qout=qout self.portname=portname self.baud=baud self.running=True self.lines="" self.newLine=False def stopListening(self): self.running=False def thread(self):#this will need to be rewritten x=0 print(self.portname) print(self.baud) audio = afsk. self.serrunning=True while self.running: if self.qin.empty()==False: self.line=self.qin.get() if self.line==False: self.running=False break ser.write(self.line) if ser.in_waiting!=0: x = ser.readline() self.qout.empty() self.qout.put(x) print(x) ser.close() '''
""" Created on Sep 26, 2016 @author: matth """ '\n\n\nimport serial\nimport threading\nfrom threading import Thread\nfrom queue import Queue\nimport AFSK.afsk as afsk\n\nclass AudioTNC():\n def __init__(self,portname,baud):\n self.qin=Queue()\n self.qout=Queue()\n self.AudioReader=AudioThread(self.qin,self.qout,portname,baud)\n self.threader = Thread(target=self.AudioReader.thread, args=())\n \n \n \n def _handle_signal(self,signal, frame):\n \n # mark the loop stopped\n # cleanup\n self.cleanup()\n \n def cleanup(self):\n print("cleaning up ...")\n self.threading.ser.close()\n \n def startAudioDat(self): \n self.threader.start()\n \n def stopAudioDat(self):\n self.qin.put(False)\n \n \n def transmitAudioDat(self,line):\n self.qin.put(line.encode())\n \n \n def getAudioDat(self):\n if(self.qout.empty()==False):\n return self.qout.get()\n \n \n \n' '\n\nclass AudioThread(threading.Thread):\n \n #serialListen(ser,x)\n \n def __init__(self,qin,qout,portname,baud):\n self.qin=qin\n self.qout=qout\n self.portname=portname\n self.baud=baud\n self.running=True\n self.lines=""\n self.newLine=False\n \n def stopListening(self):\n self.running=False\n \n \n \n \n def thread(self):#this will need to be rewritten\n x=0\n print(self.portname)\n print(self.baud)\n audio = afsk.\n self.serrunning=True\n while self.running:\n if self.qin.empty()==False:\n self.line=self.qin.get()\n if self.line==False:\n self.running=False\n break\n ser.write(self.line)\n if ser.in_waiting!=0:\n x = ser.readline()\n self.qout.empty()\n self.qout.put(x)\n print(x)\n \n ser.close()\n\n \n \n\n \n'
#!/usr/bin/python3 #Copyright 2018 Jim Van Fleet #Licensed under the Apache License, Version 2.0 (the "License"); #you may not use this file except in compliance with the License. #You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 #Unless required by applicable law or agreed to in writing, software #distributed under the License is distributed on an "AS IS" BASIS, #WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #See the License for the specific language governing permissions and #limitations under the License. class SearchAnnoFile: def getLinkData(self, annoParse, annoLink, symData, machine): annoParseNames = [] for ii in annoParse: annoParseNames.append(ii[1]) annoParseNames.append(ii[3]) linkAnnoParse = [] for lnk in annoLink: lnkName = self.findName(lnk[3], symData, machine) try: linkAnno = annoParseNames.index(lnkName) except: try: linkAnno = annoParseNames.index(lnk[3]) except: # Ignore Notfound Name # generally from branch table # print(lnkName, lnk[3]) # print("What to do?") continue linkAnno = int(linkAnno/2) pdata = annoParse[linkAnno] annoParse.append([pdata[0], pdata[1], lnk[2], lnk[1]]) annoParse.append(linkAnnoParse) return annoParse def findName(self, addrAsm0, symData, machine): addrAsm = addrAsm0.lstrip("0") try: whx = symData.index(addrAsm) except: if machine == "x86_64": # print(addrAsm) # if it aint there it aint there return "NotFound_" + addrAsm if addrAsm[-1] == "0": tryAddr = addrAsm[:-1] + "8" elif addrAsm[-1] == "4": intrm = int(addrAsm, 16) intrm -= 8 tryAddr = '{:x}'.format(intrm) elif addrAsm[-1] == "c": tryAddr = addrAsm[:-2] + "4" else: tryAddr = addrAsm[:-1] + "0" try: whx = symData.index(tryAddr) except: return "NotFound_" + addrAsm0 # print("whx", addrAsm, symData[whx-1], symData[whx]) return symData[whx-1] def doParse(self, openFile, symData, machine): annoParse = [] annoLink = [] self.TotalTicks = 0 sampb = "h->nr_samples:" disAssb = "Disassembly of section" parab = "(" manglHead = "_ZN" # for x86_64 vs power (option with uname default) if machine == "power": linkb = " bl " else: linkb = " callq " threshHold = "0.01" wdCountThresh = 2 with open(openFile) as annoFile: wdCount = 0 for line in annoFile: splWords = line.split() if (line.find(sampb) != -1): sampCount = splWords[-1] self.TotalTicks += int(sampCount) wdCount = 1 elif line.find(disAssb) != -1: if wdCount == 0: continue line = annoFile.readline() # blank line line = annoFile.readline() lineSpl = line.split() wdCount = 2 namEntry = self.findName(lineSpl[1], symData, machine) addrAsm = lineSpl[1].lstrip("0") line = annoFile.readline() if line.find(manglHead) != -1: lineSpl = line.split() namMangl = lineSpl[1][:-3] else: namMangl = namEntry elif line.find(linkb) != -1: lineSpl = line.split() if lineSpl[0] <= threshHold: continue if lineSpl[4].find("0x") != -1: callAdr = lineSpl[4][2:] else: callAdr = lineSpl[4] try: tx = lineSpl[0].index(".") callCount = int((float(lineSpl[0]) * float(sampCount))/100.0) if callCount <= 0: callCount = 1 except: callCount = int(lineSpl[0]) annoLink.append([int(sampCount), namEntry, int(callCount), callAdr]) else: continue if wdCountThresh != wdCount: continue wdCount = 0 annoParse.append([int(sampCount), namEntry, -1, addrAsm]) annoParse = self.getLinkData(annoParse, annoLink, symData, machine) annoParse.sort(reverse=True) # for ii in annoParse: # print(ii) return annoParse def __init__(self, openFile, symData, machine): self.annoData = self.doParse(openFile, symData, machine)
class Searchannofile: def get_link_data(self, annoParse, annoLink, symData, machine): anno_parse_names = [] for ii in annoParse: annoParseNames.append(ii[1]) annoParseNames.append(ii[3]) link_anno_parse = [] for lnk in annoLink: lnk_name = self.findName(lnk[3], symData, machine) try: link_anno = annoParseNames.index(lnkName) except: try: link_anno = annoParseNames.index(lnk[3]) except: continue link_anno = int(linkAnno / 2) pdata = annoParse[linkAnno] annoParse.append([pdata[0], pdata[1], lnk[2], lnk[1]]) annoParse.append(linkAnnoParse) return annoParse def find_name(self, addrAsm0, symData, machine): addr_asm = addrAsm0.lstrip('0') try: whx = symData.index(addrAsm) except: if machine == 'x86_64': return 'NotFound_' + addrAsm if addrAsm[-1] == '0': try_addr = addrAsm[:-1] + '8' elif addrAsm[-1] == '4': intrm = int(addrAsm, 16) intrm -= 8 try_addr = '{:x}'.format(intrm) elif addrAsm[-1] == 'c': try_addr = addrAsm[:-2] + '4' else: try_addr = addrAsm[:-1] + '0' try: whx = symData.index(tryAddr) except: return 'NotFound_' + addrAsm0 return symData[whx - 1] def do_parse(self, openFile, symData, machine): anno_parse = [] anno_link = [] self.TotalTicks = 0 sampb = 'h->nr_samples:' dis_assb = 'Disassembly of section' parab = '(' mangl_head = '_ZN' if machine == 'power': linkb = ' bl ' else: linkb = ' callq ' thresh_hold = '0.01' wd_count_thresh = 2 with open(openFile) as anno_file: wd_count = 0 for line in annoFile: spl_words = line.split() if line.find(sampb) != -1: samp_count = splWords[-1] self.TotalTicks += int(sampCount) wd_count = 1 elif line.find(disAssb) != -1: if wdCount == 0: continue line = annoFile.readline() line = annoFile.readline() line_spl = line.split() wd_count = 2 nam_entry = self.findName(lineSpl[1], symData, machine) addr_asm = lineSpl[1].lstrip('0') line = annoFile.readline() if line.find(manglHead) != -1: line_spl = line.split() nam_mangl = lineSpl[1][:-3] else: nam_mangl = namEntry elif line.find(linkb) != -1: line_spl = line.split() if lineSpl[0] <= threshHold: continue if lineSpl[4].find('0x') != -1: call_adr = lineSpl[4][2:] else: call_adr = lineSpl[4] try: tx = lineSpl[0].index('.') call_count = int(float(lineSpl[0]) * float(sampCount) / 100.0) if callCount <= 0: call_count = 1 except: call_count = int(lineSpl[0]) annoLink.append([int(sampCount), namEntry, int(callCount), callAdr]) else: continue if wdCountThresh != wdCount: continue wd_count = 0 annoParse.append([int(sampCount), namEntry, -1, addrAsm]) anno_parse = self.getLinkData(annoParse, annoLink, symData, machine) annoParse.sort(reverse=True) return annoParse def __init__(self, openFile, symData, machine): self.annoData = self.doParse(openFile, symData, machine)
__author__ = 'Elias Haroun' class Node(object): def __init__(self, data, next, previous): self.data = data self.next = next self.previous = previous def getData(self): return self.data def getNext(self): return self.next def getPrevious(self): return self.previous def setData(self, data): self.data = data def setNext(self, aNode): self.next = aNode def setPrevious(self, aNode): self.previous = aNode
__author__ = 'Elias Haroun' class Node(object): def __init__(self, data, next, previous): self.data = data self.next = next self.previous = previous def get_data(self): return self.data def get_next(self): return self.next def get_previous(self): return self.previous def set_data(self, data): self.data = data def set_next(self, aNode): self.next = aNode def set_previous(self, aNode): self.previous = aNode
# #1 # def generateShape(int): # str = [] # for i in range(int): # str.append('+' * int) # return "\n".join(str) # #2 # def generateShape(n): # return "\n".join("+" * n for i in range(n)) def generateShape(int): # 3 return (("+" * int + "\n") * int)[:-1]
def generate_shape(int): return (('+' * int + '\n') * int)[:-1]
''' Created on 2019/02/14 @author: tom_uda ''' def search4letters(phrase:str,letters:str) -> set: return set(letters).intersection(set(phrase))
""" Created on 2019/02/14 @author: tom_uda """ def search4letters(phrase: str, letters: str) -> set: return set(letters).intersection(set(phrase))
# # PySNMP MIB module SYMMCOMMON10M (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/neermitt/Dev/kusanagi/mibs.snmplabs.com/asn1/SYMMCOMMON10M # Produced by pysmi-0.3.4 at Tue Jul 30 11:34:48 2019 # On host NEERMITT-M-J0NV platform Darwin version 18.6.0 by user neermitt # Using Python version 3.7.4 (default, Jul 9 2019, 18:13:23) # OctetString, Integer, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "OctetString", "Integer", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueRangeConstraint, ConstraintsIntersection, SingleValueConstraint, ConstraintsUnion, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ConstraintsIntersection", "SingleValueConstraint", "ConstraintsUnion", "ValueSizeConstraint") entPhysicalIndex, = mibBuilder.importSymbols("ENTITY-MIB", "entPhysicalIndex") ifIndex, ifNumber = mibBuilder.importSymbols("IF-MIB", "ifIndex", "ifNumber") ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup") ObjectIdentity, Integer32, ModuleIdentity, Counter64, Unsigned32, NotificationType, Bits, IpAddress, Counter32, iso, MibScalar, MibTable, MibTableRow, MibTableColumn, TimeTicks, MibIdentifier, Gauge32 = mibBuilder.importSymbols("SNMPv2-SMI", "ObjectIdentity", "Integer32", "ModuleIdentity", "Counter64", "Unsigned32", "NotificationType", "Bits", "IpAddress", "Counter32", "iso", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "TimeTicks", "MibIdentifier", "Gauge32") TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString") symmPhysicalSignal, = mibBuilder.importSymbols("SYMM-COMMON-SMI", "symmPhysicalSignal") symmCommon10M = ModuleIdentity((1, 3, 6, 1, 4, 1, 9070, 1, 2, 5, 2, 4)) if mibBuilder.loadTexts: symmCommon10M.setLastUpdated('201102010000Z') if mibBuilder.loadTexts: symmCommon10M.setOrganization('Symmetricom') if mibBuilder.loadTexts: symmCommon10M.setContactInfo('Symmetricom Technical Support 1-888-367-7966 toll free USA 1-408-428-7907 worldwide Support@symmetricom.com ') if mibBuilder.loadTexts: symmCommon10M.setDescription('Symmetricom, Inc. Common 10M input/output status and configuration ') class EnaValue(Integer32): subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2)) namedValues = NamedValues(("enable", 1), ("disable", 2)) class TPModuleID(Integer32): subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14)) namedValues = NamedValues(("sys", 1), ("imc", 2), ("ioc1", 3), ("ioc2", 4), ("exp0", 5), ("exp1", 6), ("exp2", 7), ("exp3", 8), ("exp4", 9), ("exp5", 10), ("exp6", 11), ("exp7", 12), ("exp8", 13), ("exp9", 14)) class OnValue(Integer32): subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2)) namedValues = NamedValues(("on", 1), ("off", 2)) class TPInputPriority(Integer32): subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(1, 16) class InputFrameType(Integer32): subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6)) namedValues = NamedValues(("freq1544khz", 1), ("freq2048khz", 2), ("ccs", 3), ("cas", 4), ("d4", 5), ("esf", 6)) class TPSSMValue(Integer32): subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(1, 15) class TPOutputType(Integer32): subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3)) namedValues = NamedValues(("outputGeneral", 1), ("output10Mhz", 2), ("outputPPS", 3)) class TPOutputGeneration(Integer32): subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4)) namedValues = NamedValues(("warmup", 1), ("freerun", 2), ("fastlock", 3), ("normal", 4)) class OutputFrameType(Integer32): subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6)) namedValues = NamedValues(("freq1544khz", 1), ("freq2048khz", 2), ("ccs", 3), ("cas", 4), ("d4", 5), ("esf", 6)) class ActionApply(Integer32): subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2)) namedValues = NamedValues(("apply", 1), ("nonapply", 2)) class OpMode(Integer32): subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2)) namedValues = NamedValues(("auto", 1), ("manual", 2)) class ActiveValue(Integer32): subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2)) namedValues = NamedValues(("active", 1), ("inactive", 2)) class InputQualityLevel(Integer32): subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9)) namedValues = NamedValues(("prcprs", 1), ("unkstu", 2), ("typeiist2", 3), ("typei", 4), ("typevtnc", 5), ("typeiiist3e", 6), ("typeivst3", 7), ("opt3smc", 8), ("dus", 9)) class InputPriority(Integer32): subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(1, 4) class YesValue(Integer32): subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2)) namedValues = NamedValues(("yes", 1), ("no", 2)) class OkValue(Integer32): subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2)) namedValues = NamedValues(("ok", 1), ("fault", 2)) class ValidValue(Integer32): subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3)) namedValues = NamedValues(("valid", 1), ("invalid", 2), ("nurture", 3)) class TableRowChange(Integer32): subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3)) namedValues = NamedValues(("add", 1), ("delete", 2), ("modify", 3)) class PPS10MOutGenMode(Integer32): subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2)) namedValues = NamedValues(("squelch", 1), ("on", 2)) class DateAndTime(TextualConvention, OctetString): description = "A date-time specification. field octets contents range ----- ------ -------- ----- 1 1-2 year* 0..65536 2 3 month 1..12 3 4 day 1..31 4 5 hour 0..23 5 6 minutes 0..59 6 7 seconds 0..60 (use 60 for leap-second) 7 8 deci-seconds 0..9 8 9 direction from UTC '+' / '-' 9 10 hours from UTC* 0..13 10 11 minutes from UTC 0..59 * Notes: - the value of year is in network-byte order - daylight saving time in New Zealand is +13 For example, Tuesday May 26, 1992 at 1:30:15 PM EDT would be displayed as: 1992-5-26,13:30:15.0,-4:0 Note that if only local time is known, then timezone information (fields 8-10) is not present." status = 'current' displayHint = '2d-1d-1d,1d:1d:1d.1d,1a1d:1d' subtypeSpec = OctetString.subtypeSpec + ConstraintsUnion(ValueSizeConstraint(8, 8), ValueSizeConstraint(11, 11), ) class TLatAndLon(TextualConvention, OctetString): description = "antenna latitude and longitude specification. field octets contents range ----- ------ -------- ----- 1 1 +/-180 deg '+' / '-' 2 2 degree 0..180 3 3 minute 0..59 4 4 second 0..59 5 5 second fraction 0..99 +/- dd:mm:ss.ss " status = 'current' displayHint = '1a1d:1d:1d.1d' subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(5, 5) fixedLength = 5 class TAntHeight(TextualConvention, OctetString): description = "antenna height specification. field octets contents range ----- ------ -------- ----- 1 1 +/- '+' / '-' 2 2-3 meter 0..10000 3 4 meter fraction 0..99 +/- hh.hh " status = 'current' displayHint = '1a2d.1d' subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(4, 4) fixedLength = 4 class TLocalTimeOffset(TextualConvention, OctetString): description = "A local time offset specification. field octets contents range ----- ------ -------- ----- 1 1 direction from UTC '+' / '-' 2 2 hours from UTC* 0..13 3 3 minutes from UTC 0..59 * Notes: - the value of year is in network-byte order - The hours range is 0..13 For example, the -6 local time offset would be displayed as: -6:0 " status = 'current' displayHint = '1a1d:1d' subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(3, 3) fixedLength = 3 class TSsm(TextualConvention, Integer32): description = 'The ssm hex code' status = 'current' displayHint = 'x' subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(0, 255) tenMInput = MibIdentifier((1, 3, 6, 1, 4, 1, 9070, 1, 2, 5, 2, 4, 1)) tenMInputStatus = MibIdentifier((1, 3, 6, 1, 4, 1, 9070, 1, 2, 5, 2, 4, 1, 1)) tenMInputConfig = MibIdentifier((1, 3, 6, 1, 4, 1, 9070, 1, 2, 5, 2, 4, 1, 2)) tenMOutput = MibIdentifier((1, 3, 6, 1, 4, 1, 9070, 1, 2, 5, 2, 4, 2)) tenMOutputStatus = MibIdentifier((1, 3, 6, 1, 4, 1, 9070, 1, 2, 5, 2, 4, 2, 1)) tenMOutputConfig = MibIdentifier((1, 3, 6, 1, 4, 1, 9070, 1, 2, 5, 2, 4, 2, 2)) tenMInOutConformance = ObjectIdentity((1, 3, 6, 1, 4, 1, 9070, 1, 2, 5, 2, 4, 3)) if mibBuilder.loadTexts: tenMInOutConformance.setStatus('current') if mibBuilder.loadTexts: tenMInOutConformance.setDescription('This subtree contains conformance statements for the SYMMETRICOM-LED-MIB module. ') tenMInOutCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 9070, 1, 2, 5, 2, 4, 3, 1)) tenMInOutUocGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 9070, 1, 2, 5, 2, 4, 3, 2)) mibBuilder.exportSymbols("SYMMCOMMON10M", OutputFrameType=OutputFrameType, PYSNMP_MODULE_ID=symmCommon10M, OpMode=OpMode, YesValue=YesValue, TableRowChange=TableRowChange, TPInputPriority=TPInputPriority, TAntHeight=TAntHeight, tenMInput=tenMInput, TPOutputType=TPOutputType, OkValue=OkValue, tenMOutput=tenMOutput, TSsm=TSsm, tenMInOutConformance=tenMInOutConformance, tenMInOutCompliances=tenMInOutCompliances, OnValue=OnValue, InputPriority=InputPriority, tenMInputStatus=tenMInputStatus, EnaValue=EnaValue, DateAndTime=DateAndTime, ActiveValue=ActiveValue, InputQualityLevel=InputQualityLevel, ValidValue=ValidValue, TPModuleID=TPModuleID, InputFrameType=InputFrameType, ActionApply=ActionApply, PPS10MOutGenMode=PPS10MOutGenMode, TLocalTimeOffset=TLocalTimeOffset, TPOutputGeneration=TPOutputGeneration, TLatAndLon=TLatAndLon, tenMOutputConfig=tenMOutputConfig, tenMInputConfig=tenMInputConfig, tenMInOutUocGroups=tenMInOutUocGroups, tenMOutputStatus=tenMOutputStatus, symmCommon10M=symmCommon10M, TPSSMValue=TPSSMValue)
(octet_string, integer, object_identifier) = mibBuilder.importSymbols('ASN1', 'OctetString', 'Integer', 'ObjectIdentifier') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (value_range_constraint, constraints_intersection, single_value_constraint, constraints_union, value_size_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'ConstraintsIntersection', 'SingleValueConstraint', 'ConstraintsUnion', 'ValueSizeConstraint') (ent_physical_index,) = mibBuilder.importSymbols('ENTITY-MIB', 'entPhysicalIndex') (if_index, if_number) = mibBuilder.importSymbols('IF-MIB', 'ifIndex', 'ifNumber') (module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup') (object_identity, integer32, module_identity, counter64, unsigned32, notification_type, bits, ip_address, counter32, iso, mib_scalar, mib_table, mib_table_row, mib_table_column, time_ticks, mib_identifier, gauge32) = mibBuilder.importSymbols('SNMPv2-SMI', 'ObjectIdentity', 'Integer32', 'ModuleIdentity', 'Counter64', 'Unsigned32', 'NotificationType', 'Bits', 'IpAddress', 'Counter32', 'iso', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'TimeTicks', 'MibIdentifier', 'Gauge32') (textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString') (symm_physical_signal,) = mibBuilder.importSymbols('SYMM-COMMON-SMI', 'symmPhysicalSignal') symm_common10_m = module_identity((1, 3, 6, 1, 4, 1, 9070, 1, 2, 5, 2, 4)) if mibBuilder.loadTexts: symmCommon10M.setLastUpdated('201102010000Z') if mibBuilder.loadTexts: symmCommon10M.setOrganization('Symmetricom') if mibBuilder.loadTexts: symmCommon10M.setContactInfo('Symmetricom Technical Support 1-888-367-7966 toll free USA 1-408-428-7907 worldwide Support@symmetricom.com ') if mibBuilder.loadTexts: symmCommon10M.setDescription('Symmetricom, Inc. Common 10M input/output status and configuration ') class Enavalue(Integer32): subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2)) named_values = named_values(('enable', 1), ('disable', 2)) class Tpmoduleid(Integer32): subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14)) named_values = named_values(('sys', 1), ('imc', 2), ('ioc1', 3), ('ioc2', 4), ('exp0', 5), ('exp1', 6), ('exp2', 7), ('exp3', 8), ('exp4', 9), ('exp5', 10), ('exp6', 11), ('exp7', 12), ('exp8', 13), ('exp9', 14)) class Onvalue(Integer32): subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2)) named_values = named_values(('on', 1), ('off', 2)) class Tpinputpriority(Integer32): subtype_spec = Integer32.subtypeSpec + value_range_constraint(1, 16) class Inputframetype(Integer32): subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6)) named_values = named_values(('freq1544khz', 1), ('freq2048khz', 2), ('ccs', 3), ('cas', 4), ('d4', 5), ('esf', 6)) class Tpssmvalue(Integer32): subtype_spec = Integer32.subtypeSpec + value_range_constraint(1, 15) class Tpoutputtype(Integer32): subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3)) named_values = named_values(('outputGeneral', 1), ('output10Mhz', 2), ('outputPPS', 3)) class Tpoutputgeneration(Integer32): subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4)) named_values = named_values(('warmup', 1), ('freerun', 2), ('fastlock', 3), ('normal', 4)) class Outputframetype(Integer32): subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6)) named_values = named_values(('freq1544khz', 1), ('freq2048khz', 2), ('ccs', 3), ('cas', 4), ('d4', 5), ('esf', 6)) class Actionapply(Integer32): subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2)) named_values = named_values(('apply', 1), ('nonapply', 2)) class Opmode(Integer32): subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2)) named_values = named_values(('auto', 1), ('manual', 2)) class Activevalue(Integer32): subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2)) named_values = named_values(('active', 1), ('inactive', 2)) class Inputqualitylevel(Integer32): subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9)) named_values = named_values(('prcprs', 1), ('unkstu', 2), ('typeiist2', 3), ('typei', 4), ('typevtnc', 5), ('typeiiist3e', 6), ('typeivst3', 7), ('opt3smc', 8), ('dus', 9)) class Inputpriority(Integer32): subtype_spec = Integer32.subtypeSpec + value_range_constraint(1, 4) class Yesvalue(Integer32): subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2)) named_values = named_values(('yes', 1), ('no', 2)) class Okvalue(Integer32): subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2)) named_values = named_values(('ok', 1), ('fault', 2)) class Validvalue(Integer32): subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3)) named_values = named_values(('valid', 1), ('invalid', 2), ('nurture', 3)) class Tablerowchange(Integer32): subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3)) named_values = named_values(('add', 1), ('delete', 2), ('modify', 3)) class Pps10Moutgenmode(Integer32): subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2)) named_values = named_values(('squelch', 1), ('on', 2)) class Dateandtime(TextualConvention, OctetString): description = "A date-time specification. field octets contents range ----- ------ -------- ----- 1 1-2 year* 0..65536 2 3 month 1..12 3 4 day 1..31 4 5 hour 0..23 5 6 minutes 0..59 6 7 seconds 0..60 (use 60 for leap-second) 7 8 deci-seconds 0..9 8 9 direction from UTC '+' / '-' 9 10 hours from UTC* 0..13 10 11 minutes from UTC 0..59 * Notes: - the value of year is in network-byte order - daylight saving time in New Zealand is +13 For example, Tuesday May 26, 1992 at 1:30:15 PM EDT would be displayed as: 1992-5-26,13:30:15.0,-4:0 Note that if only local time is known, then timezone information (fields 8-10) is not present." status = 'current' display_hint = '2d-1d-1d,1d:1d:1d.1d,1a1d:1d' subtype_spec = OctetString.subtypeSpec + constraints_union(value_size_constraint(8, 8), value_size_constraint(11, 11)) class Tlatandlon(TextualConvention, OctetString): description = "antenna latitude and longitude specification. field octets contents range ----- ------ -------- ----- 1 1 +/-180 deg '+' / '-' 2 2 degree 0..180 3 3 minute 0..59 4 4 second 0..59 5 5 second fraction 0..99 +/- dd:mm:ss.ss " status = 'current' display_hint = '1a1d:1d:1d.1d' subtype_spec = OctetString.subtypeSpec + value_size_constraint(5, 5) fixed_length = 5 class Tantheight(TextualConvention, OctetString): description = "antenna height specification. field octets contents range ----- ------ -------- ----- 1 1 +/- '+' / '-' 2 2-3 meter 0..10000 3 4 meter fraction 0..99 +/- hh.hh " status = 'current' display_hint = '1a2d.1d' subtype_spec = OctetString.subtypeSpec + value_size_constraint(4, 4) fixed_length = 4 class Tlocaltimeoffset(TextualConvention, OctetString): description = "A local time offset specification. field octets contents range ----- ------ -------- ----- 1 1 direction from UTC '+' / '-' 2 2 hours from UTC* 0..13 3 3 minutes from UTC 0..59 * Notes: - the value of year is in network-byte order - The hours range is 0..13 For example, the -6 local time offset would be displayed as: -6:0 " status = 'current' display_hint = '1a1d:1d' subtype_spec = OctetString.subtypeSpec + value_size_constraint(3, 3) fixed_length = 3 class Tssm(TextualConvention, Integer32): description = 'The ssm hex code' status = 'current' display_hint = 'x' subtype_spec = Integer32.subtypeSpec + value_range_constraint(0, 255) ten_m_input = mib_identifier((1, 3, 6, 1, 4, 1, 9070, 1, 2, 5, 2, 4, 1)) ten_m_input_status = mib_identifier((1, 3, 6, 1, 4, 1, 9070, 1, 2, 5, 2, 4, 1, 1)) ten_m_input_config = mib_identifier((1, 3, 6, 1, 4, 1, 9070, 1, 2, 5, 2, 4, 1, 2)) ten_m_output = mib_identifier((1, 3, 6, 1, 4, 1, 9070, 1, 2, 5, 2, 4, 2)) ten_m_output_status = mib_identifier((1, 3, 6, 1, 4, 1, 9070, 1, 2, 5, 2, 4, 2, 1)) ten_m_output_config = mib_identifier((1, 3, 6, 1, 4, 1, 9070, 1, 2, 5, 2, 4, 2, 2)) ten_m_in_out_conformance = object_identity((1, 3, 6, 1, 4, 1, 9070, 1, 2, 5, 2, 4, 3)) if mibBuilder.loadTexts: tenMInOutConformance.setStatus('current') if mibBuilder.loadTexts: tenMInOutConformance.setDescription('This subtree contains conformance statements for the SYMMETRICOM-LED-MIB module. ') ten_m_in_out_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 9070, 1, 2, 5, 2, 4, 3, 1)) ten_m_in_out_uoc_groups = mib_identifier((1, 3, 6, 1, 4, 1, 9070, 1, 2, 5, 2, 4, 3, 2)) mibBuilder.exportSymbols('SYMMCOMMON10M', OutputFrameType=OutputFrameType, PYSNMP_MODULE_ID=symmCommon10M, OpMode=OpMode, YesValue=YesValue, TableRowChange=TableRowChange, TPInputPriority=TPInputPriority, TAntHeight=TAntHeight, tenMInput=tenMInput, TPOutputType=TPOutputType, OkValue=OkValue, tenMOutput=tenMOutput, TSsm=TSsm, tenMInOutConformance=tenMInOutConformance, tenMInOutCompliances=tenMInOutCompliances, OnValue=OnValue, InputPriority=InputPriority, tenMInputStatus=tenMInputStatus, EnaValue=EnaValue, DateAndTime=DateAndTime, ActiveValue=ActiveValue, InputQualityLevel=InputQualityLevel, ValidValue=ValidValue, TPModuleID=TPModuleID, InputFrameType=InputFrameType, ActionApply=ActionApply, PPS10MOutGenMode=PPS10MOutGenMode, TLocalTimeOffset=TLocalTimeOffset, TPOutputGeneration=TPOutputGeneration, TLatAndLon=TLatAndLon, tenMOutputConfig=tenMOutputConfig, tenMInputConfig=tenMInputConfig, tenMInOutUocGroups=tenMInOutUocGroups, tenMOutputStatus=tenMOutputStatus, symmCommon10M=symmCommon10M, TPSSMValue=TPSSMValue)
''' Parameters of this project. This file is used for storing the parameters that would not be changed frequently. ''' # Lengths of input and output traces num_input = 2500 num_output = 2500 # Batch size batch_size = 16 # Zoom range, should be in the range of (1, num_output) zoom_range = (500, 1000) # Input and output frequency number num_input_complex = 150 * 2 num_output_complex = 46 * 2 # The index of 1~40Hz freq_range_1_40 = (5, 201) # The index of 1-10Hz errors from 1-40Hz freq_range_1_10 = (0, 56) # Time step time_step = 0.002 # GPU number, if no GPU or only one GPU, should use None instead of a number. gpu_number = 2
""" Parameters of this project. This file is used for storing the parameters that would not be changed frequently. """ num_input = 2500 num_output = 2500 batch_size = 16 zoom_range = (500, 1000) num_input_complex = 150 * 2 num_output_complex = 46 * 2 freq_range_1_40 = (5, 201) freq_range_1_10 = (0, 56) time_step = 0.002 gpu_number = 2
class ReskinUnlockPacket: def __init__(self): self.type = "RESKINUNLOCK" self.skinID = 0 self.isPetSkin = 0 def read(self, reader): self.skinID = reader.readInt32() self.isPetSkin = reader.readInt32()
class Reskinunlockpacket: def __init__(self): self.type = 'RESKINUNLOCK' self.skinID = 0 self.isPetSkin = 0 def read(self, reader): self.skinID = reader.readInt32() self.isPetSkin = reader.readInt32()
class Crafting: def __init__(self, json=None): self.discipline = None self.rating = None self.active = None if(json is not None): self.load_from_json(json) def load_from_json(self, json: dict): self.discipline = json.get("discipline", None) self.rating = json.get("rating", None) self.active = json.get("active", None)
class Crafting: def __init__(self, json=None): self.discipline = None self.rating = None self.active = None if json is not None: self.load_from_json(json) def load_from_json(self, json: dict): self.discipline = json.get('discipline', None) self.rating = json.get('rating', None) self.active = json.get('active', None)
''' Created on Apr 15, 2016 @author: dj ''' # Use Meta class to help. class Product(object): def __init__(self): self.name = None self.internal_name = None print("class, name, internal_name = {0}, {1}, {2}".format( self.__class__.__name__, self.name, self.internal_name)) def __get__(self, instance, instance_type): print("__get__: internal_name, instance, instance_type = {0}, {1}, {2}".format( self.internal_name, instance, instance_type)) if instance is None: return self return getattr(instance, self.internal_name, "") def __set__(self, instance, value): print("__set__: internal_name, instance, value = {0}, {1}, {2}".format( self.internal_name, instance, value)) setattr(instance, self.internal_name, value) class Meta(type): def __new__(cls, name, baseclass, class_dict): for key, value in class_dict.items(): if isinstance(value, Product): value.name = key value.internal_name = "_" + key return super().__new__(cls, name, baseclass, class_dict) class ProductWrapper(object, metaclass=Meta): pass class House(ProductWrapper): door = Product() window = Product() house1 = House() print("-" * 40) print("house1.door =", house1.door) print("house1.window =", house1.window) print("house1.__dict__ =", house1.__dict__) print("-" * 40) house1.door = "SingleDoor" print("house1.door =", house1.door) print("house1.__dict__ =", house1.__dict__) print("-" * 40) house1.window = "DoubleWindow" print("house1.window =", house1.window) print("house1.__dict__ =", house1.__dict__) if __name__ == '__main__': pass
""" Created on Apr 15, 2016 @author: dj """ class Product(object): def __init__(self): self.name = None self.internal_name = None print('class, name, internal_name = {0}, {1}, {2}'.format(self.__class__.__name__, self.name, self.internal_name)) def __get__(self, instance, instance_type): print('__get__: internal_name, instance, instance_type = {0}, {1}, {2}'.format(self.internal_name, instance, instance_type)) if instance is None: return self return getattr(instance, self.internal_name, '') def __set__(self, instance, value): print('__set__: internal_name, instance, value = {0}, {1}, {2}'.format(self.internal_name, instance, value)) setattr(instance, self.internal_name, value) class Meta(type): def __new__(cls, name, baseclass, class_dict): for (key, value) in class_dict.items(): if isinstance(value, Product): value.name = key value.internal_name = '_' + key return super().__new__(cls, name, baseclass, class_dict) class Productwrapper(object, metaclass=Meta): pass class House(ProductWrapper): door = product() window = product() house1 = house() print('-' * 40) print('house1.door =', house1.door) print('house1.window =', house1.window) print('house1.__dict__ =', house1.__dict__) print('-' * 40) house1.door = 'SingleDoor' print('house1.door =', house1.door) print('house1.__dict__ =', house1.__dict__) print('-' * 40) house1.window = 'DoubleWindow' print('house1.window =', house1.window) print('house1.__dict__ =', house1.__dict__) if __name__ == '__main__': pass
class Solution: def maxChunksToSorted(self, arr): max_so_far = arr[0] result = 0 for i, num in enumerate(arr): max_so_far = max(max_so_far, num) if max_so_far == i: result += 1 return result
class Solution: def max_chunks_to_sorted(self, arr): max_so_far = arr[0] result = 0 for (i, num) in enumerate(arr): max_so_far = max(max_so_far, num) if max_so_far == i: result += 1 return result
clock.addListener("clockStarted", "python", "clock_start") def clock_start(): print("The clock has started")
clock.addListener('clockStarted', 'python', 'clock_start') def clock_start(): print('The clock has started')
class PreflightFailure(Exception): pass class MasterTimeoutExpired(Exception): pass
class Preflightfailure(Exception): pass class Mastertimeoutexpired(Exception): pass
class UniqueStringFinder: def find_unique(self, list_of_strings: list): list_of_strings.sort(key=lambda element: element.lower()) sorted_list = [set(element.lower()) for element in list_of_strings] if sorted_list.count(sorted_list[0]) == 1 and str(sorted_list[0]) != 'set()': return list_of_strings[0] else: return list_of_strings[-1]
class Uniquestringfinder: def find_unique(self, list_of_strings: list): list_of_strings.sort(key=lambda element: element.lower()) sorted_list = [set(element.lower()) for element in list_of_strings] if sorted_list.count(sorted_list[0]) == 1 and str(sorted_list[0]) != 'set()': return list_of_strings[0] else: return list_of_strings[-1]
def main(): with open('../data/states.txt') as f: lines = f.read().splitlines() states = [line.split('\t')[0] for line in lines] states_with_spaces = [state for state in states if ' ' in state] # Print the states_with_spaces list for i, state_name in enumerate(states_with_spaces, 1): print(f'{i}. {state_name}') main()
def main(): with open('../data/states.txt') as f: lines = f.read().splitlines() states = [line.split('\t')[0] for line in lines] states_with_spaces = [state for state in states if ' ' in state] for (i, state_name) in enumerate(states_with_spaces, 1): print(f'{i}. {state_name}') main()
power = {'BUSES': {'Area': 1.33155, 'Bus/Area': 1.33155, 'Bus/Gate Leakage': 0.00662954, 'Bus/Peak Dynamic': 0.0, 'Bus/Runtime Dynamic': 0.0, 'Bus/Subthreshold Leakage': 0.0691322, 'Bus/Subthreshold Leakage with power gating': 0.0259246, 'Gate Leakage': 0.00662954, 'Peak Dynamic': 0.0, 'Runtime Dynamic': 0.0, 'Subthreshold Leakage': 0.0691322, 'Subthreshold Leakage with power gating': 0.0259246}, 'Core': [{'Area': 32.6082, 'Execution Unit/Area': 8.2042, 'Execution Unit/Complex ALUs/Area': 0.235435, 'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646, 'Execution Unit/Complex ALUs/Peak Dynamic': 0.0373927, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.232059, 'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111, 'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163, 'Execution Unit/Floating Point Units/Area': 4.6585, 'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156, 'Execution Unit/Floating Point Units/Peak Dynamic': 0.200288, 'Execution Unit/Floating Point Units/Runtime Dynamic': 0.304033, 'Execution Unit/Floating Point Units/Subthreshold Leakage': 0.994829, 'Execution Unit/Floating Point Units/Subthreshold Leakage with power gating': 0.373061, 'Execution Unit/Gate Leakage': 0.122718, 'Execution Unit/Instruction Scheduler/Area': 2.17927, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Area': 0.328073, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Gate Leakage': 0.00115349, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Peak Dynamic': 1.20978, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Runtime Dynamic': 0.377336, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage': 0.017004, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage with power gating': 0.00962066, 'Execution Unit/Instruction Scheduler/Gate Leakage': 0.00730101, 'Execution Unit/Instruction Scheduler/Instruction Window/Area': 1.00996, 'Execution Unit/Instruction Scheduler/Instruction Window/Gate Leakage': 0.00529112, 'Execution Unit/Instruction Scheduler/Instruction Window/Peak Dynamic': 2.07911, 'Execution Unit/Instruction Scheduler/Instruction Window/Runtime Dynamic': 0.653409, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage': 0.0800117, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage with power gating': 0.0455351, 'Execution Unit/Instruction Scheduler/Peak Dynamic': 4.84781, 'Execution Unit/Instruction Scheduler/ROB/Area': 0.841232, 'Execution Unit/Instruction Scheduler/ROB/Gate Leakage': 0.000856399, 'Execution Unit/Instruction Scheduler/ROB/Peak Dynamic': 1.55892, 'Execution Unit/Instruction Scheduler/ROB/Runtime Dynamic': 0.374748, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage': 0.0178624, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage with power gating': 0.00897339, 'Execution Unit/Instruction Scheduler/Runtime Dynamic': 1.40549, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage': 0.114878, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage with power gating': 0.0641291, 'Execution Unit/Integer ALUs/Area': 0.47087, 'Execution Unit/Integer ALUs/Gate Leakage': 0.0265291, 'Execution Unit/Integer ALUs/Peak Dynamic': 0.342274, 'Execution Unit/Integer ALUs/Runtime Dynamic': 0.101344, 'Execution Unit/Integer ALUs/Subthreshold Leakage': 0.40222, 'Execution Unit/Integer ALUs/Subthreshold Leakage with power gating': 0.150833, 'Execution Unit/Peak Dynamic': 5.90845, 'Execution Unit/Register Files/Area': 0.570804, 'Execution Unit/Register Files/Floating Point RF/Area': 0.208131, 'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788, 'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 0.0378387, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.0136787, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage': 0.00399698, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage with power gating': 0.00176968, 'Execution Unit/Register Files/Gate Leakage': 0.000622708, 'Execution Unit/Register Files/Integer RF/Area': 0.362673, 'Execution Unit/Register Files/Integer RF/Gate Leakage': 0.00038992, 'Execution Unit/Register Files/Integer RF/Peak Dynamic': 0.11298, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.101162, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage': 0.00614175, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage with power gating': 0.00246675, 'Execution Unit/Register Files/Peak Dynamic': 0.150819, 'Execution Unit/Register Files/Runtime Dynamic': 0.114841, 'Execution Unit/Register Files/Subthreshold Leakage': 0.0101387, 'Execution Unit/Register Files/Subthreshold Leakage with power gating': 0.00423643, 'Execution Unit/Results Broadcast Bus/Area Overhead': 0.0442632, 'Execution Unit/Results Broadcast Bus/Gate Leakage': 0.00607074, 'Execution Unit/Results Broadcast Bus/Peak Dynamic': 0.283251, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.742252, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage': 0.0920413, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage with power gating': 0.0345155, 'Execution Unit/Runtime Dynamic': 2.90002, 'Execution Unit/Subthreshold Leakage': 1.83518, 'Execution Unit/Subthreshold Leakage with power gating': 0.709678, 'Gate Leakage': 0.372997, 'Instruction Fetch Unit/Area': 5.86007, 'Instruction Fetch Unit/Branch Predictor/Area': 0.138516, 'Instruction Fetch Unit/Branch Predictor/Chooser/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Chooser/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Chooser/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Chooser/Runtime Dynamic': 0.00291518, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/Gate Leakage': 0.000757657, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Runtime Dynamic': 0.00291518, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Area': 0.0257064, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Gate Leakage': 0.000154548, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Peak Dynamic': 0.0142575, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Runtime Dynamic': 0.00254578, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage': 0.00384344, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage with power gating': 0.00198631, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Area': 0.0151917, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Gate Leakage': 8.00196e-05, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Peak Dynamic': 0.00527447, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Runtime Dynamic': 0.000989163, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage': 0.00181347, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage with power gating': 0.000957045, 'Instruction Fetch Unit/Branch Predictor/Peak Dynamic': 0.0597838, 'Instruction Fetch Unit/Branch Predictor/RAS/Area': 0.0105732, 'Instruction Fetch Unit/Branch Predictor/RAS/Gate Leakage': 4.63858e-05, 'Instruction Fetch Unit/Branch Predictor/RAS/Peak Dynamic': 0.0117602, 'Instruction Fetch Unit/Branch Predictor/RAS/Runtime Dynamic': 0.00145321, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage': 0.000932505, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage with power gating': 0.000494733, 'Instruction Fetch Unit/Branch Predictor/Runtime Dynamic': 0.00982934, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage': 0.0199703, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage with power gating': 0.0103282, 'Instruction Fetch Unit/Branch Target Buffer/Area': 0.64954, 'Instruction Fetch Unit/Branch Target Buffer/Gate Leakage': 0.00272758, 'Instruction Fetch Unit/Branch Target Buffer/Peak Dynamic': 0.177867, 'Instruction Fetch Unit/Branch Target Buffer/Runtime Dynamic': 0.0277121, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage': 0.0811682, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage with power gating': 0.0435357, 'Instruction Fetch Unit/Gate Leakage': 0.0590479, 'Instruction Fetch Unit/Instruction Buffer/Area': 0.0226323, 'Instruction Fetch Unit/Instruction Buffer/Gate Leakage': 6.83558e-05, 'Instruction Fetch Unit/Instruction Buffer/Peak Dynamic': 0.606827, 'Instruction Fetch Unit/Instruction Buffer/Runtime Dynamic': 0.09725, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682, 'Instruction Fetch Unit/Instruction Cache/Area': 3.14635, 'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931, 'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 6.18594, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.324832, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage': 0.367022, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage with power gating': 0.180386, 'Instruction Fetch Unit/Instruction Decoder/Area': 1.85799, 'Instruction Fetch Unit/Instruction Decoder/Gate Leakage': 0.0222493, 'Instruction Fetch Unit/Instruction Decoder/Peak Dynamic': 1.37404, 'Instruction Fetch Unit/Instruction Decoder/Runtime Dynamic': 0.330305, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104, 'Instruction Fetch Unit/Peak Dynamic': 8.70926, 'Instruction Fetch Unit/Runtime Dynamic': 0.789928, 'Instruction Fetch Unit/Subthreshold Leakage': 0.932587, 'Instruction Fetch Unit/Subthreshold Leakage with power gating': 0.408542, 'L2/Area': 4.53318, 'L2/Gate Leakage': 0.015464, 'L2/Peak Dynamic': 0.0775151, 'L2/Runtime Dynamic': 0.01304, 'L2/Subthreshold Leakage': 0.834142, 'L2/Subthreshold Leakage with power gating': 0.401066, 'Load Store Unit/Area': 8.80969, 'Load Store Unit/Data Cache/Area': 6.84535, 'Load Store Unit/Data Cache/Gate Leakage': 0.0279261, 'Load Store Unit/Data Cache/Peak Dynamic': 4.52601, 'Load Store Unit/Data Cache/Runtime Dynamic': 1.59394, 'Load Store Unit/Data Cache/Subthreshold Leakage': 0.527675, 'Load Store Unit/Data Cache/Subthreshold Leakage with power gating': 0.25085, 'Load Store Unit/Gate Leakage': 0.0351387, 'Load Store Unit/LoadQ/Area': 0.0836782, 'Load Store Unit/LoadQ/Gate Leakage': 0.00059896, 'Load Store Unit/LoadQ/Peak Dynamic': 0.106403, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.106403, 'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961, 'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918, 'Load Store Unit/Peak Dynamic': 5.03052, 'Load Store Unit/Runtime Dynamic': 2.22509, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.262373, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.524746, 'Load Store Unit/StoreQ/Subthreshold Leakage': 0.0345621, 'Load Store Unit/StoreQ/Subthreshold Leakage with power gating': 0.0197004, 'Load Store Unit/Subthreshold Leakage': 0.591622, 'Load Store Unit/Subthreshold Leakage with power gating': 0.283406, 'Memory Management Unit/Area': 0.434579, 'Memory Management Unit/Dtlb/Area': 0.0879726, 'Memory Management Unit/Dtlb/Gate Leakage': 0.00088729, 'Memory Management Unit/Dtlb/Peak Dynamic': 0.093117, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0941226, 'Memory Management Unit/Dtlb/Subthreshold Leakage': 0.0155699, 'Memory Management Unit/Dtlb/Subthreshold Leakage with power gating': 0.00887485, 'Memory Management Unit/Gate Leakage': 0.00813591, 'Memory Management Unit/Itlb/Area': 0.301552, 'Memory Management Unit/Itlb/Gate Leakage': 0.00393464, 'Memory Management Unit/Itlb/Peak Dynamic': 0.384619, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.0537208, 'Memory Management Unit/Itlb/Subthreshold Leakage': 0.0413758, 'Memory Management Unit/Itlb/Subthreshold Leakage with power gating': 0.0235842, 'Memory Management Unit/Peak Dynamic': 0.704099, 'Memory Management Unit/Runtime Dynamic': 0.147843, 'Memory Management Unit/Subthreshold Leakage': 0.0769113, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0399462, 'Peak Dynamic': 24.9915, 'Renaming Unit/Area': 0.369768, 'Renaming Unit/FP Front End RAT/Area': 0.168486, 'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00489731, 'Renaming Unit/FP Front End RAT/Peak Dynamic': 3.33511, 'Renaming Unit/FP Front End RAT/Runtime Dynamic': 0.13201, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage': 0.0437281, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage with power gating': 0.024925, 'Renaming Unit/Free List/Area': 0.0414755, 'Renaming Unit/Free List/Gate Leakage': 4.15911e-05, 'Renaming Unit/Free List/Peak Dynamic': 0.0401324, 'Renaming Unit/Free List/Runtime Dynamic': 0.0208834, 'Renaming Unit/Free List/Subthreshold Leakage': 0.000670426, 'Renaming Unit/Free List/Subthreshold Leakage with power gating': 0.000377987, 'Renaming Unit/Gate Leakage': 0.00863632, 'Renaming Unit/Int Front End RAT/Area': 0.114751, 'Renaming Unit/Int Front End RAT/Gate Leakage': 0.00038343, 'Renaming Unit/Int Front End RAT/Peak Dynamic': 0.86945, 'Renaming Unit/Int Front End RAT/Runtime Dynamic': 0.194813, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage': 0.00611897, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00348781, 'Renaming Unit/Peak Dynamic': 4.56169, 'Renaming Unit/Runtime Dynamic': 0.347706, 'Renaming Unit/Subthreshold Leakage': 0.070483, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0362779, 'Runtime Dynamic': 6.42363, 'Subthreshold Leakage': 6.21877, 'Subthreshold Leakage with power gating': 2.58311}, {'Area': 32.0201, 'Execution Unit/Area': 7.68434, 'Execution Unit/Complex ALUs/Area': 0.235435, 'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646, 'Execution Unit/Complex ALUs/Peak Dynamic': 0.0133598, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.213182, 'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111, 'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163, 'Execution Unit/Floating Point Units/Area': 4.6585, 'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156, 'Execution Unit/Floating Point Units/Peak Dynamic': 0.0715596, 'Execution Unit/Floating Point Units/Runtime Dynamic': 0.304033, 'Execution Unit/Floating Point Units/Subthreshold Leakage': 0.994829, 'Execution Unit/Floating Point Units/Subthreshold Leakage with power gating': 0.373061, 'Execution Unit/Gate Leakage': 0.120359, 'Execution Unit/Instruction Scheduler/Area': 1.66526, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Area': 0.275653, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Gate Leakage': 0.000977433, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Peak Dynamic': 1.04181, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Runtime Dynamic': 0.164446, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage': 0.0143453, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage with power gating': 0.00810519, 'Execution Unit/Instruction Scheduler/Gate Leakage': 0.00568913, 'Execution Unit/Instruction Scheduler/Instruction Window/Area': 0.805223, 'Execution Unit/Instruction Scheduler/Instruction Window/Gate Leakage': 0.00414562, 'Execution Unit/Instruction Scheduler/Instruction Window/Peak Dynamic': 1.6763, 'Execution Unit/Instruction Scheduler/Instruction Window/Runtime Dynamic': 0.265245, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage': 0.0625755, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage with power gating': 0.0355964, 'Execution Unit/Instruction Scheduler/Peak Dynamic': 3.82262, 'Execution Unit/Instruction Scheduler/ROB/Area': 0.584388, 'Execution Unit/Instruction Scheduler/ROB/Gate Leakage': 0.00056608, 'Execution Unit/Instruction Scheduler/ROB/Peak Dynamic': 1.10451, 'Execution Unit/Instruction Scheduler/ROB/Runtime Dynamic': 0.133887, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage': 0.00906853, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage with power gating': 0.00364446, 'Execution Unit/Instruction Scheduler/Runtime Dynamic': 0.563578, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage': 0.0859892, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage with power gating': 0.047346, 'Execution Unit/Integer ALUs/Area': 0.47087, 'Execution Unit/Integer ALUs/Gate Leakage': 0.0265291, 'Execution Unit/Integer ALUs/Peak Dynamic': 0.177107, 'Execution Unit/Integer ALUs/Runtime Dynamic': 0.101344, 'Execution Unit/Integer ALUs/Subthreshold Leakage': 0.40222, 'Execution Unit/Integer ALUs/Subthreshold Leakage with power gating': 0.150833, 'Execution Unit/Peak Dynamic': 4.29584, 'Execution Unit/Register Files/Area': 0.570804, 'Execution Unit/Register Files/Floating Point RF/Area': 0.208131, 'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788, 'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 0.0135191, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00689761, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage': 0.00399698, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage with power gating': 0.00176968, 'Execution Unit/Register Files/Gate Leakage': 0.000622708, 'Execution Unit/Register Files/Integer RF/Area': 0.362673, 'Execution Unit/Register Files/Integer RF/Gate Leakage': 0.00038992, 'Execution Unit/Register Files/Integer RF/Peak Dynamic': 0.0549037, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.051012, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage': 0.00614175, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage with power gating': 0.00246675, 'Execution Unit/Register Files/Peak Dynamic': 0.0684228, 'Execution Unit/Register Files/Runtime Dynamic': 0.0579096, 'Execution Unit/Register Files/Subthreshold Leakage': 0.0101387, 'Execution Unit/Register Files/Subthreshold Leakage with power gating': 0.00423643, 'Execution Unit/Results Broadcast Bus/Area Overhead': 0.0390912, 'Execution Unit/Results Broadcast Bus/Gate Leakage': 0.00537402, 'Execution Unit/Results Broadcast Bus/Peak Dynamic': 0.119007, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.318584, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage': 0.081478, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage with power gating': 0.0305543, 'Execution Unit/Runtime Dynamic': 1.55863, 'Execution Unit/Subthreshold Leakage': 1.79543, 'Execution Unit/Subthreshold Leakage with power gating': 0.688821, 'Gate Leakage': 0.368936, 'Instruction Fetch Unit/Area': 5.85939, 'Instruction Fetch Unit/Branch Predictor/Area': 0.138516, 'Instruction Fetch Unit/Branch Predictor/Chooser/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Chooser/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Chooser/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Chooser/Runtime Dynamic': 0.00161133, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/Gate Leakage': 0.000757657, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Runtime Dynamic': 0.00161133, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Area': 0.0257064, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Gate Leakage': 0.000154548, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Peak Dynamic': 0.0142575, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Runtime Dynamic': 0.00144666, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage': 0.00384344, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage with power gating': 0.00198631, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Area': 0.0151917, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Gate Leakage': 8.00196e-05, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Peak Dynamic': 0.00527447, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Runtime Dynamic': 0.000583646, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage': 0.00181347, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage with power gating': 0.000957045, 'Instruction Fetch Unit/Branch Predictor/Peak Dynamic': 0.0597838, 'Instruction Fetch Unit/Branch Predictor/RAS/Area': 0.0105732, 'Instruction Fetch Unit/Branch Predictor/RAS/Gate Leakage': 4.63858e-05, 'Instruction Fetch Unit/Branch Predictor/RAS/Peak Dynamic': 0.0117602, 'Instruction Fetch Unit/Branch Predictor/RAS/Runtime Dynamic': 0.000732792, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage': 0.000932505, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage with power gating': 0.000494733, 'Instruction Fetch Unit/Branch Predictor/Runtime Dynamic': 0.00540212, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage': 0.0199703, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage with power gating': 0.0103282, 'Instruction Fetch Unit/Branch Target Buffer/Area': 0.64954, 'Instruction Fetch Unit/Branch Target Buffer/Gate Leakage': 0.00272758, 'Instruction Fetch Unit/Branch Target Buffer/Peak Dynamic': 0.177867, 'Instruction Fetch Unit/Branch Target Buffer/Runtime Dynamic': 0.0139063, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage': 0.0811682, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage with power gating': 0.0435357, 'Instruction Fetch Unit/Gate Leakage': 0.0589979, 'Instruction Fetch Unit/Instruction Buffer/Area': 0.0226323, 'Instruction Fetch Unit/Instruction Buffer/Gate Leakage': 6.83558e-05, 'Instruction Fetch Unit/Instruction Buffer/Peak Dynamic': 0.606827, 'Instruction Fetch Unit/Instruction Buffer/Runtime Dynamic': 0.0490392, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682, 'Instruction Fetch Unit/Instruction Cache/Area': 3.14635, 'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931, 'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 3.11931, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.164001, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage': 0.367022, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage with power gating': 0.180386, 'Instruction Fetch Unit/Instruction Decoder/Area': 1.85799, 'Instruction Fetch Unit/Instruction Decoder/Gate Leakage': 0.0222493, 'Instruction Fetch Unit/Instruction Decoder/Peak Dynamic': 1.37404, 'Instruction Fetch Unit/Instruction Decoder/Runtime Dynamic': 0.166559, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104, 'Instruction Fetch Unit/Peak Dynamic': 5.48921, 'Instruction Fetch Unit/Runtime Dynamic': 0.398908, 'Instruction Fetch Unit/Subthreshold Leakage': 0.932286, 'Instruction Fetch Unit/Subthreshold Leakage with power gating': 0.40843, 'L2/Area': 4.53318, 'L2/Gate Leakage': 0.015464, 'L2/Peak Dynamic': 0.0403734, 'L2/Runtime Dynamic': 0.00826047, 'L2/Subthreshold Leakage': 0.834142, 'L2/Subthreshold Leakage with power gating': 0.401066, 'Load Store Unit/Area': 8.80901, 'Load Store Unit/Data Cache/Area': 6.84535, 'Load Store Unit/Data Cache/Gate Leakage': 0.0279261, 'Load Store Unit/Data Cache/Peak Dynamic': 2.90924, 'Load Store Unit/Data Cache/Runtime Dynamic': 0.812966, 'Load Store Unit/Data Cache/Subthreshold Leakage': 0.527675, 'Load Store Unit/Data Cache/Subthreshold Leakage with power gating': 0.25085, 'Load Store Unit/Gate Leakage': 0.0350888, 'Load Store Unit/LoadQ/Area': 0.0836782, 'Load Store Unit/LoadQ/Gate Leakage': 0.00059896, 'Load Store Unit/LoadQ/Peak Dynamic': 0.0540971, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.054097, 'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961, 'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918, 'Load Store Unit/Peak Dynamic': 3.1647, 'Load Store Unit/Runtime Dynamic': 1.13385, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.133394, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.266788, 'Load Store Unit/StoreQ/Subthreshold Leakage': 0.0345621, 'Load Store Unit/StoreQ/Subthreshold Leakage with power gating': 0.0197004, 'Load Store Unit/Subthreshold Leakage': 0.591321, 'Load Store Unit/Subthreshold Leakage with power gating': 0.283293, 'Memory Management Unit/Area': 0.4339, 'Memory Management Unit/Dtlb/Area': 0.0879726, 'Memory Management Unit/Dtlb/Gate Leakage': 0.00088729, 'Memory Management Unit/Dtlb/Peak Dynamic': 0.0473421, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0478513, 'Memory Management Unit/Dtlb/Subthreshold Leakage': 0.0155699, 'Memory Management Unit/Dtlb/Subthreshold Leakage with power gating': 0.00887485, 'Memory Management Unit/Gate Leakage': 0.00808595, 'Memory Management Unit/Itlb/Area': 0.301552, 'Memory Management Unit/Itlb/Gate Leakage': 0.00393464, 'Memory Management Unit/Itlb/Peak Dynamic': 0.193947, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.027173, 'Memory Management Unit/Itlb/Subthreshold Leakage': 0.0413758, 'Memory Management Unit/Itlb/Subthreshold Leakage with power gating': 0.0235842, 'Memory Management Unit/Peak Dynamic': 0.431382, 'Memory Management Unit/Runtime Dynamic': 0.0750243, 'Memory Management Unit/Subthreshold Leakage': 0.0766103, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333, 'Peak Dynamic': 17.011, 'Renaming Unit/Area': 0.303608, 'Renaming Unit/FP Front End RAT/Area': 0.131045, 'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00351123, 'Renaming Unit/FP Front End RAT/Peak Dynamic': 2.51468, 'Renaming Unit/FP Front End RAT/Runtime Dynamic': 0.0355631, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage': 0.0308571, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage with power gating': 0.0175885, 'Renaming Unit/Free List/Area': 0.0340654, 'Renaming Unit/Free List/Gate Leakage': 2.5481e-05, 'Renaming Unit/Free List/Peak Dynamic': 0.0306032, 'Renaming Unit/Free List/Runtime Dynamic': 0.00785215, 'Renaming Unit/Free List/Subthreshold Leakage': 0.000370144, 'Renaming Unit/Free List/Subthreshold Leakage with power gating': 0.000201064, 'Renaming Unit/Gate Leakage': 0.00708398, 'Renaming Unit/Int Front End RAT/Area': 0.0941223, 'Renaming Unit/Int Front End RAT/Gate Leakage': 0.000283242, 'Renaming Unit/Int Front End RAT/Peak Dynamic': 0.731965, 'Renaming Unit/Int Front End RAT/Runtime Dynamic': 0.0837759, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage': 0.00435488, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00248228, 'Renaming Unit/Peak Dynamic': 3.58947, 'Renaming Unit/Runtime Dynamic': 0.127191, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 3.30187, 'Subthreshold Leakage': 6.16288, 'Subthreshold Leakage with power gating': 2.55328}, {'Area': 32.0201, 'Execution Unit/Area': 7.68434, 'Execution Unit/Complex ALUs/Area': 0.235435, 'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646, 'Execution Unit/Complex ALUs/Peak Dynamic': 0.0105276, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.210958, 'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111, 'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163, 'Execution Unit/Floating Point Units/Area': 4.6585, 'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156, 'Execution Unit/Floating Point Units/Peak Dynamic': 0.0563895, 'Execution Unit/Floating Point Units/Runtime Dynamic': 0.304033, 'Execution Unit/Floating Point Units/Subthreshold Leakage': 0.994829, 'Execution Unit/Floating Point Units/Subthreshold Leakage with power gating': 0.373061, 'Execution Unit/Gate Leakage': 0.120359, 'Execution Unit/Instruction Scheduler/Area': 1.66526, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Area': 0.275653, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Gate Leakage': 0.000977433, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Peak Dynamic': 1.04181, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Runtime Dynamic': 0.170899, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage': 0.0143453, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage with power gating': 0.00810519, 'Execution Unit/Instruction Scheduler/Gate Leakage': 0.00568913, 'Execution Unit/Instruction Scheduler/Instruction Window/Area': 0.805223, 'Execution Unit/Instruction Scheduler/Instruction Window/Gate Leakage': 0.00414562, 'Execution Unit/Instruction Scheduler/Instruction Window/Peak Dynamic': 1.6763, 'Execution Unit/Instruction Scheduler/Instruction Window/Runtime Dynamic': 0.275654, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage': 0.0625755, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage with power gating': 0.0355964, 'Execution Unit/Instruction Scheduler/Peak Dynamic': 3.82262, 'Execution Unit/Instruction Scheduler/ROB/Area': 0.584388, 'Execution Unit/Instruction Scheduler/ROB/Gate Leakage': 0.00056608, 'Execution Unit/Instruction Scheduler/ROB/Peak Dynamic': 1.10451, 'Execution Unit/Instruction Scheduler/ROB/Runtime Dynamic': 0.139141, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage': 0.00906853, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage with power gating': 0.00364446, 'Execution Unit/Instruction Scheduler/Runtime Dynamic': 0.585694, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage': 0.0859892, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage with power gating': 0.047346, 'Execution Unit/Integer ALUs/Area': 0.47087, 'Execution Unit/Integer ALUs/Gate Leakage': 0.0265291, 'Execution Unit/Integer ALUs/Peak Dynamic': 0.186814, 'Execution Unit/Integer ALUs/Runtime Dynamic': 0.101344, 'Execution Unit/Integer ALUs/Subthreshold Leakage': 0.40222, 'Execution Unit/Integer ALUs/Subthreshold Leakage with power gating': 0.150833, 'Execution Unit/Peak Dynamic': 4.28804, 'Execution Unit/Register Files/Area': 0.570804, 'Execution Unit/Register Files/Floating Point RF/Area': 0.208131, 'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788, 'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 0.0106532, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00716827, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage': 0.00399698, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage with power gating': 0.00176968, 'Execution Unit/Register Files/Gate Leakage': 0.000622708, 'Execution Unit/Register Files/Integer RF/Area': 0.362673, 'Execution Unit/Register Files/Integer RF/Gate Leakage': 0.00038992, 'Execution Unit/Register Files/Integer RF/Peak Dynamic': 0.0557959, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0530138, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage': 0.00614175, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage with power gating': 0.00246675, 'Execution Unit/Register Files/Peak Dynamic': 0.0664491, 'Execution Unit/Register Files/Runtime Dynamic': 0.0601821, 'Execution Unit/Register Files/Subthreshold Leakage': 0.0101387, 'Execution Unit/Register Files/Subthreshold Leakage with power gating': 0.00423643, 'Execution Unit/Results Broadcast Bus/Area Overhead': 0.0390912, 'Execution Unit/Results Broadcast Bus/Gate Leakage': 0.00537402, 'Execution Unit/Results Broadcast Bus/Peak Dynamic': 0.120179, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.323037, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage': 0.081478, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage with power gating': 0.0305543, 'Execution Unit/Runtime Dynamic': 1.58525, 'Execution Unit/Subthreshold Leakage': 1.79543, 'Execution Unit/Subthreshold Leakage with power gating': 0.688821, 'Gate Leakage': 0.368936, 'Instruction Fetch Unit/Area': 5.85939, 'Instruction Fetch Unit/Branch Predictor/Area': 0.138516, 'Instruction Fetch Unit/Branch Predictor/Chooser/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Chooser/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Chooser/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Chooser/Runtime Dynamic': 0.00169386, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/Gate Leakage': 0.000757657, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Runtime Dynamic': 0.00169386, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Area': 0.0257064, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Gate Leakage': 0.000154548, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Peak Dynamic': 0.0142575, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Runtime Dynamic': 0.00151699, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage': 0.00384344, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage with power gating': 0.00198631, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Area': 0.0151917, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Gate Leakage': 8.00196e-05, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Peak Dynamic': 0.00527447, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Runtime Dynamic': 0.000610028, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage': 0.00181347, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage with power gating': 0.000957045, 'Instruction Fetch Unit/Branch Predictor/Peak Dynamic': 0.0597838, 'Instruction Fetch Unit/Branch Predictor/RAS/Area': 0.0105732, 'Instruction Fetch Unit/Branch Predictor/RAS/Gate Leakage': 4.63858e-05, 'Instruction Fetch Unit/Branch Predictor/RAS/Peak Dynamic': 0.0117602, 'Instruction Fetch Unit/Branch Predictor/RAS/Runtime Dynamic': 0.000761547, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage': 0.000932505, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage with power gating': 0.000494733, 'Instruction Fetch Unit/Branch Predictor/Runtime Dynamic': 0.00566627, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage': 0.0199703, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage with power gating': 0.0103282, 'Instruction Fetch Unit/Branch Target Buffer/Area': 0.64954, 'Instruction Fetch Unit/Branch Target Buffer/Gate Leakage': 0.00272758, 'Instruction Fetch Unit/Branch Target Buffer/Peak Dynamic': 0.177867, 'Instruction Fetch Unit/Branch Target Buffer/Runtime Dynamic': 0.0147528, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage': 0.0811682, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage with power gating': 0.0435357, 'Instruction Fetch Unit/Gate Leakage': 0.0589979, 'Instruction Fetch Unit/Instruction Buffer/Area': 0.0226323, 'Instruction Fetch Unit/Instruction Buffer/Gate Leakage': 6.83558e-05, 'Instruction Fetch Unit/Instruction Buffer/Peak Dynamic': 0.606827, 'Instruction Fetch Unit/Instruction Buffer/Runtime Dynamic': 0.0509635, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682, 'Instruction Fetch Unit/Instruction Cache/Area': 3.14635, 'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931, 'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 3.24172, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.178413, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage': 0.367022, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage with power gating': 0.180386, 'Instruction Fetch Unit/Instruction Decoder/Area': 1.85799, 'Instruction Fetch Unit/Instruction Decoder/Gate Leakage': 0.0222493, 'Instruction Fetch Unit/Instruction Decoder/Peak Dynamic': 1.37404, 'Instruction Fetch Unit/Instruction Decoder/Runtime Dynamic': 0.173095, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104, 'Instruction Fetch Unit/Peak Dynamic': 5.61756, 'Instruction Fetch Unit/Runtime Dynamic': 0.42289, 'Instruction Fetch Unit/Subthreshold Leakage': 0.932286, 'Instruction Fetch Unit/Subthreshold Leakage with power gating': 0.40843, 'L2/Area': 4.53318, 'L2/Gate Leakage': 0.015464, 'L2/Peak Dynamic': 0.0480074, 'L2/Runtime Dynamic': 0.0107323, 'L2/Subthreshold Leakage': 0.834142, 'L2/Subthreshold Leakage with power gating': 0.401066, 'Load Store Unit/Area': 8.80901, 'Load Store Unit/Data Cache/Area': 6.84535, 'Load Store Unit/Data Cache/Gate Leakage': 0.0279261, 'Load Store Unit/Data Cache/Peak Dynamic': 2.89098, 'Load Store Unit/Data Cache/Runtime Dynamic': 0.807362, 'Load Store Unit/Data Cache/Subthreshold Leakage': 0.527675, 'Load Store Unit/Data Cache/Subthreshold Leakage with power gating': 0.25085, 'Load Store Unit/Gate Leakage': 0.0350888, 'Load Store Unit/LoadQ/Area': 0.0836782, 'Load Store Unit/LoadQ/Gate Leakage': 0.00059896, 'Load Store Unit/LoadQ/Peak Dynamic': 0.0535062, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0535061, 'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961, 'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918, 'Load Store Unit/Peak Dynamic': 3.14364, 'Load Store Unit/Runtime Dynamic': 1.12474, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.131937, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.263874, 'Load Store Unit/StoreQ/Subthreshold Leakage': 0.0345621, 'Load Store Unit/StoreQ/Subthreshold Leakage with power gating': 0.0197004, 'Load Store Unit/Subthreshold Leakage': 0.591321, 'Load Store Unit/Subthreshold Leakage with power gating': 0.283293, 'Memory Management Unit/Area': 0.4339, 'Memory Management Unit/Dtlb/Area': 0.0879726, 'Memory Management Unit/Dtlb/Gate Leakage': 0.00088729, 'Memory Management Unit/Dtlb/Peak Dynamic': 0.0468249, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.047449, 'Memory Management Unit/Dtlb/Subthreshold Leakage': 0.0155699, 'Memory Management Unit/Dtlb/Subthreshold Leakage with power gating': 0.00887485, 'Memory Management Unit/Gate Leakage': 0.00808595, 'Memory Management Unit/Itlb/Area': 0.301552, 'Memory Management Unit/Itlb/Gate Leakage': 0.00393464, 'Memory Management Unit/Itlb/Peak Dynamic': 0.201558, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.0295351, 'Memory Management Unit/Itlb/Subthreshold Leakage': 0.0413758, 'Memory Management Unit/Itlb/Subthreshold Leakage with power gating': 0.0235842, 'Memory Management Unit/Peak Dynamic': 0.438104, 'Memory Management Unit/Runtime Dynamic': 0.0769841, 'Memory Management Unit/Subthreshold Leakage': 0.0766103, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333, 'Peak Dynamic': 17.1248, 'Renaming Unit/Area': 0.303608, 'Renaming Unit/FP Front End RAT/Area': 0.131045, 'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00351123, 'Renaming Unit/FP Front End RAT/Peak Dynamic': 2.51468, 'Renaming Unit/FP Front End RAT/Runtime Dynamic': 0.0280241, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage': 0.0308571, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage with power gating': 0.0175885, 'Renaming Unit/Free List/Area': 0.0340654, 'Renaming Unit/Free List/Gate Leakage': 2.5481e-05, 'Renaming Unit/Free List/Peak Dynamic': 0.0306032, 'Renaming Unit/Free List/Runtime Dynamic': 0.00805154, 'Renaming Unit/Free List/Subthreshold Leakage': 0.000370144, 'Renaming Unit/Free List/Subthreshold Leakage with power gating': 0.000201064, 'Renaming Unit/Gate Leakage': 0.00708398, 'Renaming Unit/Int Front End RAT/Area': 0.0941223, 'Renaming Unit/Int Front End RAT/Gate Leakage': 0.000283242, 'Renaming Unit/Int Front End RAT/Peak Dynamic': 0.731965, 'Renaming Unit/Int Front End RAT/Runtime Dynamic': 0.0873152, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage': 0.00435488, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00248228, 'Renaming Unit/Peak Dynamic': 3.58947, 'Renaming Unit/Runtime Dynamic': 0.123391, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 3.34399, 'Subthreshold Leakage': 6.16288, 'Subthreshold Leakage with power gating': 2.55328}, {'Area': 32.0201, 'Execution Unit/Area': 7.68434, 'Execution Unit/Complex ALUs/Area': 0.235435, 'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646, 'Execution Unit/Complex ALUs/Peak Dynamic': 0.00646735, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.207769, 'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111, 'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163, 'Execution Unit/Floating Point Units/Area': 4.6585, 'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156, 'Execution Unit/Floating Point Units/Peak Dynamic': 0.0346438, 'Execution Unit/Floating Point Units/Runtime Dynamic': 0.304033, 'Execution Unit/Floating Point Units/Subthreshold Leakage': 0.994829, 'Execution Unit/Floating Point Units/Subthreshold Leakage with power gating': 0.373061, 'Execution Unit/Gate Leakage': 0.120359, 'Execution Unit/Instruction Scheduler/Area': 1.66526, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Area': 0.275653, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Gate Leakage': 0.000977433, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Peak Dynamic': 1.04181, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Runtime Dynamic': 0.184462, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage': 0.0143453, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage with power gating': 0.00810519, 'Execution Unit/Instruction Scheduler/Gate Leakage': 0.00568913, 'Execution Unit/Instruction Scheduler/Instruction Window/Area': 0.805223, 'Execution Unit/Instruction Scheduler/Instruction Window/Gate Leakage': 0.00414562, 'Execution Unit/Instruction Scheduler/Instruction Window/Peak Dynamic': 1.6763, 'Execution Unit/Instruction Scheduler/Instruction Window/Runtime Dynamic': 0.29753, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage': 0.0625755, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage with power gating': 0.0355964, 'Execution Unit/Instruction Scheduler/Peak Dynamic': 3.82262, 'Execution Unit/Instruction Scheduler/ROB/Area': 0.584388, 'Execution Unit/Instruction Scheduler/ROB/Gate Leakage': 0.00056608, 'Execution Unit/Instruction Scheduler/ROB/Peak Dynamic': 1.10451, 'Execution Unit/Instruction Scheduler/ROB/Runtime Dynamic': 0.150183, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage': 0.00906853, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage with power gating': 0.00364446, 'Execution Unit/Instruction Scheduler/Runtime Dynamic': 0.632175, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage': 0.0859892, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage with power gating': 0.047346, 'Execution Unit/Integer ALUs/Area': 0.47087, 'Execution Unit/Integer ALUs/Gate Leakage': 0.0265291, 'Execution Unit/Integer ALUs/Peak Dynamic': 0.205658, 'Execution Unit/Integer ALUs/Runtime Dynamic': 0.101344, 'Execution Unit/Integer ALUs/Subthreshold Leakage': 0.40222, 'Execution Unit/Integer ALUs/Subthreshold Leakage with power gating': 0.150833, 'Execution Unit/Peak Dynamic': 4.28652, 'Execution Unit/Register Files/Area': 0.570804, 'Execution Unit/Register Files/Floating Point RF/Area': 0.208131, 'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788, 'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 0.00654495, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00773715, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage': 0.00399698, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage with power gating': 0.00176968, 'Execution Unit/Register Files/Gate Leakage': 0.000622708, 'Execution Unit/Register Files/Integer RF/Area': 0.362673, 'Execution Unit/Register Files/Integer RF/Gate Leakage': 0.00038992, 'Execution Unit/Register Files/Integer RF/Peak Dynamic': 0.0583819, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.057221, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage': 0.00614175, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage with power gating': 0.00246675, 'Execution Unit/Register Files/Peak Dynamic': 0.0649268, 'Execution Unit/Register Files/Runtime Dynamic': 0.0649582, 'Execution Unit/Register Files/Subthreshold Leakage': 0.0101387, 'Execution Unit/Register Files/Subthreshold Leakage with power gating': 0.00423643, 'Execution Unit/Results Broadcast Bus/Area Overhead': 0.0390912, 'Execution Unit/Results Broadcast Bus/Gate Leakage': 0.00537402, 'Execution Unit/Results Broadcast Bus/Peak Dynamic': 0.124611, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.333729, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage': 0.081478, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage with power gating': 0.0305543, 'Execution Unit/Runtime Dynamic': 1.64401, 'Execution Unit/Subthreshold Leakage': 1.79543, 'Execution Unit/Subthreshold Leakage with power gating': 0.688821, 'Gate Leakage': 0.368936, 'Instruction Fetch Unit/Area': 5.85939, 'Instruction Fetch Unit/Branch Predictor/Area': 0.138516, 'Instruction Fetch Unit/Branch Predictor/Chooser/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Chooser/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Chooser/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Chooser/Runtime Dynamic': 0.00204448, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/Gate Leakage': 0.000757657, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Runtime Dynamic': 0.00204448, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Area': 0.0257064, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Gate Leakage': 0.000154548, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Peak Dynamic': 0.0142575, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Runtime Dynamic': 0.00183145, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage': 0.00384344, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage with power gating': 0.00198631, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Area': 0.0151917, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Gate Leakage': 8.00196e-05, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Peak Dynamic': 0.00527447, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Runtime Dynamic': 0.000736725, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage': 0.00181347, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage with power gating': 0.000957045, 'Instruction Fetch Unit/Branch Predictor/Peak Dynamic': 0.0597838, 'Instruction Fetch Unit/Branch Predictor/RAS/Area': 0.0105732, 'Instruction Fetch Unit/Branch Predictor/RAS/Gate Leakage': 4.63858e-05, 'Instruction Fetch Unit/Branch Predictor/RAS/Peak Dynamic': 0.0117602, 'Instruction Fetch Unit/Branch Predictor/RAS/Runtime Dynamic': 0.000821984, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage': 0.000932505, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage with power gating': 0.000494733, 'Instruction Fetch Unit/Branch Predictor/Runtime Dynamic': 0.00674239, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage': 0.0199703, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage with power gating': 0.0103282, 'Instruction Fetch Unit/Branch Target Buffer/Area': 0.64954, 'Instruction Fetch Unit/Branch Target Buffer/Gate Leakage': 0.00272758, 'Instruction Fetch Unit/Branch Target Buffer/Peak Dynamic': 0.177867, 'Instruction Fetch Unit/Branch Target Buffer/Runtime Dynamic': 0.0177902, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage': 0.0811682, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage with power gating': 0.0435357, 'Instruction Fetch Unit/Gate Leakage': 0.0589979, 'Instruction Fetch Unit/Instruction Buffer/Area': 0.0226323, 'Instruction Fetch Unit/Instruction Buffer/Gate Leakage': 6.83558e-05, 'Instruction Fetch Unit/Instruction Buffer/Peak Dynamic': 0.606827, 'Instruction Fetch Unit/Instruction Buffer/Runtime Dynamic': 0.055008, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682, 'Instruction Fetch Unit/Instruction Cache/Area': 3.14635, 'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931, 'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 3.49898, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.204523, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage': 0.367022, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage with power gating': 0.180386, 'Instruction Fetch Unit/Instruction Decoder/Area': 1.85799, 'Instruction Fetch Unit/Instruction Decoder/Gate Leakage': 0.0222493, 'Instruction Fetch Unit/Instruction Decoder/Peak Dynamic': 1.37404, 'Instruction Fetch Unit/Instruction Decoder/Runtime Dynamic': 0.186832, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104, 'Instruction Fetch Unit/Peak Dynamic': 5.88731, 'Instruction Fetch Unit/Runtime Dynamic': 0.470895, 'Instruction Fetch Unit/Subthreshold Leakage': 0.932286, 'Instruction Fetch Unit/Subthreshold Leakage with power gating': 0.40843, 'L2/Area': 4.53318, 'L2/Gate Leakage': 0.015464, 'L2/Peak Dynamic': 0.0413557, 'L2/Runtime Dynamic': 0.0090745, 'L2/Subthreshold Leakage': 0.834142, 'L2/Subthreshold Leakage with power gating': 0.401066, 'Load Store Unit/Area': 8.80901, 'Load Store Unit/Data Cache/Area': 6.84535, 'Load Store Unit/Data Cache/Gate Leakage': 0.0279261, 'Load Store Unit/Data Cache/Peak Dynamic': 2.93601, 'Load Store Unit/Data Cache/Runtime Dynamic': 0.829551, 'Load Store Unit/Data Cache/Subthreshold Leakage': 0.527675, 'Load Store Unit/Data Cache/Subthreshold Leakage with power gating': 0.25085, 'Load Store Unit/Gate Leakage': 0.0350888, 'Load Store Unit/LoadQ/Area': 0.0836782, 'Load Store Unit/LoadQ/Gate Leakage': 0.00059896, 'Load Store Unit/LoadQ/Peak Dynamic': 0.0549632, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0549632, 'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961, 'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918, 'Load Store Unit/Peak Dynamic': 3.19556, 'Load Store Unit/Runtime Dynamic': 1.15557, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.13553, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.27106, 'Load Store Unit/StoreQ/Subthreshold Leakage': 0.0345621, 'Load Store Unit/StoreQ/Subthreshold Leakage with power gating': 0.0197004, 'Load Store Unit/Subthreshold Leakage': 0.591321, 'Load Store Unit/Subthreshold Leakage with power gating': 0.283293, 'Memory Management Unit/Area': 0.4339, 'Memory Management Unit/Dtlb/Area': 0.0879726, 'Memory Management Unit/Dtlb/Gate Leakage': 0.00088729, 'Memory Management Unit/Dtlb/Peak Dynamic': 0.0481, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0486382, 'Memory Management Unit/Dtlb/Subthreshold Leakage': 0.0155699, 'Memory Management Unit/Dtlb/Subthreshold Leakage with power gating': 0.00887485, 'Memory Management Unit/Gate Leakage': 0.00808595, 'Memory Management Unit/Itlb/Area': 0.301552, 'Memory Management Unit/Itlb/Gate Leakage': 0.00393464, 'Memory Management Unit/Itlb/Peak Dynamic': 0.217554, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.0337738, 'Memory Management Unit/Itlb/Subthreshold Leakage': 0.0413758, 'Memory Management Unit/Itlb/Subthreshold Leakage with power gating': 0.0235842, 'Memory Management Unit/Peak Dynamic': 0.45629, 'Memory Management Unit/Runtime Dynamic': 0.082412, 'Memory Management Unit/Subthreshold Leakage': 0.0766103, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333, 'Peak Dynamic': 17.4565, 'Renaming Unit/Area': 0.303608, 'Renaming Unit/FP Front End RAT/Area': 0.131045, 'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00351123, 'Renaming Unit/FP Front End RAT/Peak Dynamic': 2.51468, 'Renaming Unit/FP Front End RAT/Runtime Dynamic': 0.0172167, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage': 0.0308571, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage with power gating': 0.0175885, 'Renaming Unit/Free List/Area': 0.0340654, 'Renaming Unit/Free List/Gate Leakage': 2.5481e-05, 'Renaming Unit/Free List/Peak Dynamic': 0.0306032, 'Renaming Unit/Free List/Runtime Dynamic': 0.00853193, 'Renaming Unit/Free List/Subthreshold Leakage': 0.000370144, 'Renaming Unit/Free List/Subthreshold Leakage with power gating': 0.000201064, 'Renaming Unit/Gate Leakage': 0.00708398, 'Renaming Unit/Int Front End RAT/Area': 0.0941223, 'Renaming Unit/Int Front End RAT/Gate Leakage': 0.000283242, 'Renaming Unit/Int Front End RAT/Peak Dynamic': 0.731965, 'Renaming Unit/Int Front End RAT/Runtime Dynamic': 0.0942385, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage': 0.00435488, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00248228, 'Renaming Unit/Peak Dynamic': 3.58947, 'Renaming Unit/Runtime Dynamic': 0.119987, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 3.48195, 'Subthreshold Leakage': 6.16288, 'Subthreshold Leakage with power gating': 2.55328}], 'DRAM': {'Area': 0, 'Gate Leakage': 0, 'Peak Dynamic': 3.5995855135814714, 'Runtime Dynamic': 3.5995855135814714, 'Subthreshold Leakage': 4.252, 'Subthreshold Leakage with power gating': 4.252}, 'L3': [{'Area': 61.9075, 'Gate Leakage': 0.0484137, 'Peak Dynamic': 0.241052, 'Runtime Dynamic': 0.0794812, 'Subthreshold Leakage': 6.80085, 'Subthreshold Leakage with power gating': 3.32364}], 'Processor': {'Area': 191.908, 'Gate Leakage': 1.53485, 'Peak Dynamic': 76.8249, 'Peak Power': 109.937, 'Runtime Dynamic': 16.6309, 'Subthreshold Leakage': 31.5774, 'Subthreshold Leakage with power gating': 13.9484, 'Total Cores/Area': 128.669, 'Total Cores/Gate Leakage': 1.4798, 'Total Cores/Peak Dynamic': 76.5838, 'Total Cores/Runtime Dynamic': 16.5514, 'Total Cores/Subthreshold Leakage': 24.7074, 'Total Cores/Subthreshold Leakage with power gating': 10.2429, 'Total L3s/Area': 61.9075, 'Total L3s/Gate Leakage': 0.0484137, 'Total L3s/Peak Dynamic': 0.241052, 'Total L3s/Runtime Dynamic': 0.0794812, 'Total L3s/Subthreshold Leakage': 6.80085, 'Total L3s/Subthreshold Leakage with power gating': 3.32364, 'Total Leakage': 33.1122, 'Total NoCs/Area': 1.33155, 'Total NoCs/Gate Leakage': 0.00662954, 'Total NoCs/Peak Dynamic': 0.0, 'Total NoCs/Runtime Dynamic': 0.0, 'Total NoCs/Subthreshold Leakage': 0.0691322, 'Total NoCs/Subthreshold Leakage with power gating': 0.0259246}}
power = {'BUSES': {'Area': 1.33155, 'Bus/Area': 1.33155, 'Bus/Gate Leakage': 0.00662954, 'Bus/Peak Dynamic': 0.0, 'Bus/Runtime Dynamic': 0.0, 'Bus/Subthreshold Leakage': 0.0691322, 'Bus/Subthreshold Leakage with power gating': 0.0259246, 'Gate Leakage': 0.00662954, 'Peak Dynamic': 0.0, 'Runtime Dynamic': 0.0, 'Subthreshold Leakage': 0.0691322, 'Subthreshold Leakage with power gating': 0.0259246}, 'Core': [{'Area': 32.6082, 'Execution Unit/Area': 8.2042, 'Execution Unit/Complex ALUs/Area': 0.235435, 'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646, 'Execution Unit/Complex ALUs/Peak Dynamic': 0.0373927, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.232059, 'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111, 'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163, 'Execution Unit/Floating Point Units/Area': 4.6585, 'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156, 'Execution Unit/Floating Point Units/Peak Dynamic': 0.200288, 'Execution Unit/Floating Point Units/Runtime Dynamic': 0.304033, 'Execution Unit/Floating Point Units/Subthreshold Leakage': 0.994829, 'Execution Unit/Floating Point Units/Subthreshold Leakage with power gating': 0.373061, 'Execution Unit/Gate Leakage': 0.122718, 'Execution Unit/Instruction Scheduler/Area': 2.17927, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Area': 0.328073, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Gate Leakage': 0.00115349, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Peak Dynamic': 1.20978, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Runtime Dynamic': 0.377336, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage': 0.017004, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage with power gating': 0.00962066, 'Execution Unit/Instruction Scheduler/Gate Leakage': 0.00730101, 'Execution Unit/Instruction Scheduler/Instruction Window/Area': 1.00996, 'Execution Unit/Instruction Scheduler/Instruction Window/Gate Leakage': 0.00529112, 'Execution Unit/Instruction Scheduler/Instruction Window/Peak Dynamic': 2.07911, 'Execution Unit/Instruction Scheduler/Instruction Window/Runtime Dynamic': 0.653409, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage': 0.0800117, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage with power gating': 0.0455351, 'Execution Unit/Instruction Scheduler/Peak Dynamic': 4.84781, 'Execution Unit/Instruction Scheduler/ROB/Area': 0.841232, 'Execution Unit/Instruction Scheduler/ROB/Gate Leakage': 0.000856399, 'Execution Unit/Instruction Scheduler/ROB/Peak Dynamic': 1.55892, 'Execution Unit/Instruction Scheduler/ROB/Runtime Dynamic': 0.374748, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage': 0.0178624, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage with power gating': 0.00897339, 'Execution Unit/Instruction Scheduler/Runtime Dynamic': 1.40549, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage': 0.114878, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage with power gating': 0.0641291, 'Execution Unit/Integer ALUs/Area': 0.47087, 'Execution Unit/Integer ALUs/Gate Leakage': 0.0265291, 'Execution Unit/Integer ALUs/Peak Dynamic': 0.342274, 'Execution Unit/Integer ALUs/Runtime Dynamic': 0.101344, 'Execution Unit/Integer ALUs/Subthreshold Leakage': 0.40222, 'Execution Unit/Integer ALUs/Subthreshold Leakage with power gating': 0.150833, 'Execution Unit/Peak Dynamic': 5.90845, 'Execution Unit/Register Files/Area': 0.570804, 'Execution Unit/Register Files/Floating Point RF/Area': 0.208131, 'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788, 'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 0.0378387, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.0136787, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage': 0.00399698, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage with power gating': 0.00176968, 'Execution Unit/Register Files/Gate Leakage': 0.000622708, 'Execution Unit/Register Files/Integer RF/Area': 0.362673, 'Execution Unit/Register Files/Integer RF/Gate Leakage': 0.00038992, 'Execution Unit/Register Files/Integer RF/Peak Dynamic': 0.11298, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.101162, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage': 0.00614175, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage with power gating': 0.00246675, 'Execution Unit/Register Files/Peak Dynamic': 0.150819, 'Execution Unit/Register Files/Runtime Dynamic': 0.114841, 'Execution Unit/Register Files/Subthreshold Leakage': 0.0101387, 'Execution Unit/Register Files/Subthreshold Leakage with power gating': 0.00423643, 'Execution Unit/Results Broadcast Bus/Area Overhead': 0.0442632, 'Execution Unit/Results Broadcast Bus/Gate Leakage': 0.00607074, 'Execution Unit/Results Broadcast Bus/Peak Dynamic': 0.283251, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.742252, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage': 0.0920413, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage with power gating': 0.0345155, 'Execution Unit/Runtime Dynamic': 2.90002, 'Execution Unit/Subthreshold Leakage': 1.83518, 'Execution Unit/Subthreshold Leakage with power gating': 0.709678, 'Gate Leakage': 0.372997, 'Instruction Fetch Unit/Area': 5.86007, 'Instruction Fetch Unit/Branch Predictor/Area': 0.138516, 'Instruction Fetch Unit/Branch Predictor/Chooser/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Chooser/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Chooser/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Chooser/Runtime Dynamic': 0.00291518, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/Gate Leakage': 0.000757657, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Runtime Dynamic': 0.00291518, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Area': 0.0257064, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Gate Leakage': 0.000154548, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Peak Dynamic': 0.0142575, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Runtime Dynamic': 0.00254578, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage': 0.00384344, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage with power gating': 0.00198631, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Area': 0.0151917, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Gate Leakage': 8.00196e-05, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Peak Dynamic': 0.00527447, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Runtime Dynamic': 0.000989163, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage': 0.00181347, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage with power gating': 0.000957045, 'Instruction Fetch Unit/Branch Predictor/Peak Dynamic': 0.0597838, 'Instruction Fetch Unit/Branch Predictor/RAS/Area': 0.0105732, 'Instruction Fetch Unit/Branch Predictor/RAS/Gate Leakage': 4.63858e-05, 'Instruction Fetch Unit/Branch Predictor/RAS/Peak Dynamic': 0.0117602, 'Instruction Fetch Unit/Branch Predictor/RAS/Runtime Dynamic': 0.00145321, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage': 0.000932505, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage with power gating': 0.000494733, 'Instruction Fetch Unit/Branch Predictor/Runtime Dynamic': 0.00982934, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage': 0.0199703, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage with power gating': 0.0103282, 'Instruction Fetch Unit/Branch Target Buffer/Area': 0.64954, 'Instruction Fetch Unit/Branch Target Buffer/Gate Leakage': 0.00272758, 'Instruction Fetch Unit/Branch Target Buffer/Peak Dynamic': 0.177867, 'Instruction Fetch Unit/Branch Target Buffer/Runtime Dynamic': 0.0277121, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage': 0.0811682, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage with power gating': 0.0435357, 'Instruction Fetch Unit/Gate Leakage': 0.0590479, 'Instruction Fetch Unit/Instruction Buffer/Area': 0.0226323, 'Instruction Fetch Unit/Instruction Buffer/Gate Leakage': 6.83558e-05, 'Instruction Fetch Unit/Instruction Buffer/Peak Dynamic': 0.606827, 'Instruction Fetch Unit/Instruction Buffer/Runtime Dynamic': 0.09725, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682, 'Instruction Fetch Unit/Instruction Cache/Area': 3.14635, 'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931, 'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 6.18594, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.324832, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage': 0.367022, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage with power gating': 0.180386, 'Instruction Fetch Unit/Instruction Decoder/Area': 1.85799, 'Instruction Fetch Unit/Instruction Decoder/Gate Leakage': 0.0222493, 'Instruction Fetch Unit/Instruction Decoder/Peak Dynamic': 1.37404, 'Instruction Fetch Unit/Instruction Decoder/Runtime Dynamic': 0.330305, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104, 'Instruction Fetch Unit/Peak Dynamic': 8.70926, 'Instruction Fetch Unit/Runtime Dynamic': 0.789928, 'Instruction Fetch Unit/Subthreshold Leakage': 0.932587, 'Instruction Fetch Unit/Subthreshold Leakage with power gating': 0.408542, 'L2/Area': 4.53318, 'L2/Gate Leakage': 0.015464, 'L2/Peak Dynamic': 0.0775151, 'L2/Runtime Dynamic': 0.01304, 'L2/Subthreshold Leakage': 0.834142, 'L2/Subthreshold Leakage with power gating': 0.401066, 'Load Store Unit/Area': 8.80969, 'Load Store Unit/Data Cache/Area': 6.84535, 'Load Store Unit/Data Cache/Gate Leakage': 0.0279261, 'Load Store Unit/Data Cache/Peak Dynamic': 4.52601, 'Load Store Unit/Data Cache/Runtime Dynamic': 1.59394, 'Load Store Unit/Data Cache/Subthreshold Leakage': 0.527675, 'Load Store Unit/Data Cache/Subthreshold Leakage with power gating': 0.25085, 'Load Store Unit/Gate Leakage': 0.0351387, 'Load Store Unit/LoadQ/Area': 0.0836782, 'Load Store Unit/LoadQ/Gate Leakage': 0.00059896, 'Load Store Unit/LoadQ/Peak Dynamic': 0.106403, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.106403, 'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961, 'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918, 'Load Store Unit/Peak Dynamic': 5.03052, 'Load Store Unit/Runtime Dynamic': 2.22509, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.262373, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.524746, 'Load Store Unit/StoreQ/Subthreshold Leakage': 0.0345621, 'Load Store Unit/StoreQ/Subthreshold Leakage with power gating': 0.0197004, 'Load Store Unit/Subthreshold Leakage': 0.591622, 'Load Store Unit/Subthreshold Leakage with power gating': 0.283406, 'Memory Management Unit/Area': 0.434579, 'Memory Management Unit/Dtlb/Area': 0.0879726, 'Memory Management Unit/Dtlb/Gate Leakage': 0.00088729, 'Memory Management Unit/Dtlb/Peak Dynamic': 0.093117, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0941226, 'Memory Management Unit/Dtlb/Subthreshold Leakage': 0.0155699, 'Memory Management Unit/Dtlb/Subthreshold Leakage with power gating': 0.00887485, 'Memory Management Unit/Gate Leakage': 0.00813591, 'Memory Management Unit/Itlb/Area': 0.301552, 'Memory Management Unit/Itlb/Gate Leakage': 0.00393464, 'Memory Management Unit/Itlb/Peak Dynamic': 0.384619, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.0537208, 'Memory Management Unit/Itlb/Subthreshold Leakage': 0.0413758, 'Memory Management Unit/Itlb/Subthreshold Leakage with power gating': 0.0235842, 'Memory Management Unit/Peak Dynamic': 0.704099, 'Memory Management Unit/Runtime Dynamic': 0.147843, 'Memory Management Unit/Subthreshold Leakage': 0.0769113, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0399462, 'Peak Dynamic': 24.9915, 'Renaming Unit/Area': 0.369768, 'Renaming Unit/FP Front End RAT/Area': 0.168486, 'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00489731, 'Renaming Unit/FP Front End RAT/Peak Dynamic': 3.33511, 'Renaming Unit/FP Front End RAT/Runtime Dynamic': 0.13201, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage': 0.0437281, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage with power gating': 0.024925, 'Renaming Unit/Free List/Area': 0.0414755, 'Renaming Unit/Free List/Gate Leakage': 4.15911e-05, 'Renaming Unit/Free List/Peak Dynamic': 0.0401324, 'Renaming Unit/Free List/Runtime Dynamic': 0.0208834, 'Renaming Unit/Free List/Subthreshold Leakage': 0.000670426, 'Renaming Unit/Free List/Subthreshold Leakage with power gating': 0.000377987, 'Renaming Unit/Gate Leakage': 0.00863632, 'Renaming Unit/Int Front End RAT/Area': 0.114751, 'Renaming Unit/Int Front End RAT/Gate Leakage': 0.00038343, 'Renaming Unit/Int Front End RAT/Peak Dynamic': 0.86945, 'Renaming Unit/Int Front End RAT/Runtime Dynamic': 0.194813, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage': 0.00611897, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00348781, 'Renaming Unit/Peak Dynamic': 4.56169, 'Renaming Unit/Runtime Dynamic': 0.347706, 'Renaming Unit/Subthreshold Leakage': 0.070483, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0362779, 'Runtime Dynamic': 6.42363, 'Subthreshold Leakage': 6.21877, 'Subthreshold Leakage with power gating': 2.58311}, {'Area': 32.0201, 'Execution Unit/Area': 7.68434, 'Execution Unit/Complex ALUs/Area': 0.235435, 'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646, 'Execution Unit/Complex ALUs/Peak Dynamic': 0.0133598, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.213182, 'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111, 'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163, 'Execution Unit/Floating Point Units/Area': 4.6585, 'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156, 'Execution Unit/Floating Point Units/Peak Dynamic': 0.0715596, 'Execution Unit/Floating Point Units/Runtime Dynamic': 0.304033, 'Execution Unit/Floating Point Units/Subthreshold Leakage': 0.994829, 'Execution Unit/Floating Point Units/Subthreshold Leakage with power gating': 0.373061, 'Execution Unit/Gate Leakage': 0.120359, 'Execution Unit/Instruction Scheduler/Area': 1.66526, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Area': 0.275653, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Gate Leakage': 0.000977433, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Peak Dynamic': 1.04181, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Runtime Dynamic': 0.164446, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage': 0.0143453, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage with power gating': 0.00810519, 'Execution Unit/Instruction Scheduler/Gate Leakage': 0.00568913, 'Execution Unit/Instruction Scheduler/Instruction Window/Area': 0.805223, 'Execution Unit/Instruction Scheduler/Instruction Window/Gate Leakage': 0.00414562, 'Execution Unit/Instruction Scheduler/Instruction Window/Peak Dynamic': 1.6763, 'Execution Unit/Instruction Scheduler/Instruction Window/Runtime Dynamic': 0.265245, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage': 0.0625755, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage with power gating': 0.0355964, 'Execution Unit/Instruction Scheduler/Peak Dynamic': 3.82262, 'Execution Unit/Instruction Scheduler/ROB/Area': 0.584388, 'Execution Unit/Instruction Scheduler/ROB/Gate Leakage': 0.00056608, 'Execution Unit/Instruction Scheduler/ROB/Peak Dynamic': 1.10451, 'Execution Unit/Instruction Scheduler/ROB/Runtime Dynamic': 0.133887, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage': 0.00906853, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage with power gating': 0.00364446, 'Execution Unit/Instruction Scheduler/Runtime Dynamic': 0.563578, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage': 0.0859892, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage with power gating': 0.047346, 'Execution Unit/Integer ALUs/Area': 0.47087, 'Execution Unit/Integer ALUs/Gate Leakage': 0.0265291, 'Execution Unit/Integer ALUs/Peak Dynamic': 0.177107, 'Execution Unit/Integer ALUs/Runtime Dynamic': 0.101344, 'Execution Unit/Integer ALUs/Subthreshold Leakage': 0.40222, 'Execution Unit/Integer ALUs/Subthreshold Leakage with power gating': 0.150833, 'Execution Unit/Peak Dynamic': 4.29584, 'Execution Unit/Register Files/Area': 0.570804, 'Execution Unit/Register Files/Floating Point RF/Area': 0.208131, 'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788, 'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 0.0135191, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00689761, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage': 0.00399698, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage with power gating': 0.00176968, 'Execution Unit/Register Files/Gate Leakage': 0.000622708, 'Execution Unit/Register Files/Integer RF/Area': 0.362673, 'Execution Unit/Register Files/Integer RF/Gate Leakage': 0.00038992, 'Execution Unit/Register Files/Integer RF/Peak Dynamic': 0.0549037, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.051012, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage': 0.00614175, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage with power gating': 0.00246675, 'Execution Unit/Register Files/Peak Dynamic': 0.0684228, 'Execution Unit/Register Files/Runtime Dynamic': 0.0579096, 'Execution Unit/Register Files/Subthreshold Leakage': 0.0101387, 'Execution Unit/Register Files/Subthreshold Leakage with power gating': 0.00423643, 'Execution Unit/Results Broadcast Bus/Area Overhead': 0.0390912, 'Execution Unit/Results Broadcast Bus/Gate Leakage': 0.00537402, 'Execution Unit/Results Broadcast Bus/Peak Dynamic': 0.119007, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.318584, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage': 0.081478, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage with power gating': 0.0305543, 'Execution Unit/Runtime Dynamic': 1.55863, 'Execution Unit/Subthreshold Leakage': 1.79543, 'Execution Unit/Subthreshold Leakage with power gating': 0.688821, 'Gate Leakage': 0.368936, 'Instruction Fetch Unit/Area': 5.85939, 'Instruction Fetch Unit/Branch Predictor/Area': 0.138516, 'Instruction Fetch Unit/Branch Predictor/Chooser/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Chooser/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Chooser/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Chooser/Runtime Dynamic': 0.00161133, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/Gate Leakage': 0.000757657, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Runtime Dynamic': 0.00161133, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Area': 0.0257064, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Gate Leakage': 0.000154548, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Peak Dynamic': 0.0142575, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Runtime Dynamic': 0.00144666, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage': 0.00384344, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage with power gating': 0.00198631, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Area': 0.0151917, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Gate Leakage': 8.00196e-05, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Peak Dynamic': 0.00527447, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Runtime Dynamic': 0.000583646, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage': 0.00181347, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage with power gating': 0.000957045, 'Instruction Fetch Unit/Branch Predictor/Peak Dynamic': 0.0597838, 'Instruction Fetch Unit/Branch Predictor/RAS/Area': 0.0105732, 'Instruction Fetch Unit/Branch Predictor/RAS/Gate Leakage': 4.63858e-05, 'Instruction Fetch Unit/Branch Predictor/RAS/Peak Dynamic': 0.0117602, 'Instruction Fetch Unit/Branch Predictor/RAS/Runtime Dynamic': 0.000732792, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage': 0.000932505, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage with power gating': 0.000494733, 'Instruction Fetch Unit/Branch Predictor/Runtime Dynamic': 0.00540212, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage': 0.0199703, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage with power gating': 0.0103282, 'Instruction Fetch Unit/Branch Target Buffer/Area': 0.64954, 'Instruction Fetch Unit/Branch Target Buffer/Gate Leakage': 0.00272758, 'Instruction Fetch Unit/Branch Target Buffer/Peak Dynamic': 0.177867, 'Instruction Fetch Unit/Branch Target Buffer/Runtime Dynamic': 0.0139063, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage': 0.0811682, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage with power gating': 0.0435357, 'Instruction Fetch Unit/Gate Leakage': 0.0589979, 'Instruction Fetch Unit/Instruction Buffer/Area': 0.0226323, 'Instruction Fetch Unit/Instruction Buffer/Gate Leakage': 6.83558e-05, 'Instruction Fetch Unit/Instruction Buffer/Peak Dynamic': 0.606827, 'Instruction Fetch Unit/Instruction Buffer/Runtime Dynamic': 0.0490392, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682, 'Instruction Fetch Unit/Instruction Cache/Area': 3.14635, 'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931, 'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 3.11931, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.164001, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage': 0.367022, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage with power gating': 0.180386, 'Instruction Fetch Unit/Instruction Decoder/Area': 1.85799, 'Instruction Fetch Unit/Instruction Decoder/Gate Leakage': 0.0222493, 'Instruction Fetch Unit/Instruction Decoder/Peak Dynamic': 1.37404, 'Instruction Fetch Unit/Instruction Decoder/Runtime Dynamic': 0.166559, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104, 'Instruction Fetch Unit/Peak Dynamic': 5.48921, 'Instruction Fetch Unit/Runtime Dynamic': 0.398908, 'Instruction Fetch Unit/Subthreshold Leakage': 0.932286, 'Instruction Fetch Unit/Subthreshold Leakage with power gating': 0.40843, 'L2/Area': 4.53318, 'L2/Gate Leakage': 0.015464, 'L2/Peak Dynamic': 0.0403734, 'L2/Runtime Dynamic': 0.00826047, 'L2/Subthreshold Leakage': 0.834142, 'L2/Subthreshold Leakage with power gating': 0.401066, 'Load Store Unit/Area': 8.80901, 'Load Store Unit/Data Cache/Area': 6.84535, 'Load Store Unit/Data Cache/Gate Leakage': 0.0279261, 'Load Store Unit/Data Cache/Peak Dynamic': 2.90924, 'Load Store Unit/Data Cache/Runtime Dynamic': 0.812966, 'Load Store Unit/Data Cache/Subthreshold Leakage': 0.527675, 'Load Store Unit/Data Cache/Subthreshold Leakage with power gating': 0.25085, 'Load Store Unit/Gate Leakage': 0.0350888, 'Load Store Unit/LoadQ/Area': 0.0836782, 'Load Store Unit/LoadQ/Gate Leakage': 0.00059896, 'Load Store Unit/LoadQ/Peak Dynamic': 0.0540971, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.054097, 'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961, 'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918, 'Load Store Unit/Peak Dynamic': 3.1647, 'Load Store Unit/Runtime Dynamic': 1.13385, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.133394, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.266788, 'Load Store Unit/StoreQ/Subthreshold Leakage': 0.0345621, 'Load Store Unit/StoreQ/Subthreshold Leakage with power gating': 0.0197004, 'Load Store Unit/Subthreshold Leakage': 0.591321, 'Load Store Unit/Subthreshold Leakage with power gating': 0.283293, 'Memory Management Unit/Area': 0.4339, 'Memory Management Unit/Dtlb/Area': 0.0879726, 'Memory Management Unit/Dtlb/Gate Leakage': 0.00088729, 'Memory Management Unit/Dtlb/Peak Dynamic': 0.0473421, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0478513, 'Memory Management Unit/Dtlb/Subthreshold Leakage': 0.0155699, 'Memory Management Unit/Dtlb/Subthreshold Leakage with power gating': 0.00887485, 'Memory Management Unit/Gate Leakage': 0.00808595, 'Memory Management Unit/Itlb/Area': 0.301552, 'Memory Management Unit/Itlb/Gate Leakage': 0.00393464, 'Memory Management Unit/Itlb/Peak Dynamic': 0.193947, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.027173, 'Memory Management Unit/Itlb/Subthreshold Leakage': 0.0413758, 'Memory Management Unit/Itlb/Subthreshold Leakage with power gating': 0.0235842, 'Memory Management Unit/Peak Dynamic': 0.431382, 'Memory Management Unit/Runtime Dynamic': 0.0750243, 'Memory Management Unit/Subthreshold Leakage': 0.0766103, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333, 'Peak Dynamic': 17.011, 'Renaming Unit/Area': 0.303608, 'Renaming Unit/FP Front End RAT/Area': 0.131045, 'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00351123, 'Renaming Unit/FP Front End RAT/Peak Dynamic': 2.51468, 'Renaming Unit/FP Front End RAT/Runtime Dynamic': 0.0355631, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage': 0.0308571, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage with power gating': 0.0175885, 'Renaming Unit/Free List/Area': 0.0340654, 'Renaming Unit/Free List/Gate Leakage': 2.5481e-05, 'Renaming Unit/Free List/Peak Dynamic': 0.0306032, 'Renaming Unit/Free List/Runtime Dynamic': 0.00785215, 'Renaming Unit/Free List/Subthreshold Leakage': 0.000370144, 'Renaming Unit/Free List/Subthreshold Leakage with power gating': 0.000201064, 'Renaming Unit/Gate Leakage': 0.00708398, 'Renaming Unit/Int Front End RAT/Area': 0.0941223, 'Renaming Unit/Int Front End RAT/Gate Leakage': 0.000283242, 'Renaming Unit/Int Front End RAT/Peak Dynamic': 0.731965, 'Renaming Unit/Int Front End RAT/Runtime Dynamic': 0.0837759, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage': 0.00435488, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00248228, 'Renaming Unit/Peak Dynamic': 3.58947, 'Renaming Unit/Runtime Dynamic': 0.127191, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 3.30187, 'Subthreshold Leakage': 6.16288, 'Subthreshold Leakage with power gating': 2.55328}, {'Area': 32.0201, 'Execution Unit/Area': 7.68434, 'Execution Unit/Complex ALUs/Area': 0.235435, 'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646, 'Execution Unit/Complex ALUs/Peak Dynamic': 0.0105276, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.210958, 'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111, 'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163, 'Execution Unit/Floating Point Units/Area': 4.6585, 'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156, 'Execution Unit/Floating Point Units/Peak Dynamic': 0.0563895, 'Execution Unit/Floating Point Units/Runtime Dynamic': 0.304033, 'Execution Unit/Floating Point Units/Subthreshold Leakage': 0.994829, 'Execution Unit/Floating Point Units/Subthreshold Leakage with power gating': 0.373061, 'Execution Unit/Gate Leakage': 0.120359, 'Execution Unit/Instruction Scheduler/Area': 1.66526, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Area': 0.275653, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Gate Leakage': 0.000977433, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Peak Dynamic': 1.04181, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Runtime Dynamic': 0.170899, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage': 0.0143453, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage with power gating': 0.00810519, 'Execution Unit/Instruction Scheduler/Gate Leakage': 0.00568913, 'Execution Unit/Instruction Scheduler/Instruction Window/Area': 0.805223, 'Execution Unit/Instruction Scheduler/Instruction Window/Gate Leakage': 0.00414562, 'Execution Unit/Instruction Scheduler/Instruction Window/Peak Dynamic': 1.6763, 'Execution Unit/Instruction Scheduler/Instruction Window/Runtime Dynamic': 0.275654, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage': 0.0625755, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage with power gating': 0.0355964, 'Execution Unit/Instruction Scheduler/Peak Dynamic': 3.82262, 'Execution Unit/Instruction Scheduler/ROB/Area': 0.584388, 'Execution Unit/Instruction Scheduler/ROB/Gate Leakage': 0.00056608, 'Execution Unit/Instruction Scheduler/ROB/Peak Dynamic': 1.10451, 'Execution Unit/Instruction Scheduler/ROB/Runtime Dynamic': 0.139141, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage': 0.00906853, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage with power gating': 0.00364446, 'Execution Unit/Instruction Scheduler/Runtime Dynamic': 0.585694, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage': 0.0859892, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage with power gating': 0.047346, 'Execution Unit/Integer ALUs/Area': 0.47087, 'Execution Unit/Integer ALUs/Gate Leakage': 0.0265291, 'Execution Unit/Integer ALUs/Peak Dynamic': 0.186814, 'Execution Unit/Integer ALUs/Runtime Dynamic': 0.101344, 'Execution Unit/Integer ALUs/Subthreshold Leakage': 0.40222, 'Execution Unit/Integer ALUs/Subthreshold Leakage with power gating': 0.150833, 'Execution Unit/Peak Dynamic': 4.28804, 'Execution Unit/Register Files/Area': 0.570804, 'Execution Unit/Register Files/Floating Point RF/Area': 0.208131, 'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788, 'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 0.0106532, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00716827, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage': 0.00399698, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage with power gating': 0.00176968, 'Execution Unit/Register Files/Gate Leakage': 0.000622708, 'Execution Unit/Register Files/Integer RF/Area': 0.362673, 'Execution Unit/Register Files/Integer RF/Gate Leakage': 0.00038992, 'Execution Unit/Register Files/Integer RF/Peak Dynamic': 0.0557959, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0530138, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage': 0.00614175, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage with power gating': 0.00246675, 'Execution Unit/Register Files/Peak Dynamic': 0.0664491, 'Execution Unit/Register Files/Runtime Dynamic': 0.0601821, 'Execution Unit/Register Files/Subthreshold Leakage': 0.0101387, 'Execution Unit/Register Files/Subthreshold Leakage with power gating': 0.00423643, 'Execution Unit/Results Broadcast Bus/Area Overhead': 0.0390912, 'Execution Unit/Results Broadcast Bus/Gate Leakage': 0.00537402, 'Execution Unit/Results Broadcast Bus/Peak Dynamic': 0.120179, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.323037, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage': 0.081478, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage with power gating': 0.0305543, 'Execution Unit/Runtime Dynamic': 1.58525, 'Execution Unit/Subthreshold Leakage': 1.79543, 'Execution Unit/Subthreshold Leakage with power gating': 0.688821, 'Gate Leakage': 0.368936, 'Instruction Fetch Unit/Area': 5.85939, 'Instruction Fetch Unit/Branch Predictor/Area': 0.138516, 'Instruction Fetch Unit/Branch Predictor/Chooser/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Chooser/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Chooser/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Chooser/Runtime Dynamic': 0.00169386, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/Gate Leakage': 0.000757657, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Runtime Dynamic': 0.00169386, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Area': 0.0257064, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Gate Leakage': 0.000154548, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Peak Dynamic': 0.0142575, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Runtime Dynamic': 0.00151699, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage': 0.00384344, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage with power gating': 0.00198631, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Area': 0.0151917, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Gate Leakage': 8.00196e-05, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Peak Dynamic': 0.00527447, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Runtime Dynamic': 0.000610028, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage': 0.00181347, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage with power gating': 0.000957045, 'Instruction Fetch Unit/Branch Predictor/Peak Dynamic': 0.0597838, 'Instruction Fetch Unit/Branch Predictor/RAS/Area': 0.0105732, 'Instruction Fetch Unit/Branch Predictor/RAS/Gate Leakage': 4.63858e-05, 'Instruction Fetch Unit/Branch Predictor/RAS/Peak Dynamic': 0.0117602, 'Instruction Fetch Unit/Branch Predictor/RAS/Runtime Dynamic': 0.000761547, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage': 0.000932505, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage with power gating': 0.000494733, 'Instruction Fetch Unit/Branch Predictor/Runtime Dynamic': 0.00566627, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage': 0.0199703, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage with power gating': 0.0103282, 'Instruction Fetch Unit/Branch Target Buffer/Area': 0.64954, 'Instruction Fetch Unit/Branch Target Buffer/Gate Leakage': 0.00272758, 'Instruction Fetch Unit/Branch Target Buffer/Peak Dynamic': 0.177867, 'Instruction Fetch Unit/Branch Target Buffer/Runtime Dynamic': 0.0147528, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage': 0.0811682, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage with power gating': 0.0435357, 'Instruction Fetch Unit/Gate Leakage': 0.0589979, 'Instruction Fetch Unit/Instruction Buffer/Area': 0.0226323, 'Instruction Fetch Unit/Instruction Buffer/Gate Leakage': 6.83558e-05, 'Instruction Fetch Unit/Instruction Buffer/Peak Dynamic': 0.606827, 'Instruction Fetch Unit/Instruction Buffer/Runtime Dynamic': 0.0509635, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682, 'Instruction Fetch Unit/Instruction Cache/Area': 3.14635, 'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931, 'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 3.24172, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.178413, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage': 0.367022, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage with power gating': 0.180386, 'Instruction Fetch Unit/Instruction Decoder/Area': 1.85799, 'Instruction Fetch Unit/Instruction Decoder/Gate Leakage': 0.0222493, 'Instruction Fetch Unit/Instruction Decoder/Peak Dynamic': 1.37404, 'Instruction Fetch Unit/Instruction Decoder/Runtime Dynamic': 0.173095, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104, 'Instruction Fetch Unit/Peak Dynamic': 5.61756, 'Instruction Fetch Unit/Runtime Dynamic': 0.42289, 'Instruction Fetch Unit/Subthreshold Leakage': 0.932286, 'Instruction Fetch Unit/Subthreshold Leakage with power gating': 0.40843, 'L2/Area': 4.53318, 'L2/Gate Leakage': 0.015464, 'L2/Peak Dynamic': 0.0480074, 'L2/Runtime Dynamic': 0.0107323, 'L2/Subthreshold Leakage': 0.834142, 'L2/Subthreshold Leakage with power gating': 0.401066, 'Load Store Unit/Area': 8.80901, 'Load Store Unit/Data Cache/Area': 6.84535, 'Load Store Unit/Data Cache/Gate Leakage': 0.0279261, 'Load Store Unit/Data Cache/Peak Dynamic': 2.89098, 'Load Store Unit/Data Cache/Runtime Dynamic': 0.807362, 'Load Store Unit/Data Cache/Subthreshold Leakage': 0.527675, 'Load Store Unit/Data Cache/Subthreshold Leakage with power gating': 0.25085, 'Load Store Unit/Gate Leakage': 0.0350888, 'Load Store Unit/LoadQ/Area': 0.0836782, 'Load Store Unit/LoadQ/Gate Leakage': 0.00059896, 'Load Store Unit/LoadQ/Peak Dynamic': 0.0535062, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0535061, 'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961, 'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918, 'Load Store Unit/Peak Dynamic': 3.14364, 'Load Store Unit/Runtime Dynamic': 1.12474, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.131937, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.263874, 'Load Store Unit/StoreQ/Subthreshold Leakage': 0.0345621, 'Load Store Unit/StoreQ/Subthreshold Leakage with power gating': 0.0197004, 'Load Store Unit/Subthreshold Leakage': 0.591321, 'Load Store Unit/Subthreshold Leakage with power gating': 0.283293, 'Memory Management Unit/Area': 0.4339, 'Memory Management Unit/Dtlb/Area': 0.0879726, 'Memory Management Unit/Dtlb/Gate Leakage': 0.00088729, 'Memory Management Unit/Dtlb/Peak Dynamic': 0.0468249, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.047449, 'Memory Management Unit/Dtlb/Subthreshold Leakage': 0.0155699, 'Memory Management Unit/Dtlb/Subthreshold Leakage with power gating': 0.00887485, 'Memory Management Unit/Gate Leakage': 0.00808595, 'Memory Management Unit/Itlb/Area': 0.301552, 'Memory Management Unit/Itlb/Gate Leakage': 0.00393464, 'Memory Management Unit/Itlb/Peak Dynamic': 0.201558, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.0295351, 'Memory Management Unit/Itlb/Subthreshold Leakage': 0.0413758, 'Memory Management Unit/Itlb/Subthreshold Leakage with power gating': 0.0235842, 'Memory Management Unit/Peak Dynamic': 0.438104, 'Memory Management Unit/Runtime Dynamic': 0.0769841, 'Memory Management Unit/Subthreshold Leakage': 0.0766103, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333, 'Peak Dynamic': 17.1248, 'Renaming Unit/Area': 0.303608, 'Renaming Unit/FP Front End RAT/Area': 0.131045, 'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00351123, 'Renaming Unit/FP Front End RAT/Peak Dynamic': 2.51468, 'Renaming Unit/FP Front End RAT/Runtime Dynamic': 0.0280241, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage': 0.0308571, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage with power gating': 0.0175885, 'Renaming Unit/Free List/Area': 0.0340654, 'Renaming Unit/Free List/Gate Leakage': 2.5481e-05, 'Renaming Unit/Free List/Peak Dynamic': 0.0306032, 'Renaming Unit/Free List/Runtime Dynamic': 0.00805154, 'Renaming Unit/Free List/Subthreshold Leakage': 0.000370144, 'Renaming Unit/Free List/Subthreshold Leakage with power gating': 0.000201064, 'Renaming Unit/Gate Leakage': 0.00708398, 'Renaming Unit/Int Front End RAT/Area': 0.0941223, 'Renaming Unit/Int Front End RAT/Gate Leakage': 0.000283242, 'Renaming Unit/Int Front End RAT/Peak Dynamic': 0.731965, 'Renaming Unit/Int Front End RAT/Runtime Dynamic': 0.0873152, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage': 0.00435488, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00248228, 'Renaming Unit/Peak Dynamic': 3.58947, 'Renaming Unit/Runtime Dynamic': 0.123391, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 3.34399, 'Subthreshold Leakage': 6.16288, 'Subthreshold Leakage with power gating': 2.55328}, {'Area': 32.0201, 'Execution Unit/Area': 7.68434, 'Execution Unit/Complex ALUs/Area': 0.235435, 'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646, 'Execution Unit/Complex ALUs/Peak Dynamic': 0.00646735, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.207769, 'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111, 'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163, 'Execution Unit/Floating Point Units/Area': 4.6585, 'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156, 'Execution Unit/Floating Point Units/Peak Dynamic': 0.0346438, 'Execution Unit/Floating Point Units/Runtime Dynamic': 0.304033, 'Execution Unit/Floating Point Units/Subthreshold Leakage': 0.994829, 'Execution Unit/Floating Point Units/Subthreshold Leakage with power gating': 0.373061, 'Execution Unit/Gate Leakage': 0.120359, 'Execution Unit/Instruction Scheduler/Area': 1.66526, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Area': 0.275653, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Gate Leakage': 0.000977433, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Peak Dynamic': 1.04181, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Runtime Dynamic': 0.184462, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage': 0.0143453, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage with power gating': 0.00810519, 'Execution Unit/Instruction Scheduler/Gate Leakage': 0.00568913, 'Execution Unit/Instruction Scheduler/Instruction Window/Area': 0.805223, 'Execution Unit/Instruction Scheduler/Instruction Window/Gate Leakage': 0.00414562, 'Execution Unit/Instruction Scheduler/Instruction Window/Peak Dynamic': 1.6763, 'Execution Unit/Instruction Scheduler/Instruction Window/Runtime Dynamic': 0.29753, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage': 0.0625755, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage with power gating': 0.0355964, 'Execution Unit/Instruction Scheduler/Peak Dynamic': 3.82262, 'Execution Unit/Instruction Scheduler/ROB/Area': 0.584388, 'Execution Unit/Instruction Scheduler/ROB/Gate Leakage': 0.00056608, 'Execution Unit/Instruction Scheduler/ROB/Peak Dynamic': 1.10451, 'Execution Unit/Instruction Scheduler/ROB/Runtime Dynamic': 0.150183, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage': 0.00906853, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage with power gating': 0.00364446, 'Execution Unit/Instruction Scheduler/Runtime Dynamic': 0.632175, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage': 0.0859892, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage with power gating': 0.047346, 'Execution Unit/Integer ALUs/Area': 0.47087, 'Execution Unit/Integer ALUs/Gate Leakage': 0.0265291, 'Execution Unit/Integer ALUs/Peak Dynamic': 0.205658, 'Execution Unit/Integer ALUs/Runtime Dynamic': 0.101344, 'Execution Unit/Integer ALUs/Subthreshold Leakage': 0.40222, 'Execution Unit/Integer ALUs/Subthreshold Leakage with power gating': 0.150833, 'Execution Unit/Peak Dynamic': 4.28652, 'Execution Unit/Register Files/Area': 0.570804, 'Execution Unit/Register Files/Floating Point RF/Area': 0.208131, 'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788, 'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 0.00654495, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00773715, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage': 0.00399698, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage with power gating': 0.00176968, 'Execution Unit/Register Files/Gate Leakage': 0.000622708, 'Execution Unit/Register Files/Integer RF/Area': 0.362673, 'Execution Unit/Register Files/Integer RF/Gate Leakage': 0.00038992, 'Execution Unit/Register Files/Integer RF/Peak Dynamic': 0.0583819, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.057221, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage': 0.00614175, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage with power gating': 0.00246675, 'Execution Unit/Register Files/Peak Dynamic': 0.0649268, 'Execution Unit/Register Files/Runtime Dynamic': 0.0649582, 'Execution Unit/Register Files/Subthreshold Leakage': 0.0101387, 'Execution Unit/Register Files/Subthreshold Leakage with power gating': 0.00423643, 'Execution Unit/Results Broadcast Bus/Area Overhead': 0.0390912, 'Execution Unit/Results Broadcast Bus/Gate Leakage': 0.00537402, 'Execution Unit/Results Broadcast Bus/Peak Dynamic': 0.124611, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.333729, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage': 0.081478, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage with power gating': 0.0305543, 'Execution Unit/Runtime Dynamic': 1.64401, 'Execution Unit/Subthreshold Leakage': 1.79543, 'Execution Unit/Subthreshold Leakage with power gating': 0.688821, 'Gate Leakage': 0.368936, 'Instruction Fetch Unit/Area': 5.85939, 'Instruction Fetch Unit/Branch Predictor/Area': 0.138516, 'Instruction Fetch Unit/Branch Predictor/Chooser/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Chooser/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Chooser/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Chooser/Runtime Dynamic': 0.00204448, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/Gate Leakage': 0.000757657, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Runtime Dynamic': 0.00204448, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Area': 0.0257064, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Gate Leakage': 0.000154548, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Peak Dynamic': 0.0142575, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Runtime Dynamic': 0.00183145, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage': 0.00384344, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage with power gating': 0.00198631, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Area': 0.0151917, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Gate Leakage': 8.00196e-05, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Peak Dynamic': 0.00527447, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Runtime Dynamic': 0.000736725, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage': 0.00181347, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage with power gating': 0.000957045, 'Instruction Fetch Unit/Branch Predictor/Peak Dynamic': 0.0597838, 'Instruction Fetch Unit/Branch Predictor/RAS/Area': 0.0105732, 'Instruction Fetch Unit/Branch Predictor/RAS/Gate Leakage': 4.63858e-05, 'Instruction Fetch Unit/Branch Predictor/RAS/Peak Dynamic': 0.0117602, 'Instruction Fetch Unit/Branch Predictor/RAS/Runtime Dynamic': 0.000821984, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage': 0.000932505, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage with power gating': 0.000494733, 'Instruction Fetch Unit/Branch Predictor/Runtime Dynamic': 0.00674239, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage': 0.0199703, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage with power gating': 0.0103282, 'Instruction Fetch Unit/Branch Target Buffer/Area': 0.64954, 'Instruction Fetch Unit/Branch Target Buffer/Gate Leakage': 0.00272758, 'Instruction Fetch Unit/Branch Target Buffer/Peak Dynamic': 0.177867, 'Instruction Fetch Unit/Branch Target Buffer/Runtime Dynamic': 0.0177902, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage': 0.0811682, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage with power gating': 0.0435357, 'Instruction Fetch Unit/Gate Leakage': 0.0589979, 'Instruction Fetch Unit/Instruction Buffer/Area': 0.0226323, 'Instruction Fetch Unit/Instruction Buffer/Gate Leakage': 6.83558e-05, 'Instruction Fetch Unit/Instruction Buffer/Peak Dynamic': 0.606827, 'Instruction Fetch Unit/Instruction Buffer/Runtime Dynamic': 0.055008, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682, 'Instruction Fetch Unit/Instruction Cache/Area': 3.14635, 'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931, 'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 3.49898, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.204523, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage': 0.367022, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage with power gating': 0.180386, 'Instruction Fetch Unit/Instruction Decoder/Area': 1.85799, 'Instruction Fetch Unit/Instruction Decoder/Gate Leakage': 0.0222493, 'Instruction Fetch Unit/Instruction Decoder/Peak Dynamic': 1.37404, 'Instruction Fetch Unit/Instruction Decoder/Runtime Dynamic': 0.186832, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104, 'Instruction Fetch Unit/Peak Dynamic': 5.88731, 'Instruction Fetch Unit/Runtime Dynamic': 0.470895, 'Instruction Fetch Unit/Subthreshold Leakage': 0.932286, 'Instruction Fetch Unit/Subthreshold Leakage with power gating': 0.40843, 'L2/Area': 4.53318, 'L2/Gate Leakage': 0.015464, 'L2/Peak Dynamic': 0.0413557, 'L2/Runtime Dynamic': 0.0090745, 'L2/Subthreshold Leakage': 0.834142, 'L2/Subthreshold Leakage with power gating': 0.401066, 'Load Store Unit/Area': 8.80901, 'Load Store Unit/Data Cache/Area': 6.84535, 'Load Store Unit/Data Cache/Gate Leakage': 0.0279261, 'Load Store Unit/Data Cache/Peak Dynamic': 2.93601, 'Load Store Unit/Data Cache/Runtime Dynamic': 0.829551, 'Load Store Unit/Data Cache/Subthreshold Leakage': 0.527675, 'Load Store Unit/Data Cache/Subthreshold Leakage with power gating': 0.25085, 'Load Store Unit/Gate Leakage': 0.0350888, 'Load Store Unit/LoadQ/Area': 0.0836782, 'Load Store Unit/LoadQ/Gate Leakage': 0.00059896, 'Load Store Unit/LoadQ/Peak Dynamic': 0.0549632, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0549632, 'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961, 'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918, 'Load Store Unit/Peak Dynamic': 3.19556, 'Load Store Unit/Runtime Dynamic': 1.15557, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.13553, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.27106, 'Load Store Unit/StoreQ/Subthreshold Leakage': 0.0345621, 'Load Store Unit/StoreQ/Subthreshold Leakage with power gating': 0.0197004, 'Load Store Unit/Subthreshold Leakage': 0.591321, 'Load Store Unit/Subthreshold Leakage with power gating': 0.283293, 'Memory Management Unit/Area': 0.4339, 'Memory Management Unit/Dtlb/Area': 0.0879726, 'Memory Management Unit/Dtlb/Gate Leakage': 0.00088729, 'Memory Management Unit/Dtlb/Peak Dynamic': 0.0481, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0486382, 'Memory Management Unit/Dtlb/Subthreshold Leakage': 0.0155699, 'Memory Management Unit/Dtlb/Subthreshold Leakage with power gating': 0.00887485, 'Memory Management Unit/Gate Leakage': 0.00808595, 'Memory Management Unit/Itlb/Area': 0.301552, 'Memory Management Unit/Itlb/Gate Leakage': 0.00393464, 'Memory Management Unit/Itlb/Peak Dynamic': 0.217554, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.0337738, 'Memory Management Unit/Itlb/Subthreshold Leakage': 0.0413758, 'Memory Management Unit/Itlb/Subthreshold Leakage with power gating': 0.0235842, 'Memory Management Unit/Peak Dynamic': 0.45629, 'Memory Management Unit/Runtime Dynamic': 0.082412, 'Memory Management Unit/Subthreshold Leakage': 0.0766103, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333, 'Peak Dynamic': 17.4565, 'Renaming Unit/Area': 0.303608, 'Renaming Unit/FP Front End RAT/Area': 0.131045, 'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00351123, 'Renaming Unit/FP Front End RAT/Peak Dynamic': 2.51468, 'Renaming Unit/FP Front End RAT/Runtime Dynamic': 0.0172167, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage': 0.0308571, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage with power gating': 0.0175885, 'Renaming Unit/Free List/Area': 0.0340654, 'Renaming Unit/Free List/Gate Leakage': 2.5481e-05, 'Renaming Unit/Free List/Peak Dynamic': 0.0306032, 'Renaming Unit/Free List/Runtime Dynamic': 0.00853193, 'Renaming Unit/Free List/Subthreshold Leakage': 0.000370144, 'Renaming Unit/Free List/Subthreshold Leakage with power gating': 0.000201064, 'Renaming Unit/Gate Leakage': 0.00708398, 'Renaming Unit/Int Front End RAT/Area': 0.0941223, 'Renaming Unit/Int Front End RAT/Gate Leakage': 0.000283242, 'Renaming Unit/Int Front End RAT/Peak Dynamic': 0.731965, 'Renaming Unit/Int Front End RAT/Runtime Dynamic': 0.0942385, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage': 0.00435488, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00248228, 'Renaming Unit/Peak Dynamic': 3.58947, 'Renaming Unit/Runtime Dynamic': 0.119987, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 3.48195, 'Subthreshold Leakage': 6.16288, 'Subthreshold Leakage with power gating': 2.55328}], 'DRAM': {'Area': 0, 'Gate Leakage': 0, 'Peak Dynamic': 3.5995855135814714, 'Runtime Dynamic': 3.5995855135814714, 'Subthreshold Leakage': 4.252, 'Subthreshold Leakage with power gating': 4.252}, 'L3': [{'Area': 61.9075, 'Gate Leakage': 0.0484137, 'Peak Dynamic': 0.241052, 'Runtime Dynamic': 0.0794812, 'Subthreshold Leakage': 6.80085, 'Subthreshold Leakage with power gating': 3.32364}], 'Processor': {'Area': 191.908, 'Gate Leakage': 1.53485, 'Peak Dynamic': 76.8249, 'Peak Power': 109.937, 'Runtime Dynamic': 16.6309, 'Subthreshold Leakage': 31.5774, 'Subthreshold Leakage with power gating': 13.9484, 'Total Cores/Area': 128.669, 'Total Cores/Gate Leakage': 1.4798, 'Total Cores/Peak Dynamic': 76.5838, 'Total Cores/Runtime Dynamic': 16.5514, 'Total Cores/Subthreshold Leakage': 24.7074, 'Total Cores/Subthreshold Leakage with power gating': 10.2429, 'Total L3s/Area': 61.9075, 'Total L3s/Gate Leakage': 0.0484137, 'Total L3s/Peak Dynamic': 0.241052, 'Total L3s/Runtime Dynamic': 0.0794812, 'Total L3s/Subthreshold Leakage': 6.80085, 'Total L3s/Subthreshold Leakage with power gating': 3.32364, 'Total Leakage': 33.1122, 'Total NoCs/Area': 1.33155, 'Total NoCs/Gate Leakage': 0.00662954, 'Total NoCs/Peak Dynamic': 0.0, 'Total NoCs/Runtime Dynamic': 0.0, 'Total NoCs/Subthreshold Leakage': 0.0691322, 'Total NoCs/Subthreshold Leakage with power gating': 0.0259246}}
def taumBday(b: int, w: int, bc: int, wc: int, z: int) -> int: if abs(bc-wc)<=z: return b*bc+w*wc elif bc < wc: return b * bc + w * (bc + z) else: return w*wc+b*(wc+z) if __name__ == "__main__": for _ in range(int(input())): b,w = (int(x) for x in input().split()) bc,wc,z = (int(x) for x in input().split()) print(taumBday(b, w, bc, wc, z))
def taum_bday(b: int, w: int, bc: int, wc: int, z: int) -> int: if abs(bc - wc) <= z: return b * bc + w * wc elif bc < wc: return b * bc + w * (bc + z) else: return w * wc + b * (wc + z) if __name__ == '__main__': for _ in range(int(input())): (b, w) = (int(x) for x in input().split()) (bc, wc, z) = (int(x) for x in input().split()) print(taum_bday(b, w, bc, wc, z))
x = 1 y = 2 def f1(): x, y = 3, 4 print [x, y] def f2(): global y x, y = 5, 6 print [x, y] def f3(): global x x, y = 7, 8 print [x, y] def f4(): global x, y x, y = 9, 10 print [x, y] print [x, y] f1() print [x, y] f2() print [x, y] f3() print [x, y] f4() print [x, y]
x = 1 y = 2 def f1(): (x, y) = (3, 4) print[x, y] def f2(): global y (x, y) = (5, 6) print[x, y] def f3(): global x (x, y) = (7, 8) print[x, y] def f4(): global x, y (x, y) = (9, 10) print[x, y] print[x, y] f1() print[x, y] f2() print[x, y] f3() print[x, y] f4() print[x, y]
hour = int(input()) day = input() if day == "Monday" or day == "Tuesday" or day == "Wednesday" or day == "Thursday" or day == "Friday" \ or day == "Saturday": if hour == 10 or hour == 11 or hour == 12 or hour == 13 or hour == 14 or hour == 15 \ or hour == 16 or hour == 17 or hour == 18: print("open") else: print("closed") elif day == "Sunday": print("closed")
hour = int(input()) day = input() if day == 'Monday' or day == 'Tuesday' or day == 'Wednesday' or (day == 'Thursday') or (day == 'Friday') or (day == 'Saturday'): if hour == 10 or hour == 11 or hour == 12 or (hour == 13) or (hour == 14) or (hour == 15) or (hour == 16) or (hour == 17) or (hour == 18): print('open') else: print('closed') elif day == 'Sunday': print('closed')
__author__ = 'gk' # Implements look up Table for user to ID and ID to user, as the end Result class for storing user rank and score class ScreenNameIndex: nameToIdMap = dict() idToNameMap = dict() def __init__(self,screen_names): super().__init__() id = 0 for item in screen_names: self.nameToIdMap[item] = id self.idToNameMap[id] = item id+=1 def __str__(self, *args, **kwargs): desc = "" for key,value in self.nameToIdMap.items(): desc = desc + " Key: " + key + " Value: " + repr(value) + "\n" return desc class UserRank: name = "" score = 0 def __init__(self,name,score): super().__init__() self.name = name self.score = score def __str__(self, *args, **kwargs): desc = "Name: " + self.name + " Score: " + repr(format(self.score,".10f")) return desc def buildUserRankList(screenNameIndex,xMatrix): userRankList = list() for i,j,v in zip(xMatrix.row,xMatrix.col,xMatrix.data): userRankList.append(UserRank(screenNameIndex.idToNameMap[j],v)) userRankList.sort(key=lambda x: x.score, reverse=True) return userRankList
__author__ = 'gk' class Screennameindex: name_to_id_map = dict() id_to_name_map = dict() def __init__(self, screen_names): super().__init__() id = 0 for item in screen_names: self.nameToIdMap[item] = id self.idToNameMap[id] = item id += 1 def __str__(self, *args, **kwargs): desc = '' for (key, value) in self.nameToIdMap.items(): desc = desc + ' Key: ' + key + ' Value: ' + repr(value) + '\n' return desc class Userrank: name = '' score = 0 def __init__(self, name, score): super().__init__() self.name = name self.score = score def __str__(self, *args, **kwargs): desc = 'Name: ' + self.name + ' Score: ' + repr(format(self.score, '.10f')) return desc def build_user_rank_list(screenNameIndex, xMatrix): user_rank_list = list() for (i, j, v) in zip(xMatrix.row, xMatrix.col, xMatrix.data): userRankList.append(user_rank(screenNameIndex.idToNameMap[j], v)) userRankList.sort(key=lambda x: x.score, reverse=True) return userRankList
# Two to One.py #! python3 ''' Take 2 strings s1 and s2 including only letters from a to z. Return a new sorted string, the longest possible, containing distinct letters, each taken only once - coming from s1 or s2. Examples: a = 'xyaabbbccccdefww' b = 'xxxxyyyyabklmopq' longest(a, b) -> 'abcdefklmopqwxy' a = 'abcdefghijklmnopqrstuvwxyz' longest(a, a) -> 'abcdefghijklmnopqrstuvwxyz' ''' # find unique letters in the combination of two strings def twoToOne(s1, s2): combo = s1 + s2 list1 = [] newS = '' for i in combo: if i not in list1: list1.append(i) print('Returning Unique letters: \n') print('') return newS.join(list1) # test cases string1, string2 = 'xyaabbbccccdefww', 'xxxxyyyyabklmopq' combo1 = 'xyaabbbccccdefww' + 'xxxxyyyyabklmopq' twoToOne(string1, string2)
""" Take 2 strings s1 and s2 including only letters from a to z. Return a new sorted string, the longest possible, containing distinct letters, each taken only once - coming from s1 or s2. Examples: a = 'xyaabbbccccdefww' b = 'xxxxyyyyabklmopq' longest(a, b) -> 'abcdefklmopqwxy' a = 'abcdefghijklmnopqrstuvwxyz' longest(a, a) -> 'abcdefghijklmnopqrstuvwxyz' """ def two_to_one(s1, s2): combo = s1 + s2 list1 = [] new_s = '' for i in combo: if i not in list1: list1.append(i) print('Returning Unique letters: \n') print('') return newS.join(list1) (string1, string2) = ('xyaabbbccccdefww', 'xxxxyyyyabklmopq') combo1 = 'xyaabbbccccdefww' + 'xxxxyyyyabklmopq' two_to_one(string1, string2)
# # PySNMP MIB module CISCO-MODEM-MGMT-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-MODEM-MGMT-MIB # Produced by pysmi-0.3.4 at Wed May 1 12:07:52 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # OctetString, Integer, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "OctetString", "Integer", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") SingleValueConstraint, ConstraintsUnion, ValueRangeConstraint, ConstraintsIntersection, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ConstraintsUnion", "ValueRangeConstraint", "ConstraintsIntersection", "ValueSizeConstraint") ciscoMgmt, = mibBuilder.importSymbols("CISCO-SMI", "ciscoMgmt") InterfaceIndex, = mibBuilder.importSymbols("IF-MIB", "InterfaceIndex") ObjectGroup, NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "ObjectGroup", "NotificationGroup", "ModuleCompliance") Unsigned32, Gauge32, Counter32, ModuleIdentity, NotificationType, Counter64, MibIdentifier, iso, IpAddress, TimeTicks, Bits, Integer32, ObjectIdentity, MibScalar, MibTable, MibTableRow, MibTableColumn = mibBuilder.importSymbols("SNMPv2-SMI", "Unsigned32", "Gauge32", "Counter32", "ModuleIdentity", "NotificationType", "Counter64", "MibIdentifier", "iso", "IpAddress", "TimeTicks", "Bits", "Integer32", "ObjectIdentity", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn") TextualConvention, DisplayString, TruthValue = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString", "TruthValue") ciscoModemMgmtMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 9, 9, 47)) ciscoModemMgmtMIB.setRevisions(('2005-12-06 00:00', '2001-12-01 12:00', '2001-10-01 12:00', '2000-04-01 00:00', '1998-12-16 00:00', '1998-06-18 00:00', '1997-12-22 00:00', '1997-10-13 00:00', '1997-07-18 00:00', '1998-03-09 00:00', '1997-12-16 00:00', '1997-05-01 00:00', '1997-04-29 00:00', '1997-06-11 00:00', '1997-03-21 00:00', '1997-03-17 00:00', '1996-01-11 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: ciscoModemMgmtMIB.setRevisionsDescriptions(('Imported Unsigned32 from SNMPv2-SMI instead of CISCO-TC', 'Added one more comment for cmTXAnalogSignalLevel', 'General cleanup', 'Added cmStateNotification and cmStateNotifyEnable', 'Added cmTotalCallDuration', 'Added the new enum values for cmDisconnectReason', 'Changed the modulation from v27 to v29.', 'Added new compliance statement for as5300 and c3600.', 'Added new MIB variables cmInitialTxLineConnections and cmInitialRxLineConnections', 'Added the new enum values v90 and v27ter for cmModulationSchemeUsed.', 'Changed the modulation from v27 to v29.', 'Added objects: cmSystemModemsInUse cmSystemModemsAvailable cmSystemModemsUnavailable cmSystemModemsOffline cmSystemModemsDead', 'Changed the modulation from v29 to v27.', 'DEFVAL update for cmSystemWatchdogTime,cmSystemStatusPollTime.', 'New enum values added for cmModulationSchemeUsed.', 'New enum values added for cmDisconnectReason.', 'Initial version of this MIB module.',)) if mibBuilder.loadTexts: ciscoModemMgmtMIB.setLastUpdated('200512060000Z') if mibBuilder.loadTexts: ciscoModemMgmtMIB.setOrganization('Cisco Systems, Inc.') if mibBuilder.loadTexts: ciscoModemMgmtMIB.setContactInfo(' Cisco Systems Customer Service Postal: 170 W Tasman Drive San Jose, CA 95134 USA Tel: +1 800 553-NETS E-mail: cs-snmp@cisco.com') if mibBuilder.loadTexts: ciscoModemMgmtMIB.setDescription('This MIB module provides modem call related data for tracking the progress and status of a call.') ciscoModemMgmtMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 47, 1)) cmSystemInfo = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 1)) cmGroupInfo = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 2)) cmLineInfo = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3)) cmNotificationConfig = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 4)) cmSystemInstalledModem = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 1, 1), Gauge32()).setUnits('modems').setMaxAccess("readonly") if mibBuilder.loadTexts: cmSystemInstalledModem.setStatus('current') if mibBuilder.loadTexts: cmSystemInstalledModem.setDescription('The actual number of modems that are currently installed within this system.') cmSystemConfiguredGroup = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 1, 2), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cmSystemConfiguredGroup.setStatus('current') if mibBuilder.loadTexts: cmSystemConfiguredGroup.setDescription('The actual number of modem groups that are currently configured within this system. Maximum value for this object is cmSystemInstalledModem.') cmSystemWatchdogTime = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 1, 3), Integer32().clone(6)).setUnits('minutes').setMaxAccess("readwrite") if mibBuilder.loadTexts: cmSystemWatchdogTime.setStatus('current') if mibBuilder.loadTexts: cmSystemWatchdogTime.setDescription('A passive software watchdog timer value will be used to recover a modem which enters into an unexpected state and hangs. When this watch dog timer times out, the modem associated Call Processing state will be set back to IDLE, all related TDM paths will be restored to default configurations, and all of call processing related actions will stop for the modem.') cmSystemStatusPollTime = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(2, 120)).clone(12)).setUnits('seconds').setMaxAccess("readwrite") if mibBuilder.loadTexts: cmSystemStatusPollTime.setStatus('current') if mibBuilder.loadTexts: cmSystemStatusPollTime.setDescription('The ideal time interval between modem status polling via the out of band management port.') cmSystemMaxRetries = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 10)).clone(3)).setMaxAccess("readwrite") if mibBuilder.loadTexts: cmSystemMaxRetries.setStatus('current') if mibBuilder.loadTexts: cmSystemMaxRetries.setDescription('A reply event is expected to be received for every message sent to the modem through the out of band management port. If an expected reply event is not received, the message will be sent to the modem again. This object specifies the maximum number of retries that should be executed.') cmSystemModemsInUse = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 1, 6), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cmSystemModemsInUse.setStatus('current') if mibBuilder.loadTexts: cmSystemModemsInUse.setDescription('The number of modems in the system that are in the following states: connected, offHook, loopback, or downloadFirmware.') cmSystemModemsAvailable = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 1, 7), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cmSystemModemsAvailable.setStatus('current') if mibBuilder.loadTexts: cmSystemModemsAvailable.setDescription('The number of modems in the system that are onHook. That is, they are ready to accept a call.') cmSystemModemsUnavailable = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 1, 8), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cmSystemModemsUnavailable.setStatus('current') if mibBuilder.loadTexts: cmSystemModemsUnavailable.setDescription('The number of modems in the system that cannot accept calls. They are in a state other than onHook.') cmSystemModemsOffline = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 1, 9), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cmSystemModemsOffline.setStatus('current') if mibBuilder.loadTexts: cmSystemModemsOffline.setDescription('The number of modems in the system, which have been held administratively offline') cmSystemModemsDead = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 1, 10), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cmSystemModemsDead.setStatus('current') if mibBuilder.loadTexts: cmSystemModemsDead.setDescription('The number of modems in the system with the state bad or downloadFirmwareFailed.') cmGroupTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 2, 1), ) if mibBuilder.loadTexts: cmGroupTable.setStatus('current') if mibBuilder.loadTexts: cmGroupTable.setDescription('Table of descriptive and status information about the groups of modems.') cmGroupEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 2, 1, 1), ).setIndexNames((0, "CISCO-MODEM-MGMT-MIB", "cmGroupIndex")) if mibBuilder.loadTexts: cmGroupEntry.setStatus('current') if mibBuilder.loadTexts: cmGroupEntry.setDescription('An entry in the table, containing information about a single group of modems.') cmGroupIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 2, 1, 1, 1), Unsigned32()) if mibBuilder.loadTexts: cmGroupIndex.setStatus('current') if mibBuilder.loadTexts: cmGroupIndex.setDescription('This object identifies the group containing the modems for which this entry contains information.') cmGroupTotalDevices = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 2, 1, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cmGroupTotalDevices.setStatus('current') if mibBuilder.loadTexts: cmGroupTotalDevices.setDescription('The total number of modem devices which are configured in the group.') cmGroupMemberTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 2, 2), ) if mibBuilder.loadTexts: cmGroupMemberTable.setStatus('current') if mibBuilder.loadTexts: cmGroupMemberTable.setDescription('Table of information about the modem members in modem groups.') cmGroupMemberEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 2, 2, 1), ).setIndexNames((0, "CISCO-MODEM-MGMT-MIB", "cmGroupIndex"), (0, "CISCO-MODEM-MGMT-MIB", "cmSlotIndex"), (0, "CISCO-MODEM-MGMT-MIB", "cmPortIndex")) if mibBuilder.loadTexts: cmGroupMemberEntry.setStatus('current') if mibBuilder.loadTexts: cmGroupMemberEntry.setDescription("An entry in the table, containing information about modem members in a group. The modem groups are currently created when an associated Async interface groups are configured via CLI command 'interface group-async' and not via SNMP.") cmSlotIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 2, 2, 1, 1), Unsigned32()) if mibBuilder.loadTexts: cmSlotIndex.setStatus('current') if mibBuilder.loadTexts: cmSlotIndex.setDescription('The modem feature card slot number in the group.') cmPortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 2, 2, 1, 2), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cmPortIndex.setStatus('current') if mibBuilder.loadTexts: cmPortIndex.setDescription('The modem port number of a modem feature card in the group.') cmLineStatusTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 1), ) if mibBuilder.loadTexts: cmLineStatusTable.setStatus('current') if mibBuilder.loadTexts: cmLineStatusTable.setDescription('A collection of objects that describe the status of the modem.') cmLineStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 1, 1), ).setIndexNames((0, "CISCO-MODEM-MGMT-MIB", "cmSlotIndex"), (0, "CISCO-MODEM-MGMT-MIB", "cmPortIndex")) if mibBuilder.loadTexts: cmLineStatusEntry.setStatus('current') if mibBuilder.loadTexts: cmLineStatusEntry.setDescription('An entry in the table, containing status information about a single modem.') cmInterface = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 1, 1, 1), InterfaceIndex()).setMaxAccess("readonly") if mibBuilder.loadTexts: cmInterface.setStatus('current') if mibBuilder.loadTexts: cmInterface.setDescription('The interface that this modem is connected.') cmGroup = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 1, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cmGroup.setStatus('current') if mibBuilder.loadTexts: cmGroup.setDescription('The modem group number that the modem may be in.') cmManufacturerID = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 1, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 79))).setMaxAccess("readonly") if mibBuilder.loadTexts: cmManufacturerID.setStatus('current') if mibBuilder.loadTexts: cmManufacturerID.setDescription("A textual description to identify the modem, including the manufacturer's name and type of modem.") cmProductDetails = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 1, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 79))).setMaxAccess("readonly") if mibBuilder.loadTexts: cmProductDetails.setStatus('current') if mibBuilder.loadTexts: cmProductDetails.setDescription('A textual description of the modem, including hardware revision number, firmware revision number, feature set and optionally, its serial number.') cmManageable = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 1, 1, 5), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: cmManageable.setStatus('current') if mibBuilder.loadTexts: cmManageable.setDescription('The Manageable modem allows to be accessed through the out of band management port in which the modem statistic data can be retrieved, and the Direct Connect session can be used to provide the test and debugging ability. This object specifies whether this modem is a Manageable modem.') cmState = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10))).clone(namedValues=NamedValues(("unknown", 1), ("onHook", 2), ("offHook", 3), ("connected", 4), ("busiedOut", 5), ("disabled", 6), ("bad", 7), ("loopback", 8), ("downloadFirmware", 9), ("downloadFirmwareFailed", 10)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cmState.setStatus('current') if mibBuilder.loadTexts: cmState.setDescription("Indicates the current state of modem. The meaning of each state code is explained below: unknown: the current state of the modem is unknown. onHook: the condition similar to hanging up a telephone receiver. The call cannot enter a connected state when the modem is onHook. offHook: The condition similar to picking up a telephone receiver to dial or answer a call. connected: The modem is in a state when it can transmit or receive data over the communications line. busiedOut: The modem is busied out (i.e. taken out of service) and cannot make outgoing calls or receive incoming calls. disabled: The modem is in a reset state and non-functional. This state can be set and clear via cmHoldReset. bad: The modem is suspected or proven to be bad. The operator can take the modem out of service and mark the modem as 'bad' via cmBad. loopback: The modem is in a state where it is currently running back-to-back loopback testing. downloadFirmware: The modem is in a state where it is currently downloading the firmware. downloadFirmwareFailed: The modem is not operational because the downloading of firmware to it has failed.") cmCallDirection = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 1, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("incoming", 1), ("outgoing", 2), ("none", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cmCallDirection.setStatus('current') if mibBuilder.loadTexts: cmCallDirection.setDescription('The modem can be used either as an incoming call or outgoing call. This object specifies the direction of the current or previous call.') cmDisconnectReason = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 1, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103))).clone(namedValues=NamedValues(("unknown", 1), ("lostCarrier", 2), ("noCarrier", 3), ("noDialTone", 4), ("busy", 5), ("modemWatchdogTimeout", 6), ("dtrDrop", 7), ("userHangup", 8), ("compressionProblem", 9), ("retrainFailure", 10), ("remoteLinkDisconnect", 11), ("abort", 12), ("inactivityTimeout", 13), ("dialStringError", 14), ("linkFailure", 15), ("modulationError", 16), ("dialTimeout", 17), ("remoteHangup", 18), ("mnp10ProtocolError", 19), ("lapmProtocolError", 20), ("faxClass2Error", 21), ("trainupFailure", 22), ("fallbackTerminate", 23), ("excessiveEC", 24), ("hostDrop", 25), ("terminate", 26), ("autoLogonError", 27), ("ccpNotSeen", 28), ("callbackFailed", 29), ("blacklist", 30), ("lapmTimeout", 31), ("reliableLinkTxTimeout", 32), ("dspAccessFailure", 33), ("cdOffTimeout", 34), ("codewordSizeMismatch", 35), ("dspDownloadFailure", 36), ("modemDrNone", 37), ("modemDrSoftwareReset", 38), ("modemDrEcTerminated", 39), ("modemDrBadMnp5Rxdata", 40), ("modemDrBadV42bisRxdata", 41), ("modemDrBadCopState", 42), ("modemDrAth", 43), ("modemDrAborted", 44), ("modemDrConnectTimeout", 45), ("modemDrResetDsp", 46), ("modemDrNoCarrier", 47), ("modemDrNoAbtDetected", 48), ("modemDrTrainupFailure", 49), ("modemDrRetrainLimit", 50), ("modemDrAbtEndFailure", 51), ("modemDrNoLr", 52), ("modemDrLrParam1", 53), ("modemDrLrIncompat", 54), ("modemDrRetransmitLimit", 55), ("modemDrInactivity", 56), ("modemDrProtocolError", 57), ("modemDrFallbackTerminate", 58), ("modemDrNoXid", 59), ("modemDrXidIncompat", 60), ("modemDrDisc", 61), ("modemDrDm", 62), ("modemDrBadNr", 63), ("modemDrSabmeOnline", 64), ("modemDrXidOnline", 65), ("modemDrLrOnline", 66), ("modemDrBadCmnd", 67), ("modemDrFrmrBadCmnd", 68), ("modemDrFrmrData", 69), ("modemDrFrmrLength", 70), ("modemDrFrmrBadNr", 71), ("modemDrLdNoLr", 72), ("modemDrLdLrParam1", 73), ("modemDrLdLrIncompat", 74), ("modemDrLdRetransLimit", 75), ("modemDrLdInactivity", 76), ("modemDrLdProtocol", 77), ("modemDrLdUser", 78), ("modemDrHostNonspecific", 79), ("modemDrHostBusy", 80), ("modemDrHostNoAnswer", 81), ("modemDrHostDtr", 82), ("modemDrHostAth", 83), ("modemDrHostNoDialtone", 84), ("modemDrHostNoCarrier", 85), ("modemDrHostAck", 86), ("modemDrMohClrd", 87), ("modemDrMohTimeout", 88), ("modemDrCotAck", 89), ("modemDrCotNak1", 90), ("modemDrCotNak2", 91), ("modemDrCotOff", 92), ("modemDrCotTimeout", 93), ("modemDrDcIllegalCodewordStepup", 94), ("modemDrDcIllegalTokenEmptyNode", 95), ("modemDrDcIllegalTokenTooLarge", 96), ("modemDrDcReservedCommand", 97), ("modemDrDcIllegalCharacterSizeStepup", 98), ("modemDrDcRxDictionaryFull", 99), ("modemDrDcRxHistoryFull", 100), ("modemDrDcRxStringSizeExceeded", 101), ("modemDrDcNegotiationError", 102), ("modemDrDcCompressionError", 103)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cmDisconnectReason.setStatus('current') if mibBuilder.loadTexts: cmDisconnectReason.setDescription('Indicates the reason that the last connection or call attempt disconnected. The meaning of each reason code is explained below: unknown: the failure reason is unknown or there has been no previous call. lostCarrier: the call was disconnected because the loss of carrier. noCarrier: the dial out attempt has failed because the modem detects no carrier. noDialTone: the dial out attempt has failed because the modem failed to detect a dial tone. busy: the call attempt failed because the modem detected a busy signal. modemWatchdogTimeout: the modem internal watchdog timer has expired. dtrDrop: DTR has been turned off while the modem is to disconnect on DTR drop. userHangup: normal disconnect where the user hangs up call. compressionProblem: the call is disconnected due to a problem detected during compression in the modem. retrainFailure: the modem did not successfully train and reach data mode on the previous connections. remoteLinkDisconnect: the remote link disconnected the connection. abort: the call was aborted. inactivityTimeout: the modem automatically hangs up because data is not sent or received within the inactivity time out. dialStringError: the dialed phone number is invalid. linkFailure: the modem detects a link failure. modulationError: the modem detects a modulation error. dialTimeout: the modem times out while attempting to dial. remoteHangup: the remote side hangs up the connection. mnp10ProtocolError: MNP10 Protocol Error. lapmProtocolError: LAPM Protocol Error. faxClass2Error: Fax Class 2 Error. trainupFailure: failure to trainup with a remote peer. fallbackTerminate: User has EC fallback set to disconnect. excessiveEC: Link loss due to excessive EC retransmissions. EC packet transmit limit exceeded. hostDrop: Host initiated link drop. terminate: Lost Carrier Microcom HDMS product relating to password security issues. autoLogonError: An autologon sequence did not complete successfully. ccpNotSeen: The Credit Card Prompt was not detected. callbackFailed: Applies to leased line connection. If after a switched line dialback due to a leased line connection failure, the switched line connection also fails and a connection can still not be made on the leased line, a disconnect occurs with this reason set. blacklist: In coutries that support blacklisting, an attempt was made to go off hook with a null dial string (ATD). lapmTimeout: Timed out waiting for a reply from remote. reliableLinkTxTimeout: Have not received the link acknowledgement in the first 30 seconds of the connection. dspAccessFailure: Timed out trying to access the DSP chip. cdOffTimeout: Timed out waiting for carrier to return after a retrain or rate renegotiation. codewordSizeMismatch: The codeword size are mismatched. dspDownloadFailure: Error during the DSP code download. The time taken to recover and repeat the download would take too long to complete the handshake.') cmCallDuration = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 1, 1, 9), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: cmCallDuration.setStatus('current') if mibBuilder.loadTexts: cmCallDuration.setDescription('This object specifies the call duration of the current or previous call.') cmCallPhoneNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 1, 1, 10), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setMaxAccess("readonly") if mibBuilder.loadTexts: cmCallPhoneNumber.setStatus('current') if mibBuilder.loadTexts: cmCallPhoneNumber.setDescription('The dialed outgoing telephone number of the current or previous call.') cmCallerID = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 1, 1, 11), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setMaxAccess("readonly") if mibBuilder.loadTexts: cmCallerID.setStatus('current') if mibBuilder.loadTexts: cmCallerID.setDescription('The incoming caller identification of the current or previous call if this entry is not in the connected state.') cmModulationSchemeUsed = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 1, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21))).clone(namedValues=NamedValues(("unknown", 1), ("bell103a", 2), ("bell212a", 3), ("v21", 4), ("v22", 5), ("v22bis", 6), ("v32", 7), ("v32bis", 8), ("vfc", 9), ("v34", 10), ("v17", 11), ("v29", 12), ("v33", 13), ("k56flex", 14), ("v23", 15), ("v32terbo", 16), ("v34plus", 17), ("v90", 18), ("v27ter", 19), ("v110", 20), ("piafs", 21)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cmModulationSchemeUsed.setStatus('current') if mibBuilder.loadTexts: cmModulationSchemeUsed.setDescription('The modem modulation scheme used in the current or previous call. This object is valid only for modems which have cmManageable to be true.') cmProtocolUsed = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 1, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9))).clone(namedValues=NamedValues(("normal", 1), ("direct", 2), ("reliableMNP", 3), ("reliableLAPM", 4), ("syncMode", 5), ("asyncMode", 6), ("ara10", 7), ("ara20", 8), ("unknown", 9)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cmProtocolUsed.setStatus('current') if mibBuilder.loadTexts: cmProtocolUsed.setDescription('The modem protocol used in the current or previous call. This object is valid only for modems which have cmManageable to be true.') cmTXRate = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 1, 1, 14), Gauge32()).setUnits('bits/second').setMaxAccess("readonly") if mibBuilder.loadTexts: cmTXRate.setStatus('current') if mibBuilder.loadTexts: cmTXRate.setDescription('The speed of modem transmit rate of the current or previous call in bits per second. This object is valid only for modems which have cmManageable to be true.') cmRXRate = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 1, 1, 15), Gauge32()).setUnits('bits/second').setMaxAccess("readonly") if mibBuilder.loadTexts: cmRXRate.setStatus('current') if mibBuilder.loadTexts: cmRXRate.setDescription('The speed of modem receive rate of the current or previous call in bits per second. This object is valid only for modems which have cmManageable to be true.') cmTXAnalogSignalLevel = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 1, 1, 16), Integer32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(-43, -9), ValueRangeConstraint(0, 0), ))).setUnits('dBm').setMaxAccess("readonly") if mibBuilder.loadTexts: cmTXAnalogSignalLevel.setStatus('current') if mibBuilder.loadTexts: cmTXAnalogSignalLevel.setDescription('The modem transmit analog signal level in the current or previous call. The unit used is in dBm. This object is valid for modems that have cmManageable set to true(1) otherwise 0 will be returned.') cmRXAnalogSignalLevel = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 1, 1, 17), Integer32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(-128, -1), ValueRangeConstraint(0, 0), ))).setUnits('dBm').setMaxAccess("readonly") if mibBuilder.loadTexts: cmRXAnalogSignalLevel.setStatus('current') if mibBuilder.loadTexts: cmRXAnalogSignalLevel.setDescription('The modem transmit analog signal level in the current or previous call. The unit used is in dBm. This object is valid for modems that have cmManageable set to true(1) otherwise 0 will be returned.') cmLineConfigTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 2), ) if mibBuilder.loadTexts: cmLineConfigTable.setStatus('current') if mibBuilder.loadTexts: cmLineConfigTable.setDescription('A collection of objects that describe some of the configuration info of the modem.') cmLineConfigEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 2, 1), ) cmLineStatusEntry.registerAugmentions(("CISCO-MODEM-MGMT-MIB", "cmLineConfigEntry")) cmLineConfigEntry.setIndexNames(*cmLineStatusEntry.getIndexNames()) if mibBuilder.loadTexts: cmLineConfigEntry.setStatus('current') if mibBuilder.loadTexts: cmLineConfigEntry.setDescription('An entry in the table, containing configuration information about a single modem.') cmATModePermit = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 2, 1, 1), TruthValue().clone('true')).setMaxAccess("readwrite") if mibBuilder.loadTexts: cmATModePermit.setStatus('current') if mibBuilder.loadTexts: cmATModePermit.setDescription("Direct Connect session is used for test and debugging purpose by using the modem AT commands through the out of band management port when cmManageable is true. This object specifies whether the Direct Connect session is permitted to be used at this modem. If cmManageable is true(1), Direct Connect session via the out of band port is allowed and false(2) indicates that it isn't allowed for the modem.") cmStatusPolling = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 2, 1, 2), TruthValue().clone('true')).setMaxAccess("readwrite") if mibBuilder.loadTexts: cmStatusPolling.setStatus('current') if mibBuilder.loadTexts: cmStatusPolling.setDescription('Modem status and events can be polled through the out of band management port when the cmManageable is true. This object specifies whether this status polling feature is enabled at this modem. If cmManageable is true(1), status polling will occur for the modem and false(2) indicates that no status polling will occur.') cmBusyOutRequest = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 2, 1, 3), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: cmBusyOutRequest.setStatus('current') if mibBuilder.loadTexts: cmBusyOutRequest.setDescription('This object is used to put modem out of service, i.e. modem cannot make calls or answer calls. If the modem to be busyout is handling a call, the busyout action will be taken after the current call is disconnected. After modem is busyout, the following commands can be applied to those modems - reset, bad modem, download modem firmware, etc. This is called nice or graceful busyout. The value of true(1) indicates the busyOut request has been issued to the modem, but the busyout could be pending. The management entity needs to query the cmState to see if the modem is successfully busied out. The value of false(2) indicates the modem is not given the busyOut command.') cmShutdown = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 2, 1, 4), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: cmShutdown.setStatus('current') if mibBuilder.loadTexts: cmShutdown.setDescription('This object is used to put modem out of service, i.e. modem cannot make calls or answer calls. This is a hard busyout command to bring the modem out of service immediately without waiting for the call to be ended normally. After modem is shutdown, the following commands can be applied to those modems - reset, bad modem, download modem firmware, etc. The value of true(1) indicates the hard busyout has been issued to the modem. The value of false(2) indicates the modem has not been hard busyout.') cmHoldReset = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 2, 1, 5), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: cmHoldReset.setStatus('current') if mibBuilder.loadTexts: cmHoldReset.setDescription('A command hold-reset will put the state of modem into reset mode until an inverse command to bring modem out of RESET mode. During the period of reset mode, this modem can not be used and is non-functional. This object is only valid when cmState is onHook, busiedOut, or disabled. The value of true(1) attempts to put the modem in reset mode, and the value of false(2) takes the modem out of reset. This object is not applicable for Mica modems.') cmBad = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 2, 1, 6), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: cmBad.setStatus('current') if mibBuilder.loadTexts: cmBad.setDescription("This object can hold modem out of service and marks the modem as suspected or proven to be bad. During the router start-up initialization sequence, modem back-to-back tests will test modems and mark those modems failing tests as bad modems. The management entity also can use this command to lock out the suspicious modem or unlock the modem to do further debugging or test. This command will be used accompanied with cmholdReset command to put modem out of service. This command doesn't do the reset. For a normally good modem, it can start handling calls after it exits from modem reset mode. For a bad modem, it cannot start handling calls after it exits from modem reset mode. The manager needs to take modem out of bad modem mode in order to handle calls. This object is only valid when cmState is onHook or busiedOut. The value of true(1) indicates the modem is suspected to be bad and its state is set to bad. The value of false(2) indicates the modem has not been suspected to be bad or has been re-marked as good.") cmLineStatisticsTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 3), ) if mibBuilder.loadTexts: cmLineStatisticsTable.setStatus('current') if mibBuilder.loadTexts: cmLineStatisticsTable.setDescription('A collection of objects that describe the status of the modem.') cmLineStatisticsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 3, 1), ) cmLineStatusEntry.registerAugmentions(("CISCO-MODEM-MGMT-MIB", "cmLineStatisticsEntry")) cmLineStatisticsEntry.setIndexNames(*cmLineStatusEntry.getIndexNames()) if mibBuilder.loadTexts: cmLineStatisticsEntry.setStatus('current') if mibBuilder.loadTexts: cmLineStatisticsEntry.setDescription('An entry in the table, containing status information about a single modem.') cmRingNoAnswers = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 3, 1, 1), Counter32()).setUnits('calls').setMaxAccess("readonly") if mibBuilder.loadTexts: cmRingNoAnswers.setStatus('current') if mibBuilder.loadTexts: cmRingNoAnswers.setDescription('A counter to count the calls that ringing was detected but the call was not answered at this modem.') cmIncomingConnectionFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 3, 1, 2), Counter32()).setUnits('calls').setMaxAccess("readonly") if mibBuilder.loadTexts: cmIncomingConnectionFailures.setStatus('current') if mibBuilder.loadTexts: cmIncomingConnectionFailures.setDescription('A counter that indicates the number of incoming connection requests that this modem answered in which it could not train with the other DCE. This object is valid only for modems which have cmManageable to be true.') cmIncomingConnectionCompletions = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 3, 1, 3), Counter32()).setUnits('calls').setMaxAccess("readonly") if mibBuilder.loadTexts: cmIncomingConnectionCompletions.setStatus('current') if mibBuilder.loadTexts: cmIncomingConnectionCompletions.setDescription('A counter that indicates the number of incoming connection requests that this modem answered and successfully trained with the other DCE. This object is valid only for modems which have cmManageable to be true.') cmOutgoingConnectionFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 3, 1, 4), Counter32()).setUnits('calls').setMaxAccess("readonly") if mibBuilder.loadTexts: cmOutgoingConnectionFailures.setStatus('current') if mibBuilder.loadTexts: cmOutgoingConnectionFailures.setDescription('A counter that indicates the number of outgoing calls from this modem which successfully went off hook and dialed, in which it could not train with the other DCE. This object is valid only for modems which have cmManageable to be true.') cmOutgoingConnectionCompletions = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 3, 1, 5), Counter32()).setUnits('calls').setMaxAccess("readonly") if mibBuilder.loadTexts: cmOutgoingConnectionCompletions.setStatus('current') if mibBuilder.loadTexts: cmOutgoingConnectionCompletions.setDescription('A counter that indicates the number of outgoing calls from this modem which resulted in successfully training with the other DCE.This object is valid only for modems which have cmManageable to be true.') cmFailedDialAttempts = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 3, 1, 6), Counter32()).setUnits('calls').setMaxAccess("readonly") if mibBuilder.loadTexts: cmFailedDialAttempts.setStatus('current') if mibBuilder.loadTexts: cmFailedDialAttempts.setDescription("A counter that indicates the number of call attempts that failed because the modem didn't go off hook, or there was no dial tone.") cmNoDialTones = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 3, 1, 7), Counter32()).setUnits('calls').setMaxAccess("readonly") if mibBuilder.loadTexts: cmNoDialTones.setStatus('current') if mibBuilder.loadTexts: cmNoDialTones.setDescription('A counter that indicates the number of times the dial tone expected but not received. This object is valid only for modems which have cmManageable to be true.') cmDialTimeouts = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 3, 1, 8), Counter32()).setUnits('calls').setMaxAccess("readonly") if mibBuilder.loadTexts: cmDialTimeouts.setStatus('current') if mibBuilder.loadTexts: cmDialTimeouts.setDescription('A counter that indicates the number of times the dial time-out occurred. This object is valid only for modems which have cmManageable to be true.') cmWatchdogTimeouts = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 3, 1, 9), Counter32()).setUnits('calls').setMaxAccess("readonly") if mibBuilder.loadTexts: cmWatchdogTimeouts.setStatus('current') if mibBuilder.loadTexts: cmWatchdogTimeouts.setDescription('The number of times the Call Processing watchdog timer has expired.') cm2400OrLessConnections = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 3, 1, 10), Counter32()).setUnits('calls').setMaxAccess("readonly") if mibBuilder.loadTexts: cm2400OrLessConnections.setStatus('deprecated') if mibBuilder.loadTexts: cm2400OrLessConnections.setDescription('The number of connections initially established at a modulation speed of 2400 bits per second or less. This object is valid only for modems which have cmManageable to be true.') cm2400To14400Connections = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 3, 1, 11), Counter32()).setUnits('calls').setMaxAccess("readonly") if mibBuilder.loadTexts: cm2400To14400Connections.setStatus('deprecated') if mibBuilder.loadTexts: cm2400To14400Connections.setDescription('The number of connections initially established at a modulation speed of greater than 2400 bits per second and less than 14400 bits per second. This object is valid only for modems which have cmManageable to be true.') cmGreaterThan14400Connections = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 3, 1, 12), Counter32()).setUnits('calls').setMaxAccess("readonly") if mibBuilder.loadTexts: cmGreaterThan14400Connections.setStatus('deprecated') if mibBuilder.loadTexts: cmGreaterThan14400Connections.setDescription('The number of connections initially established at a modulation speed of greater than 14400 bits per second. This object is valid only for modems which have cmManageable to be true.') cmNoCarriers = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 3, 1, 13), Counter32()).setUnits('calls').setMaxAccess("readonly") if mibBuilder.loadTexts: cmNoCarriers.setStatus('current') if mibBuilder.loadTexts: cmNoCarriers.setDescription('A counter that indicates the number of times that the disconnect reason is no carrier. This object is valid only for modems which have cmManageable to be true.') cmLinkFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 3, 1, 14), Counter32()).setUnits('calls').setMaxAccess("readonly") if mibBuilder.loadTexts: cmLinkFailures.setStatus('current') if mibBuilder.loadTexts: cmLinkFailures.setDescription('A counter that indicates the number of times that the disconnect reason is link failure. This object is valid only for modems which have cmManageable to be true.') cmProtocolErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 3, 1, 15), Counter32()).setUnits('errors').setMaxAccess("readonly") if mibBuilder.loadTexts: cmProtocolErrors.setStatus('current') if mibBuilder.loadTexts: cmProtocolErrors.setDescription('A counter that indicates the number of times that the out of band protocol error occurred. This object is valid only for modems which have cmManageable to be true.') cmPollingTimeouts = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 3, 1, 16), Counter32()).setUnits('errors').setMaxAccess("readonly") if mibBuilder.loadTexts: cmPollingTimeouts.setStatus('current') if mibBuilder.loadTexts: cmPollingTimeouts.setDescription('A counter that indicates the number of times that the out of band protocol time-out error occurred. This object is valid only for modems which have cmManageable to be true.') cmTotalCallDuration = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 3, 1, 17), Counter32()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: cmTotalCallDuration.setStatus('current') if mibBuilder.loadTexts: cmTotalCallDuration.setDescription('A counter that indicates total call duration on the modem. This includes the duration of all previous calls.') cmLineSpeedStatisticsTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 4), ) if mibBuilder.loadTexts: cmLineSpeedStatisticsTable.setStatus('current') if mibBuilder.loadTexts: cmLineSpeedStatisticsTable.setDescription('A collection of objects that describe the intial modem line speeds and connections') cmLineSpeedStatisticsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 4, 1), ).setIndexNames((0, "CISCO-MODEM-MGMT-MIB", "cmSlotIndex"), (0, "CISCO-MODEM-MGMT-MIB", "cmPortIndex"), (0, "CISCO-MODEM-MGMT-MIB", "cmInitialLineSpeed")) if mibBuilder.loadTexts: cmLineSpeedStatisticsEntry.setStatus('current') if mibBuilder.loadTexts: cmLineSpeedStatisticsEntry.setDescription('An entry in the table, containing initial speed and connection information about a single modem.') cmInitialLineSpeed = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 4, 1, 1), Unsigned32()) if mibBuilder.loadTexts: cmInitialLineSpeed.setStatus('current') if mibBuilder.loadTexts: cmInitialLineSpeed.setDescription('A discrete initial speed at which the given line may operate') cmInitialLineConnections = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 4, 1, 2), Counter32()).setUnits('calls').setMaxAccess("readonly") if mibBuilder.loadTexts: cmInitialLineConnections.setStatus('deprecated') if mibBuilder.loadTexts: cmInitialLineConnections.setDescription('The number of connections initially established at a given modulation speed. An instance of this object will be only present for those speeds where one or more connections have occurred') cmInitialTxLineConnections = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 4, 1, 3), Counter32()).setUnits('calls').setMaxAccess("readonly") if mibBuilder.loadTexts: cmInitialTxLineConnections.setStatus('current') if mibBuilder.loadTexts: cmInitialTxLineConnections.setDescription('The number of Transmit connections initially established at a given modulation speed. An instance of this object will be only present for those speeds where one or more connections have occurred') cmInitialRxLineConnections = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 4, 1, 4), Counter32()).setUnits('calls').setMaxAccess("readonly") if mibBuilder.loadTexts: cmInitialRxLineConnections.setStatus('current') if mibBuilder.loadTexts: cmInitialRxLineConnections.setDescription('The number of Receive connections initially established at a given modulation speed. An instance of this object will be only present for those speeds where one or more connections have occurred') cmStateNotifyEnable = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 4, 1), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cmStateNotifyEnable.setStatus('current') if mibBuilder.loadTexts: cmStateNotifyEnable.setDescription("This variable controls generation of the cmStateNotification. When this variable is 'true(1)', generation of cmStateNotification is enabled. When this variable is 'false(2)', generation of cmStateNotification is disabled. The default value is 'false(2)'. ") cmMIBNotificationPrefix = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 47, 2)) cmMIBNotifications = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 47, 2, 0)) cmStateNotification = NotificationType((1, 3, 6, 1, 4, 1, 9, 9, 47, 2, 0, 1)).setObjects(("CISCO-MODEM-MGMT-MIB", "cmState")) if mibBuilder.loadTexts: cmStateNotification.setStatus('current') if mibBuilder.loadTexts: cmStateNotification.setDescription('A modem port state change notification is generated whenever the port transitions to a state where it is offline due to a failure or administrative action. The values of cmState which will trigger this notification are: busiedOut(5) - Administratively out of service disabled(6) - Administratively out of service bad(7) - Internally detected failure or administrative action loopback(8) - Testing downloadFirmware(9) - Administrative action downloadFirmwareFailed(10) - Internally detected failure ') ciscoModemMgmtMIBConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 47, 3)) ciscoModemMgmtMIBCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 47, 3, 1)) ciscoModemMgmtMIBGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 47, 3, 2)) ciscoModemMgmtMIBCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 47, 3, 1, 1)).setObjects(("CISCO-MODEM-MGMT-MIB", "cmSystemInfoGroup"), ("CISCO-MODEM-MGMT-MIB", "cmLineInfoGroup"), ("CISCO-MODEM-MGMT-MIB", "cmGroupInfoGroup"), ("CISCO-MODEM-MGMT-MIB", "cmManagedLineInfoGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoModemMgmtMIBCompliance = ciscoModemMgmtMIBCompliance.setStatus('obsolete') if mibBuilder.loadTexts: ciscoModemMgmtMIBCompliance.setDescription('The compliance statement for entities which implement the cisco Modem Management MIB') ciscoModemMgmtMIBComplianceRev1 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 47, 3, 1, 2)).setObjects(("CISCO-MODEM-MGMT-MIB", "cmSystemInfoGroup"), ("CISCO-MODEM-MGMT-MIB", "cmLineInfoGroup"), ("CISCO-MODEM-MGMT-MIB", "cmGroupInfoGroup"), ("CISCO-MODEM-MGMT-MIB", "cmManagedLineInfoGroup"), ("CISCO-MODEM-MGMT-MIB", "cmLineSpeedInfoGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoModemMgmtMIBComplianceRev1 = ciscoModemMgmtMIBComplianceRev1.setStatus('obsolete') if mibBuilder.loadTexts: ciscoModemMgmtMIBComplianceRev1.setDescription('The compliance statement for entities which implement the cisco Modem Management MIB') ciscoModemMgmtMIBComplianceRev2 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 47, 3, 1, 3)).setObjects(("CISCO-MODEM-MGMT-MIB", "cmSystemInfoGroupRev1"), ("CISCO-MODEM-MGMT-MIB", "cmLineInfoGroup"), ("CISCO-MODEM-MGMT-MIB", "cmGroupInfoGroup"), ("CISCO-MODEM-MGMT-MIB", "cmManagedLineInfoGroup"), ("CISCO-MODEM-MGMT-MIB", "cmLineSpeedInfoGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoModemMgmtMIBComplianceRev2 = ciscoModemMgmtMIBComplianceRev2.setStatus('obsolete') if mibBuilder.loadTexts: ciscoModemMgmtMIBComplianceRev2.setDescription('The compliance statement for entities which implement the cisco Modem Management MIB') ciscoModemMgmtMIBComplianceRev3 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 47, 3, 1, 4)).setObjects(("CISCO-MODEM-MGMT-MIB", "cmSystemInfoGroupRev1"), ("CISCO-MODEM-MGMT-MIB", "cmLineInfoGroup"), ("CISCO-MODEM-MGMT-MIB", "cmGroupInfoGroup"), ("CISCO-MODEM-MGMT-MIB", "cmManagedLineInfoGroup"), ("CISCO-MODEM-MGMT-MIB", "cmLineSpeedInfoGroupRev1")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoModemMgmtMIBComplianceRev3 = ciscoModemMgmtMIBComplianceRev3.setStatus('obsolete') if mibBuilder.loadTexts: ciscoModemMgmtMIBComplianceRev3.setDescription('The compliance statement for entities which implement the cisco Modem Management MIB') ciscoModemMgmtMIBComplianceRev4 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 47, 3, 1, 5)).setObjects(("CISCO-MODEM-MGMT-MIB", "cmGroupInfoGroup"), ("CISCO-MODEM-MGMT-MIB", "cmLineSpeedInfoGroupRev1"), ("CISCO-MODEM-MGMT-MIB", "cmManagedLineInfoGroup"), ("CISCO-MODEM-MGMT-MIB", "cmLineInfoGroup"), ("CISCO-MODEM-MGMT-MIB", "cmSystemInfoGroupRev1")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoModemMgmtMIBComplianceRev4 = ciscoModemMgmtMIBComplianceRev4.setStatus('obsolete') if mibBuilder.loadTexts: ciscoModemMgmtMIBComplianceRev4.setDescription('The compliance statement for entities which implement the cisco Modem Management MIB') ciscoModemMgmtMIBComplianceRev5 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 47, 3, 1, 6)).setObjects(("CISCO-MODEM-MGMT-MIB", "cmGroupInfoGroup"), ("CISCO-MODEM-MGMT-MIB", "cmLineSpeedInfoGroupRev1"), ("CISCO-MODEM-MGMT-MIB", "cmManagedLineInfoGroupRev1"), ("CISCO-MODEM-MGMT-MIB", "cmLineInfoGroup"), ("CISCO-MODEM-MGMT-MIB", "cmSystemInfoGroupRev1"), ("CISCO-MODEM-MGMT-MIB", "cmNotificationConfigGroup"), ("CISCO-MODEM-MGMT-MIB", "cmNotificationGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoModemMgmtMIBComplianceRev5 = ciscoModemMgmtMIBComplianceRev5.setStatus('deprecated') if mibBuilder.loadTexts: ciscoModemMgmtMIBComplianceRev5.setDescription('The compliance statement for entities which implement the cisco Modem Management MIB') ciscoModemMgmtMIBComplianceRev6 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 47, 3, 1, 7)).setObjects(("CISCO-MODEM-MGMT-MIB", "cmGroupInfoGroup"), ("CISCO-MODEM-MGMT-MIB", "cmLineSpeedInfoGroupRev2"), ("CISCO-MODEM-MGMT-MIB", "cmManagedLineInfoGroupRev2"), ("CISCO-MODEM-MGMT-MIB", "cmLineInfoGroup"), ("CISCO-MODEM-MGMT-MIB", "cmSystemInfoGroupRev1"), ("CISCO-MODEM-MGMT-MIB", "cmNotificationConfigGroup"), ("CISCO-MODEM-MGMT-MIB", "cmNotificationGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoModemMgmtMIBComplianceRev6 = ciscoModemMgmtMIBComplianceRev6.setStatus('current') if mibBuilder.loadTexts: ciscoModemMgmtMIBComplianceRev6.setDescription('The compliance statement for entities which implement the cisco Modem Management MIB') cmSystemInfoGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 47, 3, 2, 1)).setObjects(("CISCO-MODEM-MGMT-MIB", "cmSystemInstalledModem"), ("CISCO-MODEM-MGMT-MIB", "cmSystemConfiguredGroup"), ("CISCO-MODEM-MGMT-MIB", "cmSystemWatchdogTime"), ("CISCO-MODEM-MGMT-MIB", "cmSystemStatusPollTime"), ("CISCO-MODEM-MGMT-MIB", "cmSystemMaxRetries")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cmSystemInfoGroup = cmSystemInfoGroup.setStatus('obsolete') if mibBuilder.loadTexts: cmSystemInfoGroup.setDescription('A collection of objects providing system configuration and status information.') cmGroupInfoGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 47, 3, 2, 2)).setObjects(("CISCO-MODEM-MGMT-MIB", "cmGroupTotalDevices"), ("CISCO-MODEM-MGMT-MIB", "cmPortIndex")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cmGroupInfoGroup = cmGroupInfoGroup.setStatus('current') if mibBuilder.loadTexts: cmGroupInfoGroup.setDescription('A collection of objects providing modem configuration and statistics information for modem groups.') cmLineInfoGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 47, 3, 2, 3)).setObjects(("CISCO-MODEM-MGMT-MIB", "cmInterface"), ("CISCO-MODEM-MGMT-MIB", "cmGroup"), ("CISCO-MODEM-MGMT-MIB", "cmManufacturerID"), ("CISCO-MODEM-MGMT-MIB", "cmProductDetails"), ("CISCO-MODEM-MGMT-MIB", "cmManageable"), ("CISCO-MODEM-MGMT-MIB", "cmState"), ("CISCO-MODEM-MGMT-MIB", "cmDisconnectReason"), ("CISCO-MODEM-MGMT-MIB", "cmCallDirection"), ("CISCO-MODEM-MGMT-MIB", "cmCallDuration"), ("CISCO-MODEM-MGMT-MIB", "cmCallPhoneNumber"), ("CISCO-MODEM-MGMT-MIB", "cmCallerID"), ("CISCO-MODEM-MGMT-MIB", "cmATModePermit"), ("CISCO-MODEM-MGMT-MIB", "cmStatusPolling"), ("CISCO-MODEM-MGMT-MIB", "cmBusyOutRequest"), ("CISCO-MODEM-MGMT-MIB", "cmShutdown"), ("CISCO-MODEM-MGMT-MIB", "cmHoldReset"), ("CISCO-MODEM-MGMT-MIB", "cmBad"), ("CISCO-MODEM-MGMT-MIB", "cmRingNoAnswers"), ("CISCO-MODEM-MGMT-MIB", "cmFailedDialAttempts"), ("CISCO-MODEM-MGMT-MIB", "cmWatchdogTimeouts")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cmLineInfoGroup = cmLineInfoGroup.setStatus('current') if mibBuilder.loadTexts: cmLineInfoGroup.setDescription('A collection of objects providing modem configuration and statistics information for individual modem.') cmManagedLineInfoGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 47, 3, 2, 4)).setObjects(("CISCO-MODEM-MGMT-MIB", "cmModulationSchemeUsed"), ("CISCO-MODEM-MGMT-MIB", "cmProtocolUsed"), ("CISCO-MODEM-MGMT-MIB", "cmTXRate"), ("CISCO-MODEM-MGMT-MIB", "cmRXRate"), ("CISCO-MODEM-MGMT-MIB", "cmTXAnalogSignalLevel"), ("CISCO-MODEM-MGMT-MIB", "cmRXAnalogSignalLevel"), ("CISCO-MODEM-MGMT-MIB", "cmIncomingConnectionFailures"), ("CISCO-MODEM-MGMT-MIB", "cmIncomingConnectionCompletions"), ("CISCO-MODEM-MGMT-MIB", "cmOutgoingConnectionFailures"), ("CISCO-MODEM-MGMT-MIB", "cmOutgoingConnectionCompletions"), ("CISCO-MODEM-MGMT-MIB", "cmNoDialTones"), ("CISCO-MODEM-MGMT-MIB", "cmDialTimeouts"), ("CISCO-MODEM-MGMT-MIB", "cm2400OrLessConnections"), ("CISCO-MODEM-MGMT-MIB", "cm2400To14400Connections"), ("CISCO-MODEM-MGMT-MIB", "cmGreaterThan14400Connections"), ("CISCO-MODEM-MGMT-MIB", "cmNoCarriers"), ("CISCO-MODEM-MGMT-MIB", "cmLinkFailures"), ("CISCO-MODEM-MGMT-MIB", "cmProtocolErrors"), ("CISCO-MODEM-MGMT-MIB", "cmPollingTimeouts"), ("CISCO-MODEM-MGMT-MIB", "cmTotalCallDuration")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cmManagedLineInfoGroup = cmManagedLineInfoGroup.setStatus('deprecated') if mibBuilder.loadTexts: cmManagedLineInfoGroup.setDescription('A collection of objects providing modem configuration and statistics information for individual managed modems.') cmLineSpeedInfoGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 47, 3, 2, 5)).setObjects(("CISCO-MODEM-MGMT-MIB", "cmInitialLineConnections")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cmLineSpeedInfoGroup = cmLineSpeedInfoGroup.setStatus('obsolete') if mibBuilder.loadTexts: cmLineSpeedInfoGroup.setDescription('A collection of objects providing modem configuration and statistics information for individual managed modems.') cmSystemInfoGroupRev1 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 47, 3, 2, 6)).setObjects(("CISCO-MODEM-MGMT-MIB", "cmSystemInstalledModem"), ("CISCO-MODEM-MGMT-MIB", "cmSystemConfiguredGroup"), ("CISCO-MODEM-MGMT-MIB", "cmSystemWatchdogTime"), ("CISCO-MODEM-MGMT-MIB", "cmSystemStatusPollTime"), ("CISCO-MODEM-MGMT-MIB", "cmSystemMaxRetries"), ("CISCO-MODEM-MGMT-MIB", "cmSystemModemsInUse"), ("CISCO-MODEM-MGMT-MIB", "cmSystemModemsAvailable"), ("CISCO-MODEM-MGMT-MIB", "cmSystemModemsUnavailable"), ("CISCO-MODEM-MGMT-MIB", "cmSystemModemsOffline"), ("CISCO-MODEM-MGMT-MIB", "cmSystemModemsDead")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cmSystemInfoGroupRev1 = cmSystemInfoGroupRev1.setStatus('current') if mibBuilder.loadTexts: cmSystemInfoGroupRev1.setDescription('A collection of objects providing system configuration and status information.') cmLineSpeedInfoGroupRev1 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 47, 3, 2, 7)).setObjects(("CISCO-MODEM-MGMT-MIB", "cmInitialLineConnections"), ("CISCO-MODEM-MGMT-MIB", "cmInitialTxLineConnections"), ("CISCO-MODEM-MGMT-MIB", "cmInitialRxLineConnections")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cmLineSpeedInfoGroupRev1 = cmLineSpeedInfoGroupRev1.setStatus('deprecated') if mibBuilder.loadTexts: cmLineSpeedInfoGroupRev1.setDescription('A collection of objects providing modem configuration and statistics information for individual managed modems.') cmManagedLineInfoGroupRev1 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 47, 3, 2, 8)).setObjects(("CISCO-MODEM-MGMT-MIB", "cmModulationSchemeUsed"), ("CISCO-MODEM-MGMT-MIB", "cmProtocolUsed"), ("CISCO-MODEM-MGMT-MIB", "cmTXRate"), ("CISCO-MODEM-MGMT-MIB", "cmRXRate"), ("CISCO-MODEM-MGMT-MIB", "cmTXAnalogSignalLevel"), ("CISCO-MODEM-MGMT-MIB", "cmRXAnalogSignalLevel"), ("CISCO-MODEM-MGMT-MIB", "cmIncomingConnectionFailures"), ("CISCO-MODEM-MGMT-MIB", "cmIncomingConnectionCompletions"), ("CISCO-MODEM-MGMT-MIB", "cmOutgoingConnectionFailures"), ("CISCO-MODEM-MGMT-MIB", "cmOutgoingConnectionCompletions"), ("CISCO-MODEM-MGMT-MIB", "cmNoDialTones"), ("CISCO-MODEM-MGMT-MIB", "cmDialTimeouts"), ("CISCO-MODEM-MGMT-MIB", "cm2400OrLessConnections"), ("CISCO-MODEM-MGMT-MIB", "cm2400To14400Connections"), ("CISCO-MODEM-MGMT-MIB", "cmGreaterThan14400Connections"), ("CISCO-MODEM-MGMT-MIB", "cmNoCarriers"), ("CISCO-MODEM-MGMT-MIB", "cmLinkFailures"), ("CISCO-MODEM-MGMT-MIB", "cmProtocolErrors"), ("CISCO-MODEM-MGMT-MIB", "cmPollingTimeouts"), ("CISCO-MODEM-MGMT-MIB", "cmTotalCallDuration")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cmManagedLineInfoGroupRev1 = cmManagedLineInfoGroupRev1.setStatus('deprecated') if mibBuilder.loadTexts: cmManagedLineInfoGroupRev1.setDescription('A collection of objects providing modem configuration and statistics information for individual managed modems.') cmNotificationConfigGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 47, 3, 2, 9)).setObjects(("CISCO-MODEM-MGMT-MIB", "cmStateNotifyEnable")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cmNotificationConfigGroup = cmNotificationConfigGroup.setStatus('current') if mibBuilder.loadTexts: cmNotificationConfigGroup.setDescription('Objects for configuring the notification behavior of this MIB. ') cmNotificationGroup = NotificationGroup((1, 3, 6, 1, 4, 1, 9, 9, 47, 3, 2, 10)).setObjects(("CISCO-MODEM-MGMT-MIB", "cmStateNotification")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cmNotificationGroup = cmNotificationGroup.setStatus('current') if mibBuilder.loadTexts: cmNotificationGroup.setDescription('The collection of notifications used for monitoring modem status') cmLineSpeedInfoGroupRev2 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 47, 3, 2, 11)).setObjects(("CISCO-MODEM-MGMT-MIB", "cmInitialTxLineConnections"), ("CISCO-MODEM-MGMT-MIB", "cmInitialRxLineConnections")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cmLineSpeedInfoGroupRev2 = cmLineSpeedInfoGroupRev2.setStatus('current') if mibBuilder.loadTexts: cmLineSpeedInfoGroupRev2.setDescription('A collection of objects providing modem configuration and statistics information for individual managed modems.') cmManagedLineInfoGroupRev2 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 47, 3, 2, 12)).setObjects(("CISCO-MODEM-MGMT-MIB", "cmModulationSchemeUsed"), ("CISCO-MODEM-MGMT-MIB", "cmProtocolUsed"), ("CISCO-MODEM-MGMT-MIB", "cmTXRate"), ("CISCO-MODEM-MGMT-MIB", "cmRXRate"), ("CISCO-MODEM-MGMT-MIB", "cmTXAnalogSignalLevel"), ("CISCO-MODEM-MGMT-MIB", "cmRXAnalogSignalLevel"), ("CISCO-MODEM-MGMT-MIB", "cmIncomingConnectionFailures"), ("CISCO-MODEM-MGMT-MIB", "cmIncomingConnectionCompletions"), ("CISCO-MODEM-MGMT-MIB", "cmOutgoingConnectionFailures"), ("CISCO-MODEM-MGMT-MIB", "cmOutgoingConnectionCompletions"), ("CISCO-MODEM-MGMT-MIB", "cmNoDialTones"), ("CISCO-MODEM-MGMT-MIB", "cmDialTimeouts"), ("CISCO-MODEM-MGMT-MIB", "cmNoCarriers"), ("CISCO-MODEM-MGMT-MIB", "cmLinkFailures"), ("CISCO-MODEM-MGMT-MIB", "cmProtocolErrors"), ("CISCO-MODEM-MGMT-MIB", "cmPollingTimeouts"), ("CISCO-MODEM-MGMT-MIB", "cmTotalCallDuration")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cmManagedLineInfoGroupRev2 = cmManagedLineInfoGroupRev2.setStatus('current') if mibBuilder.loadTexts: cmManagedLineInfoGroupRev2.setDescription('A collection of objects providing modem configuration and statistics information for individual managed modems.') mibBuilder.exportSymbols("CISCO-MODEM-MGMT-MIB", cmSlotIndex=cmSlotIndex, cmSystemConfiguredGroup=cmSystemConfiguredGroup, cmManageable=cmManageable, cmManufacturerID=cmManufacturerID, cmTXRate=cmTXRate, cmSystemInfoGroup=cmSystemInfoGroup, cmGroupMemberEntry=cmGroupMemberEntry, cmCallPhoneNumber=cmCallPhoneNumber, cmSystemWatchdogTime=cmSystemWatchdogTime, cmTotalCallDuration=cmTotalCallDuration, ciscoModemMgmtMIBComplianceRev5=ciscoModemMgmtMIBComplianceRev5, cmGroup=cmGroup, cmIncomingConnectionCompletions=cmIncomingConnectionCompletions, cmDialTimeouts=cmDialTimeouts, cmManagedLineInfoGroupRev2=cmManagedLineInfoGroupRev2, cmSystemStatusPollTime=cmSystemStatusPollTime, cmManagedLineInfoGroupRev1=cmManagedLineInfoGroupRev1, cmInitialRxLineConnections=cmInitialRxLineConnections, ciscoModemMgmtMIB=ciscoModemMgmtMIB, cmOutgoingConnectionFailures=cmOutgoingConnectionFailures, cmSystemModemsUnavailable=cmSystemModemsUnavailable, cmNotificationConfig=cmNotificationConfig, cmPollingTimeouts=cmPollingTimeouts, ciscoModemMgmtMIBComplianceRev1=ciscoModemMgmtMIBComplianceRev1, cmNotificationConfigGroup=cmNotificationConfigGroup, cmSystemInstalledModem=cmSystemInstalledModem, cmLineSpeedStatisticsTable=cmLineSpeedStatisticsTable, cmShutdown=cmShutdown, cmPortIndex=cmPortIndex, cmProtocolErrors=cmProtocolErrors, cmLineSpeedInfoGroup=cmLineSpeedInfoGroup, cmLineSpeedStatisticsEntry=cmLineSpeedStatisticsEntry, ciscoModemMgmtMIBCompliances=ciscoModemMgmtMIBCompliances, cmState=cmState, ciscoModemMgmtMIBComplianceRev3=ciscoModemMgmtMIBComplianceRev3, cmCallDirection=cmCallDirection, cmGreaterThan14400Connections=cmGreaterThan14400Connections, cmLineInfo=cmLineInfo, cmCallDuration=cmCallDuration, cm2400OrLessConnections=cm2400OrLessConnections, cmGroupInfoGroup=cmGroupInfoGroup, cmMIBNotifications=cmMIBNotifications, cmFailedDialAttempts=cmFailedDialAttempts, ciscoModemMgmtMIBComplianceRev6=ciscoModemMgmtMIBComplianceRev6, cmGroupInfo=cmGroupInfo, cmInterface=cmInterface, cmGroupTotalDevices=cmGroupTotalDevices, cmSystemInfoGroupRev1=cmSystemInfoGroupRev1, cmHoldReset=cmHoldReset, cmLineConfigEntry=cmLineConfigEntry, cmATModePermit=cmATModePermit, cmLineStatisticsTable=cmLineStatisticsTable, cmWatchdogTimeouts=cmWatchdogTimeouts, cmInitialLineSpeed=cmInitialLineSpeed, cmRingNoAnswers=cmRingNoAnswers, cmSystemModemsAvailable=cmSystemModemsAvailable, cmTXAnalogSignalLevel=cmTXAnalogSignalLevel, ciscoModemMgmtMIBCompliance=ciscoModemMgmtMIBCompliance, cmOutgoingConnectionCompletions=cmOutgoingConnectionCompletions, cmRXAnalogSignalLevel=cmRXAnalogSignalLevel, cmLineStatusTable=cmLineStatusTable, cmIncomingConnectionFailures=cmIncomingConnectionFailures, cmGroupIndex=cmGroupIndex, cmLineConfigTable=cmLineConfigTable, ciscoModemMgmtMIBObjects=ciscoModemMgmtMIBObjects, cmSystemModemsOffline=cmSystemModemsOffline, cmInitialTxLineConnections=cmInitialTxLineConnections, cmLineStatisticsEntry=cmLineStatisticsEntry, cmDisconnectReason=cmDisconnectReason, cmProductDetails=cmProductDetails, cmProtocolUsed=cmProtocolUsed, cmBusyOutRequest=cmBusyOutRequest, ciscoModemMgmtMIBComplianceRev4=ciscoModemMgmtMIBComplianceRev4, cmStateNotification=cmStateNotification, cmManagedLineInfoGroup=cmManagedLineInfoGroup, cmNotificationGroup=cmNotificationGroup, cmGroupTable=cmGroupTable, cmStatusPolling=cmStatusPolling, cmNoCarriers=cmNoCarriers, ciscoModemMgmtMIBComplianceRev2=ciscoModemMgmtMIBComplianceRev2, cmNoDialTones=cmNoDialTones, cmSystemInfo=cmSystemInfo, cmLinkFailures=cmLinkFailures, cmCallerID=cmCallerID, ciscoModemMgmtMIBConformance=ciscoModemMgmtMIBConformance, cmLineSpeedInfoGroupRev2=cmLineSpeedInfoGroupRev2, cmSystemModemsInUse=cmSystemModemsInUse, cmSystemModemsDead=cmSystemModemsDead, cmGroupMemberTable=cmGroupMemberTable, cmLineStatusEntry=cmLineStatusEntry, cm2400To14400Connections=cm2400To14400Connections, cmInitialLineConnections=cmInitialLineConnections, cmLineInfoGroup=cmLineInfoGroup, cmRXRate=cmRXRate, cmModulationSchemeUsed=cmModulationSchemeUsed, PYSNMP_MODULE_ID=ciscoModemMgmtMIB, cmBad=cmBad, ciscoModemMgmtMIBGroups=ciscoModemMgmtMIBGroups, cmStateNotifyEnable=cmStateNotifyEnable, cmSystemMaxRetries=cmSystemMaxRetries, cmGroupEntry=cmGroupEntry, cmLineSpeedInfoGroupRev1=cmLineSpeedInfoGroupRev1, cmMIBNotificationPrefix=cmMIBNotificationPrefix)
(octet_string, integer, object_identifier) = mibBuilder.importSymbols('ASN1', 'OctetString', 'Integer', 'ObjectIdentifier') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (single_value_constraint, constraints_union, value_range_constraint, constraints_intersection, value_size_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'SingleValueConstraint', 'ConstraintsUnion', 'ValueRangeConstraint', 'ConstraintsIntersection', 'ValueSizeConstraint') (cisco_mgmt,) = mibBuilder.importSymbols('CISCO-SMI', 'ciscoMgmt') (interface_index,) = mibBuilder.importSymbols('IF-MIB', 'InterfaceIndex') (object_group, notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'ObjectGroup', 'NotificationGroup', 'ModuleCompliance') (unsigned32, gauge32, counter32, module_identity, notification_type, counter64, mib_identifier, iso, ip_address, time_ticks, bits, integer32, object_identity, mib_scalar, mib_table, mib_table_row, mib_table_column) = mibBuilder.importSymbols('SNMPv2-SMI', 'Unsigned32', 'Gauge32', 'Counter32', 'ModuleIdentity', 'NotificationType', 'Counter64', 'MibIdentifier', 'iso', 'IpAddress', 'TimeTicks', 'Bits', 'Integer32', 'ObjectIdentity', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn') (textual_convention, display_string, truth_value) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString', 'TruthValue') cisco_modem_mgmt_mib = module_identity((1, 3, 6, 1, 4, 1, 9, 9, 47)) ciscoModemMgmtMIB.setRevisions(('2005-12-06 00:00', '2001-12-01 12:00', '2001-10-01 12:00', '2000-04-01 00:00', '1998-12-16 00:00', '1998-06-18 00:00', '1997-12-22 00:00', '1997-10-13 00:00', '1997-07-18 00:00', '1998-03-09 00:00', '1997-12-16 00:00', '1997-05-01 00:00', '1997-04-29 00:00', '1997-06-11 00:00', '1997-03-21 00:00', '1997-03-17 00:00', '1996-01-11 00:00')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: ciscoModemMgmtMIB.setRevisionsDescriptions(('Imported Unsigned32 from SNMPv2-SMI instead of CISCO-TC', 'Added one more comment for cmTXAnalogSignalLevel', 'General cleanup', 'Added cmStateNotification and cmStateNotifyEnable', 'Added cmTotalCallDuration', 'Added the new enum values for cmDisconnectReason', 'Changed the modulation from v27 to v29.', 'Added new compliance statement for as5300 and c3600.', 'Added new MIB variables cmInitialTxLineConnections and cmInitialRxLineConnections', 'Added the new enum values v90 and v27ter for cmModulationSchemeUsed.', 'Changed the modulation from v27 to v29.', 'Added objects: cmSystemModemsInUse cmSystemModemsAvailable cmSystemModemsUnavailable cmSystemModemsOffline cmSystemModemsDead', 'Changed the modulation from v29 to v27.', 'DEFVAL update for cmSystemWatchdogTime,cmSystemStatusPollTime.', 'New enum values added for cmModulationSchemeUsed.', 'New enum values added for cmDisconnectReason.', 'Initial version of this MIB module.')) if mibBuilder.loadTexts: ciscoModemMgmtMIB.setLastUpdated('200512060000Z') if mibBuilder.loadTexts: ciscoModemMgmtMIB.setOrganization('Cisco Systems, Inc.') if mibBuilder.loadTexts: ciscoModemMgmtMIB.setContactInfo(' Cisco Systems Customer Service Postal: 170 W Tasman Drive San Jose, CA 95134 USA Tel: +1 800 553-NETS E-mail: cs-snmp@cisco.com') if mibBuilder.loadTexts: ciscoModemMgmtMIB.setDescription('This MIB module provides modem call related data for tracking the progress and status of a call.') cisco_modem_mgmt_mib_objects = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 47, 1)) cm_system_info = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 1)) cm_group_info = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 2)) cm_line_info = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3)) cm_notification_config = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 4)) cm_system_installed_modem = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 1, 1), gauge32()).setUnits('modems').setMaxAccess('readonly') if mibBuilder.loadTexts: cmSystemInstalledModem.setStatus('current') if mibBuilder.loadTexts: cmSystemInstalledModem.setDescription('The actual number of modems that are currently installed within this system.') cm_system_configured_group = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 1, 2), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cmSystemConfiguredGroup.setStatus('current') if mibBuilder.loadTexts: cmSystemConfiguredGroup.setDescription('The actual number of modem groups that are currently configured within this system. Maximum value for this object is cmSystemInstalledModem.') cm_system_watchdog_time = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 1, 3), integer32().clone(6)).setUnits('minutes').setMaxAccess('readwrite') if mibBuilder.loadTexts: cmSystemWatchdogTime.setStatus('current') if mibBuilder.loadTexts: cmSystemWatchdogTime.setDescription('A passive software watchdog timer value will be used to recover a modem which enters into an unexpected state and hangs. When this watch dog timer times out, the modem associated Call Processing state will be set back to IDLE, all related TDM paths will be restored to default configurations, and all of call processing related actions will stop for the modem.') cm_system_status_poll_time = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(2, 120)).clone(12)).setUnits('seconds').setMaxAccess('readwrite') if mibBuilder.loadTexts: cmSystemStatusPollTime.setStatus('current') if mibBuilder.loadTexts: cmSystemStatusPollTime.setDescription('The ideal time interval between modem status polling via the out of band management port.') cm_system_max_retries = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(0, 10)).clone(3)).setMaxAccess('readwrite') if mibBuilder.loadTexts: cmSystemMaxRetries.setStatus('current') if mibBuilder.loadTexts: cmSystemMaxRetries.setDescription('A reply event is expected to be received for every message sent to the modem through the out of band management port. If an expected reply event is not received, the message will be sent to the modem again. This object specifies the maximum number of retries that should be executed.') cm_system_modems_in_use = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 1, 6), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cmSystemModemsInUse.setStatus('current') if mibBuilder.loadTexts: cmSystemModemsInUse.setDescription('The number of modems in the system that are in the following states: connected, offHook, loopback, or downloadFirmware.') cm_system_modems_available = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 1, 7), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cmSystemModemsAvailable.setStatus('current') if mibBuilder.loadTexts: cmSystemModemsAvailable.setDescription('The number of modems in the system that are onHook. That is, they are ready to accept a call.') cm_system_modems_unavailable = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 1, 8), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cmSystemModemsUnavailable.setStatus('current') if mibBuilder.loadTexts: cmSystemModemsUnavailable.setDescription('The number of modems in the system that cannot accept calls. They are in a state other than onHook.') cm_system_modems_offline = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 1, 9), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cmSystemModemsOffline.setStatus('current') if mibBuilder.loadTexts: cmSystemModemsOffline.setDescription('The number of modems in the system, which have been held administratively offline') cm_system_modems_dead = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 1, 10), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cmSystemModemsDead.setStatus('current') if mibBuilder.loadTexts: cmSystemModemsDead.setDescription('The number of modems in the system with the state bad or downloadFirmwareFailed.') cm_group_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 2, 1)) if mibBuilder.loadTexts: cmGroupTable.setStatus('current') if mibBuilder.loadTexts: cmGroupTable.setDescription('Table of descriptive and status information about the groups of modems.') cm_group_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 2, 1, 1)).setIndexNames((0, 'CISCO-MODEM-MGMT-MIB', 'cmGroupIndex')) if mibBuilder.loadTexts: cmGroupEntry.setStatus('current') if mibBuilder.loadTexts: cmGroupEntry.setDescription('An entry in the table, containing information about a single group of modems.') cm_group_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 2, 1, 1, 1), unsigned32()) if mibBuilder.loadTexts: cmGroupIndex.setStatus('current') if mibBuilder.loadTexts: cmGroupIndex.setDescription('This object identifies the group containing the modems for which this entry contains information.') cm_group_total_devices = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 2, 1, 1, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cmGroupTotalDevices.setStatus('current') if mibBuilder.loadTexts: cmGroupTotalDevices.setDescription('The total number of modem devices which are configured in the group.') cm_group_member_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 2, 2)) if mibBuilder.loadTexts: cmGroupMemberTable.setStatus('current') if mibBuilder.loadTexts: cmGroupMemberTable.setDescription('Table of information about the modem members in modem groups.') cm_group_member_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 2, 2, 1)).setIndexNames((0, 'CISCO-MODEM-MGMT-MIB', 'cmGroupIndex'), (0, 'CISCO-MODEM-MGMT-MIB', 'cmSlotIndex'), (0, 'CISCO-MODEM-MGMT-MIB', 'cmPortIndex')) if mibBuilder.loadTexts: cmGroupMemberEntry.setStatus('current') if mibBuilder.loadTexts: cmGroupMemberEntry.setDescription("An entry in the table, containing information about modem members in a group. The modem groups are currently created when an associated Async interface groups are configured via CLI command 'interface group-async' and not via SNMP.") cm_slot_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 2, 2, 1, 1), unsigned32()) if mibBuilder.loadTexts: cmSlotIndex.setStatus('current') if mibBuilder.loadTexts: cmSlotIndex.setDescription('The modem feature card slot number in the group.') cm_port_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 2, 2, 1, 2), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cmPortIndex.setStatus('current') if mibBuilder.loadTexts: cmPortIndex.setDescription('The modem port number of a modem feature card in the group.') cm_line_status_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 1)) if mibBuilder.loadTexts: cmLineStatusTable.setStatus('current') if mibBuilder.loadTexts: cmLineStatusTable.setDescription('A collection of objects that describe the status of the modem.') cm_line_status_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 1, 1)).setIndexNames((0, 'CISCO-MODEM-MGMT-MIB', 'cmSlotIndex'), (0, 'CISCO-MODEM-MGMT-MIB', 'cmPortIndex')) if mibBuilder.loadTexts: cmLineStatusEntry.setStatus('current') if mibBuilder.loadTexts: cmLineStatusEntry.setDescription('An entry in the table, containing status information about a single modem.') cm_interface = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 1, 1, 1), interface_index()).setMaxAccess('readonly') if mibBuilder.loadTexts: cmInterface.setStatus('current') if mibBuilder.loadTexts: cmInterface.setDescription('The interface that this modem is connected.') cm_group = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 1, 1, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cmGroup.setStatus('current') if mibBuilder.loadTexts: cmGroup.setDescription('The modem group number that the modem may be in.') cm_manufacturer_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 1, 1, 3), display_string().subtype(subtypeSpec=value_size_constraint(0, 79))).setMaxAccess('readonly') if mibBuilder.loadTexts: cmManufacturerID.setStatus('current') if mibBuilder.loadTexts: cmManufacturerID.setDescription("A textual description to identify the modem, including the manufacturer's name and type of modem.") cm_product_details = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 1, 1, 4), display_string().subtype(subtypeSpec=value_size_constraint(0, 79))).setMaxAccess('readonly') if mibBuilder.loadTexts: cmProductDetails.setStatus('current') if mibBuilder.loadTexts: cmProductDetails.setDescription('A textual description of the modem, including hardware revision number, firmware revision number, feature set and optionally, its serial number.') cm_manageable = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 1, 1, 5), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: cmManageable.setStatus('current') if mibBuilder.loadTexts: cmManageable.setDescription('The Manageable modem allows to be accessed through the out of band management port in which the modem statistic data can be retrieved, and the Direct Connect session can be used to provide the test and debugging ability. This object specifies whether this modem is a Manageable modem.') cm_state = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 1, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10))).clone(namedValues=named_values(('unknown', 1), ('onHook', 2), ('offHook', 3), ('connected', 4), ('busiedOut', 5), ('disabled', 6), ('bad', 7), ('loopback', 8), ('downloadFirmware', 9), ('downloadFirmwareFailed', 10)))).setMaxAccess('readonly') if mibBuilder.loadTexts: cmState.setStatus('current') if mibBuilder.loadTexts: cmState.setDescription("Indicates the current state of modem. The meaning of each state code is explained below: unknown: the current state of the modem is unknown. onHook: the condition similar to hanging up a telephone receiver. The call cannot enter a connected state when the modem is onHook. offHook: The condition similar to picking up a telephone receiver to dial or answer a call. connected: The modem is in a state when it can transmit or receive data over the communications line. busiedOut: The modem is busied out (i.e. taken out of service) and cannot make outgoing calls or receive incoming calls. disabled: The modem is in a reset state and non-functional. This state can be set and clear via cmHoldReset. bad: The modem is suspected or proven to be bad. The operator can take the modem out of service and mark the modem as 'bad' via cmBad. loopback: The modem is in a state where it is currently running back-to-back loopback testing. downloadFirmware: The modem is in a state where it is currently downloading the firmware. downloadFirmwareFailed: The modem is not operational because the downloading of firmware to it has failed.") cm_call_direction = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 1, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('incoming', 1), ('outgoing', 2), ('none', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: cmCallDirection.setStatus('current') if mibBuilder.loadTexts: cmCallDirection.setDescription('The modem can be used either as an incoming call or outgoing call. This object specifies the direction of the current or previous call.') cm_disconnect_reason = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 1, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103))).clone(namedValues=named_values(('unknown', 1), ('lostCarrier', 2), ('noCarrier', 3), ('noDialTone', 4), ('busy', 5), ('modemWatchdogTimeout', 6), ('dtrDrop', 7), ('userHangup', 8), ('compressionProblem', 9), ('retrainFailure', 10), ('remoteLinkDisconnect', 11), ('abort', 12), ('inactivityTimeout', 13), ('dialStringError', 14), ('linkFailure', 15), ('modulationError', 16), ('dialTimeout', 17), ('remoteHangup', 18), ('mnp10ProtocolError', 19), ('lapmProtocolError', 20), ('faxClass2Error', 21), ('trainupFailure', 22), ('fallbackTerminate', 23), ('excessiveEC', 24), ('hostDrop', 25), ('terminate', 26), ('autoLogonError', 27), ('ccpNotSeen', 28), ('callbackFailed', 29), ('blacklist', 30), ('lapmTimeout', 31), ('reliableLinkTxTimeout', 32), ('dspAccessFailure', 33), ('cdOffTimeout', 34), ('codewordSizeMismatch', 35), ('dspDownloadFailure', 36), ('modemDrNone', 37), ('modemDrSoftwareReset', 38), ('modemDrEcTerminated', 39), ('modemDrBadMnp5Rxdata', 40), ('modemDrBadV42bisRxdata', 41), ('modemDrBadCopState', 42), ('modemDrAth', 43), ('modemDrAborted', 44), ('modemDrConnectTimeout', 45), ('modemDrResetDsp', 46), ('modemDrNoCarrier', 47), ('modemDrNoAbtDetected', 48), ('modemDrTrainupFailure', 49), ('modemDrRetrainLimit', 50), ('modemDrAbtEndFailure', 51), ('modemDrNoLr', 52), ('modemDrLrParam1', 53), ('modemDrLrIncompat', 54), ('modemDrRetransmitLimit', 55), ('modemDrInactivity', 56), ('modemDrProtocolError', 57), ('modemDrFallbackTerminate', 58), ('modemDrNoXid', 59), ('modemDrXidIncompat', 60), ('modemDrDisc', 61), ('modemDrDm', 62), ('modemDrBadNr', 63), ('modemDrSabmeOnline', 64), ('modemDrXidOnline', 65), ('modemDrLrOnline', 66), ('modemDrBadCmnd', 67), ('modemDrFrmrBadCmnd', 68), ('modemDrFrmrData', 69), ('modemDrFrmrLength', 70), ('modemDrFrmrBadNr', 71), ('modemDrLdNoLr', 72), ('modemDrLdLrParam1', 73), ('modemDrLdLrIncompat', 74), ('modemDrLdRetransLimit', 75), ('modemDrLdInactivity', 76), ('modemDrLdProtocol', 77), ('modemDrLdUser', 78), ('modemDrHostNonspecific', 79), ('modemDrHostBusy', 80), ('modemDrHostNoAnswer', 81), ('modemDrHostDtr', 82), ('modemDrHostAth', 83), ('modemDrHostNoDialtone', 84), ('modemDrHostNoCarrier', 85), ('modemDrHostAck', 86), ('modemDrMohClrd', 87), ('modemDrMohTimeout', 88), ('modemDrCotAck', 89), ('modemDrCotNak1', 90), ('modemDrCotNak2', 91), ('modemDrCotOff', 92), ('modemDrCotTimeout', 93), ('modemDrDcIllegalCodewordStepup', 94), ('modemDrDcIllegalTokenEmptyNode', 95), ('modemDrDcIllegalTokenTooLarge', 96), ('modemDrDcReservedCommand', 97), ('modemDrDcIllegalCharacterSizeStepup', 98), ('modemDrDcRxDictionaryFull', 99), ('modemDrDcRxHistoryFull', 100), ('modemDrDcRxStringSizeExceeded', 101), ('modemDrDcNegotiationError', 102), ('modemDrDcCompressionError', 103)))).setMaxAccess('readonly') if mibBuilder.loadTexts: cmDisconnectReason.setStatus('current') if mibBuilder.loadTexts: cmDisconnectReason.setDescription('Indicates the reason that the last connection or call attempt disconnected. The meaning of each reason code is explained below: unknown: the failure reason is unknown or there has been no previous call. lostCarrier: the call was disconnected because the loss of carrier. noCarrier: the dial out attempt has failed because the modem detects no carrier. noDialTone: the dial out attempt has failed because the modem failed to detect a dial tone. busy: the call attempt failed because the modem detected a busy signal. modemWatchdogTimeout: the modem internal watchdog timer has expired. dtrDrop: DTR has been turned off while the modem is to disconnect on DTR drop. userHangup: normal disconnect where the user hangs up call. compressionProblem: the call is disconnected due to a problem detected during compression in the modem. retrainFailure: the modem did not successfully train and reach data mode on the previous connections. remoteLinkDisconnect: the remote link disconnected the connection. abort: the call was aborted. inactivityTimeout: the modem automatically hangs up because data is not sent or received within the inactivity time out. dialStringError: the dialed phone number is invalid. linkFailure: the modem detects a link failure. modulationError: the modem detects a modulation error. dialTimeout: the modem times out while attempting to dial. remoteHangup: the remote side hangs up the connection. mnp10ProtocolError: MNP10 Protocol Error. lapmProtocolError: LAPM Protocol Error. faxClass2Error: Fax Class 2 Error. trainupFailure: failure to trainup with a remote peer. fallbackTerminate: User has EC fallback set to disconnect. excessiveEC: Link loss due to excessive EC retransmissions. EC packet transmit limit exceeded. hostDrop: Host initiated link drop. terminate: Lost Carrier Microcom HDMS product relating to password security issues. autoLogonError: An autologon sequence did not complete successfully. ccpNotSeen: The Credit Card Prompt was not detected. callbackFailed: Applies to leased line connection. If after a switched line dialback due to a leased line connection failure, the switched line connection also fails and a connection can still not be made on the leased line, a disconnect occurs with this reason set. blacklist: In coutries that support blacklisting, an attempt was made to go off hook with a null dial string (ATD). lapmTimeout: Timed out waiting for a reply from remote. reliableLinkTxTimeout: Have not received the link acknowledgement in the first 30 seconds of the connection. dspAccessFailure: Timed out trying to access the DSP chip. cdOffTimeout: Timed out waiting for carrier to return after a retrain or rate renegotiation. codewordSizeMismatch: The codeword size are mismatched. dspDownloadFailure: Error during the DSP code download. The time taken to recover and repeat the download would take too long to complete the handshake.') cm_call_duration = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 1, 1, 9), time_ticks()).setMaxAccess('readonly') if mibBuilder.loadTexts: cmCallDuration.setStatus('current') if mibBuilder.loadTexts: cmCallDuration.setDescription('This object specifies the call duration of the current or previous call.') cm_call_phone_number = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 1, 1, 10), display_string().subtype(subtypeSpec=value_size_constraint(0, 64))).setMaxAccess('readonly') if mibBuilder.loadTexts: cmCallPhoneNumber.setStatus('current') if mibBuilder.loadTexts: cmCallPhoneNumber.setDescription('The dialed outgoing telephone number of the current or previous call.') cm_caller_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 1, 1, 11), display_string().subtype(subtypeSpec=value_size_constraint(0, 64))).setMaxAccess('readonly') if mibBuilder.loadTexts: cmCallerID.setStatus('current') if mibBuilder.loadTexts: cmCallerID.setDescription('The incoming caller identification of the current or previous call if this entry is not in the connected state.') cm_modulation_scheme_used = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 1, 1, 12), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21))).clone(namedValues=named_values(('unknown', 1), ('bell103a', 2), ('bell212a', 3), ('v21', 4), ('v22', 5), ('v22bis', 6), ('v32', 7), ('v32bis', 8), ('vfc', 9), ('v34', 10), ('v17', 11), ('v29', 12), ('v33', 13), ('k56flex', 14), ('v23', 15), ('v32terbo', 16), ('v34plus', 17), ('v90', 18), ('v27ter', 19), ('v110', 20), ('piafs', 21)))).setMaxAccess('readonly') if mibBuilder.loadTexts: cmModulationSchemeUsed.setStatus('current') if mibBuilder.loadTexts: cmModulationSchemeUsed.setDescription('The modem modulation scheme used in the current or previous call. This object is valid only for modems which have cmManageable to be true.') cm_protocol_used = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 1, 1, 13), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9))).clone(namedValues=named_values(('normal', 1), ('direct', 2), ('reliableMNP', 3), ('reliableLAPM', 4), ('syncMode', 5), ('asyncMode', 6), ('ara10', 7), ('ara20', 8), ('unknown', 9)))).setMaxAccess('readonly') if mibBuilder.loadTexts: cmProtocolUsed.setStatus('current') if mibBuilder.loadTexts: cmProtocolUsed.setDescription('The modem protocol used in the current or previous call. This object is valid only for modems which have cmManageable to be true.') cm_tx_rate = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 1, 1, 14), gauge32()).setUnits('bits/second').setMaxAccess('readonly') if mibBuilder.loadTexts: cmTXRate.setStatus('current') if mibBuilder.loadTexts: cmTXRate.setDescription('The speed of modem transmit rate of the current or previous call in bits per second. This object is valid only for modems which have cmManageable to be true.') cm_rx_rate = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 1, 1, 15), gauge32()).setUnits('bits/second').setMaxAccess('readonly') if mibBuilder.loadTexts: cmRXRate.setStatus('current') if mibBuilder.loadTexts: cmRXRate.setDescription('The speed of modem receive rate of the current or previous call in bits per second. This object is valid only for modems which have cmManageable to be true.') cm_tx_analog_signal_level = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 1, 1, 16), integer32().subtype(subtypeSpec=constraints_union(value_range_constraint(-43, -9), value_range_constraint(0, 0)))).setUnits('dBm').setMaxAccess('readonly') if mibBuilder.loadTexts: cmTXAnalogSignalLevel.setStatus('current') if mibBuilder.loadTexts: cmTXAnalogSignalLevel.setDescription('The modem transmit analog signal level in the current or previous call. The unit used is in dBm. This object is valid for modems that have cmManageable set to true(1) otherwise 0 will be returned.') cm_rx_analog_signal_level = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 1, 1, 17), integer32().subtype(subtypeSpec=constraints_union(value_range_constraint(-128, -1), value_range_constraint(0, 0)))).setUnits('dBm').setMaxAccess('readonly') if mibBuilder.loadTexts: cmRXAnalogSignalLevel.setStatus('current') if mibBuilder.loadTexts: cmRXAnalogSignalLevel.setDescription('The modem transmit analog signal level in the current or previous call. The unit used is in dBm. This object is valid for modems that have cmManageable set to true(1) otherwise 0 will be returned.') cm_line_config_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 2)) if mibBuilder.loadTexts: cmLineConfigTable.setStatus('current') if mibBuilder.loadTexts: cmLineConfigTable.setDescription('A collection of objects that describe some of the configuration info of the modem.') cm_line_config_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 2, 1)) cmLineStatusEntry.registerAugmentions(('CISCO-MODEM-MGMT-MIB', 'cmLineConfigEntry')) cmLineConfigEntry.setIndexNames(*cmLineStatusEntry.getIndexNames()) if mibBuilder.loadTexts: cmLineConfigEntry.setStatus('current') if mibBuilder.loadTexts: cmLineConfigEntry.setDescription('An entry in the table, containing configuration information about a single modem.') cm_at_mode_permit = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 2, 1, 1), truth_value().clone('true')).setMaxAccess('readwrite') if mibBuilder.loadTexts: cmATModePermit.setStatus('current') if mibBuilder.loadTexts: cmATModePermit.setDescription("Direct Connect session is used for test and debugging purpose by using the modem AT commands through the out of band management port when cmManageable is true. This object specifies whether the Direct Connect session is permitted to be used at this modem. If cmManageable is true(1), Direct Connect session via the out of band port is allowed and false(2) indicates that it isn't allowed for the modem.") cm_status_polling = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 2, 1, 2), truth_value().clone('true')).setMaxAccess('readwrite') if mibBuilder.loadTexts: cmStatusPolling.setStatus('current') if mibBuilder.loadTexts: cmStatusPolling.setDescription('Modem status and events can be polled through the out of band management port when the cmManageable is true. This object specifies whether this status polling feature is enabled at this modem. If cmManageable is true(1), status polling will occur for the modem and false(2) indicates that no status polling will occur.') cm_busy_out_request = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 2, 1, 3), truth_value().clone('false')).setMaxAccess('readwrite') if mibBuilder.loadTexts: cmBusyOutRequest.setStatus('current') if mibBuilder.loadTexts: cmBusyOutRequest.setDescription('This object is used to put modem out of service, i.e. modem cannot make calls or answer calls. If the modem to be busyout is handling a call, the busyout action will be taken after the current call is disconnected. After modem is busyout, the following commands can be applied to those modems - reset, bad modem, download modem firmware, etc. This is called nice or graceful busyout. The value of true(1) indicates the busyOut request has been issued to the modem, but the busyout could be pending. The management entity needs to query the cmState to see if the modem is successfully busied out. The value of false(2) indicates the modem is not given the busyOut command.') cm_shutdown = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 2, 1, 4), truth_value().clone('false')).setMaxAccess('readwrite') if mibBuilder.loadTexts: cmShutdown.setStatus('current') if mibBuilder.loadTexts: cmShutdown.setDescription('This object is used to put modem out of service, i.e. modem cannot make calls or answer calls. This is a hard busyout command to bring the modem out of service immediately without waiting for the call to be ended normally. After modem is shutdown, the following commands can be applied to those modems - reset, bad modem, download modem firmware, etc. The value of true(1) indicates the hard busyout has been issued to the modem. The value of false(2) indicates the modem has not been hard busyout.') cm_hold_reset = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 2, 1, 5), truth_value().clone('false')).setMaxAccess('readwrite') if mibBuilder.loadTexts: cmHoldReset.setStatus('current') if mibBuilder.loadTexts: cmHoldReset.setDescription('A command hold-reset will put the state of modem into reset mode until an inverse command to bring modem out of RESET mode. During the period of reset mode, this modem can not be used and is non-functional. This object is only valid when cmState is onHook, busiedOut, or disabled. The value of true(1) attempts to put the modem in reset mode, and the value of false(2) takes the modem out of reset. This object is not applicable for Mica modems.') cm_bad = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 2, 1, 6), truth_value().clone('false')).setMaxAccess('readwrite') if mibBuilder.loadTexts: cmBad.setStatus('current') if mibBuilder.loadTexts: cmBad.setDescription("This object can hold modem out of service and marks the modem as suspected or proven to be bad. During the router start-up initialization sequence, modem back-to-back tests will test modems and mark those modems failing tests as bad modems. The management entity also can use this command to lock out the suspicious modem or unlock the modem to do further debugging or test. This command will be used accompanied with cmholdReset command to put modem out of service. This command doesn't do the reset. For a normally good modem, it can start handling calls after it exits from modem reset mode. For a bad modem, it cannot start handling calls after it exits from modem reset mode. The manager needs to take modem out of bad modem mode in order to handle calls. This object is only valid when cmState is onHook or busiedOut. The value of true(1) indicates the modem is suspected to be bad and its state is set to bad. The value of false(2) indicates the modem has not been suspected to be bad or has been re-marked as good.") cm_line_statistics_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 3)) if mibBuilder.loadTexts: cmLineStatisticsTable.setStatus('current') if mibBuilder.loadTexts: cmLineStatisticsTable.setDescription('A collection of objects that describe the status of the modem.') cm_line_statistics_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 3, 1)) cmLineStatusEntry.registerAugmentions(('CISCO-MODEM-MGMT-MIB', 'cmLineStatisticsEntry')) cmLineStatisticsEntry.setIndexNames(*cmLineStatusEntry.getIndexNames()) if mibBuilder.loadTexts: cmLineStatisticsEntry.setStatus('current') if mibBuilder.loadTexts: cmLineStatisticsEntry.setDescription('An entry in the table, containing status information about a single modem.') cm_ring_no_answers = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 3, 1, 1), counter32()).setUnits('calls').setMaxAccess('readonly') if mibBuilder.loadTexts: cmRingNoAnswers.setStatus('current') if mibBuilder.loadTexts: cmRingNoAnswers.setDescription('A counter to count the calls that ringing was detected but the call was not answered at this modem.') cm_incoming_connection_failures = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 3, 1, 2), counter32()).setUnits('calls').setMaxAccess('readonly') if mibBuilder.loadTexts: cmIncomingConnectionFailures.setStatus('current') if mibBuilder.loadTexts: cmIncomingConnectionFailures.setDescription('A counter that indicates the number of incoming connection requests that this modem answered in which it could not train with the other DCE. This object is valid only for modems which have cmManageable to be true.') cm_incoming_connection_completions = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 3, 1, 3), counter32()).setUnits('calls').setMaxAccess('readonly') if mibBuilder.loadTexts: cmIncomingConnectionCompletions.setStatus('current') if mibBuilder.loadTexts: cmIncomingConnectionCompletions.setDescription('A counter that indicates the number of incoming connection requests that this modem answered and successfully trained with the other DCE. This object is valid only for modems which have cmManageable to be true.') cm_outgoing_connection_failures = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 3, 1, 4), counter32()).setUnits('calls').setMaxAccess('readonly') if mibBuilder.loadTexts: cmOutgoingConnectionFailures.setStatus('current') if mibBuilder.loadTexts: cmOutgoingConnectionFailures.setDescription('A counter that indicates the number of outgoing calls from this modem which successfully went off hook and dialed, in which it could not train with the other DCE. This object is valid only for modems which have cmManageable to be true.') cm_outgoing_connection_completions = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 3, 1, 5), counter32()).setUnits('calls').setMaxAccess('readonly') if mibBuilder.loadTexts: cmOutgoingConnectionCompletions.setStatus('current') if mibBuilder.loadTexts: cmOutgoingConnectionCompletions.setDescription('A counter that indicates the number of outgoing calls from this modem which resulted in successfully training with the other DCE.This object is valid only for modems which have cmManageable to be true.') cm_failed_dial_attempts = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 3, 1, 6), counter32()).setUnits('calls').setMaxAccess('readonly') if mibBuilder.loadTexts: cmFailedDialAttempts.setStatus('current') if mibBuilder.loadTexts: cmFailedDialAttempts.setDescription("A counter that indicates the number of call attempts that failed because the modem didn't go off hook, or there was no dial tone.") cm_no_dial_tones = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 3, 1, 7), counter32()).setUnits('calls').setMaxAccess('readonly') if mibBuilder.loadTexts: cmNoDialTones.setStatus('current') if mibBuilder.loadTexts: cmNoDialTones.setDescription('A counter that indicates the number of times the dial tone expected but not received. This object is valid only for modems which have cmManageable to be true.') cm_dial_timeouts = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 3, 1, 8), counter32()).setUnits('calls').setMaxAccess('readonly') if mibBuilder.loadTexts: cmDialTimeouts.setStatus('current') if mibBuilder.loadTexts: cmDialTimeouts.setDescription('A counter that indicates the number of times the dial time-out occurred. This object is valid only for modems which have cmManageable to be true.') cm_watchdog_timeouts = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 3, 1, 9), counter32()).setUnits('calls').setMaxAccess('readonly') if mibBuilder.loadTexts: cmWatchdogTimeouts.setStatus('current') if mibBuilder.loadTexts: cmWatchdogTimeouts.setDescription('The number of times the Call Processing watchdog timer has expired.') cm2400_or_less_connections = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 3, 1, 10), counter32()).setUnits('calls').setMaxAccess('readonly') if mibBuilder.loadTexts: cm2400OrLessConnections.setStatus('deprecated') if mibBuilder.loadTexts: cm2400OrLessConnections.setDescription('The number of connections initially established at a modulation speed of 2400 bits per second or less. This object is valid only for modems which have cmManageable to be true.') cm2400_to14400_connections = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 3, 1, 11), counter32()).setUnits('calls').setMaxAccess('readonly') if mibBuilder.loadTexts: cm2400To14400Connections.setStatus('deprecated') if mibBuilder.loadTexts: cm2400To14400Connections.setDescription('The number of connections initially established at a modulation speed of greater than 2400 bits per second and less than 14400 bits per second. This object is valid only for modems which have cmManageable to be true.') cm_greater_than14400_connections = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 3, 1, 12), counter32()).setUnits('calls').setMaxAccess('readonly') if mibBuilder.loadTexts: cmGreaterThan14400Connections.setStatus('deprecated') if mibBuilder.loadTexts: cmGreaterThan14400Connections.setDescription('The number of connections initially established at a modulation speed of greater than 14400 bits per second. This object is valid only for modems which have cmManageable to be true.') cm_no_carriers = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 3, 1, 13), counter32()).setUnits('calls').setMaxAccess('readonly') if mibBuilder.loadTexts: cmNoCarriers.setStatus('current') if mibBuilder.loadTexts: cmNoCarriers.setDescription('A counter that indicates the number of times that the disconnect reason is no carrier. This object is valid only for modems which have cmManageable to be true.') cm_link_failures = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 3, 1, 14), counter32()).setUnits('calls').setMaxAccess('readonly') if mibBuilder.loadTexts: cmLinkFailures.setStatus('current') if mibBuilder.loadTexts: cmLinkFailures.setDescription('A counter that indicates the number of times that the disconnect reason is link failure. This object is valid only for modems which have cmManageable to be true.') cm_protocol_errors = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 3, 1, 15), counter32()).setUnits('errors').setMaxAccess('readonly') if mibBuilder.loadTexts: cmProtocolErrors.setStatus('current') if mibBuilder.loadTexts: cmProtocolErrors.setDescription('A counter that indicates the number of times that the out of band protocol error occurred. This object is valid only for modems which have cmManageable to be true.') cm_polling_timeouts = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 3, 1, 16), counter32()).setUnits('errors').setMaxAccess('readonly') if mibBuilder.loadTexts: cmPollingTimeouts.setStatus('current') if mibBuilder.loadTexts: cmPollingTimeouts.setDescription('A counter that indicates the number of times that the out of band protocol time-out error occurred. This object is valid only for modems which have cmManageable to be true.') cm_total_call_duration = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 3, 1, 17), counter32()).setUnits('seconds').setMaxAccess('readonly') if mibBuilder.loadTexts: cmTotalCallDuration.setStatus('current') if mibBuilder.loadTexts: cmTotalCallDuration.setDescription('A counter that indicates total call duration on the modem. This includes the duration of all previous calls.') cm_line_speed_statistics_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 4)) if mibBuilder.loadTexts: cmLineSpeedStatisticsTable.setStatus('current') if mibBuilder.loadTexts: cmLineSpeedStatisticsTable.setDescription('A collection of objects that describe the intial modem line speeds and connections') cm_line_speed_statistics_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 4, 1)).setIndexNames((0, 'CISCO-MODEM-MGMT-MIB', 'cmSlotIndex'), (0, 'CISCO-MODEM-MGMT-MIB', 'cmPortIndex'), (0, 'CISCO-MODEM-MGMT-MIB', 'cmInitialLineSpeed')) if mibBuilder.loadTexts: cmLineSpeedStatisticsEntry.setStatus('current') if mibBuilder.loadTexts: cmLineSpeedStatisticsEntry.setDescription('An entry in the table, containing initial speed and connection information about a single modem.') cm_initial_line_speed = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 4, 1, 1), unsigned32()) if mibBuilder.loadTexts: cmInitialLineSpeed.setStatus('current') if mibBuilder.loadTexts: cmInitialLineSpeed.setDescription('A discrete initial speed at which the given line may operate') cm_initial_line_connections = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 4, 1, 2), counter32()).setUnits('calls').setMaxAccess('readonly') if mibBuilder.loadTexts: cmInitialLineConnections.setStatus('deprecated') if mibBuilder.loadTexts: cmInitialLineConnections.setDescription('The number of connections initially established at a given modulation speed. An instance of this object will be only present for those speeds where one or more connections have occurred') cm_initial_tx_line_connections = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 4, 1, 3), counter32()).setUnits('calls').setMaxAccess('readonly') if mibBuilder.loadTexts: cmInitialTxLineConnections.setStatus('current') if mibBuilder.loadTexts: cmInitialTxLineConnections.setDescription('The number of Transmit connections initially established at a given modulation speed. An instance of this object will be only present for those speeds where one or more connections have occurred') cm_initial_rx_line_connections = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 3, 4, 1, 4), counter32()).setUnits('calls').setMaxAccess('readonly') if mibBuilder.loadTexts: cmInitialRxLineConnections.setStatus('current') if mibBuilder.loadTexts: cmInitialRxLineConnections.setDescription('The number of Receive connections initially established at a given modulation speed. An instance of this object will be only present for those speeds where one or more connections have occurred') cm_state_notify_enable = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 47, 1, 4, 1), truth_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: cmStateNotifyEnable.setStatus('current') if mibBuilder.loadTexts: cmStateNotifyEnable.setDescription("This variable controls generation of the cmStateNotification. When this variable is 'true(1)', generation of cmStateNotification is enabled. When this variable is 'false(2)', generation of cmStateNotification is disabled. The default value is 'false(2)'. ") cm_mib_notification_prefix = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 47, 2)) cm_mib_notifications = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 47, 2, 0)) cm_state_notification = notification_type((1, 3, 6, 1, 4, 1, 9, 9, 47, 2, 0, 1)).setObjects(('CISCO-MODEM-MGMT-MIB', 'cmState')) if mibBuilder.loadTexts: cmStateNotification.setStatus('current') if mibBuilder.loadTexts: cmStateNotification.setDescription('A modem port state change notification is generated whenever the port transitions to a state where it is offline due to a failure or administrative action. The values of cmState which will trigger this notification are: busiedOut(5) - Administratively out of service disabled(6) - Administratively out of service bad(7) - Internally detected failure or administrative action loopback(8) - Testing downloadFirmware(9) - Administrative action downloadFirmwareFailed(10) - Internally detected failure ') cisco_modem_mgmt_mib_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 47, 3)) cisco_modem_mgmt_mib_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 47, 3, 1)) cisco_modem_mgmt_mib_groups = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 47, 3, 2)) cisco_modem_mgmt_mib_compliance = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 47, 3, 1, 1)).setObjects(('CISCO-MODEM-MGMT-MIB', 'cmSystemInfoGroup'), ('CISCO-MODEM-MGMT-MIB', 'cmLineInfoGroup'), ('CISCO-MODEM-MGMT-MIB', 'cmGroupInfoGroup'), ('CISCO-MODEM-MGMT-MIB', 'cmManagedLineInfoGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_modem_mgmt_mib_compliance = ciscoModemMgmtMIBCompliance.setStatus('obsolete') if mibBuilder.loadTexts: ciscoModemMgmtMIBCompliance.setDescription('The compliance statement for entities which implement the cisco Modem Management MIB') cisco_modem_mgmt_mib_compliance_rev1 = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 47, 3, 1, 2)).setObjects(('CISCO-MODEM-MGMT-MIB', 'cmSystemInfoGroup'), ('CISCO-MODEM-MGMT-MIB', 'cmLineInfoGroup'), ('CISCO-MODEM-MGMT-MIB', 'cmGroupInfoGroup'), ('CISCO-MODEM-MGMT-MIB', 'cmManagedLineInfoGroup'), ('CISCO-MODEM-MGMT-MIB', 'cmLineSpeedInfoGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_modem_mgmt_mib_compliance_rev1 = ciscoModemMgmtMIBComplianceRev1.setStatus('obsolete') if mibBuilder.loadTexts: ciscoModemMgmtMIBComplianceRev1.setDescription('The compliance statement for entities which implement the cisco Modem Management MIB') cisco_modem_mgmt_mib_compliance_rev2 = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 47, 3, 1, 3)).setObjects(('CISCO-MODEM-MGMT-MIB', 'cmSystemInfoGroupRev1'), ('CISCO-MODEM-MGMT-MIB', 'cmLineInfoGroup'), ('CISCO-MODEM-MGMT-MIB', 'cmGroupInfoGroup'), ('CISCO-MODEM-MGMT-MIB', 'cmManagedLineInfoGroup'), ('CISCO-MODEM-MGMT-MIB', 'cmLineSpeedInfoGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_modem_mgmt_mib_compliance_rev2 = ciscoModemMgmtMIBComplianceRev2.setStatus('obsolete') if mibBuilder.loadTexts: ciscoModemMgmtMIBComplianceRev2.setDescription('The compliance statement for entities which implement the cisco Modem Management MIB') cisco_modem_mgmt_mib_compliance_rev3 = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 47, 3, 1, 4)).setObjects(('CISCO-MODEM-MGMT-MIB', 'cmSystemInfoGroupRev1'), ('CISCO-MODEM-MGMT-MIB', 'cmLineInfoGroup'), ('CISCO-MODEM-MGMT-MIB', 'cmGroupInfoGroup'), ('CISCO-MODEM-MGMT-MIB', 'cmManagedLineInfoGroup'), ('CISCO-MODEM-MGMT-MIB', 'cmLineSpeedInfoGroupRev1')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_modem_mgmt_mib_compliance_rev3 = ciscoModemMgmtMIBComplianceRev3.setStatus('obsolete') if mibBuilder.loadTexts: ciscoModemMgmtMIBComplianceRev3.setDescription('The compliance statement for entities which implement the cisco Modem Management MIB') cisco_modem_mgmt_mib_compliance_rev4 = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 47, 3, 1, 5)).setObjects(('CISCO-MODEM-MGMT-MIB', 'cmGroupInfoGroup'), ('CISCO-MODEM-MGMT-MIB', 'cmLineSpeedInfoGroupRev1'), ('CISCO-MODEM-MGMT-MIB', 'cmManagedLineInfoGroup'), ('CISCO-MODEM-MGMT-MIB', 'cmLineInfoGroup'), ('CISCO-MODEM-MGMT-MIB', 'cmSystemInfoGroupRev1')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_modem_mgmt_mib_compliance_rev4 = ciscoModemMgmtMIBComplianceRev4.setStatus('obsolete') if mibBuilder.loadTexts: ciscoModemMgmtMIBComplianceRev4.setDescription('The compliance statement for entities which implement the cisco Modem Management MIB') cisco_modem_mgmt_mib_compliance_rev5 = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 47, 3, 1, 6)).setObjects(('CISCO-MODEM-MGMT-MIB', 'cmGroupInfoGroup'), ('CISCO-MODEM-MGMT-MIB', 'cmLineSpeedInfoGroupRev1'), ('CISCO-MODEM-MGMT-MIB', 'cmManagedLineInfoGroupRev1'), ('CISCO-MODEM-MGMT-MIB', 'cmLineInfoGroup'), ('CISCO-MODEM-MGMT-MIB', 'cmSystemInfoGroupRev1'), ('CISCO-MODEM-MGMT-MIB', 'cmNotificationConfigGroup'), ('CISCO-MODEM-MGMT-MIB', 'cmNotificationGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_modem_mgmt_mib_compliance_rev5 = ciscoModemMgmtMIBComplianceRev5.setStatus('deprecated') if mibBuilder.loadTexts: ciscoModemMgmtMIBComplianceRev5.setDescription('The compliance statement for entities which implement the cisco Modem Management MIB') cisco_modem_mgmt_mib_compliance_rev6 = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 47, 3, 1, 7)).setObjects(('CISCO-MODEM-MGMT-MIB', 'cmGroupInfoGroup'), ('CISCO-MODEM-MGMT-MIB', 'cmLineSpeedInfoGroupRev2'), ('CISCO-MODEM-MGMT-MIB', 'cmManagedLineInfoGroupRev2'), ('CISCO-MODEM-MGMT-MIB', 'cmLineInfoGroup'), ('CISCO-MODEM-MGMT-MIB', 'cmSystemInfoGroupRev1'), ('CISCO-MODEM-MGMT-MIB', 'cmNotificationConfigGroup'), ('CISCO-MODEM-MGMT-MIB', 'cmNotificationGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_modem_mgmt_mib_compliance_rev6 = ciscoModemMgmtMIBComplianceRev6.setStatus('current') if mibBuilder.loadTexts: ciscoModemMgmtMIBComplianceRev6.setDescription('The compliance statement for entities which implement the cisco Modem Management MIB') cm_system_info_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 47, 3, 2, 1)).setObjects(('CISCO-MODEM-MGMT-MIB', 'cmSystemInstalledModem'), ('CISCO-MODEM-MGMT-MIB', 'cmSystemConfiguredGroup'), ('CISCO-MODEM-MGMT-MIB', 'cmSystemWatchdogTime'), ('CISCO-MODEM-MGMT-MIB', 'cmSystemStatusPollTime'), ('CISCO-MODEM-MGMT-MIB', 'cmSystemMaxRetries')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cm_system_info_group = cmSystemInfoGroup.setStatus('obsolete') if mibBuilder.loadTexts: cmSystemInfoGroup.setDescription('A collection of objects providing system configuration and status information.') cm_group_info_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 47, 3, 2, 2)).setObjects(('CISCO-MODEM-MGMT-MIB', 'cmGroupTotalDevices'), ('CISCO-MODEM-MGMT-MIB', 'cmPortIndex')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cm_group_info_group = cmGroupInfoGroup.setStatus('current') if mibBuilder.loadTexts: cmGroupInfoGroup.setDescription('A collection of objects providing modem configuration and statistics information for modem groups.') cm_line_info_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 47, 3, 2, 3)).setObjects(('CISCO-MODEM-MGMT-MIB', 'cmInterface'), ('CISCO-MODEM-MGMT-MIB', 'cmGroup'), ('CISCO-MODEM-MGMT-MIB', 'cmManufacturerID'), ('CISCO-MODEM-MGMT-MIB', 'cmProductDetails'), ('CISCO-MODEM-MGMT-MIB', 'cmManageable'), ('CISCO-MODEM-MGMT-MIB', 'cmState'), ('CISCO-MODEM-MGMT-MIB', 'cmDisconnectReason'), ('CISCO-MODEM-MGMT-MIB', 'cmCallDirection'), ('CISCO-MODEM-MGMT-MIB', 'cmCallDuration'), ('CISCO-MODEM-MGMT-MIB', 'cmCallPhoneNumber'), ('CISCO-MODEM-MGMT-MIB', 'cmCallerID'), ('CISCO-MODEM-MGMT-MIB', 'cmATModePermit'), ('CISCO-MODEM-MGMT-MIB', 'cmStatusPolling'), ('CISCO-MODEM-MGMT-MIB', 'cmBusyOutRequest'), ('CISCO-MODEM-MGMT-MIB', 'cmShutdown'), ('CISCO-MODEM-MGMT-MIB', 'cmHoldReset'), ('CISCO-MODEM-MGMT-MIB', 'cmBad'), ('CISCO-MODEM-MGMT-MIB', 'cmRingNoAnswers'), ('CISCO-MODEM-MGMT-MIB', 'cmFailedDialAttempts'), ('CISCO-MODEM-MGMT-MIB', 'cmWatchdogTimeouts')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cm_line_info_group = cmLineInfoGroup.setStatus('current') if mibBuilder.loadTexts: cmLineInfoGroup.setDescription('A collection of objects providing modem configuration and statistics information for individual modem.') cm_managed_line_info_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 47, 3, 2, 4)).setObjects(('CISCO-MODEM-MGMT-MIB', 'cmModulationSchemeUsed'), ('CISCO-MODEM-MGMT-MIB', 'cmProtocolUsed'), ('CISCO-MODEM-MGMT-MIB', 'cmTXRate'), ('CISCO-MODEM-MGMT-MIB', 'cmRXRate'), ('CISCO-MODEM-MGMT-MIB', 'cmTXAnalogSignalLevel'), ('CISCO-MODEM-MGMT-MIB', 'cmRXAnalogSignalLevel'), ('CISCO-MODEM-MGMT-MIB', 'cmIncomingConnectionFailures'), ('CISCO-MODEM-MGMT-MIB', 'cmIncomingConnectionCompletions'), ('CISCO-MODEM-MGMT-MIB', 'cmOutgoingConnectionFailures'), ('CISCO-MODEM-MGMT-MIB', 'cmOutgoingConnectionCompletions'), ('CISCO-MODEM-MGMT-MIB', 'cmNoDialTones'), ('CISCO-MODEM-MGMT-MIB', 'cmDialTimeouts'), ('CISCO-MODEM-MGMT-MIB', 'cm2400OrLessConnections'), ('CISCO-MODEM-MGMT-MIB', 'cm2400To14400Connections'), ('CISCO-MODEM-MGMT-MIB', 'cmGreaterThan14400Connections'), ('CISCO-MODEM-MGMT-MIB', 'cmNoCarriers'), ('CISCO-MODEM-MGMT-MIB', 'cmLinkFailures'), ('CISCO-MODEM-MGMT-MIB', 'cmProtocolErrors'), ('CISCO-MODEM-MGMT-MIB', 'cmPollingTimeouts'), ('CISCO-MODEM-MGMT-MIB', 'cmTotalCallDuration')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cm_managed_line_info_group = cmManagedLineInfoGroup.setStatus('deprecated') if mibBuilder.loadTexts: cmManagedLineInfoGroup.setDescription('A collection of objects providing modem configuration and statistics information for individual managed modems.') cm_line_speed_info_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 47, 3, 2, 5)).setObjects(('CISCO-MODEM-MGMT-MIB', 'cmInitialLineConnections')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cm_line_speed_info_group = cmLineSpeedInfoGroup.setStatus('obsolete') if mibBuilder.loadTexts: cmLineSpeedInfoGroup.setDescription('A collection of objects providing modem configuration and statistics information for individual managed modems.') cm_system_info_group_rev1 = object_group((1, 3, 6, 1, 4, 1, 9, 9, 47, 3, 2, 6)).setObjects(('CISCO-MODEM-MGMT-MIB', 'cmSystemInstalledModem'), ('CISCO-MODEM-MGMT-MIB', 'cmSystemConfiguredGroup'), ('CISCO-MODEM-MGMT-MIB', 'cmSystemWatchdogTime'), ('CISCO-MODEM-MGMT-MIB', 'cmSystemStatusPollTime'), ('CISCO-MODEM-MGMT-MIB', 'cmSystemMaxRetries'), ('CISCO-MODEM-MGMT-MIB', 'cmSystemModemsInUse'), ('CISCO-MODEM-MGMT-MIB', 'cmSystemModemsAvailable'), ('CISCO-MODEM-MGMT-MIB', 'cmSystemModemsUnavailable'), ('CISCO-MODEM-MGMT-MIB', 'cmSystemModemsOffline'), ('CISCO-MODEM-MGMT-MIB', 'cmSystemModemsDead')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cm_system_info_group_rev1 = cmSystemInfoGroupRev1.setStatus('current') if mibBuilder.loadTexts: cmSystemInfoGroupRev1.setDescription('A collection of objects providing system configuration and status information.') cm_line_speed_info_group_rev1 = object_group((1, 3, 6, 1, 4, 1, 9, 9, 47, 3, 2, 7)).setObjects(('CISCO-MODEM-MGMT-MIB', 'cmInitialLineConnections'), ('CISCO-MODEM-MGMT-MIB', 'cmInitialTxLineConnections'), ('CISCO-MODEM-MGMT-MIB', 'cmInitialRxLineConnections')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cm_line_speed_info_group_rev1 = cmLineSpeedInfoGroupRev1.setStatus('deprecated') if mibBuilder.loadTexts: cmLineSpeedInfoGroupRev1.setDescription('A collection of objects providing modem configuration and statistics information for individual managed modems.') cm_managed_line_info_group_rev1 = object_group((1, 3, 6, 1, 4, 1, 9, 9, 47, 3, 2, 8)).setObjects(('CISCO-MODEM-MGMT-MIB', 'cmModulationSchemeUsed'), ('CISCO-MODEM-MGMT-MIB', 'cmProtocolUsed'), ('CISCO-MODEM-MGMT-MIB', 'cmTXRate'), ('CISCO-MODEM-MGMT-MIB', 'cmRXRate'), ('CISCO-MODEM-MGMT-MIB', 'cmTXAnalogSignalLevel'), ('CISCO-MODEM-MGMT-MIB', 'cmRXAnalogSignalLevel'), ('CISCO-MODEM-MGMT-MIB', 'cmIncomingConnectionFailures'), ('CISCO-MODEM-MGMT-MIB', 'cmIncomingConnectionCompletions'), ('CISCO-MODEM-MGMT-MIB', 'cmOutgoingConnectionFailures'), ('CISCO-MODEM-MGMT-MIB', 'cmOutgoingConnectionCompletions'), ('CISCO-MODEM-MGMT-MIB', 'cmNoDialTones'), ('CISCO-MODEM-MGMT-MIB', 'cmDialTimeouts'), ('CISCO-MODEM-MGMT-MIB', 'cm2400OrLessConnections'), ('CISCO-MODEM-MGMT-MIB', 'cm2400To14400Connections'), ('CISCO-MODEM-MGMT-MIB', 'cmGreaterThan14400Connections'), ('CISCO-MODEM-MGMT-MIB', 'cmNoCarriers'), ('CISCO-MODEM-MGMT-MIB', 'cmLinkFailures'), ('CISCO-MODEM-MGMT-MIB', 'cmProtocolErrors'), ('CISCO-MODEM-MGMT-MIB', 'cmPollingTimeouts'), ('CISCO-MODEM-MGMT-MIB', 'cmTotalCallDuration')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cm_managed_line_info_group_rev1 = cmManagedLineInfoGroupRev1.setStatus('deprecated') if mibBuilder.loadTexts: cmManagedLineInfoGroupRev1.setDescription('A collection of objects providing modem configuration and statistics information for individual managed modems.') cm_notification_config_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 47, 3, 2, 9)).setObjects(('CISCO-MODEM-MGMT-MIB', 'cmStateNotifyEnable')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cm_notification_config_group = cmNotificationConfigGroup.setStatus('current') if mibBuilder.loadTexts: cmNotificationConfigGroup.setDescription('Objects for configuring the notification behavior of this MIB. ') cm_notification_group = notification_group((1, 3, 6, 1, 4, 1, 9, 9, 47, 3, 2, 10)).setObjects(('CISCO-MODEM-MGMT-MIB', 'cmStateNotification')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cm_notification_group = cmNotificationGroup.setStatus('current') if mibBuilder.loadTexts: cmNotificationGroup.setDescription('The collection of notifications used for monitoring modem status') cm_line_speed_info_group_rev2 = object_group((1, 3, 6, 1, 4, 1, 9, 9, 47, 3, 2, 11)).setObjects(('CISCO-MODEM-MGMT-MIB', 'cmInitialTxLineConnections'), ('CISCO-MODEM-MGMT-MIB', 'cmInitialRxLineConnections')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cm_line_speed_info_group_rev2 = cmLineSpeedInfoGroupRev2.setStatus('current') if mibBuilder.loadTexts: cmLineSpeedInfoGroupRev2.setDescription('A collection of objects providing modem configuration and statistics information for individual managed modems.') cm_managed_line_info_group_rev2 = object_group((1, 3, 6, 1, 4, 1, 9, 9, 47, 3, 2, 12)).setObjects(('CISCO-MODEM-MGMT-MIB', 'cmModulationSchemeUsed'), ('CISCO-MODEM-MGMT-MIB', 'cmProtocolUsed'), ('CISCO-MODEM-MGMT-MIB', 'cmTXRate'), ('CISCO-MODEM-MGMT-MIB', 'cmRXRate'), ('CISCO-MODEM-MGMT-MIB', 'cmTXAnalogSignalLevel'), ('CISCO-MODEM-MGMT-MIB', 'cmRXAnalogSignalLevel'), ('CISCO-MODEM-MGMT-MIB', 'cmIncomingConnectionFailures'), ('CISCO-MODEM-MGMT-MIB', 'cmIncomingConnectionCompletions'), ('CISCO-MODEM-MGMT-MIB', 'cmOutgoingConnectionFailures'), ('CISCO-MODEM-MGMT-MIB', 'cmOutgoingConnectionCompletions'), ('CISCO-MODEM-MGMT-MIB', 'cmNoDialTones'), ('CISCO-MODEM-MGMT-MIB', 'cmDialTimeouts'), ('CISCO-MODEM-MGMT-MIB', 'cmNoCarriers'), ('CISCO-MODEM-MGMT-MIB', 'cmLinkFailures'), ('CISCO-MODEM-MGMT-MIB', 'cmProtocolErrors'), ('CISCO-MODEM-MGMT-MIB', 'cmPollingTimeouts'), ('CISCO-MODEM-MGMT-MIB', 'cmTotalCallDuration')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cm_managed_line_info_group_rev2 = cmManagedLineInfoGroupRev2.setStatus('current') if mibBuilder.loadTexts: cmManagedLineInfoGroupRev2.setDescription('A collection of objects providing modem configuration and statistics information for individual managed modems.') mibBuilder.exportSymbols('CISCO-MODEM-MGMT-MIB', cmSlotIndex=cmSlotIndex, cmSystemConfiguredGroup=cmSystemConfiguredGroup, cmManageable=cmManageable, cmManufacturerID=cmManufacturerID, cmTXRate=cmTXRate, cmSystemInfoGroup=cmSystemInfoGroup, cmGroupMemberEntry=cmGroupMemberEntry, cmCallPhoneNumber=cmCallPhoneNumber, cmSystemWatchdogTime=cmSystemWatchdogTime, cmTotalCallDuration=cmTotalCallDuration, ciscoModemMgmtMIBComplianceRev5=ciscoModemMgmtMIBComplianceRev5, cmGroup=cmGroup, cmIncomingConnectionCompletions=cmIncomingConnectionCompletions, cmDialTimeouts=cmDialTimeouts, cmManagedLineInfoGroupRev2=cmManagedLineInfoGroupRev2, cmSystemStatusPollTime=cmSystemStatusPollTime, cmManagedLineInfoGroupRev1=cmManagedLineInfoGroupRev1, cmInitialRxLineConnections=cmInitialRxLineConnections, ciscoModemMgmtMIB=ciscoModemMgmtMIB, cmOutgoingConnectionFailures=cmOutgoingConnectionFailures, cmSystemModemsUnavailable=cmSystemModemsUnavailable, cmNotificationConfig=cmNotificationConfig, cmPollingTimeouts=cmPollingTimeouts, ciscoModemMgmtMIBComplianceRev1=ciscoModemMgmtMIBComplianceRev1, cmNotificationConfigGroup=cmNotificationConfigGroup, cmSystemInstalledModem=cmSystemInstalledModem, cmLineSpeedStatisticsTable=cmLineSpeedStatisticsTable, cmShutdown=cmShutdown, cmPortIndex=cmPortIndex, cmProtocolErrors=cmProtocolErrors, cmLineSpeedInfoGroup=cmLineSpeedInfoGroup, cmLineSpeedStatisticsEntry=cmLineSpeedStatisticsEntry, ciscoModemMgmtMIBCompliances=ciscoModemMgmtMIBCompliances, cmState=cmState, ciscoModemMgmtMIBComplianceRev3=ciscoModemMgmtMIBComplianceRev3, cmCallDirection=cmCallDirection, cmGreaterThan14400Connections=cmGreaterThan14400Connections, cmLineInfo=cmLineInfo, cmCallDuration=cmCallDuration, cm2400OrLessConnections=cm2400OrLessConnections, cmGroupInfoGroup=cmGroupInfoGroup, cmMIBNotifications=cmMIBNotifications, cmFailedDialAttempts=cmFailedDialAttempts, ciscoModemMgmtMIBComplianceRev6=ciscoModemMgmtMIBComplianceRev6, cmGroupInfo=cmGroupInfo, cmInterface=cmInterface, cmGroupTotalDevices=cmGroupTotalDevices, cmSystemInfoGroupRev1=cmSystemInfoGroupRev1, cmHoldReset=cmHoldReset, cmLineConfigEntry=cmLineConfigEntry, cmATModePermit=cmATModePermit, cmLineStatisticsTable=cmLineStatisticsTable, cmWatchdogTimeouts=cmWatchdogTimeouts, cmInitialLineSpeed=cmInitialLineSpeed, cmRingNoAnswers=cmRingNoAnswers, cmSystemModemsAvailable=cmSystemModemsAvailable, cmTXAnalogSignalLevel=cmTXAnalogSignalLevel, ciscoModemMgmtMIBCompliance=ciscoModemMgmtMIBCompliance, cmOutgoingConnectionCompletions=cmOutgoingConnectionCompletions, cmRXAnalogSignalLevel=cmRXAnalogSignalLevel, cmLineStatusTable=cmLineStatusTable, cmIncomingConnectionFailures=cmIncomingConnectionFailures, cmGroupIndex=cmGroupIndex, cmLineConfigTable=cmLineConfigTable, ciscoModemMgmtMIBObjects=ciscoModemMgmtMIBObjects, cmSystemModemsOffline=cmSystemModemsOffline, cmInitialTxLineConnections=cmInitialTxLineConnections, cmLineStatisticsEntry=cmLineStatisticsEntry, cmDisconnectReason=cmDisconnectReason, cmProductDetails=cmProductDetails, cmProtocolUsed=cmProtocolUsed, cmBusyOutRequest=cmBusyOutRequest, ciscoModemMgmtMIBComplianceRev4=ciscoModemMgmtMIBComplianceRev4, cmStateNotification=cmStateNotification, cmManagedLineInfoGroup=cmManagedLineInfoGroup, cmNotificationGroup=cmNotificationGroup, cmGroupTable=cmGroupTable, cmStatusPolling=cmStatusPolling, cmNoCarriers=cmNoCarriers, ciscoModemMgmtMIBComplianceRev2=ciscoModemMgmtMIBComplianceRev2, cmNoDialTones=cmNoDialTones, cmSystemInfo=cmSystemInfo, cmLinkFailures=cmLinkFailures, cmCallerID=cmCallerID, ciscoModemMgmtMIBConformance=ciscoModemMgmtMIBConformance, cmLineSpeedInfoGroupRev2=cmLineSpeedInfoGroupRev2, cmSystemModemsInUse=cmSystemModemsInUse, cmSystemModemsDead=cmSystemModemsDead, cmGroupMemberTable=cmGroupMemberTable, cmLineStatusEntry=cmLineStatusEntry, cm2400To14400Connections=cm2400To14400Connections, cmInitialLineConnections=cmInitialLineConnections, cmLineInfoGroup=cmLineInfoGroup, cmRXRate=cmRXRate, cmModulationSchemeUsed=cmModulationSchemeUsed, PYSNMP_MODULE_ID=ciscoModemMgmtMIB, cmBad=cmBad, ciscoModemMgmtMIBGroups=ciscoModemMgmtMIBGroups, cmStateNotifyEnable=cmStateNotifyEnable, cmSystemMaxRetries=cmSystemMaxRetries, cmGroupEntry=cmGroupEntry, cmLineSpeedInfoGroupRev1=cmLineSpeedInfoGroupRev1, cmMIBNotificationPrefix=cmMIBNotificationPrefix)
pay = float(input('Enter your salary: ')) if pay <= 1250: newpay1 = pay + (pay * 0.15) print('Your new salary is {:.2f}'.format(newpay1)) else: newpay2 = pay + (pay * 0.10) print('Your new salary is {:.2f}'.format(newpay2))
pay = float(input('Enter your salary: ')) if pay <= 1250: newpay1 = pay + pay * 0.15 print('Your new salary is {:.2f}'.format(newpay1)) else: newpay2 = pay + pay * 0.1 print('Your new salary is {:.2f}'.format(newpay2))
################### 3 UZD ################################################### def get_city_year(population_now, perc, delta, population_to_reach, verbose=False): perc = perc / 100 years = 0 population_prev = population_now if population_now < population_to_reach: # if delta < 0: # if population_now * perc < delta * -1: # return -1 while population_now < population_to_reach: population_now = population_now + (population_now * perc) + delta if round(population_now,2) <= round(population_prev,2): print("Population is not increasing, loop imminent") return -1 # early return if population is not increasing population_prev = population_now years = years + 1 if verbose: print(population_now, population_to_reach, years) elif population_now > population_to_reach: if delta < 0: if population_now * perc > delta: return -1 else: return -1 while population_now > population_to_reach: population_now = population_now + (population_now * perc) + delta years = years + 1 return years print(get_city_year(1000, 2, 50, 1200)) print(get_city_year(1000, 2, -50, 5000)) print(get_city_year(1000, 2, -50, 1000)) # base case print(get_city_year(1500, 5, 100, 5000)) # should be 15 print(get_city_year(1_500_000, 2.5, 10_000, 2_000_000)) # should be 10 print(get_city_year(1000, -4, 50, 2_000, verbose=True)) # we will get a loop here # population_now = int(float(input("What is population now: "))) # percentage = float(input("What is growth percent: ")) # delta = int(float(input("Number of people leaving/arriving: "))) # population_to_reach = int(float(input("What population are we looking for: "))) # # answer = get_city_year(population_now, percentage, delta, population_to_reach) # if answer < 0: # print("Impossible") # else: # print(f"It will take {answer} years")
def get_city_year(population_now, perc, delta, population_to_reach, verbose=False): perc = perc / 100 years = 0 population_prev = population_now if population_now < population_to_reach: while population_now < population_to_reach: population_now = population_now + population_now * perc + delta if round(population_now, 2) <= round(population_prev, 2): print('Population is not increasing, loop imminent') return -1 population_prev = population_now years = years + 1 if verbose: print(population_now, population_to_reach, years) elif population_now > population_to_reach: if delta < 0: if population_now * perc > delta: return -1 else: return -1 while population_now > population_to_reach: population_now = population_now + population_now * perc + delta years = years + 1 return years print(get_city_year(1000, 2, 50, 1200)) print(get_city_year(1000, 2, -50, 5000)) print(get_city_year(1000, 2, -50, 1000)) print(get_city_year(1500, 5, 100, 5000)) print(get_city_year(1500000, 2.5, 10000, 2000000)) print(get_city_year(1000, -4, 50, 2000, verbose=True))
# Game that generates a story from random user input color = input("Enter a color: ") pluralNoun = input("Enter a noun plural: ") celebrity = input("Enter a celebrity: ") print("Roses are red ", color) print(pluralNoun, " are blue ") print("I love ", celebrity)
color = input('Enter a color: ') plural_noun = input('Enter a noun plural: ') celebrity = input('Enter a celebrity: ') print('Roses are red ', color) print(pluralNoun, ' are blue ') print('I love ', celebrity)
while True: n = input() if n == '0': break cnt = len(n)+1 for i in n: if i == '1': cnt += 2 elif i == '0': cnt += 4 else: cnt += 3 print(cnt)
while True: n = input() if n == '0': break cnt = len(n) + 1 for i in n: if i == '1': cnt += 2 elif i == '0': cnt += 4 else: cnt += 3 print(cnt)
class Solution: def summaryRanges(self, nums: List[int]) -> List[str]: if not nums: return [] res, i, start = [], 0, 0 while i < len(nums)-1: if nums[i]+1 != nums[i+1]: res.append(self.printRange(nums[start], nums[i])) start = i+1 i += 1 res.append(self.printRange(nums[start], nums[i])) return res def printRange(self, l, r): if l == r: return str(l) else: return str(l) + "->" + str(r) # Time: O(N) # Space:O(1)
class Solution: def summary_ranges(self, nums: List[int]) -> List[str]: if not nums: return [] (res, i, start) = ([], 0, 0) while i < len(nums) - 1: if nums[i] + 1 != nums[i + 1]: res.append(self.printRange(nums[start], nums[i])) start = i + 1 i += 1 res.append(self.printRange(nums[start], nums[i])) return res def print_range(self, l, r): if l == r: return str(l) else: return str(l) + '->' + str(r)
DICE_FMT = '<dice_fmt>' PLAYER = '<player>' TRAIT = '<trait>' ITEM_ID = '<item_id>' PLAYERS_ITEM = '<players_item>' ABILITY_ID = '<ability_id>' PLAYERS_ABILITY = '<players_ability>' EFFECT_ID = '<effect_id>' PLAYERS_EFFECT = '<players_effect>' ANY_ID = '<any_id>' VALUE = '<value>' OBJ_TYPE = '<obj_type>'
dice_fmt = '<dice_fmt>' player = '<player>' trait = '<trait>' item_id = '<item_id>' players_item = '<players_item>' ability_id = '<ability_id>' players_ability = '<players_ability>' effect_id = '<effect_id>' players_effect = '<players_effect>' any_id = '<any_id>' value = '<value>' obj_type = '<obj_type>'
EXCLUDE_LIST = ("C:\\Program Files\\Veritas\\NetBackup\\bin\\*.lock", "C:\\Program Files\\Veritas\\NetBackup\\bin\\bprd.d\\*.lock", "C:\\Program Files\\Veritas\\NetBackup\\bin\\bpsched.d\\*.lock", "C:\\Program Files\\Veritas\\Volmgr\\misc\\*", "C:\\Program Files\\Veritas\\NetBackupDB\\data\\*", "D:\\privatedata\\exclude", "D:\\tempdata\\exclude")
exclude_list = ('C:\\Program Files\\Veritas\\NetBackup\\bin\\*.lock', 'C:\\Program Files\\Veritas\\NetBackup\\bin\\bprd.d\\*.lock', 'C:\\Program Files\\Veritas\\NetBackup\\bin\\bpsched.d\\*.lock', 'C:\\Program Files\\Veritas\\Volmgr\\misc\\*', 'C:\\Program Files\\Veritas\\NetBackupDB\\data\\*', 'D:\\privatedata\\exclude', 'D:\\tempdata\\exclude')