content
stringlengths
7
1.05M
fixed_cases
stringlengths
1
1.28M
#punto 1 #entradas n=int(input("Escriba el primer digito ")) k=int(input("Escriba el primer digito ")) #caja negra y salidas while True: n=0 if(k<n): n=n-1 print(n) elif(n==k): print(k) break
n = int(input('Escriba el primer digito ')) k = int(input('Escriba el primer digito ')) while True: n = 0 if k < n: n = n - 1 print(n) elif n == k: print(k) break
class CandeError(Exception): pass class CandeSerializationError(CandeError): pass class CandeDeserializationError(CandeError): pass class CandeReadError(CandeError): pass class CandePartError(CandeError): pass class CandeFormatError(CandePartError): pass
class Candeerror(Exception): pass class Candeserializationerror(CandeError): pass class Candedeserializationerror(CandeError): pass class Candereaderror(CandeError): pass class Candeparterror(CandeError): pass class Candeformaterror(CandePartError): pass
items = ['T-Shirt','Sweater'] print("*** Note: If you want to quit this program, simply type 'quit' or 'QUIT'.") print("*" * 20) while True: action = (input("Welcome to our shop, what do you want (C, R, U, D)? ")).upper() if action == "R": print("Our items: ", end='') print(*items,sep=', ') elif action == "C": new_item = input("Enter new item: ") items.append(new_item) print("Our items: ", end='') print(*items,sep=', ') elif action == "U": update_pos = int(input("Update position? ")) - 1 if update_pos in range(0,len(items)): update_item = input("New item? ") items[update_pos] = update_item print("Our items: ", end='') print(*items,sep=', ') else: print("Not found.") elif action == "D": delete_pos = int(input("Delete position? ")) - 1 if delete_pos in range(0,len(items)): items.pop(delete_pos) print("Our items: ", end='') print(*items,sep=', ') else: print("Not found.") elif action == "QUIT": break else: print("Wrong command. Type again please!")
items = ['T-Shirt', 'Sweater'] print("*** Note: If you want to quit this program, simply type 'quit' or 'QUIT'.") print('*' * 20) while True: action = input('Welcome to our shop, what do you want (C, R, U, D)? ').upper() if action == 'R': print('Our items: ', end='') print(*items, sep=', ') elif action == 'C': new_item = input('Enter new item: ') items.append(new_item) print('Our items: ', end='') print(*items, sep=', ') elif action == 'U': update_pos = int(input('Update position? ')) - 1 if update_pos in range(0, len(items)): update_item = input('New item? ') items[update_pos] = update_item print('Our items: ', end='') print(*items, sep=', ') else: print('Not found.') elif action == 'D': delete_pos = int(input('Delete position? ')) - 1 if delete_pos in range(0, len(items)): items.pop(delete_pos) print('Our items: ', end='') print(*items, sep=', ') else: print('Not found.') elif action == 'QUIT': break else: print('Wrong command. Type again please!')
''' Catalan numbers (Cn) are a sequence of natural numbers that occur in many places. The most important ones being that Cn gives the number of Binary Search Trees possible with n values. Cn is the number of full Binary Trees with n + 1 leaves. Cn is the number of different ways n + 1 factors can be completely parenthesized. ''' # n denotes the nth Catalan Number that we want to compute n = int(input()) # Catalan array stores the catalan numbers from 1....n Catalan = [0] * (n + 1) # The first two values are 1 for this series Catalan[0] = 1 Catalan[1] = 1 ''' For e.g if n = 5, then Cn = (Catalan(0) * Catalan(4)) + (Catalan(1) * Catalan(3)) + (Catalan(2) * Catalan(2)) + (Catalan(3) * Catalan(1)) + (Catalan(4)* Catalan(0)) We can see here that Catalan numbers form a recursive relation i.e for nth term, the Catalan number Cn is the sum of Catalan(i) * Catalan(n-i-1) where i goes from 0...n-1. We can also observe that several values are getting repeated and hence we optimise the performance by applying memoization. ''' for i in range(2, n + 1): for j in range(0, i): Catalan[i] = Catalan[i] + (Catalan[j] * Catalan[i - j - 1]) # nth Catalan number is given by n - 1th index print("The Catalan Number (Cn) is: " + str(Catalan[n - 1])) ''' Input: 10 Output: The Catalan Number (Cn) is: 4862 Input: 5 Output: The Catalan Number (Cn) is: 14 '''
""" Catalan numbers (Cn) are a sequence of natural numbers that occur in many places. The most important ones being that Cn gives the number of Binary Search Trees possible with n values. Cn is the number of full Binary Trees with n + 1 leaves. Cn is the number of different ways n + 1 factors can be completely parenthesized. """ n = int(input()) catalan = [0] * (n + 1) Catalan[0] = 1 Catalan[1] = 1 '\n For e.g if n = 5, then\n Cn = (Catalan(0) * Catalan(4)) + (Catalan(1) * Catalan(3))\n + (Catalan(2) * Catalan(2)) + (Catalan(3) * Catalan(1)) +\n (Catalan(4)* Catalan(0))\n We can see here that Catalan numbers form a recursive\n relation i.e for nth term, the Catalan number Cn is\n the sum of Catalan(i) * Catalan(n-i-1) where i goes from\n 0...n-1. We can also observe that several values are getting\n repeated and hence we optimise the performance by applying\n memoization.\n' for i in range(2, n + 1): for j in range(0, i): Catalan[i] = Catalan[i] + Catalan[j] * Catalan[i - j - 1] print('The Catalan Number (Cn) is: ' + str(Catalan[n - 1])) '\n Input:\n 10\n Output:\n The Catalan Number (Cn) is: 4862\n\n Input:\n 5\n Output:\n The Catalan Number (Cn) is: 14\n'
# operador logico print("Ingrese el valor de a") a = float(input()) print("Ingrese el valor de b") b = float(input()) print("b es mayor que a") print(b > a) print(type(b > a)) print("b es menor que a") print(b < a) print("b es mayor o igual que a") print(b >= a) print("b es menor o igual que a") print(b <= a) print("b es diferente de a") print(b != a) var = b == a print("b = a? ", var)
print('Ingrese el valor de a') a = float(input()) print('Ingrese el valor de b') b = float(input()) print('b es mayor que a') print(b > a) print(type(b > a)) print('b es menor que a') print(b < a) print('b es mayor o igual que a') print(b >= a) print('b es menor o igual que a') print(b <= a) print('b es diferente de a') print(b != a) var = b == a print('b = a? ', var)
def similar_users_query(user): # Pass user object, return query to get users who starred same things as them query = """ select subq.user_id , sum(1/log(subq.stargazers_count+1)) `score` , count(*) `count` from (select others.user_id , others.starred_repo_id , repo.repo_name , repo.description , repo.last_modified , repo.language , repo.stargazers_count , repo.forks_count , repo.from_hacker_news from (select user_id , starred_repo_id from github_user_starred_repos where user_id != {0}) others join (select starred_repo_id from github_user_starred_repos where user_id = {0}) usr on others.starred_repo_id=usr.starred_repo_id join (select id , repo_name , description , last_modified , language , stargazers_count , forks_count , from_hacker_news from github_repos) repo on others.starred_repo_id=repo.id) subq group by subq.user_id order by 2 desc """.format(user.id) return query def similar_repos_query(user): # Pass user object, return query to get users who starred same things as them query = """ select other_repos.user_id , other_repos.starred_repo_id , repo.repo_name , repo.description , repo.last_modified , repo.language , repo.stargazers_count , repo.forks_count , repo.from_hacker_news , hn.added_at , hn.submission_time , hn.title , hn.url from (select user_id , starred_repo_id from github_user_starred_repos where user_id != {0}) other_repos join (select distinct(others.user_id) `user_id` from (select user_id , starred_repo_id from github_user_starred_repos where user_id != {0}) others join (select starred_repo_id from github_user_starred_repos where user_id = {0}) usr on others.starred_repo_id = usr.starred_repo_id) others on other_repos.user_id=others.user_id join (select id , repo_name , description , last_modified , language , stargazers_count , forks_count , from_hacker_news from github_repos) repo on other_repos.starred_repo_id=repo.id join (select added_at , submission_time , title , url , github_repo_name from hacker_news) hn on repo.repo_name = hn.github_repo_name """.format(user.id) return query
def similar_users_query(user): query = '\n select subq.user_id\n , sum(1/log(subq.stargazers_count+1)) `score`\n , count(*) `count`\n from\n (select others.user_id\n , others.starred_repo_id\n , repo.repo_name\n , repo.description\n , repo.last_modified\n , repo.language\n , repo.stargazers_count\n , repo.forks_count\n , repo.from_hacker_news\n from\n (select user_id\n , starred_repo_id\n from github_user_starred_repos\n where user_id != {0}) others\n join\n (select starred_repo_id\n from github_user_starred_repos\n where user_id = {0}) usr\n on others.starred_repo_id=usr.starred_repo_id\n join\n (select id\n , repo_name\n , description\n , last_modified\n , language\n , stargazers_count\n , forks_count\n , from_hacker_news\n from github_repos) repo\n on others.starred_repo_id=repo.id) subq\n group by subq.user_id\n order by 2 desc\n '.format(user.id) return query def similar_repos_query(user): query = '\n select other_repos.user_id\n , other_repos.starred_repo_id\n , repo.repo_name\n , repo.description\n , repo.last_modified\n , repo.language\n , repo.stargazers_count\n , repo.forks_count\n , repo.from_hacker_news\n , hn.added_at\n , hn.submission_time\n , hn.title\n , hn.url\n from\n (select user_id\n , starred_repo_id\n from github_user_starred_repos\n where user_id != {0}) other_repos\n join\n (select distinct(others.user_id) `user_id`\n from\n (select user_id\n , starred_repo_id\n from github_user_starred_repos\n where user_id != {0}) others\n join\n (select starred_repo_id\n from github_user_starred_repos\n where user_id = {0}) usr\n on others.starred_repo_id = usr.starred_repo_id) others\n on other_repos.user_id=others.user_id\n join\n (select id\n , repo_name\n , description\n , last_modified\n , language\n , stargazers_count\n , forks_count\n , from_hacker_news\n from github_repos) repo\n on other_repos.starred_repo_id=repo.id\n join\n (select added_at\n , submission_time\n , title\n , url\n , github_repo_name\n from hacker_news) hn\n on repo.repo_name = hn.github_repo_name\n '.format(user.id) return query
# Copyright (c) 2017 Cisco and/or its affiliates. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """This file defines the constants variables for the TLDK test.""" class TLDKConstants(object): """Define the directory path for the TLDK test.""" # TLDK testing directory location at topology nodes REMOTE_FW_DIR = '/tmp/TLDK-testing' # Shell scripts location TLDK_SCRIPTS = 'tests/tldk/tldk_scripts' # Libraries location TLDK_DEPLIBS = 'tests/tldk/tldk_deplibs' # Config files location for the TLDK test TLDK_TESTCONFIG = 'tests/tldk/tldk_testconfig'
"""This file defines the constants variables for the TLDK test.""" class Tldkconstants(object): """Define the directory path for the TLDK test.""" remote_fw_dir = '/tmp/TLDK-testing' tldk_scripts = 'tests/tldk/tldk_scripts' tldk_deplibs = 'tests/tldk/tldk_deplibs' tldk_testconfig = 'tests/tldk/tldk_testconfig'
class d_linked_node: def __init__(self, initData, initNext, initPrevious): # constructs a new node and initializes it to contain # the given object (initData) and links to the given next # and previous nodes. self.__data = initData self.__next = initNext self.__previous = initPrevious if (initPrevious != None): initPrevious.__next = self if (initNext != None): initNext.__previous = self def getData(self): return self.__data def getNext(self): return self.__next def getPrevious(self): return self.__previous def setData(self, newData): self.__data = newData def setNext(self, newNext): self.__next= newNext def setPrevious(self, newPrevious): self.__previous= newPrevious
class D_Linked_Node: def __init__(self, initData, initNext, initPrevious): self.__data = initData self.__next = initNext self.__previous = initPrevious if initPrevious != None: initPrevious.__next = self if initNext != None: initNext.__previous = self def get_data(self): return self.__data def get_next(self): return self.__next def get_previous(self): return self.__previous def set_data(self, newData): self.__data = newData def set_next(self, newNext): self.__next = newNext def set_previous(self, newPrevious): self.__previous = newPrevious
#python program to subtract two numbers using function def subtraction(x,y): #function definifion for subtraction sub=x-y return sub num1=int(input("please enter first number: "))#input from user to num1 num2=int(input("please enter second number: "))#input from user to num2 print("Subtraction is: ",subtraction(num1,num2))#call the function
def subtraction(x, y): sub = x - y return sub num1 = int(input('please enter first number: ')) num2 = int(input('please enter second number: ')) print('Subtraction is: ', subtraction(num1, num2))
''' Package to read and process material export data. To use, initiate an endomaterial object and start exploring! --------- Examples: ## Init from ukw_intelli_store import EndoMaterial em = EndoMaterial(path, path) ## To explore all used materials: em.mat_info ## To explore specific material id em.get_mat_info_for_id(material_id) ## To get all logged dgvs keys: em.get_dgvs_keys() ## To explore a single dgvs key: em.get_dgvs_key_summary() ''' __version__ = '0.0.0'
""" Package to read and process material export data. To use, initiate an endomaterial object and start exploring! --------- Examples: ## Init from ukw_intelli_store import EndoMaterial em = EndoMaterial(path, path) ## To explore all used materials: em.mat_info ## To explore specific material id em.get_mat_info_for_id(material_id) ## To get all logged dgvs keys: em.get_dgvs_keys() ## To explore a single dgvs key: em.get_dgvs_key_summary() """ __version__ = '0.0.0'
# Source: https://www.geeksforgeeks.org/sets-in-python/ # Python program to # demonstrate intersection # of two sets set1 = [0,1,2,3,4,5] set2 = [3,4,5,6,7,8,9] set3 = set1 + set2 unique_set3 = [] for i in set3: if i not in unique_set3: unique_set3.append(i) print("Intersection using intersection() function") print(set3) print(unique_set3)
set1 = [0, 1, 2, 3, 4, 5] set2 = [3, 4, 5, 6, 7, 8, 9] set3 = set1 + set2 unique_set3 = [] for i in set3: if i not in unique_set3: unique_set3.append(i) print('Intersection using intersection() function') print(set3) print(unique_set3)
#!/usr/bin/env python # -*- coding: utf-8 -*- """ ib.ext.cfg.EWrapperMsgGenerator -> config module for EWrapperMsgGenerator.java. """ modulePreamble = [ 'from ib.ext.AnyWrapperMsgGenerator import AnyWrapperMsgGenerator', 'from ib.ext.Util import Util', ]
""" ib.ext.cfg.EWrapperMsgGenerator -> config module for EWrapperMsgGenerator.java. """ module_preamble = ['from ib.ext.AnyWrapperMsgGenerator import AnyWrapperMsgGenerator', 'from ib.ext.Util import Util']
class Validator: PLUS_CHAR = 43 AT_CHAR = 64 def __init__(self): self.validation_results = None self.sequence_symbols = list() for symbol in "ACTGN.": self.sequence_symbols.append(ord(symbol)) self.quality_score_symbols = list() for symbol in "!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ\ [\]^_`abcdefghijklmnopqrstuvwxyz{|}~": self.quality_score_symbols.append(ord(symbol)) def validate(self, file_path): valid = True with open(file_path, 'rb') as source: record = list() for line in source: if not valid: break line = line.rstrip() line_is_not_empty = line # added for readability if line_is_not_empty: record.append(line) record_is_ready = len(record) == 4 if record_is_ready: valid = valid and self._validate_record(record) record.clear() else: valid = False valid = valid and len(record) == 0 return valid def _validate_record(self, record): valid_identifier = self._validate_identifier_line(record[0]) valid_bases = self._validate_bases(record[1]) valid_plus = self._validate_plus(record[2]) valid_quality_scores = self._validate_quality_scores(record[3]) equal_lengths = self._validate_bases_length_equals_qc_length(record[1], record[3]) return valid_identifier and valid_bases and valid_plus and valid_quality_scores \ and equal_lengths def _validate_identifier_line(self, line): # is the first char @ ? has_at_char = line[0] == Validator.AT_CHAR # all ascii chars? all_ascii = Validator._all_ascii(line) return has_at_char and all_ascii #TODO implement case insensitive check def _validate_bases(self, line): valid = False has_n_char = False has_period = False for symbol in line: valid = symbol in self.sequence_symbols if valid: if symbol == ord("N"): has_n_char = True if symbol == ord("."): has_period = True return valid and not has_n_char or not has_period def _validate_plus(self, line): # is the first char a plus sign? has_plus_char = line[0] == Validator.PLUS_CHAR return has_plus_char def _validate_quality_scores(self, line): for symbol in line: if symbol not in self.quality_score_symbols: return False; return True def _validate_bases_length_equals_qc_length(self, base_line, qc_line): base_length = len(base_line) quality_length = len(qc_line) return base_length == quality_length @staticmethod def _all_ascii(line): for char in line: if char > 128: return False return True
class Validator: plus_char = 43 at_char = 64 def __init__(self): self.validation_results = None self.sequence_symbols = list() for symbol in 'ACTGN.': self.sequence_symbols.append(ord(symbol)) self.quality_score_symbols = list() for symbol in '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ [\\]^_`abcdefghijklmnopqrstuvwxyz{|}~': self.quality_score_symbols.append(ord(symbol)) def validate(self, file_path): valid = True with open(file_path, 'rb') as source: record = list() for line in source: if not valid: break line = line.rstrip() line_is_not_empty = line if line_is_not_empty: record.append(line) record_is_ready = len(record) == 4 if record_is_ready: valid = valid and self._validate_record(record) record.clear() else: valid = False valid = valid and len(record) == 0 return valid def _validate_record(self, record): valid_identifier = self._validate_identifier_line(record[0]) valid_bases = self._validate_bases(record[1]) valid_plus = self._validate_plus(record[2]) valid_quality_scores = self._validate_quality_scores(record[3]) equal_lengths = self._validate_bases_length_equals_qc_length(record[1], record[3]) return valid_identifier and valid_bases and valid_plus and valid_quality_scores and equal_lengths def _validate_identifier_line(self, line): has_at_char = line[0] == Validator.AT_CHAR all_ascii = Validator._all_ascii(line) return has_at_char and all_ascii def _validate_bases(self, line): valid = False has_n_char = False has_period = False for symbol in line: valid = symbol in self.sequence_symbols if valid: if symbol == ord('N'): has_n_char = True if symbol == ord('.'): has_period = True return valid and (not has_n_char) or not has_period def _validate_plus(self, line): has_plus_char = line[0] == Validator.PLUS_CHAR return has_plus_char def _validate_quality_scores(self, line): for symbol in line: if symbol not in self.quality_score_symbols: return False return True def _validate_bases_length_equals_qc_length(self, base_line, qc_line): base_length = len(base_line) quality_length = len(qc_line) return base_length == quality_length @staticmethod def _all_ascii(line): for char in line: if char > 128: return False return True
#work in prgress - This creates a skelatal mods file for the givne set of files templateFile = "C:\\python-scripts\\xml-file-output\\aids_skeletalmods.xml" def createXmlFiles(idList): print("create xml file list") for id in idList: #print("processing id " + id ) tree = ElementTree() tree.parse(templateFile) root = tree.getroot() nameElement = tree.find('titleInfo/title') nameElement.text = id apElement = tree.find('identifier') apElement.text = id root.attrib = {"xmlns:xlink":"http://www.w3.org/1999/xlink", "xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance", "xmlns":"http://www.loc.gov/mods/v3", "version":"3.5", "xsi:schemaLocation":"http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-5.xsd"} #print("writing file " + xmlOutputDir + id + ".xml") tree.write(xmlOutputDir + id + ".xml") def createXmlFiles(idList): print("create xml file list") for id in idList: #print("processing id " + id ) tree = ElementTree() tree.parse(templateFile) root = tree.getroot() nameElement = tree.find('titleInfo/title') nameElement.text = id apElement = tree.find('identifier') apElement.text = id root.attrib = {"xmlns:xlink":"http://www.w3.org/1999/xlink", "xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance", "xmlns":"http://www.loc.gov/mods/v3", "version":"3.5", "xsi:schemaLocation":"http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-5.xsd"} #print("writing file " + xmlOutputDir + id + ".xml") tree.write(xmlOutputDir + id + ".xml") def processSets(offset, maxFilesToProcess): fileIdList = getFileList(itemDirectory, "tif") setSize = len(fileIdList) if(not maxFilesToProcess): maxFilesToProcess = setSize + 1 if(not offset): offset = 0 offset = int(offset) maxFilesToProcess = int(maxFilesToProcess) setSize = int(setSize) print ("Max files to process = " + str(maxFilesToProcess)) print ("Offset = " + str(offset)) counter = 1 totalBytes = 0 fileSet = [] startCount = 1 for fileName, fileSize in fileIdList.items(): if( (counter >= offset) and (counter <= maxFilesToProcess) ) : print("counter = " + str(counter) + " processing file " + fileName + " with size " + str(fileSize)) nextFile = fileName fileSet.append(fileName) counter = counter + 1 if(len(fileSet) > 0): createXmlFiles(fileSet) # maxFilesPerZip = input("Please enter maximum number of files per zip file: ") maxFilesToProcess = input("Please enter maximum number of files to process enter to process all: ") offset = input("Please enter the offset position (inclusive) press enter to start from the beginning: ") processSets(offset, maxFilesToProcess)
template_file = 'C:\\python-scripts\\xml-file-output\\aids_skeletalmods.xml' def create_xml_files(idList): print('create xml file list') for id in idList: tree = element_tree() tree.parse(templateFile) root = tree.getroot() name_element = tree.find('titleInfo/title') nameElement.text = id ap_element = tree.find('identifier') apElement.text = id root.attrib = {'xmlns:xlink': 'http://www.w3.org/1999/xlink', 'xmlns:xsi': 'http://www.w3.org/2001/XMLSchema-instance', 'xmlns': 'http://www.loc.gov/mods/v3', 'version': '3.5', 'xsi:schemaLocation': 'http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-5.xsd'} tree.write(xmlOutputDir + id + '.xml') def create_xml_files(idList): print('create xml file list') for id in idList: tree = element_tree() tree.parse(templateFile) root = tree.getroot() name_element = tree.find('titleInfo/title') nameElement.text = id ap_element = tree.find('identifier') apElement.text = id root.attrib = {'xmlns:xlink': 'http://www.w3.org/1999/xlink', 'xmlns:xsi': 'http://www.w3.org/2001/XMLSchema-instance', 'xmlns': 'http://www.loc.gov/mods/v3', 'version': '3.5', 'xsi:schemaLocation': 'http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-5.xsd'} tree.write(xmlOutputDir + id + '.xml') def process_sets(offset, maxFilesToProcess): file_id_list = get_file_list(itemDirectory, 'tif') set_size = len(fileIdList) if not maxFilesToProcess: max_files_to_process = setSize + 1 if not offset: offset = 0 offset = int(offset) max_files_to_process = int(maxFilesToProcess) set_size = int(setSize) print('Max files to process = ' + str(maxFilesToProcess)) print('Offset = ' + str(offset)) counter = 1 total_bytes = 0 file_set = [] start_count = 1 for (file_name, file_size) in fileIdList.items(): if counter >= offset and counter <= maxFilesToProcess: print('counter = ' + str(counter) + ' processing file ' + fileName + ' with size ' + str(fileSize)) next_file = fileName fileSet.append(fileName) counter = counter + 1 if len(fileSet) > 0: create_xml_files(fileSet) max_files_to_process = input('Please enter maximum number of files to process enter to process all: ') offset = input('Please enter the offset position (inclusive) press enter to start from the beginning: ') process_sets(offset, maxFilesToProcess)
j,i=65,-2 for I in range (1,14): J= j-5 I=i+3 print('I=%d J=%d' %(I,J)) j=J i=I
(j, i) = (65, -2) for i in range(1, 14): j = j - 5 i = i + 3 print('I=%d J=%d' % (I, J)) j = J i = I
class TreeNode: def __init__(self, val=0, left=None, right=None): self.val = val self.left = left self.right = right class Solution: def isMirror(self, left: TreeNode, right: TreeNode) -> bool: if left is None and right is None: return True elif left is not None and right is not None: inner = self.isMirror(left.right, right.left) outer = self.isMirror(left.left, right.right) return left.val == right.val and inner and outer return False def isSymmetric(self, root: TreeNode) -> bool: return root is None or self.isMirror(root.left, root.right)
class Treenode: def __init__(self, val=0, left=None, right=None): self.val = val self.left = left self.right = right class Solution: def is_mirror(self, left: TreeNode, right: TreeNode) -> bool: if left is None and right is None: return True elif left is not None and right is not None: inner = self.isMirror(left.right, right.left) outer = self.isMirror(left.left, right.right) return left.val == right.val and inner and outer return False def is_symmetric(self, root: TreeNode) -> bool: return root is None or self.isMirror(root.left, root.right)
class Solution(object): def maxRotateFunction(self, A): """ :type A: List[int] :rtype: int """ totalSum = sum(A) Al = len(A) F = {0:0} for i in range(Al): F[0] += i * A[i] maxNum = F[0] for i in range(Al-1,0,-1): F[Al-i] = F[Al-i-1] + totalSum - Al * A[i] maxNum = max(maxNum,F[Al-i]) return maxNum # TLE def maxRotateFunction_TLE(self, A): """ :type A: List[int] :rtype: int """ Rsum = {} rotated = 0 max = None l = len(A) for i in range(l): mmax = None for j in range(l): if j in Rsum: Rsum[j] += i * A[rotated%l] else: Rsum[j] = i * A[rotated%l] if mmax is None or mmax < Rsum[j]: mmax = Rsum[j] rotated -= 1 max = mmax rotated += 1 return 0 if max is None else max
class Solution(object): def max_rotate_function(self, A): """ :type A: List[int] :rtype: int """ total_sum = sum(A) al = len(A) f = {0: 0} for i in range(Al): F[0] += i * A[i] max_num = F[0] for i in range(Al - 1, 0, -1): F[Al - i] = F[Al - i - 1] + totalSum - Al * A[i] max_num = max(maxNum, F[Al - i]) return maxNum def max_rotate_function_tle(self, A): """ :type A: List[int] :rtype: int """ rsum = {} rotated = 0 max = None l = len(A) for i in range(l): mmax = None for j in range(l): if j in Rsum: Rsum[j] += i * A[rotated % l] else: Rsum[j] = i * A[rotated % l] if mmax is None or mmax < Rsum[j]: mmax = Rsum[j] rotated -= 1 max = mmax rotated += 1 return 0 if max is None else max
class Config: # image size image_min_dims = 512 image_max_dims = 512 steps_per_epoch = 50 validation_steps = 20 batch_size = 16 epochs = 10 shuffle = True num_classes = 21
class Config: image_min_dims = 512 image_max_dims = 512 steps_per_epoch = 50 validation_steps = 20 batch_size = 16 epochs = 10 shuffle = True num_classes = 21
'''https://leetcode.com/problems/course-schedule/ 207. Course Schedule Medium 7445 303 Add to List Share There are a total of numCourses courses you have to take, labeled from 0 to numCourses - 1. You are given an array prerequisites where prerequisites[i] = [ai, bi] indicates that you must take course bi first if you want to take course ai. For example, the pair [0, 1], indicates that to take course 0 you have to first take course 1. Return true if you can finish all courses. Otherwise, return false. Example 1: Input: numCourses = 2, prerequisites = [[1,0]] Output: true Explanation: There are a total of 2 courses to take. To take course 1 you should have finished course 0. So it is possible. Example 2: Input: numCourses = 2, prerequisites = [[1,0],[0,1]] Output: false Explanation: There are a total of 2 courses to take. To take course 1 you should have finished course 0, and to take course 0 you should also have finished course 1. So it is impossible. Constraints: 1 <= numCourses <= 105 0 <= prerequisites.length <= 5000 prerequisites[i].length == 2 0 <= ai, bi < numCourses All the pairs prerequisites[i] are unique.''' # [207] Course Schedule # class Solution: def canFinish(self, numCourses: int, prerequisites: List[List[int]]) -> bool: indegree = [0 for i in range(numCourses)] connection = {i: [] for i in range(numCourses)} for link in prerequisites: connection[link[1]].append(link[0]) indegree[link[0]] += 1 zero_indegree = [] for i in range(numCourses): if indegree[i] == 0: zero_indegree.append(i) i = 0 while i < len(zero_indegree): for node in connection[zero_indegree[i]]: indegree[node] -= 1 if indegree[node] == 0: zero_indegree.append(node) i += 1 if len(zero_indegree) == numCourses: return True else: return False def DFS(self): record = [[0 for _ in range(numCourses)] for _ in range(numCourses)] visited = [False for _ in range(numCourses)] for item in prerequisites: record[item[1]][item[0]] = 1 # sort def dfs(num): for i in range(numCourses): if record[num][i] == 1: visited[num] = True if visited[i]: return False else: if not dfs(i): return False visited[num] = False return True for i in range(numCourses): if not dfs(i): return False return True
"""https://leetcode.com/problems/course-schedule/ 207. Course Schedule Medium 7445 303 Add to List Share There are a total of numCourses courses you have to take, labeled from 0 to numCourses - 1. You are given an array prerequisites where prerequisites[i] = [ai, bi] indicates that you must take course bi first if you want to take course ai. For example, the pair [0, 1], indicates that to take course 0 you have to first take course 1. Return true if you can finish all courses. Otherwise, return false. Example 1: Input: numCourses = 2, prerequisites = [[1,0]] Output: true Explanation: There are a total of 2 courses to take. To take course 1 you should have finished course 0. So it is possible. Example 2: Input: numCourses = 2, prerequisites = [[1,0],[0,1]] Output: false Explanation: There are a total of 2 courses to take. To take course 1 you should have finished course 0, and to take course 0 you should also have finished course 1. So it is impossible. Constraints: 1 <= numCourses <= 105 0 <= prerequisites.length <= 5000 prerequisites[i].length == 2 0 <= ai, bi < numCourses All the pairs prerequisites[i] are unique.""" class Solution: def can_finish(self, numCourses: int, prerequisites: List[List[int]]) -> bool: indegree = [0 for i in range(numCourses)] connection = {i: [] for i in range(numCourses)} for link in prerequisites: connection[link[1]].append(link[0]) indegree[link[0]] += 1 zero_indegree = [] for i in range(numCourses): if indegree[i] == 0: zero_indegree.append(i) i = 0 while i < len(zero_indegree): for node in connection[zero_indegree[i]]: indegree[node] -= 1 if indegree[node] == 0: zero_indegree.append(node) i += 1 if len(zero_indegree) == numCourses: return True else: return False def dfs(self): record = [[0 for _ in range(numCourses)] for _ in range(numCourses)] visited = [False for _ in range(numCourses)] for item in prerequisites: record[item[1]][item[0]] = 1 def dfs(num): for i in range(numCourses): if record[num][i] == 1: visited[num] = True if visited[i]: return False else: if not dfs(i): return False visited[num] = False return True for i in range(numCourses): if not dfs(i): return False return True
# SPDX-FileCopyrightText: Copyright (C) 2019-2021 Ryan Finnie # SPDX-License-Identifier: MIT class SMWRand: """Super Mario World random number generator Based on deconstruction by Retro Game Mechanics Explained https://www.youtube.com/watch?v=q15yNrJHOak """ # SPDX-SnippetComment: Originally from https://github.com/rfinnie/rf-pymods # SPDX-SnippetCopyrightText: Copyright (C) 2019-2021 Ryan Finnie # SPDX-LicenseInfoInSnippet: MIT seed_1 = 0 seed_2 = 0 def __enter__(self): return self def __exit__(self, exc_type, exc_value, traceback): pass def _rand(self): self.seed_1 = (self.seed_1 + (self.seed_1 << 2) + 1) & 0xFF self.seed_2 = ( (self.seed_2 << 1) + int((self.seed_2 & 0x90) in (0x90, 0)) ) & 0xFF return self.seed_1 ^ self.seed_2 def rand(self): output_2 = self._rand() output_1 = self._rand() return (output_1, output_2)
class Smwrand: """Super Mario World random number generator Based on deconstruction by Retro Game Mechanics Explained https://www.youtube.com/watch?v=q15yNrJHOak """ seed_1 = 0 seed_2 = 0 def __enter__(self): return self def __exit__(self, exc_type, exc_value, traceback): pass def _rand(self): self.seed_1 = self.seed_1 + (self.seed_1 << 2) + 1 & 255 self.seed_2 = (self.seed_2 << 1) + int(self.seed_2 & 144 in (144, 0)) & 255 return self.seed_1 ^ self.seed_2 def rand(self): output_2 = self._rand() output_1 = self._rand() return (output_1, output_2)
#=================================================================================================================================================================================== # Author: Shlomo Stept # ccvaliditycheck.py will open up a window and determine if any credit card number; entered by the user, is valid. #=================================================================================================================================================================================== # Prompt for User to Enter A credit Card number as a long integer userInput = input("Enter Your Credit Card Number as a long integer: ") # Initilizing variables to keep track of, the Sum of every other even and odd, credit card number totalEven=0 totalOdd=0 # Variable that detemines the number of loops requred due to length of the credit card number entered numberofVariables = len(userInput) # Initalizing variables to keep track of the Loop the program is on, and this is also determine/track the List/ (array) vairable the program needs to use/pull from the userInput countEven = numberofVariables-2 countOdd = numberofVariables-1 # Test to determine of the credit card value entered is the correct length of a credit card (some new cards have 19 digits) if numberofVariables > 12 and numberofVariables < 20: # loop that runs through every ODD number moving from right to left (of the credit card) and adds them all up for loopcounter in range(numberofVariables,0,-2): oddPlacesSingle = int(userInput[countOdd]) totalOdd = totalOdd + oddPlacesSingle countOdd = countOdd - 2 # loop that runs through every EVEN number moving from right to left (of the credit card); doubles that number and then adds them all up for loopcounter in range(numberofVariables-1,0,-2): evenPlacesDouble = 2 * int(userInput[countEven]) # Evaluation, whether the doubling, results in a value more than one digit, and if it does, adds the two digits to get a single digit number if len(str(evenPlacesDouble)) > 1: evenPlacesDouble = str(evenPlacesDouble) evenPlacesDouble = int(evenPlacesDouble[0]) + int(evenPlacesDouble[1]) else: exit totalEven = totalEven + evenPlacesDouble countEven = countEven - 2 # Variable that takes the total of Even values that were doubles, and the total of all ODD values that were just summed, and adds the total odd and total even up total = totalEven + totalOdd # Test to determine if the Grand total, of odd-single and doubled-Even values is divisable by ten. The final step in determining the Validity of the Credit Card Number entered if len (str(total)) > 1: total = str( total ) if int ( total [ (len(str(total))) -1 ]) == 0: # Test to determine of the credit card number entered is associated with VISA, MASTERCARD, DISCOVER, OR AMERICAN EXPRESS. if int(userInput[0]) == 3 and int(userInput[1]) == 7 : print("\n\tYour American Express card is Valid, Congragulations!") elif int(userInput[0]) == 4: print("\n\tYour Visa card is Valid, Congragulations!") elif int(userInput[0]) == 5: print("\n\tYour Master Card card is Valid, Congragulations!") elif int(userInput[0]) == 6: print("\n\tYour Discover card is Valid, Congragulations!") else: print("\n\tYour Alternative credit card is Valid, Congragulations!") # TEST RESULTS that return an invalid, if the credit card number failed to be devided by ten or any of the other validity tests previously run. else: print("\nYour card is Invalid, Please try again.") else: print("\nYour card is Invalid, Please try again.") else: print("\nYour card is Invalid,Please try again.")
user_input = input('Enter Your Credit Card Number as a long integer: ') total_even = 0 total_odd = 0 numberof_variables = len(userInput) count_even = numberofVariables - 2 count_odd = numberofVariables - 1 if numberofVariables > 12 and numberofVariables < 20: for loopcounter in range(numberofVariables, 0, -2): odd_places_single = int(userInput[countOdd]) total_odd = totalOdd + oddPlacesSingle count_odd = countOdd - 2 for loopcounter in range(numberofVariables - 1, 0, -2): even_places_double = 2 * int(userInput[countEven]) if len(str(evenPlacesDouble)) > 1: even_places_double = str(evenPlacesDouble) even_places_double = int(evenPlacesDouble[0]) + int(evenPlacesDouble[1]) else: exit total_even = totalEven + evenPlacesDouble count_even = countEven - 2 total = totalEven + totalOdd if len(str(total)) > 1: total = str(total) if int(total[len(str(total)) - 1]) == 0: if int(userInput[0]) == 3 and int(userInput[1]) == 7: print('\n\tYour American Express card is Valid, Congragulations!') elif int(userInput[0]) == 4: print('\n\tYour Visa card is Valid, Congragulations!') elif int(userInput[0]) == 5: print('\n\tYour Master Card card is Valid, Congragulations!') elif int(userInput[0]) == 6: print('\n\tYour Discover card is Valid, Congragulations!') else: print('\n\tYour Alternative credit card is Valid, Congragulations!') else: print('\nYour card is Invalid, Please try again.') else: print('\nYour card is Invalid, Please try again.') else: print('\nYour card is Invalid,Please try again.')
# Time complexity: O(n) # Approach: Manacher's Algorithm. Please watch this vide for explanation https://youtu.be/V-sEwsca1ak class Solution: def longestPalindrome(self, s: str) -> str: newS = "" n = 2 * len(s) + 1 ind = 0 for j in range(n): if j % 2 == 1: newS += s[ind] ind += 1 else: newS += "$" LPS = [0] * n start, end, i = 0, 0, 0 while i < n: while start > 0 and end < n-1 and newS[start-1] == newS[end+1]: start -= 1 end += 1 LPS[i] = end - start + 1 if end == n - 1: break newCenter = end + (1 if i%2==0 else 0) for j in range(i+1, end+1): LPS[j] = min(LPS[i-(j-i)], 2*(end-j)+1) if j + LPS[i-(j-i)]//2 == end: newCenter = j break i = newCenter start = i - LPS[i]//2 end = i + LPS[i]//2 ind, mx = 0, 0 for j in range(n): if mx < LPS[j]: ind, mx = j, LPS[j] ans = "" start = ind - LPS[ind]//2 end = ind + LPS[ind]//2 for j in range(start, end+1): if newS[j] != "$": ans += newS[j] return ans
class Solution: def longest_palindrome(self, s: str) -> str: new_s = '' n = 2 * len(s) + 1 ind = 0 for j in range(n): if j % 2 == 1: new_s += s[ind] ind += 1 else: new_s += '$' lps = [0] * n (start, end, i) = (0, 0, 0) while i < n: while start > 0 and end < n - 1 and (newS[start - 1] == newS[end + 1]): start -= 1 end += 1 LPS[i] = end - start + 1 if end == n - 1: break new_center = end + (1 if i % 2 == 0 else 0) for j in range(i + 1, end + 1): LPS[j] = min(LPS[i - (j - i)], 2 * (end - j) + 1) if j + LPS[i - (j - i)] // 2 == end: new_center = j break i = newCenter start = i - LPS[i] // 2 end = i + LPS[i] // 2 (ind, mx) = (0, 0) for j in range(n): if mx < LPS[j]: (ind, mx) = (j, LPS[j]) ans = '' start = ind - LPS[ind] // 2 end = ind + LPS[ind] // 2 for j in range(start, end + 1): if newS[j] != '$': ans += newS[j] return ans
def is_index_valid(i, length): return 0 <= i < length initial_loot = input().split('|') while True: line = input() if line == 'Yohoho!': break command = line.split(' ', maxsplit=1) if command[0] == 'Loot': items = command[1].split() for item in items: if item not in initial_loot: initial_loot.insert(0, item) elif command[0] == 'Drop': index = int(command[1]) if not is_index_valid(index, len(initial_loot)): continue dropped_item = initial_loot.pop(index) initial_loot.append(dropped_item) elif command[0] == 'Steal': count = int(command[1]) stolen_items = [] if count <= len(initial_loot): for _ in range(count): stolen = initial_loot.pop() stolen_items.insert(0, stolen) else: for _ in range(len(initial_loot)): stolen = initial_loot.pop() stolen_items.insert(0, stolen) print(', '.join(stolen_items)) items_count = len(initial_loot) if len(initial_loot) > 0: total_length = 0 for item in initial_loot: item_length = len(item) total_length += item_length average_gain = total_length / items_count print(f'Average treasure gain: {average_gain:.2f} pirate credits.') else: print(f'Failed treasure hunt.')
def is_index_valid(i, length): return 0 <= i < length initial_loot = input().split('|') while True: line = input() if line == 'Yohoho!': break command = line.split(' ', maxsplit=1) if command[0] == 'Loot': items = command[1].split() for item in items: if item not in initial_loot: initial_loot.insert(0, item) elif command[0] == 'Drop': index = int(command[1]) if not is_index_valid(index, len(initial_loot)): continue dropped_item = initial_loot.pop(index) initial_loot.append(dropped_item) elif command[0] == 'Steal': count = int(command[1]) stolen_items = [] if count <= len(initial_loot): for _ in range(count): stolen = initial_loot.pop() stolen_items.insert(0, stolen) else: for _ in range(len(initial_loot)): stolen = initial_loot.pop() stolen_items.insert(0, stolen) print(', '.join(stolen_items)) items_count = len(initial_loot) if len(initial_loot) > 0: total_length = 0 for item in initial_loot: item_length = len(item) total_length += item_length average_gain = total_length / items_count print(f'Average treasure gain: {average_gain:.2f} pirate credits.') else: print(f'Failed treasure hunt.')
__author__ = 'Administrator' # class Foo(object): # instance = None # # def __init__(self): # self.name = 'alex' # @classmethod # def get_instance(cls): # if Foo.instance: # return Foo.instance # else: # Foo.instance = Foo() # return Foo.instance # # def process(self): # return '123' # obj1 = Foo() # obj2 = Foo() # print(id(obj1),id(obj2)) # obj1 = Foo.get_instance() # obj2 = Foo.get_instance() # print(id(obj1),id(obj2)) class Foo(object): instance = None def __init__(self): self.name = 'alex' def __new__(cls, *args, **kwargs): if Foo.instance: return Foo.instance else: Foo.instance = object.__new__(cls, *args, **kwargs) return Foo.instance # obj1 = Foo() # obj2 = Foo() # print(id(obj1),id(obj2))
__author__ = 'Administrator' class Foo(object): instance = None def __init__(self): self.name = 'alex' def __new__(cls, *args, **kwargs): if Foo.instance: return Foo.instance else: Foo.instance = object.__new__(cls, *args, **kwargs) return Foo.instance
# Requer atributo e atributo_comp = {"atributo": int (id_atributo), "atributo_comp" : int (id_atributo)} select_efetividades = lambda : """ Select fator FROM efetividades WHERE atributo = :atributo AND atributo_comp = :atributo_comp """
select_efetividades = lambda : '\n Select fator \n FROM efetividades \n WHERE atributo = :atributo \n AND atributo_comp = :atributo_comp\n'
inputfile = open('primes.txt') lista = inputfile.read().split(',') inputfile.close() lista = sorted([int(i) for i in lista]) outputfile = open('primes_sorted.txt', 'w') for i in lista: outputfile.write(str(i)+',')
inputfile = open('primes.txt') lista = inputfile.read().split(',') inputfile.close() lista = sorted([int(i) for i in lista]) outputfile = open('primes_sorted.txt', 'w') for i in lista: outputfile.write(str(i) + ',')
inp = input("Input roman numerals: ").upper() + " " tot = 0 numeralDict = { "I":1, "V":5, "X":10, "L":50, "C":100, "D":500, "M":1000 } inp = list(inp) for charNum in range(len(inp)): char = inp[charNum] if(char == "I"): if(inp[charNum + 1] != "I" and inp[charNum + 1] != " "): tot -= 1 else: tot += 1 elif(char != " "): tot += numeralDict[char] print(tot)
inp = input('Input roman numerals: ').upper() + ' ' tot = 0 numeral_dict = {'I': 1, 'V': 5, 'X': 10, 'L': 50, 'C': 100, 'D': 500, 'M': 1000} inp = list(inp) for char_num in range(len(inp)): char = inp[charNum] if char == 'I': if inp[charNum + 1] != 'I' and inp[charNum + 1] != ' ': tot -= 1 else: tot += 1 elif char != ' ': tot += numeralDict[char] print(tot)
f=open('countlines.txt','rt') n=0 for i in f: n+=1 print(n) f.close()
f = open('countlines.txt', 'rt') n = 0 for i in f: n += 1 print(n) f.close()
our_method_top50_dict = { 2: { 'is_hired_1mo': 0.98, 'is_unemployed': 0.98, 'lost_job_1mo': 0.74, 'job_search': 0.12, 'job_offer': 1.0}, 0: { 'is_hired_1mo': 0.92, 'is_unemployed': 0.06, 'lost_job_1mo': 0.3, 'job_search': 1.0, 'job_offer': 1.0}, 1: { 'is_hired_1mo': 1.0, 'is_unemployed': 0.72, 'lost_job_1mo': 0.88, 'job_search': 1.0, 'job_offer': 1.0}, 3: { 'is_hired_1mo': 1.0, 'is_unemployed': 0.88, 'lost_job_1mo': 0.06, 'job_search': 1.0, 'job_offer': 1.0}, 4: { 'is_hired_1mo': 1.0, 'is_unemployed': 0.96, 'lost_job_1mo': 0.72, 'job_search': 1.0, 'job_offer': 1.0}} adaptive_top50_dict = { 0: { 'is_hired_1mo': 0.92, 'is_unemployed': 0.06, 'lost_job_1mo': 0.3, 'job_search': 1.0, 'job_offer': 1.0}, 3: { 'is_hired_1mo': 1.0, 'is_unemployed': 1.0, 'lost_job_1mo': 0.8, 'job_search': 1.0, 'job_offer': 1.0}, 1: { 'is_hired_1mo': 0.96, 'is_unemployed': 0.92, 'lost_job_1mo': 0.4, 'job_search': 0.44, 'job_offer': 1.0}, 2: { 'is_hired_1mo': 1.0, 'is_unemployed': 1.0, 'lost_job_1mo': 0.14, 'job_search': 1.0, 'job_offer': 0.98}, 4: { 'is_hired_1mo': 1.0, 'is_unemployed': 1.0, 'lost_job_1mo': 1.0, 'job_search': 1.0, 'job_offer': 1.0}} uncertainty_top50_dict = { 0: { 'is_hired_1mo': 0.92, 'is_unemployed': 0.06, 'lost_job_1mo': 0.3, 'job_search': 1.0, 'job_offer': 1.0}, 3: { 'is_hired_1mo': 0.98, 'is_unemployed': 0.9, 'lost_job_1mo': 0.82, 'job_search': 1.0, 'job_offer': 1.0}, 2: { 'is_hired_1mo': 0.64, 'is_unemployed': 1.0, 'lost_job_1mo': 0.92, 'job_search': 1.0, 'job_offer': 1.0}, 1: { 'is_hired_1mo': 1.0, 'is_unemployed': 0.98, 'lost_job_1mo': 0.12, 'job_search': 1.0, 'job_offer': 1.0}, 4: { 'is_hired_1mo': 1.0, 'is_unemployed': 1.0, 'lost_job_1mo': 1.0, 'job_search': 1.0, 'job_offer': 1.0}} uncertainty_uncalibrated_top50_dict = { 0: { 'is_hired_1mo': 0.92, 'is_unemployed': 0.06, 'lost_job_1mo': 0.3, 'job_search': 1.0, 'job_offer': 1.0}, 3: { 'is_hired_1mo': 0.94, 'is_unemployed': 0.36, 'lost_job_1mo': 0.86, 'job_search': 1.0, 'job_offer': 0.28}, 4: { 'is_hired_1mo': 0.54, 'is_unemployed': 0.98, 'lost_job_1mo': 0.02, 'job_search': 0.26, 'job_offer': 1.0}, 2: { 'is_hired_1mo': 1.0, 'is_unemployed': 0.78, 'lost_job_1mo': 0.94, 'job_search': 1.0, 'job_offer': 1.0}, 1: { 'is_hired_1mo': 0.94, 'is_unemployed': 0.36, 'lost_job_1mo': 0.66, 'job_search': 1.0, 'job_offer': 0.98}} our_method_top10K_dict = { 2: { 'is_hired_1mo': 1.0, 'is_unemployed': 0.9285714285714286, 'lost_job_1mo': 0.32857142857142857, 'job_search': 0.5285714285714286, 'job_offer': 1.0}, 0: { 'is_hired_1mo': 0.8, 'is_unemployed': 0.08571428571428572, 'lost_job_1mo': 0.07142857142857142, 'job_search': 0.8714285714285714, 'job_offer': 1.0}, 1: { 'is_hired_1mo': 0.9571428571428572, 'is_unemployed': 0.6285714285714286, 'lost_job_1mo': 0.5285714285714286, 'job_search': 0.8571428571428571, 'job_offer': 1.0}, 3: { 'is_hired_1mo': 0.9714285714285714, 'is_unemployed': 0.5428571428571428, 'lost_job_1mo': 0.1, 'job_search': 1.0, 'job_offer': 1.0}, 4: { 'is_hired_1mo': 0.9857142857142858, 'is_unemployed': 0.9285714285714286, 'lost_job_1mo': 0.5, 'job_search': 1.0, 'job_offer': 1.0}} adaptive_top10K_dict = { 3: { 'is_hired_1mo': 0.8857142857142857, 'is_unemployed': 0.5857142857142857, 'lost_job_1mo': 0.5714285714285714, 'job_search': 1.0, 'job_offer': 1.0}, 1: { 'is_hired_1mo': 0.9428571428571428, 'is_unemployed': 0.7142857142857143, 'lost_job_1mo': 0.14285714285714285, 'job_search': 0.38571428571428573, 'job_offer': 1.0}, 2: { 'is_hired_1mo': 0.9285714285714286, 'is_unemployed': 0.8571428571428571, 'lost_job_1mo': 0.05714285714285714, 'job_search': 0.9571428571428572, 'job_offer': 1.0}, 4: { 'is_hired_1mo': 0.8571428571428571, 'is_unemployed': 0.9714285714285714, 'lost_job_1mo': 0.5571428571428572, 'job_search': 0.9857142857142858, 'job_offer': 1.0}, 0: { 'is_hired_1mo': 0.8, 'is_unemployed': 0.08571428571428572, 'lost_job_1mo': 0.07142857142857142, 'job_search': 0.8714285714285714, 'job_offer': 1.0}, } uncertainty_top10K_dict = { 3: { 'is_hired_1mo': 0.9857142857142858, 'is_unemployed': 0.9, 'lost_job_1mo': 0.5571428571428572, 'job_search': 1.0, 'job_offer': 1.0}, 2: { 'is_hired_1mo': 0.6571428571428571, 'is_unemployed': 0.9, 'lost_job_1mo': 0.4714285714285714, 'job_search': 0.9714285714285714, 'job_offer': 1.0}, 1: { 'is_hired_1mo': 1.0, 'is_unemployed': 0.6428571428571429, 'lost_job_1mo': 0.11428571428571428, 'job_search': 1.0, 'job_offer': 1.0}, 4: { 'is_hired_1mo': 0.8571428571428571, 'is_unemployed': 0.8714285714285714, 'lost_job_1mo': 0.5571428571428572, 'job_search': 0.9857142857142858, 'job_offer': 1.0}, 0: { 'is_hired_1mo': 0.8, 'is_unemployed': 0.08571428571428572, 'lost_job_1mo': 0.07142857142857142, 'job_search': 0.8714285714285714, 'job_offer': 1.0}, } uncertainty_uncalibrated_top10k_dict = { 3: { 'is_hired_1mo': 1.0, 'is_unemployed': 0.08571428571428572, 'lost_job_1mo': 0.45714285714285713, 'job_search': 0.9857142857142858, 'job_offer': 0.0}, 4: { 'is_hired_1mo': 0.6857142857142857, 'is_unemployed': 0.6714285714285714, 'lost_job_1mo': 0.07142857142857142, 'job_search': 0.5714285714285714, 'job_offer': 1.0}, 2: { 'is_hired_1mo': 0.9857142857142858, 'is_unemployed': 0.5428571428571428, 'lost_job_1mo': 0.6142857142857143, 'job_search': 0.9857142857142858, 'job_offer': 1.0}, 1: { 'is_hired_1mo': 0.9571428571428572, 'is_unemployed': 0.21428571428571427, 'lost_job_1mo': 0.22857142857142856, 'job_search': 0.6857142857142857, 'job_offer': 0.9428571428571428}, 0: { 'is_hired_1mo': 0.8, 'is_unemployed': 0.08571428571428572, 'lost_job_1mo': 0.07142857142857142, 'job_search': 0.8714285714285714, 'job_offer': 1.0}, } our_method_topP_dict = { 2: { 'is_hired_1mo': 0.8666666666666667, 'is_unemployed': 1.0, 'lost_job_1mo': 0.55, 'job_search': 0.6, 'job_offer': 1.0}, 0: { 'is_hired_1mo': 0.8, 'is_unemployed': 0.08571428571428572, 'lost_job_1mo': 0.1724137931034483, 'job_search': 0.8714285714285714, 'job_offer': 1.0}, 1: { 'is_hired_1mo': 0.8, 'is_unemployed': 0.7, 'lost_job_1mo': 0.85, 'job_search': 0.8375, 'job_offer': 1.0}, 3: { 'is_hired_1mo': 0.77, 'is_unemployed': 0.5222222222222223, 'lost_job_1mo': 0.1, 'job_search': 0.96, 'job_offer': 0.98}, 4: { 'is_hired_1mo': 0.9375, 'is_unemployed': 0.8111111111111111, 'lost_job_1mo': 0.5833333333333334, 'job_search': 0.7142857142857143, 'job_offer': 0.9866666666666667}} adaptive_topP_dict = { 3: { 'is_hired_1mo': 0.8857142857142857, 'is_unemployed': 0.9512195121951219, 'lost_job_1mo': 0.8, 'job_search': 0.91, 'job_offer': 0.98}, 1: { 'is_hired_1mo': 0.875, 'is_unemployed': 0.6875, 'lost_job_1mo': 0.3, 'job_search': 0.4, 'job_offer': 0.9733333333333334}, 2: { 'is_hired_1mo': 0.8875, 'is_unemployed': 0.9666666666666667, 'lost_job_1mo': 0.1, 'job_search': 0.9166666666666666, 'job_offer': 0.94}, 4: { 'is_hired_1mo': 0.8571428571428571, 'is_unemployed': 0.9, 'lost_job_1mo': 0.76, 'job_search': 0.95, 'job_offer': 0.98}, 0: { 'is_hired_1mo': 0.8, 'is_unemployed': 0.08571428571428572, 'lost_job_1mo': 0.1724137931034483, 'job_search': 0.8714285714285714, 'job_offer': 1.0}, } uncertainty_topP_dict = { 3: { 'is_hired_1mo': 0.9333333333333333, 'is_unemployed': 0.7555555555555555, 'lost_job_1mo': 0.78, 'job_search': 0.9, 'job_offer': 0.9533333333333334}, 2: { 'is_hired_1mo': 0.6444444444444445, 'is_unemployed': 0.825, 'lost_job_1mo': 0.75, 'job_search': 0.95, 'job_offer': 1.0}, 1: { 'is_hired_1mo': 0.7454545454545455, 'is_unemployed': 0.7333333333333333, 'lost_job_1mo': 0.175, 'job_search': 0.89, 'job_offer': 0.94}, 4: { 'is_hired_1mo': 0.8, 'is_unemployed': 0.8, 'lost_job_1mo': 0.6333333333333333, 'job_search': 0.8, 'job_offer': 0.9666666666666667}, 0: { 'is_hired_1mo': 0.8, 'is_unemployed': 0.08571428571428572, 'lost_job_1mo': 0.1724137931034483, 'job_search': 0.8714285714285714, 'job_offer': 1.0}, } uncertainty_uncalibrated_topP_dict = { 3: { 'is_hired_1mo': 0.9555555555555556, 'is_unemployed': 0.1, 'lost_job_1mo': 0.85, 'job_search': 0.9666666666666667, 'job_offer': 0.0}, 4: { 'is_hired_1mo': 0.7, 'is_unemployed': 0.6714285714285714, 'lost_job_1mo': 0.07142857142857142, 'job_search': 0.59, 'job_offer': 0.9666666666666667}, 2: { 'is_hired_1mo': 0.8777777777777778, 'is_unemployed': 0.43333333333333335, 'lost_job_1mo': 0.7, 'job_search': 0.9333333333333333, 'job_offer': 0.9857142857142858}, 1: { 'is_hired_1mo': 0.6727272727272727, 'is_unemployed': 0.358974358974359, 'lost_job_1mo': 0.5333333333333333, 'job_search': 0.7166666666666667, 'job_offer': 0.94}, 0: { 'is_hired_1mo': 0.8, 'is_unemployed': 0.08571428571428572, 'lost_job_1mo': 0.1724137931034483, 'job_search': 0.8714285714285714, 'job_offer': 1.0}, } our_method_new_dict = { 4: { 'job_search': { 'numerator': 273734, 'sem': 17108.4445409312}, 'is_hired_1mo': { 'numerator': 14419, 'sem': 366.99671598899175}, 'lost_job_1mo': { 'numerator': 2227, 'sem': 539.6417202779419}, 'is_unemployed': { 'numerator': 21711, 'sem': 12857.60055036169}, 'job_offer': { 'numerator': 398140, 'sem': 44551.92694544843}}, 0: { 'is_unemployed': { 'numerator': 5363, 'sem': 16693273.716407115}, 'job_search': { 'numerator': 9955, 'sem': 4007.9818390547352}, 'lost_job_1mo': { 'numerator': 110, 'sem': 2507.0304745155704}, 'is_hired_1mo': { 'numerator': 5876, 'sem': 1440.5507101946998}, 'job_offer': { 'numerator': 397551, 'sem': 21053.672213431728}}, 3: { 'is_hired_1mo': { 'numerator': 32170, 'sem': 15120.377307912013}, 'lost_job_1mo': { 'numerator': 6611, 'sem': 2235705.395599921}, 'is_unemployed': { 'numerator': 25741, 'sem': 7611.7323763009435}, 'job_offer': { 'numerator': 603974, 'sem': 68313.02689650582}, 'job_search': { 'numerator': 53456, 'sem': 7483.790444209734}}, 2: { 'is_unemployed': { 'numerator': 4646, 'sem': 626.9208018618386}, 'is_hired_1mo': { 'numerator': 18584, 'sem': 3451.8503622544213}, 'job_offer': { 'numerator': 398040, 'sem': 11364.921234701022}, 'job_search': { 'numerator': 63723, 'sem': 10846.197020221041}, 'lost_job_1mo': { 'numerator': 413, 'sem': 306.64505669819584}}, 1: { 'is_hired_1mo': { 'numerator': 22382, 'sem': 11409.994092103772}, 'job_offer': { 'numerator': 388810, 'sem': 14451.582794272697}, 'lost_job_1mo': { 'numerator': 437, 'sem': 175.86948118261208}, 'is_unemployed': { 'numerator': 2813, 'sem': 948.9439720005547}, 'job_search': { 'numerator': 16140, 'sem': 4210.272625790964}}} adaptive_new_dict = { 0: { 'is_unemployed': { 'numerator': 5363, 'sem': 16693273.716407115}, 'job_search': { 'numerator': 9955, 'sem': 4007.9818390547352}, 'lost_job_1mo': { 'numerator': 110, 'sem': 2507.0304745155704}, 'is_hired_1mo': { 'numerator': 5876, 'sem': 1440.5507101946998}, 'job_offer': { 'numerator': 397551, 'sem': 21053.672213431728}}, 1: { 'is_unemployed': { 'numerator': 12031, 'sem': 7726.799776019945}, 'lost_job_1mo': { 'numerator': 111, 'sem': 515.2125927164042}, 'job_search': { 'numerator': 13663, 'sem': 5549.774344602734}, 'is_hired_1mo': { 'numerator': 13799, 'sem': 5795.455532339655}, 'job_offer': { 'numerator': 452457, 'sem': 62954.13118906742}}, 2: { 'job_search': { 'numerator': 153855, 'sem': 11781.304215985185}, 'is_unemployed': { 'numerator': 4371, 'sem': 1269.4789663340573}, 'job_offer': { 'numerator': 573631, 'sem': 56246.765267860545}, 'lost_job_1mo': { 'numerator': 418, 'sem': 5649172.944711616}, 'is_hired_1mo': { 'numerator': 16584, 'sem': 3087.7931741284956}}, 4: { 'is_unemployed': { 'numerator': 16014, 'sem': 6253.689632372853}, 'is_hired_1mo': { 'numerator': 8766, 'sem': 2875.0965294760767}, 'lost_job_1mo': { 'numerator': 1238, 'sem': 480.9785550015688}, 'job_search': { 'numerator': 17117, 'sem': 1808.3838577036793}, 'job_offer': { 'numerator': 502520, 'sem': 41362.28738283996}}, 3: { 'is_unemployed': { 'numerator': 1002, 'sem': 418.159029977143}, 'is_hired_1mo': { 'numerator': 7953, 'sem': 1637.1488788134022}, 'job_search': { 'numerator': 46384, 'sem': 3869.1915428802877}, 'lost_job_1mo': { 'numerator': 1047, 'sem': 266.4834153426912}, 'job_offer': { 'numerator': 512423, 'sem': 41770.65447128737}}} uncertainty_new_dict = { 4: { 'lost_job_1mo': { 'numerator': 2340, 'sem': 1014.7282972059196}, 'job_search': { 'numerator': 78380, 'sem': 97346.85658409167}, 'is_unemployed': { 'numerator': 14536, 'sem': 6791.858226085842}, 'is_hired_1mo': { 'numerator': 10119, 'sem': 2972.5758399128595}, 'job_offer': { 'numerator': 401625, 'sem': 21081.31529751928}}, 1: { 'is_unemployed': { 'numerator': 3228, 'sem': 1228.0100832225278}, 'lost_job_1mo': { 'numerator': 552, 'sem': 4469674.866698298}, 'job_offer': { 'numerator': 612708, 'sem': 57112.29214399502}, 'job_search': { 'numerator': 42962, 'sem': 27601.546048149256}, 'is_hired_1mo': { 'numerator': 97768, 'sem': 47307.47888641291}}, 3: { 'job_search': { 'numerator': 93841, 'sem': 31369.23556608593}, 'job_offer': { 'numerator': 516548, 'sem': 88235.57752764622}, 'is_unemployed': { 'numerator': 20132, 'sem': 5044.345309986642}, 'lost_job_1mo': { 'numerator': 1070, 'sem': 214.21570463056867}, 'is_hired_1mo': { 'numerator': 27930, 'sem': 3577.721669440321}}, 2: { 'is_hired_1mo': { 'numerator': 20810, 'sem': 2861.0333260285565}, 'is_unemployed': { 'numerator': 12728, 'sem': 1700.1869141976804}, 'job_offer': { 'numerator': 398092, 'sem': 10243.721819469301}, 'lost_job_1mo': { 'numerator': 637, 'sem': 241.20102291602242}, 'job_search': { 'numerator': 51418, 'sem': 2575.3470007528185}}, 0: { 'is_unemployed': { 'numerator': 5363, 'sem': 16693273.716407115}, 'job_search': { 'numerator': 9955, 'sem': 4007.9818390547352}, 'lost_job_1mo': { 'numerator': 110, 'sem': 2507.0304745155704}, 'is_hired_1mo': { 'numerator': 5876, 'sem': 1440.5507101946998}, 'job_offer': { 'numerator': 397551, 'sem': 21053.672213431728}}, } uncertainty_uncalibrated_new_dict = { 0: { 'is_unemployed': { 'numerator': 5363, 'sem': 16693273.716407115}, 'job_search': { 'numerator': 9955, 'sem': 4007.9818390547352}, 'lost_job_1mo': { 'numerator': 110, 'sem': 2507.0304745155704}, 'is_hired_1mo': { 'numerator': 5876, 'sem': 1440.5507101946998}, 'job_offer': { 'numerator': 397551, 'sem': 21053.672213431728}}, 4: { 'lost_job_1mo': { 'numerator': 8916, 'sem': 11036527.93587803}, 'is_unemployed': { 'numerator': 7001, 'sem': 21549.54012277195}, 'is_hired_1mo': { 'numerator': 27676, 'sem': 2636.147839352088}, 'job_offer': { 'numerator': 625859, 'sem': 29576.835392492}, 'job_search': { 'numerator': 50729, 'sem': 9656.648068224675}}, 3: { 'job_search': { 'numerator': 29614, 'sem': 2545.5133076343727}, 'is_unemployed': { 'numerator': 1031, 'sem': 2525.835113127583}, 'is_hired_1mo': { 'numerator': 21080, 'sem': 2532.796165703048}, 'lost_job_1mo': { 'numerator': 738, 'sem': 250.86318309712837}, 'job_offer': { 'numerator': 10, 'sem': 0}}, 2: { 'is_hired_1mo': { 'numerator': 28655, 'sem': 2430.142652865983}, 'lost_job_1mo': { 'numerator': 2937, 'sem': 831.243117876841}, 'job_search': { 'numerator': 23071, 'sem': 3054.9995697587638}, 'job_offer': { 'numerator': 376527, 'sem': 28485.961558385043}, 'is_unemployed': { 'numerator': 25294, 'sem': 6380.589292580216}}, 1: { 'job_search': { 'numerator': 2863, 'sem': 1345.1047321110705}, 'lost_job_1mo': { 'numerator': 131, 'sem': 105.74747007400558}, 'is_unemployed': { 'numerator': 326, 'sem': 762.636610213694}, 'job_offer': { 'numerator': 437090, 'sem': 29739.845930574476}, 'is_hired_1mo': { 'numerator': 76054, 'sem': 24013.321646355937}}}
our_method_top50_dict = {2: {'is_hired_1mo': 0.98, 'is_unemployed': 0.98, 'lost_job_1mo': 0.74, 'job_search': 0.12, 'job_offer': 1.0}, 0: {'is_hired_1mo': 0.92, 'is_unemployed': 0.06, 'lost_job_1mo': 0.3, 'job_search': 1.0, 'job_offer': 1.0}, 1: {'is_hired_1mo': 1.0, 'is_unemployed': 0.72, 'lost_job_1mo': 0.88, 'job_search': 1.0, 'job_offer': 1.0}, 3: {'is_hired_1mo': 1.0, 'is_unemployed': 0.88, 'lost_job_1mo': 0.06, 'job_search': 1.0, 'job_offer': 1.0}, 4: {'is_hired_1mo': 1.0, 'is_unemployed': 0.96, 'lost_job_1mo': 0.72, 'job_search': 1.0, 'job_offer': 1.0}} adaptive_top50_dict = {0: {'is_hired_1mo': 0.92, 'is_unemployed': 0.06, 'lost_job_1mo': 0.3, 'job_search': 1.0, 'job_offer': 1.0}, 3: {'is_hired_1mo': 1.0, 'is_unemployed': 1.0, 'lost_job_1mo': 0.8, 'job_search': 1.0, 'job_offer': 1.0}, 1: {'is_hired_1mo': 0.96, 'is_unemployed': 0.92, 'lost_job_1mo': 0.4, 'job_search': 0.44, 'job_offer': 1.0}, 2: {'is_hired_1mo': 1.0, 'is_unemployed': 1.0, 'lost_job_1mo': 0.14, 'job_search': 1.0, 'job_offer': 0.98}, 4: {'is_hired_1mo': 1.0, 'is_unemployed': 1.0, 'lost_job_1mo': 1.0, 'job_search': 1.0, 'job_offer': 1.0}} uncertainty_top50_dict = {0: {'is_hired_1mo': 0.92, 'is_unemployed': 0.06, 'lost_job_1mo': 0.3, 'job_search': 1.0, 'job_offer': 1.0}, 3: {'is_hired_1mo': 0.98, 'is_unemployed': 0.9, 'lost_job_1mo': 0.82, 'job_search': 1.0, 'job_offer': 1.0}, 2: {'is_hired_1mo': 0.64, 'is_unemployed': 1.0, 'lost_job_1mo': 0.92, 'job_search': 1.0, 'job_offer': 1.0}, 1: {'is_hired_1mo': 1.0, 'is_unemployed': 0.98, 'lost_job_1mo': 0.12, 'job_search': 1.0, 'job_offer': 1.0}, 4: {'is_hired_1mo': 1.0, 'is_unemployed': 1.0, 'lost_job_1mo': 1.0, 'job_search': 1.0, 'job_offer': 1.0}} uncertainty_uncalibrated_top50_dict = {0: {'is_hired_1mo': 0.92, 'is_unemployed': 0.06, 'lost_job_1mo': 0.3, 'job_search': 1.0, 'job_offer': 1.0}, 3: {'is_hired_1mo': 0.94, 'is_unemployed': 0.36, 'lost_job_1mo': 0.86, 'job_search': 1.0, 'job_offer': 0.28}, 4: {'is_hired_1mo': 0.54, 'is_unemployed': 0.98, 'lost_job_1mo': 0.02, 'job_search': 0.26, 'job_offer': 1.0}, 2: {'is_hired_1mo': 1.0, 'is_unemployed': 0.78, 'lost_job_1mo': 0.94, 'job_search': 1.0, 'job_offer': 1.0}, 1: {'is_hired_1mo': 0.94, 'is_unemployed': 0.36, 'lost_job_1mo': 0.66, 'job_search': 1.0, 'job_offer': 0.98}} our_method_top10_k_dict = {2: {'is_hired_1mo': 1.0, 'is_unemployed': 0.9285714285714286, 'lost_job_1mo': 0.32857142857142857, 'job_search': 0.5285714285714286, 'job_offer': 1.0}, 0: {'is_hired_1mo': 0.8, 'is_unemployed': 0.08571428571428572, 'lost_job_1mo': 0.07142857142857142, 'job_search': 0.8714285714285714, 'job_offer': 1.0}, 1: {'is_hired_1mo': 0.9571428571428572, 'is_unemployed': 0.6285714285714286, 'lost_job_1mo': 0.5285714285714286, 'job_search': 0.8571428571428571, 'job_offer': 1.0}, 3: {'is_hired_1mo': 0.9714285714285714, 'is_unemployed': 0.5428571428571428, 'lost_job_1mo': 0.1, 'job_search': 1.0, 'job_offer': 1.0}, 4: {'is_hired_1mo': 0.9857142857142858, 'is_unemployed': 0.9285714285714286, 'lost_job_1mo': 0.5, 'job_search': 1.0, 'job_offer': 1.0}} adaptive_top10_k_dict = {3: {'is_hired_1mo': 0.8857142857142857, 'is_unemployed': 0.5857142857142857, 'lost_job_1mo': 0.5714285714285714, 'job_search': 1.0, 'job_offer': 1.0}, 1: {'is_hired_1mo': 0.9428571428571428, 'is_unemployed': 0.7142857142857143, 'lost_job_1mo': 0.14285714285714285, 'job_search': 0.38571428571428573, 'job_offer': 1.0}, 2: {'is_hired_1mo': 0.9285714285714286, 'is_unemployed': 0.8571428571428571, 'lost_job_1mo': 0.05714285714285714, 'job_search': 0.9571428571428572, 'job_offer': 1.0}, 4: {'is_hired_1mo': 0.8571428571428571, 'is_unemployed': 0.9714285714285714, 'lost_job_1mo': 0.5571428571428572, 'job_search': 0.9857142857142858, 'job_offer': 1.0}, 0: {'is_hired_1mo': 0.8, 'is_unemployed': 0.08571428571428572, 'lost_job_1mo': 0.07142857142857142, 'job_search': 0.8714285714285714, 'job_offer': 1.0}} uncertainty_top10_k_dict = {3: {'is_hired_1mo': 0.9857142857142858, 'is_unemployed': 0.9, 'lost_job_1mo': 0.5571428571428572, 'job_search': 1.0, 'job_offer': 1.0}, 2: {'is_hired_1mo': 0.6571428571428571, 'is_unemployed': 0.9, 'lost_job_1mo': 0.4714285714285714, 'job_search': 0.9714285714285714, 'job_offer': 1.0}, 1: {'is_hired_1mo': 1.0, 'is_unemployed': 0.6428571428571429, 'lost_job_1mo': 0.11428571428571428, 'job_search': 1.0, 'job_offer': 1.0}, 4: {'is_hired_1mo': 0.8571428571428571, 'is_unemployed': 0.8714285714285714, 'lost_job_1mo': 0.5571428571428572, 'job_search': 0.9857142857142858, 'job_offer': 1.0}, 0: {'is_hired_1mo': 0.8, 'is_unemployed': 0.08571428571428572, 'lost_job_1mo': 0.07142857142857142, 'job_search': 0.8714285714285714, 'job_offer': 1.0}} uncertainty_uncalibrated_top10k_dict = {3: {'is_hired_1mo': 1.0, 'is_unemployed': 0.08571428571428572, 'lost_job_1mo': 0.45714285714285713, 'job_search': 0.9857142857142858, 'job_offer': 0.0}, 4: {'is_hired_1mo': 0.6857142857142857, 'is_unemployed': 0.6714285714285714, 'lost_job_1mo': 0.07142857142857142, 'job_search': 0.5714285714285714, 'job_offer': 1.0}, 2: {'is_hired_1mo': 0.9857142857142858, 'is_unemployed': 0.5428571428571428, 'lost_job_1mo': 0.6142857142857143, 'job_search': 0.9857142857142858, 'job_offer': 1.0}, 1: {'is_hired_1mo': 0.9571428571428572, 'is_unemployed': 0.21428571428571427, 'lost_job_1mo': 0.22857142857142856, 'job_search': 0.6857142857142857, 'job_offer': 0.9428571428571428}, 0: {'is_hired_1mo': 0.8, 'is_unemployed': 0.08571428571428572, 'lost_job_1mo': 0.07142857142857142, 'job_search': 0.8714285714285714, 'job_offer': 1.0}} our_method_top_p_dict = {2: {'is_hired_1mo': 0.8666666666666667, 'is_unemployed': 1.0, 'lost_job_1mo': 0.55, 'job_search': 0.6, 'job_offer': 1.0}, 0: {'is_hired_1mo': 0.8, 'is_unemployed': 0.08571428571428572, 'lost_job_1mo': 0.1724137931034483, 'job_search': 0.8714285714285714, 'job_offer': 1.0}, 1: {'is_hired_1mo': 0.8, 'is_unemployed': 0.7, 'lost_job_1mo': 0.85, 'job_search': 0.8375, 'job_offer': 1.0}, 3: {'is_hired_1mo': 0.77, 'is_unemployed': 0.5222222222222223, 'lost_job_1mo': 0.1, 'job_search': 0.96, 'job_offer': 0.98}, 4: {'is_hired_1mo': 0.9375, 'is_unemployed': 0.8111111111111111, 'lost_job_1mo': 0.5833333333333334, 'job_search': 0.7142857142857143, 'job_offer': 0.9866666666666667}} adaptive_top_p_dict = {3: {'is_hired_1mo': 0.8857142857142857, 'is_unemployed': 0.9512195121951219, 'lost_job_1mo': 0.8, 'job_search': 0.91, 'job_offer': 0.98}, 1: {'is_hired_1mo': 0.875, 'is_unemployed': 0.6875, 'lost_job_1mo': 0.3, 'job_search': 0.4, 'job_offer': 0.9733333333333334}, 2: {'is_hired_1mo': 0.8875, 'is_unemployed': 0.9666666666666667, 'lost_job_1mo': 0.1, 'job_search': 0.9166666666666666, 'job_offer': 0.94}, 4: {'is_hired_1mo': 0.8571428571428571, 'is_unemployed': 0.9, 'lost_job_1mo': 0.76, 'job_search': 0.95, 'job_offer': 0.98}, 0: {'is_hired_1mo': 0.8, 'is_unemployed': 0.08571428571428572, 'lost_job_1mo': 0.1724137931034483, 'job_search': 0.8714285714285714, 'job_offer': 1.0}} uncertainty_top_p_dict = {3: {'is_hired_1mo': 0.9333333333333333, 'is_unemployed': 0.7555555555555555, 'lost_job_1mo': 0.78, 'job_search': 0.9, 'job_offer': 0.9533333333333334}, 2: {'is_hired_1mo': 0.6444444444444445, 'is_unemployed': 0.825, 'lost_job_1mo': 0.75, 'job_search': 0.95, 'job_offer': 1.0}, 1: {'is_hired_1mo': 0.7454545454545455, 'is_unemployed': 0.7333333333333333, 'lost_job_1mo': 0.175, 'job_search': 0.89, 'job_offer': 0.94}, 4: {'is_hired_1mo': 0.8, 'is_unemployed': 0.8, 'lost_job_1mo': 0.6333333333333333, 'job_search': 0.8, 'job_offer': 0.9666666666666667}, 0: {'is_hired_1mo': 0.8, 'is_unemployed': 0.08571428571428572, 'lost_job_1mo': 0.1724137931034483, 'job_search': 0.8714285714285714, 'job_offer': 1.0}} uncertainty_uncalibrated_top_p_dict = {3: {'is_hired_1mo': 0.9555555555555556, 'is_unemployed': 0.1, 'lost_job_1mo': 0.85, 'job_search': 0.9666666666666667, 'job_offer': 0.0}, 4: {'is_hired_1mo': 0.7, 'is_unemployed': 0.6714285714285714, 'lost_job_1mo': 0.07142857142857142, 'job_search': 0.59, 'job_offer': 0.9666666666666667}, 2: {'is_hired_1mo': 0.8777777777777778, 'is_unemployed': 0.43333333333333335, 'lost_job_1mo': 0.7, 'job_search': 0.9333333333333333, 'job_offer': 0.9857142857142858}, 1: {'is_hired_1mo': 0.6727272727272727, 'is_unemployed': 0.358974358974359, 'lost_job_1mo': 0.5333333333333333, 'job_search': 0.7166666666666667, 'job_offer': 0.94}, 0: {'is_hired_1mo': 0.8, 'is_unemployed': 0.08571428571428572, 'lost_job_1mo': 0.1724137931034483, 'job_search': 0.8714285714285714, 'job_offer': 1.0}} our_method_new_dict = {4: {'job_search': {'numerator': 273734, 'sem': 17108.4445409312}, 'is_hired_1mo': {'numerator': 14419, 'sem': 366.99671598899175}, 'lost_job_1mo': {'numerator': 2227, 'sem': 539.6417202779419}, 'is_unemployed': {'numerator': 21711, 'sem': 12857.60055036169}, 'job_offer': {'numerator': 398140, 'sem': 44551.92694544843}}, 0: {'is_unemployed': {'numerator': 5363, 'sem': 16693273.716407115}, 'job_search': {'numerator': 9955, 'sem': 4007.9818390547352}, 'lost_job_1mo': {'numerator': 110, 'sem': 2507.0304745155704}, 'is_hired_1mo': {'numerator': 5876, 'sem': 1440.5507101946998}, 'job_offer': {'numerator': 397551, 'sem': 21053.672213431728}}, 3: {'is_hired_1mo': {'numerator': 32170, 'sem': 15120.377307912013}, 'lost_job_1mo': {'numerator': 6611, 'sem': 2235705.395599921}, 'is_unemployed': {'numerator': 25741, 'sem': 7611.7323763009435}, 'job_offer': {'numerator': 603974, 'sem': 68313.02689650582}, 'job_search': {'numerator': 53456, 'sem': 7483.790444209734}}, 2: {'is_unemployed': {'numerator': 4646, 'sem': 626.9208018618386}, 'is_hired_1mo': {'numerator': 18584, 'sem': 3451.8503622544213}, 'job_offer': {'numerator': 398040, 'sem': 11364.921234701022}, 'job_search': {'numerator': 63723, 'sem': 10846.197020221041}, 'lost_job_1mo': {'numerator': 413, 'sem': 306.64505669819584}}, 1: {'is_hired_1mo': {'numerator': 22382, 'sem': 11409.994092103772}, 'job_offer': {'numerator': 388810, 'sem': 14451.582794272697}, 'lost_job_1mo': {'numerator': 437, 'sem': 175.86948118261208}, 'is_unemployed': {'numerator': 2813, 'sem': 948.9439720005547}, 'job_search': {'numerator': 16140, 'sem': 4210.272625790964}}} adaptive_new_dict = {0: {'is_unemployed': {'numerator': 5363, 'sem': 16693273.716407115}, 'job_search': {'numerator': 9955, 'sem': 4007.9818390547352}, 'lost_job_1mo': {'numerator': 110, 'sem': 2507.0304745155704}, 'is_hired_1mo': {'numerator': 5876, 'sem': 1440.5507101946998}, 'job_offer': {'numerator': 397551, 'sem': 21053.672213431728}}, 1: {'is_unemployed': {'numerator': 12031, 'sem': 7726.799776019945}, 'lost_job_1mo': {'numerator': 111, 'sem': 515.2125927164042}, 'job_search': {'numerator': 13663, 'sem': 5549.774344602734}, 'is_hired_1mo': {'numerator': 13799, 'sem': 5795.455532339655}, 'job_offer': {'numerator': 452457, 'sem': 62954.13118906742}}, 2: {'job_search': {'numerator': 153855, 'sem': 11781.304215985185}, 'is_unemployed': {'numerator': 4371, 'sem': 1269.4789663340573}, 'job_offer': {'numerator': 573631, 'sem': 56246.765267860545}, 'lost_job_1mo': {'numerator': 418, 'sem': 5649172.944711616}, 'is_hired_1mo': {'numerator': 16584, 'sem': 3087.7931741284956}}, 4: {'is_unemployed': {'numerator': 16014, 'sem': 6253.689632372853}, 'is_hired_1mo': {'numerator': 8766, 'sem': 2875.0965294760767}, 'lost_job_1mo': {'numerator': 1238, 'sem': 480.9785550015688}, 'job_search': {'numerator': 17117, 'sem': 1808.3838577036793}, 'job_offer': {'numerator': 502520, 'sem': 41362.28738283996}}, 3: {'is_unemployed': {'numerator': 1002, 'sem': 418.159029977143}, 'is_hired_1mo': {'numerator': 7953, 'sem': 1637.1488788134022}, 'job_search': {'numerator': 46384, 'sem': 3869.1915428802877}, 'lost_job_1mo': {'numerator': 1047, 'sem': 266.4834153426912}, 'job_offer': {'numerator': 512423, 'sem': 41770.65447128737}}} uncertainty_new_dict = {4: {'lost_job_1mo': {'numerator': 2340, 'sem': 1014.7282972059196}, 'job_search': {'numerator': 78380, 'sem': 97346.85658409167}, 'is_unemployed': {'numerator': 14536, 'sem': 6791.858226085842}, 'is_hired_1mo': {'numerator': 10119, 'sem': 2972.5758399128595}, 'job_offer': {'numerator': 401625, 'sem': 21081.31529751928}}, 1: {'is_unemployed': {'numerator': 3228, 'sem': 1228.0100832225278}, 'lost_job_1mo': {'numerator': 552, 'sem': 4469674.866698298}, 'job_offer': {'numerator': 612708, 'sem': 57112.29214399502}, 'job_search': {'numerator': 42962, 'sem': 27601.546048149256}, 'is_hired_1mo': {'numerator': 97768, 'sem': 47307.47888641291}}, 3: {'job_search': {'numerator': 93841, 'sem': 31369.23556608593}, 'job_offer': {'numerator': 516548, 'sem': 88235.57752764622}, 'is_unemployed': {'numerator': 20132, 'sem': 5044.345309986642}, 'lost_job_1mo': {'numerator': 1070, 'sem': 214.21570463056867}, 'is_hired_1mo': {'numerator': 27930, 'sem': 3577.721669440321}}, 2: {'is_hired_1mo': {'numerator': 20810, 'sem': 2861.0333260285565}, 'is_unemployed': {'numerator': 12728, 'sem': 1700.1869141976804}, 'job_offer': {'numerator': 398092, 'sem': 10243.721819469301}, 'lost_job_1mo': {'numerator': 637, 'sem': 241.20102291602242}, 'job_search': {'numerator': 51418, 'sem': 2575.3470007528185}}, 0: {'is_unemployed': {'numerator': 5363, 'sem': 16693273.716407115}, 'job_search': {'numerator': 9955, 'sem': 4007.9818390547352}, 'lost_job_1mo': {'numerator': 110, 'sem': 2507.0304745155704}, 'is_hired_1mo': {'numerator': 5876, 'sem': 1440.5507101946998}, 'job_offer': {'numerator': 397551, 'sem': 21053.672213431728}}} uncertainty_uncalibrated_new_dict = {0: {'is_unemployed': {'numerator': 5363, 'sem': 16693273.716407115}, 'job_search': {'numerator': 9955, 'sem': 4007.9818390547352}, 'lost_job_1mo': {'numerator': 110, 'sem': 2507.0304745155704}, 'is_hired_1mo': {'numerator': 5876, 'sem': 1440.5507101946998}, 'job_offer': {'numerator': 397551, 'sem': 21053.672213431728}}, 4: {'lost_job_1mo': {'numerator': 8916, 'sem': 11036527.93587803}, 'is_unemployed': {'numerator': 7001, 'sem': 21549.54012277195}, 'is_hired_1mo': {'numerator': 27676, 'sem': 2636.147839352088}, 'job_offer': {'numerator': 625859, 'sem': 29576.835392492}, 'job_search': {'numerator': 50729, 'sem': 9656.648068224675}}, 3: {'job_search': {'numerator': 29614, 'sem': 2545.5133076343727}, 'is_unemployed': {'numerator': 1031, 'sem': 2525.835113127583}, 'is_hired_1mo': {'numerator': 21080, 'sem': 2532.796165703048}, 'lost_job_1mo': {'numerator': 738, 'sem': 250.86318309712837}, 'job_offer': {'numerator': 10, 'sem': 0}}, 2: {'is_hired_1mo': {'numerator': 28655, 'sem': 2430.142652865983}, 'lost_job_1mo': {'numerator': 2937, 'sem': 831.243117876841}, 'job_search': {'numerator': 23071, 'sem': 3054.9995697587638}, 'job_offer': {'numerator': 376527, 'sem': 28485.961558385043}, 'is_unemployed': {'numerator': 25294, 'sem': 6380.589292580216}}, 1: {'job_search': {'numerator': 2863, 'sem': 1345.1047321110705}, 'lost_job_1mo': {'numerator': 131, 'sem': 105.74747007400558}, 'is_unemployed': {'numerator': 326, 'sem': 762.636610213694}, 'job_offer': {'numerator': 437090, 'sem': 29739.845930574476}, 'is_hired_1mo': {'numerator': 76054, 'sem': 24013.321646355937}}}
def solve() -> int: n, a, b, x, y, z = map(int, input().split()) y = min(y, a * x) z = min(z, b * x) if y * b > z * a: a, b = b, a y, z = z, y mn_cost = 1 << 60 if n // a <= a - 1: for i in range(n // a + 1): j, k = divmod(n - i * a, b) mn_cost = min(mn_cost, i * y + j * z + k * x) else: for j in range(a): i, k = divmod(n - j * b, a) mn_cost = min(mn_cost, i * y + j * z + k * x) return mn_cost def main() -> None: t = int(input()) res = [] for _ in range(t): res.append(solve()) print(*res, sep="\n") if __name__ == "__main__": main()
def solve() -> int: (n, a, b, x, y, z) = map(int, input().split()) y = min(y, a * x) z = min(z, b * x) if y * b > z * a: (a, b) = (b, a) (y, z) = (z, y) mn_cost = 1 << 60 if n // a <= a - 1: for i in range(n // a + 1): (j, k) = divmod(n - i * a, b) mn_cost = min(mn_cost, i * y + j * z + k * x) else: for j in range(a): (i, k) = divmod(n - j * b, a) mn_cost = min(mn_cost, i * y + j * z + k * x) return mn_cost def main() -> None: t = int(input()) res = [] for _ in range(t): res.append(solve()) print(*res, sep='\n') if __name__ == '__main__': main()
# Problem Statement: https://leetcode.com/problems/climbing-stairs/ class Solution: def climbStairs(self, n: int) -> int: # Base Cases if n==1: return 1 if n==2: return 2 # Memoization memo_table = [1]*(n+1) # Initialization memo_table[1] = 1 memo_table[2] = 2 # Iterative solution Memoization for i in range(3, n+1): memo_table[i] = memo_table[i-1]+memo_table[i-2] return memo_table[n]
class Solution: def climb_stairs(self, n: int) -> int: if n == 1: return 1 if n == 2: return 2 memo_table = [1] * (n + 1) memo_table[1] = 1 memo_table[2] = 2 for i in range(3, n + 1): memo_table[i] = memo_table[i - 1] + memo_table[i - 2] return memo_table[n]
#concatenation # youtuber = " varun verma" #some string concatenation # print("subscribe to "+ youtuber) # print("subscribe to {}" .format(youtuber)) # print(f"subscriber to {youtuber}") adj= input("Adjective: ") verb1 = input("Verb: ") verb2 = input("Verb: ") famous_person = input("Famous Person: ") madlib = f"Computer is so {adj}! it makes me so excited all the time because \ I like to {verb1}. Stay hydrated and {verb2} like you are {famous_person}" print(madlib)
adj = input('Adjective: ') verb1 = input('Verb: ') verb2 = input('Verb: ') famous_person = input('Famous Person: ') madlib = f'Computer is so {adj}! it makes me so excited all the time because I like to {verb1}. Stay hydrated and {verb2} like you are {famous_person}' print(madlib)
class Solution: def XXX(self, nums: List[int]) -> bool: l = len(nums) start = l-1 end = 1 for index in range(1,l): val = nums[start - index] if val >= end: end = 1 else: end += 1 return end == 1
class Solution: def xxx(self, nums: List[int]) -> bool: l = len(nums) start = l - 1 end = 1 for index in range(1, l): val = nums[start - index] if val >= end: end = 1 else: end += 1 return end == 1
# Sage version information for Python scripts # This file is auto-generated by the sage-update-version script, do not edit! version = '9.5.beta2' date = '2021-09-26' banner = 'SageMath version 9.5.beta2, Release Date: 2021-09-26'
version = '9.5.beta2' date = '2021-09-26' banner = 'SageMath version 9.5.beta2, Release Date: 2021-09-26'
def createTree(self, root, *elements): root = None for element in elements: root = self.insert(root, element) return root
def create_tree(self, root, *elements): root = None for element in elements: root = self.insert(root, element) return root
class ClassList(list): def __init__(self): self.OnClassListChange = lambda *args,**kwargs:0 def AddClass(self,Cls, notify = True): if Cls not in self: self.append(Cls) if notify:self.OnClassListChange(added = self[-1]) def RemoveClass(self, Cls, notify = True): if Cls in self: self.remove(Cls) if notify:self.OnClassListChange(removed = Cls) return self def __add__(self, other): self.AddClass(other) return self def __sub__(self,other): self.RemoveClass(other) return self def __iadd__(self, other): self.AddClass(other) return self def __isub__(self,other): self.RemoveClass(other) return self
class Classlist(list): def __init__(self): self.OnClassListChange = lambda *args, **kwargs: 0 def add_class(self, Cls, notify=True): if Cls not in self: self.append(Cls) if notify: self.OnClassListChange(added=self[-1]) def remove_class(self, Cls, notify=True): if Cls in self: self.remove(Cls) if notify: self.OnClassListChange(removed=Cls) return self def __add__(self, other): self.AddClass(other) return self def __sub__(self, other): self.RemoveClass(other) return self def __iadd__(self, other): self.AddClass(other) return self def __isub__(self, other): self.RemoveClass(other) return self
''' Defines `Error`, the base class for all exceptions generated in this package. ''' class Error(Exception): pass
""" Defines `Error`, the base class for all exceptions generated in this package. """ class Error(Exception): pass
def can_build(env, platform): return True def configure(env): pass def get_doc_classes(): return [ "WorldArea", "VoxelLight", "VoxelmanLight", "VoxelmanLevelGenerator", "VoxelmanLevelGeneratorFlat", "VoxelSurfaceMerger", "VoxelSurfaceSimple", "VoxelSurface", "VoxelmanLibraryMerger", "VoxelmanLibrarySimple", "VoxelmanLibrary", "VoxelCubePoints", "VoxelMesherCubic", "VoxelMeshData", "MarchingCubesCellData", "VoxelMesherMarchingCubes", "VoxelMesher", "EnvironmentData", "VoxelChunk", "VoxelChunkDefault", "VoxelStructure", "BlockVoxelStructure", "VoxelWorld", "VoxelMesherBlocky", "VoxelWorldBlocky", "VoxelChunkBlocky", "VoxelMesherLiquidBlocky", "VoxelWorldMarchingCubes", "VoxelChunkMarchingCubes", "VoxelMesherCubic", "VoxelWorldCubic", "VoxelChunkCubic", "VoxelMesherDefault", "VoxelWorldDefault", "VoxelJob", "VoxelTerrarinJob", "VoxelLightJob", "VoxelPropJob", ] def get_doc_path(): return "doc_classes"
def can_build(env, platform): return True def configure(env): pass def get_doc_classes(): return ['WorldArea', 'VoxelLight', 'VoxelmanLight', 'VoxelmanLevelGenerator', 'VoxelmanLevelGeneratorFlat', 'VoxelSurfaceMerger', 'VoxelSurfaceSimple', 'VoxelSurface', 'VoxelmanLibraryMerger', 'VoxelmanLibrarySimple', 'VoxelmanLibrary', 'VoxelCubePoints', 'VoxelMesherCubic', 'VoxelMeshData', 'MarchingCubesCellData', 'VoxelMesherMarchingCubes', 'VoxelMesher', 'EnvironmentData', 'VoxelChunk', 'VoxelChunkDefault', 'VoxelStructure', 'BlockVoxelStructure', 'VoxelWorld', 'VoxelMesherBlocky', 'VoxelWorldBlocky', 'VoxelChunkBlocky', 'VoxelMesherLiquidBlocky', 'VoxelWorldMarchingCubes', 'VoxelChunkMarchingCubes', 'VoxelMesherCubic', 'VoxelWorldCubic', 'VoxelChunkCubic', 'VoxelMesherDefault', 'VoxelWorldDefault', 'VoxelJob', 'VoxelTerrarinJob', 'VoxelLightJob', 'VoxelPropJob'] def get_doc_path(): return 'doc_classes'
# # PySNMP MIB module Fore-J2-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Fore-J2-MIB # Produced by pysmi-0.3.4 at Wed May 1 13:17:14 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # OctetString, Integer, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "OctetString", "Integer", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") SingleValueConstraint, ValueSizeConstraint, ConstraintsUnion, ValueRangeConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ValueSizeConstraint", "ConstraintsUnion", "ValueRangeConstraint", "ConstraintsIntersection") asx, = mibBuilder.importSymbols("Fore-Common-MIB", "asx") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") Bits, Counter32, Counter64, ObjectIdentity, IpAddress, TimeTicks, Gauge32, MibScalar, MibTable, MibTableRow, MibTableColumn, NotificationType, Integer32, ModuleIdentity, Unsigned32, MibIdentifier, iso = mibBuilder.importSymbols("SNMPv2-SMI", "Bits", "Counter32", "Counter64", "ObjectIdentity", "IpAddress", "TimeTicks", "Gauge32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "NotificationType", "Integer32", "ModuleIdentity", "Unsigned32", "MibIdentifier", "iso") DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") foreJ2 = ModuleIdentity((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6)) if mibBuilder.loadTexts: foreJ2.setLastUpdated('9911050000Z') if mibBuilder.loadTexts: foreJ2.setOrganization('FORE') if mibBuilder.loadTexts: foreJ2.setContactInfo(' Postal: FORE Systems Inc. 1000 FORE Drive Warrendale, PA 15086-7502 Tel: +1 724 742 6900 Email: nm_mibs@fore.com Web: http://www.fore.com') if mibBuilder.loadTexts: foreJ2.setDescription('write something interesting here') j2ConfGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 1)) j2StatsGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 2)) j2ConfTable = MibTable((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 1, 1), ) if mibBuilder.loadTexts: j2ConfTable.setStatus('current') if mibBuilder.loadTexts: j2ConfTable.setDescription('A table of J2 switch port configuration information.') j2ConfEntry = MibTableRow((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 1, 1, 1), ).setIndexNames((0, "Fore-J2-MIB", "j2ConfBoard"), (0, "Fore-J2-MIB", "j2ConfModule"), (0, "Fore-J2-MIB", "j2ConfPort")) if mibBuilder.loadTexts: j2ConfEntry.setStatus('current') if mibBuilder.loadTexts: j2ConfEntry.setDescription('A table entry containing J2 configuration information for each port.') j2ConfBoard = MibTableColumn((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 1, 1, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: j2ConfBoard.setStatus('current') if mibBuilder.loadTexts: j2ConfBoard.setDescription("The index of this port's switch board.") j2ConfModule = MibTableColumn((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 1, 1, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: j2ConfModule.setStatus('current') if mibBuilder.loadTexts: j2ConfModule.setDescription('The network module of this port.') j2ConfPort = MibTableColumn((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 1, 1, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: j2ConfPort.setStatus('current') if mibBuilder.loadTexts: j2ConfPort.setDescription('The number of this port.') j2LineLength = MibTableColumn((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 1, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("j2ShortLine", 1), ("j2LongLine", 2))).clone('j2ShortLine')).setMaxAccess("readwrite") if mibBuilder.loadTexts: j2LineLength.setStatus('current') if mibBuilder.loadTexts: j2LineLength.setDescription('This variable represents the length of the physical medium connected to the J2 interface: j2ShortLine (1) means the line is a short line with less than 4db of attenuation from the transmitting source. j2LongLine (2) means the line is a long line, with greater than 4db of attenuation from the transmitting source.') j2LoopbackConfig = MibTableColumn((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 1, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("j2NoLoop", 1), ("j2LineLoop", 2), ("j2DiagLoop", 3), ("j2OtherLoop", 4))).clone('j2NoLoop')).setMaxAccess("readwrite") if mibBuilder.loadTexts: j2LoopbackConfig.setStatus('current') if mibBuilder.loadTexts: j2LoopbackConfig.setDescription("This variable represents the loopback configuration of the J2 interface. j2NoLoop (1) means that the interface is not in a loopback state. j2LineLoop (2) means that receive signal is looped back for retransmission without passing through the port's reframing function. j2DiagLoop (3) means that the transmit data stream is looped back to the receiver. j2OtherLoop (4) means that the interface is in a loopback that is not defined here.") j2TxClockSource = MibTableColumn((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 1, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("rxTiming", 1), ("localTiming", 2))).clone('localTiming')).setMaxAccess("readwrite") if mibBuilder.loadTexts: j2TxClockSource.setStatus('current') if mibBuilder.loadTexts: j2TxClockSource.setDescription('The source of the transmit clock.') j2LineStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 1, 1, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65534)).clone(1)).setMaxAccess("readonly") if mibBuilder.loadTexts: j2LineStatus.setStatus('current') if mibBuilder.loadTexts: j2LineStatus.setDescription('This variable indicates the Line Status of the interface. The variable contains loopback state information and failure state information. It is a bit map represented as a sum. The j2NoAlarm should be set if and only if no other flag is set. The various bit positions are: 1 j2NoAlarm 2 j2RxLOF Receive Loss of Frame 4 j2RxLOC Receive Loss of Clock (Not used anymore) 8 j2RxAIS Receive Alarm Indication Signal 16 j2TxLOC Transmit Loss of Clock (Not used anymore) 32 j2RxRAIS Receive Remote Alarm Indication Signal 64 j2RxLOS Receive Loss of Signal 128 j2TxRAIS Transmit Yellow ( Remote Alarm Indication Signal) 256 j2Other any line status not defined here 32768 j2RxLCD Receiving LCD failure indication.') j2IdleUnassignedCells = MibTableColumn((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 1, 1, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("unassigned", 1), ("idle", 2))).clone('unassigned')).setMaxAccess("readwrite") if mibBuilder.loadTexts: j2IdleUnassignedCells.setStatus('current') if mibBuilder.loadTexts: j2IdleUnassignedCells.setDescription("This variable indicates the types of cells that should be sent in case there is no real data to send. According to the ATM Forum, Unassigned cells should be sent (octet 1-3 are 0's, octet 4 is 0000xxx0, where x is 'don't care'). According to the CCITT specifications, Idle cells should be sent (everything is '0' except for the CLP bit which is '1'). By default, unassigned cells are transmitted in case there is no data to send.") j2ErrorTable = MibTable((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 2, 1), ) if mibBuilder.loadTexts: j2ErrorTable.setStatus('current') if mibBuilder.loadTexts: j2ErrorTable.setDescription('A table of J2 error counters.') j2ErrorEntry = MibTableRow((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 2, 1, 1), ).setIndexNames((0, "Fore-J2-MIB", "j2ErrorBoard"), (0, "Fore-J2-MIB", "j2ErrorModule"), (0, "Fore-J2-MIB", "j2ErrorPort")) if mibBuilder.loadTexts: j2ErrorEntry.setStatus('current') if mibBuilder.loadTexts: j2ErrorEntry.setDescription('A table entry containing J2 error counters.') j2ErrorBoard = MibTableColumn((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 2, 1, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: j2ErrorBoard.setStatus('current') if mibBuilder.loadTexts: j2ErrorBoard.setDescription("The index of this port's switch board.") j2ErrorModule = MibTableColumn((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 2, 1, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: j2ErrorModule.setStatus('current') if mibBuilder.loadTexts: j2ErrorModule.setDescription('The network module of this port.') j2ErrorPort = MibTableColumn((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 2, 1, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: j2ErrorPort.setStatus('current') if mibBuilder.loadTexts: j2ErrorPort.setDescription('The number of this port.') j2B8ZSCodingErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 2, 1, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: j2B8ZSCodingErrors.setStatus('current') if mibBuilder.loadTexts: j2B8ZSCodingErrors.setDescription('The number of B8ZS coding violation errors.') j2CRC5Errors = MibTableColumn((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 2, 1, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: j2CRC5Errors.setStatus('current') if mibBuilder.loadTexts: j2CRC5Errors.setDescription('The number of CRC-5 received errors.') j2FramingErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 2, 1, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: j2FramingErrors.setStatus('current') if mibBuilder.loadTexts: j2FramingErrors.setDescription('The number of framing patterns received in error.') j2RxLossOfFrame = MibTableColumn((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 2, 1, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: j2RxLossOfFrame.setStatus('current') if mibBuilder.loadTexts: j2RxLossOfFrame.setDescription('The number of seconds during which the receiver was experiencing Loss Of Frame.') j2RxLossOfClock = MibTableColumn((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 2, 1, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: j2RxLossOfClock.setStatus('current') if mibBuilder.loadTexts: j2RxLossOfClock.setDescription('The number of seconds during which the receiver was not observing transitions on the received clock signal.') j2RxAIS = MibTableColumn((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 2, 1, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: j2RxAIS.setStatus('current') if mibBuilder.loadTexts: j2RxAIS.setDescription('The number of seconds during which the receiver detected an Alarm Indication Signal.') j2TxLossOfClock = MibTableColumn((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 2, 1, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: j2TxLossOfClock.setStatus('current') if mibBuilder.loadTexts: j2TxLossOfClock.setDescription('The number of seconds during which the transmitter was experiencing Loss Of Clock.') j2RxRemoteAIS = MibTableColumn((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 2, 1, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: j2RxRemoteAIS.setStatus('current') if mibBuilder.loadTexts: j2RxRemoteAIS.setDescription('The number of seconds during which the receiver observed the Alarm Indication Signal in the m-bits channel.') j2RxLossOfSignal = MibTableColumn((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 2, 1, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: j2RxLossOfSignal.setStatus('current') if mibBuilder.loadTexts: j2RxLossOfSignal.setDescription('The number of seconds during which the transmitter was experien cing Loss Of Signal.') j2AtmTable = MibTable((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 2, 2), ) if mibBuilder.loadTexts: j2AtmTable.setStatus('current') if mibBuilder.loadTexts: j2AtmTable.setDescription('A table of J2 ATM statistics information.') j2AtmEntry = MibTableRow((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 2, 2, 1), ).setIndexNames((0, "Fore-J2-MIB", "j2AtmBoard"), (0, "Fore-J2-MIB", "j2AtmModule"), (0, "Fore-J2-MIB", "j2AtmPort")) if mibBuilder.loadTexts: j2AtmEntry.setStatus('current') if mibBuilder.loadTexts: j2AtmEntry.setDescription('A table entry containing J2 ATM statistics information.') j2AtmBoard = MibTableColumn((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 2, 2, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: j2AtmBoard.setStatus('current') if mibBuilder.loadTexts: j2AtmBoard.setDescription("The index of this port's switch board.") j2AtmModule = MibTableColumn((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 2, 2, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: j2AtmModule.setStatus('current') if mibBuilder.loadTexts: j2AtmModule.setDescription('The network module of this port.') j2AtmPort = MibTableColumn((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 2, 2, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: j2AtmPort.setStatus('current') if mibBuilder.loadTexts: j2AtmPort.setDescription('The number of this port.') j2AtmHCSs = MibTableColumn((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 2, 2, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: j2AtmHCSs.setStatus('current') if mibBuilder.loadTexts: j2AtmHCSs.setDescription('Number of header check sequence (HCS) error events. The HCS is a CRC-8 calculation over the first 4 octets of the ATM cell header.') j2AtmRxCells = MibTableColumn((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 2, 2, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: j2AtmRxCells.setStatus('current') if mibBuilder.loadTexts: j2AtmRxCells.setDescription('Number of ATM cells that were received.') j2AtmTxCells = MibTableColumn((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 2, 2, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: j2AtmTxCells.setStatus('current') if mibBuilder.loadTexts: j2AtmTxCells.setDescription('Number of non-null ATM cells that were transmitted.') j2AtmLCDs = MibTableColumn((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 2, 2, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: j2AtmLCDs.setStatus('current') if mibBuilder.loadTexts: j2AtmLCDs.setDescription('The number of seconds in which Loss of Cell Delineation (LCD) has occurred. An LCD defect is detected when an out of cell delination state has persisted for 4ms. An LCD defect is cleared when the sync state has been maintained for 4ms.') mibBuilder.exportSymbols("Fore-J2-MIB", j2RxAIS=j2RxAIS, j2RxRemoteAIS=j2RxRemoteAIS, j2AtmRxCells=j2AtmRxCells, j2FramingErrors=j2FramingErrors, j2LineStatus=j2LineStatus, j2RxLossOfClock=j2RxLossOfClock, j2LineLength=j2LineLength, j2LoopbackConfig=j2LoopbackConfig, j2AtmEntry=j2AtmEntry, j2IdleUnassignedCells=j2IdleUnassignedCells, PYSNMP_MODULE_ID=foreJ2, j2ErrorPort=j2ErrorPort, j2AtmModule=j2AtmModule, j2AtmTxCells=j2AtmTxCells, j2ErrorBoard=j2ErrorBoard, j2ConfModule=j2ConfModule, j2ConfEntry=j2ConfEntry, j2AtmBoard=j2AtmBoard, j2ConfTable=j2ConfTable, foreJ2=foreJ2, j2ErrorModule=j2ErrorModule, j2ConfGroup=j2ConfGroup, j2AtmLCDs=j2AtmLCDs, j2RxLossOfFrame=j2RxLossOfFrame, j2B8ZSCodingErrors=j2B8ZSCodingErrors, j2ConfBoard=j2ConfBoard, j2ConfPort=j2ConfPort, j2AtmPort=j2AtmPort, j2TxClockSource=j2TxClockSource, j2ErrorTable=j2ErrorTable, j2StatsGroup=j2StatsGroup, j2RxLossOfSignal=j2RxLossOfSignal, j2CRC5Errors=j2CRC5Errors, j2AtmHCSs=j2AtmHCSs, j2AtmTable=j2AtmTable, j2TxLossOfClock=j2TxLossOfClock, j2ErrorEntry=j2ErrorEntry)
(octet_string, integer, object_identifier) = mibBuilder.importSymbols('ASN1', 'OctetString', 'Integer', 'ObjectIdentifier') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (single_value_constraint, value_size_constraint, constraints_union, value_range_constraint, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'SingleValueConstraint', 'ValueSizeConstraint', 'ConstraintsUnion', 'ValueRangeConstraint', 'ConstraintsIntersection') (asx,) = mibBuilder.importSymbols('Fore-Common-MIB', 'asx') (notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance') (bits, counter32, counter64, object_identity, ip_address, time_ticks, gauge32, mib_scalar, mib_table, mib_table_row, mib_table_column, notification_type, integer32, module_identity, unsigned32, mib_identifier, iso) = mibBuilder.importSymbols('SNMPv2-SMI', 'Bits', 'Counter32', 'Counter64', 'ObjectIdentity', 'IpAddress', 'TimeTicks', 'Gauge32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'NotificationType', 'Integer32', 'ModuleIdentity', 'Unsigned32', 'MibIdentifier', 'iso') (display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention') fore_j2 = module_identity((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6)) if mibBuilder.loadTexts: foreJ2.setLastUpdated('9911050000Z') if mibBuilder.loadTexts: foreJ2.setOrganization('FORE') if mibBuilder.loadTexts: foreJ2.setContactInfo(' Postal: FORE Systems Inc. 1000 FORE Drive Warrendale, PA 15086-7502 Tel: +1 724 742 6900 Email: nm_mibs@fore.com Web: http://www.fore.com') if mibBuilder.loadTexts: foreJ2.setDescription('write something interesting here') j2_conf_group = mib_identifier((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 1)) j2_stats_group = mib_identifier((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 2)) j2_conf_table = mib_table((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 1, 1)) if mibBuilder.loadTexts: j2ConfTable.setStatus('current') if mibBuilder.loadTexts: j2ConfTable.setDescription('A table of J2 switch port configuration information.') j2_conf_entry = mib_table_row((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 1, 1, 1)).setIndexNames((0, 'Fore-J2-MIB', 'j2ConfBoard'), (0, 'Fore-J2-MIB', 'j2ConfModule'), (0, 'Fore-J2-MIB', 'j2ConfPort')) if mibBuilder.loadTexts: j2ConfEntry.setStatus('current') if mibBuilder.loadTexts: j2ConfEntry.setDescription('A table entry containing J2 configuration information for each port.') j2_conf_board = mib_table_column((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 1, 1, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: j2ConfBoard.setStatus('current') if mibBuilder.loadTexts: j2ConfBoard.setDescription("The index of this port's switch board.") j2_conf_module = mib_table_column((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 1, 1, 1, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: j2ConfModule.setStatus('current') if mibBuilder.loadTexts: j2ConfModule.setDescription('The network module of this port.') j2_conf_port = mib_table_column((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 1, 1, 1, 3), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: j2ConfPort.setStatus('current') if mibBuilder.loadTexts: j2ConfPort.setDescription('The number of this port.') j2_line_length = mib_table_column((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 1, 1, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('j2ShortLine', 1), ('j2LongLine', 2))).clone('j2ShortLine')).setMaxAccess('readwrite') if mibBuilder.loadTexts: j2LineLength.setStatus('current') if mibBuilder.loadTexts: j2LineLength.setDescription('This variable represents the length of the physical medium connected to the J2 interface: j2ShortLine (1) means the line is a short line with less than 4db of attenuation from the transmitting source. j2LongLine (2) means the line is a long line, with greater than 4db of attenuation from the transmitting source.') j2_loopback_config = mib_table_column((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 1, 1, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('j2NoLoop', 1), ('j2LineLoop', 2), ('j2DiagLoop', 3), ('j2OtherLoop', 4))).clone('j2NoLoop')).setMaxAccess('readwrite') if mibBuilder.loadTexts: j2LoopbackConfig.setStatus('current') if mibBuilder.loadTexts: j2LoopbackConfig.setDescription("This variable represents the loopback configuration of the J2 interface. j2NoLoop (1) means that the interface is not in a loopback state. j2LineLoop (2) means that receive signal is looped back for retransmission without passing through the port's reframing function. j2DiagLoop (3) means that the transmit data stream is looped back to the receiver. j2OtherLoop (4) means that the interface is in a loopback that is not defined here.") j2_tx_clock_source = mib_table_column((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 1, 1, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('rxTiming', 1), ('localTiming', 2))).clone('localTiming')).setMaxAccess('readwrite') if mibBuilder.loadTexts: j2TxClockSource.setStatus('current') if mibBuilder.loadTexts: j2TxClockSource.setDescription('The source of the transmit clock.') j2_line_status = mib_table_column((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 1, 1, 1, 7), integer32().subtype(subtypeSpec=value_range_constraint(1, 65534)).clone(1)).setMaxAccess('readonly') if mibBuilder.loadTexts: j2LineStatus.setStatus('current') if mibBuilder.loadTexts: j2LineStatus.setDescription('This variable indicates the Line Status of the interface. The variable contains loopback state information and failure state information. It is a bit map represented as a sum. The j2NoAlarm should be set if and only if no other flag is set. The various bit positions are: 1 j2NoAlarm 2 j2RxLOF Receive Loss of Frame 4 j2RxLOC Receive Loss of Clock (Not used anymore) 8 j2RxAIS Receive Alarm Indication Signal 16 j2TxLOC Transmit Loss of Clock (Not used anymore) 32 j2RxRAIS Receive Remote Alarm Indication Signal 64 j2RxLOS Receive Loss of Signal 128 j2TxRAIS Transmit Yellow ( Remote Alarm Indication Signal) 256 j2Other any line status not defined here 32768 j2RxLCD Receiving LCD failure indication.') j2_idle_unassigned_cells = mib_table_column((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 1, 1, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('unassigned', 1), ('idle', 2))).clone('unassigned')).setMaxAccess('readwrite') if mibBuilder.loadTexts: j2IdleUnassignedCells.setStatus('current') if mibBuilder.loadTexts: j2IdleUnassignedCells.setDescription("This variable indicates the types of cells that should be sent in case there is no real data to send. According to the ATM Forum, Unassigned cells should be sent (octet 1-3 are 0's, octet 4 is 0000xxx0, where x is 'don't care'). According to the CCITT specifications, Idle cells should be sent (everything is '0' except for the CLP bit which is '1'). By default, unassigned cells are transmitted in case there is no data to send.") j2_error_table = mib_table((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 2, 1)) if mibBuilder.loadTexts: j2ErrorTable.setStatus('current') if mibBuilder.loadTexts: j2ErrorTable.setDescription('A table of J2 error counters.') j2_error_entry = mib_table_row((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 2, 1, 1)).setIndexNames((0, 'Fore-J2-MIB', 'j2ErrorBoard'), (0, 'Fore-J2-MIB', 'j2ErrorModule'), (0, 'Fore-J2-MIB', 'j2ErrorPort')) if mibBuilder.loadTexts: j2ErrorEntry.setStatus('current') if mibBuilder.loadTexts: j2ErrorEntry.setDescription('A table entry containing J2 error counters.') j2_error_board = mib_table_column((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 2, 1, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: j2ErrorBoard.setStatus('current') if mibBuilder.loadTexts: j2ErrorBoard.setDescription("The index of this port's switch board.") j2_error_module = mib_table_column((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 2, 1, 1, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: j2ErrorModule.setStatus('current') if mibBuilder.loadTexts: j2ErrorModule.setDescription('The network module of this port.') j2_error_port = mib_table_column((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 2, 1, 1, 3), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: j2ErrorPort.setStatus('current') if mibBuilder.loadTexts: j2ErrorPort.setDescription('The number of this port.') j2_b8_zs_coding_errors = mib_table_column((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 2, 1, 1, 4), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: j2B8ZSCodingErrors.setStatus('current') if mibBuilder.loadTexts: j2B8ZSCodingErrors.setDescription('The number of B8ZS coding violation errors.') j2_crc5_errors = mib_table_column((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 2, 1, 1, 5), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: j2CRC5Errors.setStatus('current') if mibBuilder.loadTexts: j2CRC5Errors.setDescription('The number of CRC-5 received errors.') j2_framing_errors = mib_table_column((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 2, 1, 1, 6), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: j2FramingErrors.setStatus('current') if mibBuilder.loadTexts: j2FramingErrors.setDescription('The number of framing patterns received in error.') j2_rx_loss_of_frame = mib_table_column((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 2, 1, 1, 7), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: j2RxLossOfFrame.setStatus('current') if mibBuilder.loadTexts: j2RxLossOfFrame.setDescription('The number of seconds during which the receiver was experiencing Loss Of Frame.') j2_rx_loss_of_clock = mib_table_column((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 2, 1, 1, 8), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: j2RxLossOfClock.setStatus('current') if mibBuilder.loadTexts: j2RxLossOfClock.setDescription('The number of seconds during which the receiver was not observing transitions on the received clock signal.') j2_rx_ais = mib_table_column((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 2, 1, 1, 9), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: j2RxAIS.setStatus('current') if mibBuilder.loadTexts: j2RxAIS.setDescription('The number of seconds during which the receiver detected an Alarm Indication Signal.') j2_tx_loss_of_clock = mib_table_column((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 2, 1, 1, 10), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: j2TxLossOfClock.setStatus('current') if mibBuilder.loadTexts: j2TxLossOfClock.setDescription('The number of seconds during which the transmitter was experiencing Loss Of Clock.') j2_rx_remote_ais = mib_table_column((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 2, 1, 1, 11), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: j2RxRemoteAIS.setStatus('current') if mibBuilder.loadTexts: j2RxRemoteAIS.setDescription('The number of seconds during which the receiver observed the Alarm Indication Signal in the m-bits channel.') j2_rx_loss_of_signal = mib_table_column((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 2, 1, 1, 12), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: j2RxLossOfSignal.setStatus('current') if mibBuilder.loadTexts: j2RxLossOfSignal.setDescription('The number of seconds during which the transmitter was experien cing Loss Of Signal.') j2_atm_table = mib_table((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 2, 2)) if mibBuilder.loadTexts: j2AtmTable.setStatus('current') if mibBuilder.loadTexts: j2AtmTable.setDescription('A table of J2 ATM statistics information.') j2_atm_entry = mib_table_row((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 2, 2, 1)).setIndexNames((0, 'Fore-J2-MIB', 'j2AtmBoard'), (0, 'Fore-J2-MIB', 'j2AtmModule'), (0, 'Fore-J2-MIB', 'j2AtmPort')) if mibBuilder.loadTexts: j2AtmEntry.setStatus('current') if mibBuilder.loadTexts: j2AtmEntry.setDescription('A table entry containing J2 ATM statistics information.') j2_atm_board = mib_table_column((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 2, 2, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: j2AtmBoard.setStatus('current') if mibBuilder.loadTexts: j2AtmBoard.setDescription("The index of this port's switch board.") j2_atm_module = mib_table_column((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 2, 2, 1, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: j2AtmModule.setStatus('current') if mibBuilder.loadTexts: j2AtmModule.setDescription('The network module of this port.') j2_atm_port = mib_table_column((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 2, 2, 1, 3), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: j2AtmPort.setStatus('current') if mibBuilder.loadTexts: j2AtmPort.setDescription('The number of this port.') j2_atm_hc_ss = mib_table_column((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 2, 2, 1, 4), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: j2AtmHCSs.setStatus('current') if mibBuilder.loadTexts: j2AtmHCSs.setDescription('Number of header check sequence (HCS) error events. The HCS is a CRC-8 calculation over the first 4 octets of the ATM cell header.') j2_atm_rx_cells = mib_table_column((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 2, 2, 1, 5), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: j2AtmRxCells.setStatus('current') if mibBuilder.loadTexts: j2AtmRxCells.setDescription('Number of ATM cells that were received.') j2_atm_tx_cells = mib_table_column((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 2, 2, 1, 6), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: j2AtmTxCells.setStatus('current') if mibBuilder.loadTexts: j2AtmTxCells.setDescription('Number of non-null ATM cells that were transmitted.') j2_atm_lc_ds = mib_table_column((1, 3, 6, 1, 4, 1, 326, 2, 2, 1, 1, 6, 2, 2, 1, 7), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: j2AtmLCDs.setStatus('current') if mibBuilder.loadTexts: j2AtmLCDs.setDescription('The number of seconds in which Loss of Cell Delineation (LCD) has occurred. An LCD defect is detected when an out of cell delination state has persisted for 4ms. An LCD defect is cleared when the sync state has been maintained for 4ms.') mibBuilder.exportSymbols('Fore-J2-MIB', j2RxAIS=j2RxAIS, j2RxRemoteAIS=j2RxRemoteAIS, j2AtmRxCells=j2AtmRxCells, j2FramingErrors=j2FramingErrors, j2LineStatus=j2LineStatus, j2RxLossOfClock=j2RxLossOfClock, j2LineLength=j2LineLength, j2LoopbackConfig=j2LoopbackConfig, j2AtmEntry=j2AtmEntry, j2IdleUnassignedCells=j2IdleUnassignedCells, PYSNMP_MODULE_ID=foreJ2, j2ErrorPort=j2ErrorPort, j2AtmModule=j2AtmModule, j2AtmTxCells=j2AtmTxCells, j2ErrorBoard=j2ErrorBoard, j2ConfModule=j2ConfModule, j2ConfEntry=j2ConfEntry, j2AtmBoard=j2AtmBoard, j2ConfTable=j2ConfTable, foreJ2=foreJ2, j2ErrorModule=j2ErrorModule, j2ConfGroup=j2ConfGroup, j2AtmLCDs=j2AtmLCDs, j2RxLossOfFrame=j2RxLossOfFrame, j2B8ZSCodingErrors=j2B8ZSCodingErrors, j2ConfBoard=j2ConfBoard, j2ConfPort=j2ConfPort, j2AtmPort=j2AtmPort, j2TxClockSource=j2TxClockSource, j2ErrorTable=j2ErrorTable, j2StatsGroup=j2StatsGroup, j2RxLossOfSignal=j2RxLossOfSignal, j2CRC5Errors=j2CRC5Errors, j2AtmHCSs=j2AtmHCSs, j2AtmTable=j2AtmTable, j2TxLossOfClock=j2TxLossOfClock, j2ErrorEntry=j2ErrorEntry)
n = int(input()) lado = 2 for i in range(n): lado = 2*lado-1 print(lado*lado)
n = int(input()) lado = 2 for i in range(n): lado = 2 * lado - 1 print(lado * lado)
class SequentialSearchST(): first = None class Node(): def __init__(self, key, val, next): self.key = key self.val = val self.next = next def get(self, key): x = self.first while x is not None: if key == x.key: return x.val x = x.next return None def put(self, key, val): x = self.first while x is not None: if key == x.key: x.val = val return self.first = Node(key, val, self.first)
class Sequentialsearchst: first = None class Node: def __init__(self, key, val, next): self.key = key self.val = val self.next = next def get(self, key): x = self.first while x is not None: if key == x.key: return x.val x = x.next return None def put(self, key, val): x = self.first while x is not None: if key == x.key: x.val = val return self.first = node(key, val, self.first)
class Solution: def findNumberIn2DArray(self, matrix, target: int) -> bool: if not matrix: return False n,m=len(matrix),len(matrix[0]) if m==0: return False row,col=0,m-1 while 1: print(row,col) cur=matrix[row][col] # print(cur,target) if target== cur: return True if target<cur: col-=1 else: row+=1 if row>=n or col<0: break return False print(Solution().findNumberIn2DArray([[-1,3]],-1))
class Solution: def find_number_in2_d_array(self, matrix, target: int) -> bool: if not matrix: return False (n, m) = (len(matrix), len(matrix[0])) if m == 0: return False (row, col) = (0, m - 1) while 1: print(row, col) cur = matrix[row][col] if target == cur: return True if target < cur: col -= 1 else: row += 1 if row >= n or col < 0: break return False print(solution().findNumberIn2DArray([[-1, 3]], -1))
class StackCollection: def __init__(self, client=None, data=None): super(StackCollection, self).__init__() if data is None: paginator = client.get_paginator('describe_stacks') results = paginator.paginate() self.list = list() for result in results: stacks = result['Stacks'] for stack in stacks: self.list.append(stack) else: self.list = list(data) def __len__(self): return len(self.list) def __getitem__(self, ii): return self.list[ii] def __delitem__(self, ii): del self.list[ii] def __setitem__(self, ii, val): self.list[ii] = val def __str__(self): return str(self.list) def insert(self, ii, val): self.list.insert(ii, val) def reverse(self): return self[::-1] def filter_by(self, func): filtered = [stack for stack in self.list if func(stack)] return StackCollection(data=filtered) @staticmethod def has_prefix(stack_prefix, stack): for tag in stack.get('Tags', []): if tag['Key'] == 'Name' and tag.get( 'Value', "").startswith(stack_prefix): return True return False @staticmethod def is_cf_stack(stack): for tag in stack.get('Tags', []): if tag['Key'] == 'tool' and tag['Value'] == 'cluster_funk': return True return False @staticmethod def has_env(env, stack): for tag in stack.get('Tags', []): if tag['Key'] == 'environment' and tag['Value'] == env: return True return False def output_dict(self): result = {} for stack in self: for output in stack.get("Outputs", []): result[output.get("OutputKey", "")] = output["OutputValue"] return result
class Stackcollection: def __init__(self, client=None, data=None): super(StackCollection, self).__init__() if data is None: paginator = client.get_paginator('describe_stacks') results = paginator.paginate() self.list = list() for result in results: stacks = result['Stacks'] for stack in stacks: self.list.append(stack) else: self.list = list(data) def __len__(self): return len(self.list) def __getitem__(self, ii): return self.list[ii] def __delitem__(self, ii): del self.list[ii] def __setitem__(self, ii, val): self.list[ii] = val def __str__(self): return str(self.list) def insert(self, ii, val): self.list.insert(ii, val) def reverse(self): return self[::-1] def filter_by(self, func): filtered = [stack for stack in self.list if func(stack)] return stack_collection(data=filtered) @staticmethod def has_prefix(stack_prefix, stack): for tag in stack.get('Tags', []): if tag['Key'] == 'Name' and tag.get('Value', '').startswith(stack_prefix): return True return False @staticmethod def is_cf_stack(stack): for tag in stack.get('Tags', []): if tag['Key'] == 'tool' and tag['Value'] == 'cluster_funk': return True return False @staticmethod def has_env(env, stack): for tag in stack.get('Tags', []): if tag['Key'] == 'environment' and tag['Value'] == env: return True return False def output_dict(self): result = {} for stack in self: for output in stack.get('Outputs', []): result[output.get('OutputKey', '')] = output['OutputValue'] return result
""" import a import a.b import a.B (and is the cross thing) import a.* import a.b as c from a import b, c import a, b from _ import * """ # objects see their own vars # function args are seen ((x)->x)(2) # import bogus # errors # bogus -> NameError """ del list[index] del x del dict[key] delete object.member, which removes member as a key from object only related to: dynamics dicts reloading modules gc or c++ memory management kind of the opposite of declare tbh """ # module.copy() # in # a ast wrapper AST Stack CodeStack # term expr # tests: # code imports, CODE does not # i'd love a reimport func # INSPECT: # i should be able to see vars of a thing # scope_stack[-1] # inspect # cancel import if errors? # import a as b, c as d # from a import b # import a.* # error on * * # allow **? dunno # cannot declare in object - artificial scope # test method in class # test fake module declaration through ins and qualnames # test closure # can't set this # getattr errors from importing # importing with errors does not set the name
""" import a import a.b import a.B (and is the cross thing) import a.* import a.b as c from a import b, c import a, b from _ import * """ '\ndel list[index]\ndel x\ndel dict[key]\n\ndelete object.member, which removes member as a key from object\n\nonly related to:\ndynamics\ndicts\nreloading modules\ngc or c++ memory management\nkind of the opposite of declare tbh\n'
# author: Allyson Vasquez # version: May.14.2020 # Practice using functions & lists # https://www.w3resource.com/python-exercises/python-functions-exercises.php # Find the max of three numbers def max(x,y,z): if x > y or x == y: num1 = x else: num1 = y if num1 > z or num1 == z: max_num = num1 else: max_num = z return max_num # Sum all numbers in a list def sum(x): total = 0 for i in range(len(x)): total += x[i] return total # Calculate the factorial of a number def factorial(x): fac = 1 if x == 0: return 0 elif x == 1: return 1 while x > 0: fac *= x x -= 1 return fac # Check if a number is in a given range def inRange(x, min, max): if x in range(min, max): print(x, 'is in range between', min, max) else: print(x, 'is NOT range between', min, max) # Calculate number of upper/lowercase letters in a string def caseCount(x): upper = 0 lower = 0 for i in x: if i.isupper(): upper += 1 elif i.islower(): lower += 1 print('String inputted:', x) print('\tUppercase letters:', upper) print('\tLowercase letters:', lower) def main(): print('Max of 3 numbers:', max(112, 18, 43)) my_list = [32, 84, 12, 23, 62] print('Sum of numbers in a list:', sum(my_list)) print(factorial(10)) inRange(5, 1, 10) inRange(12, 31, 43) caseCount('My name is Allyson Vasquez') if __name__ == '__main__': main()
def max(x, y, z): if x > y or x == y: num1 = x else: num1 = y if num1 > z or num1 == z: max_num = num1 else: max_num = z return max_num def sum(x): total = 0 for i in range(len(x)): total += x[i] return total def factorial(x): fac = 1 if x == 0: return 0 elif x == 1: return 1 while x > 0: fac *= x x -= 1 return fac def in_range(x, min, max): if x in range(min, max): print(x, 'is in range between', min, max) else: print(x, 'is NOT range between', min, max) def case_count(x): upper = 0 lower = 0 for i in x: if i.isupper(): upper += 1 elif i.islower(): lower += 1 print('String inputted:', x) print('\tUppercase letters:', upper) print('\tLowercase letters:', lower) def main(): print('Max of 3 numbers:', max(112, 18, 43)) my_list = [32, 84, 12, 23, 62] print('Sum of numbers in a list:', sum(my_list)) print(factorial(10)) in_range(5, 1, 10) in_range(12, 31, 43) case_count('My name is Allyson Vasquez') if __name__ == '__main__': main()
# pylint: disable=missing-docstring __title__ = "estraven" __summary__ = "An opinionated YAML formatter for Ansible playbooks" __version__ = "0.0.0" __url__ = "https://github.com/enpaul/estraven/" __license__ = "MIT" __authors__ = ["Ethan Paul <24588726+enpaul@users.noreply.github.com>"]
__title__ = 'estraven' __summary__ = 'An opinionated YAML formatter for Ansible playbooks' __version__ = '0.0.0' __url__ = 'https://github.com/enpaul/estraven/' __license__ = 'MIT' __authors__ = ['Ethan Paul <24588726+enpaul@users.noreply.github.com>']
""" 0034. Find First and Last Position of Element in Sorted Array Medium Given an array of integers nums sorted in ascending order, find the starting and ending position of a given target value. If target is not found in the array, return [-1, -1]. Follow up: Could you write an algorithm with O(log n) runtime complexity? Example 1: Input: nums = [5,7,7,8,8,10], target = 8 Output: [3,4] Example 2: Input: nums = [5,7,7,8,8,10], target = 6 Output: [-1,-1] Example 3: Input: nums = [], target = 0 Output: [-1,-1] Constraints: 0 <= nums.length <= 105 -109 <= nums[i] <= 109 nums is a non-decreasing array. -109 <= target <= 109 """ class Solution: def searchRange(self, nums: List[int], target: int) -> List[int]: res = [-1, -1] cnt = 1 for idx, num in enumerate(nums): if num == target: if cnt == 1: res[0] = idx cnt = 2 if cnt == 2: res[1] = idx return res # O(logn) solution class Solution: def searchRange(self, nums: List[int], target: int) -> List[int]: def helper(num): lo, hi = 0, len(nums) while lo < hi: mid = (lo+hi)//2 if nums[mid] >= num: hi = mid else: lo = mid + 1 return lo idx = helper(target) return [idx, helper(target+1)-1] if target in nums[idx: idx+1] else [-1, -1]
""" 0034. Find First and Last Position of Element in Sorted Array Medium Given an array of integers nums sorted in ascending order, find the starting and ending position of a given target value. If target is not found in the array, return [-1, -1]. Follow up: Could you write an algorithm with O(log n) runtime complexity? Example 1: Input: nums = [5,7,7,8,8,10], target = 8 Output: [3,4] Example 2: Input: nums = [5,7,7,8,8,10], target = 6 Output: [-1,-1] Example 3: Input: nums = [], target = 0 Output: [-1,-1] Constraints: 0 <= nums.length <= 105 -109 <= nums[i] <= 109 nums is a non-decreasing array. -109 <= target <= 109 """ class Solution: def search_range(self, nums: List[int], target: int) -> List[int]: res = [-1, -1] cnt = 1 for (idx, num) in enumerate(nums): if num == target: if cnt == 1: res[0] = idx cnt = 2 if cnt == 2: res[1] = idx return res class Solution: def search_range(self, nums: List[int], target: int) -> List[int]: def helper(num): (lo, hi) = (0, len(nums)) while lo < hi: mid = (lo + hi) // 2 if nums[mid] >= num: hi = mid else: lo = mid + 1 return lo idx = helper(target) return [idx, helper(target + 1) - 1] if target in nums[idx:idx + 1] else [-1, -1]
def parallel_generator(generators, functors): """ :param generators: A list of k generators (initialized) repersenting files, file are sorted with respect to the functors. :param functors: A list of k functors (must be the same size as the generators), that return a comparable object (comaprable with < ). :output: Each yield returns the next equivalence class according to the sorting in a format of a k-list with None if the generator didn't have an object of that equivalence class. Each entry in the list is also a list of the objects in that equivalence class that the corresponding generator produced. For example output may look like this (where k = 3): [None,[object1], [object2, object3]] """ # Work buffer, lines that aren't in output yet reside here #current_lines = [generator.__next__() if generator is not None else None for generator in generators] current_lines = [] for generator in generators: try: line = next(generator) except StopIteration: line = None current_lines.append(line) if len(current_lines) == current_lines.count(None): return finished_files = 0 number_of_files = len(generators) # Boolean array for which generator finished listOfFinished = [0 for index in range(len(generators))] # Actual logic while (finished_files < number_of_files) : # As long as not all files ended current_intervals = [func(line) if line is not None else None for line, func in zip( current_lines, functors)] # Extracting (str,int) # Sort the intervals according to the (default) sorting of the given # object current_intervals_sorted = sorted( [interval for interval in current_intervals if interval is not None]) min_interval = current_intervals_sorted[0] # Minimum interval # Get all the indexes (in the original list) of the lines with the same # minimal equivalence class equivalence_class_indexes = [index for index in range( len(current_intervals)) if (current_intervals[index] == min_interval)] # Number of generators that generated in current eq. class num_gen_curr_eq_class = len(equivalence_class_indexes) # Init output list with Nones next_equivalence_class = [None] * len(generators) # Init lists for generators that outputed for i in equivalence_class_indexes: next_equivalence_class[i] = [] # For each generator check if he generated an object(line) in the equivalence class, # If it did add the object to the output list and try to add next line # until he stops generating from this eq. class (else it stays None) while(num_gen_curr_eq_class > 0): for i in equivalence_class_indexes: next_equivalence_class[i].append(current_lines[i]) try: current_lines[i] = next(generators[i]) new_interval = functors[i](current_lines[i]) except StopIteration: current_lines[i] = None equivalence_class_indexes.remove(i) num_gen_curr_eq_class -= 1 break if(new_interval > min_interval): equivalence_class_indexes.remove(i) num_gen_curr_eq_class -= 1 break yield next_equivalence_class # Yield the equivlanece class # Setting up lists for next iteration # For each generator that generated an outputted line, get his next # line for i in equivalence_class_indexes: try: current_lines[i] = next(generators[i]) except StopIteration: current_lines[i] = None # Check if any generator finished yielding eveyrthing for index in range(len(current_lines)): if current_lines[index] == None: # Meaning no more output if listOfFinished[index] == 0: # If not already finished finished_files += 1 listOfFinished[index] = 1 return # When all generators finished
def parallel_generator(generators, functors): """ :param generators: A list of k generators (initialized) repersenting files, file are sorted with respect to the functors. :param functors: A list of k functors (must be the same size as the generators), that return a comparable object (comaprable with < ). :output: Each yield returns the next equivalence class according to the sorting in a format of a k-list with None if the generator didn't have an object of that equivalence class. Each entry in the list is also a list of the objects in that equivalence class that the corresponding generator produced. For example output may look like this (where k = 3): [None,[object1], [object2, object3]] """ current_lines = [] for generator in generators: try: line = next(generator) except StopIteration: line = None current_lines.append(line) if len(current_lines) == current_lines.count(None): return finished_files = 0 number_of_files = len(generators) list_of_finished = [0 for index in range(len(generators))] while finished_files < number_of_files: current_intervals = [func(line) if line is not None else None for (line, func) in zip(current_lines, functors)] current_intervals_sorted = sorted([interval for interval in current_intervals if interval is not None]) min_interval = current_intervals_sorted[0] equivalence_class_indexes = [index for index in range(len(current_intervals)) if current_intervals[index] == min_interval] num_gen_curr_eq_class = len(equivalence_class_indexes) next_equivalence_class = [None] * len(generators) for i in equivalence_class_indexes: next_equivalence_class[i] = [] while num_gen_curr_eq_class > 0: for i in equivalence_class_indexes: next_equivalence_class[i].append(current_lines[i]) try: current_lines[i] = next(generators[i]) new_interval = functors[i](current_lines[i]) except StopIteration: current_lines[i] = None equivalence_class_indexes.remove(i) num_gen_curr_eq_class -= 1 break if new_interval > min_interval: equivalence_class_indexes.remove(i) num_gen_curr_eq_class -= 1 break yield next_equivalence_class for i in equivalence_class_indexes: try: current_lines[i] = next(generators[i]) except StopIteration: current_lines[i] = None for index in range(len(current_lines)): if current_lines[index] == None: if listOfFinished[index] == 0: finished_files += 1 listOfFinished[index] = 1 return
concept_detector_cfg = dict( quantile_threshold=0.99, with_bboxes=True, count_disjoint=True, ) target_layer = 'layer3.5'
concept_detector_cfg = dict(quantile_threshold=0.99, with_bboxes=True, count_disjoint=True) target_layer = 'layer3.5'
method1 = [] method2 = [] with open("out.raw", "rb") as file: byteValue = file.read(2) while byteValue != b"": intValueOne = int.from_bytes(byteValue, "big", signed=True) intValueTwo = int.from_bytes(byteValue, "little", signed=True) method1.append(intValueOne) method2.append(intValueTwo) byteValue = file.read(2) for i in range(0, len(method1), 1000): print(f"method1: {method1[i]}") print(f"method1: {method1[len(method1)-1]}") print("\n") for i in range(0, len(method2), 1000): print(f"method2: {method2[i]}") print(f"method2: {method2[len(method2)-1]}")
method1 = [] method2 = [] with open('out.raw', 'rb') as file: byte_value = file.read(2) while byteValue != b'': int_value_one = int.from_bytes(byteValue, 'big', signed=True) int_value_two = int.from_bytes(byteValue, 'little', signed=True) method1.append(intValueOne) method2.append(intValueTwo) byte_value = file.read(2) for i in range(0, len(method1), 1000): print(f'method1: {method1[i]}') print(f'method1: {method1[len(method1) - 1]}') print('\n') for i in range(0, len(method2), 1000): print(f'method2: {method2[i]}') print(f'method2: {method2[len(method2) - 1]}')
# # PySNMP MIB module CISCO-TELEPRESENCE-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-TELEPRESENCE-MIB # Produced by pysmi-0.3.4 at Wed May 1 12:14:18 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsUnion, ValueRangeConstraint, ConstraintsIntersection, SingleValueConstraint, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "ValueRangeConstraint", "ConstraintsIntersection", "SingleValueConstraint", "ValueSizeConstraint") ciscoMgmt, = mibBuilder.importSymbols("CISCO-SMI", "ciscoMgmt") InterfaceIndexOrZero, = mibBuilder.importSymbols("IF-MIB", "InterfaceIndexOrZero") InetAddress, InetAddressType = mibBuilder.importSymbols("INET-ADDRESS-MIB", "InetAddress", "InetAddressType") SnmpAdminString, = mibBuilder.importSymbols("SNMP-FRAMEWORK-MIB", "SnmpAdminString") ObjectGroup, ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ObjectGroup", "ModuleCompliance", "NotificationGroup") NotificationType, ModuleIdentity, Bits, Gauge32, IpAddress, Integer32, Counter32, iso, ObjectIdentity, MibIdentifier, Unsigned32, TimeTicks, Counter64, MibScalar, MibTable, MibTableRow, MibTableColumn = mibBuilder.importSymbols("SNMPv2-SMI", "NotificationType", "ModuleIdentity", "Bits", "Gauge32", "IpAddress", "Integer32", "Counter32", "iso", "ObjectIdentity", "MibIdentifier", "Unsigned32", "TimeTicks", "Counter64", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn") TimeStamp, DisplayString, TruthValue, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "TimeStamp", "DisplayString", "TruthValue", "TextualConvention") ciscoTelepresenceMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 9, 9, 643)) ciscoTelepresenceMIB.setRevisions(('2014-07-18 00:00', '2012-07-17 00:00', '2012-03-23 00:00', '2011-08-23 00:00', '2010-07-23 00:00', '2010-07-13 00:00', '2009-07-12 00:00', '2008-02-13 00:00', '2007-12-11 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: ciscoTelepresenceMIB.setRevisionsDescriptions(('Added ctpDPPeripheralStatusTable Table and added auxHDMIInputDevice(19) and bringYourOwnDevice(20) enum value in CtpPeripheralDeviceCategoryCode', 'Added detectionDisabled in CtpPeripheralStatusCode', 'Added ctpVlanId, ctpDefaultGateway and ctpDefaultGatewayAddrType in ctpObjects', 'Added uiDevice in CtpPeripheralDeviceCategoryCode', 'Added ctpUSBPeripheralStatusTable and ctpWIFIPeripheralStatusTable in ctpPeripheralStatusEntry. ciscoTelepresenceComplianceR02 has been deprecated by ciscoTelepresenceComplianceR03. ciscoTpPeripheralStatusGroupR01 has been deprecated by ciscoTpPeripheralStatusGroupR02', 'Added ctpPeriStatusChangeNotifyEnable.', 'Added ctpPeripheralDeviceCategory and ctpPeripheralDeviceNumber in ctpPeripheralStatusEntry. Added commError in CtpPeripheralStatusCode. Updated the description of ctpPeripheralErrorHistoryTable.', 'Added serial peripheral status and peripheral attribute table.', 'Initial version of this MIB module.',)) if mibBuilder.loadTexts: ciscoTelepresenceMIB.setLastUpdated('201411240000Z') if mibBuilder.loadTexts: ciscoTelepresenceMIB.setOrganization('Cisco Systems, Inc.') if mibBuilder.loadTexts: ciscoTelepresenceMIB.setContactInfo('Cisco Systems Customer Service Postal: 170 W Tasman Drive San Jose, CA 95134 USA Tel: +1 800 553-NETS E-mail: cochan@cisco.com') if mibBuilder.loadTexts: ciscoTelepresenceMIB.setDescription('The MIB module defines the managed objects for a Telepresence system. Telepresence refers to a set of technologies which allow a person to feel as if they were present, to give the appearance that they were present, or to have an effect, at a location other than their true location. A complete Telepresence system includes one or more Telepresence CODECS and peripherals such as display, camera, speaker, microphone and presentation device. Peripherals are attached directly to a Telepresence CODEC via an interface. Some peripherals may have more than one interface to transmit audio and/or video data and provide a configuration and/or control access.') class CtpSystemResetMode(TextualConvention, Integer32): description = 'This textual convention identifies the system reset mode. noRestart (1) -- No operation. restartPending (2) -- Restart a system without shutting down when there is no active call; otherwise, system will be restarted after the call is terminated. resetPending (3) -- Shut down a system and bring it back up if there is no active call; otherwise, system will be reset after the call is terminated. forceReset (4) -- Shut down a system and bring it back up no matter if there is an active call or not.' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4)) namedValues = NamedValues(("noRestart", 1), ("restartPending", 2), ("resetPending", 3), ("forceReset", 4)) class CtpPeripheralCableCode(TextualConvention, Integer32): description = 'The textual convention identifies cable status of the attached peripheral through HDMI. plugged (1) -- Peripheral cable is plugged. loose (2) -- Peripheral cable is loose. unplugged (3) -- Peripheral cable is unplugged. unknown (4) -- Cannot detect peripheral cable status. internalError (5) -- Internal error.' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5)) namedValues = NamedValues(("plugged", 1), ("loose", 2), ("unplugged", 3), ("unknown", 4), ("internalError", 5)) class CtpPeripheralPowerCode(TextualConvention, Integer32): description = 'The textual convention identifies power status of the attached peripheral through HDMI. on (1) -- Peripheral power is on. standby (2) -- Peripheral power is in standby mode. off (3) -- Peripheral power is off. unknown (4) -- Cannot detect peripheral power status. internalError (5) -- Internal error.' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5)) namedValues = NamedValues(("on", 1), ("standby", 2), ("off", 3), ("unknown", 4), ("internalError", 5)) class CtpPeripheralStatusCode(TextualConvention, Integer32): description = 'The textual convention identifies the peripheral status. noError (0) -- Expected peripheral device is functioning through the attached port. other (1) -- None of the listed state. cableError (2) -- Expected peripheral device has cabling issue. powerError (3) -- Expected peripheral device has power issue. mgmtSysConfigError (4) -- Expected peripheral device has communications management system configuration issue. systemError (5) -- Telepresence system error. deviceError (6) -- Expected peripheral device is attached but not fully functional. linkError (7) -- Expected peripheral device has port level link issue. commError (8) -- Expected peripheral device has port level communication issue. detectionDisabled (9) -- Status detection has been disabled.' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9)) namedValues = NamedValues(("noError", 0), ("other", 1), ("cableError", 2), ("powerError", 3), ("mgmtSysConfigError", 4), ("systemError", 5), ("deviceError", 6), ("linkError", 7), ("commError", 8), ("detectionDisabled", 9)) class CtpSystemAccessProtocol(TextualConvention, Integer32): description = 'The textual convention identifies supported Telepresence user access protocol. http (1) -- Hypertext Transfer Protocol (HTTP) snmp (2) -- Simple Network Management Protocol (SNMP) ssh (3) -- Secure Shell (SSH)' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3)) namedValues = NamedValues(("http", 1), ("snmp", 2), ("ssh", 3)) class CtpPeripheralDeviceCategoryCode(TextualConvention, Integer32): description = 'The textual convention identifies the peripheral type. unknown (0) -- Unknown Device other (1) -- None of the listed device uplinkDevice (2) -- Device attached to CTS uplink port ipPhone (3) -- IP phone camera (4) -- Camera display (5) -- Display secCodec (6) -- CTS secondary codec docCamera (7) -- Document camera projector (8) -- Projector dviDevice (9) -- Device attached to DVI port presentationCodec (10) -- CTS codec process presentation -- stream auxiliaryControlUnit (11) -- Auxiliary control unit audioExpansionUnit (12) -- Audio expansion unit microphone (13) -- Microphone headset (14) -- Headset positionMic (15) -- Position microphone digitalMediaSystem (16) -- Digitial Media System auxHDMIOuputDevice (17) -- Auxiliary HDMI output device uiDevice (18) -- User Interface device for CTS auxHDMIInputDevice (19) -- HDMI input enabled device bringYourOwnDevice (20) -- Bring Your Own Device, -- like PC,Laptop,Tablet etc' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20)) namedValues = NamedValues(("unknown", 0), ("other", 1), ("uplinkDevice", 2), ("ipPhone", 3), ("camera", 4), ("display", 5), ("secCodec", 6), ("docCamera", 7), ("projector", 8), ("dviDevice", 9), ("presentationCodec", 10), ("auxiliaryControlUnit", 11), ("audioExpansionUnit", 12), ("microphone", 13), ("headset", 14), ("positionMic", 15), ("digitialMediaSystem", 16), ("auxHDMIOutputDevice", 17), ("uiDevice", 18), ("auxHDMIInputDevice", 19), ("bringYourOwnDevice", 20)) ciscoTelepresenceMIBNotifs = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 643, 0)) ciscoTelepresenceMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 643, 1)) ciscoTelepresenceMIBConform = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 643, 2)) ctpObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 1)) ctpPeripheralStatusObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2)) ctpEventHistory = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 3)) ctpPeripheralErrorNotifyEnable = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 1, 1), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: ctpPeripheralErrorNotifyEnable.setStatus('deprecated') if mibBuilder.loadTexts: ctpPeripheralErrorNotifyEnable.setDescription("This object controls generation of ctpPeripheralErrorNotification. When the object is 'true(1)', generation of ctpPeripheralErrorNotification is enabled. When the object is 'false(2)', generation of ctpPeripheralErrorNotification is disabled. ctpPeripheralErrorNotifyEnable object is superseded by ctpPeriStatusChangeNotifyEnable.") ctpSysUserAuthFailNotifyEnable = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 1, 2), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: ctpSysUserAuthFailNotifyEnable.setStatus('current') if mibBuilder.loadTexts: ctpSysUserAuthFailNotifyEnable.setDescription("This object controls generation of ctpSysUserAuthFailNotification. When the object is 'true(1)', generation of ctpSysUserAuthFailNotification is enabled. When the object is 'false(2)', generation of ctpSysUserAuthFailNotification is disabled.") ctpSystemReset = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 1, 3), CtpSystemResetMode().clone('noRestart')).setMaxAccess("readwrite") if mibBuilder.loadTexts: ctpSystemReset.setStatus('current') if mibBuilder.loadTexts: ctpSystemReset.setDescription('This object is used to reset or restart a Telepresence system.') ctpPeriStatusChangeNotifyEnable = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 1, 4), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: ctpPeriStatusChangeNotifyEnable.setStatus('current') if mibBuilder.loadTexts: ctpPeriStatusChangeNotifyEnable.setDescription("This object controls generation of ctpPeriStatusChangeNotification. When the object is 'true(1)', generation of ctpPeriStatusChangeNotification is enabled. When the object is 'false(2)', generation of ctpPeriStatusChangeNotification is disabled.") ctpVlanId = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 1, 5), Unsigned32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ctpVlanId.setStatus('current') if mibBuilder.loadTexts: ctpVlanId.setDescription('This object specifies the Telepresence system VLAN ID.') ctpDefaultGatewayAddrType = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 1, 6), InetAddressType()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ctpDefaultGatewayAddrType.setStatus('current') if mibBuilder.loadTexts: ctpDefaultGatewayAddrType.setDescription('This object specifies the type of address contained in the corresponding instance of ctpDefaultGateway.') ctpDefaultGateway = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 1, 7), InetAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ctpDefaultGateway.setStatus('current') if mibBuilder.loadTexts: ctpDefaultGateway.setDescription('This object specifies the Telepresence system default gateway.') ctpPeripheralStatusTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 1), ) if mibBuilder.loadTexts: ctpPeripheralStatusTable.setStatus('current') if mibBuilder.loadTexts: ctpPeripheralStatusTable.setDescription('The table contains system peripheral information. An entry in this table has a corresponding entry, INDEX-ed by the same value of ctpPeripheralIndex, in the table relevant to the type of interface: ctpEtherPeripheralStatusTable for Ethernet, ctpHDMIPeripheralStatusTable for HDMI or ctpDVIPeripheralStatusTable for DVI.') ctpPeripheralStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 1, 1), ).setIndexNames((0, "CISCO-TELEPRESENCE-MIB", "ctpPeripheralIndex")) if mibBuilder.loadTexts: ctpPeripheralStatusEntry.setStatus('current') if mibBuilder.loadTexts: ctpPeripheralStatusEntry.setDescription('An entry contains information about one peripheral which is configured or detected by a Telepresence system.') ctpPeripheralIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 1, 1, 1), Unsigned32()) if mibBuilder.loadTexts: ctpPeripheralIndex.setStatus('current') if mibBuilder.loadTexts: ctpPeripheralIndex.setDescription('This object specifies a unique index for a peripheral which is attached to a Telepresence system.') ctpPeripheralDescription = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 1, 1, 2), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: ctpPeripheralDescription.setStatus('current') if mibBuilder.loadTexts: ctpPeripheralDescription.setDescription('This object specifies a description of the attached peripheral. Peripheral description may be the peripheral type, model and/or version information or a peripheral signal description.') ctpPeripheralStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 1, 1, 3), CtpPeripheralStatusCode()).setMaxAccess("readonly") if mibBuilder.loadTexts: ctpPeripheralStatus.setStatus('current') if mibBuilder.loadTexts: ctpPeripheralStatus.setDescription('This object specifies a peripheral status.') ctpPeripheralDeviceCategory = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 1, 1, 4), CtpPeripheralDeviceCategoryCode()).setMaxAccess("readonly") if mibBuilder.loadTexts: ctpPeripheralDeviceCategory.setStatus('current') if mibBuilder.loadTexts: ctpPeripheralDeviceCategory.setDescription('This object specifies a peripheral category of a device.') ctpPeripheralDeviceNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 1, 1, 5), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ctpPeripheralDeviceNumber.setStatus('current') if mibBuilder.loadTexts: ctpPeripheralDeviceNumber.setDescription('This object specifies a device number for a peripheral. Device number is unique within the same peripheral device category.') ctpEtherPeripheralStatusTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 2), ) if mibBuilder.loadTexts: ctpEtherPeripheralStatusTable.setStatus('current') if mibBuilder.loadTexts: ctpEtherPeripheralStatusTable.setDescription('The table contains information about all peripherals connected to the system via Ethernet port.') ctpEtherPeripheralStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 2, 1), ).setIndexNames((0, "CISCO-TELEPRESENCE-MIB", "ctpPeripheralIndex"), (0, "CISCO-TELEPRESENCE-MIB", "ctpEtherPeripheralIndex")) if mibBuilder.loadTexts: ctpEtherPeripheralStatusEntry.setStatus('current') if mibBuilder.loadTexts: ctpEtherPeripheralStatusEntry.setDescription('An entry contains information about one peripheral attached to the Telepresence system via Ethernet.') ctpEtherPeripheralIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 2, 1, 1), Unsigned32()) if mibBuilder.loadTexts: ctpEtherPeripheralIndex.setStatus('current') if mibBuilder.loadTexts: ctpEtherPeripheralIndex.setDescription("This object specifies a unique number for a peripheral Ethernet interface. If no peripheral has more than one Ethernet interface, this object will have value '1'.") ctpEtherPeripheralIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 2, 1, 2), InterfaceIndexOrZero()).setMaxAccess("readonly") if mibBuilder.loadTexts: ctpEtherPeripheralIfIndex.setStatus('current') if mibBuilder.loadTexts: ctpEtherPeripheralIfIndex.setDescription("The object specifies an index value that uniquely identifies the interface to which this entry is applicable. The interface identified by a particular value of this index is the same interface as identified by the same value of the IF-MIB's ifIndex. If this entry doesn't have corresponding ifIndex, then this value will have value '0'.") ctpEtherPeripheralAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 2, 1, 3), InetAddressType()).setMaxAccess("readonly") if mibBuilder.loadTexts: ctpEtherPeripheralAddrType.setStatus('current') if mibBuilder.loadTexts: ctpEtherPeripheralAddrType.setDescription('This object specifies the type of address contained in the corresponding instance of ctpEtherPeripheralAddr.') ctpEtherPeripheralAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 2, 1, 4), InetAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: ctpEtherPeripheralAddr.setStatus('current') if mibBuilder.loadTexts: ctpEtherPeripheralAddr.setDescription('This object specifies the address of the attached peripheral in the format given by the corresponding instance of ctpEtherPeripheralAddrType.') ctpEtherPeripheralStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 2, 1, 5), CtpPeripheralStatusCode()).setMaxAccess("readonly") if mibBuilder.loadTexts: ctpEtherPeripheralStatus.setStatus('current') if mibBuilder.loadTexts: ctpEtherPeripheralStatus.setDescription('This object specifies attached peripheral status retrieved via Ethernet port.') ctpHDMIPeripheralStatusTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 3), ) if mibBuilder.loadTexts: ctpHDMIPeripheralStatusTable.setStatus('current') if mibBuilder.loadTexts: ctpHDMIPeripheralStatusTable.setDescription('The table contains information about all peripherals connected to the system via HDMI.') ctpHDMIPeripheralStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 3, 1), ).setIndexNames((0, "CISCO-TELEPRESENCE-MIB", "ctpPeripheralIndex"), (0, "CISCO-TELEPRESENCE-MIB", "ctpHDMIPeripheralIndex")) if mibBuilder.loadTexts: ctpHDMIPeripheralStatusEntry.setStatus('current') if mibBuilder.loadTexts: ctpHDMIPeripheralStatusEntry.setDescription('An entry contains information about one Telepresence HDMI peripheral.') ctpHDMIPeripheralIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 3, 1, 1), Unsigned32()) if mibBuilder.loadTexts: ctpHDMIPeripheralIndex.setStatus('current') if mibBuilder.loadTexts: ctpHDMIPeripheralIndex.setDescription("This object specifies a unique number for a peripheral HDMI. If no peripheral has more than one HDMI, this object will have value '1'.") ctpHDMIPeripheralCableStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 3, 1, 2), CtpPeripheralCableCode()).setMaxAccess("readonly") if mibBuilder.loadTexts: ctpHDMIPeripheralCableStatus.setStatus('current') if mibBuilder.loadTexts: ctpHDMIPeripheralCableStatus.setDescription("This object specifies cable status of an attached peripheral. This object is set to 'loose' if system detects cable is 'unplugged' but power is 'on'.") ctpHDMIPeripheralPowerStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 3, 1, 3), CtpPeripheralPowerCode()).setMaxAccess("readonly") if mibBuilder.loadTexts: ctpHDMIPeripheralPowerStatus.setStatus('current') if mibBuilder.loadTexts: ctpHDMIPeripheralPowerStatus.setDescription("This object specifies power status of an attached peripheral. This object is set to 'unknown' if system detects cable is 'unplugged'.") ctpDVIPeripheralStatusTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 4), ) if mibBuilder.loadTexts: ctpDVIPeripheralStatusTable.setStatus('current') if mibBuilder.loadTexts: ctpDVIPeripheralStatusTable.setDescription('The table contains information about all peripherals connected to the system via DVI.') ctpDVIPeripheralStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 4, 1), ).setIndexNames((0, "CISCO-TELEPRESENCE-MIB", "ctpPeripheralIndex"), (0, "CISCO-TELEPRESENCE-MIB", "ctpDVIPeripheralIndex")) if mibBuilder.loadTexts: ctpDVIPeripheralStatusEntry.setStatus('current') if mibBuilder.loadTexts: ctpDVIPeripheralStatusEntry.setDescription('An entry contains information about one peripheral attached to the Telepresence system via DVI.') ctpDVIPeripheralIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 4, 1, 1), Unsigned32()) if mibBuilder.loadTexts: ctpDVIPeripheralIndex.setStatus('current') if mibBuilder.loadTexts: ctpDVIPeripheralIndex.setDescription("This object specifies a unique number for a peripheral DVI. If no peripheral has more than one DVI, this object will have value '1'. Note that some Telepresence systems have no DVI port and some Telepresence systems have only one DVI port.") ctpDVIPeripheralCableStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 4, 1, 2), CtpPeripheralCableCode()).setMaxAccess("readonly") if mibBuilder.loadTexts: ctpDVIPeripheralCableStatus.setStatus('current') if mibBuilder.loadTexts: ctpDVIPeripheralCableStatus.setDescription('This object specifies attached device cable status reported by DVI.') ctpRS232PeripheralStatusTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 5), ) if mibBuilder.loadTexts: ctpRS232PeripheralStatusTable.setStatus('current') if mibBuilder.loadTexts: ctpRS232PeripheralStatusTable.setDescription('The table contains information about all peripherals connected to the system via RS-232.') ctpRS232PeripheralStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 5, 1), ).setIndexNames((0, "CISCO-TELEPRESENCE-MIB", "ctpPeripheralIndex"), (0, "CISCO-TELEPRESENCE-MIB", "ctpRS232PeripheralIndex")) if mibBuilder.loadTexts: ctpRS232PeripheralStatusEntry.setStatus('current') if mibBuilder.loadTexts: ctpRS232PeripheralStatusEntry.setDescription('An entry contains information about one peripheral attached to the Telepresence system via RS-232.') ctpRS232PeripheralIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 5, 1, 1), Unsigned32()) if mibBuilder.loadTexts: ctpRS232PeripheralIndex.setStatus('current') if mibBuilder.loadTexts: ctpRS232PeripheralIndex.setDescription("This object specifies a unique number for a peripheral RS-232. If no peripheral has more than one RS-232, this object will have value '1'. Note that some Telepresence systems have no RS-232 port.") ctpRS232PortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 5, 1, 2), InterfaceIndexOrZero()).setMaxAccess("readonly") if mibBuilder.loadTexts: ctpRS232PortIndex.setStatus('current') if mibBuilder.loadTexts: ctpRS232PortIndex.setDescription("The object specifies an index value that uniquely identifies the RS-232 port to which this entry is applicable. Its value is the same as RS-232-MIB's rs232PortIndex for the port. If RS-232-MIB is not supported by the agent, then this value will have value '0'.") ctpRS232PeripheralConnStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 5, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("connected", 1), ("unknown", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ctpRS232PeripheralConnStatus.setStatus('current') if mibBuilder.loadTexts: ctpRS232PeripheralConnStatus.setDescription("This object specifies peripheral which is connected via RS232. When the object is 'connected(1)', peripheral connection via RS232 is working properly. When the object is 'unknown(2)', peripheral connection via RS232 is not working properly. It may due to device problem or connection problem.") ctpPeripheralAttributeTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 6), ) if mibBuilder.loadTexts: ctpPeripheralAttributeTable.setStatus('current') if mibBuilder.loadTexts: ctpPeripheralAttributeTable.setDescription("The table contains information about attributes for the peripherals which are connected to the system. Peripheral attribute may specify peripheral's component information, for example, an entry may specify lifetime of a lamp on a presentation device.") ctpPeripheralAttributeEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 6, 1), ).setIndexNames((0, "CISCO-TELEPRESENCE-MIB", "ctpPeripheralIndex"), (0, "CISCO-TELEPRESENCE-MIB", "ctpPeripheralAttributeIndex")) if mibBuilder.loadTexts: ctpPeripheralAttributeEntry.setStatus('current') if mibBuilder.loadTexts: ctpPeripheralAttributeEntry.setDescription('An entry contains information about one peripheral attribute related to the peripheral specified by ctpPeripheralIndex.') ctpPeripheralAttributeIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 6, 1, 1), Unsigned32()) if mibBuilder.loadTexts: ctpPeripheralAttributeIndex.setStatus('current') if mibBuilder.loadTexts: ctpPeripheralAttributeIndex.setDescription("This object specifies a unique number for a peripheral attribute. If no peripheral has more than one attribute, this object will have value '1'.") ctpPeripheralAttributeDescr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 6, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("lampOperTime", 1), ("lampState", 2), ("powerSwitchState", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ctpPeripheralAttributeDescr.setStatus('current') if mibBuilder.loadTexts: ctpPeripheralAttributeDescr.setDescription('This object specifies description of a attribute. The supported attributes are lampOperTime(1) -- indicate the lamp operating time of a peripheral lampState(2) -- indicate the lamp state powerSwitchState(3) -- indicate the power on/off state of a peripheral Note that not all peripheral contains all the supported attributes. Agent reports whatever is available.') ctpPeripheralAttributeValue = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 6, 1, 3), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ctpPeripheralAttributeValue.setStatus('current') if mibBuilder.loadTexts: ctpPeripheralAttributeValue.setDescription('This object specifies value of the attribute corresponding to ctpPeripheralAttributeDescr. The possible value of the supported attributes is listed as the following: Attribute Unit SYNTAX ----------------------------------------------------------- lampOperTime hours Unsigned32(0..4294967295) lampState INTEGER { on(1), off(2), failure(3), unknown(4) } powerSwitchState INTEGER { on(1), off(2), unknown(3) }') ctpUSBPeripheralStatusTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 7), ) if mibBuilder.loadTexts: ctpUSBPeripheralStatusTable.setStatus('current') if mibBuilder.loadTexts: ctpUSBPeripheralStatusTable.setDescription('This table contains information about all the peripherals connected to the system via USB.') ctpUSBPeripheralStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 7, 1), ).setIndexNames((0, "CISCO-TELEPRESENCE-MIB", "ctpPeripheralIndex"), (0, "CISCO-TELEPRESENCE-MIB", "ctpUSBPeripheralIndex")) if mibBuilder.loadTexts: ctpUSBPeripheralStatusEntry.setStatus('current') if mibBuilder.loadTexts: ctpUSBPeripheralStatusEntry.setDescription('An entry drescribes a peripheral connected to the Telepresence system through USB.') ctpUSBPeripheralIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 7, 1, 1), Unsigned32()) if mibBuilder.loadTexts: ctpUSBPeripheralIndex.setStatus('current') if mibBuilder.loadTexts: ctpUSBPeripheralIndex.setDescription('This object indicates an arbitrary positive, integer-value that uniquely identifies the USB peripheral.') ctpUSBPeripheralCableStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 7, 1, 2), CtpPeripheralCableCode()).setMaxAccess("readonly") if mibBuilder.loadTexts: ctpUSBPeripheralCableStatus.setStatus('current') if mibBuilder.loadTexts: ctpUSBPeripheralCableStatus.setDescription('This object indicates the status of the cable attaching the USB peripheral.') ctpUSBPeripheralPowerStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 7, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("unknown", 1), ("self", 2), ("bus", 3), ("both", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ctpUSBPeripheralPowerStatus.setStatus('current') if mibBuilder.loadTexts: ctpUSBPeripheralPowerStatus.setDescription("This object indicates the source of power for the attached USB peripheral: 'unknown' - The source of power is unknown. 'self' - The USB peripheral is externally powered. 'bus' - The USB peripheral is powered by the USB bus. 'both' - The USB peripheral can be powered by both the USB bus or self") ctpUSBPeripheralPortType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 7, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("host", 1), ("device", 2), ("hub", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ctpUSBPeripheralPortType.setStatus('current') if mibBuilder.loadTexts: ctpUSBPeripheralPortType.setDescription("This object indicates the type of device connected to the USB port: 'host' - no device os connected to the port 'device' - a usb device is connected to the port 'hub' - a usb hub is connected to the port") ctpUSBPeripheralPortRate = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 7, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("low", 1), ("full", 2), ("high", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ctpUSBPeripheralPortRate.setStatus('current') if mibBuilder.loadTexts: ctpUSBPeripheralPortRate.setDescription("This object indicates the current operational rate of the USB peripheral: 'unknown' - The USB port rate is unknown 'low' - The USB port rate is at 1.5 Mbps. 'full' - The USB port rate is at 12 Mbps. 'high' - The USB port rate is at 480 Mbps.") ctp802dot11PeripheralStatusTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 8), ) if mibBuilder.loadTexts: ctp802dot11PeripheralStatusTable.setStatus('current') if mibBuilder.loadTexts: ctp802dot11PeripheralStatusTable.setDescription('The table contains information about all peripherals connected to the system via 802dot11.') ctp802dot11PeripheralStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 8, 1), ).setIndexNames((0, "CISCO-TELEPRESENCE-MIB", "ctpPeripheralIndex"), (0, "CISCO-TELEPRESENCE-MIB", "ctp802dot11PeripheralIndex")) if mibBuilder.loadTexts: ctp802dot11PeripheralStatusEntry.setStatus('current') if mibBuilder.loadTexts: ctp802dot11PeripheralStatusEntry.setDescription('An entry describes one Telepresence 802dot11 peripheral.') ctp802dot11PeripheralIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 8, 1, 1), Unsigned32()) if mibBuilder.loadTexts: ctp802dot11PeripheralIndex.setStatus('current') if mibBuilder.loadTexts: ctp802dot11PeripheralIndex.setDescription('This object indicates an arbitrary positive, integer-value that uniquely identifies the IEEE 802.11 peripheral.') ctp802dot11PeripheralIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 8, 1, 2), InterfaceIndexOrZero()).setMaxAccess("readonly") if mibBuilder.loadTexts: ctp802dot11PeripheralIfIndex.setStatus('current') if mibBuilder.loadTexts: ctp802dot11PeripheralIfIndex.setDescription("This object indicates an index value that uniquely identifies the interface to which this entry is applicable. If this entry doesn't have corresponding ifIndex, then this value will have value '0'.") ctp802dot11PeripheralAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 8, 1, 3), InetAddressType()).setMaxAccess("readonly") if mibBuilder.loadTexts: ctp802dot11PeripheralAddrType.setStatus('current') if mibBuilder.loadTexts: ctp802dot11PeripheralAddrType.setDescription('This object indicates the type of address indicated by the corresponding instance of ctp802dot11PeripheralAddr.') ctp802dot11PeripheralAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 8, 1, 4), InetAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: ctp802dot11PeripheralAddr.setStatus('current') if mibBuilder.loadTexts: ctp802dot11PeripheralAddr.setDescription('This object indicates the address of the attached peripheral in the format indicated by the corresponding instance of ctp802dot11PeripheralAddrType.') ctp802dot11PeripheralLinkStrength = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 8, 1, 5), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ctp802dot11PeripheralLinkStrength.setStatus('current') if mibBuilder.loadTexts: ctp802dot11PeripheralLinkStrength.setDescription('This object indicates the link strength of an IEEE 802.11 link for a peripheral. A return value of 0 indicates the link is not connected. A return value between 1 - 5 indicates the strength of the link, with 1 being the weakest and 5 being the strongest.') ctp802dot11PeripheralLinkStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 8, 1, 6), CtpPeripheralCableCode()).setMaxAccess("readonly") if mibBuilder.loadTexts: ctp802dot11PeripheralLinkStatus.setStatus('current') if mibBuilder.loadTexts: ctp802dot11PeripheralLinkStatus.setDescription('This object indicates the link status of the attached peripheral via IEEE 802.11 link.') ctpDPPeripheralStatusTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 9), ) if mibBuilder.loadTexts: ctpDPPeripheralStatusTable.setStatus('current') if mibBuilder.loadTexts: ctpDPPeripheralStatusTable.setDescription('The table contains information about all peripherals connected to the system via DP.') ctpDPPeripheralStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 9, 1), ).setIndexNames((0, "CISCO-TELEPRESENCE-MIB", "ctpPeripheralIndex"), (0, "CISCO-TELEPRESENCE-MIB", "ctpDPPeripheralIndex")) if mibBuilder.loadTexts: ctpDPPeripheralStatusEntry.setStatus('current') if mibBuilder.loadTexts: ctpDPPeripheralStatusEntry.setDescription('An entry contains information about one Telepresence DP peripheral.') ctpDPPeripheralIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 9, 1, 1), Unsigned32()) if mibBuilder.loadTexts: ctpDPPeripheralIndex.setStatus('current') if mibBuilder.loadTexts: ctpDPPeripheralIndex.setDescription("This object indicates a unique number for a peripheral DP. If no peripheral has more than one DP, this object will have value '1'.") ctpDPPeripheralCableStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 9, 1, 2), CtpPeripheralCableCode()).setMaxAccess("readonly") if mibBuilder.loadTexts: ctpDPPeripheralCableStatus.setStatus('current') if mibBuilder.loadTexts: ctpDPPeripheralCableStatus.setDescription("This object indicates the cable status of a peripheral which is attached to the system via Display Port interface. This object returns 'loose' if system detects cable is 'unplugged' but power is 'on'.") ctpDPPeripheralPowerStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 9, 1, 3), CtpPeripheralPowerCode()).setMaxAccess("readonly") if mibBuilder.loadTexts: ctpDPPeripheralPowerStatus.setStatus('current') if mibBuilder.loadTexts: ctpDPPeripheralPowerStatus.setDescription("This object indicates the power status of a peripheral which is attached to the system via Display Port interface. This object returns 'unknown' if system detects cable is 'unplugged'.") ctpPeripheralErrorHistTableSize = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 3, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 500)).clone(10)).setMaxAccess("readwrite") if mibBuilder.loadTexts: ctpPeripheralErrorHistTableSize.setStatus('current') if mibBuilder.loadTexts: ctpPeripheralErrorHistTableSize.setDescription("This object specifies the maximum number of entries that the ctpPeripheralErrorHistTable can contain. When the capacity of the ctpPeripheralErrorHistTable has reached the value specified by this object, then the agent deletes the oldest entity in order to accommodate the new entry. A value of '0' prevents any history from being retained. Some agents restrict the value of this object to be less than 500.") ctpPeripheralErrorHistLastIndex = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 3, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 4294967295))).setMaxAccess("readonly") if mibBuilder.loadTexts: ctpPeripheralErrorHistLastIndex.setStatus('current') if mibBuilder.loadTexts: ctpPeripheralErrorHistLastIndex.setDescription('This object specifies the value of the ctpPeripheralErrorHistIndex object corresponding to the last entry added to the table by the agent. If the management application uses the notifications defined by this module, then it can poll this object to determine whether it has missed a notification sent by the agent.') ctpPeripheralErrorHistoryTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 3, 3), ) if mibBuilder.loadTexts: ctpPeripheralErrorHistoryTable.setStatus('current') if mibBuilder.loadTexts: ctpPeripheralErrorHistoryTable.setDescription('This table contains a history of the detected peripheral status changes. After a management agent restart, when sysUpTime is reset to zero, this table records all notifications until such time as it becomes full. Thereafter, it remains full by retaining the number of most recent notifications specified in ctpPeripheralErrorHistTableSize.') ctpPeripheralErrorHistoryEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 3, 3, 1), ).setIndexNames((0, "CISCO-TELEPRESENCE-MIB", "ctpPeripheralErrorHistoryIndex")) if mibBuilder.loadTexts: ctpPeripheralErrorHistoryEntry.setStatus('current') if mibBuilder.loadTexts: ctpPeripheralErrorHistoryEntry.setDescription('An entry contains information about a Telepresence peripheral status changes.') ctpPeripheralErrorHistoryIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 3, 3, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4294967295))) if mibBuilder.loadTexts: ctpPeripheralErrorHistoryIndex.setStatus('current') if mibBuilder.loadTexts: ctpPeripheralErrorHistoryIndex.setDescription("A unique non-zero integer value that identifies a CtpPeripheralErrorHistoryEntry in the table. The value of this index starts from '1' and monotonically increases for each peripheral error known to the agent. If the value of this object is '4294967295', the agent will use '1' as the value of the next detected peripheral status change.") ctpPeripheralErrorIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 3, 3, 1, 2), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ctpPeripheralErrorIndex.setStatus('current') if mibBuilder.loadTexts: ctpPeripheralErrorIndex.setDescription('The object specifies the value of ctpPeripheralIndex of a peripheral which is in error state. This object is deprecated in favor of ctpPeripheralErrorDeviceCategory and ctpPeripheralErrorDeviceNumber.') ctpPeripheralErrorStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 3, 3, 1, 3), CtpPeripheralStatusCode()).setMaxAccess("readonly") if mibBuilder.loadTexts: ctpPeripheralErrorStatus.setStatus('current') if mibBuilder.loadTexts: ctpPeripheralErrorStatus.setDescription('This object specifies the peripheral status after its status changed.') ctpPeripheralErrorTimeStamp = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 3, 3, 1, 4), TimeStamp()).setMaxAccess("readonly") if mibBuilder.loadTexts: ctpPeripheralErrorTimeStamp.setStatus('current') if mibBuilder.loadTexts: ctpPeripheralErrorTimeStamp.setDescription('This object specifies the value of the sysUpTime object at the time the notification was generated.') ctpPeripheralErrorDeviceCategory = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 3, 3, 1, 5), CtpPeripheralDeviceCategoryCode()).setMaxAccess("readonly") if mibBuilder.loadTexts: ctpPeripheralErrorDeviceCategory.setStatus('current') if mibBuilder.loadTexts: ctpPeripheralErrorDeviceCategory.setDescription('The object specifies peripheral device category after its status changed.') ctpPeripheralErrorDeviceNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 3, 3, 1, 6), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ctpPeripheralErrorDeviceNumber.setStatus('current') if mibBuilder.loadTexts: ctpPeripheralErrorDeviceNumber.setDescription('The object specifies peripheral device number after its status changed. Device number is unique within the same peripheral device category.') ctpSysUserAuthFailHistTableSize = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 3, 4), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 500)).clone(10)).setMaxAccess("readwrite") if mibBuilder.loadTexts: ctpSysUserAuthFailHistTableSize.setStatus('current') if mibBuilder.loadTexts: ctpSysUserAuthFailHistTableSize.setDescription("This object specifies the number of entries that the ctpSysUserAuthFailHistTable can contain. When the capacity of the ctpSysUserAuthFailHistTable has reached the value specified by this object, then the agent deletes the oldest entity in order to accommodate the new entry. A value of '0' prevents any history from being retained. Some agents restrict the value of this object to be less than 500.") ctpSysUserAuthFailHistLastIndex = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 3, 5), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 4294967295))).setMaxAccess("readonly") if mibBuilder.loadTexts: ctpSysUserAuthFailHistLastIndex.setStatus('current') if mibBuilder.loadTexts: ctpSysUserAuthFailHistLastIndex.setDescription('This object specifies the value of the ctpSysUserAuthFailHistIndex object corresponding to the last entry added to the table by the agent. If the management application uses the notifications defined by this module, then it can poll this object to determine whether it has missed a notification sent by the agent.') ctpSysUserAuthFailHistoryTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 3, 6), ) if mibBuilder.loadTexts: ctpSysUserAuthFailHistoryTable.setStatus('current') if mibBuilder.loadTexts: ctpSysUserAuthFailHistoryTable.setDescription('This table contains a history of detected user authentication failures. After a management agent restart, when sysUpTime is reset to zero, this table records all user authentication failure notifications until such time as it becomes full. Thereafter, it remains full by retaining the number of most recent notifications specified in ctpSysUserAuthFailHistTableSize.') ctpSysUserAuthFailHistoryEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 3, 6, 1), ).setIndexNames((0, "CISCO-TELEPRESENCE-MIB", "ctpSysUserAuthFailHistoryIndex")) if mibBuilder.loadTexts: ctpSysUserAuthFailHistoryEntry.setStatus('current') if mibBuilder.loadTexts: ctpSysUserAuthFailHistoryEntry.setDescription('An entry contains information about a Telepresence system user authentication failure.') ctpSysUserAuthFailHistoryIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 3, 6, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4294967295))) if mibBuilder.loadTexts: ctpSysUserAuthFailHistoryIndex.setStatus('current') if mibBuilder.loadTexts: ctpSysUserAuthFailHistoryIndex.setDescription("A unique non-zero integer value that identifies a CtpSysUserAuthFailHistoryEntry in the table. The value of this index starts from '1' and monotonically increases for each system authentication failure event known to the agent. If the value of this object is '4294967295', the agent will use '1' as the value of the next user authentication failure event.") ctpSysUserAuthFailSourceAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 3, 6, 1, 2), InetAddressType()).setMaxAccess("readonly") if mibBuilder.loadTexts: ctpSysUserAuthFailSourceAddrType.setStatus('current') if mibBuilder.loadTexts: ctpSysUserAuthFailSourceAddrType.setDescription('The object specifies the type of address contained in the corresponding instance of ctpSysUserAuthFailSourceAddr.') ctpSysUserAuthFailSourceAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 3, 6, 1, 3), InetAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: ctpSysUserAuthFailSourceAddr.setStatus('current') if mibBuilder.loadTexts: ctpSysUserAuthFailSourceAddr.setDescription('The object specifies the source address when the user authentication failure occurred, in the format given by the corresponding instance of ctpSysUserAuthFailSourceAddrType.') ctpSysUserAuthFailSourcePort = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 3, 6, 1, 4), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ctpSysUserAuthFailSourcePort.setStatus('current') if mibBuilder.loadTexts: ctpSysUserAuthFailSourcePort.setDescription('The object specifies the source TCP/UDP port number when a user authentication failure occurred.') ctpSysUserAuthFailUserName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 3, 6, 1, 5), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(1, 32))).setMaxAccess("readonly") if mibBuilder.loadTexts: ctpSysUserAuthFailUserName.setStatus('current') if mibBuilder.loadTexts: ctpSysUserAuthFailUserName.setDescription('The object specifies the user name which was used to gain system access when authentication failure occurred.') ctpSysUserAuthFailAccessProtocol = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 3, 6, 1, 6), CtpSystemAccessProtocol()).setMaxAccess("readonly") if mibBuilder.loadTexts: ctpSysUserAuthFailAccessProtocol.setStatus('current') if mibBuilder.loadTexts: ctpSysUserAuthFailAccessProtocol.setDescription('This object specifies the access protocol when a user authentication failure occurred.') ctpSysUserAuthFailTimeStamp = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 3, 6, 1, 7), TimeStamp()).setMaxAccess("readonly") if mibBuilder.loadTexts: ctpSysUserAuthFailTimeStamp.setStatus('current') if mibBuilder.loadTexts: ctpSysUserAuthFailTimeStamp.setDescription('This object specifies the value of the sysUpTime object at the time the notification was generated.') ctpPeripheralErrorNotification = NotificationType((1, 3, 6, 1, 4, 1, 9, 9, 643, 0, 1)).setObjects(("CISCO-TELEPRESENCE-MIB", "ctpPeripheralErrorIndex"), ("CISCO-TELEPRESENCE-MIB", "ctpPeripheralErrorStatus")) if mibBuilder.loadTexts: ctpPeripheralErrorNotification.setStatus('deprecated') if mibBuilder.loadTexts: ctpPeripheralErrorNotification.setDescription('This notification is sent when a peripheral error is detected. This notification is deprecated in favor of ctpPeriStatusChangeNotification. ctpPeripheralErrorNotification object is superseded by ctpPeriStatusChangeNotification.') ctpSysUserAuthFailNotification = NotificationType((1, 3, 6, 1, 4, 1, 9, 9, 643, 0, 2)).setObjects(("CISCO-TELEPRESENCE-MIB", "ctpSysUserAuthFailSourceAddrType"), ("CISCO-TELEPRESENCE-MIB", "ctpSysUserAuthFailSourceAddr"), ("CISCO-TELEPRESENCE-MIB", "ctpSysUserAuthFailSourcePort"), ("CISCO-TELEPRESENCE-MIB", "ctpSysUserAuthFailUserName"), ("CISCO-TELEPRESENCE-MIB", "ctpSysUserAuthFailAccessProtocol")) if mibBuilder.loadTexts: ctpSysUserAuthFailNotification.setStatus('current') if mibBuilder.loadTexts: ctpSysUserAuthFailNotification.setDescription('This notification is sent when a user authentication failure via a Telepresence supported access protocol is detected.') ctpPeriStatusChangeNotification = NotificationType((1, 3, 6, 1, 4, 1, 9, 9, 643, 0, 3)).setObjects(("CISCO-TELEPRESENCE-MIB", "ctpPeripheralErrorIndex"), ("CISCO-TELEPRESENCE-MIB", "ctpPeripheralErrorDeviceCategory"), ("CISCO-TELEPRESENCE-MIB", "ctpPeripheralErrorDeviceNumber"), ("CISCO-TELEPRESENCE-MIB", "ctpPeripheralErrorStatus")) if mibBuilder.loadTexts: ctpPeriStatusChangeNotification.setStatus('current') if mibBuilder.loadTexts: ctpPeriStatusChangeNotification.setDescription('This notification is sent when a peripheral status is changed.') ciscoTelepresenceCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 643, 2, 1)) ciscoTelepresenceMIBGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 643, 2, 2)) ciscoTelepresenceCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 643, 2, 1, 1)).setObjects(("CISCO-TELEPRESENCE-MIB", "ciscoTpConfigurationGroup"), ("CISCO-TELEPRESENCE-MIB", "ciscoTpPeripheralStatusGroup"), ("CISCO-TELEPRESENCE-MIB", "ciscoTpEventHistoryGroup"), ("CISCO-TELEPRESENCE-MIB", "ciscoTpNotificationGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoTelepresenceCompliance = ciscoTelepresenceCompliance.setStatus('deprecated') if mibBuilder.loadTexts: ciscoTelepresenceCompliance.setDescription('The compliance statement for entities which implement the Cisco Telepresence MIB.') ciscoTelepresenceComplianceR01 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 643, 2, 1, 2)).setObjects(("CISCO-TELEPRESENCE-MIB", "ciscoTpConfigurationGroup"), ("CISCO-TELEPRESENCE-MIB", "ciscoTpPeripheralStatusGroup"), ("CISCO-TELEPRESENCE-MIB", "ciscoTpEventHistoryGroup"), ("CISCO-TELEPRESENCE-MIB", "ciscoTpNotificationGroup"), ("CISCO-TELEPRESENCE-MIB", "ciscoTpRS232PeripheralStatusGroup"), ("CISCO-TELEPRESENCE-MIB", "ciscoTpPeripheralAttributeGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoTelepresenceComplianceR01 = ciscoTelepresenceComplianceR01.setStatus('deprecated') if mibBuilder.loadTexts: ciscoTelepresenceComplianceR01.setDescription('The compliance statement for entities which implement the Cisco Telepresence MIB.') ciscoTelepresenceComplianceR02 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 643, 2, 1, 3)).setObjects(("CISCO-TELEPRESENCE-MIB", "ciscoTpConfigurationGroupR01"), ("CISCO-TELEPRESENCE-MIB", "ciscoTpPeripheralStatusGroupR01"), ("CISCO-TELEPRESENCE-MIB", "ciscoTpEventHistoryGroupR01"), ("CISCO-TELEPRESENCE-MIB", "ciscoTpNotificationGroupR01"), ("CISCO-TELEPRESENCE-MIB", "ciscoTpRS232PeripheralStatusGroup"), ("CISCO-TELEPRESENCE-MIB", "ciscoTpPeripheralAttributeGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoTelepresenceComplianceR02 = ciscoTelepresenceComplianceR02.setStatus('deprecated') if mibBuilder.loadTexts: ciscoTelepresenceComplianceR02.setDescription('The compliance statement for entities which implement the Cisco Telepresence MIB.') ciscoTelepresenceComplianceR03 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 643, 2, 1, 4)).setObjects(("CISCO-TELEPRESENCE-MIB", "ciscoTpConfigurationGroupR01"), ("CISCO-TELEPRESENCE-MIB", "ciscoTpPeripheralStatusGroupR02"), ("CISCO-TELEPRESENCE-MIB", "ciscoTpEventHistoryGroupR01"), ("CISCO-TELEPRESENCE-MIB", "ciscoTpNotificationGroupR01"), ("CISCO-TELEPRESENCE-MIB", "ciscoTpRS232PeripheralStatusGroup"), ("CISCO-TELEPRESENCE-MIB", "ciscoTpPeripheralAttributeGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoTelepresenceComplianceR03 = ciscoTelepresenceComplianceR03.setStatus('deprecated') if mibBuilder.loadTexts: ciscoTelepresenceComplianceR03.setDescription('The compliance statement for entities which implement the Cisco Telepresence MIB.') ciscoTelepresenceComplianceR04 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 643, 2, 1, 5)).setObjects(("CISCO-TELEPRESENCE-MIB", "ciscoTpConfigurationGroupR01"), ("CISCO-TELEPRESENCE-MIB", "ciscoTpConfigurationGroupR02"), ("CISCO-TELEPRESENCE-MIB", "ciscoTpPeripheralStatusGroupR02"), ("CISCO-TELEPRESENCE-MIB", "ciscoTpEventHistoryGroupR01"), ("CISCO-TELEPRESENCE-MIB", "ciscoTpNotificationGroupR01"), ("CISCO-TELEPRESENCE-MIB", "ciscoTpRS232PeripheralStatusGroup"), ("CISCO-TELEPRESENCE-MIB", "ciscoTpPeripheralAttributeGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoTelepresenceComplianceR04 = ciscoTelepresenceComplianceR04.setStatus('deprecated') if mibBuilder.loadTexts: ciscoTelepresenceComplianceR04.setDescription('The compliance statement for entities which implement the Cisco Telepresence MIB.') ciscoTelepresenceComplianceR05 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 643, 2, 1, 6)).setObjects(("CISCO-TELEPRESENCE-MIB", "ciscoTpConfigurationGroupR01"), ("CISCO-TELEPRESENCE-MIB", "ciscoTpConfigurationGroupR02"), ("CISCO-TELEPRESENCE-MIB", "ciscoTpPeripheralStatusGroupR02"), ("CISCO-TELEPRESENCE-MIB", "ciscoTpEventHistoryGroupR01"), ("CISCO-TELEPRESENCE-MIB", "ciscoTpNotificationGroupR01"), ("CISCO-TELEPRESENCE-MIB", "ciscoTpDPPeripheralStatusGroup"), ("CISCO-TELEPRESENCE-MIB", "ciscoTpRS232PeripheralStatusGroup"), ("CISCO-TELEPRESENCE-MIB", "ciscoTpPeripheralAttributeGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoTelepresenceComplianceR05 = ciscoTelepresenceComplianceR05.setStatus('current') if mibBuilder.loadTexts: ciscoTelepresenceComplianceR05.setDescription('The compliance statement for entities which implement the Cisco Telepresence MIB.') ciscoTpConfigurationGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 643, 2, 2, 1)).setObjects(("CISCO-TELEPRESENCE-MIB", "ctpPeripheralErrorNotifyEnable"), ("CISCO-TELEPRESENCE-MIB", "ctpSysUserAuthFailNotifyEnable"), ("CISCO-TELEPRESENCE-MIB", "ctpSystemReset")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoTpConfigurationGroup = ciscoTpConfigurationGroup.setStatus('deprecated') if mibBuilder.loadTexts: ciscoTpConfigurationGroup.setDescription('A collection of objects providing the notification configuration and system reset. ciscoTpConfigurationGroup object is superseded by ciscoTpConfigurationGroupR01.') ciscoTpPeripheralStatusGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 643, 2, 2, 2)).setObjects(("CISCO-TELEPRESENCE-MIB", "ctpPeripheralDescription"), ("CISCO-TELEPRESENCE-MIB", "ctpPeripheralStatus"), ("CISCO-TELEPRESENCE-MIB", "ctpEtherPeripheralIfIndex"), ("CISCO-TELEPRESENCE-MIB", "ctpEtherPeripheralAddrType"), ("CISCO-TELEPRESENCE-MIB", "ctpEtherPeripheralAddr"), ("CISCO-TELEPRESENCE-MIB", "ctpEtherPeripheralStatus"), ("CISCO-TELEPRESENCE-MIB", "ctpHDMIPeripheralCableStatus"), ("CISCO-TELEPRESENCE-MIB", "ctpHDMIPeripheralPowerStatus"), ("CISCO-TELEPRESENCE-MIB", "ctpDVIPeripheralCableStatus")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoTpPeripheralStatusGroup = ciscoTpPeripheralStatusGroup.setStatus('deprecated') if mibBuilder.loadTexts: ciscoTpPeripheralStatusGroup.setDescription('A collection of objects providing the Telepresence peripheral information. ciscoTpPeripheralStatusGroup object is superseded by ciscoTpPeripheralStatusGroupR01.') ciscoTpEventHistoryGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 643, 2, 2, 3)).setObjects(("CISCO-TELEPRESENCE-MIB", "ctpPeripheralErrorHistTableSize"), ("CISCO-TELEPRESENCE-MIB", "ctpPeripheralErrorHistLastIndex"), ("CISCO-TELEPRESENCE-MIB", "ctpPeripheralErrorIndex"), ("CISCO-TELEPRESENCE-MIB", "ctpPeripheralErrorStatus"), ("CISCO-TELEPRESENCE-MIB", "ctpPeripheralErrorTimeStamp"), ("CISCO-TELEPRESENCE-MIB", "ctpSysUserAuthFailHistTableSize"), ("CISCO-TELEPRESENCE-MIB", "ctpSysUserAuthFailHistLastIndex"), ("CISCO-TELEPRESENCE-MIB", "ctpSysUserAuthFailSourceAddrType"), ("CISCO-TELEPRESENCE-MIB", "ctpSysUserAuthFailSourceAddr"), ("CISCO-TELEPRESENCE-MIB", "ctpSysUserAuthFailSourcePort"), ("CISCO-TELEPRESENCE-MIB", "ctpSysUserAuthFailUserName"), ("CISCO-TELEPRESENCE-MIB", "ctpSysUserAuthFailAccessProtocol"), ("CISCO-TELEPRESENCE-MIB", "ctpSysUserAuthFailTimeStamp")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoTpEventHistoryGroup = ciscoTpEventHistoryGroup.setStatus('deprecated') if mibBuilder.loadTexts: ciscoTpEventHistoryGroup.setDescription('A collection of managed objects providing notification event history information. ciscoTpEventHistoryGroup object is superseded by ciscoTpEventHistoryGroupR01.') ciscoTpNotificationGroup = NotificationGroup((1, 3, 6, 1, 4, 1, 9, 9, 643, 2, 2, 4)).setObjects(("CISCO-TELEPRESENCE-MIB", "ctpPeripheralErrorNotification"), ("CISCO-TELEPRESENCE-MIB", "ctpSysUserAuthFailNotification")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoTpNotificationGroup = ciscoTpNotificationGroup.setStatus('deprecated') if mibBuilder.loadTexts: ciscoTpNotificationGroup.setDescription('A collection of Telepresence system notifications. ciscoTpNotificationGroup object is superseded by ciscoTpNotificationGroupR01.') ciscoTpRS232PeripheralStatusGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 643, 2, 2, 5)).setObjects(("CISCO-TELEPRESENCE-MIB", "ctpRS232PortIndex"), ("CISCO-TELEPRESENCE-MIB", "ctpRS232PeripheralConnStatus")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoTpRS232PeripheralStatusGroup = ciscoTpRS232PeripheralStatusGroup.setStatus('current') if mibBuilder.loadTexts: ciscoTpRS232PeripheralStatusGroup.setDescription('A collection of objects providing the information about Telepresence peripheral which is connected via RS232.') ciscoTpPeripheralAttributeGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 643, 2, 2, 6)).setObjects(("CISCO-TELEPRESENCE-MIB", "ctpPeripheralAttributeDescr"), ("CISCO-TELEPRESENCE-MIB", "ctpPeripheralAttributeValue")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoTpPeripheralAttributeGroup = ciscoTpPeripheralAttributeGroup.setStatus('current') if mibBuilder.loadTexts: ciscoTpPeripheralAttributeGroup.setDescription('A collection of managed objects providing peripheral attribute information.') ciscoTpPeripheralStatusGroupR01 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 643, 2, 2, 7)).setObjects(("CISCO-TELEPRESENCE-MIB", "ctpPeripheralDescription"), ("CISCO-TELEPRESENCE-MIB", "ctpPeripheralStatus"), ("CISCO-TELEPRESENCE-MIB", "ctpPeripheralDeviceCategory"), ("CISCO-TELEPRESENCE-MIB", "ctpPeripheralDeviceNumber"), ("CISCO-TELEPRESENCE-MIB", "ctpEtherPeripheralIfIndex"), ("CISCO-TELEPRESENCE-MIB", "ctpEtherPeripheralAddrType"), ("CISCO-TELEPRESENCE-MIB", "ctpEtherPeripheralAddr"), ("CISCO-TELEPRESENCE-MIB", "ctpEtherPeripheralStatus"), ("CISCO-TELEPRESENCE-MIB", "ctpHDMIPeripheralCableStatus"), ("CISCO-TELEPRESENCE-MIB", "ctpHDMIPeripheralPowerStatus"), ("CISCO-TELEPRESENCE-MIB", "ctpDVIPeripheralCableStatus")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoTpPeripheralStatusGroupR01 = ciscoTpPeripheralStatusGroupR01.setStatus('deprecated') if mibBuilder.loadTexts: ciscoTpPeripheralStatusGroupR01.setDescription('A collection of objects providing the Telepresence peripheral information. ciscoTpPeripheralStatusGroupR01 object is superseded by ciscoTpPeripheralStatusGroupR02.') ciscoTpEventHistoryGroupR01 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 643, 2, 2, 8)).setObjects(("CISCO-TELEPRESENCE-MIB", "ctpPeripheralErrorHistTableSize"), ("CISCO-TELEPRESENCE-MIB", "ctpPeripheralErrorHistLastIndex"), ("CISCO-TELEPRESENCE-MIB", "ctpPeripheralErrorIndex"), ("CISCO-TELEPRESENCE-MIB", "ctpPeripheralErrorStatus"), ("CISCO-TELEPRESENCE-MIB", "ctpPeripheralErrorTimeStamp"), ("CISCO-TELEPRESENCE-MIB", "ctpPeripheralErrorDeviceCategory"), ("CISCO-TELEPRESENCE-MIB", "ctpPeripheralErrorDeviceNumber"), ("CISCO-TELEPRESENCE-MIB", "ctpSysUserAuthFailHistTableSize"), ("CISCO-TELEPRESENCE-MIB", "ctpSysUserAuthFailHistLastIndex"), ("CISCO-TELEPRESENCE-MIB", "ctpSysUserAuthFailSourceAddrType"), ("CISCO-TELEPRESENCE-MIB", "ctpSysUserAuthFailSourceAddr"), ("CISCO-TELEPRESENCE-MIB", "ctpSysUserAuthFailSourcePort"), ("CISCO-TELEPRESENCE-MIB", "ctpSysUserAuthFailUserName"), ("CISCO-TELEPRESENCE-MIB", "ctpSysUserAuthFailAccessProtocol"), ("CISCO-TELEPRESENCE-MIB", "ctpSysUserAuthFailTimeStamp")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoTpEventHistoryGroupR01 = ciscoTpEventHistoryGroupR01.setStatus('current') if mibBuilder.loadTexts: ciscoTpEventHistoryGroupR01.setDescription('A collection of managed objects providing notification event history information.') ciscoTpNotificationGroupR01 = NotificationGroup((1, 3, 6, 1, 4, 1, 9, 9, 643, 2, 2, 9)).setObjects(("CISCO-TELEPRESENCE-MIB", "ctpPeriStatusChangeNotification"), ("CISCO-TELEPRESENCE-MIB", "ctpSysUserAuthFailNotification")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoTpNotificationGroupR01 = ciscoTpNotificationGroupR01.setStatus('current') if mibBuilder.loadTexts: ciscoTpNotificationGroupR01.setDescription('A collection of Telepresence system notifications.') ciscoTpConfigurationGroupR01 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 643, 2, 2, 10)).setObjects(("CISCO-TELEPRESENCE-MIB", "ctpSysUserAuthFailNotifyEnable"), ("CISCO-TELEPRESENCE-MIB", "ctpSystemReset"), ("CISCO-TELEPRESENCE-MIB", "ctpPeriStatusChangeNotifyEnable")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoTpConfigurationGroupR01 = ciscoTpConfigurationGroupR01.setStatus('current') if mibBuilder.loadTexts: ciscoTpConfigurationGroupR01.setDescription('A collection of objects providing the notification configuration and system reset.') ciscoTpPeripheralStatusGroupR02 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 643, 2, 2, 11)).setObjects(("CISCO-TELEPRESENCE-MIB", "ctpPeripheralDescription"), ("CISCO-TELEPRESENCE-MIB", "ctpPeripheralStatus"), ("CISCO-TELEPRESENCE-MIB", "ctpPeripheralDeviceCategory"), ("CISCO-TELEPRESENCE-MIB", "ctpPeripheralDeviceNumber"), ("CISCO-TELEPRESENCE-MIB", "ctpEtherPeripheralIfIndex"), ("CISCO-TELEPRESENCE-MIB", "ctpEtherPeripheralAddrType"), ("CISCO-TELEPRESENCE-MIB", "ctpEtherPeripheralAddr"), ("CISCO-TELEPRESENCE-MIB", "ctpEtherPeripheralStatus"), ("CISCO-TELEPRESENCE-MIB", "ctpHDMIPeripheralCableStatus"), ("CISCO-TELEPRESENCE-MIB", "ctpHDMIPeripheralPowerStatus"), ("CISCO-TELEPRESENCE-MIB", "ctpDVIPeripheralCableStatus"), ("CISCO-TELEPRESENCE-MIB", "ctpUSBPeripheralCableStatus"), ("CISCO-TELEPRESENCE-MIB", "ctpUSBPeripheralPowerStatus"), ("CISCO-TELEPRESENCE-MIB", "ctpUSBPeripheralPortType"), ("CISCO-TELEPRESENCE-MIB", "ctpUSBPeripheralPortRate"), ("CISCO-TELEPRESENCE-MIB", "ctp802dot11PeripheralIfIndex"), ("CISCO-TELEPRESENCE-MIB", "ctp802dot11PeripheralAddrType"), ("CISCO-TELEPRESENCE-MIB", "ctp802dot11PeripheralAddr"), ("CISCO-TELEPRESENCE-MIB", "ctp802dot11PeripheralLinkStrength"), ("CISCO-TELEPRESENCE-MIB", "ctp802dot11PeripheralLinkStatus")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoTpPeripheralStatusGroupR02 = ciscoTpPeripheralStatusGroupR02.setStatus('current') if mibBuilder.loadTexts: ciscoTpPeripheralStatusGroupR02.setDescription('A collection of objects providing the Telepresence peripheral information.') ciscoTpConfigurationGroupR02 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 643, 2, 2, 12)).setObjects(("CISCO-TELEPRESENCE-MIB", "ctpVlanId"), ("CISCO-TELEPRESENCE-MIB", "ctpDefaultGateway"), ("CISCO-TELEPRESENCE-MIB", "ctpDefaultGatewayAddrType")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoTpConfigurationGroupR02 = ciscoTpConfigurationGroupR02.setStatus('current') if mibBuilder.loadTexts: ciscoTpConfigurationGroupR02.setDescription('A collection of objects providing network configurations.') ciscoTpDPPeripheralStatusGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 643, 2, 2, 13)).setObjects(("CISCO-TELEPRESENCE-MIB", "ctpDPPeripheralCableStatus"), ("CISCO-TELEPRESENCE-MIB", "ctpDPPeripheralPowerStatus")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoTpDPPeripheralStatusGroup = ciscoTpDPPeripheralStatusGroup.setStatus('current') if mibBuilder.loadTexts: ciscoTpDPPeripheralStatusGroup.setDescription('A collection of objects providing the information about Telepresence peripheral which is connected via Display Port.') mibBuilder.exportSymbols("CISCO-TELEPRESENCE-MIB", ciscoTpRS232PeripheralStatusGroup=ciscoTpRS232PeripheralStatusGroup, ctpSystemReset=ctpSystemReset, CtpPeripheralCableCode=CtpPeripheralCableCode, CtpSystemResetMode=CtpSystemResetMode, ctpDPPeripheralCableStatus=ctpDPPeripheralCableStatus, ctpDPPeripheralPowerStatus=ctpDPPeripheralPowerStatus, ctpPeriStatusChangeNotification=ctpPeriStatusChangeNotification, ctpRS232PeripheralIndex=ctpRS232PeripheralIndex, ctpDPPeripheralStatusTable=ctpDPPeripheralStatusTable, ctpPeripheralIndex=ctpPeripheralIndex, ctpPeripheralErrorNotifyEnable=ctpPeripheralErrorNotifyEnable, ciscoTelepresenceMIBGroups=ciscoTelepresenceMIBGroups, ctpPeripheralErrorIndex=ctpPeripheralErrorIndex, ctpRS232PeripheralStatusTable=ctpRS232PeripheralStatusTable, ctpUSBPeripheralPortRate=ctpUSBPeripheralPortRate, ctpPeripheralErrorNotification=ctpPeripheralErrorNotification, ctpDVIPeripheralCableStatus=ctpDVIPeripheralCableStatus, ctpPeripheralStatusTable=ctpPeripheralStatusTable, ctp802dot11PeripheralIfIndex=ctp802dot11PeripheralIfIndex, ctp802dot11PeripheralLinkStrength=ctp802dot11PeripheralLinkStrength, ctpPeripheralStatusObjects=ctpPeripheralStatusObjects, ctpHDMIPeripheralCableStatus=ctpHDMIPeripheralCableStatus, ctpHDMIPeripheralStatusEntry=ctpHDMIPeripheralStatusEntry, ctpHDMIPeripheralStatusTable=ctpHDMIPeripheralStatusTable, ctpPeripheralAttributeTable=ctpPeripheralAttributeTable, ctpSysUserAuthFailHistoryEntry=ctpSysUserAuthFailHistoryEntry, ciscoTpPeripheralAttributeGroup=ciscoTpPeripheralAttributeGroup, ctpEtherPeripheralIfIndex=ctpEtherPeripheralIfIndex, ctpPeripheralErrorDeviceNumber=ctpPeripheralErrorDeviceNumber, ctpEtherPeripheralStatusTable=ctpEtherPeripheralStatusTable, ctpUSBPeripheralPortType=ctpUSBPeripheralPortType, ciscoTelepresenceComplianceR02=ciscoTelepresenceComplianceR02, ctpRS232PeripheralConnStatus=ctpRS232PeripheralConnStatus, ctpSysUserAuthFailNotification=ctpSysUserAuthFailNotification, ctpUSBPeripheralStatusTable=ctpUSBPeripheralStatusTable, ctpPeripheralStatusEntry=ctpPeripheralStatusEntry, ciscoTelepresenceCompliances=ciscoTelepresenceCompliances, ctpPeripheralAttributeValue=ctpPeripheralAttributeValue, ctpDPPeripheralIndex=ctpDPPeripheralIndex, ctpUSBPeripheralStatusEntry=ctpUSBPeripheralStatusEntry, ctpDefaultGateway=ctpDefaultGateway, ctp802dot11PeripheralStatusTable=ctp802dot11PeripheralStatusTable, ctpEtherPeripheralStatusEntry=ctpEtherPeripheralStatusEntry, ctpSysUserAuthFailHistoryIndex=ctpSysUserAuthFailHistoryIndex, ciscoTpNotificationGroup=ciscoTpNotificationGroup, ctpPeripheralAttributeEntry=ctpPeripheralAttributeEntry, ctpRS232PeripheralStatusEntry=ctpRS232PeripheralStatusEntry, ctpPeripheralErrorDeviceCategory=ctpPeripheralErrorDeviceCategory, ctpSysUserAuthFailNotifyEnable=ctpSysUserAuthFailNotifyEnable, ciscoTpDPPeripheralStatusGroup=ciscoTpDPPeripheralStatusGroup, ctpSysUserAuthFailAccessProtocol=ctpSysUserAuthFailAccessProtocol, ctpDefaultGatewayAddrType=ctpDefaultGatewayAddrType, ciscoTelepresenceComplianceR01=ciscoTelepresenceComplianceR01, ctpEventHistory=ctpEventHistory, ctpDVIPeripheralStatusEntry=ctpDVIPeripheralStatusEntry, ctpSysUserAuthFailTimeStamp=ctpSysUserAuthFailTimeStamp, ciscoTelepresenceCompliance=ciscoTelepresenceCompliance, ctp802dot11PeripheralLinkStatus=ctp802dot11PeripheralLinkStatus, ciscoTpConfigurationGroupR01=ciscoTpConfigurationGroupR01, ciscoTpPeripheralStatusGroup=ciscoTpPeripheralStatusGroup, ctpPeripheralAttributeIndex=ctpPeripheralAttributeIndex, ciscoTelepresenceMIB=ciscoTelepresenceMIB, ctpDVIPeripheralIndex=ctpDVIPeripheralIndex, ctpEtherPeripheralIndex=ctpEtherPeripheralIndex, ctpHDMIPeripheralPowerStatus=ctpHDMIPeripheralPowerStatus, ctpPeripheralErrorHistoryEntry=ctpPeripheralErrorHistoryEntry, ctpSysUserAuthFailHistoryTable=ctpSysUserAuthFailHistoryTable, ctpRS232PortIndex=ctpRS232PortIndex, ctpSysUserAuthFailHistTableSize=ctpSysUserAuthFailHistTableSize, ctpVlanId=ctpVlanId, ctpPeripheralStatus=ctpPeripheralStatus, ciscoTelepresenceComplianceR05=ciscoTelepresenceComplianceR05, ciscoTelepresenceComplianceR04=ciscoTelepresenceComplianceR04, ctpUSBPeripheralIndex=ctpUSBPeripheralIndex, ciscoTpConfigurationGroupR02=ciscoTpConfigurationGroupR02, ciscoTelepresenceMIBNotifs=ciscoTelepresenceMIBNotifs, ctpDVIPeripheralStatusTable=ctpDVIPeripheralStatusTable, ctpPeripheralErrorHistoryTable=ctpPeripheralErrorHistoryTable, ctpPeripheralErrorStatus=ctpPeripheralErrorStatus, ciscoTpEventHistoryGroupR01=ciscoTpEventHistoryGroupR01, ctpPeripheralErrorHistTableSize=ctpPeripheralErrorHistTableSize, CtpPeripheralStatusCode=CtpPeripheralStatusCode, ctpEtherPeripheralStatus=ctpEtherPeripheralStatus, ciscoTpNotificationGroupR01=ciscoTpNotificationGroupR01, CtpPeripheralDeviceCategoryCode=CtpPeripheralDeviceCategoryCode, ciscoTpPeripheralStatusGroupR01=ciscoTpPeripheralStatusGroupR01, CtpSystemAccessProtocol=CtpSystemAccessProtocol, ctpSysUserAuthFailSourceAddrType=ctpSysUserAuthFailSourceAddrType, ctpObjects=ctpObjects, ctpPeripheralDeviceCategory=ctpPeripheralDeviceCategory, ctpPeripheralErrorHistoryIndex=ctpPeripheralErrorHistoryIndex, ctpPeripheralErrorTimeStamp=ctpPeripheralErrorTimeStamp, ctpSysUserAuthFailSourceAddr=ctpSysUserAuthFailSourceAddr, ctpUSBPeripheralCableStatus=ctpUSBPeripheralCableStatus, ctp802dot11PeripheralIndex=ctp802dot11PeripheralIndex, ctpHDMIPeripheralIndex=ctpHDMIPeripheralIndex, ciscoTpEventHistoryGroup=ciscoTpEventHistoryGroup, ctpPeripheralDeviceNumber=ctpPeripheralDeviceNumber, ciscoTpPeripheralStatusGroupR02=ciscoTpPeripheralStatusGroupR02, ciscoTpConfigurationGroup=ciscoTpConfigurationGroup, ctpPeriStatusChangeNotifyEnable=ctpPeriStatusChangeNotifyEnable, PYSNMP_MODULE_ID=ciscoTelepresenceMIB, ctpSysUserAuthFailHistLastIndex=ctpSysUserAuthFailHistLastIndex, ciscoTelepresenceComplianceR03=ciscoTelepresenceComplianceR03, ctp802dot11PeripheralStatusEntry=ctp802dot11PeripheralStatusEntry, ctpUSBPeripheralPowerStatus=ctpUSBPeripheralPowerStatus, ciscoTelepresenceMIBConform=ciscoTelepresenceMIBConform, ciscoTelepresenceMIBObjects=ciscoTelepresenceMIBObjects, ctpSysUserAuthFailSourcePort=ctpSysUserAuthFailSourcePort, ctp802dot11PeripheralAddrType=ctp802dot11PeripheralAddrType, CtpPeripheralPowerCode=CtpPeripheralPowerCode, ctpEtherPeripheralAddrType=ctpEtherPeripheralAddrType, ctpPeripheralErrorHistLastIndex=ctpPeripheralErrorHistLastIndex, ctpDPPeripheralStatusEntry=ctpDPPeripheralStatusEntry, ctpSysUserAuthFailUserName=ctpSysUserAuthFailUserName, ctpEtherPeripheralAddr=ctpEtherPeripheralAddr, ctpPeripheralDescription=ctpPeripheralDescription, ctp802dot11PeripheralAddr=ctp802dot11PeripheralAddr, ctpPeripheralAttributeDescr=ctpPeripheralAttributeDescr)
(object_identifier, octet_string, integer) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'OctetString', 'Integer') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_union, value_range_constraint, constraints_intersection, single_value_constraint, value_size_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsUnion', 'ValueRangeConstraint', 'ConstraintsIntersection', 'SingleValueConstraint', 'ValueSizeConstraint') (cisco_mgmt,) = mibBuilder.importSymbols('CISCO-SMI', 'ciscoMgmt') (interface_index_or_zero,) = mibBuilder.importSymbols('IF-MIB', 'InterfaceIndexOrZero') (inet_address, inet_address_type) = mibBuilder.importSymbols('INET-ADDRESS-MIB', 'InetAddress', 'InetAddressType') (snmp_admin_string,) = mibBuilder.importSymbols('SNMP-FRAMEWORK-MIB', 'SnmpAdminString') (object_group, module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ObjectGroup', 'ModuleCompliance', 'NotificationGroup') (notification_type, module_identity, bits, gauge32, ip_address, integer32, counter32, iso, object_identity, mib_identifier, unsigned32, time_ticks, counter64, mib_scalar, mib_table, mib_table_row, mib_table_column) = mibBuilder.importSymbols('SNMPv2-SMI', 'NotificationType', 'ModuleIdentity', 'Bits', 'Gauge32', 'IpAddress', 'Integer32', 'Counter32', 'iso', 'ObjectIdentity', 'MibIdentifier', 'Unsigned32', 'TimeTicks', 'Counter64', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn') (time_stamp, display_string, truth_value, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'TimeStamp', 'DisplayString', 'TruthValue', 'TextualConvention') cisco_telepresence_mib = module_identity((1, 3, 6, 1, 4, 1, 9, 9, 643)) ciscoTelepresenceMIB.setRevisions(('2014-07-18 00:00', '2012-07-17 00:00', '2012-03-23 00:00', '2011-08-23 00:00', '2010-07-23 00:00', '2010-07-13 00:00', '2009-07-12 00:00', '2008-02-13 00:00', '2007-12-11 00:00')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: ciscoTelepresenceMIB.setRevisionsDescriptions(('Added ctpDPPeripheralStatusTable Table and added auxHDMIInputDevice(19) and bringYourOwnDevice(20) enum value in CtpPeripheralDeviceCategoryCode', 'Added detectionDisabled in CtpPeripheralStatusCode', 'Added ctpVlanId, ctpDefaultGateway and ctpDefaultGatewayAddrType in ctpObjects', 'Added uiDevice in CtpPeripheralDeviceCategoryCode', 'Added ctpUSBPeripheralStatusTable and ctpWIFIPeripheralStatusTable in ctpPeripheralStatusEntry. ciscoTelepresenceComplianceR02 has been deprecated by ciscoTelepresenceComplianceR03. ciscoTpPeripheralStatusGroupR01 has been deprecated by ciscoTpPeripheralStatusGroupR02', 'Added ctpPeriStatusChangeNotifyEnable.', 'Added ctpPeripheralDeviceCategory and ctpPeripheralDeviceNumber in ctpPeripheralStatusEntry. Added commError in CtpPeripheralStatusCode. Updated the description of ctpPeripheralErrorHistoryTable.', 'Added serial peripheral status and peripheral attribute table.', 'Initial version of this MIB module.')) if mibBuilder.loadTexts: ciscoTelepresenceMIB.setLastUpdated('201411240000Z') if mibBuilder.loadTexts: ciscoTelepresenceMIB.setOrganization('Cisco Systems, Inc.') if mibBuilder.loadTexts: ciscoTelepresenceMIB.setContactInfo('Cisco Systems Customer Service Postal: 170 W Tasman Drive San Jose, CA 95134 USA Tel: +1 800 553-NETS E-mail: cochan@cisco.com') if mibBuilder.loadTexts: ciscoTelepresenceMIB.setDescription('The MIB module defines the managed objects for a Telepresence system. Telepresence refers to a set of technologies which allow a person to feel as if they were present, to give the appearance that they were present, or to have an effect, at a location other than their true location. A complete Telepresence system includes one or more Telepresence CODECS and peripherals such as display, camera, speaker, microphone and presentation device. Peripherals are attached directly to a Telepresence CODEC via an interface. Some peripherals may have more than one interface to transmit audio and/or video data and provide a configuration and/or control access.') class Ctpsystemresetmode(TextualConvention, Integer32): description = 'This textual convention identifies the system reset mode. noRestart (1) -- No operation. restartPending (2) -- Restart a system without shutting down when there is no active call; otherwise, system will be restarted after the call is terminated. resetPending (3) -- Shut down a system and bring it back up if there is no active call; otherwise, system will be reset after the call is terminated. forceReset (4) -- Shut down a system and bring it back up no matter if there is an active call or not.' status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4)) named_values = named_values(('noRestart', 1), ('restartPending', 2), ('resetPending', 3), ('forceReset', 4)) class Ctpperipheralcablecode(TextualConvention, Integer32): description = 'The textual convention identifies cable status of the attached peripheral through HDMI. plugged (1) -- Peripheral cable is plugged. loose (2) -- Peripheral cable is loose. unplugged (3) -- Peripheral cable is unplugged. unknown (4) -- Cannot detect peripheral cable status. internalError (5) -- Internal error.' status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5)) named_values = named_values(('plugged', 1), ('loose', 2), ('unplugged', 3), ('unknown', 4), ('internalError', 5)) class Ctpperipheralpowercode(TextualConvention, Integer32): description = 'The textual convention identifies power status of the attached peripheral through HDMI. on (1) -- Peripheral power is on. standby (2) -- Peripheral power is in standby mode. off (3) -- Peripheral power is off. unknown (4) -- Cannot detect peripheral power status. internalError (5) -- Internal error.' status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5)) named_values = named_values(('on', 1), ('standby', 2), ('off', 3), ('unknown', 4), ('internalError', 5)) class Ctpperipheralstatuscode(TextualConvention, Integer32): description = 'The textual convention identifies the peripheral status. noError (0) -- Expected peripheral device is functioning through the attached port. other (1) -- None of the listed state. cableError (2) -- Expected peripheral device has cabling issue. powerError (3) -- Expected peripheral device has power issue. mgmtSysConfigError (4) -- Expected peripheral device has communications management system configuration issue. systemError (5) -- Telepresence system error. deviceError (6) -- Expected peripheral device is attached but not fully functional. linkError (7) -- Expected peripheral device has port level link issue. commError (8) -- Expected peripheral device has port level communication issue. detectionDisabled (9) -- Status detection has been disabled.' status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9)) named_values = named_values(('noError', 0), ('other', 1), ('cableError', 2), ('powerError', 3), ('mgmtSysConfigError', 4), ('systemError', 5), ('deviceError', 6), ('linkError', 7), ('commError', 8), ('detectionDisabled', 9)) class Ctpsystemaccessprotocol(TextualConvention, Integer32): description = 'The textual convention identifies supported Telepresence user access protocol. http (1) -- Hypertext Transfer Protocol (HTTP) snmp (2) -- Simple Network Management Protocol (SNMP) ssh (3) -- Secure Shell (SSH)' status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3)) named_values = named_values(('http', 1), ('snmp', 2), ('ssh', 3)) class Ctpperipheraldevicecategorycode(TextualConvention, Integer32): description = 'The textual convention identifies the peripheral type. unknown (0) -- Unknown Device other (1) -- None of the listed device uplinkDevice (2) -- Device attached to CTS uplink port ipPhone (3) -- IP phone camera (4) -- Camera display (5) -- Display secCodec (6) -- CTS secondary codec docCamera (7) -- Document camera projector (8) -- Projector dviDevice (9) -- Device attached to DVI port presentationCodec (10) -- CTS codec process presentation -- stream auxiliaryControlUnit (11) -- Auxiliary control unit audioExpansionUnit (12) -- Audio expansion unit microphone (13) -- Microphone headset (14) -- Headset positionMic (15) -- Position microphone digitalMediaSystem (16) -- Digitial Media System auxHDMIOuputDevice (17) -- Auxiliary HDMI output device uiDevice (18) -- User Interface device for CTS auxHDMIInputDevice (19) -- HDMI input enabled device bringYourOwnDevice (20) -- Bring Your Own Device, -- like PC,Laptop,Tablet etc' status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20)) named_values = named_values(('unknown', 0), ('other', 1), ('uplinkDevice', 2), ('ipPhone', 3), ('camera', 4), ('display', 5), ('secCodec', 6), ('docCamera', 7), ('projector', 8), ('dviDevice', 9), ('presentationCodec', 10), ('auxiliaryControlUnit', 11), ('audioExpansionUnit', 12), ('microphone', 13), ('headset', 14), ('positionMic', 15), ('digitialMediaSystem', 16), ('auxHDMIOutputDevice', 17), ('uiDevice', 18), ('auxHDMIInputDevice', 19), ('bringYourOwnDevice', 20)) cisco_telepresence_mib_notifs = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 643, 0)) cisco_telepresence_mib_objects = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 643, 1)) cisco_telepresence_mib_conform = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 643, 2)) ctp_objects = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 1)) ctp_peripheral_status_objects = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2)) ctp_event_history = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 3)) ctp_peripheral_error_notify_enable = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 1, 1), truth_value().clone('false')).setMaxAccess('readwrite') if mibBuilder.loadTexts: ctpPeripheralErrorNotifyEnable.setStatus('deprecated') if mibBuilder.loadTexts: ctpPeripheralErrorNotifyEnable.setDescription("This object controls generation of ctpPeripheralErrorNotification. When the object is 'true(1)', generation of ctpPeripheralErrorNotification is enabled. When the object is 'false(2)', generation of ctpPeripheralErrorNotification is disabled. ctpPeripheralErrorNotifyEnable object is superseded by ctpPeriStatusChangeNotifyEnable.") ctp_sys_user_auth_fail_notify_enable = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 1, 2), truth_value().clone('false')).setMaxAccess('readwrite') if mibBuilder.loadTexts: ctpSysUserAuthFailNotifyEnable.setStatus('current') if mibBuilder.loadTexts: ctpSysUserAuthFailNotifyEnable.setDescription("This object controls generation of ctpSysUserAuthFailNotification. When the object is 'true(1)', generation of ctpSysUserAuthFailNotification is enabled. When the object is 'false(2)', generation of ctpSysUserAuthFailNotification is disabled.") ctp_system_reset = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 1, 3), ctp_system_reset_mode().clone('noRestart')).setMaxAccess('readwrite') if mibBuilder.loadTexts: ctpSystemReset.setStatus('current') if mibBuilder.loadTexts: ctpSystemReset.setDescription('This object is used to reset or restart a Telepresence system.') ctp_peri_status_change_notify_enable = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 1, 4), truth_value().clone('false')).setMaxAccess('readwrite') if mibBuilder.loadTexts: ctpPeriStatusChangeNotifyEnable.setStatus('current') if mibBuilder.loadTexts: ctpPeriStatusChangeNotifyEnable.setDescription("This object controls generation of ctpPeriStatusChangeNotification. When the object is 'true(1)', generation of ctpPeriStatusChangeNotification is enabled. When the object is 'false(2)', generation of ctpPeriStatusChangeNotification is disabled.") ctp_vlan_id = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 1, 5), unsigned32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: ctpVlanId.setStatus('current') if mibBuilder.loadTexts: ctpVlanId.setDescription('This object specifies the Telepresence system VLAN ID.') ctp_default_gateway_addr_type = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 1, 6), inet_address_type()).setMaxAccess('readwrite') if mibBuilder.loadTexts: ctpDefaultGatewayAddrType.setStatus('current') if mibBuilder.loadTexts: ctpDefaultGatewayAddrType.setDescription('This object specifies the type of address contained in the corresponding instance of ctpDefaultGateway.') ctp_default_gateway = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 1, 7), inet_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: ctpDefaultGateway.setStatus('current') if mibBuilder.loadTexts: ctpDefaultGateway.setDescription('This object specifies the Telepresence system default gateway.') ctp_peripheral_status_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 1)) if mibBuilder.loadTexts: ctpPeripheralStatusTable.setStatus('current') if mibBuilder.loadTexts: ctpPeripheralStatusTable.setDescription('The table contains system peripheral information. An entry in this table has a corresponding entry, INDEX-ed by the same value of ctpPeripheralIndex, in the table relevant to the type of interface: ctpEtherPeripheralStatusTable for Ethernet, ctpHDMIPeripheralStatusTable for HDMI or ctpDVIPeripheralStatusTable for DVI.') ctp_peripheral_status_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 1, 1)).setIndexNames((0, 'CISCO-TELEPRESENCE-MIB', 'ctpPeripheralIndex')) if mibBuilder.loadTexts: ctpPeripheralStatusEntry.setStatus('current') if mibBuilder.loadTexts: ctpPeripheralStatusEntry.setDescription('An entry contains information about one peripheral which is configured or detected by a Telepresence system.') ctp_peripheral_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 1, 1, 1), unsigned32()) if mibBuilder.loadTexts: ctpPeripheralIndex.setStatus('current') if mibBuilder.loadTexts: ctpPeripheralIndex.setDescription('This object specifies a unique index for a peripheral which is attached to a Telepresence system.') ctp_peripheral_description = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 1, 1, 2), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: ctpPeripheralDescription.setStatus('current') if mibBuilder.loadTexts: ctpPeripheralDescription.setDescription('This object specifies a description of the attached peripheral. Peripheral description may be the peripheral type, model and/or version information or a peripheral signal description.') ctp_peripheral_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 1, 1, 3), ctp_peripheral_status_code()).setMaxAccess('readonly') if mibBuilder.loadTexts: ctpPeripheralStatus.setStatus('current') if mibBuilder.loadTexts: ctpPeripheralStatus.setDescription('This object specifies a peripheral status.') ctp_peripheral_device_category = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 1, 1, 4), ctp_peripheral_device_category_code()).setMaxAccess('readonly') if mibBuilder.loadTexts: ctpPeripheralDeviceCategory.setStatus('current') if mibBuilder.loadTexts: ctpPeripheralDeviceCategory.setDescription('This object specifies a peripheral category of a device.') ctp_peripheral_device_number = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 1, 1, 5), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ctpPeripheralDeviceNumber.setStatus('current') if mibBuilder.loadTexts: ctpPeripheralDeviceNumber.setDescription('This object specifies a device number for a peripheral. Device number is unique within the same peripheral device category.') ctp_ether_peripheral_status_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 2)) if mibBuilder.loadTexts: ctpEtherPeripheralStatusTable.setStatus('current') if mibBuilder.loadTexts: ctpEtherPeripheralStatusTable.setDescription('The table contains information about all peripherals connected to the system via Ethernet port.') ctp_ether_peripheral_status_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 2, 1)).setIndexNames((0, 'CISCO-TELEPRESENCE-MIB', 'ctpPeripheralIndex'), (0, 'CISCO-TELEPRESENCE-MIB', 'ctpEtherPeripheralIndex')) if mibBuilder.loadTexts: ctpEtherPeripheralStatusEntry.setStatus('current') if mibBuilder.loadTexts: ctpEtherPeripheralStatusEntry.setDescription('An entry contains information about one peripheral attached to the Telepresence system via Ethernet.') ctp_ether_peripheral_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 2, 1, 1), unsigned32()) if mibBuilder.loadTexts: ctpEtherPeripheralIndex.setStatus('current') if mibBuilder.loadTexts: ctpEtherPeripheralIndex.setDescription("This object specifies a unique number for a peripheral Ethernet interface. If no peripheral has more than one Ethernet interface, this object will have value '1'.") ctp_ether_peripheral_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 2, 1, 2), interface_index_or_zero()).setMaxAccess('readonly') if mibBuilder.loadTexts: ctpEtherPeripheralIfIndex.setStatus('current') if mibBuilder.loadTexts: ctpEtherPeripheralIfIndex.setDescription("The object specifies an index value that uniquely identifies the interface to which this entry is applicable. The interface identified by a particular value of this index is the same interface as identified by the same value of the IF-MIB's ifIndex. If this entry doesn't have corresponding ifIndex, then this value will have value '0'.") ctp_ether_peripheral_addr_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 2, 1, 3), inet_address_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: ctpEtherPeripheralAddrType.setStatus('current') if mibBuilder.loadTexts: ctpEtherPeripheralAddrType.setDescription('This object specifies the type of address contained in the corresponding instance of ctpEtherPeripheralAddr.') ctp_ether_peripheral_addr = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 2, 1, 4), inet_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: ctpEtherPeripheralAddr.setStatus('current') if mibBuilder.loadTexts: ctpEtherPeripheralAddr.setDescription('This object specifies the address of the attached peripheral in the format given by the corresponding instance of ctpEtherPeripheralAddrType.') ctp_ether_peripheral_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 2, 1, 5), ctp_peripheral_status_code()).setMaxAccess('readonly') if mibBuilder.loadTexts: ctpEtherPeripheralStatus.setStatus('current') if mibBuilder.loadTexts: ctpEtherPeripheralStatus.setDescription('This object specifies attached peripheral status retrieved via Ethernet port.') ctp_hdmi_peripheral_status_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 3)) if mibBuilder.loadTexts: ctpHDMIPeripheralStatusTable.setStatus('current') if mibBuilder.loadTexts: ctpHDMIPeripheralStatusTable.setDescription('The table contains information about all peripherals connected to the system via HDMI.') ctp_hdmi_peripheral_status_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 3, 1)).setIndexNames((0, 'CISCO-TELEPRESENCE-MIB', 'ctpPeripheralIndex'), (0, 'CISCO-TELEPRESENCE-MIB', 'ctpHDMIPeripheralIndex')) if mibBuilder.loadTexts: ctpHDMIPeripheralStatusEntry.setStatus('current') if mibBuilder.loadTexts: ctpHDMIPeripheralStatusEntry.setDescription('An entry contains information about one Telepresence HDMI peripheral.') ctp_hdmi_peripheral_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 3, 1, 1), unsigned32()) if mibBuilder.loadTexts: ctpHDMIPeripheralIndex.setStatus('current') if mibBuilder.loadTexts: ctpHDMIPeripheralIndex.setDescription("This object specifies a unique number for a peripheral HDMI. If no peripheral has more than one HDMI, this object will have value '1'.") ctp_hdmi_peripheral_cable_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 3, 1, 2), ctp_peripheral_cable_code()).setMaxAccess('readonly') if mibBuilder.loadTexts: ctpHDMIPeripheralCableStatus.setStatus('current') if mibBuilder.loadTexts: ctpHDMIPeripheralCableStatus.setDescription("This object specifies cable status of an attached peripheral. This object is set to 'loose' if system detects cable is 'unplugged' but power is 'on'.") ctp_hdmi_peripheral_power_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 3, 1, 3), ctp_peripheral_power_code()).setMaxAccess('readonly') if mibBuilder.loadTexts: ctpHDMIPeripheralPowerStatus.setStatus('current') if mibBuilder.loadTexts: ctpHDMIPeripheralPowerStatus.setDescription("This object specifies power status of an attached peripheral. This object is set to 'unknown' if system detects cable is 'unplugged'.") ctp_dvi_peripheral_status_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 4)) if mibBuilder.loadTexts: ctpDVIPeripheralStatusTable.setStatus('current') if mibBuilder.loadTexts: ctpDVIPeripheralStatusTable.setDescription('The table contains information about all peripherals connected to the system via DVI.') ctp_dvi_peripheral_status_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 4, 1)).setIndexNames((0, 'CISCO-TELEPRESENCE-MIB', 'ctpPeripheralIndex'), (0, 'CISCO-TELEPRESENCE-MIB', 'ctpDVIPeripheralIndex')) if mibBuilder.loadTexts: ctpDVIPeripheralStatusEntry.setStatus('current') if mibBuilder.loadTexts: ctpDVIPeripheralStatusEntry.setDescription('An entry contains information about one peripheral attached to the Telepresence system via DVI.') ctp_dvi_peripheral_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 4, 1, 1), unsigned32()) if mibBuilder.loadTexts: ctpDVIPeripheralIndex.setStatus('current') if mibBuilder.loadTexts: ctpDVIPeripheralIndex.setDescription("This object specifies a unique number for a peripheral DVI. If no peripheral has more than one DVI, this object will have value '1'. Note that some Telepresence systems have no DVI port and some Telepresence systems have only one DVI port.") ctp_dvi_peripheral_cable_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 4, 1, 2), ctp_peripheral_cable_code()).setMaxAccess('readonly') if mibBuilder.loadTexts: ctpDVIPeripheralCableStatus.setStatus('current') if mibBuilder.loadTexts: ctpDVIPeripheralCableStatus.setDescription('This object specifies attached device cable status reported by DVI.') ctp_rs232_peripheral_status_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 5)) if mibBuilder.loadTexts: ctpRS232PeripheralStatusTable.setStatus('current') if mibBuilder.loadTexts: ctpRS232PeripheralStatusTable.setDescription('The table contains information about all peripherals connected to the system via RS-232.') ctp_rs232_peripheral_status_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 5, 1)).setIndexNames((0, 'CISCO-TELEPRESENCE-MIB', 'ctpPeripheralIndex'), (0, 'CISCO-TELEPRESENCE-MIB', 'ctpRS232PeripheralIndex')) if mibBuilder.loadTexts: ctpRS232PeripheralStatusEntry.setStatus('current') if mibBuilder.loadTexts: ctpRS232PeripheralStatusEntry.setDescription('An entry contains information about one peripheral attached to the Telepresence system via RS-232.') ctp_rs232_peripheral_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 5, 1, 1), unsigned32()) if mibBuilder.loadTexts: ctpRS232PeripheralIndex.setStatus('current') if mibBuilder.loadTexts: ctpRS232PeripheralIndex.setDescription("This object specifies a unique number for a peripheral RS-232. If no peripheral has more than one RS-232, this object will have value '1'. Note that some Telepresence systems have no RS-232 port.") ctp_rs232_port_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 5, 1, 2), interface_index_or_zero()).setMaxAccess('readonly') if mibBuilder.loadTexts: ctpRS232PortIndex.setStatus('current') if mibBuilder.loadTexts: ctpRS232PortIndex.setDescription("The object specifies an index value that uniquely identifies the RS-232 port to which this entry is applicable. Its value is the same as RS-232-MIB's rs232PortIndex for the port. If RS-232-MIB is not supported by the agent, then this value will have value '0'.") ctp_rs232_peripheral_conn_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 5, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('connected', 1), ('unknown', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ctpRS232PeripheralConnStatus.setStatus('current') if mibBuilder.loadTexts: ctpRS232PeripheralConnStatus.setDescription("This object specifies peripheral which is connected via RS232. When the object is 'connected(1)', peripheral connection via RS232 is working properly. When the object is 'unknown(2)', peripheral connection via RS232 is not working properly. It may due to device problem or connection problem.") ctp_peripheral_attribute_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 6)) if mibBuilder.loadTexts: ctpPeripheralAttributeTable.setStatus('current') if mibBuilder.loadTexts: ctpPeripheralAttributeTable.setDescription("The table contains information about attributes for the peripherals which are connected to the system. Peripheral attribute may specify peripheral's component information, for example, an entry may specify lifetime of a lamp on a presentation device.") ctp_peripheral_attribute_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 6, 1)).setIndexNames((0, 'CISCO-TELEPRESENCE-MIB', 'ctpPeripheralIndex'), (0, 'CISCO-TELEPRESENCE-MIB', 'ctpPeripheralAttributeIndex')) if mibBuilder.loadTexts: ctpPeripheralAttributeEntry.setStatus('current') if mibBuilder.loadTexts: ctpPeripheralAttributeEntry.setDescription('An entry contains information about one peripheral attribute related to the peripheral specified by ctpPeripheralIndex.') ctp_peripheral_attribute_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 6, 1, 1), unsigned32()) if mibBuilder.loadTexts: ctpPeripheralAttributeIndex.setStatus('current') if mibBuilder.loadTexts: ctpPeripheralAttributeIndex.setDescription("This object specifies a unique number for a peripheral attribute. If no peripheral has more than one attribute, this object will have value '1'.") ctp_peripheral_attribute_descr = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 6, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('lampOperTime', 1), ('lampState', 2), ('powerSwitchState', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ctpPeripheralAttributeDescr.setStatus('current') if mibBuilder.loadTexts: ctpPeripheralAttributeDescr.setDescription('This object specifies description of a attribute. The supported attributes are lampOperTime(1) -- indicate the lamp operating time of a peripheral lampState(2) -- indicate the lamp state powerSwitchState(3) -- indicate the power on/off state of a peripheral Note that not all peripheral contains all the supported attributes. Agent reports whatever is available.') ctp_peripheral_attribute_value = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 6, 1, 3), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ctpPeripheralAttributeValue.setStatus('current') if mibBuilder.loadTexts: ctpPeripheralAttributeValue.setDescription('This object specifies value of the attribute corresponding to ctpPeripheralAttributeDescr. The possible value of the supported attributes is listed as the following: Attribute Unit SYNTAX ----------------------------------------------------------- lampOperTime hours Unsigned32(0..4294967295) lampState INTEGER { on(1), off(2), failure(3), unknown(4) } powerSwitchState INTEGER { on(1), off(2), unknown(3) }') ctp_usb_peripheral_status_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 7)) if mibBuilder.loadTexts: ctpUSBPeripheralStatusTable.setStatus('current') if mibBuilder.loadTexts: ctpUSBPeripheralStatusTable.setDescription('This table contains information about all the peripherals connected to the system via USB.') ctp_usb_peripheral_status_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 7, 1)).setIndexNames((0, 'CISCO-TELEPRESENCE-MIB', 'ctpPeripheralIndex'), (0, 'CISCO-TELEPRESENCE-MIB', 'ctpUSBPeripheralIndex')) if mibBuilder.loadTexts: ctpUSBPeripheralStatusEntry.setStatus('current') if mibBuilder.loadTexts: ctpUSBPeripheralStatusEntry.setDescription('An entry drescribes a peripheral connected to the Telepresence system through USB.') ctp_usb_peripheral_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 7, 1, 1), unsigned32()) if mibBuilder.loadTexts: ctpUSBPeripheralIndex.setStatus('current') if mibBuilder.loadTexts: ctpUSBPeripheralIndex.setDescription('This object indicates an arbitrary positive, integer-value that uniquely identifies the USB peripheral.') ctp_usb_peripheral_cable_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 7, 1, 2), ctp_peripheral_cable_code()).setMaxAccess('readonly') if mibBuilder.loadTexts: ctpUSBPeripheralCableStatus.setStatus('current') if mibBuilder.loadTexts: ctpUSBPeripheralCableStatus.setDescription('This object indicates the status of the cable attaching the USB peripheral.') ctp_usb_peripheral_power_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 7, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('unknown', 1), ('self', 2), ('bus', 3), ('both', 4)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ctpUSBPeripheralPowerStatus.setStatus('current') if mibBuilder.loadTexts: ctpUSBPeripheralPowerStatus.setDescription("This object indicates the source of power for the attached USB peripheral: 'unknown' - The source of power is unknown. 'self' - The USB peripheral is externally powered. 'bus' - The USB peripheral is powered by the USB bus. 'both' - The USB peripheral can be powered by both the USB bus or self") ctp_usb_peripheral_port_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 7, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('host', 1), ('device', 2), ('hub', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ctpUSBPeripheralPortType.setStatus('current') if mibBuilder.loadTexts: ctpUSBPeripheralPortType.setDescription("This object indicates the type of device connected to the USB port: 'host' - no device os connected to the port 'device' - a usb device is connected to the port 'hub' - a usb hub is connected to the port") ctp_usb_peripheral_port_rate = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 7, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('low', 1), ('full', 2), ('high', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ctpUSBPeripheralPortRate.setStatus('current') if mibBuilder.loadTexts: ctpUSBPeripheralPortRate.setDescription("This object indicates the current operational rate of the USB peripheral: 'unknown' - The USB port rate is unknown 'low' - The USB port rate is at 1.5 Mbps. 'full' - The USB port rate is at 12 Mbps. 'high' - The USB port rate is at 480 Mbps.") ctp802dot11_peripheral_status_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 8)) if mibBuilder.loadTexts: ctp802dot11PeripheralStatusTable.setStatus('current') if mibBuilder.loadTexts: ctp802dot11PeripheralStatusTable.setDescription('The table contains information about all peripherals connected to the system via 802dot11.') ctp802dot11_peripheral_status_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 8, 1)).setIndexNames((0, 'CISCO-TELEPRESENCE-MIB', 'ctpPeripheralIndex'), (0, 'CISCO-TELEPRESENCE-MIB', 'ctp802dot11PeripheralIndex')) if mibBuilder.loadTexts: ctp802dot11PeripheralStatusEntry.setStatus('current') if mibBuilder.loadTexts: ctp802dot11PeripheralStatusEntry.setDescription('An entry describes one Telepresence 802dot11 peripheral.') ctp802dot11_peripheral_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 8, 1, 1), unsigned32()) if mibBuilder.loadTexts: ctp802dot11PeripheralIndex.setStatus('current') if mibBuilder.loadTexts: ctp802dot11PeripheralIndex.setDescription('This object indicates an arbitrary positive, integer-value that uniquely identifies the IEEE 802.11 peripheral.') ctp802dot11_peripheral_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 8, 1, 2), interface_index_or_zero()).setMaxAccess('readonly') if mibBuilder.loadTexts: ctp802dot11PeripheralIfIndex.setStatus('current') if mibBuilder.loadTexts: ctp802dot11PeripheralIfIndex.setDescription("This object indicates an index value that uniquely identifies the interface to which this entry is applicable. If this entry doesn't have corresponding ifIndex, then this value will have value '0'.") ctp802dot11_peripheral_addr_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 8, 1, 3), inet_address_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: ctp802dot11PeripheralAddrType.setStatus('current') if mibBuilder.loadTexts: ctp802dot11PeripheralAddrType.setDescription('This object indicates the type of address indicated by the corresponding instance of ctp802dot11PeripheralAddr.') ctp802dot11_peripheral_addr = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 8, 1, 4), inet_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: ctp802dot11PeripheralAddr.setStatus('current') if mibBuilder.loadTexts: ctp802dot11PeripheralAddr.setDescription('This object indicates the address of the attached peripheral in the format indicated by the corresponding instance of ctp802dot11PeripheralAddrType.') ctp802dot11_peripheral_link_strength = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 8, 1, 5), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ctp802dot11PeripheralLinkStrength.setStatus('current') if mibBuilder.loadTexts: ctp802dot11PeripheralLinkStrength.setDescription('This object indicates the link strength of an IEEE 802.11 link for a peripheral. A return value of 0 indicates the link is not connected. A return value between 1 - 5 indicates the strength of the link, with 1 being the weakest and 5 being the strongest.') ctp802dot11_peripheral_link_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 8, 1, 6), ctp_peripheral_cable_code()).setMaxAccess('readonly') if mibBuilder.loadTexts: ctp802dot11PeripheralLinkStatus.setStatus('current') if mibBuilder.loadTexts: ctp802dot11PeripheralLinkStatus.setDescription('This object indicates the link status of the attached peripheral via IEEE 802.11 link.') ctp_dp_peripheral_status_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 9)) if mibBuilder.loadTexts: ctpDPPeripheralStatusTable.setStatus('current') if mibBuilder.loadTexts: ctpDPPeripheralStatusTable.setDescription('The table contains information about all peripherals connected to the system via DP.') ctp_dp_peripheral_status_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 9, 1)).setIndexNames((0, 'CISCO-TELEPRESENCE-MIB', 'ctpPeripheralIndex'), (0, 'CISCO-TELEPRESENCE-MIB', 'ctpDPPeripheralIndex')) if mibBuilder.loadTexts: ctpDPPeripheralStatusEntry.setStatus('current') if mibBuilder.loadTexts: ctpDPPeripheralStatusEntry.setDescription('An entry contains information about one Telepresence DP peripheral.') ctp_dp_peripheral_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 9, 1, 1), unsigned32()) if mibBuilder.loadTexts: ctpDPPeripheralIndex.setStatus('current') if mibBuilder.loadTexts: ctpDPPeripheralIndex.setDescription("This object indicates a unique number for a peripheral DP. If no peripheral has more than one DP, this object will have value '1'.") ctp_dp_peripheral_cable_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 9, 1, 2), ctp_peripheral_cable_code()).setMaxAccess('readonly') if mibBuilder.loadTexts: ctpDPPeripheralCableStatus.setStatus('current') if mibBuilder.loadTexts: ctpDPPeripheralCableStatus.setDescription("This object indicates the cable status of a peripheral which is attached to the system via Display Port interface. This object returns 'loose' if system detects cable is 'unplugged' but power is 'on'.") ctp_dp_peripheral_power_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 2, 9, 1, 3), ctp_peripheral_power_code()).setMaxAccess('readonly') if mibBuilder.loadTexts: ctpDPPeripheralPowerStatus.setStatus('current') if mibBuilder.loadTexts: ctpDPPeripheralPowerStatus.setDescription("This object indicates the power status of a peripheral which is attached to the system via Display Port interface. This object returns 'unknown' if system detects cable is 'unplugged'.") ctp_peripheral_error_hist_table_size = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 3, 1), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 500)).clone(10)).setMaxAccess('readwrite') if mibBuilder.loadTexts: ctpPeripheralErrorHistTableSize.setStatus('current') if mibBuilder.loadTexts: ctpPeripheralErrorHistTableSize.setDescription("This object specifies the maximum number of entries that the ctpPeripheralErrorHistTable can contain. When the capacity of the ctpPeripheralErrorHistTable has reached the value specified by this object, then the agent deletes the oldest entity in order to accommodate the new entry. A value of '0' prevents any history from being retained. Some agents restrict the value of this object to be less than 500.") ctp_peripheral_error_hist_last_index = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 3, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 4294967295))).setMaxAccess('readonly') if mibBuilder.loadTexts: ctpPeripheralErrorHistLastIndex.setStatus('current') if mibBuilder.loadTexts: ctpPeripheralErrorHistLastIndex.setDescription('This object specifies the value of the ctpPeripheralErrorHistIndex object corresponding to the last entry added to the table by the agent. If the management application uses the notifications defined by this module, then it can poll this object to determine whether it has missed a notification sent by the agent.') ctp_peripheral_error_history_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 3, 3)) if mibBuilder.loadTexts: ctpPeripheralErrorHistoryTable.setStatus('current') if mibBuilder.loadTexts: ctpPeripheralErrorHistoryTable.setDescription('This table contains a history of the detected peripheral status changes. After a management agent restart, when sysUpTime is reset to zero, this table records all notifications until such time as it becomes full. Thereafter, it remains full by retaining the number of most recent notifications specified in ctpPeripheralErrorHistTableSize.') ctp_peripheral_error_history_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 3, 3, 1)).setIndexNames((0, 'CISCO-TELEPRESENCE-MIB', 'ctpPeripheralErrorHistoryIndex')) if mibBuilder.loadTexts: ctpPeripheralErrorHistoryEntry.setStatus('current') if mibBuilder.loadTexts: ctpPeripheralErrorHistoryEntry.setDescription('An entry contains information about a Telepresence peripheral status changes.') ctp_peripheral_error_history_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 3, 3, 1, 1), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4294967295))) if mibBuilder.loadTexts: ctpPeripheralErrorHistoryIndex.setStatus('current') if mibBuilder.loadTexts: ctpPeripheralErrorHistoryIndex.setDescription("A unique non-zero integer value that identifies a CtpPeripheralErrorHistoryEntry in the table. The value of this index starts from '1' and monotonically increases for each peripheral error known to the agent. If the value of this object is '4294967295', the agent will use '1' as the value of the next detected peripheral status change.") ctp_peripheral_error_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 3, 3, 1, 2), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ctpPeripheralErrorIndex.setStatus('current') if mibBuilder.loadTexts: ctpPeripheralErrorIndex.setDescription('The object specifies the value of ctpPeripheralIndex of a peripheral which is in error state. This object is deprecated in favor of ctpPeripheralErrorDeviceCategory and ctpPeripheralErrorDeviceNumber.') ctp_peripheral_error_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 3, 3, 1, 3), ctp_peripheral_status_code()).setMaxAccess('readonly') if mibBuilder.loadTexts: ctpPeripheralErrorStatus.setStatus('current') if mibBuilder.loadTexts: ctpPeripheralErrorStatus.setDescription('This object specifies the peripheral status after its status changed.') ctp_peripheral_error_time_stamp = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 3, 3, 1, 4), time_stamp()).setMaxAccess('readonly') if mibBuilder.loadTexts: ctpPeripheralErrorTimeStamp.setStatus('current') if mibBuilder.loadTexts: ctpPeripheralErrorTimeStamp.setDescription('This object specifies the value of the sysUpTime object at the time the notification was generated.') ctp_peripheral_error_device_category = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 3, 3, 1, 5), ctp_peripheral_device_category_code()).setMaxAccess('readonly') if mibBuilder.loadTexts: ctpPeripheralErrorDeviceCategory.setStatus('current') if mibBuilder.loadTexts: ctpPeripheralErrorDeviceCategory.setDescription('The object specifies peripheral device category after its status changed.') ctp_peripheral_error_device_number = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 3, 3, 1, 6), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ctpPeripheralErrorDeviceNumber.setStatus('current') if mibBuilder.loadTexts: ctpPeripheralErrorDeviceNumber.setDescription('The object specifies peripheral device number after its status changed. Device number is unique within the same peripheral device category.') ctp_sys_user_auth_fail_hist_table_size = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 3, 4), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 500)).clone(10)).setMaxAccess('readwrite') if mibBuilder.loadTexts: ctpSysUserAuthFailHistTableSize.setStatus('current') if mibBuilder.loadTexts: ctpSysUserAuthFailHistTableSize.setDescription("This object specifies the number of entries that the ctpSysUserAuthFailHistTable can contain. When the capacity of the ctpSysUserAuthFailHistTable has reached the value specified by this object, then the agent deletes the oldest entity in order to accommodate the new entry. A value of '0' prevents any history from being retained. Some agents restrict the value of this object to be less than 500.") ctp_sys_user_auth_fail_hist_last_index = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 3, 5), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 4294967295))).setMaxAccess('readonly') if mibBuilder.loadTexts: ctpSysUserAuthFailHistLastIndex.setStatus('current') if mibBuilder.loadTexts: ctpSysUserAuthFailHistLastIndex.setDescription('This object specifies the value of the ctpSysUserAuthFailHistIndex object corresponding to the last entry added to the table by the agent. If the management application uses the notifications defined by this module, then it can poll this object to determine whether it has missed a notification sent by the agent.') ctp_sys_user_auth_fail_history_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 3, 6)) if mibBuilder.loadTexts: ctpSysUserAuthFailHistoryTable.setStatus('current') if mibBuilder.loadTexts: ctpSysUserAuthFailHistoryTable.setDescription('This table contains a history of detected user authentication failures. After a management agent restart, when sysUpTime is reset to zero, this table records all user authentication failure notifications until such time as it becomes full. Thereafter, it remains full by retaining the number of most recent notifications specified in ctpSysUserAuthFailHistTableSize.') ctp_sys_user_auth_fail_history_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 3, 6, 1)).setIndexNames((0, 'CISCO-TELEPRESENCE-MIB', 'ctpSysUserAuthFailHistoryIndex')) if mibBuilder.loadTexts: ctpSysUserAuthFailHistoryEntry.setStatus('current') if mibBuilder.loadTexts: ctpSysUserAuthFailHistoryEntry.setDescription('An entry contains information about a Telepresence system user authentication failure.') ctp_sys_user_auth_fail_history_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 3, 6, 1, 1), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4294967295))) if mibBuilder.loadTexts: ctpSysUserAuthFailHistoryIndex.setStatus('current') if mibBuilder.loadTexts: ctpSysUserAuthFailHistoryIndex.setDescription("A unique non-zero integer value that identifies a CtpSysUserAuthFailHistoryEntry in the table. The value of this index starts from '1' and monotonically increases for each system authentication failure event known to the agent. If the value of this object is '4294967295', the agent will use '1' as the value of the next user authentication failure event.") ctp_sys_user_auth_fail_source_addr_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 3, 6, 1, 2), inet_address_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: ctpSysUserAuthFailSourceAddrType.setStatus('current') if mibBuilder.loadTexts: ctpSysUserAuthFailSourceAddrType.setDescription('The object specifies the type of address contained in the corresponding instance of ctpSysUserAuthFailSourceAddr.') ctp_sys_user_auth_fail_source_addr = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 3, 6, 1, 3), inet_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: ctpSysUserAuthFailSourceAddr.setStatus('current') if mibBuilder.loadTexts: ctpSysUserAuthFailSourceAddr.setDescription('The object specifies the source address when the user authentication failure occurred, in the format given by the corresponding instance of ctpSysUserAuthFailSourceAddrType.') ctp_sys_user_auth_fail_source_port = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 3, 6, 1, 4), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ctpSysUserAuthFailSourcePort.setStatus('current') if mibBuilder.loadTexts: ctpSysUserAuthFailSourcePort.setDescription('The object specifies the source TCP/UDP port number when a user authentication failure occurred.') ctp_sys_user_auth_fail_user_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 3, 6, 1, 5), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(1, 32))).setMaxAccess('readonly') if mibBuilder.loadTexts: ctpSysUserAuthFailUserName.setStatus('current') if mibBuilder.loadTexts: ctpSysUserAuthFailUserName.setDescription('The object specifies the user name which was used to gain system access when authentication failure occurred.') ctp_sys_user_auth_fail_access_protocol = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 3, 6, 1, 6), ctp_system_access_protocol()).setMaxAccess('readonly') if mibBuilder.loadTexts: ctpSysUserAuthFailAccessProtocol.setStatus('current') if mibBuilder.loadTexts: ctpSysUserAuthFailAccessProtocol.setDescription('This object specifies the access protocol when a user authentication failure occurred.') ctp_sys_user_auth_fail_time_stamp = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 643, 1, 3, 6, 1, 7), time_stamp()).setMaxAccess('readonly') if mibBuilder.loadTexts: ctpSysUserAuthFailTimeStamp.setStatus('current') if mibBuilder.loadTexts: ctpSysUserAuthFailTimeStamp.setDescription('This object specifies the value of the sysUpTime object at the time the notification was generated.') ctp_peripheral_error_notification = notification_type((1, 3, 6, 1, 4, 1, 9, 9, 643, 0, 1)).setObjects(('CISCO-TELEPRESENCE-MIB', 'ctpPeripheralErrorIndex'), ('CISCO-TELEPRESENCE-MIB', 'ctpPeripheralErrorStatus')) if mibBuilder.loadTexts: ctpPeripheralErrorNotification.setStatus('deprecated') if mibBuilder.loadTexts: ctpPeripheralErrorNotification.setDescription('This notification is sent when a peripheral error is detected. This notification is deprecated in favor of ctpPeriStatusChangeNotification. ctpPeripheralErrorNotification object is superseded by ctpPeriStatusChangeNotification.') ctp_sys_user_auth_fail_notification = notification_type((1, 3, 6, 1, 4, 1, 9, 9, 643, 0, 2)).setObjects(('CISCO-TELEPRESENCE-MIB', 'ctpSysUserAuthFailSourceAddrType'), ('CISCO-TELEPRESENCE-MIB', 'ctpSysUserAuthFailSourceAddr'), ('CISCO-TELEPRESENCE-MIB', 'ctpSysUserAuthFailSourcePort'), ('CISCO-TELEPRESENCE-MIB', 'ctpSysUserAuthFailUserName'), ('CISCO-TELEPRESENCE-MIB', 'ctpSysUserAuthFailAccessProtocol')) if mibBuilder.loadTexts: ctpSysUserAuthFailNotification.setStatus('current') if mibBuilder.loadTexts: ctpSysUserAuthFailNotification.setDescription('This notification is sent when a user authentication failure via a Telepresence supported access protocol is detected.') ctp_peri_status_change_notification = notification_type((1, 3, 6, 1, 4, 1, 9, 9, 643, 0, 3)).setObjects(('CISCO-TELEPRESENCE-MIB', 'ctpPeripheralErrorIndex'), ('CISCO-TELEPRESENCE-MIB', 'ctpPeripheralErrorDeviceCategory'), ('CISCO-TELEPRESENCE-MIB', 'ctpPeripheralErrorDeviceNumber'), ('CISCO-TELEPRESENCE-MIB', 'ctpPeripheralErrorStatus')) if mibBuilder.loadTexts: ctpPeriStatusChangeNotification.setStatus('current') if mibBuilder.loadTexts: ctpPeriStatusChangeNotification.setDescription('This notification is sent when a peripheral status is changed.') cisco_telepresence_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 643, 2, 1)) cisco_telepresence_mib_groups = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 643, 2, 2)) cisco_telepresence_compliance = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 643, 2, 1, 1)).setObjects(('CISCO-TELEPRESENCE-MIB', 'ciscoTpConfigurationGroup'), ('CISCO-TELEPRESENCE-MIB', 'ciscoTpPeripheralStatusGroup'), ('CISCO-TELEPRESENCE-MIB', 'ciscoTpEventHistoryGroup'), ('CISCO-TELEPRESENCE-MIB', 'ciscoTpNotificationGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_telepresence_compliance = ciscoTelepresenceCompliance.setStatus('deprecated') if mibBuilder.loadTexts: ciscoTelepresenceCompliance.setDescription('The compliance statement for entities which implement the Cisco Telepresence MIB.') cisco_telepresence_compliance_r01 = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 643, 2, 1, 2)).setObjects(('CISCO-TELEPRESENCE-MIB', 'ciscoTpConfigurationGroup'), ('CISCO-TELEPRESENCE-MIB', 'ciscoTpPeripheralStatusGroup'), ('CISCO-TELEPRESENCE-MIB', 'ciscoTpEventHistoryGroup'), ('CISCO-TELEPRESENCE-MIB', 'ciscoTpNotificationGroup'), ('CISCO-TELEPRESENCE-MIB', 'ciscoTpRS232PeripheralStatusGroup'), ('CISCO-TELEPRESENCE-MIB', 'ciscoTpPeripheralAttributeGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_telepresence_compliance_r01 = ciscoTelepresenceComplianceR01.setStatus('deprecated') if mibBuilder.loadTexts: ciscoTelepresenceComplianceR01.setDescription('The compliance statement for entities which implement the Cisco Telepresence MIB.') cisco_telepresence_compliance_r02 = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 643, 2, 1, 3)).setObjects(('CISCO-TELEPRESENCE-MIB', 'ciscoTpConfigurationGroupR01'), ('CISCO-TELEPRESENCE-MIB', 'ciscoTpPeripheralStatusGroupR01'), ('CISCO-TELEPRESENCE-MIB', 'ciscoTpEventHistoryGroupR01'), ('CISCO-TELEPRESENCE-MIB', 'ciscoTpNotificationGroupR01'), ('CISCO-TELEPRESENCE-MIB', 'ciscoTpRS232PeripheralStatusGroup'), ('CISCO-TELEPRESENCE-MIB', 'ciscoTpPeripheralAttributeGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_telepresence_compliance_r02 = ciscoTelepresenceComplianceR02.setStatus('deprecated') if mibBuilder.loadTexts: ciscoTelepresenceComplianceR02.setDescription('The compliance statement for entities which implement the Cisco Telepresence MIB.') cisco_telepresence_compliance_r03 = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 643, 2, 1, 4)).setObjects(('CISCO-TELEPRESENCE-MIB', 'ciscoTpConfigurationGroupR01'), ('CISCO-TELEPRESENCE-MIB', 'ciscoTpPeripheralStatusGroupR02'), ('CISCO-TELEPRESENCE-MIB', 'ciscoTpEventHistoryGroupR01'), ('CISCO-TELEPRESENCE-MIB', 'ciscoTpNotificationGroupR01'), ('CISCO-TELEPRESENCE-MIB', 'ciscoTpRS232PeripheralStatusGroup'), ('CISCO-TELEPRESENCE-MIB', 'ciscoTpPeripheralAttributeGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_telepresence_compliance_r03 = ciscoTelepresenceComplianceR03.setStatus('deprecated') if mibBuilder.loadTexts: ciscoTelepresenceComplianceR03.setDescription('The compliance statement for entities which implement the Cisco Telepresence MIB.') cisco_telepresence_compliance_r04 = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 643, 2, 1, 5)).setObjects(('CISCO-TELEPRESENCE-MIB', 'ciscoTpConfigurationGroupR01'), ('CISCO-TELEPRESENCE-MIB', 'ciscoTpConfigurationGroupR02'), ('CISCO-TELEPRESENCE-MIB', 'ciscoTpPeripheralStatusGroupR02'), ('CISCO-TELEPRESENCE-MIB', 'ciscoTpEventHistoryGroupR01'), ('CISCO-TELEPRESENCE-MIB', 'ciscoTpNotificationGroupR01'), ('CISCO-TELEPRESENCE-MIB', 'ciscoTpRS232PeripheralStatusGroup'), ('CISCO-TELEPRESENCE-MIB', 'ciscoTpPeripheralAttributeGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_telepresence_compliance_r04 = ciscoTelepresenceComplianceR04.setStatus('deprecated') if mibBuilder.loadTexts: ciscoTelepresenceComplianceR04.setDescription('The compliance statement for entities which implement the Cisco Telepresence MIB.') cisco_telepresence_compliance_r05 = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 643, 2, 1, 6)).setObjects(('CISCO-TELEPRESENCE-MIB', 'ciscoTpConfigurationGroupR01'), ('CISCO-TELEPRESENCE-MIB', 'ciscoTpConfigurationGroupR02'), ('CISCO-TELEPRESENCE-MIB', 'ciscoTpPeripheralStatusGroupR02'), ('CISCO-TELEPRESENCE-MIB', 'ciscoTpEventHistoryGroupR01'), ('CISCO-TELEPRESENCE-MIB', 'ciscoTpNotificationGroupR01'), ('CISCO-TELEPRESENCE-MIB', 'ciscoTpDPPeripheralStatusGroup'), ('CISCO-TELEPRESENCE-MIB', 'ciscoTpRS232PeripheralStatusGroup'), ('CISCO-TELEPRESENCE-MIB', 'ciscoTpPeripheralAttributeGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_telepresence_compliance_r05 = ciscoTelepresenceComplianceR05.setStatus('current') if mibBuilder.loadTexts: ciscoTelepresenceComplianceR05.setDescription('The compliance statement for entities which implement the Cisco Telepresence MIB.') cisco_tp_configuration_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 643, 2, 2, 1)).setObjects(('CISCO-TELEPRESENCE-MIB', 'ctpPeripheralErrorNotifyEnable'), ('CISCO-TELEPRESENCE-MIB', 'ctpSysUserAuthFailNotifyEnable'), ('CISCO-TELEPRESENCE-MIB', 'ctpSystemReset')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_tp_configuration_group = ciscoTpConfigurationGroup.setStatus('deprecated') if mibBuilder.loadTexts: ciscoTpConfigurationGroup.setDescription('A collection of objects providing the notification configuration and system reset. ciscoTpConfigurationGroup object is superseded by ciscoTpConfigurationGroupR01.') cisco_tp_peripheral_status_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 643, 2, 2, 2)).setObjects(('CISCO-TELEPRESENCE-MIB', 'ctpPeripheralDescription'), ('CISCO-TELEPRESENCE-MIB', 'ctpPeripheralStatus'), ('CISCO-TELEPRESENCE-MIB', 'ctpEtherPeripheralIfIndex'), ('CISCO-TELEPRESENCE-MIB', 'ctpEtherPeripheralAddrType'), ('CISCO-TELEPRESENCE-MIB', 'ctpEtherPeripheralAddr'), ('CISCO-TELEPRESENCE-MIB', 'ctpEtherPeripheralStatus'), ('CISCO-TELEPRESENCE-MIB', 'ctpHDMIPeripheralCableStatus'), ('CISCO-TELEPRESENCE-MIB', 'ctpHDMIPeripheralPowerStatus'), ('CISCO-TELEPRESENCE-MIB', 'ctpDVIPeripheralCableStatus')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_tp_peripheral_status_group = ciscoTpPeripheralStatusGroup.setStatus('deprecated') if mibBuilder.loadTexts: ciscoTpPeripheralStatusGroup.setDescription('A collection of objects providing the Telepresence peripheral information. ciscoTpPeripheralStatusGroup object is superseded by ciscoTpPeripheralStatusGroupR01.') cisco_tp_event_history_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 643, 2, 2, 3)).setObjects(('CISCO-TELEPRESENCE-MIB', 'ctpPeripheralErrorHistTableSize'), ('CISCO-TELEPRESENCE-MIB', 'ctpPeripheralErrorHistLastIndex'), ('CISCO-TELEPRESENCE-MIB', 'ctpPeripheralErrorIndex'), ('CISCO-TELEPRESENCE-MIB', 'ctpPeripheralErrorStatus'), ('CISCO-TELEPRESENCE-MIB', 'ctpPeripheralErrorTimeStamp'), ('CISCO-TELEPRESENCE-MIB', 'ctpSysUserAuthFailHistTableSize'), ('CISCO-TELEPRESENCE-MIB', 'ctpSysUserAuthFailHistLastIndex'), ('CISCO-TELEPRESENCE-MIB', 'ctpSysUserAuthFailSourceAddrType'), ('CISCO-TELEPRESENCE-MIB', 'ctpSysUserAuthFailSourceAddr'), ('CISCO-TELEPRESENCE-MIB', 'ctpSysUserAuthFailSourcePort'), ('CISCO-TELEPRESENCE-MIB', 'ctpSysUserAuthFailUserName'), ('CISCO-TELEPRESENCE-MIB', 'ctpSysUserAuthFailAccessProtocol'), ('CISCO-TELEPRESENCE-MIB', 'ctpSysUserAuthFailTimeStamp')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_tp_event_history_group = ciscoTpEventHistoryGroup.setStatus('deprecated') if mibBuilder.loadTexts: ciscoTpEventHistoryGroup.setDescription('A collection of managed objects providing notification event history information. ciscoTpEventHistoryGroup object is superseded by ciscoTpEventHistoryGroupR01.') cisco_tp_notification_group = notification_group((1, 3, 6, 1, 4, 1, 9, 9, 643, 2, 2, 4)).setObjects(('CISCO-TELEPRESENCE-MIB', 'ctpPeripheralErrorNotification'), ('CISCO-TELEPRESENCE-MIB', 'ctpSysUserAuthFailNotification')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_tp_notification_group = ciscoTpNotificationGroup.setStatus('deprecated') if mibBuilder.loadTexts: ciscoTpNotificationGroup.setDescription('A collection of Telepresence system notifications. ciscoTpNotificationGroup object is superseded by ciscoTpNotificationGroupR01.') cisco_tp_rs232_peripheral_status_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 643, 2, 2, 5)).setObjects(('CISCO-TELEPRESENCE-MIB', 'ctpRS232PortIndex'), ('CISCO-TELEPRESENCE-MIB', 'ctpRS232PeripheralConnStatus')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_tp_rs232_peripheral_status_group = ciscoTpRS232PeripheralStatusGroup.setStatus('current') if mibBuilder.loadTexts: ciscoTpRS232PeripheralStatusGroup.setDescription('A collection of objects providing the information about Telepresence peripheral which is connected via RS232.') cisco_tp_peripheral_attribute_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 643, 2, 2, 6)).setObjects(('CISCO-TELEPRESENCE-MIB', 'ctpPeripheralAttributeDescr'), ('CISCO-TELEPRESENCE-MIB', 'ctpPeripheralAttributeValue')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_tp_peripheral_attribute_group = ciscoTpPeripheralAttributeGroup.setStatus('current') if mibBuilder.loadTexts: ciscoTpPeripheralAttributeGroup.setDescription('A collection of managed objects providing peripheral attribute information.') cisco_tp_peripheral_status_group_r01 = object_group((1, 3, 6, 1, 4, 1, 9, 9, 643, 2, 2, 7)).setObjects(('CISCO-TELEPRESENCE-MIB', 'ctpPeripheralDescription'), ('CISCO-TELEPRESENCE-MIB', 'ctpPeripheralStatus'), ('CISCO-TELEPRESENCE-MIB', 'ctpPeripheralDeviceCategory'), ('CISCO-TELEPRESENCE-MIB', 'ctpPeripheralDeviceNumber'), ('CISCO-TELEPRESENCE-MIB', 'ctpEtherPeripheralIfIndex'), ('CISCO-TELEPRESENCE-MIB', 'ctpEtherPeripheralAddrType'), ('CISCO-TELEPRESENCE-MIB', 'ctpEtherPeripheralAddr'), ('CISCO-TELEPRESENCE-MIB', 'ctpEtherPeripheralStatus'), ('CISCO-TELEPRESENCE-MIB', 'ctpHDMIPeripheralCableStatus'), ('CISCO-TELEPRESENCE-MIB', 'ctpHDMIPeripheralPowerStatus'), ('CISCO-TELEPRESENCE-MIB', 'ctpDVIPeripheralCableStatus')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_tp_peripheral_status_group_r01 = ciscoTpPeripheralStatusGroupR01.setStatus('deprecated') if mibBuilder.loadTexts: ciscoTpPeripheralStatusGroupR01.setDescription('A collection of objects providing the Telepresence peripheral information. ciscoTpPeripheralStatusGroupR01 object is superseded by ciscoTpPeripheralStatusGroupR02.') cisco_tp_event_history_group_r01 = object_group((1, 3, 6, 1, 4, 1, 9, 9, 643, 2, 2, 8)).setObjects(('CISCO-TELEPRESENCE-MIB', 'ctpPeripheralErrorHistTableSize'), ('CISCO-TELEPRESENCE-MIB', 'ctpPeripheralErrorHistLastIndex'), ('CISCO-TELEPRESENCE-MIB', 'ctpPeripheralErrorIndex'), ('CISCO-TELEPRESENCE-MIB', 'ctpPeripheralErrorStatus'), ('CISCO-TELEPRESENCE-MIB', 'ctpPeripheralErrorTimeStamp'), ('CISCO-TELEPRESENCE-MIB', 'ctpPeripheralErrorDeviceCategory'), ('CISCO-TELEPRESENCE-MIB', 'ctpPeripheralErrorDeviceNumber'), ('CISCO-TELEPRESENCE-MIB', 'ctpSysUserAuthFailHistTableSize'), ('CISCO-TELEPRESENCE-MIB', 'ctpSysUserAuthFailHistLastIndex'), ('CISCO-TELEPRESENCE-MIB', 'ctpSysUserAuthFailSourceAddrType'), ('CISCO-TELEPRESENCE-MIB', 'ctpSysUserAuthFailSourceAddr'), ('CISCO-TELEPRESENCE-MIB', 'ctpSysUserAuthFailSourcePort'), ('CISCO-TELEPRESENCE-MIB', 'ctpSysUserAuthFailUserName'), ('CISCO-TELEPRESENCE-MIB', 'ctpSysUserAuthFailAccessProtocol'), ('CISCO-TELEPRESENCE-MIB', 'ctpSysUserAuthFailTimeStamp')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_tp_event_history_group_r01 = ciscoTpEventHistoryGroupR01.setStatus('current') if mibBuilder.loadTexts: ciscoTpEventHistoryGroupR01.setDescription('A collection of managed objects providing notification event history information.') cisco_tp_notification_group_r01 = notification_group((1, 3, 6, 1, 4, 1, 9, 9, 643, 2, 2, 9)).setObjects(('CISCO-TELEPRESENCE-MIB', 'ctpPeriStatusChangeNotification'), ('CISCO-TELEPRESENCE-MIB', 'ctpSysUserAuthFailNotification')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_tp_notification_group_r01 = ciscoTpNotificationGroupR01.setStatus('current') if mibBuilder.loadTexts: ciscoTpNotificationGroupR01.setDescription('A collection of Telepresence system notifications.') cisco_tp_configuration_group_r01 = object_group((1, 3, 6, 1, 4, 1, 9, 9, 643, 2, 2, 10)).setObjects(('CISCO-TELEPRESENCE-MIB', 'ctpSysUserAuthFailNotifyEnable'), ('CISCO-TELEPRESENCE-MIB', 'ctpSystemReset'), ('CISCO-TELEPRESENCE-MIB', 'ctpPeriStatusChangeNotifyEnable')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_tp_configuration_group_r01 = ciscoTpConfigurationGroupR01.setStatus('current') if mibBuilder.loadTexts: ciscoTpConfigurationGroupR01.setDescription('A collection of objects providing the notification configuration and system reset.') cisco_tp_peripheral_status_group_r02 = object_group((1, 3, 6, 1, 4, 1, 9, 9, 643, 2, 2, 11)).setObjects(('CISCO-TELEPRESENCE-MIB', 'ctpPeripheralDescription'), ('CISCO-TELEPRESENCE-MIB', 'ctpPeripheralStatus'), ('CISCO-TELEPRESENCE-MIB', 'ctpPeripheralDeviceCategory'), ('CISCO-TELEPRESENCE-MIB', 'ctpPeripheralDeviceNumber'), ('CISCO-TELEPRESENCE-MIB', 'ctpEtherPeripheralIfIndex'), ('CISCO-TELEPRESENCE-MIB', 'ctpEtherPeripheralAddrType'), ('CISCO-TELEPRESENCE-MIB', 'ctpEtherPeripheralAddr'), ('CISCO-TELEPRESENCE-MIB', 'ctpEtherPeripheralStatus'), ('CISCO-TELEPRESENCE-MIB', 'ctpHDMIPeripheralCableStatus'), ('CISCO-TELEPRESENCE-MIB', 'ctpHDMIPeripheralPowerStatus'), ('CISCO-TELEPRESENCE-MIB', 'ctpDVIPeripheralCableStatus'), ('CISCO-TELEPRESENCE-MIB', 'ctpUSBPeripheralCableStatus'), ('CISCO-TELEPRESENCE-MIB', 'ctpUSBPeripheralPowerStatus'), ('CISCO-TELEPRESENCE-MIB', 'ctpUSBPeripheralPortType'), ('CISCO-TELEPRESENCE-MIB', 'ctpUSBPeripheralPortRate'), ('CISCO-TELEPRESENCE-MIB', 'ctp802dot11PeripheralIfIndex'), ('CISCO-TELEPRESENCE-MIB', 'ctp802dot11PeripheralAddrType'), ('CISCO-TELEPRESENCE-MIB', 'ctp802dot11PeripheralAddr'), ('CISCO-TELEPRESENCE-MIB', 'ctp802dot11PeripheralLinkStrength'), ('CISCO-TELEPRESENCE-MIB', 'ctp802dot11PeripheralLinkStatus')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_tp_peripheral_status_group_r02 = ciscoTpPeripheralStatusGroupR02.setStatus('current') if mibBuilder.loadTexts: ciscoTpPeripheralStatusGroupR02.setDescription('A collection of objects providing the Telepresence peripheral information.') cisco_tp_configuration_group_r02 = object_group((1, 3, 6, 1, 4, 1, 9, 9, 643, 2, 2, 12)).setObjects(('CISCO-TELEPRESENCE-MIB', 'ctpVlanId'), ('CISCO-TELEPRESENCE-MIB', 'ctpDefaultGateway'), ('CISCO-TELEPRESENCE-MIB', 'ctpDefaultGatewayAddrType')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_tp_configuration_group_r02 = ciscoTpConfigurationGroupR02.setStatus('current') if mibBuilder.loadTexts: ciscoTpConfigurationGroupR02.setDescription('A collection of objects providing network configurations.') cisco_tp_dp_peripheral_status_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 643, 2, 2, 13)).setObjects(('CISCO-TELEPRESENCE-MIB', 'ctpDPPeripheralCableStatus'), ('CISCO-TELEPRESENCE-MIB', 'ctpDPPeripheralPowerStatus')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_tp_dp_peripheral_status_group = ciscoTpDPPeripheralStatusGroup.setStatus('current') if mibBuilder.loadTexts: ciscoTpDPPeripheralStatusGroup.setDescription('A collection of objects providing the information about Telepresence peripheral which is connected via Display Port.') mibBuilder.exportSymbols('CISCO-TELEPRESENCE-MIB', ciscoTpRS232PeripheralStatusGroup=ciscoTpRS232PeripheralStatusGroup, ctpSystemReset=ctpSystemReset, CtpPeripheralCableCode=CtpPeripheralCableCode, CtpSystemResetMode=CtpSystemResetMode, ctpDPPeripheralCableStatus=ctpDPPeripheralCableStatus, ctpDPPeripheralPowerStatus=ctpDPPeripheralPowerStatus, ctpPeriStatusChangeNotification=ctpPeriStatusChangeNotification, ctpRS232PeripheralIndex=ctpRS232PeripheralIndex, ctpDPPeripheralStatusTable=ctpDPPeripheralStatusTable, ctpPeripheralIndex=ctpPeripheralIndex, ctpPeripheralErrorNotifyEnable=ctpPeripheralErrorNotifyEnable, ciscoTelepresenceMIBGroups=ciscoTelepresenceMIBGroups, ctpPeripheralErrorIndex=ctpPeripheralErrorIndex, ctpRS232PeripheralStatusTable=ctpRS232PeripheralStatusTable, ctpUSBPeripheralPortRate=ctpUSBPeripheralPortRate, ctpPeripheralErrorNotification=ctpPeripheralErrorNotification, ctpDVIPeripheralCableStatus=ctpDVIPeripheralCableStatus, ctpPeripheralStatusTable=ctpPeripheralStatusTable, ctp802dot11PeripheralIfIndex=ctp802dot11PeripheralIfIndex, ctp802dot11PeripheralLinkStrength=ctp802dot11PeripheralLinkStrength, ctpPeripheralStatusObjects=ctpPeripheralStatusObjects, ctpHDMIPeripheralCableStatus=ctpHDMIPeripheralCableStatus, ctpHDMIPeripheralStatusEntry=ctpHDMIPeripheralStatusEntry, ctpHDMIPeripheralStatusTable=ctpHDMIPeripheralStatusTable, ctpPeripheralAttributeTable=ctpPeripheralAttributeTable, ctpSysUserAuthFailHistoryEntry=ctpSysUserAuthFailHistoryEntry, ciscoTpPeripheralAttributeGroup=ciscoTpPeripheralAttributeGroup, ctpEtherPeripheralIfIndex=ctpEtherPeripheralIfIndex, ctpPeripheralErrorDeviceNumber=ctpPeripheralErrorDeviceNumber, ctpEtherPeripheralStatusTable=ctpEtherPeripheralStatusTable, ctpUSBPeripheralPortType=ctpUSBPeripheralPortType, ciscoTelepresenceComplianceR02=ciscoTelepresenceComplianceR02, ctpRS232PeripheralConnStatus=ctpRS232PeripheralConnStatus, ctpSysUserAuthFailNotification=ctpSysUserAuthFailNotification, ctpUSBPeripheralStatusTable=ctpUSBPeripheralStatusTable, ctpPeripheralStatusEntry=ctpPeripheralStatusEntry, ciscoTelepresenceCompliances=ciscoTelepresenceCompliances, ctpPeripheralAttributeValue=ctpPeripheralAttributeValue, ctpDPPeripheralIndex=ctpDPPeripheralIndex, ctpUSBPeripheralStatusEntry=ctpUSBPeripheralStatusEntry, ctpDefaultGateway=ctpDefaultGateway, ctp802dot11PeripheralStatusTable=ctp802dot11PeripheralStatusTable, ctpEtherPeripheralStatusEntry=ctpEtherPeripheralStatusEntry, ctpSysUserAuthFailHistoryIndex=ctpSysUserAuthFailHistoryIndex, ciscoTpNotificationGroup=ciscoTpNotificationGroup, ctpPeripheralAttributeEntry=ctpPeripheralAttributeEntry, ctpRS232PeripheralStatusEntry=ctpRS232PeripheralStatusEntry, ctpPeripheralErrorDeviceCategory=ctpPeripheralErrorDeviceCategory, ctpSysUserAuthFailNotifyEnable=ctpSysUserAuthFailNotifyEnable, ciscoTpDPPeripheralStatusGroup=ciscoTpDPPeripheralStatusGroup, ctpSysUserAuthFailAccessProtocol=ctpSysUserAuthFailAccessProtocol, ctpDefaultGatewayAddrType=ctpDefaultGatewayAddrType, ciscoTelepresenceComplianceR01=ciscoTelepresenceComplianceR01, ctpEventHistory=ctpEventHistory, ctpDVIPeripheralStatusEntry=ctpDVIPeripheralStatusEntry, ctpSysUserAuthFailTimeStamp=ctpSysUserAuthFailTimeStamp, ciscoTelepresenceCompliance=ciscoTelepresenceCompliance, ctp802dot11PeripheralLinkStatus=ctp802dot11PeripheralLinkStatus, ciscoTpConfigurationGroupR01=ciscoTpConfigurationGroupR01, ciscoTpPeripheralStatusGroup=ciscoTpPeripheralStatusGroup, ctpPeripheralAttributeIndex=ctpPeripheralAttributeIndex, ciscoTelepresenceMIB=ciscoTelepresenceMIB, ctpDVIPeripheralIndex=ctpDVIPeripheralIndex, ctpEtherPeripheralIndex=ctpEtherPeripheralIndex, ctpHDMIPeripheralPowerStatus=ctpHDMIPeripheralPowerStatus, ctpPeripheralErrorHistoryEntry=ctpPeripheralErrorHistoryEntry, ctpSysUserAuthFailHistoryTable=ctpSysUserAuthFailHistoryTable, ctpRS232PortIndex=ctpRS232PortIndex, ctpSysUserAuthFailHistTableSize=ctpSysUserAuthFailHistTableSize, ctpVlanId=ctpVlanId, ctpPeripheralStatus=ctpPeripheralStatus, ciscoTelepresenceComplianceR05=ciscoTelepresenceComplianceR05, ciscoTelepresenceComplianceR04=ciscoTelepresenceComplianceR04, ctpUSBPeripheralIndex=ctpUSBPeripheralIndex, ciscoTpConfigurationGroupR02=ciscoTpConfigurationGroupR02, ciscoTelepresenceMIBNotifs=ciscoTelepresenceMIBNotifs, ctpDVIPeripheralStatusTable=ctpDVIPeripheralStatusTable, ctpPeripheralErrorHistoryTable=ctpPeripheralErrorHistoryTable, ctpPeripheralErrorStatus=ctpPeripheralErrorStatus, ciscoTpEventHistoryGroupR01=ciscoTpEventHistoryGroupR01, ctpPeripheralErrorHistTableSize=ctpPeripheralErrorHistTableSize, CtpPeripheralStatusCode=CtpPeripheralStatusCode, ctpEtherPeripheralStatus=ctpEtherPeripheralStatus, ciscoTpNotificationGroupR01=ciscoTpNotificationGroupR01, CtpPeripheralDeviceCategoryCode=CtpPeripheralDeviceCategoryCode, ciscoTpPeripheralStatusGroupR01=ciscoTpPeripheralStatusGroupR01, CtpSystemAccessProtocol=CtpSystemAccessProtocol, ctpSysUserAuthFailSourceAddrType=ctpSysUserAuthFailSourceAddrType, ctpObjects=ctpObjects, ctpPeripheralDeviceCategory=ctpPeripheralDeviceCategory, ctpPeripheralErrorHistoryIndex=ctpPeripheralErrorHistoryIndex, ctpPeripheralErrorTimeStamp=ctpPeripheralErrorTimeStamp, ctpSysUserAuthFailSourceAddr=ctpSysUserAuthFailSourceAddr, ctpUSBPeripheralCableStatus=ctpUSBPeripheralCableStatus, ctp802dot11PeripheralIndex=ctp802dot11PeripheralIndex, ctpHDMIPeripheralIndex=ctpHDMIPeripheralIndex, ciscoTpEventHistoryGroup=ciscoTpEventHistoryGroup, ctpPeripheralDeviceNumber=ctpPeripheralDeviceNumber, ciscoTpPeripheralStatusGroupR02=ciscoTpPeripheralStatusGroupR02, ciscoTpConfigurationGroup=ciscoTpConfigurationGroup, ctpPeriStatusChangeNotifyEnable=ctpPeriStatusChangeNotifyEnable, PYSNMP_MODULE_ID=ciscoTelepresenceMIB, ctpSysUserAuthFailHistLastIndex=ctpSysUserAuthFailHistLastIndex, ciscoTelepresenceComplianceR03=ciscoTelepresenceComplianceR03, ctp802dot11PeripheralStatusEntry=ctp802dot11PeripheralStatusEntry, ctpUSBPeripheralPowerStatus=ctpUSBPeripheralPowerStatus, ciscoTelepresenceMIBConform=ciscoTelepresenceMIBConform, ciscoTelepresenceMIBObjects=ciscoTelepresenceMIBObjects, ctpSysUserAuthFailSourcePort=ctpSysUserAuthFailSourcePort, ctp802dot11PeripheralAddrType=ctp802dot11PeripheralAddrType, CtpPeripheralPowerCode=CtpPeripheralPowerCode, ctpEtherPeripheralAddrType=ctpEtherPeripheralAddrType, ctpPeripheralErrorHistLastIndex=ctpPeripheralErrorHistLastIndex, ctpDPPeripheralStatusEntry=ctpDPPeripheralStatusEntry, ctpSysUserAuthFailUserName=ctpSysUserAuthFailUserName, ctpEtherPeripheralAddr=ctpEtherPeripheralAddr, ctpPeripheralDescription=ctpPeripheralDescription, ctp802dot11PeripheralAddr=ctp802dot11PeripheralAddr, ctpPeripheralAttributeDescr=ctpPeripheralAttributeDescr)
class SearchModule: def __init__(self): pass def search_for_competition_by_name(self, competitions, query): m, answer = self.search(competitions, attribute_name="caption", query=query) if m == 0: return False return answer def search_for_competition_by_code(self, competitions, query): return self.search_by_code(competitions, attribute_name="league", query=query) def search_for_team_by_name(self, teams, query): m, answer = self.search(teams, attribute_name="name", query=query) if m == 0: return False return answer def search_for_team_by_code(self, teams, query): return self.search_by_code(teams, attribute_name="code", query=query) def search_for_player_by_name(self, players, query): m, answer = self.search(players, attribute_name="name", query=query) if m == 0: return False return answer def search_for_team_from_standing_by_name(self, teams, query): m, answer = self.search(teams, attribute_name="team_name", query=query) if m == 0: return False return answer @staticmethod def search_by_code(dataset, attribute_name, query): search = query.lower() for index, data in enumerate(dataset): code = getattr(data, attribute_name).lower() if code == search: return dataset[index] return False @staticmethod def search(dataset, attribute_name, query): values = [0 for _ in range(0, len(dataset))] search = query.lower().split() upper_threshold = len(search) for index, data in enumerate(dataset): data_name = getattr(data, attribute_name).lower() search_array = data_name.split() for index2, text in enumerate(search_array): if index2 >= upper_threshold: break threshold = len(search[index2]) for i in range(0, len(text)): if i >= threshold - 1: break if text[i] == search[index2][i]: values[index] += 1 max_value = max(values) max_index = values.index(max_value) return max_value, dataset[max_index]
class Searchmodule: def __init__(self): pass def search_for_competition_by_name(self, competitions, query): (m, answer) = self.search(competitions, attribute_name='caption', query=query) if m == 0: return False return answer def search_for_competition_by_code(self, competitions, query): return self.search_by_code(competitions, attribute_name='league', query=query) def search_for_team_by_name(self, teams, query): (m, answer) = self.search(teams, attribute_name='name', query=query) if m == 0: return False return answer def search_for_team_by_code(self, teams, query): return self.search_by_code(teams, attribute_name='code', query=query) def search_for_player_by_name(self, players, query): (m, answer) = self.search(players, attribute_name='name', query=query) if m == 0: return False return answer def search_for_team_from_standing_by_name(self, teams, query): (m, answer) = self.search(teams, attribute_name='team_name', query=query) if m == 0: return False return answer @staticmethod def search_by_code(dataset, attribute_name, query): search = query.lower() for (index, data) in enumerate(dataset): code = getattr(data, attribute_name).lower() if code == search: return dataset[index] return False @staticmethod def search(dataset, attribute_name, query): values = [0 for _ in range(0, len(dataset))] search = query.lower().split() upper_threshold = len(search) for (index, data) in enumerate(dataset): data_name = getattr(data, attribute_name).lower() search_array = data_name.split() for (index2, text) in enumerate(search_array): if index2 >= upper_threshold: break threshold = len(search[index2]) for i in range(0, len(text)): if i >= threshold - 1: break if text[i] == search[index2][i]: values[index] += 1 max_value = max(values) max_index = values.index(max_value) return (max_value, dataset[max_index])
""" Write a program to display values of variables in Python. """ message = "Keep Smiling!" print(message) userNo = 101 print("User No is ", userNo) gender = 'M' print("Gender: ",gender)
""" Write a program to display values of variables in Python. """ message = 'Keep Smiling!' print(message) user_no = 101 print('User No is ', userNo) gender = 'M' print('Gender: ', gender)
load("@io_bazel_rules_dotnet//dotnet:defs.bzl", "core_library", "core_resource") filegroup( name = "core_common", srcs = [ ":src/common/ExceptionExtensions.cs", ":src/common/Guard.cs", ":src/common/TestMethodDisplay.cs", ":src/common/TestMethodDisplayOptions.cs", ] + ["@xunit_assert//:common_files"], ) core_resource( name = "xunit_core_resource", src = "src/xunit.core/Resources/xunit.core.rd.xml", identifier = "Xunit.Resources.xunit.core.rd.xml", ) core_library( name = "xunit.core.dll", srcs = [":core_common"] + glob(["src/xunit.core/**/*.cs"]), data = [ ":src/xunit.core/xunit.core.dll.tdnet", ], defines = [ "XUNIT_FRAMEWORK", ], resources = [":xunit_core_resource"], visibility = ["//visibility:public"], deps = [ "@core_sdk_stdlib//:libraryset", "@xunit_abstractions//:abstractions.xunit.dll", ], ) filegroup( name = "execution_common", srcs = [ ":src/common/AssemblyExtensions.cs", ":src/common/CommonTasks.cs", ":src/common/DictionaryExtensions.cs", ":src/common/ExceptionExtensions.cs", ":src/common/ExceptionUtility.cs", ":src/common/ExecutionHelper.cs", ":src/common/Guard.cs", ":src/common/LongLivedMarshalByRefObject.cs", ":src/common/NewReflectionExtensions.cs", ":src/common/NullMessageSink.cs", ":src/common/SerializationHelper.cs", ":src/common/SourceInformation.cs", ":src/common/TestOptionsNames.cs", ":src/common/XunitSerializationInfo.cs", ":src/common/XunitWorkerThread.cs", ] + glob(["src/messages/**/*.cs"]) + ["@xunit_assert//:common_files"], ) core_library( name = "xunit.execution.dll", srcs = [":execution_common"] + glob(["src/xunit.execution/**/*.cs"]), defines = [ "XUNIT_FRAMEWORK", "NETSTANDARD", ], visibility = ["//visibility:public"], deps = [ ":xunit.core.dll", "@core_sdk_stdlib//:libraryset", ], ) filegroup( name = "runner_utility_common", srcs = [ ":src/common/AssemblyExtensions.cs", ":src/common/CommonTasks.cs", ":src/common/ConcurrentDictionary.cs", ":src/common/ConsoleHelper.cs", ":src/common/DictionaryExtensions.cs", ":src/common/ExceptionExtensions.cs", ":src/common/ExceptionUtility.cs", ":src/common/Guard.cs", ":src/common/Json.cs", ":src/common/LongLivedMarshalByRefObject.cs", ":src/common/NewReflectionExtensions.cs", ":src/common/NullMessageSink.cs", ":src/common/SerializationHelper.cs", ":src/common/SourceInformation.cs", ":src/common/TestMethodDisplay.cs", ":src/common/TestMethodDisplayOptions.cs", ":src/common/TestOptionsNames.cs", ":src/common/XunitSerializationInfo.cs", ":src/common/XunitWorkerThread.cs", ":src/common/AssemblyResolution/AssemblyHelper_Desktop.cs", ":src/common/AssemblyResolution/_DiagnosticMessage.cs", ] + glob(["src/messages/**/*.cs"]), ) core_library( name = "xunit.runner.utility.dll", srcs = [":runner_utility_common"] + glob(["src/xunit.runner.utility/**/*.cs"]), defines = [ "NETSTANDARD2_0", "NETSTANDARD", "NETCOREAPP", ], visibility = ["//visibility:public"], deps = [ "@core_sdk_stdlib//:libraryset", "@xunit_abstractions//:abstractions.xunit.dll", ], ) filegroup( name = "runner_reporters_common", srcs = [ ":src/common/Json.cs", ":src/common/XunitWorkerThread.cs", ], ) core_library( name = "xunit.runner.reporters.dll", srcs = [":runner_reporters_common"] + glob(["src/xunit.runner.reporters/**/*.cs"]), defines = [ "NETSTANDARD2_0", "NETSTANDARD", ], visibility = ["//visibility:public"], deps = [ ":xunit.runner.utility.dll", "@core_sdk_stdlib//:libraryset", "@xunit_abstractions//:abstractions.xunit.dll", ], ) filegroup( name = "console_common", srcs = [ ":src/common/AssemblyExtensions.cs", ":src/common/ConsoleHelper.cs", ":src/common/DictionaryExtensions.cs", ":src/common/Guard.cs", ":src/common/Json.cs", ] + glob(["src/common/AssemblyResolution/**/*.cs"]), ) core_resource( name = "HTML_xslt", src = "src/xunit.console/HTML.xslt", identifier = "Xunit.ConsoleClient.HTML.xslt", ) core_resource( name = "NUnitXml_xslt", src = "src/xunit.console/NUnitXml.xslt", identifier = "Xunit.ConsoleClient.NUnitXml.xslt", ) core_resource( name = "xUnit1_xslt", src = "src/xunit.console/xUnit1.xslt", identifier = "Xunit.ConsoleClient.xUnit1.xslt", ) core_resource( name = "JUnitXml_xslt", src = "src/xunit.console/JUnitXml.xslt", identifier = "Xunit.ConsoleClient.JUnitXml.xslt", ) core_library( name = "xunit.console.dll", srcs = [":console_common"] + glob(["src/xunit.console/**/*.cs"]), defines = [ "NETSTANDARD2_0", "NETSTANDARD", "NETCOREAPP", "NETCOREAPP2_0", ], resources = [ ":HTML_xslt", ":JUnitXml_xslt", ":NUnitXml_xslt", ":xUnit1_xslt", ], unsafe = True, visibility = ["//visibility:public"], deps = [ ":xunit.runner.reporters.dll", ], ) filegroup( name = "test_utility_common", srcs = [ ":src/common/AssemblyExtensions.cs", ":src/common/DictionaryExtensions.cs", ":src/common/ExceptionExtensions.cs", ":src/common/ExecutionHelper.cs", ":src/common/TestOptionsNames.cs", ], ) # core_library( # name = "xunit.test.utility.dll", # srcs = [":test_utility_common"] + glob(["xunit/test/test.utility/**/*.cs"]), # defines = [ # "NETSTANDARD2_0", # "NETSTANDARD", # ], # visibility = ["//visibility:public"], # deps = [ # ":xunit.core.dll", # "@core_sdk_stdlib//:libraryset", # "@xunit_abstractions//:abstractions.xunit.dll", # ], # ) #core_xunit_test( # name = "test.xunit.assert", # srcs = ["@xunit_assert//:test_files"] + glob(["xunit/test/test.xunit.assert/**/*.cs"]), # defines = [ # "XUNIT_FRAMEWORK", # ], # visibility = ["//visibility:public"], # deps = [ # "@core_sdk_stdlib//:libraryset", # "@xunit_abstractions//:abstractions.xunit", # "@xunit_assert//:assert.xunit", # ":xunit.core", # ":xunit.test.utility", # ], # testlauncher=":xunit.console" #)
load('@io_bazel_rules_dotnet//dotnet:defs.bzl', 'core_library', 'core_resource') filegroup(name='core_common', srcs=[':src/common/ExceptionExtensions.cs', ':src/common/Guard.cs', ':src/common/TestMethodDisplay.cs', ':src/common/TestMethodDisplayOptions.cs'] + ['@xunit_assert//:common_files']) core_resource(name='xunit_core_resource', src='src/xunit.core/Resources/xunit.core.rd.xml', identifier='Xunit.Resources.xunit.core.rd.xml') core_library(name='xunit.core.dll', srcs=[':core_common'] + glob(['src/xunit.core/**/*.cs']), data=[':src/xunit.core/xunit.core.dll.tdnet'], defines=['XUNIT_FRAMEWORK'], resources=[':xunit_core_resource'], visibility=['//visibility:public'], deps=['@core_sdk_stdlib//:libraryset', '@xunit_abstractions//:abstractions.xunit.dll']) filegroup(name='execution_common', srcs=[':src/common/AssemblyExtensions.cs', ':src/common/CommonTasks.cs', ':src/common/DictionaryExtensions.cs', ':src/common/ExceptionExtensions.cs', ':src/common/ExceptionUtility.cs', ':src/common/ExecutionHelper.cs', ':src/common/Guard.cs', ':src/common/LongLivedMarshalByRefObject.cs', ':src/common/NewReflectionExtensions.cs', ':src/common/NullMessageSink.cs', ':src/common/SerializationHelper.cs', ':src/common/SourceInformation.cs', ':src/common/TestOptionsNames.cs', ':src/common/XunitSerializationInfo.cs', ':src/common/XunitWorkerThread.cs'] + glob(['src/messages/**/*.cs']) + ['@xunit_assert//:common_files']) core_library(name='xunit.execution.dll', srcs=[':execution_common'] + glob(['src/xunit.execution/**/*.cs']), defines=['XUNIT_FRAMEWORK', 'NETSTANDARD'], visibility=['//visibility:public'], deps=[':xunit.core.dll', '@core_sdk_stdlib//:libraryset']) filegroup(name='runner_utility_common', srcs=[':src/common/AssemblyExtensions.cs', ':src/common/CommonTasks.cs', ':src/common/ConcurrentDictionary.cs', ':src/common/ConsoleHelper.cs', ':src/common/DictionaryExtensions.cs', ':src/common/ExceptionExtensions.cs', ':src/common/ExceptionUtility.cs', ':src/common/Guard.cs', ':src/common/Json.cs', ':src/common/LongLivedMarshalByRefObject.cs', ':src/common/NewReflectionExtensions.cs', ':src/common/NullMessageSink.cs', ':src/common/SerializationHelper.cs', ':src/common/SourceInformation.cs', ':src/common/TestMethodDisplay.cs', ':src/common/TestMethodDisplayOptions.cs', ':src/common/TestOptionsNames.cs', ':src/common/XunitSerializationInfo.cs', ':src/common/XunitWorkerThread.cs', ':src/common/AssemblyResolution/AssemblyHelper_Desktop.cs', ':src/common/AssemblyResolution/_DiagnosticMessage.cs'] + glob(['src/messages/**/*.cs'])) core_library(name='xunit.runner.utility.dll', srcs=[':runner_utility_common'] + glob(['src/xunit.runner.utility/**/*.cs']), defines=['NETSTANDARD2_0', 'NETSTANDARD', 'NETCOREAPP'], visibility=['//visibility:public'], deps=['@core_sdk_stdlib//:libraryset', '@xunit_abstractions//:abstractions.xunit.dll']) filegroup(name='runner_reporters_common', srcs=[':src/common/Json.cs', ':src/common/XunitWorkerThread.cs']) core_library(name='xunit.runner.reporters.dll', srcs=[':runner_reporters_common'] + glob(['src/xunit.runner.reporters/**/*.cs']), defines=['NETSTANDARD2_0', 'NETSTANDARD'], visibility=['//visibility:public'], deps=[':xunit.runner.utility.dll', '@core_sdk_stdlib//:libraryset', '@xunit_abstractions//:abstractions.xunit.dll']) filegroup(name='console_common', srcs=[':src/common/AssemblyExtensions.cs', ':src/common/ConsoleHelper.cs', ':src/common/DictionaryExtensions.cs', ':src/common/Guard.cs', ':src/common/Json.cs'] + glob(['src/common/AssemblyResolution/**/*.cs'])) core_resource(name='HTML_xslt', src='src/xunit.console/HTML.xslt', identifier='Xunit.ConsoleClient.HTML.xslt') core_resource(name='NUnitXml_xslt', src='src/xunit.console/NUnitXml.xslt', identifier='Xunit.ConsoleClient.NUnitXml.xslt') core_resource(name='xUnit1_xslt', src='src/xunit.console/xUnit1.xslt', identifier='Xunit.ConsoleClient.xUnit1.xslt') core_resource(name='JUnitXml_xslt', src='src/xunit.console/JUnitXml.xslt', identifier='Xunit.ConsoleClient.JUnitXml.xslt') core_library(name='xunit.console.dll', srcs=[':console_common'] + glob(['src/xunit.console/**/*.cs']), defines=['NETSTANDARD2_0', 'NETSTANDARD', 'NETCOREAPP', 'NETCOREAPP2_0'], resources=[':HTML_xslt', ':JUnitXml_xslt', ':NUnitXml_xslt', ':xUnit1_xslt'], unsafe=True, visibility=['//visibility:public'], deps=[':xunit.runner.reporters.dll']) filegroup(name='test_utility_common', srcs=[':src/common/AssemblyExtensions.cs', ':src/common/DictionaryExtensions.cs', ':src/common/ExceptionExtensions.cs', ':src/common/ExecutionHelper.cs', ':src/common/TestOptionsNames.cs'])
res = [] with open('test.txt', mode='r', encoding="utf-8") as f: for line in f: arr = line.split() print(arr) res.append(arr[1]) r = '\t'.join(res) with open('res.txt', mode='w', encoding="utf-8") as f: # print(r) f.write(r)
res = [] with open('test.txt', mode='r', encoding='utf-8') as f: for line in f: arr = line.split() print(arr) res.append(arr[1]) r = '\t'.join(res) with open('res.txt', mode='w', encoding='utf-8') as f: f.write(r)
class GuildConfig: def __init__(self, data): self._data = data self.prefix = self.settings['prefix'] self.offset = self.settings['offset'] self.regional_pkmn = self.settings['regional'] self.has_configured = self.settings['done'] @property def settings(self): return self._data['prefix'] class RaidData: def __init__(self, data): self._data = data class WildData: def __init__(self, data): self._data = data class QuestData: def __init__(self, data): self._data = data class EventData: def __init__(self, data): self._data = data class TrainerData: def __init__(self, bot, data): self._bot = bot self._data = data self.raid_reports = data.get('raid_reports') self.ex_reports = data.get('ex_reports') self.wild_reports = data.get('wild_reports') self.egg_reports = data.get('egg_reports') self.research_reports = data.get('research_reports') self.silph_id = data.get('silphid') self.silph = self.silph_profile @property def silph_card(self): if not self.silph_id: return None silph_cog = self._bot.cogs.get('Silph') if not silph_cog: return None return silph_cog.get_silph_card(self.silph_id) @property def silph_profile(self): if not self.silph_id: return None silph_cog = self._bot.cogs.get('Silph') if not silph_cog: return None return silph_cog.get_silph_profile_lazy(self.silph_id) class GuildData: def __init__(self, ctx, data): self.ctx = ctx self._data = data @property def config(self): return GuildConfig(self._data['configure_dict']) @property def raids(self): return self._data['raidchannel_dict'] def raid(self, channel_id=None): channel_id = channel_id or self.ctx.channel.id data = self.raids.get(channel_id) return RaidData(data) if data else None @property def trainers(self): return self._data['trainers'] def trainer(self, member_id=None): member_id = member_id or self.ctx.author.id trainer_data = self.trainers.get(member_id) if not trainer_data: return None return TrainerData(self.ctx.bot, trainer_data)
class Guildconfig: def __init__(self, data): self._data = data self.prefix = self.settings['prefix'] self.offset = self.settings['offset'] self.regional_pkmn = self.settings['regional'] self.has_configured = self.settings['done'] @property def settings(self): return self._data['prefix'] class Raiddata: def __init__(self, data): self._data = data class Wilddata: def __init__(self, data): self._data = data class Questdata: def __init__(self, data): self._data = data class Eventdata: def __init__(self, data): self._data = data class Trainerdata: def __init__(self, bot, data): self._bot = bot self._data = data self.raid_reports = data.get('raid_reports') self.ex_reports = data.get('ex_reports') self.wild_reports = data.get('wild_reports') self.egg_reports = data.get('egg_reports') self.research_reports = data.get('research_reports') self.silph_id = data.get('silphid') self.silph = self.silph_profile @property def silph_card(self): if not self.silph_id: return None silph_cog = self._bot.cogs.get('Silph') if not silph_cog: return None return silph_cog.get_silph_card(self.silph_id) @property def silph_profile(self): if not self.silph_id: return None silph_cog = self._bot.cogs.get('Silph') if not silph_cog: return None return silph_cog.get_silph_profile_lazy(self.silph_id) class Guilddata: def __init__(self, ctx, data): self.ctx = ctx self._data = data @property def config(self): return guild_config(self._data['configure_dict']) @property def raids(self): return self._data['raidchannel_dict'] def raid(self, channel_id=None): channel_id = channel_id or self.ctx.channel.id data = self.raids.get(channel_id) return raid_data(data) if data else None @property def trainers(self): return self._data['trainers'] def trainer(self, member_id=None): member_id = member_id or self.ctx.author.id trainer_data = self.trainers.get(member_id) if not trainer_data: return None return trainer_data(self.ctx.bot, trainer_data)
# -*- coding: utf-8 -*- """Top-level package for Elejandria Libros chef.""" __author__ = """Learning Equality""" __email__ = 'benjamin@learningequality.org' __version__ = '0.1.0'
"""Top-level package for Elejandria Libros chef.""" __author__ = 'Learning Equality' __email__ = 'benjamin@learningequality.org' __version__ = '0.1.0'
""" # Definition for a Node. class Node: def __init__(self, val, left=None, right=None): self.val = val self.left = left self.right = right """ class Solution: def treeToDoublyList(self, root: 'Node') -> 'Node': if not root: return None nodes = [] def inorder(root): if root: inorder(root.left) nodes.append(root) inorder(root.right) inorder(root) for i in range(len(nodes)-1): nodes[i].right = nodes[i+1] nodes[i+1].left = nodes[i] nodes[0].left = nodes[-1] nodes[-1].right = nodes[0] return nodes[0]
""" # Definition for a Node. class Node: def __init__(self, val, left=None, right=None): self.val = val self.left = left self.right = right """ class Solution: def tree_to_doubly_list(self, root: 'Node') -> 'Node': if not root: return None nodes = [] def inorder(root): if root: inorder(root.left) nodes.append(root) inorder(root.right) inorder(root) for i in range(len(nodes) - 1): nodes[i].right = nodes[i + 1] nodes[i + 1].left = nodes[i] nodes[0].left = nodes[-1] nodes[-1].right = nodes[0] return nodes[0]
def solution(salaries: list[int]) -> int: return sorted(salaries)[1] if __name__ == '__main__': user_input = input() param = [int(x) for x in user_input.split()] print(solution(salaries=param))
def solution(salaries: list[int]) -> int: return sorted(salaries)[1] if __name__ == '__main__': user_input = input() param = [int(x) for x in user_input.split()] print(solution(salaries=param))
#adding two numbers num1 = 2 num2 = 3 sum = num1 + num2 print("The sum is:", sum)
num1 = 2 num2 = 3 sum = num1 + num2 print('The sum is:', sum)
""" Cube class contains the logic for maintaining the current state of the container, or Bedlam Cube, and methods for checking, inserting, and removing individual Shape objects from the cube space. """ """ Each Cube is made up of X * Y * Z Cuboids, Each of which for simplicities sakes contain all the info for the shapes that occupy the cube. """ class Cuboid: def __init__(self): self.shape = None #empty cuboid if the shape is None self.rotation = 0 self.x = -1 self.y = -1 self.z = -1 def __repr__(self): return "%s:%s"%(self.shape, self.rotation) __str__ = __repr__ class Cube: #initialiase with x*y*z cuboids def __init__(self, width=4, length=4, depth=4, ): self.width = width self.length = length self.depth = depth self.space = [[[Cuboid() for x in range(self.width)] for y in range(self.length)] for z in range(self.depth)] #checks that a specific shape and rotation of that shape #will fit into this cube at position x,y,z. Basically if #_any_ of the 'blocks' that make up the shape correspond #to a cuboid that already HAS a shape assigned, then this #shape will not fit. def check_shape(self, shape, rotation ,x ,y ,z): for block in shape.rotations[rotation]: bx, by, bz = block cx = bx + x cy = by + y cz = bz + z if cx >= self.width or \ cy >= self.length or \ cz >= self.depth or \ self.space[cx][cy][cz].shape != None: return False return True # blanks out the cuboid shape objects for a given shape # This happens during the iterative process of trying # each shape in turn, if a child shape cannot be placed # then the parent has to be removed and moved/rotated # before being placed again. def remove_shape(self, shape, rotation, x, y, z): for block in shape.rotations[rotation]: bx, by, bz = block cx = bx + x cy = by + y cz = bz + z self.space[cx][cy][cz].shape = None # Sets the shape into the Cube at this specific rotation # and position IFF it fits i.e. uses check_shape first # to see and then sets if it can. def put_shape (self, shape, rotation, x, y, z): if self.check_shape(shape, rotation, x, y, z): for block in shape.rotations[rotation]: bx, by, bz = block cx = bx + x cy = by + y cz = bz + z self.space[cx][cy][cz].shape = shape self.space[cx][cy][cz].rotation = rotation self.space[cx][cy][cz].sx = x self.space[cx][cy][cz].sy = y self.space[cx][cy][cz].sz = z return True return False def __repr__(self): return "%s"%str(self.space) __str__ = __repr__
""" Cube class contains the logic for maintaining the current state of the container, or Bedlam Cube, and methods for checking, inserting, and removing individual Shape objects from the cube space. """ ' Each Cube is made up of X * Y * Z Cuboids, Each of which\n for simplicities sakes contain all the info for the shapes\n that occupy the cube. ' class Cuboid: def __init__(self): self.shape = None self.rotation = 0 self.x = -1 self.y = -1 self.z = -1 def __repr__(self): return '%s:%s' % (self.shape, self.rotation) __str__ = __repr__ class Cube: def __init__(self, width=4, length=4, depth=4): self.width = width self.length = length self.depth = depth self.space = [[[cuboid() for x in range(self.width)] for y in range(self.length)] for z in range(self.depth)] def check_shape(self, shape, rotation, x, y, z): for block in shape.rotations[rotation]: (bx, by, bz) = block cx = bx + x cy = by + y cz = bz + z if cx >= self.width or cy >= self.length or cz >= self.depth or (self.space[cx][cy][cz].shape != None): return False return True def remove_shape(self, shape, rotation, x, y, z): for block in shape.rotations[rotation]: (bx, by, bz) = block cx = bx + x cy = by + y cz = bz + z self.space[cx][cy][cz].shape = None def put_shape(self, shape, rotation, x, y, z): if self.check_shape(shape, rotation, x, y, z): for block in shape.rotations[rotation]: (bx, by, bz) = block cx = bx + x cy = by + y cz = bz + z self.space[cx][cy][cz].shape = shape self.space[cx][cy][cz].rotation = rotation self.space[cx][cy][cz].sx = x self.space[cx][cy][cz].sy = y self.space[cx][cy][cz].sz = z return True return False def __repr__(self): return '%s' % str(self.space) __str__ = __repr__
def validate_positive_integer(param): if isinstance(param,int) and (param > 0): return(None) else: raise ValueError("Invalid value, expected positive integer, got {0}".format(param))
def validate_positive_integer(param): if isinstance(param, int) and param > 0: return None else: raise value_error('Invalid value, expected positive integer, got {0}'.format(param))
class Node: """ This Node class has been created for you. It contains the necessary properties for the solution, which are: - text - next """ def __init__(self, data, value): self.data = data self.value = value self.__left = None self.__right = None def __repr__(self): return '<Node {}>'.format(self.value) def set_right(self, node): if isinstance(node, Node) or node is None: self.__right = node else: raise TypeError("The 'right' node must be of type Node or None.") def set_left(self, node): if isinstance(node, Node) or node is None: self.__left = node else: raise TypeError("The 'left' node must be of type Node or None.") def get_right(self): return self.__right def get_left(self): return self.__left def print_details(self): print("{}: {}".format(self.value, self.data))
class Node: """ This Node class has been created for you. It contains the necessary properties for the solution, which are: - text - next """ def __init__(self, data, value): self.data = data self.value = value self.__left = None self.__right = None def __repr__(self): return '<Node {}>'.format(self.value) def set_right(self, node): if isinstance(node, Node) or node is None: self.__right = node else: raise type_error("The 'right' node must be of type Node or None.") def set_left(self, node): if isinstance(node, Node) or node is None: self.__left = node else: raise type_error("The 'left' node must be of type Node or None.") def get_right(self): return self.__right def get_left(self): return self.__left def print_details(self): print('{}: {}'.format(self.value, self.data))
class Solution: def canCompleteCircuit(self, gas: List[int], cost: List[int]) -> int: n = len(gas) total_tank, curr_tank = 0, 0 start = 0 for i in range(n): total_tank += gas[i] - cost[i] curr_tank += gas[i] - cost[i] # If one couldn't get here, if curr_tank < 0: # Pick up the next station as the starting one. start = i + 1 # Start with an empty tank. curr_tank = 0 return start if total_tank >= 0 else -1
class Solution: def can_complete_circuit(self, gas: List[int], cost: List[int]) -> int: n = len(gas) (total_tank, curr_tank) = (0, 0) start = 0 for i in range(n): total_tank += gas[i] - cost[i] curr_tank += gas[i] - cost[i] if curr_tank < 0: start = i + 1 curr_tank = 0 return start if total_tank >= 0 else -1
def test(): # Here we can either check objects created in the solution code, or the # string value of the solution, available as __solution__. A helper for # printing formatted messages is available as __msg__. See the testTemplate # in the meta.json for details. # If an assertion fails, the message will be displayed assert set(bs_column.values) == {'strong', 'weak'}, "Have you selected the 'base_score' column?" assert set(score_freq) == set([573, 228]), "You count values are incorrect. Are you using the 'count' function?" assert "plot.bar" in __solution__ , "Are you using the 'plot.bar' function?" assert list(score_plot.get_ylim()) == [0.0, 601.65], "The y-axis labels are incorrect, are you using the 'count' function?" assert str(list(score_plot.get_xticklabels())) == "[Text(0, 0, 'weak'), Text(0, 0, 'strong')]", "\nThe x-axis labels are incorrect. Are you using the 'count' function?" __msg__.good("Nice work, well done!")
def test(): assert set(bs_column.values) == {'strong', 'weak'}, "Have you selected the 'base_score' column?" assert set(score_freq) == set([573, 228]), "You count values are incorrect. Are you using the 'count' function?" assert 'plot.bar' in __solution__, "Are you using the 'plot.bar' function?" assert list(score_plot.get_ylim()) == [0.0, 601.65], "The y-axis labels are incorrect, are you using the 'count' function?" assert str(list(score_plot.get_xticklabels())) == "[Text(0, 0, 'weak'), Text(0, 0, 'strong')]", "\nThe x-axis labels are incorrect. Are you using the 'count' function?" __msg__.good('Nice work, well done!')
# New tokens can be found at https://archive.org/account/s3.php IA_ACCESS_KEY = 'change to valid token' IA_SECRET_KEY = 'change to valid token' DOI_FORMAT = '10.70102/fk2osf.io/{guid}' OSF_BEARER_TOKEN = '' DATACITE_USERNAME = None DATACITE_PASSWORD = None DATACITE_URL = None DATACITE_PREFIX = '10.70102' # Datacite's test DOI prefix -- update in production
ia_access_key = 'change to valid token' ia_secret_key = 'change to valid token' doi_format = '10.70102/fk2osf.io/{guid}' osf_bearer_token = '' datacite_username = None datacite_password = None datacite_url = None datacite_prefix = '10.70102'
test = { 'name': 'q5', 'points': 3, 'suites': [ { 'cases': [ {'code': ">>> big_tippers(['suraj', 15, 'isaac', 9, 'angela', 19]) == ['suraj', 'angela']\nTrue", 'hidden': False, 'locked': False}, { 'code': ">>> big_tippers(['suraj', 15, 'isaac', 25, 'angela', 19, 'anna', 21, 'aayush', 14, 'sukrit', 8]) == ['isaac', 'angela', 'anna']\nTrue", 'hidden': False, 'locked': False}, { 'code': '>>> # If you fail this, note that we want the names of those who tipped MORE than the average,;\n' '>>> # not equal to or more than;\n' ">>> big_tippers(['a', 2, 'b', 2, 'c', 2]) == []\n" 'True', 'hidden': False, 'locked': False}], 'scored': True, 'setup': '', 'teardown': '', 'type': 'doctest'}]}
test = {'name': 'q5', 'points': 3, 'suites': [{'cases': [{'code': ">>> big_tippers(['suraj', 15, 'isaac', 9, 'angela', 19]) == ['suraj', 'angela']\nTrue", 'hidden': False, 'locked': False}, {'code': ">>> big_tippers(['suraj', 15, 'isaac', 25, 'angela', 19, 'anna', 21, 'aayush', 14, 'sukrit', 8]) == ['isaac', 'angela', 'anna']\nTrue", 'hidden': False, 'locked': False}, {'code': ">>> # If you fail this, note that we want the names of those who tipped MORE than the average,;\n>>> # not equal to or more than;\n>>> big_tippers(['a', 2, 'b', 2, 'c', 2]) == []\nTrue", 'hidden': False, 'locked': False}], 'scored': True, 'setup': '', 'teardown': '', 'type': 'doctest'}]}
#statsFunctions2.py def total(list_obj): total = 0 n = len(list_obj) for i in range(n): total += list_obj[i] return total def mean(list_obj): n = len(list_obj) mean = total(list_obj) / n return mean list1 = [3, 6, 9, 12, 15] total_list1 = total(list1) print(total_list1) mean_list1 = mean(list1) print("Mean of list1:", mean_list1)
def total(list_obj): total = 0 n = len(list_obj) for i in range(n): total += list_obj[i] return total def mean(list_obj): n = len(list_obj) mean = total(list_obj) / n return mean list1 = [3, 6, 9, 12, 15] total_list1 = total(list1) print(total_list1) mean_list1 = mean(list1) print('Mean of list1:', mean_list1)
ble_address_type = { 'gap_address_type_public': 0, 'gap_address_type_random': 1 } gap_discoverable_mode = { 'non_discoverable': 0x00, 'limited_discoverable': 0x01, 'general_discoverable': 0x02, 'broadcast': 0x03, 'user_data': 0x04, 'enhanced_broadcasting': 0x80 } gap_connectable_mode = { 'non_connectable': 0x00, 'directed_connectable': 0x01, 'undirected_connectable': 0x02, 'scannable_non_connectable': 0x03, } gap_discover_mode = { 'limited': 0x00, 'generic': 0x01, 'observation': 0x02, } bonding = { # create bonding if devices not already bonded 'do_not_create_bonding': 0x00, 'create_bonding': 0x01, } bondable = { 'no': 0x00, 'yes': 0x01, } connection_status_flag = { 'connected': 0x01, 'encrypted': 0x02, 'completed': 0x04, 'parameters_change': 0x08, } scan_response_packet_type = { 0x00: 'connectable_advertisement_packet', 0x02: 'non-connectable_advertisement_packet', 0x04: 'scan_response_packet', 0x06: 'discoverable_advertisement_packet', } scan_response_data_type = { 0x01: 'flags', 0x02: 'incomplete_list_16-bit_service_class_uuids', 0x03: 'complete_list_16-bit_service_class_uuids', 0x04: 'incomplete_list_32-bit_service_class_uuids', 0x05: 'complete_list_32-bit_service_class_uuids', 0x06: 'incomplete_list_128-bit_service_class_uuids', 0x07: 'complete_list_128-bit_service_class_uuids', 0x08: 'shortened_local_name', 0x09: 'complete_local_name', 0x0A: 'tx_power_level', 0x0D: 'class_of_device', 0x0E: 'simple_pairing_hash_c/c-192', 0x0F: 'simple_pairing_randomizer_r/r-192', 0x10: 'device_id/security_manager_tk_value', 0x11: 'security_manager_out_of_band_flags', 0x12: 'slave_connection_interval_range', 0x14: 'list_of_16-bit_service_solicitation_uuids', 0x1F: 'list_of_32-bit_service_solicitation_uuids', 0x15: 'list_of_128-bit_service_solicitation_uuids', 0x16: 'service_data/service_data-16-bit_uuid', 0x20: 'service_data-32-bit_uuid', 0x21: 'service_data-128-bit_uuid', 0x22: 'LE_secure_connections_confirmation_value', 0x23: 'LE_secure_connections_random_value', 0x17: 'public_target_address', 0x18: 'random_target_address', 0x19: 'appearance', 0x1A: 'advertising_interval', 0x1B: 'LE_bluetooth_device_address', 0x1C: 'LE_role', 0x1D: 'simple_pairing_hash_c-256', 0x1E: 'simple_pairing_randomizer_r-256', 0x3D: '3D_information_data', 0xFF: 'manufacturer_specific_data', } # GATT gatt_service_uuid = { 'generic_access_profile': bytearray([0x18, 0x00]), 'generic_attribute_profile': bytearray([0x18, 0x01]), } gatt_attribute_type_uuid = { 'primary_service': bytearray([0x28, 0x00]), 'secondary_service': bytearray([0x28, 0x01]), 'include': bytearray([0x28, 0x02]), 'characteristic': bytearray([0x28, 0x03]), } gatt_characteristic_descriptor_uuid = { 'characteristic_extended_properties': bytearray([0x29, 0x00]), 'characteristic_user_description': bytearray([0x29, 0x01]), 'client_characteristic_configuration': bytearray([0x29, 0x02]), 'server_characteristic_configuration': bytearray([0x29, 0x03]), 'characteristic_format': bytearray([0x29, 0x04]), 'characteristic_aggregate_format': bytearray([0x29, 0x05]), } gatt_characteristic_type_uuid = { 'device_name': bytearray([0x2A, 0x00]), 'appearance': bytearray([0x2A, 0x01]), 'peripheral_privacy_flag': bytearray([0x2A, 0x02]), 'reconnection_address': bytearray([0x2A, 0x03]), 'peripheral_preferred_connection_parameters': bytearray([0x2A, 0x04]), 'service_changed': bytearray([0x2A, 0x05]), }
ble_address_type = {'gap_address_type_public': 0, 'gap_address_type_random': 1} gap_discoverable_mode = {'non_discoverable': 0, 'limited_discoverable': 1, 'general_discoverable': 2, 'broadcast': 3, 'user_data': 4, 'enhanced_broadcasting': 128} gap_connectable_mode = {'non_connectable': 0, 'directed_connectable': 1, 'undirected_connectable': 2, 'scannable_non_connectable': 3} gap_discover_mode = {'limited': 0, 'generic': 1, 'observation': 2} bonding = {'do_not_create_bonding': 0, 'create_bonding': 1} bondable = {'no': 0, 'yes': 1} connection_status_flag = {'connected': 1, 'encrypted': 2, 'completed': 4, 'parameters_change': 8} scan_response_packet_type = {0: 'connectable_advertisement_packet', 2: 'non-connectable_advertisement_packet', 4: 'scan_response_packet', 6: 'discoverable_advertisement_packet'} scan_response_data_type = {1: 'flags', 2: 'incomplete_list_16-bit_service_class_uuids', 3: 'complete_list_16-bit_service_class_uuids', 4: 'incomplete_list_32-bit_service_class_uuids', 5: 'complete_list_32-bit_service_class_uuids', 6: 'incomplete_list_128-bit_service_class_uuids', 7: 'complete_list_128-bit_service_class_uuids', 8: 'shortened_local_name', 9: 'complete_local_name', 10: 'tx_power_level', 13: 'class_of_device', 14: 'simple_pairing_hash_c/c-192', 15: 'simple_pairing_randomizer_r/r-192', 16: 'device_id/security_manager_tk_value', 17: 'security_manager_out_of_band_flags', 18: 'slave_connection_interval_range', 20: 'list_of_16-bit_service_solicitation_uuids', 31: 'list_of_32-bit_service_solicitation_uuids', 21: 'list_of_128-bit_service_solicitation_uuids', 22: 'service_data/service_data-16-bit_uuid', 32: 'service_data-32-bit_uuid', 33: 'service_data-128-bit_uuid', 34: 'LE_secure_connections_confirmation_value', 35: 'LE_secure_connections_random_value', 23: 'public_target_address', 24: 'random_target_address', 25: 'appearance', 26: 'advertising_interval', 27: 'LE_bluetooth_device_address', 28: 'LE_role', 29: 'simple_pairing_hash_c-256', 30: 'simple_pairing_randomizer_r-256', 61: '3D_information_data', 255: 'manufacturer_specific_data'} gatt_service_uuid = {'generic_access_profile': bytearray([24, 0]), 'generic_attribute_profile': bytearray([24, 1])} gatt_attribute_type_uuid = {'primary_service': bytearray([40, 0]), 'secondary_service': bytearray([40, 1]), 'include': bytearray([40, 2]), 'characteristic': bytearray([40, 3])} gatt_characteristic_descriptor_uuid = {'characteristic_extended_properties': bytearray([41, 0]), 'characteristic_user_description': bytearray([41, 1]), 'client_characteristic_configuration': bytearray([41, 2]), 'server_characteristic_configuration': bytearray([41, 3]), 'characteristic_format': bytearray([41, 4]), 'characteristic_aggregate_format': bytearray([41, 5])} gatt_characteristic_type_uuid = {'device_name': bytearray([42, 0]), 'appearance': bytearray([42, 1]), 'peripheral_privacy_flag': bytearray([42, 2]), 'reconnection_address': bytearray([42, 3]), 'peripheral_preferred_connection_parameters': bytearray([42, 4]), 'service_changed': bytearray([42, 5])}
#------------------------------------------------------------------------------- # mrna #------------------------------------------------------------------------------- def runFib(inputFile): fi = open(inputFile, 'r') #reads in the file that list the before/after file names inputData = fi.readline().split() #reads in files n, m = int(inputData[0]), int(inputData[1]) mature, immature = 0, 1 for i in range(n-1): babies = mature * m mature = immature + mature immature = babies total = mature + immature return total #------------------------------------------------------------------------------- # Fin #-------------------------------------------------------------------------------
def run_fib(inputFile): fi = open(inputFile, 'r') input_data = fi.readline().split() (n, m) = (int(inputData[0]), int(inputData[1])) (mature, immature) = (0, 1) for i in range(n - 1): babies = mature * m mature = immature + mature immature = babies total = mature + immature return total
#!/usr/bin/python CONFIG = { "BUCKET": "sd_s3_testbucket", "EXEC_FMT": "/usr/bin/python -m syndicate.rg.gateway", "DRIVER": "syndicate.rg.drivers.s3" }
config = {'BUCKET': 'sd_s3_testbucket', 'EXEC_FMT': '/usr/bin/python -m syndicate.rg.gateway', 'DRIVER': 'syndicate.rg.drivers.s3'}
expected_output = { 'lsps': { 'mlx8.1_to_ces.2': { 'destination': '1.1.1.1', 'admin': 'UP', 'operational': 'UP', 'flap_count': 1, 'retry_count': 0, 'tunnel_interface': 'tunnel0' }, 'mlx8.1_to_ces.1': { 'destination': '2.2.2.2', 'admin': 'UP', 'operational': 'UP', 'flap_count': 1, 'retry_count': 0, 'tunnel_interface': 'tunnel56' }, 'mlx8.1_to_mlx8.2': { 'destination': '3.3.3.3', 'admin': 'UP', 'operational': 'UP', 'flap_count': 1, 'retry_count': 0, 'tunnel_interface': 'tunnel63' }, 'mlx8.1_to_mlx8.3': { 'destination': '4.4.4.4', 'admin': 'DOWN', 'operational': 'DOWN', 'flap_count': 0, 'retry_count': 0 } } }
expected_output = {'lsps': {'mlx8.1_to_ces.2': {'destination': '1.1.1.1', 'admin': 'UP', 'operational': 'UP', 'flap_count': 1, 'retry_count': 0, 'tunnel_interface': 'tunnel0'}, 'mlx8.1_to_ces.1': {'destination': '2.2.2.2', 'admin': 'UP', 'operational': 'UP', 'flap_count': 1, 'retry_count': 0, 'tunnel_interface': 'tunnel56'}, 'mlx8.1_to_mlx8.2': {'destination': '3.3.3.3', 'admin': 'UP', 'operational': 'UP', 'flap_count': 1, 'retry_count': 0, 'tunnel_interface': 'tunnel63'}, 'mlx8.1_to_mlx8.3': {'destination': '4.4.4.4', 'admin': 'DOWN', 'operational': 'DOWN', 'flap_count': 0, 'retry_count': 0}}}
""" Given a set of candidate numbers (C) (without duplicates) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. The same repeated number may be chosen from C unlimited number of times. Note: All numbers (including target) will be positive integers. The solution set must not contain duplicate combinations. For example, given candidate set [2, 3, 6, 7] and target 7, A solution set is: [ [7], [2, 2, 3] ] """ class Solution(object): def combinationSum(self, candidates, target): """ :type candidates: List[int] :type target: int :rtype: List[List[int]] """ #import copy def backtracking(start_index, candidates, remain, sub_solution, solution): if remain == 0: #solution.append(copy.deepcopy(sub_solution)) solution.append(sub_solution) return for i in range(start_index, len(candidates)): if remain - candidates[i] >= 0: backtracking(i, candidates, remain - candidates[i], sub_solution + [candidates[i]], solution) solution = [] candidates = list(candidates) backtracking(0, candidates, target, [], solution) return solution s = Solution() print(s.combinationSum([2, 3, 6, 7], 7))
""" Given a set of candidate numbers (C) (without duplicates) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. The same repeated number may be chosen from C unlimited number of times. Note: All numbers (including target) will be positive integers. The solution set must not contain duplicate combinations. For example, given candidate set [2, 3, 6, 7] and target 7, A solution set is: [ [7], [2, 2, 3] ] """ class Solution(object): def combination_sum(self, candidates, target): """ :type candidates: List[int] :type target: int :rtype: List[List[int]] """ def backtracking(start_index, candidates, remain, sub_solution, solution): if remain == 0: solution.append(sub_solution) return for i in range(start_index, len(candidates)): if remain - candidates[i] >= 0: backtracking(i, candidates, remain - candidates[i], sub_solution + [candidates[i]], solution) solution = [] candidates = list(candidates) backtracking(0, candidates, target, [], solution) return solution s = solution() print(s.combinationSum([2, 3, 6, 7], 7))
{ 'targets': [ { 'target_name': 'modemmanager-dbus-proxies', 'type': 'none', 'variables': { 'xml2cpp_type': 'proxy', 'xml2cpp_in_dir': '<(sysroot)/usr/share/dbus-1/interfaces/', 'xml2cpp_out_dir': 'include/dbus_proxies', }, 'sources': [ '<(xml2cpp_in_dir)/mm-mobile-error.xml', '<(xml2cpp_in_dir)/mm-serial-error.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager.Modem.Cdma.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager.Modem.Firmware.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager.Modem.Gsm.Card.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager.Modem.Gsm.Contacts.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager.Modem.Gsm.Network.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager.Modem.Gsm.SMS.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager.Modem.Gsm.Ussd.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager.Modem.Gsm.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager.Modem.Simple.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager.Modem.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager1.Bearer.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager1.Modem.Location.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager1.Modem.Modem3gpp.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager1.Modem.ModemCdma.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager1.Modem.Simple.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager1.Modem.Time.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager1.Modem.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager1.Sim.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager1.xml', ], 'includes': ['xml2cpp.gypi'], }, { 'target_name': 'modemmanager-dbus-adaptors', 'type': 'none', 'variables': { 'xml2cpp_type': 'adaptor', 'xml2cpp_in_dir': '<(sysroot)/usr/share/dbus-1/interfaces/', 'xml2cpp_out_dir': 'include/dbus_adaptors', }, 'sources': [ '<(xml2cpp_in_dir)/mm-mobile-error.xml', '<(xml2cpp_in_dir)/mm-serial-error.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager.Modem.Cdma.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager.Modem.Firmware.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager.Modem.Gsm.Card.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager.Modem.Gsm.Contacts.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager.Modem.Gsm.Network.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager.Modem.Gsm.SMS.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager.Modem.Gsm.Ussd.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager.Modem.Gsm.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager.Modem.Simple.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager.Modem.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager1.Bearer.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager1.Modem.Location.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager1.Modem.Modem3gpp.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager1.Modem.ModemCdma.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager1.Modem.Simple.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager1.Modem.Time.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager1.Modem.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager1.Sim.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager1.xml', ], 'includes': ['xml2cpp.gypi'], }, { 'target_name': 'dbus-proxies', 'type': 'none', 'variables': { 'xml2cpp_type': 'proxy', 'xml2cpp_in_dir': '<(sysroot)/usr/share/dbus-1/interfaces/', 'xml2cpp_out_dir': 'include/dbus_proxies', }, 'sources': [ '<(xml2cpp_in_dir)/org.freedesktop.DBus.Properties.xml', ], 'includes': ['xml2cpp.gypi'], }, { 'target_name': 'cloud_policy_proto_generator', 'type': 'none', 'hard_dependency': 1, 'variables': { 'policy_tools_dir': '<(sysroot)/usr/share/policy_tools', 'policy_resources_dir': '<(sysroot)/usr/share/policy_resources', 'proto_out_dir': '<(SHARED_INTERMEDIATE_DIR)/proto', }, 'actions': [{ 'action_name': 'run_generate_script', 'inputs': [ '<(policy_tools_dir)/generate_policy_source.py', '<(policy_resources_dir)/policy_templates.json', '<(policy_resources_dir)/VERSION', ], 'outputs': [ '<(proto_out_dir)/cloud_policy.proto' ], 'action': [ 'python', '<(policy_tools_dir)/generate_policy_source.py', '--cloud-policy-protobuf=<(proto_out_dir)/cloud_policy.proto', '<(policy_resources_dir)/VERSION', '<(OS)', '1', # chromeos-flag '<(policy_resources_dir)/policy_templates.json', ], }], }, { 'target_name': 'policy-protos', 'type': 'static_library', 'variables': { 'proto_in_dir': '<(sysroot)/usr/include/proto', 'proto_out_dir': 'include/bindings', }, 'sources': [ '<(proto_in_dir)/chrome_device_policy.proto', '<(proto_in_dir)/chrome_extension_policy.proto', '<(proto_in_dir)/device_management_backend.proto', '<(proto_in_dir)/device_management_local.proto', ], 'includes': ['protoc.gypi'], }, { 'target_name': 'user_policy-protos', 'type': 'static_library', 'variables': { 'proto_in_dir': '<(SHARED_INTERMEDIATE_DIR)/proto', 'proto_out_dir': 'include/bindings', }, 'dependencies': [ 'cloud_policy_proto_generator', ], 'sources': [ '<(proto_in_dir)/cloud_policy.proto', ], 'includes': ['protoc.gypi'], }, { 'target_name': 'install_attributes-proto', 'type': 'static_library', # install_attributes-proto.a is used by a shared_libary # object, so we need to build it with '-fPIC' instead of '-fPIE'. 'cflags!': ['-fPIE'], 'cflags': ['-fPIC'], 'variables': { 'proto_in_dir': '<(sysroot)/usr/include/proto', 'proto_out_dir': 'include/bindings', }, 'sources': [ '<(proto_in_dir)/install_attributes.proto', ], 'includes': ['protoc.gypi'], }, ], }
{'targets': [{'target_name': 'modemmanager-dbus-proxies', 'type': 'none', 'variables': {'xml2cpp_type': 'proxy', 'xml2cpp_in_dir': '<(sysroot)/usr/share/dbus-1/interfaces/', 'xml2cpp_out_dir': 'include/dbus_proxies'}, 'sources': ['<(xml2cpp_in_dir)/mm-mobile-error.xml', '<(xml2cpp_in_dir)/mm-serial-error.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager.Modem.Cdma.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager.Modem.Firmware.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager.Modem.Gsm.Card.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager.Modem.Gsm.Contacts.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager.Modem.Gsm.Network.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager.Modem.Gsm.SMS.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager.Modem.Gsm.Ussd.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager.Modem.Gsm.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager.Modem.Simple.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager.Modem.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager1.Bearer.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager1.Modem.Location.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager1.Modem.Modem3gpp.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager1.Modem.ModemCdma.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager1.Modem.Simple.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager1.Modem.Time.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager1.Modem.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager1.Sim.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager1.xml'], 'includes': ['xml2cpp.gypi']}, {'target_name': 'modemmanager-dbus-adaptors', 'type': 'none', 'variables': {'xml2cpp_type': 'adaptor', 'xml2cpp_in_dir': '<(sysroot)/usr/share/dbus-1/interfaces/', 'xml2cpp_out_dir': 'include/dbus_adaptors'}, 'sources': ['<(xml2cpp_in_dir)/mm-mobile-error.xml', '<(xml2cpp_in_dir)/mm-serial-error.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager.Modem.Cdma.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager.Modem.Firmware.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager.Modem.Gsm.Card.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager.Modem.Gsm.Contacts.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager.Modem.Gsm.Network.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager.Modem.Gsm.SMS.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager.Modem.Gsm.Ussd.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager.Modem.Gsm.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager.Modem.Simple.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager.Modem.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager1.Bearer.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager1.Modem.Location.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager1.Modem.Modem3gpp.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager1.Modem.ModemCdma.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager1.Modem.Simple.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager1.Modem.Time.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager1.Modem.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager1.Sim.xml', '<(xml2cpp_in_dir)/org.freedesktop.ModemManager1.xml'], 'includes': ['xml2cpp.gypi']}, {'target_name': 'dbus-proxies', 'type': 'none', 'variables': {'xml2cpp_type': 'proxy', 'xml2cpp_in_dir': '<(sysroot)/usr/share/dbus-1/interfaces/', 'xml2cpp_out_dir': 'include/dbus_proxies'}, 'sources': ['<(xml2cpp_in_dir)/org.freedesktop.DBus.Properties.xml'], 'includes': ['xml2cpp.gypi']}, {'target_name': 'cloud_policy_proto_generator', 'type': 'none', 'hard_dependency': 1, 'variables': {'policy_tools_dir': '<(sysroot)/usr/share/policy_tools', 'policy_resources_dir': '<(sysroot)/usr/share/policy_resources', 'proto_out_dir': '<(SHARED_INTERMEDIATE_DIR)/proto'}, 'actions': [{'action_name': 'run_generate_script', 'inputs': ['<(policy_tools_dir)/generate_policy_source.py', '<(policy_resources_dir)/policy_templates.json', '<(policy_resources_dir)/VERSION'], 'outputs': ['<(proto_out_dir)/cloud_policy.proto'], 'action': ['python', '<(policy_tools_dir)/generate_policy_source.py', '--cloud-policy-protobuf=<(proto_out_dir)/cloud_policy.proto', '<(policy_resources_dir)/VERSION', '<(OS)', '1', '<(policy_resources_dir)/policy_templates.json']}]}, {'target_name': 'policy-protos', 'type': 'static_library', 'variables': {'proto_in_dir': '<(sysroot)/usr/include/proto', 'proto_out_dir': 'include/bindings'}, 'sources': ['<(proto_in_dir)/chrome_device_policy.proto', '<(proto_in_dir)/chrome_extension_policy.proto', '<(proto_in_dir)/device_management_backend.proto', '<(proto_in_dir)/device_management_local.proto'], 'includes': ['protoc.gypi']}, {'target_name': 'user_policy-protos', 'type': 'static_library', 'variables': {'proto_in_dir': '<(SHARED_INTERMEDIATE_DIR)/proto', 'proto_out_dir': 'include/bindings'}, 'dependencies': ['cloud_policy_proto_generator'], 'sources': ['<(proto_in_dir)/cloud_policy.proto'], 'includes': ['protoc.gypi']}, {'target_name': 'install_attributes-proto', 'type': 'static_library', 'cflags!': ['-fPIE'], 'cflags': ['-fPIC'], 'variables': {'proto_in_dir': '<(sysroot)/usr/include/proto', 'proto_out_dir': 'include/bindings'}, 'sources': ['<(proto_in_dir)/install_attributes.proto'], 'includes': ['protoc.gypi']}]}
class Queue: def __init__(self): self.in_stack = [] self.out_stack = [] # Transfer values in stack1 to stack2 def stack_transfer(self, stack1, stack2): while stack1: stack2.append(stack1.pop()) def enqueue(self, value): self.in_stack.append(value) def dequeue(self): # If no items on either stack if not self.in_stack and not self.out_stack: return None # If in_stack has items, but out_stack is empty if self.in_stack and not self.out_stack: self.stack_transfer(self.in_stack, self.out_stack) return self.out_stack.pop() if __name__ == "__main__": myQueue = Queue() for i in xrange(1, 10): myQueue.enqueue(i) while True: value = myQueue.dequeue() if value is None: exit(0) else: print(value)
class Queue: def __init__(self): self.in_stack = [] self.out_stack = [] def stack_transfer(self, stack1, stack2): while stack1: stack2.append(stack1.pop()) def enqueue(self, value): self.in_stack.append(value) def dequeue(self): if not self.in_stack and (not self.out_stack): return None if self.in_stack and (not self.out_stack): self.stack_transfer(self.in_stack, self.out_stack) return self.out_stack.pop() if __name__ == '__main__': my_queue = queue() for i in xrange(1, 10): myQueue.enqueue(i) while True: value = myQueue.dequeue() if value is None: exit(0) else: print(value)
l = iface.activeLayer() iter = l.getFeatures() geoms = [] for feature in iter: geom = feature.geometry() if not(geom.isMultipart()): l.boundingBox(feature.id()) geoms.append(geom)
l = iface.activeLayer() iter = l.getFeatures() geoms = [] for feature in iter: geom = feature.geometry() if not geom.isMultipart(): l.boundingBox(feature.id()) geoms.append(geom)
def is_in_interval(n): return (-15 < n <= 12) or (14 < n < 17) or (19 <= n) print(is_in_interval(int(input())))
def is_in_interval(n): return -15 < n <= 12 or 14 < n < 17 or 19 <= n print(is_in_interval(int(input())))
class UniBrokerMessageManager: def reject(self) -> None: raise NotImplementedError(f'method reject must be specified for class "{type(self).__name__}"') def ack(self) -> None: raise NotImplementedError(f'method acknowledge must be specified for class "{type(self).__name__}"')
class Unibrokermessagemanager: def reject(self) -> None: raise not_implemented_error(f'method reject must be specified for class "{type(self).__name__}"') def ack(self) -> None: raise not_implemented_error(f'method acknowledge must be specified for class "{type(self).__name__}"')
__all__ = ( "Node", "DefinitionNode", "ExecutableDefinitionNode", "TypeSystemDefinitionNode", "TypeSystemExtensionNode", "TypeDefinitionNode", "TypeExtensionNode", "SelectionNode", "ValueNode", "TypeNode", ) class Node: __slots__ = () class DefinitionNode(Node): __slots__ = () class ExecutableDefinitionNode(DefinitionNode): __slots__ = () class TypeSystemDefinitionNode(DefinitionNode): __slots__ = () class TypeSystemExtensionNode(DefinitionNode): __slots__ = () class TypeDefinitionNode(TypeSystemDefinitionNode): __slots__ = () class TypeExtensionNode(TypeSystemExtensionNode): __slots__ = () class SelectionNode(Node): __slots__ = () class ValueNode(Node): __slots__ = () class TypeNode(Node): __slots__ = ()
__all__ = ('Node', 'DefinitionNode', 'ExecutableDefinitionNode', 'TypeSystemDefinitionNode', 'TypeSystemExtensionNode', 'TypeDefinitionNode', 'TypeExtensionNode', 'SelectionNode', 'ValueNode', 'TypeNode') class Node: __slots__ = () class Definitionnode(Node): __slots__ = () class Executabledefinitionnode(DefinitionNode): __slots__ = () class Typesystemdefinitionnode(DefinitionNode): __slots__ = () class Typesystemextensionnode(DefinitionNode): __slots__ = () class Typedefinitionnode(TypeSystemDefinitionNode): __slots__ = () class Typeextensionnode(TypeSystemExtensionNode): __slots__ = () class Selectionnode(Node): __slots__ = () class Valuenode(Node): __slots__ = () class Typenode(Node): __slots__ = ()
class Sort: col_id: str sort: str def __init__(self, col_id, sort): self.col_id = col_id self.sort = sort @staticmethod def from_json(json: dict): if not json: raise Exception('Error. Sort was not defined but should be.') sort = Sort() # colId is required. if 'colId' in json: sort.col_id = json['colId'] else: raise Exception('Error. json.colId was not defined.') # sort is required. if 'sort' in json: sort.sort = json['sort'] else: raise Exception('Error. json.sort was not defined.') return sort def to_json(self): return { 'colId': self.col_id, 'sort': self.sort }
class Sort: col_id: str sort: str def __init__(self, col_id, sort): self.col_id = col_id self.sort = sort @staticmethod def from_json(json: dict): if not json: raise exception('Error. Sort was not defined but should be.') sort = sort() if 'colId' in json: sort.col_id = json['colId'] else: raise exception('Error. json.colId was not defined.') if 'sort' in json: sort.sort = json['sort'] else: raise exception('Error. json.sort was not defined.') return sort def to_json(self): return {'colId': self.col_id, 'sort': self.sort}
ANIMALS = [ "aardvark", "aardwolf", "albatross", "alligator", "alpaca", "amphibian", "anaconda", "angelfish", "anglerfish", "ant", "anteater", "antelope", "antlion", "ape", "aphid", "armadillo", "asp", "baboon", "badger", "bandicoot", "barnacle", "barracuda", "basilisk", "bass", "bat", "bear", "beaver", "bedbug", "bee", "beetle", "bird", "bison", "blackbird", "boa", "boar", "bobcat", "bobolink", "bonobo", "booby", "bovid", "bug", "butterfly", "buzzard", "camel", "canid", "canidae", "capybara", "cardinal", "caribou", "carp", "cat", "caterpillar", "catfish", "catshark", "cattle", "centipede", "cephalopod", "chameleon", "cheetah", "chickadee", "chicken", "chimpanzee", "chinchilla", "chipmunk", "cicada", "clam", "clownfish", "cobra", "cockroach", "cod", "condor", "constrictor", "coral", "cougar", "cow", "coyote", "crab", "crane", "crawdad", "crayfish", "cricket", "crocodile", "crow", "cuckoo", "damselfly", "deer", "dingo", "dinosaur", "dog", "dolphin", "dormouse", "dove", "dragon", "dragonfly", "duck", "eagle", "earthworm", "earwig", "echidna", "eel", "egret", "elephant", "elk", "emu", "ermine", "falcon", "felidae", "ferret", "finch", "firefly", "fish", "flamingo", "flea", "fly", "flyingfish", "fowl", "fox", "frog", "galliform", "gamefowl", "gayal", "gazelle", "gecko", "gerbil", "gibbon", "giraffe", "goat", "goldfish", "goose", "gopher", "gorilla", "grasshopper", "grouse", "guan", "guanaco", "guineafowl", "gull", "guppy", "haddock", "halibut", "hamster", "hare", "harrier", "hawk", "hedgehog", "heron", "herring", "hippopotamus", "hookworm", "hornet", "horse", "hoverfly", "hummingbird", "hyena", "iguana", "impala", "jackal", "jaguar", "jay", "jellyfish", "junglefowl", "kangaroo", "kingfisher", "kite", "kiwi", "koala", "koi", "krill", "ladybug", "lamprey", "landfowl", "lark", "leech", "lemming", "lemur", "leopard", "leopon", "limpet", "lion", "lizard", "llama", "lobster", "locust", "loon", "louse", "lungfish", "lynx", "macaw", "mackerel", "magpie", "mammal", "manatee", "mandrill", "marlin", "marmoset", "marmot", "marsupial", "marten", "mastodon", "meadowlark", "meerkat", "mink", "minnow", "mite", "mockingbird", "mole", "mollusk", "mongoose", "moose", "mosquito", "moth", "mouse", "mule", "muskox", "narwhal", "newt", "nightingale", "ocelot", "octopus", "opossum", "orangutan", "orca", "ostrich", "otter", "owl", "ox", "panda", "panther", "parakeet", "parrot", "parrotfish", "partridge", "peacock", "peafowl", "pelican", "penguin", "perch", "pheasant", "pigeon", "pike", "pinniped", "piranha", "planarian", "platypus", "pony", "porcupine", "porpoise", "possum", "prawn", "primate", "ptarmigan", "puffin", "puma", "python", "quail", "quelea", "quokka", "rabbit", "raccoon", "rat", "rattlesnake", "raven", "reindeer", "reptile", "rhinoceros", "roadrunner", "rodent", "rook", "rooster", "roundworm", "sailfish", "salamander", "salmon", "sawfish", "scallop", "scorpion", "seahorse", "shark", "sheep", "shrew", "shrimp", "silkworm", "silverfish", "skink", "skunk", "sloth", "slug", "smelt", "snail", "snake", "snipe", "sole", "sparrow", "spider", "spoonbill", "squid", "squirrel", "starfish", "stingray", "stoat", "stork", "sturgeon", "swallow", "swan", "swift", "swordfish", "swordtail", "tahr", "takin", "tapir", "tarantula", "tarsier", "termite", "tern", "thrush", "tick", "tiger", "tiglon", "toad", "tortoise", "toucan", "trout", "tuna", "turkey", "turtle", "tyrannosaurus", "unicorn", "urial", "vicuna", "viper", "vole", "vulture", "wallaby", "walrus", "warbler", "wasp", "weasel", "whale", "whippet", "whitefish", "wildcat", "wildebeest", "wildfowl", "wolf", "wolverine", "wombat", "woodpecker", "worm", "wren", "xerinae", "yak", "zebra", ]
animals = ['aardvark', 'aardwolf', 'albatross', 'alligator', 'alpaca', 'amphibian', 'anaconda', 'angelfish', 'anglerfish', 'ant', 'anteater', 'antelope', 'antlion', 'ape', 'aphid', 'armadillo', 'asp', 'baboon', 'badger', 'bandicoot', 'barnacle', 'barracuda', 'basilisk', 'bass', 'bat', 'bear', 'beaver', 'bedbug', 'bee', 'beetle', 'bird', 'bison', 'blackbird', 'boa', 'boar', 'bobcat', 'bobolink', 'bonobo', 'booby', 'bovid', 'bug', 'butterfly', 'buzzard', 'camel', 'canid', 'canidae', 'capybara', 'cardinal', 'caribou', 'carp', 'cat', 'caterpillar', 'catfish', 'catshark', 'cattle', 'centipede', 'cephalopod', 'chameleon', 'cheetah', 'chickadee', 'chicken', 'chimpanzee', 'chinchilla', 'chipmunk', 'cicada', 'clam', 'clownfish', 'cobra', 'cockroach', 'cod', 'condor', 'constrictor', 'coral', 'cougar', 'cow', 'coyote', 'crab', 'crane', 'crawdad', 'crayfish', 'cricket', 'crocodile', 'crow', 'cuckoo', 'damselfly', 'deer', 'dingo', 'dinosaur', 'dog', 'dolphin', 'dormouse', 'dove', 'dragon', 'dragonfly', 'duck', 'eagle', 'earthworm', 'earwig', 'echidna', 'eel', 'egret', 'elephant', 'elk', 'emu', 'ermine', 'falcon', 'felidae', 'ferret', 'finch', 'firefly', 'fish', 'flamingo', 'flea', 'fly', 'flyingfish', 'fowl', 'fox', 'frog', 'galliform', 'gamefowl', 'gayal', 'gazelle', 'gecko', 'gerbil', 'gibbon', 'giraffe', 'goat', 'goldfish', 'goose', 'gopher', 'gorilla', 'grasshopper', 'grouse', 'guan', 'guanaco', 'guineafowl', 'gull', 'guppy', 'haddock', 'halibut', 'hamster', 'hare', 'harrier', 'hawk', 'hedgehog', 'heron', 'herring', 'hippopotamus', 'hookworm', 'hornet', 'horse', 'hoverfly', 'hummingbird', 'hyena', 'iguana', 'impala', 'jackal', 'jaguar', 'jay', 'jellyfish', 'junglefowl', 'kangaroo', 'kingfisher', 'kite', 'kiwi', 'koala', 'koi', 'krill', 'ladybug', 'lamprey', 'landfowl', 'lark', 'leech', 'lemming', 'lemur', 'leopard', 'leopon', 'limpet', 'lion', 'lizard', 'llama', 'lobster', 'locust', 'loon', 'louse', 'lungfish', 'lynx', 'macaw', 'mackerel', 'magpie', 'mammal', 'manatee', 'mandrill', 'marlin', 'marmoset', 'marmot', 'marsupial', 'marten', 'mastodon', 'meadowlark', 'meerkat', 'mink', 'minnow', 'mite', 'mockingbird', 'mole', 'mollusk', 'mongoose', 'moose', 'mosquito', 'moth', 'mouse', 'mule', 'muskox', 'narwhal', 'newt', 'nightingale', 'ocelot', 'octopus', 'opossum', 'orangutan', 'orca', 'ostrich', 'otter', 'owl', 'ox', 'panda', 'panther', 'parakeet', 'parrot', 'parrotfish', 'partridge', 'peacock', 'peafowl', 'pelican', 'penguin', 'perch', 'pheasant', 'pigeon', 'pike', 'pinniped', 'piranha', 'planarian', 'platypus', 'pony', 'porcupine', 'porpoise', 'possum', 'prawn', 'primate', 'ptarmigan', 'puffin', 'puma', 'python', 'quail', 'quelea', 'quokka', 'rabbit', 'raccoon', 'rat', 'rattlesnake', 'raven', 'reindeer', 'reptile', 'rhinoceros', 'roadrunner', 'rodent', 'rook', 'rooster', 'roundworm', 'sailfish', 'salamander', 'salmon', 'sawfish', 'scallop', 'scorpion', 'seahorse', 'shark', 'sheep', 'shrew', 'shrimp', 'silkworm', 'silverfish', 'skink', 'skunk', 'sloth', 'slug', 'smelt', 'snail', 'snake', 'snipe', 'sole', 'sparrow', 'spider', 'spoonbill', 'squid', 'squirrel', 'starfish', 'stingray', 'stoat', 'stork', 'sturgeon', 'swallow', 'swan', 'swift', 'swordfish', 'swordtail', 'tahr', 'takin', 'tapir', 'tarantula', 'tarsier', 'termite', 'tern', 'thrush', 'tick', 'tiger', 'tiglon', 'toad', 'tortoise', 'toucan', 'trout', 'tuna', 'turkey', 'turtle', 'tyrannosaurus', 'unicorn', 'urial', 'vicuna', 'viper', 'vole', 'vulture', 'wallaby', 'walrus', 'warbler', 'wasp', 'weasel', 'whale', 'whippet', 'whitefish', 'wildcat', 'wildebeest', 'wildfowl', 'wolf', 'wolverine', 'wombat', 'woodpecker', 'worm', 'wren', 'xerinae', 'yak', 'zebra']
# Name of the campaign CampaignName = 'iview-campaign' # Name of the parser module. The parser module must be # in the chromosome/parsers directory. Parser = 'PNG' # The path of the initial corpus InitialPopulation = 'C:\\tmp\\png' # The fitness algorithms that will be used by Chronzon # and the weight of each one. Currently, two algorithms # are implemented, the BasicBlockCoverage and CodeCommonality. FitnessAlgorithms = { 'BasicBlockCoverage': 0.5, 'CodeCommonality': 0.3 } # A tuple with the Recombinators that will be used during the fuzzing. # Users are encouraged to comment out the algorithms that they think # they are not effective when fuzzing a specific target format. However, # Choronzon has an internal evaluation system in order to use more often # the effective algorithms. Recombinators = ( 'AdditiveSimilarGeneCrossOver', 'DuplicateGeneRecombinator', 'RemoveGeneRecombinator', 'RemoveGeneRecombinator', 'ShuffleSiblings', 'ParentChildrenSwap', 'SimilarGeneSwapRecombinator', 'RandomGeneSwapRecombinator', 'RandomGeneInsertRecombinator', ) # A tuple with the Mutators that will be used during the fuzzing. Mutators = ( 'RandomByteMutator', 'AddRandomData', 'RandomByteMutator', 'RemoveByte', 'SwapAdjacentLines', 'SwapLines', 'RepeatLine', 'RemoveLines', 'QuotedTextualNumberMutator', 'PurgeMutator', 'SwapWord', 'SwapDword', ) # If KeepGenerations is True the seedfiles of each generation will be stored # in the campaign directory. Keep in mind though, that this may lead to run out of # free space, if the fuzzer runs of a long time. KeepGenerations = True # The name of the disassembler module that will be used. # Currently, only IDA is supported. Disassembler = 'IDADisassembler' DisassemblerPath = 'C:\\Program Files (x86)\\IDA 6.9' # The command that will be executed to test the target application. # Note that %s will be replaced by the fuzzed file. Command = '\"C:\\Program Files\\IrfanView\\i_view64.exe\" %s' # A tuple with the modules that will be instrumented in order to collect # stats to calculate the fitness. Full path of the modules is required. # Please note, that Whitelist must be a tuple even there is only one module. Whitelist = ('C:\\Program Files\\IrfanView\\i_view64.exe',)
campaign_name = 'iview-campaign' parser = 'PNG' initial_population = 'C:\\tmp\\png' fitness_algorithms = {'BasicBlockCoverage': 0.5, 'CodeCommonality': 0.3} recombinators = ('AdditiveSimilarGeneCrossOver', 'DuplicateGeneRecombinator', 'RemoveGeneRecombinator', 'RemoveGeneRecombinator', 'ShuffleSiblings', 'ParentChildrenSwap', 'SimilarGeneSwapRecombinator', 'RandomGeneSwapRecombinator', 'RandomGeneInsertRecombinator') mutators = ('RandomByteMutator', 'AddRandomData', 'RandomByteMutator', 'RemoveByte', 'SwapAdjacentLines', 'SwapLines', 'RepeatLine', 'RemoveLines', 'QuotedTextualNumberMutator', 'PurgeMutator', 'SwapWord', 'SwapDword') keep_generations = True disassembler = 'IDADisassembler' disassembler_path = 'C:\\Program Files (x86)\\IDA 6.9' command = '"C:\\Program Files\\IrfanView\\i_view64.exe" %s' whitelist = ('C:\\Program Files\\IrfanView\\i_view64.exe',)
# https://www.acmicpc.net/problem/10872 def n_fac(n): if n==1: return 1 else: return n * n_fac(n-1) n = int(input()) if n == 0: print(1) else: print(n_fac(n))
def n_fac(n): if n == 1: return 1 else: return n * n_fac(n - 1) n = int(input()) if n == 0: print(1) else: print(n_fac(n))
class TestRequest_certs(): def test_request_certs(self): return
class Testrequest_Certs: def test_request_certs(self): return
class Solution: def removeDuplicateLetters(self, s: str) -> str: dic = {} for char in s: dic[char] = dic.get(char,0)+1 res = [] for char in s: dic[char] -= 1 if char not in res: while res and char<res[-1] and dic[res[-1]]>0: res.pop() res.append(char) return ''.join(res)
class Solution: def remove_duplicate_letters(self, s: str) -> str: dic = {} for char in s: dic[char] = dic.get(char, 0) + 1 res = [] for char in s: dic[char] -= 1 if char not in res: while res and char < res[-1] and (dic[res[-1]] > 0): res.pop() res.append(char) return ''.join(res)
VERSION_NAME = "tmtccmd" VERSION_MAJOR = 1 VERSION_MINOR = 10 VERSION_REVISION = 2 # I think this needs to be in string representation to be parsed so we can't # use a formatted string here. __version__ = "1.10.2"
version_name = 'tmtccmd' version_major = 1 version_minor = 10 version_revision = 2 __version__ = '1.10.2'
def caesar_encrypt(word,n): c = '' for i in word: if (not i.isalpha()): c += i elif (i.isupper()): c += chr((ord(i) + n-65) % 26 + 65) else: c += chr((ord(i) + n - 97) % 26 + 97) return c def caesar_decrypt(word,n): c = '' for i in word: if (not i.isalpha()): c += i elif (i.isupper()): c += chr((ord(i) - n -65) % 26 + 65) # Encrypt lowercase characters else: c += chr((ord(i) - n - 97) % 26 + 97) return c plain = input() n=int(input()) cipher = caesar_encrypt(plain,n) print(cipher) decipher = caesar_decrypt(cipher,n) print(decipher)
def caesar_encrypt(word, n): c = '' for i in word: if not i.isalpha(): c += i elif i.isupper(): c += chr((ord(i) + n - 65) % 26 + 65) else: c += chr((ord(i) + n - 97) % 26 + 97) return c def caesar_decrypt(word, n): c = '' for i in word: if not i.isalpha(): c += i elif i.isupper(): c += chr((ord(i) - n - 65) % 26 + 65) else: c += chr((ord(i) - n - 97) % 26 + 97) return c plain = input() n = int(input()) cipher = caesar_encrypt(plain, n) print(cipher) decipher = caesar_decrypt(cipher, n) print(decipher)
def parOuImpar(n=0): if n % 2 ==0: return True else: return False num = int(input("Digite um numero: ")) if parOuImpar(num): print("E par!") else: print("Nao e par!")
def par_ou_impar(n=0): if n % 2 == 0: return True else: return False num = int(input('Digite um numero: ')) if par_ou_impar(num): print('E par!') else: print('Nao e par!')
# Subtract numbers module class Calculate: def sub(a, b): """Substract two numbers""" return a - b def add(a, b): """Add two numbers""" return a + b def mult(a, b): """Product of two numbers""" return a * b def div(a, b): """Divide two numbers""" return a / b
class Calculate: def sub(a, b): """Substract two numbers""" return a - b def add(a, b): """Add two numbers""" return a + b def mult(a, b): """Product of two numbers""" return a * b def div(a, b): """Divide two numbers""" return a / b
inputs = [1, 2, 3, 2.5] weights1 = [0.2, 0.8, -0.5, 1.0] weights2 = [0.5, -0.91, 0.26, -0.5] weights3 = [-0.26, -0.27, 0.17, 0.87] bias1 = 2 bias2 = 3 bias3 = 0.5 output = [ inputs[0]*weights1[0] + inputs[1]*weights1[1] + inputs[2]*weights1[2] + inputs[3]*weights1[3] + bias1, inputs[0]*weights2[0] + inputs[1]*weights2[1] + inputs[2]*weights2[2] + inputs[3]*weights2[3] + bias2, inputs[0]*weights3[0] + inputs[1]*weights3[1] + inputs[2]*weights3[2] + inputs[3]*weights3[3] + bias3 ] print(output)
inputs = [1, 2, 3, 2.5] weights1 = [0.2, 0.8, -0.5, 1.0] weights2 = [0.5, -0.91, 0.26, -0.5] weights3 = [-0.26, -0.27, 0.17, 0.87] bias1 = 2 bias2 = 3 bias3 = 0.5 output = [inputs[0] * weights1[0] + inputs[1] * weights1[1] + inputs[2] * weights1[2] + inputs[3] * weights1[3] + bias1, inputs[0] * weights2[0] + inputs[1] * weights2[1] + inputs[2] * weights2[2] + inputs[3] * weights2[3] + bias2, inputs[0] * weights3[0] + inputs[1] * weights3[1] + inputs[2] * weights3[2] + inputs[3] * weights3[3] + bias3] print(output)
x=[] for i in range(4): x.append(int(input())) x.sort() ans=sum(x[1:]) x=[] for i in range(2): x.append(int(input())) ans+=max(x) print(ans)
x = [] for i in range(4): x.append(int(input())) x.sort() ans = sum(x[1:]) x = [] for i in range(2): x.append(int(input())) ans += max(x) print(ans)
#https://codeforces.com/problemset/problem/588/A n = int(input()) a, p = map(int, input().split(" ")) mm = a * p # minimum money mp = p # minimum price for i in range(n - 1): a, p = map(int, input().split(" ")) if p < mp: mp = p mm += a * mp print(mm)
n = int(input()) (a, p) = map(int, input().split(' ')) mm = a * p mp = p for i in range(n - 1): (a, p) = map(int, input().split(' ')) if p < mp: mp = p mm += a * mp print(mm)
#42) Coded triangle numbers #The nth term of the sequence of triangle numbers is given by, tn = (1/2)*n*(n+1); so the first ten triangle numbers are: #1, 3, 6, 10, 15, 21, 28, 36, 45, 55, ... #By converting each letter in a word to a number corresponding to its alphabetical position and adding these values we form a word value. For example, the word value for SKY is 19 + 11 + 25 = 55 = t10. If the word value is a triangle number then we shall call the word a triangle word. #Using words.txt (right click and 'Save Link/Target As...'), a 16K text file containing nearly two-thousand common English words, how many are triangle words? #%% Solution def triangle_nums(x): n = 1 while int(1/2*n*(n+1)) <= x: yield int(1/2*n*(n+1)) n += 1 with open("p042_words.txt", mode='r') as doc: list_words = doc.read().replace('"', '').split(',') list_values = [sum([ord(x)-64 for x in word]) for word in list_words] list_triangle = [x for x in list_values if x in triangle_nums(max(list_values))] len(list_triangle)
def triangle_nums(x): n = 1 while int(1 / 2 * n * (n + 1)) <= x: yield int(1 / 2 * n * (n + 1)) n += 1 with open('p042_words.txt', mode='r') as doc: list_words = doc.read().replace('"', '').split(',') list_values = [sum([ord(x) - 64 for x in word]) for word in list_words] list_triangle = [x for x in list_values if x in triangle_nums(max(list_values))] len(list_triangle)
class Solution: def bagOfTokensScore(self, tokens: List[int], P: int) -> int: tokens.sort() tokens, maxScore, currentScore = deque(tokens), 0, 0 while tokens and (P >= tokens[0] or currentScore): while tokens and P >= tokens[0]: P -= tokens.popleft() currentScore += 1 maxScore = max(maxScore, currentScore) if tokens and currentScore: P += tokens.pop() currentScore -= 1 return maxScore
class Solution: def bag_of_tokens_score(self, tokens: List[int], P: int) -> int: tokens.sort() (tokens, max_score, current_score) = (deque(tokens), 0, 0) while tokens and (P >= tokens[0] or currentScore): while tokens and P >= tokens[0]: p -= tokens.popleft() current_score += 1 max_score = max(maxScore, currentScore) if tokens and currentScore: p += tokens.pop() current_score -= 1 return maxScore
# # PySNMP MIB module CISCO-STACKWISE-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-STACKWISE-MIB # Produced by pysmi-0.3.4 at Wed May 1 12:13:00 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueRangeConstraint, ConstraintsUnion, SingleValueConstraint, ConstraintsIntersection, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ConstraintsUnion", "SingleValueConstraint", "ConstraintsIntersection", "ValueSizeConstraint") ciscoMgmt, = mibBuilder.importSymbols("CISCO-SMI", "ciscoMgmt") EntPhysicalIndexOrZero, = mibBuilder.importSymbols("CISCO-TC", "EntPhysicalIndexOrZero") entPhysicalIndex, = mibBuilder.importSymbols("ENTITY-MIB", "entPhysicalIndex") ifIndex, = mibBuilder.importSymbols("IF-MIB", "ifIndex") SnmpAdminString, = mibBuilder.importSymbols("SNMP-FRAMEWORK-MIB", "SnmpAdminString") NotificationGroup, ObjectGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ObjectGroup", "ModuleCompliance") NotificationType, Integer32, ObjectIdentity, TimeTicks, Counter32, MibIdentifier, Gauge32, MibScalar, MibTable, MibTableRow, MibTableColumn, iso, Bits, Counter64, ModuleIdentity, IpAddress, Unsigned32 = mibBuilder.importSymbols("SNMPv2-SMI", "NotificationType", "Integer32", "ObjectIdentity", "TimeTicks", "Counter32", "MibIdentifier", "Gauge32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "iso", "Bits", "Counter64", "ModuleIdentity", "IpAddress", "Unsigned32") DisplayString, TextualConvention, TruthValue, MacAddress = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention", "TruthValue", "MacAddress") ciscoStackWiseMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 9, 9, 500)) ciscoStackWiseMIB.setRevisions(('2016-04-16 00:00', '2015-11-24 00:00', '2011-12-12 00:00', '2010-02-01 00:00', '2008-06-10 00:00', '2005-10-12 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: ciscoStackWiseMIB.setRevisionsDescriptions(('Added following objects in cswGlobals - cswStackDomainNum - cswStackType - cswStackBandWidth Created following tables - cswDistrStackLinkInfoTable -cswDistrStackPhyPortInfoTable Added cswStatusGroupRev2 Deprecated cswStatusGroupRev1 Added cswDistrStackLinkStatusGroup Added cswDistrStackPhyPortStatusGroup Added cswStackWiseMIBComplianceRev4 MIB COMPLIANCE Deprecated cswStackWiseMIBComplianceRev3 MIB COMPLIANCE.', 'Added following Objects in cswSwitchInfoTable - cswSwitchPowerAllocated Added following OBJECT-GROUP - cswStackPowerAllocatedGroup Deprecated cswStackWiseMIBComplianceRev2 MODULE-COMPLIANCE. Added cswStackWiseMIBComplianceRev3 MODULE-COMPLIANCE.', "Modified 'cswSwitchRole' object.", 'Added cswStackPowerStatusGroup, cswStackPowerSwitchStatusGroup, cswStackPowerPortStatusGroup, cswStatusGroupRev1 and cswStackPowerNotificationGroup. Deprecated cswStackWiseMIBCompliance compliance statement. Added cswStackWiseMIBComplianceRev1 compliance statement. Deprecated cswStatusGroup because we deprecated cswEnableStackNotifications', "Modified 'cswSwitchState' object.", 'Initial version of this MIB module.',)) if mibBuilder.loadTexts: ciscoStackWiseMIB.setLastUpdated('201604160000Z') if mibBuilder.loadTexts: ciscoStackWiseMIB.setOrganization('Cisco Systems, Inc.') if mibBuilder.loadTexts: ciscoStackWiseMIB.setContactInfo('Cisco Systems Customer Service Postal: 170 W Tasman Drive San Jose, CA 95134 Tel: +1 800 553-NETS E-mail: cs-dsbu@cisco.com') if mibBuilder.loadTexts: ciscoStackWiseMIB.setDescription('This MIB module contain a collection of managed objects that apply to network devices supporting the Cisco StackWise(TM) technology. The StackWise technology provides a method for collectively utilizing a stack of switches to create a single switching unit. The data stack is used for switching data packets and, in power stack, switches are connected by special stack power cables to share power. Moreover, stackwise is the concept for combining multiple systems to give an impression of a single system so that is why both power stack and data stack are supported by single MIB. Terminology: Stack - A collection of switches connected by the Cisco StackWise technology. Master - The switch that is managing the stack. Member - A switch in the stack that is NOT the stack master. Ring - Components that makes up the connections between the switches in order to create a stack. Stackport - A special physical connector used by the ring. It is possible for a switch have more than one stackport. SDM - Switch Database Management. Stack Power - A collection of switches connected by special stack power cables to share the power of inter-connected power supplies across all switches requiring power. Stack Power is managed by a single data stack. Jack-Jack - It is a device that provides the Power Shelf capabilities required for Stack Power on the high-end. POE - Power Over Ethernet FEP - Front End Power Supply SOC - Sustained Overload Condition GLS - Graceful Load Shedding ILS - Immediate Load Shedding SRLS - System Ring Load Shedding SSLS - System Star Load Shedding') class CswPowerStackMode(TextualConvention, Integer32): description = 'This textual convention is used to describe the mode of the power stack. Since the power stack could only run in either power sharing or redundant mode so this TC will also have only following valid values, powerSharing(1) :When a power stack is running in power sharing mode then all the power supplies in the power stack contributes towards the global power budget of the stack. redundant(2) :If the user wants the power stack to run in redundant mode then we will take the capacity of the largest power supply in the power stack out of power stack global power budget pool. powerSharingStrict(3):This mode is same as power sharing mode but, in this mode, the available power will always be more than the used power. redundantStrict(4) :This mode is same as redundant mode but, in this mode, the available power will always be more than the used power.' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4)) namedValues = NamedValues(("powerSharing", 1), ("redundant", 2), ("powerSharingStrict", 3), ("redundantStrict", 4)) class CswPowerStackType(TextualConvention, Integer32): description = 'This textual conventions is used to describe the type of the power stack. Since the power stack could only be configured in a ring or star topology so this TC will have only following valid values, ring(1): The power stack has been formed by connecting the switches in ring topology. star(2): The power stack has been formed by connecting the switches in star topology.' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2)) namedValues = NamedValues(("ring", 1), ("star", 2)) ciscoStackWiseMIBNotifs = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 500, 0)) ciscoStackWiseMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 500, 1)) ciscoStackWiseMIBConform = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 500, 2)) cswGlobals = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 1)) cswStackInfo = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2)) cswStackPowerInfo = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 3)) class CswSwitchNumber(TextualConvention, Unsigned32): description = 'A unique value, greater than zero, for each switch in a group of stackable switches.' status = 'current' displayHint = 'd' subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(1, 4294967295) class CswSwitchNumberOrZero(TextualConvention, Unsigned32): description = 'A unique value, greater than or equal to zero, for each switch in a group of stackable switches. A value of zero means that the switch number can not be determined. The value of zero is not unique.' status = 'current' displayHint = 'd' subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(0, 4294967295) class CswSwitchPriority(TextualConvention, Unsigned32): description = 'A value, greater than or equal to zero, that defines the priority of a switch in a group of stackable switches. The higher the value, the higher the priority.' status = 'current' displayHint = 'd' subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(0, 4294967295) cswMaxSwitchNum = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 1, 1), CswSwitchNumber()).setMaxAccess("readonly") if mibBuilder.loadTexts: cswMaxSwitchNum.setStatus('current') if mibBuilder.loadTexts: cswMaxSwitchNum.setDescription('The maximum number of switches that can be configured on this stack. This is also the maximum value that can be set by the cswSwitchNumNextReload object.') cswMaxSwitchConfigPriority = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 1, 2), CswSwitchPriority()).setMaxAccess("readonly") if mibBuilder.loadTexts: cswMaxSwitchConfigPriority.setStatus('current') if mibBuilder.loadTexts: cswMaxSwitchConfigPriority.setDescription('The maximum configurable priority for a switch in this stack. Highest value equals highest priority. This is the highest value that can be set by the cswSwitchSwPriority object.') cswRingRedundant = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 1, 3), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: cswRingRedundant.setStatus('current') if mibBuilder.loadTexts: cswRingRedundant.setDescription("A value of 'true' is returned when the stackports are connected in such a way that it forms a redundant ring.") cswStackPowerInfoTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 3, 1), ) if mibBuilder.loadTexts: cswStackPowerInfoTable.setStatus('current') if mibBuilder.loadTexts: cswStackPowerInfoTable.setDescription('This table holds the information about all the power stacks in a single data stack.') cswStackPowerInfoEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 3, 1, 1), ).setIndexNames((0, "CISCO-STACKWISE-MIB", "cswStackPowerStackNumber")) if mibBuilder.loadTexts: cswStackPowerInfoEntry.setStatus('current') if mibBuilder.loadTexts: cswStackPowerInfoEntry.setDescription('An entry in the cswStackPowerInfoTable for each of the power stacks in a single data stack. This entry contains information regarding the power stack.') cswStackPowerStackNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 3, 1, 1, 1), Unsigned32()) if mibBuilder.loadTexts: cswStackPowerStackNumber.setStatus('current') if mibBuilder.loadTexts: cswStackPowerStackNumber.setDescription('A unique value, greater than zero, to identify a power stack.') cswStackPowerMode = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 3, 1, 1, 2), CswPowerStackMode()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cswStackPowerMode.setStatus('current') if mibBuilder.loadTexts: cswStackPowerMode.setDescription('This object specifies the information about the mode of the power stack. Power-sharing mode: All of the input power can be used for loads, and the total available power appears as one huge power supply. The power budget includes all power from all supplies. No power is set aside for power supply failures, so if a power supply fails, load shedding (shutting down of powered devices or switches) might occur. This is the default. Redundant mode: The largest power supply is removed from the power pool to be used as backup power in case one of the other power supplies fails. The available power budget is the total power minus the largest power supply. This reduces the available power in the pool for switches and powered devices to draw from, but in case of a failure or an extreme power load, there is less chance of having to shut down switches or powered devices. This is the recommended operating mode if your system has enough power. In addition, you can configure each mode to run a strict power budget or a non-strict (loose) power budget. If the mode is strict, the stack power needs cannot exceed the available power. When the power budgeted to devices reaches the maximum available PoE power, power is denied to the next device seeking power. In this mode the stack never goes into an over-budgeted power mode. When the mode is non-strict, budgeted power is allowed to exceed available power. This is normally not a problem because most devices do not run at full power and the chances of all powered devices in the stack requiring maximum power at the same time is small.') cswStackPowerMasterMacAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 3, 1, 1, 3), MacAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: cswStackPowerMasterMacAddress.setStatus('current') if mibBuilder.loadTexts: cswStackPowerMasterMacAddress.setDescription('This object indicates the Mac address of the power stack master.') cswStackPowerMasterSwitchNum = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 3, 1, 1, 4), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cswStackPowerMasterSwitchNum.setStatus('current') if mibBuilder.loadTexts: cswStackPowerMasterSwitchNum.setDescription('This object indicates the switch number of the power stack master. The value of this object would be zero if the power stack master is not part of this data stack.') cswStackPowerNumMembers = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 3, 1, 1, 5), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cswStackPowerNumMembers.setStatus('current') if mibBuilder.loadTexts: cswStackPowerNumMembers.setDescription('This object indicates the number of members in the power stack.') cswStackPowerType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 3, 1, 1, 6), CswPowerStackType()).setMaxAccess("readonly") if mibBuilder.loadTexts: cswStackPowerType.setStatus('current') if mibBuilder.loadTexts: cswStackPowerType.setDescription('This object indicates the topology of the power stack, that is, whether the switch is running in RING or STAR topology.') cswStackPowerName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 3, 1, 1, 7), SnmpAdminString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cswStackPowerName.setStatus('current') if mibBuilder.loadTexts: cswStackPowerName.setDescription('This object specifies a unique name of this power stack. A zero-length string indicates no name is assigned.') cswStackPowerPortInfoTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 3, 2), ) if mibBuilder.loadTexts: cswStackPowerPortInfoTable.setStatus('current') if mibBuilder.loadTexts: cswStackPowerPortInfoTable.setDescription('This table contains information about the stack power ports. There exists an entry in this table for each physical stack power port.') cswStackPowerPortInfoEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 3, 2, 1), ).setIndexNames((0, "ENTITY-MIB", "entPhysicalIndex"), (0, "CISCO-STACKWISE-MIB", "cswStackPowerPortIndex")) if mibBuilder.loadTexts: cswStackPowerPortInfoEntry.setStatus('current') if mibBuilder.loadTexts: cswStackPowerPortInfoEntry.setDescription('A conceptual row in the cswStackPowerPortInfoTable. This entry contains information about a power stack port.') cswStackPowerPortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 3, 2, 1, 1), Unsigned32()) if mibBuilder.loadTexts: cswStackPowerPortIndex.setStatus('current') if mibBuilder.loadTexts: cswStackPowerPortIndex.setDescription('A unique value, greater than zero, for each stack power port.') cswStackPowerPortOperStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 3, 2, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: cswStackPowerPortOperStatus.setStatus('current') if mibBuilder.loadTexts: cswStackPowerPortOperStatus.setDescription('This object is used to either set or unset the operational status of the stack port. This object will have following valid values, enabled(1) : The port is enabled disabled(2) : The port is forced down') cswStackPowerPortNeighborMacAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 3, 2, 1, 3), MacAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: cswStackPowerPortNeighborMacAddress.setStatus('current') if mibBuilder.loadTexts: cswStackPowerPortNeighborMacAddress.setDescription("This objects indicates the port neighbor's Mac Address.") cswStackPowerPortNeighborSwitchNum = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 3, 2, 1, 4), CswSwitchNumberOrZero()).setMaxAccess("readonly") if mibBuilder.loadTexts: cswStackPowerPortNeighborSwitchNum.setStatus('current') if mibBuilder.loadTexts: cswStackPowerPortNeighborSwitchNum.setDescription("This objects indicates the port neighbor's switch number. If either there is no switch connected or the neighbor is not Jack-Jack then the value of this object is going to be 0.") cswStackPowerPortLinkStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 3, 2, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("up", 1), ("down", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cswStackPowerPortLinkStatus.setStatus('current') if mibBuilder.loadTexts: cswStackPowerPortLinkStatus.setDescription('This object is used to describe the link status of the stack port. This object will have following valid values, up(1) : The port is connected and operational down(2): The port is either forced down or not connected') cswStackPowerPortOverCurrentThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 3, 2, 1, 6), Unsigned32()).setUnits('Amperes').setMaxAccess("readwrite") if mibBuilder.loadTexts: cswStackPowerPortOverCurrentThreshold.setStatus('current') if mibBuilder.loadTexts: cswStackPowerPortOverCurrentThreshold.setDescription('This object is used to retrieve the over current threshold. The stack power cables are limited to carry current up to the limit retrieved by this object. The stack power cables would not be able to function properly if either the input or output current goes beyond the threshold retrieved by this object.') cswStackPowerPortName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 3, 2, 1, 7), SnmpAdminString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cswStackPowerPortName.setStatus('current') if mibBuilder.loadTexts: cswStackPowerPortName.setDescription('This object specifies a unique name of the stack power port as shown on the face plate of the system. A zero-length string indicates no name is assigned.') cswEnableStackNotifications = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 1, 4), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cswEnableStackNotifications.setStatus('deprecated') if mibBuilder.loadTexts: cswEnableStackNotifications.setDescription("This object indicates whether the system generates the notifications defined in this MIB or not. A value of 'false' will prevent the notifications from being sent.") cswEnableIndividualStackNotifications = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 1, 5), Bits().clone(namedValues=NamedValues(("stackPortChange", 0), ("stackNewMaster", 1), ("stackMismatch", 2), ("stackRingRedundant", 3), ("stackNewMember", 4), ("stackMemberRemoved", 5), ("stackPowerLinkStatusChanged", 6), ("stackPowerPortOperStatusChanged", 7), ("stackPowerVersionMismatch", 8), ("stackPowerInvalidTopology", 9), ("stackPowerBudgetWarning", 10), ("stackPowerInvalidInputCurrent", 11), ("stackPowerInvalidOutputCurrent", 12), ("stackPowerUnderBudget", 13), ("stackPowerUnbalancedPowerSupplies", 14), ("stackPowerInsufficientPower", 15), ("stackPowerPriorityConflict", 16), ("stackPowerUnderVoltage", 17), ("stackPowerGLS", 18), ("stackPowerILS", 19), ("stackPowerSRLS", 20), ("stackPowerSSLS", 21), ("stackMemberToBeReloadedForUpgrade", 22)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: cswEnableIndividualStackNotifications.setStatus('current') if mibBuilder.loadTexts: cswEnableIndividualStackNotifications.setDescription('This object is used to enable/disable individual notifications defined in this MIB module. Turning on a particular bit would enable the corresponding trap and, similarly, turning off a particular bit would disable the corresponding trap. The following notifications are controlled by this object: stackPortChange(0): enables/disables cswStackPortChange notification. stackNewMaster(1): enables/disables cswStackNewMember notification. stackMismatch(2): enables/disables cswStackMismatch notification. stackRingRedundant(3): enables/disables cswStackRingRedundant notification. stackNewMember(4): enables/disables cswStackNewMember notification. stackMemberRemoved(5): enables/disables cswStackMemberRemoved notification. stackPowerLinkStatusChanged(6): enables/disables cswStackPowerPortLinkStatusChanged notification. stackPowerPortOperStatusChanged(7): enables/disables cswStackPowerPortOperStatusChanged notification. stackPowerVersionMismatch(8): enables/disables cswStackPowerVersionMismatch notification. stackPowerInvalidTopology(9): enables/disables cswStackPowerInvalidTopology notification stackPowerBudgetWarning(10): enables/disables cswStackPowerBudgetWarning notification. stackPowerInvalidInputCurrent(11): enables/disables cswStackPowerInvalidInputCurrent notification. stackPowerInvalidOutputCurrent(12): enables/disables cswStackPowerInvalidOutputCurrent notification. stackPowerUnderBudget(13): enables/disables cswStackPowerUnderBudget notification. stackPowerUnbalancedPowerSupplies(14): enables/disables cswStackPowerUnbalancedPowerSupplies notification. stackPowerInsufficientPower(15): enables/disables cswStackPowerInsufficientPower notification. stackPowerPriorityConflict(16): enables/disables cswStackPowerPriorityConflict notification. stackPowerUnderVoltage(17): enables/disables cswStackPowerUnderVoltage notification. stackPowerGLS(18): enables/disables cswStackPowerGLS notification. stackPowerILS(19): enables/disabled cswStackPowerILS notification. stackPowerSRLS(20): enables/disables cswStackPowerSRLS notification. stackPowerSSLS(21): enables/disables cswStackPowerSSLS notification. stackMemberToBeReloadedForUpgrade(22): enables/disables cswStackMemberToBeReloadedForUpgrade notification.') cswStackDomainNum = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 1, 6), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cswStackDomainNum.setStatus('current') if mibBuilder.loadTexts: cswStackDomainNum.setDescription('This object indicates distributed domain of the switch.Only Switches with the same domain number can be in the same dist ributed domain.0 means no switch domain configured.') cswStackType = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 1, 7), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cswStackType.setStatus('current') if mibBuilder.loadTexts: cswStackType.setDescription('This object indicates type of switch stack. value of Switch virtual domain determines if switch is distributed or conventional stack. 0 means stack is conventional back side stack.') cswStackBandWidth = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 1, 8), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cswStackBandWidth.setStatus('current') if mibBuilder.loadTexts: cswStackBandWidth.setDescription('This object indicates stack bandwidth.') cswSwitchInfoTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 1), ) if mibBuilder.loadTexts: cswSwitchInfoTable.setStatus('current') if mibBuilder.loadTexts: cswSwitchInfoTable.setDescription("This table contains information specific to switches in a stack. Every switch with an entry in the entPhysicalTable (ENTITY-MIB) whose entPhysicalClass is 'chassis' will have an entry in this table.") cswSwitchInfoEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 1, 1), ).setIndexNames((0, "ENTITY-MIB", "entPhysicalIndex")) if mibBuilder.loadTexts: cswSwitchInfoEntry.setStatus('current') if mibBuilder.loadTexts: cswSwitchInfoEntry.setDescription('A conceptual row in the cswSwitchInfoTable describing a switch information.') cswSwitchNumCurrent = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 1, 1, 1), CswSwitchNumber()).setMaxAccess("readonly") if mibBuilder.loadTexts: cswSwitchNumCurrent.setStatus('current') if mibBuilder.loadTexts: cswSwitchNumCurrent.setDescription("This object contains the current switch identification number. This number should match any logical labeling on the switch. For example, a switch whose interfaces are labeled 'interface #3' this value should be 3.") cswSwitchNumNextReload = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 1, 1, 2), CswSwitchNumberOrZero()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cswSwitchNumNextReload.setStatus('current') if mibBuilder.loadTexts: cswSwitchNumNextReload.setDescription("This object contains the cswSwitchNumCurrent to be used at next reload. The maximum value for this object is defined by the cswMaxSwitchNum object. Note: This object will contain 0 and cannot be set if the cswSwitchState value is other than 'ready'.") cswSwitchRole = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("master", 1), ("member", 2), ("notMember", 3), ("standby", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cswSwitchRole.setStatus('current') if mibBuilder.loadTexts: cswSwitchRole.setDescription('This object describes the function of the switch: master - stack master. member - active member of the stack. notMember - none-active stack member, see cswSwitchState for status. standby - stack standby switch.') cswSwitchSwPriority = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 1, 1, 4), CswSwitchPriority()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cswSwitchSwPriority.setStatus('current') if mibBuilder.loadTexts: cswSwitchSwPriority.setDescription("A number containing the priority of a switch. The switch with the highest priority will become the master. The maximum value for this object is defined by the cswMaxSwitchConfigPriority object. If after a reload the value of cswMaxSwitchConfigPriority changes to a smaller value, and the value of cswSwitchSwPriority has been previously set to a value greater or equal to the new cswMaxSwitchConfigPriority, then the SNMP agent must set cswSwitchSwPriority to the new cswMaxSwitchConfigPriority. Note: This object will contain the value of 0 if the cswSwitchState value is other than 'ready'.") cswSwitchHwPriority = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 1, 1, 5), CswSwitchPriority()).setMaxAccess("readonly") if mibBuilder.loadTexts: cswSwitchHwPriority.setStatus('current') if mibBuilder.loadTexts: cswSwitchHwPriority.setDescription("This object contains the hardware priority of a switch. If two or more entries in this table have the same cswSwitchSwPriority value during the master election time, the switch with the highest cswSwitchHwPriority will become the master. Note: This object will contain the value of 0 if the cswSwitchState value is other than 'ready'.") cswSwitchState = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11))).clone(namedValues=NamedValues(("waiting", 1), ("progressing", 2), ("added", 3), ("ready", 4), ("sdmMismatch", 5), ("verMismatch", 6), ("featureMismatch", 7), ("newMasterInit", 8), ("provisioned", 9), ("invalid", 10), ("removed", 11)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cswSwitchState.setStatus('current') if mibBuilder.loadTexts: cswSwitchState.setDescription("The current state of a switch: waiting - Waiting for a limited time on other switches in the stack to come online. progressing - Master election or mismatch checks in progress. added - The switch is added to the stack. ready - The switch is operational. sdmMismatch - The SDM template configured on the master is not supported by the new member. verMismatch - The operating system version running on the master is different from the operating system version running on this member. featureMismatch - Some of the features configured on the master are not supported on this member. newMasterInit - Waiting for the new master to finish initialization after master switchover (Master Re-Init). provisioned - The switch is not an active member of the stack. invalid - The switch's state machine is in an invalid state. removed - The switch is removed from the stack.") cswSwitchMacAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 1, 1, 7), MacAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: cswSwitchMacAddress.setStatus('current') if mibBuilder.loadTexts: cswSwitchMacAddress.setDescription("The MAC address of the switch. Note: This object will contain the value of 0000:0000:0000 if the cswSwitchState value is other than 'ready'.") cswSwitchSoftwareImage = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 1, 1, 8), SnmpAdminString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cswSwitchSoftwareImage.setStatus('current') if mibBuilder.loadTexts: cswSwitchSoftwareImage.setDescription("The software image type running on the switch. Note: This object will contain an empty string if the cswSwitchState value is other than 'ready'.") cswSwitchPowerBudget = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 1, 1, 9), Unsigned32()).setUnits('Watts').setMaxAccess("readonly") if mibBuilder.loadTexts: cswSwitchPowerBudget.setStatus('current') if mibBuilder.loadTexts: cswSwitchPowerBudget.setDescription('This object indicates the power budget of the switch.') cswSwitchPowerCommited = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 1, 1, 10), Unsigned32()).setUnits('Watts').setMaxAccess("readonly") if mibBuilder.loadTexts: cswSwitchPowerCommited.setStatus('current') if mibBuilder.loadTexts: cswSwitchPowerCommited.setDescription('This object indicates the power committed to the POE devices connected to the switch.') cswSwitchSystemPowerPriority = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 1, 1, 11), Unsigned32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cswSwitchSystemPowerPriority.setStatus('current') if mibBuilder.loadTexts: cswSwitchSystemPowerPriority.setDescription("This specifies the system's power priority. In case of a power failure then the system with the highest system priority will be brought down last.") cswSwitchPoeDevicesLowPriority = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 1, 1, 12), Unsigned32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cswSwitchPoeDevicesLowPriority.setStatus('current') if mibBuilder.loadTexts: cswSwitchPoeDevicesLowPriority.setDescription("This object specifies the priority of the system's low priority POE devices.") cswSwitchPoeDevicesHighPriority = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 1, 1, 13), Unsigned32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cswSwitchPoeDevicesHighPriority.setStatus('current') if mibBuilder.loadTexts: cswSwitchPoeDevicesHighPriority.setDescription("This object specifies the priority of the system's high priority POE devices. In order to avoid losing the high priority POE devices before the low priority POE devices, this object's value must be greater than value of cswSwitchPoeDevicesLowPriority.") cswSwitchPowerAllocated = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 1, 1, 14), Unsigned32()).setUnits('Watts').setMaxAccess("readonly") if mibBuilder.loadTexts: cswSwitchPowerAllocated.setStatus('current') if mibBuilder.loadTexts: cswSwitchPowerAllocated.setDescription('This object indicates the power committed to the POE devices connected to the switch.') cswStackPortInfoTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 2), ) if mibBuilder.loadTexts: cswStackPortInfoTable.setStatus('current') if mibBuilder.loadTexts: cswStackPortInfoTable.setDescription('This table contains stackport specific information. There exists an entry in this table for every physical stack port that have an entry in the ifTable (IF-MIB).') cswStackPortInfoEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 2, 1), ).setIndexNames((0, "IF-MIB", "ifIndex")) if mibBuilder.loadTexts: cswStackPortInfoEntry.setStatus('current') if mibBuilder.loadTexts: cswStackPortInfoEntry.setDescription('A conceptual row in the cswStackPortInfoTable. An entry contains information about a stackport.') cswStackPortOperStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 2, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("up", 1), ("down", 2), ("forcedDown", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cswStackPortOperStatus.setStatus('current') if mibBuilder.loadTexts: cswStackPortOperStatus.setDescription('The state of the stackport. up - Connected and operational. down - Not connected to a neighboring switch or administrative down. forcedDown - Shut down by stack manager due to mismatch or stackport errors.') cswStackPortNeighbor = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 2, 1, 2), EntPhysicalIndexOrZero()).setMaxAccess("readonly") if mibBuilder.loadTexts: cswStackPortNeighbor.setStatus('current') if mibBuilder.loadTexts: cswStackPortNeighbor.setDescription("This object contains the value of the entPhysicalIndex of the switch's chassis to which this stackport is connected to. If the stackport is not connected, the value 0 is returned.") cswDistrStackLinkInfoTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 3), ) if mibBuilder.loadTexts: cswDistrStackLinkInfoTable.setStatus('current') if mibBuilder.loadTexts: cswDistrStackLinkInfoTable.setDescription('Distributed Stack Link Information.') cswDistrStackLinkInfoEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 3, 1), ).setIndexNames((0, "ENTITY-MIB", "entPhysicalIndex"), (0, "CISCO-STACKWISE-MIB", "cswDSLindex")) if mibBuilder.loadTexts: cswDistrStackLinkInfoEntry.setStatus('current') if mibBuilder.loadTexts: cswDistrStackLinkInfoEntry.setDescription('An Entry containing information about DSL link.') cswDSLindex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 3, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 2))) if mibBuilder.loadTexts: cswDSLindex.setStatus('current') if mibBuilder.loadTexts: cswDSLindex.setDescription('This is index of the distributed stack link with respect to each interface port') cswDistrStackLinkBundleOperStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 3, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("up", 1), ("down", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cswDistrStackLinkBundleOperStatus.setStatus('current') if mibBuilder.loadTexts: cswDistrStackLinkBundleOperStatus.setDescription('The state of the stackLink. up - Connected and operational. down - Not connected or administrative down.') cswDistrStackPhyPortInfoTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 4), ) if mibBuilder.loadTexts: cswDistrStackPhyPortInfoTable.setStatus('current') if mibBuilder.loadTexts: cswDistrStackPhyPortInfoTable.setDescription('This table contains objects for Distributed stack Link information Table.') cswDistrStackPhyPortInfoEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 4, 1), ).setIndexNames((0, "ENTITY-MIB", "entPhysicalIndex"), (0, "CISCO-STACKWISE-MIB", "cswDSLindex"), (0, "IF-MIB", "ifIndex")) if mibBuilder.loadTexts: cswDistrStackPhyPortInfoEntry.setStatus('current') if mibBuilder.loadTexts: cswDistrStackPhyPortInfoEntry.setDescription('An Entry containing information about stack port that is part of Distributed Stack Link.') cswDistrStackPhyPort = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 4, 1, 1), SnmpAdminString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cswDistrStackPhyPort.setStatus('current') if mibBuilder.loadTexts: cswDistrStackPhyPort.setDescription('This object indicates the name of distributed stack port.') cswDistrStackPhyPortOperStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 4, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("up", 1), ("down", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cswDistrStackPhyPortOperStatus.setStatus('current') if mibBuilder.loadTexts: cswDistrStackPhyPortOperStatus.setDescription('The state of the distributed stackport. up - Connected and operational. down - Not connected to a neighboring switch or administrative down.') cswDistrStackPhyPortNbr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 4, 1, 3), SnmpAdminString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cswDistrStackPhyPortNbr.setStatus('current') if mibBuilder.loadTexts: cswDistrStackPhyPortNbr.setDescription("This object indicates the name of distributed stack port's neighbor.") cswDistrStackPhyPortNbrsw = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 4, 1, 4), EntPhysicalIndexOrZero()).setMaxAccess("readonly") if mibBuilder.loadTexts: cswDistrStackPhyPortNbrsw.setStatus('current') if mibBuilder.loadTexts: cswDistrStackPhyPortNbrsw.setDescription("This object indicates the EntPhysicalIndex of the distributed stack port's neigbor switch.") cswMIBNotifications = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 500, 0, 0)) cswStackPortChange = NotificationType((1, 3, 6, 1, 4, 1, 9, 9, 500, 0, 0, 1)).setObjects(("IF-MIB", "ifIndex"), ("CISCO-STACKWISE-MIB", "cswStackPortOperStatus"), ("CISCO-STACKWISE-MIB", "cswSwitchNumCurrent")) if mibBuilder.loadTexts: cswStackPortChange.setStatus('current') if mibBuilder.loadTexts: cswStackPortChange.setDescription('This notification is generated when the state of a stack port has changed.') cswStackNewMaster = NotificationType((1, 3, 6, 1, 4, 1, 9, 9, 500, 0, 0, 2)).setObjects(("CISCO-STACKWISE-MIB", "cswSwitchNumCurrent")) if mibBuilder.loadTexts: cswStackNewMaster.setStatus('current') if mibBuilder.loadTexts: cswStackNewMaster.setDescription('This notification is generated when a new master has been elected. The notification will contain the cswSwitchNumCurrent object to indicate the new master ID.') cswStackMismatch = NotificationType((1, 3, 6, 1, 4, 1, 9, 9, 500, 0, 0, 3)).setObjects(("CISCO-STACKWISE-MIB", "cswSwitchState"), ("CISCO-STACKWISE-MIB", "cswSwitchNumCurrent")) if mibBuilder.loadTexts: cswStackMismatch.setStatus('current') if mibBuilder.loadTexts: cswStackMismatch.setDescription('This notification is generated when a new member attempt to join the stack but was denied due to a mismatch. The cswSwitchState object will indicate the type of mismatch.') cswStackRingRedundant = NotificationType((1, 3, 6, 1, 4, 1, 9, 9, 500, 0, 0, 4)).setObjects(("CISCO-STACKWISE-MIB", "cswRingRedundant")) if mibBuilder.loadTexts: cswStackRingRedundant.setStatus('current') if mibBuilder.loadTexts: cswStackRingRedundant.setDescription('This notification is generated when the redundancy of the ring has changed.') cswStackNewMember = NotificationType((1, 3, 6, 1, 4, 1, 9, 9, 500, 0, 0, 5)).setObjects(("CISCO-STACKWISE-MIB", "cswSwitchNumCurrent")) if mibBuilder.loadTexts: cswStackNewMember.setStatus('current') if mibBuilder.loadTexts: cswStackNewMember.setDescription('This notification is generated when a new member joins the stack.') cswStackMemberRemoved = NotificationType((1, 3, 6, 1, 4, 1, 9, 9, 500, 0, 0, 6)).setObjects(("CISCO-STACKWISE-MIB", "cswSwitchNumCurrent")) if mibBuilder.loadTexts: cswStackMemberRemoved.setStatus('current') if mibBuilder.loadTexts: cswStackMemberRemoved.setDescription('This notification is generated when a member is removed from the stack.') cswStackPowerPortLinkStatusChanged = NotificationType((1, 3, 6, 1, 4, 1, 9, 9, 500, 0, 0, 7)).setObjects(("CISCO-STACKWISE-MIB", "cswStackPowerPortLinkStatus"), ("CISCO-STACKWISE-MIB", "cswSwitchNumCurrent"), ("CISCO-STACKWISE-MIB", "cswStackPowerPortName")) if mibBuilder.loadTexts: cswStackPowerPortLinkStatusChanged.setStatus('current') if mibBuilder.loadTexts: cswStackPowerPortLinkStatusChanged.setDescription('This notification is generated when the link status of a stack power port is changed from up to down or down to up. This notification is for informational purposes only and no action is required. cswStackPowerPortLinkStatus indicates link status of the stack power ports. cswSwitchNumCurrent indicates the switch number of the system. cswStackPowerPortName specifies a unique name of the stack power port as shown on the face plate of the system.') cswStackPowerPortOperStatusChanged = NotificationType((1, 3, 6, 1, 4, 1, 9, 9, 500, 0, 0, 8)).setObjects(("CISCO-STACKWISE-MIB", "cswSwitchNumCurrent"), ("CISCO-STACKWISE-MIB", "cswStackPowerPortOperStatus"), ("CISCO-STACKWISE-MIB", "cswStackPowerPortName")) if mibBuilder.loadTexts: cswStackPowerPortOperStatusChanged.setStatus('current') if mibBuilder.loadTexts: cswStackPowerPortOperStatusChanged.setDescription('This notification is generated when the operational status of a stack power port is changed from enabled to disabled or from disabled to enabled. This notification is for informational purposes only and no action is required. cswSwitchNumCurrent indicates the switch number of the system. cswStackPowerPortOperStatus indicates operational status of the stack power ports. cswStackPowerPortName specifies a unique name of the stack power port as shown on the face plate of the system.') cswStackPowerVersionMismatch = NotificationType((1, 3, 6, 1, 4, 1, 9, 9, 500, 0, 0, 9)).setObjects(("CISCO-STACKWISE-MIB", "cswSwitchNumCurrent")) if mibBuilder.loadTexts: cswStackPowerVersionMismatch.setStatus('current') if mibBuilder.loadTexts: cswStackPowerVersionMismatch.setDescription('This notification is generated when the major version of the stack power protocol is different from the other members of the power stack. Upon receiving this notification, the user should make sure that he/she is using the same software version on all the members of the same power stack. cswSwitchNumCurrent indicates the switch number of the system seeing the power stack version mismatch.') cswStackPowerInvalidTopology = NotificationType((1, 3, 6, 1, 4, 1, 9, 9, 500, 0, 0, 10)).setObjects(("CISCO-STACKWISE-MIB", "cswSwitchNumCurrent")) if mibBuilder.loadTexts: cswStackPowerInvalidTopology.setStatus('current') if mibBuilder.loadTexts: cswStackPowerInvalidTopology.setDescription('This notification is generated when an invalid stack power topology is discovered by a switch. cswSwitchNumCurrent indicates the switch number of the system where the invalid topology is discovered.') cscwStackPowerBudgetWarrning = NotificationType((1, 3, 6, 1, 4, 1, 9, 9, 500, 0, 0, 11)).setObjects(("CISCO-STACKWISE-MIB", "cswSwitchNumCurrent")) if mibBuilder.loadTexts: cscwStackPowerBudgetWarrning.setStatus('current') if mibBuilder.loadTexts: cscwStackPowerBudgetWarrning.setDescription('This notification is generated when the switch power budget is more than 1000W above its power supplies rated power output. cswSwitchNumCurrent indicates the switch number of the system where the invalid power budget has been detected.') cswStackPowerInvalidInputCurrent = NotificationType((1, 3, 6, 1, 4, 1, 9, 9, 500, 0, 0, 12)).setObjects(("CISCO-STACKWISE-MIB", "cswSwitchNumCurrent"), ("CISCO-STACKWISE-MIB", "cswStackPowerPortOverCurrentThreshold"), ("CISCO-STACKWISE-MIB", "cswStackPowerPortName")) if mibBuilder.loadTexts: cswStackPowerInvalidInputCurrent.setStatus('current') if mibBuilder.loadTexts: cswStackPowerInvalidInputCurrent.setDescription('This notification is generated when the input current in the stack power cable is over the limit of the threshold retrieved by the agent through cswStackPowerPortOverCurrentThreshold object. Upon receiving this notification, the user should add a power supply to the system whose switch number is generated with this notification. cswSwitchNumCurrent indicates the switch number of the system. cswStackPowerPortOverCurrentThreshold indicates the over current threshold of power stack cables. cswStackPowerPortName specifies a unique name of the stack power port as shown on the face plate of the system.') cswStackPowerInvalidOutputCurrent = NotificationType((1, 3, 6, 1, 4, 1, 9, 9, 500, 0, 0, 13)).setObjects(("CISCO-STACKWISE-MIB", "cswSwitchNumCurrent"), ("CISCO-STACKWISE-MIB", "cswStackPowerPortOverCurrentThreshold"), ("CISCO-STACKWISE-MIB", "cswStackPowerPortName")) if mibBuilder.loadTexts: cswStackPowerInvalidOutputCurrent.setStatus('current') if mibBuilder.loadTexts: cswStackPowerInvalidOutputCurrent.setDescription('This notification is generated when the output current in the stack power cable is over the limit of the threshold retrieved by the agent through cswStackPowerPortOverCurrentThreshold object. Upon receiving this notification, the user should remove a power supply from the system whose switch number is generated with this notification. cswSwitchNumCurrent indicates the switch number of the system. cswStackPowerPortOverCurrentThreshold indicates the over current threshold of power stack cables. cswStackPowerPortName specifies a unique name of the stack power port as shown on the face plate of the system.') cswStackPowerUnderBudget = NotificationType((1, 3, 6, 1, 4, 1, 9, 9, 500, 0, 0, 14)).setObjects(("CISCO-STACKWISE-MIB", "cswSwitchNumCurrent")) if mibBuilder.loadTexts: cswStackPowerUnderBudget.setStatus('current') if mibBuilder.loadTexts: cswStackPowerUnderBudget.setDescription("This notification is generated when the switch's budget is less than maximum possible switch power consumption. cswSwitchNumCurrent indicates the switch number of the system that is running with the power budget less than the power consumption.") cswStackPowerUnbalancedPowerSupplies = NotificationType((1, 3, 6, 1, 4, 1, 9, 9, 500, 0, 0, 15)).setObjects(("CISCO-STACKWISE-MIB", "cswStackPowerName")) if mibBuilder.loadTexts: cswStackPowerUnbalancedPowerSupplies.setStatus('current') if mibBuilder.loadTexts: cswStackPowerUnbalancedPowerSupplies.setDescription('This notification is generated when the switch has no power supply but another switch in the same stack has more than one power supplies. cswStackPowerName specifies a unique name of the power stack where the unbalanced power supplies are detected.') cswStackPowerInsufficientPower = NotificationType((1, 3, 6, 1, 4, 1, 9, 9, 500, 0, 0, 16)).setObjects(("CISCO-STACKWISE-MIB", "cswStackPowerName")) if mibBuilder.loadTexts: cswStackPowerInsufficientPower.setStatus('current') if mibBuilder.loadTexts: cswStackPowerInsufficientPower.setDescription("This notification is generated when the switch's power stack does not have enough power to bring up all the switches in the power stack. cswStackPowerName specifies a unique name of the power stack where insufficient power condition is detected.") cswStackPowerPriorityConflict = NotificationType((1, 3, 6, 1, 4, 1, 9, 9, 500, 0, 0, 17)).setObjects(("CISCO-STACKWISE-MIB", "cswStackPowerName")) if mibBuilder.loadTexts: cswStackPowerPriorityConflict.setStatus('current') if mibBuilder.loadTexts: cswStackPowerPriorityConflict.setDescription("This notification is generated when the switch's power priorities are conflicting with power priorities of another switch in the same power stack. cswStackPowerPortName specifies the unique name of the power stack where the conflicting power priorities are detected.") cswStackPowerUnderVoltage = NotificationType((1, 3, 6, 1, 4, 1, 9, 9, 500, 0, 0, 18)).setObjects(("CISCO-STACKWISE-MIB", "cswSwitchNumCurrent")) if mibBuilder.loadTexts: cswStackPowerUnderVoltage.setStatus('current') if mibBuilder.loadTexts: cswStackPowerUnderVoltage.setDescription('This notification is generated when the switch had an under voltage condition on last boot up. cswSwitchNumCurrent indicates the switch number of the system that was forced down with the under voltage condition.') cswStackPowerGLS = NotificationType((1, 3, 6, 1, 4, 1, 9, 9, 500, 0, 0, 19)).setObjects(("CISCO-STACKWISE-MIB", "cswSwitchNumCurrent")) if mibBuilder.loadTexts: cswStackPowerGLS.setStatus('current') if mibBuilder.loadTexts: cswStackPowerGLS.setDescription('This notification is generated when the switch had to shed loads based on a sustained over load (SOC) condition. cswSwitchNumCurrent indicates the switch number of the system that goes through graceful load shedding.') cswStackPowerILS = NotificationType((1, 3, 6, 1, 4, 1, 9, 9, 500, 0, 0, 20)).setObjects(("CISCO-STACKWISE-MIB", "cswSwitchNumCurrent")) if mibBuilder.loadTexts: cswStackPowerILS.setStatus('current') if mibBuilder.loadTexts: cswStackPowerILS.setDescription('This notification is generated when the switch had to shed loads based on power supply fail condition. cswSwitchNumCurrent indicates the switch number of the system that goes through immediate load shedding.') cswStackPowerSRLS = NotificationType((1, 3, 6, 1, 4, 1, 9, 9, 500, 0, 0, 21)).setObjects(("CISCO-STACKWISE-MIB", "cswSwitchNumCurrent")) if mibBuilder.loadTexts: cswStackPowerSRLS.setStatus('current') if mibBuilder.loadTexts: cswStackPowerSRLS.setDescription('This notification is generated when the switch had to shed loads based on loss of a system in ring topology. cswSwitchNumCurrent indicates the switch number of the system that detects the loss of system in ring topology.') cswStackPowerSSLS = NotificationType((1, 3, 6, 1, 4, 1, 9, 9, 500, 0, 0, 22)).setObjects(("CISCO-STACKWISE-MIB", "cswSwitchNumCurrent")) if mibBuilder.loadTexts: cswStackPowerSSLS.setStatus('current') if mibBuilder.loadTexts: cswStackPowerSSLS.setDescription('This notification is generated when the switch had to shed loads based on loss of a system in star topology. cswSwitchNumCurrent indicates the switch number of the system that detects the loss of system in star topology.') cswStackMemberToBeReloadedForUpgrade = NotificationType((1, 3, 6, 1, 4, 1, 9, 9, 500, 0, 0, 23)).setObjects(("CISCO-STACKWISE-MIB", "cswSwitchNumCurrent")) if mibBuilder.loadTexts: cswStackMemberToBeReloadedForUpgrade.setStatus('current') if mibBuilder.loadTexts: cswStackMemberToBeReloadedForUpgrade.setDescription('This notification is generated when a member is to be reloaded for upgrade.') cswStackWiseMIBCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 500, 2, 1)) cswStackWiseMIBGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 500, 2, 2)) cswStackWiseMIBCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 500, 2, 1, 1)).setObjects(("CISCO-STACKWISE-MIB", "cswStatusGroup"), ("CISCO-STACKWISE-MIB", "cswNotificationGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cswStackWiseMIBCompliance = cswStackWiseMIBCompliance.setStatus('deprecated') if mibBuilder.loadTexts: cswStackWiseMIBCompliance.setDescription('The compliance statement for entities that implement the CISCO-STACKWISE-MIB.') cswStackWiseMIBComplianceRev1 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 500, 2, 1, 2)).setObjects(("CISCO-STACKWISE-MIB", "cswNotificationGroup"), ("CISCO-STACKWISE-MIB", "cswStatusGroupRev1"), ("CISCO-STACKWISE-MIB", "cswStackPowerEnableNotificationGroup"), ("CISCO-STACKWISE-MIB", "cswStackPowerStatusGroup"), ("CISCO-STACKWISE-MIB", "cswStackPowerSwitchStatusGroup"), ("CISCO-STACKWISE-MIB", "cswStackPowerPortStatusGroup"), ("CISCO-STACKWISE-MIB", "cswStackPowerNotificationGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cswStackWiseMIBComplianceRev1 = cswStackWiseMIBComplianceRev1.setStatus('deprecated') if mibBuilder.loadTexts: cswStackWiseMIBComplianceRev1.setDescription('The compliance statements for entities described in CISCO-STACKWISE-MIB. Stack Power entities are added in this revision.') cswStackWiseMIBComplianceRev2 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 500, 2, 1, 3)).setObjects(("CISCO-STACKWISE-MIB", "cswNotificationGroup"), ("CISCO-STACKWISE-MIB", "cswNotificationGroupSup1"), ("CISCO-STACKWISE-MIB", "cswStatusGroupRev1"), ("CISCO-STACKWISE-MIB", "cswStackPowerEnableNotificationGroup"), ("CISCO-STACKWISE-MIB", "cswStackPowerStatusGroup"), ("CISCO-STACKWISE-MIB", "cswStackPowerSwitchStatusGroup"), ("CISCO-STACKWISE-MIB", "cswStackPowerPortStatusGroup"), ("CISCO-STACKWISE-MIB", "cswStackPowerNotificationGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cswStackWiseMIBComplianceRev2 = cswStackWiseMIBComplianceRev2.setStatus('deprecated') if mibBuilder.loadTexts: cswStackWiseMIBComplianceRev2.setDescription('The compliance statements for entities described in CISCO-STACKWISE-MIB. Stack Power entities are added in this revision.') cswStackWiseMIBComplianceRev3 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 500, 2, 1, 4)).setObjects(("CISCO-STACKWISE-MIB", "cswNotificationGroup"), ("CISCO-STACKWISE-MIB", "cswNotificationGroupSup1"), ("CISCO-STACKWISE-MIB", "cswStatusGroupRev1"), ("CISCO-STACKWISE-MIB", "cswStackPowerEnableNotificationGroup"), ("CISCO-STACKWISE-MIB", "cswStackPowerStatusGroup"), ("CISCO-STACKWISE-MIB", "cswStackPowerSwitchStatusGroup"), ("CISCO-STACKWISE-MIB", "cswStackPowerPortStatusGroup"), ("CISCO-STACKWISE-MIB", "cswStackPowerNotificationGroup"), ("CISCO-STACKWISE-MIB", "cswStackPowerAllocatedGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cswStackWiseMIBComplianceRev3 = cswStackWiseMIBComplianceRev3.setStatus('deprecated') if mibBuilder.loadTexts: cswStackWiseMIBComplianceRev3.setDescription('The compliance statements for entities described in CISCO-STACKWISE-MIB. Stack Power entities are added in this revision.') cswStackWiseMIBComplianceRev4 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 500, 2, 1, 5)).setObjects(("CISCO-STACKWISE-MIB", "cswNotificationGroup"), ("CISCO-STACKWISE-MIB", "cswNotificationGroupSup1"), ("CISCO-STACKWISE-MIB", "cswStatusGroupRev2"), ("CISCO-STACKWISE-MIB", "cswStackPowerEnableNotificationGroup"), ("CISCO-STACKWISE-MIB", "cswDistrStackLinkStatusGroup"), ("CISCO-STACKWISE-MIB", "cswDistrStackPhyPortStatusGroup"), ("CISCO-STACKWISE-MIB", "cswStackPowerStatusGroup"), ("CISCO-STACKWISE-MIB", "cswStackPowerSwitchStatusGroup"), ("CISCO-STACKWISE-MIB", "cswStackPowerPortStatusGroup"), ("CISCO-STACKWISE-MIB", "cswStackPowerNotificationGroup"), ("CISCO-STACKWISE-MIB", "cswStackPowerAllocatedGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cswStackWiseMIBComplianceRev4 = cswStackWiseMIBComplianceRev4.setStatus('current') if mibBuilder.loadTexts: cswStackWiseMIBComplianceRev4.setDescription('The compliance statements for entities described in CISCO-STACKWISE-MIB. Stack Global entities are added in this revision.') cswStatusGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 500, 2, 2, 1)).setObjects(("CISCO-STACKWISE-MIB", "cswMaxSwitchNum"), ("CISCO-STACKWISE-MIB", "cswMaxSwitchConfigPriority"), ("CISCO-STACKWISE-MIB", "cswRingRedundant"), ("CISCO-STACKWISE-MIB", "cswEnableStackNotifications"), ("CISCO-STACKWISE-MIB", "cswSwitchNumCurrent"), ("CISCO-STACKWISE-MIB", "cswSwitchNumNextReload"), ("CISCO-STACKWISE-MIB", "cswSwitchRole"), ("CISCO-STACKWISE-MIB", "cswSwitchSwPriority"), ("CISCO-STACKWISE-MIB", "cswSwitchHwPriority"), ("CISCO-STACKWISE-MIB", "cswSwitchState"), ("CISCO-STACKWISE-MIB", "cswSwitchMacAddress"), ("CISCO-STACKWISE-MIB", "cswSwitchSoftwareImage"), ("CISCO-STACKWISE-MIB", "cswStackPortOperStatus"), ("CISCO-STACKWISE-MIB", "cswStackPortNeighbor"), ("CISCO-STACKWISE-MIB", "cswStackPowerType")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cswStatusGroup = cswStatusGroup.setStatus('deprecated') if mibBuilder.loadTexts: cswStatusGroup.setDescription('A collection of objects that are used for control and status.') cswNotificationGroup = NotificationGroup((1, 3, 6, 1, 4, 1, 9, 9, 500, 2, 2, 2)).setObjects(("CISCO-STACKWISE-MIB", "cswStackPortChange"), ("CISCO-STACKWISE-MIB", "cswStackNewMaster"), ("CISCO-STACKWISE-MIB", "cswStackMismatch"), ("CISCO-STACKWISE-MIB", "cswStackRingRedundant"), ("CISCO-STACKWISE-MIB", "cswStackNewMember"), ("CISCO-STACKWISE-MIB", "cswStackMemberRemoved")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cswNotificationGroup = cswNotificationGroup.setStatus('current') if mibBuilder.loadTexts: cswNotificationGroup.setDescription('A collection of notifications that are required.') cswStatusGroupRev1 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 500, 2, 2, 3)).setObjects(("CISCO-STACKWISE-MIB", "cswMaxSwitchNum"), ("CISCO-STACKWISE-MIB", "cswMaxSwitchConfigPriority"), ("CISCO-STACKWISE-MIB", "cswRingRedundant"), ("CISCO-STACKWISE-MIB", "cswSwitchNumCurrent"), ("CISCO-STACKWISE-MIB", "cswSwitchNumNextReload"), ("CISCO-STACKWISE-MIB", "cswSwitchRole"), ("CISCO-STACKWISE-MIB", "cswSwitchSwPriority"), ("CISCO-STACKWISE-MIB", "cswSwitchHwPriority"), ("CISCO-STACKWISE-MIB", "cswSwitchState"), ("CISCO-STACKWISE-MIB", "cswSwitchMacAddress"), ("CISCO-STACKWISE-MIB", "cswSwitchSoftwareImage")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cswStatusGroupRev1 = cswStatusGroupRev1.setStatus('current') if mibBuilder.loadTexts: cswStatusGroupRev1.setDescription('A collection of objects that are used for control and status.') cswStackPowerStatusGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 500, 2, 2, 4)).setObjects(("CISCO-STACKWISE-MIB", "cswStackPowerMode"), ("CISCO-STACKWISE-MIB", "cswStackPowerMasterMacAddress"), ("CISCO-STACKWISE-MIB", "cswStackPowerMasterSwitchNum"), ("CISCO-STACKWISE-MIB", "cswStackPowerNumMembers"), ("CISCO-STACKWISE-MIB", "cswStackPowerType"), ("CISCO-STACKWISE-MIB", "cswStackPowerName")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cswStackPowerStatusGroup = cswStackPowerStatusGroup.setStatus('current') if mibBuilder.loadTexts: cswStackPowerStatusGroup.setDescription('A collection of stack power objects that are used for control and status of power stack.') cswStackPowerSwitchStatusGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 500, 2, 2, 5)).setObjects(("CISCO-STACKWISE-MIB", "cswSwitchPowerBudget"), ("CISCO-STACKWISE-MIB", "cswSwitchPowerCommited"), ("CISCO-STACKWISE-MIB", "cswSwitchSystemPowerPriority"), ("CISCO-STACKWISE-MIB", "cswSwitchPoeDevicesLowPriority"), ("CISCO-STACKWISE-MIB", "cswSwitchPoeDevicesHighPriority")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cswStackPowerSwitchStatusGroup = cswStackPowerSwitchStatusGroup.setStatus('current') if mibBuilder.loadTexts: cswStackPowerSwitchStatusGroup.setDescription('A collection of stack power objects that are used to track the stack power parameters of a switch.') cswStackPowerPortStatusGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 500, 2, 2, 6)).setObjects(("CISCO-STACKWISE-MIB", "cswStackPowerPortOperStatus"), ("CISCO-STACKWISE-MIB", "cswStackPowerPortNeighborMacAddress"), ("CISCO-STACKWISE-MIB", "cswStackPowerPortNeighborSwitchNum"), ("CISCO-STACKWISE-MIB", "cswStackPowerPortLinkStatus"), ("CISCO-STACKWISE-MIB", "cswStackPowerPortOverCurrentThreshold"), ("CISCO-STACKWISE-MIB", "cswStackPowerPortName")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cswStackPowerPortStatusGroup = cswStackPowerPortStatusGroup.setStatus('current') if mibBuilder.loadTexts: cswStackPowerPortStatusGroup.setDescription('A collection of objects that are used for control and status of stack power ports.') cswStackPowerNotificationGroup = NotificationGroup((1, 3, 6, 1, 4, 1, 9, 9, 500, 2, 2, 7)).setObjects(("CISCO-STACKWISE-MIB", "cswStackPowerPortLinkStatusChanged"), ("CISCO-STACKWISE-MIB", "cswStackPowerPortOperStatusChanged"), ("CISCO-STACKWISE-MIB", "cswStackPowerVersionMismatch"), ("CISCO-STACKWISE-MIB", "cswStackPowerInvalidTopology"), ("CISCO-STACKWISE-MIB", "cscwStackPowerBudgetWarrning"), ("CISCO-STACKWISE-MIB", "cswStackPowerInvalidInputCurrent"), ("CISCO-STACKWISE-MIB", "cswStackPowerInvalidOutputCurrent"), ("CISCO-STACKWISE-MIB", "cswStackPowerUnderBudget"), ("CISCO-STACKWISE-MIB", "cswStackPowerUnbalancedPowerSupplies"), ("CISCO-STACKWISE-MIB", "cswStackPowerInsufficientPower"), ("CISCO-STACKWISE-MIB", "cswStackPowerPriorityConflict"), ("CISCO-STACKWISE-MIB", "cswStackPowerUnderVoltage"), ("CISCO-STACKWISE-MIB", "cswStackPowerGLS"), ("CISCO-STACKWISE-MIB", "cswStackPowerILS"), ("CISCO-STACKWISE-MIB", "cswStackPowerSRLS"), ("CISCO-STACKWISE-MIB", "cswStackPowerSSLS")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cswStackPowerNotificationGroup = cswStackPowerNotificationGroup.setStatus('current') if mibBuilder.loadTexts: cswStackPowerNotificationGroup.setDescription('A collection of notifications that are triggered whenever there is either a change in stack power object or an error is encountered.') cswStackPowerEnableNotificationGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 500, 2, 2, 8)).setObjects(("CISCO-STACKWISE-MIB", "cswEnableIndividualStackNotifications")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cswStackPowerEnableNotificationGroup = cswStackPowerEnableNotificationGroup.setStatus('current') if mibBuilder.loadTexts: cswStackPowerEnableNotificationGroup.setDescription('This group contains the notification enable objects for this MIB.') cswNotificationGroupSup1 = NotificationGroup((1, 3, 6, 1, 4, 1, 9, 9, 500, 2, 2, 9)).setObjects(("CISCO-STACKWISE-MIB", "cswStackMemberToBeReloadedForUpgrade")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cswNotificationGroupSup1 = cswNotificationGroupSup1.setStatus('current') if mibBuilder.loadTexts: cswNotificationGroupSup1.setDescription('Additional notification required for data stack.') cswStackPowerAllocatedGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 500, 2, 2, 10)).setObjects(("CISCO-STACKWISE-MIB", "cswSwitchPowerAllocated")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cswStackPowerAllocatedGroup = cswStackPowerAllocatedGroup.setStatus('current') if mibBuilder.loadTexts: cswStackPowerAllocatedGroup.setDescription('A collection of objects providing the stack power allocation information of a switch.') cswStatusGroupRev2 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 500, 2, 2, 11)).setObjects(("CISCO-STACKWISE-MIB", "cswMaxSwitchNum"), ("CISCO-STACKWISE-MIB", "cswMaxSwitchConfigPriority"), ("CISCO-STACKWISE-MIB", "cswRingRedundant"), ("CISCO-STACKWISE-MIB", "cswSwitchNumCurrent"), ("CISCO-STACKWISE-MIB", "cswSwitchNumNextReload"), ("CISCO-STACKWISE-MIB", "cswSwitchRole"), ("CISCO-STACKWISE-MIB", "cswSwitchSwPriority"), ("CISCO-STACKWISE-MIB", "cswSwitchHwPriority"), ("CISCO-STACKWISE-MIB", "cswSwitchState"), ("CISCO-STACKWISE-MIB", "cswSwitchMacAddress"), ("CISCO-STACKWISE-MIB", "cswStackDomainNum"), ("CISCO-STACKWISE-MIB", "cswStackType"), ("CISCO-STACKWISE-MIB", "cswStackBandWidth")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cswStatusGroupRev2 = cswStatusGroupRev2.setStatus('current') if mibBuilder.loadTexts: cswStatusGroupRev2.setDescription('A collection of objects that are used for control and status.') cswDistrStackLinkStatusGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 500, 2, 2, 12)).setObjects(("CISCO-STACKWISE-MIB", "cswDistrStackLinkBundleOperStatus")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cswDistrStackLinkStatusGroup = cswDistrStackLinkStatusGroup.setStatus('current') if mibBuilder.loadTexts: cswDistrStackLinkStatusGroup.setDescription('A collection object(s) for control and status of the distributed Stack Link.') cswDistrStackPhyPortStatusGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 500, 2, 2, 13)).setObjects(("CISCO-STACKWISE-MIB", "cswDistrStackPhyPort"), ("CISCO-STACKWISE-MIB", "cswDistrStackPhyPortOperStatus"), ("CISCO-STACKWISE-MIB", "cswDistrStackPhyPortNbr"), ("CISCO-STACKWISE-MIB", "cswDistrStackPhyPortNbrsw")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cswDistrStackPhyPortStatusGroup = cswDistrStackPhyPortStatusGroup.setStatus('current') if mibBuilder.loadTexts: cswDistrStackPhyPortStatusGroup.setDescription('A collection of objects for control and status of the distributed stack port') mibBuilder.exportSymbols("CISCO-STACKWISE-MIB", cswDistrStackPhyPort=cswDistrStackPhyPort, cswDistrStackLinkInfoTable=cswDistrStackLinkInfoTable, cswStackPowerPortInfoTable=cswStackPowerPortInfoTable, cswStackInfo=cswStackInfo, cswStatusGroupRev1=cswStatusGroupRev1, cswSwitchMacAddress=cswSwitchMacAddress, cswStackPowerSwitchStatusGroup=cswStackPowerSwitchStatusGroup, cscwStackPowerBudgetWarrning=cscwStackPowerBudgetWarrning, cswStackPowerPortOverCurrentThreshold=cswStackPowerPortOverCurrentThreshold, cswSwitchPoeDevicesHighPriority=cswSwitchPoeDevicesHighPriority, cswDSLindex=cswDSLindex, cswStackPowerStackNumber=cswStackPowerStackNumber, cswStackPowerInfo=cswStackPowerInfo, cswStackNewMember=cswStackNewMember, cswStackPowerInvalidInputCurrent=cswStackPowerInvalidInputCurrent, cswStackPowerEnableNotificationGroup=cswStackPowerEnableNotificationGroup, cswStackPowerInfoTable=cswStackPowerInfoTable, cswStackPowerInfoEntry=cswStackPowerInfoEntry, cswRingRedundant=cswRingRedundant, cswStackPowerPortLinkStatus=cswStackPowerPortLinkStatus, cswStackDomainNum=cswStackDomainNum, cswStackPowerPortNeighborMacAddress=cswStackPowerPortNeighborMacAddress, cswStackWiseMIBComplianceRev1=cswStackWiseMIBComplianceRev1, cswMaxSwitchConfigPriority=cswMaxSwitchConfigPriority, CswSwitchPriority=CswSwitchPriority, cswStackWiseMIBComplianceRev2=cswStackWiseMIBComplianceRev2, cswStackNewMaster=cswStackNewMaster, cswStackPortChange=cswStackPortChange, cswSwitchState=cswSwitchState, cswStackPowerPriorityConflict=cswStackPowerPriorityConflict, cswStackPowerName=cswStackPowerName, cswDistrStackPhyPortStatusGroup=cswDistrStackPhyPortStatusGroup, cswStackPowerUnderVoltage=cswStackPowerUnderVoltage, cswStackPowerPortInfoEntry=cswStackPowerPortInfoEntry, cswStackMemberToBeReloadedForUpgrade=cswStackMemberToBeReloadedForUpgrade, CswPowerStackType=CswPowerStackType, cswStackPortInfoTable=cswStackPortInfoTable, cswStackPowerInvalidTopology=cswStackPowerInvalidTopology, cswStackPowerPortStatusGroup=cswStackPowerPortStatusGroup, cswSwitchPowerCommited=cswSwitchPowerCommited, cswStackBandWidth=cswStackBandWidth, cswStackPowerStatusGroup=cswStackPowerStatusGroup, cswStackPowerMasterMacAddress=cswStackPowerMasterMacAddress, ciscoStackWiseMIB=ciscoStackWiseMIB, cswDistrStackPhyPortOperStatus=cswDistrStackPhyPortOperStatus, cswEnableStackNotifications=cswEnableStackNotifications, ciscoStackWiseMIBConform=ciscoStackWiseMIBConform, cswSwitchPowerAllocated=cswSwitchPowerAllocated, cswStackPowerInsufficientPower=cswStackPowerInsufficientPower, cswStackPowerPortNeighborSwitchNum=cswStackPowerPortNeighborSwitchNum, cswStackPowerPortName=cswStackPowerPortName, cswSwitchInfoTable=cswSwitchInfoTable, cswSwitchPoeDevicesLowPriority=cswSwitchPoeDevicesLowPriority, cswStackWiseMIBCompliances=cswStackWiseMIBCompliances, cswStackPowerPortIndex=cswStackPowerPortIndex, cswSwitchSwPriority=cswSwitchSwPriority, cswSwitchSoftwareImage=cswSwitchSoftwareImage, cswStackWiseMIBComplianceRev3=cswStackWiseMIBComplianceRev3, cswStackMismatch=cswStackMismatch, cswStackPowerType=cswStackPowerType, cswSwitchPowerBudget=cswSwitchPowerBudget, cswDistrStackLinkStatusGroup=cswDistrStackLinkStatusGroup, cswStackPowerVersionMismatch=cswStackPowerVersionMismatch, cswStackPowerSRLS=cswStackPowerSRLS, PYSNMP_MODULE_ID=ciscoStackWiseMIB, cswStackPowerNotificationGroup=cswStackPowerNotificationGroup, cswStatusGroup=cswStatusGroup, cswDistrStackPhyPortNbrsw=cswDistrStackPhyPortNbrsw, cswNotificationGroup=cswNotificationGroup, cswStackPowerGLS=cswStackPowerGLS, cswStackMemberRemoved=cswStackMemberRemoved, cswDistrStackLinkInfoEntry=cswDistrStackLinkInfoEntry, cswSwitchHwPriority=cswSwitchHwPriority, cswStackWiseMIBComplianceRev4=cswStackWiseMIBComplianceRev4, cswStackPowerInvalidOutputCurrent=cswStackPowerInvalidOutputCurrent, cswStackPowerPortLinkStatusChanged=cswStackPowerPortLinkStatusChanged, cswStackPowerPortOperStatus=cswStackPowerPortOperStatus, cswStackPowerUnderBudget=cswStackPowerUnderBudget, cswStackWiseMIBGroups=cswStackWiseMIBGroups, cswStackRingRedundant=cswStackRingRedundant, cswStackType=cswStackType, cswStackPortInfoEntry=cswStackPortInfoEntry, cswStackPortOperStatus=cswStackPortOperStatus, cswStackPowerPortOperStatusChanged=cswStackPowerPortOperStatusChanged, cswStackPowerILS=cswStackPowerILS, cswStackPowerAllocatedGroup=cswStackPowerAllocatedGroup, cswEnableIndividualStackNotifications=cswEnableIndividualStackNotifications, cswDistrStackPhyPortNbr=cswDistrStackPhyPortNbr, cswStatusGroupRev2=cswStatusGroupRev2, CswSwitchNumber=CswSwitchNumber, cswNotificationGroupSup1=cswNotificationGroupSup1, cswMIBNotifications=cswMIBNotifications, cswStackPowerMasterSwitchNum=cswStackPowerMasterSwitchNum, cswGlobals=cswGlobals, cswMaxSwitchNum=cswMaxSwitchNum, CswSwitchNumberOrZero=CswSwitchNumberOrZero, cswStackPowerMode=cswStackPowerMode, ciscoStackWiseMIBNotifs=ciscoStackWiseMIBNotifs, cswStackPortNeighbor=cswStackPortNeighbor, cswDistrStackPhyPortInfoEntry=cswDistrStackPhyPortInfoEntry, cswStackWiseMIBCompliance=cswStackWiseMIBCompliance, cswDistrStackPhyPortInfoTable=cswDistrStackPhyPortInfoTable, CswPowerStackMode=CswPowerStackMode, cswStackPowerSSLS=cswStackPowerSSLS, cswSwitchSystemPowerPriority=cswSwitchSystemPowerPriority, cswSwitchNumCurrent=cswSwitchNumCurrent, ciscoStackWiseMIBObjects=ciscoStackWiseMIBObjects, cswStackPowerNumMembers=cswStackPowerNumMembers, cswSwitchRole=cswSwitchRole, cswDistrStackLinkBundleOperStatus=cswDistrStackLinkBundleOperStatus, cswSwitchNumNextReload=cswSwitchNumNextReload, cswStackPowerUnbalancedPowerSupplies=cswStackPowerUnbalancedPowerSupplies, cswSwitchInfoEntry=cswSwitchInfoEntry)
(object_identifier, octet_string, integer) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'OctetString', 'Integer') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (value_range_constraint, constraints_union, single_value_constraint, constraints_intersection, value_size_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'ConstraintsUnion', 'SingleValueConstraint', 'ConstraintsIntersection', 'ValueSizeConstraint') (cisco_mgmt,) = mibBuilder.importSymbols('CISCO-SMI', 'ciscoMgmt') (ent_physical_index_or_zero,) = mibBuilder.importSymbols('CISCO-TC', 'EntPhysicalIndexOrZero') (ent_physical_index,) = mibBuilder.importSymbols('ENTITY-MIB', 'entPhysicalIndex') (if_index,) = mibBuilder.importSymbols('IF-MIB', 'ifIndex') (snmp_admin_string,) = mibBuilder.importSymbols('SNMP-FRAMEWORK-MIB', 'SnmpAdminString') (notification_group, object_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ObjectGroup', 'ModuleCompliance') (notification_type, integer32, object_identity, time_ticks, counter32, mib_identifier, gauge32, mib_scalar, mib_table, mib_table_row, mib_table_column, iso, bits, counter64, module_identity, ip_address, unsigned32) = mibBuilder.importSymbols('SNMPv2-SMI', 'NotificationType', 'Integer32', 'ObjectIdentity', 'TimeTicks', 'Counter32', 'MibIdentifier', 'Gauge32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'iso', 'Bits', 'Counter64', 'ModuleIdentity', 'IpAddress', 'Unsigned32') (display_string, textual_convention, truth_value, mac_address) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention', 'TruthValue', 'MacAddress') cisco_stack_wise_mib = module_identity((1, 3, 6, 1, 4, 1, 9, 9, 500)) ciscoStackWiseMIB.setRevisions(('2016-04-16 00:00', '2015-11-24 00:00', '2011-12-12 00:00', '2010-02-01 00:00', '2008-06-10 00:00', '2005-10-12 00:00')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: ciscoStackWiseMIB.setRevisionsDescriptions(('Added following objects in cswGlobals - cswStackDomainNum - cswStackType - cswStackBandWidth Created following tables - cswDistrStackLinkInfoTable -cswDistrStackPhyPortInfoTable Added cswStatusGroupRev2 Deprecated cswStatusGroupRev1 Added cswDistrStackLinkStatusGroup Added cswDistrStackPhyPortStatusGroup Added cswStackWiseMIBComplianceRev4 MIB COMPLIANCE Deprecated cswStackWiseMIBComplianceRev3 MIB COMPLIANCE.', 'Added following Objects in cswSwitchInfoTable - cswSwitchPowerAllocated Added following OBJECT-GROUP - cswStackPowerAllocatedGroup Deprecated cswStackWiseMIBComplianceRev2 MODULE-COMPLIANCE. Added cswStackWiseMIBComplianceRev3 MODULE-COMPLIANCE.', "Modified 'cswSwitchRole' object.", 'Added cswStackPowerStatusGroup, cswStackPowerSwitchStatusGroup, cswStackPowerPortStatusGroup, cswStatusGroupRev1 and cswStackPowerNotificationGroup. Deprecated cswStackWiseMIBCompliance compliance statement. Added cswStackWiseMIBComplianceRev1 compliance statement. Deprecated cswStatusGroup because we deprecated cswEnableStackNotifications', "Modified 'cswSwitchState' object.", 'Initial version of this MIB module.')) if mibBuilder.loadTexts: ciscoStackWiseMIB.setLastUpdated('201604160000Z') if mibBuilder.loadTexts: ciscoStackWiseMIB.setOrganization('Cisco Systems, Inc.') if mibBuilder.loadTexts: ciscoStackWiseMIB.setContactInfo('Cisco Systems Customer Service Postal: 170 W Tasman Drive San Jose, CA 95134 Tel: +1 800 553-NETS E-mail: cs-dsbu@cisco.com') if mibBuilder.loadTexts: ciscoStackWiseMIB.setDescription('This MIB module contain a collection of managed objects that apply to network devices supporting the Cisco StackWise(TM) technology. The StackWise technology provides a method for collectively utilizing a stack of switches to create a single switching unit. The data stack is used for switching data packets and, in power stack, switches are connected by special stack power cables to share power. Moreover, stackwise is the concept for combining multiple systems to give an impression of a single system so that is why both power stack and data stack are supported by single MIB. Terminology: Stack - A collection of switches connected by the Cisco StackWise technology. Master - The switch that is managing the stack. Member - A switch in the stack that is NOT the stack master. Ring - Components that makes up the connections between the switches in order to create a stack. Stackport - A special physical connector used by the ring. It is possible for a switch have more than one stackport. SDM - Switch Database Management. Stack Power - A collection of switches connected by special stack power cables to share the power of inter-connected power supplies across all switches requiring power. Stack Power is managed by a single data stack. Jack-Jack - It is a device that provides the Power Shelf capabilities required for Stack Power on the high-end. POE - Power Over Ethernet FEP - Front End Power Supply SOC - Sustained Overload Condition GLS - Graceful Load Shedding ILS - Immediate Load Shedding SRLS - System Ring Load Shedding SSLS - System Star Load Shedding') class Cswpowerstackmode(TextualConvention, Integer32): description = 'This textual convention is used to describe the mode of the power stack. Since the power stack could only run in either power sharing or redundant mode so this TC will also have only following valid values, powerSharing(1) :When a power stack is running in power sharing mode then all the power supplies in the power stack contributes towards the global power budget of the stack. redundant(2) :If the user wants the power stack to run in redundant mode then we will take the capacity of the largest power supply in the power stack out of power stack global power budget pool. powerSharingStrict(3):This mode is same as power sharing mode but, in this mode, the available power will always be more than the used power. redundantStrict(4) :This mode is same as redundant mode but, in this mode, the available power will always be more than the used power.' status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4)) named_values = named_values(('powerSharing', 1), ('redundant', 2), ('powerSharingStrict', 3), ('redundantStrict', 4)) class Cswpowerstacktype(TextualConvention, Integer32): description = 'This textual conventions is used to describe the type of the power stack. Since the power stack could only be configured in a ring or star topology so this TC will have only following valid values, ring(1): The power stack has been formed by connecting the switches in ring topology. star(2): The power stack has been formed by connecting the switches in star topology.' status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2)) named_values = named_values(('ring', 1), ('star', 2)) cisco_stack_wise_mib_notifs = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 500, 0)) cisco_stack_wise_mib_objects = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 500, 1)) cisco_stack_wise_mib_conform = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 500, 2)) csw_globals = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 1)) csw_stack_info = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2)) csw_stack_power_info = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 3)) class Cswswitchnumber(TextualConvention, Unsigned32): description = 'A unique value, greater than zero, for each switch in a group of stackable switches.' status = 'current' display_hint = 'd' subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(1, 4294967295) class Cswswitchnumberorzero(TextualConvention, Unsigned32): description = 'A unique value, greater than or equal to zero, for each switch in a group of stackable switches. A value of zero means that the switch number can not be determined. The value of zero is not unique.' status = 'current' display_hint = 'd' subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(0, 4294967295) class Cswswitchpriority(TextualConvention, Unsigned32): description = 'A value, greater than or equal to zero, that defines the priority of a switch in a group of stackable switches. The higher the value, the higher the priority.' status = 'current' display_hint = 'd' subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(0, 4294967295) csw_max_switch_num = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 1, 1), csw_switch_number()).setMaxAccess('readonly') if mibBuilder.loadTexts: cswMaxSwitchNum.setStatus('current') if mibBuilder.loadTexts: cswMaxSwitchNum.setDescription('The maximum number of switches that can be configured on this stack. This is also the maximum value that can be set by the cswSwitchNumNextReload object.') csw_max_switch_config_priority = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 1, 2), csw_switch_priority()).setMaxAccess('readonly') if mibBuilder.loadTexts: cswMaxSwitchConfigPriority.setStatus('current') if mibBuilder.loadTexts: cswMaxSwitchConfigPriority.setDescription('The maximum configurable priority for a switch in this stack. Highest value equals highest priority. This is the highest value that can be set by the cswSwitchSwPriority object.') csw_ring_redundant = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 1, 3), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: cswRingRedundant.setStatus('current') if mibBuilder.loadTexts: cswRingRedundant.setDescription("A value of 'true' is returned when the stackports are connected in such a way that it forms a redundant ring.") csw_stack_power_info_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 3, 1)) if mibBuilder.loadTexts: cswStackPowerInfoTable.setStatus('current') if mibBuilder.loadTexts: cswStackPowerInfoTable.setDescription('This table holds the information about all the power stacks in a single data stack.') csw_stack_power_info_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 3, 1, 1)).setIndexNames((0, 'CISCO-STACKWISE-MIB', 'cswStackPowerStackNumber')) if mibBuilder.loadTexts: cswStackPowerInfoEntry.setStatus('current') if mibBuilder.loadTexts: cswStackPowerInfoEntry.setDescription('An entry in the cswStackPowerInfoTable for each of the power stacks in a single data stack. This entry contains information regarding the power stack.') csw_stack_power_stack_number = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 3, 1, 1, 1), unsigned32()) if mibBuilder.loadTexts: cswStackPowerStackNumber.setStatus('current') if mibBuilder.loadTexts: cswStackPowerStackNumber.setDescription('A unique value, greater than zero, to identify a power stack.') csw_stack_power_mode = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 3, 1, 1, 2), csw_power_stack_mode()).setMaxAccess('readwrite') if mibBuilder.loadTexts: cswStackPowerMode.setStatus('current') if mibBuilder.loadTexts: cswStackPowerMode.setDescription('This object specifies the information about the mode of the power stack. Power-sharing mode: All of the input power can be used for loads, and the total available power appears as one huge power supply. The power budget includes all power from all supplies. No power is set aside for power supply failures, so if a power supply fails, load shedding (shutting down of powered devices or switches) might occur. This is the default. Redundant mode: The largest power supply is removed from the power pool to be used as backup power in case one of the other power supplies fails. The available power budget is the total power minus the largest power supply. This reduces the available power in the pool for switches and powered devices to draw from, but in case of a failure or an extreme power load, there is less chance of having to shut down switches or powered devices. This is the recommended operating mode if your system has enough power. In addition, you can configure each mode to run a strict power budget or a non-strict (loose) power budget. If the mode is strict, the stack power needs cannot exceed the available power. When the power budgeted to devices reaches the maximum available PoE power, power is denied to the next device seeking power. In this mode the stack never goes into an over-budgeted power mode. When the mode is non-strict, budgeted power is allowed to exceed available power. This is normally not a problem because most devices do not run at full power and the chances of all powered devices in the stack requiring maximum power at the same time is small.') csw_stack_power_master_mac_address = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 3, 1, 1, 3), mac_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: cswStackPowerMasterMacAddress.setStatus('current') if mibBuilder.loadTexts: cswStackPowerMasterMacAddress.setDescription('This object indicates the Mac address of the power stack master.') csw_stack_power_master_switch_num = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 3, 1, 1, 4), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cswStackPowerMasterSwitchNum.setStatus('current') if mibBuilder.loadTexts: cswStackPowerMasterSwitchNum.setDescription('This object indicates the switch number of the power stack master. The value of this object would be zero if the power stack master is not part of this data stack.') csw_stack_power_num_members = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 3, 1, 1, 5), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cswStackPowerNumMembers.setStatus('current') if mibBuilder.loadTexts: cswStackPowerNumMembers.setDescription('This object indicates the number of members in the power stack.') csw_stack_power_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 3, 1, 1, 6), csw_power_stack_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: cswStackPowerType.setStatus('current') if mibBuilder.loadTexts: cswStackPowerType.setDescription('This object indicates the topology of the power stack, that is, whether the switch is running in RING or STAR topology.') csw_stack_power_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 3, 1, 1, 7), snmp_admin_string()).setMaxAccess('readwrite') if mibBuilder.loadTexts: cswStackPowerName.setStatus('current') if mibBuilder.loadTexts: cswStackPowerName.setDescription('This object specifies a unique name of this power stack. A zero-length string indicates no name is assigned.') csw_stack_power_port_info_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 3, 2)) if mibBuilder.loadTexts: cswStackPowerPortInfoTable.setStatus('current') if mibBuilder.loadTexts: cswStackPowerPortInfoTable.setDescription('This table contains information about the stack power ports. There exists an entry in this table for each physical stack power port.') csw_stack_power_port_info_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 3, 2, 1)).setIndexNames((0, 'ENTITY-MIB', 'entPhysicalIndex'), (0, 'CISCO-STACKWISE-MIB', 'cswStackPowerPortIndex')) if mibBuilder.loadTexts: cswStackPowerPortInfoEntry.setStatus('current') if mibBuilder.loadTexts: cswStackPowerPortInfoEntry.setDescription('A conceptual row in the cswStackPowerPortInfoTable. This entry contains information about a power stack port.') csw_stack_power_port_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 3, 2, 1, 1), unsigned32()) if mibBuilder.loadTexts: cswStackPowerPortIndex.setStatus('current') if mibBuilder.loadTexts: cswStackPowerPortIndex.setDescription('A unique value, greater than zero, for each stack power port.') csw_stack_power_port_oper_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 3, 2, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: cswStackPowerPortOperStatus.setStatus('current') if mibBuilder.loadTexts: cswStackPowerPortOperStatus.setDescription('This object is used to either set or unset the operational status of the stack port. This object will have following valid values, enabled(1) : The port is enabled disabled(2) : The port is forced down') csw_stack_power_port_neighbor_mac_address = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 3, 2, 1, 3), mac_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: cswStackPowerPortNeighborMacAddress.setStatus('current') if mibBuilder.loadTexts: cswStackPowerPortNeighborMacAddress.setDescription("This objects indicates the port neighbor's Mac Address.") csw_stack_power_port_neighbor_switch_num = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 3, 2, 1, 4), csw_switch_number_or_zero()).setMaxAccess('readonly') if mibBuilder.loadTexts: cswStackPowerPortNeighborSwitchNum.setStatus('current') if mibBuilder.loadTexts: cswStackPowerPortNeighborSwitchNum.setDescription("This objects indicates the port neighbor's switch number. If either there is no switch connected or the neighbor is not Jack-Jack then the value of this object is going to be 0.") csw_stack_power_port_link_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 3, 2, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('up', 1), ('down', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: cswStackPowerPortLinkStatus.setStatus('current') if mibBuilder.loadTexts: cswStackPowerPortLinkStatus.setDescription('This object is used to describe the link status of the stack port. This object will have following valid values, up(1) : The port is connected and operational down(2): The port is either forced down or not connected') csw_stack_power_port_over_current_threshold = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 3, 2, 1, 6), unsigned32()).setUnits('Amperes').setMaxAccess('readwrite') if mibBuilder.loadTexts: cswStackPowerPortOverCurrentThreshold.setStatus('current') if mibBuilder.loadTexts: cswStackPowerPortOverCurrentThreshold.setDescription('This object is used to retrieve the over current threshold. The stack power cables are limited to carry current up to the limit retrieved by this object. The stack power cables would not be able to function properly if either the input or output current goes beyond the threshold retrieved by this object.') csw_stack_power_port_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 3, 2, 1, 7), snmp_admin_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: cswStackPowerPortName.setStatus('current') if mibBuilder.loadTexts: cswStackPowerPortName.setDescription('This object specifies a unique name of the stack power port as shown on the face plate of the system. A zero-length string indicates no name is assigned.') csw_enable_stack_notifications = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 1, 4), truth_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: cswEnableStackNotifications.setStatus('deprecated') if mibBuilder.loadTexts: cswEnableStackNotifications.setDescription("This object indicates whether the system generates the notifications defined in this MIB or not. A value of 'false' will prevent the notifications from being sent.") csw_enable_individual_stack_notifications = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 1, 5), bits().clone(namedValues=named_values(('stackPortChange', 0), ('stackNewMaster', 1), ('stackMismatch', 2), ('stackRingRedundant', 3), ('stackNewMember', 4), ('stackMemberRemoved', 5), ('stackPowerLinkStatusChanged', 6), ('stackPowerPortOperStatusChanged', 7), ('stackPowerVersionMismatch', 8), ('stackPowerInvalidTopology', 9), ('stackPowerBudgetWarning', 10), ('stackPowerInvalidInputCurrent', 11), ('stackPowerInvalidOutputCurrent', 12), ('stackPowerUnderBudget', 13), ('stackPowerUnbalancedPowerSupplies', 14), ('stackPowerInsufficientPower', 15), ('stackPowerPriorityConflict', 16), ('stackPowerUnderVoltage', 17), ('stackPowerGLS', 18), ('stackPowerILS', 19), ('stackPowerSRLS', 20), ('stackPowerSSLS', 21), ('stackMemberToBeReloadedForUpgrade', 22)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: cswEnableIndividualStackNotifications.setStatus('current') if mibBuilder.loadTexts: cswEnableIndividualStackNotifications.setDescription('This object is used to enable/disable individual notifications defined in this MIB module. Turning on a particular bit would enable the corresponding trap and, similarly, turning off a particular bit would disable the corresponding trap. The following notifications are controlled by this object: stackPortChange(0): enables/disables cswStackPortChange notification. stackNewMaster(1): enables/disables cswStackNewMember notification. stackMismatch(2): enables/disables cswStackMismatch notification. stackRingRedundant(3): enables/disables cswStackRingRedundant notification. stackNewMember(4): enables/disables cswStackNewMember notification. stackMemberRemoved(5): enables/disables cswStackMemberRemoved notification. stackPowerLinkStatusChanged(6): enables/disables cswStackPowerPortLinkStatusChanged notification. stackPowerPortOperStatusChanged(7): enables/disables cswStackPowerPortOperStatusChanged notification. stackPowerVersionMismatch(8): enables/disables cswStackPowerVersionMismatch notification. stackPowerInvalidTopology(9): enables/disables cswStackPowerInvalidTopology notification stackPowerBudgetWarning(10): enables/disables cswStackPowerBudgetWarning notification. stackPowerInvalidInputCurrent(11): enables/disables cswStackPowerInvalidInputCurrent notification. stackPowerInvalidOutputCurrent(12): enables/disables cswStackPowerInvalidOutputCurrent notification. stackPowerUnderBudget(13): enables/disables cswStackPowerUnderBudget notification. stackPowerUnbalancedPowerSupplies(14): enables/disables cswStackPowerUnbalancedPowerSupplies notification. stackPowerInsufficientPower(15): enables/disables cswStackPowerInsufficientPower notification. stackPowerPriorityConflict(16): enables/disables cswStackPowerPriorityConflict notification. stackPowerUnderVoltage(17): enables/disables cswStackPowerUnderVoltage notification. stackPowerGLS(18): enables/disables cswStackPowerGLS notification. stackPowerILS(19): enables/disabled cswStackPowerILS notification. stackPowerSRLS(20): enables/disables cswStackPowerSRLS notification. stackPowerSSLS(21): enables/disables cswStackPowerSSLS notification. stackMemberToBeReloadedForUpgrade(22): enables/disables cswStackMemberToBeReloadedForUpgrade notification.') csw_stack_domain_num = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 1, 6), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cswStackDomainNum.setStatus('current') if mibBuilder.loadTexts: cswStackDomainNum.setDescription('This object indicates distributed domain of the switch.Only Switches with the same domain number can be in the same dist ributed domain.0 means no switch domain configured.') csw_stack_type = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 1, 7), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cswStackType.setStatus('current') if mibBuilder.loadTexts: cswStackType.setDescription('This object indicates type of switch stack. value of Switch virtual domain determines if switch is distributed or conventional stack. 0 means stack is conventional back side stack.') csw_stack_band_width = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 1, 8), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cswStackBandWidth.setStatus('current') if mibBuilder.loadTexts: cswStackBandWidth.setDescription('This object indicates stack bandwidth.') csw_switch_info_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 1)) if mibBuilder.loadTexts: cswSwitchInfoTable.setStatus('current') if mibBuilder.loadTexts: cswSwitchInfoTable.setDescription("This table contains information specific to switches in a stack. Every switch with an entry in the entPhysicalTable (ENTITY-MIB) whose entPhysicalClass is 'chassis' will have an entry in this table.") csw_switch_info_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 1, 1)).setIndexNames((0, 'ENTITY-MIB', 'entPhysicalIndex')) if mibBuilder.loadTexts: cswSwitchInfoEntry.setStatus('current') if mibBuilder.loadTexts: cswSwitchInfoEntry.setDescription('A conceptual row in the cswSwitchInfoTable describing a switch information.') csw_switch_num_current = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 1, 1, 1), csw_switch_number()).setMaxAccess('readonly') if mibBuilder.loadTexts: cswSwitchNumCurrent.setStatus('current') if mibBuilder.loadTexts: cswSwitchNumCurrent.setDescription("This object contains the current switch identification number. This number should match any logical labeling on the switch. For example, a switch whose interfaces are labeled 'interface #3' this value should be 3.") csw_switch_num_next_reload = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 1, 1, 2), csw_switch_number_or_zero()).setMaxAccess('readwrite') if mibBuilder.loadTexts: cswSwitchNumNextReload.setStatus('current') if mibBuilder.loadTexts: cswSwitchNumNextReload.setDescription("This object contains the cswSwitchNumCurrent to be used at next reload. The maximum value for this object is defined by the cswMaxSwitchNum object. Note: This object will contain 0 and cannot be set if the cswSwitchState value is other than 'ready'.") csw_switch_role = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 1, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('master', 1), ('member', 2), ('notMember', 3), ('standby', 4)))).setMaxAccess('readonly') if mibBuilder.loadTexts: cswSwitchRole.setStatus('current') if mibBuilder.loadTexts: cswSwitchRole.setDescription('This object describes the function of the switch: master - stack master. member - active member of the stack. notMember - none-active stack member, see cswSwitchState for status. standby - stack standby switch.') csw_switch_sw_priority = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 1, 1, 4), csw_switch_priority()).setMaxAccess('readwrite') if mibBuilder.loadTexts: cswSwitchSwPriority.setStatus('current') if mibBuilder.loadTexts: cswSwitchSwPriority.setDescription("A number containing the priority of a switch. The switch with the highest priority will become the master. The maximum value for this object is defined by the cswMaxSwitchConfigPriority object. If after a reload the value of cswMaxSwitchConfigPriority changes to a smaller value, and the value of cswSwitchSwPriority has been previously set to a value greater or equal to the new cswMaxSwitchConfigPriority, then the SNMP agent must set cswSwitchSwPriority to the new cswMaxSwitchConfigPriority. Note: This object will contain the value of 0 if the cswSwitchState value is other than 'ready'.") csw_switch_hw_priority = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 1, 1, 5), csw_switch_priority()).setMaxAccess('readonly') if mibBuilder.loadTexts: cswSwitchHwPriority.setStatus('current') if mibBuilder.loadTexts: cswSwitchHwPriority.setDescription("This object contains the hardware priority of a switch. If two or more entries in this table have the same cswSwitchSwPriority value during the master election time, the switch with the highest cswSwitchHwPriority will become the master. Note: This object will contain the value of 0 if the cswSwitchState value is other than 'ready'.") csw_switch_state = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 1, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11))).clone(namedValues=named_values(('waiting', 1), ('progressing', 2), ('added', 3), ('ready', 4), ('sdmMismatch', 5), ('verMismatch', 6), ('featureMismatch', 7), ('newMasterInit', 8), ('provisioned', 9), ('invalid', 10), ('removed', 11)))).setMaxAccess('readonly') if mibBuilder.loadTexts: cswSwitchState.setStatus('current') if mibBuilder.loadTexts: cswSwitchState.setDescription("The current state of a switch: waiting - Waiting for a limited time on other switches in the stack to come online. progressing - Master election or mismatch checks in progress. added - The switch is added to the stack. ready - The switch is operational. sdmMismatch - The SDM template configured on the master is not supported by the new member. verMismatch - The operating system version running on the master is different from the operating system version running on this member. featureMismatch - Some of the features configured on the master are not supported on this member. newMasterInit - Waiting for the new master to finish initialization after master switchover (Master Re-Init). provisioned - The switch is not an active member of the stack. invalid - The switch's state machine is in an invalid state. removed - The switch is removed from the stack.") csw_switch_mac_address = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 1, 1, 7), mac_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: cswSwitchMacAddress.setStatus('current') if mibBuilder.loadTexts: cswSwitchMacAddress.setDescription("The MAC address of the switch. Note: This object will contain the value of 0000:0000:0000 if the cswSwitchState value is other than 'ready'.") csw_switch_software_image = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 1, 1, 8), snmp_admin_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: cswSwitchSoftwareImage.setStatus('current') if mibBuilder.loadTexts: cswSwitchSoftwareImage.setDescription("The software image type running on the switch. Note: This object will contain an empty string if the cswSwitchState value is other than 'ready'.") csw_switch_power_budget = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 1, 1, 9), unsigned32()).setUnits('Watts').setMaxAccess('readonly') if mibBuilder.loadTexts: cswSwitchPowerBudget.setStatus('current') if mibBuilder.loadTexts: cswSwitchPowerBudget.setDescription('This object indicates the power budget of the switch.') csw_switch_power_commited = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 1, 1, 10), unsigned32()).setUnits('Watts').setMaxAccess('readonly') if mibBuilder.loadTexts: cswSwitchPowerCommited.setStatus('current') if mibBuilder.loadTexts: cswSwitchPowerCommited.setDescription('This object indicates the power committed to the POE devices connected to the switch.') csw_switch_system_power_priority = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 1, 1, 11), unsigned32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: cswSwitchSystemPowerPriority.setStatus('current') if mibBuilder.loadTexts: cswSwitchSystemPowerPriority.setDescription("This specifies the system's power priority. In case of a power failure then the system with the highest system priority will be brought down last.") csw_switch_poe_devices_low_priority = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 1, 1, 12), unsigned32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: cswSwitchPoeDevicesLowPriority.setStatus('current') if mibBuilder.loadTexts: cswSwitchPoeDevicesLowPriority.setDescription("This object specifies the priority of the system's low priority POE devices.") csw_switch_poe_devices_high_priority = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 1, 1, 13), unsigned32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: cswSwitchPoeDevicesHighPriority.setStatus('current') if mibBuilder.loadTexts: cswSwitchPoeDevicesHighPriority.setDescription("This object specifies the priority of the system's high priority POE devices. In order to avoid losing the high priority POE devices before the low priority POE devices, this object's value must be greater than value of cswSwitchPoeDevicesLowPriority.") csw_switch_power_allocated = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 1, 1, 14), unsigned32()).setUnits('Watts').setMaxAccess('readonly') if mibBuilder.loadTexts: cswSwitchPowerAllocated.setStatus('current') if mibBuilder.loadTexts: cswSwitchPowerAllocated.setDescription('This object indicates the power committed to the POE devices connected to the switch.') csw_stack_port_info_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 2)) if mibBuilder.loadTexts: cswStackPortInfoTable.setStatus('current') if mibBuilder.loadTexts: cswStackPortInfoTable.setDescription('This table contains stackport specific information. There exists an entry in this table for every physical stack port that have an entry in the ifTable (IF-MIB).') csw_stack_port_info_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 2, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex')) if mibBuilder.loadTexts: cswStackPortInfoEntry.setStatus('current') if mibBuilder.loadTexts: cswStackPortInfoEntry.setDescription('A conceptual row in the cswStackPortInfoTable. An entry contains information about a stackport.') csw_stack_port_oper_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 2, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('up', 1), ('down', 2), ('forcedDown', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: cswStackPortOperStatus.setStatus('current') if mibBuilder.loadTexts: cswStackPortOperStatus.setDescription('The state of the stackport. up - Connected and operational. down - Not connected to a neighboring switch or administrative down. forcedDown - Shut down by stack manager due to mismatch or stackport errors.') csw_stack_port_neighbor = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 2, 1, 2), ent_physical_index_or_zero()).setMaxAccess('readonly') if mibBuilder.loadTexts: cswStackPortNeighbor.setStatus('current') if mibBuilder.loadTexts: cswStackPortNeighbor.setDescription("This object contains the value of the entPhysicalIndex of the switch's chassis to which this stackport is connected to. If the stackport is not connected, the value 0 is returned.") csw_distr_stack_link_info_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 3)) if mibBuilder.loadTexts: cswDistrStackLinkInfoTable.setStatus('current') if mibBuilder.loadTexts: cswDistrStackLinkInfoTable.setDescription('Distributed Stack Link Information.') csw_distr_stack_link_info_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 3, 1)).setIndexNames((0, 'ENTITY-MIB', 'entPhysicalIndex'), (0, 'CISCO-STACKWISE-MIB', 'cswDSLindex')) if mibBuilder.loadTexts: cswDistrStackLinkInfoEntry.setStatus('current') if mibBuilder.loadTexts: cswDistrStackLinkInfoEntry.setDescription('An Entry containing information about DSL link.') csw_ds_lindex = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 3, 1, 1), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 2))) if mibBuilder.loadTexts: cswDSLindex.setStatus('current') if mibBuilder.loadTexts: cswDSLindex.setDescription('This is index of the distributed stack link with respect to each interface port') csw_distr_stack_link_bundle_oper_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 3, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('up', 1), ('down', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: cswDistrStackLinkBundleOperStatus.setStatus('current') if mibBuilder.loadTexts: cswDistrStackLinkBundleOperStatus.setDescription('The state of the stackLink. up - Connected and operational. down - Not connected or administrative down.') csw_distr_stack_phy_port_info_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 4)) if mibBuilder.loadTexts: cswDistrStackPhyPortInfoTable.setStatus('current') if mibBuilder.loadTexts: cswDistrStackPhyPortInfoTable.setDescription('This table contains objects for Distributed stack Link information Table.') csw_distr_stack_phy_port_info_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 4, 1)).setIndexNames((0, 'ENTITY-MIB', 'entPhysicalIndex'), (0, 'CISCO-STACKWISE-MIB', 'cswDSLindex'), (0, 'IF-MIB', 'ifIndex')) if mibBuilder.loadTexts: cswDistrStackPhyPortInfoEntry.setStatus('current') if mibBuilder.loadTexts: cswDistrStackPhyPortInfoEntry.setDescription('An Entry containing information about stack port that is part of Distributed Stack Link.') csw_distr_stack_phy_port = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 4, 1, 1), snmp_admin_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: cswDistrStackPhyPort.setStatus('current') if mibBuilder.loadTexts: cswDistrStackPhyPort.setDescription('This object indicates the name of distributed stack port.') csw_distr_stack_phy_port_oper_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 4, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('up', 1), ('down', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: cswDistrStackPhyPortOperStatus.setStatus('current') if mibBuilder.loadTexts: cswDistrStackPhyPortOperStatus.setDescription('The state of the distributed stackport. up - Connected and operational. down - Not connected to a neighboring switch or administrative down.') csw_distr_stack_phy_port_nbr = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 4, 1, 3), snmp_admin_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: cswDistrStackPhyPortNbr.setStatus('current') if mibBuilder.loadTexts: cswDistrStackPhyPortNbr.setDescription("This object indicates the name of distributed stack port's neighbor.") csw_distr_stack_phy_port_nbrsw = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 500, 1, 2, 4, 1, 4), ent_physical_index_or_zero()).setMaxAccess('readonly') if mibBuilder.loadTexts: cswDistrStackPhyPortNbrsw.setStatus('current') if mibBuilder.loadTexts: cswDistrStackPhyPortNbrsw.setDescription("This object indicates the EntPhysicalIndex of the distributed stack port's neigbor switch.") csw_mib_notifications = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 500, 0, 0)) csw_stack_port_change = notification_type((1, 3, 6, 1, 4, 1, 9, 9, 500, 0, 0, 1)).setObjects(('IF-MIB', 'ifIndex'), ('CISCO-STACKWISE-MIB', 'cswStackPortOperStatus'), ('CISCO-STACKWISE-MIB', 'cswSwitchNumCurrent')) if mibBuilder.loadTexts: cswStackPortChange.setStatus('current') if mibBuilder.loadTexts: cswStackPortChange.setDescription('This notification is generated when the state of a stack port has changed.') csw_stack_new_master = notification_type((1, 3, 6, 1, 4, 1, 9, 9, 500, 0, 0, 2)).setObjects(('CISCO-STACKWISE-MIB', 'cswSwitchNumCurrent')) if mibBuilder.loadTexts: cswStackNewMaster.setStatus('current') if mibBuilder.loadTexts: cswStackNewMaster.setDescription('This notification is generated when a new master has been elected. The notification will contain the cswSwitchNumCurrent object to indicate the new master ID.') csw_stack_mismatch = notification_type((1, 3, 6, 1, 4, 1, 9, 9, 500, 0, 0, 3)).setObjects(('CISCO-STACKWISE-MIB', 'cswSwitchState'), ('CISCO-STACKWISE-MIB', 'cswSwitchNumCurrent')) if mibBuilder.loadTexts: cswStackMismatch.setStatus('current') if mibBuilder.loadTexts: cswStackMismatch.setDescription('This notification is generated when a new member attempt to join the stack but was denied due to a mismatch. The cswSwitchState object will indicate the type of mismatch.') csw_stack_ring_redundant = notification_type((1, 3, 6, 1, 4, 1, 9, 9, 500, 0, 0, 4)).setObjects(('CISCO-STACKWISE-MIB', 'cswRingRedundant')) if mibBuilder.loadTexts: cswStackRingRedundant.setStatus('current') if mibBuilder.loadTexts: cswStackRingRedundant.setDescription('This notification is generated when the redundancy of the ring has changed.') csw_stack_new_member = notification_type((1, 3, 6, 1, 4, 1, 9, 9, 500, 0, 0, 5)).setObjects(('CISCO-STACKWISE-MIB', 'cswSwitchNumCurrent')) if mibBuilder.loadTexts: cswStackNewMember.setStatus('current') if mibBuilder.loadTexts: cswStackNewMember.setDescription('This notification is generated when a new member joins the stack.') csw_stack_member_removed = notification_type((1, 3, 6, 1, 4, 1, 9, 9, 500, 0, 0, 6)).setObjects(('CISCO-STACKWISE-MIB', 'cswSwitchNumCurrent')) if mibBuilder.loadTexts: cswStackMemberRemoved.setStatus('current') if mibBuilder.loadTexts: cswStackMemberRemoved.setDescription('This notification is generated when a member is removed from the stack.') csw_stack_power_port_link_status_changed = notification_type((1, 3, 6, 1, 4, 1, 9, 9, 500, 0, 0, 7)).setObjects(('CISCO-STACKWISE-MIB', 'cswStackPowerPortLinkStatus'), ('CISCO-STACKWISE-MIB', 'cswSwitchNumCurrent'), ('CISCO-STACKWISE-MIB', 'cswStackPowerPortName')) if mibBuilder.loadTexts: cswStackPowerPortLinkStatusChanged.setStatus('current') if mibBuilder.loadTexts: cswStackPowerPortLinkStatusChanged.setDescription('This notification is generated when the link status of a stack power port is changed from up to down or down to up. This notification is for informational purposes only and no action is required. cswStackPowerPortLinkStatus indicates link status of the stack power ports. cswSwitchNumCurrent indicates the switch number of the system. cswStackPowerPortName specifies a unique name of the stack power port as shown on the face plate of the system.') csw_stack_power_port_oper_status_changed = notification_type((1, 3, 6, 1, 4, 1, 9, 9, 500, 0, 0, 8)).setObjects(('CISCO-STACKWISE-MIB', 'cswSwitchNumCurrent'), ('CISCO-STACKWISE-MIB', 'cswStackPowerPortOperStatus'), ('CISCO-STACKWISE-MIB', 'cswStackPowerPortName')) if mibBuilder.loadTexts: cswStackPowerPortOperStatusChanged.setStatus('current') if mibBuilder.loadTexts: cswStackPowerPortOperStatusChanged.setDescription('This notification is generated when the operational status of a stack power port is changed from enabled to disabled or from disabled to enabled. This notification is for informational purposes only and no action is required. cswSwitchNumCurrent indicates the switch number of the system. cswStackPowerPortOperStatus indicates operational status of the stack power ports. cswStackPowerPortName specifies a unique name of the stack power port as shown on the face plate of the system.') csw_stack_power_version_mismatch = notification_type((1, 3, 6, 1, 4, 1, 9, 9, 500, 0, 0, 9)).setObjects(('CISCO-STACKWISE-MIB', 'cswSwitchNumCurrent')) if mibBuilder.loadTexts: cswStackPowerVersionMismatch.setStatus('current') if mibBuilder.loadTexts: cswStackPowerVersionMismatch.setDescription('This notification is generated when the major version of the stack power protocol is different from the other members of the power stack. Upon receiving this notification, the user should make sure that he/she is using the same software version on all the members of the same power stack. cswSwitchNumCurrent indicates the switch number of the system seeing the power stack version mismatch.') csw_stack_power_invalid_topology = notification_type((1, 3, 6, 1, 4, 1, 9, 9, 500, 0, 0, 10)).setObjects(('CISCO-STACKWISE-MIB', 'cswSwitchNumCurrent')) if mibBuilder.loadTexts: cswStackPowerInvalidTopology.setStatus('current') if mibBuilder.loadTexts: cswStackPowerInvalidTopology.setDescription('This notification is generated when an invalid stack power topology is discovered by a switch. cswSwitchNumCurrent indicates the switch number of the system where the invalid topology is discovered.') cscw_stack_power_budget_warrning = notification_type((1, 3, 6, 1, 4, 1, 9, 9, 500, 0, 0, 11)).setObjects(('CISCO-STACKWISE-MIB', 'cswSwitchNumCurrent')) if mibBuilder.loadTexts: cscwStackPowerBudgetWarrning.setStatus('current') if mibBuilder.loadTexts: cscwStackPowerBudgetWarrning.setDescription('This notification is generated when the switch power budget is more than 1000W above its power supplies rated power output. cswSwitchNumCurrent indicates the switch number of the system where the invalid power budget has been detected.') csw_stack_power_invalid_input_current = notification_type((1, 3, 6, 1, 4, 1, 9, 9, 500, 0, 0, 12)).setObjects(('CISCO-STACKWISE-MIB', 'cswSwitchNumCurrent'), ('CISCO-STACKWISE-MIB', 'cswStackPowerPortOverCurrentThreshold'), ('CISCO-STACKWISE-MIB', 'cswStackPowerPortName')) if mibBuilder.loadTexts: cswStackPowerInvalidInputCurrent.setStatus('current') if mibBuilder.loadTexts: cswStackPowerInvalidInputCurrent.setDescription('This notification is generated when the input current in the stack power cable is over the limit of the threshold retrieved by the agent through cswStackPowerPortOverCurrentThreshold object. Upon receiving this notification, the user should add a power supply to the system whose switch number is generated with this notification. cswSwitchNumCurrent indicates the switch number of the system. cswStackPowerPortOverCurrentThreshold indicates the over current threshold of power stack cables. cswStackPowerPortName specifies a unique name of the stack power port as shown on the face plate of the system.') csw_stack_power_invalid_output_current = notification_type((1, 3, 6, 1, 4, 1, 9, 9, 500, 0, 0, 13)).setObjects(('CISCO-STACKWISE-MIB', 'cswSwitchNumCurrent'), ('CISCO-STACKWISE-MIB', 'cswStackPowerPortOverCurrentThreshold'), ('CISCO-STACKWISE-MIB', 'cswStackPowerPortName')) if mibBuilder.loadTexts: cswStackPowerInvalidOutputCurrent.setStatus('current') if mibBuilder.loadTexts: cswStackPowerInvalidOutputCurrent.setDescription('This notification is generated when the output current in the stack power cable is over the limit of the threshold retrieved by the agent through cswStackPowerPortOverCurrentThreshold object. Upon receiving this notification, the user should remove a power supply from the system whose switch number is generated with this notification. cswSwitchNumCurrent indicates the switch number of the system. cswStackPowerPortOverCurrentThreshold indicates the over current threshold of power stack cables. cswStackPowerPortName specifies a unique name of the stack power port as shown on the face plate of the system.') csw_stack_power_under_budget = notification_type((1, 3, 6, 1, 4, 1, 9, 9, 500, 0, 0, 14)).setObjects(('CISCO-STACKWISE-MIB', 'cswSwitchNumCurrent')) if mibBuilder.loadTexts: cswStackPowerUnderBudget.setStatus('current') if mibBuilder.loadTexts: cswStackPowerUnderBudget.setDescription("This notification is generated when the switch's budget is less than maximum possible switch power consumption. cswSwitchNumCurrent indicates the switch number of the system that is running with the power budget less than the power consumption.") csw_stack_power_unbalanced_power_supplies = notification_type((1, 3, 6, 1, 4, 1, 9, 9, 500, 0, 0, 15)).setObjects(('CISCO-STACKWISE-MIB', 'cswStackPowerName')) if mibBuilder.loadTexts: cswStackPowerUnbalancedPowerSupplies.setStatus('current') if mibBuilder.loadTexts: cswStackPowerUnbalancedPowerSupplies.setDescription('This notification is generated when the switch has no power supply but another switch in the same stack has more than one power supplies. cswStackPowerName specifies a unique name of the power stack where the unbalanced power supplies are detected.') csw_stack_power_insufficient_power = notification_type((1, 3, 6, 1, 4, 1, 9, 9, 500, 0, 0, 16)).setObjects(('CISCO-STACKWISE-MIB', 'cswStackPowerName')) if mibBuilder.loadTexts: cswStackPowerInsufficientPower.setStatus('current') if mibBuilder.loadTexts: cswStackPowerInsufficientPower.setDescription("This notification is generated when the switch's power stack does not have enough power to bring up all the switches in the power stack. cswStackPowerName specifies a unique name of the power stack where insufficient power condition is detected.") csw_stack_power_priority_conflict = notification_type((1, 3, 6, 1, 4, 1, 9, 9, 500, 0, 0, 17)).setObjects(('CISCO-STACKWISE-MIB', 'cswStackPowerName')) if mibBuilder.loadTexts: cswStackPowerPriorityConflict.setStatus('current') if mibBuilder.loadTexts: cswStackPowerPriorityConflict.setDescription("This notification is generated when the switch's power priorities are conflicting with power priorities of another switch in the same power stack. cswStackPowerPortName specifies the unique name of the power stack where the conflicting power priorities are detected.") csw_stack_power_under_voltage = notification_type((1, 3, 6, 1, 4, 1, 9, 9, 500, 0, 0, 18)).setObjects(('CISCO-STACKWISE-MIB', 'cswSwitchNumCurrent')) if mibBuilder.loadTexts: cswStackPowerUnderVoltage.setStatus('current') if mibBuilder.loadTexts: cswStackPowerUnderVoltage.setDescription('This notification is generated when the switch had an under voltage condition on last boot up. cswSwitchNumCurrent indicates the switch number of the system that was forced down with the under voltage condition.') csw_stack_power_gls = notification_type((1, 3, 6, 1, 4, 1, 9, 9, 500, 0, 0, 19)).setObjects(('CISCO-STACKWISE-MIB', 'cswSwitchNumCurrent')) if mibBuilder.loadTexts: cswStackPowerGLS.setStatus('current') if mibBuilder.loadTexts: cswStackPowerGLS.setDescription('This notification is generated when the switch had to shed loads based on a sustained over load (SOC) condition. cswSwitchNumCurrent indicates the switch number of the system that goes through graceful load shedding.') csw_stack_power_ils = notification_type((1, 3, 6, 1, 4, 1, 9, 9, 500, 0, 0, 20)).setObjects(('CISCO-STACKWISE-MIB', 'cswSwitchNumCurrent')) if mibBuilder.loadTexts: cswStackPowerILS.setStatus('current') if mibBuilder.loadTexts: cswStackPowerILS.setDescription('This notification is generated when the switch had to shed loads based on power supply fail condition. cswSwitchNumCurrent indicates the switch number of the system that goes through immediate load shedding.') csw_stack_power_srls = notification_type((1, 3, 6, 1, 4, 1, 9, 9, 500, 0, 0, 21)).setObjects(('CISCO-STACKWISE-MIB', 'cswSwitchNumCurrent')) if mibBuilder.loadTexts: cswStackPowerSRLS.setStatus('current') if mibBuilder.loadTexts: cswStackPowerSRLS.setDescription('This notification is generated when the switch had to shed loads based on loss of a system in ring topology. cswSwitchNumCurrent indicates the switch number of the system that detects the loss of system in ring topology.') csw_stack_power_ssls = notification_type((1, 3, 6, 1, 4, 1, 9, 9, 500, 0, 0, 22)).setObjects(('CISCO-STACKWISE-MIB', 'cswSwitchNumCurrent')) if mibBuilder.loadTexts: cswStackPowerSSLS.setStatus('current') if mibBuilder.loadTexts: cswStackPowerSSLS.setDescription('This notification is generated when the switch had to shed loads based on loss of a system in star topology. cswSwitchNumCurrent indicates the switch number of the system that detects the loss of system in star topology.') csw_stack_member_to_be_reloaded_for_upgrade = notification_type((1, 3, 6, 1, 4, 1, 9, 9, 500, 0, 0, 23)).setObjects(('CISCO-STACKWISE-MIB', 'cswSwitchNumCurrent')) if mibBuilder.loadTexts: cswStackMemberToBeReloadedForUpgrade.setStatus('current') if mibBuilder.loadTexts: cswStackMemberToBeReloadedForUpgrade.setDescription('This notification is generated when a member is to be reloaded for upgrade.') csw_stack_wise_mib_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 500, 2, 1)) csw_stack_wise_mib_groups = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 500, 2, 2)) csw_stack_wise_mib_compliance = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 500, 2, 1, 1)).setObjects(('CISCO-STACKWISE-MIB', 'cswStatusGroup'), ('CISCO-STACKWISE-MIB', 'cswNotificationGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csw_stack_wise_mib_compliance = cswStackWiseMIBCompliance.setStatus('deprecated') if mibBuilder.loadTexts: cswStackWiseMIBCompliance.setDescription('The compliance statement for entities that implement the CISCO-STACKWISE-MIB.') csw_stack_wise_mib_compliance_rev1 = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 500, 2, 1, 2)).setObjects(('CISCO-STACKWISE-MIB', 'cswNotificationGroup'), ('CISCO-STACKWISE-MIB', 'cswStatusGroupRev1'), ('CISCO-STACKWISE-MIB', 'cswStackPowerEnableNotificationGroup'), ('CISCO-STACKWISE-MIB', 'cswStackPowerStatusGroup'), ('CISCO-STACKWISE-MIB', 'cswStackPowerSwitchStatusGroup'), ('CISCO-STACKWISE-MIB', 'cswStackPowerPortStatusGroup'), ('CISCO-STACKWISE-MIB', 'cswStackPowerNotificationGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csw_stack_wise_mib_compliance_rev1 = cswStackWiseMIBComplianceRev1.setStatus('deprecated') if mibBuilder.loadTexts: cswStackWiseMIBComplianceRev1.setDescription('The compliance statements for entities described in CISCO-STACKWISE-MIB. Stack Power entities are added in this revision.') csw_stack_wise_mib_compliance_rev2 = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 500, 2, 1, 3)).setObjects(('CISCO-STACKWISE-MIB', 'cswNotificationGroup'), ('CISCO-STACKWISE-MIB', 'cswNotificationGroupSup1'), ('CISCO-STACKWISE-MIB', 'cswStatusGroupRev1'), ('CISCO-STACKWISE-MIB', 'cswStackPowerEnableNotificationGroup'), ('CISCO-STACKWISE-MIB', 'cswStackPowerStatusGroup'), ('CISCO-STACKWISE-MIB', 'cswStackPowerSwitchStatusGroup'), ('CISCO-STACKWISE-MIB', 'cswStackPowerPortStatusGroup'), ('CISCO-STACKWISE-MIB', 'cswStackPowerNotificationGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csw_stack_wise_mib_compliance_rev2 = cswStackWiseMIBComplianceRev2.setStatus('deprecated') if mibBuilder.loadTexts: cswStackWiseMIBComplianceRev2.setDescription('The compliance statements for entities described in CISCO-STACKWISE-MIB. Stack Power entities are added in this revision.') csw_stack_wise_mib_compliance_rev3 = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 500, 2, 1, 4)).setObjects(('CISCO-STACKWISE-MIB', 'cswNotificationGroup'), ('CISCO-STACKWISE-MIB', 'cswNotificationGroupSup1'), ('CISCO-STACKWISE-MIB', 'cswStatusGroupRev1'), ('CISCO-STACKWISE-MIB', 'cswStackPowerEnableNotificationGroup'), ('CISCO-STACKWISE-MIB', 'cswStackPowerStatusGroup'), ('CISCO-STACKWISE-MIB', 'cswStackPowerSwitchStatusGroup'), ('CISCO-STACKWISE-MIB', 'cswStackPowerPortStatusGroup'), ('CISCO-STACKWISE-MIB', 'cswStackPowerNotificationGroup'), ('CISCO-STACKWISE-MIB', 'cswStackPowerAllocatedGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csw_stack_wise_mib_compliance_rev3 = cswStackWiseMIBComplianceRev3.setStatus('deprecated') if mibBuilder.loadTexts: cswStackWiseMIBComplianceRev3.setDescription('The compliance statements for entities described in CISCO-STACKWISE-MIB. Stack Power entities are added in this revision.') csw_stack_wise_mib_compliance_rev4 = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 500, 2, 1, 5)).setObjects(('CISCO-STACKWISE-MIB', 'cswNotificationGroup'), ('CISCO-STACKWISE-MIB', 'cswNotificationGroupSup1'), ('CISCO-STACKWISE-MIB', 'cswStatusGroupRev2'), ('CISCO-STACKWISE-MIB', 'cswStackPowerEnableNotificationGroup'), ('CISCO-STACKWISE-MIB', 'cswDistrStackLinkStatusGroup'), ('CISCO-STACKWISE-MIB', 'cswDistrStackPhyPortStatusGroup'), ('CISCO-STACKWISE-MIB', 'cswStackPowerStatusGroup'), ('CISCO-STACKWISE-MIB', 'cswStackPowerSwitchStatusGroup'), ('CISCO-STACKWISE-MIB', 'cswStackPowerPortStatusGroup'), ('CISCO-STACKWISE-MIB', 'cswStackPowerNotificationGroup'), ('CISCO-STACKWISE-MIB', 'cswStackPowerAllocatedGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csw_stack_wise_mib_compliance_rev4 = cswStackWiseMIBComplianceRev4.setStatus('current') if mibBuilder.loadTexts: cswStackWiseMIBComplianceRev4.setDescription('The compliance statements for entities described in CISCO-STACKWISE-MIB. Stack Global entities are added in this revision.') csw_status_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 500, 2, 2, 1)).setObjects(('CISCO-STACKWISE-MIB', 'cswMaxSwitchNum'), ('CISCO-STACKWISE-MIB', 'cswMaxSwitchConfigPriority'), ('CISCO-STACKWISE-MIB', 'cswRingRedundant'), ('CISCO-STACKWISE-MIB', 'cswEnableStackNotifications'), ('CISCO-STACKWISE-MIB', 'cswSwitchNumCurrent'), ('CISCO-STACKWISE-MIB', 'cswSwitchNumNextReload'), ('CISCO-STACKWISE-MIB', 'cswSwitchRole'), ('CISCO-STACKWISE-MIB', 'cswSwitchSwPriority'), ('CISCO-STACKWISE-MIB', 'cswSwitchHwPriority'), ('CISCO-STACKWISE-MIB', 'cswSwitchState'), ('CISCO-STACKWISE-MIB', 'cswSwitchMacAddress'), ('CISCO-STACKWISE-MIB', 'cswSwitchSoftwareImage'), ('CISCO-STACKWISE-MIB', 'cswStackPortOperStatus'), ('CISCO-STACKWISE-MIB', 'cswStackPortNeighbor'), ('CISCO-STACKWISE-MIB', 'cswStackPowerType')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csw_status_group = cswStatusGroup.setStatus('deprecated') if mibBuilder.loadTexts: cswStatusGroup.setDescription('A collection of objects that are used for control and status.') csw_notification_group = notification_group((1, 3, 6, 1, 4, 1, 9, 9, 500, 2, 2, 2)).setObjects(('CISCO-STACKWISE-MIB', 'cswStackPortChange'), ('CISCO-STACKWISE-MIB', 'cswStackNewMaster'), ('CISCO-STACKWISE-MIB', 'cswStackMismatch'), ('CISCO-STACKWISE-MIB', 'cswStackRingRedundant'), ('CISCO-STACKWISE-MIB', 'cswStackNewMember'), ('CISCO-STACKWISE-MIB', 'cswStackMemberRemoved')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csw_notification_group = cswNotificationGroup.setStatus('current') if mibBuilder.loadTexts: cswNotificationGroup.setDescription('A collection of notifications that are required.') csw_status_group_rev1 = object_group((1, 3, 6, 1, 4, 1, 9, 9, 500, 2, 2, 3)).setObjects(('CISCO-STACKWISE-MIB', 'cswMaxSwitchNum'), ('CISCO-STACKWISE-MIB', 'cswMaxSwitchConfigPriority'), ('CISCO-STACKWISE-MIB', 'cswRingRedundant'), ('CISCO-STACKWISE-MIB', 'cswSwitchNumCurrent'), ('CISCO-STACKWISE-MIB', 'cswSwitchNumNextReload'), ('CISCO-STACKWISE-MIB', 'cswSwitchRole'), ('CISCO-STACKWISE-MIB', 'cswSwitchSwPriority'), ('CISCO-STACKWISE-MIB', 'cswSwitchHwPriority'), ('CISCO-STACKWISE-MIB', 'cswSwitchState'), ('CISCO-STACKWISE-MIB', 'cswSwitchMacAddress'), ('CISCO-STACKWISE-MIB', 'cswSwitchSoftwareImage')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csw_status_group_rev1 = cswStatusGroupRev1.setStatus('current') if mibBuilder.loadTexts: cswStatusGroupRev1.setDescription('A collection of objects that are used for control and status.') csw_stack_power_status_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 500, 2, 2, 4)).setObjects(('CISCO-STACKWISE-MIB', 'cswStackPowerMode'), ('CISCO-STACKWISE-MIB', 'cswStackPowerMasterMacAddress'), ('CISCO-STACKWISE-MIB', 'cswStackPowerMasterSwitchNum'), ('CISCO-STACKWISE-MIB', 'cswStackPowerNumMembers'), ('CISCO-STACKWISE-MIB', 'cswStackPowerType'), ('CISCO-STACKWISE-MIB', 'cswStackPowerName')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csw_stack_power_status_group = cswStackPowerStatusGroup.setStatus('current') if mibBuilder.loadTexts: cswStackPowerStatusGroup.setDescription('A collection of stack power objects that are used for control and status of power stack.') csw_stack_power_switch_status_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 500, 2, 2, 5)).setObjects(('CISCO-STACKWISE-MIB', 'cswSwitchPowerBudget'), ('CISCO-STACKWISE-MIB', 'cswSwitchPowerCommited'), ('CISCO-STACKWISE-MIB', 'cswSwitchSystemPowerPriority'), ('CISCO-STACKWISE-MIB', 'cswSwitchPoeDevicesLowPriority'), ('CISCO-STACKWISE-MIB', 'cswSwitchPoeDevicesHighPriority')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csw_stack_power_switch_status_group = cswStackPowerSwitchStatusGroup.setStatus('current') if mibBuilder.loadTexts: cswStackPowerSwitchStatusGroup.setDescription('A collection of stack power objects that are used to track the stack power parameters of a switch.') csw_stack_power_port_status_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 500, 2, 2, 6)).setObjects(('CISCO-STACKWISE-MIB', 'cswStackPowerPortOperStatus'), ('CISCO-STACKWISE-MIB', 'cswStackPowerPortNeighborMacAddress'), ('CISCO-STACKWISE-MIB', 'cswStackPowerPortNeighborSwitchNum'), ('CISCO-STACKWISE-MIB', 'cswStackPowerPortLinkStatus'), ('CISCO-STACKWISE-MIB', 'cswStackPowerPortOverCurrentThreshold'), ('CISCO-STACKWISE-MIB', 'cswStackPowerPortName')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csw_stack_power_port_status_group = cswStackPowerPortStatusGroup.setStatus('current') if mibBuilder.loadTexts: cswStackPowerPortStatusGroup.setDescription('A collection of objects that are used for control and status of stack power ports.') csw_stack_power_notification_group = notification_group((1, 3, 6, 1, 4, 1, 9, 9, 500, 2, 2, 7)).setObjects(('CISCO-STACKWISE-MIB', 'cswStackPowerPortLinkStatusChanged'), ('CISCO-STACKWISE-MIB', 'cswStackPowerPortOperStatusChanged'), ('CISCO-STACKWISE-MIB', 'cswStackPowerVersionMismatch'), ('CISCO-STACKWISE-MIB', 'cswStackPowerInvalidTopology'), ('CISCO-STACKWISE-MIB', 'cscwStackPowerBudgetWarrning'), ('CISCO-STACKWISE-MIB', 'cswStackPowerInvalidInputCurrent'), ('CISCO-STACKWISE-MIB', 'cswStackPowerInvalidOutputCurrent'), ('CISCO-STACKWISE-MIB', 'cswStackPowerUnderBudget'), ('CISCO-STACKWISE-MIB', 'cswStackPowerUnbalancedPowerSupplies'), ('CISCO-STACKWISE-MIB', 'cswStackPowerInsufficientPower'), ('CISCO-STACKWISE-MIB', 'cswStackPowerPriorityConflict'), ('CISCO-STACKWISE-MIB', 'cswStackPowerUnderVoltage'), ('CISCO-STACKWISE-MIB', 'cswStackPowerGLS'), ('CISCO-STACKWISE-MIB', 'cswStackPowerILS'), ('CISCO-STACKWISE-MIB', 'cswStackPowerSRLS'), ('CISCO-STACKWISE-MIB', 'cswStackPowerSSLS')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csw_stack_power_notification_group = cswStackPowerNotificationGroup.setStatus('current') if mibBuilder.loadTexts: cswStackPowerNotificationGroup.setDescription('A collection of notifications that are triggered whenever there is either a change in stack power object or an error is encountered.') csw_stack_power_enable_notification_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 500, 2, 2, 8)).setObjects(('CISCO-STACKWISE-MIB', 'cswEnableIndividualStackNotifications')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csw_stack_power_enable_notification_group = cswStackPowerEnableNotificationGroup.setStatus('current') if mibBuilder.loadTexts: cswStackPowerEnableNotificationGroup.setDescription('This group contains the notification enable objects for this MIB.') csw_notification_group_sup1 = notification_group((1, 3, 6, 1, 4, 1, 9, 9, 500, 2, 2, 9)).setObjects(('CISCO-STACKWISE-MIB', 'cswStackMemberToBeReloadedForUpgrade')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csw_notification_group_sup1 = cswNotificationGroupSup1.setStatus('current') if mibBuilder.loadTexts: cswNotificationGroupSup1.setDescription('Additional notification required for data stack.') csw_stack_power_allocated_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 500, 2, 2, 10)).setObjects(('CISCO-STACKWISE-MIB', 'cswSwitchPowerAllocated')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csw_stack_power_allocated_group = cswStackPowerAllocatedGroup.setStatus('current') if mibBuilder.loadTexts: cswStackPowerAllocatedGroup.setDescription('A collection of objects providing the stack power allocation information of a switch.') csw_status_group_rev2 = object_group((1, 3, 6, 1, 4, 1, 9, 9, 500, 2, 2, 11)).setObjects(('CISCO-STACKWISE-MIB', 'cswMaxSwitchNum'), ('CISCO-STACKWISE-MIB', 'cswMaxSwitchConfigPriority'), ('CISCO-STACKWISE-MIB', 'cswRingRedundant'), ('CISCO-STACKWISE-MIB', 'cswSwitchNumCurrent'), ('CISCO-STACKWISE-MIB', 'cswSwitchNumNextReload'), ('CISCO-STACKWISE-MIB', 'cswSwitchRole'), ('CISCO-STACKWISE-MIB', 'cswSwitchSwPriority'), ('CISCO-STACKWISE-MIB', 'cswSwitchHwPriority'), ('CISCO-STACKWISE-MIB', 'cswSwitchState'), ('CISCO-STACKWISE-MIB', 'cswSwitchMacAddress'), ('CISCO-STACKWISE-MIB', 'cswStackDomainNum'), ('CISCO-STACKWISE-MIB', 'cswStackType'), ('CISCO-STACKWISE-MIB', 'cswStackBandWidth')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csw_status_group_rev2 = cswStatusGroupRev2.setStatus('current') if mibBuilder.loadTexts: cswStatusGroupRev2.setDescription('A collection of objects that are used for control and status.') csw_distr_stack_link_status_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 500, 2, 2, 12)).setObjects(('CISCO-STACKWISE-MIB', 'cswDistrStackLinkBundleOperStatus')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csw_distr_stack_link_status_group = cswDistrStackLinkStatusGroup.setStatus('current') if mibBuilder.loadTexts: cswDistrStackLinkStatusGroup.setDescription('A collection object(s) for control and status of the distributed Stack Link.') csw_distr_stack_phy_port_status_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 500, 2, 2, 13)).setObjects(('CISCO-STACKWISE-MIB', 'cswDistrStackPhyPort'), ('CISCO-STACKWISE-MIB', 'cswDistrStackPhyPortOperStatus'), ('CISCO-STACKWISE-MIB', 'cswDistrStackPhyPortNbr'), ('CISCO-STACKWISE-MIB', 'cswDistrStackPhyPortNbrsw')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csw_distr_stack_phy_port_status_group = cswDistrStackPhyPortStatusGroup.setStatus('current') if mibBuilder.loadTexts: cswDistrStackPhyPortStatusGroup.setDescription('A collection of objects for control and status of the distributed stack port') mibBuilder.exportSymbols('CISCO-STACKWISE-MIB', cswDistrStackPhyPort=cswDistrStackPhyPort, cswDistrStackLinkInfoTable=cswDistrStackLinkInfoTable, cswStackPowerPortInfoTable=cswStackPowerPortInfoTable, cswStackInfo=cswStackInfo, cswStatusGroupRev1=cswStatusGroupRev1, cswSwitchMacAddress=cswSwitchMacAddress, cswStackPowerSwitchStatusGroup=cswStackPowerSwitchStatusGroup, cscwStackPowerBudgetWarrning=cscwStackPowerBudgetWarrning, cswStackPowerPortOverCurrentThreshold=cswStackPowerPortOverCurrentThreshold, cswSwitchPoeDevicesHighPriority=cswSwitchPoeDevicesHighPriority, cswDSLindex=cswDSLindex, cswStackPowerStackNumber=cswStackPowerStackNumber, cswStackPowerInfo=cswStackPowerInfo, cswStackNewMember=cswStackNewMember, cswStackPowerInvalidInputCurrent=cswStackPowerInvalidInputCurrent, cswStackPowerEnableNotificationGroup=cswStackPowerEnableNotificationGroup, cswStackPowerInfoTable=cswStackPowerInfoTable, cswStackPowerInfoEntry=cswStackPowerInfoEntry, cswRingRedundant=cswRingRedundant, cswStackPowerPortLinkStatus=cswStackPowerPortLinkStatus, cswStackDomainNum=cswStackDomainNum, cswStackPowerPortNeighborMacAddress=cswStackPowerPortNeighborMacAddress, cswStackWiseMIBComplianceRev1=cswStackWiseMIBComplianceRev1, cswMaxSwitchConfigPriority=cswMaxSwitchConfigPriority, CswSwitchPriority=CswSwitchPriority, cswStackWiseMIBComplianceRev2=cswStackWiseMIBComplianceRev2, cswStackNewMaster=cswStackNewMaster, cswStackPortChange=cswStackPortChange, cswSwitchState=cswSwitchState, cswStackPowerPriorityConflict=cswStackPowerPriorityConflict, cswStackPowerName=cswStackPowerName, cswDistrStackPhyPortStatusGroup=cswDistrStackPhyPortStatusGroup, cswStackPowerUnderVoltage=cswStackPowerUnderVoltage, cswStackPowerPortInfoEntry=cswStackPowerPortInfoEntry, cswStackMemberToBeReloadedForUpgrade=cswStackMemberToBeReloadedForUpgrade, CswPowerStackType=CswPowerStackType, cswStackPortInfoTable=cswStackPortInfoTable, cswStackPowerInvalidTopology=cswStackPowerInvalidTopology, cswStackPowerPortStatusGroup=cswStackPowerPortStatusGroup, cswSwitchPowerCommited=cswSwitchPowerCommited, cswStackBandWidth=cswStackBandWidth, cswStackPowerStatusGroup=cswStackPowerStatusGroup, cswStackPowerMasterMacAddress=cswStackPowerMasterMacAddress, ciscoStackWiseMIB=ciscoStackWiseMIB, cswDistrStackPhyPortOperStatus=cswDistrStackPhyPortOperStatus, cswEnableStackNotifications=cswEnableStackNotifications, ciscoStackWiseMIBConform=ciscoStackWiseMIBConform, cswSwitchPowerAllocated=cswSwitchPowerAllocated, cswStackPowerInsufficientPower=cswStackPowerInsufficientPower, cswStackPowerPortNeighborSwitchNum=cswStackPowerPortNeighborSwitchNum, cswStackPowerPortName=cswStackPowerPortName, cswSwitchInfoTable=cswSwitchInfoTable, cswSwitchPoeDevicesLowPriority=cswSwitchPoeDevicesLowPriority, cswStackWiseMIBCompliances=cswStackWiseMIBCompliances, cswStackPowerPortIndex=cswStackPowerPortIndex, cswSwitchSwPriority=cswSwitchSwPriority, cswSwitchSoftwareImage=cswSwitchSoftwareImage, cswStackWiseMIBComplianceRev3=cswStackWiseMIBComplianceRev3, cswStackMismatch=cswStackMismatch, cswStackPowerType=cswStackPowerType, cswSwitchPowerBudget=cswSwitchPowerBudget, cswDistrStackLinkStatusGroup=cswDistrStackLinkStatusGroup, cswStackPowerVersionMismatch=cswStackPowerVersionMismatch, cswStackPowerSRLS=cswStackPowerSRLS, PYSNMP_MODULE_ID=ciscoStackWiseMIB, cswStackPowerNotificationGroup=cswStackPowerNotificationGroup, cswStatusGroup=cswStatusGroup, cswDistrStackPhyPortNbrsw=cswDistrStackPhyPortNbrsw, cswNotificationGroup=cswNotificationGroup, cswStackPowerGLS=cswStackPowerGLS, cswStackMemberRemoved=cswStackMemberRemoved, cswDistrStackLinkInfoEntry=cswDistrStackLinkInfoEntry, cswSwitchHwPriority=cswSwitchHwPriority, cswStackWiseMIBComplianceRev4=cswStackWiseMIBComplianceRev4, cswStackPowerInvalidOutputCurrent=cswStackPowerInvalidOutputCurrent, cswStackPowerPortLinkStatusChanged=cswStackPowerPortLinkStatusChanged, cswStackPowerPortOperStatus=cswStackPowerPortOperStatus, cswStackPowerUnderBudget=cswStackPowerUnderBudget, cswStackWiseMIBGroups=cswStackWiseMIBGroups, cswStackRingRedundant=cswStackRingRedundant, cswStackType=cswStackType, cswStackPortInfoEntry=cswStackPortInfoEntry, cswStackPortOperStatus=cswStackPortOperStatus, cswStackPowerPortOperStatusChanged=cswStackPowerPortOperStatusChanged, cswStackPowerILS=cswStackPowerILS, cswStackPowerAllocatedGroup=cswStackPowerAllocatedGroup, cswEnableIndividualStackNotifications=cswEnableIndividualStackNotifications, cswDistrStackPhyPortNbr=cswDistrStackPhyPortNbr, cswStatusGroupRev2=cswStatusGroupRev2, CswSwitchNumber=CswSwitchNumber, cswNotificationGroupSup1=cswNotificationGroupSup1, cswMIBNotifications=cswMIBNotifications, cswStackPowerMasterSwitchNum=cswStackPowerMasterSwitchNum, cswGlobals=cswGlobals, cswMaxSwitchNum=cswMaxSwitchNum, CswSwitchNumberOrZero=CswSwitchNumberOrZero, cswStackPowerMode=cswStackPowerMode, ciscoStackWiseMIBNotifs=ciscoStackWiseMIBNotifs, cswStackPortNeighbor=cswStackPortNeighbor, cswDistrStackPhyPortInfoEntry=cswDistrStackPhyPortInfoEntry, cswStackWiseMIBCompliance=cswStackWiseMIBCompliance, cswDistrStackPhyPortInfoTable=cswDistrStackPhyPortInfoTable, CswPowerStackMode=CswPowerStackMode, cswStackPowerSSLS=cswStackPowerSSLS, cswSwitchSystemPowerPriority=cswSwitchSystemPowerPriority, cswSwitchNumCurrent=cswSwitchNumCurrent, ciscoStackWiseMIBObjects=ciscoStackWiseMIBObjects, cswStackPowerNumMembers=cswStackPowerNumMembers, cswSwitchRole=cswSwitchRole, cswDistrStackLinkBundleOperStatus=cswDistrStackLinkBundleOperStatus, cswSwitchNumNextReload=cswSwitchNumNextReload, cswStackPowerUnbalancedPowerSupplies=cswStackPowerUnbalancedPowerSupplies, cswSwitchInfoEntry=cswSwitchInfoEntry)
# _*_ coding: utf-8 _*_ # # Package: src.core.repository.file __all__ = [ "car_repository", "customer_repository", "employee_repository", "file_db", "file_repository", "rental_repository" ]
__all__ = ['car_repository', 'customer_repository', 'employee_repository', 'file_db', 'file_repository', 'rental_repository']
# Write a function to find the longest common prefix string amongst an array of strings. class Solution: # @param {string[]} strs # @return {string} def longestCommonPrefix(self, strs): if not strs: return "" lcp = "" base = strs[0] for i in range(len(base)): for s in strs[1:]: if i > len(s) - 1: return lcp if base[i] != s[i]: return lcp lcp += base[i] return lcp # lcp = "" # for z in zip(*strs): # bag = set(z); # if len(bag) == 1: # lcp += bag.pop() # else: # break # return lcp # 84 ms # lcp = strs[0] # for s in strs[1:]: # i, j, local = 0, 0, "" # while i < len(lcp) and j < len(s): # if lcp[i] != s[j]: # break # local += lcp[j] # i, j = i+1, j+1 # if not local: # return "" # lcp = local # return lcp
class Solution: def longest_common_prefix(self, strs): if not strs: return '' lcp = '' base = strs[0] for i in range(len(base)): for s in strs[1:]: if i > len(s) - 1: return lcp if base[i] != s[i]: return lcp lcp += base[i] return lcp
# # @lc app=leetcode id=32 lang=python3 # # [32] Longest Valid Parentheses # # @lc code=start class Solution: def longestValidParentheses(self, s): if not s: return 0 l = 0 r = len(s) while s[r - 1] == '(' and r > 0: r -= 1 while s[l] == ')' and l < r - 2: l += 1 s = s[l : r] if len(s) < 2: return 0 stack = [-1] mx = 0 for i, p in enumerate(s): if p == '(': stack.append(i) elif p == ')': stack.pop() if not stack: stack.append(i) else: mx = max(mx, i - stack[-1]) return mx # @lc code=end
class Solution: def longest_valid_parentheses(self, s): if not s: return 0 l = 0 r = len(s) while s[r - 1] == '(' and r > 0: r -= 1 while s[l] == ')' and l < r - 2: l += 1 s = s[l:r] if len(s) < 2: return 0 stack = [-1] mx = 0 for (i, p) in enumerate(s): if p == '(': stack.append(i) elif p == ')': stack.pop() if not stack: stack.append(i) else: mx = max(mx, i - stack[-1]) return mx
''' Longest Consecutive Sequence Given an unsorted array of integers, find the length of the longest consecutive elements sequence. For example, Given [100, 4, 200, 1, 3, 2], The longest consecutive elements sequence is [1, 2, 3, 4]. Return its length: 4. Your algorithm should run in O(n) complexity. ''' class Solution(object): def longestConsecutive(self, nums): """ :type nums: List[int] :rtype: int """ if not nums: return 0 if len(nums) == 0: return 0 curLength = 1 maxLength = 1 records = {} for i in range(len(nums)): n = nums[i] if n not in records: records[n] = 1 else: records[n] = records[n] + 1 pre = 0 for i, n in enumerate(sorted(records)): if n == pre + 1 and i > 0: curLength += 1 else: curLength = 1 pre = n maxLength = max(maxLength, curLength) return maxLength nums = [100, 4, 200, 1, 3, 2] s = Solution() print(s.longestConsecutive(nums))
""" Longest Consecutive Sequence Given an unsorted array of integers, find the length of the longest consecutive elements sequence. For example, Given [100, 4, 200, 1, 3, 2], The longest consecutive elements sequence is [1, 2, 3, 4]. Return its length: 4. Your algorithm should run in O(n) complexity. """ class Solution(object): def longest_consecutive(self, nums): """ :type nums: List[int] :rtype: int """ if not nums: return 0 if len(nums) == 0: return 0 cur_length = 1 max_length = 1 records = {} for i in range(len(nums)): n = nums[i] if n not in records: records[n] = 1 else: records[n] = records[n] + 1 pre = 0 for (i, n) in enumerate(sorted(records)): if n == pre + 1 and i > 0: cur_length += 1 else: cur_length = 1 pre = n max_length = max(maxLength, curLength) return maxLength nums = [100, 4, 200, 1, 3, 2] s = solution() print(s.longestConsecutive(nums))
""" Given a binary tree, flatten it to a linked list in-place. For example, given the following tree: 1 / \ 2 5 / \ \ 3 4 6 The flattened tree should look like: 1 \ 2 \ 3 \ 4 \ 5 \ 6 Solution: 1. Recursion (in place) Flatten the left subtree of root, then set it as the right child of root (need to store the previous right child of root). Then set the previous right child of root as the right child of the rightmost node of the flattened left subtree. Make left subtree of root to None 2. Preorder Traversal (Not in place) """ # Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None # Recursion class Solution: def flatten(self, root: TreeNode) -> None: """ Do not return anything, modify root in-place instead. """ while root: if root.left: self.flatten(root.left) left_tail = root.left while left_tail.right: left_tail = left_tail.right right_head = root.right root.right = root.left root.left = None left_tail.right = right_head root = root.right # Preorder Traversal class Solution: def flatten(self, root: TreeNode) -> None: """ Do not return anything, modify root in-place instead. """ if root == None: return root nodes = [] stack = [] dummy = root # preorder while stack or dummy: while dummy != None: stack.append(dummy) nodes.append(dummy.val) dummy = dummy.left dummy = stack.pop() dummy = dummy.right root.left = None cur = root for i in range(1, len(nodes)): node = TreeNode(nodes[i]) cur.right = node cur = cur.right
""" Given a binary tree, flatten it to a linked list in-place. For example, given the following tree: 1 / 2 5 / \\ 3 4 6 The flattened tree should look like: 1 2 3 4 5 6 Solution: 1. Recursion (in place) Flatten the left subtree of root, then set it as the right child of root (need to store the previous right child of root). Then set the previous right child of root as the right child of the rightmost node of the flattened left subtree. Make left subtree of root to None 2. Preorder Traversal (Not in place) """ class Solution: def flatten(self, root: TreeNode) -> None: """ Do not return anything, modify root in-place instead. """ while root: if root.left: self.flatten(root.left) left_tail = root.left while left_tail.right: left_tail = left_tail.right right_head = root.right root.right = root.left root.left = None left_tail.right = right_head root = root.right class Solution: def flatten(self, root: TreeNode) -> None: """ Do not return anything, modify root in-place instead. """ if root == None: return root nodes = [] stack = [] dummy = root while stack or dummy: while dummy != None: stack.append(dummy) nodes.append(dummy.val) dummy = dummy.left dummy = stack.pop() dummy = dummy.right root.left = None cur = root for i in range(1, len(nodes)): node = tree_node(nodes[i]) cur.right = node cur = cur.right