content
stringlengths
7
1.05M
fixed_cases
stringlengths
1
1.28M
K = 132 nominaly = [1, 2, 5, 10, 20, 50] def change_making_greedy(K, nominaly): nominaly.sort(reverse = True) coins = [] for i in nominaly: while K >= i: coins.append(i) K -= i return coins print(change_making_greedy(K,nominaly))
k = 132 nominaly = [1, 2, 5, 10, 20, 50] def change_making_greedy(K, nominaly): nominaly.sort(reverse=True) coins = [] for i in nominaly: while K >= i: coins.append(i) k -= i return coins print(change_making_greedy(K, nominaly))
class XYZAtom: """An atom record in an XYZ structure""" def __init__(self, name, x, y, z): self.chain = "" self.resid = None self.resname = "" self.name = name self.x = x self.y = y self.z = z def read(infile): """Read an XYZ structure from a filename or stream, returning a (title, atoms) tuple""" if isinstance(infile, str): infile = open(infile) natoms = int(infile.readline().strip()) title = infile.readline().strip() atoms = [] for i in range(natoms): tokens = infile.readline().split() name = tokens[0] x = float(tokens[1]) y = float(tokens[2]) z = float(tokens[3]) atoms.append(XYZAtom(name, x, y, z)) return atoms, title def write(outfile, atoms, title = ""): """Write a Gromos87 structure to a filename or stream, from the given atoms and, optionally, cell (3x3 matrix) and title""" if isinstance(outfile, str): outfile = open(outfile, "w") outfile.write(str(len(atoms)) + "\n") outfile.write(title + "\n") atomfmt = "{} {} {} {}\n" for atom in atoms: outfile.write(atomfmt.format(atom.name, atom.x, atom.y, atom.z))
class Xyzatom: """An atom record in an XYZ structure""" def __init__(self, name, x, y, z): self.chain = '' self.resid = None self.resname = '' self.name = name self.x = x self.y = y self.z = z def read(infile): """Read an XYZ structure from a filename or stream, returning a (title, atoms) tuple""" if isinstance(infile, str): infile = open(infile) natoms = int(infile.readline().strip()) title = infile.readline().strip() atoms = [] for i in range(natoms): tokens = infile.readline().split() name = tokens[0] x = float(tokens[1]) y = float(tokens[2]) z = float(tokens[3]) atoms.append(xyz_atom(name, x, y, z)) return (atoms, title) def write(outfile, atoms, title=''): """Write a Gromos87 structure to a filename or stream, from the given atoms and, optionally, cell (3x3 matrix) and title""" if isinstance(outfile, str): outfile = open(outfile, 'w') outfile.write(str(len(atoms)) + '\n') outfile.write(title + '\n') atomfmt = '{} {} {} {}\n' for atom in atoms: outfile.write(atomfmt.format(atom.name, atom.x, atom.y, atom.z))
[ { 'date': '2016-01-01', 'description': "New Year's Day", 'locale': 'en-CA', 'notes': '', 'region': '', 'type': 'NF' }, { 'date': '2016-02-15', 'description': 'Family Day', 'locale': 'en-CA', 'notes': '', 'region': 'AB', 'type': 'V' }, { 'date': '2016-02-15', 'description': 'Family Day', 'locale': 'en-CA', 'notes': '', 'region': 'ON', 'type': 'V' }, { 'date': '2016-02-15', 'description': 'Family Day', 'locale': 'en-CA', 'notes': '', 'region': 'SK', 'type': 'V' }, { 'date': '2016-02-15', 'description': 'Family Day', 'locale': 'en-CA', 'notes': '', 'region': 'NB', 'type': 'V' }, { 'date': '2016-02-15', 'description': 'Louis Riel Day', 'locale': 'en-CA', 'notes': '', 'region': 'MB', 'type': 'V' }, { 'date': '2016-02-15', 'description': 'Islander Day', 'locale': 'en-CA', 'notes': '', 'region': 'PE', 'type': 'V' }, { 'date': '2016-03-25', 'description': 'Good Friday', 'locale': 'en-CA', 'notes': '', 'region': '', 'type': 'NRV' }, { 'date': '2016-03-28', 'description': 'Easter Monday', 'locale': 'en-CA', 'notes': '', 'region': 'AB', 'type': 'RV' }, { 'date': '2016-03-28', 'description': 'Easter Monday', 'locale': 'en-CA', 'notes': '', 'region': 'PE', 'type': 'RV' }, { 'date': '2016-03-28', 'description': 'Easter Monday', 'locale': 'en-CA', 'notes': '', 'region': 'QC', 'type': 'RV' }, { 'date': '2016-05-23', 'description': "National Patriots' Day", 'locale': 'en-CA', 'notes': '', 'region': 'QC', 'type': 'V' }, { 'date': '2016-05-23', 'description': 'Victoria Day', 'locale': 'en-CA', 'notes': '', 'region': 'AB', 'type': 'V' }, { 'date': '2016-05-23', 'description': 'Victoria Day', 'locale': 'en-CA', 'notes': '', 'region': 'BC', 'type': 'V' }, { 'date': '2016-05-23', 'description': 'Victoria Day', 'locale': 'en-CA', 'notes': '', 'region': 'MB', 'type': 'V' }, { 'date': '2016-05-23', 'description': 'Victoria Day', 'locale': 'en-CA', 'notes': '', 'region': 'NS', 'type': 'V' }, { 'date': '2016-05-23', 'description': 'Victoria Day', 'locale': 'en-CA', 'notes': '', 'region': 'ON', 'type': 'V' }, { 'date': '2016-05-23', 'description': 'Victoria Day', 'locale': 'en-CA', 'notes': '', 'region': 'SK', 'type': 'V' }, { 'date': '2016-05-23', 'description': 'Victoria Day', 'locale': 'en-CA', 'notes': '', 'region': 'NT', 'type': 'V' }, { 'date': '2016-05-23', 'description': 'Victoria Day', 'locale': 'en-CA', 'notes': '', 'region': 'NU', 'type': 'V' }, { 'date': '2016-05-23', 'description': 'Victoria Day', 'locale': 'en-CA', 'notes': '', 'region': 'YT', 'type': 'V' }, { 'date': '2016-06-24', 'description': 'National Holiday', 'locale': 'en-CA', 'notes': '', 'region': 'QC', 'type': 'F' }, { 'date': '2016-07-01', 'description': 'Canada Day', 'locale': 'en-CA', 'notes': '', 'region': '', 'type': 'NF' }, { 'date': '2016-08-01', 'description': 'August Civic Holiday', 'locale': 'en-CA', 'notes': '', 'region': 'NT', 'type': 'V' }, { 'date': '2016-08-01', 'description': 'August Civic Holiday', 'locale': 'en-CA', 'notes': '', 'region': 'NU', 'type': 'V' }, { 'date': '2016-08-01', 'description': 'Saskatchewan Day', 'locale': 'en-CA', 'notes': '', 'region': 'SK', 'type': 'V' }, { 'date': '2016-08-01', 'description': 'Heritage Day', 'locale': 'en-CA', 'notes': '', 'region': 'AB', 'type': 'V' }, { 'date': '2016-08-01', 'description': 'Heritage Day', 'locale': 'en-CA', 'notes': '', 'region': 'NS', 'type': 'V' }, { 'date': '2016-08-01', 'description': 'New Brunswick Day', 'locale': 'en-CA', 'notes': '', 'region': 'NB', 'type': 'V' }, { 'date': '2016-09-05', 'description': 'Labour Day', 'locale': 'en-CA', 'notes': '', 'region': '', 'type': 'NV' }, { 'date': '2016-10-10', 'description': 'Thanksgiving Day', 'locale': 'en-CA', 'notes': '', 'region': 'AB', 'type': 'V' }, { 'date': '2016-10-10', 'description': 'Thanksgiving Day', 'locale': 'en-CA', 'notes': '', 'region': 'BC', 'type': 'V' }, { 'date': '2016-10-10', 'description': 'Thanksgiving Day', 'locale': 'en-CA', 'notes': '', 'region': 'MB', 'type': 'V' }, { 'date': '2016-10-10', 'description': 'Thanksgiving Day', 'locale': 'en-CA', 'notes': '', 'region': 'NL', 'type': 'V' }, { 'date': '2016-10-10', 'description': 'Thanksgiving Day', 'locale': 'en-CA', 'notes': '', 'region': 'ON', 'type': 'V' }, { 'date': '2016-10-10', 'description': 'Thanksgiving Day', 'locale': 'en-CA', 'notes': '', 'region': 'QC', 'type': 'V' }, { 'date': '2016-10-10', 'description': 'Thanksgiving Day', 'locale': 'en-CA', 'notes': '', 'region': 'SK', 'type': 'V' }, { 'date': '2016-10-10', 'description': 'Thanksgiving Day', 'locale': 'en-CA', 'notes': '', 'region': 'NT', 'type': 'V' }, { 'date': '2016-10-10', 'description': 'Thanksgiving Day', 'locale': 'en-CA', 'notes': '', 'region': 'NU', 'type': 'V' }, { 'date': '2016-10-10', 'description': 'Thanksgiving Day', 'locale': 'en-CA', 'notes': '', 'region': 'YT', 'type': 'V' }, { 'date': '2016-11-11', 'description': 'Remembrance Day', 'locale': 'en-CA', 'notes': '', 'region': 'AB', 'type': 'F' }, { 'date': '2016-11-11', 'description': 'Remembrance Day', 'locale': 'en-CA', 'notes': '', 'region': 'BC', 'type': 'F' }, { 'date': '2016-11-11', 'description': 'Remembrance Day', 'locale': 'en-CA', 'notes': '', 'region': 'NB', 'type': 'F' }, { 'date': '2016-11-11', 'description': 'Remembrance Day', 'locale': 'en-CA', 'notes': '', 'region': 'NL', 'type': 'F' }, { 'date': '2016-11-11', 'description': 'Remembrance Day', 'locale': 'en-CA', 'notes': '', 'region': 'NT', 'type': 'F' }, { 'date': '2016-12-25', 'description': 'Christmas Day', 'locale': 'en-CA', 'notes': '', 'region': '', 'type': 'NRF' }, { 'date': '2016-12-26', 'description': 'Boxing Day', 'locale': 'en-CA', 'notes': '', 'region': '', 'type': 'NRF' } ]
[{'date': '2016-01-01', 'description': "New Year's Day", 'locale': 'en-CA', 'notes': '', 'region': '', 'type': 'NF'}, {'date': '2016-02-15', 'description': 'Family Day', 'locale': 'en-CA', 'notes': '', 'region': 'AB', 'type': 'V'}, {'date': '2016-02-15', 'description': 'Family Day', 'locale': 'en-CA', 'notes': '', 'region': 'ON', 'type': 'V'}, {'date': '2016-02-15', 'description': 'Family Day', 'locale': 'en-CA', 'notes': '', 'region': 'SK', 'type': 'V'}, {'date': '2016-02-15', 'description': 'Family Day', 'locale': 'en-CA', 'notes': '', 'region': 'NB', 'type': 'V'}, {'date': '2016-02-15', 'description': 'Louis Riel Day', 'locale': 'en-CA', 'notes': '', 'region': 'MB', 'type': 'V'}, {'date': '2016-02-15', 'description': 'Islander Day', 'locale': 'en-CA', 'notes': '', 'region': 'PE', 'type': 'V'}, {'date': '2016-03-25', 'description': 'Good Friday', 'locale': 'en-CA', 'notes': '', 'region': '', 'type': 'NRV'}, {'date': '2016-03-28', 'description': 'Easter Monday', 'locale': 'en-CA', 'notes': '', 'region': 'AB', 'type': 'RV'}, {'date': '2016-03-28', 'description': 'Easter Monday', 'locale': 'en-CA', 'notes': '', 'region': 'PE', 'type': 'RV'}, {'date': '2016-03-28', 'description': 'Easter Monday', 'locale': 'en-CA', 'notes': '', 'region': 'QC', 'type': 'RV'}, {'date': '2016-05-23', 'description': "National Patriots' Day", 'locale': 'en-CA', 'notes': '', 'region': 'QC', 'type': 'V'}, {'date': '2016-05-23', 'description': 'Victoria Day', 'locale': 'en-CA', 'notes': '', 'region': 'AB', 'type': 'V'}, {'date': '2016-05-23', 'description': 'Victoria Day', 'locale': 'en-CA', 'notes': '', 'region': 'BC', 'type': 'V'}, {'date': '2016-05-23', 'description': 'Victoria Day', 'locale': 'en-CA', 'notes': '', 'region': 'MB', 'type': 'V'}, {'date': '2016-05-23', 'description': 'Victoria Day', 'locale': 'en-CA', 'notes': '', 'region': 'NS', 'type': 'V'}, {'date': '2016-05-23', 'description': 'Victoria Day', 'locale': 'en-CA', 'notes': '', 'region': 'ON', 'type': 'V'}, {'date': '2016-05-23', 'description': 'Victoria Day', 'locale': 'en-CA', 'notes': '', 'region': 'SK', 'type': 'V'}, {'date': '2016-05-23', 'description': 'Victoria Day', 'locale': 'en-CA', 'notes': '', 'region': 'NT', 'type': 'V'}, {'date': '2016-05-23', 'description': 'Victoria Day', 'locale': 'en-CA', 'notes': '', 'region': 'NU', 'type': 'V'}, {'date': '2016-05-23', 'description': 'Victoria Day', 'locale': 'en-CA', 'notes': '', 'region': 'YT', 'type': 'V'}, {'date': '2016-06-24', 'description': 'National Holiday', 'locale': 'en-CA', 'notes': '', 'region': 'QC', 'type': 'F'}, {'date': '2016-07-01', 'description': 'Canada Day', 'locale': 'en-CA', 'notes': '', 'region': '', 'type': 'NF'}, {'date': '2016-08-01', 'description': 'August Civic Holiday', 'locale': 'en-CA', 'notes': '', 'region': 'NT', 'type': 'V'}, {'date': '2016-08-01', 'description': 'August Civic Holiday', 'locale': 'en-CA', 'notes': '', 'region': 'NU', 'type': 'V'}, {'date': '2016-08-01', 'description': 'Saskatchewan Day', 'locale': 'en-CA', 'notes': '', 'region': 'SK', 'type': 'V'}, {'date': '2016-08-01', 'description': 'Heritage Day', 'locale': 'en-CA', 'notes': '', 'region': 'AB', 'type': 'V'}, {'date': '2016-08-01', 'description': 'Heritage Day', 'locale': 'en-CA', 'notes': '', 'region': 'NS', 'type': 'V'}, {'date': '2016-08-01', 'description': 'New Brunswick Day', 'locale': 'en-CA', 'notes': '', 'region': 'NB', 'type': 'V'}, {'date': '2016-09-05', 'description': 'Labour Day', 'locale': 'en-CA', 'notes': '', 'region': '', 'type': 'NV'}, {'date': '2016-10-10', 'description': 'Thanksgiving Day', 'locale': 'en-CA', 'notes': '', 'region': 'AB', 'type': 'V'}, {'date': '2016-10-10', 'description': 'Thanksgiving Day', 'locale': 'en-CA', 'notes': '', 'region': 'BC', 'type': 'V'}, {'date': '2016-10-10', 'description': 'Thanksgiving Day', 'locale': 'en-CA', 'notes': '', 'region': 'MB', 'type': 'V'}, {'date': '2016-10-10', 'description': 'Thanksgiving Day', 'locale': 'en-CA', 'notes': '', 'region': 'NL', 'type': 'V'}, {'date': '2016-10-10', 'description': 'Thanksgiving Day', 'locale': 'en-CA', 'notes': '', 'region': 'ON', 'type': 'V'}, {'date': '2016-10-10', 'description': 'Thanksgiving Day', 'locale': 'en-CA', 'notes': '', 'region': 'QC', 'type': 'V'}, {'date': '2016-10-10', 'description': 'Thanksgiving Day', 'locale': 'en-CA', 'notes': '', 'region': 'SK', 'type': 'V'}, {'date': '2016-10-10', 'description': 'Thanksgiving Day', 'locale': 'en-CA', 'notes': '', 'region': 'NT', 'type': 'V'}, {'date': '2016-10-10', 'description': 'Thanksgiving Day', 'locale': 'en-CA', 'notes': '', 'region': 'NU', 'type': 'V'}, {'date': '2016-10-10', 'description': 'Thanksgiving Day', 'locale': 'en-CA', 'notes': '', 'region': 'YT', 'type': 'V'}, {'date': '2016-11-11', 'description': 'Remembrance Day', 'locale': 'en-CA', 'notes': '', 'region': 'AB', 'type': 'F'}, {'date': '2016-11-11', 'description': 'Remembrance Day', 'locale': 'en-CA', 'notes': '', 'region': 'BC', 'type': 'F'}, {'date': '2016-11-11', 'description': 'Remembrance Day', 'locale': 'en-CA', 'notes': '', 'region': 'NB', 'type': 'F'}, {'date': '2016-11-11', 'description': 'Remembrance Day', 'locale': 'en-CA', 'notes': '', 'region': 'NL', 'type': 'F'}, {'date': '2016-11-11', 'description': 'Remembrance Day', 'locale': 'en-CA', 'notes': '', 'region': 'NT', 'type': 'F'}, {'date': '2016-12-25', 'description': 'Christmas Day', 'locale': 'en-CA', 'notes': '', 'region': '', 'type': 'NRF'}, {'date': '2016-12-26', 'description': 'Boxing Day', 'locale': 'en-CA', 'notes': '', 'region': '', 'type': 'NRF'}]
#!/usr/bin/env python #coding: utf-8 # VirusTotal vt_key = '' # MISP misp_url = '' misp_key = '' misp_verifycert = False # Twitter consumer_key = '' consumer_secret = '' access_key = '' access_secret = '' # Slack slack_channel = '' slack_username = '' slack_url = ''
vt_key = '' misp_url = '' misp_key = '' misp_verifycert = False consumer_key = '' consumer_secret = '' access_key = '' access_secret = '' slack_channel = '' slack_username = '' slack_url = ''
class SkilletLoaderException(BaseException): pass class LoginException(BaseException): pass class PanoplyException(BaseException): pass class NodeNotFoundException(BaseException): pass
class Skilletloaderexception(BaseException): pass class Loginexception(BaseException): pass class Panoplyexception(BaseException): pass class Nodenotfoundexception(BaseException): pass
MASTER = "127.0.0.1:7070" ROUTER = "127.0.0.1:8080" #MASTER = "11.3.146.195:443" #ROUTER = "11.3.146.195"
master = '127.0.0.1:7070' router = '127.0.0.1:8080'
def to_rna(dna_strand): rna = [] for nuc in dna_strand: if nuc == 'G': rna.append('C') elif nuc == 'C': rna.append('G') elif nuc == 'T': rna.append('A') elif nuc == 'A': rna.append('U') return "".join(rna)
def to_rna(dna_strand): rna = [] for nuc in dna_strand: if nuc == 'G': rna.append('C') elif nuc == 'C': rna.append('G') elif nuc == 'T': rna.append('A') elif nuc == 'A': rna.append('U') return ''.join(rna)
def in_test(a, b=None): if b in a or b is None: print('yaeeee') else: print('oops') a = [1, 2, 3] in_test(a, 1) in_test(a, 4) in_test(a, None)
def in_test(a, b=None): if b in a or b is None: print('yaeeee') else: print('oops') a = [1, 2, 3] in_test(a, 1) in_test(a, 4) in_test(a, None)
# # @lc app=leetcode.cn id=120 lang=python3 # # [120] triangle # None # @lc code=end
None
class Options: def __init__(self, args: list): assert isinstance(args, list) self.args = args def get(self, key: str, has_value: bool = True): assert isinstance(key, str) assert isinstance(has_value, bool) if has_value: if (key in self.args[:-1]) and (path_index := self.args[:-1].index(key)) and (value := self.args[path_index+1]): return value else: return None else: return key in self.args
class Options: def __init__(self, args: list): assert isinstance(args, list) self.args = args def get(self, key: str, has_value: bool=True): assert isinstance(key, str) assert isinstance(has_value, bool) if has_value: if key in self.args[:-1] and (path_index := self.args[:-1].index(key)) and (value := self.args[path_index + 1]): return value else: return None else: return key in self.args
class Solution(object): def maximumWealth(self, accounts): """ :type accounts: List[List[int]] :rtype: int """ banks = len(accounts[0]) cust = {} for customer_id in range(len(accounts)): cust[customer_id] = sum(accounts[customer_id]) return max(cust.values())
class Solution(object): def maximum_wealth(self, accounts): """ :type accounts: List[List[int]] :rtype: int """ banks = len(accounts[0]) cust = {} for customer_id in range(len(accounts)): cust[customer_id] = sum(accounts[customer_id]) return max(cust.values())
# Created by MechAviv # Kinesis Introduction # Map ID :: 331002300 # School for the Gifted :: 1-1 Classroom sm.warpInstanceOut(331002000, 2)
sm.warpInstanceOut(331002000, 2)
# 2020.09.04 # Problem Statement: # https://leetcode.com/problems/add-binary/ class Solution: def addBinary(self, a: str, b: str) -> str: # make a to be the longer string if len(a) < len(b): a, b = b, a # do early return if a == "0": return b if b == "0": return a # initialize answer to return and initialize the carrier answer = "" carrier = 0 # iterate when b is not gone through for i in range(0, len(b)): answer = str((int(a[len(a)-1-i])+int(b[len(b)-1-i])+carrier)%2) + answer if int(a[len(a)-1-i]) + int(b[len(b)-1-i]) + carrier >= 2: carrier = 1 else: carrier = 0 # treat b as 0 and finish the rest for i in range(len(b), len(a)): answer = str((int(a[len(a)-1-i]) + carrier)%2) + answer if int(a[len(a)-1-i]) + carrier >= 2: carrier = 1 else: carrier = 0 # deal with the last carrier if carrier == 1: return "1" + answer else: return answer
class Solution: def add_binary(self, a: str, b: str) -> str: if len(a) < len(b): (a, b) = (b, a) if a == '0': return b if b == '0': return a answer = '' carrier = 0 for i in range(0, len(b)): answer = str((int(a[len(a) - 1 - i]) + int(b[len(b) - 1 - i]) + carrier) % 2) + answer if int(a[len(a) - 1 - i]) + int(b[len(b) - 1 - i]) + carrier >= 2: carrier = 1 else: carrier = 0 for i in range(len(b), len(a)): answer = str((int(a[len(a) - 1 - i]) + carrier) % 2) + answer if int(a[len(a) - 1 - i]) + carrier >= 2: carrier = 1 else: carrier = 0 if carrier == 1: return '1' + answer else: return answer
def capitalize(string): ans = "" i = 0; while i < len(string): ans += string[i].upper() i += 1 while i < len(string) and ord(string[i]) > 64: ans += string[i] i += 1 while i<len(string) and (ord(string[i]) == 32 or ord(string[i]) == 9): ans += string[i] i += 1 return ans string = input() capitalized_string = capitalize(string) print(capitalized_string)
def capitalize(string): ans = '' i = 0 while i < len(string): ans += string[i].upper() i += 1 while i < len(string) and ord(string[i]) > 64: ans += string[i] i += 1 while i < len(string) and (ord(string[i]) == 32 or ord(string[i]) == 9): ans += string[i] i += 1 return ans string = input() capitalized_string = capitalize(string) print(capitalized_string)
names_scores = (('Amy',82,90),('John',33,64),('Zoe',91,94)) for x,y,z in names_scores: print(x) print(y,z) print('End')
names_scores = (('Amy', 82, 90), ('John', 33, 64), ('Zoe', 91, 94)) for (x, y, z) in names_scores: print(x) print(y, z) print('End')
# # PySNMP MIB module HP-SN-TRAP-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HP-SN-MIBS # Produced by pysmi-0.3.4 at Wed May 1 13:36:22 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") ValueSizeConstraint, SingleValueConstraint, ValueRangeConstraint, ConstraintsIntersection, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "SingleValueConstraint", "ValueRangeConstraint", "ConstraintsIntersection", "ConstraintsUnion") snAgentBrdIndex, snChasPwrSupplyStatus, snChasPwrSupplyIndex, snChasFanIndex, snChasFanDescription, snChasPwrSupplyDescription, snAgGblTrapMessage = mibBuilder.importSymbols("HP-SN-AGENT-MIB", "snAgentBrdIndex", "snChasPwrSupplyStatus", "snChasPwrSupplyIndex", "snChasFanIndex", "snChasFanDescription", "snChasPwrSupplyDescription", "snAgGblTrapMessage") hp, = mibBuilder.importSymbols("HP-SN-ROOT-MIB", "hp") snL4TrapRealServerName, snL4TrapRealServerPort, snL4TrapRealServerIP, snL4MaxSessionLimit, snL4TcpSynLimit, snL4TrapRealServerCurConnections = mibBuilder.importSymbols("HP-SN-SW-L4-SWITCH-GROUP-MIB", "snL4TrapRealServerName", "snL4TrapRealServerPort", "snL4TrapRealServerIP", "snL4MaxSessionLimit", "snL4TcpSynLimit", "snL4TrapRealServerCurConnections") snSwViolatorMacAddress, snSwViolatorPortNumber = mibBuilder.importSymbols("HP-SN-SWITCH-GROUP-MIB", "snSwViolatorMacAddress", "snSwViolatorPortNumber") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") MibScalar, MibTable, MibTableRow, MibTableColumn, Bits, MibIdentifier, TimeTicks, Integer32, NotificationType, Unsigned32, iso, Counter64, Gauge32, ObjectIdentity, Counter32, IpAddress, NotificationType, ModuleIdentity = mibBuilder.importSymbols("SNMPv2-SMI", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Bits", "MibIdentifier", "TimeTicks", "Integer32", "NotificationType", "Unsigned32", "iso", "Counter64", "Gauge32", "ObjectIdentity", "Counter32", "IpAddress", "NotificationType", "ModuleIdentity") DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") snTrapChasPwrSupply = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,1)).setObjects(("HP-SN-AGENT-MIB", "snChasPwrSupplyStatus")) if mibBuilder.loadTexts: snTrapChasPwrSupply.setDescription('The SNMP trap that is generated when a power supply fails to operate normally. The value is a packed bit string; the 2 power supplies status are encoded into 4 bits (a nibble). The following shows the meaning of each bit: (bit 0 is the least significant bit). bit position meaning ------------ ------- 4-31 reserved 3 Power Supply 2 DC (0=bad, 1=good). 2 Power Supply 1 DC (0=bad, 1=good). 1 Power Supply 2 present status (0=present, 1=not-present). 0 Power Supply 1 present status (0=present, 1=not-present).') snTrapLockedAddressViolation = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,2)).setObjects(("HP-SN-SWITCH-GROUP-MIB", "snSwViolatorPortNumber"), ("HP-SN-SWITCH-GROUP-MIB", "snSwViolatorMacAddress")) if mibBuilder.loadTexts: snTrapLockedAddressViolation.setDescription('The SNMP trap that is generated when more source MAC addresses are received from a port than the maximum number of addresses configured to that port.') snTrapL4MaxSessionLimitReached = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,19)).setObjects(("HP-SN-SW-L4-SWITCH-GROUP-MIB", "snL4MaxSessionLimit")) if mibBuilder.loadTexts: snTrapL4MaxSessionLimitReached.setDescription('The SNMP trap that is generated when the maximum number of connections reached.') snTrapL4TcpSynLimitReached = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,20)).setObjects(("HP-SN-SW-L4-SWITCH-GROUP-MIB", "snL4TcpSynLimit")) if mibBuilder.loadTexts: snTrapL4TcpSynLimitReached.setDescription('The SNMP trap that is generated when the number of TCP SYN limits reached.') snTrapL4RealServerUp = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,21)).setObjects(("HP-SN-SW-L4-SWITCH-GROUP-MIB", "snL4TrapRealServerIP"), ("HP-SN-SW-L4-SWITCH-GROUP-MIB", "snL4TrapRealServerName")) if mibBuilder.loadTexts: snTrapL4RealServerUp.setDescription('The SNMP trap that is generated when the load balancing real server is up.') snTrapL4RealServerDown = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,22)).setObjects(("HP-SN-SW-L4-SWITCH-GROUP-MIB", "snL4TrapRealServerIP"), ("HP-SN-SW-L4-SWITCH-GROUP-MIB", "snL4TrapRealServerName")) if mibBuilder.loadTexts: snTrapL4RealServerDown.setDescription('The SNMP trap that is generated when the load balancing real server is down.') snTrapL4RealServerPortUp = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,23)).setObjects(("HP-SN-SW-L4-SWITCH-GROUP-MIB", "snL4TrapRealServerIP"), ("HP-SN-SW-L4-SWITCH-GROUP-MIB", "snL4TrapRealServerName"), ("HP-SN-SW-L4-SWITCH-GROUP-MIB", "snL4TrapRealServerPort")) if mibBuilder.loadTexts: snTrapL4RealServerPortUp.setDescription('The SNMP trap that is generated when the load balancing real server TCP port is up.') snTrapL4RealServerPortDown = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,24)).setObjects(("HP-SN-SW-L4-SWITCH-GROUP-MIB", "snL4TrapRealServerIP"), ("HP-SN-SW-L4-SWITCH-GROUP-MIB", "snL4TrapRealServerName"), ("HP-SN-SW-L4-SWITCH-GROUP-MIB", "snL4TrapRealServerPort")) if mibBuilder.loadTexts: snTrapL4RealServerPortDown.setDescription('The SNMP trap that is generated when the load balancing real server TCP port is down.') snTrapL4RealServerMaxConnectionLimitReached = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,25)).setObjects(("HP-SN-SW-L4-SWITCH-GROUP-MIB", "snL4TrapRealServerIP"), ("HP-SN-SW-L4-SWITCH-GROUP-MIB", "snL4TrapRealServerName"), ("HP-SN-SW-L4-SWITCH-GROUP-MIB", "snL4TrapRealServerCurConnections")) if mibBuilder.loadTexts: snTrapL4RealServerMaxConnectionLimitReached.setDescription('The SNMP trap that is generated when the real server reaches maximum number of connections.') snTrapL4BecomeStandby = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,26)) if mibBuilder.loadTexts: snTrapL4BecomeStandby.setDescription('The SNMP trap that is generated when the server load balancing switch changes state from active to standby.') snTrapL4BecomeActive = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,27)) if mibBuilder.loadTexts: snTrapL4BecomeActive.setDescription('The SNMP trap that is generated when the server load balancing switch changes state from standby to active.') snTrapModuleInserted = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,28)).setObjects(("HP-SN-AGENT-MIB", "snAgentBrdIndex")) if mibBuilder.loadTexts: snTrapModuleInserted.setDescription('The SNMP trap that is generated when a module was inserted to the chassis during system running.') snTrapModuleRemoved = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,29)).setObjects(("HP-SN-AGENT-MIB", "snAgentBrdIndex")) if mibBuilder.loadTexts: snTrapModuleRemoved.setDescription('The SNMP trap that is generated when a module was removed from the chassis during system running.') snTrapChasPwrSupplyFailed = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,30)).setObjects(("HP-SN-AGENT-MIB", "snChasPwrSupplyIndex"), ("HP-SN-AGENT-MIB", "snChasPwrSupplyDescription")) if mibBuilder.loadTexts: snTrapChasPwrSupplyFailed.setDescription('The SNMP trap that is generated when a power supply operational status changed from normal to failure.') snTrapChasFanFailed = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,31)).setObjects(("HP-SN-AGENT-MIB", "snChasFanIndex"), ("HP-SN-AGENT-MIB", "snChasFanDescription")) if mibBuilder.loadTexts: snTrapChasFanFailed.setDescription('The SNMP trap that is generated when a fan fails to operate normally.') snTrapLockedAddressViolation2 = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,32)).setObjects(("HP-SN-AGENT-MIB", "snAgGblTrapMessage")) if mibBuilder.loadTexts: snTrapLockedAddressViolation2.setDescription('The SNMP trap that is generated when more source MAC addresses are received from a port than the maximum number of addresses configured to that port.') snTrapFsrpIfStateChange = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,33)).setObjects(("HP-SN-AGENT-MIB", "snAgGblTrapMessage")) if mibBuilder.loadTexts: snTrapFsrpIfStateChange.setDescription('The SNMP trap that is generated when a FSRP routing device changed state from active to standby or vice-versa.') snTrapVrrpIfStateChange = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,34)).setObjects(("HP-SN-AGENT-MIB", "snAgGblTrapMessage")) if mibBuilder.loadTexts: snTrapVrrpIfStateChange.setDescription('The SNMP trap that is generated when a VRRP routing device switched between states master, backup, intialized or uknown.') snTrapMgmtModuleRedunStateChange = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,35)).setObjects(("HP-SN-AGENT-MIB", "snAgGblTrapMessage")) if mibBuilder.loadTexts: snTrapMgmtModuleRedunStateChange.setDescription('The SNMP trap that is generated when the management module changes redundancy state.') snTrapTemperatureWarning = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,36)).setObjects(("HP-SN-AGENT-MIB", "snAgGblTrapMessage")) if mibBuilder.loadTexts: snTrapTemperatureWarning.setDescription('The SNMP trap that is generated when the actual temperature reading is above the warning temperature threshold.') snTrapAccessListDeny = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,37)).setObjects(("HP-SN-AGENT-MIB", "snAgGblTrapMessage")) if mibBuilder.loadTexts: snTrapAccessListDeny.setDescription('The SNMP trap that is generated when a packet was denied by an access list.') snTrapMacFilterDeny = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,38)).setObjects(("HP-SN-AGENT-MIB", "snAgGblTrapMessage")) if mibBuilder.loadTexts: snTrapMacFilterDeny.setDescription('The SNMP trap that is generated when a packet was denied by a MAC address filter.') snTrapL4GslbRemoteUp = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,39)).setObjects(("HP-SN-AGENT-MIB", "snAgGblTrapMessage")) if mibBuilder.loadTexts: snTrapL4GslbRemoteUp.setDescription('The SNMP trap that is generated when the connection to the remote SI is established.') snTrapL4GslbRemoteDown = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,40)).setObjects(("HP-SN-AGENT-MIB", "snAgGblTrapMessage")) if mibBuilder.loadTexts: snTrapL4GslbRemoteDown.setDescription('The SNMP trap that is generated when the connection to the remote SI is down.') snTrapL4GslbRemoteControllerUp = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,41)).setObjects(("HP-SN-AGENT-MIB", "snAgGblTrapMessage")) if mibBuilder.loadTexts: snTrapL4GslbRemoteControllerUp.setDescription('The SNMP trap that is generated when the connection to the GSLB SI is established.') snTrapL4GslbRemoteControllerDown = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,42)).setObjects(("HP-SN-AGENT-MIB", "snAgGblTrapMessage")) if mibBuilder.loadTexts: snTrapL4GslbRemoteControllerDown.setDescription('The SNMP trap that is generated when the connection to the GSLB SI is down.') snTrapL4GslbHealthCheckIpUp = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,43)).setObjects(("HP-SN-AGENT-MIB", "snAgGblTrapMessage")) if mibBuilder.loadTexts: snTrapL4GslbHealthCheckIpUp.setDescription('The SNMP trap that is generated when GSLB health check for an address transitions from down to active state.') snTrapL4GslbHealthCheckIpDown = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,44)).setObjects(("HP-SN-AGENT-MIB", "snAgGblTrapMessage")) if mibBuilder.loadTexts: snTrapL4GslbHealthCheckIpDown.setDescription('The SNMP trap that is generated when GSLB health check for an address transitions from active to down state.') snTrapL4GslbHealthCheckIpPortUp = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,45)).setObjects(("HP-SN-AGENT-MIB", "snAgGblTrapMessage")) if mibBuilder.loadTexts: snTrapL4GslbHealthCheckIpPortUp.setDescription('The SNMP trap that is generated when a given port for a health check address is up.') snTrapL4GslbHealthCheckIpPortDown = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,46)).setObjects(("HP-SN-AGENT-MIB", "snAgGblTrapMessage")) if mibBuilder.loadTexts: snTrapL4GslbHealthCheckIpPortDown.setDescription('The SNMP trap that is generated when a given port for a health check address is down.') snTrapL4FirewallBecomeStandby = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,47)) if mibBuilder.loadTexts: snTrapL4FirewallBecomeStandby.setDescription('The SNMP trap that is generated when the server load balancing switch Firewall changes state from active to standby.') snTrapL4FirewallBecomeActive = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,48)) if mibBuilder.loadTexts: snTrapL4FirewallBecomeActive.setDescription('The SNMP trap that is generated when the server load balancing switch Firewall changes state from standby to active.') snTrapL4FirewallPathUp = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,49)) if mibBuilder.loadTexts: snTrapL4FirewallPathUp.setDescription('The SNMP trap that is generated when the server load balancing switch Firewall path is up.') snTrapL4FirewallPathDown = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,50)) if mibBuilder.loadTexts: snTrapL4FirewallPathDown.setDescription('The SNMP trap that is generated when the server load balancing switch Firewall path is down.') snTrapIcmpLocalExceedBurst = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,51)).setObjects(("HP-SN-AGENT-MIB", "snAgGblTrapMessage")) if mibBuilder.loadTexts: snTrapIcmpLocalExceedBurst.setDescription('The SNMP trap that is generated when incoming ICMP exceeds burst-MAX.') snTrapIcmpTransitExceedBurst = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,52)).setObjects(("HP-SN-AGENT-MIB", "snAgGblTrapMessage")) if mibBuilder.loadTexts: snTrapIcmpTransitExceedBurst.setDescription('The SNMP trap that is generated when transit ICMP exceeds burst-MAX.') snTrapTcpLocalExceedBurst = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,53)).setObjects(("HP-SN-AGENT-MIB", "snAgGblTrapMessage")) if mibBuilder.loadTexts: snTrapTcpLocalExceedBurst.setDescription('The SNMP trap that is generated when incoming TCP SYN exceeds burst-MAX.') snTrapTcpTransitExceedBurst = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,54)).setObjects(("HP-SN-AGENT-MIB", "snAgGblTrapMessage")) if mibBuilder.loadTexts: snTrapTcpTransitExceedBurst.setDescription('The SNMP trap that is generated when transit TCP exceeds burst-MAX.') snTrapL4ContentVerification = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,55)) if mibBuilder.loadTexts: snTrapL4ContentVerification.setDescription('The SNMP trap that is generated when the HTTP match-list pattern is found.') snTrapDuplicateIp = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,56)) if mibBuilder.loadTexts: snTrapDuplicateIp.setDescription('Duplicate IP address detected.') snTrapMplsProblem = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,57)) if mibBuilder.loadTexts: snTrapMplsProblem.setDescription('MPLS Problem Detected.') snTrapMplsException = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,58)) if mibBuilder.loadTexts: snTrapMplsException.setDescription('MPLS Exception Detected.') snTrapMplsAudit = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,59)) if mibBuilder.loadTexts: snTrapMplsAudit.setDescription('MPLS Audit Trap.') snTrapMplsDeveloper = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,60)) if mibBuilder.loadTexts: snTrapMplsDeveloper.setDescription('MPLS Developer Trap.') snTrapNoBmFreeQueue = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,61)).setObjects(("HP-SN-AGENT-MIB", "snAgGblTrapMessage")) if mibBuilder.loadTexts: snTrapNoBmFreeQueue.setDescription('The SNMP trap that is generated when no free queue is available in buffer manager.') snTrapSmcDmaDrop = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,62)).setObjects(("HP-SN-AGENT-MIB", "snAgGblTrapMessage")) if mibBuilder.loadTexts: snTrapSmcDmaDrop.setDescription('The SNMP trap that is generated when SMC DMA packet is dropped.') snTrapSmcBpDrop = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,63)).setObjects(("HP-SN-AGENT-MIB", "snAgGblTrapMessage")) if mibBuilder.loadTexts: snTrapSmcBpDrop.setDescription('The SNMP trap that is generated when SMC BackPlane packet is dropped.') snTrapBmWriteSeqDrop = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,64)).setObjects(("HP-SN-AGENT-MIB", "snAgGblTrapMessage")) if mibBuilder.loadTexts: snTrapBmWriteSeqDrop.setDescription('The SNMP trap that is generated when BM write sequence packet is dropped.') snTrapBgpPeerUp = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,65)).setObjects(("HP-SN-AGENT-MIB", "snAgGblTrapMessage")) if mibBuilder.loadTexts: snTrapBgpPeerUp.setDescription('The SNMP trap that is generated when the bgp peer is up.') snTrapBgpPeerDown = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,66)).setObjects(("HP-SN-AGENT-MIB", "snAgGblTrapMessage")) if mibBuilder.loadTexts: snTrapBgpPeerDown.setDescription('The SNMP trap that is generated when the bgp peer is down.') snTrapL4RealServerResponseTimeLowerLimit = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,67)).setObjects(("HP-SN-AGENT-MIB", "snAgGblTrapMessage")) if mibBuilder.loadTexts: snTrapL4RealServerResponseTimeLowerLimit.setDescription('The SNMP trap that is generated when the real server average response time exceeds lower threshold.') snTrapL4RealServerResponseTimeUpperLimit = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,68)).setObjects(("HP-SN-AGENT-MIB", "snAgGblTrapMessage")) if mibBuilder.loadTexts: snTrapL4RealServerResponseTimeUpperLimit.setDescription('The SNMP trap that is generated when the real server average response time exceeds upper threshold.') snTrapL4TcpAttackRateExceedMax = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,69)).setObjects(("HP-SN-AGENT-MIB", "snAgGblTrapMessage")) if mibBuilder.loadTexts: snTrapL4TcpAttackRateExceedMax.setDescription('The SNMP trap that is generated when the TCP attack rate exceeds configured maximum.') snTrapL4TcpAttackRateExceedThreshold = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,70)).setObjects(("HP-SN-AGENT-MIB", "snAgGblTrapMessage")) if mibBuilder.loadTexts: snTrapL4TcpAttackRateExceedThreshold.setDescription('The SNMP trap that is generated when the TCP attack rate exceeds 80% of configured maximum.') snTrapL4ConnectionRateExceedMax = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,71)).setObjects(("HP-SN-AGENT-MIB", "snAgGblTrapMessage")) if mibBuilder.loadTexts: snTrapL4ConnectionRateExceedMax.setDescription('The SNMP trap that is generated when the L4 connection rate exceeds configured maximum.') snTrapL4ConnectionRateExceedThreshold = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,72)).setObjects(("HP-SN-AGENT-MIB", "snAgGblTrapMessage")) if mibBuilder.loadTexts: snTrapL4ConnectionRateExceedThreshold.setDescription('The SNMP trap that is generated when the L4 connection rate exceeds 80% of configured maximum') snTrapRunningConfigChanged = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,73)).setObjects(("HP-SN-AGENT-MIB", "snAgGblTrapMessage")) if mibBuilder.loadTexts: snTrapRunningConfigChanged.setDescription('The SNMP trap that is generated when the running configuration was changed.') snTrapStartupConfigChanged = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,74)).setObjects(("HP-SN-AGENT-MIB", "snAgGblTrapMessage")) if mibBuilder.loadTexts: snTrapStartupConfigChanged.setDescription('The SNMP trap that is generated when the startup configuration was changed.') snTrapUserLogin = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,75)).setObjects(("HP-SN-AGENT-MIB", "snAgGblTrapMessage")) if mibBuilder.loadTexts: snTrapUserLogin.setDescription('The SNMP trap that is generated when user login.') snTrapUserLogout = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,76)).setObjects(("HP-SN-AGENT-MIB", "snAgGblTrapMessage")) if mibBuilder.loadTexts: snTrapUserLogout.setDescription('The SNMP trap that is generated when user logout.') snTrapPortSecurityViolation = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,77)).setObjects(("HP-SN-AGENT-MIB", "snAgGblTrapMessage")) if mibBuilder.loadTexts: snTrapPortSecurityViolation.setDescription('The SNMP trap that is generated when insecure MAC addresses are received from a port with MAC security feature enabled.') snTrapPortSecurityShutdown = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,78)).setObjects(("HP-SN-AGENT-MIB", "snAgGblTrapMessage")) if mibBuilder.loadTexts: snTrapPortSecurityShutdown.setDescription('The SNMP trap that is generated when insecure MAC addresses are received from a port caused the port to shutdown.') snTrapMrpStateChange = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,79)).setObjects(("HP-SN-AGENT-MIB", "snAgGblTrapMessage")) if mibBuilder.loadTexts: snTrapMrpStateChange.setDescription('The SNMP trap that is generated when a MRP switching and routing device changed state to disabled, blocking, preforwarding, forwarding, uknown.') snTrapMrpCamError = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,80)).setObjects(("HP-SN-AGENT-MIB", "snAgGblTrapMessage")) if mibBuilder.loadTexts: snTrapMrpCamError.setDescription('The SNMP trap that is generated when a MRP Cam Error occurs.') snTrapChasPwrSupplyOK = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,81)).setObjects(("HP-SN-AGENT-MIB", "snChasPwrSupplyIndex"), ("HP-SN-AGENT-MIB", "snChasPwrSupplyDescription")) if mibBuilder.loadTexts: snTrapChasPwrSupplyOK.setDescription('The SNMP trap that is generated when a power supply operational status changed from failure to normal.') snTrapVrrpeIfStateChange = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,82)).setObjects(("HP-SN-AGENT-MIB", "snAgGblTrapMessage")) if mibBuilder.loadTexts: snTrapVrrpeIfStateChange.setDescription('The SNMP trap that is generated when a VRRPE routing device switched between states master, backup, intialized or uknown.') snTrapVsrpIfStateChange = NotificationType((1, 3, 6, 1, 4, 1, 11) + (0,83)).setObjects(("HP-SN-AGENT-MIB", "snAgGblTrapMessage")) if mibBuilder.loadTexts: snTrapVsrpIfStateChange.setDescription('The SNMP trap that is generated when a VSRP switching and routing device switched between states master, backup, intialized or uknown.') mibBuilder.exportSymbols("HP-SN-TRAP-MIB", snTrapModuleRemoved=snTrapModuleRemoved, snTrapMplsException=snTrapMplsException, snTrapBgpPeerDown=snTrapBgpPeerDown, snTrapTcpLocalExceedBurst=snTrapTcpLocalExceedBurst, snTrapRunningConfigChanged=snTrapRunningConfigChanged, snTrapL4ConnectionRateExceedThreshold=snTrapL4ConnectionRateExceedThreshold, snTrapIcmpTransitExceedBurst=snTrapIcmpTransitExceedBurst, snTrapAccessListDeny=snTrapAccessListDeny, snTrapMrpStateChange=snTrapMrpStateChange, snTrapSmcDmaDrop=snTrapSmcDmaDrop, snTrapMplsProblem=snTrapMplsProblem, snTrapL4RealServerResponseTimeUpperLimit=snTrapL4RealServerResponseTimeUpperLimit, snTrapL4GslbRemoteControllerDown=snTrapL4GslbRemoteControllerDown, snTrapDuplicateIp=snTrapDuplicateIp, snTrapLockedAddressViolation2=snTrapLockedAddressViolation2, snTrapL4BecomeActive=snTrapL4BecomeActive, snTrapPortSecurityViolation=snTrapPortSecurityViolation, snTrapFsrpIfStateChange=snTrapFsrpIfStateChange, snTrapL4MaxSessionLimitReached=snTrapL4MaxSessionLimitReached, snTrapNoBmFreeQueue=snTrapNoBmFreeQueue, snTrapMacFilterDeny=snTrapMacFilterDeny, snTrapL4ConnectionRateExceedMax=snTrapL4ConnectionRateExceedMax, snTrapL4RealServerDown=snTrapL4RealServerDown, snTrapL4RealServerUp=snTrapL4RealServerUp, snTrapMgmtModuleRedunStateChange=snTrapMgmtModuleRedunStateChange, snTrapL4GslbHealthCheckIpDown=snTrapL4GslbHealthCheckIpDown, snTrapUserLogout=snTrapUserLogout, snTrapMrpCamError=snTrapMrpCamError, snTrapVsrpIfStateChange=snTrapVsrpIfStateChange, snTrapL4FirewallPathDown=snTrapL4FirewallPathDown, snTrapBmWriteSeqDrop=snTrapBmWriteSeqDrop, snTrapL4TcpAttackRateExceedMax=snTrapL4TcpAttackRateExceedMax, snTrapL4TcpAttackRateExceedThreshold=snTrapL4TcpAttackRateExceedThreshold, snTrapL4TcpSynLimitReached=snTrapL4TcpSynLimitReached, snTrapBgpPeerUp=snTrapBgpPeerUp, snTrapPortSecurityShutdown=snTrapPortSecurityShutdown, snTrapL4RealServerPortUp=snTrapL4RealServerPortUp, snTrapL4RealServerMaxConnectionLimitReached=snTrapL4RealServerMaxConnectionLimitReached, snTrapChasPwrSupply=snTrapChasPwrSupply, snTrapChasPwrSupplyFailed=snTrapChasPwrSupplyFailed, snTrapVrrpIfStateChange=snTrapVrrpIfStateChange, snTrapL4GslbRemoteUp=snTrapL4GslbRemoteUp, snTrapL4FirewallPathUp=snTrapL4FirewallPathUp, snTrapTcpTransitExceedBurst=snTrapTcpTransitExceedBurst, snTrapL4BecomeStandby=snTrapL4BecomeStandby, snTrapL4GslbHealthCheckIpUp=snTrapL4GslbHealthCheckIpUp, snTrapUserLogin=snTrapUserLogin, snTrapChasPwrSupplyOK=snTrapChasPwrSupplyOK, snTrapVrrpeIfStateChange=snTrapVrrpeIfStateChange, snTrapL4FirewallBecomeActive=snTrapL4FirewallBecomeActive, snTrapSmcBpDrop=snTrapSmcBpDrop, snTrapL4RealServerResponseTimeLowerLimit=snTrapL4RealServerResponseTimeLowerLimit, snTrapMplsDeveloper=snTrapMplsDeveloper, snTrapL4GslbRemoteDown=snTrapL4GslbRemoteDown, snTrapL4GslbHealthCheckIpPortUp=snTrapL4GslbHealthCheckIpPortUp, snTrapL4GslbRemoteControllerUp=snTrapL4GslbRemoteControllerUp, snTrapLockedAddressViolation=snTrapLockedAddressViolation, snTrapIcmpLocalExceedBurst=snTrapIcmpLocalExceedBurst, snTrapChasFanFailed=snTrapChasFanFailed, snTrapL4ContentVerification=snTrapL4ContentVerification, snTrapMplsAudit=snTrapMplsAudit, snTrapStartupConfigChanged=snTrapStartupConfigChanged, snTrapTemperatureWarning=snTrapTemperatureWarning, snTrapL4GslbHealthCheckIpPortDown=snTrapL4GslbHealthCheckIpPortDown, snTrapModuleInserted=snTrapModuleInserted, snTrapL4RealServerPortDown=snTrapL4RealServerPortDown, snTrapL4FirewallBecomeStandby=snTrapL4FirewallBecomeStandby)
(octet_string, integer, object_identifier) = mibBuilder.importSymbols('ASN1', 'OctetString', 'Integer', 'ObjectIdentifier') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (value_size_constraint, single_value_constraint, value_range_constraint, constraints_intersection, constraints_union) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueSizeConstraint', 'SingleValueConstraint', 'ValueRangeConstraint', 'ConstraintsIntersection', 'ConstraintsUnion') (sn_agent_brd_index, sn_chas_pwr_supply_status, sn_chas_pwr_supply_index, sn_chas_fan_index, sn_chas_fan_description, sn_chas_pwr_supply_description, sn_ag_gbl_trap_message) = mibBuilder.importSymbols('HP-SN-AGENT-MIB', 'snAgentBrdIndex', 'snChasPwrSupplyStatus', 'snChasPwrSupplyIndex', 'snChasFanIndex', 'snChasFanDescription', 'snChasPwrSupplyDescription', 'snAgGblTrapMessage') (hp,) = mibBuilder.importSymbols('HP-SN-ROOT-MIB', 'hp') (sn_l4_trap_real_server_name, sn_l4_trap_real_server_port, sn_l4_trap_real_server_ip, sn_l4_max_session_limit, sn_l4_tcp_syn_limit, sn_l4_trap_real_server_cur_connections) = mibBuilder.importSymbols('HP-SN-SW-L4-SWITCH-GROUP-MIB', 'snL4TrapRealServerName', 'snL4TrapRealServerPort', 'snL4TrapRealServerIP', 'snL4MaxSessionLimit', 'snL4TcpSynLimit', 'snL4TrapRealServerCurConnections') (sn_sw_violator_mac_address, sn_sw_violator_port_number) = mibBuilder.importSymbols('HP-SN-SWITCH-GROUP-MIB', 'snSwViolatorMacAddress', 'snSwViolatorPortNumber') (notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance') (mib_scalar, mib_table, mib_table_row, mib_table_column, bits, mib_identifier, time_ticks, integer32, notification_type, unsigned32, iso, counter64, gauge32, object_identity, counter32, ip_address, notification_type, module_identity) = mibBuilder.importSymbols('SNMPv2-SMI', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Bits', 'MibIdentifier', 'TimeTicks', 'Integer32', 'NotificationType', 'Unsigned32', 'iso', 'Counter64', 'Gauge32', 'ObjectIdentity', 'Counter32', 'IpAddress', 'NotificationType', 'ModuleIdentity') (display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention') sn_trap_chas_pwr_supply = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 1)).setObjects(('HP-SN-AGENT-MIB', 'snChasPwrSupplyStatus')) if mibBuilder.loadTexts: snTrapChasPwrSupply.setDescription('The SNMP trap that is generated when a power supply fails to operate normally. The value is a packed bit string; the 2 power supplies status are encoded into 4 bits (a nibble). The following shows the meaning of each bit: (bit 0 is the least significant bit). bit position meaning ------------ ------- 4-31 reserved 3 Power Supply 2 DC (0=bad, 1=good). 2 Power Supply 1 DC (0=bad, 1=good). 1 Power Supply 2 present status (0=present, 1=not-present). 0 Power Supply 1 present status (0=present, 1=not-present).') sn_trap_locked_address_violation = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 2)).setObjects(('HP-SN-SWITCH-GROUP-MIB', 'snSwViolatorPortNumber'), ('HP-SN-SWITCH-GROUP-MIB', 'snSwViolatorMacAddress')) if mibBuilder.loadTexts: snTrapLockedAddressViolation.setDescription('The SNMP trap that is generated when more source MAC addresses are received from a port than the maximum number of addresses configured to that port.') sn_trap_l4_max_session_limit_reached = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 19)).setObjects(('HP-SN-SW-L4-SWITCH-GROUP-MIB', 'snL4MaxSessionLimit')) if mibBuilder.loadTexts: snTrapL4MaxSessionLimitReached.setDescription('The SNMP trap that is generated when the maximum number of connections reached.') sn_trap_l4_tcp_syn_limit_reached = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 20)).setObjects(('HP-SN-SW-L4-SWITCH-GROUP-MIB', 'snL4TcpSynLimit')) if mibBuilder.loadTexts: snTrapL4TcpSynLimitReached.setDescription('The SNMP trap that is generated when the number of TCP SYN limits reached.') sn_trap_l4_real_server_up = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 21)).setObjects(('HP-SN-SW-L4-SWITCH-GROUP-MIB', 'snL4TrapRealServerIP'), ('HP-SN-SW-L4-SWITCH-GROUP-MIB', 'snL4TrapRealServerName')) if mibBuilder.loadTexts: snTrapL4RealServerUp.setDescription('The SNMP trap that is generated when the load balancing real server is up.') sn_trap_l4_real_server_down = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 22)).setObjects(('HP-SN-SW-L4-SWITCH-GROUP-MIB', 'snL4TrapRealServerIP'), ('HP-SN-SW-L4-SWITCH-GROUP-MIB', 'snL4TrapRealServerName')) if mibBuilder.loadTexts: snTrapL4RealServerDown.setDescription('The SNMP trap that is generated when the load balancing real server is down.') sn_trap_l4_real_server_port_up = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 23)).setObjects(('HP-SN-SW-L4-SWITCH-GROUP-MIB', 'snL4TrapRealServerIP'), ('HP-SN-SW-L4-SWITCH-GROUP-MIB', 'snL4TrapRealServerName'), ('HP-SN-SW-L4-SWITCH-GROUP-MIB', 'snL4TrapRealServerPort')) if mibBuilder.loadTexts: snTrapL4RealServerPortUp.setDescription('The SNMP trap that is generated when the load balancing real server TCP port is up.') sn_trap_l4_real_server_port_down = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 24)).setObjects(('HP-SN-SW-L4-SWITCH-GROUP-MIB', 'snL4TrapRealServerIP'), ('HP-SN-SW-L4-SWITCH-GROUP-MIB', 'snL4TrapRealServerName'), ('HP-SN-SW-L4-SWITCH-GROUP-MIB', 'snL4TrapRealServerPort')) if mibBuilder.loadTexts: snTrapL4RealServerPortDown.setDescription('The SNMP trap that is generated when the load balancing real server TCP port is down.') sn_trap_l4_real_server_max_connection_limit_reached = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 25)).setObjects(('HP-SN-SW-L4-SWITCH-GROUP-MIB', 'snL4TrapRealServerIP'), ('HP-SN-SW-L4-SWITCH-GROUP-MIB', 'snL4TrapRealServerName'), ('HP-SN-SW-L4-SWITCH-GROUP-MIB', 'snL4TrapRealServerCurConnections')) if mibBuilder.loadTexts: snTrapL4RealServerMaxConnectionLimitReached.setDescription('The SNMP trap that is generated when the real server reaches maximum number of connections.') sn_trap_l4_become_standby = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 26)) if mibBuilder.loadTexts: snTrapL4BecomeStandby.setDescription('The SNMP trap that is generated when the server load balancing switch changes state from active to standby.') sn_trap_l4_become_active = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 27)) if mibBuilder.loadTexts: snTrapL4BecomeActive.setDescription('The SNMP trap that is generated when the server load balancing switch changes state from standby to active.') sn_trap_module_inserted = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 28)).setObjects(('HP-SN-AGENT-MIB', 'snAgentBrdIndex')) if mibBuilder.loadTexts: snTrapModuleInserted.setDescription('The SNMP trap that is generated when a module was inserted to the chassis during system running.') sn_trap_module_removed = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 29)).setObjects(('HP-SN-AGENT-MIB', 'snAgentBrdIndex')) if mibBuilder.loadTexts: snTrapModuleRemoved.setDescription('The SNMP trap that is generated when a module was removed from the chassis during system running.') sn_trap_chas_pwr_supply_failed = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 30)).setObjects(('HP-SN-AGENT-MIB', 'snChasPwrSupplyIndex'), ('HP-SN-AGENT-MIB', 'snChasPwrSupplyDescription')) if mibBuilder.loadTexts: snTrapChasPwrSupplyFailed.setDescription('The SNMP trap that is generated when a power supply operational status changed from normal to failure.') sn_trap_chas_fan_failed = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 31)).setObjects(('HP-SN-AGENT-MIB', 'snChasFanIndex'), ('HP-SN-AGENT-MIB', 'snChasFanDescription')) if mibBuilder.loadTexts: snTrapChasFanFailed.setDescription('The SNMP trap that is generated when a fan fails to operate normally.') sn_trap_locked_address_violation2 = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 32)).setObjects(('HP-SN-AGENT-MIB', 'snAgGblTrapMessage')) if mibBuilder.loadTexts: snTrapLockedAddressViolation2.setDescription('The SNMP trap that is generated when more source MAC addresses are received from a port than the maximum number of addresses configured to that port.') sn_trap_fsrp_if_state_change = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 33)).setObjects(('HP-SN-AGENT-MIB', 'snAgGblTrapMessage')) if mibBuilder.loadTexts: snTrapFsrpIfStateChange.setDescription('The SNMP trap that is generated when a FSRP routing device changed state from active to standby or vice-versa.') sn_trap_vrrp_if_state_change = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 34)).setObjects(('HP-SN-AGENT-MIB', 'snAgGblTrapMessage')) if mibBuilder.loadTexts: snTrapVrrpIfStateChange.setDescription('The SNMP trap that is generated when a VRRP routing device switched between states master, backup, intialized or uknown.') sn_trap_mgmt_module_redun_state_change = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 35)).setObjects(('HP-SN-AGENT-MIB', 'snAgGblTrapMessage')) if mibBuilder.loadTexts: snTrapMgmtModuleRedunStateChange.setDescription('The SNMP trap that is generated when the management module changes redundancy state.') sn_trap_temperature_warning = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 36)).setObjects(('HP-SN-AGENT-MIB', 'snAgGblTrapMessage')) if mibBuilder.loadTexts: snTrapTemperatureWarning.setDescription('The SNMP trap that is generated when the actual temperature reading is above the warning temperature threshold.') sn_trap_access_list_deny = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 37)).setObjects(('HP-SN-AGENT-MIB', 'snAgGblTrapMessage')) if mibBuilder.loadTexts: snTrapAccessListDeny.setDescription('The SNMP trap that is generated when a packet was denied by an access list.') sn_trap_mac_filter_deny = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 38)).setObjects(('HP-SN-AGENT-MIB', 'snAgGblTrapMessage')) if mibBuilder.loadTexts: snTrapMacFilterDeny.setDescription('The SNMP trap that is generated when a packet was denied by a MAC address filter.') sn_trap_l4_gslb_remote_up = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 39)).setObjects(('HP-SN-AGENT-MIB', 'snAgGblTrapMessage')) if mibBuilder.loadTexts: snTrapL4GslbRemoteUp.setDescription('The SNMP trap that is generated when the connection to the remote SI is established.') sn_trap_l4_gslb_remote_down = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 40)).setObjects(('HP-SN-AGENT-MIB', 'snAgGblTrapMessage')) if mibBuilder.loadTexts: snTrapL4GslbRemoteDown.setDescription('The SNMP trap that is generated when the connection to the remote SI is down.') sn_trap_l4_gslb_remote_controller_up = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 41)).setObjects(('HP-SN-AGENT-MIB', 'snAgGblTrapMessage')) if mibBuilder.loadTexts: snTrapL4GslbRemoteControllerUp.setDescription('The SNMP trap that is generated when the connection to the GSLB SI is established.') sn_trap_l4_gslb_remote_controller_down = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 42)).setObjects(('HP-SN-AGENT-MIB', 'snAgGblTrapMessage')) if mibBuilder.loadTexts: snTrapL4GslbRemoteControllerDown.setDescription('The SNMP trap that is generated when the connection to the GSLB SI is down.') sn_trap_l4_gslb_health_check_ip_up = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 43)).setObjects(('HP-SN-AGENT-MIB', 'snAgGblTrapMessage')) if mibBuilder.loadTexts: snTrapL4GslbHealthCheckIpUp.setDescription('The SNMP trap that is generated when GSLB health check for an address transitions from down to active state.') sn_trap_l4_gslb_health_check_ip_down = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 44)).setObjects(('HP-SN-AGENT-MIB', 'snAgGblTrapMessage')) if mibBuilder.loadTexts: snTrapL4GslbHealthCheckIpDown.setDescription('The SNMP trap that is generated when GSLB health check for an address transitions from active to down state.') sn_trap_l4_gslb_health_check_ip_port_up = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 45)).setObjects(('HP-SN-AGENT-MIB', 'snAgGblTrapMessage')) if mibBuilder.loadTexts: snTrapL4GslbHealthCheckIpPortUp.setDescription('The SNMP trap that is generated when a given port for a health check address is up.') sn_trap_l4_gslb_health_check_ip_port_down = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 46)).setObjects(('HP-SN-AGENT-MIB', 'snAgGblTrapMessage')) if mibBuilder.loadTexts: snTrapL4GslbHealthCheckIpPortDown.setDescription('The SNMP trap that is generated when a given port for a health check address is down.') sn_trap_l4_firewall_become_standby = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 47)) if mibBuilder.loadTexts: snTrapL4FirewallBecomeStandby.setDescription('The SNMP trap that is generated when the server load balancing switch Firewall changes state from active to standby.') sn_trap_l4_firewall_become_active = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 48)) if mibBuilder.loadTexts: snTrapL4FirewallBecomeActive.setDescription('The SNMP trap that is generated when the server load balancing switch Firewall changes state from standby to active.') sn_trap_l4_firewall_path_up = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 49)) if mibBuilder.loadTexts: snTrapL4FirewallPathUp.setDescription('The SNMP trap that is generated when the server load balancing switch Firewall path is up.') sn_trap_l4_firewall_path_down = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 50)) if mibBuilder.loadTexts: snTrapL4FirewallPathDown.setDescription('The SNMP trap that is generated when the server load balancing switch Firewall path is down.') sn_trap_icmp_local_exceed_burst = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 51)).setObjects(('HP-SN-AGENT-MIB', 'snAgGblTrapMessage')) if mibBuilder.loadTexts: snTrapIcmpLocalExceedBurst.setDescription('The SNMP trap that is generated when incoming ICMP exceeds burst-MAX.') sn_trap_icmp_transit_exceed_burst = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 52)).setObjects(('HP-SN-AGENT-MIB', 'snAgGblTrapMessage')) if mibBuilder.loadTexts: snTrapIcmpTransitExceedBurst.setDescription('The SNMP trap that is generated when transit ICMP exceeds burst-MAX.') sn_trap_tcp_local_exceed_burst = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 53)).setObjects(('HP-SN-AGENT-MIB', 'snAgGblTrapMessage')) if mibBuilder.loadTexts: snTrapTcpLocalExceedBurst.setDescription('The SNMP trap that is generated when incoming TCP SYN exceeds burst-MAX.') sn_trap_tcp_transit_exceed_burst = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 54)).setObjects(('HP-SN-AGENT-MIB', 'snAgGblTrapMessage')) if mibBuilder.loadTexts: snTrapTcpTransitExceedBurst.setDescription('The SNMP trap that is generated when transit TCP exceeds burst-MAX.') sn_trap_l4_content_verification = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 55)) if mibBuilder.loadTexts: snTrapL4ContentVerification.setDescription('The SNMP trap that is generated when the HTTP match-list pattern is found.') sn_trap_duplicate_ip = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 56)) if mibBuilder.loadTexts: snTrapDuplicateIp.setDescription('Duplicate IP address detected.') sn_trap_mpls_problem = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 57)) if mibBuilder.loadTexts: snTrapMplsProblem.setDescription('MPLS Problem Detected.') sn_trap_mpls_exception = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 58)) if mibBuilder.loadTexts: snTrapMplsException.setDescription('MPLS Exception Detected.') sn_trap_mpls_audit = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 59)) if mibBuilder.loadTexts: snTrapMplsAudit.setDescription('MPLS Audit Trap.') sn_trap_mpls_developer = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 60)) if mibBuilder.loadTexts: snTrapMplsDeveloper.setDescription('MPLS Developer Trap.') sn_trap_no_bm_free_queue = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 61)).setObjects(('HP-SN-AGENT-MIB', 'snAgGblTrapMessage')) if mibBuilder.loadTexts: snTrapNoBmFreeQueue.setDescription('The SNMP trap that is generated when no free queue is available in buffer manager.') sn_trap_smc_dma_drop = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 62)).setObjects(('HP-SN-AGENT-MIB', 'snAgGblTrapMessage')) if mibBuilder.loadTexts: snTrapSmcDmaDrop.setDescription('The SNMP trap that is generated when SMC DMA packet is dropped.') sn_trap_smc_bp_drop = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 63)).setObjects(('HP-SN-AGENT-MIB', 'snAgGblTrapMessage')) if mibBuilder.loadTexts: snTrapSmcBpDrop.setDescription('The SNMP trap that is generated when SMC BackPlane packet is dropped.') sn_trap_bm_write_seq_drop = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 64)).setObjects(('HP-SN-AGENT-MIB', 'snAgGblTrapMessage')) if mibBuilder.loadTexts: snTrapBmWriteSeqDrop.setDescription('The SNMP trap that is generated when BM write sequence packet is dropped.') sn_trap_bgp_peer_up = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 65)).setObjects(('HP-SN-AGENT-MIB', 'snAgGblTrapMessage')) if mibBuilder.loadTexts: snTrapBgpPeerUp.setDescription('The SNMP trap that is generated when the bgp peer is up.') sn_trap_bgp_peer_down = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 66)).setObjects(('HP-SN-AGENT-MIB', 'snAgGblTrapMessage')) if mibBuilder.loadTexts: snTrapBgpPeerDown.setDescription('The SNMP trap that is generated when the bgp peer is down.') sn_trap_l4_real_server_response_time_lower_limit = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 67)).setObjects(('HP-SN-AGENT-MIB', 'snAgGblTrapMessage')) if mibBuilder.loadTexts: snTrapL4RealServerResponseTimeLowerLimit.setDescription('The SNMP trap that is generated when the real server average response time exceeds lower threshold.') sn_trap_l4_real_server_response_time_upper_limit = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 68)).setObjects(('HP-SN-AGENT-MIB', 'snAgGblTrapMessage')) if mibBuilder.loadTexts: snTrapL4RealServerResponseTimeUpperLimit.setDescription('The SNMP trap that is generated when the real server average response time exceeds upper threshold.') sn_trap_l4_tcp_attack_rate_exceed_max = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 69)).setObjects(('HP-SN-AGENT-MIB', 'snAgGblTrapMessage')) if mibBuilder.loadTexts: snTrapL4TcpAttackRateExceedMax.setDescription('The SNMP trap that is generated when the TCP attack rate exceeds configured maximum.') sn_trap_l4_tcp_attack_rate_exceed_threshold = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 70)).setObjects(('HP-SN-AGENT-MIB', 'snAgGblTrapMessage')) if mibBuilder.loadTexts: snTrapL4TcpAttackRateExceedThreshold.setDescription('The SNMP trap that is generated when the TCP attack rate exceeds 80% of configured maximum.') sn_trap_l4_connection_rate_exceed_max = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 71)).setObjects(('HP-SN-AGENT-MIB', 'snAgGblTrapMessage')) if mibBuilder.loadTexts: snTrapL4ConnectionRateExceedMax.setDescription('The SNMP trap that is generated when the L4 connection rate exceeds configured maximum.') sn_trap_l4_connection_rate_exceed_threshold = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 72)).setObjects(('HP-SN-AGENT-MIB', 'snAgGblTrapMessage')) if mibBuilder.loadTexts: snTrapL4ConnectionRateExceedThreshold.setDescription('The SNMP trap that is generated when the L4 connection rate exceeds 80% of configured maximum') sn_trap_running_config_changed = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 73)).setObjects(('HP-SN-AGENT-MIB', 'snAgGblTrapMessage')) if mibBuilder.loadTexts: snTrapRunningConfigChanged.setDescription('The SNMP trap that is generated when the running configuration was changed.') sn_trap_startup_config_changed = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 74)).setObjects(('HP-SN-AGENT-MIB', 'snAgGblTrapMessage')) if mibBuilder.loadTexts: snTrapStartupConfigChanged.setDescription('The SNMP trap that is generated when the startup configuration was changed.') sn_trap_user_login = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 75)).setObjects(('HP-SN-AGENT-MIB', 'snAgGblTrapMessage')) if mibBuilder.loadTexts: snTrapUserLogin.setDescription('The SNMP trap that is generated when user login.') sn_trap_user_logout = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 76)).setObjects(('HP-SN-AGENT-MIB', 'snAgGblTrapMessage')) if mibBuilder.loadTexts: snTrapUserLogout.setDescription('The SNMP trap that is generated when user logout.') sn_trap_port_security_violation = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 77)).setObjects(('HP-SN-AGENT-MIB', 'snAgGblTrapMessage')) if mibBuilder.loadTexts: snTrapPortSecurityViolation.setDescription('The SNMP trap that is generated when insecure MAC addresses are received from a port with MAC security feature enabled.') sn_trap_port_security_shutdown = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 78)).setObjects(('HP-SN-AGENT-MIB', 'snAgGblTrapMessage')) if mibBuilder.loadTexts: snTrapPortSecurityShutdown.setDescription('The SNMP trap that is generated when insecure MAC addresses are received from a port caused the port to shutdown.') sn_trap_mrp_state_change = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 79)).setObjects(('HP-SN-AGENT-MIB', 'snAgGblTrapMessage')) if mibBuilder.loadTexts: snTrapMrpStateChange.setDescription('The SNMP trap that is generated when a MRP switching and routing device changed state to disabled, blocking, preforwarding, forwarding, uknown.') sn_trap_mrp_cam_error = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 80)).setObjects(('HP-SN-AGENT-MIB', 'snAgGblTrapMessage')) if mibBuilder.loadTexts: snTrapMrpCamError.setDescription('The SNMP trap that is generated when a MRP Cam Error occurs.') sn_trap_chas_pwr_supply_ok = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 81)).setObjects(('HP-SN-AGENT-MIB', 'snChasPwrSupplyIndex'), ('HP-SN-AGENT-MIB', 'snChasPwrSupplyDescription')) if mibBuilder.loadTexts: snTrapChasPwrSupplyOK.setDescription('The SNMP trap that is generated when a power supply operational status changed from failure to normal.') sn_trap_vrrpe_if_state_change = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 82)).setObjects(('HP-SN-AGENT-MIB', 'snAgGblTrapMessage')) if mibBuilder.loadTexts: snTrapVrrpeIfStateChange.setDescription('The SNMP trap that is generated when a VRRPE routing device switched between states master, backup, intialized or uknown.') sn_trap_vsrp_if_state_change = notification_type((1, 3, 6, 1, 4, 1, 11) + (0, 83)).setObjects(('HP-SN-AGENT-MIB', 'snAgGblTrapMessage')) if mibBuilder.loadTexts: snTrapVsrpIfStateChange.setDescription('The SNMP trap that is generated when a VSRP switching and routing device switched between states master, backup, intialized or uknown.') mibBuilder.exportSymbols('HP-SN-TRAP-MIB', snTrapModuleRemoved=snTrapModuleRemoved, snTrapMplsException=snTrapMplsException, snTrapBgpPeerDown=snTrapBgpPeerDown, snTrapTcpLocalExceedBurst=snTrapTcpLocalExceedBurst, snTrapRunningConfigChanged=snTrapRunningConfigChanged, snTrapL4ConnectionRateExceedThreshold=snTrapL4ConnectionRateExceedThreshold, snTrapIcmpTransitExceedBurst=snTrapIcmpTransitExceedBurst, snTrapAccessListDeny=snTrapAccessListDeny, snTrapMrpStateChange=snTrapMrpStateChange, snTrapSmcDmaDrop=snTrapSmcDmaDrop, snTrapMplsProblem=snTrapMplsProblem, snTrapL4RealServerResponseTimeUpperLimit=snTrapL4RealServerResponseTimeUpperLimit, snTrapL4GslbRemoteControllerDown=snTrapL4GslbRemoteControllerDown, snTrapDuplicateIp=snTrapDuplicateIp, snTrapLockedAddressViolation2=snTrapLockedAddressViolation2, snTrapL4BecomeActive=snTrapL4BecomeActive, snTrapPortSecurityViolation=snTrapPortSecurityViolation, snTrapFsrpIfStateChange=snTrapFsrpIfStateChange, snTrapL4MaxSessionLimitReached=snTrapL4MaxSessionLimitReached, snTrapNoBmFreeQueue=snTrapNoBmFreeQueue, snTrapMacFilterDeny=snTrapMacFilterDeny, snTrapL4ConnectionRateExceedMax=snTrapL4ConnectionRateExceedMax, snTrapL4RealServerDown=snTrapL4RealServerDown, snTrapL4RealServerUp=snTrapL4RealServerUp, snTrapMgmtModuleRedunStateChange=snTrapMgmtModuleRedunStateChange, snTrapL4GslbHealthCheckIpDown=snTrapL4GslbHealthCheckIpDown, snTrapUserLogout=snTrapUserLogout, snTrapMrpCamError=snTrapMrpCamError, snTrapVsrpIfStateChange=snTrapVsrpIfStateChange, snTrapL4FirewallPathDown=snTrapL4FirewallPathDown, snTrapBmWriteSeqDrop=snTrapBmWriteSeqDrop, snTrapL4TcpAttackRateExceedMax=snTrapL4TcpAttackRateExceedMax, snTrapL4TcpAttackRateExceedThreshold=snTrapL4TcpAttackRateExceedThreshold, snTrapL4TcpSynLimitReached=snTrapL4TcpSynLimitReached, snTrapBgpPeerUp=snTrapBgpPeerUp, snTrapPortSecurityShutdown=snTrapPortSecurityShutdown, snTrapL4RealServerPortUp=snTrapL4RealServerPortUp, snTrapL4RealServerMaxConnectionLimitReached=snTrapL4RealServerMaxConnectionLimitReached, snTrapChasPwrSupply=snTrapChasPwrSupply, snTrapChasPwrSupplyFailed=snTrapChasPwrSupplyFailed, snTrapVrrpIfStateChange=snTrapVrrpIfStateChange, snTrapL4GslbRemoteUp=snTrapL4GslbRemoteUp, snTrapL4FirewallPathUp=snTrapL4FirewallPathUp, snTrapTcpTransitExceedBurst=snTrapTcpTransitExceedBurst, snTrapL4BecomeStandby=snTrapL4BecomeStandby, snTrapL4GslbHealthCheckIpUp=snTrapL4GslbHealthCheckIpUp, snTrapUserLogin=snTrapUserLogin, snTrapChasPwrSupplyOK=snTrapChasPwrSupplyOK, snTrapVrrpeIfStateChange=snTrapVrrpeIfStateChange, snTrapL4FirewallBecomeActive=snTrapL4FirewallBecomeActive, snTrapSmcBpDrop=snTrapSmcBpDrop, snTrapL4RealServerResponseTimeLowerLimit=snTrapL4RealServerResponseTimeLowerLimit, snTrapMplsDeveloper=snTrapMplsDeveloper, snTrapL4GslbRemoteDown=snTrapL4GslbRemoteDown, snTrapL4GslbHealthCheckIpPortUp=snTrapL4GslbHealthCheckIpPortUp, snTrapL4GslbRemoteControllerUp=snTrapL4GslbRemoteControllerUp, snTrapLockedAddressViolation=snTrapLockedAddressViolation, snTrapIcmpLocalExceedBurst=snTrapIcmpLocalExceedBurst, snTrapChasFanFailed=snTrapChasFanFailed, snTrapL4ContentVerification=snTrapL4ContentVerification, snTrapMplsAudit=snTrapMplsAudit, snTrapStartupConfigChanged=snTrapStartupConfigChanged, snTrapTemperatureWarning=snTrapTemperatureWarning, snTrapL4GslbHealthCheckIpPortDown=snTrapL4GslbHealthCheckIpPortDown, snTrapModuleInserted=snTrapModuleInserted, snTrapL4RealServerPortDown=snTrapL4RealServerPortDown, snTrapL4FirewallBecomeStandby=snTrapL4FirewallBecomeStandby)
""" Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s. """ __author__ = 'Daniel' class Solution: def partition(self, s): """ :type s: str :rtype: List[str] """ ret = [] self.backtrack(s, [], ret) return ret def backtrack(self, s, cur_lvl, ret): """ Expand the search tree horizontally. i be the scanning index If s[:i] is palindrome, then palindrome partition the s[i:] :param s: the current temp string :param cur_lvl: the current temp result at current level :param ret: result :return: """ if not s: ret.append(list(cur_lvl)) for i in xrange(1, len(s)+1): if self.predicate(s[:i]): cur_lvl.append(s[:i]) self.backtrack(s[i:], cur_lvl, ret) cur_lvl.pop() def predicate(self, s): return s == s[::-1] if __name__ == "__main__": assert Solution().partition("aabbc") == [['a', 'a', 'b', 'b', 'c'], ['a', 'a', 'bb', 'c'], ['aa', 'b', 'b', 'c'], ['aa', 'bb', 'c']]
""" Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s. """ __author__ = 'Daniel' class Solution: def partition(self, s): """ :type s: str :rtype: List[str] """ ret = [] self.backtrack(s, [], ret) return ret def backtrack(self, s, cur_lvl, ret): """ Expand the search tree horizontally. i be the scanning index If s[:i] is palindrome, then palindrome partition the s[i:] :param s: the current temp string :param cur_lvl: the current temp result at current level :param ret: result :return: """ if not s: ret.append(list(cur_lvl)) for i in xrange(1, len(s) + 1): if self.predicate(s[:i]): cur_lvl.append(s[:i]) self.backtrack(s[i:], cur_lvl, ret) cur_lvl.pop() def predicate(self, s): return s == s[::-1] if __name__ == '__main__': assert solution().partition('aabbc') == [['a', 'a', 'b', 'b', 'c'], ['a', 'a', 'bb', 'c'], ['aa', 'b', 'b', 'c'], ['aa', 'bb', 'c']]
# secret key SECRET_KEY = 'djangosSecretKey' # development directory DEV_DIR = '/path/to/directory/' # private data PRIVATE_DATA_STREET = 'Examplestreet 1' PRIVATE_DATA_PHONE = '0123456789'
secret_key = 'djangosSecretKey' dev_dir = '/path/to/directory/' private_data_street = 'Examplestreet 1' private_data_phone = '0123456789'
# # PySNMP MIB module CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 17:55: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) # ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueRangeConstraint, ConstraintsIntersection, SingleValueConstraint, ValueSizeConstraint, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ConstraintsIntersection", "SingleValueConstraint", "ValueSizeConstraint", "ConstraintsUnion") ciscoMgmt, = mibBuilder.importSymbols("CISCO-SMI", "ciscoMgmt") EntPhysicalIndexOrZero, = mibBuilder.importSymbols("CISCO-TC", "EntPhysicalIndexOrZero") SnmpAdminString, = mibBuilder.importSymbols("SNMP-FRAMEWORK-MIB", "SnmpAdminString") ModuleCompliance, ObjectGroup, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "ObjectGroup", "NotificationGroup") NotificationType, Unsigned32, ObjectIdentity, IpAddress, Counter32, Bits, Counter64, iso, MibIdentifier, Gauge32, Integer32, ModuleIdentity, TimeTicks, MibScalar, MibTable, MibTableRow, MibTableColumn = mibBuilder.importSymbols("SNMPv2-SMI", "NotificationType", "Unsigned32", "ObjectIdentity", "IpAddress", "Counter32", "Bits", "Counter64", "iso", "MibIdentifier", "Gauge32", "Integer32", "ModuleIdentity", "TimeTicks", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn") DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") ciscoSbcCallStatsMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 9, 9, 657)) ciscoSbcCallStatsMIB.setRevisions(('2010-09-03 00:00', '2008-08-27 00:00', '2008-05-29 00:00',)) if mibBuilder.loadTexts: ciscoSbcCallStatsMIB.setLastUpdated('201009030000Z') if mibBuilder.loadTexts: ciscoSbcCallStatsMIB.setOrganization('Cisco Systems, Inc.') class CiscoSbcPeriodicStatsInterval(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4)) namedValues = NamedValues(("fiveMinute", 1), ("fifteenMinute", 2), ("oneHour", 3), ("oneDay", 4)) ciscoSbcCallStatsMIBNotifs = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 657, 0)) ciscoSbcCallStatsMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 657, 1)) ciscoSbcCallStatsMIBConform = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 657, 2)) csbCallStatsInstanceTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 1), ) if mibBuilder.loadTexts: csbCallStatsInstanceTable.setStatus('current') csbCallStatsInstanceEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 1, 1), ).setIndexNames((0, "CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCallStatsInstanceIndex")) if mibBuilder.loadTexts: csbCallStatsInstanceEntry.setStatus('current') csbCallStatsInstanceIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 1, 1, 1), Unsigned32()) if mibBuilder.loadTexts: csbCallStatsInstanceIndex.setStatus('current') csbCallStatsInstancePhysicalIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 1, 1, 2), EntPhysicalIndexOrZero()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbCallStatsInstancePhysicalIndex.setStatus('current') csbCallStatsTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2), ) if mibBuilder.loadTexts: csbCallStatsTable.setStatus('current') csbCallStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1), ).setIndexNames((0, "CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCallStatsInstanceIndex"), (0, "CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCallStatsServiceIndex")) if mibBuilder.loadTexts: csbCallStatsEntry.setStatus('current') csbCallStatsServiceIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1, 1), Unsigned32()) if mibBuilder.loadTexts: csbCallStatsServiceIndex.setStatus('current') csbCallStatsSbcName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1, 2), SnmpAdminString()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbCallStatsSbcName.setStatus('current') csbCallStatsCallsHigh = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1, 3), Unsigned32()).setUnits('calls per second').setMaxAccess("readonly") if mibBuilder.loadTexts: csbCallStatsCallsHigh.setStatus('current') csbCallStatsRate1Sec = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1, 4), Gauge32()).setUnits('calls per second').setMaxAccess("readonly") if mibBuilder.loadTexts: csbCallStatsRate1Sec.setStatus('current') csbCallStatsCallsLow = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1, 5), Unsigned32()).setUnits('calls per second').setMaxAccess("readonly") if mibBuilder.loadTexts: csbCallStatsCallsLow.setStatus('current') csbCallStatsAvailableFlows = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1, 6), Gauge32()).setUnits('flows').setMaxAccess("readonly") if mibBuilder.loadTexts: csbCallStatsAvailableFlows.setStatus('current') csbCallStatsUsedFlows = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1, 7), Gauge32()).setUnits('flows').setMaxAccess("readonly") if mibBuilder.loadTexts: csbCallStatsUsedFlows.setStatus('current') csbCallStatsPeakFlows = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1, 8), Unsigned32()).setUnits('flows').setMaxAccess("readonly") if mibBuilder.loadTexts: csbCallStatsPeakFlows.setStatus('current') csbCallStatsTotalFlows = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1, 9), Unsigned32()).setUnits('flows').setMaxAccess("readonly") if mibBuilder.loadTexts: csbCallStatsTotalFlows.setStatus('current') csbCallStatsUsedSigFlows = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1, 10), Gauge32()).setUnits('signal flows').setMaxAccess("readonly") if mibBuilder.loadTexts: csbCallStatsUsedSigFlows.setStatus('current') csbCallStatsPeakSigFlows = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1, 11), Unsigned32()).setUnits('signal flows').setMaxAccess("readonly") if mibBuilder.loadTexts: csbCallStatsPeakSigFlows.setStatus('current') csbCallStatsTotalSigFlows = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1, 12), Unsigned32()).setUnits('signal flows').setMaxAccess("readonly") if mibBuilder.loadTexts: csbCallStatsTotalSigFlows.setStatus('current') csbCallStatsAvailablePktRate = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1, 13), Gauge32()).setUnits('packets per second').setMaxAccess("readonly") if mibBuilder.loadTexts: csbCallStatsAvailablePktRate.setStatus('current') csbCallStatsUnclassifiedPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1, 14), Counter64()).setUnits('packets').setMaxAccess("readonly") if mibBuilder.loadTexts: csbCallStatsUnclassifiedPkts.setStatus('current') csbCallStatsRTPPktsSent = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1, 15), Counter64()).setUnits('packets').setMaxAccess("readonly") if mibBuilder.loadTexts: csbCallStatsRTPPktsSent.setStatus('current') csbCallStatsRTPPktsRcvd = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1, 16), Counter64()).setUnits('packets').setMaxAccess("readonly") if mibBuilder.loadTexts: csbCallStatsRTPPktsRcvd.setStatus('current') csbCallStatsRTPPktsDiscard = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1, 17), Counter64()).setUnits('packets').setMaxAccess("readonly") if mibBuilder.loadTexts: csbCallStatsRTPPktsDiscard.setStatus('current') csbCallStatsRTPOctetsSent = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1, 18), Counter64()).setUnits('octets').setMaxAccess("readonly") if mibBuilder.loadTexts: csbCallStatsRTPOctetsSent.setStatus('current') csbCallStatsRTPOctetsRcvd = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1, 19), Counter64()).setUnits('octets').setMaxAccess("readonly") if mibBuilder.loadTexts: csbCallStatsRTPOctetsRcvd.setStatus('current') csbCallStatsRTPOctetsDiscard = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1, 20), Counter64()).setUnits('octets').setMaxAccess("readonly") if mibBuilder.loadTexts: csbCallStatsRTPOctetsDiscard.setStatus('current') csbCallStatsNoMediaCount = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1, 21), Counter32()).setUnits('no media events').setMaxAccess("readonly") if mibBuilder.loadTexts: csbCallStatsNoMediaCount.setStatus('current') csbCallStatsRouteErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1, 22), Counter32()).setUnits('route error events').setMaxAccess("readonly") if mibBuilder.loadTexts: csbCallStatsRouteErrors.setStatus('current') csbCallStatsAvailableTranscodeFlows = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1, 23), Gauge32()).setUnits('flows').setMaxAccess("readonly") if mibBuilder.loadTexts: csbCallStatsAvailableTranscodeFlows.setStatus('current') csbCallStatsActiveTranscodeFlows = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1, 24), Gauge32()).setUnits('flows').setMaxAccess("readonly") if mibBuilder.loadTexts: csbCallStatsActiveTranscodeFlows.setStatus('current') csbCallStatsPeakTranscodeFlows = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1, 25), Unsigned32()).setUnits('flows').setMaxAccess("readonly") if mibBuilder.loadTexts: csbCallStatsPeakTranscodeFlows.setStatus('current') csbCallStatsTotalTranscodeFlows = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1, 26), Unsigned32()).setUnits('flows').setMaxAccess("readonly") if mibBuilder.loadTexts: csbCallStatsTotalTranscodeFlows.setStatus('current') csbCurrPeriodicStatsTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3), ) if mibBuilder.loadTexts: csbCurrPeriodicStatsTable.setStatus('current') csbCurrPeriodicStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1), ).setIndexNames((0, "CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCallStatsInstanceIndex"), (0, "CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCallStatsServiceIndex"), (0, "CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCurrPeriodicStatsInterval")) if mibBuilder.loadTexts: csbCurrPeriodicStatsEntry.setStatus('current') csbCurrPeriodicStatsInterval = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 1), CiscoSbcPeriodicStatsInterval()) if mibBuilder.loadTexts: csbCurrPeriodicStatsInterval.setStatus('current') csbCurrPeriodicStatsActiveCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 2), Gauge32()).setUnits('calls').setMaxAccess("readonly") if mibBuilder.loadTexts: csbCurrPeriodicStatsActiveCalls.setStatus('current') csbCurrPeriodicStatsActivatingCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 3), Gauge32()).setUnits('calls').setMaxAccess("readonly") if mibBuilder.loadTexts: csbCurrPeriodicStatsActivatingCalls.setStatus('current') csbCurrPeriodicStatsDeactivatingCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 4), Gauge32()).setUnits('calls').setMaxAccess("readonly") if mibBuilder.loadTexts: csbCurrPeriodicStatsDeactivatingCalls.setStatus('current') csbCurrPeriodicStatsTotalCallAttempts = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 5), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbCurrPeriodicStatsTotalCallAttempts.setStatus('current') csbCurrPeriodicStatsFailedCallAttempts = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 6), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbCurrPeriodicStatsFailedCallAttempts.setStatus('current') csbCurrPeriodicStatsCallRoutingFailure = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 7), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbCurrPeriodicStatsCallRoutingFailure.setStatus('current') csbCurrPeriodicStatsCallResourceFailure = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 8), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbCurrPeriodicStatsCallResourceFailure.setStatus('current') csbCurrPeriodicStatsCallMediaFailure = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 9), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbCurrPeriodicStatsCallMediaFailure.setStatus('current') csbCurrPeriodicStatsCallSigFailure = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 10), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbCurrPeriodicStatsCallSigFailure.setStatus('current') csbCurrPeriodicStatsActiveCallFailure = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 11), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbCurrPeriodicStatsActiveCallFailure.setStatus('current') csbCurrPeriodicStatsCongestionFailure = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 12), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbCurrPeriodicStatsCongestionFailure.setStatus('current') csbCurrPeriodicStatsCallSetupPolicyFailure = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 13), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbCurrPeriodicStatsCallSetupPolicyFailure.setStatus('current') csbCurrPeriodicStatsCallSetupNAPolicyFailure = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 14), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbCurrPeriodicStatsCallSetupNAPolicyFailure.setStatus('current') csbCurrPeriodicStatsCallSetupRoutingPolicyFailure = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 15), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbCurrPeriodicStatsCallSetupRoutingPolicyFailure.setStatus('current') csbCurrPeriodicStatsCallSetupCACPolicyFailure = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 16), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbCurrPeriodicStatsCallSetupCACPolicyFailure.setStatus('current') csbCurrPeriodicStatsCallSetupCACCallLimitFailure = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 17), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbCurrPeriodicStatsCallSetupCACCallLimitFailure.setStatus('current') csbCurrPeriodicStatsCallSetupCACRateLimitFailure = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 18), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbCurrPeriodicStatsCallSetupCACRateLimitFailure.setStatus('current') csbCurrPeriodicStatsCallSetupCACBandwidthFailure = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 19), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbCurrPeriodicStatsCallSetupCACBandwidthFailure.setStatus('current') csbCurrPeriodicStatsCallSetupCACMediaLimitFailure = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 20), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbCurrPeriodicStatsCallSetupCACMediaLimitFailure.setStatus('current') csbCurrPeriodicStatsCallSetupCACMediaUpdateFailure = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 21), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbCurrPeriodicStatsCallSetupCACMediaUpdateFailure.setStatus('current') csbCurrPeriodicStatsTimestamp = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 22), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly") if mibBuilder.loadTexts: csbCurrPeriodicStatsTimestamp.setStatus('current') csbCurrPeriodicStatsTranscodedCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 23), Gauge32()).setUnits('calls').setMaxAccess("readonly") if mibBuilder.loadTexts: csbCurrPeriodicStatsTranscodedCalls.setStatus('current') csbCurrPeriodicStatsTransratedCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 24), Gauge32()).setUnits('calls').setMaxAccess("readonly") if mibBuilder.loadTexts: csbCurrPeriodicStatsTransratedCalls.setStatus('current') csbCurrPeriodicStatsTotalCallUpdateFailure = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 25), Gauge32()).setUnits('calls').setMaxAccess("readonly") if mibBuilder.loadTexts: csbCurrPeriodicStatsTotalCallUpdateFailure.setStatus('current') csbCurrPeriodicStatsActiveIpv6Calls = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 26), Gauge32()).setUnits('calls').setMaxAccess("readonly") if mibBuilder.loadTexts: csbCurrPeriodicStatsActiveIpv6Calls.setStatus('current') csbCurrPeriodicStatsActiveEmergencyCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 27), Gauge32()).setUnits('calls').setMaxAccess("readonly") if mibBuilder.loadTexts: csbCurrPeriodicStatsActiveEmergencyCalls.setStatus('current') csbCurrPeriodicStatsActiveE2EmergencyCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 28), Gauge32()).setUnits('calls').setMaxAccess("readonly") if mibBuilder.loadTexts: csbCurrPeriodicStatsActiveE2EmergencyCalls.setStatus('current') csbCurrPeriodicStatsImsRxActiveCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 29), Gauge32()).setUnits('calls').setMaxAccess("readonly") if mibBuilder.loadTexts: csbCurrPeriodicStatsImsRxActiveCalls.setStatus('current') csbCurrPeriodicStatsImsRxCallSetupFaiures = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 30), Gauge32()).setUnits('failures').setMaxAccess("readonly") if mibBuilder.loadTexts: csbCurrPeriodicStatsImsRxCallSetupFaiures.setStatus('current') csbCurrPeriodicStatsImsRxCallRenegotiationAttempts = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 31), Gauge32()).setUnits('attempts').setMaxAccess("readonly") if mibBuilder.loadTexts: csbCurrPeriodicStatsImsRxCallRenegotiationAttempts.setStatus('current') csbCurrPeriodicStatsImsRxCallRenegotiationFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 32), Gauge32()).setUnits('failures').setMaxAccess("readonly") if mibBuilder.loadTexts: csbCurrPeriodicStatsImsRxCallRenegotiationFailures.setStatus('current') csbCurrPeriodicStatsAudioTranscodedCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 33), Gauge32()).setUnits('calls').setMaxAccess("readonly") if mibBuilder.loadTexts: csbCurrPeriodicStatsAudioTranscodedCalls.setStatus('current') csbCurrPeriodicStatsFaxTranscodedCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 34), Gauge32()).setUnits('calls').setMaxAccess("readonly") if mibBuilder.loadTexts: csbCurrPeriodicStatsFaxTranscodedCalls.setStatus('current') csbCurrPeriodicStatsRtpDisallowedFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 35), Gauge32()).setUnits('failures').setMaxAccess("readonly") if mibBuilder.loadTexts: csbCurrPeriodicStatsRtpDisallowedFailures.setStatus('current') csbCurrPeriodicStatsSrtpDisallowedFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 36), Gauge32()).setUnits('failures').setMaxAccess("readonly") if mibBuilder.loadTexts: csbCurrPeriodicStatsSrtpDisallowedFailures.setStatus('current') csbCurrPeriodicStatsNonSrtpCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 37), Gauge32()).setUnits('calls').setMaxAccess("readonly") if mibBuilder.loadTexts: csbCurrPeriodicStatsNonSrtpCalls.setStatus('current') csbCurrPeriodicStatsSrtpNonIwCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 38), Gauge32()).setUnits('calls').setMaxAccess("readonly") if mibBuilder.loadTexts: csbCurrPeriodicStatsSrtpNonIwCalls.setStatus('current') csbCurrPeriodicStatsSrtpIwCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 39), Gauge32()).setUnits('calls').setMaxAccess("readonly") if mibBuilder.loadTexts: csbCurrPeriodicStatsSrtpIwCalls.setStatus('current') csbCurrPeriodicStatsDtmfIw2833Calls = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 40), Gauge32()).setUnits('calls').setMaxAccess("readonly") if mibBuilder.loadTexts: csbCurrPeriodicStatsDtmfIw2833Calls.setStatus('current') csbCurrPeriodicStatsDtmfIwInbandCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 41), Gauge32()).setUnits('calls').setMaxAccess("readonly") if mibBuilder.loadTexts: csbCurrPeriodicStatsDtmfIwInbandCalls.setStatus('current') csbCurrPeriodicStatsDtmfIw2833InbandCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 42), Gauge32()).setUnits('calls').setMaxAccess("readonly") if mibBuilder.loadTexts: csbCurrPeriodicStatsDtmfIw2833InbandCalls.setStatus('current') csbCurrPeriodicStatsTotalTapsRequested = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 43), Gauge32()).setUnits('attempts').setMaxAccess("readonly") if mibBuilder.loadTexts: csbCurrPeriodicStatsTotalTapsRequested.setStatus('current') csbCurrPeriodicStatsTotalTapsSucceeded = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 44), Gauge32()).setUnits('success').setMaxAccess("readonly") if mibBuilder.loadTexts: csbCurrPeriodicStatsTotalTapsSucceeded.setStatus('current') csbCurrPeriodicStatsCurrentTaps = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 45), Gauge32()).setUnits('taps').setMaxAccess("readonly") if mibBuilder.loadTexts: csbCurrPeriodicStatsCurrentTaps.setStatus('current') csbCurrPeriodicIpsecCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 46), Gauge32()).setUnits('calls').setMaxAccess("readonly") if mibBuilder.loadTexts: csbCurrPeriodicIpsecCalls.setStatus('current') csbHistoryStatsTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4), ) if mibBuilder.loadTexts: csbHistoryStatsTable.setStatus('current') csbHistoryStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1), ).setIndexNames((0, "CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCallStatsInstanceIndex"), (0, "CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCallStatsServiceIndex"), (0, "CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbHistoryStatsInterval"), (0, "CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbHistoryStatsElements")) if mibBuilder.loadTexts: csbHistoryStatsEntry.setStatus('current') csbHistoryStatsInterval = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 1), CiscoSbcPeriodicStatsInterval()) if mibBuilder.loadTexts: csbHistoryStatsInterval.setStatus('current') csbHistoryStatsElements = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 2), Unsigned32()) if mibBuilder.loadTexts: csbHistoryStatsElements.setStatus('current') csbHistoryStatsActiveCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 3), Gauge32()).setUnits('calls').setMaxAccess("readonly") if mibBuilder.loadTexts: csbHistoryStatsActiveCalls.setStatus('current') csbHistoryStatsTotalCallAttempts = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 4), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbHistoryStatsTotalCallAttempts.setStatus('current') csbHistoryStatsFailedCallAttempts = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 5), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbHistoryStatsFailedCallAttempts.setStatus('current') csbHistoryStatsCallRoutingFailure = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 6), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbHistoryStatsCallRoutingFailure.setStatus('current') csbHistoryStatsCallResourceFailure = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 7), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbHistoryStatsCallResourceFailure.setStatus('current') csbHistoryStatsCallMediaFailure = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 8), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbHistoryStatsCallMediaFailure.setStatus('current') csbHistoryStatsFailSigFailure = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 9), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbHistoryStatsFailSigFailure.setStatus('current') csbHistoryStatsActiveCallFailure = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 10), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbHistoryStatsActiveCallFailure.setStatus('current') csbHistoryStatsCongestionFailure = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 11), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbHistoryStatsCongestionFailure.setStatus('current') csbHistoryStatsCallSetupPolicyFailure = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 12), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbHistoryStatsCallSetupPolicyFailure.setStatus('current') csbHistoryStatsCallSetupNAPolicyFailure = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 13), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbHistoryStatsCallSetupNAPolicyFailure.setStatus('current') csbHistoryStatsCallSetupRoutingPolicyFailure = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 14), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbHistoryStatsCallSetupRoutingPolicyFailure.setStatus('current') csbHistoryStatsCallSetupCACPolicyFailure = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 15), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbHistoryStatsCallSetupCACPolicyFailure.setStatus('current') csbHistoryStatsCallSetupCACCallLimitFailure = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 16), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbHistoryStatsCallSetupCACCallLimitFailure.setStatus('current') csbHistoryStatsCallSetupCACRateLimitFailure = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 17), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbHistoryStatsCallSetupCACRateLimitFailure.setStatus('current') csbHistoryStatsCallSetupCACBandwidthFailure = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 18), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbHistoryStatsCallSetupCACBandwidthFailure.setStatus('current') csbHistoryStatsCallSetupCACMediaLimitFailure = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 19), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbHistoryStatsCallSetupCACMediaLimitFailure.setStatus('current') csbHistoryStatsCallSetupCACMediaUpdateFailure = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 20), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbHistoryStatsCallSetupCACMediaUpdateFailure.setStatus('current') csbHistoryStatsTimestamp = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 21), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly") if mibBuilder.loadTexts: csbHistoryStatsTimestamp.setStatus('current') csbHistroyStatsTranscodedCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 22), Gauge32()).setUnits('calls').setMaxAccess("readonly") if mibBuilder.loadTexts: csbHistroyStatsTranscodedCalls.setStatus('current') csbHistroyStatsTransratedCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 23), Gauge32()).setUnits('calls').setMaxAccess("readonly") if mibBuilder.loadTexts: csbHistroyStatsTransratedCalls.setStatus('current') csbHistoryStatsTotalCallUpdateFailure = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 24), Gauge32()).setUnits('calls').setMaxAccess("readonly") if mibBuilder.loadTexts: csbHistoryStatsTotalCallUpdateFailure.setStatus('current') csbHistoryStatsActiveIpv6Calls = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 25), Gauge32()).setUnits('calls').setMaxAccess("readonly") if mibBuilder.loadTexts: csbHistoryStatsActiveIpv6Calls.setStatus('current') csbHistoryStatsActiveEmergencyCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 26), Gauge32()).setUnits('calls').setMaxAccess("readonly") if mibBuilder.loadTexts: csbHistoryStatsActiveEmergencyCalls.setStatus('current') csbHistoryStatsActiveE2EmergencyCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 27), Gauge32()).setUnits('calls').setMaxAccess("readonly") if mibBuilder.loadTexts: csbHistoryStatsActiveE2EmergencyCalls.setStatus('current') csbHistoryStatsImsRxActiveCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 28), Gauge32()).setUnits('calls').setMaxAccess("readonly") if mibBuilder.loadTexts: csbHistoryStatsImsRxActiveCalls.setStatus('current') csbHistoryStatsImsRxCallSetupFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 29), Gauge32()).setUnits('failures').setMaxAccess("readonly") if mibBuilder.loadTexts: csbHistoryStatsImsRxCallSetupFailures.setStatus('current') csbHistoryStatsImsRxCallRenegotiationAttempts = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 30), Gauge32()).setUnits('attempts').setMaxAccess("readonly") if mibBuilder.loadTexts: csbHistoryStatsImsRxCallRenegotiationAttempts.setStatus('current') csbHistoryStatsImsRxCallRenegotiationFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 31), Gauge32()).setUnits('failures').setMaxAccess("readonly") if mibBuilder.loadTexts: csbHistoryStatsImsRxCallRenegotiationFailures.setStatus('current') csbHistoryStatsAudioTranscodedCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 32), Gauge32()).setUnits('calls').setMaxAccess("readonly") if mibBuilder.loadTexts: csbHistoryStatsAudioTranscodedCalls.setStatus('current') csbHistoryStatsFaxTranscodedCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 33), Gauge32()).setUnits('calls').setMaxAccess("readonly") if mibBuilder.loadTexts: csbHistoryStatsFaxTranscodedCalls.setStatus('current') csbHistoryStatsRtpDisallowedFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 34), Gauge32()).setUnits('failures').setMaxAccess("readonly") if mibBuilder.loadTexts: csbHistoryStatsRtpDisallowedFailures.setStatus('current') csbHistoryStatsSrtpDisallowedFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 35), Gauge32()).setUnits('failures').setMaxAccess("readonly") if mibBuilder.loadTexts: csbHistoryStatsSrtpDisallowedFailures.setStatus('current') csbHistoryStatsNonSrtpCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 36), Gauge32()).setUnits('calls').setMaxAccess("readonly") if mibBuilder.loadTexts: csbHistoryStatsNonSrtpCalls.setStatus('current') csbHistoryStatsSrtpNonIwCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 37), Gauge32()).setUnits('calls').setMaxAccess("readonly") if mibBuilder.loadTexts: csbHistoryStatsSrtpNonIwCalls.setStatus('current') csbHistoryStatsSrtpIwCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 38), Gauge32()).setUnits('calls').setMaxAccess("readonly") if mibBuilder.loadTexts: csbHistoryStatsSrtpIwCalls.setStatus('current') csbHistoryStatsDtmfIw2833Calls = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 39), Gauge32()).setUnits('calls').setMaxAccess("readonly") if mibBuilder.loadTexts: csbHistoryStatsDtmfIw2833Calls.setStatus('current') csbHistoryStatsDtmfIwInbandCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 40), Gauge32()).setUnits('calls').setMaxAccess("readonly") if mibBuilder.loadTexts: csbHistoryStatsDtmfIwInbandCalls.setStatus('current') csbHistoryStatsDtmfIw2833InbandCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 41), Gauge32()).setUnits('calls').setMaxAccess("readonly") if mibBuilder.loadTexts: csbHistoryStatsDtmfIw2833InbandCalls.setStatus('current') csbHistoryStatsTotalTapsRequested = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 42), Gauge32()).setUnits('attempts').setMaxAccess("readonly") if mibBuilder.loadTexts: csbHistoryStatsTotalTapsRequested.setStatus('current') csbHistoryStatsTotalTapsSucceeded = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 43), Gauge32()).setUnits('success').setMaxAccess("readonly") if mibBuilder.loadTexts: csbHistoryStatsTotalTapsSucceeded.setStatus('current') csbHistoryStatsCurrentTaps = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 44), Gauge32()).setUnits('taps').setMaxAccess("readonly") if mibBuilder.loadTexts: csbHistoryStatsCurrentTaps.setStatus('current') csbHistoryStatsIpsecCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 45), Gauge32()).setUnits('calls').setMaxAccess("readonly") if mibBuilder.loadTexts: csbHistoryStatsIpsecCalls.setStatus('current') csbPerFlowStatsTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 5), ) if mibBuilder.loadTexts: csbPerFlowStatsTable.setStatus('current') csbPerFlowStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 5, 1), ).setIndexNames((0, "CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCallStatsInstanceIndex"), (0, "CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCallStatsServiceIndex"), (0, "CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbPerFlowStatsVdbeId"), (0, "CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbPerFlowStatsGateId"), (0, "CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbPerFlowStatsFlowPairId"), (0, "CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbPerFlowStatsSideId")) if mibBuilder.loadTexts: csbPerFlowStatsEntry.setStatus('current') csbPerFlowStatsVdbeId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 5, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))) if mibBuilder.loadTexts: csbPerFlowStatsVdbeId.setStatus('current') csbPerFlowStatsGateId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 5, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))) if mibBuilder.loadTexts: csbPerFlowStatsGateId.setStatus('current') csbPerFlowStatsFlowPairId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 5, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))) if mibBuilder.loadTexts: csbPerFlowStatsFlowPairId.setStatus('current') csbPerFlowStatsSideId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 5, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("sideA", 1), ("sideB", 2)))) if mibBuilder.loadTexts: csbPerFlowStatsSideId.setStatus('current') csbPerFlowStatsFlowType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 5, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("media", 1), ("signalling", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: csbPerFlowStatsFlowType.setStatus('current') csbPerFlowStatsRTPPktsSent = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 5, 1, 6), Counter64()).setUnits('packets').setMaxAccess("readonly") if mibBuilder.loadTexts: csbPerFlowStatsRTPPktsSent.setStatus('current') csbPerFlowStatsRTPPktsRcvd = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 5, 1, 7), Counter64()).setUnits('packets').setMaxAccess("readonly") if mibBuilder.loadTexts: csbPerFlowStatsRTPPktsRcvd.setStatus('current') csbPerFlowStatsRTPPktsDiscard = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 5, 1, 8), Counter64()).setUnits('packets').setMaxAccess("readonly") if mibBuilder.loadTexts: csbPerFlowStatsRTPPktsDiscard.setStatus('current') csbPerFlowStatsRTPOctetsSent = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 5, 1, 9), Counter64()).setUnits('octets').setMaxAccess("readonly") if mibBuilder.loadTexts: csbPerFlowStatsRTPOctetsSent.setStatus('current') csbPerFlowStatsRTPOctetsRcvd = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 5, 1, 10), Counter64()).setUnits('octets').setMaxAccess("readonly") if mibBuilder.loadTexts: csbPerFlowStatsRTPOctetsRcvd.setStatus('current') csbPerFlowStatsRTPOctetsDiscard = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 5, 1, 11), Counter64()).setUnits('octets').setMaxAccess("readonly") if mibBuilder.loadTexts: csbPerFlowStatsRTPOctetsDiscard.setStatus('current') csbPerFlowStatsRTCPPktsSent = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 5, 1, 12), Counter64()).setUnits('packets').setMaxAccess("readonly") if mibBuilder.loadTexts: csbPerFlowStatsRTCPPktsSent.setStatus('current') csbPerFlowStatsRTCPPktsRcvd = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 5, 1, 13), Counter64()).setUnits('packets').setMaxAccess("readonly") if mibBuilder.loadTexts: csbPerFlowStatsRTCPPktsRcvd.setStatus('current') csbPerFlowStatsRTCPPktsLost = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 5, 1, 14), Counter64()).setUnits('packets').setMaxAccess("readonly") if mibBuilder.loadTexts: csbPerFlowStatsRTCPPktsLost.setStatus('current') csbPerFlowStatsEPJitter = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 5, 1, 15), Counter64()).setUnits('milliseconds').setMaxAccess("readonly") if mibBuilder.loadTexts: csbPerFlowStatsEPJitter.setStatus('current') csbPerFlowStatsTmanPerMbs = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 5, 1, 16), Gauge32()).setUnits('bytes').setMaxAccess("readonly") if mibBuilder.loadTexts: csbPerFlowStatsTmanPerMbs.setStatus('current') csbPerFlowStatsTmanPerSdr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 5, 1, 17), Gauge32()).setUnits('kilobytes per second').setMaxAccess("readonly") if mibBuilder.loadTexts: csbPerFlowStatsTmanPerSdr.setStatus('current') csbPerFlowStatsDscpSettings = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 5, 1, 18), SnmpAdminString()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbPerFlowStatsDscpSettings.setStatus('current') csbPerFlowStatsAdrStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 5, 1, 19), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 10))).setMaxAccess("readonly") if mibBuilder.loadTexts: csbPerFlowStatsAdrStatus.setStatus('current') csbPerFlowStatsQASettings = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 5, 1, 20), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 10))).setMaxAccess("readonly") if mibBuilder.loadTexts: csbPerFlowStatsQASettings.setStatus('current') csbPerFlowStatsRTPPktsLost = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 5, 1, 21), Counter64()).setUnits('packets').setMaxAccess("readonly") if mibBuilder.loadTexts: csbPerFlowStatsRTPPktsLost.setStatus('current') csbH248StatsTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 6), ) if mibBuilder.loadTexts: csbH248StatsTable.setStatus('deprecated') csbH248StatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 6, 1), ).setIndexNames((0, "CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCallStatsInstanceIndex"), (0, "CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCallStatsServiceIndex"), (0, "CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbH248StatsCtrlrIndex")) if mibBuilder.loadTexts: csbH248StatsEntry.setStatus('deprecated') csbH248StatsCtrlrIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 6, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 50))) if mibBuilder.loadTexts: csbH248StatsCtrlrIndex.setStatus('deprecated') csbH248StatsRequestsSent = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 6, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbH248StatsRequestsSent.setStatus('deprecated') csbH248StatsRequestsRcvd = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 6, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbH248StatsRequestsRcvd.setStatus('deprecated') csbH248StatsRequestsFailed = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 6, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbH248StatsRequestsFailed.setStatus('deprecated') csbH248StatsRequestsRetried = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 6, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbH248StatsRequestsRetried.setStatus('deprecated') csbH248StatsRepliesSent = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 6, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbH248StatsRepliesSent.setStatus('deprecated') csbH248StatsRepliesRcvd = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 6, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbH248StatsRepliesRcvd.setStatus('deprecated') csbH248StatsRepliesRetried = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 6, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbH248StatsRepliesRetried.setStatus('deprecated') csbH248StatsSegPktsSent = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 6, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbH248StatsSegPktsSent.setStatus('deprecated') csbH248StatsSegPktsRcvd = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 6, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbH248StatsSegPktsRcvd.setStatus('deprecated') csbH248StatsEstablishedTime = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 6, 1, 11), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly") if mibBuilder.loadTexts: csbH248StatsEstablishedTime.setStatus('deprecated') csbH248StatsTMaxTimeoutVal = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 6, 1, 12), Integer32()).setUnits('milliseconds').setMaxAccess("readonly") if mibBuilder.loadTexts: csbH248StatsTMaxTimeoutVal.setStatus('deprecated') csbH248StatsRTT = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 6, 1, 13), Gauge32()).setUnits('milliseconds').setMaxAccess("readonly") if mibBuilder.loadTexts: csbH248StatsRTT.setStatus('deprecated') csbH248StatsLT = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 6, 1, 14), Gauge32()).setUnits('milliseconds').setMaxAccess("readonly") if mibBuilder.loadTexts: csbH248StatsLT.setStatus('deprecated') csbH248StatsRev1Table = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 7), ) if mibBuilder.loadTexts: csbH248StatsRev1Table.setStatus('current') csbH248StatsRev1Entry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 7, 1), ).setIndexNames((0, "CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCallStatsInstanceIndex"), (0, "CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCallStatsServiceIndex"), (0, "CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbH248StatsVdbeId")) if mibBuilder.loadTexts: csbH248StatsRev1Entry.setStatus('current') csbH248StatsVdbeId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 7, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))) if mibBuilder.loadTexts: csbH248StatsVdbeId.setStatus('current') csbH248StatsRequestsSentRev1 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 7, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbH248StatsRequestsSentRev1.setStatus('current') csbH248StatsRequestsRcvdRev1 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 7, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbH248StatsRequestsRcvdRev1.setStatus('current') csbH248StatsRequestsFailedRev1 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 7, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbH248StatsRequestsFailedRev1.setStatus('current') csbH248StatsRequestsRetriedRev1 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 7, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbH248StatsRequestsRetriedRev1.setStatus('current') csbH248StatsRepliesSentRev1 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 7, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbH248StatsRepliesSentRev1.setStatus('current') csbH248StatsRepliesRcvdRev1 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 7, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbH248StatsRepliesRcvdRev1.setStatus('current') csbH248StatsRepliesRetriedRev1 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 7, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbH248StatsRepliesRetriedRev1.setStatus('current') csbH248StatsSegPktsSentRev1 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 7, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbH248StatsSegPktsSentRev1.setStatus('current') csbH248StatsSegPktsRcvdRev1 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 7, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbH248StatsSegPktsRcvdRev1.setStatus('current') csbH248StatsEstablishedTimeRev1 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 7, 1, 11), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly") if mibBuilder.loadTexts: csbH248StatsEstablishedTimeRev1.setStatus('current') csbH248StatsTMaxTimeoutValRev1 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 7, 1, 12), Integer32()).setUnits('milliseconds').setMaxAccess("readonly") if mibBuilder.loadTexts: csbH248StatsTMaxTimeoutValRev1.setStatus('current') csbH248StatsRTTRev1 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 7, 1, 13), Gauge32()).setUnits('milliseconds').setMaxAccess("readonly") if mibBuilder.loadTexts: csbH248StatsRTTRev1.setStatus('current') csbH248StatsLTRev1 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 7, 1, 14), Gauge32()).setUnits('milliseconds').setMaxAccess("readonly") if mibBuilder.loadTexts: csbH248StatsLTRev1.setStatus('current') csbCallStatsMIBCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 657, 2, 1)) csbCallStatsMIBGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 657, 2, 2)) csbCallStatsMIBCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 657, 2, 1, 1)).setObjects(("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbGlobalStatsGroup"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCurrPeriodicStatsGroup"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbHistoryStatsGroup"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbPerFlowStatsGroup"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbH248StatsGroup"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbStatsInstanceGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csbCallStatsMIBCompliance = csbCallStatsMIBCompliance.setStatus('deprecated') csbCallStatsMIBComplianceRev1 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 657, 2, 1, 2)).setObjects(("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbGlobalStatsGroup"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCurrPeriodicStatsGroup"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbHistoryStatsGroup"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbPerFlowStatsGroup"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbH248StatsGroupRev1"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbStatsInstanceGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csbCallStatsMIBComplianceRev1 = csbCallStatsMIBComplianceRev1.setStatus('deprecated') csbCallStatsMIBComplianceRev2 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 657, 2, 1, 3)).setObjects(("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbGlobalStatsGroup"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCurrPeriodicStatsGroup"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbHistoryStatsGroup"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbPerFlowStatsGroup"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbH248StatsGroupRev1"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbStatsInstanceGroup"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbGlobalStatsGroupSup1"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCurrPeriodicStatsGroupSup1"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbHistoryStatsGroupSup1"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbPerFlowStatsGroupSup1")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csbCallStatsMIBComplianceRev2 = csbCallStatsMIBComplianceRev2.setStatus('current') csbStatsInstanceGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 657, 2, 2, 1)).setObjects(("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCallStatsInstancePhysicalIndex")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csbStatsInstanceGroup = csbStatsInstanceGroup.setStatus('current') csbGlobalStatsGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 657, 2, 2, 2)).setObjects(("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCallStatsCallsHigh"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCallStatsRate1Sec"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCallStatsCallsLow"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCallStatsAvailableFlows"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCallStatsUsedFlows"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCallStatsTotalFlows"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCallStatsRTPPktsRcvd"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCallStatsRTPPktsDiscard"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCallStatsUsedSigFlows"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCallStatsTotalSigFlows"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCallStatsAvailablePktRate"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCallStatsPeakFlows"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCallStatsUnclassifiedPkts"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCallStatsRTPOctetsSent"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCallStatsRTPOctetsRcvd"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCallStatsRTPOctetsDiscard"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCallStatsPeakSigFlows"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCallStatsSbcName"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCallStatsRTPPktsSent"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCallStatsNoMediaCount"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCallStatsRouteErrors")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csbGlobalStatsGroup = csbGlobalStatsGroup.setStatus('current') csbCurrPeriodicStatsGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 657, 2, 2, 3)).setObjects(("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCurrPeriodicStatsActiveCalls"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCurrPeriodicStatsActivatingCalls"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCurrPeriodicStatsDeactivatingCalls"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCurrPeriodicStatsTotalCallAttempts"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCurrPeriodicStatsFailedCallAttempts"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCurrPeriodicStatsCallRoutingFailure"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCurrPeriodicStatsCallResourceFailure"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCurrPeriodicStatsCallMediaFailure"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCurrPeriodicStatsCallSigFailure"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCurrPeriodicStatsActiveCallFailure"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCurrPeriodicStatsCongestionFailure"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCurrPeriodicStatsCallSetupPolicyFailure"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCurrPeriodicStatsCallSetupNAPolicyFailure"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCurrPeriodicStatsCallSetupRoutingPolicyFailure"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCurrPeriodicStatsCallSetupCACPolicyFailure"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCurrPeriodicStatsCallSetupCACCallLimitFailure"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCurrPeriodicStatsCallSetupCACRateLimitFailure"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCurrPeriodicStatsCallSetupCACBandwidthFailure"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCurrPeriodicStatsCallSetupCACMediaLimitFailure"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCurrPeriodicStatsCallSetupCACMediaUpdateFailure"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCurrPeriodicStatsTimestamp")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csbCurrPeriodicStatsGroup = csbCurrPeriodicStatsGroup.setStatus('current') csbHistoryStatsGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 657, 2, 2, 4)).setObjects(("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbHistoryStatsActiveCalls"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbHistoryStatsTotalCallAttempts"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbHistoryStatsFailedCallAttempts"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbHistoryStatsCallRoutingFailure"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbHistoryStatsCallResourceFailure"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbHistoryStatsCallMediaFailure"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbHistoryStatsFailSigFailure"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbHistoryStatsActiveCallFailure"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbHistoryStatsCongestionFailure"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbHistoryStatsCallSetupPolicyFailure"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbHistoryStatsCallSetupNAPolicyFailure"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbHistoryStatsCallSetupRoutingPolicyFailure"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbHistoryStatsCallSetupCACPolicyFailure"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbHistoryStatsCallSetupCACCallLimitFailure"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbHistoryStatsCallSetupCACRateLimitFailure"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbHistoryStatsCallSetupCACBandwidthFailure"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbHistoryStatsCallSetupCACMediaLimitFailure"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbHistoryStatsCallSetupCACMediaUpdateFailure"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbHistoryStatsTimestamp")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csbHistoryStatsGroup = csbHistoryStatsGroup.setStatus('current') csbPerFlowStatsGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 657, 2, 2, 5)).setObjects(("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbPerFlowStatsRTPPktsRcvd"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbPerFlowStatsRTPPktsSent"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbPerFlowStatsRTPPktsDiscard"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbPerFlowStatsRTCPPktsSent"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbPerFlowStatsRTPOctetsRcvd"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbPerFlowStatsRTPOctetsSent"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbPerFlowStatsRTPOctetsDiscard"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbPerFlowStatsRTCPPktsRcvd"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbPerFlowStatsRTCPPktsLost"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbPerFlowStatsFlowType"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbPerFlowStatsTmanPerMbs"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbPerFlowStatsTmanPerSdr"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbPerFlowStatsDscpSettings"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbPerFlowStatsAdrStatus"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbPerFlowStatsQASettings"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbPerFlowStatsEPJitter")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csbPerFlowStatsGroup = csbPerFlowStatsGroup.setStatus('current') csbH248StatsGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 657, 2, 2, 6)).setObjects(("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbH248StatsRequestsSent"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbH248StatsRequestsRcvd"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbH248StatsRequestsFailed"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbH248StatsRequestsRetried"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbH248StatsRepliesSent"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbH248StatsRepliesRcvd"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbH248StatsRepliesRetried"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbH248StatsSegPktsSent"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbH248StatsSegPktsRcvd"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbH248StatsTMaxTimeoutVal"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbH248StatsRTT"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbH248StatsLT"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbH248StatsEstablishedTime")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csbH248StatsGroup = csbH248StatsGroup.setStatus('deprecated') csbH248StatsGroupRev1 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 657, 2, 2, 7)).setObjects(("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbH248StatsRequestsSentRev1"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbH248StatsRequestsRcvdRev1"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbH248StatsRequestsFailedRev1"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbH248StatsRequestsRetriedRev1"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbH248StatsRepliesSentRev1"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbH248StatsRepliesRcvdRev1"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbH248StatsRepliesRetriedRev1"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbH248StatsSegPktsSentRev1"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbH248StatsSegPktsRcvdRev1"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbH248StatsEstablishedTimeRev1"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbH248StatsTMaxTimeoutValRev1"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbH248StatsRTTRev1"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbH248StatsLTRev1")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csbH248StatsGroupRev1 = csbH248StatsGroupRev1.setStatus('current') csbGlobalStatsGroupSup1 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 657, 2, 2, 8)).setObjects(("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCallStatsAvailableTranscodeFlows"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCallStatsActiveTranscodeFlows"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCallStatsPeakTranscodeFlows"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCallStatsTotalTranscodeFlows")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csbGlobalStatsGroupSup1 = csbGlobalStatsGroupSup1.setStatus('current') csbCurrPeriodicStatsGroupSup1 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 657, 2, 2, 9)).setObjects(("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCurrPeriodicStatsTranscodedCalls"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCurrPeriodicStatsTransratedCalls"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCurrPeriodicStatsTotalCallUpdateFailure"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCurrPeriodicStatsActiveIpv6Calls"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCurrPeriodicStatsActiveEmergencyCalls"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCurrPeriodicStatsActiveE2EmergencyCalls"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCurrPeriodicStatsImsRxActiveCalls"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCurrPeriodicStatsImsRxCallSetupFaiures"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCurrPeriodicStatsImsRxCallRenegotiationAttempts"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCurrPeriodicStatsImsRxCallRenegotiationFailures"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCurrPeriodicStatsAudioTranscodedCalls"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCurrPeriodicStatsFaxTranscodedCalls"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCurrPeriodicStatsRtpDisallowedFailures"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCurrPeriodicStatsSrtpDisallowedFailures"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCurrPeriodicStatsNonSrtpCalls"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCurrPeriodicStatsSrtpNonIwCalls"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCurrPeriodicStatsSrtpIwCalls"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCurrPeriodicStatsDtmfIw2833Calls"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCurrPeriodicStatsDtmfIwInbandCalls"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCurrPeriodicStatsDtmfIw2833InbandCalls"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCurrPeriodicStatsTotalTapsRequested"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCurrPeriodicStatsTotalTapsSucceeded"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCurrPeriodicStatsCurrentTaps"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCurrPeriodicIpsecCalls")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csbCurrPeriodicStatsGroupSup1 = csbCurrPeriodicStatsGroupSup1.setStatus('current') csbHistoryStatsGroupSup1 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 657, 2, 2, 10)).setObjects(("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbHistroyStatsTranscodedCalls"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbHistroyStatsTransratedCalls"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbHistoryStatsTotalCallUpdateFailure"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbHistoryStatsActiveIpv6Calls"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbHistoryStatsActiveEmergencyCalls"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbHistoryStatsActiveE2EmergencyCalls"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbHistoryStatsImsRxActiveCalls"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbHistoryStatsImsRxCallSetupFailures"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbHistoryStatsImsRxCallRenegotiationAttempts"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbHistoryStatsImsRxCallRenegotiationFailures"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbHistoryStatsAudioTranscodedCalls"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbHistoryStatsFaxTranscodedCalls"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbHistoryStatsRtpDisallowedFailures"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbHistoryStatsSrtpDisallowedFailures"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbHistoryStatsNonSrtpCalls"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbHistoryStatsSrtpNonIwCalls"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbHistoryStatsSrtpIwCalls"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbHistoryStatsDtmfIw2833Calls"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbHistoryStatsDtmfIwInbandCalls"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbHistoryStatsDtmfIw2833InbandCalls"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbHistoryStatsTotalTapsRequested"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbHistoryStatsTotalTapsSucceeded"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbHistoryStatsCurrentTaps"), ("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbHistoryStatsIpsecCalls")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csbHistoryStatsGroupSup1 = csbHistoryStatsGroupSup1.setStatus('current') csbPerFlowStatsGroupSup1 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 657, 2, 2, 11)).setObjects(("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbPerFlowStatsRTPPktsLost")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csbPerFlowStatsGroupSup1 = csbPerFlowStatsGroupSup1.setStatus('current') mibBuilder.exportSymbols("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", CiscoSbcPeriodicStatsInterval=CiscoSbcPeriodicStatsInterval, csbCurrPeriodicStatsCallSetupCACCallLimitFailure=csbCurrPeriodicStatsCallSetupCACCallLimitFailure, csbCurrPeriodicStatsTotalCallUpdateFailure=csbCurrPeriodicStatsTotalCallUpdateFailure, csbH248StatsRepliesRcvdRev1=csbH248StatsRepliesRcvdRev1, csbCurrPeriodicStatsActiveCalls=csbCurrPeriodicStatsActiveCalls, csbCurrPeriodicStatsImsRxActiveCalls=csbCurrPeriodicStatsImsRxActiveCalls, csbH248StatsGroup=csbH248StatsGroup, csbCallStatsPeakTranscodeFlows=csbCallStatsPeakTranscodeFlows, csbCurrPeriodicStatsSrtpNonIwCalls=csbCurrPeriodicStatsSrtpNonIwCalls, csbCurrPeriodicStatsFaxTranscodedCalls=csbCurrPeriodicStatsFaxTranscodedCalls, csbHistoryStatsActiveIpv6Calls=csbHistoryStatsActiveIpv6Calls, csbHistoryStatsCallSetupPolicyFailure=csbHistoryStatsCallSetupPolicyFailure, csbGlobalStatsGroup=csbGlobalStatsGroup, csbCurrPeriodicStatsTotalTapsSucceeded=csbCurrPeriodicStatsTotalTapsSucceeded, csbHistoryStatsActiveCallFailure=csbHistoryStatsActiveCallFailure, csbCallStatsInstanceEntry=csbCallStatsInstanceEntry, csbCallStatsMIBGroups=csbCallStatsMIBGroups, csbPerFlowStatsRTPOctetsDiscard=csbPerFlowStatsRTPOctetsDiscard, csbCurrPeriodicStatsActiveE2EmergencyCalls=csbCurrPeriodicStatsActiveE2EmergencyCalls, csbHistoryStatsCallSetupNAPolicyFailure=csbHistoryStatsCallSetupNAPolicyFailure, csbH248StatsSegPktsRcvd=csbH248StatsSegPktsRcvd, csbPerFlowStatsEntry=csbPerFlowStatsEntry, csbH248StatsRequestsRcvd=csbH248StatsRequestsRcvd, csbCurrPeriodicStatsSrtpDisallowedFailures=csbCurrPeriodicStatsSrtpDisallowedFailures, csbHistoryStatsCallSetupCACBandwidthFailure=csbHistoryStatsCallSetupCACBandwidthFailure, csbCurrPeriodicStatsCallRoutingFailure=csbCurrPeriodicStatsCallRoutingFailure, csbHistoryStatsCallSetupCACMediaLimitFailure=csbHistoryStatsCallSetupCACMediaLimitFailure, csbH248StatsRepliesRcvd=csbH248StatsRepliesRcvd, ciscoSbcCallStatsMIBNotifs=ciscoSbcCallStatsMIBNotifs, csbHistroyStatsTransratedCalls=csbHistroyStatsTransratedCalls, csbH248StatsRepliesRetried=csbH248StatsRepliesRetried, csbHistoryStatsSrtpNonIwCalls=csbHistoryStatsSrtpNonIwCalls, csbCurrPeriodicStatsCallSetupNAPolicyFailure=csbCurrPeriodicStatsCallSetupNAPolicyFailure, csbPerFlowStatsTable=csbPerFlowStatsTable, csbH248StatsRTTRev1=csbH248StatsRTTRev1, csbHistoryStatsTotalTapsSucceeded=csbHistoryStatsTotalTapsSucceeded, csbHistoryStatsFailSigFailure=csbHistoryStatsFailSigFailure, csbHistoryStatsImsRxActiveCalls=csbHistoryStatsImsRxActiveCalls, csbCallStatsMIBComplianceRev2=csbCallStatsMIBComplianceRev2, csbPerFlowStatsTmanPerSdr=csbPerFlowStatsTmanPerSdr, csbHistoryStatsElements=csbHistoryStatsElements, csbCurrPeriodicStatsTimestamp=csbCurrPeriodicStatsTimestamp, csbH248StatsSegPktsRcvdRev1=csbH248StatsSegPktsRcvdRev1, csbHistoryStatsFaxTranscodedCalls=csbHistoryStatsFaxTranscodedCalls, csbStatsInstanceGroup=csbStatsInstanceGroup, csbH248StatsGroupRev1=csbH248StatsGroupRev1, csbPerFlowStatsRTCPPktsSent=csbPerFlowStatsRTCPPktsSent, csbHistoryStatsCallMediaFailure=csbHistoryStatsCallMediaFailure, csbPerFlowStatsRTPOctetsSent=csbPerFlowStatsRTPOctetsSent, csbCallStatsInstanceTable=csbCallStatsInstanceTable, csbHistoryStatsImsRxCallRenegotiationFailures=csbHistoryStatsImsRxCallRenegotiationFailures, csbH248StatsTMaxTimeoutVal=csbH248StatsTMaxTimeoutVal, csbHistoryStatsTotalCallAttempts=csbHistoryStatsTotalCallAttempts, ciscoSbcCallStatsMIBConform=ciscoSbcCallStatsMIBConform, csbCurrPeriodicIpsecCalls=csbCurrPeriodicIpsecCalls, csbHistoryStatsActiveEmergencyCalls=csbHistoryStatsActiveEmergencyCalls, csbHistoryStatsDtmfIwInbandCalls=csbHistoryStatsDtmfIwInbandCalls, csbCurrPeriodicStatsDtmfIw2833Calls=csbCurrPeriodicStatsDtmfIw2833Calls, csbHistoryStatsActiveCalls=csbHistoryStatsActiveCalls, csbHistoryStatsCallSetupCACPolicyFailure=csbHistoryStatsCallSetupCACPolicyFailure, csbCurrPeriodicStatsActiveIpv6Calls=csbCurrPeriodicStatsActiveIpv6Calls, csbCallStatsUnclassifiedPkts=csbCallStatsUnclassifiedPkts, csbHistoryStatsCallResourceFailure=csbHistoryStatsCallResourceFailure, csbHistoryStatsTotalCallUpdateFailure=csbHistoryStatsTotalCallUpdateFailure, csbPerFlowStatsRTCPPktsLost=csbPerFlowStatsRTCPPktsLost, csbCurrPeriodicStatsInterval=csbCurrPeriodicStatsInterval, csbPerFlowStatsRTCPPktsRcvd=csbPerFlowStatsRTCPPktsRcvd, csbH248StatsRequestsSentRev1=csbH248StatsRequestsSentRev1, csbCurrPeriodicStatsTotalCallAttempts=csbCurrPeriodicStatsTotalCallAttempts, csbPerFlowStatsRTPPktsRcvd=csbPerFlowStatsRTPPktsRcvd, csbHistoryStatsNonSrtpCalls=csbHistoryStatsNonSrtpCalls, csbHistoryStatsSrtpDisallowedFailures=csbHistoryStatsSrtpDisallowedFailures, csbCallStatsPeakFlows=csbCallStatsPeakFlows, csbCurrPeriodicStatsCongestionFailure=csbCurrPeriodicStatsCongestionFailure, csbCallStatsAvailableFlows=csbCallStatsAvailableFlows, csbPerFlowStatsVdbeId=csbPerFlowStatsVdbeId, csbPerFlowStatsSideId=csbPerFlowStatsSideId, csbCurrPeriodicStatsImsRxCallSetupFaiures=csbCurrPeriodicStatsImsRxCallSetupFaiures, csbCallStatsInstanceIndex=csbCallStatsInstanceIndex, csbCallStatsInstancePhysicalIndex=csbCallStatsInstancePhysicalIndex, csbH248StatsRev1Table=csbH248StatsRev1Table, csbCurrPeriodicStatsDtmfIw2833InbandCalls=csbCurrPeriodicStatsDtmfIw2833InbandCalls, csbHistoryStatsDtmfIw2833InbandCalls=csbHistoryStatsDtmfIw2833InbandCalls, csbCurrPeriodicStatsActivatingCalls=csbCurrPeriodicStatsActivatingCalls, csbPerFlowStatsFlowPairId=csbPerFlowStatsFlowPairId, csbHistoryStatsIpsecCalls=csbHistoryStatsIpsecCalls, csbH248StatsRequestsFailedRev1=csbH248StatsRequestsFailedRev1, csbPerFlowStatsGateId=csbPerFlowStatsGateId, csbCallStatsMIBComplianceRev1=csbCallStatsMIBComplianceRev1, csbHistoryStatsEntry=csbHistoryStatsEntry, csbCurrPeriodicStatsCallSetupCACBandwidthFailure=csbCurrPeriodicStatsCallSetupCACBandwidthFailure, csbPerFlowStatsAdrStatus=csbPerFlowStatsAdrStatus, csbH248StatsTable=csbH248StatsTable, csbCallStatsCallsHigh=csbCallStatsCallsHigh, csbH248StatsRTT=csbH248StatsRTT, csbH248StatsCtrlrIndex=csbH248StatsCtrlrIndex, csbH248StatsLT=csbH248StatsLT, csbCurrPeriodicStatsFailedCallAttempts=csbCurrPeriodicStatsFailedCallAttempts, csbPerFlowStatsFlowType=csbPerFlowStatsFlowType, csbCallStatsRTPOctetsDiscard=csbCallStatsRTPOctetsDiscard, csbH248StatsRequestsRetried=csbH248StatsRequestsRetried, csbPerFlowStatsRTPPktsDiscard=csbPerFlowStatsRTPPktsDiscard, csbH248StatsLTRev1=csbH248StatsLTRev1, csbCurrPeriodicStatsActiveEmergencyCalls=csbCurrPeriodicStatsActiveEmergencyCalls, csbHistoryStatsCallSetupCACRateLimitFailure=csbHistoryStatsCallSetupCACRateLimitFailure, csbCallStatsRTPOctetsSent=csbCallStatsRTPOctetsSent, csbCallStatsPeakSigFlows=csbCallStatsPeakSigFlows, csbCallStatsRTPPktsSent=csbCallStatsRTPPktsSent, csbH248StatsEntry=csbH248StatsEntry, csbPerFlowStatsEPJitter=csbPerFlowStatsEPJitter, csbH248StatsRepliesRetriedRev1=csbH248StatsRepliesRetriedRev1, csbHistoryStatsRtpDisallowedFailures=csbHistoryStatsRtpDisallowedFailures, csbHistoryStatsGroup=csbHistoryStatsGroup, csbCurrPeriodicStatsDtmfIwInbandCalls=csbCurrPeriodicStatsDtmfIwInbandCalls, csbH248StatsSegPktsSentRev1=csbH248StatsSegPktsSentRev1, csbCurrPeriodicStatsGroupSup1=csbCurrPeriodicStatsGroupSup1, csbCurrPeriodicStatsNonSrtpCalls=csbCurrPeriodicStatsNonSrtpCalls, csbHistoryStatsCallSetupRoutingPolicyFailure=csbHistoryStatsCallSetupRoutingPolicyFailure, csbH248StatsVdbeId=csbH248StatsVdbeId, csbCurrPeriodicStatsActiveCallFailure=csbCurrPeriodicStatsActiveCallFailure, csbCallStatsNoMediaCount=csbCallStatsNoMediaCount, csbHistoryStatsImsRxCallRenegotiationAttempts=csbHistoryStatsImsRxCallRenegotiationAttempts, csbHistoryStatsCurrentTaps=csbHistoryStatsCurrentTaps, csbCurrPeriodicStatsEntry=csbCurrPeriodicStatsEntry, csbHistoryStatsTotalTapsRequested=csbHistoryStatsTotalTapsRequested, csbCallStatsAvailableTranscodeFlows=csbCallStatsAvailableTranscodeFlows, csbCurrPeriodicStatsCallMediaFailure=csbCurrPeriodicStatsCallMediaFailure, csbCurrPeriodicStatsCallSetupCACMediaLimitFailure=csbCurrPeriodicStatsCallSetupCACMediaLimitFailure, PYSNMP_MODULE_ID=ciscoSbcCallStatsMIB, csbCallStatsUsedSigFlows=csbCallStatsUsedSigFlows, csbCurrPeriodicStatsCallSetupCACPolicyFailure=csbCurrPeriodicStatsCallSetupCACPolicyFailure, csbCallStatsTotalSigFlows=csbCallStatsTotalSigFlows, csbGlobalStatsGroupSup1=csbGlobalStatsGroupSup1, csbCurrPeriodicStatsSrtpIwCalls=csbCurrPeriodicStatsSrtpIwCalls, csbCurrPeriodicStatsImsRxCallRenegotiationAttempts=csbCurrPeriodicStatsImsRxCallRenegotiationAttempts, csbCurrPeriodicStatsImsRxCallRenegotiationFailures=csbCurrPeriodicStatsImsRxCallRenegotiationFailures, csbH248StatsEstablishedTime=csbH248StatsEstablishedTime, csbPerFlowStatsGroup=csbPerFlowStatsGroup, csbHistoryStatsDtmfIw2833Calls=csbHistoryStatsDtmfIw2833Calls, csbCurrPeriodicStatsRtpDisallowedFailures=csbCurrPeriodicStatsRtpDisallowedFailures, csbH248StatsRepliesSentRev1=csbH248StatsRepliesSentRev1, csbCallStatsTotalTranscodeFlows=csbCallStatsTotalTranscodeFlows, csbCallStatsTable=csbCallStatsTable, csbHistoryStatsSrtpIwCalls=csbHistoryStatsSrtpIwCalls, csbCallStatsSbcName=csbCallStatsSbcName, csbH248StatsEstablishedTimeRev1=csbH248StatsEstablishedTimeRev1, csbCurrPeriodicStatsCurrentTaps=csbCurrPeriodicStatsCurrentTaps, csbHistoryStatsImsRxCallSetupFailures=csbHistoryStatsImsRxCallSetupFailures, csbCurrPeriodicStatsCallSetupCACMediaUpdateFailure=csbCurrPeriodicStatsCallSetupCACMediaUpdateFailure, csbCallStatsRate1Sec=csbCallStatsRate1Sec, csbH248StatsTMaxTimeoutValRev1=csbH248StatsTMaxTimeoutValRev1, csbHistoryStatsGroupSup1=csbHistoryStatsGroupSup1, csbPerFlowStatsTmanPerMbs=csbPerFlowStatsTmanPerMbs, csbCallStatsAvailablePktRate=csbCallStatsAvailablePktRate, csbHistroyStatsTranscodedCalls=csbHistroyStatsTranscodedCalls, csbCallStatsEntry=csbCallStatsEntry, csbPerFlowStatsRTPPktsLost=csbPerFlowStatsRTPPktsLost, csbH248StatsRequestsRcvdRev1=csbH248StatsRequestsRcvdRev1, csbCurrPeriodicStatsDeactivatingCalls=csbCurrPeriodicStatsDeactivatingCalls, csbCallStatsRTPPktsRcvd=csbCallStatsRTPPktsRcvd, csbHistoryStatsAudioTranscodedCalls=csbHistoryStatsAudioTranscodedCalls, csbCallStatsRTPPktsDiscard=csbCallStatsRTPPktsDiscard, csbCallStatsRTPOctetsRcvd=csbCallStatsRTPOctetsRcvd, csbCallStatsActiveTranscodeFlows=csbCallStatsActiveTranscodeFlows, csbHistoryStatsTable=csbHistoryStatsTable, csbH248StatsSegPktsSent=csbH248StatsSegPktsSent, csbHistoryStatsActiveE2EmergencyCalls=csbHistoryStatsActiveE2EmergencyCalls, csbCurrPeriodicStatsCallSetupPolicyFailure=csbCurrPeriodicStatsCallSetupPolicyFailure, ciscoSbcCallStatsMIBObjects=ciscoSbcCallStatsMIBObjects, ciscoSbcCallStatsMIB=ciscoSbcCallStatsMIB, csbHistoryStatsCallSetupCACCallLimitFailure=csbHistoryStatsCallSetupCACCallLimitFailure, csbH248StatsRequestsFailed=csbH248StatsRequestsFailed, csbCurrPeriodicStatsCallSigFailure=csbCurrPeriodicStatsCallSigFailure, csbH248StatsRequestsSent=csbH248StatsRequestsSent, csbHistoryStatsCallSetupCACMediaUpdateFailure=csbHistoryStatsCallSetupCACMediaUpdateFailure, csbHistoryStatsInterval=csbHistoryStatsInterval, csbCurrPeriodicStatsTranscodedCalls=csbCurrPeriodicStatsTranscodedCalls, csbCallStatsServiceIndex=csbCallStatsServiceIndex, csbCallStatsTotalFlows=csbCallStatsTotalFlows, csbHistoryStatsCongestionFailure=csbHistoryStatsCongestionFailure, csbH248StatsRepliesSent=csbH248StatsRepliesSent, csbCurrPeriodicStatsTable=csbCurrPeriodicStatsTable, csbCallStatsRouteErrors=csbCallStatsRouteErrors, csbH248StatsRev1Entry=csbH248StatsRev1Entry, csbCallStatsCallsLow=csbCallStatsCallsLow, csbHistoryStatsTimestamp=csbHistoryStatsTimestamp, csbHistoryStatsFailedCallAttempts=csbHistoryStatsFailedCallAttempts, csbCallStatsMIBCompliances=csbCallStatsMIBCompliances, csbPerFlowStatsDscpSettings=csbPerFlowStatsDscpSettings, csbCallStatsUsedFlows=csbCallStatsUsedFlows, csbCurrPeriodicStatsGroup=csbCurrPeriodicStatsGroup, csbH248StatsRequestsRetriedRev1=csbH248StatsRequestsRetriedRev1, csbPerFlowStatsRTPPktsSent=csbPerFlowStatsRTPPktsSent, csbPerFlowStatsGroupSup1=csbPerFlowStatsGroupSup1, csbCurrPeriodicStatsCallSetupRoutingPolicyFailure=csbCurrPeriodicStatsCallSetupRoutingPolicyFailure, csbCurrPeriodicStatsCallSetupCACRateLimitFailure=csbCurrPeriodicStatsCallSetupCACRateLimitFailure, csbCurrPeriodicStatsAudioTranscodedCalls=csbCurrPeriodicStatsAudioTranscodedCalls, csbPerFlowStatsRTPOctetsRcvd=csbPerFlowStatsRTPOctetsRcvd, csbPerFlowStatsQASettings=csbPerFlowStatsQASettings, csbCurrPeriodicStatsTotalTapsRequested=csbCurrPeriodicStatsTotalTapsRequested, csbHistoryStatsCallRoutingFailure=csbHistoryStatsCallRoutingFailure, csbCurrPeriodicStatsTransratedCalls=csbCurrPeriodicStatsTransratedCalls, csbCurrPeriodicStatsCallResourceFailure=csbCurrPeriodicStatsCallResourceFailure, csbCallStatsMIBCompliance=csbCallStatsMIBCompliance)
(object_identifier, integer, octet_string) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'Integer', 'OctetString') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (value_range_constraint, constraints_intersection, single_value_constraint, value_size_constraint, constraints_union) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'ConstraintsIntersection', 'SingleValueConstraint', 'ValueSizeConstraint', 'ConstraintsUnion') (cisco_mgmt,) = mibBuilder.importSymbols('CISCO-SMI', 'ciscoMgmt') (ent_physical_index_or_zero,) = mibBuilder.importSymbols('CISCO-TC', 'EntPhysicalIndexOrZero') (snmp_admin_string,) = mibBuilder.importSymbols('SNMP-FRAMEWORK-MIB', 'SnmpAdminString') (module_compliance, object_group, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'ObjectGroup', 'NotificationGroup') (notification_type, unsigned32, object_identity, ip_address, counter32, bits, counter64, iso, mib_identifier, gauge32, integer32, module_identity, time_ticks, mib_scalar, mib_table, mib_table_row, mib_table_column) = mibBuilder.importSymbols('SNMPv2-SMI', 'NotificationType', 'Unsigned32', 'ObjectIdentity', 'IpAddress', 'Counter32', 'Bits', 'Counter64', 'iso', 'MibIdentifier', 'Gauge32', 'Integer32', 'ModuleIdentity', 'TimeTicks', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn') (display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention') cisco_sbc_call_stats_mib = module_identity((1, 3, 6, 1, 4, 1, 9, 9, 657)) ciscoSbcCallStatsMIB.setRevisions(('2010-09-03 00:00', '2008-08-27 00:00', '2008-05-29 00:00')) if mibBuilder.loadTexts: ciscoSbcCallStatsMIB.setLastUpdated('201009030000Z') if mibBuilder.loadTexts: ciscoSbcCallStatsMIB.setOrganization('Cisco Systems, Inc.') class Ciscosbcperiodicstatsinterval(TextualConvention, Integer32): status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4)) named_values = named_values(('fiveMinute', 1), ('fifteenMinute', 2), ('oneHour', 3), ('oneDay', 4)) cisco_sbc_call_stats_mib_notifs = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 657, 0)) cisco_sbc_call_stats_mib_objects = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 657, 1)) cisco_sbc_call_stats_mib_conform = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 657, 2)) csb_call_stats_instance_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 1)) if mibBuilder.loadTexts: csbCallStatsInstanceTable.setStatus('current') csb_call_stats_instance_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 1, 1)).setIndexNames((0, 'CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCallStatsInstanceIndex')) if mibBuilder.loadTexts: csbCallStatsInstanceEntry.setStatus('current') csb_call_stats_instance_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 1, 1, 1), unsigned32()) if mibBuilder.loadTexts: csbCallStatsInstanceIndex.setStatus('current') csb_call_stats_instance_physical_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 1, 1, 2), ent_physical_index_or_zero()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbCallStatsInstancePhysicalIndex.setStatus('current') csb_call_stats_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2)) if mibBuilder.loadTexts: csbCallStatsTable.setStatus('current') csb_call_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1)).setIndexNames((0, 'CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCallStatsInstanceIndex'), (0, 'CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCallStatsServiceIndex')) if mibBuilder.loadTexts: csbCallStatsEntry.setStatus('current') csb_call_stats_service_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1, 1), unsigned32()) if mibBuilder.loadTexts: csbCallStatsServiceIndex.setStatus('current') csb_call_stats_sbc_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1, 2), snmp_admin_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbCallStatsSbcName.setStatus('current') csb_call_stats_calls_high = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1, 3), unsigned32()).setUnits('calls per second').setMaxAccess('readonly') if mibBuilder.loadTexts: csbCallStatsCallsHigh.setStatus('current') csb_call_stats_rate1_sec = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1, 4), gauge32()).setUnits('calls per second').setMaxAccess('readonly') if mibBuilder.loadTexts: csbCallStatsRate1Sec.setStatus('current') csb_call_stats_calls_low = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1, 5), unsigned32()).setUnits('calls per second').setMaxAccess('readonly') if mibBuilder.loadTexts: csbCallStatsCallsLow.setStatus('current') csb_call_stats_available_flows = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1, 6), gauge32()).setUnits('flows').setMaxAccess('readonly') if mibBuilder.loadTexts: csbCallStatsAvailableFlows.setStatus('current') csb_call_stats_used_flows = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1, 7), gauge32()).setUnits('flows').setMaxAccess('readonly') if mibBuilder.loadTexts: csbCallStatsUsedFlows.setStatus('current') csb_call_stats_peak_flows = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1, 8), unsigned32()).setUnits('flows').setMaxAccess('readonly') if mibBuilder.loadTexts: csbCallStatsPeakFlows.setStatus('current') csb_call_stats_total_flows = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1, 9), unsigned32()).setUnits('flows').setMaxAccess('readonly') if mibBuilder.loadTexts: csbCallStatsTotalFlows.setStatus('current') csb_call_stats_used_sig_flows = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1, 10), gauge32()).setUnits('signal flows').setMaxAccess('readonly') if mibBuilder.loadTexts: csbCallStatsUsedSigFlows.setStatus('current') csb_call_stats_peak_sig_flows = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1, 11), unsigned32()).setUnits('signal flows').setMaxAccess('readonly') if mibBuilder.loadTexts: csbCallStatsPeakSigFlows.setStatus('current') csb_call_stats_total_sig_flows = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1, 12), unsigned32()).setUnits('signal flows').setMaxAccess('readonly') if mibBuilder.loadTexts: csbCallStatsTotalSigFlows.setStatus('current') csb_call_stats_available_pkt_rate = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1, 13), gauge32()).setUnits('packets per second').setMaxAccess('readonly') if mibBuilder.loadTexts: csbCallStatsAvailablePktRate.setStatus('current') csb_call_stats_unclassified_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1, 14), counter64()).setUnits('packets').setMaxAccess('readonly') if mibBuilder.loadTexts: csbCallStatsUnclassifiedPkts.setStatus('current') csb_call_stats_rtp_pkts_sent = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1, 15), counter64()).setUnits('packets').setMaxAccess('readonly') if mibBuilder.loadTexts: csbCallStatsRTPPktsSent.setStatus('current') csb_call_stats_rtp_pkts_rcvd = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1, 16), counter64()).setUnits('packets').setMaxAccess('readonly') if mibBuilder.loadTexts: csbCallStatsRTPPktsRcvd.setStatus('current') csb_call_stats_rtp_pkts_discard = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1, 17), counter64()).setUnits('packets').setMaxAccess('readonly') if mibBuilder.loadTexts: csbCallStatsRTPPktsDiscard.setStatus('current') csb_call_stats_rtp_octets_sent = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1, 18), counter64()).setUnits('octets').setMaxAccess('readonly') if mibBuilder.loadTexts: csbCallStatsRTPOctetsSent.setStatus('current') csb_call_stats_rtp_octets_rcvd = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1, 19), counter64()).setUnits('octets').setMaxAccess('readonly') if mibBuilder.loadTexts: csbCallStatsRTPOctetsRcvd.setStatus('current') csb_call_stats_rtp_octets_discard = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1, 20), counter64()).setUnits('octets').setMaxAccess('readonly') if mibBuilder.loadTexts: csbCallStatsRTPOctetsDiscard.setStatus('current') csb_call_stats_no_media_count = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1, 21), counter32()).setUnits('no media events').setMaxAccess('readonly') if mibBuilder.loadTexts: csbCallStatsNoMediaCount.setStatus('current') csb_call_stats_route_errors = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1, 22), counter32()).setUnits('route error events').setMaxAccess('readonly') if mibBuilder.loadTexts: csbCallStatsRouteErrors.setStatus('current') csb_call_stats_available_transcode_flows = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1, 23), gauge32()).setUnits('flows').setMaxAccess('readonly') if mibBuilder.loadTexts: csbCallStatsAvailableTranscodeFlows.setStatus('current') csb_call_stats_active_transcode_flows = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1, 24), gauge32()).setUnits('flows').setMaxAccess('readonly') if mibBuilder.loadTexts: csbCallStatsActiveTranscodeFlows.setStatus('current') csb_call_stats_peak_transcode_flows = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1, 25), unsigned32()).setUnits('flows').setMaxAccess('readonly') if mibBuilder.loadTexts: csbCallStatsPeakTranscodeFlows.setStatus('current') csb_call_stats_total_transcode_flows = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 2, 1, 26), unsigned32()).setUnits('flows').setMaxAccess('readonly') if mibBuilder.loadTexts: csbCallStatsTotalTranscodeFlows.setStatus('current') csb_curr_periodic_stats_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3)) if mibBuilder.loadTexts: csbCurrPeriodicStatsTable.setStatus('current') csb_curr_periodic_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1)).setIndexNames((0, 'CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCallStatsInstanceIndex'), (0, 'CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCallStatsServiceIndex'), (0, 'CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCurrPeriodicStatsInterval')) if mibBuilder.loadTexts: csbCurrPeriodicStatsEntry.setStatus('current') csb_curr_periodic_stats_interval = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 1), cisco_sbc_periodic_stats_interval()) if mibBuilder.loadTexts: csbCurrPeriodicStatsInterval.setStatus('current') csb_curr_periodic_stats_active_calls = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 2), gauge32()).setUnits('calls').setMaxAccess('readonly') if mibBuilder.loadTexts: csbCurrPeriodicStatsActiveCalls.setStatus('current') csb_curr_periodic_stats_activating_calls = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 3), gauge32()).setUnits('calls').setMaxAccess('readonly') if mibBuilder.loadTexts: csbCurrPeriodicStatsActivatingCalls.setStatus('current') csb_curr_periodic_stats_deactivating_calls = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 4), gauge32()).setUnits('calls').setMaxAccess('readonly') if mibBuilder.loadTexts: csbCurrPeriodicStatsDeactivatingCalls.setStatus('current') csb_curr_periodic_stats_total_call_attempts = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 5), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbCurrPeriodicStatsTotalCallAttempts.setStatus('current') csb_curr_periodic_stats_failed_call_attempts = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 6), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbCurrPeriodicStatsFailedCallAttempts.setStatus('current') csb_curr_periodic_stats_call_routing_failure = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 7), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbCurrPeriodicStatsCallRoutingFailure.setStatus('current') csb_curr_periodic_stats_call_resource_failure = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 8), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbCurrPeriodicStatsCallResourceFailure.setStatus('current') csb_curr_periodic_stats_call_media_failure = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 9), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbCurrPeriodicStatsCallMediaFailure.setStatus('current') csb_curr_periodic_stats_call_sig_failure = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 10), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbCurrPeriodicStatsCallSigFailure.setStatus('current') csb_curr_periodic_stats_active_call_failure = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 11), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbCurrPeriodicStatsActiveCallFailure.setStatus('current') csb_curr_periodic_stats_congestion_failure = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 12), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbCurrPeriodicStatsCongestionFailure.setStatus('current') csb_curr_periodic_stats_call_setup_policy_failure = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 13), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbCurrPeriodicStatsCallSetupPolicyFailure.setStatus('current') csb_curr_periodic_stats_call_setup_na_policy_failure = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 14), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbCurrPeriodicStatsCallSetupNAPolicyFailure.setStatus('current') csb_curr_periodic_stats_call_setup_routing_policy_failure = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 15), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbCurrPeriodicStatsCallSetupRoutingPolicyFailure.setStatus('current') csb_curr_periodic_stats_call_setup_cac_policy_failure = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 16), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbCurrPeriodicStatsCallSetupCACPolicyFailure.setStatus('current') csb_curr_periodic_stats_call_setup_cac_call_limit_failure = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 17), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbCurrPeriodicStatsCallSetupCACCallLimitFailure.setStatus('current') csb_curr_periodic_stats_call_setup_cac_rate_limit_failure = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 18), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbCurrPeriodicStatsCallSetupCACRateLimitFailure.setStatus('current') csb_curr_periodic_stats_call_setup_cac_bandwidth_failure = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 19), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbCurrPeriodicStatsCallSetupCACBandwidthFailure.setStatus('current') csb_curr_periodic_stats_call_setup_cac_media_limit_failure = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 20), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbCurrPeriodicStatsCallSetupCACMediaLimitFailure.setStatus('current') csb_curr_periodic_stats_call_setup_cac_media_update_failure = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 21), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbCurrPeriodicStatsCallSetupCACMediaUpdateFailure.setStatus('current') csb_curr_periodic_stats_timestamp = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 22), octet_string().subtype(subtypeSpec=value_size_constraint(0, 80))).setMaxAccess('readonly') if mibBuilder.loadTexts: csbCurrPeriodicStatsTimestamp.setStatus('current') csb_curr_periodic_stats_transcoded_calls = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 23), gauge32()).setUnits('calls').setMaxAccess('readonly') if mibBuilder.loadTexts: csbCurrPeriodicStatsTranscodedCalls.setStatus('current') csb_curr_periodic_stats_transrated_calls = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 24), gauge32()).setUnits('calls').setMaxAccess('readonly') if mibBuilder.loadTexts: csbCurrPeriodicStatsTransratedCalls.setStatus('current') csb_curr_periodic_stats_total_call_update_failure = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 25), gauge32()).setUnits('calls').setMaxAccess('readonly') if mibBuilder.loadTexts: csbCurrPeriodicStatsTotalCallUpdateFailure.setStatus('current') csb_curr_periodic_stats_active_ipv6_calls = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 26), gauge32()).setUnits('calls').setMaxAccess('readonly') if mibBuilder.loadTexts: csbCurrPeriodicStatsActiveIpv6Calls.setStatus('current') csb_curr_periodic_stats_active_emergency_calls = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 27), gauge32()).setUnits('calls').setMaxAccess('readonly') if mibBuilder.loadTexts: csbCurrPeriodicStatsActiveEmergencyCalls.setStatus('current') csb_curr_periodic_stats_active_e2_emergency_calls = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 28), gauge32()).setUnits('calls').setMaxAccess('readonly') if mibBuilder.loadTexts: csbCurrPeriodicStatsActiveE2EmergencyCalls.setStatus('current') csb_curr_periodic_stats_ims_rx_active_calls = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 29), gauge32()).setUnits('calls').setMaxAccess('readonly') if mibBuilder.loadTexts: csbCurrPeriodicStatsImsRxActiveCalls.setStatus('current') csb_curr_periodic_stats_ims_rx_call_setup_faiures = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 30), gauge32()).setUnits('failures').setMaxAccess('readonly') if mibBuilder.loadTexts: csbCurrPeriodicStatsImsRxCallSetupFaiures.setStatus('current') csb_curr_periodic_stats_ims_rx_call_renegotiation_attempts = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 31), gauge32()).setUnits('attempts').setMaxAccess('readonly') if mibBuilder.loadTexts: csbCurrPeriodicStatsImsRxCallRenegotiationAttempts.setStatus('current') csb_curr_periodic_stats_ims_rx_call_renegotiation_failures = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 32), gauge32()).setUnits('failures').setMaxAccess('readonly') if mibBuilder.loadTexts: csbCurrPeriodicStatsImsRxCallRenegotiationFailures.setStatus('current') csb_curr_periodic_stats_audio_transcoded_calls = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 33), gauge32()).setUnits('calls').setMaxAccess('readonly') if mibBuilder.loadTexts: csbCurrPeriodicStatsAudioTranscodedCalls.setStatus('current') csb_curr_periodic_stats_fax_transcoded_calls = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 34), gauge32()).setUnits('calls').setMaxAccess('readonly') if mibBuilder.loadTexts: csbCurrPeriodicStatsFaxTranscodedCalls.setStatus('current') csb_curr_periodic_stats_rtp_disallowed_failures = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 35), gauge32()).setUnits('failures').setMaxAccess('readonly') if mibBuilder.loadTexts: csbCurrPeriodicStatsRtpDisallowedFailures.setStatus('current') csb_curr_periodic_stats_srtp_disallowed_failures = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 36), gauge32()).setUnits('failures').setMaxAccess('readonly') if mibBuilder.loadTexts: csbCurrPeriodicStatsSrtpDisallowedFailures.setStatus('current') csb_curr_periodic_stats_non_srtp_calls = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 37), gauge32()).setUnits('calls').setMaxAccess('readonly') if mibBuilder.loadTexts: csbCurrPeriodicStatsNonSrtpCalls.setStatus('current') csb_curr_periodic_stats_srtp_non_iw_calls = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 38), gauge32()).setUnits('calls').setMaxAccess('readonly') if mibBuilder.loadTexts: csbCurrPeriodicStatsSrtpNonIwCalls.setStatus('current') csb_curr_periodic_stats_srtp_iw_calls = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 39), gauge32()).setUnits('calls').setMaxAccess('readonly') if mibBuilder.loadTexts: csbCurrPeriodicStatsSrtpIwCalls.setStatus('current') csb_curr_periodic_stats_dtmf_iw2833_calls = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 40), gauge32()).setUnits('calls').setMaxAccess('readonly') if mibBuilder.loadTexts: csbCurrPeriodicStatsDtmfIw2833Calls.setStatus('current') csb_curr_periodic_stats_dtmf_iw_inband_calls = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 41), gauge32()).setUnits('calls').setMaxAccess('readonly') if mibBuilder.loadTexts: csbCurrPeriodicStatsDtmfIwInbandCalls.setStatus('current') csb_curr_periodic_stats_dtmf_iw2833_inband_calls = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 42), gauge32()).setUnits('calls').setMaxAccess('readonly') if mibBuilder.loadTexts: csbCurrPeriodicStatsDtmfIw2833InbandCalls.setStatus('current') csb_curr_periodic_stats_total_taps_requested = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 43), gauge32()).setUnits('attempts').setMaxAccess('readonly') if mibBuilder.loadTexts: csbCurrPeriodicStatsTotalTapsRequested.setStatus('current') csb_curr_periodic_stats_total_taps_succeeded = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 44), gauge32()).setUnits('success').setMaxAccess('readonly') if mibBuilder.loadTexts: csbCurrPeriodicStatsTotalTapsSucceeded.setStatus('current') csb_curr_periodic_stats_current_taps = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 45), gauge32()).setUnits('taps').setMaxAccess('readonly') if mibBuilder.loadTexts: csbCurrPeriodicStatsCurrentTaps.setStatus('current') csb_curr_periodic_ipsec_calls = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 3, 1, 46), gauge32()).setUnits('calls').setMaxAccess('readonly') if mibBuilder.loadTexts: csbCurrPeriodicIpsecCalls.setStatus('current') csb_history_stats_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4)) if mibBuilder.loadTexts: csbHistoryStatsTable.setStatus('current') csb_history_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1)).setIndexNames((0, 'CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCallStatsInstanceIndex'), (0, 'CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCallStatsServiceIndex'), (0, 'CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbHistoryStatsInterval'), (0, 'CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbHistoryStatsElements')) if mibBuilder.loadTexts: csbHistoryStatsEntry.setStatus('current') csb_history_stats_interval = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 1), cisco_sbc_periodic_stats_interval()) if mibBuilder.loadTexts: csbHistoryStatsInterval.setStatus('current') csb_history_stats_elements = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 2), unsigned32()) if mibBuilder.loadTexts: csbHistoryStatsElements.setStatus('current') csb_history_stats_active_calls = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 3), gauge32()).setUnits('calls').setMaxAccess('readonly') if mibBuilder.loadTexts: csbHistoryStatsActiveCalls.setStatus('current') csb_history_stats_total_call_attempts = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 4), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbHistoryStatsTotalCallAttempts.setStatus('current') csb_history_stats_failed_call_attempts = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 5), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbHistoryStatsFailedCallAttempts.setStatus('current') csb_history_stats_call_routing_failure = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 6), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbHistoryStatsCallRoutingFailure.setStatus('current') csb_history_stats_call_resource_failure = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 7), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbHistoryStatsCallResourceFailure.setStatus('current') csb_history_stats_call_media_failure = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 8), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbHistoryStatsCallMediaFailure.setStatus('current') csb_history_stats_fail_sig_failure = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 9), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbHistoryStatsFailSigFailure.setStatus('current') csb_history_stats_active_call_failure = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 10), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbHistoryStatsActiveCallFailure.setStatus('current') csb_history_stats_congestion_failure = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 11), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbHistoryStatsCongestionFailure.setStatus('current') csb_history_stats_call_setup_policy_failure = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 12), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbHistoryStatsCallSetupPolicyFailure.setStatus('current') csb_history_stats_call_setup_na_policy_failure = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 13), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbHistoryStatsCallSetupNAPolicyFailure.setStatus('current') csb_history_stats_call_setup_routing_policy_failure = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 14), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbHistoryStatsCallSetupRoutingPolicyFailure.setStatus('current') csb_history_stats_call_setup_cac_policy_failure = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 15), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbHistoryStatsCallSetupCACPolicyFailure.setStatus('current') csb_history_stats_call_setup_cac_call_limit_failure = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 16), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbHistoryStatsCallSetupCACCallLimitFailure.setStatus('current') csb_history_stats_call_setup_cac_rate_limit_failure = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 17), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbHistoryStatsCallSetupCACRateLimitFailure.setStatus('current') csb_history_stats_call_setup_cac_bandwidth_failure = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 18), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbHistoryStatsCallSetupCACBandwidthFailure.setStatus('current') csb_history_stats_call_setup_cac_media_limit_failure = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 19), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbHistoryStatsCallSetupCACMediaLimitFailure.setStatus('current') csb_history_stats_call_setup_cac_media_update_failure = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 20), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbHistoryStatsCallSetupCACMediaUpdateFailure.setStatus('current') csb_history_stats_timestamp = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 21), octet_string().subtype(subtypeSpec=value_size_constraint(0, 80))).setMaxAccess('readonly') if mibBuilder.loadTexts: csbHistoryStatsTimestamp.setStatus('current') csb_histroy_stats_transcoded_calls = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 22), gauge32()).setUnits('calls').setMaxAccess('readonly') if mibBuilder.loadTexts: csbHistroyStatsTranscodedCalls.setStatus('current') csb_histroy_stats_transrated_calls = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 23), gauge32()).setUnits('calls').setMaxAccess('readonly') if mibBuilder.loadTexts: csbHistroyStatsTransratedCalls.setStatus('current') csb_history_stats_total_call_update_failure = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 24), gauge32()).setUnits('calls').setMaxAccess('readonly') if mibBuilder.loadTexts: csbHistoryStatsTotalCallUpdateFailure.setStatus('current') csb_history_stats_active_ipv6_calls = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 25), gauge32()).setUnits('calls').setMaxAccess('readonly') if mibBuilder.loadTexts: csbHistoryStatsActiveIpv6Calls.setStatus('current') csb_history_stats_active_emergency_calls = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 26), gauge32()).setUnits('calls').setMaxAccess('readonly') if mibBuilder.loadTexts: csbHistoryStatsActiveEmergencyCalls.setStatus('current') csb_history_stats_active_e2_emergency_calls = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 27), gauge32()).setUnits('calls').setMaxAccess('readonly') if mibBuilder.loadTexts: csbHistoryStatsActiveE2EmergencyCalls.setStatus('current') csb_history_stats_ims_rx_active_calls = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 28), gauge32()).setUnits('calls').setMaxAccess('readonly') if mibBuilder.loadTexts: csbHistoryStatsImsRxActiveCalls.setStatus('current') csb_history_stats_ims_rx_call_setup_failures = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 29), gauge32()).setUnits('failures').setMaxAccess('readonly') if mibBuilder.loadTexts: csbHistoryStatsImsRxCallSetupFailures.setStatus('current') csb_history_stats_ims_rx_call_renegotiation_attempts = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 30), gauge32()).setUnits('attempts').setMaxAccess('readonly') if mibBuilder.loadTexts: csbHistoryStatsImsRxCallRenegotiationAttempts.setStatus('current') csb_history_stats_ims_rx_call_renegotiation_failures = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 31), gauge32()).setUnits('failures').setMaxAccess('readonly') if mibBuilder.loadTexts: csbHistoryStatsImsRxCallRenegotiationFailures.setStatus('current') csb_history_stats_audio_transcoded_calls = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 32), gauge32()).setUnits('calls').setMaxAccess('readonly') if mibBuilder.loadTexts: csbHistoryStatsAudioTranscodedCalls.setStatus('current') csb_history_stats_fax_transcoded_calls = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 33), gauge32()).setUnits('calls').setMaxAccess('readonly') if mibBuilder.loadTexts: csbHistoryStatsFaxTranscodedCalls.setStatus('current') csb_history_stats_rtp_disallowed_failures = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 34), gauge32()).setUnits('failures').setMaxAccess('readonly') if mibBuilder.loadTexts: csbHistoryStatsRtpDisallowedFailures.setStatus('current') csb_history_stats_srtp_disallowed_failures = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 35), gauge32()).setUnits('failures').setMaxAccess('readonly') if mibBuilder.loadTexts: csbHistoryStatsSrtpDisallowedFailures.setStatus('current') csb_history_stats_non_srtp_calls = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 36), gauge32()).setUnits('calls').setMaxAccess('readonly') if mibBuilder.loadTexts: csbHistoryStatsNonSrtpCalls.setStatus('current') csb_history_stats_srtp_non_iw_calls = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 37), gauge32()).setUnits('calls').setMaxAccess('readonly') if mibBuilder.loadTexts: csbHistoryStatsSrtpNonIwCalls.setStatus('current') csb_history_stats_srtp_iw_calls = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 38), gauge32()).setUnits('calls').setMaxAccess('readonly') if mibBuilder.loadTexts: csbHistoryStatsSrtpIwCalls.setStatus('current') csb_history_stats_dtmf_iw2833_calls = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 39), gauge32()).setUnits('calls').setMaxAccess('readonly') if mibBuilder.loadTexts: csbHistoryStatsDtmfIw2833Calls.setStatus('current') csb_history_stats_dtmf_iw_inband_calls = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 40), gauge32()).setUnits('calls').setMaxAccess('readonly') if mibBuilder.loadTexts: csbHistoryStatsDtmfIwInbandCalls.setStatus('current') csb_history_stats_dtmf_iw2833_inband_calls = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 41), gauge32()).setUnits('calls').setMaxAccess('readonly') if mibBuilder.loadTexts: csbHistoryStatsDtmfIw2833InbandCalls.setStatus('current') csb_history_stats_total_taps_requested = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 42), gauge32()).setUnits('attempts').setMaxAccess('readonly') if mibBuilder.loadTexts: csbHistoryStatsTotalTapsRequested.setStatus('current') csb_history_stats_total_taps_succeeded = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 43), gauge32()).setUnits('success').setMaxAccess('readonly') if mibBuilder.loadTexts: csbHistoryStatsTotalTapsSucceeded.setStatus('current') csb_history_stats_current_taps = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 44), gauge32()).setUnits('taps').setMaxAccess('readonly') if mibBuilder.loadTexts: csbHistoryStatsCurrentTaps.setStatus('current') csb_history_stats_ipsec_calls = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 4, 1, 45), gauge32()).setUnits('calls').setMaxAccess('readonly') if mibBuilder.loadTexts: csbHistoryStatsIpsecCalls.setStatus('current') csb_per_flow_stats_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 5)) if mibBuilder.loadTexts: csbPerFlowStatsTable.setStatus('current') csb_per_flow_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 5, 1)).setIndexNames((0, 'CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCallStatsInstanceIndex'), (0, 'CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCallStatsServiceIndex'), (0, 'CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbPerFlowStatsVdbeId'), (0, 'CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbPerFlowStatsGateId'), (0, 'CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbPerFlowStatsFlowPairId'), (0, 'CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbPerFlowStatsSideId')) if mibBuilder.loadTexts: csbPerFlowStatsEntry.setStatus('current') csb_per_flow_stats_vdbe_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 5, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 255))) if mibBuilder.loadTexts: csbPerFlowStatsVdbeId.setStatus('current') csb_per_flow_stats_gate_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 5, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))) if mibBuilder.loadTexts: csbPerFlowStatsGateId.setStatus('current') csb_per_flow_stats_flow_pair_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 5, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))) if mibBuilder.loadTexts: csbPerFlowStatsFlowPairId.setStatus('current') csb_per_flow_stats_side_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 5, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('sideA', 1), ('sideB', 2)))) if mibBuilder.loadTexts: csbPerFlowStatsSideId.setStatus('current') csb_per_flow_stats_flow_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 5, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('media', 1), ('signalling', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: csbPerFlowStatsFlowType.setStatus('current') csb_per_flow_stats_rtp_pkts_sent = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 5, 1, 6), counter64()).setUnits('packets').setMaxAccess('readonly') if mibBuilder.loadTexts: csbPerFlowStatsRTPPktsSent.setStatus('current') csb_per_flow_stats_rtp_pkts_rcvd = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 5, 1, 7), counter64()).setUnits('packets').setMaxAccess('readonly') if mibBuilder.loadTexts: csbPerFlowStatsRTPPktsRcvd.setStatus('current') csb_per_flow_stats_rtp_pkts_discard = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 5, 1, 8), counter64()).setUnits('packets').setMaxAccess('readonly') if mibBuilder.loadTexts: csbPerFlowStatsRTPPktsDiscard.setStatus('current') csb_per_flow_stats_rtp_octets_sent = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 5, 1, 9), counter64()).setUnits('octets').setMaxAccess('readonly') if mibBuilder.loadTexts: csbPerFlowStatsRTPOctetsSent.setStatus('current') csb_per_flow_stats_rtp_octets_rcvd = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 5, 1, 10), counter64()).setUnits('octets').setMaxAccess('readonly') if mibBuilder.loadTexts: csbPerFlowStatsRTPOctetsRcvd.setStatus('current') csb_per_flow_stats_rtp_octets_discard = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 5, 1, 11), counter64()).setUnits('octets').setMaxAccess('readonly') if mibBuilder.loadTexts: csbPerFlowStatsRTPOctetsDiscard.setStatus('current') csb_per_flow_stats_rtcp_pkts_sent = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 5, 1, 12), counter64()).setUnits('packets').setMaxAccess('readonly') if mibBuilder.loadTexts: csbPerFlowStatsRTCPPktsSent.setStatus('current') csb_per_flow_stats_rtcp_pkts_rcvd = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 5, 1, 13), counter64()).setUnits('packets').setMaxAccess('readonly') if mibBuilder.loadTexts: csbPerFlowStatsRTCPPktsRcvd.setStatus('current') csb_per_flow_stats_rtcp_pkts_lost = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 5, 1, 14), counter64()).setUnits('packets').setMaxAccess('readonly') if mibBuilder.loadTexts: csbPerFlowStatsRTCPPktsLost.setStatus('current') csb_per_flow_stats_ep_jitter = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 5, 1, 15), counter64()).setUnits('milliseconds').setMaxAccess('readonly') if mibBuilder.loadTexts: csbPerFlowStatsEPJitter.setStatus('current') csb_per_flow_stats_tman_per_mbs = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 5, 1, 16), gauge32()).setUnits('bytes').setMaxAccess('readonly') if mibBuilder.loadTexts: csbPerFlowStatsTmanPerMbs.setStatus('current') csb_per_flow_stats_tman_per_sdr = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 5, 1, 17), gauge32()).setUnits('kilobytes per second').setMaxAccess('readonly') if mibBuilder.loadTexts: csbPerFlowStatsTmanPerSdr.setStatus('current') csb_per_flow_stats_dscp_settings = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 5, 1, 18), snmp_admin_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbPerFlowStatsDscpSettings.setStatus('current') csb_per_flow_stats_adr_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 5, 1, 19), octet_string().subtype(subtypeSpec=value_size_constraint(0, 10))).setMaxAccess('readonly') if mibBuilder.loadTexts: csbPerFlowStatsAdrStatus.setStatus('current') csb_per_flow_stats_qa_settings = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 5, 1, 20), octet_string().subtype(subtypeSpec=value_size_constraint(0, 10))).setMaxAccess('readonly') if mibBuilder.loadTexts: csbPerFlowStatsQASettings.setStatus('current') csb_per_flow_stats_rtp_pkts_lost = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 5, 1, 21), counter64()).setUnits('packets').setMaxAccess('readonly') if mibBuilder.loadTexts: csbPerFlowStatsRTPPktsLost.setStatus('current') csb_h248_stats_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 6)) if mibBuilder.loadTexts: csbH248StatsTable.setStatus('deprecated') csb_h248_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 6, 1)).setIndexNames((0, 'CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCallStatsInstanceIndex'), (0, 'CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCallStatsServiceIndex'), (0, 'CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbH248StatsCtrlrIndex')) if mibBuilder.loadTexts: csbH248StatsEntry.setStatus('deprecated') csb_h248_stats_ctrlr_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 6, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 50))) if mibBuilder.loadTexts: csbH248StatsCtrlrIndex.setStatus('deprecated') csb_h248_stats_requests_sent = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 6, 1, 2), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbH248StatsRequestsSent.setStatus('deprecated') csb_h248_stats_requests_rcvd = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 6, 1, 3), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbH248StatsRequestsRcvd.setStatus('deprecated') csb_h248_stats_requests_failed = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 6, 1, 4), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbH248StatsRequestsFailed.setStatus('deprecated') csb_h248_stats_requests_retried = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 6, 1, 5), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbH248StatsRequestsRetried.setStatus('deprecated') csb_h248_stats_replies_sent = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 6, 1, 6), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbH248StatsRepliesSent.setStatus('deprecated') csb_h248_stats_replies_rcvd = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 6, 1, 7), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbH248StatsRepliesRcvd.setStatus('deprecated') csb_h248_stats_replies_retried = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 6, 1, 8), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbH248StatsRepliesRetried.setStatus('deprecated') csb_h248_stats_seg_pkts_sent = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 6, 1, 9), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbH248StatsSegPktsSent.setStatus('deprecated') csb_h248_stats_seg_pkts_rcvd = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 6, 1, 10), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbH248StatsSegPktsRcvd.setStatus('deprecated') csb_h248_stats_established_time = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 6, 1, 11), octet_string().subtype(subtypeSpec=value_size_constraint(0, 80))).setMaxAccess('readonly') if mibBuilder.loadTexts: csbH248StatsEstablishedTime.setStatus('deprecated') csb_h248_stats_t_max_timeout_val = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 6, 1, 12), integer32()).setUnits('milliseconds').setMaxAccess('readonly') if mibBuilder.loadTexts: csbH248StatsTMaxTimeoutVal.setStatus('deprecated') csb_h248_stats_rtt = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 6, 1, 13), gauge32()).setUnits('milliseconds').setMaxAccess('readonly') if mibBuilder.loadTexts: csbH248StatsRTT.setStatus('deprecated') csb_h248_stats_lt = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 6, 1, 14), gauge32()).setUnits('milliseconds').setMaxAccess('readonly') if mibBuilder.loadTexts: csbH248StatsLT.setStatus('deprecated') csb_h248_stats_rev1_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 7)) if mibBuilder.loadTexts: csbH248StatsRev1Table.setStatus('current') csb_h248_stats_rev1_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 7, 1)).setIndexNames((0, 'CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCallStatsInstanceIndex'), (0, 'CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCallStatsServiceIndex'), (0, 'CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbH248StatsVdbeId')) if mibBuilder.loadTexts: csbH248StatsRev1Entry.setStatus('current') csb_h248_stats_vdbe_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 7, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 255))) if mibBuilder.loadTexts: csbH248StatsVdbeId.setStatus('current') csb_h248_stats_requests_sent_rev1 = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 7, 1, 2), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbH248StatsRequestsSentRev1.setStatus('current') csb_h248_stats_requests_rcvd_rev1 = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 7, 1, 3), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbH248StatsRequestsRcvdRev1.setStatus('current') csb_h248_stats_requests_failed_rev1 = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 7, 1, 4), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbH248StatsRequestsFailedRev1.setStatus('current') csb_h248_stats_requests_retried_rev1 = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 7, 1, 5), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbH248StatsRequestsRetriedRev1.setStatus('current') csb_h248_stats_replies_sent_rev1 = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 7, 1, 6), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbH248StatsRepliesSentRev1.setStatus('current') csb_h248_stats_replies_rcvd_rev1 = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 7, 1, 7), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbH248StatsRepliesRcvdRev1.setStatus('current') csb_h248_stats_replies_retried_rev1 = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 7, 1, 8), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbH248StatsRepliesRetriedRev1.setStatus('current') csb_h248_stats_seg_pkts_sent_rev1 = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 7, 1, 9), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbH248StatsSegPktsSentRev1.setStatus('current') csb_h248_stats_seg_pkts_rcvd_rev1 = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 7, 1, 10), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbH248StatsSegPktsRcvdRev1.setStatus('current') csb_h248_stats_established_time_rev1 = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 7, 1, 11), octet_string().subtype(subtypeSpec=value_size_constraint(0, 80))).setMaxAccess('readonly') if mibBuilder.loadTexts: csbH248StatsEstablishedTimeRev1.setStatus('current') csb_h248_stats_t_max_timeout_val_rev1 = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 7, 1, 12), integer32()).setUnits('milliseconds').setMaxAccess('readonly') if mibBuilder.loadTexts: csbH248StatsTMaxTimeoutValRev1.setStatus('current') csb_h248_stats_rtt_rev1 = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 7, 1, 13), gauge32()).setUnits('milliseconds').setMaxAccess('readonly') if mibBuilder.loadTexts: csbH248StatsRTTRev1.setStatus('current') csb_h248_stats_lt_rev1 = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 657, 1, 7, 1, 14), gauge32()).setUnits('milliseconds').setMaxAccess('readonly') if mibBuilder.loadTexts: csbH248StatsLTRev1.setStatus('current') csb_call_stats_mib_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 657, 2, 1)) csb_call_stats_mib_groups = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 657, 2, 2)) csb_call_stats_mib_compliance = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 657, 2, 1, 1)).setObjects(('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbGlobalStatsGroup'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCurrPeriodicStatsGroup'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbHistoryStatsGroup'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbPerFlowStatsGroup'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbH248StatsGroup'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbStatsInstanceGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csb_call_stats_mib_compliance = csbCallStatsMIBCompliance.setStatus('deprecated') csb_call_stats_mib_compliance_rev1 = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 657, 2, 1, 2)).setObjects(('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbGlobalStatsGroup'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCurrPeriodicStatsGroup'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbHistoryStatsGroup'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbPerFlowStatsGroup'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbH248StatsGroupRev1'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbStatsInstanceGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csb_call_stats_mib_compliance_rev1 = csbCallStatsMIBComplianceRev1.setStatus('deprecated') csb_call_stats_mib_compliance_rev2 = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 657, 2, 1, 3)).setObjects(('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbGlobalStatsGroup'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCurrPeriodicStatsGroup'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbHistoryStatsGroup'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbPerFlowStatsGroup'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbH248StatsGroupRev1'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbStatsInstanceGroup'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbGlobalStatsGroupSup1'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCurrPeriodicStatsGroupSup1'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbHistoryStatsGroupSup1'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbPerFlowStatsGroupSup1')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csb_call_stats_mib_compliance_rev2 = csbCallStatsMIBComplianceRev2.setStatus('current') csb_stats_instance_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 657, 2, 2, 1)).setObjects(('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCallStatsInstancePhysicalIndex')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csb_stats_instance_group = csbStatsInstanceGroup.setStatus('current') csb_global_stats_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 657, 2, 2, 2)).setObjects(('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCallStatsCallsHigh'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCallStatsRate1Sec'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCallStatsCallsLow'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCallStatsAvailableFlows'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCallStatsUsedFlows'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCallStatsTotalFlows'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCallStatsRTPPktsRcvd'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCallStatsRTPPktsDiscard'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCallStatsUsedSigFlows'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCallStatsTotalSigFlows'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCallStatsAvailablePktRate'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCallStatsPeakFlows'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCallStatsUnclassifiedPkts'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCallStatsRTPOctetsSent'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCallStatsRTPOctetsRcvd'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCallStatsRTPOctetsDiscard'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCallStatsPeakSigFlows'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCallStatsSbcName'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCallStatsRTPPktsSent'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCallStatsNoMediaCount'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCallStatsRouteErrors')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csb_global_stats_group = csbGlobalStatsGroup.setStatus('current') csb_curr_periodic_stats_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 657, 2, 2, 3)).setObjects(('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCurrPeriodicStatsActiveCalls'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCurrPeriodicStatsActivatingCalls'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCurrPeriodicStatsDeactivatingCalls'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCurrPeriodicStatsTotalCallAttempts'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCurrPeriodicStatsFailedCallAttempts'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCurrPeriodicStatsCallRoutingFailure'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCurrPeriodicStatsCallResourceFailure'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCurrPeriodicStatsCallMediaFailure'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCurrPeriodicStatsCallSigFailure'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCurrPeriodicStatsActiveCallFailure'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCurrPeriodicStatsCongestionFailure'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCurrPeriodicStatsCallSetupPolicyFailure'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCurrPeriodicStatsCallSetupNAPolicyFailure'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCurrPeriodicStatsCallSetupRoutingPolicyFailure'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCurrPeriodicStatsCallSetupCACPolicyFailure'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCurrPeriodicStatsCallSetupCACCallLimitFailure'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCurrPeriodicStatsCallSetupCACRateLimitFailure'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCurrPeriodicStatsCallSetupCACBandwidthFailure'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCurrPeriodicStatsCallSetupCACMediaLimitFailure'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCurrPeriodicStatsCallSetupCACMediaUpdateFailure'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCurrPeriodicStatsTimestamp')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csb_curr_periodic_stats_group = csbCurrPeriodicStatsGroup.setStatus('current') csb_history_stats_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 657, 2, 2, 4)).setObjects(('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbHistoryStatsActiveCalls'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbHistoryStatsTotalCallAttempts'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbHistoryStatsFailedCallAttempts'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbHistoryStatsCallRoutingFailure'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbHistoryStatsCallResourceFailure'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbHistoryStatsCallMediaFailure'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbHistoryStatsFailSigFailure'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbHistoryStatsActiveCallFailure'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbHistoryStatsCongestionFailure'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbHistoryStatsCallSetupPolicyFailure'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbHistoryStatsCallSetupNAPolicyFailure'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbHistoryStatsCallSetupRoutingPolicyFailure'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbHistoryStatsCallSetupCACPolicyFailure'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbHistoryStatsCallSetupCACCallLimitFailure'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbHistoryStatsCallSetupCACRateLimitFailure'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbHistoryStatsCallSetupCACBandwidthFailure'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbHistoryStatsCallSetupCACMediaLimitFailure'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbHistoryStatsCallSetupCACMediaUpdateFailure'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbHistoryStatsTimestamp')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csb_history_stats_group = csbHistoryStatsGroup.setStatus('current') csb_per_flow_stats_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 657, 2, 2, 5)).setObjects(('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbPerFlowStatsRTPPktsRcvd'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbPerFlowStatsRTPPktsSent'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbPerFlowStatsRTPPktsDiscard'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbPerFlowStatsRTCPPktsSent'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbPerFlowStatsRTPOctetsRcvd'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbPerFlowStatsRTPOctetsSent'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbPerFlowStatsRTPOctetsDiscard'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbPerFlowStatsRTCPPktsRcvd'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbPerFlowStatsRTCPPktsLost'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbPerFlowStatsFlowType'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbPerFlowStatsTmanPerMbs'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbPerFlowStatsTmanPerSdr'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbPerFlowStatsDscpSettings'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbPerFlowStatsAdrStatus'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbPerFlowStatsQASettings'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbPerFlowStatsEPJitter')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csb_per_flow_stats_group = csbPerFlowStatsGroup.setStatus('current') csb_h248_stats_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 657, 2, 2, 6)).setObjects(('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbH248StatsRequestsSent'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbH248StatsRequestsRcvd'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbH248StatsRequestsFailed'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbH248StatsRequestsRetried'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbH248StatsRepliesSent'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbH248StatsRepliesRcvd'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbH248StatsRepliesRetried'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbH248StatsSegPktsSent'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbH248StatsSegPktsRcvd'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbH248StatsTMaxTimeoutVal'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbH248StatsRTT'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbH248StatsLT'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbH248StatsEstablishedTime')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csb_h248_stats_group = csbH248StatsGroup.setStatus('deprecated') csb_h248_stats_group_rev1 = object_group((1, 3, 6, 1, 4, 1, 9, 9, 657, 2, 2, 7)).setObjects(('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbH248StatsRequestsSentRev1'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbH248StatsRequestsRcvdRev1'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbH248StatsRequestsFailedRev1'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbH248StatsRequestsRetriedRev1'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbH248StatsRepliesSentRev1'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbH248StatsRepliesRcvdRev1'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbH248StatsRepliesRetriedRev1'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbH248StatsSegPktsSentRev1'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbH248StatsSegPktsRcvdRev1'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbH248StatsEstablishedTimeRev1'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbH248StatsTMaxTimeoutValRev1'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbH248StatsRTTRev1'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbH248StatsLTRev1')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csb_h248_stats_group_rev1 = csbH248StatsGroupRev1.setStatus('current') csb_global_stats_group_sup1 = object_group((1, 3, 6, 1, 4, 1, 9, 9, 657, 2, 2, 8)).setObjects(('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCallStatsAvailableTranscodeFlows'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCallStatsActiveTranscodeFlows'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCallStatsPeakTranscodeFlows'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCallStatsTotalTranscodeFlows')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csb_global_stats_group_sup1 = csbGlobalStatsGroupSup1.setStatus('current') csb_curr_periodic_stats_group_sup1 = object_group((1, 3, 6, 1, 4, 1, 9, 9, 657, 2, 2, 9)).setObjects(('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCurrPeriodicStatsTranscodedCalls'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCurrPeriodicStatsTransratedCalls'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCurrPeriodicStatsTotalCallUpdateFailure'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCurrPeriodicStatsActiveIpv6Calls'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCurrPeriodicStatsActiveEmergencyCalls'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCurrPeriodicStatsActiveE2EmergencyCalls'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCurrPeriodicStatsImsRxActiveCalls'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCurrPeriodicStatsImsRxCallSetupFaiures'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCurrPeriodicStatsImsRxCallRenegotiationAttempts'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCurrPeriodicStatsImsRxCallRenegotiationFailures'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCurrPeriodicStatsAudioTranscodedCalls'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCurrPeriodicStatsFaxTranscodedCalls'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCurrPeriodicStatsRtpDisallowedFailures'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCurrPeriodicStatsSrtpDisallowedFailures'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCurrPeriodicStatsNonSrtpCalls'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCurrPeriodicStatsSrtpNonIwCalls'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCurrPeriodicStatsSrtpIwCalls'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCurrPeriodicStatsDtmfIw2833Calls'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCurrPeriodicStatsDtmfIwInbandCalls'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCurrPeriodicStatsDtmfIw2833InbandCalls'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCurrPeriodicStatsTotalTapsRequested'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCurrPeriodicStatsTotalTapsSucceeded'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCurrPeriodicStatsCurrentTaps'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCurrPeriodicIpsecCalls')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csb_curr_periodic_stats_group_sup1 = csbCurrPeriodicStatsGroupSup1.setStatus('current') csb_history_stats_group_sup1 = object_group((1, 3, 6, 1, 4, 1, 9, 9, 657, 2, 2, 10)).setObjects(('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbHistroyStatsTranscodedCalls'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbHistroyStatsTransratedCalls'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbHistoryStatsTotalCallUpdateFailure'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbHistoryStatsActiveIpv6Calls'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbHistoryStatsActiveEmergencyCalls'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbHistoryStatsActiveE2EmergencyCalls'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbHistoryStatsImsRxActiveCalls'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbHistoryStatsImsRxCallSetupFailures'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbHistoryStatsImsRxCallRenegotiationAttempts'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbHistoryStatsImsRxCallRenegotiationFailures'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbHistoryStatsAudioTranscodedCalls'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbHistoryStatsFaxTranscodedCalls'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbHistoryStatsRtpDisallowedFailures'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbHistoryStatsSrtpDisallowedFailures'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbHistoryStatsNonSrtpCalls'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbHistoryStatsSrtpNonIwCalls'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbHistoryStatsSrtpIwCalls'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbHistoryStatsDtmfIw2833Calls'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbHistoryStatsDtmfIwInbandCalls'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbHistoryStatsDtmfIw2833InbandCalls'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbHistoryStatsTotalTapsRequested'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbHistoryStatsTotalTapsSucceeded'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbHistoryStatsCurrentTaps'), ('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbHistoryStatsIpsecCalls')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csb_history_stats_group_sup1 = csbHistoryStatsGroupSup1.setStatus('current') csb_per_flow_stats_group_sup1 = object_group((1, 3, 6, 1, 4, 1, 9, 9, 657, 2, 2, 11)).setObjects(('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbPerFlowStatsRTPPktsLost')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csb_per_flow_stats_group_sup1 = csbPerFlowStatsGroupSup1.setStatus('current') mibBuilder.exportSymbols('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', CiscoSbcPeriodicStatsInterval=CiscoSbcPeriodicStatsInterval, csbCurrPeriodicStatsCallSetupCACCallLimitFailure=csbCurrPeriodicStatsCallSetupCACCallLimitFailure, csbCurrPeriodicStatsTotalCallUpdateFailure=csbCurrPeriodicStatsTotalCallUpdateFailure, csbH248StatsRepliesRcvdRev1=csbH248StatsRepliesRcvdRev1, csbCurrPeriodicStatsActiveCalls=csbCurrPeriodicStatsActiveCalls, csbCurrPeriodicStatsImsRxActiveCalls=csbCurrPeriodicStatsImsRxActiveCalls, csbH248StatsGroup=csbH248StatsGroup, csbCallStatsPeakTranscodeFlows=csbCallStatsPeakTranscodeFlows, csbCurrPeriodicStatsSrtpNonIwCalls=csbCurrPeriodicStatsSrtpNonIwCalls, csbCurrPeriodicStatsFaxTranscodedCalls=csbCurrPeriodicStatsFaxTranscodedCalls, csbHistoryStatsActiveIpv6Calls=csbHistoryStatsActiveIpv6Calls, csbHistoryStatsCallSetupPolicyFailure=csbHistoryStatsCallSetupPolicyFailure, csbGlobalStatsGroup=csbGlobalStatsGroup, csbCurrPeriodicStatsTotalTapsSucceeded=csbCurrPeriodicStatsTotalTapsSucceeded, csbHistoryStatsActiveCallFailure=csbHistoryStatsActiveCallFailure, csbCallStatsInstanceEntry=csbCallStatsInstanceEntry, csbCallStatsMIBGroups=csbCallStatsMIBGroups, csbPerFlowStatsRTPOctetsDiscard=csbPerFlowStatsRTPOctetsDiscard, csbCurrPeriodicStatsActiveE2EmergencyCalls=csbCurrPeriodicStatsActiveE2EmergencyCalls, csbHistoryStatsCallSetupNAPolicyFailure=csbHistoryStatsCallSetupNAPolicyFailure, csbH248StatsSegPktsRcvd=csbH248StatsSegPktsRcvd, csbPerFlowStatsEntry=csbPerFlowStatsEntry, csbH248StatsRequestsRcvd=csbH248StatsRequestsRcvd, csbCurrPeriodicStatsSrtpDisallowedFailures=csbCurrPeriodicStatsSrtpDisallowedFailures, csbHistoryStatsCallSetupCACBandwidthFailure=csbHistoryStatsCallSetupCACBandwidthFailure, csbCurrPeriodicStatsCallRoutingFailure=csbCurrPeriodicStatsCallRoutingFailure, csbHistoryStatsCallSetupCACMediaLimitFailure=csbHistoryStatsCallSetupCACMediaLimitFailure, csbH248StatsRepliesRcvd=csbH248StatsRepliesRcvd, ciscoSbcCallStatsMIBNotifs=ciscoSbcCallStatsMIBNotifs, csbHistroyStatsTransratedCalls=csbHistroyStatsTransratedCalls, csbH248StatsRepliesRetried=csbH248StatsRepliesRetried, csbHistoryStatsSrtpNonIwCalls=csbHistoryStatsSrtpNonIwCalls, csbCurrPeriodicStatsCallSetupNAPolicyFailure=csbCurrPeriodicStatsCallSetupNAPolicyFailure, csbPerFlowStatsTable=csbPerFlowStatsTable, csbH248StatsRTTRev1=csbH248StatsRTTRev1, csbHistoryStatsTotalTapsSucceeded=csbHistoryStatsTotalTapsSucceeded, csbHistoryStatsFailSigFailure=csbHistoryStatsFailSigFailure, csbHistoryStatsImsRxActiveCalls=csbHistoryStatsImsRxActiveCalls, csbCallStatsMIBComplianceRev2=csbCallStatsMIBComplianceRev2, csbPerFlowStatsTmanPerSdr=csbPerFlowStatsTmanPerSdr, csbHistoryStatsElements=csbHistoryStatsElements, csbCurrPeriodicStatsTimestamp=csbCurrPeriodicStatsTimestamp, csbH248StatsSegPktsRcvdRev1=csbH248StatsSegPktsRcvdRev1, csbHistoryStatsFaxTranscodedCalls=csbHistoryStatsFaxTranscodedCalls, csbStatsInstanceGroup=csbStatsInstanceGroup, csbH248StatsGroupRev1=csbH248StatsGroupRev1, csbPerFlowStatsRTCPPktsSent=csbPerFlowStatsRTCPPktsSent, csbHistoryStatsCallMediaFailure=csbHistoryStatsCallMediaFailure, csbPerFlowStatsRTPOctetsSent=csbPerFlowStatsRTPOctetsSent, csbCallStatsInstanceTable=csbCallStatsInstanceTable, csbHistoryStatsImsRxCallRenegotiationFailures=csbHistoryStatsImsRxCallRenegotiationFailures, csbH248StatsTMaxTimeoutVal=csbH248StatsTMaxTimeoutVal, csbHistoryStatsTotalCallAttempts=csbHistoryStatsTotalCallAttempts, ciscoSbcCallStatsMIBConform=ciscoSbcCallStatsMIBConform, csbCurrPeriodicIpsecCalls=csbCurrPeriodicIpsecCalls, csbHistoryStatsActiveEmergencyCalls=csbHistoryStatsActiveEmergencyCalls, csbHistoryStatsDtmfIwInbandCalls=csbHistoryStatsDtmfIwInbandCalls, csbCurrPeriodicStatsDtmfIw2833Calls=csbCurrPeriodicStatsDtmfIw2833Calls, csbHistoryStatsActiveCalls=csbHistoryStatsActiveCalls, csbHistoryStatsCallSetupCACPolicyFailure=csbHistoryStatsCallSetupCACPolicyFailure, csbCurrPeriodicStatsActiveIpv6Calls=csbCurrPeriodicStatsActiveIpv6Calls, csbCallStatsUnclassifiedPkts=csbCallStatsUnclassifiedPkts, csbHistoryStatsCallResourceFailure=csbHistoryStatsCallResourceFailure, csbHistoryStatsTotalCallUpdateFailure=csbHistoryStatsTotalCallUpdateFailure, csbPerFlowStatsRTCPPktsLost=csbPerFlowStatsRTCPPktsLost, csbCurrPeriodicStatsInterval=csbCurrPeriodicStatsInterval, csbPerFlowStatsRTCPPktsRcvd=csbPerFlowStatsRTCPPktsRcvd, csbH248StatsRequestsSentRev1=csbH248StatsRequestsSentRev1, csbCurrPeriodicStatsTotalCallAttempts=csbCurrPeriodicStatsTotalCallAttempts, csbPerFlowStatsRTPPktsRcvd=csbPerFlowStatsRTPPktsRcvd, csbHistoryStatsNonSrtpCalls=csbHistoryStatsNonSrtpCalls, csbHistoryStatsSrtpDisallowedFailures=csbHistoryStatsSrtpDisallowedFailures, csbCallStatsPeakFlows=csbCallStatsPeakFlows, csbCurrPeriodicStatsCongestionFailure=csbCurrPeriodicStatsCongestionFailure, csbCallStatsAvailableFlows=csbCallStatsAvailableFlows, csbPerFlowStatsVdbeId=csbPerFlowStatsVdbeId, csbPerFlowStatsSideId=csbPerFlowStatsSideId, csbCurrPeriodicStatsImsRxCallSetupFaiures=csbCurrPeriodicStatsImsRxCallSetupFaiures, csbCallStatsInstanceIndex=csbCallStatsInstanceIndex, csbCallStatsInstancePhysicalIndex=csbCallStatsInstancePhysicalIndex, csbH248StatsRev1Table=csbH248StatsRev1Table, csbCurrPeriodicStatsDtmfIw2833InbandCalls=csbCurrPeriodicStatsDtmfIw2833InbandCalls, csbHistoryStatsDtmfIw2833InbandCalls=csbHistoryStatsDtmfIw2833InbandCalls, csbCurrPeriodicStatsActivatingCalls=csbCurrPeriodicStatsActivatingCalls, csbPerFlowStatsFlowPairId=csbPerFlowStatsFlowPairId, csbHistoryStatsIpsecCalls=csbHistoryStatsIpsecCalls, csbH248StatsRequestsFailedRev1=csbH248StatsRequestsFailedRev1, csbPerFlowStatsGateId=csbPerFlowStatsGateId, csbCallStatsMIBComplianceRev1=csbCallStatsMIBComplianceRev1, csbHistoryStatsEntry=csbHistoryStatsEntry, csbCurrPeriodicStatsCallSetupCACBandwidthFailure=csbCurrPeriodicStatsCallSetupCACBandwidthFailure, csbPerFlowStatsAdrStatus=csbPerFlowStatsAdrStatus, csbH248StatsTable=csbH248StatsTable, csbCallStatsCallsHigh=csbCallStatsCallsHigh, csbH248StatsRTT=csbH248StatsRTT, csbH248StatsCtrlrIndex=csbH248StatsCtrlrIndex, csbH248StatsLT=csbH248StatsLT, csbCurrPeriodicStatsFailedCallAttempts=csbCurrPeriodicStatsFailedCallAttempts, csbPerFlowStatsFlowType=csbPerFlowStatsFlowType, csbCallStatsRTPOctetsDiscard=csbCallStatsRTPOctetsDiscard, csbH248StatsRequestsRetried=csbH248StatsRequestsRetried, csbPerFlowStatsRTPPktsDiscard=csbPerFlowStatsRTPPktsDiscard, csbH248StatsLTRev1=csbH248StatsLTRev1, csbCurrPeriodicStatsActiveEmergencyCalls=csbCurrPeriodicStatsActiveEmergencyCalls, csbHistoryStatsCallSetupCACRateLimitFailure=csbHistoryStatsCallSetupCACRateLimitFailure, csbCallStatsRTPOctetsSent=csbCallStatsRTPOctetsSent, csbCallStatsPeakSigFlows=csbCallStatsPeakSigFlows, csbCallStatsRTPPktsSent=csbCallStatsRTPPktsSent, csbH248StatsEntry=csbH248StatsEntry, csbPerFlowStatsEPJitter=csbPerFlowStatsEPJitter, csbH248StatsRepliesRetriedRev1=csbH248StatsRepliesRetriedRev1, csbHistoryStatsRtpDisallowedFailures=csbHistoryStatsRtpDisallowedFailures, csbHistoryStatsGroup=csbHistoryStatsGroup, csbCurrPeriodicStatsDtmfIwInbandCalls=csbCurrPeriodicStatsDtmfIwInbandCalls, csbH248StatsSegPktsSentRev1=csbH248StatsSegPktsSentRev1, csbCurrPeriodicStatsGroupSup1=csbCurrPeriodicStatsGroupSup1, csbCurrPeriodicStatsNonSrtpCalls=csbCurrPeriodicStatsNonSrtpCalls, csbHistoryStatsCallSetupRoutingPolicyFailure=csbHistoryStatsCallSetupRoutingPolicyFailure, csbH248StatsVdbeId=csbH248StatsVdbeId, csbCurrPeriodicStatsActiveCallFailure=csbCurrPeriodicStatsActiveCallFailure, csbCallStatsNoMediaCount=csbCallStatsNoMediaCount, csbHistoryStatsImsRxCallRenegotiationAttempts=csbHistoryStatsImsRxCallRenegotiationAttempts, csbHistoryStatsCurrentTaps=csbHistoryStatsCurrentTaps, csbCurrPeriodicStatsEntry=csbCurrPeriodicStatsEntry, csbHistoryStatsTotalTapsRequested=csbHistoryStatsTotalTapsRequested, csbCallStatsAvailableTranscodeFlows=csbCallStatsAvailableTranscodeFlows, csbCurrPeriodicStatsCallMediaFailure=csbCurrPeriodicStatsCallMediaFailure, csbCurrPeriodicStatsCallSetupCACMediaLimitFailure=csbCurrPeriodicStatsCallSetupCACMediaLimitFailure, PYSNMP_MODULE_ID=ciscoSbcCallStatsMIB, csbCallStatsUsedSigFlows=csbCallStatsUsedSigFlows, csbCurrPeriodicStatsCallSetupCACPolicyFailure=csbCurrPeriodicStatsCallSetupCACPolicyFailure, csbCallStatsTotalSigFlows=csbCallStatsTotalSigFlows, csbGlobalStatsGroupSup1=csbGlobalStatsGroupSup1, csbCurrPeriodicStatsSrtpIwCalls=csbCurrPeriodicStatsSrtpIwCalls, csbCurrPeriodicStatsImsRxCallRenegotiationAttempts=csbCurrPeriodicStatsImsRxCallRenegotiationAttempts, csbCurrPeriodicStatsImsRxCallRenegotiationFailures=csbCurrPeriodicStatsImsRxCallRenegotiationFailures, csbH248StatsEstablishedTime=csbH248StatsEstablishedTime, csbPerFlowStatsGroup=csbPerFlowStatsGroup, csbHistoryStatsDtmfIw2833Calls=csbHistoryStatsDtmfIw2833Calls, csbCurrPeriodicStatsRtpDisallowedFailures=csbCurrPeriodicStatsRtpDisallowedFailures, csbH248StatsRepliesSentRev1=csbH248StatsRepliesSentRev1, csbCallStatsTotalTranscodeFlows=csbCallStatsTotalTranscodeFlows, csbCallStatsTable=csbCallStatsTable, csbHistoryStatsSrtpIwCalls=csbHistoryStatsSrtpIwCalls, csbCallStatsSbcName=csbCallStatsSbcName, csbH248StatsEstablishedTimeRev1=csbH248StatsEstablishedTimeRev1, csbCurrPeriodicStatsCurrentTaps=csbCurrPeriodicStatsCurrentTaps, csbHistoryStatsImsRxCallSetupFailures=csbHistoryStatsImsRxCallSetupFailures, csbCurrPeriodicStatsCallSetupCACMediaUpdateFailure=csbCurrPeriodicStatsCallSetupCACMediaUpdateFailure, csbCallStatsRate1Sec=csbCallStatsRate1Sec, csbH248StatsTMaxTimeoutValRev1=csbH248StatsTMaxTimeoutValRev1, csbHistoryStatsGroupSup1=csbHistoryStatsGroupSup1, csbPerFlowStatsTmanPerMbs=csbPerFlowStatsTmanPerMbs, csbCallStatsAvailablePktRate=csbCallStatsAvailablePktRate, csbHistroyStatsTranscodedCalls=csbHistroyStatsTranscodedCalls, csbCallStatsEntry=csbCallStatsEntry, csbPerFlowStatsRTPPktsLost=csbPerFlowStatsRTPPktsLost, csbH248StatsRequestsRcvdRev1=csbH248StatsRequestsRcvdRev1, csbCurrPeriodicStatsDeactivatingCalls=csbCurrPeriodicStatsDeactivatingCalls, csbCallStatsRTPPktsRcvd=csbCallStatsRTPPktsRcvd, csbHistoryStatsAudioTranscodedCalls=csbHistoryStatsAudioTranscodedCalls, csbCallStatsRTPPktsDiscard=csbCallStatsRTPPktsDiscard, csbCallStatsRTPOctetsRcvd=csbCallStatsRTPOctetsRcvd, csbCallStatsActiveTranscodeFlows=csbCallStatsActiveTranscodeFlows, csbHistoryStatsTable=csbHistoryStatsTable, csbH248StatsSegPktsSent=csbH248StatsSegPktsSent, csbHistoryStatsActiveE2EmergencyCalls=csbHistoryStatsActiveE2EmergencyCalls, csbCurrPeriodicStatsCallSetupPolicyFailure=csbCurrPeriodicStatsCallSetupPolicyFailure, ciscoSbcCallStatsMIBObjects=ciscoSbcCallStatsMIBObjects, ciscoSbcCallStatsMIB=ciscoSbcCallStatsMIB, csbHistoryStatsCallSetupCACCallLimitFailure=csbHistoryStatsCallSetupCACCallLimitFailure, csbH248StatsRequestsFailed=csbH248StatsRequestsFailed, csbCurrPeriodicStatsCallSigFailure=csbCurrPeriodicStatsCallSigFailure, csbH248StatsRequestsSent=csbH248StatsRequestsSent, csbHistoryStatsCallSetupCACMediaUpdateFailure=csbHistoryStatsCallSetupCACMediaUpdateFailure, csbHistoryStatsInterval=csbHistoryStatsInterval, csbCurrPeriodicStatsTranscodedCalls=csbCurrPeriodicStatsTranscodedCalls, csbCallStatsServiceIndex=csbCallStatsServiceIndex, csbCallStatsTotalFlows=csbCallStatsTotalFlows, csbHistoryStatsCongestionFailure=csbHistoryStatsCongestionFailure, csbH248StatsRepliesSent=csbH248StatsRepliesSent, csbCurrPeriodicStatsTable=csbCurrPeriodicStatsTable, csbCallStatsRouteErrors=csbCallStatsRouteErrors, csbH248StatsRev1Entry=csbH248StatsRev1Entry, csbCallStatsCallsLow=csbCallStatsCallsLow, csbHistoryStatsTimestamp=csbHistoryStatsTimestamp, csbHistoryStatsFailedCallAttempts=csbHistoryStatsFailedCallAttempts, csbCallStatsMIBCompliances=csbCallStatsMIBCompliances, csbPerFlowStatsDscpSettings=csbPerFlowStatsDscpSettings, csbCallStatsUsedFlows=csbCallStatsUsedFlows, csbCurrPeriodicStatsGroup=csbCurrPeriodicStatsGroup, csbH248StatsRequestsRetriedRev1=csbH248StatsRequestsRetriedRev1, csbPerFlowStatsRTPPktsSent=csbPerFlowStatsRTPPktsSent, csbPerFlowStatsGroupSup1=csbPerFlowStatsGroupSup1, csbCurrPeriodicStatsCallSetupRoutingPolicyFailure=csbCurrPeriodicStatsCallSetupRoutingPolicyFailure, csbCurrPeriodicStatsCallSetupCACRateLimitFailure=csbCurrPeriodicStatsCallSetupCACRateLimitFailure, csbCurrPeriodicStatsAudioTranscodedCalls=csbCurrPeriodicStatsAudioTranscodedCalls, csbPerFlowStatsRTPOctetsRcvd=csbPerFlowStatsRTPOctetsRcvd, csbPerFlowStatsQASettings=csbPerFlowStatsQASettings, csbCurrPeriodicStatsTotalTapsRequested=csbCurrPeriodicStatsTotalTapsRequested, csbHistoryStatsCallRoutingFailure=csbHistoryStatsCallRoutingFailure, csbCurrPeriodicStatsTransratedCalls=csbCurrPeriodicStatsTransratedCalls, csbCurrPeriodicStatsCallResourceFailure=csbCurrPeriodicStatsCallResourceFailure, csbCallStatsMIBCompliance=csbCallStatsMIBCompliance)
""" Create three different variables the first variable should use all lower case characters with underscore ( _ ) as the word separator. The second variable should use all upper case characters with underscore as the word separator. The third variable should use numbers, letters, and underscore, but still be a valid variable Python variable name. Make all three variables be strings that refer to IPv6 addresses. Use the from future technique so that any string literals in Python2 are unicode. compare if variable1 equals variable2 compare if variable1 is not equal to variable3 """ string_1 = "2001:0db8:0001:0000:0000:0ab9:C0A8:0102" STRING_2 ="684D:1111:222:3333:4444:5555:6:77" str1ng_ONE ="2001:0db8:0001:0000:0000:0ab9:C0A8:0102" if (string_1 == STRING_2) and (string_1 != str1ng_ONE): print(True) else: print(False)
""" Create three different variables the first variable should use all lower case characters with underscore ( _ ) as the word separator. The second variable should use all upper case characters with underscore as the word separator. The third variable should use numbers, letters, and underscore, but still be a valid variable Python variable name. Make all three variables be strings that refer to IPv6 addresses. Use the from future technique so that any string literals in Python2 are unicode. compare if variable1 equals variable2 compare if variable1 is not equal to variable3 """ string_1 = '2001:0db8:0001:0000:0000:0ab9:C0A8:0102' string_2 = '684D:1111:222:3333:4444:5555:6:77' str1ng_one = '2001:0db8:0001:0000:0000:0ab9:C0A8:0102' if string_1 == STRING_2 and string_1 != str1ng_ONE: print(True) else: print(False)
SECRET_KEY = 'test' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'test.sqlite', } } INSTALLED_APPS = [ 'nobot', ] NOBOT_RECAPTCHA_PRIVATE_KEY = 'privkey' NOBOT_RECAPTCHA_PUBLIC_KEY = 'pubkey'
secret_key = 'test' databases = {'default': {'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'test.sqlite'}} installed_apps = ['nobot'] nobot_recaptcha_private_key = 'privkey' nobot_recaptcha_public_key = 'pubkey'
""" [2014-11-24] Challenge #190 [Easy] Webscraping sentiments https://www.reddit.com/r/dailyprogrammer/comments/2nauiv/20141124_challenge_190_easy_webscraping_sentiments/ #Description Webscraping is the delicate process of gathering information from a website (usually) without the assistance of an API. Without an API, it often involves finding what ID or CLASS a certain HTML element has and then targeting it. In our latest challenge, we'll need to do this (you're free to use an API, but, where's the fun in that!?) to find out the overall sentiment of a sample size of people. We will be performing very basic sentiment analysis on a YouTube video of your choosing. #Task Your task is to scrape N (You decide but generally, the higher the sample, the more accurate) number of comments from a YouTube video of your choice and then analyse their sentiments based on a short list of happy/sad keywords Analysis will be done by seeing how many Happy/Sad keywords are in each comment. If a comment contains more sad keywords than happy, then it can be deemed sad. Here's a basic list of keywords for you to test against. I've ommited expletives to please all readers... happy = ['love','loved','like','liked','awesome','amazing','good','great','excellent'] sad = ['hate','hated','dislike','disliked','awful','terrible','bad','painful','worst'] Feel free to share a bigger list of keywords if you find one. A larger one would be much appreciated if you can find one. #Formal inputs and outputs ##Input description On console input, you should pass the URL of your video to be analysed. ##Output description The output should consist of a statement stating something along the lines of - "From a sample size of" N "Persons. This sentence is mostly" [Happy|Sad] "It contained" X "amount of Happy keywords and" X "amount of sad keywords. The general feelings towards this video were" [Happy|Sad] #Notes As pointed out by /u/pshatmsft , YouTube loads the comments via AJAX so there's a slight workaround that's been posted by /u/threeifbywhiskey . Given the URL below, all you need to do is replace FullYoutubePathHere with your URL https://plus.googleapis.com/u/0/_/widget/render/comments?first_party_property=YOUTUBE&href=FullYoutubePathHere Remember to append your url in full (https://www.youtube.com/watch?v=dQw4w9WgXcQ as an example) #Hints The string for a Youtube comment is the following <div class="CT">Youtube comment here</div> #Finally We have an IRC channel over at webchat.freenode.net in #reddit-dailyprogrammer Stop on by :D Have a good challenge idea? Consider submitting it to /r/dailyprogrammer_ideas """ def main(): pass if __name__ == "__main__": main()
""" [2014-11-24] Challenge #190 [Easy] Webscraping sentiments https://www.reddit.com/r/dailyprogrammer/comments/2nauiv/20141124_challenge_190_easy_webscraping_sentiments/ #Description Webscraping is the delicate process of gathering information from a website (usually) without the assistance of an API. Without an API, it often involves finding what ID or CLASS a certain HTML element has and then targeting it. In our latest challenge, we'll need to do this (you're free to use an API, but, where's the fun in that!?) to find out the overall sentiment of a sample size of people. We will be performing very basic sentiment analysis on a YouTube video of your choosing. #Task Your task is to scrape N (You decide but generally, the higher the sample, the more accurate) number of comments from a YouTube video of your choice and then analyse their sentiments based on a short list of happy/sad keywords Analysis will be done by seeing how many Happy/Sad keywords are in each comment. If a comment contains more sad keywords than happy, then it can be deemed sad. Here's a basic list of keywords for you to test against. I've ommited expletives to please all readers... happy = ['love','loved','like','liked','awesome','amazing','good','great','excellent'] sad = ['hate','hated','dislike','disliked','awful','terrible','bad','painful','worst'] Feel free to share a bigger list of keywords if you find one. A larger one would be much appreciated if you can find one. #Formal inputs and outputs ##Input description On console input, you should pass the URL of your video to be analysed. ##Output description The output should consist of a statement stating something along the lines of - "From a sample size of" N "Persons. This sentence is mostly" [Happy|Sad] "It contained" X "amount of Happy keywords and" X "amount of sad keywords. The general feelings towards this video were" [Happy|Sad] #Notes As pointed out by /u/pshatmsft , YouTube loads the comments via AJAX so there's a slight workaround that's been posted by /u/threeifbywhiskey . Given the URL below, all you need to do is replace FullYoutubePathHere with your URL https://plus.googleapis.com/u/0/_/widget/render/comments?first_party_property=YOUTUBE&href=FullYoutubePathHere Remember to append your url in full (https://www.youtube.com/watch?v=dQw4w9WgXcQ as an example) #Hints The string for a Youtube comment is the following <div class="CT">Youtube comment here</div> #Finally We have an IRC channel over at webchat.freenode.net in #reddit-dailyprogrammer Stop on by :D Have a good challenge idea? Consider submitting it to /r/dailyprogrammer_ideas """ def main(): pass if __name__ == '__main__': main()
"""Hive Alarm Module.""" class HiveHomeShield: """Hive homeshield alarm. Returns: object: Hive homeshield """ alarmType = "Alarm" async def getMode(self): """Get current mode of the alarm. Returns: str: Mode if the alarm [armed_home, armed_away, armed_night] """ state = None try: data = self.session.data.alarm state = data["mode"] except KeyError as e: await self.session.log.error(e) return state async def getState(self, device: dict): """Get the alarm triggered state. Returns: boolean: True/False if alarm is triggered. """ state = None try: data = self.session.data.devices[device["hiveID"]] state = data["state"]["alarmActive"] except KeyError as e: await self.session.log.error(e) return state async def setMode(self, device: dict, mode: str): """Set the alarm mode. Args: device (dict): Alarm device. Returns: boolean: True/False if successful. """ final = False if ( device["hiveID"] in self.session.data.devices and device["deviceData"]["online"] ): await self.session.hiveRefreshTokens() resp = await self.session.api.setAlarm(mode=mode) if resp["original"] == 200: final = True await self.session.getAlarm() return final class Alarm(HiveHomeShield): """Home assistant alarm. Args: HiveHomeShield (object): Class object. """ def __init__(self, session: object = None): """Initialise alarm. Args: session (object, optional): Used to interact with the hive account. Defaults to None. """ self.session = session async def getAlarm(self, device: dict): """Get alarm data. Args: device (dict): Device to update. Returns: dict: Updated device. """ device["deviceData"].update( {"online": await self.session.attr.onlineOffline(device["device_id"])} ) dev_data = {} if device["deviceData"]["online"]: self.session.helper.deviceRecovered(device["device_id"]) data = self.session.data.devices[device["device_id"]] dev_data = { "hiveID": device["hiveID"], "hiveName": device["hiveName"], "hiveType": device["hiveType"], "haName": device["haName"], "haType": device["haType"], "device_id": device["device_id"], "device_name": device["device_name"], "status": { "state": await self.getState(device), "mode": await self.getMode(), }, "deviceData": data.get("props", None), "parentDevice": data.get("parent", None), "custom": device.get("custom", None), "attributes": await self.session.attr.stateAttributes( device["device_id"], device["hiveType"] ), } self.session.devices.update({device["hiveID"]: dev_data}) return self.session.devices[device["hiveID"]] else: await self.session.log.errorCheck( device["device_id"], "ERROR", device["deviceData"]["online"] ) return device
"""Hive Alarm Module.""" class Hivehomeshield: """Hive homeshield alarm. Returns: object: Hive homeshield """ alarm_type = 'Alarm' async def getMode(self): """Get current mode of the alarm. Returns: str: Mode if the alarm [armed_home, armed_away, armed_night] """ state = None try: data = self.session.data.alarm state = data['mode'] except KeyError as e: await self.session.log.error(e) return state async def getState(self, device: dict): """Get the alarm triggered state. Returns: boolean: True/False if alarm is triggered. """ state = None try: data = self.session.data.devices[device['hiveID']] state = data['state']['alarmActive'] except KeyError as e: await self.session.log.error(e) return state async def setMode(self, device: dict, mode: str): """Set the alarm mode. Args: device (dict): Alarm device. Returns: boolean: True/False if successful. """ final = False if device['hiveID'] in self.session.data.devices and device['deviceData']['online']: await self.session.hiveRefreshTokens() resp = await self.session.api.setAlarm(mode=mode) if resp['original'] == 200: final = True await self.session.getAlarm() return final class Alarm(HiveHomeShield): """Home assistant alarm. Args: HiveHomeShield (object): Class object. """ def __init__(self, session: object=None): """Initialise alarm. Args: session (object, optional): Used to interact with the hive account. Defaults to None. """ self.session = session async def getAlarm(self, device: dict): """Get alarm data. Args: device (dict): Device to update. Returns: dict: Updated device. """ device['deviceData'].update({'online': await self.session.attr.onlineOffline(device['device_id'])}) dev_data = {} if device['deviceData']['online']: self.session.helper.deviceRecovered(device['device_id']) data = self.session.data.devices[device['device_id']] dev_data = {'hiveID': device['hiveID'], 'hiveName': device['hiveName'], 'hiveType': device['hiveType'], 'haName': device['haName'], 'haType': device['haType'], 'device_id': device['device_id'], 'device_name': device['device_name'], 'status': {'state': await self.getState(device), 'mode': await self.getMode()}, 'deviceData': data.get('props', None), 'parentDevice': data.get('parent', None), 'custom': device.get('custom', None), 'attributes': await self.session.attr.stateAttributes(device['device_id'], device['hiveType'])} self.session.devices.update({device['hiveID']: dev_data}) return self.session.devices[device['hiveID']] else: await self.session.log.errorCheck(device['device_id'], 'ERROR', device['deviceData']['online']) return device
# Problem0020 - Factorial digit sum # # https: // github.com/agileshaw/Project-Euler def digitSum(num): result = 0 while num: result, num = result + num % 10, num // 10 return result if __name__ == "__main__": factorial = 1 for i in range (1, 101): factorial *= i result = digitSum(factorial) print("The factorial digit sum is: %d" % result)
def digit_sum(num): result = 0 while num: (result, num) = (result + num % 10, num // 10) return result if __name__ == '__main__': factorial = 1 for i in range(1, 101): factorial *= i result = digit_sum(factorial) print('The factorial digit sum is: %d' % result)
# Exercise #057 - Data Validation """Make a program that reads a person's sex, but only accepts 'M' or 'F' values. If it is wrong, ask for the typing again until you have a correct value.""" # Create our control variable control = 0 # Here we start our loop with our control variable equals 0 while control == 0: # We put our question inside the loop, so it will repeat itself until the condition is met sexo = input("Enter your sex [M/F]:").strip().upper()[0] if sexo == "M" or sexo == "F": control += 1 if sexo == "M": print("You chose male") else: print(f"You chose female") else: print("Wrong data, please type again!") # another simpler way sexo = input("Enter your sex [M/F]:").strip().upper()[0] while sexo not in "MmFf": sexo = input("Wrong data, please type again:").strip().upper()[0] print(f"You chose {sexo}")
"""Make a program that reads a person's sex, but only accepts 'M' or 'F' values. If it is wrong, ask for the typing again until you have a correct value.""" control = 0 while control == 0: sexo = input('Enter your sex [M/F]:').strip().upper()[0] if sexo == 'M' or sexo == 'F': control += 1 if sexo == 'M': print('You chose male') else: print(f'You chose female') else: print('Wrong data, please type again!') sexo = input('Enter your sex [M/F]:').strip().upper()[0] while sexo not in 'MmFf': sexo = input('Wrong data, please type again:').strip().upper()[0] print(f'You chose {sexo}')
class UserNotInGroupException(Exception): def __init__(self, message): self.message = f"user is not in group: {message}" class InvalidRangeException(Exception): def __init__(self, message): self.message = message class NoSuchGroupException(Exception): def __init__(self, message): self.message = f"no such group: {message}" class NoSuchMessageException(Exception): def __init__(self, message): self.message = f"no such message: {message}" class NoSuchAttachmentException(Exception): def __init__(self, message): self.message = f"no such attachment: {message}" class NoSuchUserException(Exception): def __init__(self, message): self.message = f"no such user: {message}" class QueryValidationError(Exception): def __init__(self, message): self.message = f"query validation error: {message}"
class Usernotingroupexception(Exception): def __init__(self, message): self.message = f'user is not in group: {message}' class Invalidrangeexception(Exception): def __init__(self, message): self.message = message class Nosuchgroupexception(Exception): def __init__(self, message): self.message = f'no such group: {message}' class Nosuchmessageexception(Exception): def __init__(self, message): self.message = f'no such message: {message}' class Nosuchattachmentexception(Exception): def __init__(self, message): self.message = f'no such attachment: {message}' class Nosuchuserexception(Exception): def __init__(self, message): self.message = f'no such user: {message}' class Queryvalidationerror(Exception): def __init__(self, message): self.message = f'query validation error: {message}'
WHATSAPP_CRYPT = ''' Utility for WhatsApp crypt databases decryption. Encrypted databases are usually located here: /sdcard/WhatsApp/Databases/ The `key` file must be obtained from the following location: /data/data/com.whatsapp/files/key (Must have root permissions to read this file) Supported crypt files with the following extensions: - *.crypt7 - *.crypt8 - *.crypt9 - *.crypt10 - *.crypt11 - *.crypt12 Instructions: - Browse to select the directory with crypt files. - Browse to select the `key` file. - Secelt individual databases or all to decrypt. - Databases will be decrypted to the same directory. ''' GUIDE_WA = ''' This utility will decode multiple WhatsApp databases and produce combined messages on one report (without duplicates). Use recovered and decrypted backup databases. Instructions: Browse and select the folder with all "msgstore.db" (unencrypted and/or decrypted) databases. ''' DEFAULT_HEADER = '<font color="#FF0000" size=""># This report was generated using Andriller CE # (This field is editable in Preferences)</font>' DEFAULT_FOOTER = '<i># andriller.com # (This field is editable in Preferences)</i>'
whatsapp_crypt = '\nUtility for WhatsApp crypt databases decryption.\n\nEncrypted databases are usually located here:\n/sdcard/WhatsApp/Databases/\n\nThe `key` file must be obtained from the following location:\n/data/data/com.whatsapp/files/key\n(Must have root permissions to read this file)\n\nSupported crypt files with the following extensions:\n- *.crypt7\n- *.crypt8\n- *.crypt9\n- *.crypt10\n- *.crypt11\n- *.crypt12\n\nInstructions:\n- Browse to select the directory with crypt files.\n- Browse to select the `key` file.\n- Secelt individual databases or all to decrypt.\n- Databases will be decrypted to the same directory.\n' guide_wa = '\nThis utility will decode multiple WhatsApp databases and produce combined messages on one report (without duplicates).\nUse recovered and decrypted backup databases.\n\nInstructions: Browse and select the folder with all "msgstore.db" (unencrypted and/or decrypted) databases.\n' default_header = '<font color="#FF0000" size=""># This report was generated using Andriller CE # (This field is editable in Preferences)</font>' default_footer = '<i># andriller.com # (This field is editable in Preferences)</i>'
def N(xi, i, enum): if enum == 1: if i == 1: return (2*xi-1)**2 if i == 2: return -2*xi*(3*xi-2) if i == 3: return 2*xi*xi if enum == 2: if i == 1: return (2*xi-2)*(xi-1) if i == 2: return -6*xi**2 + 8*xi - 2 if i == 3: return (2*xi-1)**2 def Nprime(xi, i, enum): if enum == 1: if i == 1: return 4*(2*xi-1) if i == 2: return 4*(1-3*xi) if i == 3: return 4*xi if enum == 2: if i == 1: return 4*(xi-1) if i == 2: return 4*(2-3*xi) if i == 3: return 4*(2*xi-1) def H(xi, L, i): if i == 2: return xi/L if i == 1: return 1.0 - xi/L else: raise def Hprime(xi, L, i): if i == 2: return 1.0/L if i == 1: return -1.0/L
def n(xi, i, enum): if enum == 1: if i == 1: return (2 * xi - 1) ** 2 if i == 2: return -2 * xi * (3 * xi - 2) if i == 3: return 2 * xi * xi if enum == 2: if i == 1: return (2 * xi - 2) * (xi - 1) if i == 2: return -6 * xi ** 2 + 8 * xi - 2 if i == 3: return (2 * xi - 1) ** 2 def nprime(xi, i, enum): if enum == 1: if i == 1: return 4 * (2 * xi - 1) if i == 2: return 4 * (1 - 3 * xi) if i == 3: return 4 * xi if enum == 2: if i == 1: return 4 * (xi - 1) if i == 2: return 4 * (2 - 3 * xi) if i == 3: return 4 * (2 * xi - 1) def h(xi, L, i): if i == 2: return xi / L if i == 1: return 1.0 - xi / L else: raise def hprime(xi, L, i): if i == 2: return 1.0 / L if i == 1: return -1.0 / L
#!/usr/bin/python # coding=utf-8 # Copyright 2019 yaitza. All Rights Reserved. # # https://yaitza.github.io/ # # My Code hope to usefull for you. # =================================================================== __author__ = "yaitza" __date__ = "2019-03-29 16:29"
__author__ = 'yaitza' __date__ = '2019-03-29 16:29'
class Wiggle: def fixedStepParser(self, line): value = line.strip() start_position = self.stepIdx * self.parserConfig['step'] + self.parserConfig['start'] stop_position = start_position + self.parserConfig['span'] - 1 self.stepIdx += 1 for position in range(start_position, stop_position): yield (self.parserConfig['chrom'], position, value) def variableStepParser(self, line): (start, value) = line.strip().split() start = int(start) start_position = start stop_position = start + self.parserConfig['span'] for position in range(start_position, stop_position): yield (self.parserConfig['chrom'], position, value) def walk(self, handle): parser = None for line in handle: if line.startswith('track'): continue elif line.startswith('fixedStep'): parser = self.fixedStepParser lineData = line.split() fields = {x.split('=')[0]: x.split('=')[1] for x in lineData[1:]} self.parserConfig = fields for numField in ('step', 'start', 'span'): if numField in self.parserConfig: self.parserConfig[numField] = int(self.parserConfig[numField]) self.stepIdx = 0 elif line.startswith('variableStep'): parser = self.variableStepParser lineData = line.split() fields = {x.split('=')[0]: x.split('=')[1] for x in lineData[1:]} # Default value if 'span' not in fields: fields['span'] = 1 self.parserConfig = fields for numField in ('span',): if numField in self.parserConfig: self.parserConfig[numField] = int(self.parserConfig[numField]) self.stepIdx = 0 elif len(line.strip()) == 0: continue else: for data in parser(line): yield data
class Wiggle: def fixed_step_parser(self, line): value = line.strip() start_position = self.stepIdx * self.parserConfig['step'] + self.parserConfig['start'] stop_position = start_position + self.parserConfig['span'] - 1 self.stepIdx += 1 for position in range(start_position, stop_position): yield (self.parserConfig['chrom'], position, value) def variable_step_parser(self, line): (start, value) = line.strip().split() start = int(start) start_position = start stop_position = start + self.parserConfig['span'] for position in range(start_position, stop_position): yield (self.parserConfig['chrom'], position, value) def walk(self, handle): parser = None for line in handle: if line.startswith('track'): continue elif line.startswith('fixedStep'): parser = self.fixedStepParser line_data = line.split() fields = {x.split('=')[0]: x.split('=')[1] for x in lineData[1:]} self.parserConfig = fields for num_field in ('step', 'start', 'span'): if numField in self.parserConfig: self.parserConfig[numField] = int(self.parserConfig[numField]) self.stepIdx = 0 elif line.startswith('variableStep'): parser = self.variableStepParser line_data = line.split() fields = {x.split('=')[0]: x.split('=')[1] for x in lineData[1:]} if 'span' not in fields: fields['span'] = 1 self.parserConfig = fields for num_field in ('span',): if numField in self.parserConfig: self.parserConfig[numField] = int(self.parserConfig[numField]) self.stepIdx = 0 elif len(line.strip()) == 0: continue else: for data in parser(line): yield data
# Python Module example def add(a, b): """This program adds two numbers and return the result""" result = a + b return result
def add(a, b): """This program adds two numbers and return the result""" result = a + b return result
class Assignment: def __init__(self, member_id, date_time, _role): self.assignee_id = member_id self.target_role = _role self.assignment_date = date_time # def __eq__(self, other): # same_member_id = self.assignee_id == other.assignee_id # same_role = self.role == other.role # same_date = self.assignment_date == other.assignment_id # # return same_member_id and same_date
class Assignment: def __init__(self, member_id, date_time, _role): self.assignee_id = member_id self.target_role = _role self.assignment_date = date_time
def reverse(head): """"Reverse a singly linked list.""" # If there is no head. if not head: # Return nothing. return # Create a nodes list. nodes = [] # Set node equal to the head node. node = head # While node is truthy. while node: # Add the node to the nodes list. nodes.append(node) # Set node equal to the next node. node = node.next # Reverse the list. nodes.reverse() # Set count equal to zero. count = 0 # While count is less than the length of the nodes list while count < len(nodes): # If the index is less than the length of the node list minus 1. if count < len(nodes) - 1: # Set the current node's next node equal to the next node in the list. nodes[count].next = nodes[count + 1] else: # Set the next node equal to none because this node is the tail of the list. nodes[count].next = None # Increment the count. count = count + 1 # Return the first node in the nodes list. return nodes[0]
def reverse(head): """"Reverse a singly linked list.""" if not head: return nodes = [] node = head while node: nodes.append(node) node = node.next nodes.reverse() count = 0 while count < len(nodes): if count < len(nodes) - 1: nodes[count].next = nodes[count + 1] else: nodes[count].next = None count = count + 1 return nodes[0]
""" HelperFunctions.py A list of pretty helpful functions. """ # Opens a file safely. def OpenFileSafely(fileName, mode, raiseError): try: # Try to open the file return open(fileName, mode) except: # If the file couldn't have been opened if raiseError: print("Had trouble opening %s." % fileName) return None else: print("%s wasn't found. Trying to create %s..." % (fileName, fileName)) createdFile = open(fileName, "w+") createdFile.close() return OpenFileSafely(fileName, mode, False) # Checks if at least one object in an array is equal to another object. def OneIs(objects, value): for obj in objects: if obj is value: return True return False # Given an array of strings, remove instances of them from a string. def RemoveElements(line, elements): for element in elements: line = line.replace(element, "") return line
""" HelperFunctions.py A list of pretty helpful functions. """ def open_file_safely(fileName, mode, raiseError): try: return open(fileName, mode) except: if raiseError: print('Had trouble opening %s.' % fileName) return None else: print("%s wasn't found. Trying to create %s..." % (fileName, fileName)) created_file = open(fileName, 'w+') createdFile.close() return open_file_safely(fileName, mode, False) def one_is(objects, value): for obj in objects: if obj is value: return True return False def remove_elements(line, elements): for element in elements: line = line.replace(element, '') return line
archivo = open("./004 EscribirLeerArchivoTexto/nombres.txt","r") nombres = [] for linea in archivo: linea = linea.replace("\n","") nombres.append(linea) archivo.close() print(nombres)
archivo = open('./004 EscribirLeerArchivoTexto/nombres.txt', 'r') nombres = [] for linea in archivo: linea = linea.replace('\n', '') nombres.append(linea) archivo.close() print(nombres)
style = {'base_mpl_style': 'ggplot', 'marketcolors' : {'candle': {'up': '#000000', 'down': '#ff0000'}, 'edge' : {'up': '#000000', 'down': '#ff0000'}, 'wick' : {'up': '#606060', 'down': '#606060'}, 'ohlc' : {'up': '#000000', 'down': '#ff0000'}, 'volume': {'up': '#6f6f6f', 'down': '#ff4040'}, 'vcedge': {'up': '#1f77b4', 'down': '#1f77b4'}, 'vcdopcod' : False, 'alpha' : 0.9}, 'mavcolors' : None, 'facecolor' : 'w', 'gridcolor' : '#c0c0c0', 'gridstyle' : '-', 'y_on_right' : True, 'rc' : {'axes.grid.axis': 'both', 'axes.grid' : True, 'axes.edgecolor': '#c0c0c0', 'axes.labelcolor': 'k', 'ytick.color' : 'k', 'xtick.color' : 'k', 'lines.markeredgecolor': 'k', 'patch.force_edgecolor': True, 'figure.titlesize' : 'x-large', 'figure.titleweight' : 'semibold', }, 'base_mpf_style': 'checkers'}
style = {'base_mpl_style': 'ggplot', 'marketcolors': {'candle': {'up': '#000000', 'down': '#ff0000'}, 'edge': {'up': '#000000', 'down': '#ff0000'}, 'wick': {'up': '#606060', 'down': '#606060'}, 'ohlc': {'up': '#000000', 'down': '#ff0000'}, 'volume': {'up': '#6f6f6f', 'down': '#ff4040'}, 'vcedge': {'up': '#1f77b4', 'down': '#1f77b4'}, 'vcdopcod': False, 'alpha': 0.9}, 'mavcolors': None, 'facecolor': 'w', 'gridcolor': '#c0c0c0', 'gridstyle': '-', 'y_on_right': True, 'rc': {'axes.grid.axis': 'both', 'axes.grid': True, 'axes.edgecolor': '#c0c0c0', 'axes.labelcolor': 'k', 'ytick.color': 'k', 'xtick.color': 'k', 'lines.markeredgecolor': 'k', 'patch.force_edgecolor': True, 'figure.titlesize': 'x-large', 'figure.titleweight': 'semibold'}, 'base_mpf_style': 'checkers'}
class Graph: def __init__(self, vertices): self.V = vertices self.graph = [[0 for i in range(self.V)] for j in range(self.V)] self.edges = [] def add_edge(self, src: int, dest: int, weight: int): self.graph[src][dest] = weight self.graph[dest][src] = weight self.edges.append([src,dest,weight]) def print_graph(self): for i in range(self.V): print("node: ", str(i)) for j in range(self.V): if(self.graph[i][j] != 0): print('path to node ', j, ': ', self.graph[i][j]) print("\n") def matrix_print(self): print('node:', end =" ") for i in range(self.V): print(i, end = " ") for j in range(self.V): print("\n ", j, end =" ") for k in range(self.V): print(self.graph[j][k], end = " ") print("\n") #Precondition: all graph components are connected #implementation of Prim's MST algorithm def mst(self): visited = [0 for i in range(self.V)] #visited set visited[0] = 1 #include first vertex in visited set numEdges = 0 #number of edges included in spanning tree inf = 99999 weightSum = 0 print('MST spans across the following paths: \nEdge (weight)') #iterate until all vertices connected while(numEdges < (self.V - 2)): #find lowest weight edge from current vertex #local params minEdge = inf x = 0 #minEdge indicies in adj. matrix y = 0 #iterate through adj. matrix for i in range(self.V): #min edge must start from a visited node to connect new node to existing tree if(visited[i] == 1): for j in range (self.V) : #new node must be unvisited and least edge if(visited[j] == 0): if(self.graph[i][j] < minEdge and self.graph[i][j] != 0): minEdge = self.graph[i][j] x = i y = j visited[y] = True #update visited vertex weightSum += minEdge print('v',x, '<-> v',y, ' (weight: ', minEdge, ')') numEdges+=1 print('Sum of weights in MST: ', weightSum) g = Graph(6) #n0 g.add_edge(0,1,9) g.add_edge(0,2,75) #n1 g.add_edge(1,2,95) g.add_edge(1,3,19) g.add_edge(1,4,42) #n2 g.add_edge(2,3,51) g.add_edge(2,4,66) #n3 g.add_edge(3,4,31) #n4 g.print_graph() g.mst()
class Graph: def __init__(self, vertices): self.V = vertices self.graph = [[0 for i in range(self.V)] for j in range(self.V)] self.edges = [] def add_edge(self, src: int, dest: int, weight: int): self.graph[src][dest] = weight self.graph[dest][src] = weight self.edges.append([src, dest, weight]) def print_graph(self): for i in range(self.V): print('node: ', str(i)) for j in range(self.V): if self.graph[i][j] != 0: print('path to node ', j, ': ', self.graph[i][j]) print('\n') def matrix_print(self): print('node:', end=' ') for i in range(self.V): print(i, end=' ') for j in range(self.V): print('\n ', j, end=' ') for k in range(self.V): print(self.graph[j][k], end=' ') print('\n') def mst(self): visited = [0 for i in range(self.V)] visited[0] = 1 num_edges = 0 inf = 99999 weight_sum = 0 print('MST spans across the following paths: \nEdge (weight)') while numEdges < self.V - 2: min_edge = inf x = 0 y = 0 for i in range(self.V): if visited[i] == 1: for j in range(self.V): if visited[j] == 0: if self.graph[i][j] < minEdge and self.graph[i][j] != 0: min_edge = self.graph[i][j] x = i y = j visited[y] = True weight_sum += minEdge print('v', x, '<-> v', y, ' (weight: ', minEdge, ')') num_edges += 1 print('Sum of weights in MST: ', weightSum) g = graph(6) g.add_edge(0, 1, 9) g.add_edge(0, 2, 75) g.add_edge(1, 2, 95) g.add_edge(1, 3, 19) g.add_edge(1, 4, 42) g.add_edge(2, 3, 51) g.add_edge(2, 4, 66) g.add_edge(3, 4, 31) g.print_graph() g.mst()
# Problem Set 4A # Name: Gyalpo # Collaborators: # Time Spent: 5:30 # Late Days Used: 0 # Part A0: Data representation # Fill out the following variables correctly. # If correct, the tests named data_representation should pass. treeA = [[14,19],[[3,5],0]] treeB = [[9,3],6] # TODO: change this assignment treeC = [[7],[16,4,2],[8]] # TODO: change this assignment # Part A1: Multiplication on tree leaves def add_tree(tree): """ Recursively computes the sum of all tree leaves. Returns an integer representing the product. Inputs tree: A list (potentially containing sublists) that represents a tree structure. Outputs total: An int equal to the sum of all the leaves of the tree. """ # TODO: Your code here if type(tree) == list: if len(tree) == 0: return 0 else: sum_tree = 0 for i in tree: sum_tree += add_tree(i) #use of recursion to add until it gets to a leaf return sum_tree elif type(tree) == int: #if we are in a leaf then the value of it will be returned return tree # Part A2: Arbitrary operations on tree leaves def sumem(a, b): """ Example operator function. Takes in two integers, returns their sum. """ return a + b def prod(a, b): """ Example operator function. Takes in two integers, returns their product. """ return a * b def op_tree(tree, op, base_case): """ Recursively runs a given operation on tree leaves. Return type depends on the specific operation. Inputs tree: A list (potentially containing sublists) that represents a tree structure. op: A function that takes in two inputs and returns the result of a specific operation on them. base_case: What the operation should return as a result in the base case (i.e. when the tree is empty). """ # TODO: Your code here if type(tree) == list: if len(tree) == 0: return base_case else: result = base_case for i in tree: result = op(result,op_tree(i,op,base_case)) #use of recursion for the operator return result elif type(tree) == int: return tree # Part A3: Searching a tree def search_greater_ten(a, b): """ Operator function that searches for greater-than-10 values within its inputs. Inputs a, b: integers or booleans Outputs True if either input is equal to True or > 10, and False otherwise """ if type(a) == type(b): #in case both a and b are the same type if (a or b) > 10: return True elif (a or b) == True: return True else: return False else: #in case a and b aren't the same type either a is a bool and b and int #or viceversa if a == True or b > 10: return True elif a > 10 or b == True: return True else: return False # Part A4: Find the maximum element of a tree using op_tree and max() in the # main function below (remembering to pass the function in without parenthesis) if __name__ == '__main__': # You can use this part for your own testing and debugging purposes. # IMPORTANT: Do not erase the pass statement below. max_A = op_tree(treeA,max,0) #returns 19 which is the expected result for tree A print(max_A)
tree_a = [[14, 19], [[3, 5], 0]] tree_b = [[9, 3], 6] tree_c = [[7], [16, 4, 2], [8]] def add_tree(tree): """ Recursively computes the sum of all tree leaves. Returns an integer representing the product. Inputs tree: A list (potentially containing sublists) that represents a tree structure. Outputs total: An int equal to the sum of all the leaves of the tree. """ if type(tree) == list: if len(tree) == 0: return 0 else: sum_tree = 0 for i in tree: sum_tree += add_tree(i) return sum_tree elif type(tree) == int: return tree def sumem(a, b): """ Example operator function. Takes in two integers, returns their sum. """ return a + b def prod(a, b): """ Example operator function. Takes in two integers, returns their product. """ return a * b def op_tree(tree, op, base_case): """ Recursively runs a given operation on tree leaves. Return type depends on the specific operation. Inputs tree: A list (potentially containing sublists) that represents a tree structure. op: A function that takes in two inputs and returns the result of a specific operation on them. base_case: What the operation should return as a result in the base case (i.e. when the tree is empty). """ if type(tree) == list: if len(tree) == 0: return base_case else: result = base_case for i in tree: result = op(result, op_tree(i, op, base_case)) return result elif type(tree) == int: return tree def search_greater_ten(a, b): """ Operator function that searches for greater-than-10 values within its inputs. Inputs a, b: integers or booleans Outputs True if either input is equal to True or > 10, and False otherwise """ if type(a) == type(b): if (a or b) > 10: return True elif (a or b) == True: return True else: return False elif a == True or b > 10: return True elif a > 10 or b == True: return True else: return False if __name__ == '__main__': max_a = op_tree(treeA, max, 0) print(max_A)
# -*- coding: ISO-8859-1 -*- """Resource phongprecalc_vert (from file phongprecalc.vert)""" # written by resourcepackage: (1, 0, 1) source = 'phongprecalc.vert' package = 'OpenGLContext.resources' data = "// Vertex-shader pre-calculation for blinn-phong lighting\012vo\ id phong_preCalc( \012 in vec3 vertex_position,\012 in vec4 \ light_position,\012 out float light_distance,\012 out vec3 e\ c_light_location,\012 out vec3 ec_light_half\012) {\012 // This\ is the core setup for a phong lighting pass as a reusable f\ ragment of code.\012 \012 // vertex_position -- un-transform\ ed vertex position (world-space)\012 // light_position -- un\ -transformed light location (direction)\012 // light_distanc\ e -- output giving world-space distance-to-light \012 // ec_\ light_location -- output giving location of light in eye coo\ rds \012 // ec_light_half -- output giving the half-vector o\ ptimization\012 \012 if (light_position.w == 0.0) {\012 \ // directional rather than positional light...\012 ec_li\ ght_location = normalize(\012 gl_NormalMatrix *\012 \ light_position.xyz\012 );\012 light_distance\ = 0.0;\012 } else {\012 // positional light, we calcula\ te distance in \012 // model-view space here, so we take\ a partial \012 // solution...\012 vec3 ms_vec = (\012 \ light_position.xyz -\012 vertex_position\012\ );\012 vec3 light_direction = gl_NormalMatrix * \ ms_vec;\012 ec_light_location = normalize( light_directi\ on );\012 light_distance = abs(length( ms_vec ));\012 }\012\ // half-vector calculation \012 ec_light_half = normaliz\ e(\012 ec_light_location - vec3( 0,0,-1 )\012 );\012}\012" ### end
"""Resource phongprecalc_vert (from file phongprecalc.vert)""" source = 'phongprecalc.vert' package = 'OpenGLContext.resources' data = '// Vertex-shader pre-calculation for blinn-phong lighting\nvoid phong_preCalc( \n in vec3 vertex_position,\n in vec4 light_position,\n out float light_distance,\n out vec3 ec_light_location,\n out vec3 ec_light_half\n) {\n // This is the core setup for a phong lighting pass as a reusable fragment of code.\n \n // vertex_position -- un-transformed vertex position (world-space)\n // light_position -- un-transformed light location (direction)\n // light_distance -- output giving world-space distance-to-light \n // ec_light_location -- output giving location of light in eye coords \n // ec_light_half -- output giving the half-vector optimization\n \n if (light_position.w == 0.0) {\n // directional rather than positional light...\n ec_light_location = normalize(\n gl_NormalMatrix *\n light_position.xyz\n );\n light_distance = 0.0;\n } else {\n // positional light, we calculate distance in \n // model-view space here, so we take a partial \n // solution...\n vec3 ms_vec = (\n light_position.xyz -\n vertex_position\n );\n vec3 light_direction = gl_NormalMatrix * ms_vec;\n ec_light_location = normalize( light_direction );\n light_distance = abs(length( ms_vec ));\n }\n // half-vector calculation \n ec_light_half = normalize(\n ec_light_location - vec3( 0,0,-1 )\n );\n}\n'
''' Given a list of coins, find the minimum number of coins to get to a certain value For Example: coins={1,2,3} V=5 Output: 2 (3+2=5) Note: the list must always contain a coin of value 1, so in the worst case the output will be V*'coin 1' ''' def minCoin(coins, amount): return minCoin_(coins, amount, {}) def minCoin_(coins, amount, memo): if amount in memo: return memo[amount] if amount <= 0: res = 0 else: res = float("inf") for c in coins: # try taking each coin pos = 1 + minCoin_(coins, amount - c, memo) #take the coin and look for solution with that value less if pos < res: # if it's a better solution res = pos memo[amount] = res return res def minCoinIter(coins, amount): memo = [float("inf")]*(amount+1) memo[0] = 0 # 0 coins needed to read 0 for amt in range(1, amount+1): # for each sub-amount # amt is the current amount for c in coins: # for each coin c if c <= amt: # we can take that coin by looking at the solution with the amount # being lowered by c, and adding 1 because we take that coin takeThatCoin = memo[amt - c] + 1 # is it a better solution? memo[amt] = min(memo[amt], takeThatCoin) # last position of memo contain the solution for amt = amount return memo[amount-1] c1 = [1,2,3] print(minCoin(c1, 3)) print(minCoin(c1, 5)) print(minCoin(c1, 20)) print(minCoinIter(c1, 20)) # only possible with an iterative approach! # resursion depth limit would be reached using the resursive solution print(minCoinIter(c1, 1000))
""" Given a list of coins, find the minimum number of coins to get to a certain value For Example: coins={1,2,3} V=5 Output: 2 (3+2=5) Note: the list must always contain a coin of value 1, so in the worst case the output will be V*'coin 1' """ def min_coin(coins, amount): return min_coin_(coins, amount, {}) def min_coin_(coins, amount, memo): if amount in memo: return memo[amount] if amount <= 0: res = 0 else: res = float('inf') for c in coins: pos = 1 + min_coin_(coins, amount - c, memo) if pos < res: res = pos memo[amount] = res return res def min_coin_iter(coins, amount): memo = [float('inf')] * (amount + 1) memo[0] = 0 for amt in range(1, amount + 1): for c in coins: if c <= amt: take_that_coin = memo[amt - c] + 1 memo[amt] = min(memo[amt], takeThatCoin) return memo[amount - 1] c1 = [1, 2, 3] print(min_coin(c1, 3)) print(min_coin(c1, 5)) print(min_coin(c1, 20)) print(min_coin_iter(c1, 20)) print(min_coin_iter(c1, 1000))
#APRENDIENDO INSTRUCCIONES EN PYTHON print("funciones basicas de python") print("-"*28) print("input:Ingresar Datos") print("print:Imprimir Datos") print("MIN: Menor Valor") print("ROUND:Redondear")
print('funciones basicas de python') print('-' * 28) print('input:Ingresar Datos') print('print:Imprimir Datos') print('MIN: Menor Valor') print('ROUND:Redondear')
{ 'targets': [{ 'target_name': 'bindings', 'sources': [ 'src/serialport.cpp' ], 'include_dirs': [ '<!(node -e "require(\'nan\')")' ], 'variables': { # Lerna seems to strips environment variables. Workaround: create `packages/bindings/GENERATE_COVERAGE_FILE` 'generate_coverage': '<!(test -e GENERATE_COVERAGE_FILE && echo "yes" || echo $GENERATE_COVERAGE)', }, 'conditions': [ ['OS=="win"', { 'defines': ['CHECK_NODE_MODULE_VERSION'], 'sources': [ 'src/serialport_win.cpp' ], 'msvs_settings': { 'VCCLCompilerTool': { 'ExceptionHandling': '2', 'DisableSpecificWarnings': [ '4530', '4506' ], } } } ], ['OS=="mac"', { 'sources': [ 'src/serialport_unix.cpp', 'src/poller.cpp', 'src/darwin_list.cpp' ], 'xcode_settings': { 'MACOSX_DEPLOYMENT_TARGET': '10.9', 'OTHER_LDFLAGS': [ '-framework CoreFoundation -framework IOKit' ] } } ], ['OS=="linux"', { 'sources': [ 'src/serialport_unix.cpp', 'src/poller.cpp', 'src/serialport_linux.cpp' ] } ], ['OS=="android"', { 'sources': [ 'src/serialport_unix.cpp', 'src/poller.cpp', 'src/serialport_linux.cpp' ] } ], ['OS!="win"', { # Only works with `gcc` (not Windows), for now 'conditions': [ ['generate_coverage=="yes"', { 'cflags+': ['--coverage'], 'cflags_cc+': ['--coverage'], 'link_settings': { 'libraries+': [ '-lgcov', # To test if this condition is executing, cause an error by including a missing/non-existant library # '-lmissing', ], }, }, ] ], 'sources': [ 'src/serialport_unix.cpp', 'src/poller.cpp' ] } ], # Remove `.disabled` to test with all systems ['generate_coverage=="yes.disabled"', { 'cflags+': ['--coverage'], 'cflags_cc+': ['--coverage'], 'link_settings': { 'libraries+': [ '-lgcov', # To test if this condition is executing, cause an error by including a missing/non-existant library '-lmissing', ], }, }, ] ] }], }
{'targets': [{'target_name': 'bindings', 'sources': ['src/serialport.cpp'], 'include_dirs': ['<!(node -e "require(\'nan\')")'], 'variables': {'generate_coverage': '<!(test -e GENERATE_COVERAGE_FILE && echo "yes" || echo $GENERATE_COVERAGE)'}, 'conditions': [['OS=="win"', {'defines': ['CHECK_NODE_MODULE_VERSION'], 'sources': ['src/serialport_win.cpp'], 'msvs_settings': {'VCCLCompilerTool': {'ExceptionHandling': '2', 'DisableSpecificWarnings': ['4530', '4506']}}}], ['OS=="mac"', {'sources': ['src/serialport_unix.cpp', 'src/poller.cpp', 'src/darwin_list.cpp'], 'xcode_settings': {'MACOSX_DEPLOYMENT_TARGET': '10.9', 'OTHER_LDFLAGS': ['-framework CoreFoundation -framework IOKit']}}], ['OS=="linux"', {'sources': ['src/serialport_unix.cpp', 'src/poller.cpp', 'src/serialport_linux.cpp']}], ['OS=="android"', {'sources': ['src/serialport_unix.cpp', 'src/poller.cpp', 'src/serialport_linux.cpp']}], ['OS!="win"', {'conditions': [['generate_coverage=="yes"', {'cflags+': ['--coverage'], 'cflags_cc+': ['--coverage'], 'link_settings': {'libraries+': ['-lgcov']}}]], 'sources': ['src/serialport_unix.cpp', 'src/poller.cpp']}], ['generate_coverage=="yes.disabled"', {'cflags+': ['--coverage'], 'cflags_cc+': ['--coverage'], 'link_settings': {'libraries+': ['-lgcov', '-lmissing']}}]]}]}
""" This file will contain all utility functions for pulling insults(and maybe default values?) from configuration files located somewhere. This increases the modularity and usability of ChaseBot, and allows for users to easily add content to DIS. These configuration files will contain lists of chain words and flat words to be used for generating insults. They will support commenting, insult notation, sections, and even config options later on. Content *MUST* be restricted to one line. Comments can be multi-lined, but they will have to append a comment character(Customisable, but most likely '#') --== DIS Insult Notation: ==-- DIS Insult Notation allows for easy formatting of insults, so the user dosen't have to repeat themselves. ; - Escape character, tells DIS to ignore the next character ! - Tell DIS that this insult is vulgar. () - Specify a section of text. This section will be interpreted by DIS as one character. (End parenthesis will be escaped if the first one is escaped) (All characters in parenthesis are automatically escaped.) [] - Gives DIS alternate options for the insult(ie. Dumb[er] will resolve as 'Dumb' and 'Dumber') (End bracket will be escaped if first one is escaped) (Each value should be comma separated) ^ - Specify the next character or section should be uppercase(DIS interpreters all characters as lowercase) < - Render character or section after at the start of the line > - Render character or section after at the end of the line *n - Repeat the next character or section a specified number of times These characters may be located anywhere in the text, and may be escaped by the ';' character """ class InsultParser: """ The aforementioned insult parser. You can see more information about it above. """ def __init__(self): self.comment = '#' # Comment character, denotes text we don't care about self.reader = None # File object we use for reading. self.start_flat = '------flat words:------' # Header for flat words self.start_chain = '------chain words:------' # Header for chain words self.stop = '------end section:------' # Header for end section def parse(self, path): """ Parses over the insults and returns a dictionary mapping chainwords and flatwords. :param path: Path to insult file :return: Dictionary wor words. """ # Open a file object on the path specified: flat = [] chain = [] selected = None with open(path, mode='r') as self.reader: # We now iterate over the text: for line in self.reader: # Removing newlines and other junk line = line.rstrip("\n") line = line.replace("\n", '') line = line.lower() if line == '' or line[0] == self.comment: # We don't care about this, ignore it: continue if line == self.start_flat: # Started flat word section, add flat words to list: selected = 1 continue if line == self.start_chain: # Started chain word section, add flat words to list: selected = 2 continue if line == self.stop: # End of section: selected = None continue # Add word to relevant list, if we are in a section: if selected is not None: if selected == 1: # Add to flat wordlist: flat = flat + self.notation_parse(line) else: # Add to chain wordlist chain = chain + self.notation_parse(line) continue # End of parsing, return dictionary of words: return {'flat': flat, 'chain': chain} def _split_statement(self, text): """ Splits text up into characters or sections. Makes the parsing process easier. We also interpret the content in parenthesis, as they should be processed first. :param text: Text to format :return: List of split text """ index = 0 final = [] # While loop to iterate over text while index < len(text): char = text[index] if char == '(' and text[index-1] != ';': # Start of a section, find the end end = text.find(')', index) if end == -1: raise(Exception("No terminating parenthesis! Add ')' or escape '('!")) # Send groups through notation parser so they can be interpreted: first final.append(''.join(self.notation_parse(text[index+1:end], find_vulg=False))) index = end + 1 continue # Just append the character to the list final.append(char) # Increment the index index = index + 1 # Done iterating, return return final def _statement_expand(self, text) -> list: """ Expands statements based on brackets. Finds all possible combinations for statement. We implement some recursion so we can get all the possible combos. :param text: Text to be split. :return: List of split statements """ # Finding first instance of open bracket. start = text.find('[') if start != -1 and text[start-1] != ';': # We have a bracket, find the end bracket: stop = text.find(']', start) if stop == -1: raise(Exception("No terminating bracket! Add ']' or escape '['!")) # Split up text in the bracket: split = text[start+1:stop].split(',') # Add split text to final: done = list(text[:start] + x + text[stop+1:] for x in split) final = [] for i in done: final = final + self._statement_expand(i) return final elif start != -1 and text[start-1] == ';': # Get expansion for the rest of the text: new = self._statement_expand(text[start+1:]) final = [] for i in new: final.append(text[:start+1] + i) return final return [text] def notation_parse(self, text, find_vulg=True): """ Parses notation characters and generates new text based off of it. :param text: Text to be formatted :param find_vulg: Value determining if we should find vulgarity :return: Formatted text in a list """ text = text.lower() # We first expand the text: exp = self._statement_expand(text) ret = [] for state in exp: # We now split up the statement into list form: split = self._split_statement(state) # Now we iterate over each character to do our format operations: index = 0 # Index of pointer final = [] # Final collection of text end = [] # Text to add to the end of the statement vulg = False # Value determining if statement is vulgar while index < len(split): char = split[index] if char == ';': # Next character is to be added to the collection: final.append(split[index+1]) index = index + 2 continue elif char == '!' and find_vulg: # Insult is vulgar, do something vulg = True index = index + 1 continue elif char == '^': # Next character should be uppercase final.append(split[index+1].upper()) index = index + 2 continue elif char == '<' or char == '>': # Next character should be moved to the start/end of the statement: move = split.pop(index + 1) if char == '<': final.insert(0, move) else: end.append(move) index = index + 1 continue elif char == '*': # Repeat the next character a specified number of times: num = split[index+1] try: num = int(num) except: raise Exception("No number after '*' char! Must be in form '*3' or '*(123)!") final.append(split[index+2] * num) index = index + 3 continue else: # Add character to final: final.append(char) index = index + 1 continue # Merging final + end statements final = final + end if find_vulg: ret.append([''.join(final), vulg]) else: ret.append(''.join(final)) continue return ret
""" This file will contain all utility functions for pulling insults(and maybe default values?) from configuration files located somewhere. This increases the modularity and usability of ChaseBot, and allows for users to easily add content to DIS. These configuration files will contain lists of chain words and flat words to be used for generating insults. They will support commenting, insult notation, sections, and even config options later on. Content *MUST* be restricted to one line. Comments can be multi-lined, but they will have to append a comment character(Customisable, but most likely '#') --== DIS Insult Notation: ==-- DIS Insult Notation allows for easy formatting of insults, so the user dosen't have to repeat themselves. ; - Escape character, tells DIS to ignore the next character ! - Tell DIS that this insult is vulgar. () - Specify a section of text. This section will be interpreted by DIS as one character. (End parenthesis will be escaped if the first one is escaped) (All characters in parenthesis are automatically escaped.) [] - Gives DIS alternate options for the insult(ie. Dumb[er] will resolve as 'Dumb' and 'Dumber') (End bracket will be escaped if first one is escaped) (Each value should be comma separated) ^ - Specify the next character or section should be uppercase(DIS interpreters all characters as lowercase) < - Render character or section after at the start of the line > - Render character or section after at the end of the line *n - Repeat the next character or section a specified number of times These characters may be located anywhere in the text, and may be escaped by the ';' character """ class Insultparser: """ The aforementioned insult parser. You can see more information about it above. """ def __init__(self): self.comment = '#' self.reader = None self.start_flat = '------flat words:------' self.start_chain = '------chain words:------' self.stop = '------end section:------' def parse(self, path): """ Parses over the insults and returns a dictionary mapping chainwords and flatwords. :param path: Path to insult file :return: Dictionary wor words. """ flat = [] chain = [] selected = None with open(path, mode='r') as self.reader: for line in self.reader: line = line.rstrip('\n') line = line.replace('\n', '') line = line.lower() if line == '' or line[0] == self.comment: continue if line == self.start_flat: selected = 1 continue if line == self.start_chain: selected = 2 continue if line == self.stop: selected = None continue if selected is not None: if selected == 1: flat = flat + self.notation_parse(line) else: chain = chain + self.notation_parse(line) continue return {'flat': flat, 'chain': chain} def _split_statement(self, text): """ Splits text up into characters or sections. Makes the parsing process easier. We also interpret the content in parenthesis, as they should be processed first. :param text: Text to format :return: List of split text """ index = 0 final = [] while index < len(text): char = text[index] if char == '(' and text[index - 1] != ';': end = text.find(')', index) if end == -1: raise exception("No terminating parenthesis! Add ')' or escape '('!") final.append(''.join(self.notation_parse(text[index + 1:end], find_vulg=False))) index = end + 1 continue final.append(char) index = index + 1 return final def _statement_expand(self, text) -> list: """ Expands statements based on brackets. Finds all possible combinations for statement. We implement some recursion so we can get all the possible combos. :param text: Text to be split. :return: List of split statements """ start = text.find('[') if start != -1 and text[start - 1] != ';': stop = text.find(']', start) if stop == -1: raise exception("No terminating bracket! Add ']' or escape '['!") split = text[start + 1:stop].split(',') done = list((text[:start] + x + text[stop + 1:] for x in split)) final = [] for i in done: final = final + self._statement_expand(i) return final elif start != -1 and text[start - 1] == ';': new = self._statement_expand(text[start + 1:]) final = [] for i in new: final.append(text[:start + 1] + i) return final return [text] def notation_parse(self, text, find_vulg=True): """ Parses notation characters and generates new text based off of it. :param text: Text to be formatted :param find_vulg: Value determining if we should find vulgarity :return: Formatted text in a list """ text = text.lower() exp = self._statement_expand(text) ret = [] for state in exp: split = self._split_statement(state) index = 0 final = [] end = [] vulg = False while index < len(split): char = split[index] if char == ';': final.append(split[index + 1]) index = index + 2 continue elif char == '!' and find_vulg: vulg = True index = index + 1 continue elif char == '^': final.append(split[index + 1].upper()) index = index + 2 continue elif char == '<' or char == '>': move = split.pop(index + 1) if char == '<': final.insert(0, move) else: end.append(move) index = index + 1 continue elif char == '*': num = split[index + 1] try: num = int(num) except: raise exception("No number after '*' char! Must be in form '*3' or '*(123)!") final.append(split[index + 2] * num) index = index + 3 continue else: final.append(char) index = index + 1 continue final = final + end if find_vulg: ret.append([''.join(final), vulg]) else: ret.append(''.join(final)) continue return ret
# coding: utf-8 # Try POH # author: Leonarodne @ NEETSDKASU ############################################## def gs(*_): return input().strip() def gi(*_): return int(gs()) def gss(*_): return gs().split() def gis(*_): return list(map(int, gss())) def nmapf(n,f): return list(map(f, range(n))) def ngs(n): return nmapf(n,gs) def ngi(n): return nmapf(n,gi) def ngss(n): return nmapf(n,gss) def ngis(n): return nmapf(n,gis) ############################################## def solve(n): md = 10 ** 9 r = 1 q = 1 j = 0 c = 0 for x in range(1, n + 1): q *= x j += 1 if j < 5: continue while q % 5 == 0: c -= 1 q //= 5 while q % 2 == 0: c += 1 q >>= 1 r = (r * q) % md q = 1 j = 0 while q % 5 == 0: c -= 1 q //= 5 while q % 2 == 0: c += 1 q >>= 1 r = (r * q) % md for _ in range(c // 30): r = (r << 30) % md for _ in range(c % 30): r = (r << 1) % md return r print(solve(gi()))
def gs(*_): return input().strip() def gi(*_): return int(gs()) def gss(*_): return gs().split() def gis(*_): return list(map(int, gss())) def nmapf(n, f): return list(map(f, range(n))) def ngs(n): return nmapf(n, gs) def ngi(n): return nmapf(n, gi) def ngss(n): return nmapf(n, gss) def ngis(n): return nmapf(n, gis) def solve(n): md = 10 ** 9 r = 1 q = 1 j = 0 c = 0 for x in range(1, n + 1): q *= x j += 1 if j < 5: continue while q % 5 == 0: c -= 1 q //= 5 while q % 2 == 0: c += 1 q >>= 1 r = r * q % md q = 1 j = 0 while q % 5 == 0: c -= 1 q //= 5 while q % 2 == 0: c += 1 q >>= 1 r = r * q % md for _ in range(c // 30): r = (r << 30) % md for _ in range(c % 30): r = (r << 1) % md return r print(solve(gi()))
EARLY_GAME = 36 MIDDLE_GAME = 75 class heuristic: def __init__(self, board): self._size = board.get_board_size() self._weight = [ [200, -100, 100, 50, 50, 50, 50, 100, -100, 200], [-100, -200, -50, -50, -50, -50, - 50, -50, -200, -100], [100, -50, 100, 0, 20, 20, 0, 100, -50, 100], [50, -50, 0, 0, 0, 0, 0, 0, -50, 50], [50, -50, 20, 0, 0, 0, 0, 20, -50, 50], [50, -50, 20, 0, 0, 0, 0, 20, -50, 50], [50, -50, 0, 0, 0, 0, 0, 0, -50, 50], [100, -50, 100, 20, 20, 0, 0, 100, -50, 100], [-100, -200, -50, -50, -50, -50, - 50, -50, -200, -100], [200, -100, 100, 50, 50, 50, 50, 100, -100, 200], ] self._corners = [ [0, 0], [0, self._size - 1], [self._size - 1, 0], [self._size - 1, self._size - 1] ] self._board = board self._color = None def setBoard(self, board): self._board = board def nb_piece_heuristic(self): if self._color == self._board._WHITE: return self._board._WHITE - self._board._nbBLACK return self._board._nbBLACK - self._board._nbWHITE def heuristic_calculation(self, myScore, opponnentScore): if myScore + opponnentScore is not 0: return 100 * (myScore - opponnentScore) / (myScore + opponnentScore) else: return 0 def weight_heuritic(self): result = 0 for x in range(self._size): for y in range(self._size): if self._board._board[x][y] == self._color: result += self._weight[x][y] elif self._board._board[x][y] == self._board._EMPTY: pass else: result -= self._weight[x][y] # print("WEIGHT : ", result) return result def diff_v2(self): (whites, blacks) = self._board.get_nb_pieces() if self._color == self._board._BLACK: nb_player_pieces = blacks nb_opponent_pieces = whites else: nb_player_pieces = whites nb_opponent_pieces = blacks return self.heuristic_calculation(nb_player_pieces, nb_opponent_pieces) def mobility_v2(self): opponentMoves = 0 myMoves = 0 for x in range(self._size): for y in range(self._size): if self._board.is_valid_move(self._board._flip(self._color), x, y): opponentMoves += 1 if self._board.is_valid_move(self._color, x, y): myMoves += 1 return self.heuristic_calculation(myMoves, opponentMoves) def corners_v2(self): oColor = self._board._flip(self._color) myCorners = opponnentCorners = 0 for x, y in self._corners: if self._board._board[x][y] == self._color: myCorners += 1 elif self._board._board[x][y] == oColor: opponnentCorners += 1 return self.heuristic_calculation(myCorners, opponnentCorners) def parity(self): (white, black) = self._board.get_nb_pieces() pieces = white + black rest = self._size * self._size - pieces result = rest % 2 == 0 and -1 or 1 return result #Verify if a piece is stable in the horizontal line def ligneStableHorizontale(self, pieceX, pieceY, color): if pieceX == 0 or pieceX == self._size -1: return True x = 0 y = pieceY lineFull = 0 halfLineUnicolorLeft = 0 halfLineUnicolorRight = 0 halfLineLeftFull = 0 halfLineRightFull = 0 leaveWhile = False isStable = False for x in range(self._size): case = self._board._board[x][y] if case != self._board._EMPTY: lineFull = lineFull + 1 if x <= pieceX: if case != self._board._EMPTY: halfLineLeftFull = halfLineLeftFull + 1 if case == color: halfLineUnicolorLeft = halfLineUnicolorLeft + 1 else: if case != self._board._EMPTY: halfLineRightFull = halfLineRightFull + 1 if case == color: halfLineUnicolorRight = halfLineUnicolorRight + 1 if halfLineLeftFull == pieceX + 1: x = pieceX while x + 1 < self._size and not leaveWhile and not isStable: if self._board._board[x+1][y] == self._board._EMPTY: leaveWhile = True elif self._board._board[x+1][y] == self._board._flip(color): isStable = True else: x = x + 1 elif halfLineRightFull == (self._size - 1) - pieceX: x = pieceX while x - 1 >= 0 and not leaveWhile and not isStable: if self._board._board[x-1][y] == self._board._EMPTY: leaveWhile = True elif self._board._board[x-1][y] == self._board._flip(color): isStable = True else: x = x - 1 if (lineFull == self._size) or (halfLineUnicolorLeft == pieceX + 1) or (halfLineUnicolorRight == self._size - pieceX) or isStable: return True return False # Verify if a piece is stable in the vertical line def ligneStableVerticale(self, pieceX, pieceY, color): if pieceY == 0 or pieceY == self._size -1: return True x = pieceX y = 0 lineFull = 0 halfLineUnicolorTop = 0 halfLineUnicolorDown = 0 halfLineTopFull = 0 halfLineDownFull = 0 leaveWhile = False isStable = False for y in range(self._size): case = self._board._board[x][y] if case != self._board._EMPTY: lineFull = lineFull + 1 if y <= pieceY: if case != self._board._EMPTY: halfLineTopFull = halfLineDownFull + 1 if case == color: halfLineUnicolorTop = halfLineUnicolorTop + 1 else: if case != self._board._EMPTY: halfLineTopFull = halfLineDownFull + 1 if case == color: halfLineUnicolorDown = halfLineUnicolorDown + 1 if halfLineTopFull == pieceY + 1: y = pieceY while y + 1 < self._size and not leaveWhile and not isStable: if self._board._board[x][y+1] == self._board._EMPTY: leaveWhile = True elif self._board._board[x][y+1] == self._board._flip(color): isStable = True else: y = y + 1 elif halfLineDownFull == (self._size - 1) - pieceY: y = pieceY while y - 1 >= 0 and not leaveWhile and not isStable: if self._board._board[x][y-1] == self._board._EMPTY: leaveWhile = True elif self._board._board[x][y-1] == self._board._flip(color): isStable = True else: y = y - 1 if (lineFull == self._size) or (halfLineUnicolorTop == pieceY + 1) or (halfLineUnicolorDown == self._size - pieceY) or isStable: return True return False # Verify if a piece is stable in the first diagonal def diagoStableDownTop(self, pieceX, pieceY, color): if pieceX == 0 or pieceX == self._size - 1 or pieceY == 0 or pieceY == self._size -1: return True diagoDownTopFull = 1 #count the current piece halfDiagoLeft = 0 halfDiagoRight = 0 diagoSize = 1 halfDiagoLeftSize = 0 halfDiagoRightSize = 0 halfDiagoLeftFull = 0 halfDiagoRightFull = 0 leaveWhile = False isStable = False x = pieceX y = pieceY while (x + 1 < self._size - 1) and (y - 1 >= 0): case = self._board._board[x+1][y-1] if case != self._board._EMPTY: halfDiagoRightFull = halfDiagoRightFull + 1 diagoDownTopFull = diagoDownTopFull + 1 if case == color: halfDiagoRight = halfDiagoRight + 1 diagoSize = diagoSize + 1 halfDiagoRightSize = halfDiagoRightSize + 1 x = x + 1 y = y - 1 x = pieceX y = pieceY while (x - 1 >= 0) and (y + 1 < self._size): case = self._board._board[x-1][y+1] if case != self._board._EMPTY: halfDiagoLeftFull = halfDiagoLeftFull + 1 diagoDownTopFull = diagoDownTopFull + 1 if case == color: halfDiagoLeft = halfDiagoLeft + 1 diagoSize = diagoSize + 1 halfDiagoLeftSize = halfDiagoLeftSize + 1 x = x - 1 y = y + 1 if halfDiagoLeftSize == halfDiagoLeftFull: x = pieceX y = pieceY while (x + 1 < self._size - 1) and (y - 1 >= 0) and not leaveWhile and not isStable: if self._board._board[x+1][y-1] == self._board._EMPTY: leaveWhile = True elif self._board._board[x+1][y-1] == self._board._flip(color): isStable = True else: x = x + 1 y = y - 1 elif halfDiagoRightSize == halfDiagoRightFull: x = pieceX y = pieceY while (x - 1 >= 0) and (y + 1 < self._size) and not leaveWhile and not isStable: if self._board._board[x-1][y+1] == self._board._EMPTY: leaveWhile = True elif self._board._board[x-1][y+1] == self._board._flip(color): isStable = True else: x = x - 1 y = y + 1 if (diagoDownTopFull == diagoSize) or (halfDiagoRight == halfDiagoRightSize) \ or (halfDiagoLeft == halfDiagoLeftSize) or isStable: return True return False # Verify if a piece is stable in the second diagonal def diagoStableTopDown(self, pieceX, pieceY, color): if pieceX == 0 or pieceX == self._size - 1 or pieceY == 0 or pieceY == self._size - 1: return True diagoTopDownFull = 1 # count the current piece halfDiagoTop = 0 halfDiagoDown = 0 diagoSize = 1 halfDiagoTopSize = 0 halfDiagoDownSize = 0 halfDiagoTopFull = 0 halfDiagoDownFull = 0 leaveWhile = False isStable = False x = pieceX y = pieceY while (x - 1 >= 0) and (y - 1 >= 0): case = self._board._board[x - 1][y - 1] if case != self._board._EMPTY: halfDiagoTopFull = halfDiagoTopFull + 1 diagoTopDownFull = diagoTopDownFull + 1 if case == color: halfDiagoTop = halfDiagoTop + 1 x = x - 1 y = y - 1 diagoSize = diagoSize + 1 halfDiagoTopSize = halfDiagoTopSize + 1 x = pieceX y = pieceY while (x + 1 < self._size) and (y + 1 < self._size): case = self._board._board[x + 1][y + 1] if case != self._board._EMPTY: halfDiagoDownFull = halfDiagoDownFull + 1 diagoTopDownFull = diagoTopDownFull + 1 if case == color: halfDiagoDown = halfDiagoDown + 1 x = x + 1 y = y + 1 diagoSize = diagoSize + 1 halfDiagoDownSize = halfDiagoDownSize + 1 if halfDiagoTopSize == halfDiagoTopFull: x = pieceX y = pieceY while (x + 1 < self._size) and (y + 1 < self._size) and not leaveWhile and not isStable: if self._board._board[x + 1][y + 1] == self._board._EMPTY: leaveWhile = True elif self._board._board[x + 1][y + 1] == self._board._flip(color): isStable = True else: x = x + 1 y = y + 1 elif halfDiagoDownSize == halfDiagoDownFull: x = pieceX y = pieceY while (x - 1 >= 0) and (y - 1 >= 0) and not leaveWhile and not isStable: if self._board._board[x-1][y-1] == self._board._EMPTY: leaveWhile = True elif self._board._board[x-1][y-1] == self._board._flip(color): isStable = True else: x = x - 1 y = y - 1 if (diagoTopDownFull == diagoSize) or (halfDiagoDown == halfDiagoDownSize) \ or (halfDiagoTop == halfDiagoTopSize) or isStable: return True return False def stability(self): myStability = 0 opponnentStability = 0 for x in range(self._size): for y in range(self._size): if self._board._board[x][y] != self._board._EMPTY: if self._board._board[x][y] == self._color: if self.ligneStableHorizontale(x, y, self._color): if self.ligneStableVerticale(x, y, self._color): if self.diagoStableDownTop(x, y, self._color): if self.diagoStableTopDown(x, y, self._color): myStability = myStability + 1 """horizontalStable = self.ligneStableHorizontale(x, y, self._color) verticalStable = self.ligneStableVerticale(x, y, self._color) firstDiagoStable = self.diagoStableDownTop(x, y, self._color) secondDiagoStable = self.diagoStableTopDown(x, y, self._color) if horizontalStable and verticalStable and firstDiagoStable and secondDiagoStable: myStability = myStability + 1""" else: if self.ligneStableHorizontale(x, y, self._board._flip(self._color)): if self.ligneStableVerticale(x, y, self._board._flip(self._color)): if self.diagoStableDownTop(x, y, self._board._flip(self._color)): if self.diagoStableTopDown(x, y, self._board._flip(self._color)): opponnentStability = opponnentStability + 1 """horizontalStable = self.ligneStableHorizontale(x, y, self._board._flip(self._color)) verticalStable = self.ligneStableVerticale(x, y, self._board._flip(self._color)) firstDiagoStable = self.diagoStableDownTop(x, y, self._board._flip(self._color)) secondDiagoStable = self.diagoStableTopDown(x, y, self._board._flip(self._color)) if horizontalStable and verticalStable and firstDiagoStable and secondDiagoStable: opponnentStability = opponnentStability + 1""" if myStability + opponnentStability is not 0: #print("STABILITE 1 : ", myStability, " STABILTE 2 : ", opponnentStability) return 100 * (myStability - opponnentStability) / (myStability + opponnentStability) else: return 0
early_game = 36 middle_game = 75 class Heuristic: def __init__(self, board): self._size = board.get_board_size() self._weight = [[200, -100, 100, 50, 50, 50, 50, 100, -100, 200], [-100, -200, -50, -50, -50, -50, -50, -50, -200, -100], [100, -50, 100, 0, 20, 20, 0, 100, -50, 100], [50, -50, 0, 0, 0, 0, 0, 0, -50, 50], [50, -50, 20, 0, 0, 0, 0, 20, -50, 50], [50, -50, 20, 0, 0, 0, 0, 20, -50, 50], [50, -50, 0, 0, 0, 0, 0, 0, -50, 50], [100, -50, 100, 20, 20, 0, 0, 100, -50, 100], [-100, -200, -50, -50, -50, -50, -50, -50, -200, -100], [200, -100, 100, 50, 50, 50, 50, 100, -100, 200]] self._corners = [[0, 0], [0, self._size - 1], [self._size - 1, 0], [self._size - 1, self._size - 1]] self._board = board self._color = None def set_board(self, board): self._board = board def nb_piece_heuristic(self): if self._color == self._board._WHITE: return self._board._WHITE - self._board._nbBLACK return self._board._nbBLACK - self._board._nbWHITE def heuristic_calculation(self, myScore, opponnentScore): if myScore + opponnentScore is not 0: return 100 * (myScore - opponnentScore) / (myScore + opponnentScore) else: return 0 def weight_heuritic(self): result = 0 for x in range(self._size): for y in range(self._size): if self._board._board[x][y] == self._color: result += self._weight[x][y] elif self._board._board[x][y] == self._board._EMPTY: pass else: result -= self._weight[x][y] return result def diff_v2(self): (whites, blacks) = self._board.get_nb_pieces() if self._color == self._board._BLACK: nb_player_pieces = blacks nb_opponent_pieces = whites else: nb_player_pieces = whites nb_opponent_pieces = blacks return self.heuristic_calculation(nb_player_pieces, nb_opponent_pieces) def mobility_v2(self): opponent_moves = 0 my_moves = 0 for x in range(self._size): for y in range(self._size): if self._board.is_valid_move(self._board._flip(self._color), x, y): opponent_moves += 1 if self._board.is_valid_move(self._color, x, y): my_moves += 1 return self.heuristic_calculation(myMoves, opponentMoves) def corners_v2(self): o_color = self._board._flip(self._color) my_corners = opponnent_corners = 0 for (x, y) in self._corners: if self._board._board[x][y] == self._color: my_corners += 1 elif self._board._board[x][y] == oColor: opponnent_corners += 1 return self.heuristic_calculation(myCorners, opponnentCorners) def parity(self): (white, black) = self._board.get_nb_pieces() pieces = white + black rest = self._size * self._size - pieces result = rest % 2 == 0 and -1 or 1 return result def ligne_stable_horizontale(self, pieceX, pieceY, color): if pieceX == 0 or pieceX == self._size - 1: return True x = 0 y = pieceY line_full = 0 half_line_unicolor_left = 0 half_line_unicolor_right = 0 half_line_left_full = 0 half_line_right_full = 0 leave_while = False is_stable = False for x in range(self._size): case = self._board._board[x][y] if case != self._board._EMPTY: line_full = lineFull + 1 if x <= pieceX: if case != self._board._EMPTY: half_line_left_full = halfLineLeftFull + 1 if case == color: half_line_unicolor_left = halfLineUnicolorLeft + 1 else: if case != self._board._EMPTY: half_line_right_full = halfLineRightFull + 1 if case == color: half_line_unicolor_right = halfLineUnicolorRight + 1 if halfLineLeftFull == pieceX + 1: x = pieceX while x + 1 < self._size and (not leaveWhile) and (not isStable): if self._board._board[x + 1][y] == self._board._EMPTY: leave_while = True elif self._board._board[x + 1][y] == self._board._flip(color): is_stable = True else: x = x + 1 elif halfLineRightFull == self._size - 1 - pieceX: x = pieceX while x - 1 >= 0 and (not leaveWhile) and (not isStable): if self._board._board[x - 1][y] == self._board._EMPTY: leave_while = True elif self._board._board[x - 1][y] == self._board._flip(color): is_stable = True else: x = x - 1 if lineFull == self._size or halfLineUnicolorLeft == pieceX + 1 or halfLineUnicolorRight == self._size - pieceX or isStable: return True return False def ligne_stable_verticale(self, pieceX, pieceY, color): if pieceY == 0 or pieceY == self._size - 1: return True x = pieceX y = 0 line_full = 0 half_line_unicolor_top = 0 half_line_unicolor_down = 0 half_line_top_full = 0 half_line_down_full = 0 leave_while = False is_stable = False for y in range(self._size): case = self._board._board[x][y] if case != self._board._EMPTY: line_full = lineFull + 1 if y <= pieceY: if case != self._board._EMPTY: half_line_top_full = halfLineDownFull + 1 if case == color: half_line_unicolor_top = halfLineUnicolorTop + 1 else: if case != self._board._EMPTY: half_line_top_full = halfLineDownFull + 1 if case == color: half_line_unicolor_down = halfLineUnicolorDown + 1 if halfLineTopFull == pieceY + 1: y = pieceY while y + 1 < self._size and (not leaveWhile) and (not isStable): if self._board._board[x][y + 1] == self._board._EMPTY: leave_while = True elif self._board._board[x][y + 1] == self._board._flip(color): is_stable = True else: y = y + 1 elif halfLineDownFull == self._size - 1 - pieceY: y = pieceY while y - 1 >= 0 and (not leaveWhile) and (not isStable): if self._board._board[x][y - 1] == self._board._EMPTY: leave_while = True elif self._board._board[x][y - 1] == self._board._flip(color): is_stable = True else: y = y - 1 if lineFull == self._size or halfLineUnicolorTop == pieceY + 1 or halfLineUnicolorDown == self._size - pieceY or isStable: return True return False def diago_stable_down_top(self, pieceX, pieceY, color): if pieceX == 0 or pieceX == self._size - 1 or pieceY == 0 or (pieceY == self._size - 1): return True diago_down_top_full = 1 half_diago_left = 0 half_diago_right = 0 diago_size = 1 half_diago_left_size = 0 half_diago_right_size = 0 half_diago_left_full = 0 half_diago_right_full = 0 leave_while = False is_stable = False x = pieceX y = pieceY while x + 1 < self._size - 1 and y - 1 >= 0: case = self._board._board[x + 1][y - 1] if case != self._board._EMPTY: half_diago_right_full = halfDiagoRightFull + 1 diago_down_top_full = diagoDownTopFull + 1 if case == color: half_diago_right = halfDiagoRight + 1 diago_size = diagoSize + 1 half_diago_right_size = halfDiagoRightSize + 1 x = x + 1 y = y - 1 x = pieceX y = pieceY while x - 1 >= 0 and y + 1 < self._size: case = self._board._board[x - 1][y + 1] if case != self._board._EMPTY: half_diago_left_full = halfDiagoLeftFull + 1 diago_down_top_full = diagoDownTopFull + 1 if case == color: half_diago_left = halfDiagoLeft + 1 diago_size = diagoSize + 1 half_diago_left_size = halfDiagoLeftSize + 1 x = x - 1 y = y + 1 if halfDiagoLeftSize == halfDiagoLeftFull: x = pieceX y = pieceY while x + 1 < self._size - 1 and y - 1 >= 0 and (not leaveWhile) and (not isStable): if self._board._board[x + 1][y - 1] == self._board._EMPTY: leave_while = True elif self._board._board[x + 1][y - 1] == self._board._flip(color): is_stable = True else: x = x + 1 y = y - 1 elif halfDiagoRightSize == halfDiagoRightFull: x = pieceX y = pieceY while x - 1 >= 0 and y + 1 < self._size and (not leaveWhile) and (not isStable): if self._board._board[x - 1][y + 1] == self._board._EMPTY: leave_while = True elif self._board._board[x - 1][y + 1] == self._board._flip(color): is_stable = True else: x = x - 1 y = y + 1 if diagoDownTopFull == diagoSize or halfDiagoRight == halfDiagoRightSize or halfDiagoLeft == halfDiagoLeftSize or isStable: return True return False def diago_stable_top_down(self, pieceX, pieceY, color): if pieceX == 0 or pieceX == self._size - 1 or pieceY == 0 or (pieceY == self._size - 1): return True diago_top_down_full = 1 half_diago_top = 0 half_diago_down = 0 diago_size = 1 half_diago_top_size = 0 half_diago_down_size = 0 half_diago_top_full = 0 half_diago_down_full = 0 leave_while = False is_stable = False x = pieceX y = pieceY while x - 1 >= 0 and y - 1 >= 0: case = self._board._board[x - 1][y - 1] if case != self._board._EMPTY: half_diago_top_full = halfDiagoTopFull + 1 diago_top_down_full = diagoTopDownFull + 1 if case == color: half_diago_top = halfDiagoTop + 1 x = x - 1 y = y - 1 diago_size = diagoSize + 1 half_diago_top_size = halfDiagoTopSize + 1 x = pieceX y = pieceY while x + 1 < self._size and y + 1 < self._size: case = self._board._board[x + 1][y + 1] if case != self._board._EMPTY: half_diago_down_full = halfDiagoDownFull + 1 diago_top_down_full = diagoTopDownFull + 1 if case == color: half_diago_down = halfDiagoDown + 1 x = x + 1 y = y + 1 diago_size = diagoSize + 1 half_diago_down_size = halfDiagoDownSize + 1 if halfDiagoTopSize == halfDiagoTopFull: x = pieceX y = pieceY while x + 1 < self._size and y + 1 < self._size and (not leaveWhile) and (not isStable): if self._board._board[x + 1][y + 1] == self._board._EMPTY: leave_while = True elif self._board._board[x + 1][y + 1] == self._board._flip(color): is_stable = True else: x = x + 1 y = y + 1 elif halfDiagoDownSize == halfDiagoDownFull: x = pieceX y = pieceY while x - 1 >= 0 and y - 1 >= 0 and (not leaveWhile) and (not isStable): if self._board._board[x - 1][y - 1] == self._board._EMPTY: leave_while = True elif self._board._board[x - 1][y - 1] == self._board._flip(color): is_stable = True else: x = x - 1 y = y - 1 if diagoTopDownFull == diagoSize or halfDiagoDown == halfDiagoDownSize or halfDiagoTop == halfDiagoTopSize or isStable: return True return False def stability(self): my_stability = 0 opponnent_stability = 0 for x in range(self._size): for y in range(self._size): if self._board._board[x][y] != self._board._EMPTY: if self._board._board[x][y] == self._color: if self.ligneStableHorizontale(x, y, self._color): if self.ligneStableVerticale(x, y, self._color): if self.diagoStableDownTop(x, y, self._color): if self.diagoStableTopDown(x, y, self._color): my_stability = myStability + 1 'horizontalStable = self.ligneStableHorizontale(x, y, self._color)\n verticalStable = self.ligneStableVerticale(x, y, self._color)\n firstDiagoStable = self.diagoStableDownTop(x, y, self._color)\n secondDiagoStable = self.diagoStableTopDown(x, y, self._color)\n if horizontalStable and verticalStable and firstDiagoStable and secondDiagoStable:\n myStability = myStability + 1' else: if self.ligneStableHorizontale(x, y, self._board._flip(self._color)): if self.ligneStableVerticale(x, y, self._board._flip(self._color)): if self.diagoStableDownTop(x, y, self._board._flip(self._color)): if self.diagoStableTopDown(x, y, self._board._flip(self._color)): opponnent_stability = opponnentStability + 1 'horizontalStable = self.ligneStableHorizontale(x, y, self._board._flip(self._color))\n verticalStable = self.ligneStableVerticale(x, y, self._board._flip(self._color))\n firstDiagoStable = self.diagoStableDownTop(x, y, self._board._flip(self._color))\n secondDiagoStable = self.diagoStableTopDown(x, y, self._board._flip(self._color))\n if horizontalStable and verticalStable and firstDiagoStable and secondDiagoStable:\n opponnentStability = opponnentStability + 1' if myStability + opponnentStability is not 0: return 100 * (myStability - opponnentStability) / (myStability + opponnentStability) else: return 0
class Checker: def __init__(self, hin): super().__init__() self.hin = hin self.chain = [] def conv(self, kernel, stride=1, pad=0, dilation=1): self.chain.append([0, kernel, stride, pad, dilation, 0]) def convT(self, kernel, stride=1, pad=0, dilation=1, outpad=0): self.chain.append([1, kernel, stride, pad, dilation, outpad]) def pool(self, kernel, stride=None, pad=0, dilation=1): stride = kernel if stride is None else stride self.chain.append([2, kernel, stride, pad, dilation, 0]) def get_shape(self, verbose=False): h = self.hin for idx, c in enumerate(self.chain): i, k, s, p, d, o = c if i == 0 or i == 2: _h = (h + 2*p - d*(k-1) - 1)//s + 1 else: if o >= s or o >= k: print("[fail] output padding too large") return _h = (h-1)*s - 2*p + d*(k-1) + o + 1 if verbose: print(f"{idx}: {h} -> {_h}") h = _h return h def check(self, outshape=None): outshape = self.hin if outshape is None else outshape h = self.get_shape(True) if h != outshape: print("[fail] check fail") else: print("[pass] check pass") check = Checker(224) check.conv(213, 32, 92) check.check(7) exit(0) check = Checker(1024) check.conv(3, 2, 2) check.conv(5, 2, 3) check.conv(7, 2, 4) # check.conv(3, 1) csh = check.get_shape(True) print("") check = Checker(1024) check.conv(2*2*7 + 2*5 + 3 - (2 + 6), 8, 2*2*4 + 2*3 + 2) # check.conv(2*5 + 3 - 2, 4, 2*3 + 2) check.check(csh) print("") check = Checker(28) check.conv(3, 2, 1) check.conv(3, 2, 1) # check.conv(3, 2) # check.conv(3, 1) csh = check.get_shape(True) print("") check = Checker(28) # check.conv(15, 8, 3) check.conv(7, 4, 3) # check.conv(2*5 + 3 - 2, 4, 2*3 + 2) check.check(csh)
class Checker: def __init__(self, hin): super().__init__() self.hin = hin self.chain = [] def conv(self, kernel, stride=1, pad=0, dilation=1): self.chain.append([0, kernel, stride, pad, dilation, 0]) def conv_t(self, kernel, stride=1, pad=0, dilation=1, outpad=0): self.chain.append([1, kernel, stride, pad, dilation, outpad]) def pool(self, kernel, stride=None, pad=0, dilation=1): stride = kernel if stride is None else stride self.chain.append([2, kernel, stride, pad, dilation, 0]) def get_shape(self, verbose=False): h = self.hin for (idx, c) in enumerate(self.chain): (i, k, s, p, d, o) = c if i == 0 or i == 2: _h = (h + 2 * p - d * (k - 1) - 1) // s + 1 else: if o >= s or o >= k: print('[fail] output padding too large') return _h = (h - 1) * s - 2 * p + d * (k - 1) + o + 1 if verbose: print(f'{idx}: {h} -> {_h}') h = _h return h def check(self, outshape=None): outshape = self.hin if outshape is None else outshape h = self.get_shape(True) if h != outshape: print('[fail] check fail') else: print('[pass] check pass') check = checker(224) check.conv(213, 32, 92) check.check(7) exit(0) check = checker(1024) check.conv(3, 2, 2) check.conv(5, 2, 3) check.conv(7, 2, 4) csh = check.get_shape(True) print('') check = checker(1024) check.conv(2 * 2 * 7 + 2 * 5 + 3 - (2 + 6), 8, 2 * 2 * 4 + 2 * 3 + 2) check.check(csh) print('') check = checker(28) check.conv(3, 2, 1) check.conv(3, 2, 1) csh = check.get_shape(True) print('') check = checker(28) check.conv(7, 4, 3) check.check(csh)
__all__ = [ 'responseclassify', 'responsemorph', 'text_input', 'text_input_classify', 'text_input_tamil', 'url_input', 'url_input_classify', 'api_imagecaption_request', 'api_imagecaption_response', 'api_ner_request', 'api_ner_request_1', 'api_ner_response', 'api_qa_request', 'api_qa_request_1', 'api_qa_response', 'api_question_request', 'api_question_response', 'api_summary_request', 'api_summary_request_1', 'api_summary_response', 'api_tableqa_request', 'api_tableqa_request_1', 'api_tableqa_response', 'api_translate_request', 'api_translate_request_1', 'api_translate_response', 'errors_1', 'input', 'input_1', 'input_2', 'input_3', 'input_4', 'input_5', 'input_6', 'input_7', 'input_8', 'input_9', 'input_10', 'input_11', 'input_12', 'input_13', 'input_14', 'input_15', 'input_16', 'original_string', 'responselemma', 'responsepo', 'responsestem', ]
__all__ = ['responseclassify', 'responsemorph', 'text_input', 'text_input_classify', 'text_input_tamil', 'url_input', 'url_input_classify', 'api_imagecaption_request', 'api_imagecaption_response', 'api_ner_request', 'api_ner_request_1', 'api_ner_response', 'api_qa_request', 'api_qa_request_1', 'api_qa_response', 'api_question_request', 'api_question_response', 'api_summary_request', 'api_summary_request_1', 'api_summary_response', 'api_tableqa_request', 'api_tableqa_request_1', 'api_tableqa_response', 'api_translate_request', 'api_translate_request_1', 'api_translate_response', 'errors_1', 'input', 'input_1', 'input_2', 'input_3', 'input_4', 'input_5', 'input_6', 'input_7', 'input_8', 'input_9', 'input_10', 'input_11', 'input_12', 'input_13', 'input_14', 'input_15', 'input_16', 'original_string', 'responselemma', 'responsepo', 'responsestem']
class DocumentViewerAutomationPeer(DocumentViewerBaseAutomationPeer): """ Exposes System.Windows.Controls.DocumentViewer types to UI Automation. DocumentViewerAutomationPeer(owner: DocumentViewer) """ def GetPattern(self,patternInterface): """ GetPattern(self: DocumentViewerAutomationPeer,patternInterface: PatternInterface) -> object Gets the control pattern for the System.Windows.Controls.DocumentViewer that is associated with this System.Windows.Automation.Peers.DocumentViewerAutomationPeer. patternInterface: One of the enumeration values. Returns: If patternInterface is System.Windows.Automation.Peers.PatternInterface.ScrollItem,this method returns the System.Windows.Automation.Peers.ScrollViewerAutomationPeer for this System.Windows.Automation.Peers.DocumentViewerAutomationPeer. This method also sets System.Windows.Automation.Peers.DocumentViewerAutomationPeer as the System.Windows.Automation.Peers.AutomationPeer.EventsSource. """ pass @staticmethod def __new__(self,owner): """ __new__(cls: type,owner: DocumentViewer) """ pass IsHwndHost=property(lambda self: object(),lambda self,v: None,lambda self: None) """Gets a value that indicates whether the element that is associated with this System.Windows.Automation.Peers.AutomationPeer hosts hwnds in Windows Presentation Foundation (WPF). """
class Documentviewerautomationpeer(DocumentViewerBaseAutomationPeer): """ Exposes System.Windows.Controls.DocumentViewer types to UI Automation. DocumentViewerAutomationPeer(owner: DocumentViewer) """ def get_pattern(self, patternInterface): """ GetPattern(self: DocumentViewerAutomationPeer,patternInterface: PatternInterface) -> object Gets the control pattern for the System.Windows.Controls.DocumentViewer that is associated with this System.Windows.Automation.Peers.DocumentViewerAutomationPeer. patternInterface: One of the enumeration values. Returns: If patternInterface is System.Windows.Automation.Peers.PatternInterface.ScrollItem,this method returns the System.Windows.Automation.Peers.ScrollViewerAutomationPeer for this System.Windows.Automation.Peers.DocumentViewerAutomationPeer. This method also sets System.Windows.Automation.Peers.DocumentViewerAutomationPeer as the System.Windows.Automation.Peers.AutomationPeer.EventsSource. """ pass @staticmethod def __new__(self, owner): """ __new__(cls: type,owner: DocumentViewer) """ pass is_hwnd_host = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Gets a value that indicates whether the element that is associated with this System.Windows.Automation.Peers.AutomationPeer hosts hwnds in Windows Presentation Foundation (WPF).\n\n\n\n'
# -*- encoding:utf-8 -*- """ company:IT author:pengjinfu project:migu time:2020.5.14 """ user = 'wind8288@163.com' pw = 'wind121'
""" company:IT author:pengjinfu project:migu time:2020.5.14 """ user = 'wind8288@163.com' pw = 'wind121'
# 48. Rotate Image # https://leetcode.com/problems/rotate-image/ class Solution: def rotate(self, matrix: List[List[int]]) -> None: """ Do not return anything, modify matrix in-place instead. """ for i in range(len(matrix) // 2): self._rotate_layer(matrix, i) def _rotate_layer(self, m, layer): n = len(m) for i in range(layer, n-layer-1): aux = m[layer][i] # move from top to right border m[i][n-layer-1], aux = aux, m[i][n-layer-1] # move from right to bottom border m[n-layer-1][n-i-1], aux = aux, m[n-layer-1][n-i-1] # move from bottom to left border m[n-i-1][layer], aux = aux, m[n-i-1][layer] # update top m[layer][i] = aux
class Solution: def rotate(self, matrix: List[List[int]]) -> None: """ Do not return anything, modify matrix in-place instead. """ for i in range(len(matrix) // 2): self._rotate_layer(matrix, i) def _rotate_layer(self, m, layer): n = len(m) for i in range(layer, n - layer - 1): aux = m[layer][i] (m[i][n - layer - 1], aux) = (aux, m[i][n - layer - 1]) (m[n - layer - 1][n - i - 1], aux) = (aux, m[n - layer - 1][n - i - 1]) (m[n - i - 1][layer], aux) = (aux, m[n - i - 1][layer]) m[layer][i] = aux
class simpAngMo: def __init__(self, m, r, v): self.m = m self.r = r self.v = v def getAngVel(self): return str(self.v/self.r) + ' rad s^(-1)' def getCentAcc(self): return str(self.v**2/self.r) + ' m s^(-2)' def getCentAngAcc(self): return str(self.magnitudeOf(self.getCentAcc())/self.r) + ' rad s^(-2)' def centF(self): return str(self.m * self.magnitudeOf(self.getCentAcc())) + ' N' def magnitudeOf(self, string): return float(string.split(' ')[0]) class physAngMo: def __init__(self, m, shape, r, v): self.m = m self.r = r self.v = v if shape == 'Sphere': self.MoI = (self.m*self.r**2)*2/5 elif shape == 'FullCylinder': self.MoI = (self.m*self.r**2) elif shape == 'HollowCylinder': self.MoI = (self.m*self.r**2)/2 elif shape == 'Stick': self.MoI = (self.m*self.r**2)/12 else: self.MoI = shape*(self.m*self.r**2) def KEget(self): return str(self.m*self.v**2/2+(self.MoI*self.v**2)/(2*self.r**2)) + ' J' a = simpAngMo(5, 2, 10) b = physAngMo(5, 10, 2, 10) print(a.centF()) print(b.KEget())
class Simpangmo: def __init__(self, m, r, v): self.m = m self.r = r self.v = v def get_ang_vel(self): return str(self.v / self.r) + ' rad s^(-1)' def get_cent_acc(self): return str(self.v ** 2 / self.r) + ' m s^(-2)' def get_cent_ang_acc(self): return str(self.magnitudeOf(self.getCentAcc()) / self.r) + ' rad s^(-2)' def cent_f(self): return str(self.m * self.magnitudeOf(self.getCentAcc())) + ' N' def magnitude_of(self, string): return float(string.split(' ')[0]) class Physangmo: def __init__(self, m, shape, r, v): self.m = m self.r = r self.v = v if shape == 'Sphere': self.MoI = self.m * self.r ** 2 * 2 / 5 elif shape == 'FullCylinder': self.MoI = self.m * self.r ** 2 elif shape == 'HollowCylinder': self.MoI = self.m * self.r ** 2 / 2 elif shape == 'Stick': self.MoI = self.m * self.r ** 2 / 12 else: self.MoI = shape * (self.m * self.r ** 2) def k_eget(self): return str(self.m * self.v ** 2 / 2 + self.MoI * self.v ** 2 / (2 * self.r ** 2)) + ' J' a = simp_ang_mo(5, 2, 10) b = phys_ang_mo(5, 10, 2, 10) print(a.centF()) print(b.KEget())
print( "Chocolate Chip Cookies" ) print( "1 cup butter, softened" ) print( "1 cup white sugar" ) print( "1 cup packed brown sugar" ) print( "2 eggs" ) print( "2 teaspoons vanilla extract" ) print( "3 cups all-purpose flour" ) print( "1 teaspoon baking soda" ) print( "2 teaspoons hot water" ) print( "0.5 teaspoons salt" ) print( "2 cups semisweet chocolate chips" ) print( "1 cup chopped walnuts" )
print('Chocolate Chip Cookies') print('1 cup butter, softened') print('1 cup white sugar') print('1 cup packed brown sugar') print('2 eggs') print('2 teaspoons vanilla extract') print('3 cups all-purpose flour') print('1 teaspoon baking soda') print('2 teaspoons hot water') print('0.5 teaspoons salt') print('2 cups semisweet chocolate chips') print('1 cup chopped walnuts')
def part1(moves): h_pos = 0 depth = 0 for direction, unit in moves: if direction == 'forward': h_pos += int(unit) elif direction == 'up': depth -= int(unit) elif direction == 'down': depth += int(unit) return h_pos * depth def part2(moves): aim = 0 h_pos = 0 depth = 0 for direction, unit in moves: if direction == 'forward': h_pos += unit depth += aim * unit elif direction == 'up': aim -= unit elif direction == 'down': aim += unit return h_pos * depth def main(): # Read in the data. with open('./day2/input.txt', 'r') as f: moves = f.read().split('\n') # Ignore this final newline in the input. Frustrating. if not moves[-1]: moves = moves[:-1] # Parse the data in the form (direction, unit). parsed_moves = [ (move.split(' ')[0], int(move.split(' ')[1])) for move in moves ] print(part1(parsed_moves)) print(part2(parsed_moves)) if __name__ == '__main__': main()
def part1(moves): h_pos = 0 depth = 0 for (direction, unit) in moves: if direction == 'forward': h_pos += int(unit) elif direction == 'up': depth -= int(unit) elif direction == 'down': depth += int(unit) return h_pos * depth def part2(moves): aim = 0 h_pos = 0 depth = 0 for (direction, unit) in moves: if direction == 'forward': h_pos += unit depth += aim * unit elif direction == 'up': aim -= unit elif direction == 'down': aim += unit return h_pos * depth def main(): with open('./day2/input.txt', 'r') as f: moves = f.read().split('\n') if not moves[-1]: moves = moves[:-1] parsed_moves = [(move.split(' ')[0], int(move.split(' ')[1])) for move in moves] print(part1(parsed_moves)) print(part2(parsed_moves)) if __name__ == '__main__': main()
""" ---- begin number constant ---- """ STATUS_OK = 200 CONNECTION_ABORTED = 10054 REFRESH_TIME_IN_SECONDS = 5 """ ---- end number constant ---- """ """ ---- begin text constant ---- """ # When reading the csv: # - Place 'r' before the path string to read any special characters, such as '\' # - Don't forget to put the file name at the end of the path + '.csv' # - Before running the code, make sure that the column names in the CSV files match with the column names in the tables created and in the query below # - If needed make sure that all the columns are in a TEXT format CHROME_EXECUTABLE_PATH = "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe" CHROME_DRIVER_PATH = "./libs/chromedriver.exe" FIREFOX_GOCKO_DRIVER_PATH = "./libs/geckodriver.exe" DB_FILE_PATH = r'\WebScraping\python\db\imdb_sqlite.db' SHORT_DATETIME_FORMAT = "%Y-%m-%d %H:%M:%S" IMDB_KEY_EXPRESSION = "[^a-zA-Z0-9]" """ ---- end text constant ---- """
""" ---- begin number constant ---- """ status_ok = 200 connection_aborted = 10054 refresh_time_in_seconds = 5 ' ---- end number constant ---- ' ' ---- begin text constant ---- ' chrome_executable_path = 'C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe' chrome_driver_path = './libs/chromedriver.exe' firefox_gocko_driver_path = './libs/geckodriver.exe' db_file_path = '\\WebScraping\\python\\db\\imdb_sqlite.db' short_datetime_format = '%Y-%m-%d %H:%M:%S' imdb_key_expression = '[^a-zA-Z0-9]' ' ---- end text constant ---- '
''' You can find this exercise at the following website: https://www.practicepython.org/ 15. Reverse Word Order: Write a program (using functions!) that asks the user for a long string containing multiple words. Print back to the user the same string, except with the words in backwards order. For example, say I type the string: My name is Michele Then I would see the string: Michele is name My shown back to me. ''' def reverse(): words = input("Enter a set of words: ") division = words.split() backwards = division[::-1] final = " ".join(backwards) return("Words in reverse: " + str(final)) def reverse2(): # Solving in one line words = input("Enter a set of words: ") return("Words in reverse: " + str(" ".join(words.split()[::-1]))) def reverse3(): # Using reversed() built-in function words = input("Enter a set of words: ") return("Words in reverse: " + str(" ".join(reversed(words.split())))) # List of built-in functions in python: https://www.w3schools.com/python/python_ref_functions.asp print(reverse()) print(reverse2()) print(reverse3())
""" You can find this exercise at the following website: https://www.practicepython.org/ 15. Reverse Word Order: Write a program (using functions!) that asks the user for a long string containing multiple words. Print back to the user the same string, except with the words in backwards order. For example, say I type the string: My name is Michele Then I would see the string: Michele is name My shown back to me. """ def reverse(): words = input('Enter a set of words: ') division = words.split() backwards = division[::-1] final = ' '.join(backwards) return 'Words in reverse: ' + str(final) def reverse2(): words = input('Enter a set of words: ') return 'Words in reverse: ' + str(' '.join(words.split()[::-1])) def reverse3(): words = input('Enter a set of words: ') return 'Words in reverse: ' + str(' '.join(reversed(words.split()))) print(reverse()) print(reverse2()) print(reverse3())
# PySNMP SMI module. Autogenerated from smidump -f python RUCKUS-SCG-SYSTEM-MIB # by libsmi2pysnmp-0.1.3 # Python version sys.version_info(major=2, minor=7, micro=11, releaselevel='final', serial=0) # pylint:disable=C0302 mibBuilder = mibBuilder # pylint:disable=undefined-variable,used-before-assignment # Imports (Integer, ObjectIdentifier, OctetString, ) = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") (NamedValues, ) = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") (ConstraintsIntersection, ConstraintsUnion, SingleValueConstraint, ValueRangeConstraint, ValueSizeConstraint, ) = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ConstraintsUnion", "SingleValueConstraint", "ValueRangeConstraint", "ValueSizeConstraint") (InterfaceIndex, ifIndex, ) = mibBuilder.importSymbols("IF-MIB", "InterfaceIndex", "ifIndex") (ruckusSCGSystemModule, ) = mibBuilder.importSymbols("RUCKUS-ROOT-MIB", "ruckusSCGSystemModule") (ObjectGroup, ) = mibBuilder.importSymbols("SNMPv2-CONF", "ObjectGroup") (Bits, Counter32, Counter64, Integer32, Integer32, IpAddress, ModuleIdentity, MibIdentifier, MibScalar, MibTable, MibTableRow, MibTableColumn, TimeTicks, Unsigned32, ) = mibBuilder.importSymbols("SNMPv2-SMI", "Bits", "Counter32", "Counter64", "Integer32", "Integer32", "IpAddress", "ModuleIdentity", "MibIdentifier", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "TimeTicks", "Unsigned32") (DisplayString, MacAddress, RowStatus, TruthValue, ) = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "MacAddress", "RowStatus", "TruthValue") # Objects ruckusSystemMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 25053, 1, 3, 1, 1)).setRevisions(("2014-05-19 11:00", )) if mibBuilder.loadTexts: ruckusSystemMIB.setOrganization("Ruckus Wireless, Inc.") if mibBuilder.loadTexts: ruckusSystemMIB.setContactInfo("Ruckus Wireless, Inc.\n\n350 West Java Dr.\nSunnyvale, CA 94089\nUSA\n\nT: +1 (650) 265-4200\nF: +1 (408) 738-2065\nEMail: info@ruckuswireless.com\nWeb: www.ruckuswireless.com") if mibBuilder.loadTexts: ruckusSystemMIB.setDescription("Ruckus System mib") ruckusSystemObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 25053, 1, 3, 1, 1, 1)) ruckusSystemStats = MibIdentifier((1, 3, 6, 1, 4, 1, 25053, 1, 3, 1, 1, 1, 15)) ruckusSystemStatsNumAP = MibScalar((1, 3, 6, 1, 4, 1, 25053, 1, 3, 1, 1, 1, 15, 1), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ruckusSystemStatsNumAP.setDescription("Number of AP") ruckusSystemStatsNumSta = MibScalar((1, 3, 6, 1, 4, 1, 25053, 1, 3, 1, 1, 1, 15, 2), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ruckusSystemStatsNumSta.setDescription("Number of associated client devices") ruckusSystemStatsWLANTotalRxPkts = MibScalar((1, 3, 6, 1, 4, 1, 25053, 1, 3, 1, 1, 1, 15, 5), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ruckusSystemStatsWLANTotalRxPkts.setDescription("Total received packets of wireless interfaces") ruckusSystemStatsWLANTotalRxBytes = MibScalar((1, 3, 6, 1, 4, 1, 25053, 1, 3, 1, 1, 1, 15, 6), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ruckusSystemStatsWLANTotalRxBytes.setDescription("Total received bytes of wireless interfaces") ruckusSystemStatsWLANTotalRxMulticast = MibScalar((1, 3, 6, 1, 4, 1, 25053, 1, 3, 1, 1, 1, 15, 7), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ruckusSystemStatsWLANTotalRxMulticast.setDescription("Total received multicast packets of wireless interfaces") ruckusSystemStatsWLANTotalTxPkts = MibScalar((1, 3, 6, 1, 4, 1, 25053, 1, 3, 1, 1, 1, 15, 8), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ruckusSystemStatsWLANTotalTxPkts.setDescription("Total transmitted packets of wireless interfaces") ruckusSystemStatsWLANTotalTxBytes = MibScalar((1, 3, 6, 1, 4, 1, 25053, 1, 3, 1, 1, 1, 15, 9), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ruckusSystemStatsWLANTotalTxBytes.setDescription("Total transmitted bytes of wireless interfaces") ruckusSystemStatsWLANTotalTxMulticast = MibScalar((1, 3, 6, 1, 4, 1, 25053, 1, 3, 1, 1, 1, 15, 10), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ruckusSystemStatsWLANTotalTxMulticast.setDescription("Total transmitted multicast packets of wireless interfaces") ruckusSystemStatsWLANTotalTxFail = MibScalar((1, 3, 6, 1, 4, 1, 25053, 1, 3, 1, 1, 1, 15, 11), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ruckusSystemStatsWLANTotalTxFail.setDescription("Total transmitted fail packets of wireless interfaces") ruckusSystemStatsWLANTotalTxRetry = MibScalar((1, 3, 6, 1, 4, 1, 25053, 1, 3, 1, 1, 1, 15, 12), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ruckusSystemStatsWLANTotalTxRetry.setDescription("Total transmitted retry packets of wireless interfaces") ruckusSystemStatsSerialNumber = MibScalar((1, 3, 6, 1, 4, 1, 25053, 1, 3, 1, 1, 1, 15, 13), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: ruckusSystemStatsSerialNumber.setDescription("Serial Number") # Augmentions # Exports # Module identity mibBuilder.exportSymbols("RUCKUS-SCG-SYSTEM-MIB", PYSNMP_MODULE_ID=ruckusSystemMIB) # Objects mibBuilder.exportSymbols("RUCKUS-SCG-SYSTEM-MIB", ruckusSystemMIB=ruckusSystemMIB, ruckusSystemObjects=ruckusSystemObjects, ruckusSystemStats=ruckusSystemStats, ruckusSystemStatsNumAP=ruckusSystemStatsNumAP, ruckusSystemStatsNumSta=ruckusSystemStatsNumSta, ruckusSystemStatsWLANTotalRxPkts=ruckusSystemStatsWLANTotalRxPkts, ruckusSystemStatsWLANTotalRxBytes=ruckusSystemStatsWLANTotalRxBytes, ruckusSystemStatsWLANTotalRxMulticast=ruckusSystemStatsWLANTotalRxMulticast, ruckusSystemStatsWLANTotalTxPkts=ruckusSystemStatsWLANTotalTxPkts, ruckusSystemStatsWLANTotalTxBytes=ruckusSystemStatsWLANTotalTxBytes, ruckusSystemStatsWLANTotalTxMulticast=ruckusSystemStatsWLANTotalTxMulticast, ruckusSystemStatsWLANTotalTxFail=ruckusSystemStatsWLANTotalTxFail, ruckusSystemStatsWLANTotalTxRetry=ruckusSystemStatsWLANTotalTxRetry, ruckusSystemStatsSerialNumber=ruckusSystemStatsSerialNumber)
mib_builder = mibBuilder (integer, object_identifier, octet_string) = mibBuilder.importSymbols('ASN1', 'Integer', 'ObjectIdentifier', 'OctetString') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_intersection, constraints_union, single_value_constraint, value_range_constraint, value_size_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'ConstraintsUnion', 'SingleValueConstraint', 'ValueRangeConstraint', 'ValueSizeConstraint') (interface_index, if_index) = mibBuilder.importSymbols('IF-MIB', 'InterfaceIndex', 'ifIndex') (ruckus_scg_system_module,) = mibBuilder.importSymbols('RUCKUS-ROOT-MIB', 'ruckusSCGSystemModule') (object_group,) = mibBuilder.importSymbols('SNMPv2-CONF', 'ObjectGroup') (bits, counter32, counter64, integer32, integer32, ip_address, module_identity, mib_identifier, mib_scalar, mib_table, mib_table_row, mib_table_column, time_ticks, unsigned32) = mibBuilder.importSymbols('SNMPv2-SMI', 'Bits', 'Counter32', 'Counter64', 'Integer32', 'Integer32', 'IpAddress', 'ModuleIdentity', 'MibIdentifier', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'TimeTicks', 'Unsigned32') (display_string, mac_address, row_status, truth_value) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'MacAddress', 'RowStatus', 'TruthValue') ruckus_system_mib = module_identity((1, 3, 6, 1, 4, 1, 25053, 1, 3, 1, 1)).setRevisions(('2014-05-19 11:00',)) if mibBuilder.loadTexts: ruckusSystemMIB.setOrganization('Ruckus Wireless, Inc.') if mibBuilder.loadTexts: ruckusSystemMIB.setContactInfo('Ruckus Wireless, Inc.\n\n350 West Java Dr.\nSunnyvale, CA 94089\nUSA\n\nT: +1 (650) 265-4200\nF: +1 (408) 738-2065\nEMail: info@ruckuswireless.com\nWeb: www.ruckuswireless.com') if mibBuilder.loadTexts: ruckusSystemMIB.setDescription('Ruckus System mib') ruckus_system_objects = mib_identifier((1, 3, 6, 1, 4, 1, 25053, 1, 3, 1, 1, 1)) ruckus_system_stats = mib_identifier((1, 3, 6, 1, 4, 1, 25053, 1, 3, 1, 1, 1, 15)) ruckus_system_stats_num_ap = mib_scalar((1, 3, 6, 1, 4, 1, 25053, 1, 3, 1, 1, 1, 15, 1), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ruckusSystemStatsNumAP.setDescription('Number of AP') ruckus_system_stats_num_sta = mib_scalar((1, 3, 6, 1, 4, 1, 25053, 1, 3, 1, 1, 1, 15, 2), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ruckusSystemStatsNumSta.setDescription('Number of associated client devices') ruckus_system_stats_wlan_total_rx_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 25053, 1, 3, 1, 1, 1, 15, 5), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: ruckusSystemStatsWLANTotalRxPkts.setDescription('Total received packets of wireless interfaces') ruckus_system_stats_wlan_total_rx_bytes = mib_scalar((1, 3, 6, 1, 4, 1, 25053, 1, 3, 1, 1, 1, 15, 6), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: ruckusSystemStatsWLANTotalRxBytes.setDescription('Total received bytes of wireless interfaces') ruckus_system_stats_wlan_total_rx_multicast = mib_scalar((1, 3, 6, 1, 4, 1, 25053, 1, 3, 1, 1, 1, 15, 7), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: ruckusSystemStatsWLANTotalRxMulticast.setDescription('Total received multicast packets of wireless interfaces') ruckus_system_stats_wlan_total_tx_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 25053, 1, 3, 1, 1, 1, 15, 8), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: ruckusSystemStatsWLANTotalTxPkts.setDescription('Total transmitted packets of wireless interfaces') ruckus_system_stats_wlan_total_tx_bytes = mib_scalar((1, 3, 6, 1, 4, 1, 25053, 1, 3, 1, 1, 1, 15, 9), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: ruckusSystemStatsWLANTotalTxBytes.setDescription('Total transmitted bytes of wireless interfaces') ruckus_system_stats_wlan_total_tx_multicast = mib_scalar((1, 3, 6, 1, 4, 1, 25053, 1, 3, 1, 1, 1, 15, 10), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: ruckusSystemStatsWLANTotalTxMulticast.setDescription('Total transmitted multicast packets of wireless interfaces') ruckus_system_stats_wlan_total_tx_fail = mib_scalar((1, 3, 6, 1, 4, 1, 25053, 1, 3, 1, 1, 1, 15, 11), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: ruckusSystemStatsWLANTotalTxFail.setDescription('Total transmitted fail packets of wireless interfaces') ruckus_system_stats_wlan_total_tx_retry = mib_scalar((1, 3, 6, 1, 4, 1, 25053, 1, 3, 1, 1, 1, 15, 12), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: ruckusSystemStatsWLANTotalTxRetry.setDescription('Total transmitted retry packets of wireless interfaces') ruckus_system_stats_serial_number = mib_scalar((1, 3, 6, 1, 4, 1, 25053, 1, 3, 1, 1, 1, 15, 13), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: ruckusSystemStatsSerialNumber.setDescription('Serial Number') mibBuilder.exportSymbols('RUCKUS-SCG-SYSTEM-MIB', PYSNMP_MODULE_ID=ruckusSystemMIB) mibBuilder.exportSymbols('RUCKUS-SCG-SYSTEM-MIB', ruckusSystemMIB=ruckusSystemMIB, ruckusSystemObjects=ruckusSystemObjects, ruckusSystemStats=ruckusSystemStats, ruckusSystemStatsNumAP=ruckusSystemStatsNumAP, ruckusSystemStatsNumSta=ruckusSystemStatsNumSta, ruckusSystemStatsWLANTotalRxPkts=ruckusSystemStatsWLANTotalRxPkts, ruckusSystemStatsWLANTotalRxBytes=ruckusSystemStatsWLANTotalRxBytes, ruckusSystemStatsWLANTotalRxMulticast=ruckusSystemStatsWLANTotalRxMulticast, ruckusSystemStatsWLANTotalTxPkts=ruckusSystemStatsWLANTotalTxPkts, ruckusSystemStatsWLANTotalTxBytes=ruckusSystemStatsWLANTotalTxBytes, ruckusSystemStatsWLANTotalTxMulticast=ruckusSystemStatsWLANTotalTxMulticast, ruckusSystemStatsWLANTotalTxFail=ruckusSystemStatsWLANTotalTxFail, ruckusSystemStatsWLANTotalTxRetry=ruckusSystemStatsWLANTotalTxRetry, ruckusSystemStatsSerialNumber=ruckusSystemStatsSerialNumber)
def accumulate_left(func, acc, collection): if len(collection) == 0: return acc return accumulate_left(func, func(acc, collection[0]), collection[1:]) def accumulate_right(func, acc, collection): if len(collection) == 0: return acc return func(collection[0], accumulate_right(func, acc, collection[1:]))
def accumulate_left(func, acc, collection): if len(collection) == 0: return acc return accumulate_left(func, func(acc, collection[0]), collection[1:]) def accumulate_right(func, acc, collection): if len(collection) == 0: return acc return func(collection[0], accumulate_right(func, acc, collection[1:]))
SCHEME = 'wss' HOSTS = ['localhost'] PORT = 8183 MESSAGE_SERIALIZER = 'goblin.driver.GraphSONMessageSerializer'
scheme = 'wss' hosts = ['localhost'] port = 8183 message_serializer = 'goblin.driver.GraphSONMessageSerializer'
TILEMAP = { "#": "pavement_1", "%": "pavement_2", " ": "road", "=": "road", "C": "road_corner", "T": "road_tint1", "&": "pavement_1", # precinct "$": "precinct_path", "E": "precinct_path_alt", "O": "ballot_box" } NO_ROUTING_TILES = [ "#", "%", "&" ] SELECTIVE_ROUTING_TILES = [ "$" ]
tilemap = {'#': 'pavement_1', '%': 'pavement_2', ' ': 'road', '=': 'road', 'C': 'road_corner', 'T': 'road_tint1', '&': 'pavement_1', '$': 'precinct_path', 'E': 'precinct_path_alt', 'O': 'ballot_box'} no_routing_tiles = ['#', '%', '&'] selective_routing_tiles = ['$']
'''A very simple program, showing how short a Python program can be! Authors: ___, ___ ''' print('Hello world!') #This is a stupid comment after the # mark
"""A very simple program, showing how short a Python program can be! Authors: ___, ___ """ print('Hello world!')
"Jest testing macro that can compile typescript files for testing as well" load("@npm//@bazel/typescript:index.bzl", "ts_library") load("@build_bazel_rules_nodejs//:index.bzl", "nodejs_binary", "nodejs_test") def jest_test( srcs, ts_config, snapshots = [], jest_config = None, # jest does not understand only commonjs the default would be umd devmode_module = "commonjs", setup_file = None, name = "test", deps = [], data = [], **kwargs): """Jest testing rule that compiles the typescript sources and run jest tests Args: srcs: The sources passed ts_config: The typescript config for compiling typescript files snapshots: The snapshots used in tests jest_config: The jest configuration file devmode_module: The jest compile devmode module setup_file: The jest setup file name: The name of the test rule snapshots: List of snapshot files deps: The dependencies that are needed for the test data: Additional data for the test_run **kwargs: Keyword arguments """ # sources needed for compiling compile_srcs = srcs dependencies = [ "//tools/bazel_rules/jest", ":%s_compile" % name, "@npm//identity-obj-proxy", "@npm//lodash-es:lodash-es__umd", ] + deps + snapshots + srcs # Add the srcs as it is needed to resolve the rootpath templated_args = ["--files=\"$(rootpath %s)\"" % s for s in srcs] # if we have a setup file than add it if setup_file: compile_srcs.append(setup_file) dependencies.append(setup_file) templated_args.append("--setupFile $(rootpath %s)" % setup_file) # if we have a config file than add it if jest_config: dependencies.append(jest_config) templated_args.append("--config $(rootpath %s)" % jest_config) templated_args.extend(["--snapshot-files=\"$(rootpath %s)\"" % s for s in snapshots]) templated_args.extend(["--suite=\"%s\"" % (name)]) # compile the spec files first ts_library( name = name + "_compile", srcs = compile_srcs, tsconfig = ts_config, devmode_module = devmode_module, deps = [ "@npm//tslib", "@npm//@types/jest", "@npm//jest-junit", ] + deps, ) nodejs_test( name = name, testonly = True, data = dependencies + data, entry_point = "//tools/bazel_rules/jest:src/jest-runner.ts", templated_args = templated_args, **kwargs ) nodejs_binary( name = "%s.update" % name, data = dependencies + data, entry_point = "//tools/bazel_rules/jest:src/jest-runner.ts", templated_args = templated_args + ["--update"], **kwargs )
"""Jest testing macro that can compile typescript files for testing as well""" load('@npm//@bazel/typescript:index.bzl', 'ts_library') load('@build_bazel_rules_nodejs//:index.bzl', 'nodejs_binary', 'nodejs_test') def jest_test(srcs, ts_config, snapshots=[], jest_config=None, devmode_module='commonjs', setup_file=None, name='test', deps=[], data=[], **kwargs): """Jest testing rule that compiles the typescript sources and run jest tests Args: srcs: The sources passed ts_config: The typescript config for compiling typescript files snapshots: The snapshots used in tests jest_config: The jest configuration file devmode_module: The jest compile devmode module setup_file: The jest setup file name: The name of the test rule snapshots: List of snapshot files deps: The dependencies that are needed for the test data: Additional data for the test_run **kwargs: Keyword arguments """ compile_srcs = srcs dependencies = ['//tools/bazel_rules/jest', ':%s_compile' % name, '@npm//identity-obj-proxy', '@npm//lodash-es:lodash-es__umd'] + deps + snapshots + srcs templated_args = ['--files="$(rootpath %s)"' % s for s in srcs] if setup_file: compile_srcs.append(setup_file) dependencies.append(setup_file) templated_args.append('--setupFile $(rootpath %s)' % setup_file) if jest_config: dependencies.append(jest_config) templated_args.append('--config $(rootpath %s)' % jest_config) templated_args.extend(['--snapshot-files="$(rootpath %s)"' % s for s in snapshots]) templated_args.extend(['--suite="%s"' % name]) ts_library(name=name + '_compile', srcs=compile_srcs, tsconfig=ts_config, devmode_module=devmode_module, deps=['@npm//tslib', '@npm//@types/jest', '@npm//jest-junit'] + deps) nodejs_test(name=name, testonly=True, data=dependencies + data, entry_point='//tools/bazel_rules/jest:src/jest-runner.ts', templated_args=templated_args, **kwargs) nodejs_binary(name='%s.update' % name, data=dependencies + data, entry_point='//tools/bazel_rules/jest:src/jest-runner.ts', templated_args=templated_args + ['--update'], **kwargs)
# # PySNMP MIB module HPN-ICF-PBR-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HPN-ICF-PBR-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 19:28:32 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsIntersection, ValueSizeConstraint, SingleValueConstraint, ValueRangeConstraint, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ValueSizeConstraint", "SingleValueConstraint", "ValueRangeConstraint", "ConstraintsUnion") hpnicfCommon, = mibBuilder.importSymbols("HPN-ICF-OID-MIB", "hpnicfCommon") ifIndex, = mibBuilder.importSymbols("IF-MIB", "ifIndex") InetAddressType, InetAddress = mibBuilder.importSymbols("INET-ADDRESS-MIB", "InetAddressType", "InetAddress") ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup") Counter32, MibIdentifier, TimeTicks, NotificationType, iso, Bits, Gauge32, Unsigned32, Integer32, IpAddress, ObjectIdentity, MibScalar, MibTable, MibTableRow, MibTableColumn, Counter64, ModuleIdentity = mibBuilder.importSymbols("SNMPv2-SMI", "Counter32", "MibIdentifier", "TimeTicks", "NotificationType", "iso", "Bits", "Gauge32", "Unsigned32", "Integer32", "IpAddress", "ObjectIdentity", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter64", "ModuleIdentity") DisplayString, RowStatus, TextualConvention, TruthValue = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "RowStatus", "TextualConvention", "TruthValue") hpnicfPBR = ModuleIdentity((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113)) hpnicfPBR.setRevisions(('2010-12-10 15:58',)) if mibBuilder.loadTexts: hpnicfPBR.setLastUpdated('201012101558Z') if mibBuilder.loadTexts: hpnicfPBR.setOrganization('') hpnicfPBRObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 1)) hpnicfPBRGlobal = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 1, 1)) hpnicfPBRNexthopTrapEnabled = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 1, 1, 1), TruthValue().clone('true')).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfPBRNexthopTrapEnabled.setStatus('current') hpnicfPBRLocalPolicy = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 1, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 19))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfPBRLocalPolicy.setStatus('current') hpnicfPBRIPv6NexthopTrapEnabled = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 1, 1, 3), TruthValue().clone('true')).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfPBRIPv6NexthopTrapEnabled.setStatus('current') hpnicfPBRMibTrap = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 1, 2)) hpnicfPBRTrapObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 1, 2, 1)) hpnicfPBRNexthopAddrType = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 1, 2, 1, 1), InetAddressType()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hpnicfPBRNexthopAddrType.setStatus('current') hpnicfPBRNexthopAddr = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 1, 2, 1, 2), InetAddress()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hpnicfPBRNexthopAddr.setStatus('current') hpnicfPBRTraps = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 1, 2, 2)) hpnicfPBRTrapsPrefix = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 1, 2, 2, 0)) hpnicfPBRNexthopFailedTrap = NotificationType((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 1, 2, 2, 0, 1)).setObjects(("HPN-ICF-PBR-MIB", "hpnicfPBRNexthopAddrType"), ("HPN-ICF-PBR-MIB", "hpnicfPBRNexthopAddr")) if mibBuilder.loadTexts: hpnicfPBRNexthopFailedTrap.setStatus('current') hpnicfPBRTables = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2)) hpnicfPBRMibPolicyNodeTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 1), ) if mibBuilder.loadTexts: hpnicfPBRMibPolicyNodeTable.setStatus('current') hpnicfPBRMibPolicyNodeEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 1, 1), ).setIndexNames((0, "HPN-ICF-PBR-MIB", "hpnicfPBRMibPolicyNodeAddrType"), (0, "HPN-ICF-PBR-MIB", "hpnicfPBRMibPolicyName"), (0, "HPN-ICF-PBR-MIB", "hpnicfPBRMibPolicyNodeId")) if mibBuilder.loadTexts: hpnicfPBRMibPolicyNodeEntry.setStatus('current') hpnicfPBRMibPolicyNodeAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 1, 1, 1), InetAddressType()) if mibBuilder.loadTexts: hpnicfPBRMibPolicyNodeAddrType.setStatus('current') hpnicfPBRMibPolicyName = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 1, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 19))) if mibBuilder.loadTexts: hpnicfPBRMibPolicyName.setStatus('current') hpnicfPBRMibPolicyNodeId = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))) if mibBuilder.loadTexts: hpnicfPBRMibPolicyNodeId.setStatus('current') hpnicfPBRMibPolicyNodeMode = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 1, 1, 4), TruthValue().clone('true')).setMaxAccess("readcreate") if mibBuilder.loadTexts: hpnicfPBRMibPolicyNodeMode.setStatus('current') hpnicfPBRMibPolicyNodeRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 1, 1, 5), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hpnicfPBRMibPolicyNodeRowStatus.setStatus('current') hpnicfPBRMibIfPolicyTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 2), ) if mibBuilder.loadTexts: hpnicfPBRMibIfPolicyTable.setStatus('current') hpnicfPBRMibIfPolicyEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 2, 1), ).setIndexNames((0, "HPN-ICF-PBR-MIB", "hpnicfPBRMibPolicyAddressType"), (0, "IF-MIB", "ifIndex")) if mibBuilder.loadTexts: hpnicfPBRMibIfPolicyEntry.setStatus('current') hpnicfPBRMibPolicyAddressType = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 2, 1, 1), InetAddressType()) if mibBuilder.loadTexts: hpnicfPBRMibPolicyAddressType.setStatus('current') hpnicfPBRMibAppliedPolicyName = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 19))).setMaxAccess("readcreate") if mibBuilder.loadTexts: hpnicfPBRMibAppliedPolicyName.setStatus('current') hpnicfPBRMibIfPolicyRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 2, 1, 3), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hpnicfPBRMibIfPolicyRowStatus.setStatus('current') hpnicfPBRMibMatchAclTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 3), ) if mibBuilder.loadTexts: hpnicfPBRMibMatchAclTable.setStatus('current') hpnicfPBRMibMatchAclEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 3, 1), ).setIndexNames((0, "HPN-ICF-PBR-MIB", "hpnicfPBRMibPolicyNodeAddrType"), (0, "HPN-ICF-PBR-MIB", "hpnicfPBRMibPolicyName"), (0, "HPN-ICF-PBR-MIB", "hpnicfPBRMibPolicyNodeId")) if mibBuilder.loadTexts: hpnicfPBRMibMatchAclEntry.setStatus('current') hpnicfPBRMibAclGroupId = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 3, 1, 1), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfPBRMibAclGroupId.setStatus('current') hpnicfPBRMibApplyPrecedenceTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 4), ) if mibBuilder.loadTexts: hpnicfPBRMibApplyPrecedenceTable.setStatus('current') hpnicfPBRMibApplyPrecedenceEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 4, 1), ).setIndexNames((0, "HPN-ICF-PBR-MIB", "hpnicfPBRMibPolicyNodeAddrType"), (0, "HPN-ICF-PBR-MIB", "hpnicfPBRMibPolicyName"), (0, "HPN-ICF-PBR-MIB", "hpnicfPBRMibPolicyNodeId")) if mibBuilder.loadTexts: hpnicfPBRMibApplyPrecedenceEntry.setStatus('current') hpnicfPBRMibApplyPrecedenceValue = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 4, 1, 1), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfPBRMibApplyPrecedenceValue.setStatus('current') hpnicfPBRMibApplyNexthopTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 5), ) if mibBuilder.loadTexts: hpnicfPBRMibApplyNexthopTable.setStatus('current') hpnicfPBRMibApplyNexthopEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 5, 1), ).setIndexNames((0, "HPN-ICF-PBR-MIB", "hpnicfPBRMibPolicyNodeAddrType"), (0, "HPN-ICF-PBR-MIB", "hpnicfPBRMibPolicyName"), (0, "HPN-ICF-PBR-MIB", "hpnicfPBRMibPolicyNodeId"), (0, "HPN-ICF-PBR-MIB", "hpnicfPBRMibApplyNexthopIndex")) if mibBuilder.loadTexts: hpnicfPBRMibApplyNexthopEntry.setStatus('current') hpnicfPBRMibApplyNexthopIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 5, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))) if mibBuilder.loadTexts: hpnicfPBRMibApplyNexthopIndex.setStatus('current') hpnicfPBRMibApplyNexthopVpnName = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 5, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 31))).setMaxAccess("readcreate") if mibBuilder.loadTexts: hpnicfPBRMibApplyNexthopVpnName.setStatus('current') hpnicfPBRMibApplyNexthopAddressType = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 5, 1, 3), InetAddressType()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hpnicfPBRMibApplyNexthopAddressType.setStatus('current') hpnicfPBRMibApplyNexthopAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 5, 1, 4), InetAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hpnicfPBRMibApplyNexthopAddress.setStatus('current') hpnicfPBRMibApplyNexthopTrackId = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 5, 1, 5), Integer32()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hpnicfPBRMibApplyNexthopTrackId.setStatus('current') hpnicfPBRMibApplyNexthopDirect = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 5, 1, 6), TruthValue().clone('false')).setMaxAccess("readcreate") if mibBuilder.loadTexts: hpnicfPBRMibApplyNexthopDirect.setStatus('current') hpnicfPBRMibApplyNexthopRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 5, 1, 7), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hpnicfPBRMibApplyNexthopRowStatus.setStatus('current') hpnicfPBRMibApplyDefaultNexthopTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 6), ) if mibBuilder.loadTexts: hpnicfPBRMibApplyDefaultNexthopTable.setStatus('current') hpnicfPBRMibApplyDefaultNexthopEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 6, 1), ).setIndexNames((0, "HPN-ICF-PBR-MIB", "hpnicfPBRMibPolicyNodeAddrType"), (0, "HPN-ICF-PBR-MIB", "hpnicfPBRMibPolicyName"), (0, "HPN-ICF-PBR-MIB", "hpnicfPBRMibPolicyNodeId"), (0, "HPN-ICF-PBR-MIB", "hpnicfPBRMibApplyDefaultNexthopIndex")) if mibBuilder.loadTexts: hpnicfPBRMibApplyDefaultNexthopEntry.setStatus('current') hpnicfPBRMibApplyDefaultNexthopIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 6, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))) if mibBuilder.loadTexts: hpnicfPBRMibApplyDefaultNexthopIndex.setStatus('current') hpnicfPBRMibApplyDefaultNexthopVpnName = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 6, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 31))).setMaxAccess("readcreate") if mibBuilder.loadTexts: hpnicfPBRMibApplyDefaultNexthopVpnName.setStatus('current') hpnicfPBRMibApplyDefaultNexthopAddressType = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 6, 1, 3), InetAddressType()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hpnicfPBRMibApplyDefaultNexthopAddressType.setStatus('current') hpnicfPBRMibApplyDefaultNexthopAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 6, 1, 4), InetAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hpnicfPBRMibApplyDefaultNexthopAddress.setStatus('current') hpnicfPBRMibApplyDefaultNexthopTrackId = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 6, 1, 5), Integer32()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hpnicfPBRMibApplyDefaultNexthopTrackId.setStatus('current') hpnicfPBRMibApplyDefaultNexthopDirect = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 6, 1, 6), TruthValue().clone('false')).setMaxAccess("readcreate") if mibBuilder.loadTexts: hpnicfPBRMibApplyDefaultNexthopDirect.setStatus('current') hpnicfPBRMibApplyDefaultNexthopRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 6, 1, 7), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hpnicfPBRMibApplyDefaultNexthopRowStatus.setStatus('current') mibBuilder.exportSymbols("HPN-ICF-PBR-MIB", hpnicfPBRMibPolicyNodeMode=hpnicfPBRMibPolicyNodeMode, hpnicfPBRMibPolicyNodeRowStatus=hpnicfPBRMibPolicyNodeRowStatus, hpnicfPBRTraps=hpnicfPBRTraps, hpnicfPBRMibIfPolicyRowStatus=hpnicfPBRMibIfPolicyRowStatus, hpnicfPBRMibPolicyNodeId=hpnicfPBRMibPolicyNodeId, hpnicfPBRMibPolicyNodeEntry=hpnicfPBRMibPolicyNodeEntry, hpnicfPBRMibApplyDefaultNexthopDirect=hpnicfPBRMibApplyDefaultNexthopDirect, hpnicfPBRMibApplyNexthopAddress=hpnicfPBRMibApplyNexthopAddress, hpnicfPBR=hpnicfPBR, hpnicfPBRGlobal=hpnicfPBRGlobal, hpnicfPBRMibTrap=hpnicfPBRMibTrap, hpnicfPBRMibMatchAclTable=hpnicfPBRMibMatchAclTable, hpnicfPBRNexthopAddr=hpnicfPBRNexthopAddr, hpnicfPBRMibApplyDefaultNexthopVpnName=hpnicfPBRMibApplyDefaultNexthopVpnName, hpnicfPBRNexthopFailedTrap=hpnicfPBRNexthopFailedTrap, PYSNMP_MODULE_ID=hpnicfPBR, hpnicfPBRMibMatchAclEntry=hpnicfPBRMibMatchAclEntry, hpnicfPBRMibApplyNexthopVpnName=hpnicfPBRMibApplyNexthopVpnName, hpnicfPBRMibApplyNexthopAddressType=hpnicfPBRMibApplyNexthopAddressType, hpnicfPBRMibApplyNexthopEntry=hpnicfPBRMibApplyNexthopEntry, hpnicfPBRTrapObjects=hpnicfPBRTrapObjects, hpnicfPBRMibApplyNexthopTable=hpnicfPBRMibApplyNexthopTable, hpnicfPBRMibApplyDefaultNexthopRowStatus=hpnicfPBRMibApplyDefaultNexthopRowStatus, hpnicfPBRMibApplyPrecedenceValue=hpnicfPBRMibApplyPrecedenceValue, hpnicfPBRMibPolicyNodeTable=hpnicfPBRMibPolicyNodeTable, hpnicfPBRMibIfPolicyEntry=hpnicfPBRMibIfPolicyEntry, hpnicfPBRMibApplyDefaultNexthopAddressType=hpnicfPBRMibApplyDefaultNexthopAddressType, hpnicfPBRNexthopTrapEnabled=hpnicfPBRNexthopTrapEnabled, hpnicfPBRMibAppliedPolicyName=hpnicfPBRMibAppliedPolicyName, hpnicfPBRMibApplyPrecedenceTable=hpnicfPBRMibApplyPrecedenceTable, hpnicfPBRObjects=hpnicfPBRObjects, hpnicfPBRMibApplyDefaultNexthopEntry=hpnicfPBRMibApplyDefaultNexthopEntry, hpnicfPBRTrapsPrefix=hpnicfPBRTrapsPrefix, hpnicfPBRNexthopAddrType=hpnicfPBRNexthopAddrType, hpnicfPBRTables=hpnicfPBRTables, hpnicfPBRMibIfPolicyTable=hpnicfPBRMibIfPolicyTable, hpnicfPBRMibApplyNexthopRowStatus=hpnicfPBRMibApplyNexthopRowStatus, hpnicfPBRMibApplyDefaultNexthopAddress=hpnicfPBRMibApplyDefaultNexthopAddress, hpnicfPBRMibAclGroupId=hpnicfPBRMibAclGroupId, hpnicfPBRMibApplyDefaultNexthopIndex=hpnicfPBRMibApplyDefaultNexthopIndex, hpnicfPBRMibPolicyAddressType=hpnicfPBRMibPolicyAddressType, hpnicfPBRMibApplyNexthopTrackId=hpnicfPBRMibApplyNexthopTrackId, hpnicfPBRMibApplyNexthopDirect=hpnicfPBRMibApplyNexthopDirect, hpnicfPBRMibApplyNexthopIndex=hpnicfPBRMibApplyNexthopIndex, hpnicfPBRMibApplyDefaultNexthopTrackId=hpnicfPBRMibApplyDefaultNexthopTrackId, hpnicfPBRMibPolicyNodeAddrType=hpnicfPBRMibPolicyNodeAddrType, hpnicfPBRMibApplyPrecedenceEntry=hpnicfPBRMibApplyPrecedenceEntry, hpnicfPBRMibPolicyName=hpnicfPBRMibPolicyName, hpnicfPBRIPv6NexthopTrapEnabled=hpnicfPBRIPv6NexthopTrapEnabled, hpnicfPBRMibApplyDefaultNexthopTable=hpnicfPBRMibApplyDefaultNexthopTable, hpnicfPBRLocalPolicy=hpnicfPBRLocalPolicy)
(object_identifier, integer, octet_string) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'Integer', 'OctetString') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_intersection, value_size_constraint, single_value_constraint, value_range_constraint, constraints_union) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'ValueSizeConstraint', 'SingleValueConstraint', 'ValueRangeConstraint', 'ConstraintsUnion') (hpnicf_common,) = mibBuilder.importSymbols('HPN-ICF-OID-MIB', 'hpnicfCommon') (if_index,) = mibBuilder.importSymbols('IF-MIB', 'ifIndex') (inet_address_type, inet_address) = mibBuilder.importSymbols('INET-ADDRESS-MIB', 'InetAddressType', 'InetAddress') (module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup') (counter32, mib_identifier, time_ticks, notification_type, iso, bits, gauge32, unsigned32, integer32, ip_address, object_identity, mib_scalar, mib_table, mib_table_row, mib_table_column, counter64, module_identity) = mibBuilder.importSymbols('SNMPv2-SMI', 'Counter32', 'MibIdentifier', 'TimeTicks', 'NotificationType', 'iso', 'Bits', 'Gauge32', 'Unsigned32', 'Integer32', 'IpAddress', 'ObjectIdentity', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Counter64', 'ModuleIdentity') (display_string, row_status, textual_convention, truth_value) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'RowStatus', 'TextualConvention', 'TruthValue') hpnicf_pbr = module_identity((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113)) hpnicfPBR.setRevisions(('2010-12-10 15:58',)) if mibBuilder.loadTexts: hpnicfPBR.setLastUpdated('201012101558Z') if mibBuilder.loadTexts: hpnicfPBR.setOrganization('') hpnicf_pbr_objects = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 1)) hpnicf_pbr_global = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 1, 1)) hpnicf_pbr_nexthop_trap_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 1, 1, 1), truth_value().clone('true')).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfPBRNexthopTrapEnabled.setStatus('current') hpnicf_pbr_local_policy = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 1, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 19))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfPBRLocalPolicy.setStatus('current') hpnicf_pbri_pv6_nexthop_trap_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 1, 1, 3), truth_value().clone('true')).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfPBRIPv6NexthopTrapEnabled.setStatus('current') hpnicf_pbr_mib_trap = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 1, 2)) hpnicf_pbr_trap_objects = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 1, 2, 1)) hpnicf_pbr_nexthop_addr_type = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 1, 2, 1, 1), inet_address_type()).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: hpnicfPBRNexthopAddrType.setStatus('current') hpnicf_pbr_nexthop_addr = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 1, 2, 1, 2), inet_address()).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: hpnicfPBRNexthopAddr.setStatus('current') hpnicf_pbr_traps = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 1, 2, 2)) hpnicf_pbr_traps_prefix = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 1, 2, 2, 0)) hpnicf_pbr_nexthop_failed_trap = notification_type((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 1, 2, 2, 0, 1)).setObjects(('HPN-ICF-PBR-MIB', 'hpnicfPBRNexthopAddrType'), ('HPN-ICF-PBR-MIB', 'hpnicfPBRNexthopAddr')) if mibBuilder.loadTexts: hpnicfPBRNexthopFailedTrap.setStatus('current') hpnicf_pbr_tables = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2)) hpnicf_pbr_mib_policy_node_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 1)) if mibBuilder.loadTexts: hpnicfPBRMibPolicyNodeTable.setStatus('current') hpnicf_pbr_mib_policy_node_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 1, 1)).setIndexNames((0, 'HPN-ICF-PBR-MIB', 'hpnicfPBRMibPolicyNodeAddrType'), (0, 'HPN-ICF-PBR-MIB', 'hpnicfPBRMibPolicyName'), (0, 'HPN-ICF-PBR-MIB', 'hpnicfPBRMibPolicyNodeId')) if mibBuilder.loadTexts: hpnicfPBRMibPolicyNodeEntry.setStatus('current') hpnicf_pbr_mib_policy_node_addr_type = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 1, 1, 1), inet_address_type()) if mibBuilder.loadTexts: hpnicfPBRMibPolicyNodeAddrType.setStatus('current') hpnicf_pbr_mib_policy_name = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 1, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(1, 19))) if mibBuilder.loadTexts: hpnicfPBRMibPolicyName.setStatus('current') hpnicf_pbr_mib_policy_node_id = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 1, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))) if mibBuilder.loadTexts: hpnicfPBRMibPolicyNodeId.setStatus('current') hpnicf_pbr_mib_policy_node_mode = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 1, 1, 4), truth_value().clone('true')).setMaxAccess('readcreate') if mibBuilder.loadTexts: hpnicfPBRMibPolicyNodeMode.setStatus('current') hpnicf_pbr_mib_policy_node_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 1, 1, 5), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: hpnicfPBRMibPolicyNodeRowStatus.setStatus('current') hpnicf_pbr_mib_if_policy_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 2)) if mibBuilder.loadTexts: hpnicfPBRMibIfPolicyTable.setStatus('current') hpnicf_pbr_mib_if_policy_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 2, 1)).setIndexNames((0, 'HPN-ICF-PBR-MIB', 'hpnicfPBRMibPolicyAddressType'), (0, 'IF-MIB', 'ifIndex')) if mibBuilder.loadTexts: hpnicfPBRMibIfPolicyEntry.setStatus('current') hpnicf_pbr_mib_policy_address_type = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 2, 1, 1), inet_address_type()) if mibBuilder.loadTexts: hpnicfPBRMibPolicyAddressType.setStatus('current') hpnicf_pbr_mib_applied_policy_name = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 2, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(1, 19))).setMaxAccess('readcreate') if mibBuilder.loadTexts: hpnicfPBRMibAppliedPolicyName.setStatus('current') hpnicf_pbr_mib_if_policy_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 2, 1, 3), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: hpnicfPBRMibIfPolicyRowStatus.setStatus('current') hpnicf_pbr_mib_match_acl_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 3)) if mibBuilder.loadTexts: hpnicfPBRMibMatchAclTable.setStatus('current') hpnicf_pbr_mib_match_acl_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 3, 1)).setIndexNames((0, 'HPN-ICF-PBR-MIB', 'hpnicfPBRMibPolicyNodeAddrType'), (0, 'HPN-ICF-PBR-MIB', 'hpnicfPBRMibPolicyName'), (0, 'HPN-ICF-PBR-MIB', 'hpnicfPBRMibPolicyNodeId')) if mibBuilder.loadTexts: hpnicfPBRMibMatchAclEntry.setStatus('current') hpnicf_pbr_mib_acl_group_id = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 3, 1, 1), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfPBRMibAclGroupId.setStatus('current') hpnicf_pbr_mib_apply_precedence_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 4)) if mibBuilder.loadTexts: hpnicfPBRMibApplyPrecedenceTable.setStatus('current') hpnicf_pbr_mib_apply_precedence_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 4, 1)).setIndexNames((0, 'HPN-ICF-PBR-MIB', 'hpnicfPBRMibPolicyNodeAddrType'), (0, 'HPN-ICF-PBR-MIB', 'hpnicfPBRMibPolicyName'), (0, 'HPN-ICF-PBR-MIB', 'hpnicfPBRMibPolicyNodeId')) if mibBuilder.loadTexts: hpnicfPBRMibApplyPrecedenceEntry.setStatus('current') hpnicf_pbr_mib_apply_precedence_value = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 4, 1, 1), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfPBRMibApplyPrecedenceValue.setStatus('current') hpnicf_pbr_mib_apply_nexthop_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 5)) if mibBuilder.loadTexts: hpnicfPBRMibApplyNexthopTable.setStatus('current') hpnicf_pbr_mib_apply_nexthop_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 5, 1)).setIndexNames((0, 'HPN-ICF-PBR-MIB', 'hpnicfPBRMibPolicyNodeAddrType'), (0, 'HPN-ICF-PBR-MIB', 'hpnicfPBRMibPolicyName'), (0, 'HPN-ICF-PBR-MIB', 'hpnicfPBRMibPolicyNodeId'), (0, 'HPN-ICF-PBR-MIB', 'hpnicfPBRMibApplyNexthopIndex')) if mibBuilder.loadTexts: hpnicfPBRMibApplyNexthopEntry.setStatus('current') hpnicf_pbr_mib_apply_nexthop_index = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 5, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))) if mibBuilder.loadTexts: hpnicfPBRMibApplyNexthopIndex.setStatus('current') hpnicf_pbr_mib_apply_nexthop_vpn_name = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 5, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 31))).setMaxAccess('readcreate') if mibBuilder.loadTexts: hpnicfPBRMibApplyNexthopVpnName.setStatus('current') hpnicf_pbr_mib_apply_nexthop_address_type = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 5, 1, 3), inet_address_type()).setMaxAccess('readcreate') if mibBuilder.loadTexts: hpnicfPBRMibApplyNexthopAddressType.setStatus('current') hpnicf_pbr_mib_apply_nexthop_address = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 5, 1, 4), inet_address()).setMaxAccess('readcreate') if mibBuilder.loadTexts: hpnicfPBRMibApplyNexthopAddress.setStatus('current') hpnicf_pbr_mib_apply_nexthop_track_id = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 5, 1, 5), integer32()).setMaxAccess('readcreate') if mibBuilder.loadTexts: hpnicfPBRMibApplyNexthopTrackId.setStatus('current') hpnicf_pbr_mib_apply_nexthop_direct = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 5, 1, 6), truth_value().clone('false')).setMaxAccess('readcreate') if mibBuilder.loadTexts: hpnicfPBRMibApplyNexthopDirect.setStatus('current') hpnicf_pbr_mib_apply_nexthop_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 5, 1, 7), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: hpnicfPBRMibApplyNexthopRowStatus.setStatus('current') hpnicf_pbr_mib_apply_default_nexthop_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 6)) if mibBuilder.loadTexts: hpnicfPBRMibApplyDefaultNexthopTable.setStatus('current') hpnicf_pbr_mib_apply_default_nexthop_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 6, 1)).setIndexNames((0, 'HPN-ICF-PBR-MIB', 'hpnicfPBRMibPolicyNodeAddrType'), (0, 'HPN-ICF-PBR-MIB', 'hpnicfPBRMibPolicyName'), (0, 'HPN-ICF-PBR-MIB', 'hpnicfPBRMibPolicyNodeId'), (0, 'HPN-ICF-PBR-MIB', 'hpnicfPBRMibApplyDefaultNexthopIndex')) if mibBuilder.loadTexts: hpnicfPBRMibApplyDefaultNexthopEntry.setStatus('current') hpnicf_pbr_mib_apply_default_nexthop_index = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 6, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))) if mibBuilder.loadTexts: hpnicfPBRMibApplyDefaultNexthopIndex.setStatus('current') hpnicf_pbr_mib_apply_default_nexthop_vpn_name = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 6, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 31))).setMaxAccess('readcreate') if mibBuilder.loadTexts: hpnicfPBRMibApplyDefaultNexthopVpnName.setStatus('current') hpnicf_pbr_mib_apply_default_nexthop_address_type = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 6, 1, 3), inet_address_type()).setMaxAccess('readcreate') if mibBuilder.loadTexts: hpnicfPBRMibApplyDefaultNexthopAddressType.setStatus('current') hpnicf_pbr_mib_apply_default_nexthop_address = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 6, 1, 4), inet_address()).setMaxAccess('readcreate') if mibBuilder.loadTexts: hpnicfPBRMibApplyDefaultNexthopAddress.setStatus('current') hpnicf_pbr_mib_apply_default_nexthop_track_id = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 6, 1, 5), integer32()).setMaxAccess('readcreate') if mibBuilder.loadTexts: hpnicfPBRMibApplyDefaultNexthopTrackId.setStatus('current') hpnicf_pbr_mib_apply_default_nexthop_direct = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 6, 1, 6), truth_value().clone('false')).setMaxAccess('readcreate') if mibBuilder.loadTexts: hpnicfPBRMibApplyDefaultNexthopDirect.setStatus('current') hpnicf_pbr_mib_apply_default_nexthop_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 113, 2, 6, 1, 7), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: hpnicfPBRMibApplyDefaultNexthopRowStatus.setStatus('current') mibBuilder.exportSymbols('HPN-ICF-PBR-MIB', hpnicfPBRMibPolicyNodeMode=hpnicfPBRMibPolicyNodeMode, hpnicfPBRMibPolicyNodeRowStatus=hpnicfPBRMibPolicyNodeRowStatus, hpnicfPBRTraps=hpnicfPBRTraps, hpnicfPBRMibIfPolicyRowStatus=hpnicfPBRMibIfPolicyRowStatus, hpnicfPBRMibPolicyNodeId=hpnicfPBRMibPolicyNodeId, hpnicfPBRMibPolicyNodeEntry=hpnicfPBRMibPolicyNodeEntry, hpnicfPBRMibApplyDefaultNexthopDirect=hpnicfPBRMibApplyDefaultNexthopDirect, hpnicfPBRMibApplyNexthopAddress=hpnicfPBRMibApplyNexthopAddress, hpnicfPBR=hpnicfPBR, hpnicfPBRGlobal=hpnicfPBRGlobal, hpnicfPBRMibTrap=hpnicfPBRMibTrap, hpnicfPBRMibMatchAclTable=hpnicfPBRMibMatchAclTable, hpnicfPBRNexthopAddr=hpnicfPBRNexthopAddr, hpnicfPBRMibApplyDefaultNexthopVpnName=hpnicfPBRMibApplyDefaultNexthopVpnName, hpnicfPBRNexthopFailedTrap=hpnicfPBRNexthopFailedTrap, PYSNMP_MODULE_ID=hpnicfPBR, hpnicfPBRMibMatchAclEntry=hpnicfPBRMibMatchAclEntry, hpnicfPBRMibApplyNexthopVpnName=hpnicfPBRMibApplyNexthopVpnName, hpnicfPBRMibApplyNexthopAddressType=hpnicfPBRMibApplyNexthopAddressType, hpnicfPBRMibApplyNexthopEntry=hpnicfPBRMibApplyNexthopEntry, hpnicfPBRTrapObjects=hpnicfPBRTrapObjects, hpnicfPBRMibApplyNexthopTable=hpnicfPBRMibApplyNexthopTable, hpnicfPBRMibApplyDefaultNexthopRowStatus=hpnicfPBRMibApplyDefaultNexthopRowStatus, hpnicfPBRMibApplyPrecedenceValue=hpnicfPBRMibApplyPrecedenceValue, hpnicfPBRMibPolicyNodeTable=hpnicfPBRMibPolicyNodeTable, hpnicfPBRMibIfPolicyEntry=hpnicfPBRMibIfPolicyEntry, hpnicfPBRMibApplyDefaultNexthopAddressType=hpnicfPBRMibApplyDefaultNexthopAddressType, hpnicfPBRNexthopTrapEnabled=hpnicfPBRNexthopTrapEnabled, hpnicfPBRMibAppliedPolicyName=hpnicfPBRMibAppliedPolicyName, hpnicfPBRMibApplyPrecedenceTable=hpnicfPBRMibApplyPrecedenceTable, hpnicfPBRObjects=hpnicfPBRObjects, hpnicfPBRMibApplyDefaultNexthopEntry=hpnicfPBRMibApplyDefaultNexthopEntry, hpnicfPBRTrapsPrefix=hpnicfPBRTrapsPrefix, hpnicfPBRNexthopAddrType=hpnicfPBRNexthopAddrType, hpnicfPBRTables=hpnicfPBRTables, hpnicfPBRMibIfPolicyTable=hpnicfPBRMibIfPolicyTable, hpnicfPBRMibApplyNexthopRowStatus=hpnicfPBRMibApplyNexthopRowStatus, hpnicfPBRMibApplyDefaultNexthopAddress=hpnicfPBRMibApplyDefaultNexthopAddress, hpnicfPBRMibAclGroupId=hpnicfPBRMibAclGroupId, hpnicfPBRMibApplyDefaultNexthopIndex=hpnicfPBRMibApplyDefaultNexthopIndex, hpnicfPBRMibPolicyAddressType=hpnicfPBRMibPolicyAddressType, hpnicfPBRMibApplyNexthopTrackId=hpnicfPBRMibApplyNexthopTrackId, hpnicfPBRMibApplyNexthopDirect=hpnicfPBRMibApplyNexthopDirect, hpnicfPBRMibApplyNexthopIndex=hpnicfPBRMibApplyNexthopIndex, hpnicfPBRMibApplyDefaultNexthopTrackId=hpnicfPBRMibApplyDefaultNexthopTrackId, hpnicfPBRMibPolicyNodeAddrType=hpnicfPBRMibPolicyNodeAddrType, hpnicfPBRMibApplyPrecedenceEntry=hpnicfPBRMibApplyPrecedenceEntry, hpnicfPBRMibPolicyName=hpnicfPBRMibPolicyName, hpnicfPBRIPv6NexthopTrapEnabled=hpnicfPBRIPv6NexthopTrapEnabled, hpnicfPBRMibApplyDefaultNexthopTable=hpnicfPBRMibApplyDefaultNexthopTable, hpnicfPBRLocalPolicy=hpnicfPBRLocalPolicy)
{ "targets": [ { "target_name" : "dsfmt_js_nv", "sources" : [ "src/main.cc", "dSFMT-src-2.2.3/dSFMT.c" ], "include_dirs": [ 'dSFMT-src-2.2.3' ], 'cflags' : [ '-fexceptions' ], 'cflags_cc' : [ '-fexceptions' ], 'defines' : [ 'DSFMT_MEXP=19937' ] } ] }
{'targets': [{'target_name': 'dsfmt_js_nv', 'sources': ['src/main.cc', 'dSFMT-src-2.2.3/dSFMT.c'], 'include_dirs': ['dSFMT-src-2.2.3'], 'cflags': ['-fexceptions'], 'cflags_cc': ['-fexceptions'], 'defines': ['DSFMT_MEXP=19937']}]}
nomecompleto = str(input('digite seu nome completo: ')) print(nomecompleto.upper()) print(nomecompleto.lower()) print(nomecompleto.capitalize()) print(nomecompleto.title()) print(nomecompleto.split()) print(nomecompleto.swapcase()) print(nomecompleto.find("i")) print(nomecompleto.count('a', 0, 16)) print(len(nomecompleto)) print(nomecompleto[9]) print(nomecompleto[9:3]) print(nomecompleto[9:3:5]) print(nomecompleto[9::3]) print(nomecompleto.replace('dores', 'Bittencourt de Bourbon'))
nomecompleto = str(input('digite seu nome completo: ')) print(nomecompleto.upper()) print(nomecompleto.lower()) print(nomecompleto.capitalize()) print(nomecompleto.title()) print(nomecompleto.split()) print(nomecompleto.swapcase()) print(nomecompleto.find('i')) print(nomecompleto.count('a', 0, 16)) print(len(nomecompleto)) print(nomecompleto[9]) print(nomecompleto[9:3]) print(nomecompleto[9:3:5]) print(nomecompleto[9::3]) print(nomecompleto.replace('dores', 'Bittencourt de Bourbon'))
class Solution: # @param {integer[]} height # @return {integer} def largestRectangleArea(self, height): areas = {} sorted_height = sorted(list(set(height))) lh = len(height) for i in range(lh): h = height[lh - 1 - i] areas[lh - 1 - i] = {} j = 0 while sorted_height[j] <= h: hh = sorted_height[j] if i == 0: addition = 0 else: addition = areas[lh - i][hh] if hh in areas[lh - i] else 0 areas[lh - 1 - i][hh] = hh + addition max = 0 for i in range(lh): if areas[i][height[i]] > max: max = areas[i][height[i]] return max
class Solution: def largest_rectangle_area(self, height): areas = {} sorted_height = sorted(list(set(height))) lh = len(height) for i in range(lh): h = height[lh - 1 - i] areas[lh - 1 - i] = {} j = 0 while sorted_height[j] <= h: hh = sorted_height[j] if i == 0: addition = 0 else: addition = areas[lh - i][hh] if hh in areas[lh - i] else 0 areas[lh - 1 - i][hh] = hh + addition max = 0 for i in range(lh): if areas[i][height[i]] > max: max = areas[i][height[i]] return max
def bubbleSort(alist): for passnum in range(len(alist)-1,0,-1): for i in range(passnum): if alist[i]>alist[i+1]: temp = alist[i] alist[i] = alist[i+1] alist[i+1] = temp alist = [36,38,30,31,38,43,55,38,37,30,48,41,33,25,34,43,37,40,36] bubbleSort(alist) print(alist)
def bubble_sort(alist): for passnum in range(len(alist) - 1, 0, -1): for i in range(passnum): if alist[i] > alist[i + 1]: temp = alist[i] alist[i] = alist[i + 1] alist[i + 1] = temp alist = [36, 38, 30, 31, 38, 43, 55, 38, 37, 30, 48, 41, 33, 25, 34, 43, 37, 40, 36] bubble_sort(alist) print(alist)
class HanaError(Exception): pass class HanaPluginError(HanaError): pass class InvalidPluginsDirectory(HanaError): pass class PluginNotFoundError(HanaPluginError): pass
class Hanaerror(Exception): pass class Hanapluginerror(HanaError): pass class Invalidpluginsdirectory(HanaError): pass class Pluginnotfounderror(HanaPluginError): pass
def compress(orginial_list): compressed_list = [] mark_X = True if orginial_list == []: return 0 if len(orginial_list) == 1: return 1 if len(orginial_list) > 1: count = 1 for i in range(len(orginial_list) - 1): begin_pointer = i if orginial_list[i] == orginial_list[i + 1]: count = count + 1 if count > 2: orginial_list[i + 1] = 'X' print("count in greater than 2,", count) print(orginial_list) else: if count > 1: orginial_list[begin_pointer + 1] = count count = 1 # remaining_list = orginial_list[begin_pointer + 1:] if __name__ == '__main__': print(compress(["a", "a", "b", "b", "c", "c", "c"])) # print(compress(["a"])) # print(compress(["a", "a", "a", "a", "b", "b", "b", "b", "b", "b", "b", "b", "b"])) # print(compress([["a", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b"] # ]))
def compress(orginial_list): compressed_list = [] mark_x = True if orginial_list == []: return 0 if len(orginial_list) == 1: return 1 if len(orginial_list) > 1: count = 1 for i in range(len(orginial_list) - 1): begin_pointer = i if orginial_list[i] == orginial_list[i + 1]: count = count + 1 if count > 2: orginial_list[i + 1] = 'X' print('count in greater than 2,', count) print(orginial_list) elif count > 1: orginial_list[begin_pointer + 1] = count count = 1 if __name__ == '__main__': print(compress(['a', 'a', 'b', 'b', 'c', 'c', 'c']))
class No: def __init__(self, chave): self.chave = chave self.esquerdo = None self.direito = None self.pai = None
class No: def __init__(self, chave): self.chave = chave self.esquerdo = None self.direito = None self.pai = None
''' Largest Palindrome of two N-digit numbers given N = 1, 2, 3, 4 ''' def largePali4digit(): answer = 0 for i in range(9999, 1000, -1): for j in range(i, 1000, -1): k = i * j s = str(k) if s == s[::-1] and k > answer: return i, j def largePali3digit(): answer = 0 for i in range(999, 100, -1): for j in range(i, 100, -1): k = i * j s = str(k) if s == s[::-1] and k > answer: return i, j def largePali2digit(): answer = 0 for i in range(99, 10, -1): for j in range(i, 10, -1): k = i * j s = str(k) if s == s[::-1] and k > answer: return i, j def largePali1digit(): answer = 0 for i in range(9, 1, -1): for j in range(i, 1, -1): k = i * j s = str(k) if s == s[::-1] and k > answer: return i, j print(largePali3digit()) print(largePali2digit()) print(largePali1digit()) print(largePali4digit())
""" Largest Palindrome of two N-digit numbers given N = 1, 2, 3, 4 """ def large_pali4digit(): answer = 0 for i in range(9999, 1000, -1): for j in range(i, 1000, -1): k = i * j s = str(k) if s == s[::-1] and k > answer: return (i, j) def large_pali3digit(): answer = 0 for i in range(999, 100, -1): for j in range(i, 100, -1): k = i * j s = str(k) if s == s[::-1] and k > answer: return (i, j) def large_pali2digit(): answer = 0 for i in range(99, 10, -1): for j in range(i, 10, -1): k = i * j s = str(k) if s == s[::-1] and k > answer: return (i, j) def large_pali1digit(): answer = 0 for i in range(9, 1, -1): for j in range(i, 1, -1): k = i * j s = str(k) if s == s[::-1] and k > answer: return (i, j) print(large_pali3digit()) print(large_pali2digit()) print(large_pali1digit()) print(large_pali4digit())
""" Some helpful utility functions. """ __author__ = "Levi Borodenko" __copyright__ = "Levi Borodenko" __license__ = "mit" def is_positive_integer(obj, name: str) -> None: """Checks if obj is a positive integer and raises appropriate errors if it isn't. Arguments: obj: object to be checked. name (str): name of object for error messages. """ if type(obj) != int: raise ValueError(f"{name} should be an integer.") elif obj <= 0: raise ValueError(f"{name} should be an positive integer.")
""" Some helpful utility functions. """ __author__ = 'Levi Borodenko' __copyright__ = 'Levi Borodenko' __license__ = 'mit' def is_positive_integer(obj, name: str) -> None: """Checks if obj is a positive integer and raises appropriate errors if it isn't. Arguments: obj: object to be checked. name (str): name of object for error messages. """ if type(obj) != int: raise value_error(f'{name} should be an integer.') elif obj <= 0: raise value_error(f'{name} should be an positive integer.')
# the for loop works based on a Iterable object # Iterable object is capable of returning values one at a time # regular for loop for i in range(5): print(i) for i in [1, 3, 5, 7]: print(i) for c in 'Hello': print(c) for i in [(1,2), (3,4), (5,6)]: print(i) # unpack the turple for i, j in [(1,2), (3,4), (5,6)]: print(i, j) # loop through a dict d = {'a': 1, 'b': 2, 'c': 3, 'd': 4} for k in d.keys(): print(f'{k} -> {d.get(k)}') for k, v in d.items(): print(k, ':', v) # sometime we need to have a logical index of iterm from an Iterable # we can use 'enumerate' function for i, c in enumerate('Hello World!'): print(i, c)
for i in range(5): print(i) for i in [1, 3, 5, 7]: print(i) for c in 'Hello': print(c) for i in [(1, 2), (3, 4), (5, 6)]: print(i) for (i, j) in [(1, 2), (3, 4), (5, 6)]: print(i, j) d = {'a': 1, 'b': 2, 'c': 3, 'd': 4} for k in d.keys(): print(f'{k} -> {d.get(k)}') for (k, v) in d.items(): print(k, ':', v) for (i, c) in enumerate('Hello World!'): print(i, c)
#Write a short Pyton function that takes a positive integer n and returns #the sum of the squares of all the positive integers smaller than n. def sigmaSquareN(n): list =[] sum = 0 for i in range(1,n): sum += i**2 if sum < n: print ('Sigma of squrae %d=%d'%(i,sum)) list.append(sum) else: break return list n = int(input('Please input a positive integer')) if n >= 0: print(sigmaSquareN(n))
def sigma_square_n(n): list = [] sum = 0 for i in range(1, n): sum += i ** 2 if sum < n: print('Sigma of squrae %d=%d' % (i, sum)) list.append(sum) else: break return list n = int(input('Please input a positive integer')) if n >= 0: print(sigma_square_n(n))
class Solution: def minCostClimbingStairs(self, cost): """ :type cost: List[int] :rtype: int """ cost.append(0) n = len(cost) minArray = [0]*n minArray[0] = minArray[1] = 0 for i in range(2, n): minArray[i] = min(minArray[i-1] + cost[i-1], minArray[i-2] + cost[i-2]) print(minArray) return minArray[n-1]
class Solution: def min_cost_climbing_stairs(self, cost): """ :type cost: List[int] :rtype: int """ cost.append(0) n = len(cost) min_array = [0] * n minArray[0] = minArray[1] = 0 for i in range(2, n): minArray[i] = min(minArray[i - 1] + cost[i - 1], minArray[i - 2] + cost[i - 2]) print(minArray) return minArray[n - 1]
print('DOBRO TRIPLO RAIZ') n = int(input('Digite um numero: ')) print(f'DOBRO: {n * 2}') print(f'TRIPLO: {n * 3}') print(f'RAIZ: {n ** (1/2):.2f}')
print('DOBRO TRIPLO RAIZ') n = int(input('Digite um numero: ')) print(f'DOBRO: {n * 2}') print(f'TRIPLO: {n * 3}') print(f'RAIZ: {n ** (1 / 2):.2f}')
""" Write a Python program that randomizes 7 numbers and prints their sum total. If the sum is divisable by 7, also print the word "Boom" """
""" Write a Python program that randomizes 7 numbers and prints their sum total. If the sum is divisable by 7, also print the word "Boom" """
class NisDomain(basestring): """ NIS Domain """ @staticmethod def get_api_name(): return "nis-domain"
class Nisdomain(basestring): """ NIS Domain """ @staticmethod def get_api_name(): return 'nis-domain'
# Python3 program to find a triplet # that sum to a given value # returns true if there is triplet with # sum equal to 'sum' present in A[]. # Also, prints the triplet def find3Numbers(A, arr_size, sum): # Fix the first element as A[i] for i in range( 0, arr_size-2): # Fix the second element as A[j] for j in range(i + 1, arr_size-1): # Now look for the third number for k in range(j + 1, arr_size): if A[i] + A[j] + A[k] == sum: print("Triplet is", A[i], ", ", A[j], ", ", A[k]) return True # If we reach here, then no # triplet was found return False # Driver program to test above function A = [1, 4, 45, 6, 10, 8] sum = 22 arr_size = len(A) find3Numbers(A, arr_size, sum) # This code is contributed by Smitha Dinesh Semwal
def find3_numbers(A, arr_size, sum): for i in range(0, arr_size - 2): for j in range(i + 1, arr_size - 1): for k in range(j + 1, arr_size): if A[i] + A[j] + A[k] == sum: print('Triplet is', A[i], ', ', A[j], ', ', A[k]) return True return False a = [1, 4, 45, 6, 10, 8] sum = 22 arr_size = len(A) find3_numbers(A, arr_size, sum)
"""Local settings for the db.""" DATABASE = { 'drivername': 'postgres', 'host': 'localhost', 'port': '5432', 'username': 'postgres', 'password': 'wassup89', 'database': 'gardendb', }
"""Local settings for the db.""" database = {'drivername': 'postgres', 'host': 'localhost', 'port': '5432', 'username': 'postgres', 'password': 'wassup89', 'database': 'gardendb'}
t = int(input()) for __ in range(t): n, m = map(int, input().split()) inl = input().split() iml = input().split() amps = [] freqs = [] ampsm = [] freqsm = [] c = 0 for i in range(2*n): if i % 2 == 0: temp = int(inl[i]) amps.append(temp) else: freqs.append(inl[i]) for i in range(2*m): if i % 2 == 0: ampsm.append(int(iml[i])) else: freqsm.append(iml[i]) for i in range(len(amps)-m+1): for j in range(0, m): if(freqs[i+j]!=freqsm[j]): break else: ratio = 0 for j in range(0, m): if(amps[i+j]%ampsm[j]): break if j == 0: ratio = amps[i+j]//ampsm[j] else: if(amps[i+j]//ampsm[j] != ratio): break else: c+=1 print(c)
t = int(input()) for __ in range(t): (n, m) = map(int, input().split()) inl = input().split() iml = input().split() amps = [] freqs = [] ampsm = [] freqsm = [] c = 0 for i in range(2 * n): if i % 2 == 0: temp = int(inl[i]) amps.append(temp) else: freqs.append(inl[i]) for i in range(2 * m): if i % 2 == 0: ampsm.append(int(iml[i])) else: freqsm.append(iml[i]) for i in range(len(amps) - m + 1): for j in range(0, m): if freqs[i + j] != freqsm[j]: break else: ratio = 0 for j in range(0, m): if amps[i + j] % ampsm[j]: break if j == 0: ratio = amps[i + j] // ampsm[j] elif amps[i + j] // ampsm[j] != ratio: break else: c += 1 print(c)
## ## This is my template descripton... def main(): """This is the 'main()' for this module. I will put my description of what this does here...""" print('Welcome to my Python template!') ## ## Call the 'main()' function... if __name__ == '__main__': main() ## ## End of file...
def main(): """This is the 'main()' for this module. I will put my description of what this does here...""" print('Welcome to my Python template!') if __name__ == '__main__': main()
class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = None class Solution: def maxPathSum(self, root: TreeNode) -> int: self.res = float('-inf') def get_val(node): if not node: return 0 left = max(0, get_val(node.left)) right = max(0, get_val(node.right)) self.res = max(self.res, node.val + left + right) return node.val + max(left, right) get_val(root) return self.res
class Treenode: def __init__(self, x): self.val = x self.left = None self.right = None class Solution: def max_path_sum(self, root: TreeNode) -> int: self.res = float('-inf') def get_val(node): if not node: return 0 left = max(0, get_val(node.left)) right = max(0, get_val(node.right)) self.res = max(self.res, node.val + left + right) return node.val + max(left, right) get_val(root) return self.res
# %% [1480. Running Sum of 1d Array](https://leetcode.com/problems/running-sum-of-1d-array/) class Solution: def runningSum(self, nums: List[int]) -> List[int]: return itertools.accumulate(nums)
class Solution: def running_sum(self, nums: List[int]) -> List[int]: return itertools.accumulate(nums)
# Paint costs ############################## #### Problem Description ##### ############################## # You are getting ready to paint a piece of art. The canvas and brushes that you want to use will cost 40.00. Each color of paint that you buy is an additional 5.00. Determine how much money you will need based on the number of colors that you want to buy if tax at this store is 10%. # Task # Given the total number of colors of paint that you need, calculate and output the total cost of your project rounded up to the nearest whole number. # Input Format # An integer that represents the number of colors that you want to purchase for your project. # Output Format # A number that represents the cost of your purchase rounded up to the nearest whole number. # Sample Input # 10 # Sample Output # 99 ############################## ########## Solution ########## ############################## # Take Sololearn input paintVarieties = int(input()) # Set variables used in the final calculation canvasBrushCost = 40 paintCost = paintVarieties * 5 tax = 0.1 # Determine the total cost of the canvas, brushes, total paint. Then, apply a 10% tax. total = (canvasBrushCost + paintCost) * (1 + tax) print (round(total))
paint_varieties = int(input()) canvas_brush_cost = 40 paint_cost = paintVarieties * 5 tax = 0.1 total = (canvasBrushCost + paintCost) * (1 + tax) print(round(total))
def add_new_objects(): for object_type, desc, position in new_objects: desc['position']=position objs_in_position = get_objects_by_coords(position) all_interactable = True for obj_in_position in objs_in_position: if not game_objects[obj_in_position]['interactable']: all_interactable = False if all_interactable: if object_type == 'player': obj_id = ('player', ) else: new_obj_id = get_next_counter_value() obj_id = (object_type, new_obj_id) game_objects[obj_id] = desc for obj_in_position in objs_in_position: interactions.append((obj_id, obj_in_position)) new_objects.clear() ############################3 interactions = [] objects_ids_counter = 0 def get_next_counter_value(): global objects_ids_counter result = objects_ids_counter objects_ids_counter += 1 return result def get_objects_by_coords(position): result = [] for obj, desc in game_objects.items(): if desc['position'] == position: result.append(obj) return result new_objects = [] game_objects = { ('wall', 0): {'position': (0, 0), 'passable': False, 'interactable': False, 'char': '#'}, ('wall', 1): {'position': (0, 1), 'passable': False, 'interactable': False, 'char': '#'}, ('player',): {'position': (1, 1), 'passable': True, 'interactable': True, 'char': '@', 'coins': 0}, ('soft_wall', 11): {'position': (1, 4), 'passable': False, 'interactable': True, 'char': '%'} } new_objects = [('bomb', {'passable': True, 'interactable': True, 'lifetime': 5}, (1, 1))] add_new_objects() assert get_objects_by_coords((1, 1)) == [('player', ), ('bomb', 0)] new_objects = [('heatwave', {'passable': True, 'interactable': True}, (1, 1)), ('heatwave', {'passable': True, 'interactable': True}, (0, 1)), ('heatwave', {'passable': True, 'interactable': True}, (1, 0)), ('heatwave', {'passable': True, 'interactable': True}, (2, 1)), ('heatwave', {'passable': True, 'interactable': True}, (1, 2))] add_new_objects() assert len(get_objects_by_coords((1, 1))) == 3 assert get_objects_by_coords((0, 1)) == [('wall', 1)]
def add_new_objects(): for (object_type, desc, position) in new_objects: desc['position'] = position objs_in_position = get_objects_by_coords(position) all_interactable = True for obj_in_position in objs_in_position: if not game_objects[obj_in_position]['interactable']: all_interactable = False if all_interactable: if object_type == 'player': obj_id = ('player',) else: new_obj_id = get_next_counter_value() obj_id = (object_type, new_obj_id) game_objects[obj_id] = desc for obj_in_position in objs_in_position: interactions.append((obj_id, obj_in_position)) new_objects.clear() interactions = [] objects_ids_counter = 0 def get_next_counter_value(): global objects_ids_counter result = objects_ids_counter objects_ids_counter += 1 return result def get_objects_by_coords(position): result = [] for (obj, desc) in game_objects.items(): if desc['position'] == position: result.append(obj) return result new_objects = [] game_objects = {('wall', 0): {'position': (0, 0), 'passable': False, 'interactable': False, 'char': '#'}, ('wall', 1): {'position': (0, 1), 'passable': False, 'interactable': False, 'char': '#'}, ('player',): {'position': (1, 1), 'passable': True, 'interactable': True, 'char': '@', 'coins': 0}, ('soft_wall', 11): {'position': (1, 4), 'passable': False, 'interactable': True, 'char': '%'}} new_objects = [('bomb', {'passable': True, 'interactable': True, 'lifetime': 5}, (1, 1))] add_new_objects() assert get_objects_by_coords((1, 1)) == [('player',), ('bomb', 0)] new_objects = [('heatwave', {'passable': True, 'interactable': True}, (1, 1)), ('heatwave', {'passable': True, 'interactable': True}, (0, 1)), ('heatwave', {'passable': True, 'interactable': True}, (1, 0)), ('heatwave', {'passable': True, 'interactable': True}, (2, 1)), ('heatwave', {'passable': True, 'interactable': True}, (1, 2))] add_new_objects() assert len(get_objects_by_coords((1, 1))) == 3 assert get_objects_by_coords((0, 1)) == [('wall', 1)]
#All Configurations FILE_DUPLICATE_NUM = 2 # how many replications stored FILE_CHUNK_SIZE = 1024*1024 # 1KB, the chunk size, will be larger when finishing debugging HEADER_LENGTH = 16 # header size SAVE_FAKE_LOG = False # for single point failure, will greatly reduce the performance IGNORE_LOCK = True # for test purpose SERVER_LOG_FILE_NAME = 'server_write_log' # some common convert functions shared by server and client def name_local_to_remote(name): return name.replace('/','[[') def name_remote_to_local(name): return name.replace('[[','/')
file_duplicate_num = 2 file_chunk_size = 1024 * 1024 header_length = 16 save_fake_log = False ignore_lock = True server_log_file_name = 'server_write_log' def name_local_to_remote(name): return name.replace('/', '[[') def name_remote_to_local(name): return name.replace('[[', '/')
# Day of Week That Is k Days Later # Days of the week are represented as three-letter strings. # "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun" # Write a javaScript function solution that, given a string # S representing the day of the week and an integer K # (between 0 and 500), returns the day of the week that # is K days later. # For example, given S = "Wed" and K = 2, the function # should return "Fri". # Given S = "Sat" and K = 23, the function should return # "Mon". ## time complexity: O(1) ## space complexity: O(1) def k_days_later(s, k): days_of_week = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"] remainder = k % 7 s_index = days_of_week.index(s) move_forward = remainder + s_index if move_forward < 7: return days_of_week[move_forward] else: correct_day_index = move_forward - 7 return days_of_week[correct_day_index] # 0 print(k_days_later("Wed", 2)) print("----") # 2 print(k_days_later("Sat", 23)) print("----") print(k_days_later("Sat", 300))
def k_days_later(s, k): days_of_week = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] remainder = k % 7 s_index = days_of_week.index(s) move_forward = remainder + s_index if move_forward < 7: return days_of_week[move_forward] else: correct_day_index = move_forward - 7 return days_of_week[correct_day_index] print(k_days_later('Wed', 2)) print('----') print(k_days_later('Sat', 23)) print('----') print(k_days_later('Sat', 300))
class Accounts: def __init__(self, first_name, last_name, user_name, password): self.first_name = first_name self.last_name = last_name self.user_name = user_name self.password = password user_accounts = [] def save_account(self): ''' this is a save function that appends the account to the user_accounts array ''' Accounts.user_accounts.append(self) def delete_account(self): ''' a function used to delete a selected account ''' Accounts.user_accounts.remove(self) @classmethod def find_by_user_name(cls, user_name): ''' this is a function tha checks whether the username provided by the username is available and if it is it returns the account ''' for account in cls.user_accounts: if account.user_name == user_name: return account @classmethod def account_exists(cls, user_name): ''' this function loops through the present array of accounts while searching for the username entered by the user and returns true/false ''' for account in cls.user_accounts: if account.user_name == user_name: return True return False @classmethod def display_accounts(cls): return cls.user_accounts
class Accounts: def __init__(self, first_name, last_name, user_name, password): self.first_name = first_name self.last_name = last_name self.user_name = user_name self.password = password user_accounts = [] def save_account(self): """ this is a save function that appends the account to the user_accounts array """ Accounts.user_accounts.append(self) def delete_account(self): """ a function used to delete a selected account """ Accounts.user_accounts.remove(self) @classmethod def find_by_user_name(cls, user_name): """ this is a function tha checks whether the username provided by the username is available and if it is it returns the account """ for account in cls.user_accounts: if account.user_name == user_name: return account @classmethod def account_exists(cls, user_name): """ this function loops through the present array of accounts while searching for the username entered by the user and returns true/false """ for account in cls.user_accounts: if account.user_name == user_name: return True return False @classmethod def display_accounts(cls): return cls.user_accounts
def pyramid_pattern(n): a = 2 * n-2 for i in range(0, n): for j in range(0, a): print(end=" ") a = a-1 for j in range(0, i+1): print("*", end=" ") print("\r") print(pyramid_pattern(10))
def pyramid_pattern(n): a = 2 * n - 2 for i in range(0, n): for j in range(0, a): print(end=' ') a = a - 1 for j in range(0, i + 1): print('*', end=' ') print('\r') print(pyramid_pattern(10))
#!/usr/bin/python3 if __name__ == "__main__": # open text file to read file = open('write_file.txt', 'a') # read a line from the file file.write('This is a line appended to the file\n') file.close() file = open('write_file.txt', 'r') data = file.read() print(data) file.close()
if __name__ == '__main__': file = open('write_file.txt', 'a') file.write('This is a line appended to the file\n') file.close() file = open('write_file.txt', 'r') data = file.read() print(data) file.close()
load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains") load("@rules_jvm_external//:defs.bzl", "maven_install") load("@rules_jvm_external//:specs.bzl", "maven") def _clojure_toolchain(ctx): return [platform_common.ToolchainInfo( runtime = ctx.attr.classpath, scripts = {s.basename: s for s in ctx.files._scripts}, jdk = ctx.attr.jdk, java = ctx.attr.jdk[java_common.JavaRuntimeInfo].java_executable_exec_path, files = struct( runtime = ctx.files.classpath, scripts = ctx.files._scripts, jdk = ctx.files.jdk, ))] clojure_toolchain = rule( implementation = _clojure_toolchain, attrs = { "classpath": attr.label_list( doc = "List of JavaInfo dependencies which will be implictly added to library/repl/test/binary classpath. Must contain clojure.jar", providers = [JavaInfo], default = [ "@rules_clojure_maven//:org_clojure_clojure", "@rules_clojure_maven//:org_clojure_spec_alpha", "@rules_clojure_maven//:org_clojure_core_specs_alpha", ]), "_scripts": attr.label( default = "//java/rules_clojure:ClojureWorker", ), "jdk": attr.label( default = "@bazel_tools//tools/jdk:current_java_runtime", providers = [java_common.JavaRuntimeInfo], ), } ) def rules_clojure_default_toolchain(): rules_proto_dependencies() rules_proto_toolchains() native.register_toolchains("@rules_clojure//:rules_clojure_default_toolchain") maven_install(name="rules_clojure_maven", artifacts = [ maven.artifact(group="org.clojure", artifact="clojure", version="1.10.3", exclusions=["org.clojure:spec.alpha", "org.clojure:core.specs.alpha"]), maven.artifact(group="org.clojure", artifact="spec.alpha", version="0.2.194", exclusions=["org.clojure:clojure"]), maven.artifact(group="org.clojure", artifact="core.specs.alpha", version="0.2.56", exclusions=["org.clojure:clojure", "org.clojure:spec.alpha"]), "org.clojure:java.classpath:1.0.0", "org.clojure:tools.namespace:1.1.0", "org.clojure:tools.deps.alpha:0.12.1071", "com.google.code.gson:gson:2.8.7", "org.projectodd.shimdandy:shimdandy-api:1.2.1", "org.projectodd.shimdandy:shimdandy-impl:1.2.1"], repositories = ["https://repo1.maven.org/maven2", "https://repo.clojars.org/"])
load('@rules_proto//proto:repositories.bzl', 'rules_proto_dependencies', 'rules_proto_toolchains') load('@rules_jvm_external//:defs.bzl', 'maven_install') load('@rules_jvm_external//:specs.bzl', 'maven') def _clojure_toolchain(ctx): return [platform_common.ToolchainInfo(runtime=ctx.attr.classpath, scripts={s.basename: s for s in ctx.files._scripts}, jdk=ctx.attr.jdk, java=ctx.attr.jdk[java_common.JavaRuntimeInfo].java_executable_exec_path, files=struct(runtime=ctx.files.classpath, scripts=ctx.files._scripts, jdk=ctx.files.jdk))] clojure_toolchain = rule(implementation=_clojure_toolchain, attrs={'classpath': attr.label_list(doc='List of JavaInfo dependencies which will be implictly added to library/repl/test/binary classpath. Must contain clojure.jar', providers=[JavaInfo], default=['@rules_clojure_maven//:org_clojure_clojure', '@rules_clojure_maven//:org_clojure_spec_alpha', '@rules_clojure_maven//:org_clojure_core_specs_alpha']), '_scripts': attr.label(default='//java/rules_clojure:ClojureWorker'), 'jdk': attr.label(default='@bazel_tools//tools/jdk:current_java_runtime', providers=[java_common.JavaRuntimeInfo])}) def rules_clojure_default_toolchain(): rules_proto_dependencies() rules_proto_toolchains() native.register_toolchains('@rules_clojure//:rules_clojure_default_toolchain') maven_install(name='rules_clojure_maven', artifacts=[maven.artifact(group='org.clojure', artifact='clojure', version='1.10.3', exclusions=['org.clojure:spec.alpha', 'org.clojure:core.specs.alpha']), maven.artifact(group='org.clojure', artifact='spec.alpha', version='0.2.194', exclusions=['org.clojure:clojure']), maven.artifact(group='org.clojure', artifact='core.specs.alpha', version='0.2.56', exclusions=['org.clojure:clojure', 'org.clojure:spec.alpha']), 'org.clojure:java.classpath:1.0.0', 'org.clojure:tools.namespace:1.1.0', 'org.clojure:tools.deps.alpha:0.12.1071', 'com.google.code.gson:gson:2.8.7', 'org.projectodd.shimdandy:shimdandy-api:1.2.1', 'org.projectodd.shimdandy:shimdandy-impl:1.2.1'], repositories=['https://repo1.maven.org/maven2', 'https://repo.clojars.org/'])
""" Exceptions """ # Commands class UsageError(Exception): """To indicate a command-line usage error""" def __init__(self, *a, **kw): self.print_help = kw.pop('print_help', True) super(UsageError, self).__init__(*a, **kw) # Settings class ConfigurationError(Exception): def __init__(self, msg): self.msg = msg def __str__(self): return self.msg
""" Exceptions """ class Usageerror(Exception): """To indicate a command-line usage error""" def __init__(self, *a, **kw): self.print_help = kw.pop('print_help', True) super(UsageError, self).__init__(*a, **kw) class Configurationerror(Exception): def __init__(self, msg): self.msg = msg def __str__(self): return self.msg
for c in range(0, 6): print('oi') for b in range (0, 6): print(b) print('fim') for b in range (6, 0, -1): print(b) print('fim') n= int(input('Digite um numero: ')) for c in range(0, n): print(c) print('fim') i = int(input('Inicio: ')) f = int(input('fim: ')) p = int(input('passos: ')) for c in range(i, f+1, p): print(c)
for c in range(0, 6): print('oi') for b in range(0, 6): print(b) print('fim') for b in range(6, 0, -1): print(b) print('fim') n = int(input('Digite um numero: ')) for c in range(0, n): print(c) print('fim') i = int(input('Inicio: ')) f = int(input('fim: ')) p = int(input('passos: ')) for c in range(i, f + 1, p): print(c)
#ex10 p.64 what was that? # Examples of tabbed list, inline new line char, and escape sequence test # Tabbed list example output tlist= """ \t * item 1 \t * item 2 \t * item 3 """ print("This is a tabbed list:", tlist) #print() print("Split line after THIS,\nthe above is on it's own line") print("This is a backslash in python: \\") formatter = "\t{} \t \t{} \t \t {} \t \t{}" print(formatter.format(1,2,3,4))
tlist = '\n\t * item 1\n\t * item 2\n\t * item 3 ' print('This is a tabbed list:', tlist) print("Split line after THIS,\nthe above is on it's own line") print('This is a backslash in python: \\') formatter = '\t{} \t \t{} \t \t {} \t \t{}' print(formatter.format(1, 2, 3, 4))
gritos = 3 soma = 0 while gritos > 0: entrada = input() if entrada == 'caw caw': print(soma) soma = 0 gritos -= 1 continue entrada = int("".join(map(lambda x: '0' if x == '-' else '1', entrada)), 2) soma += entrada
gritos = 3 soma = 0 while gritos > 0: entrada = input() if entrada == 'caw caw': print(soma) soma = 0 gritos -= 1 continue entrada = int(''.join(map(lambda x: '0' if x == '-' else '1', entrada)), 2) soma += entrada
start_node = '0' end_node = '8' def a_star(start_node, end_node): open_set = set(start_node) closed_set = set() g = {} # Store distance from start node. parents = {} # Parents contain an adjacent map of all nodes. # Distance of start node from itself is zero g[start_node] = 0 parents[start_node] = start_node while len(open_set) > 0 : n = None # Node with the lowest f() is found. for v in open_set: if n == None or g[v] + heuristic(v) < g[n] + heuristic(n): n = v if n == end_node or Graph_node[n] == None : pass else: for (m, weight) in get_neighbours(n): if m not in open_set and m not in closed_set: open_set.add(m) parents[m] = n g[m] = g[n] + weight else: if g[m] > g[n] + weight: g[m] = g[n] + weight parents[m] = n if m in closed_set: closed_set.remove(m) open_set.add(m) if n == None: print("Path doesn't exist") return None if n == end_node: path = [] print("Parents",parents) while parents[n] != n: path.append(n) n = parents[n] path.append(start_node) path.reverse() print(f"Path found {path}") return path open_set.remove(n) closed_set.add(n) print("Path doesn't exist!") return None def get_neighbours(v): if v in Graph_node: return Graph_node [v] else: return None def heuristic(n): h_dist = { 'A':11, 'B':2, 'C':99, 'D':1, 'E':7, 'G':0 } return h_dist[n] Graph_node = { 'A':[('B',2),('E',3)], 'B':[('C',1),('G',3)], 'C':None, 'E':[('D',6)], 'D':[('G',1)], } a_star('A','G')
start_node = '0' end_node = '8' def a_star(start_node, end_node): open_set = set(start_node) closed_set = set() g = {} parents = {} g[start_node] = 0 parents[start_node] = start_node while len(open_set) > 0: n = None for v in open_set: if n == None or g[v] + heuristic(v) < g[n] + heuristic(n): n = v if n == end_node or Graph_node[n] == None: pass else: for (m, weight) in get_neighbours(n): if m not in open_set and m not in closed_set: open_set.add(m) parents[m] = n g[m] = g[n] + weight elif g[m] > g[n] + weight: g[m] = g[n] + weight parents[m] = n if m in closed_set: closed_set.remove(m) open_set.add(m) if n == None: print("Path doesn't exist") return None if n == end_node: path = [] print('Parents', parents) while parents[n] != n: path.append(n) n = parents[n] path.append(start_node) path.reverse() print(f'Path found {path}') return path open_set.remove(n) closed_set.add(n) print("Path doesn't exist!") return None def get_neighbours(v): if v in Graph_node: return Graph_node[v] else: return None def heuristic(n): h_dist = {'A': 11, 'B': 2, 'C': 99, 'D': 1, 'E': 7, 'G': 0} return h_dist[n] graph_node = {'A': [('B', 2), ('E', 3)], 'B': [('C', 1), ('G', 3)], 'C': None, 'E': [('D', 6)], 'D': [('G', 1)]} a_star('A', 'G')
# -*- coding: utf-8 -*- """ Implements of URLs manipulation. """ def remove_starting_backward_slash(value: str): """ Removes backward slash at the begin of string. """ if value.startswith('\\'): return value[1:] return value def add_trailing_slash(value): """ Add slash to the end of string if needed. """ result = value if not value.endswith("/"): result = value + "/" return result def remove_starting_forward_slash(value): """ Removes forward slash at the begin of string. """ result = value if value.startswith("/"): result = value[1:] return result def combine_virtual_path(p1: str, p2: str)-> str: """ Joins two virtual paths. """ tail = add_trailing_slash(p2) tail = remove_starting_forward_slash(tail) return add_trailing_slash(p1) + tail
""" Implements of URLs manipulation. """ def remove_starting_backward_slash(value: str): """ Removes backward slash at the begin of string. """ if value.startswith('\\'): return value[1:] return value def add_trailing_slash(value): """ Add slash to the end of string if needed. """ result = value if not value.endswith('/'): result = value + '/' return result def remove_starting_forward_slash(value): """ Removes forward slash at the begin of string. """ result = value if value.startswith('/'): result = value[1:] return result def combine_virtual_path(p1: str, p2: str) -> str: """ Joins two virtual paths. """ tail = add_trailing_slash(p2) tail = remove_starting_forward_slash(tail) return add_trailing_slash(p1) + tail
data = open("day6.txt").read().split("\n\n") def part_one(): total = 0 for group in data: total += len(set(list(group.replace("\n", "")))) return total def part_two(): total = 0 for group in data: total += len(set.intersection(*map(set, group.split()))) return total print(part_one()) print(part_two())
data = open('day6.txt').read().split('\n\n') def part_one(): total = 0 for group in data: total += len(set(list(group.replace('\n', '')))) return total def part_two(): total = 0 for group in data: total += len(set.intersection(*map(set, group.split()))) return total print(part_one()) print(part_two())
print() name = 'abc'.upper() def get_name(): name = 'def'.upper() print(f"inside: {name}") get_name() print(f"Outside: {name}") print() def get_name(): global name name = 'def'.upper() print(f"inside: {name}") get_name() print(f"Outside: {name}") def get_name(): global name #but #name: str = 'gHi'.upper() # SyntaxError: annotated name 'name' can't be global #and #global name = 'gHi'.upper() # ^ #SyntaxError: invalid syntax print(f"inside: {name}") get_name() print(f"Outside: {name}")
print() name = 'abc'.upper() def get_name(): name = 'def'.upper() print(f'inside: {name}') get_name() print(f'Outside: {name}') print() def get_name(): global name name = 'def'.upper() print(f'inside: {name}') get_name() print(f'Outside: {name}') def get_name(): global name print(f'inside: {name}') get_name() print(f'Outside: {name}')
# Read from a text file #Open the file, read the value and close the file f = open("output.txt","r") text=f.read() f.close() print(text)
f = open('output.txt', 'r') text = f.read() f.close() print(text)