content
stringlengths
7
1.05M
fixed_cases
stringlengths
1
1.28M
def zero(*args): arguments = str(args) current_number = 0 if '+' in arguments: for elem in args: number = current_number if elem == '+None': result = number + current_number return result number_2 = int(elem) result = number + number_2 return result elif '-' in arguments: for elem in args: number = current_number if elem == '-None': result = number - current_number return result number_2 = int(elem) result = number + number_2 return result elif '*' in arguments: for elem in args: number = current_number if elem == '*None': result = number * current_number return result get_number = str(elem) number_2 = int(get_number[-1]) result = number * number_2 return result elif '/' in arguments: for elem in args: number = 0 if elem == '/None': result = number // current_number return result get_number = str(elem) number_2 = int(get_number[-1]) result = number // number_2 return result else: return current_number def one(*args): current_number = 1 arguments = str(args) if '+' in arguments: for elem in args: number = current_number if elem == '+None': result = number + current_number return result number_2 = int(elem) result = number + number_2 return result elif '-' in arguments: for elem in args: number = current_number if elem == '-None': result = number - current_number return result number_2 = int(elem) result = number + number_2 return result elif '*' in arguments: for elem in args: number = current_number if elem == '*None': result = number * current_number return result get_number = str(elem) number_2 = int(get_number[-1]) result = number * number_2 return result elif '/' in arguments: for elem in args: number = current_number if elem == '/None': result = number // current_number return result get_number = str(elem) number_2 = int(get_number[-1]) result = number // number_2 return result else: return current_number def two(*args): current_number = 2 arguments = str(args) if '+' in arguments: for elem in args: number = current_number if elem == '+None': result = number + 2 return result number_2 = int(elem) result = number + number_2 return result elif '-' in arguments: for elem in args: number = current_number if elem == '-None': result = number - current_number return result number_2 = int(elem) result = number + number_2 return result elif '*' in arguments: for elem in args: number = current_number if elem == '*None': result = number * current_number return result get_number = str(elem) number_2 = int(get_number[-1]) result = number * number_2 return result elif '/' in arguments: for elem in args: number = current_number if elem == '/None': result = number // current_number return result get_number = str(elem) number_2 = int(get_number[-1]) result = number // number_2 return result else: return current_number # your code here def three(*args): current_number = 3 arguments = str(args) if '+' in arguments: for elem in args: number = current_number if elem == '+None': result = number + current_number return result number_2 = int(elem) result = number + number_2 return result elif '-' in arguments: for elem in args: number = current_number if elem == '-None': result = number - current_number return result number_2 = int(elem) result = number + number_2 return result elif '*' in arguments: for elem in args: number = current_number if elem == '*None': result = number * current_number return result get_number = str(elem) number_2 = int(get_number[-1]) result = number * number_2 return result elif '/' in arguments: for elem in args: number = current_number if elem == '/None': result = number // current_number return result get_number = str(elem) number_2 = int(get_number[-1]) result = number // number_2 return result else: return current_number def four(*args): current_number = 4 arguments = str(args) if '+' in arguments: for elem in args: number = current_number if elem == '+None': result = number + current_number return result number_2 = int(elem) result = number + number_2 return result elif '-' in arguments: for elem in args: number = current_number if elem == '-None': result = number - current_number return result number_2 = int(elem) result = number + number_2 return result elif '*' in arguments: for elem in args: number = current_number if elem == '*None': result = number * current_number return result get_number = str(elem) number_2 = int(get_number[-1]) result = number * number_2 return result elif '/' in arguments: for elem in args: number = current_number if elem == '/None': result = number // current_number return result get_number = str(elem) number_2 = int(get_number[-1]) result = number // number_2 return result else: return current_number def five(*args): current_number = 5 arguments = str(args) if '+' in arguments: for elem in args: number = current_number if elem == '+None': result = number + current_number return result number_2 = int(elem) result = number + number_2 return result elif '-' in arguments: for elem in args: number = current_number if elem == '-None': result = number - current_number return result number_2 = int(elem) result = number + number_2 return result elif '*' in arguments: for elem in args: number = current_number if elem == '*None': result = number * current_number return result get_number = str(elem) number_2 = int(get_number[-1]) result = number * number_2 return result elif '/' in arguments: for elem in args: number = current_number if elem == '/None': result = number // current_number return result get_number = str(elem) number_2 = int(get_number[-1]) result = number // number_2 return result else: return current_number def six(*args): current_number = 6 arguments = str(args) if '+' in arguments: for elem in args: number = current_number if elem == '+None': result = number + current_number return result number_2 = int(elem) result = number + number_2 return result elif '-' in arguments: for elem in args: number = current_number if elem == '-None': result = number - current_number return result number_2 = int(elem) result = number + number_2 return result elif '*' in arguments: for elem in args: number = current_number if elem == '*None': result = number * current_number return result get_number = str(elem) number_2 = int(get_number[-1]) result = number * number_2 return result elif '/' in arguments: for elem in args: number = current_number if elem == '/None': result = number // current_number return result get_number = str(elem) number_2 = int(get_number[-1]) result = number // number_2 return result else: return current_number def seven(*args): current_number = 7 arguments = str(args) if '+' in arguments: for elem in args: number = current_number if elem == '+None': result = number + current_number return result number_2 = int(elem) result = number + number_2 return result elif '-' in arguments: for elem in args: number = current_number if elem == '-None': result = number - current_number return result number_2 = int(elem) result = number + number_2 return result elif '*' in arguments: for elem in args: number = current_number if elem == '*None': result = number * current_number return result get_number = str(elem) number_2 = int(get_number[-1]) result = number * number_2 return result elif '/' in arguments: for elem in args: number = current_number if elem == '/None': result = number // current_number return result get_number = str(elem) number_2 = int(get_number[-1]) result = number // number_2 return result else: return current_number def eight(*args): current_number = 8 arguments = str(args) if '+' in arguments: for elem in args: number = current_number if elem == '+None': result = number + current_number return result number_2 = int(elem) result = number + number_2 return result elif '-' in arguments: for elem in args: number = current_number if elem == '-None': result = number - current_number return result number_2 = int(elem) result = number + number_2 return result elif '*' in arguments: for elem in args: number = current_number if elem == '*None': result = number * current_number return result get_number = str(elem) number_2 = int(get_number[-1]) result = number * number_2 return result elif '/' in arguments: for elem in args: number = current_number if elem == '/None': result = number // current_number return result get_number = str(elem) number_2 = int(get_number[-1]) result = number // number_2 return result else: return current_number def nine(*args): current_number = 9 arguments = str(args) if '+' in arguments: for elem in args: number = current_number if elem == '+None': result = number + current_number return result number_2 = int(elem) result = number + number_2 return result elif '-' in arguments: for elem in args: number = current_number if elem == '-None': result = number - current_number return result number_2 = int(elem) result = number + number_2 return result elif '*' in arguments: for elem in args: number = current_number if elem == '*None': result = number * current_number return result get_number = str(elem) number_2 = int(get_number[-1]) result = number * number_2 return result elif '/' in arguments: for elem in args: number = current_number if elem == '/None': result = number // current_number return result get_number = str(elem) number_2 = int(get_number[-1]) result = number // number_2 return result else: return current_number def plus(*args): for elem in args: return f"+{elem}" def minus(*args): for elem in args: return f"-{elem}" # your code here def times(*args): for elem in args: return f"*{elem}" def divided_by(*args): for elem in args: return f"/{elem}" """# Validar con los siguientes ejemplos # four(times(five())) # imprime 20 # one(plus(eight())) # imprime 9 # seven(minus(three())) # imprime 4 # nine(divided_by(three())) # imprime 3 """ print(four(times(five()))) # imprime 20 print(one(plus(eight()))) # imprime 9 print(seven(minus(three()))) # imprime 4 print(nine(divided_by(three()))) # imprime 3
def zero(*args): arguments = str(args) current_number = 0 if '+' in arguments: for elem in args: number = current_number if elem == '+None': result = number + current_number return result number_2 = int(elem) result = number + number_2 return result elif '-' in arguments: for elem in args: number = current_number if elem == '-None': result = number - current_number return result number_2 = int(elem) result = number + number_2 return result elif '*' in arguments: for elem in args: number = current_number if elem == '*None': result = number * current_number return result get_number = str(elem) number_2 = int(get_number[-1]) result = number * number_2 return result elif '/' in arguments: for elem in args: number = 0 if elem == '/None': result = number // current_number return result get_number = str(elem) number_2 = int(get_number[-1]) result = number // number_2 return result else: return current_number def one(*args): current_number = 1 arguments = str(args) if '+' in arguments: for elem in args: number = current_number if elem == '+None': result = number + current_number return result number_2 = int(elem) result = number + number_2 return result elif '-' in arguments: for elem in args: number = current_number if elem == '-None': result = number - current_number return result number_2 = int(elem) result = number + number_2 return result elif '*' in arguments: for elem in args: number = current_number if elem == '*None': result = number * current_number return result get_number = str(elem) number_2 = int(get_number[-1]) result = number * number_2 return result elif '/' in arguments: for elem in args: number = current_number if elem == '/None': result = number // current_number return result get_number = str(elem) number_2 = int(get_number[-1]) result = number // number_2 return result else: return current_number def two(*args): current_number = 2 arguments = str(args) if '+' in arguments: for elem in args: number = current_number if elem == '+None': result = number + 2 return result number_2 = int(elem) result = number + number_2 return result elif '-' in arguments: for elem in args: number = current_number if elem == '-None': result = number - current_number return result number_2 = int(elem) result = number + number_2 return result elif '*' in arguments: for elem in args: number = current_number if elem == '*None': result = number * current_number return result get_number = str(elem) number_2 = int(get_number[-1]) result = number * number_2 return result elif '/' in arguments: for elem in args: number = current_number if elem == '/None': result = number // current_number return result get_number = str(elem) number_2 = int(get_number[-1]) result = number // number_2 return result else: return current_number def three(*args): current_number = 3 arguments = str(args) if '+' in arguments: for elem in args: number = current_number if elem == '+None': result = number + current_number return result number_2 = int(elem) result = number + number_2 return result elif '-' in arguments: for elem in args: number = current_number if elem == '-None': result = number - current_number return result number_2 = int(elem) result = number + number_2 return result elif '*' in arguments: for elem in args: number = current_number if elem == '*None': result = number * current_number return result get_number = str(elem) number_2 = int(get_number[-1]) result = number * number_2 return result elif '/' in arguments: for elem in args: number = current_number if elem == '/None': result = number // current_number return result get_number = str(elem) number_2 = int(get_number[-1]) result = number // number_2 return result else: return current_number def four(*args): current_number = 4 arguments = str(args) if '+' in arguments: for elem in args: number = current_number if elem == '+None': result = number + current_number return result number_2 = int(elem) result = number + number_2 return result elif '-' in arguments: for elem in args: number = current_number if elem == '-None': result = number - current_number return result number_2 = int(elem) result = number + number_2 return result elif '*' in arguments: for elem in args: number = current_number if elem == '*None': result = number * current_number return result get_number = str(elem) number_2 = int(get_number[-1]) result = number * number_2 return result elif '/' in arguments: for elem in args: number = current_number if elem == '/None': result = number // current_number return result get_number = str(elem) number_2 = int(get_number[-1]) result = number // number_2 return result else: return current_number def five(*args): current_number = 5 arguments = str(args) if '+' in arguments: for elem in args: number = current_number if elem == '+None': result = number + current_number return result number_2 = int(elem) result = number + number_2 return result elif '-' in arguments: for elem in args: number = current_number if elem == '-None': result = number - current_number return result number_2 = int(elem) result = number + number_2 return result elif '*' in arguments: for elem in args: number = current_number if elem == '*None': result = number * current_number return result get_number = str(elem) number_2 = int(get_number[-1]) result = number * number_2 return result elif '/' in arguments: for elem in args: number = current_number if elem == '/None': result = number // current_number return result get_number = str(elem) number_2 = int(get_number[-1]) result = number // number_2 return result else: return current_number def six(*args): current_number = 6 arguments = str(args) if '+' in arguments: for elem in args: number = current_number if elem == '+None': result = number + current_number return result number_2 = int(elem) result = number + number_2 return result elif '-' in arguments: for elem in args: number = current_number if elem == '-None': result = number - current_number return result number_2 = int(elem) result = number + number_2 return result elif '*' in arguments: for elem in args: number = current_number if elem == '*None': result = number * current_number return result get_number = str(elem) number_2 = int(get_number[-1]) result = number * number_2 return result elif '/' in arguments: for elem in args: number = current_number if elem == '/None': result = number // current_number return result get_number = str(elem) number_2 = int(get_number[-1]) result = number // number_2 return result else: return current_number def seven(*args): current_number = 7 arguments = str(args) if '+' in arguments: for elem in args: number = current_number if elem == '+None': result = number + current_number return result number_2 = int(elem) result = number + number_2 return result elif '-' in arguments: for elem in args: number = current_number if elem == '-None': result = number - current_number return result number_2 = int(elem) result = number + number_2 return result elif '*' in arguments: for elem in args: number = current_number if elem == '*None': result = number * current_number return result get_number = str(elem) number_2 = int(get_number[-1]) result = number * number_2 return result elif '/' in arguments: for elem in args: number = current_number if elem == '/None': result = number // current_number return result get_number = str(elem) number_2 = int(get_number[-1]) result = number // number_2 return result else: return current_number def eight(*args): current_number = 8 arguments = str(args) if '+' in arguments: for elem in args: number = current_number if elem == '+None': result = number + current_number return result number_2 = int(elem) result = number + number_2 return result elif '-' in arguments: for elem in args: number = current_number if elem == '-None': result = number - current_number return result number_2 = int(elem) result = number + number_2 return result elif '*' in arguments: for elem in args: number = current_number if elem == '*None': result = number * current_number return result get_number = str(elem) number_2 = int(get_number[-1]) result = number * number_2 return result elif '/' in arguments: for elem in args: number = current_number if elem == '/None': result = number // current_number return result get_number = str(elem) number_2 = int(get_number[-1]) result = number // number_2 return result else: return current_number def nine(*args): current_number = 9 arguments = str(args) if '+' in arguments: for elem in args: number = current_number if elem == '+None': result = number + current_number return result number_2 = int(elem) result = number + number_2 return result elif '-' in arguments: for elem in args: number = current_number if elem == '-None': result = number - current_number return result number_2 = int(elem) result = number + number_2 return result elif '*' in arguments: for elem in args: number = current_number if elem == '*None': result = number * current_number return result get_number = str(elem) number_2 = int(get_number[-1]) result = number * number_2 return result elif '/' in arguments: for elem in args: number = current_number if elem == '/None': result = number // current_number return result get_number = str(elem) number_2 = int(get_number[-1]) result = number // number_2 return result else: return current_number def plus(*args): for elem in args: return f'+{elem}' def minus(*args): for elem in args: return f'-{elem}' def times(*args): for elem in args: return f'*{elem}' def divided_by(*args): for elem in args: return f'/{elem}' '# Validar con los siguientes ejemplos\n# four(times(five())) # imprime 20\n# one(plus(eight())) # imprime 9\n# seven(minus(three())) # imprime 4\n# nine(divided_by(three())) # imprime 3\n' print(four(times(five()))) print(one(plus(eight()))) print(seven(minus(three()))) print(nine(divided_by(three())))
class ApiError(Exception): """An error status code was returned when querying the HTTP API""" pass class AuthError(ApiError): """An 401 Unauthorized status code was returned when querying the API""" pass class NonUniqueIdentifier(ApiError): pass class ObjectNotFound(ApiError): pass
class Apierror(Exception): """An error status code was returned when querying the HTTP API""" pass class Autherror(ApiError): """An 401 Unauthorized status code was returned when querying the API""" pass class Nonuniqueidentifier(ApiError): pass class Objectnotfound(ApiError): pass
#Pizza #Burger #Fries - > Peri Peri mala # > normal order ="" #initialization print("-----Crunch n Munch-------") while order!="exit" : order = input("Enter your order - ") if order == "pizza" or order == "burger" : print ("Your order is "+order+" Preparation in progress...") continue if order == "fries" : withPeriperi = input("fries with Peri Peri Masala y/n -") if withPeriperi == "y" : order = "Fries with Peri Peri" print ("Your order is "+order+" Preparation in progress...") else : print ("Sorry we don't serve "+order)
order = '' print('-----Crunch n Munch-------') while order != 'exit': order = input('Enter your order - ') if order == 'pizza' or order == 'burger': print('Your order is ' + order + ' Preparation in progress...') continue if order == 'fries': with_periperi = input('fries with Peri Peri Masala y/n -') if withPeriperi == 'y': order = 'Fries with Peri Peri' print('Your order is ' + order + ' Preparation in progress...') else: print("Sorry we don't serve " + order)
""" Parameter retrieval exceptions """ class GetParameterError(Exception): """When a provider raises an exception on parameter retrieval""" class TransformParameterError(Exception): """When a provider fails to transform a parameter value"""
""" Parameter retrieval exceptions """ class Getparametererror(Exception): """When a provider raises an exception on parameter retrieval""" class Transformparametererror(Exception): """When a provider fails to transform a parameter value"""
# Spec: https://docs.python.org/2/library/types.html print(None) # TypeType # print(True) # LOAD_NAME??? print(1) # print(1L) # Long print(1.1) # ComplexType print("abc") # print(u"abc") # Structural below print((1, 2)) # Tuple can be any length, but fixed after declared x = (1,2) print(x[0]) # Tuple can be any length, but fixed after declared print([1, 2, 3]) # print({"first":1,"second":2}) print(int(1)) print(int(1.2)) print(float(1)) print(float(1.2)) assert type(1 - 2) is int assert type(2 / 3) is float x = 1 assert type(x) is int assert type(x - 1) is int a = bytes([1, 2, 3]) print(a) b = bytes([1, 2, 3]) assert a == b try: bytes([object()]) except TypeError: pass a = bytearray([1, 2, 3]) # assert a[1] == 2 assert int() == 0 a = complex(2, 4) assert type(a) is complex assert type(a + a) is complex a = 1 assert a.conjugate() == a a = 12345 b = a*a*a*a*a*a*a*a assert b.bit_length() == 109
print(None) print(1) print(1.1) print('abc') print((1, 2)) x = (1, 2) print(x[0]) print([1, 2, 3]) print(int(1)) print(int(1.2)) print(float(1)) print(float(1.2)) assert type(1 - 2) is int assert type(2 / 3) is float x = 1 assert type(x) is int assert type(x - 1) is int a = bytes([1, 2, 3]) print(a) b = bytes([1, 2, 3]) assert a == b try: bytes([object()]) except TypeError: pass a = bytearray([1, 2, 3]) assert int() == 0 a = complex(2, 4) assert type(a) is complex assert type(a + a) is complex a = 1 assert a.conjugate() == a a = 12345 b = a * a * a * a * a * a * a * a assert b.bit_length() == 109
n = int(input()) v = list(map(int, input().split())) c = list(map(int, input().split())) ans = 0 for i in range(n): xy = v[i] - c[i] if xy > 0: ans += xy print(ans)
n = int(input()) v = list(map(int, input().split())) c = list(map(int, input().split())) ans = 0 for i in range(n): xy = v[i] - c[i] if xy > 0: ans += xy print(ans)
# Hello World # My first python git repo if __name__ == "__main__": print("Hello World")
if __name__ == '__main__': print('Hello World')
class Motor: """ doctest para motor >>> # testando motor >>> motor=Motor() >>> motor.acelerar() >>> motor.velocidade 1 >>> motor.frear() >>> motor.velocidade 0 """ def __init__(self, velocidade=0): self.velocidade = velocidade def acelerar(self): self.velocidade += 1 def frear(self): if self.velocidade > 1: self.velocidade -= 2 elif self.velocidade == 1: self.velocidade -= 1 motor1 = Motor() class Direcao: def __init__(self, direcao='Norte'): self.direcao = direcao def girar_a_direita(self): if self.direcao == 'Norte': self.direcao = 'Leste' elif self.direcao == 'Leste': self.direcao = 'Sul' elif self.direcao == 'Sul': self.direcao = 'Oeste' elif self.direcao == 'Oeste': self.direcao = 'Norte' def girar_a_esquerda(self): if self.direcao == 'Norte': self.direcao = 'Oeste' elif self.direcao == 'Oeste': self.direcao = 'Sul' elif self.direcao == 'Sul': self.direcao = 'Leste' elif self.direcao == 'Leste': self.direcao = 'Norte' direcao1 = Direcao() class Carro: def __init__(self, motor=Motor(), direcao=Direcao()): self.motor = motor self.direcao = direcao def calcular_velocidade(self): return self.motor.velocidade def mostrar_direcao(self): return self.direcao.direcao def acelerar(self): self.motor.acelerar() def frear(self): self.motor.frear() def girar_a_esquerda(self): self.direcao.girar_a_esquerda() def girar_a_direita(self): self.direcao.girar_a_direita() carro = Carro() if __name__ == '__main__': print(carro.calcular_velocidade()) print(carro.mostrar_direcao()) carro.acelerar() carro.acelerar() print(carro.calcular_velocidade()) carro.frear() print(carro.calcular_velocidade()) carro.girar_a_esquerda() carro.girar_a_esquerda() print(carro.mostrar_direcao())
class Motor: """ doctest para motor >>> # testando motor >>> motor=Motor() >>> motor.acelerar() >>> motor.velocidade 1 >>> motor.frear() >>> motor.velocidade 0 """ def __init__(self, velocidade=0): self.velocidade = velocidade def acelerar(self): self.velocidade += 1 def frear(self): if self.velocidade > 1: self.velocidade -= 2 elif self.velocidade == 1: self.velocidade -= 1 motor1 = motor() class Direcao: def __init__(self, direcao='Norte'): self.direcao = direcao def girar_a_direita(self): if self.direcao == 'Norte': self.direcao = 'Leste' elif self.direcao == 'Leste': self.direcao = 'Sul' elif self.direcao == 'Sul': self.direcao = 'Oeste' elif self.direcao == 'Oeste': self.direcao = 'Norte' def girar_a_esquerda(self): if self.direcao == 'Norte': self.direcao = 'Oeste' elif self.direcao == 'Oeste': self.direcao = 'Sul' elif self.direcao == 'Sul': self.direcao = 'Leste' elif self.direcao == 'Leste': self.direcao = 'Norte' direcao1 = direcao() class Carro: def __init__(self, motor=motor(), direcao=direcao()): self.motor = motor self.direcao = direcao def calcular_velocidade(self): return self.motor.velocidade def mostrar_direcao(self): return self.direcao.direcao def acelerar(self): self.motor.acelerar() def frear(self): self.motor.frear() def girar_a_esquerda(self): self.direcao.girar_a_esquerda() def girar_a_direita(self): self.direcao.girar_a_direita() carro = carro() if __name__ == '__main__': print(carro.calcular_velocidade()) print(carro.mostrar_direcao()) carro.acelerar() carro.acelerar() print(carro.calcular_velocidade()) carro.frear() print(carro.calcular_velocidade()) carro.girar_a_esquerda() carro.girar_a_esquerda() print(carro.mostrar_direcao())
def bingo(array): ctr = 0 for i in [2, 9, 14, 7, 15]: if i in list(set(array)): ctr += 1 if ctr == 5: return "WIN" else: return "LOSE"
def bingo(array): ctr = 0 for i in [2, 9, 14, 7, 15]: if i in list(set(array)): ctr += 1 if ctr == 5: return 'WIN' else: return 'LOSE'
# # PySNMP MIB module CISCO-PSM-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-PSM-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 17:39:07 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsIntersection, ValueRangeConstraint, ValueSizeConstraint, ConstraintsUnion, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ValueRangeConstraint", "ValueSizeConstraint", "ConstraintsUnion", "SingleValueConstraint") ciscoMgmt, = mibBuilder.importSymbols("CISCO-SMI", "ciscoMgmt") FcNameId, DomainId, PortMemberList, DomainIdOrZero, FcNameIdOrZero = mibBuilder.importSymbols("CISCO-ST-TC", "FcNameId", "DomainId", "PortMemberList", "DomainIdOrZero", "FcNameIdOrZero") vsanIndex, = mibBuilder.importSymbols("CISCO-VSAN-MIB", "vsanIndex") InterfaceIndex, InterfaceIndexOrZero = mibBuilder.importSymbols("IF-MIB", "InterfaceIndex", "InterfaceIndexOrZero") ModuleCompliance, ObjectGroup, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "ObjectGroup", "NotificationGroup") IpAddress, Unsigned32, TimeTicks, MibIdentifier, iso, ObjectIdentity, MibScalar, MibTable, MibTableRow, MibTableColumn, Counter64, NotificationType, Counter32, Gauge32, Bits, ModuleIdentity, Integer32 = mibBuilder.importSymbols("SNMPv2-SMI", "IpAddress", "Unsigned32", "TimeTicks", "MibIdentifier", "iso", "ObjectIdentity", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter64", "NotificationType", "Counter32", "Gauge32", "Bits", "ModuleIdentity", "Integer32") TimeStamp, RowStatus, TruthValue, DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "TimeStamp", "RowStatus", "TruthValue", "DisplayString", "TextualConvention") ciscoPsmMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 9, 9, 364)) ciscoPsmMIB.setRevisions(('2004-10-15 00:00', '2004-03-16 00:00', '2003-11-27 00:00', '2003-11-10 00:00', '2003-10-17 00:00', '2003-10-06 00:00', '2003-08-07 00:00',)) if mibBuilder.loadTexts: ciscoPsmMIB.setLastUpdated('200410150000Z') if mibBuilder.loadTexts: ciscoPsmMIB.setOrganization('Cisco Systems Inc.') ciscoPsmMIBNotifs = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 364, 0)) ciscoPsmMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 364, 1)) ciscoPsmMIBConform = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 364, 2)) cpsmConfiguration = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1)) cpsmStats = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2)) class CpsmVirtNwType(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2)) namedValues = NamedValues(("vsan", 1), ("vlan", 2)) class CpsmPortBindDevType(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5)) namedValues = NamedValues(("mac", 1), ("nWwn", 2), ("pWwn", 3), ("sWwn", 4), ("wildCard", 5)) class CpsmPortBindSwPortType(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4)) namedValues = NamedValues(("fwwn", 1), ("intfIndex", 2), ("wildCard", 3), ("swwn", 4)) class CpsmDbActivate(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6)) namedValues = NamedValues(("activate", 1), ("activateWithAutoLearnOff", 2), ("forceActivate", 3), ("forceActivateWithAutoLearnOff", 4), ("deactivate", 5), ("noop", 6)) class CpsmActivateResult(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6)) namedValues = NamedValues(("success", 1), ("actFailNullDb", 2), ("actFailConflictDb", 3), ("actFailSystemErr", 4), ("actFailAutoLearnOn", 5), ("deactFailNoActive", 6)) class CpsmAutoLearnEnable(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2)) namedValues = NamedValues(("on", 1), ("off", 2)) class CpsmClearStats(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2)) namedValues = NamedValues(("clear", 1), ("noop", 2)) class CpsmClearAutoLearnDb(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3)) namedValues = NamedValues(("clearOnVsan", 1), ("clearOnIntf", 2), ("noop", 3)) class CpsmDiffDb(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3)) namedValues = NamedValues(("configDb", 1), ("activeDb", 2), ("noop", 3)) class CpsmDiffReason(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3)) namedValues = NamedValues(("extra", 1), ("missing", 2), ("conflict", 3)) class CpsmStatsCounter(TextualConvention, Unsigned32): status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(0, 4294967295) class CpsmViolationReasonCode(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5)) namedValues = NamedValues(("unknown", 1), ("noSwwn", 2), ("domIdMismatch", 3), ("efmdDbMismatch", 4), ("noRespFromRemote", 5)) cpsmPortBindTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 1), ) if mibBuilder.loadTexts: cpsmPortBindTable.setStatus('current') cpsmPortBindEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 1, 1), ).setIndexNames((0, "CISCO-PSM-MIB", "cpsmPortBindNwType"), (0, "CISCO-PSM-MIB", "cpsmPortBindNwIndex"), (0, "CISCO-PSM-MIB", "cpsmPortBindIndex")) if mibBuilder.loadTexts: cpsmPortBindEntry.setStatus('current') cpsmPortBindNwType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 1, 1, 1), CpsmVirtNwType()) if mibBuilder.loadTexts: cpsmPortBindNwType.setStatus('current') cpsmPortBindNwIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 1, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4093))) if mibBuilder.loadTexts: cpsmPortBindNwIndex.setStatus('current') cpsmPortBindIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 1, 1, 3), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4096))) if mibBuilder.loadTexts: cpsmPortBindIndex.setStatus('current') cpsmPortBindLoginDevType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 1, 1, 4), CpsmPortBindDevType().clone('pWwn')).setMaxAccess("readcreate") if mibBuilder.loadTexts: cpsmPortBindLoginDevType.setStatus('current') cpsmPortBindLoginDev = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 1, 1, 5), OctetString().subtype(subtypeSpec=ConstraintsUnion(ValueSizeConstraint(0, 0), ValueSizeConstraint(6, 6), ValueSizeConstraint(8, 8), ))).setMaxAccess("readcreate") if mibBuilder.loadTexts: cpsmPortBindLoginDev.setStatus('current') cpsmPortBindLoginPointType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 1, 1, 6), CpsmPortBindSwPortType().clone('fwwn')).setMaxAccess("readcreate") if mibBuilder.loadTexts: cpsmPortBindLoginPointType.setStatus('current') cpsmPortBindLoginPoint = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 1, 1, 7), OctetString().subtype(subtypeSpec=ConstraintsUnion(ValueSizeConstraint(0, 0), ValueSizeConstraint(4, 4), ValueSizeConstraint(8, 8), ))).setMaxAccess("readcreate") if mibBuilder.loadTexts: cpsmPortBindLoginPoint.setStatus('current') cpsmPortBindRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 1, 1, 8), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: cpsmPortBindRowStatus.setStatus('current') cpsmPortBindActivateTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 2), ) if mibBuilder.loadTexts: cpsmPortBindActivateTable.setStatus('current') cpsmPortBindActivateEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 2, 1), ).setIndexNames((0, "CISCO-PSM-MIB", "cpsmPortBindNwType"), (0, "CISCO-PSM-MIB", "cpsmPortBindNwIndex")) if mibBuilder.loadTexts: cpsmPortBindActivateEntry.setStatus('current') cpsmPortBindActivate = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 2, 1, 1), CpsmDbActivate()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cpsmPortBindActivate.setStatus('current') cpsmPortBindResult = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 2, 1, 2), CpsmActivateResult()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmPortBindResult.setStatus('current') cpsmPortBindLastActTime = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 2, 1, 3), TimeStamp()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmPortBindLastActTime.setStatus('current') cpsmPortBindActState = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 2, 1, 4), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmPortBindActState.setStatus('current') cpsmFabricBindTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 3), ) if mibBuilder.loadTexts: cpsmFabricBindTable.setStatus('current') cpsmFabricBindEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 3, 1), ).setIndexNames((0, "CISCO-PSM-MIB", "cpsmFabricBindNwType"), (0, "CISCO-PSM-MIB", "cpsmFabricBindNwIndex"), (0, "CISCO-PSM-MIB", "cpsmFabricBindIndex")) if mibBuilder.loadTexts: cpsmFabricBindEntry.setStatus('current') cpsmFabricBindNwType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 3, 1, 1), CpsmVirtNwType()) if mibBuilder.loadTexts: cpsmFabricBindNwType.setStatus('current') cpsmFabricBindNwIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 3, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4093))) if mibBuilder.loadTexts: cpsmFabricBindNwIndex.setStatus('current') cpsmFabricBindIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 3, 1, 3), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4096))) if mibBuilder.loadTexts: cpsmFabricBindIndex.setStatus('current') cpsmFabricBindSwitchWwn = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 3, 1, 4), OctetString().subtype(subtypeSpec=ValueSizeConstraint(8, 8)).setFixedLength(8)).setMaxAccess("readcreate") if mibBuilder.loadTexts: cpsmFabricBindSwitchWwn.setStatus('current') cpsmFabricBindDomId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 3, 1, 5), DomainId()).setMaxAccess("readcreate") if mibBuilder.loadTexts: cpsmFabricBindDomId.setStatus('current') cpsmFabricBindRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 3, 1, 6), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: cpsmFabricBindRowStatus.setStatus('current') cpsmFabricBindActivateTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 4), ) if mibBuilder.loadTexts: cpsmFabricBindActivateTable.setStatus('current') cpsmFabricBindActivateEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 4, 1), ).setIndexNames((0, "CISCO-PSM-MIB", "cpsmFabricBindNwType"), (0, "CISCO-PSM-MIB", "cpsmFabricBindNwIndex")) if mibBuilder.loadTexts: cpsmFabricBindActivateEntry.setStatus('current') cpsmFabricBindActivate = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 4, 1, 1), CpsmDbActivate()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cpsmFabricBindActivate.setStatus('current') cpsmFabricBindResult = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 4, 1, 2), CpsmActivateResult()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmFabricBindResult.setStatus('current') cpsmFabricBindLastActTime = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 4, 1, 3), TimeStamp()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmFabricBindLastActTime.setStatus('current') cpsmFabricBindActState = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 4, 1, 4), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmFabricBindActState.setStatus('current') cpsmPortBindCopyTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 5), ) if mibBuilder.loadTexts: cpsmPortBindCopyTable.setStatus('current') cpsmPortBindCopyEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 5, 1), ).setIndexNames((0, "CISCO-PSM-MIB", "cpsmPortBindNwType"), (0, "CISCO-PSM-MIB", "cpsmPortBindNwIndex")) if mibBuilder.loadTexts: cpsmPortBindCopyEntry.setStatus('current') cpsmPortBindCopyActToConfig = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 5, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("copy", 1), ("noop", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: cpsmPortBindCopyActToConfig.setStatus('current') cpsmPortBindLastChangeTime = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 5, 1, 2), TimeStamp()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmPortBindLastChangeTime.setStatus('current') cpsmFabricBindCopyTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 6), ) if mibBuilder.loadTexts: cpsmFabricBindCopyTable.setStatus('current') cpsmFabricBindCopyEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 6, 1), ).setIndexNames((0, "CISCO-PSM-MIB", "cpsmFabricBindNwType"), (0, "CISCO-PSM-MIB", "cpsmFabricBindNwIndex")) if mibBuilder.loadTexts: cpsmFabricBindCopyEntry.setStatus('current') cpsmFabricBindCopyActToConfig = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 6, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("copy", 1), ("noop", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: cpsmFabricBindCopyActToConfig.setStatus('current') cpsmFabricBindLastChangeTime = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 6, 1, 2), TimeStamp()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmFabricBindLastChangeTime.setStatus('current') cpsmPortBindEnfTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 7), ) if mibBuilder.loadTexts: cpsmPortBindEnfTable.setStatus('current') cpsmPortBindEnfEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 7, 1), ).setIndexNames((0, "CISCO-PSM-MIB", "cpsmPortBindEnfNwType"), (0, "CISCO-PSM-MIB", "cpsmPortBindEnfNwIndex"), (0, "CISCO-PSM-MIB", "cpsmPortBindEnfIndex")) if mibBuilder.loadTexts: cpsmPortBindEnfEntry.setStatus('current') cpsmPortBindEnfNwType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 7, 1, 1), CpsmVirtNwType()) if mibBuilder.loadTexts: cpsmPortBindEnfNwType.setStatus('current') cpsmPortBindEnfNwIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 7, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4093))) if mibBuilder.loadTexts: cpsmPortBindEnfNwIndex.setStatus('current') cpsmPortBindEnfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 7, 1, 3), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4096))) if mibBuilder.loadTexts: cpsmPortBindEnfIndex.setStatus('current') cpsmPortBindEnfLoginDevType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 7, 1, 4), CpsmPortBindDevType()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmPortBindEnfLoginDevType.setStatus('current') cpsmPortBindEnfLoginDev = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 7, 1, 5), OctetString().subtype(subtypeSpec=ConstraintsUnion(ValueSizeConstraint(0, 0), ValueSizeConstraint(6, 6), ValueSizeConstraint(8, 8), ))).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmPortBindEnfLoginDev.setStatus('current') cpsmPortBindEnfLoginPointType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 7, 1, 6), CpsmPortBindSwPortType()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmPortBindEnfLoginPointType.setStatus('current') cpsmPortBindEnfLoginPoint = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 7, 1, 7), OctetString().subtype(subtypeSpec=ConstraintsUnion(ValueSizeConstraint(0, 0), ValueSizeConstraint(4, 4), ValueSizeConstraint(8, 8), ))).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmPortBindEnfLoginPoint.setStatus('current') cpsmPortBindEnfIsLearnt = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 7, 1, 8), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmPortBindEnfIsLearnt.setStatus('current') cpsmFabricBindEnfTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 8), ) if mibBuilder.loadTexts: cpsmFabricBindEnfTable.setStatus('current') cpsmFabricBindEnfEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 8, 1), ).setIndexNames((0, "CISCO-PSM-MIB", "cpsmFabricBindEnfNwType"), (0, "CISCO-PSM-MIB", "cpsmFabricBindEnfNwIndex"), (0, "CISCO-PSM-MIB", "cpsmFabricBindEnfIndex")) if mibBuilder.loadTexts: cpsmFabricBindEnfEntry.setStatus('current') cpsmFabricBindEnfNwType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 8, 1, 1), CpsmVirtNwType()) if mibBuilder.loadTexts: cpsmFabricBindEnfNwType.setStatus('current') cpsmFabricBindEnfNwIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 8, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4093))) if mibBuilder.loadTexts: cpsmFabricBindEnfNwIndex.setStatus('current') cpsmFabricBindEnfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 8, 1, 3), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4096))) if mibBuilder.loadTexts: cpsmFabricBindEnfIndex.setStatus('current') cpsmFabricBindEnfSwitchWwn = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 8, 1, 4), OctetString().subtype(subtypeSpec=ValueSizeConstraint(8, 8)).setFixedLength(8)).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmFabricBindEnfSwitchWwn.setStatus('current') cpsmFabricBindEnfDomId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 8, 1, 5), DomainId()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmFabricBindEnfDomId.setStatus('current') cpsmFabricBindEnfIsLearnt = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 8, 1, 6), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmFabricBindEnfIsLearnt.setStatus('current') cpsmPortBindAutoLearnTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 9), ) if mibBuilder.loadTexts: cpsmPortBindAutoLearnTable.setStatus('current') cpsmPortBindAutoLearnEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 9, 1), ).setIndexNames((0, "CISCO-PSM-MIB", "cpsmPortBindAutoLearnIndexType"), (0, "CISCO-PSM-MIB", "cpsmPortBindAutoLearnIndex")) if mibBuilder.loadTexts: cpsmPortBindAutoLearnEntry.setStatus('current') cpsmPortBindAutoLearnIndexType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 9, 1, 1), CpsmVirtNwType()) if mibBuilder.loadTexts: cpsmPortBindAutoLearnIndexType.setStatus('current') cpsmPortBindAutoLearnIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 9, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4093))) if mibBuilder.loadTexts: cpsmPortBindAutoLearnIndex.setStatus('current') cpsmPortBindAutoLearnEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 9, 1, 3), CpsmAutoLearnEnable().clone('off')).setMaxAccess("readwrite") if mibBuilder.loadTexts: cpsmPortBindAutoLearnEnable.setStatus('current') cpsmFabricBindAutoLearnTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 10), ) if mibBuilder.loadTexts: cpsmFabricBindAutoLearnTable.setStatus('deprecated') cpsmFabricBindAutoLearnEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 10, 1), ).setIndexNames((0, "CISCO-PSM-MIB", "cpsmFabricBindAutoLearnIndexType"), (0, "CISCO-PSM-MIB", "cpsmFabricBindAutoLearnIndex")) if mibBuilder.loadTexts: cpsmFabricBindAutoLearnEntry.setStatus('deprecated') cpsmFabricBindAutoLearnIndexType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 10, 1, 1), CpsmVirtNwType()) if mibBuilder.loadTexts: cpsmFabricBindAutoLearnIndexType.setStatus('deprecated') cpsmFabricBindAutoLearnIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 10, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4093))) if mibBuilder.loadTexts: cpsmFabricBindAutoLearnIndex.setStatus('deprecated') cpsmFabricBindAutoLearnEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 10, 1, 3), CpsmAutoLearnEnable().clone('off')).setMaxAccess("readwrite") if mibBuilder.loadTexts: cpsmFabricBindAutoLearnEnable.setStatus('deprecated') cpsmPortBindClearTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 11), ) if mibBuilder.loadTexts: cpsmPortBindClearTable.setStatus('current') cpsmPortBindClearEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 11, 1), ).setIndexNames((0, "CISCO-PSM-MIB", "cpsmPortBindClearNwType"), (0, "CISCO-PSM-MIB", "cpsmPortBindClearNwIndex")) if mibBuilder.loadTexts: cpsmPortBindClearEntry.setStatus('current') cpsmPortBindClearNwType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 11, 1, 1), CpsmVirtNwType()) if mibBuilder.loadTexts: cpsmPortBindClearNwType.setStatus('current') cpsmPortBindClearNwIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 11, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4093))) if mibBuilder.loadTexts: cpsmPortBindClearNwIndex.setStatus('current') cpsmPortBindClearStats = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 11, 1, 3), CpsmClearStats()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cpsmPortBindClearStats.setStatus('current') cpsmPortBindClearAutoLearnDb = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 11, 1, 4), CpsmClearAutoLearnDb()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cpsmPortBindClearAutoLearnDb.setStatus('current') cpsmPortBindClearAutoLearnIntf = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 11, 1, 5), PortMemberList().clone(hexValue="")).setMaxAccess("readwrite") if mibBuilder.loadTexts: cpsmPortBindClearAutoLearnIntf.setStatus('current') cpsmFabricBindClearTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 12), ) if mibBuilder.loadTexts: cpsmFabricBindClearTable.setStatus('current') cpsmFabricBindClearEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 12, 1), ).setIndexNames((0, "CISCO-PSM-MIB", "cpsmFabricBindClearNwType"), (0, "CISCO-PSM-MIB", "cpsmFabricBindClearNwIndex")) if mibBuilder.loadTexts: cpsmFabricBindClearEntry.setStatus('current') cpsmFabricBindClearNwType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 12, 1, 1), CpsmVirtNwType()) if mibBuilder.loadTexts: cpsmFabricBindClearNwType.setStatus('current') cpsmFabricBindClearNwIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 12, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4093))) if mibBuilder.loadTexts: cpsmFabricBindClearNwIndex.setStatus('current') cpsmFabricBindClearStats = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 12, 1, 3), CpsmClearStats()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cpsmFabricBindClearStats.setStatus('current') cpsmFabricBindClearAutoLearnDb = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 12, 1, 4), CpsmClearAutoLearnDb()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cpsmFabricBindClearAutoLearnDb.setStatus('current') cpsmFabricBindClearAutoLearnIntf = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 12, 1, 5), InterfaceIndexOrZero()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cpsmFabricBindClearAutoLearnIntf.setStatus('deprecated') cpsmPortBindDiffConfigTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 13), ) if mibBuilder.loadTexts: cpsmPortBindDiffConfigTable.setStatus('current') cpsmPortBindDiffConfigEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 13, 1), ).setIndexNames((0, "CISCO-PSM-MIB", "cpsmPortBindDiffConfigNwType"), (0, "CISCO-PSM-MIB", "cpsmPortBindDiffConfigNwIndex")) if mibBuilder.loadTexts: cpsmPortBindDiffConfigEntry.setStatus('current') cpsmPortBindDiffConfigNwType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 13, 1, 1), CpsmVirtNwType()) if mibBuilder.loadTexts: cpsmPortBindDiffConfigNwType.setStatus('current') cpsmPortBindDiffConfigNwIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 13, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4093))) if mibBuilder.loadTexts: cpsmPortBindDiffConfigNwIndex.setStatus('current') cpsmPortBindDiffConfigDb = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 13, 1, 3), CpsmDiffDb()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cpsmPortBindDiffConfigDb.setStatus('current') cpsmPortBindDiffTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 14), ) if mibBuilder.loadTexts: cpsmPortBindDiffTable.setStatus('current') cpsmPortBindDiffEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 14, 1), ).setIndexNames((0, "CISCO-PSM-MIB", "cpsmPortBindDiffNwType"), (0, "CISCO-PSM-MIB", "cpsmPortBindDiffNwIndex"), (0, "CISCO-PSM-MIB", "cpsmPortBindDiffIndex")) if mibBuilder.loadTexts: cpsmPortBindDiffEntry.setStatus('current') cpsmPortBindDiffNwType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 14, 1, 1), CpsmVirtNwType()) if mibBuilder.loadTexts: cpsmPortBindDiffNwType.setStatus('current') cpsmPortBindDiffNwIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 14, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4093))) if mibBuilder.loadTexts: cpsmPortBindDiffNwIndex.setStatus('current') cpsmPortBindDiffIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 14, 1, 3), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4096))) if mibBuilder.loadTexts: cpsmPortBindDiffIndex.setStatus('current') cpsmPortBindDiffReason = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 14, 1, 4), CpsmDiffReason()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmPortBindDiffReason.setStatus('current') cpsmPortBindDiffLoginDevType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 14, 1, 5), CpsmPortBindDevType()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmPortBindDiffLoginDevType.setStatus('current') cpsmPortBindDiffLoginDev = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 14, 1, 6), OctetString().subtype(subtypeSpec=ConstraintsUnion(ValueSizeConstraint(0, 0), ValueSizeConstraint(6, 6), ValueSizeConstraint(8, 8), ))).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmPortBindDiffLoginDev.setStatus('current') cpsmPortBindDiffLoginPointType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 14, 1, 7), CpsmPortBindSwPortType()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmPortBindDiffLoginPointType.setStatus('current') cpsmPortBindDiffLoginPoint = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 14, 1, 8), OctetString().subtype(subtypeSpec=ConstraintsUnion(ValueSizeConstraint(0, 0), ValueSizeConstraint(4, 4), ValueSizeConstraint(8, 8), ))).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmPortBindDiffLoginPoint.setStatus('current') cpsmFabricBindDiffConfigTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 15), ) if mibBuilder.loadTexts: cpsmFabricBindDiffConfigTable.setStatus('current') cpsmFabricBindDiffConfigEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 15, 1), ).setIndexNames((0, "CISCO-PSM-MIB", "cpsmFabricBindDiffConfigNwType"), (0, "CISCO-PSM-MIB", "cpsmFabricBindDiffConfigNwIndex")) if mibBuilder.loadTexts: cpsmFabricBindDiffConfigEntry.setStatus('current') cpsmFabricBindDiffConfigNwType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 15, 1, 1), CpsmVirtNwType()) if mibBuilder.loadTexts: cpsmFabricBindDiffConfigNwType.setStatus('current') cpsmFabricBindDiffConfigNwIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 15, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4093))) if mibBuilder.loadTexts: cpsmFabricBindDiffConfigNwIndex.setStatus('current') cpsmFabricBindDiffConfigDb = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 15, 1, 3), CpsmDiffDb()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cpsmFabricBindDiffConfigDb.setStatus('current') cpsmFabricBindDiffTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 16), ) if mibBuilder.loadTexts: cpsmFabricBindDiffTable.setStatus('current') cpsmFabricBindDiffEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 16, 1), ).setIndexNames((0, "CISCO-PSM-MIB", "cpsmFabricBindDiffNwType"), (0, "CISCO-PSM-MIB", "cpsmFabricBindDiffNwIndex"), (0, "CISCO-PSM-MIB", "cpsmFabricBindDiffIndex")) if mibBuilder.loadTexts: cpsmFabricBindDiffEntry.setStatus('current') cpsmFabricBindDiffNwType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 16, 1, 1), CpsmVirtNwType()) if mibBuilder.loadTexts: cpsmFabricBindDiffNwType.setStatus('current') cpsmFabricBindDiffNwIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 16, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4093))) if mibBuilder.loadTexts: cpsmFabricBindDiffNwIndex.setStatus('current') cpsmFabricBindDiffIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 16, 1, 3), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4096))) if mibBuilder.loadTexts: cpsmFabricBindDiffIndex.setStatus('current') cpsmFabricBindDiffReason = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 16, 1, 4), CpsmDiffReason()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmFabricBindDiffReason.setStatus('current') cpsmFabricBindDiffSwitchWwn = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 16, 1, 5), OctetString().subtype(subtypeSpec=ValueSizeConstraint(8, 8)).setFixedLength(8)).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmFabricBindDiffSwitchWwn.setStatus('current') cpsmFabricBindDiffDomId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 16, 1, 6), DomainId()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmFabricBindDiffDomId.setStatus('current') cpsmPortBindStatsTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 1), ) if mibBuilder.loadTexts: cpsmPortBindStatsTable.setStatus('current') cpsmPortBindStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 1, 1), ).setIndexNames((0, "CISCO-PSM-MIB", "cpsmPortBindVsanVlanType"), (0, "CISCO-PSM-MIB", "cpsmPortBindVsanVlanIndex")) if mibBuilder.loadTexts: cpsmPortBindStatsEntry.setStatus('current') cpsmPortBindVsanVlanType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 1, 1, 1), CpsmVirtNwType()) if mibBuilder.loadTexts: cpsmPortBindVsanVlanType.setStatus('current') cpsmPortBindVsanVlanIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 1, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4093))) if mibBuilder.loadTexts: cpsmPortBindVsanVlanIndex.setStatus('current') cpsmPortBindAllowedLogins = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 1, 1, 3), CpsmStatsCounter()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmPortBindAllowedLogins.setStatus('current') cpsmPortBindDeniedLogins = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 1, 1, 4), CpsmStatsCounter()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmPortBindDeniedLogins.setStatus('current') cpsmFabricBindStatsTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 2), ) if mibBuilder.loadTexts: cpsmFabricBindStatsTable.setStatus('current') cpsmFabricBindStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 2, 1), ).setIndexNames((0, "CISCO-PSM-MIB", "cpsmFabricBindVsanVlanType"), (0, "CISCO-PSM-MIB", "cpsmFabricBindVsanVlanIndex")) if mibBuilder.loadTexts: cpsmFabricBindStatsEntry.setStatus('current') cpsmFabricBindVsanVlanType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 2, 1, 1), CpsmVirtNwType()) if mibBuilder.loadTexts: cpsmFabricBindVsanVlanType.setStatus('current') cpsmFabricBindVsanVlanIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 2, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4093))) if mibBuilder.loadTexts: cpsmFabricBindVsanVlanIndex.setStatus('current') cpsmFabricBindAllowedReqs = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 2, 1, 3), CpsmStatsCounter()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmFabricBindAllowedReqs.setStatus('current') cpsmFabricBindDeniedReqs = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 2, 1, 4), CpsmStatsCounter()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmFabricBindDeniedReqs.setStatus('current') cpsmPortBindViolationTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 3), ) if mibBuilder.loadTexts: cpsmPortBindViolationTable.setStatus('current') cpsmPortBindViolationEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 3, 1), ).setIndexNames((0, "CISCO-PSM-MIB", "cpsmPortBindViolationNwType"), (0, "CISCO-PSM-MIB", "cpsmPortBindViolationNwIndex"), (0, "CISCO-PSM-MIB", "cpsmPortBindViolationIndex")) if mibBuilder.loadTexts: cpsmPortBindViolationEntry.setStatus('current') cpsmPortBindViolationNwType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 3, 1, 1), CpsmVirtNwType()) if mibBuilder.loadTexts: cpsmPortBindViolationNwType.setStatus('current') cpsmPortBindViolationNwIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 3, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4093))) if mibBuilder.loadTexts: cpsmPortBindViolationNwIndex.setStatus('current') cpsmPortBindViolationIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 3, 1, 3), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 100))) if mibBuilder.loadTexts: cpsmPortBindViolationIndex.setStatus('current') cpsmPortBindLoginPwwn = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 3, 1, 4), FcNameIdOrZero()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmPortBindLoginPwwn.setStatus('current') cpsmPortBindLoginNwwn = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 3, 1, 5), FcNameIdOrZero()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmPortBindLoginNwwn.setStatus('current') cpsmPortBindLoginSwwn = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 3, 1, 6), FcNameIdOrZero()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmPortBindLoginSwwn.setStatus('current') cpsmPortBindLoginPort = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 3, 1, 7), FcNameId()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmPortBindLoginPort.setStatus('current') cpsmPortBindLoginTime = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 3, 1, 8), TimeStamp()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmPortBindLoginTime.setStatus('current') cpsmPortBindLoginCount = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 3, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmPortBindLoginCount.setStatus('current') cpsmPortBindLoginIntf = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 3, 1, 10), InterfaceIndex()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmPortBindLoginIntf.setStatus('current') cpsmFabricBindViolationTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 4), ) if mibBuilder.loadTexts: cpsmFabricBindViolationTable.setStatus('deprecated') cpsmFabricBindViolationEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 4, 1), ).setIndexNames((0, "CISCO-PSM-MIB", "cpsmFabricBindViolationIndex")) if mibBuilder.loadTexts: cpsmFabricBindViolationEntry.setStatus('deprecated') cpsmFabricBindViolationIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 4, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 100))) if mibBuilder.loadTexts: cpsmFabricBindViolationIndex.setStatus('deprecated') cpsmFabricBindSwwn = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 4, 1, 2), FcNameId()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmFabricBindSwwn.setStatus('deprecated') cpsmFabricBindLocalPort = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 4, 1, 3), FcNameId()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmFabricBindLocalPort.setStatus('deprecated') cpsmFabricBindDenialTime = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 4, 1, 4), TimeStamp()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmFabricBindDenialTime.setStatus('deprecated') cpsmFabricBindLocalIntf = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 4, 1, 5), InterfaceIndex()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmFabricBindLocalIntf.setStatus('deprecated') cpsmFabricBindViolationNewTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 5), ) if mibBuilder.loadTexts: cpsmFabricBindViolationNewTable.setStatus('current') cpsmFabricBindViolationNewEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 5, 1), ).setIndexNames((0, "CISCO-PSM-MIB", "cpsmFabricBindViolationNwTypeR1"), (0, "CISCO-PSM-MIB", "cpsmFabricBindViolationNwIndexR1"), (0, "CISCO-PSM-MIB", "cpsmFabricBindViolationIndexR1")) if mibBuilder.loadTexts: cpsmFabricBindViolationNewEntry.setStatus('current') cpsmFabricBindViolationNwTypeR1 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 5, 1, 1), CpsmVirtNwType()) if mibBuilder.loadTexts: cpsmFabricBindViolationNwTypeR1.setStatus('current') cpsmFabricBindViolationNwIndexR1 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 5, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4093))) if mibBuilder.loadTexts: cpsmFabricBindViolationNwIndexR1.setStatus('current') cpsmFabricBindViolationIndexR1 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 5, 1, 3), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 100))) if mibBuilder.loadTexts: cpsmFabricBindViolationIndexR1.setStatus('current') cpsmFabricBindSwwnR1 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 5, 1, 4), FcNameId()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmFabricBindSwwnR1.setStatus('current') cpsmFabricBindDenialTimeR1 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 5, 1, 5), TimeStamp()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmFabricBindDenialTimeR1.setStatus('current') cpsmFabricBindDenialCountR1 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 5, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmFabricBindDenialCountR1.setStatus('current') cpsmFabricBindDenialDomId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 5, 1, 7), DomainIdOrZero()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmFabricBindDenialDomId.setStatus('current') cpsmFabricBindDenialReasonCode = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 5, 1, 8), CpsmViolationReasonCode()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmFabricBindDenialReasonCode.setStatus('current') cpsmEfmdStatsTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 6), ) if mibBuilder.loadTexts: cpsmEfmdStatsTable.setStatus('current') cpsmEfmdStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 6, 1), ).setIndexNames((0, "CISCO-VSAN-MIB", "vsanIndex")) if mibBuilder.loadTexts: cpsmEfmdStatsEntry.setStatus('current') cpsmEfmdTxMergeReqs = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 6, 1, 1), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmEfmdTxMergeReqs.setStatus('current') cpsmEfmdRxMergeReqs = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 6, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmEfmdRxMergeReqs.setStatus('current') cpsmEfmdTxMergeAccs = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 6, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmEfmdTxMergeAccs.setStatus('current') cpsmEfmdRxMergeAccs = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 6, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmEfmdRxMergeAccs.setStatus('current') cpsmEfmdTxMergeRejs = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 6, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmEfmdTxMergeRejs.setStatus('current') cpsmEfmdRxMergeRejs = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 6, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmEfmdRxMergeRejs.setStatus('current') cpsmEfmdTxMergeBusys = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 6, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmEfmdTxMergeBusys.setStatus('current') cpsmEfmdRxMergeBusys = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 6, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmEfmdRxMergeBusys.setStatus('current') cpsmEfmdTxMergeErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 6, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmEfmdTxMergeErrs.setStatus('current') cpsmEfmdRxMergeErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 6, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmEfmdRxMergeErrs.setStatus('current') cpsmNotifyEnable = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 17), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: cpsmNotifyEnable.setStatus('current') cpsmEfmdConfigTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 18), ) if mibBuilder.loadTexts: cpsmEfmdConfigTable.setStatus('current') cpsmEfmdConfigEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 18, 1), ).setIndexNames((0, "CISCO-VSAN-MIB", "vsanIndex")) if mibBuilder.loadTexts: cpsmEfmdConfigEntry.setStatus('current') cpsmEfmdConfigEnforce = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 18, 1, 1), TruthValue().clone('true')).setMaxAccess("readwrite") if mibBuilder.loadTexts: cpsmEfmdConfigEnforce.setStatus('current') cpsmPortBindNextFreeTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 19), ) if mibBuilder.loadTexts: cpsmPortBindNextFreeTable.setStatus('current') cpsmPortBindNextFreeEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 19, 1), ).setIndexNames((0, "CISCO-PSM-MIB", "cpsmPortBindNextFreeNwType"), (0, "CISCO-PSM-MIB", "cpsmPortBindNextFreeNwIndex")) if mibBuilder.loadTexts: cpsmPortBindNextFreeEntry.setStatus('current') cpsmPortBindNextFreeNwType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 19, 1, 1), CpsmVirtNwType()) if mibBuilder.loadTexts: cpsmPortBindNextFreeNwType.setStatus('current') cpsmPortBindNextFreeNwIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 19, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4093))) if mibBuilder.loadTexts: cpsmPortBindNextFreeNwIndex.setStatus('current') cpsmPortBindNextFreeIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 19, 1, 3), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 4095))).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmPortBindNextFreeIndex.setStatus('current') cpsmFabricBindNextFreeTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 20), ) if mibBuilder.loadTexts: cpsmFabricBindNextFreeTable.setStatus('current') cpsmFabricBindNextFreeEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 20, 1), ).setIndexNames((0, "CISCO-PSM-MIB", "cpsmFabricBindNextFreeNwType"), (0, "CISCO-PSM-MIB", "cpsmFabricBindNextFreeNwIndex")) if mibBuilder.loadTexts: cpsmFabricBindNextFreeEntry.setStatus('current') cpsmFabricBindNextFreeNwType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 20, 1, 1), CpsmVirtNwType()) if mibBuilder.loadTexts: cpsmFabricBindNextFreeNwType.setStatus('current') cpsmFabricBindNextFreeNwIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 20, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4093))) if mibBuilder.loadTexts: cpsmFabricBindNextFreeNwIndex.setStatus('current') cpsmFabricBindNextFreeIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 20, 1, 3), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 4095))).setMaxAccess("readonly") if mibBuilder.loadTexts: cpsmFabricBindNextFreeIndex.setStatus('current') ciscoPsmPortBindFPortDenyNotify = NotificationType((1, 3, 6, 1, 4, 1, 9, 9, 364, 0, 1)).setObjects(("CISCO-PSM-MIB", "cpsmPortBindLoginPwwn"), ("CISCO-PSM-MIB", "cpsmPortBindLoginPort"), ("CISCO-PSM-MIB", "cpsmPortBindLoginTime")) if mibBuilder.loadTexts: ciscoPsmPortBindFPortDenyNotify.setStatus('current') ciscoPsmPortBindEPortDenyNotify = NotificationType((1, 3, 6, 1, 4, 1, 9, 9, 364, 0, 2)).setObjects(("CISCO-PSM-MIB", "cpsmPortBindLoginSwwn"), ("CISCO-PSM-MIB", "cpsmPortBindLoginPort"), ("CISCO-PSM-MIB", "cpsmPortBindLoginTime")) if mibBuilder.loadTexts: ciscoPsmPortBindEPortDenyNotify.setStatus('current') ciscoPsmFabricBindDenyNotify = NotificationType((1, 3, 6, 1, 4, 1, 9, 9, 364, 0, 3)).setObjects(("CISCO-PSM-MIB", "cpsmFabricBindSwwn"), ("CISCO-PSM-MIB", "cpsmFabricBindLocalPort"), ("CISCO-PSM-MIB", "cpsmFabricBindDenialTime")) if mibBuilder.loadTexts: ciscoPsmFabricBindDenyNotify.setStatus('deprecated') ciscoPsmFabricBindDenyNotifyNew = NotificationType((1, 3, 6, 1, 4, 1, 9, 9, 364, 0, 4)).setObjects(("CISCO-PSM-MIB", "cpsmFabricBindSwwnR1"), ("CISCO-PSM-MIB", "cpsmFabricBindDenialTimeR1"), ("CISCO-PSM-MIB", "cpsmFabricBindDenialReasonCode")) if mibBuilder.loadTexts: ciscoPsmFabricBindDenyNotifyNew.setStatus('current') ciscoPsmMIBCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 1)) ciscoPsmMIBGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 2)) ciscoPsmMIBCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 1, 1)).setObjects(("CISCO-PSM-MIB", "ciscoPsmPortBindConfigGroup"), ("CISCO-PSM-MIB", "ciscoPsmFabricBindConfigGroup"), ("CISCO-PSM-MIB", "ciscoPsmPortBindEnforcedGroup"), ("CISCO-PSM-MIB", "ciscoPsmFabricBindEnforcedGroup"), ("CISCO-PSM-MIB", "ciscoPsmPortBindStatsGroup"), ("CISCO-PSM-MIB", "ciscoPsmFabricBindStatsGroup"), ("CISCO-PSM-MIB", "ciscoPsmPortBindNotifyGroup"), ("CISCO-PSM-MIB", "ciscoPsmFabricBindNotifyGroup"), ("CISCO-PSM-MIB", "ciscoPsmNotifyEnableGroup"), ("CISCO-PSM-MIB", "ciscoPsmPortBindAutoLearnGroup"), ("CISCO-PSM-MIB", "ciscoPsmFabricBindAutoLearnGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoPsmMIBCompliance = ciscoPsmMIBCompliance.setStatus('deprecated') ciscoPsmMIBComplianceRev1 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 1, 2)).setObjects(("CISCO-PSM-MIB", "ciscoPsmPortBindConfigGroup"), ("CISCO-PSM-MIB", "ciscoPsmFabricBindConfigGroup1"), ("CISCO-PSM-MIB", "ciscoPsmPortBindEnforcedGroup"), ("CISCO-PSM-MIB", "ciscoPsmFabricBindEnforcedGroup"), ("CISCO-PSM-MIB", "ciscoPsmPortBindStatsGroup"), ("CISCO-PSM-MIB", "ciscoPsmFabricBindStatsGroup1"), ("CISCO-PSM-MIB", "ciscoPsmPortBindNotifyGroup"), ("CISCO-PSM-MIB", "ciscoPsmFabricBindNotifyGroupR1"), ("CISCO-PSM-MIB", "ciscoPsmNotifyEnableGroup"), ("CISCO-PSM-MIB", "ciscoPsmPortBindAutoLearnGroup"), ("CISCO-PSM-MIB", "ciscoPsmFabricBindAutoLearnGroup"), ("CISCO-PSM-MIB", "ciscoPsmEfmdConfigGroup"), ("CISCO-PSM-MIB", "ciscoPsmEfmdStatsGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoPsmMIBComplianceRev1 = ciscoPsmMIBComplianceRev1.setStatus('deprecated') ciscoPsmMIBComplianceRev2 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 1, 3)).setObjects(("CISCO-PSM-MIB", "ciscoPsmPortBindConfigGroup"), ("CISCO-PSM-MIB", "ciscoPsmFabricBindConfigGroup1"), ("CISCO-PSM-MIB", "ciscoPsmPortBindEnforcedGroup"), ("CISCO-PSM-MIB", "ciscoPsmFabricBindEnforcedGroup"), ("CISCO-PSM-MIB", "ciscoPsmPortBindStatsGroup"), ("CISCO-PSM-MIB", "ciscoPsmFabricBindStatsGroup1"), ("CISCO-PSM-MIB", "ciscoPsmPortBindNotifyGroup"), ("CISCO-PSM-MIB", "ciscoPsmFabricBindNotifyGroupR1"), ("CISCO-PSM-MIB", "ciscoPsmNotifyEnableGroup"), ("CISCO-PSM-MIB", "ciscoPsmPortBindAutoLearnGroup"), ("CISCO-PSM-MIB", "ciscoPsmEfmdConfigGroup"), ("CISCO-PSM-MIB", "ciscoPsmEfmdStatsGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoPsmMIBComplianceRev2 = ciscoPsmMIBComplianceRev2.setStatus('deprecated') ciscoPsmMIBComplianceRev3 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 1, 4)).setObjects(("CISCO-PSM-MIB", "ciscoPsmPortBindConfigGroup"), ("CISCO-PSM-MIB", "ciscoPsmFabricBindConfigGroup1"), ("CISCO-PSM-MIB", "ciscoPsmPortBindEnforcedGroup"), ("CISCO-PSM-MIB", "ciscoPsmFabricBindEnforcedGroup"), ("CISCO-PSM-MIB", "ciscoPsmPortBindStatsGroup"), ("CISCO-PSM-MIB", "ciscoPsmFabricBindStatsGroup2"), ("CISCO-PSM-MIB", "ciscoPsmPortBindNotifyGroup"), ("CISCO-PSM-MIB", "ciscoPsmFabricBindNotifyGroupR1"), ("CISCO-PSM-MIB", "ciscoPsmNotifyEnableGroup"), ("CISCO-PSM-MIB", "ciscoPsmPortBindAutoLearnGroup"), ("CISCO-PSM-MIB", "ciscoPsmEfmdConfigGroup"), ("CISCO-PSM-MIB", "ciscoPsmEfmdStatsGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoPsmMIBComplianceRev3 = ciscoPsmMIBComplianceRev3.setStatus('deprecated') ciscoPsmMIBComplianceRev4 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 1, 5)).setObjects(("CISCO-PSM-MIB", "ciscoPsmPortBindConfigGroup"), ("CISCO-PSM-MIB", "ciscoPsmFabricBindConfigGroup1"), ("CISCO-PSM-MIB", "ciscoPsmPortBindEnforcedGroup"), ("CISCO-PSM-MIB", "ciscoPsmFabricBindEnforcedGroup"), ("CISCO-PSM-MIB", "ciscoPsmPortBindStatsGroup"), ("CISCO-PSM-MIB", "ciscoPsmFabricBindStatsGroup3"), ("CISCO-PSM-MIB", "ciscoPsmPortBindNotifyGroup"), ("CISCO-PSM-MIB", "ciscoPsmFabricBindNotifyGroupR1"), ("CISCO-PSM-MIB", "ciscoPsmNotifyEnableGroup"), ("CISCO-PSM-MIB", "ciscoPsmPortBindAutoLearnGroup"), ("CISCO-PSM-MIB", "ciscoPsmEfmdConfigGroup"), ("CISCO-PSM-MIB", "ciscoPsmEfmdStatsGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoPsmMIBComplianceRev4 = ciscoPsmMIBComplianceRev4.setStatus('deprecated') ciscoPsmMIBComplianceRev5 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 1, 6)).setObjects(("CISCO-PSM-MIB", "ciscoPsmPortBindConfigGroup1"), ("CISCO-PSM-MIB", "ciscoPsmFabricBindConfigGroup2"), ("CISCO-PSM-MIB", "ciscoPsmPortBindEnforcedGroup"), ("CISCO-PSM-MIB", "ciscoPsmFabricBindEnforcedGroup"), ("CISCO-PSM-MIB", "ciscoPsmPortBindStatsGroup"), ("CISCO-PSM-MIB", "ciscoPsmFabricBindStatsGroup3"), ("CISCO-PSM-MIB", "ciscoPsmPortBindNotifyGroup"), ("CISCO-PSM-MIB", "ciscoPsmFabricBindNotifyGroupR1"), ("CISCO-PSM-MIB", "ciscoPsmNotifyEnableGroup"), ("CISCO-PSM-MIB", "ciscoPsmPortBindAutoLearnGroup"), ("CISCO-PSM-MIB", "ciscoPsmEfmdConfigGroup"), ("CISCO-PSM-MIB", "ciscoPsmEfmdStatsGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoPsmMIBComplianceRev5 = ciscoPsmMIBComplianceRev5.setStatus('current') ciscoPsmPortBindConfigGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 2, 1)).setObjects(("CISCO-PSM-MIB", "cpsmPortBindLoginDevType"), ("CISCO-PSM-MIB", "cpsmPortBindLoginDev"), ("CISCO-PSM-MIB", "cpsmPortBindLoginPointType"), ("CISCO-PSM-MIB", "cpsmPortBindLoginPoint"), ("CISCO-PSM-MIB", "cpsmPortBindRowStatus"), ("CISCO-PSM-MIB", "cpsmPortBindActivate"), ("CISCO-PSM-MIB", "cpsmPortBindResult"), ("CISCO-PSM-MIB", "cpsmPortBindLastActTime"), ("CISCO-PSM-MIB", "cpsmPortBindActState"), ("CISCO-PSM-MIB", "cpsmPortBindCopyActToConfig"), ("CISCO-PSM-MIB", "cpsmPortBindLastChangeTime"), ("CISCO-PSM-MIB", "cpsmPortBindClearStats"), ("CISCO-PSM-MIB", "cpsmPortBindClearAutoLearnDb"), ("CISCO-PSM-MIB", "cpsmPortBindClearAutoLearnIntf"), ("CISCO-PSM-MIB", "cpsmPortBindDiffConfigDb"), ("CISCO-PSM-MIB", "cpsmPortBindDiffReason"), ("CISCO-PSM-MIB", "cpsmPortBindDiffLoginDevType"), ("CISCO-PSM-MIB", "cpsmPortBindDiffLoginDev"), ("CISCO-PSM-MIB", "cpsmPortBindDiffLoginPointType"), ("CISCO-PSM-MIB", "cpsmPortBindDiffLoginPoint")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoPsmPortBindConfigGroup = ciscoPsmPortBindConfigGroup.setStatus('deprecated') ciscoPsmFabricBindConfigGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 2, 2)).setObjects(("CISCO-PSM-MIB", "cpsmFabricBindSwitchWwn"), ("CISCO-PSM-MIB", "cpsmFabricBindDomId"), ("CISCO-PSM-MIB", "cpsmFabricBindRowStatus"), ("CISCO-PSM-MIB", "cpsmFabricBindActivate"), ("CISCO-PSM-MIB", "cpsmFabricBindResult"), ("CISCO-PSM-MIB", "cpsmFabricBindLastActTime"), ("CISCO-PSM-MIB", "cpsmFabricBindActState"), ("CISCO-PSM-MIB", "cpsmFabricBindCopyActToConfig"), ("CISCO-PSM-MIB", "cpsmFabricBindLastChangeTime"), ("CISCO-PSM-MIB", "cpsmFabricBindClearStats"), ("CISCO-PSM-MIB", "cpsmFabricBindClearAutoLearnDb"), ("CISCO-PSM-MIB", "cpsmFabricBindClearAutoLearnIntf"), ("CISCO-PSM-MIB", "cpsmFabricBindDiffConfigDb"), ("CISCO-PSM-MIB", "cpsmFabricBindDiffReason"), ("CISCO-PSM-MIB", "cpsmFabricBindDiffSwitchWwn"), ("CISCO-PSM-MIB", "cpsmFabricBindDiffDomId")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoPsmFabricBindConfigGroup = ciscoPsmFabricBindConfigGroup.setStatus('deprecated') ciscoPsmPortBindEnforcedGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 2, 3)).setObjects(("CISCO-PSM-MIB", "cpsmPortBindEnfLoginDevType"), ("CISCO-PSM-MIB", "cpsmPortBindEnfLoginDev"), ("CISCO-PSM-MIB", "cpsmPortBindEnfLoginPointType"), ("CISCO-PSM-MIB", "cpsmPortBindEnfLoginPoint"), ("CISCO-PSM-MIB", "cpsmPortBindEnfIsLearnt")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoPsmPortBindEnforcedGroup = ciscoPsmPortBindEnforcedGroup.setStatus('current') ciscoPsmFabricBindEnforcedGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 2, 4)).setObjects(("CISCO-PSM-MIB", "cpsmFabricBindEnfSwitchWwn"), ("CISCO-PSM-MIB", "cpsmFabricBindEnfDomId"), ("CISCO-PSM-MIB", "cpsmFabricBindEnfIsLearnt")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoPsmFabricBindEnforcedGroup = ciscoPsmFabricBindEnforcedGroup.setStatus('current') ciscoPsmPortBindStatsGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 2, 5)).setObjects(("CISCO-PSM-MIB", "cpsmPortBindAllowedLogins"), ("CISCO-PSM-MIB", "cpsmPortBindDeniedLogins"), ("CISCO-PSM-MIB", "cpsmPortBindLoginPwwn"), ("CISCO-PSM-MIB", "cpsmPortBindLoginNwwn"), ("CISCO-PSM-MIB", "cpsmPortBindLoginSwwn"), ("CISCO-PSM-MIB", "cpsmPortBindLoginPort"), ("CISCO-PSM-MIB", "cpsmPortBindLoginTime"), ("CISCO-PSM-MIB", "cpsmPortBindLoginCount"), ("CISCO-PSM-MIB", "cpsmPortBindLoginIntf")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoPsmPortBindStatsGroup = ciscoPsmPortBindStatsGroup.setStatus('current') ciscoPsmFabricBindStatsGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 2, 6)).setObjects(("CISCO-PSM-MIB", "cpsmFabricBindAllowedReqs"), ("CISCO-PSM-MIB", "cpsmFabricBindDeniedReqs"), ("CISCO-PSM-MIB", "cpsmFabricBindSwwn"), ("CISCO-PSM-MIB", "cpsmFabricBindLocalPort"), ("CISCO-PSM-MIB", "cpsmFabricBindDenialTime"), ("CISCO-PSM-MIB", "cpsmFabricBindLocalIntf")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoPsmFabricBindStatsGroup = ciscoPsmFabricBindStatsGroup.setStatus('deprecated') ciscoPsmPortBindNotifyGroup = NotificationGroup((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 2, 7)).setObjects(("CISCO-PSM-MIB", "ciscoPsmPortBindFPortDenyNotify"), ("CISCO-PSM-MIB", "ciscoPsmPortBindEPortDenyNotify")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoPsmPortBindNotifyGroup = ciscoPsmPortBindNotifyGroup.setStatus('current') ciscoPsmFabricBindNotifyGroup = NotificationGroup((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 2, 8)).setObjects(("CISCO-PSM-MIB", "ciscoPsmFabricBindDenyNotify")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoPsmFabricBindNotifyGroup = ciscoPsmFabricBindNotifyGroup.setStatus('deprecated') ciscoPsmPortBindAutoLearnGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 2, 9)).setObjects(("CISCO-PSM-MIB", "cpsmPortBindAutoLearnEnable")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoPsmPortBindAutoLearnGroup = ciscoPsmPortBindAutoLearnGroup.setStatus('current') ciscoPsmFabricBindAutoLearnGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 2, 10)).setObjects(("CISCO-PSM-MIB", "cpsmFabricBindAutoLearnEnable")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoPsmFabricBindAutoLearnGroup = ciscoPsmFabricBindAutoLearnGroup.setStatus('deprecated') ciscoPsmNotifyEnableGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 2, 11)).setObjects(("CISCO-PSM-MIB", "cpsmNotifyEnable")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoPsmNotifyEnableGroup = ciscoPsmNotifyEnableGroup.setStatus('current') ciscoPsmFabricBindConfigGroup1 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 2, 12)).setObjects(("CISCO-PSM-MIB", "cpsmFabricBindSwitchWwn"), ("CISCO-PSM-MIB", "cpsmFabricBindDomId"), ("CISCO-PSM-MIB", "cpsmFabricBindRowStatus"), ("CISCO-PSM-MIB", "cpsmFabricBindActivate"), ("CISCO-PSM-MIB", "cpsmFabricBindResult"), ("CISCO-PSM-MIB", "cpsmFabricBindLastActTime"), ("CISCO-PSM-MIB", "cpsmFabricBindActState"), ("CISCO-PSM-MIB", "cpsmFabricBindCopyActToConfig"), ("CISCO-PSM-MIB", "cpsmFabricBindLastChangeTime"), ("CISCO-PSM-MIB", "cpsmFabricBindClearStats"), ("CISCO-PSM-MIB", "cpsmFabricBindClearAutoLearnDb"), ("CISCO-PSM-MIB", "cpsmFabricBindDiffConfigDb"), ("CISCO-PSM-MIB", "cpsmFabricBindDiffReason"), ("CISCO-PSM-MIB", "cpsmFabricBindDiffSwitchWwn"), ("CISCO-PSM-MIB", "cpsmFabricBindDiffDomId")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoPsmFabricBindConfigGroup1 = ciscoPsmFabricBindConfigGroup1.setStatus('deprecated') ciscoPsmFabricBindStatsGroup1 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 2, 13)).setObjects(("CISCO-PSM-MIB", "cpsmFabricBindAllowedReqs"), ("CISCO-PSM-MIB", "cpsmFabricBindDeniedReqs"), ("CISCO-PSM-MIB", "cpsmFabricBindSwwnR1"), ("CISCO-PSM-MIB", "cpsmFabricBindDenialTimeR1"), ("CISCO-PSM-MIB", "cpsmFabricBindDenialCountR1")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoPsmFabricBindStatsGroup1 = ciscoPsmFabricBindStatsGroup1.setStatus('deprecated') ciscoPsmFabricBindNotifyGroupR1 = NotificationGroup((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 2, 14)).setObjects(("CISCO-PSM-MIB", "ciscoPsmFabricBindDenyNotifyNew")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoPsmFabricBindNotifyGroupR1 = ciscoPsmFabricBindNotifyGroupR1.setStatus('current') ciscoPsmEfmdConfigGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 2, 15)).setObjects(("CISCO-PSM-MIB", "cpsmEfmdConfigEnforce")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoPsmEfmdConfigGroup = ciscoPsmEfmdConfigGroup.setStatus('current') ciscoPsmEfmdStatsGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 2, 16)).setObjects(("CISCO-PSM-MIB", "cpsmEfmdTxMergeReqs"), ("CISCO-PSM-MIB", "cpsmEfmdRxMergeReqs"), ("CISCO-PSM-MIB", "cpsmEfmdTxMergeAccs"), ("CISCO-PSM-MIB", "cpsmEfmdRxMergeAccs"), ("CISCO-PSM-MIB", "cpsmEfmdTxMergeRejs"), ("CISCO-PSM-MIB", "cpsmEfmdRxMergeRejs"), ("CISCO-PSM-MIB", "cpsmEfmdTxMergeBusys"), ("CISCO-PSM-MIB", "cpsmEfmdRxMergeBusys"), ("CISCO-PSM-MIB", "cpsmEfmdTxMergeErrs"), ("CISCO-PSM-MIB", "cpsmEfmdRxMergeErrs")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoPsmEfmdStatsGroup = ciscoPsmEfmdStatsGroup.setStatus('current') ciscoPsmFabricBindStatsGroup2 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 2, 17)).setObjects(("CISCO-PSM-MIB", "cpsmFabricBindAllowedReqs"), ("CISCO-PSM-MIB", "cpsmFabricBindDeniedReqs"), ("CISCO-PSM-MIB", "cpsmFabricBindSwwnR1"), ("CISCO-PSM-MIB", "cpsmFabricBindDenialTimeR1"), ("CISCO-PSM-MIB", "cpsmFabricBindDenialCountR1"), ("CISCO-PSM-MIB", "cpsmFabricBindDenialDomId")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoPsmFabricBindStatsGroup2 = ciscoPsmFabricBindStatsGroup2.setStatus('deprecated') ciscoPsmFabricBindStatsGroup3 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 2, 18)).setObjects(("CISCO-PSM-MIB", "cpsmFabricBindAllowedReqs"), ("CISCO-PSM-MIB", "cpsmFabricBindDeniedReqs"), ("CISCO-PSM-MIB", "cpsmFabricBindSwwnR1"), ("CISCO-PSM-MIB", "cpsmFabricBindDenialTimeR1"), ("CISCO-PSM-MIB", "cpsmFabricBindDenialCountR1"), ("CISCO-PSM-MIB", "cpsmFabricBindDenialDomId"), ("CISCO-PSM-MIB", "cpsmFabricBindDenialReasonCode")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoPsmFabricBindStatsGroup3 = ciscoPsmFabricBindStatsGroup3.setStatus('current') ciscoPsmPortBindConfigGroup1 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 2, 19)).setObjects(("CISCO-PSM-MIB", "cpsmPortBindLoginDevType"), ("CISCO-PSM-MIB", "cpsmPortBindLoginDev"), ("CISCO-PSM-MIB", "cpsmPortBindLoginPointType"), ("CISCO-PSM-MIB", "cpsmPortBindLoginPoint"), ("CISCO-PSM-MIB", "cpsmPortBindRowStatus"), ("CISCO-PSM-MIB", "cpsmPortBindActivate"), ("CISCO-PSM-MIB", "cpsmPortBindResult"), ("CISCO-PSM-MIB", "cpsmPortBindLastActTime"), ("CISCO-PSM-MIB", "cpsmPortBindActState"), ("CISCO-PSM-MIB", "cpsmPortBindCopyActToConfig"), ("CISCO-PSM-MIB", "cpsmPortBindLastChangeTime"), ("CISCO-PSM-MIB", "cpsmPortBindClearStats"), ("CISCO-PSM-MIB", "cpsmPortBindClearAutoLearnDb"), ("CISCO-PSM-MIB", "cpsmPortBindClearAutoLearnIntf"), ("CISCO-PSM-MIB", "cpsmPortBindDiffConfigDb"), ("CISCO-PSM-MIB", "cpsmPortBindDiffReason"), ("CISCO-PSM-MIB", "cpsmPortBindDiffLoginDevType"), ("CISCO-PSM-MIB", "cpsmPortBindDiffLoginDev"), ("CISCO-PSM-MIB", "cpsmPortBindDiffLoginPointType"), ("CISCO-PSM-MIB", "cpsmPortBindDiffLoginPoint"), ("CISCO-PSM-MIB", "cpsmPortBindNextFreeIndex")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoPsmPortBindConfigGroup1 = ciscoPsmPortBindConfigGroup1.setStatus('current') ciscoPsmFabricBindConfigGroup2 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 2, 20)).setObjects(("CISCO-PSM-MIB", "cpsmFabricBindSwitchWwn"), ("CISCO-PSM-MIB", "cpsmFabricBindDomId"), ("CISCO-PSM-MIB", "cpsmFabricBindRowStatus"), ("CISCO-PSM-MIB", "cpsmFabricBindActivate"), ("CISCO-PSM-MIB", "cpsmFabricBindResult"), ("CISCO-PSM-MIB", "cpsmFabricBindLastActTime"), ("CISCO-PSM-MIB", "cpsmFabricBindActState"), ("CISCO-PSM-MIB", "cpsmFabricBindCopyActToConfig"), ("CISCO-PSM-MIB", "cpsmFabricBindLastChangeTime"), ("CISCO-PSM-MIB", "cpsmFabricBindClearStats"), ("CISCO-PSM-MIB", "cpsmFabricBindClearAutoLearnDb"), ("CISCO-PSM-MIB", "cpsmFabricBindDiffConfigDb"), ("CISCO-PSM-MIB", "cpsmFabricBindDiffReason"), ("CISCO-PSM-MIB", "cpsmFabricBindDiffSwitchWwn"), ("CISCO-PSM-MIB", "cpsmFabricBindDiffDomId"), ("CISCO-PSM-MIB", "cpsmFabricBindNextFreeIndex")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoPsmFabricBindConfigGroup2 = ciscoPsmFabricBindConfigGroup2.setStatus('current') mibBuilder.exportSymbols("CISCO-PSM-MIB", cpsmPortBindEnfEntry=cpsmPortBindEnfEntry, ciscoPsmPortBindAutoLearnGroup=ciscoPsmPortBindAutoLearnGroup, cpsmFabricBindEnfNwType=cpsmFabricBindEnfNwType, cpsmFabricBindCopyActToConfig=cpsmFabricBindCopyActToConfig, cpsmPortBindDiffTable=cpsmPortBindDiffTable, cpsmFabricBindDenialTime=cpsmFabricBindDenialTime, cpsmFabricBindClearAutoLearnDb=cpsmFabricBindClearAutoLearnDb, ciscoPsmMIBComplianceRev2=ciscoPsmMIBComplianceRev2, cpsmPortBindLoginIntf=cpsmPortBindLoginIntf, cpsmFabricBindEnfIndex=cpsmFabricBindEnfIndex, cpsmPortBindClearAutoLearnDb=cpsmPortBindClearAutoLearnDb, cpsmPortBindAutoLearnTable=cpsmPortBindAutoLearnTable, cpsmPortBindActivate=cpsmPortBindActivate, cpsmPortBindCopyActToConfig=cpsmPortBindCopyActToConfig, cpsmFabricBindClearEntry=cpsmFabricBindClearEntry, cpsmPortBindDiffLoginDevType=cpsmPortBindDiffLoginDevType, cpsmFabricBindViolationTable=cpsmFabricBindViolationTable, ciscoPsmPortBindEnforcedGroup=ciscoPsmPortBindEnforcedGroup, ciscoPsmMIBNotifs=ciscoPsmMIBNotifs, cpsmPortBindDiffIndex=cpsmPortBindDiffIndex, cpsmPortBindVsanVlanType=cpsmPortBindVsanVlanType, cpsmFabricBindNwType=cpsmFabricBindNwType, cpsmPortBindNwIndex=cpsmPortBindNwIndex, cpsmPortBindDiffConfigTable=cpsmPortBindDiffConfigTable, cpsmPortBindActivateEntry=cpsmPortBindActivateEntry, cpsmFabricBindAutoLearnEnable=cpsmFabricBindAutoLearnEnable, cpsmFabricBindClearAutoLearnIntf=cpsmFabricBindClearAutoLearnIntf, cpsmEfmdRxMergeAccs=cpsmEfmdRxMergeAccs, cpsmPortBindClearNwIndex=cpsmPortBindClearNwIndex, cpsmFabricBindViolationNewEntry=cpsmFabricBindViolationNewEntry, cpsmFabricBindDiffNwType=cpsmFabricBindDiffNwType, cpsmFabricBindDiffIndex=cpsmFabricBindDiffIndex, cpsmFabricBindDenialReasonCode=cpsmFabricBindDenialReasonCode, ciscoPsmFabricBindStatsGroup=ciscoPsmFabricBindStatsGroup, cpsmPortBindActivateTable=cpsmPortBindActivateTable, cpsmFabricBindTable=cpsmFabricBindTable, cpsmPortBindCopyTable=cpsmPortBindCopyTable, cpsmFabricBindNwIndex=cpsmFabricBindNwIndex, cpsmFabricBindActState=cpsmFabricBindActState, cpsmPortBindViolationTable=cpsmPortBindViolationTable, cpsmConfiguration=cpsmConfiguration, ciscoPsmPortBindConfigGroup=ciscoPsmPortBindConfigGroup, cpsmFabricBindAutoLearnIndexType=cpsmFabricBindAutoLearnIndexType, cpsmEfmdStatsTable=cpsmEfmdStatsTable, cpsmFabricBindLastActTime=cpsmFabricBindLastActTime, cpsmPortBindAllowedLogins=cpsmPortBindAllowedLogins, cpsmFabricBindSwwn=cpsmFabricBindSwwn, cpsmFabricBindDomId=cpsmFabricBindDomId, cpsmFabricBindDiffReason=cpsmFabricBindDiffReason, ciscoPsmMIBComplianceRev3=ciscoPsmMIBComplianceRev3, ciscoPsmNotifyEnableGroup=ciscoPsmNotifyEnableGroup, cpsmFabricBindDiffNwIndex=cpsmFabricBindDiffNwIndex, cpsmEfmdConfigEntry=cpsmEfmdConfigEntry, cpsmFabricBindViolationIndex=cpsmFabricBindViolationIndex, cpsmPortBindNextFreeTable=cpsmPortBindNextFreeTable, ciscoPsmMIBGroups=ciscoPsmMIBGroups, cpsmPortBindEnfNwType=cpsmPortBindEnfNwType, cpsmEfmdTxMergeReqs=cpsmEfmdTxMergeReqs, CpsmViolationReasonCode=CpsmViolationReasonCode, cpsmPortBindDiffLoginDev=cpsmPortBindDiffLoginDev, cpsmFabricBindDiffEntry=cpsmFabricBindDiffEntry, cpsmEfmdRxMergeBusys=cpsmEfmdRxMergeBusys, ciscoPsmPortBindConfigGroup1=ciscoPsmPortBindConfigGroup1, cpsmFabricBindRowStatus=cpsmFabricBindRowStatus, CpsmDbActivate=CpsmDbActivate, cpsmEfmdTxMergeRejs=cpsmEfmdTxMergeRejs, cpsmFabricBindViolationNwIndexR1=cpsmFabricBindViolationNwIndexR1, cpsmPortBindLoginDev=cpsmPortBindLoginDev, cpsmFabricBindSwwnR1=cpsmFabricBindSwwnR1, cpsmPortBindNextFreeIndex=cpsmPortBindNextFreeIndex, cpsmEfmdStatsEntry=cpsmEfmdStatsEntry, CpsmPortBindSwPortType=CpsmPortBindSwPortType, ciscoPsmFabricBindDenyNotify=ciscoPsmFabricBindDenyNotify, cpsmFabricBindDeniedReqs=cpsmFabricBindDeniedReqs, cpsmFabricBindEntry=cpsmFabricBindEntry, cpsmPortBindAutoLearnEnable=cpsmPortBindAutoLearnEnable, cpsmPortBindDiffConfigEntry=cpsmPortBindDiffConfigEntry, cpsmEfmdConfigEnforce=cpsmEfmdConfigEnforce, cpsmPortBindLastChangeTime=cpsmPortBindLastChangeTime, cpsmPortBindEnfTable=cpsmPortBindEnfTable, cpsmPortBindDiffConfigNwIndex=cpsmPortBindDiffConfigNwIndex, cpsmFabricBindViolationNwTypeR1=cpsmFabricBindViolationNwTypeR1, cpsmNotifyEnable=cpsmNotifyEnable, cpsmFabricBindLocalPort=cpsmFabricBindLocalPort, cpsmPortBindLoginTime=cpsmPortBindLoginTime, ciscoPsmFabricBindConfigGroup2=ciscoPsmFabricBindConfigGroup2, cpsmPortBindLoginPointType=cpsmPortBindLoginPointType, ciscoPsmMIBComplianceRev1=ciscoPsmMIBComplianceRev1, ciscoPsmFabricBindStatsGroup3=ciscoPsmFabricBindStatsGroup3, cpsmFabricBindViolationIndexR1=cpsmFabricBindViolationIndexR1, ciscoPsmMIBObjects=ciscoPsmMIBObjects, cpsmFabricBindIndex=cpsmFabricBindIndex, cpsmEfmdTxMergeAccs=cpsmEfmdTxMergeAccs, cpsmPortBindEnfNwIndex=cpsmPortBindEnfNwIndex, cpsmPortBindEnfLoginDevType=cpsmPortBindEnfLoginDevType, cpsmPortBindDiffConfigDb=cpsmPortBindDiffConfigDb, cpsmEfmdConfigTable=cpsmEfmdConfigTable, cpsmPortBindClearNwType=cpsmPortBindClearNwType, cpsmFabricBindVsanVlanIndex=cpsmFabricBindVsanVlanIndex, ciscoPsmPortBindStatsGroup=ciscoPsmPortBindStatsGroup, CpsmDiffReason=CpsmDiffReason, cpsmFabricBindNextFreeIndex=cpsmFabricBindNextFreeIndex, cpsmFabricBindDiffConfigTable=cpsmFabricBindDiffConfigTable, cpsmFabricBindEnfDomId=cpsmFabricBindEnfDomId, cpsmFabricBindLastChangeTime=cpsmFabricBindLastChangeTime, CpsmStatsCounter=CpsmStatsCounter, cpsmPortBindLoginSwwn=cpsmPortBindLoginSwwn, ciscoPsmFabricBindNotifyGroupR1=ciscoPsmFabricBindNotifyGroupR1, cpsmPortBindVsanVlanIndex=cpsmPortBindVsanVlanIndex, cpsmPortBindRowStatus=cpsmPortBindRowStatus, cpsmPortBindEnfIsLearnt=cpsmPortBindEnfIsLearnt, ciscoPsmMIBConform=ciscoPsmMIBConform, CpsmPortBindDevType=CpsmPortBindDevType, ciscoPsmMIB=ciscoPsmMIB, cpsmPortBindEnfLoginPointType=cpsmPortBindEnfLoginPointType, cpsmFabricBindDiffConfigNwType=cpsmFabricBindDiffConfigNwType, ciscoPsmMIBCompliances=ciscoPsmMIBCompliances, cpsmFabricBindEnfNwIndex=cpsmFabricBindEnfNwIndex, CpsmClearStats=CpsmClearStats, cpsmPortBindAutoLearnEntry=cpsmPortBindAutoLearnEntry, cpsmPortBindClearAutoLearnIntf=cpsmPortBindClearAutoLearnIntf, cpsmPortBindCopyEntry=cpsmPortBindCopyEntry, cpsmFabricBindDiffTable=cpsmFabricBindDiffTable, ciscoPsmPortBindFPortDenyNotify=ciscoPsmPortBindFPortDenyNotify, cpsmFabricBindStatsEntry=cpsmFabricBindStatsEntry, cpsmPortBindStatsEntry=cpsmPortBindStatsEntry, cpsmPortBindClearEntry=cpsmPortBindClearEntry, cpsmPortBindDeniedLogins=cpsmPortBindDeniedLogins, cpsmFabricBindLocalIntf=cpsmFabricBindLocalIntf, ciscoPsmEfmdConfigGroup=ciscoPsmEfmdConfigGroup, cpsmPortBindResult=cpsmPortBindResult, ciscoPsmEfmdStatsGroup=ciscoPsmEfmdStatsGroup, cpsmPortBindAutoLearnIndexType=cpsmPortBindAutoLearnIndexType, CpsmActivateResult=CpsmActivateResult, CpsmAutoLearnEnable=CpsmAutoLearnEnable, cpsmPortBindNextFreeNwIndex=cpsmPortBindNextFreeNwIndex, cpsmPortBindLoginDevType=cpsmPortBindLoginDevType, cpsmFabricBindResult=cpsmFabricBindResult, cpsmEfmdRxMergeRejs=cpsmEfmdRxMergeRejs, cpsmPortBindDiffNwType=cpsmPortBindDiffNwType, cpsmPortBindEntry=cpsmPortBindEntry, cpsmPortBindViolationNwType=cpsmPortBindViolationNwType, PYSNMP_MODULE_ID=ciscoPsmMIB, cpsmPortBindEnfLoginPoint=cpsmPortBindEnfLoginPoint, cpsmFabricBindDiffConfigEntry=cpsmFabricBindDiffConfigEntry, cpsmFabricBindCopyTable=cpsmFabricBindCopyTable, CpsmClearAutoLearnDb=CpsmClearAutoLearnDb, cpsmPortBindLoginPoint=cpsmPortBindLoginPoint, cpsmFabricBindAllowedReqs=cpsmFabricBindAllowedReqs, cpsmFabricBindActivateTable=cpsmFabricBindActivateTable, cpsmFabricBindAutoLearnTable=cpsmFabricBindAutoLearnTable, cpsmPortBindActState=cpsmPortBindActState, CpsmDiffDb=CpsmDiffDb, cpsmPortBindDiffReason=cpsmPortBindDiffReason, cpsmPortBindStatsTable=cpsmPortBindStatsTable, cpsmFabricBindDenialDomId=cpsmFabricBindDenialDomId, ciscoPsmFabricBindEnforcedGroup=ciscoPsmFabricBindEnforcedGroup, cpsmFabricBindNextFreeTable=cpsmFabricBindNextFreeTable, cpsmPortBindLoginPwwn=cpsmPortBindLoginPwwn, cpsmFabricBindViolationNewTable=cpsmFabricBindViolationNewTable, ciscoPsmPortBindNotifyGroup=ciscoPsmPortBindNotifyGroup, ciscoPsmFabricBindAutoLearnGroup=ciscoPsmFabricBindAutoLearnGroup, cpsmPortBindDiffNwIndex=cpsmPortBindDiffNwIndex, cpsmFabricBindNextFreeNwType=cpsmFabricBindNextFreeNwType, cpsmFabricBindCopyEntry=cpsmFabricBindCopyEntry, cpsmFabricBindStatsTable=cpsmFabricBindStatsTable, cpsmFabricBindVsanVlanType=cpsmFabricBindVsanVlanType, cpsmPortBindViolationNwIndex=cpsmPortBindViolationNwIndex, ciscoPsmFabricBindConfigGroup1=ciscoPsmFabricBindConfigGroup1, cpsmFabricBindEnfEntry=cpsmFabricBindEnfEntry, CpsmVirtNwType=CpsmVirtNwType, cpsmPortBindIndex=cpsmPortBindIndex, cpsmPortBindLastActTime=cpsmPortBindLastActTime, cpsmFabricBindEnfTable=cpsmFabricBindEnfTable, cpsmPortBindNwType=cpsmPortBindNwType, cpsmPortBindNextFreeEntry=cpsmPortBindNextFreeEntry, cpsmPortBindDiffLoginPoint=cpsmPortBindDiffLoginPoint, ciscoPsmFabricBindDenyNotifyNew=ciscoPsmFabricBindDenyNotifyNew, cpsmFabricBindDenialTimeR1=cpsmFabricBindDenialTimeR1, cpsmFabricBindClearNwType=cpsmFabricBindClearNwType, ciscoPsmPortBindEPortDenyNotify=ciscoPsmPortBindEPortDenyNotify, cpsmFabricBindEnfSwitchWwn=cpsmFabricBindEnfSwitchWwn, cpsmFabricBindAutoLearnEntry=cpsmFabricBindAutoLearnEntry, cpsmFabricBindClearTable=cpsmFabricBindClearTable, cpsmPortBindEnfLoginDev=cpsmPortBindEnfLoginDev, cpsmFabricBindClearStats=cpsmFabricBindClearStats, cpsmFabricBindDiffDomId=cpsmFabricBindDiffDomId, cpsmEfmdTxMergeErrs=cpsmEfmdTxMergeErrs, cpsmPortBindClearTable=cpsmPortBindClearTable, cpsmFabricBindActivate=cpsmFabricBindActivate, cpsmEfmdRxMergeErrs=cpsmEfmdRxMergeErrs, cpsmPortBindLoginPort=cpsmPortBindLoginPort, cpsmPortBindDiffLoginPointType=cpsmPortBindDiffLoginPointType, cpsmPortBindViolationIndex=cpsmPortBindViolationIndex, ciscoPsmMIBComplianceRev4=ciscoPsmMIBComplianceRev4, cpsmFabricBindDiffConfigNwIndex=cpsmFabricBindDiffConfigNwIndex, cpsmPortBindNextFreeNwType=cpsmPortBindNextFreeNwType, cpsmStats=cpsmStats, cpsmFabricBindNextFreeEntry=cpsmFabricBindNextFreeEntry, cpsmFabricBindNextFreeNwIndex=cpsmFabricBindNextFreeNwIndex, cpsmPortBindDiffEntry=cpsmPortBindDiffEntry, cpsmPortBindClearStats=cpsmPortBindClearStats, ciscoPsmMIBCompliance=ciscoPsmMIBCompliance, cpsmFabricBindDenialCountR1=cpsmFabricBindDenialCountR1, cpsmFabricBindActivateEntry=cpsmFabricBindActivateEntry, cpsmFabricBindEnfIsLearnt=cpsmFabricBindEnfIsLearnt, ciscoPsmMIBComplianceRev5=ciscoPsmMIBComplianceRev5, cpsmEfmdTxMergeBusys=cpsmEfmdTxMergeBusys, cpsmFabricBindViolationEntry=cpsmFabricBindViolationEntry, cpsmPortBindViolationEntry=cpsmPortBindViolationEntry, cpsmFabricBindSwitchWwn=cpsmFabricBindSwitchWwn, ciscoPsmFabricBindConfigGroup=ciscoPsmFabricBindConfigGroup, cpsmPortBindTable=cpsmPortBindTable, ciscoPsmFabricBindStatsGroup2=ciscoPsmFabricBindStatsGroup2, ciscoPsmFabricBindStatsGroup1=ciscoPsmFabricBindStatsGroup1, cpsmFabricBindAutoLearnIndex=cpsmFabricBindAutoLearnIndex, cpsmPortBindEnfIndex=cpsmPortBindEnfIndex, ciscoPsmFabricBindNotifyGroup=ciscoPsmFabricBindNotifyGroup, cpsmFabricBindDiffConfigDb=cpsmFabricBindDiffConfigDb, cpsmEfmdRxMergeReqs=cpsmEfmdRxMergeReqs, cpsmPortBindLoginCount=cpsmPortBindLoginCount, cpsmPortBindAutoLearnIndex=cpsmPortBindAutoLearnIndex, cpsmPortBindLoginNwwn=cpsmPortBindLoginNwwn, cpsmFabricBindClearNwIndex=cpsmFabricBindClearNwIndex, cpsmFabricBindDiffSwitchWwn=cpsmFabricBindDiffSwitchWwn, cpsmPortBindDiffConfigNwType=cpsmPortBindDiffConfigNwType)
(octet_string, object_identifier, integer) = mibBuilder.importSymbols('ASN1', 'OctetString', 'ObjectIdentifier', 'Integer') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_intersection, value_range_constraint, value_size_constraint, constraints_union, single_value_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'ValueRangeConstraint', 'ValueSizeConstraint', 'ConstraintsUnion', 'SingleValueConstraint') (cisco_mgmt,) = mibBuilder.importSymbols('CISCO-SMI', 'ciscoMgmt') (fc_name_id, domain_id, port_member_list, domain_id_or_zero, fc_name_id_or_zero) = mibBuilder.importSymbols('CISCO-ST-TC', 'FcNameId', 'DomainId', 'PortMemberList', 'DomainIdOrZero', 'FcNameIdOrZero') (vsan_index,) = mibBuilder.importSymbols('CISCO-VSAN-MIB', 'vsanIndex') (interface_index, interface_index_or_zero) = mibBuilder.importSymbols('IF-MIB', 'InterfaceIndex', 'InterfaceIndexOrZero') (module_compliance, object_group, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'ObjectGroup', 'NotificationGroup') (ip_address, unsigned32, time_ticks, mib_identifier, iso, object_identity, mib_scalar, mib_table, mib_table_row, mib_table_column, counter64, notification_type, counter32, gauge32, bits, module_identity, integer32) = mibBuilder.importSymbols('SNMPv2-SMI', 'IpAddress', 'Unsigned32', 'TimeTicks', 'MibIdentifier', 'iso', 'ObjectIdentity', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Counter64', 'NotificationType', 'Counter32', 'Gauge32', 'Bits', 'ModuleIdentity', 'Integer32') (time_stamp, row_status, truth_value, display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'TimeStamp', 'RowStatus', 'TruthValue', 'DisplayString', 'TextualConvention') cisco_psm_mib = module_identity((1, 3, 6, 1, 4, 1, 9, 9, 364)) ciscoPsmMIB.setRevisions(('2004-10-15 00:00', '2004-03-16 00:00', '2003-11-27 00:00', '2003-11-10 00:00', '2003-10-17 00:00', '2003-10-06 00:00', '2003-08-07 00:00')) if mibBuilder.loadTexts: ciscoPsmMIB.setLastUpdated('200410150000Z') if mibBuilder.loadTexts: ciscoPsmMIB.setOrganization('Cisco Systems Inc.') cisco_psm_mib_notifs = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 364, 0)) cisco_psm_mib_objects = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 364, 1)) cisco_psm_mib_conform = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 364, 2)) cpsm_configuration = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1)) cpsm_stats = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2)) class Cpsmvirtnwtype(TextualConvention, Integer32): status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2)) named_values = named_values(('vsan', 1), ('vlan', 2)) class Cpsmportbinddevtype(TextualConvention, Integer32): status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5)) named_values = named_values(('mac', 1), ('nWwn', 2), ('pWwn', 3), ('sWwn', 4), ('wildCard', 5)) class Cpsmportbindswporttype(TextualConvention, Integer32): status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4)) named_values = named_values(('fwwn', 1), ('intfIndex', 2), ('wildCard', 3), ('swwn', 4)) class Cpsmdbactivate(TextualConvention, Integer32): status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6)) named_values = named_values(('activate', 1), ('activateWithAutoLearnOff', 2), ('forceActivate', 3), ('forceActivateWithAutoLearnOff', 4), ('deactivate', 5), ('noop', 6)) class Cpsmactivateresult(TextualConvention, Integer32): status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6)) named_values = named_values(('success', 1), ('actFailNullDb', 2), ('actFailConflictDb', 3), ('actFailSystemErr', 4), ('actFailAutoLearnOn', 5), ('deactFailNoActive', 6)) class Cpsmautolearnenable(TextualConvention, Integer32): status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2)) named_values = named_values(('on', 1), ('off', 2)) class Cpsmclearstats(TextualConvention, Integer32): status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2)) named_values = named_values(('clear', 1), ('noop', 2)) class Cpsmclearautolearndb(TextualConvention, Integer32): status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3)) named_values = named_values(('clearOnVsan', 1), ('clearOnIntf', 2), ('noop', 3)) class Cpsmdiffdb(TextualConvention, Integer32): status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3)) named_values = named_values(('configDb', 1), ('activeDb', 2), ('noop', 3)) class Cpsmdiffreason(TextualConvention, Integer32): status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3)) named_values = named_values(('extra', 1), ('missing', 2), ('conflict', 3)) class Cpsmstatscounter(TextualConvention, Unsigned32): status = 'current' subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(0, 4294967295) class Cpsmviolationreasoncode(TextualConvention, Integer32): status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5)) named_values = named_values(('unknown', 1), ('noSwwn', 2), ('domIdMismatch', 3), ('efmdDbMismatch', 4), ('noRespFromRemote', 5)) cpsm_port_bind_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 1)) if mibBuilder.loadTexts: cpsmPortBindTable.setStatus('current') cpsm_port_bind_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 1, 1)).setIndexNames((0, 'CISCO-PSM-MIB', 'cpsmPortBindNwType'), (0, 'CISCO-PSM-MIB', 'cpsmPortBindNwIndex'), (0, 'CISCO-PSM-MIB', 'cpsmPortBindIndex')) if mibBuilder.loadTexts: cpsmPortBindEntry.setStatus('current') cpsm_port_bind_nw_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 1, 1, 1), cpsm_virt_nw_type()) if mibBuilder.loadTexts: cpsmPortBindNwType.setStatus('current') cpsm_port_bind_nw_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 1, 1, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4093))) if mibBuilder.loadTexts: cpsmPortBindNwIndex.setStatus('current') cpsm_port_bind_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 1, 1, 3), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4096))) if mibBuilder.loadTexts: cpsmPortBindIndex.setStatus('current') cpsm_port_bind_login_dev_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 1, 1, 4), cpsm_port_bind_dev_type().clone('pWwn')).setMaxAccess('readcreate') if mibBuilder.loadTexts: cpsmPortBindLoginDevType.setStatus('current') cpsm_port_bind_login_dev = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 1, 1, 5), octet_string().subtype(subtypeSpec=constraints_union(value_size_constraint(0, 0), value_size_constraint(6, 6), value_size_constraint(8, 8)))).setMaxAccess('readcreate') if mibBuilder.loadTexts: cpsmPortBindLoginDev.setStatus('current') cpsm_port_bind_login_point_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 1, 1, 6), cpsm_port_bind_sw_port_type().clone('fwwn')).setMaxAccess('readcreate') if mibBuilder.loadTexts: cpsmPortBindLoginPointType.setStatus('current') cpsm_port_bind_login_point = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 1, 1, 7), octet_string().subtype(subtypeSpec=constraints_union(value_size_constraint(0, 0), value_size_constraint(4, 4), value_size_constraint(8, 8)))).setMaxAccess('readcreate') if mibBuilder.loadTexts: cpsmPortBindLoginPoint.setStatus('current') cpsm_port_bind_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 1, 1, 8), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: cpsmPortBindRowStatus.setStatus('current') cpsm_port_bind_activate_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 2)) if mibBuilder.loadTexts: cpsmPortBindActivateTable.setStatus('current') cpsm_port_bind_activate_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 2, 1)).setIndexNames((0, 'CISCO-PSM-MIB', 'cpsmPortBindNwType'), (0, 'CISCO-PSM-MIB', 'cpsmPortBindNwIndex')) if mibBuilder.loadTexts: cpsmPortBindActivateEntry.setStatus('current') cpsm_port_bind_activate = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 2, 1, 1), cpsm_db_activate()).setMaxAccess('readwrite') if mibBuilder.loadTexts: cpsmPortBindActivate.setStatus('current') cpsm_port_bind_result = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 2, 1, 2), cpsm_activate_result()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmPortBindResult.setStatus('current') cpsm_port_bind_last_act_time = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 2, 1, 3), time_stamp()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmPortBindLastActTime.setStatus('current') cpsm_port_bind_act_state = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 2, 1, 4), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmPortBindActState.setStatus('current') cpsm_fabric_bind_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 3)) if mibBuilder.loadTexts: cpsmFabricBindTable.setStatus('current') cpsm_fabric_bind_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 3, 1)).setIndexNames((0, 'CISCO-PSM-MIB', 'cpsmFabricBindNwType'), (0, 'CISCO-PSM-MIB', 'cpsmFabricBindNwIndex'), (0, 'CISCO-PSM-MIB', 'cpsmFabricBindIndex')) if mibBuilder.loadTexts: cpsmFabricBindEntry.setStatus('current') cpsm_fabric_bind_nw_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 3, 1, 1), cpsm_virt_nw_type()) if mibBuilder.loadTexts: cpsmFabricBindNwType.setStatus('current') cpsm_fabric_bind_nw_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 3, 1, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4093))) if mibBuilder.loadTexts: cpsmFabricBindNwIndex.setStatus('current') cpsm_fabric_bind_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 3, 1, 3), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4096))) if mibBuilder.loadTexts: cpsmFabricBindIndex.setStatus('current') cpsm_fabric_bind_switch_wwn = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 3, 1, 4), octet_string().subtype(subtypeSpec=value_size_constraint(8, 8)).setFixedLength(8)).setMaxAccess('readcreate') if mibBuilder.loadTexts: cpsmFabricBindSwitchWwn.setStatus('current') cpsm_fabric_bind_dom_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 3, 1, 5), domain_id()).setMaxAccess('readcreate') if mibBuilder.loadTexts: cpsmFabricBindDomId.setStatus('current') cpsm_fabric_bind_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 3, 1, 6), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: cpsmFabricBindRowStatus.setStatus('current') cpsm_fabric_bind_activate_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 4)) if mibBuilder.loadTexts: cpsmFabricBindActivateTable.setStatus('current') cpsm_fabric_bind_activate_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 4, 1)).setIndexNames((0, 'CISCO-PSM-MIB', 'cpsmFabricBindNwType'), (0, 'CISCO-PSM-MIB', 'cpsmFabricBindNwIndex')) if mibBuilder.loadTexts: cpsmFabricBindActivateEntry.setStatus('current') cpsm_fabric_bind_activate = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 4, 1, 1), cpsm_db_activate()).setMaxAccess('readwrite') if mibBuilder.loadTexts: cpsmFabricBindActivate.setStatus('current') cpsm_fabric_bind_result = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 4, 1, 2), cpsm_activate_result()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmFabricBindResult.setStatus('current') cpsm_fabric_bind_last_act_time = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 4, 1, 3), time_stamp()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmFabricBindLastActTime.setStatus('current') cpsm_fabric_bind_act_state = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 4, 1, 4), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmFabricBindActState.setStatus('current') cpsm_port_bind_copy_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 5)) if mibBuilder.loadTexts: cpsmPortBindCopyTable.setStatus('current') cpsm_port_bind_copy_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 5, 1)).setIndexNames((0, 'CISCO-PSM-MIB', 'cpsmPortBindNwType'), (0, 'CISCO-PSM-MIB', 'cpsmPortBindNwIndex')) if mibBuilder.loadTexts: cpsmPortBindCopyEntry.setStatus('current') cpsm_port_bind_copy_act_to_config = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 5, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('copy', 1), ('noop', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: cpsmPortBindCopyActToConfig.setStatus('current') cpsm_port_bind_last_change_time = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 5, 1, 2), time_stamp()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmPortBindLastChangeTime.setStatus('current') cpsm_fabric_bind_copy_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 6)) if mibBuilder.loadTexts: cpsmFabricBindCopyTable.setStatus('current') cpsm_fabric_bind_copy_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 6, 1)).setIndexNames((0, 'CISCO-PSM-MIB', 'cpsmFabricBindNwType'), (0, 'CISCO-PSM-MIB', 'cpsmFabricBindNwIndex')) if mibBuilder.loadTexts: cpsmFabricBindCopyEntry.setStatus('current') cpsm_fabric_bind_copy_act_to_config = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 6, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('copy', 1), ('noop', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: cpsmFabricBindCopyActToConfig.setStatus('current') cpsm_fabric_bind_last_change_time = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 6, 1, 2), time_stamp()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmFabricBindLastChangeTime.setStatus('current') cpsm_port_bind_enf_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 7)) if mibBuilder.loadTexts: cpsmPortBindEnfTable.setStatus('current') cpsm_port_bind_enf_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 7, 1)).setIndexNames((0, 'CISCO-PSM-MIB', 'cpsmPortBindEnfNwType'), (0, 'CISCO-PSM-MIB', 'cpsmPortBindEnfNwIndex'), (0, 'CISCO-PSM-MIB', 'cpsmPortBindEnfIndex')) if mibBuilder.loadTexts: cpsmPortBindEnfEntry.setStatus('current') cpsm_port_bind_enf_nw_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 7, 1, 1), cpsm_virt_nw_type()) if mibBuilder.loadTexts: cpsmPortBindEnfNwType.setStatus('current') cpsm_port_bind_enf_nw_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 7, 1, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4093))) if mibBuilder.loadTexts: cpsmPortBindEnfNwIndex.setStatus('current') cpsm_port_bind_enf_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 7, 1, 3), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4096))) if mibBuilder.loadTexts: cpsmPortBindEnfIndex.setStatus('current') cpsm_port_bind_enf_login_dev_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 7, 1, 4), cpsm_port_bind_dev_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmPortBindEnfLoginDevType.setStatus('current') cpsm_port_bind_enf_login_dev = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 7, 1, 5), octet_string().subtype(subtypeSpec=constraints_union(value_size_constraint(0, 0), value_size_constraint(6, 6), value_size_constraint(8, 8)))).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmPortBindEnfLoginDev.setStatus('current') cpsm_port_bind_enf_login_point_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 7, 1, 6), cpsm_port_bind_sw_port_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmPortBindEnfLoginPointType.setStatus('current') cpsm_port_bind_enf_login_point = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 7, 1, 7), octet_string().subtype(subtypeSpec=constraints_union(value_size_constraint(0, 0), value_size_constraint(4, 4), value_size_constraint(8, 8)))).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmPortBindEnfLoginPoint.setStatus('current') cpsm_port_bind_enf_is_learnt = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 7, 1, 8), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmPortBindEnfIsLearnt.setStatus('current') cpsm_fabric_bind_enf_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 8)) if mibBuilder.loadTexts: cpsmFabricBindEnfTable.setStatus('current') cpsm_fabric_bind_enf_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 8, 1)).setIndexNames((0, 'CISCO-PSM-MIB', 'cpsmFabricBindEnfNwType'), (0, 'CISCO-PSM-MIB', 'cpsmFabricBindEnfNwIndex'), (0, 'CISCO-PSM-MIB', 'cpsmFabricBindEnfIndex')) if mibBuilder.loadTexts: cpsmFabricBindEnfEntry.setStatus('current') cpsm_fabric_bind_enf_nw_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 8, 1, 1), cpsm_virt_nw_type()) if mibBuilder.loadTexts: cpsmFabricBindEnfNwType.setStatus('current') cpsm_fabric_bind_enf_nw_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 8, 1, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4093))) if mibBuilder.loadTexts: cpsmFabricBindEnfNwIndex.setStatus('current') cpsm_fabric_bind_enf_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 8, 1, 3), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4096))) if mibBuilder.loadTexts: cpsmFabricBindEnfIndex.setStatus('current') cpsm_fabric_bind_enf_switch_wwn = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 8, 1, 4), octet_string().subtype(subtypeSpec=value_size_constraint(8, 8)).setFixedLength(8)).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmFabricBindEnfSwitchWwn.setStatus('current') cpsm_fabric_bind_enf_dom_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 8, 1, 5), domain_id()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmFabricBindEnfDomId.setStatus('current') cpsm_fabric_bind_enf_is_learnt = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 8, 1, 6), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmFabricBindEnfIsLearnt.setStatus('current') cpsm_port_bind_auto_learn_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 9)) if mibBuilder.loadTexts: cpsmPortBindAutoLearnTable.setStatus('current') cpsm_port_bind_auto_learn_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 9, 1)).setIndexNames((0, 'CISCO-PSM-MIB', 'cpsmPortBindAutoLearnIndexType'), (0, 'CISCO-PSM-MIB', 'cpsmPortBindAutoLearnIndex')) if mibBuilder.loadTexts: cpsmPortBindAutoLearnEntry.setStatus('current') cpsm_port_bind_auto_learn_index_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 9, 1, 1), cpsm_virt_nw_type()) if mibBuilder.loadTexts: cpsmPortBindAutoLearnIndexType.setStatus('current') cpsm_port_bind_auto_learn_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 9, 1, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4093))) if mibBuilder.loadTexts: cpsmPortBindAutoLearnIndex.setStatus('current') cpsm_port_bind_auto_learn_enable = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 9, 1, 3), cpsm_auto_learn_enable().clone('off')).setMaxAccess('readwrite') if mibBuilder.loadTexts: cpsmPortBindAutoLearnEnable.setStatus('current') cpsm_fabric_bind_auto_learn_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 10)) if mibBuilder.loadTexts: cpsmFabricBindAutoLearnTable.setStatus('deprecated') cpsm_fabric_bind_auto_learn_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 10, 1)).setIndexNames((0, 'CISCO-PSM-MIB', 'cpsmFabricBindAutoLearnIndexType'), (0, 'CISCO-PSM-MIB', 'cpsmFabricBindAutoLearnIndex')) if mibBuilder.loadTexts: cpsmFabricBindAutoLearnEntry.setStatus('deprecated') cpsm_fabric_bind_auto_learn_index_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 10, 1, 1), cpsm_virt_nw_type()) if mibBuilder.loadTexts: cpsmFabricBindAutoLearnIndexType.setStatus('deprecated') cpsm_fabric_bind_auto_learn_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 10, 1, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4093))) if mibBuilder.loadTexts: cpsmFabricBindAutoLearnIndex.setStatus('deprecated') cpsm_fabric_bind_auto_learn_enable = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 10, 1, 3), cpsm_auto_learn_enable().clone('off')).setMaxAccess('readwrite') if mibBuilder.loadTexts: cpsmFabricBindAutoLearnEnable.setStatus('deprecated') cpsm_port_bind_clear_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 11)) if mibBuilder.loadTexts: cpsmPortBindClearTable.setStatus('current') cpsm_port_bind_clear_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 11, 1)).setIndexNames((0, 'CISCO-PSM-MIB', 'cpsmPortBindClearNwType'), (0, 'CISCO-PSM-MIB', 'cpsmPortBindClearNwIndex')) if mibBuilder.loadTexts: cpsmPortBindClearEntry.setStatus('current') cpsm_port_bind_clear_nw_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 11, 1, 1), cpsm_virt_nw_type()) if mibBuilder.loadTexts: cpsmPortBindClearNwType.setStatus('current') cpsm_port_bind_clear_nw_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 11, 1, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4093))) if mibBuilder.loadTexts: cpsmPortBindClearNwIndex.setStatus('current') cpsm_port_bind_clear_stats = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 11, 1, 3), cpsm_clear_stats()).setMaxAccess('readwrite') if mibBuilder.loadTexts: cpsmPortBindClearStats.setStatus('current') cpsm_port_bind_clear_auto_learn_db = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 11, 1, 4), cpsm_clear_auto_learn_db()).setMaxAccess('readwrite') if mibBuilder.loadTexts: cpsmPortBindClearAutoLearnDb.setStatus('current') cpsm_port_bind_clear_auto_learn_intf = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 11, 1, 5), port_member_list().clone(hexValue='')).setMaxAccess('readwrite') if mibBuilder.loadTexts: cpsmPortBindClearAutoLearnIntf.setStatus('current') cpsm_fabric_bind_clear_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 12)) if mibBuilder.loadTexts: cpsmFabricBindClearTable.setStatus('current') cpsm_fabric_bind_clear_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 12, 1)).setIndexNames((0, 'CISCO-PSM-MIB', 'cpsmFabricBindClearNwType'), (0, 'CISCO-PSM-MIB', 'cpsmFabricBindClearNwIndex')) if mibBuilder.loadTexts: cpsmFabricBindClearEntry.setStatus('current') cpsm_fabric_bind_clear_nw_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 12, 1, 1), cpsm_virt_nw_type()) if mibBuilder.loadTexts: cpsmFabricBindClearNwType.setStatus('current') cpsm_fabric_bind_clear_nw_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 12, 1, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4093))) if mibBuilder.loadTexts: cpsmFabricBindClearNwIndex.setStatus('current') cpsm_fabric_bind_clear_stats = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 12, 1, 3), cpsm_clear_stats()).setMaxAccess('readwrite') if mibBuilder.loadTexts: cpsmFabricBindClearStats.setStatus('current') cpsm_fabric_bind_clear_auto_learn_db = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 12, 1, 4), cpsm_clear_auto_learn_db()).setMaxAccess('readwrite') if mibBuilder.loadTexts: cpsmFabricBindClearAutoLearnDb.setStatus('current') cpsm_fabric_bind_clear_auto_learn_intf = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 12, 1, 5), interface_index_or_zero()).setMaxAccess('readwrite') if mibBuilder.loadTexts: cpsmFabricBindClearAutoLearnIntf.setStatus('deprecated') cpsm_port_bind_diff_config_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 13)) if mibBuilder.loadTexts: cpsmPortBindDiffConfigTable.setStatus('current') cpsm_port_bind_diff_config_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 13, 1)).setIndexNames((0, 'CISCO-PSM-MIB', 'cpsmPortBindDiffConfigNwType'), (0, 'CISCO-PSM-MIB', 'cpsmPortBindDiffConfigNwIndex')) if mibBuilder.loadTexts: cpsmPortBindDiffConfigEntry.setStatus('current') cpsm_port_bind_diff_config_nw_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 13, 1, 1), cpsm_virt_nw_type()) if mibBuilder.loadTexts: cpsmPortBindDiffConfigNwType.setStatus('current') cpsm_port_bind_diff_config_nw_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 13, 1, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4093))) if mibBuilder.loadTexts: cpsmPortBindDiffConfigNwIndex.setStatus('current') cpsm_port_bind_diff_config_db = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 13, 1, 3), cpsm_diff_db()).setMaxAccess('readwrite') if mibBuilder.loadTexts: cpsmPortBindDiffConfigDb.setStatus('current') cpsm_port_bind_diff_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 14)) if mibBuilder.loadTexts: cpsmPortBindDiffTable.setStatus('current') cpsm_port_bind_diff_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 14, 1)).setIndexNames((0, 'CISCO-PSM-MIB', 'cpsmPortBindDiffNwType'), (0, 'CISCO-PSM-MIB', 'cpsmPortBindDiffNwIndex'), (0, 'CISCO-PSM-MIB', 'cpsmPortBindDiffIndex')) if mibBuilder.loadTexts: cpsmPortBindDiffEntry.setStatus('current') cpsm_port_bind_diff_nw_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 14, 1, 1), cpsm_virt_nw_type()) if mibBuilder.loadTexts: cpsmPortBindDiffNwType.setStatus('current') cpsm_port_bind_diff_nw_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 14, 1, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4093))) if mibBuilder.loadTexts: cpsmPortBindDiffNwIndex.setStatus('current') cpsm_port_bind_diff_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 14, 1, 3), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4096))) if mibBuilder.loadTexts: cpsmPortBindDiffIndex.setStatus('current') cpsm_port_bind_diff_reason = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 14, 1, 4), cpsm_diff_reason()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmPortBindDiffReason.setStatus('current') cpsm_port_bind_diff_login_dev_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 14, 1, 5), cpsm_port_bind_dev_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmPortBindDiffLoginDevType.setStatus('current') cpsm_port_bind_diff_login_dev = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 14, 1, 6), octet_string().subtype(subtypeSpec=constraints_union(value_size_constraint(0, 0), value_size_constraint(6, 6), value_size_constraint(8, 8)))).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmPortBindDiffLoginDev.setStatus('current') cpsm_port_bind_diff_login_point_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 14, 1, 7), cpsm_port_bind_sw_port_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmPortBindDiffLoginPointType.setStatus('current') cpsm_port_bind_diff_login_point = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 14, 1, 8), octet_string().subtype(subtypeSpec=constraints_union(value_size_constraint(0, 0), value_size_constraint(4, 4), value_size_constraint(8, 8)))).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmPortBindDiffLoginPoint.setStatus('current') cpsm_fabric_bind_diff_config_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 15)) if mibBuilder.loadTexts: cpsmFabricBindDiffConfigTable.setStatus('current') cpsm_fabric_bind_diff_config_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 15, 1)).setIndexNames((0, 'CISCO-PSM-MIB', 'cpsmFabricBindDiffConfigNwType'), (0, 'CISCO-PSM-MIB', 'cpsmFabricBindDiffConfigNwIndex')) if mibBuilder.loadTexts: cpsmFabricBindDiffConfigEntry.setStatus('current') cpsm_fabric_bind_diff_config_nw_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 15, 1, 1), cpsm_virt_nw_type()) if mibBuilder.loadTexts: cpsmFabricBindDiffConfigNwType.setStatus('current') cpsm_fabric_bind_diff_config_nw_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 15, 1, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4093))) if mibBuilder.loadTexts: cpsmFabricBindDiffConfigNwIndex.setStatus('current') cpsm_fabric_bind_diff_config_db = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 15, 1, 3), cpsm_diff_db()).setMaxAccess('readwrite') if mibBuilder.loadTexts: cpsmFabricBindDiffConfigDb.setStatus('current') cpsm_fabric_bind_diff_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 16)) if mibBuilder.loadTexts: cpsmFabricBindDiffTable.setStatus('current') cpsm_fabric_bind_diff_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 16, 1)).setIndexNames((0, 'CISCO-PSM-MIB', 'cpsmFabricBindDiffNwType'), (0, 'CISCO-PSM-MIB', 'cpsmFabricBindDiffNwIndex'), (0, 'CISCO-PSM-MIB', 'cpsmFabricBindDiffIndex')) if mibBuilder.loadTexts: cpsmFabricBindDiffEntry.setStatus('current') cpsm_fabric_bind_diff_nw_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 16, 1, 1), cpsm_virt_nw_type()) if mibBuilder.loadTexts: cpsmFabricBindDiffNwType.setStatus('current') cpsm_fabric_bind_diff_nw_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 16, 1, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4093))) if mibBuilder.loadTexts: cpsmFabricBindDiffNwIndex.setStatus('current') cpsm_fabric_bind_diff_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 16, 1, 3), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4096))) if mibBuilder.loadTexts: cpsmFabricBindDiffIndex.setStatus('current') cpsm_fabric_bind_diff_reason = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 16, 1, 4), cpsm_diff_reason()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmFabricBindDiffReason.setStatus('current') cpsm_fabric_bind_diff_switch_wwn = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 16, 1, 5), octet_string().subtype(subtypeSpec=value_size_constraint(8, 8)).setFixedLength(8)).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmFabricBindDiffSwitchWwn.setStatus('current') cpsm_fabric_bind_diff_dom_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 16, 1, 6), domain_id()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmFabricBindDiffDomId.setStatus('current') cpsm_port_bind_stats_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 1)) if mibBuilder.loadTexts: cpsmPortBindStatsTable.setStatus('current') cpsm_port_bind_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 1, 1)).setIndexNames((0, 'CISCO-PSM-MIB', 'cpsmPortBindVsanVlanType'), (0, 'CISCO-PSM-MIB', 'cpsmPortBindVsanVlanIndex')) if mibBuilder.loadTexts: cpsmPortBindStatsEntry.setStatus('current') cpsm_port_bind_vsan_vlan_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 1, 1, 1), cpsm_virt_nw_type()) if mibBuilder.loadTexts: cpsmPortBindVsanVlanType.setStatus('current') cpsm_port_bind_vsan_vlan_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 1, 1, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4093))) if mibBuilder.loadTexts: cpsmPortBindVsanVlanIndex.setStatus('current') cpsm_port_bind_allowed_logins = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 1, 1, 3), cpsm_stats_counter()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmPortBindAllowedLogins.setStatus('current') cpsm_port_bind_denied_logins = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 1, 1, 4), cpsm_stats_counter()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmPortBindDeniedLogins.setStatus('current') cpsm_fabric_bind_stats_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 2)) if mibBuilder.loadTexts: cpsmFabricBindStatsTable.setStatus('current') cpsm_fabric_bind_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 2, 1)).setIndexNames((0, 'CISCO-PSM-MIB', 'cpsmFabricBindVsanVlanType'), (0, 'CISCO-PSM-MIB', 'cpsmFabricBindVsanVlanIndex')) if mibBuilder.loadTexts: cpsmFabricBindStatsEntry.setStatus('current') cpsm_fabric_bind_vsan_vlan_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 2, 1, 1), cpsm_virt_nw_type()) if mibBuilder.loadTexts: cpsmFabricBindVsanVlanType.setStatus('current') cpsm_fabric_bind_vsan_vlan_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 2, 1, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4093))) if mibBuilder.loadTexts: cpsmFabricBindVsanVlanIndex.setStatus('current') cpsm_fabric_bind_allowed_reqs = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 2, 1, 3), cpsm_stats_counter()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmFabricBindAllowedReqs.setStatus('current') cpsm_fabric_bind_denied_reqs = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 2, 1, 4), cpsm_stats_counter()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmFabricBindDeniedReqs.setStatus('current') cpsm_port_bind_violation_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 3)) if mibBuilder.loadTexts: cpsmPortBindViolationTable.setStatus('current') cpsm_port_bind_violation_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 3, 1)).setIndexNames((0, 'CISCO-PSM-MIB', 'cpsmPortBindViolationNwType'), (0, 'CISCO-PSM-MIB', 'cpsmPortBindViolationNwIndex'), (0, 'CISCO-PSM-MIB', 'cpsmPortBindViolationIndex')) if mibBuilder.loadTexts: cpsmPortBindViolationEntry.setStatus('current') cpsm_port_bind_violation_nw_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 3, 1, 1), cpsm_virt_nw_type()) if mibBuilder.loadTexts: cpsmPortBindViolationNwType.setStatus('current') cpsm_port_bind_violation_nw_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 3, 1, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4093))) if mibBuilder.loadTexts: cpsmPortBindViolationNwIndex.setStatus('current') cpsm_port_bind_violation_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 3, 1, 3), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 100))) if mibBuilder.loadTexts: cpsmPortBindViolationIndex.setStatus('current') cpsm_port_bind_login_pwwn = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 3, 1, 4), fc_name_id_or_zero()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmPortBindLoginPwwn.setStatus('current') cpsm_port_bind_login_nwwn = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 3, 1, 5), fc_name_id_or_zero()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmPortBindLoginNwwn.setStatus('current') cpsm_port_bind_login_swwn = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 3, 1, 6), fc_name_id_or_zero()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmPortBindLoginSwwn.setStatus('current') cpsm_port_bind_login_port = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 3, 1, 7), fc_name_id()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmPortBindLoginPort.setStatus('current') cpsm_port_bind_login_time = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 3, 1, 8), time_stamp()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmPortBindLoginTime.setStatus('current') cpsm_port_bind_login_count = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 3, 1, 9), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmPortBindLoginCount.setStatus('current') cpsm_port_bind_login_intf = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 3, 1, 10), interface_index()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmPortBindLoginIntf.setStatus('current') cpsm_fabric_bind_violation_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 4)) if mibBuilder.loadTexts: cpsmFabricBindViolationTable.setStatus('deprecated') cpsm_fabric_bind_violation_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 4, 1)).setIndexNames((0, 'CISCO-PSM-MIB', 'cpsmFabricBindViolationIndex')) if mibBuilder.loadTexts: cpsmFabricBindViolationEntry.setStatus('deprecated') cpsm_fabric_bind_violation_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 4, 1, 1), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 100))) if mibBuilder.loadTexts: cpsmFabricBindViolationIndex.setStatus('deprecated') cpsm_fabric_bind_swwn = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 4, 1, 2), fc_name_id()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmFabricBindSwwn.setStatus('deprecated') cpsm_fabric_bind_local_port = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 4, 1, 3), fc_name_id()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmFabricBindLocalPort.setStatus('deprecated') cpsm_fabric_bind_denial_time = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 4, 1, 4), time_stamp()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmFabricBindDenialTime.setStatus('deprecated') cpsm_fabric_bind_local_intf = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 4, 1, 5), interface_index()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmFabricBindLocalIntf.setStatus('deprecated') cpsm_fabric_bind_violation_new_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 5)) if mibBuilder.loadTexts: cpsmFabricBindViolationNewTable.setStatus('current') cpsm_fabric_bind_violation_new_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 5, 1)).setIndexNames((0, 'CISCO-PSM-MIB', 'cpsmFabricBindViolationNwTypeR1'), (0, 'CISCO-PSM-MIB', 'cpsmFabricBindViolationNwIndexR1'), (0, 'CISCO-PSM-MIB', 'cpsmFabricBindViolationIndexR1')) if mibBuilder.loadTexts: cpsmFabricBindViolationNewEntry.setStatus('current') cpsm_fabric_bind_violation_nw_type_r1 = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 5, 1, 1), cpsm_virt_nw_type()) if mibBuilder.loadTexts: cpsmFabricBindViolationNwTypeR1.setStatus('current') cpsm_fabric_bind_violation_nw_index_r1 = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 5, 1, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4093))) if mibBuilder.loadTexts: cpsmFabricBindViolationNwIndexR1.setStatus('current') cpsm_fabric_bind_violation_index_r1 = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 5, 1, 3), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 100))) if mibBuilder.loadTexts: cpsmFabricBindViolationIndexR1.setStatus('current') cpsm_fabric_bind_swwn_r1 = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 5, 1, 4), fc_name_id()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmFabricBindSwwnR1.setStatus('current') cpsm_fabric_bind_denial_time_r1 = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 5, 1, 5), time_stamp()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmFabricBindDenialTimeR1.setStatus('current') cpsm_fabric_bind_denial_count_r1 = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 5, 1, 6), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmFabricBindDenialCountR1.setStatus('current') cpsm_fabric_bind_denial_dom_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 5, 1, 7), domain_id_or_zero()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmFabricBindDenialDomId.setStatus('current') cpsm_fabric_bind_denial_reason_code = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 5, 1, 8), cpsm_violation_reason_code()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmFabricBindDenialReasonCode.setStatus('current') cpsm_efmd_stats_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 6)) if mibBuilder.loadTexts: cpsmEfmdStatsTable.setStatus('current') cpsm_efmd_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 6, 1)).setIndexNames((0, 'CISCO-VSAN-MIB', 'vsanIndex')) if mibBuilder.loadTexts: cpsmEfmdStatsEntry.setStatus('current') cpsm_efmd_tx_merge_reqs = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 6, 1, 1), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmEfmdTxMergeReqs.setStatus('current') cpsm_efmd_rx_merge_reqs = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 6, 1, 2), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmEfmdRxMergeReqs.setStatus('current') cpsm_efmd_tx_merge_accs = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 6, 1, 3), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmEfmdTxMergeAccs.setStatus('current') cpsm_efmd_rx_merge_accs = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 6, 1, 4), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmEfmdRxMergeAccs.setStatus('current') cpsm_efmd_tx_merge_rejs = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 6, 1, 5), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmEfmdTxMergeRejs.setStatus('current') cpsm_efmd_rx_merge_rejs = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 6, 1, 6), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmEfmdRxMergeRejs.setStatus('current') cpsm_efmd_tx_merge_busys = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 6, 1, 7), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmEfmdTxMergeBusys.setStatus('current') cpsm_efmd_rx_merge_busys = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 6, 1, 8), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmEfmdRxMergeBusys.setStatus('current') cpsm_efmd_tx_merge_errs = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 6, 1, 9), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmEfmdTxMergeErrs.setStatus('current') cpsm_efmd_rx_merge_errs = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 2, 6, 1, 10), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmEfmdRxMergeErrs.setStatus('current') cpsm_notify_enable = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 17), truth_value().clone('false')).setMaxAccess('readwrite') if mibBuilder.loadTexts: cpsmNotifyEnable.setStatus('current') cpsm_efmd_config_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 18)) if mibBuilder.loadTexts: cpsmEfmdConfigTable.setStatus('current') cpsm_efmd_config_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 18, 1)).setIndexNames((0, 'CISCO-VSAN-MIB', 'vsanIndex')) if mibBuilder.loadTexts: cpsmEfmdConfigEntry.setStatus('current') cpsm_efmd_config_enforce = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 18, 1, 1), truth_value().clone('true')).setMaxAccess('readwrite') if mibBuilder.loadTexts: cpsmEfmdConfigEnforce.setStatus('current') cpsm_port_bind_next_free_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 19)) if mibBuilder.loadTexts: cpsmPortBindNextFreeTable.setStatus('current') cpsm_port_bind_next_free_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 19, 1)).setIndexNames((0, 'CISCO-PSM-MIB', 'cpsmPortBindNextFreeNwType'), (0, 'CISCO-PSM-MIB', 'cpsmPortBindNextFreeNwIndex')) if mibBuilder.loadTexts: cpsmPortBindNextFreeEntry.setStatus('current') cpsm_port_bind_next_free_nw_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 19, 1, 1), cpsm_virt_nw_type()) if mibBuilder.loadTexts: cpsmPortBindNextFreeNwType.setStatus('current') cpsm_port_bind_next_free_nw_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 19, 1, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4093))) if mibBuilder.loadTexts: cpsmPortBindNextFreeNwIndex.setStatus('current') cpsm_port_bind_next_free_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 19, 1, 3), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 4095))).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmPortBindNextFreeIndex.setStatus('current') cpsm_fabric_bind_next_free_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 20)) if mibBuilder.loadTexts: cpsmFabricBindNextFreeTable.setStatus('current') cpsm_fabric_bind_next_free_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 20, 1)).setIndexNames((0, 'CISCO-PSM-MIB', 'cpsmFabricBindNextFreeNwType'), (0, 'CISCO-PSM-MIB', 'cpsmFabricBindNextFreeNwIndex')) if mibBuilder.loadTexts: cpsmFabricBindNextFreeEntry.setStatus('current') cpsm_fabric_bind_next_free_nw_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 20, 1, 1), cpsm_virt_nw_type()) if mibBuilder.loadTexts: cpsmFabricBindNextFreeNwType.setStatus('current') cpsm_fabric_bind_next_free_nw_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 20, 1, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4093))) if mibBuilder.loadTexts: cpsmFabricBindNextFreeNwIndex.setStatus('current') cpsm_fabric_bind_next_free_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 364, 1, 1, 20, 1, 3), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 4095))).setMaxAccess('readonly') if mibBuilder.loadTexts: cpsmFabricBindNextFreeIndex.setStatus('current') cisco_psm_port_bind_f_port_deny_notify = notification_type((1, 3, 6, 1, 4, 1, 9, 9, 364, 0, 1)).setObjects(('CISCO-PSM-MIB', 'cpsmPortBindLoginPwwn'), ('CISCO-PSM-MIB', 'cpsmPortBindLoginPort'), ('CISCO-PSM-MIB', 'cpsmPortBindLoginTime')) if mibBuilder.loadTexts: ciscoPsmPortBindFPortDenyNotify.setStatus('current') cisco_psm_port_bind_e_port_deny_notify = notification_type((1, 3, 6, 1, 4, 1, 9, 9, 364, 0, 2)).setObjects(('CISCO-PSM-MIB', 'cpsmPortBindLoginSwwn'), ('CISCO-PSM-MIB', 'cpsmPortBindLoginPort'), ('CISCO-PSM-MIB', 'cpsmPortBindLoginTime')) if mibBuilder.loadTexts: ciscoPsmPortBindEPortDenyNotify.setStatus('current') cisco_psm_fabric_bind_deny_notify = notification_type((1, 3, 6, 1, 4, 1, 9, 9, 364, 0, 3)).setObjects(('CISCO-PSM-MIB', 'cpsmFabricBindSwwn'), ('CISCO-PSM-MIB', 'cpsmFabricBindLocalPort'), ('CISCO-PSM-MIB', 'cpsmFabricBindDenialTime')) if mibBuilder.loadTexts: ciscoPsmFabricBindDenyNotify.setStatus('deprecated') cisco_psm_fabric_bind_deny_notify_new = notification_type((1, 3, 6, 1, 4, 1, 9, 9, 364, 0, 4)).setObjects(('CISCO-PSM-MIB', 'cpsmFabricBindSwwnR1'), ('CISCO-PSM-MIB', 'cpsmFabricBindDenialTimeR1'), ('CISCO-PSM-MIB', 'cpsmFabricBindDenialReasonCode')) if mibBuilder.loadTexts: ciscoPsmFabricBindDenyNotifyNew.setStatus('current') cisco_psm_mib_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 1)) cisco_psm_mib_groups = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 2)) cisco_psm_mib_compliance = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 1, 1)).setObjects(('CISCO-PSM-MIB', 'ciscoPsmPortBindConfigGroup'), ('CISCO-PSM-MIB', 'ciscoPsmFabricBindConfigGroup'), ('CISCO-PSM-MIB', 'ciscoPsmPortBindEnforcedGroup'), ('CISCO-PSM-MIB', 'ciscoPsmFabricBindEnforcedGroup'), ('CISCO-PSM-MIB', 'ciscoPsmPortBindStatsGroup'), ('CISCO-PSM-MIB', 'ciscoPsmFabricBindStatsGroup'), ('CISCO-PSM-MIB', 'ciscoPsmPortBindNotifyGroup'), ('CISCO-PSM-MIB', 'ciscoPsmFabricBindNotifyGroup'), ('CISCO-PSM-MIB', 'ciscoPsmNotifyEnableGroup'), ('CISCO-PSM-MIB', 'ciscoPsmPortBindAutoLearnGroup'), ('CISCO-PSM-MIB', 'ciscoPsmFabricBindAutoLearnGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_psm_mib_compliance = ciscoPsmMIBCompliance.setStatus('deprecated') cisco_psm_mib_compliance_rev1 = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 1, 2)).setObjects(('CISCO-PSM-MIB', 'ciscoPsmPortBindConfigGroup'), ('CISCO-PSM-MIB', 'ciscoPsmFabricBindConfigGroup1'), ('CISCO-PSM-MIB', 'ciscoPsmPortBindEnforcedGroup'), ('CISCO-PSM-MIB', 'ciscoPsmFabricBindEnforcedGroup'), ('CISCO-PSM-MIB', 'ciscoPsmPortBindStatsGroup'), ('CISCO-PSM-MIB', 'ciscoPsmFabricBindStatsGroup1'), ('CISCO-PSM-MIB', 'ciscoPsmPortBindNotifyGroup'), ('CISCO-PSM-MIB', 'ciscoPsmFabricBindNotifyGroupR1'), ('CISCO-PSM-MIB', 'ciscoPsmNotifyEnableGroup'), ('CISCO-PSM-MIB', 'ciscoPsmPortBindAutoLearnGroup'), ('CISCO-PSM-MIB', 'ciscoPsmFabricBindAutoLearnGroup'), ('CISCO-PSM-MIB', 'ciscoPsmEfmdConfigGroup'), ('CISCO-PSM-MIB', 'ciscoPsmEfmdStatsGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_psm_mib_compliance_rev1 = ciscoPsmMIBComplianceRev1.setStatus('deprecated') cisco_psm_mib_compliance_rev2 = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 1, 3)).setObjects(('CISCO-PSM-MIB', 'ciscoPsmPortBindConfigGroup'), ('CISCO-PSM-MIB', 'ciscoPsmFabricBindConfigGroup1'), ('CISCO-PSM-MIB', 'ciscoPsmPortBindEnforcedGroup'), ('CISCO-PSM-MIB', 'ciscoPsmFabricBindEnforcedGroup'), ('CISCO-PSM-MIB', 'ciscoPsmPortBindStatsGroup'), ('CISCO-PSM-MIB', 'ciscoPsmFabricBindStatsGroup1'), ('CISCO-PSM-MIB', 'ciscoPsmPortBindNotifyGroup'), ('CISCO-PSM-MIB', 'ciscoPsmFabricBindNotifyGroupR1'), ('CISCO-PSM-MIB', 'ciscoPsmNotifyEnableGroup'), ('CISCO-PSM-MIB', 'ciscoPsmPortBindAutoLearnGroup'), ('CISCO-PSM-MIB', 'ciscoPsmEfmdConfigGroup'), ('CISCO-PSM-MIB', 'ciscoPsmEfmdStatsGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_psm_mib_compliance_rev2 = ciscoPsmMIBComplianceRev2.setStatus('deprecated') cisco_psm_mib_compliance_rev3 = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 1, 4)).setObjects(('CISCO-PSM-MIB', 'ciscoPsmPortBindConfigGroup'), ('CISCO-PSM-MIB', 'ciscoPsmFabricBindConfigGroup1'), ('CISCO-PSM-MIB', 'ciscoPsmPortBindEnforcedGroup'), ('CISCO-PSM-MIB', 'ciscoPsmFabricBindEnforcedGroup'), ('CISCO-PSM-MIB', 'ciscoPsmPortBindStatsGroup'), ('CISCO-PSM-MIB', 'ciscoPsmFabricBindStatsGroup2'), ('CISCO-PSM-MIB', 'ciscoPsmPortBindNotifyGroup'), ('CISCO-PSM-MIB', 'ciscoPsmFabricBindNotifyGroupR1'), ('CISCO-PSM-MIB', 'ciscoPsmNotifyEnableGroup'), ('CISCO-PSM-MIB', 'ciscoPsmPortBindAutoLearnGroup'), ('CISCO-PSM-MIB', 'ciscoPsmEfmdConfigGroup'), ('CISCO-PSM-MIB', 'ciscoPsmEfmdStatsGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_psm_mib_compliance_rev3 = ciscoPsmMIBComplianceRev3.setStatus('deprecated') cisco_psm_mib_compliance_rev4 = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 1, 5)).setObjects(('CISCO-PSM-MIB', 'ciscoPsmPortBindConfigGroup'), ('CISCO-PSM-MIB', 'ciscoPsmFabricBindConfigGroup1'), ('CISCO-PSM-MIB', 'ciscoPsmPortBindEnforcedGroup'), ('CISCO-PSM-MIB', 'ciscoPsmFabricBindEnforcedGroup'), ('CISCO-PSM-MIB', 'ciscoPsmPortBindStatsGroup'), ('CISCO-PSM-MIB', 'ciscoPsmFabricBindStatsGroup3'), ('CISCO-PSM-MIB', 'ciscoPsmPortBindNotifyGroup'), ('CISCO-PSM-MIB', 'ciscoPsmFabricBindNotifyGroupR1'), ('CISCO-PSM-MIB', 'ciscoPsmNotifyEnableGroup'), ('CISCO-PSM-MIB', 'ciscoPsmPortBindAutoLearnGroup'), ('CISCO-PSM-MIB', 'ciscoPsmEfmdConfigGroup'), ('CISCO-PSM-MIB', 'ciscoPsmEfmdStatsGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_psm_mib_compliance_rev4 = ciscoPsmMIBComplianceRev4.setStatus('deprecated') cisco_psm_mib_compliance_rev5 = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 1, 6)).setObjects(('CISCO-PSM-MIB', 'ciscoPsmPortBindConfigGroup1'), ('CISCO-PSM-MIB', 'ciscoPsmFabricBindConfigGroup2'), ('CISCO-PSM-MIB', 'ciscoPsmPortBindEnforcedGroup'), ('CISCO-PSM-MIB', 'ciscoPsmFabricBindEnforcedGroup'), ('CISCO-PSM-MIB', 'ciscoPsmPortBindStatsGroup'), ('CISCO-PSM-MIB', 'ciscoPsmFabricBindStatsGroup3'), ('CISCO-PSM-MIB', 'ciscoPsmPortBindNotifyGroup'), ('CISCO-PSM-MIB', 'ciscoPsmFabricBindNotifyGroupR1'), ('CISCO-PSM-MIB', 'ciscoPsmNotifyEnableGroup'), ('CISCO-PSM-MIB', 'ciscoPsmPortBindAutoLearnGroup'), ('CISCO-PSM-MIB', 'ciscoPsmEfmdConfigGroup'), ('CISCO-PSM-MIB', 'ciscoPsmEfmdStatsGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_psm_mib_compliance_rev5 = ciscoPsmMIBComplianceRev5.setStatus('current') cisco_psm_port_bind_config_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 2, 1)).setObjects(('CISCO-PSM-MIB', 'cpsmPortBindLoginDevType'), ('CISCO-PSM-MIB', 'cpsmPortBindLoginDev'), ('CISCO-PSM-MIB', 'cpsmPortBindLoginPointType'), ('CISCO-PSM-MIB', 'cpsmPortBindLoginPoint'), ('CISCO-PSM-MIB', 'cpsmPortBindRowStatus'), ('CISCO-PSM-MIB', 'cpsmPortBindActivate'), ('CISCO-PSM-MIB', 'cpsmPortBindResult'), ('CISCO-PSM-MIB', 'cpsmPortBindLastActTime'), ('CISCO-PSM-MIB', 'cpsmPortBindActState'), ('CISCO-PSM-MIB', 'cpsmPortBindCopyActToConfig'), ('CISCO-PSM-MIB', 'cpsmPortBindLastChangeTime'), ('CISCO-PSM-MIB', 'cpsmPortBindClearStats'), ('CISCO-PSM-MIB', 'cpsmPortBindClearAutoLearnDb'), ('CISCO-PSM-MIB', 'cpsmPortBindClearAutoLearnIntf'), ('CISCO-PSM-MIB', 'cpsmPortBindDiffConfigDb'), ('CISCO-PSM-MIB', 'cpsmPortBindDiffReason'), ('CISCO-PSM-MIB', 'cpsmPortBindDiffLoginDevType'), ('CISCO-PSM-MIB', 'cpsmPortBindDiffLoginDev'), ('CISCO-PSM-MIB', 'cpsmPortBindDiffLoginPointType'), ('CISCO-PSM-MIB', 'cpsmPortBindDiffLoginPoint')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_psm_port_bind_config_group = ciscoPsmPortBindConfigGroup.setStatus('deprecated') cisco_psm_fabric_bind_config_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 2, 2)).setObjects(('CISCO-PSM-MIB', 'cpsmFabricBindSwitchWwn'), ('CISCO-PSM-MIB', 'cpsmFabricBindDomId'), ('CISCO-PSM-MIB', 'cpsmFabricBindRowStatus'), ('CISCO-PSM-MIB', 'cpsmFabricBindActivate'), ('CISCO-PSM-MIB', 'cpsmFabricBindResult'), ('CISCO-PSM-MIB', 'cpsmFabricBindLastActTime'), ('CISCO-PSM-MIB', 'cpsmFabricBindActState'), ('CISCO-PSM-MIB', 'cpsmFabricBindCopyActToConfig'), ('CISCO-PSM-MIB', 'cpsmFabricBindLastChangeTime'), ('CISCO-PSM-MIB', 'cpsmFabricBindClearStats'), ('CISCO-PSM-MIB', 'cpsmFabricBindClearAutoLearnDb'), ('CISCO-PSM-MIB', 'cpsmFabricBindClearAutoLearnIntf'), ('CISCO-PSM-MIB', 'cpsmFabricBindDiffConfigDb'), ('CISCO-PSM-MIB', 'cpsmFabricBindDiffReason'), ('CISCO-PSM-MIB', 'cpsmFabricBindDiffSwitchWwn'), ('CISCO-PSM-MIB', 'cpsmFabricBindDiffDomId')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_psm_fabric_bind_config_group = ciscoPsmFabricBindConfigGroup.setStatus('deprecated') cisco_psm_port_bind_enforced_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 2, 3)).setObjects(('CISCO-PSM-MIB', 'cpsmPortBindEnfLoginDevType'), ('CISCO-PSM-MIB', 'cpsmPortBindEnfLoginDev'), ('CISCO-PSM-MIB', 'cpsmPortBindEnfLoginPointType'), ('CISCO-PSM-MIB', 'cpsmPortBindEnfLoginPoint'), ('CISCO-PSM-MIB', 'cpsmPortBindEnfIsLearnt')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_psm_port_bind_enforced_group = ciscoPsmPortBindEnforcedGroup.setStatus('current') cisco_psm_fabric_bind_enforced_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 2, 4)).setObjects(('CISCO-PSM-MIB', 'cpsmFabricBindEnfSwitchWwn'), ('CISCO-PSM-MIB', 'cpsmFabricBindEnfDomId'), ('CISCO-PSM-MIB', 'cpsmFabricBindEnfIsLearnt')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_psm_fabric_bind_enforced_group = ciscoPsmFabricBindEnforcedGroup.setStatus('current') cisco_psm_port_bind_stats_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 2, 5)).setObjects(('CISCO-PSM-MIB', 'cpsmPortBindAllowedLogins'), ('CISCO-PSM-MIB', 'cpsmPortBindDeniedLogins'), ('CISCO-PSM-MIB', 'cpsmPortBindLoginPwwn'), ('CISCO-PSM-MIB', 'cpsmPortBindLoginNwwn'), ('CISCO-PSM-MIB', 'cpsmPortBindLoginSwwn'), ('CISCO-PSM-MIB', 'cpsmPortBindLoginPort'), ('CISCO-PSM-MIB', 'cpsmPortBindLoginTime'), ('CISCO-PSM-MIB', 'cpsmPortBindLoginCount'), ('CISCO-PSM-MIB', 'cpsmPortBindLoginIntf')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_psm_port_bind_stats_group = ciscoPsmPortBindStatsGroup.setStatus('current') cisco_psm_fabric_bind_stats_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 2, 6)).setObjects(('CISCO-PSM-MIB', 'cpsmFabricBindAllowedReqs'), ('CISCO-PSM-MIB', 'cpsmFabricBindDeniedReqs'), ('CISCO-PSM-MIB', 'cpsmFabricBindSwwn'), ('CISCO-PSM-MIB', 'cpsmFabricBindLocalPort'), ('CISCO-PSM-MIB', 'cpsmFabricBindDenialTime'), ('CISCO-PSM-MIB', 'cpsmFabricBindLocalIntf')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_psm_fabric_bind_stats_group = ciscoPsmFabricBindStatsGroup.setStatus('deprecated') cisco_psm_port_bind_notify_group = notification_group((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 2, 7)).setObjects(('CISCO-PSM-MIB', 'ciscoPsmPortBindFPortDenyNotify'), ('CISCO-PSM-MIB', 'ciscoPsmPortBindEPortDenyNotify')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_psm_port_bind_notify_group = ciscoPsmPortBindNotifyGroup.setStatus('current') cisco_psm_fabric_bind_notify_group = notification_group((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 2, 8)).setObjects(('CISCO-PSM-MIB', 'ciscoPsmFabricBindDenyNotify')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_psm_fabric_bind_notify_group = ciscoPsmFabricBindNotifyGroup.setStatus('deprecated') cisco_psm_port_bind_auto_learn_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 2, 9)).setObjects(('CISCO-PSM-MIB', 'cpsmPortBindAutoLearnEnable')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_psm_port_bind_auto_learn_group = ciscoPsmPortBindAutoLearnGroup.setStatus('current') cisco_psm_fabric_bind_auto_learn_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 2, 10)).setObjects(('CISCO-PSM-MIB', 'cpsmFabricBindAutoLearnEnable')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_psm_fabric_bind_auto_learn_group = ciscoPsmFabricBindAutoLearnGroup.setStatus('deprecated') cisco_psm_notify_enable_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 2, 11)).setObjects(('CISCO-PSM-MIB', 'cpsmNotifyEnable')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_psm_notify_enable_group = ciscoPsmNotifyEnableGroup.setStatus('current') cisco_psm_fabric_bind_config_group1 = object_group((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 2, 12)).setObjects(('CISCO-PSM-MIB', 'cpsmFabricBindSwitchWwn'), ('CISCO-PSM-MIB', 'cpsmFabricBindDomId'), ('CISCO-PSM-MIB', 'cpsmFabricBindRowStatus'), ('CISCO-PSM-MIB', 'cpsmFabricBindActivate'), ('CISCO-PSM-MIB', 'cpsmFabricBindResult'), ('CISCO-PSM-MIB', 'cpsmFabricBindLastActTime'), ('CISCO-PSM-MIB', 'cpsmFabricBindActState'), ('CISCO-PSM-MIB', 'cpsmFabricBindCopyActToConfig'), ('CISCO-PSM-MIB', 'cpsmFabricBindLastChangeTime'), ('CISCO-PSM-MIB', 'cpsmFabricBindClearStats'), ('CISCO-PSM-MIB', 'cpsmFabricBindClearAutoLearnDb'), ('CISCO-PSM-MIB', 'cpsmFabricBindDiffConfigDb'), ('CISCO-PSM-MIB', 'cpsmFabricBindDiffReason'), ('CISCO-PSM-MIB', 'cpsmFabricBindDiffSwitchWwn'), ('CISCO-PSM-MIB', 'cpsmFabricBindDiffDomId')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_psm_fabric_bind_config_group1 = ciscoPsmFabricBindConfigGroup1.setStatus('deprecated') cisco_psm_fabric_bind_stats_group1 = object_group((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 2, 13)).setObjects(('CISCO-PSM-MIB', 'cpsmFabricBindAllowedReqs'), ('CISCO-PSM-MIB', 'cpsmFabricBindDeniedReqs'), ('CISCO-PSM-MIB', 'cpsmFabricBindSwwnR1'), ('CISCO-PSM-MIB', 'cpsmFabricBindDenialTimeR1'), ('CISCO-PSM-MIB', 'cpsmFabricBindDenialCountR1')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_psm_fabric_bind_stats_group1 = ciscoPsmFabricBindStatsGroup1.setStatus('deprecated') cisco_psm_fabric_bind_notify_group_r1 = notification_group((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 2, 14)).setObjects(('CISCO-PSM-MIB', 'ciscoPsmFabricBindDenyNotifyNew')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_psm_fabric_bind_notify_group_r1 = ciscoPsmFabricBindNotifyGroupR1.setStatus('current') cisco_psm_efmd_config_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 2, 15)).setObjects(('CISCO-PSM-MIB', 'cpsmEfmdConfigEnforce')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_psm_efmd_config_group = ciscoPsmEfmdConfigGroup.setStatus('current') cisco_psm_efmd_stats_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 2, 16)).setObjects(('CISCO-PSM-MIB', 'cpsmEfmdTxMergeReqs'), ('CISCO-PSM-MIB', 'cpsmEfmdRxMergeReqs'), ('CISCO-PSM-MIB', 'cpsmEfmdTxMergeAccs'), ('CISCO-PSM-MIB', 'cpsmEfmdRxMergeAccs'), ('CISCO-PSM-MIB', 'cpsmEfmdTxMergeRejs'), ('CISCO-PSM-MIB', 'cpsmEfmdRxMergeRejs'), ('CISCO-PSM-MIB', 'cpsmEfmdTxMergeBusys'), ('CISCO-PSM-MIB', 'cpsmEfmdRxMergeBusys'), ('CISCO-PSM-MIB', 'cpsmEfmdTxMergeErrs'), ('CISCO-PSM-MIB', 'cpsmEfmdRxMergeErrs')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_psm_efmd_stats_group = ciscoPsmEfmdStatsGroup.setStatus('current') cisco_psm_fabric_bind_stats_group2 = object_group((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 2, 17)).setObjects(('CISCO-PSM-MIB', 'cpsmFabricBindAllowedReqs'), ('CISCO-PSM-MIB', 'cpsmFabricBindDeniedReqs'), ('CISCO-PSM-MIB', 'cpsmFabricBindSwwnR1'), ('CISCO-PSM-MIB', 'cpsmFabricBindDenialTimeR1'), ('CISCO-PSM-MIB', 'cpsmFabricBindDenialCountR1'), ('CISCO-PSM-MIB', 'cpsmFabricBindDenialDomId')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_psm_fabric_bind_stats_group2 = ciscoPsmFabricBindStatsGroup2.setStatus('deprecated') cisco_psm_fabric_bind_stats_group3 = object_group((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 2, 18)).setObjects(('CISCO-PSM-MIB', 'cpsmFabricBindAllowedReqs'), ('CISCO-PSM-MIB', 'cpsmFabricBindDeniedReqs'), ('CISCO-PSM-MIB', 'cpsmFabricBindSwwnR1'), ('CISCO-PSM-MIB', 'cpsmFabricBindDenialTimeR1'), ('CISCO-PSM-MIB', 'cpsmFabricBindDenialCountR1'), ('CISCO-PSM-MIB', 'cpsmFabricBindDenialDomId'), ('CISCO-PSM-MIB', 'cpsmFabricBindDenialReasonCode')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_psm_fabric_bind_stats_group3 = ciscoPsmFabricBindStatsGroup3.setStatus('current') cisco_psm_port_bind_config_group1 = object_group((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 2, 19)).setObjects(('CISCO-PSM-MIB', 'cpsmPortBindLoginDevType'), ('CISCO-PSM-MIB', 'cpsmPortBindLoginDev'), ('CISCO-PSM-MIB', 'cpsmPortBindLoginPointType'), ('CISCO-PSM-MIB', 'cpsmPortBindLoginPoint'), ('CISCO-PSM-MIB', 'cpsmPortBindRowStatus'), ('CISCO-PSM-MIB', 'cpsmPortBindActivate'), ('CISCO-PSM-MIB', 'cpsmPortBindResult'), ('CISCO-PSM-MIB', 'cpsmPortBindLastActTime'), ('CISCO-PSM-MIB', 'cpsmPortBindActState'), ('CISCO-PSM-MIB', 'cpsmPortBindCopyActToConfig'), ('CISCO-PSM-MIB', 'cpsmPortBindLastChangeTime'), ('CISCO-PSM-MIB', 'cpsmPortBindClearStats'), ('CISCO-PSM-MIB', 'cpsmPortBindClearAutoLearnDb'), ('CISCO-PSM-MIB', 'cpsmPortBindClearAutoLearnIntf'), ('CISCO-PSM-MIB', 'cpsmPortBindDiffConfigDb'), ('CISCO-PSM-MIB', 'cpsmPortBindDiffReason'), ('CISCO-PSM-MIB', 'cpsmPortBindDiffLoginDevType'), ('CISCO-PSM-MIB', 'cpsmPortBindDiffLoginDev'), ('CISCO-PSM-MIB', 'cpsmPortBindDiffLoginPointType'), ('CISCO-PSM-MIB', 'cpsmPortBindDiffLoginPoint'), ('CISCO-PSM-MIB', 'cpsmPortBindNextFreeIndex')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_psm_port_bind_config_group1 = ciscoPsmPortBindConfigGroup1.setStatus('current') cisco_psm_fabric_bind_config_group2 = object_group((1, 3, 6, 1, 4, 1, 9, 9, 364, 2, 2, 20)).setObjects(('CISCO-PSM-MIB', 'cpsmFabricBindSwitchWwn'), ('CISCO-PSM-MIB', 'cpsmFabricBindDomId'), ('CISCO-PSM-MIB', 'cpsmFabricBindRowStatus'), ('CISCO-PSM-MIB', 'cpsmFabricBindActivate'), ('CISCO-PSM-MIB', 'cpsmFabricBindResult'), ('CISCO-PSM-MIB', 'cpsmFabricBindLastActTime'), ('CISCO-PSM-MIB', 'cpsmFabricBindActState'), ('CISCO-PSM-MIB', 'cpsmFabricBindCopyActToConfig'), ('CISCO-PSM-MIB', 'cpsmFabricBindLastChangeTime'), ('CISCO-PSM-MIB', 'cpsmFabricBindClearStats'), ('CISCO-PSM-MIB', 'cpsmFabricBindClearAutoLearnDb'), ('CISCO-PSM-MIB', 'cpsmFabricBindDiffConfigDb'), ('CISCO-PSM-MIB', 'cpsmFabricBindDiffReason'), ('CISCO-PSM-MIB', 'cpsmFabricBindDiffSwitchWwn'), ('CISCO-PSM-MIB', 'cpsmFabricBindDiffDomId'), ('CISCO-PSM-MIB', 'cpsmFabricBindNextFreeIndex')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_psm_fabric_bind_config_group2 = ciscoPsmFabricBindConfigGroup2.setStatus('current') mibBuilder.exportSymbols('CISCO-PSM-MIB', cpsmPortBindEnfEntry=cpsmPortBindEnfEntry, ciscoPsmPortBindAutoLearnGroup=ciscoPsmPortBindAutoLearnGroup, cpsmFabricBindEnfNwType=cpsmFabricBindEnfNwType, cpsmFabricBindCopyActToConfig=cpsmFabricBindCopyActToConfig, cpsmPortBindDiffTable=cpsmPortBindDiffTable, cpsmFabricBindDenialTime=cpsmFabricBindDenialTime, cpsmFabricBindClearAutoLearnDb=cpsmFabricBindClearAutoLearnDb, ciscoPsmMIBComplianceRev2=ciscoPsmMIBComplianceRev2, cpsmPortBindLoginIntf=cpsmPortBindLoginIntf, cpsmFabricBindEnfIndex=cpsmFabricBindEnfIndex, cpsmPortBindClearAutoLearnDb=cpsmPortBindClearAutoLearnDb, cpsmPortBindAutoLearnTable=cpsmPortBindAutoLearnTable, cpsmPortBindActivate=cpsmPortBindActivate, cpsmPortBindCopyActToConfig=cpsmPortBindCopyActToConfig, cpsmFabricBindClearEntry=cpsmFabricBindClearEntry, cpsmPortBindDiffLoginDevType=cpsmPortBindDiffLoginDevType, cpsmFabricBindViolationTable=cpsmFabricBindViolationTable, ciscoPsmPortBindEnforcedGroup=ciscoPsmPortBindEnforcedGroup, ciscoPsmMIBNotifs=ciscoPsmMIBNotifs, cpsmPortBindDiffIndex=cpsmPortBindDiffIndex, cpsmPortBindVsanVlanType=cpsmPortBindVsanVlanType, cpsmFabricBindNwType=cpsmFabricBindNwType, cpsmPortBindNwIndex=cpsmPortBindNwIndex, cpsmPortBindDiffConfigTable=cpsmPortBindDiffConfigTable, cpsmPortBindActivateEntry=cpsmPortBindActivateEntry, cpsmFabricBindAutoLearnEnable=cpsmFabricBindAutoLearnEnable, cpsmFabricBindClearAutoLearnIntf=cpsmFabricBindClearAutoLearnIntf, cpsmEfmdRxMergeAccs=cpsmEfmdRxMergeAccs, cpsmPortBindClearNwIndex=cpsmPortBindClearNwIndex, cpsmFabricBindViolationNewEntry=cpsmFabricBindViolationNewEntry, cpsmFabricBindDiffNwType=cpsmFabricBindDiffNwType, cpsmFabricBindDiffIndex=cpsmFabricBindDiffIndex, cpsmFabricBindDenialReasonCode=cpsmFabricBindDenialReasonCode, ciscoPsmFabricBindStatsGroup=ciscoPsmFabricBindStatsGroup, cpsmPortBindActivateTable=cpsmPortBindActivateTable, cpsmFabricBindTable=cpsmFabricBindTable, cpsmPortBindCopyTable=cpsmPortBindCopyTable, cpsmFabricBindNwIndex=cpsmFabricBindNwIndex, cpsmFabricBindActState=cpsmFabricBindActState, cpsmPortBindViolationTable=cpsmPortBindViolationTable, cpsmConfiguration=cpsmConfiguration, ciscoPsmPortBindConfigGroup=ciscoPsmPortBindConfigGroup, cpsmFabricBindAutoLearnIndexType=cpsmFabricBindAutoLearnIndexType, cpsmEfmdStatsTable=cpsmEfmdStatsTable, cpsmFabricBindLastActTime=cpsmFabricBindLastActTime, cpsmPortBindAllowedLogins=cpsmPortBindAllowedLogins, cpsmFabricBindSwwn=cpsmFabricBindSwwn, cpsmFabricBindDomId=cpsmFabricBindDomId, cpsmFabricBindDiffReason=cpsmFabricBindDiffReason, ciscoPsmMIBComplianceRev3=ciscoPsmMIBComplianceRev3, ciscoPsmNotifyEnableGroup=ciscoPsmNotifyEnableGroup, cpsmFabricBindDiffNwIndex=cpsmFabricBindDiffNwIndex, cpsmEfmdConfigEntry=cpsmEfmdConfigEntry, cpsmFabricBindViolationIndex=cpsmFabricBindViolationIndex, cpsmPortBindNextFreeTable=cpsmPortBindNextFreeTable, ciscoPsmMIBGroups=ciscoPsmMIBGroups, cpsmPortBindEnfNwType=cpsmPortBindEnfNwType, cpsmEfmdTxMergeReqs=cpsmEfmdTxMergeReqs, CpsmViolationReasonCode=CpsmViolationReasonCode, cpsmPortBindDiffLoginDev=cpsmPortBindDiffLoginDev, cpsmFabricBindDiffEntry=cpsmFabricBindDiffEntry, cpsmEfmdRxMergeBusys=cpsmEfmdRxMergeBusys, ciscoPsmPortBindConfigGroup1=ciscoPsmPortBindConfigGroup1, cpsmFabricBindRowStatus=cpsmFabricBindRowStatus, CpsmDbActivate=CpsmDbActivate, cpsmEfmdTxMergeRejs=cpsmEfmdTxMergeRejs, cpsmFabricBindViolationNwIndexR1=cpsmFabricBindViolationNwIndexR1, cpsmPortBindLoginDev=cpsmPortBindLoginDev, cpsmFabricBindSwwnR1=cpsmFabricBindSwwnR1, cpsmPortBindNextFreeIndex=cpsmPortBindNextFreeIndex, cpsmEfmdStatsEntry=cpsmEfmdStatsEntry, CpsmPortBindSwPortType=CpsmPortBindSwPortType, ciscoPsmFabricBindDenyNotify=ciscoPsmFabricBindDenyNotify, cpsmFabricBindDeniedReqs=cpsmFabricBindDeniedReqs, cpsmFabricBindEntry=cpsmFabricBindEntry, cpsmPortBindAutoLearnEnable=cpsmPortBindAutoLearnEnable, cpsmPortBindDiffConfigEntry=cpsmPortBindDiffConfigEntry, cpsmEfmdConfigEnforce=cpsmEfmdConfigEnforce, cpsmPortBindLastChangeTime=cpsmPortBindLastChangeTime, cpsmPortBindEnfTable=cpsmPortBindEnfTable, cpsmPortBindDiffConfigNwIndex=cpsmPortBindDiffConfigNwIndex, cpsmFabricBindViolationNwTypeR1=cpsmFabricBindViolationNwTypeR1, cpsmNotifyEnable=cpsmNotifyEnable, cpsmFabricBindLocalPort=cpsmFabricBindLocalPort, cpsmPortBindLoginTime=cpsmPortBindLoginTime, ciscoPsmFabricBindConfigGroup2=ciscoPsmFabricBindConfigGroup2, cpsmPortBindLoginPointType=cpsmPortBindLoginPointType, ciscoPsmMIBComplianceRev1=ciscoPsmMIBComplianceRev1, ciscoPsmFabricBindStatsGroup3=ciscoPsmFabricBindStatsGroup3, cpsmFabricBindViolationIndexR1=cpsmFabricBindViolationIndexR1, ciscoPsmMIBObjects=ciscoPsmMIBObjects, cpsmFabricBindIndex=cpsmFabricBindIndex, cpsmEfmdTxMergeAccs=cpsmEfmdTxMergeAccs, cpsmPortBindEnfNwIndex=cpsmPortBindEnfNwIndex, cpsmPortBindEnfLoginDevType=cpsmPortBindEnfLoginDevType, cpsmPortBindDiffConfigDb=cpsmPortBindDiffConfigDb, cpsmEfmdConfigTable=cpsmEfmdConfigTable, cpsmPortBindClearNwType=cpsmPortBindClearNwType, cpsmFabricBindVsanVlanIndex=cpsmFabricBindVsanVlanIndex, ciscoPsmPortBindStatsGroup=ciscoPsmPortBindStatsGroup, CpsmDiffReason=CpsmDiffReason, cpsmFabricBindNextFreeIndex=cpsmFabricBindNextFreeIndex, cpsmFabricBindDiffConfigTable=cpsmFabricBindDiffConfigTable, cpsmFabricBindEnfDomId=cpsmFabricBindEnfDomId, cpsmFabricBindLastChangeTime=cpsmFabricBindLastChangeTime, CpsmStatsCounter=CpsmStatsCounter, cpsmPortBindLoginSwwn=cpsmPortBindLoginSwwn, ciscoPsmFabricBindNotifyGroupR1=ciscoPsmFabricBindNotifyGroupR1, cpsmPortBindVsanVlanIndex=cpsmPortBindVsanVlanIndex, cpsmPortBindRowStatus=cpsmPortBindRowStatus, cpsmPortBindEnfIsLearnt=cpsmPortBindEnfIsLearnt, ciscoPsmMIBConform=ciscoPsmMIBConform, CpsmPortBindDevType=CpsmPortBindDevType, ciscoPsmMIB=ciscoPsmMIB, cpsmPortBindEnfLoginPointType=cpsmPortBindEnfLoginPointType, cpsmFabricBindDiffConfigNwType=cpsmFabricBindDiffConfigNwType, ciscoPsmMIBCompliances=ciscoPsmMIBCompliances, cpsmFabricBindEnfNwIndex=cpsmFabricBindEnfNwIndex, CpsmClearStats=CpsmClearStats, cpsmPortBindAutoLearnEntry=cpsmPortBindAutoLearnEntry, cpsmPortBindClearAutoLearnIntf=cpsmPortBindClearAutoLearnIntf, cpsmPortBindCopyEntry=cpsmPortBindCopyEntry, cpsmFabricBindDiffTable=cpsmFabricBindDiffTable, ciscoPsmPortBindFPortDenyNotify=ciscoPsmPortBindFPortDenyNotify, cpsmFabricBindStatsEntry=cpsmFabricBindStatsEntry, cpsmPortBindStatsEntry=cpsmPortBindStatsEntry, cpsmPortBindClearEntry=cpsmPortBindClearEntry, cpsmPortBindDeniedLogins=cpsmPortBindDeniedLogins, cpsmFabricBindLocalIntf=cpsmFabricBindLocalIntf, ciscoPsmEfmdConfigGroup=ciscoPsmEfmdConfigGroup, cpsmPortBindResult=cpsmPortBindResult, ciscoPsmEfmdStatsGroup=ciscoPsmEfmdStatsGroup, cpsmPortBindAutoLearnIndexType=cpsmPortBindAutoLearnIndexType, CpsmActivateResult=CpsmActivateResult, CpsmAutoLearnEnable=CpsmAutoLearnEnable, cpsmPortBindNextFreeNwIndex=cpsmPortBindNextFreeNwIndex, cpsmPortBindLoginDevType=cpsmPortBindLoginDevType, cpsmFabricBindResult=cpsmFabricBindResult, cpsmEfmdRxMergeRejs=cpsmEfmdRxMergeRejs, cpsmPortBindDiffNwType=cpsmPortBindDiffNwType, cpsmPortBindEntry=cpsmPortBindEntry, cpsmPortBindViolationNwType=cpsmPortBindViolationNwType, PYSNMP_MODULE_ID=ciscoPsmMIB, cpsmPortBindEnfLoginPoint=cpsmPortBindEnfLoginPoint, cpsmFabricBindDiffConfigEntry=cpsmFabricBindDiffConfigEntry, cpsmFabricBindCopyTable=cpsmFabricBindCopyTable, CpsmClearAutoLearnDb=CpsmClearAutoLearnDb, cpsmPortBindLoginPoint=cpsmPortBindLoginPoint, cpsmFabricBindAllowedReqs=cpsmFabricBindAllowedReqs, cpsmFabricBindActivateTable=cpsmFabricBindActivateTable, cpsmFabricBindAutoLearnTable=cpsmFabricBindAutoLearnTable, cpsmPortBindActState=cpsmPortBindActState, CpsmDiffDb=CpsmDiffDb, cpsmPortBindDiffReason=cpsmPortBindDiffReason, cpsmPortBindStatsTable=cpsmPortBindStatsTable, cpsmFabricBindDenialDomId=cpsmFabricBindDenialDomId, ciscoPsmFabricBindEnforcedGroup=ciscoPsmFabricBindEnforcedGroup, cpsmFabricBindNextFreeTable=cpsmFabricBindNextFreeTable, cpsmPortBindLoginPwwn=cpsmPortBindLoginPwwn, cpsmFabricBindViolationNewTable=cpsmFabricBindViolationNewTable, ciscoPsmPortBindNotifyGroup=ciscoPsmPortBindNotifyGroup, ciscoPsmFabricBindAutoLearnGroup=ciscoPsmFabricBindAutoLearnGroup, cpsmPortBindDiffNwIndex=cpsmPortBindDiffNwIndex, cpsmFabricBindNextFreeNwType=cpsmFabricBindNextFreeNwType, cpsmFabricBindCopyEntry=cpsmFabricBindCopyEntry, cpsmFabricBindStatsTable=cpsmFabricBindStatsTable, cpsmFabricBindVsanVlanType=cpsmFabricBindVsanVlanType, cpsmPortBindViolationNwIndex=cpsmPortBindViolationNwIndex, ciscoPsmFabricBindConfigGroup1=ciscoPsmFabricBindConfigGroup1, cpsmFabricBindEnfEntry=cpsmFabricBindEnfEntry, CpsmVirtNwType=CpsmVirtNwType, cpsmPortBindIndex=cpsmPortBindIndex, cpsmPortBindLastActTime=cpsmPortBindLastActTime, cpsmFabricBindEnfTable=cpsmFabricBindEnfTable, cpsmPortBindNwType=cpsmPortBindNwType, cpsmPortBindNextFreeEntry=cpsmPortBindNextFreeEntry, cpsmPortBindDiffLoginPoint=cpsmPortBindDiffLoginPoint, ciscoPsmFabricBindDenyNotifyNew=ciscoPsmFabricBindDenyNotifyNew, cpsmFabricBindDenialTimeR1=cpsmFabricBindDenialTimeR1, cpsmFabricBindClearNwType=cpsmFabricBindClearNwType, ciscoPsmPortBindEPortDenyNotify=ciscoPsmPortBindEPortDenyNotify, cpsmFabricBindEnfSwitchWwn=cpsmFabricBindEnfSwitchWwn, cpsmFabricBindAutoLearnEntry=cpsmFabricBindAutoLearnEntry, cpsmFabricBindClearTable=cpsmFabricBindClearTable, cpsmPortBindEnfLoginDev=cpsmPortBindEnfLoginDev, cpsmFabricBindClearStats=cpsmFabricBindClearStats, cpsmFabricBindDiffDomId=cpsmFabricBindDiffDomId, cpsmEfmdTxMergeErrs=cpsmEfmdTxMergeErrs, cpsmPortBindClearTable=cpsmPortBindClearTable, cpsmFabricBindActivate=cpsmFabricBindActivate, cpsmEfmdRxMergeErrs=cpsmEfmdRxMergeErrs, cpsmPortBindLoginPort=cpsmPortBindLoginPort, cpsmPortBindDiffLoginPointType=cpsmPortBindDiffLoginPointType, cpsmPortBindViolationIndex=cpsmPortBindViolationIndex, ciscoPsmMIBComplianceRev4=ciscoPsmMIBComplianceRev4, cpsmFabricBindDiffConfigNwIndex=cpsmFabricBindDiffConfigNwIndex, cpsmPortBindNextFreeNwType=cpsmPortBindNextFreeNwType, cpsmStats=cpsmStats, cpsmFabricBindNextFreeEntry=cpsmFabricBindNextFreeEntry, cpsmFabricBindNextFreeNwIndex=cpsmFabricBindNextFreeNwIndex, cpsmPortBindDiffEntry=cpsmPortBindDiffEntry, cpsmPortBindClearStats=cpsmPortBindClearStats, ciscoPsmMIBCompliance=ciscoPsmMIBCompliance, cpsmFabricBindDenialCountR1=cpsmFabricBindDenialCountR1, cpsmFabricBindActivateEntry=cpsmFabricBindActivateEntry, cpsmFabricBindEnfIsLearnt=cpsmFabricBindEnfIsLearnt, ciscoPsmMIBComplianceRev5=ciscoPsmMIBComplianceRev5, cpsmEfmdTxMergeBusys=cpsmEfmdTxMergeBusys, cpsmFabricBindViolationEntry=cpsmFabricBindViolationEntry, cpsmPortBindViolationEntry=cpsmPortBindViolationEntry, cpsmFabricBindSwitchWwn=cpsmFabricBindSwitchWwn, ciscoPsmFabricBindConfigGroup=ciscoPsmFabricBindConfigGroup, cpsmPortBindTable=cpsmPortBindTable, ciscoPsmFabricBindStatsGroup2=ciscoPsmFabricBindStatsGroup2, ciscoPsmFabricBindStatsGroup1=ciscoPsmFabricBindStatsGroup1, cpsmFabricBindAutoLearnIndex=cpsmFabricBindAutoLearnIndex, cpsmPortBindEnfIndex=cpsmPortBindEnfIndex, ciscoPsmFabricBindNotifyGroup=ciscoPsmFabricBindNotifyGroup, cpsmFabricBindDiffConfigDb=cpsmFabricBindDiffConfigDb, cpsmEfmdRxMergeReqs=cpsmEfmdRxMergeReqs, cpsmPortBindLoginCount=cpsmPortBindLoginCount, cpsmPortBindAutoLearnIndex=cpsmPortBindAutoLearnIndex, cpsmPortBindLoginNwwn=cpsmPortBindLoginNwwn, cpsmFabricBindClearNwIndex=cpsmFabricBindClearNwIndex, cpsmFabricBindDiffSwitchWwn=cpsmFabricBindDiffSwitchWwn, cpsmPortBindDiffConfigNwType=cpsmPortBindDiffConfigNwType)
# Given a year, determine whether it is a leap year. If it is a leap year, # return the Boolean True, otherwise return False. # Note that the code stub provided reads from STDIN and # passes arguments to the is_leap function. It is only necessary to complete the is_leap function. def is_leap(year): leap = False #If year%4==0 is leap year if year%4==0: leap = True #If year%100==0 is not leap year if year%100==0: leap = False #If year%400==0 is leap year if year%400==0: leap = True return leap #year = int(raw_input())
def is_leap(year): leap = False if year % 4 == 0: leap = True if year % 100 == 0: leap = False if year % 400 == 0: leap = True return leap
def media(n1=int(input("introduce la nota ")),n2=int(input("introduce la nota ")), n3=int(input("introduce la nota ")),n4=int(input("introduce la nota "))): notaMedia=(n1+n2+n3+n4)/4 if notaMedia>15: return print("Alumno con talento") elif notaMedia>=12 and notaMedia<=15: return print("Con capacidad") elif notaMedia<12: return print("Debe reorientarse") media()
def media(n1=int(input('introduce la nota ')), n2=int(input('introduce la nota ')), n3=int(input('introduce la nota ')), n4=int(input('introduce la nota '))): nota_media = (n1 + n2 + n3 + n4) / 4 if notaMedia > 15: return print('Alumno con talento') elif notaMedia >= 12 and notaMedia <= 15: return print('Con capacidad') elif notaMedia < 12: return print('Debe reorientarse') media()
check = 'Coderbunker whatever' bool(check.find('Coderbunker')) print(bool(check)) if check == 'Coderbunker whatever': print('what')
check = 'Coderbunker whatever' bool(check.find('Coderbunker')) print(bool(check)) if check == 'Coderbunker whatever': print('what')
add_pointer_input = { "type": "object", "additionalProperties": False, "properties": {"pointer": {"type": "string"}, "weight": {"type": "integer"}, "key": {"type": "string"}}, "required": ["pointer", "weight"], } remove_pointer_input = { "type": "object", "additionalProperties": False, "properties": {"pointer": {"type": "string"}, "key": {"type": "string"}}, "required": ["pointer"], } replace_config_input = { "type": "object", "additionalProperties": False, "properties": {"pointers": {"type": "object"}, "key": {"type": "string"}}, "required": ["pointers"], } get_config_input = { "type": "object", "additionalProperties": False, "properties": {"key": {"type": "string"}} } pick_pointer_input = get_config_input pick_pointer_output = { "type": "object", "additionalProperties": False, "properties": {"pointer": {"type": "string"}}, "required": ["pointer"], }
add_pointer_input = {'type': 'object', 'additionalProperties': False, 'properties': {'pointer': {'type': 'string'}, 'weight': {'type': 'integer'}, 'key': {'type': 'string'}}, 'required': ['pointer', 'weight']} remove_pointer_input = {'type': 'object', 'additionalProperties': False, 'properties': {'pointer': {'type': 'string'}, 'key': {'type': 'string'}}, 'required': ['pointer']} replace_config_input = {'type': 'object', 'additionalProperties': False, 'properties': {'pointers': {'type': 'object'}, 'key': {'type': 'string'}}, 'required': ['pointers']} get_config_input = {'type': 'object', 'additionalProperties': False, 'properties': {'key': {'type': 'string'}}} pick_pointer_input = get_config_input pick_pointer_output = {'type': 'object', 'additionalProperties': False, 'properties': {'pointer': {'type': 'string'}}, 'required': ['pointer']}
# 415. Add Strings # Given two non-negative integers num1 and num2 represented as string, return the sum of num1 and num2. # # Note: # # The length of both num1 and num2 is < 5100. # Both num1 and num2 contains only digits 0-9. # Both num1 and num2 does not contain any leading zero. # You must not use any built-in BigInteger library or convert the inputs to integer directly. # class Solution(object): # https://leetcode.com/problems/add-strings/discuss/90436/Straightforward-Java-8-main-lines-25ms def addStrings(self, num1, num2): """ :type num1: str :type num2: str :rtype: str """ if not num1: return num2 if not num2: return num1 i = len(num1) - 1 j = len(num2) - 1 carry = 0 digit = 0 result = [] while i >=0 or j >= 0 or carry != 0: digit = carry if i >=0: digit += int(num1[i]) i -= 1 if j >=0: digit += int(num2[j]) j -= 1 carry = digit // 10 result.append(digit%10) return ''.join(str(e) for e in result[::-1]) sol = Solution() print(sol.addStrings('123', '45')) print(sol.addStrings('123', '')) print(sol.addStrings('123', '0'))
class Solution(object): def add_strings(self, num1, num2): """ :type num1: str :type num2: str :rtype: str """ if not num1: return num2 if not num2: return num1 i = len(num1) - 1 j = len(num2) - 1 carry = 0 digit = 0 result = [] while i >= 0 or j >= 0 or carry != 0: digit = carry if i >= 0: digit += int(num1[i]) i -= 1 if j >= 0: digit += int(num2[j]) j -= 1 carry = digit // 10 result.append(digit % 10) return ''.join((str(e) for e in result[::-1])) sol = solution() print(sol.addStrings('123', '45')) print(sol.addStrings('123', '')) print(sol.addStrings('123', '0'))
# Finding peak element 1D of array of int def findPeakRec(arr,low,high,n): mid = low + (low + high) / 2 mid = int(mid) if ((mid == 0 or arr[mid - 1] <= arr[mid]) and (mid == n - 1 or arr[mid + 1] <= arr[mid])): return arr[mid] elif arr[mid] < arr[mid-1]: #find left return findPeakRec(arr,low,mid-1,n) else: #find right return findPeakRec(arr,mid+1,high,n) def findPeak(arr, n): return findPeakRec(arr, 0, n - 1, n) # Driver code arr = [1,3,20,5,4,1,0,5,23,15,1] n = len(arr) print("Peak value is", findPeak(arr,n))
def find_peak_rec(arr, low, high, n): mid = low + (low + high) / 2 mid = int(mid) if (mid == 0 or arr[mid - 1] <= arr[mid]) and (mid == n - 1 or arr[mid + 1] <= arr[mid]): return arr[mid] elif arr[mid] < arr[mid - 1]: return find_peak_rec(arr, low, mid - 1, n) else: return find_peak_rec(arr, mid + 1, high, n) def find_peak(arr, n): return find_peak_rec(arr, 0, n - 1, n) arr = [1, 3, 20, 5, 4, 1, 0, 5, 23, 15, 1] n = len(arr) print('Peak value is', find_peak(arr, n))
"""Decoder for the NEC infrared transmission protocol Implemented according to this specification: https://techdocs.altium.com/display/FPGA/NEC+Infrared+Transmission+Protocol """ _TOLERANCE = 0.25 class _UnexpectedPulse(Exception): pass class _Pulse(object): def __init__(self, durationms): duration = durationms / 1000.0 delta = duration * _TOLERANCE self.durationmin = duration - delta self.durationmax = duration + delta def matches(self, actual): return self.durationmin <= actual <= self.durationmax def expect(self, actual): if not self.matches(actual): raise _UnexpectedPulse() _LEADING = _Pulse(9.0000) _BEGINKEY = _Pulse(4.5000) _REPEAT = _Pulse(2.2500) _SPACE = _Pulse(0.5625) _BIT0 = _Pulse(0.5625) _BIT1 = _Pulse(1.6875) _FINAL = _Pulse(0.5625) class IRDecoder(object): def __init__(self): self._state = self._protocol() self._state.send(None) self._address = 0 self._command = 0 self._keyPressedListeners = [] self._repeatListeners = [] def addKeyPressedListener(self, func): self._keyPressedListeners.append(func) def addRepeatListener(self, func): self._repeatListeners.append(func) def pulse(self, duration): self._state.send(duration) def _readbit(self): _SPACE.expect((yield)) duration = (yield) if _BIT0.matches(duration): return 0 if _BIT1.matches(duration): return 1 raise _UnexpectedPulse() def _readbyte(self): value = 0 for _ in range(0, 8): value = (value << 1) | (yield from self._readbit()) return value def _readbyte_with_complement(self): value = (yield from self._readbyte()) complement = (yield from self._readbyte()) if value ^ complement != 0xff: raise _UnexpectedPulse() return value def _protocol(self): while True: try: _LEADING.expect((yield)) duration = (yield) if _BEGINKEY.matches(duration): self._address = (yield from self._readbyte_with_complement()) self._command = (yield from self._readbyte_with_complement()) _FINAL.expect((yield)) for l in self._keyPressedListeners: l(self._address, self._command) elif _REPEAT.matches(duration): _FINAL.expect((yield)) for l in self._repeatListeners: l(self._address, self._command) except _UnexpectedPulse: pass
"""Decoder for the NEC infrared transmission protocol Implemented according to this specification: https://techdocs.altium.com/display/FPGA/NEC+Infrared+Transmission+Protocol """ _tolerance = 0.25 class _Unexpectedpulse(Exception): pass class _Pulse(object): def __init__(self, durationms): duration = durationms / 1000.0 delta = duration * _TOLERANCE self.durationmin = duration - delta self.durationmax = duration + delta def matches(self, actual): return self.durationmin <= actual <= self.durationmax def expect(self, actual): if not self.matches(actual): raise __unexpected_pulse() _leading = __pulse(9.0) _beginkey = __pulse(4.5) _repeat = __pulse(2.25) _space = __pulse(0.5625) _bit0 = __pulse(0.5625) _bit1 = __pulse(1.6875) _final = __pulse(0.5625) class Irdecoder(object): def __init__(self): self._state = self._protocol() self._state.send(None) self._address = 0 self._command = 0 self._keyPressedListeners = [] self._repeatListeners = [] def add_key_pressed_listener(self, func): self._keyPressedListeners.append(func) def add_repeat_listener(self, func): self._repeatListeners.append(func) def pulse(self, duration): self._state.send(duration) def _readbit(self): _SPACE.expect((yield)) duration = (yield) if _BIT0.matches(duration): return 0 if _BIT1.matches(duration): return 1 raise __unexpected_pulse() def _readbyte(self): value = 0 for _ in range(0, 8): value = value << 1 | (yield from self._readbit()) return value def _readbyte_with_complement(self): value = (yield from self._readbyte()) complement = (yield from self._readbyte()) if value ^ complement != 255: raise __unexpected_pulse() return value def _protocol(self): while True: try: _LEADING.expect((yield)) duration = (yield) if _BEGINKEY.matches(duration): self._address = (yield from self._readbyte_with_complement()) self._command = (yield from self._readbyte_with_complement()) _FINAL.expect((yield)) for l in self._keyPressedListeners: l(self._address, self._command) elif _REPEAT.matches(duration): _FINAL.expect((yield)) for l in self._repeatListeners: l(self._address, self._command) except _UnexpectedPulse: pass
def Length(L): C = 0 for _ in L: C+=1 return C N = int(input('\nEnter number of elements in list to be entered: ')) L = [] for i in range(0,N): L.append(input('Enter an element: ')) print('\nLength of list:',Length(L))
def length(L): c = 0 for _ in L: c += 1 return C n = int(input('\nEnter number of elements in list to be entered: ')) l = [] for i in range(0, N): L.append(input('Enter an element: ')) print('\nLength of list:', length(L))
def f(): print("this is the f() function") return 0 def fib(n): if n < 2: return n return fib(n-1) + fib(n-2) def fib_not_recursive(n): x = 0 y = 1 if n == 0: return x elif n == 1: return y while n-2 >= 0: x,y = y,x+y n -= 1 return y if __name__ == '__main__': fib_generated_by_recurse = [fib(i) for i in range(0,20)] fib_generated_by_non_recurse = [fib_not_recursive(i) for i in range(0,20)] print(fib_generated_by_recurse) print(fib_generated_by_non_recurse)
def f(): print('this is the f() function') return 0 def fib(n): if n < 2: return n return fib(n - 1) + fib(n - 2) def fib_not_recursive(n): x = 0 y = 1 if n == 0: return x elif n == 1: return y while n - 2 >= 0: (x, y) = (y, x + y) n -= 1 return y if __name__ == '__main__': fib_generated_by_recurse = [fib(i) for i in range(0, 20)] fib_generated_by_non_recurse = [fib_not_recursive(i) for i in range(0, 20)] print(fib_generated_by_recurse) print(fib_generated_by_non_recurse)
class Node: def __init__(self, val, left=None, right=None): self.val = val self.left = left self.right = right class BTreeData: def __init__(self, n: Node, isTarget: bool): self.n = n self.isTarget = isTarget class Solution: def findSecondLargest(self, root: Node) -> Node: return self._helper(root).n def findSecondLargest2(self, root: Node) -> Node: if root.right is not None: secondGreatestInRightSubtree = self.findSecondLargest2(root.right) if secondGreatestInRightSubtree is None: return root else: return secondGreatestInRightSubtree else: if root.left is not None: return root.left else: return None def _helper(self, n: Node) -> BTreeData: if n.right is not None: data = self._helper(n.right) if data.isTarget == False: data = BTreeData(n, True) return data else: return BTreeData(None, False ) if n.left is None else BTreeData(n.left, True)
class Node: def __init__(self, val, left=None, right=None): self.val = val self.left = left self.right = right class Btreedata: def __init__(self, n: Node, isTarget: bool): self.n = n self.isTarget = isTarget class Solution: def find_second_largest(self, root: Node) -> Node: return self._helper(root).n def find_second_largest2(self, root: Node) -> Node: if root.right is not None: second_greatest_in_right_subtree = self.findSecondLargest2(root.right) if secondGreatestInRightSubtree is None: return root else: return secondGreatestInRightSubtree elif root.left is not None: return root.left else: return None def _helper(self, n: Node) -> BTreeData: if n.right is not None: data = self._helper(n.right) if data.isTarget == False: data = b_tree_data(n, True) return data else: return b_tree_data(None, False) if n.left is None else b_tree_data(n.left, True)
__all__ = ['ImgFormat'] class ImgFormat(): JPEG = 'jpeg' PNG = 'png'
__all__ = ['ImgFormat'] class Imgformat: jpeg = 'jpeg' png = 'png'
#!usr/bin/env python3 # Use standard library functions to search strings for content sample_str = "The quick brown fox jumps over the lazy dog" # startsWith and endsWith functions print(sample_str.startswith("The")) print(sample_str.startswith("the")) print(sample_str.endswith("dog")) # the find function starts searching from the left/start side of the str) # and rfind function starts searching from the right hand-side of the str # they both return the index at which the substring was found print(sample_str.find("the")) print(sample_str.rfind("the")) # for knowing if a substr is contained in the str print("the" in sample_str) # using replace new_str = sample_str.replace("lazy", "tired") print(new_str) # counting instances of substrings print(sample_str.count("over")) # CONSOLE OUTPUT: # True # False # True # 31 # 31 # True # The quick brown fox jumps over the tired dog # 1
sample_str = 'The quick brown fox jumps over the lazy dog' print(sample_str.startswith('The')) print(sample_str.startswith('the')) print(sample_str.endswith('dog')) print(sample_str.find('the')) print(sample_str.rfind('the')) print('the' in sample_str) new_str = sample_str.replace('lazy', 'tired') print(new_str) print(sample_str.count('over'))
self.description = "Install a package with an existing file matching a negated --overwrite pattern" p = pmpkg("dummy") p.files = ["foobar"] self.addpkg(p) self.filesystem = ["foobar*"] self.args = "-U --overwrite=foobar --overwrite=!foo* %s" % p.filename() self.addrule("!PACMAN_RETCODE=0") self.addrule("!PKG_EXIST=dummy") self.addrule("!FILE_MODIFIED=foobar")
self.description = 'Install a package with an existing file matching a negated --overwrite pattern' p = pmpkg('dummy') p.files = ['foobar'] self.addpkg(p) self.filesystem = ['foobar*'] self.args = '-U --overwrite=foobar --overwrite=!foo* %s' % p.filename() self.addrule('!PACMAN_RETCODE=0') self.addrule('!PKG_EXIST=dummy') self.addrule('!FILE_MODIFIED=foobar')
config_DMLPDTP2_linear = { "lr": 0.0000001, "target_stepsize": 0.0403226567555006, "feedback_wd": 9.821494271391093e-05, "lr_fb": 0.0022485520139920064, "sigma": 0.06086642605203958, "out_dir": "logs/STRegression/DMLPDTP2_linear", "network_type": "DMLPDTP2", "recurrent_input": False, "hidden_fb_activation": "linear", "size_mlp_fb": None, "fb_activation": "linear", "initialization": "xavier_normal", } config_DTP_pretrained = { "lr": 0.0000001, "target_stepsize": 0.01186235243557516, "feedback_wd": 1.084514667138376e-05, "lr_fb": 0.003289433723080337, "sigma": 0.09999731226483778, "out_dir": "logs/mnist/DTP_improved", "network_type": "DTP", "initialization": "xavier_normal", "fb_activation": "tanh", } config_collection = { "DMLPDTP2_linear": config_DMLPDTP2_linear, "DTP_pretrained": config_DTP_pretrained, } result_keys = [ "loss_train", "loss_test", "bp_angles", "nullspace_relative_norm_angles", "rec_loss", ] config_fixed = { "dataset": "student_teacher", "optimizer": "SGD", "optimizer_fb": "SGD", "momentum": 0.0, "parallel": True, "normalize_lr": True, "batch_size": 1, "forward_wd": 0.0, "epochs_fb": 30, "not_randomized": True, "not_randomized_fb": True, "extra_fb_minibatches": 0, "extra_fb_epochs": 1, "num_train": 400, "num_test": 200, "epochs": 5, "train_only_feedback_parameters": False, "freeze_forward_weights": True, "num_hidden": 2, "size_hidden": 6, "size_input": 6, "size_output": 2, "hidden_activation": "tanh", "output_activation": "linear", "no_bias": False, "no_cuda": False, "random_seed": 42, "cuda_deterministic": False, "freeze_BPlayers": False, "multiple_hpsearch": False, "save_logs": True, "save_BP_angle": True, "save_GN_angle": False, "save_GN_activations_angle": False, "save_BP_activations_angle": False, "save_nullspace_norm_ratio": True, "gn_damping": 0.0, "hpsearch": False, "plots": "compute", "log_interval": 10, } if __name__ == "__main__": pass
config_dmlpdtp2_linear = {'lr': 1e-07, 'target_stepsize': 0.0403226567555006, 'feedback_wd': 9.821494271391093e-05, 'lr_fb': 0.0022485520139920064, 'sigma': 0.06086642605203958, 'out_dir': 'logs/STRegression/DMLPDTP2_linear', 'network_type': 'DMLPDTP2', 'recurrent_input': False, 'hidden_fb_activation': 'linear', 'size_mlp_fb': None, 'fb_activation': 'linear', 'initialization': 'xavier_normal'} config_dtp_pretrained = {'lr': 1e-07, 'target_stepsize': 0.01186235243557516, 'feedback_wd': 1.084514667138376e-05, 'lr_fb': 0.003289433723080337, 'sigma': 0.09999731226483778, 'out_dir': 'logs/mnist/DTP_improved', 'network_type': 'DTP', 'initialization': 'xavier_normal', 'fb_activation': 'tanh'} config_collection = {'DMLPDTP2_linear': config_DMLPDTP2_linear, 'DTP_pretrained': config_DTP_pretrained} result_keys = ['loss_train', 'loss_test', 'bp_angles', 'nullspace_relative_norm_angles', 'rec_loss'] config_fixed = {'dataset': 'student_teacher', 'optimizer': 'SGD', 'optimizer_fb': 'SGD', 'momentum': 0.0, 'parallel': True, 'normalize_lr': True, 'batch_size': 1, 'forward_wd': 0.0, 'epochs_fb': 30, 'not_randomized': True, 'not_randomized_fb': True, 'extra_fb_minibatches': 0, 'extra_fb_epochs': 1, 'num_train': 400, 'num_test': 200, 'epochs': 5, 'train_only_feedback_parameters': False, 'freeze_forward_weights': True, 'num_hidden': 2, 'size_hidden': 6, 'size_input': 6, 'size_output': 2, 'hidden_activation': 'tanh', 'output_activation': 'linear', 'no_bias': False, 'no_cuda': False, 'random_seed': 42, 'cuda_deterministic': False, 'freeze_BPlayers': False, 'multiple_hpsearch': False, 'save_logs': True, 'save_BP_angle': True, 'save_GN_angle': False, 'save_GN_activations_angle': False, 'save_BP_activations_angle': False, 'save_nullspace_norm_ratio': True, 'gn_damping': 0.0, 'hpsearch': False, 'plots': 'compute', 'log_interval': 10} if __name__ == '__main__': pass
''' #list1 = ["Jiggu","JJ","gg","GG"] tuple = ("Jiggu","JJ","gg","GG") #for item in list1: #print(item) for item in tuple: print(item) '''
""" #list1 = ["Jiggu","JJ","gg","GG"] tuple = ("Jiggu","JJ","gg","GG") #for item in list1: #print(item) for item in tuple: print(item) """
class DisplayUnitType(Enum,IComparable,IFormattable,IConvertible): """ The units and display format used to format numbers as strings. Also used for unit conversions. enum DisplayUnitType,values: DUT_1_RATIO (182),DUT_ACRES (7),DUT_AMPERES (69),DUT_ATMOSPHERES (54),DUT_BARS (55),DUT_BRITISH_THERMAL_UNIT_PER_FAHRENHEIT (186),DUT_BRITISH_THERMAL_UNITS (31),DUT_BRITISH_THERMAL_UNITS_PER_HOUR (42),DUT_BRITISH_THERMAL_UNITS_PER_HOUR_CUBIC_FOOT (167),DUT_BRITISH_THERMAL_UNITS_PER_HOUR_FOOT_FAHRENHEIT (231),DUT_BRITISH_THERMAL_UNITS_PER_HOUR_SQUARE_FOOT (166),DUT_BRITISH_THERMAL_UNITS_PER_HOUR_SQUARE_FOOT_FAHRENHEIT (155),DUT_BRITISH_THERMAL_UNITS_PER_POUND (233),DUT_BRITISH_THERMAL_UNITS_PER_POUND_FAHRENHEIT (232),DUT_BRITISH_THERMAL_UNITS_PER_SECOND (41),DUT_CALORIES (32),DUT_CALORIES_PER_SECOND (43),DUT_CANDELAS (81),DUT_CANDELAS_PER_SQUARE_METER (80),DUT_CANDLEPOWER (82),DUT_CELSIUS (57),DUT_CELSIUS_DIFFERENCE (244),DUT_CENTIMETERS (1),DUT_CENTIMETERS_PER_MINUTE (62),DUT_CENTIMETERS_TO_THE_FOURTH_POWER (200),DUT_CENTIMETERS_TO_THE_SIXTH_POWER (205),DUT_CENTIPOISES (131),DUT_CUBIC_CENTIMETERS (24),DUT_CUBIC_FEET (13),DUT_CUBIC_FEET_PER_KIP (124),DUT_CUBIC_FEET_PER_MINUTE (63),DUT_CUBIC_FEET_PER_MINUTE_CUBIC_FOOT (169),DUT_CUBIC_FEET_PER_MINUTE_SQUARE_FOOT (156),DUT_CUBIC_FEET_PER_MINUTE_TON_OF_REFRIGERATION (171),DUT_CUBIC_INCHES (23),DUT_CUBIC_METERS (14),DUT_CUBIC_METERS_PER_HOUR (66),DUT_CUBIC_METERS_PER_KILONEWTON (123),DUT_CUBIC_METERS_PER_SECOND (65),DUT_CUBIC_MILLIMETERS (25),DUT_CUBIC_YARDS (10),DUT_CURRENCY (175),DUT_CUSTOM (-1),DUT_CYCLES_PER_SECOND (76),DUT_DECANEWTON_METERS (112),DUT_DECANEWTON_METERS_PER_METER (140),DUT_DECANEWTONS (88),DUT_DECANEWTONS_PER_METER (96),DUT_DECANEWTONS_PER_SQUARE_METER (104),DUT_DECIMAL_DEGREES (15),DUT_DECIMAL_FEET (3),DUT_DECIMAL_INCHES (6),DUT_DECIMETERS (236),DUT_DEGREES_AND_MINUTES (16),DUT_FAHRENHEIT (56),DUT_FAHRENHEIT_DIFFERENCE (243),DUT_FEET_FRACTIONAL_INCHES (4),DUT_FEET_OF_WATER (128),DUT_FEET_OF_WATER_PER_100FT (127),DUT_FEET_PER_KIP (120),DUT_FEET_PER_MINUTE (60),DUT_FEET_PER_SECOND (132),DUT_FEET_PER_SECOND_SQUARED (195),DUT_FEET_TO_THE_FOURTH_POWER (197),DUT_FEET_TO_THE_SIXTH_POWER (202),DUT_FIXED (18),DUT_FOOTCANDLES (78),DUT_FOOTLAMBERTS (79),DUT_FRACTIONAL_INCHES (5),DUT_GALLONS_US (27),DUT_GALLONS_US_PER_HOUR (68),DUT_GALLONS_US_PER_MINUTE (67),DUT_GENERAL (17),DUT_GRADS (215),DUT_GRAINS_PER_HOUR_SQUARE_FOOT_INCH_MERCURY (234),DUT_HECTARES (8),DUT_HERTZ (75),DUT_HORSEPOWER (86),DUT_HOUR_SQUARE_FOOT_FAHRENHEIT_PER_BRITISH_THERMAL_UNIT (184),DUT_HOURS (220),DUT_INCHES_OF_MERCURY (52),DUT_INCHES_OF_WATER (47),DUT_INCHES_OF_WATER_PER_100FT (37),DUT_INCHES_PER_SECOND_SQUARED (194),DUT_INCHES_TO_THE_FOURTH_POWER (198),DUT_INCHES_TO_THE_SIXTH_POWER (203),DUT_INV_CELSIUS (138),DUT_INV_FAHRENHEIT (137),DUT_INV_KILONEWTONS (125),DUT_INV_KIPS (126),DUT_JOULES (34),DUT_JOULES_PER_GRAM (228),DUT_JOULES_PER_GRAM_CELSIUS (227),DUT_JOULES_PER_KELVIN (187),DUT_JOULES_PER_KILOGRAM_CELSIUS (237),DUT_KELVIN (58),DUT_KELVIN_DIFFERENCE (245),DUT_KILOAMPERES (70),DUT_KILOCALORIES (33),DUT_KILOCALORIES_PER_SECOND (44),DUT_KILOGRAM_FORCE_METERS (116),DUT_KILOGRAM_FORCE_METERS_PER_METER (144),DUT_KILOGRAMS_FORCE (92),DUT_KILOGRAMS_FORCE_PER_METER (100),DUT_KILOGRAMS_FORCE_PER_SQUARE_METER (108),DUT_KILOGRAMS_MASS (189),DUT_KILOGRAMS_MASS_PER_METER (212),DUT_KILOGRAMS_MASS_PER_SQUARE_METER (224),DUT_KILOGRAMS_PER_CUBIC_METER (28),DUT_KILOJOULES (223),DUT_KILOJOULES_PER_KELVIN (188),DUT_KILOMETERS_PER_HOUR (221),DUT_KILOMETERS_PER_SECOND_SQUARED (193),DUT_KILONEWTON_METERS (113),DUT_KILONEWTON_METERS_PER_DEGREE (151),DUT_KILONEWTON_METERS_PER_DEGREE_PER_METER (153),DUT_KILONEWTON_METERS_PER_METER (141),DUT_KILONEWTONS (89),DUT_KILONEWTONS_PER_CUBIC_METER (134),DUT_KILONEWTONS_PER_METER (97),DUT_KILONEWTONS_PER_SQUARE_CENTIMETER (178),DUT_KILONEWTONS_PER_SQUARE_METER (105),DUT_KILONEWTONS_PER_SQUARE_MILLIMETER (180),DUT_KILOPASCALS (49),DUT_KILOVOLT_AMPERES (85),DUT_KILOVOLTS (73),DUT_KILOWATT_HOURS (35),DUT_KILOWATTS (40),DUT_KIP_FEET (115),DUT_KIP_FEET_PER_DEGREE (150),DUT_KIP_FEET_PER_DEGREE_PER_FOOT (152),DUT_KIP_FEET_PER_FOOT (143),DUT_KIPS (91),DUT_KIPS_PER_CUBIC_FOOT (149),DUT_KIPS_PER_CUBIC_INCH (136),DUT_KIPS_PER_FOOT (99),DUT_KIPS_PER_INCH (148),DUT_KIPS_PER_SQUARE_FOOT (107),DUT_KIPS_PER_SQUARE_INCH (133),DUT_LITERS (26),DUT_LITERS_PER_MINUTE (242),DUT_LITERS_PER_SECOND (64),DUT_LITERS_PER_SECOND_CUBIC_METER (170),DUT_LITERS_PER_SECOND_KILOWATTS (172),DUT_LITERS_PER_SECOND_SQUARE_METER (157),DUT_LUMENS (83),DUT_LUMENS_PER_WATT (176),DUT_LUX (77),DUT_MEGANEWTON_METERS (114),DUT_MEGANEWTON_METERS_PER_METER (142),DUT_MEGANEWTONS (90),DUT_MEGANEWTONS_PER_METER (98),DUT_MEGANEWTONS_PER_SQUARE_METER (106),DUT_MEGAPASCALS (50),DUT_METERS (0),DUT_METERS_CENTIMETERS (9),DUT_METERS_PER_KILONEWTON (119),DUT_METERS_PER_SECOND (61),DUT_METERS_PER_SECOND_SQUARED (192),DUT_METERS_TO_THE_FOURTH_POWER (201),DUT_METERS_TO_THE_SIXTH_POWER (206),DUT_MICROINCHES_PER_INCH_FAHRENHEIT (239),DUT_MICROMETERS_PER_METER_CELSIUS (238),DUT_MILES_PER_HOUR (222),DUT_MILES_PER_SECOND_SQUARED (196),DUT_MILISECONDS (217),DUT_MILLIAMPERES (71),DUT_MILLIMETERS (2),DUT_MILLIMETERS_OF_MERCURY (53),DUT_MILLIMETERS_TO_THE_FOURTH_POWER (199),DUT_MILLIMETERS_TO_THE_SIXTH_POWER (204),DUT_MILLIVOLTS (74),DUT_MINUTES (219),DUT_NANOGRAMS_PER_PASCAL_SECOND_SQUARE_METER (229),DUT_NEWTON_METERS (111),DUT_NEWTON_METERS_PER_METER (139),DUT_NEWTONS (87),DUT_NEWTONS_PER_METER (95),DUT_NEWTONS_PER_SQUARE_METER (103),DUT_NEWTONS_PER_SQUARE_MILLIMETER (179),DUT_OHM_METERS (230),DUT_PASCAL_SECONDS (129),DUT_PASCALS (48),DUT_PASCALS_PER_METER (38),DUT_PER_MILLE (235),DUT_PERCENTAGE (19),DUT_POUND_FORCE_FEET (118),DUT_POUND_FORCE_FEET_PER_FOOT (146),DUT_POUNDS_FORCE (94),DUT_POUNDS_FORCE_PER_CUBIC_FOOT (135),DUT_POUNDS_FORCE_PER_FOOT (102),DUT_POUNDS_FORCE_PER_SQUARE_FOOT (110),DUT_POUNDS_FORCE_PER_SQUARE_INCH (51),DUT_POUNDS_MASS (191),DUT_POUNDS_MASS_PER_CUBIC_FOOT (29),DUT_POUNDS_MASS_PER_CUBIC_INCH (30),DUT_POUNDS_MASS_PER_FOOT (213),DUT_POUNDS_MASS_PER_FOOT_HOUR (147),DUT_POUNDS_MASS_PER_FOOT_SECOND (130),DUT_POUNDS_MASS_PER_SQUARE_FOOT (225),DUT_RADIANS (214),DUT_RADIANS_PER_SECOND (216),DUT_RANKINE (59),DUT_RANKINE_DIFFERENCE (246),DUT_RATIO_10 (158),DUT_RATIO_12 (159),DUT_RISE_OVER_10_FEET (183),DUT_RISE_OVER_120_INCHES (181),DUT_RISE_OVER_FOOT (162),DUT_RISE_OVER_INCHES (161),DUT_RISE_OVER_MMS (163),DUT_SECONDS (218),DUT_SLOPE_DEGREES (160),DUT_SQUARE_CENTIMETERS (21),DUT_SQUARE_CENTIMETERS_PER_METER (210),DUT_SQUARE_FEET (11),DUT_SQUARE_FEET_PER_FOOT (207),DUT_SQUARE_FEET_PER_KIP (122),DUT_SQUARE_FEET_PER_THOUSAND_BRITISH_THERMAL_UNITS_PER_HOUR (177),DUT_SQUARE_FEET_PER_TON_OF_REFRIGERATION (173),DUT_SQUARE_INCHES (20),DUT_SQUARE_INCHES_PER_FOOT (208),DUT_SQUARE_METER_KELVIN_PER_WATT (185),DUT_SQUARE_METERS (12),DUT_SQUARE_METERS_PER_KILONEWTON (121),DUT_SQUARE_METERS_PER_KILOWATTS (174),DUT_SQUARE_METERS_PER_METER (211),DUT_SQUARE_MILLIMETERS (22),DUT_SQUARE_MILLIMETERS_PER_METER (209),DUT_THERMS (36),DUT_TON_OF_REFRIGERATION (168),DUT_TONNE_FORCE_METERS (117),DUT_TONNE_FORCE_METERS_PER_METER (145),DUT_TONNES_FORCE (93),DUT_TONNES_FORCE_PER_METER (101),DUT_TONNES_FORCE_PER_SQUARE_METER (109),DUT_TONNES_MASS (190),DUT_UNDEFINED (-2),DUT_USTONNES_FORCE (241),DUT_USTONNES_MASS (240),DUT_VOLT_AMPERES (84),DUT_VOLTS (72),DUT_WATTS (39),DUT_WATTS_PER_CUBIC_FOOT (164),DUT_WATTS_PER_CUBIC_METER (165),DUT_WATTS_PER_METER_KELVIN (226),DUT_WATTS_PER_SQUARE_FOOT (45),DUT_WATTS_PER_SQUARE_METER (46),DUT_WATTS_PER_SQUARE_METER_KELVIN (154) """ def __eq__(self,*args): """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self,*args): """ __format__(formattable: IFormattable,format: str) -> str """ pass def __ge__(self,*args): pass def __gt__(self,*args): pass def __init__(self,*args): """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self,*args): pass def __lt__(self,*args): pass def __ne__(self,*args): pass def __reduce_ex__(self,*args): pass def __str__(self,*args): pass DUT_1_RATIO=None DUT_ACRES=None DUT_AMPERES=None DUT_ATMOSPHERES=None DUT_BARS=None DUT_BRITISH_THERMAL_UNITS=None DUT_BRITISH_THERMAL_UNITS_PER_HOUR=None DUT_BRITISH_THERMAL_UNITS_PER_HOUR_CUBIC_FOOT=None DUT_BRITISH_THERMAL_UNITS_PER_HOUR_FOOT_FAHRENHEIT=None DUT_BRITISH_THERMAL_UNITS_PER_HOUR_SQUARE_FOOT=None DUT_BRITISH_THERMAL_UNITS_PER_HOUR_SQUARE_FOOT_FAHRENHEIT=None DUT_BRITISH_THERMAL_UNITS_PER_POUND=None DUT_BRITISH_THERMAL_UNITS_PER_POUND_FAHRENHEIT=None DUT_BRITISH_THERMAL_UNITS_PER_SECOND=None DUT_BRITISH_THERMAL_UNIT_PER_FAHRENHEIT=None DUT_CALORIES=None DUT_CALORIES_PER_SECOND=None DUT_CANDELAS=None DUT_CANDELAS_PER_SQUARE_METER=None DUT_CANDLEPOWER=None DUT_CELSIUS=None DUT_CELSIUS_DIFFERENCE=None DUT_CENTIMETERS=None DUT_CENTIMETERS_PER_MINUTE=None DUT_CENTIMETERS_TO_THE_FOURTH_POWER=None DUT_CENTIMETERS_TO_THE_SIXTH_POWER=None DUT_CENTIPOISES=None DUT_CUBIC_CENTIMETERS=None DUT_CUBIC_FEET=None DUT_CUBIC_FEET_PER_KIP=None DUT_CUBIC_FEET_PER_MINUTE=None DUT_CUBIC_FEET_PER_MINUTE_CUBIC_FOOT=None DUT_CUBIC_FEET_PER_MINUTE_SQUARE_FOOT=None DUT_CUBIC_FEET_PER_MINUTE_TON_OF_REFRIGERATION=None DUT_CUBIC_INCHES=None DUT_CUBIC_METERS=None DUT_CUBIC_METERS_PER_HOUR=None DUT_CUBIC_METERS_PER_KILONEWTON=None DUT_CUBIC_METERS_PER_SECOND=None DUT_CUBIC_MILLIMETERS=None DUT_CUBIC_YARDS=None DUT_CURRENCY=None DUT_CUSTOM=None DUT_CYCLES_PER_SECOND=None DUT_DECANEWTONS=None DUT_DECANEWTONS_PER_METER=None DUT_DECANEWTONS_PER_SQUARE_METER=None DUT_DECANEWTON_METERS=None DUT_DECANEWTON_METERS_PER_METER=None DUT_DECIMAL_DEGREES=None DUT_DECIMAL_FEET=None DUT_DECIMAL_INCHES=None DUT_DECIMETERS=None DUT_DEGREES_AND_MINUTES=None DUT_FAHRENHEIT=None DUT_FAHRENHEIT_DIFFERENCE=None DUT_FEET_FRACTIONAL_INCHES=None DUT_FEET_OF_WATER=None DUT_FEET_OF_WATER_PER_100FT=None DUT_FEET_PER_KIP=None DUT_FEET_PER_MINUTE=None DUT_FEET_PER_SECOND=None DUT_FEET_PER_SECOND_SQUARED=None DUT_FEET_TO_THE_FOURTH_POWER=None DUT_FEET_TO_THE_SIXTH_POWER=None DUT_FIXED=None DUT_FOOTCANDLES=None DUT_FOOTLAMBERTS=None DUT_FRACTIONAL_INCHES=None DUT_GALLONS_US=None DUT_GALLONS_US_PER_HOUR=None DUT_GALLONS_US_PER_MINUTE=None DUT_GENERAL=None DUT_GRADS=None DUT_GRAINS_PER_HOUR_SQUARE_FOOT_INCH_MERCURY=None DUT_HECTARES=None DUT_HERTZ=None DUT_HORSEPOWER=None DUT_HOURS=None DUT_HOUR_SQUARE_FOOT_FAHRENHEIT_PER_BRITISH_THERMAL_UNIT=None DUT_INCHES_OF_MERCURY=None DUT_INCHES_OF_WATER=None DUT_INCHES_OF_WATER_PER_100FT=None DUT_INCHES_PER_SECOND_SQUARED=None DUT_INCHES_TO_THE_FOURTH_POWER=None DUT_INCHES_TO_THE_SIXTH_POWER=None DUT_INV_CELSIUS=None DUT_INV_FAHRENHEIT=None DUT_INV_KILONEWTONS=None DUT_INV_KIPS=None DUT_JOULES=None DUT_JOULES_PER_GRAM=None DUT_JOULES_PER_GRAM_CELSIUS=None DUT_JOULES_PER_KELVIN=None DUT_JOULES_PER_KILOGRAM_CELSIUS=None DUT_KELVIN=None DUT_KELVIN_DIFFERENCE=None DUT_KILOAMPERES=None DUT_KILOCALORIES=None DUT_KILOCALORIES_PER_SECOND=None DUT_KILOGRAMS_FORCE=None DUT_KILOGRAMS_FORCE_PER_METER=None DUT_KILOGRAMS_FORCE_PER_SQUARE_METER=None DUT_KILOGRAMS_MASS=None DUT_KILOGRAMS_MASS_PER_METER=None DUT_KILOGRAMS_MASS_PER_SQUARE_METER=None DUT_KILOGRAMS_PER_CUBIC_METER=None DUT_KILOGRAM_FORCE_METERS=None DUT_KILOGRAM_FORCE_METERS_PER_METER=None DUT_KILOJOULES=None DUT_KILOJOULES_PER_KELVIN=None DUT_KILOMETERS_PER_HOUR=None DUT_KILOMETERS_PER_SECOND_SQUARED=None DUT_KILONEWTONS=None DUT_KILONEWTONS_PER_CUBIC_METER=None DUT_KILONEWTONS_PER_METER=None DUT_KILONEWTONS_PER_SQUARE_CENTIMETER=None DUT_KILONEWTONS_PER_SQUARE_METER=None DUT_KILONEWTONS_PER_SQUARE_MILLIMETER=None DUT_KILONEWTON_METERS=None DUT_KILONEWTON_METERS_PER_DEGREE=None DUT_KILONEWTON_METERS_PER_DEGREE_PER_METER=None DUT_KILONEWTON_METERS_PER_METER=None DUT_KILOPASCALS=None DUT_KILOVOLTS=None DUT_KILOVOLT_AMPERES=None DUT_KILOWATTS=None DUT_KILOWATT_HOURS=None DUT_KIPS=None DUT_KIPS_PER_CUBIC_FOOT=None DUT_KIPS_PER_CUBIC_INCH=None DUT_KIPS_PER_FOOT=None DUT_KIPS_PER_INCH=None DUT_KIPS_PER_SQUARE_FOOT=None DUT_KIPS_PER_SQUARE_INCH=None DUT_KIP_FEET=None DUT_KIP_FEET_PER_DEGREE=None DUT_KIP_FEET_PER_DEGREE_PER_FOOT=None DUT_KIP_FEET_PER_FOOT=None DUT_LITERS=None DUT_LITERS_PER_MINUTE=None DUT_LITERS_PER_SECOND=None DUT_LITERS_PER_SECOND_CUBIC_METER=None DUT_LITERS_PER_SECOND_KILOWATTS=None DUT_LITERS_PER_SECOND_SQUARE_METER=None DUT_LUMENS=None DUT_LUMENS_PER_WATT=None DUT_LUX=None DUT_MEGANEWTONS=None DUT_MEGANEWTONS_PER_METER=None DUT_MEGANEWTONS_PER_SQUARE_METER=None DUT_MEGANEWTON_METERS=None DUT_MEGANEWTON_METERS_PER_METER=None DUT_MEGAPASCALS=None DUT_METERS=None DUT_METERS_CENTIMETERS=None DUT_METERS_PER_KILONEWTON=None DUT_METERS_PER_SECOND=None DUT_METERS_PER_SECOND_SQUARED=None DUT_METERS_TO_THE_FOURTH_POWER=None DUT_METERS_TO_THE_SIXTH_POWER=None DUT_MICROINCHES_PER_INCH_FAHRENHEIT=None DUT_MICROMETERS_PER_METER_CELSIUS=None DUT_MILES_PER_HOUR=None DUT_MILES_PER_SECOND_SQUARED=None DUT_MILISECONDS=None DUT_MILLIAMPERES=None DUT_MILLIMETERS=None DUT_MILLIMETERS_OF_MERCURY=None DUT_MILLIMETERS_TO_THE_FOURTH_POWER=None DUT_MILLIMETERS_TO_THE_SIXTH_POWER=None DUT_MILLIVOLTS=None DUT_MINUTES=None DUT_NANOGRAMS_PER_PASCAL_SECOND_SQUARE_METER=None DUT_NEWTONS=None DUT_NEWTONS_PER_METER=None DUT_NEWTONS_PER_SQUARE_METER=None DUT_NEWTONS_PER_SQUARE_MILLIMETER=None DUT_NEWTON_METERS=None DUT_NEWTON_METERS_PER_METER=None DUT_OHM_METERS=None DUT_PASCALS=None DUT_PASCALS_PER_METER=None DUT_PASCAL_SECONDS=None DUT_PERCENTAGE=None DUT_PER_MILLE=None DUT_POUNDS_FORCE=None DUT_POUNDS_FORCE_PER_CUBIC_FOOT=None DUT_POUNDS_FORCE_PER_FOOT=None DUT_POUNDS_FORCE_PER_SQUARE_FOOT=None DUT_POUNDS_FORCE_PER_SQUARE_INCH=None DUT_POUNDS_MASS=None DUT_POUNDS_MASS_PER_CUBIC_FOOT=None DUT_POUNDS_MASS_PER_CUBIC_INCH=None DUT_POUNDS_MASS_PER_FOOT=None DUT_POUNDS_MASS_PER_FOOT_HOUR=None DUT_POUNDS_MASS_PER_FOOT_SECOND=None DUT_POUNDS_MASS_PER_SQUARE_FOOT=None DUT_POUND_FORCE_FEET=None DUT_POUND_FORCE_FEET_PER_FOOT=None DUT_RADIANS=None DUT_RADIANS_PER_SECOND=None DUT_RANKINE=None DUT_RANKINE_DIFFERENCE=None DUT_RATIO_10=None DUT_RATIO_12=None DUT_RISE_OVER_10_FEET=None DUT_RISE_OVER_120_INCHES=None DUT_RISE_OVER_FOOT=None DUT_RISE_OVER_INCHES=None DUT_RISE_OVER_MMS=None DUT_SECONDS=None DUT_SLOPE_DEGREES=None DUT_SQUARE_CENTIMETERS=None DUT_SQUARE_CENTIMETERS_PER_METER=None DUT_SQUARE_FEET=None DUT_SQUARE_FEET_PER_FOOT=None DUT_SQUARE_FEET_PER_KIP=None DUT_SQUARE_FEET_PER_THOUSAND_BRITISH_THERMAL_UNITS_PER_HOUR=None DUT_SQUARE_FEET_PER_TON_OF_REFRIGERATION=None DUT_SQUARE_INCHES=None DUT_SQUARE_INCHES_PER_FOOT=None DUT_SQUARE_METERS=None DUT_SQUARE_METERS_PER_KILONEWTON=None DUT_SQUARE_METERS_PER_KILOWATTS=None DUT_SQUARE_METERS_PER_METER=None DUT_SQUARE_METER_KELVIN_PER_WATT=None DUT_SQUARE_MILLIMETERS=None DUT_SQUARE_MILLIMETERS_PER_METER=None DUT_THERMS=None DUT_TONNES_FORCE=None DUT_TONNES_FORCE_PER_METER=None DUT_TONNES_FORCE_PER_SQUARE_METER=None DUT_TONNES_MASS=None DUT_TONNE_FORCE_METERS=None DUT_TONNE_FORCE_METERS_PER_METER=None DUT_TON_OF_REFRIGERATION=None DUT_UNDEFINED=None DUT_USTONNES_FORCE=None DUT_USTONNES_MASS=None DUT_VOLTS=None DUT_VOLT_AMPERES=None DUT_WATTS=None DUT_WATTS_PER_CUBIC_FOOT=None DUT_WATTS_PER_CUBIC_METER=None DUT_WATTS_PER_METER_KELVIN=None DUT_WATTS_PER_SQUARE_FOOT=None DUT_WATTS_PER_SQUARE_METER=None DUT_WATTS_PER_SQUARE_METER_KELVIN=None value__=None
class Displayunittype(Enum, IComparable, IFormattable, IConvertible): """ The units and display format used to format numbers as strings. Also used for unit conversions. enum DisplayUnitType,values: DUT_1_RATIO (182),DUT_ACRES (7),DUT_AMPERES (69),DUT_ATMOSPHERES (54),DUT_BARS (55),DUT_BRITISH_THERMAL_UNIT_PER_FAHRENHEIT (186),DUT_BRITISH_THERMAL_UNITS (31),DUT_BRITISH_THERMAL_UNITS_PER_HOUR (42),DUT_BRITISH_THERMAL_UNITS_PER_HOUR_CUBIC_FOOT (167),DUT_BRITISH_THERMAL_UNITS_PER_HOUR_FOOT_FAHRENHEIT (231),DUT_BRITISH_THERMAL_UNITS_PER_HOUR_SQUARE_FOOT (166),DUT_BRITISH_THERMAL_UNITS_PER_HOUR_SQUARE_FOOT_FAHRENHEIT (155),DUT_BRITISH_THERMAL_UNITS_PER_POUND (233),DUT_BRITISH_THERMAL_UNITS_PER_POUND_FAHRENHEIT (232),DUT_BRITISH_THERMAL_UNITS_PER_SECOND (41),DUT_CALORIES (32),DUT_CALORIES_PER_SECOND (43),DUT_CANDELAS (81),DUT_CANDELAS_PER_SQUARE_METER (80),DUT_CANDLEPOWER (82),DUT_CELSIUS (57),DUT_CELSIUS_DIFFERENCE (244),DUT_CENTIMETERS (1),DUT_CENTIMETERS_PER_MINUTE (62),DUT_CENTIMETERS_TO_THE_FOURTH_POWER (200),DUT_CENTIMETERS_TO_THE_SIXTH_POWER (205),DUT_CENTIPOISES (131),DUT_CUBIC_CENTIMETERS (24),DUT_CUBIC_FEET (13),DUT_CUBIC_FEET_PER_KIP (124),DUT_CUBIC_FEET_PER_MINUTE (63),DUT_CUBIC_FEET_PER_MINUTE_CUBIC_FOOT (169),DUT_CUBIC_FEET_PER_MINUTE_SQUARE_FOOT (156),DUT_CUBIC_FEET_PER_MINUTE_TON_OF_REFRIGERATION (171),DUT_CUBIC_INCHES (23),DUT_CUBIC_METERS (14),DUT_CUBIC_METERS_PER_HOUR (66),DUT_CUBIC_METERS_PER_KILONEWTON (123),DUT_CUBIC_METERS_PER_SECOND (65),DUT_CUBIC_MILLIMETERS (25),DUT_CUBIC_YARDS (10),DUT_CURRENCY (175),DUT_CUSTOM (-1),DUT_CYCLES_PER_SECOND (76),DUT_DECANEWTON_METERS (112),DUT_DECANEWTON_METERS_PER_METER (140),DUT_DECANEWTONS (88),DUT_DECANEWTONS_PER_METER (96),DUT_DECANEWTONS_PER_SQUARE_METER (104),DUT_DECIMAL_DEGREES (15),DUT_DECIMAL_FEET (3),DUT_DECIMAL_INCHES (6),DUT_DECIMETERS (236),DUT_DEGREES_AND_MINUTES (16),DUT_FAHRENHEIT (56),DUT_FAHRENHEIT_DIFFERENCE (243),DUT_FEET_FRACTIONAL_INCHES (4),DUT_FEET_OF_WATER (128),DUT_FEET_OF_WATER_PER_100FT (127),DUT_FEET_PER_KIP (120),DUT_FEET_PER_MINUTE (60),DUT_FEET_PER_SECOND (132),DUT_FEET_PER_SECOND_SQUARED (195),DUT_FEET_TO_THE_FOURTH_POWER (197),DUT_FEET_TO_THE_SIXTH_POWER (202),DUT_FIXED (18),DUT_FOOTCANDLES (78),DUT_FOOTLAMBERTS (79),DUT_FRACTIONAL_INCHES (5),DUT_GALLONS_US (27),DUT_GALLONS_US_PER_HOUR (68),DUT_GALLONS_US_PER_MINUTE (67),DUT_GENERAL (17),DUT_GRADS (215),DUT_GRAINS_PER_HOUR_SQUARE_FOOT_INCH_MERCURY (234),DUT_HECTARES (8),DUT_HERTZ (75),DUT_HORSEPOWER (86),DUT_HOUR_SQUARE_FOOT_FAHRENHEIT_PER_BRITISH_THERMAL_UNIT (184),DUT_HOURS (220),DUT_INCHES_OF_MERCURY (52),DUT_INCHES_OF_WATER (47),DUT_INCHES_OF_WATER_PER_100FT (37),DUT_INCHES_PER_SECOND_SQUARED (194),DUT_INCHES_TO_THE_FOURTH_POWER (198),DUT_INCHES_TO_THE_SIXTH_POWER (203),DUT_INV_CELSIUS (138),DUT_INV_FAHRENHEIT (137),DUT_INV_KILONEWTONS (125),DUT_INV_KIPS (126),DUT_JOULES (34),DUT_JOULES_PER_GRAM (228),DUT_JOULES_PER_GRAM_CELSIUS (227),DUT_JOULES_PER_KELVIN (187),DUT_JOULES_PER_KILOGRAM_CELSIUS (237),DUT_KELVIN (58),DUT_KELVIN_DIFFERENCE (245),DUT_KILOAMPERES (70),DUT_KILOCALORIES (33),DUT_KILOCALORIES_PER_SECOND (44),DUT_KILOGRAM_FORCE_METERS (116),DUT_KILOGRAM_FORCE_METERS_PER_METER (144),DUT_KILOGRAMS_FORCE (92),DUT_KILOGRAMS_FORCE_PER_METER (100),DUT_KILOGRAMS_FORCE_PER_SQUARE_METER (108),DUT_KILOGRAMS_MASS (189),DUT_KILOGRAMS_MASS_PER_METER (212),DUT_KILOGRAMS_MASS_PER_SQUARE_METER (224),DUT_KILOGRAMS_PER_CUBIC_METER (28),DUT_KILOJOULES (223),DUT_KILOJOULES_PER_KELVIN (188),DUT_KILOMETERS_PER_HOUR (221),DUT_KILOMETERS_PER_SECOND_SQUARED (193),DUT_KILONEWTON_METERS (113),DUT_KILONEWTON_METERS_PER_DEGREE (151),DUT_KILONEWTON_METERS_PER_DEGREE_PER_METER (153),DUT_KILONEWTON_METERS_PER_METER (141),DUT_KILONEWTONS (89),DUT_KILONEWTONS_PER_CUBIC_METER (134),DUT_KILONEWTONS_PER_METER (97),DUT_KILONEWTONS_PER_SQUARE_CENTIMETER (178),DUT_KILONEWTONS_PER_SQUARE_METER (105),DUT_KILONEWTONS_PER_SQUARE_MILLIMETER (180),DUT_KILOPASCALS (49),DUT_KILOVOLT_AMPERES (85),DUT_KILOVOLTS (73),DUT_KILOWATT_HOURS (35),DUT_KILOWATTS (40),DUT_KIP_FEET (115),DUT_KIP_FEET_PER_DEGREE (150),DUT_KIP_FEET_PER_DEGREE_PER_FOOT (152),DUT_KIP_FEET_PER_FOOT (143),DUT_KIPS (91),DUT_KIPS_PER_CUBIC_FOOT (149),DUT_KIPS_PER_CUBIC_INCH (136),DUT_KIPS_PER_FOOT (99),DUT_KIPS_PER_INCH (148),DUT_KIPS_PER_SQUARE_FOOT (107),DUT_KIPS_PER_SQUARE_INCH (133),DUT_LITERS (26),DUT_LITERS_PER_MINUTE (242),DUT_LITERS_PER_SECOND (64),DUT_LITERS_PER_SECOND_CUBIC_METER (170),DUT_LITERS_PER_SECOND_KILOWATTS (172),DUT_LITERS_PER_SECOND_SQUARE_METER (157),DUT_LUMENS (83),DUT_LUMENS_PER_WATT (176),DUT_LUX (77),DUT_MEGANEWTON_METERS (114),DUT_MEGANEWTON_METERS_PER_METER (142),DUT_MEGANEWTONS (90),DUT_MEGANEWTONS_PER_METER (98),DUT_MEGANEWTONS_PER_SQUARE_METER (106),DUT_MEGAPASCALS (50),DUT_METERS (0),DUT_METERS_CENTIMETERS (9),DUT_METERS_PER_KILONEWTON (119),DUT_METERS_PER_SECOND (61),DUT_METERS_PER_SECOND_SQUARED (192),DUT_METERS_TO_THE_FOURTH_POWER (201),DUT_METERS_TO_THE_SIXTH_POWER (206),DUT_MICROINCHES_PER_INCH_FAHRENHEIT (239),DUT_MICROMETERS_PER_METER_CELSIUS (238),DUT_MILES_PER_HOUR (222),DUT_MILES_PER_SECOND_SQUARED (196),DUT_MILISECONDS (217),DUT_MILLIAMPERES (71),DUT_MILLIMETERS (2),DUT_MILLIMETERS_OF_MERCURY (53),DUT_MILLIMETERS_TO_THE_FOURTH_POWER (199),DUT_MILLIMETERS_TO_THE_SIXTH_POWER (204),DUT_MILLIVOLTS (74),DUT_MINUTES (219),DUT_NANOGRAMS_PER_PASCAL_SECOND_SQUARE_METER (229),DUT_NEWTON_METERS (111),DUT_NEWTON_METERS_PER_METER (139),DUT_NEWTONS (87),DUT_NEWTONS_PER_METER (95),DUT_NEWTONS_PER_SQUARE_METER (103),DUT_NEWTONS_PER_SQUARE_MILLIMETER (179),DUT_OHM_METERS (230),DUT_PASCAL_SECONDS (129),DUT_PASCALS (48),DUT_PASCALS_PER_METER (38),DUT_PER_MILLE (235),DUT_PERCENTAGE (19),DUT_POUND_FORCE_FEET (118),DUT_POUND_FORCE_FEET_PER_FOOT (146),DUT_POUNDS_FORCE (94),DUT_POUNDS_FORCE_PER_CUBIC_FOOT (135),DUT_POUNDS_FORCE_PER_FOOT (102),DUT_POUNDS_FORCE_PER_SQUARE_FOOT (110),DUT_POUNDS_FORCE_PER_SQUARE_INCH (51),DUT_POUNDS_MASS (191),DUT_POUNDS_MASS_PER_CUBIC_FOOT (29),DUT_POUNDS_MASS_PER_CUBIC_INCH (30),DUT_POUNDS_MASS_PER_FOOT (213),DUT_POUNDS_MASS_PER_FOOT_HOUR (147),DUT_POUNDS_MASS_PER_FOOT_SECOND (130),DUT_POUNDS_MASS_PER_SQUARE_FOOT (225),DUT_RADIANS (214),DUT_RADIANS_PER_SECOND (216),DUT_RANKINE (59),DUT_RANKINE_DIFFERENCE (246),DUT_RATIO_10 (158),DUT_RATIO_12 (159),DUT_RISE_OVER_10_FEET (183),DUT_RISE_OVER_120_INCHES (181),DUT_RISE_OVER_FOOT (162),DUT_RISE_OVER_INCHES (161),DUT_RISE_OVER_MMS (163),DUT_SECONDS (218),DUT_SLOPE_DEGREES (160),DUT_SQUARE_CENTIMETERS (21),DUT_SQUARE_CENTIMETERS_PER_METER (210),DUT_SQUARE_FEET (11),DUT_SQUARE_FEET_PER_FOOT (207),DUT_SQUARE_FEET_PER_KIP (122),DUT_SQUARE_FEET_PER_THOUSAND_BRITISH_THERMAL_UNITS_PER_HOUR (177),DUT_SQUARE_FEET_PER_TON_OF_REFRIGERATION (173),DUT_SQUARE_INCHES (20),DUT_SQUARE_INCHES_PER_FOOT (208),DUT_SQUARE_METER_KELVIN_PER_WATT (185),DUT_SQUARE_METERS (12),DUT_SQUARE_METERS_PER_KILONEWTON (121),DUT_SQUARE_METERS_PER_KILOWATTS (174),DUT_SQUARE_METERS_PER_METER (211),DUT_SQUARE_MILLIMETERS (22),DUT_SQUARE_MILLIMETERS_PER_METER (209),DUT_THERMS (36),DUT_TON_OF_REFRIGERATION (168),DUT_TONNE_FORCE_METERS (117),DUT_TONNE_FORCE_METERS_PER_METER (145),DUT_TONNES_FORCE (93),DUT_TONNES_FORCE_PER_METER (101),DUT_TONNES_FORCE_PER_SQUARE_METER (109),DUT_TONNES_MASS (190),DUT_UNDEFINED (-2),DUT_USTONNES_FORCE (241),DUT_USTONNES_MASS (240),DUT_VOLT_AMPERES (84),DUT_VOLTS (72),DUT_WATTS (39),DUT_WATTS_PER_CUBIC_FOOT (164),DUT_WATTS_PER_CUBIC_METER (165),DUT_WATTS_PER_METER_KELVIN (226),DUT_WATTS_PER_SQUARE_FOOT (45),DUT_WATTS_PER_SQUARE_METER (46),DUT_WATTS_PER_SQUARE_METER_KELVIN (154) """ def __eq__(self, *args): """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self, *args): """ __format__(formattable: IFormattable,format: str) -> str """ pass def __ge__(self, *args): pass def __gt__(self, *args): pass def __init__(self, *args): """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self, *args): pass def __lt__(self, *args): pass def __ne__(self, *args): pass def __reduce_ex__(self, *args): pass def __str__(self, *args): pass dut_1_ratio = None dut_acres = None dut_amperes = None dut_atmospheres = None dut_bars = None dut_british_thermal_units = None dut_british_thermal_units_per_hour = None dut_british_thermal_units_per_hour_cubic_foot = None dut_british_thermal_units_per_hour_foot_fahrenheit = None dut_british_thermal_units_per_hour_square_foot = None dut_british_thermal_units_per_hour_square_foot_fahrenheit = None dut_british_thermal_units_per_pound = None dut_british_thermal_units_per_pound_fahrenheit = None dut_british_thermal_units_per_second = None dut_british_thermal_unit_per_fahrenheit = None dut_calories = None dut_calories_per_second = None dut_candelas = None dut_candelas_per_square_meter = None dut_candlepower = None dut_celsius = None dut_celsius_difference = None dut_centimeters = None dut_centimeters_per_minute = None dut_centimeters_to_the_fourth_power = None dut_centimeters_to_the_sixth_power = None dut_centipoises = None dut_cubic_centimeters = None dut_cubic_feet = None dut_cubic_feet_per_kip = None dut_cubic_feet_per_minute = None dut_cubic_feet_per_minute_cubic_foot = None dut_cubic_feet_per_minute_square_foot = None dut_cubic_feet_per_minute_ton_of_refrigeration = None dut_cubic_inches = None dut_cubic_meters = None dut_cubic_meters_per_hour = None dut_cubic_meters_per_kilonewton = None dut_cubic_meters_per_second = None dut_cubic_millimeters = None dut_cubic_yards = None dut_currency = None dut_custom = None dut_cycles_per_second = None dut_decanewtons = None dut_decanewtons_per_meter = None dut_decanewtons_per_square_meter = None dut_decanewton_meters = None dut_decanewton_meters_per_meter = None dut_decimal_degrees = None dut_decimal_feet = None dut_decimal_inches = None dut_decimeters = None dut_degrees_and_minutes = None dut_fahrenheit = None dut_fahrenheit_difference = None dut_feet_fractional_inches = None dut_feet_of_water = None dut_feet_of_water_per_100_ft = None dut_feet_per_kip = None dut_feet_per_minute = None dut_feet_per_second = None dut_feet_per_second_squared = None dut_feet_to_the_fourth_power = None dut_feet_to_the_sixth_power = None dut_fixed = None dut_footcandles = None dut_footlamberts = None dut_fractional_inches = None dut_gallons_us = None dut_gallons_us_per_hour = None dut_gallons_us_per_minute = None dut_general = None dut_grads = None dut_grains_per_hour_square_foot_inch_mercury = None dut_hectares = None dut_hertz = None dut_horsepower = None dut_hours = None dut_hour_square_foot_fahrenheit_per_british_thermal_unit = None dut_inches_of_mercury = None dut_inches_of_water = None dut_inches_of_water_per_100_ft = None dut_inches_per_second_squared = None dut_inches_to_the_fourth_power = None dut_inches_to_the_sixth_power = None dut_inv_celsius = None dut_inv_fahrenheit = None dut_inv_kilonewtons = None dut_inv_kips = None dut_joules = None dut_joules_per_gram = None dut_joules_per_gram_celsius = None dut_joules_per_kelvin = None dut_joules_per_kilogram_celsius = None dut_kelvin = None dut_kelvin_difference = None dut_kiloamperes = None dut_kilocalories = None dut_kilocalories_per_second = None dut_kilograms_force = None dut_kilograms_force_per_meter = None dut_kilograms_force_per_square_meter = None dut_kilograms_mass = None dut_kilograms_mass_per_meter = None dut_kilograms_mass_per_square_meter = None dut_kilograms_per_cubic_meter = None dut_kilogram_force_meters = None dut_kilogram_force_meters_per_meter = None dut_kilojoules = None dut_kilojoules_per_kelvin = None dut_kilometers_per_hour = None dut_kilometers_per_second_squared = None dut_kilonewtons = None dut_kilonewtons_per_cubic_meter = None dut_kilonewtons_per_meter = None dut_kilonewtons_per_square_centimeter = None dut_kilonewtons_per_square_meter = None dut_kilonewtons_per_square_millimeter = None dut_kilonewton_meters = None dut_kilonewton_meters_per_degree = None dut_kilonewton_meters_per_degree_per_meter = None dut_kilonewton_meters_per_meter = None dut_kilopascals = None dut_kilovolts = None dut_kilovolt_amperes = None dut_kilowatts = None dut_kilowatt_hours = None dut_kips = None dut_kips_per_cubic_foot = None dut_kips_per_cubic_inch = None dut_kips_per_foot = None dut_kips_per_inch = None dut_kips_per_square_foot = None dut_kips_per_square_inch = None dut_kip_feet = None dut_kip_feet_per_degree = None dut_kip_feet_per_degree_per_foot = None dut_kip_feet_per_foot = None dut_liters = None dut_liters_per_minute = None dut_liters_per_second = None dut_liters_per_second_cubic_meter = None dut_liters_per_second_kilowatts = None dut_liters_per_second_square_meter = None dut_lumens = None dut_lumens_per_watt = None dut_lux = None dut_meganewtons = None dut_meganewtons_per_meter = None dut_meganewtons_per_square_meter = None dut_meganewton_meters = None dut_meganewton_meters_per_meter = None dut_megapascals = None dut_meters = None dut_meters_centimeters = None dut_meters_per_kilonewton = None dut_meters_per_second = None dut_meters_per_second_squared = None dut_meters_to_the_fourth_power = None dut_meters_to_the_sixth_power = None dut_microinches_per_inch_fahrenheit = None dut_micrometers_per_meter_celsius = None dut_miles_per_hour = None dut_miles_per_second_squared = None dut_miliseconds = None dut_milliamperes = None dut_millimeters = None dut_millimeters_of_mercury = None dut_millimeters_to_the_fourth_power = None dut_millimeters_to_the_sixth_power = None dut_millivolts = None dut_minutes = None dut_nanograms_per_pascal_second_square_meter = None dut_newtons = None dut_newtons_per_meter = None dut_newtons_per_square_meter = None dut_newtons_per_square_millimeter = None dut_newton_meters = None dut_newton_meters_per_meter = None dut_ohm_meters = None dut_pascals = None dut_pascals_per_meter = None dut_pascal_seconds = None dut_percentage = None dut_per_mille = None dut_pounds_force = None dut_pounds_force_per_cubic_foot = None dut_pounds_force_per_foot = None dut_pounds_force_per_square_foot = None dut_pounds_force_per_square_inch = None dut_pounds_mass = None dut_pounds_mass_per_cubic_foot = None dut_pounds_mass_per_cubic_inch = None dut_pounds_mass_per_foot = None dut_pounds_mass_per_foot_hour = None dut_pounds_mass_per_foot_second = None dut_pounds_mass_per_square_foot = None dut_pound_force_feet = None dut_pound_force_feet_per_foot = None dut_radians = None dut_radians_per_second = None dut_rankine = None dut_rankine_difference = None dut_ratio_10 = None dut_ratio_12 = None dut_rise_over_10_feet = None dut_rise_over_120_inches = None dut_rise_over_foot = None dut_rise_over_inches = None dut_rise_over_mms = None dut_seconds = None dut_slope_degrees = None dut_square_centimeters = None dut_square_centimeters_per_meter = None dut_square_feet = None dut_square_feet_per_foot = None dut_square_feet_per_kip = None dut_square_feet_per_thousand_british_thermal_units_per_hour = None dut_square_feet_per_ton_of_refrigeration = None dut_square_inches = None dut_square_inches_per_foot = None dut_square_meters = None dut_square_meters_per_kilonewton = None dut_square_meters_per_kilowatts = None dut_square_meters_per_meter = None dut_square_meter_kelvin_per_watt = None dut_square_millimeters = None dut_square_millimeters_per_meter = None dut_therms = None dut_tonnes_force = None dut_tonnes_force_per_meter = None dut_tonnes_force_per_square_meter = None dut_tonnes_mass = None dut_tonne_force_meters = None dut_tonne_force_meters_per_meter = None dut_ton_of_refrigeration = None dut_undefined = None dut_ustonnes_force = None dut_ustonnes_mass = None dut_volts = None dut_volt_amperes = None dut_watts = None dut_watts_per_cubic_foot = None dut_watts_per_cubic_meter = None dut_watts_per_meter_kelvin = None dut_watts_per_square_foot = None dut_watts_per_square_meter = None dut_watts_per_square_meter_kelvin = None value__ = None
# program for check two strings are anagram or not # https://www.geeksforgeeks.org/check-whether-two-strings-are-anagram-of-each-other/ # time complexity is O(n) and space is O(1) def isAnagram(str1, str2): if(len(str1) != len(str2)): return False count = 0 # sum up all the chars ascii values for i in str1: count += ord(i) # subtract next string each char from sum for i in str2: count -= ord(i) # if count contains 0 then it's anagram return count == 0 # time complexity is O(nlogn) def is_anagram(str1, str2): # anagram string should be same length if(len(str1) != len(str2)): return False # sorting the string in ascending order str1 = sorted(str1) str2 = sorted(str2) # if both contains same chars return True return str1 == str2 if __name__ == '__main__': str1 = input('Enter string ').lower() str2 = input('Enter another string ').lower() # invoke the first function ana = is_anagram(str1, str2) anagram = isAnagram(str1, str2) if(ana and anagram): print('Strings are anagram') else: print('Strings are not anagram')
def is_anagram(str1, str2): if len(str1) != len(str2): return False count = 0 for i in str1: count += ord(i) for i in str2: count -= ord(i) return count == 0 def is_anagram(str1, str2): if len(str1) != len(str2): return False str1 = sorted(str1) str2 = sorted(str2) return str1 == str2 if __name__ == '__main__': str1 = input('Enter string ').lower() str2 = input('Enter another string ').lower() ana = is_anagram(str1, str2) anagram = is_anagram(str1, str2) if ana and anagram: print('Strings are anagram') else: print('Strings are not anagram')
# MIT License # (C) Copyright 2021 Hewlett Packard Enterprise Development LP. # # interfaceLabels : Save and delete labels for interfaces def get_all_interface_labels( self, active: bool = None, ) -> dict: """Get all configured interface labels. Can filter response for active labels or inactive labels with ``active`` parameter. .. list-table:: :header-rows: 1 * - Swagger Section - Method - Endpoint * - interfaceLabels - GET - /gms/interfaceLabels :param active: ``True`` to filter for active labels, ``False`` to filter for inactive labels. :type active: bool, optional :return: Returns dictionary of configured interface labels \n * keyword **wan** (`dict`): Dictionary of wan interface labels\n * keyword **<label_id>** (`dict`): Interface label id \n * keyword **name** (`str`): Name of interface label * keyword **topology** (`int`): Allowed topology for building tunnels. ``0`` allows full mesh, ``2`` limits to hub & spoke topology. * keyword **active** (`bool`): ``True`` if active, ``False`` if inactive * keyword **lan** (`dict`): Dictionary of lan interface labels\n * keyword **<label_id>** (`dict`): Interface label id \n * keyword **name** (`str`): Name of interface label * keyword **topology** (`int`): Allowed topology for building tunnels. ``0`` allows full mesh, ``2`` limits to hub & spoke topology. * keyword **active** (`bool`): ``True`` if active, ``False`` if inactive :rtype: dict """ path = "/gms/interfaceLabels" if active is not None: path = path + "?active={}".format(active) return self._get(path) def update_interface_labels( self, interface_label_config: dict, delete_dependencies: bool = None, ) -> bool: """Save interface labels, **NOTE** this will completely replace the current implementation. You cannot remove labels that are in use in an overlay. Label ids have to be unique across both wan and lan. .. list-table:: :header-rows: 1 * - Swagger Section - Method - Endpoint * - interfaceLabels - POST - /gms/interfaceLabels **Example:** .. code-block:: interface_label_config = { "wan": { "1": { "name": "MPLS1", "active": true, "topology": 0 }, "2": { "name": "INET1", "active": true, "topology": 0 }, "3": { "name": "LTE", "active": true, "topology": 2 }, "6": { "name": "INET2", "active": true, "topology": 0 }, "7": { "name": "MPLS2", "active": true, "topology": 0 } }, "lan": { "4": { "name": "Voice", "active": true, "topology": 0 }, "5": { "name": "Data", "active": true, "topology": 0 } } } :param interface_label_config: Interface label configuration \n * keyword **wan** (`dict`): Dictionary of wan interface labels\n * keyword **<label_id>** (`dict`): Unique interface label id as a string integer, e.g. ``1`` \n * keyword **name** (`str`): Name of interface label * keyword **topology** (`int`): Allowed topology for building tunnels. ``0`` allows full mesh, ``2`` limits to hub & spoke topology. * keyword **active** (`bool`): ``True`` if active, ``False`` if inactive * keyword **lan** (`dict`): Dictionary of lan interface labels\n * keyword **<label_id>** (`dict`): Unique interface label id as a string integer, e.g. ``1`` \n * keyword **name** (`str`): Name of interface label * keyword **topology** (`int`): Allowed topology for building tunnels. ``0`` allows full mesh, ``2`` limits to hub & spoke topology. * keyword **active** (`bool`): ``True`` if active, ``False`` if inactive :type interface_label_config: dict :param delete_dependencies: ``True`` to delete labels from port profiles and templates using it, ``False`` to not remove them. :type delete_dependencies: bool, optional :return: Returns True/False based on successful call :rtype: bool """ path = "/gms/interfaceLabels" if delete_dependencies is not None: path = path + "?deleteDependencies={}".format(delete_dependencies) return self._post( "/gms/interfaceLabels", data=interface_label_config, expected_status=[204], return_type="bool", ) def get_interface_labels_by_type( self, label_type: str, active: bool = None, ) -> dict: """Get all configured interface labels of either wan or lan. Can filter response for active labels or inactive labels with ``active`` parameter. .. list-table:: :header-rows: 1 * - Swagger Section - Method - Endpoint * - interfaceLabels - GET - /gms/interfaceLabels/{type} :param label_type: ``wan`` to return wan-related labels, ``lan`` to return lan-related labels :type label_type: str :param active: ``True`` to filter for active labels, ``False`` to filter for inactive labels. :type active: bool, optional :return: Returns dictionary of wan or lan interface labels \n * keyword **<label_id>** (`dict`): Interface label id \n * keyword **name** (`str`): Name of interface label * keyword **topology** (`int`): Allowed topology for building tunnels. ``0`` allows full mesh, ``2`` limits to hub & spoke topology. * keyword **active** (`bool`): ``True`` if active, ``False`` if inactive :rtype: dict """ path = "/gms/interfaceLabels/{}".format(label_type) if active is not None: path = path + "?active={}".format(active) return self._get(path) def push_interface_labels_to_appliance( self, ne_pk: str, ) -> dict: """Pushes the active interface labels on Orchestrator to an appliance .. list-table:: :header-rows: 1 * - Swagger Section - Method - Endpoint * - interfaceLabels - POST - /interfaceLabels/{nePk} :param ne_pk: Appliance id in the format of integer.NE e.g. ``3.NE`` :type ne_pk: str :return: Returns True/False based on successful call :rtype: bool """ return self._post("interfaceLabels/{}".format(ne_pk), return_type="bool")
def get_all_interface_labels(self, active: bool=None) -> dict: """Get all configured interface labels. Can filter response for active labels or inactive labels with ``active`` parameter. .. list-table:: :header-rows: 1 * - Swagger Section - Method - Endpoint * - interfaceLabels - GET - /gms/interfaceLabels :param active: ``True`` to filter for active labels, ``False`` to filter for inactive labels. :type active: bool, optional :return: Returns dictionary of configured interface labels * keyword **wan** (`dict`): Dictionary of wan interface labels * keyword **<label_id>** (`dict`): Interface label id * keyword **name** (`str`): Name of interface label * keyword **topology** (`int`): Allowed topology for building tunnels. ``0`` allows full mesh, ``2`` limits to hub & spoke topology. * keyword **active** (`bool`): ``True`` if active, ``False`` if inactive * keyword **lan** (`dict`): Dictionary of lan interface labels * keyword **<label_id>** (`dict`): Interface label id * keyword **name** (`str`): Name of interface label * keyword **topology** (`int`): Allowed topology for building tunnels. ``0`` allows full mesh, ``2`` limits to hub & spoke topology. * keyword **active** (`bool`): ``True`` if active, ``False`` if inactive :rtype: dict """ path = '/gms/interfaceLabels' if active is not None: path = path + '?active={}'.format(active) return self._get(path) def update_interface_labels(self, interface_label_config: dict, delete_dependencies: bool=None) -> bool: """Save interface labels, **NOTE** this will completely replace the current implementation. You cannot remove labels that are in use in an overlay. Label ids have to be unique across both wan and lan. .. list-table:: :header-rows: 1 * - Swagger Section - Method - Endpoint * - interfaceLabels - POST - /gms/interfaceLabels **Example:** .. code-block:: interface_label_config = { "wan": { "1": { "name": "MPLS1", "active": true, "topology": 0 }, "2": { "name": "INET1", "active": true, "topology": 0 }, "3": { "name": "LTE", "active": true, "topology": 2 }, "6": { "name": "INET2", "active": true, "topology": 0 }, "7": { "name": "MPLS2", "active": true, "topology": 0 } }, "lan": { "4": { "name": "Voice", "active": true, "topology": 0 }, "5": { "name": "Data", "active": true, "topology": 0 } } } :param interface_label_config: Interface label configuration * keyword **wan** (`dict`): Dictionary of wan interface labels * keyword **<label_id>** (`dict`): Unique interface label id as a string integer, e.g. ``1`` * keyword **name** (`str`): Name of interface label * keyword **topology** (`int`): Allowed topology for building tunnels. ``0`` allows full mesh, ``2`` limits to hub & spoke topology. * keyword **active** (`bool`): ``True`` if active, ``False`` if inactive * keyword **lan** (`dict`): Dictionary of lan interface labels * keyword **<label_id>** (`dict`): Unique interface label id as a string integer, e.g. ``1`` * keyword **name** (`str`): Name of interface label * keyword **topology** (`int`): Allowed topology for building tunnels. ``0`` allows full mesh, ``2`` limits to hub & spoke topology. * keyword **active** (`bool`): ``True`` if active, ``False`` if inactive :type interface_label_config: dict :param delete_dependencies: ``True`` to delete labels from port profiles and templates using it, ``False`` to not remove them. :type delete_dependencies: bool, optional :return: Returns True/False based on successful call :rtype: bool """ path = '/gms/interfaceLabels' if delete_dependencies is not None: path = path + '?deleteDependencies={}'.format(delete_dependencies) return self._post('/gms/interfaceLabels', data=interface_label_config, expected_status=[204], return_type='bool') def get_interface_labels_by_type(self, label_type: str, active: bool=None) -> dict: """Get all configured interface labels of either wan or lan. Can filter response for active labels or inactive labels with ``active`` parameter. .. list-table:: :header-rows: 1 * - Swagger Section - Method - Endpoint * - interfaceLabels - GET - /gms/interfaceLabels/{type} :param label_type: ``wan`` to return wan-related labels, ``lan`` to return lan-related labels :type label_type: str :param active: ``True`` to filter for active labels, ``False`` to filter for inactive labels. :type active: bool, optional :return: Returns dictionary of wan or lan interface labels * keyword **<label_id>** (`dict`): Interface label id * keyword **name** (`str`): Name of interface label * keyword **topology** (`int`): Allowed topology for building tunnels. ``0`` allows full mesh, ``2`` limits to hub & spoke topology. * keyword **active** (`bool`): ``True`` if active, ``False`` if inactive :rtype: dict """ path = '/gms/interfaceLabels/{}'.format(label_type) if active is not None: path = path + '?active={}'.format(active) return self._get(path) def push_interface_labels_to_appliance(self, ne_pk: str) -> dict: """Pushes the active interface labels on Orchestrator to an appliance .. list-table:: :header-rows: 1 * - Swagger Section - Method - Endpoint * - interfaceLabels - POST - /interfaceLabels/{nePk} :param ne_pk: Appliance id in the format of integer.NE e.g. ``3.NE`` :type ne_pk: str :return: Returns True/False based on successful call :rtype: bool """ return self._post('interfaceLabels/{}'.format(ne_pk), return_type='bool')
''' Provides one variable __version__. Caution: All code in here will be executed by setup.py. ''' __version__ = '0.2.2'
""" Provides one variable __version__. Caution: All code in here will be executed by setup.py. """ __version__ = '0.2.2'
class Pipe(object): def __init__(self, function): self.function = function def __ror__(self, other): return self.function(other) def __call__(self, *args, **kwargs): return Pipe(lambda x: self.function(x, *args, **kwargs))
class Pipe(object): def __init__(self, function): self.function = function def __ror__(self, other): return self.function(other) def __call__(self, *args, **kwargs): return pipe(lambda x: self.function(x, *args, **kwargs))
def cprint(c): r, i = c.real, c.imag if r != 0: if i > 0: print('{:.2f} + {:.2f}i'.format(r, i)) elif i < 0: print('{:.2f} - {:.2f}i'.format(r, abs(i))) else: print('{:.2f}'.format(r)) else: if i != 0: print('{:.2f}i'.format(i)) else: print('{:.2f}'.format(0)) cr, ci = map(float, input().split()) dr, di = map(float, input().split()) c = complex(cr, ci) d = complex(dr, di) cprint(c+d) cprint(c-d) cprint(c*d) cprint(c/d) print('{0:.2f}'.format(abs(c))) print('{0:.2f}'.format(abs(d)))
def cprint(c): (r, i) = (c.real, c.imag) if r != 0: if i > 0: print('{:.2f} + {:.2f}i'.format(r, i)) elif i < 0: print('{:.2f} - {:.2f}i'.format(r, abs(i))) else: print('{:.2f}'.format(r)) elif i != 0: print('{:.2f}i'.format(i)) else: print('{:.2f}'.format(0)) (cr, ci) = map(float, input().split()) (dr, di) = map(float, input().split()) c = complex(cr, ci) d = complex(dr, di) cprint(c + d) cprint(c - d) cprint(c * d) cprint(c / d) print('{0:.2f}'.format(abs(c))) print('{0:.2f}'.format(abs(d)))
"""October 5th, 2020: Write a Python function called counts that takes a list as input and returns a dictionary of unique items in the list as keys and the number of times each item appears as values. So, the input ['A', 'A', 'B', 'C', 'A'] should have output {'A': 3, 'B': 1, 'C': 1} . Your code should not depend on any module from the standard library or otherwise. You should research the task first and include a description with references of your algorithm in the notebook.""" # Creating an empty Dictionary """https://www.geeksforgeeks.org/python-dictionary/#:~:text=Creating%20a%20Dictionary,element%20being%20its%20Key%3Avalue%20.""" Dict = {} # Your code should not depend on any module from the standard library or otherwise. # I have used Bubble sort as an alternative to inbuilt function sorted. # There are many ready made sort algorithms such as Merge Sort, Tim Sort (which Python uses) each have their own strengths. # I have copied the Bubble sort code and comments in its entirety from url below. # Bubble sort is not always the fastest. I have used this Bubble sort code because it is concise and well commented by the author. """https://realpython.com/sorting-algorithms-python/""" def bubble_sort(array): n = len(array) for i in range(n): # Create a flag that will allow the function to # terminate early if there's nothing left to sort already_sorted = True # Start looking at each item of the list one by one, # comparing it with its adjacent value. With each # iteration, the portion of the array that you look at # shrinks because the remaining items have already been # sorted. for j in range(n - i - 1): if array[j] > array[j + 1]: # If the item you're looking at is greater than its # adjacent value, then swap them array[j], array[j + 1] = array[j + 1], array[j] # Since you had to swap two elements, # set the `already_sorted` flag to `False` so the # algorithm doesn't finish prematurely already_sorted = False # If there were no swaps during the last iteration, # the array is already sorted, and you can terminate if already_sorted: break return array #takes a list of inputs separated by commas "https://pynative.com/python-accept-list-input-from-user/" input_string = input("Enter a list elements separated by COMMA ") userList = input_string.split(",") print("user list is ", userList) #calls the User list and applies the bubble_sort function to sort it str = userList print("The sorted list is:", bubble_sort(str)) my_sorted_dictionary_keys = bubble_sort(str) #python counting letters without count function """https://stackoverflow.com/questions/28966495/python-counting-letters-in-string-without-count-function""" def count_letters(my_letter): count = 0 for i in userList: if i == my_letter: count = count + 1 else: continue return (count) #add key value pairs to dictionary #call function count_letters """https://www.geeksforgeeks.org/add-a-keyvalue-pair-to-dictionary-in-python/""" for letter in my_sorted_dictionary_keys: Dict[letter] = count_letters(letter) print("Dictionary sorted by keys from list, count of each letter in list", Dict)
"""October 5th, 2020: Write a Python function called counts that takes a list as input and returns a dictionary of unique items in the list as keys and the number of times each item appears as values. So, the input ['A', 'A', 'B', 'C', 'A'] should have output {'A': 3, 'B': 1, 'C': 1} . Your code should not depend on any module from the standard library or otherwise. You should research the task first and include a description with references of your algorithm in the notebook.""" 'https://www.geeksforgeeks.org/python-dictionary/#:~:text=Creating%20a%20Dictionary,element%20being%20its%20Key%3Avalue%20.' dict = {} 'https://realpython.com/sorting-algorithms-python/' def bubble_sort(array): n = len(array) for i in range(n): already_sorted = True for j in range(n - i - 1): if array[j] > array[j + 1]: (array[j], array[j + 1]) = (array[j + 1], array[j]) already_sorted = False if already_sorted: break return array 'https://pynative.com/python-accept-list-input-from-user/' input_string = input('Enter a list elements separated by COMMA ') user_list = input_string.split(',') print('user list is ', userList) str = userList print('The sorted list is:', bubble_sort(str)) my_sorted_dictionary_keys = bubble_sort(str) 'https://stackoverflow.com/questions/28966495/python-counting-letters-in-string-without-count-function' def count_letters(my_letter): count = 0 for i in userList: if i == my_letter: count = count + 1 else: continue return count 'https://www.geeksforgeeks.org/add-a-keyvalue-pair-to-dictionary-in-python/' for letter in my_sorted_dictionary_keys: Dict[letter] = count_letters(letter) print('Dictionary sorted by keys from list, count of each letter in list', Dict)
ei = 3 suu1 = int(ei) suu2 = int(ei*ei) suu3 = int(ei*ei*ei) print(suu1 + suu2 + suu3)
ei = 3 suu1 = int(ei) suu2 = int(ei * ei) suu3 = int(ei * ei * ei) print(suu1 + suu2 + suu3)
# Write your frequency_dictionary function here: def frequency_dictionary(words): freqs = {} for word in words: if word not in freqs: freqs[word] = 0 freqs[word] += 1 return freqs # Uncomment these function calls to test your function: print(frequency_dictionary(["apple", "apple", "cat", 1])) # should print {"apple":2, "cat":1, 1:1} print(frequency_dictionary([0,0,0,0,0])) # should print {0:5}
def frequency_dictionary(words): freqs = {} for word in words: if word not in freqs: freqs[word] = 0 freqs[word] += 1 return freqs print(frequency_dictionary(['apple', 'apple', 'cat', 1])) print(frequency_dictionary([0, 0, 0, 0, 0]))
a = {} a["ad ad asd"] = 4 b = 4 if (b is a["ad ad asd"]): print("jaka") else: print ("luka") print (str([[0, 0, 0], [0, 0, 0], [0, 0, 0]]))
a = {} a['ad ad asd'] = 4 b = 4 if b is a['ad ad asd']: print('jaka') else: print('luka') print(str([[0, 0, 0], [0, 0, 0], [0, 0, 0]]))
def calc_percentage_at_k(test, pred, k): # sort scores, ascending pred, test = zip(*sorted(zip(pred, test))) pred, test = list(pred), list(test) pred.reverse() test.reverse() # calculates number of values to consider n_percentage = round(len(pred) * k / 100) # check if predicted is equal to true value, and count it # set true and false positive counters tp, fp = 0, 0 for i in range(n_percentage): # true positive if test[i] == 1: tp += 1 precision_at_k = tp / n_percentage return round(precision_at_k * 100, 2)
def calc_percentage_at_k(test, pred, k): (pred, test) = zip(*sorted(zip(pred, test))) (pred, test) = (list(pred), list(test)) pred.reverse() test.reverse() n_percentage = round(len(pred) * k / 100) (tp, fp) = (0, 0) for i in range(n_percentage): if test[i] == 1: tp += 1 precision_at_k = tp / n_percentage return round(precision_at_k * 100, 2)
print("Enter elements:") arr=list(map(int,input().split())) for i in range(1, len(arr)): val=arr[i] j=i-1 while j>=0 and val<arr[j]: arr[j+1]=arr[j] j-=1 arr[j+1]=val print(arr)
print('Enter elements:') arr = list(map(int, input().split())) for i in range(1, len(arr)): val = arr[i] j = i - 1 while j >= 0 and val < arr[j]: arr[j + 1] = arr[j] j -= 1 arr[j + 1] = val print(arr)
class Solution: def maximumScore(self, nums: List[int], multipliers: List[int]) -> int: n, m = len(nums), len(multipliers) dp = [[0] * (m + 1) for _ in range(m + 1)] for i in range(m - 1, -1, -1): for left in range(i, -1, -1): mult = multipliers[i] right = n - 1 - (i - left) dp[i][left] = max(mult * nums[left] + dp[i + 1][left + 1], mult * nums[right] + dp[i + 1][left]) return dp[0][0] def maximumScore1(self, nums: List[int], mult: List[int]) -> int: @functools.lru_cache(maxsize=2000) def dp(left, i): if i >= len(mult): return 0 right = len(nums) - 1 - (i - left) return max(mult[i] * nums[left] + dp(left+1, i+1), mult[i] * nums[right] + dp(left, i+1)) return dp(0, 0)
class Solution: def maximum_score(self, nums: List[int], multipliers: List[int]) -> int: (n, m) = (len(nums), len(multipliers)) dp = [[0] * (m + 1) for _ in range(m + 1)] for i in range(m - 1, -1, -1): for left in range(i, -1, -1): mult = multipliers[i] right = n - 1 - (i - left) dp[i][left] = max(mult * nums[left] + dp[i + 1][left + 1], mult * nums[right] + dp[i + 1][left]) return dp[0][0] def maximum_score1(self, nums: List[int], mult: List[int]) -> int: @functools.lru_cache(maxsize=2000) def dp(left, i): if i >= len(mult): return 0 right = len(nums) - 1 - (i - left) return max(mult[i] * nums[left] + dp(left + 1, i + 1), mult[i] * nums[right] + dp(left, i + 1)) return dp(0, 0)
HOST = 'localhost' PORT = 27017 # -- HTTP-SESSION Settings -- HTTP_SESSION_TOKEN_TIMEOUT = 0 HTTP_SESSION_TOKEN_SIZE = 24 # -- Existing Commands -- COMMANDS_UNKNOWN = ['login', 'me', 'asset', 'user', 'plugin'] COMMANDS_USER = ['login', 'user', 'me', 'asset', 'logout', 'plugin', 'document', 'following', 'followers', 'follow'] COMMANDS_ADMIN = [''].append(COMMANDS_USER) # -- MACE MACE_FOLDER = 'mace/' MACE_ANNOTATIONS = 'argotario.csv' MACE_COMPETENCES = 'competence' MACE_PREDICTIONS = 'prediction' MACE_TIMEOUT = 60 * 60 * 4 MIN_VOTINGS = 4 # -- COMMUNICATION-SESSION SESSION_TIMEOUT = 86400 # --GAME-SESSION GSESSION_TICKER = 4 GSESSION_TIMEOUT = 86400 # --DB-TIMEOUT DB_RETRY = 5 DB_SERVER_SELECTION_TIMEOUT = 100 # -- GENERAL SETTINGS NAME = 'Argotario Python Backend Server' WELCOME = 'Welcome!' WEBSITE = 'https://argue.ukp.informatik.tu-darmstadt.de' VERSION = '1.0-SNAPSHOT' # --EMAIL SETTINGS MAIL_FROM = 'argotario@example.com' MAIL_TO = 'text@example.com' MAIL_SMTP = 'smtp.example.com' MAIL_PASSWORD = 'random_generated_safe_password'
host = 'localhost' port = 27017 http_session_token_timeout = 0 http_session_token_size = 24 commands_unknown = ['login', 'me', 'asset', 'user', 'plugin'] commands_user = ['login', 'user', 'me', 'asset', 'logout', 'plugin', 'document', 'following', 'followers', 'follow'] commands_admin = [''].append(COMMANDS_USER) mace_folder = 'mace/' mace_annotations = 'argotario.csv' mace_competences = 'competence' mace_predictions = 'prediction' mace_timeout = 60 * 60 * 4 min_votings = 4 session_timeout = 86400 gsession_ticker = 4 gsession_timeout = 86400 db_retry = 5 db_server_selection_timeout = 100 name = 'Argotario Python Backend Server' welcome = 'Welcome!' website = 'https://argue.ukp.informatik.tu-darmstadt.de' version = '1.0-SNAPSHOT' mail_from = 'argotario@example.com' mail_to = 'text@example.com' mail_smtp = 'smtp.example.com' mail_password = 'random_generated_safe_password'
# Time: O(n) # Space: O(n) # mono stack, prefix sum, optimized from solution2 class Solution(object): def totalStrength(self, strength): """ :type strength: List[int] :rtype: int """ MOD = 10**9+7 curr = 0 prefix = [0]*(len(strength)+1) for i in xrange(len(strength)): curr = (curr+strength[i])%MOD prefix[i+1] = (prefix[i]+curr)%MOD stk, result = [-1], 0 for i in xrange(len(strength)+1): while stk[-1] != -1 and (i == len(strength) or strength[stk[-1]] >= strength[i]): x, y, z = stk[-2]+1, stk.pop(), i-1 # assert(all(strength[j] >= strength[y] for j in xrange(x, y+1))) # assert(all(strength[j] > strength[y] for j in xrange(y+1, z+1))) result = (result+(strength[y]*((y-x+1)*(prefix[z+1]-prefix[y])-(z-y+1)*(prefix[y]-prefix[max(x-1, 0)]))))%MOD stk.append(i) return result # Time: O(n) # Space: O(n) # mono stack, prefix sum class Solution2(object): def totalStrength(self, strength): """ :type strength: List[int] :rtype: int """ MOD = 10**9+7 prefix, prefix2 = [0]*(len(strength)+1), [0]*(len(strength)+1) for i in xrange(len(strength)): prefix[i+1] = (prefix[i]+strength[i])%MOD prefix2[i+1] = (prefix2[i]+strength[i]*(i+1))%MOD suffix, suffix2 = [0]*(len(strength)+1), [0]*(len(strength)+1) for i in reversed(xrange(len(strength))): suffix[i] = (suffix[i+1]+strength[i])%MOD suffix2[i] = (suffix2[i+1]+strength[i]*(len(strength)-i))%MOD stk, result = [-1], 0 for i in xrange(len(strength)+1): while stk[-1] != -1 and (i == len(strength) or strength[stk[-1]] >= strength[i]): x, y, z = stk[-2]+1, stk.pop(), i-1 # assert(all(strength[j] >= strength[y] for j in xrange(x, y+1))) # assert(all(strength[j] > strength[y] for j in xrange(y+1, z+1))) result = (result+(strength[y]*((z-y+1)*((prefix2[y+1]-prefix2[x])-x*(prefix[y+1]-prefix[x]))+ (y-x+1)*((suffix2[y+1]-suffix2[z+1])-(len(strength)-(z+1))*(suffix[y+1]-suffix[z+1])))))%MOD stk.append(i) return result
class Solution(object): def total_strength(self, strength): """ :type strength: List[int] :rtype: int """ mod = 10 ** 9 + 7 curr = 0 prefix = [0] * (len(strength) + 1) for i in xrange(len(strength)): curr = (curr + strength[i]) % MOD prefix[i + 1] = (prefix[i] + curr) % MOD (stk, result) = ([-1], 0) for i in xrange(len(strength) + 1): while stk[-1] != -1 and (i == len(strength) or strength[stk[-1]] >= strength[i]): (x, y, z) = (stk[-2] + 1, stk.pop(), i - 1) result = (result + strength[y] * ((y - x + 1) * (prefix[z + 1] - prefix[y]) - (z - y + 1) * (prefix[y] - prefix[max(x - 1, 0)]))) % MOD stk.append(i) return result class Solution2(object): def total_strength(self, strength): """ :type strength: List[int] :rtype: int """ mod = 10 ** 9 + 7 (prefix, prefix2) = ([0] * (len(strength) + 1), [0] * (len(strength) + 1)) for i in xrange(len(strength)): prefix[i + 1] = (prefix[i] + strength[i]) % MOD prefix2[i + 1] = (prefix2[i] + strength[i] * (i + 1)) % MOD (suffix, suffix2) = ([0] * (len(strength) + 1), [0] * (len(strength) + 1)) for i in reversed(xrange(len(strength))): suffix[i] = (suffix[i + 1] + strength[i]) % MOD suffix2[i] = (suffix2[i + 1] + strength[i] * (len(strength) - i)) % MOD (stk, result) = ([-1], 0) for i in xrange(len(strength) + 1): while stk[-1] != -1 and (i == len(strength) or strength[stk[-1]] >= strength[i]): (x, y, z) = (stk[-2] + 1, stk.pop(), i - 1) result = (result + strength[y] * ((z - y + 1) * (prefix2[y + 1] - prefix2[x] - x * (prefix[y + 1] - prefix[x])) + (y - x + 1) * (suffix2[y + 1] - suffix2[z + 1] - (len(strength) - (z + 1)) * (suffix[y + 1] - suffix[z + 1])))) % MOD stk.append(i) return result
# Definition for a binary tree node # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: # @param p, a tree node # @param q, a tree node # @return a boolean def isSameTree(self, p, q): if p == None or q == None: return p == q return p.val == q.val and self.isSameTree(p.left, q.left) \ and self.isSameTree(p.right, q.right)
class Solution: def is_same_tree(self, p, q): if p == None or q == None: return p == q return p.val == q.val and self.isSameTree(p.left, q.left) and self.isSameTree(p.right, q.right)
sentence = "What is the Airspeed Velocity of an Unladen Swallow?".split() count = {word:len(word) for word in sentence} print(count)
sentence = 'What is the Airspeed Velocity of an Unladen Swallow?'.split() count = {word: len(word) for word in sentence} print(count)
"""Day 2 funcs""" def interpret_instructions(instructions: str) -> list[tuple[str, int]]: """Reads instructions and returns a list of directions and numbers""" ret: list[tuple[str, int]] = [] instruction_list = instructions.split("\n") for instruction in instruction_list: instruction_tokens = instruction.split(" ") # First element in each instruction is a direction. # Convert second element in each instruction to distance. try: direction: str = instruction_tokens[0] distance: int = int(instruction_tokens[1]) ret.append((direction, distance)) except TypeError: print("Malformed Instructions") return ret def steer_submarine(instructions: list[tuple[str, int]]) -> int: """Steer the sub based on a list of instructions""" hor_axis: int = 0 depth: int = 0 for instruction in instructions: match instruction[0]: case "forward": hor_axis += instruction[1] case "up": depth -= instruction[1] case "down": depth += instruction[1] return hor_axis * depth
"""Day 2 funcs""" def interpret_instructions(instructions: str) -> list[tuple[str, int]]: """Reads instructions and returns a list of directions and numbers""" ret: list[tuple[str, int]] = [] instruction_list = instructions.split('\n') for instruction in instruction_list: instruction_tokens = instruction.split(' ') try: direction: str = instruction_tokens[0] distance: int = int(instruction_tokens[1]) ret.append((direction, distance)) except TypeError: print('Malformed Instructions') return ret def steer_submarine(instructions: list[tuple[str, int]]) -> int: """Steer the sub based on a list of instructions""" hor_axis: int = 0 depth: int = 0 for instruction in instructions: match instruction[0]: case 'forward': hor_axis += instruction[1] case 'up': depth -= instruction[1] case 'down': depth += instruction[1] return hor_axis * depth
skaitli = [1, 5, 3, 9, 7, 11, 4] skaitli2 = [5, 8, 12, 77, 44, 13] print(skaitli) print(skaitli[4]) sajauts_saraksts = ["Maris", 1, 2, 3, "Liepa", ["burkani", 12]] print(sajauts_saraksts) skaitli_kopa = skaitli + skaitli2 skaitli_kopa.sort() print(skaitli_kopa)
skaitli = [1, 5, 3, 9, 7, 11, 4] skaitli2 = [5, 8, 12, 77, 44, 13] print(skaitli) print(skaitli[4]) sajauts_saraksts = ['Maris', 1, 2, 3, 'Liepa', ['burkani', 12]] print(sajauts_saraksts) skaitli_kopa = skaitli + skaitli2 skaitli_kopa.sort() print(skaitli_kopa)
""" Helper to get relation to extractors, questions and their weights """ def weight_to_string(extractor, weight_index, question: str = None): """ naming for a weight :param extractor: :param weight_index: :return: """ if extractor == 'action': if weight_index == 0: return 'position' elif weight_index == 1: return 'frequency' elif weight_index == 2: return 'named_entity' elif extractor == 'cause': if weight_index == 0: return 'position' elif weight_index == 1: return 'clausal conjunction' elif weight_index == 2: return 'adverbial indicator' elif weight_index == 3: return 'NP-VP-NP' elif extractor == 'environment': if question.startswith('where'): if weight_index == 0: return 'position' elif weight_index == 1: return 'frequency' elif weight_index == 2: return 'entailment' elif weight_index == 3: return 'accurate' if question.startswith('when'): if weight_index == 0: return 'position' elif weight_index == 1: return 'frequency' elif weight_index == 2: return 'entailment' elif weight_index == 3: return 'distance_from_publisher_date' elif weight_index == 4: return 'accurate' elif extractor == 'method': if weight_index == 0: return 'position' elif weight_index == 1: return 'frequency' elif weight_index == 2: return 'conjunction' elif weight_index == 3: return 'adjectives_adverbs' else: return 'no_mapping' def question_to_extractor(question: str): """ extractor for a given question :param question: :return: """ if question == 'who' or question == 'what': return 'action' elif question == 'why': return 'cause' elif question == 'where' or question == 'when': return 'environment' elif question == 'how': return 'method' else: return 'no_mapping' def extractor_to_question(extractor: str): """ return questions for a extractor in a tuple :param extractor: :return: """ if extractor == 'action': return ('who', 'what') elif extractor == 'cause': return ('why',) elif extractor == 'environment': return ('where', 'when') elif extractor == 'method': return ('how',) else: return ('no_mapping',)
""" Helper to get relation to extractors, questions and their weights """ def weight_to_string(extractor, weight_index, question: str=None): """ naming for a weight :param extractor: :param weight_index: :return: """ if extractor == 'action': if weight_index == 0: return 'position' elif weight_index == 1: return 'frequency' elif weight_index == 2: return 'named_entity' elif extractor == 'cause': if weight_index == 0: return 'position' elif weight_index == 1: return 'clausal conjunction' elif weight_index == 2: return 'adverbial indicator' elif weight_index == 3: return 'NP-VP-NP' elif extractor == 'environment': if question.startswith('where'): if weight_index == 0: return 'position' elif weight_index == 1: return 'frequency' elif weight_index == 2: return 'entailment' elif weight_index == 3: return 'accurate' if question.startswith('when'): if weight_index == 0: return 'position' elif weight_index == 1: return 'frequency' elif weight_index == 2: return 'entailment' elif weight_index == 3: return 'distance_from_publisher_date' elif weight_index == 4: return 'accurate' elif extractor == 'method': if weight_index == 0: return 'position' elif weight_index == 1: return 'frequency' elif weight_index == 2: return 'conjunction' elif weight_index == 3: return 'adjectives_adverbs' else: return 'no_mapping' def question_to_extractor(question: str): """ extractor for a given question :param question: :return: """ if question == 'who' or question == 'what': return 'action' elif question == 'why': return 'cause' elif question == 'where' or question == 'when': return 'environment' elif question == 'how': return 'method' else: return 'no_mapping' def extractor_to_question(extractor: str): """ return questions for a extractor in a tuple :param extractor: :return: """ if extractor == 'action': return ('who', 'what') elif extractor == 'cause': return ('why',) elif extractor == 'environment': return ('where', 'when') elif extractor == 'method': return ('how',) else: return ('no_mapping',)
TIME_FORMAT = "%Y-%m-%d, %H:%M:%S" FILE_TRAIN_DATA_STATS = "train_data_stats.txt" FILE_EVAL_DATA_STATS = "eval_data_stats.txt" FILE_PREV_EVAL_DATA_STATS = "prev_eval_data_stats.txt" FILE_DATA_SCHEMA = "schema.txt" FILE_EVAL_RESULT = "eval_result.txt" VALIDATION_SUCCESS = "success" VALIDATION_FAIL = "fail"
time_format = '%Y-%m-%d, %H:%M:%S' file_train_data_stats = 'train_data_stats.txt' file_eval_data_stats = 'eval_data_stats.txt' file_prev_eval_data_stats = 'prev_eval_data_stats.txt' file_data_schema = 'schema.txt' file_eval_result = 'eval_result.txt' validation_success = 'success' validation_fail = 'fail'
class Color(object): def __init__(self, r : float, g : float, b : float): self.r = r self.g = g self.b = b def tuple(self): return (self.r, self.g, self.b) class Gray(Color): # intensity bet def __init__(self, intensity : float): self.r = self.g = self.b = intensity self.intensity = intensity def __repr__(self): return "colors.Gray(%s)" % (self.intensity,) Black = Gray(0) White = Gray(1)
class Color(object): def __init__(self, r: float, g: float, b: float): self.r = r self.g = g self.b = b def tuple(self): return (self.r, self.g, self.b) class Gray(Color): def __init__(self, intensity: float): self.r = self.g = self.b = intensity self.intensity = intensity def __repr__(self): return 'colors.Gray(%s)' % (self.intensity,) black = gray(0) white = gray(1)
# # PySNMP MIB module MPLS-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/MPLS-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 20:04:41 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueSizeConstraint, SingleValueConstraint, ConstraintsIntersection, ValueRangeConstraint, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "SingleValueConstraint", "ConstraintsIntersection", "ValueRangeConstraint", "ConstraintsUnion") jnxMibs, = mibBuilder.importSymbols("JUNIPER-SMI", "jnxMibs") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") MibIdentifier, TimeTicks, NotificationType, ObjectIdentity, ModuleIdentity, Bits, Integer32, MibScalar, MibTable, MibTableRow, MibTableColumn, Gauge32, Unsigned32, Counter32, iso, IpAddress, Counter64 = mibBuilder.importSymbols("SNMPv2-SMI", "MibIdentifier", "TimeTicks", "NotificationType", "ObjectIdentity", "ModuleIdentity", "Bits", "Integer32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Gauge32", "Unsigned32", "Counter32", "iso", "IpAddress", "Counter64") TextualConvention, DisplayString, TimeStamp = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString", "TimeStamp") mpls = ModuleIdentity((1, 3, 6, 1, 4, 1, 2636, 3, 2)) mpls.setRevisions(('2009-02-23 14:45',)) if mibBuilder.loadTexts: mpls.setLastUpdated('200902231445Z') if mibBuilder.loadTexts: mpls.setOrganization('Juniper Networks, Inc.') mplsInfo = MibIdentifier((1, 3, 6, 1, 4, 1, 2636, 3, 2, 1)) mplsVersion = MibScalar((1, 3, 6, 1, 4, 1, 2636, 3, 2, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsVersion.setStatus('current') mplsSignalingProto = MibScalar((1, 3, 6, 1, 4, 1, 2636, 3, 2, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("none", 1), ("other", 2), ("rsvp", 3), ("ldp", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsSignalingProto.setStatus('current') mplsConfiguredLsps = MibScalar((1, 3, 6, 1, 4, 1, 2636, 3, 2, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsConfiguredLsps.setStatus('current') mplsActiveLsps = MibScalar((1, 3, 6, 1, 4, 1, 2636, 3, 2, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsActiveLsps.setStatus('current') mplsTEInfo = MibIdentifier((1, 3, 6, 1, 4, 1, 2636, 3, 2, 2)) mplsTEDistProtocol = MibScalar((1, 3, 6, 1, 4, 1, 2636, 3, 2, 2, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("none", 1), ("isis", 2), ("ospf", 3), ("isis-ospf", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsTEDistProtocol.setStatus('current') mplsAdminGroupList = MibTable((1, 3, 6, 1, 4, 1, 2636, 3, 2, 2, 2), ) if mibBuilder.loadTexts: mplsAdminGroupList.setStatus('current') mplsAdminGroup = MibTableRow((1, 3, 6, 1, 4, 1, 2636, 3, 2, 2, 2, 1), ).setIndexNames((0, "MPLS-MIB", "mplsAdminGroupNumber")) if mibBuilder.loadTexts: mplsAdminGroup.setStatus('current') mplsAdminGroupNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 2, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 31))).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsAdminGroupNumber.setStatus('current') mplsAdminGroupName = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 2, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 16))).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsAdminGroupName.setStatus('current') mplsLspList = MibTable((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3), ) if mibBuilder.loadTexts: mplsLspList.setStatus('deprecated') mplsLspEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1), ).setIndexNames((0, "MPLS-MIB", "mplsLspName")) if mibBuilder.loadTexts: mplsLspEntry.setStatus('deprecated') mplsLspName = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(32, 32)).setFixedLength(32)).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsLspName.setStatus('deprecated') mplsLspState = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("unknown", 1), ("up", 2), ("down", 3), ("notInService", 4), ("backupActive", 5)))).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsLspState.setStatus('deprecated') mplsLspOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 3), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsLspOctets.setStatus('deprecated') mplsLspPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 4), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsLspPackets.setStatus('deprecated') mplsLspAge = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 5), TimeStamp()).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsLspAge.setStatus('deprecated') mplsLspTimeUp = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 6), TimeStamp()).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsLspTimeUp.setStatus('deprecated') mplsLspPrimaryTimeUp = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 7), TimeStamp()).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsLspPrimaryTimeUp.setStatus('deprecated') mplsLspTransitions = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsLspTransitions.setStatus('deprecated') mplsLspLastTransition = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 9), TimeStamp()).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsLspLastTransition.setStatus('deprecated') mplsLspPathChanges = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsLspPathChanges.setStatus('deprecated') mplsLspLastPathChange = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 11), TimeStamp()).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsLspLastPathChange.setStatus('deprecated') mplsLspConfiguredPaths = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 12), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsLspConfiguredPaths.setStatus('deprecated') mplsLspStandbyPaths = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 13), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsLspStandbyPaths.setStatus('deprecated') mplsLspOperationalPaths = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 14), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsLspOperationalPaths.setStatus('deprecated') mplsLspFrom = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 15), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsLspFrom.setStatus('deprecated') mplsLspTo = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 16), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsLspTo.setStatus('deprecated') mplsPathName = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 17), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 16))).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsPathName.setStatus('deprecated') mplsPathType = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 18), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("other", 1), ("primary", 2), ("standby", 3), ("secondary", 4), ("bypass", 5)))).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsPathType.setStatus('deprecated') mplsPathExplicitRoute = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 19), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 1024))).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsPathExplicitRoute.setStatus('deprecated') mplsPathRecordRoute = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 20), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 1024))).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsPathRecordRoute.setStatus('deprecated') mplsPathBandwidth = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 21), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsPathBandwidth.setStatus('deprecated') mplsPathCOS = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 22), Integer32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(0, 7), ValueRangeConstraint(255, 255), ))).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsPathCOS.setStatus('deprecated') mplsPathInclude = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 23), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsPathInclude.setStatus('deprecated') mplsPathExclude = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 24), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsPathExclude.setStatus('deprecated') mplsPathSetupPriority = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 25), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 7))).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsPathSetupPriority.setStatus('deprecated') mplsPathHoldPriority = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 26), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 7))).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsPathHoldPriority.setStatus('deprecated') mplsPathProperties = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 27), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 4, 8, 16, 32, 64))).clone(namedValues=NamedValues(("record-route", 1), ("adaptive", 2), ("cspf", 4), ("mergeable", 8), ("preemptable", 16), ("preemptive", 32), ("fast-reroute", 64)))).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsPathProperties.setStatus('deprecated') mplsLspInfoList = MibTable((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5), ) if mibBuilder.loadTexts: mplsLspInfoList.setStatus('current') mplsLspInfoEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1), ).setIndexNames((1, "MPLS-MIB", "mplsLspInfoName")) if mibBuilder.loadTexts: mplsLspInfoEntry.setStatus('current') mplsLspInfoName = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 64))).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: mplsLspInfoName.setStatus('current') mplsLspInfoState = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("unknown", 1), ("up", 2), ("down", 3), ("notInService", 4), ("backupActive", 5)))).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsLspInfoState.setStatus('current') mplsLspInfoOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 3), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsLspInfoOctets.setStatus('current') mplsLspInfoPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 4), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsLspInfoPackets.setStatus('current') mplsLspInfoAge = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 5), TimeStamp()).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsLspInfoAge.setStatus('current') mplsLspInfoTimeUp = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 6), TimeStamp()).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsLspInfoTimeUp.setStatus('current') mplsLspInfoPrimaryTimeUp = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 7), TimeStamp()).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsLspInfoPrimaryTimeUp.setStatus('current') mplsLspInfoTransitions = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsLspInfoTransitions.setStatus('current') mplsLspInfoLastTransition = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 9), TimeStamp()).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsLspInfoLastTransition.setStatus('current') mplsLspInfoPathChanges = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsLspInfoPathChanges.setStatus('current') mplsLspInfoLastPathChange = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 11), TimeStamp()).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsLspInfoLastPathChange.setStatus('current') mplsLspInfoConfiguredPaths = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 12), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsLspInfoConfiguredPaths.setStatus('current') mplsLspInfoStandbyPaths = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 13), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsLspInfoStandbyPaths.setStatus('current') mplsLspInfoOperationalPaths = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 14), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsLspInfoOperationalPaths.setStatus('current') mplsLspInfoFrom = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 15), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsLspInfoFrom.setStatus('current') mplsLspInfoTo = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 16), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsLspInfoTo.setStatus('current') mplsPathInfoName = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 17), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 16))).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsPathInfoName.setStatus('current') mplsPathInfoType = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 18), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("other", 1), ("primary", 2), ("standby", 3), ("secondary", 4), ("bypass", 5)))).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsPathInfoType.setStatus('current') mplsPathInfoExplicitRoute = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 19), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 1024))).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsPathInfoExplicitRoute.setStatus('current') mplsPathInfoRecordRoute = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 20), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 1024))).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsPathInfoRecordRoute.setStatus('current') mplsPathInfoBandwidth = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 21), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsPathInfoBandwidth.setStatus('current') mplsPathInfoCOS = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 22), Integer32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(0, 7), ValueRangeConstraint(255, 255), ))).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsPathInfoCOS.setStatus('current') mplsPathInfoInclude = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 23), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsPathInfoInclude.setStatus('current') mplsPathInfoExclude = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 24), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsPathInfoExclude.setStatus('current') mplsPathInfoSetupPriority = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 25), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 7))).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsPathInfoSetupPriority.setStatus('current') mplsPathInfoHoldPriority = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 26), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 7))).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsPathInfoHoldPriority.setStatus('current') mplsPathInfoProperties = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 27), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 4, 8, 16, 32, 64))).clone(namedValues=NamedValues(("record-route", 1), ("adaptive", 2), ("cspf", 4), ("mergeable", 8), ("preemptable", 16), ("preemptive", 32), ("fast-reroute", 64)))).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsPathInfoProperties.setStatus('current') mplsLspInfoAggrOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 28), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsLspInfoAggrOctets.setStatus('current') mplsLspInfoAggrPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 29), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsLspInfoAggrPackets.setStatus('current') mplsPathInfoRecordRouteWithLabels = MibTableColumn((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 30), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 1024))).setMaxAccess("readonly") if mibBuilder.loadTexts: mplsPathInfoRecordRouteWithLabels.setStatus('current') mplsTraps = MibIdentifier((1, 3, 6, 1, 4, 1, 2636, 3, 2, 4)) mplsLspUp = NotificationType((1, 3, 6, 1, 4, 1, 2636, 3, 2, 4, 1)).setObjects(("MPLS-MIB", "mplsLspName"), ("MPLS-MIB", "mplsPathName")) if mibBuilder.loadTexts: mplsLspUp.setStatus('deprecated') mplsLspDown = NotificationType((1, 3, 6, 1, 4, 1, 2636, 3, 2, 4, 2)).setObjects(("MPLS-MIB", "mplsLspName"), ("MPLS-MIB", "mplsPathName")) if mibBuilder.loadTexts: mplsLspDown.setStatus('deprecated') mplsLspChange = NotificationType((1, 3, 6, 1, 4, 1, 2636, 3, 2, 4, 3)).setObjects(("MPLS-MIB", "mplsLspName"), ("MPLS-MIB", "mplsPathName")) if mibBuilder.loadTexts: mplsLspChange.setStatus('deprecated') mplsLspPathDown = NotificationType((1, 3, 6, 1, 4, 1, 2636, 3, 2, 4, 4)).setObjects(("MPLS-MIB", "mplsLspName"), ("MPLS-MIB", "mplsPathName")) if mibBuilder.loadTexts: mplsLspPathDown.setStatus('deprecated') mplsLspPathUp = NotificationType((1, 3, 6, 1, 4, 1, 2636, 3, 2, 4, 5)).setObjects(("MPLS-MIB", "mplsLspName"), ("MPLS-MIB", "mplsPathName")) if mibBuilder.loadTexts: mplsLspPathUp.setStatus('deprecated') mplsLspTraps = MibIdentifier((1, 3, 6, 1, 4, 1, 2636, 3, 2, 0)) mplsLspInfoUp = NotificationType((1, 3, 6, 1, 4, 1, 2636, 3, 2, 0, 1)).setObjects(("MPLS-MIB", "mplsLspInfoName"), ("MPLS-MIB", "mplsPathInfoName")) if mibBuilder.loadTexts: mplsLspInfoUp.setStatus('current') mplsLspInfoDown = NotificationType((1, 3, 6, 1, 4, 1, 2636, 3, 2, 0, 2)).setObjects(("MPLS-MIB", "mplsLspInfoName"), ("MPLS-MIB", "mplsPathInfoName")) if mibBuilder.loadTexts: mplsLspInfoDown.setStatus('current') mplsLspInfoChange = NotificationType((1, 3, 6, 1, 4, 1, 2636, 3, 2, 0, 3)).setObjects(("MPLS-MIB", "mplsLspInfoName"), ("MPLS-MIB", "mplsPathInfoName")) if mibBuilder.loadTexts: mplsLspInfoChange.setStatus('current') mplsLspInfoPathDown = NotificationType((1, 3, 6, 1, 4, 1, 2636, 3, 2, 0, 4)).setObjects(("MPLS-MIB", "mplsLspInfoName"), ("MPLS-MIB", "mplsPathInfoName")) if mibBuilder.loadTexts: mplsLspInfoPathDown.setStatus('current') mplsLspInfoPathUp = NotificationType((1, 3, 6, 1, 4, 1, 2636, 3, 2, 0, 5)).setObjects(("MPLS-MIB", "mplsLspInfoName"), ("MPLS-MIB", "mplsPathInfoName")) if mibBuilder.loadTexts: mplsLspInfoPathUp.setStatus('current') mibBuilder.exportSymbols("MPLS-MIB", mplsLspInfoPathUp=mplsLspInfoPathUp, mplsLspAge=mplsLspAge, mplsPathInfoProperties=mplsPathInfoProperties, mplsLspTransitions=mplsLspTransitions, mplsPathExclude=mplsPathExclude, mplsPathInfoType=mplsPathInfoType, mplsLspTraps=mplsLspTraps, mplsLspOperationalPaths=mplsLspOperationalPaths, mplsLspInfoAge=mplsLspInfoAge, mplsLspTo=mplsLspTo, mplsTEDistProtocol=mplsTEDistProtocol, mplsLspInfoAggrOctets=mplsLspInfoAggrOctets, mplsPathRecordRoute=mplsPathRecordRoute, mplsLspInfoStandbyPaths=mplsLspInfoStandbyPaths, mplsLspInfoChange=mplsLspInfoChange, mplsPathType=mplsPathType, mplsPathExplicitRoute=mplsPathExplicitRoute, mplsLspDown=mplsLspDown, mplsLspInfoPackets=mplsLspInfoPackets, mplsAdminGroupList=mplsAdminGroupList, mplsAdminGroupName=mplsAdminGroupName, mplsPathInclude=mplsPathInclude, mplsLspEntry=mplsLspEntry, mplsLspInfoLastPathChange=mplsLspInfoLastPathChange, mplsPathProperties=mplsPathProperties, mplsTEInfo=mplsTEInfo, mplsLspInfoDown=mplsLspInfoDown, mplsPathName=mplsPathName, mplsLspInfoTo=mplsLspInfoTo, mplsVersion=mplsVersion, mplsPathInfoExplicitRoute=mplsPathInfoExplicitRoute, mplsPathInfoHoldPriority=mplsPathInfoHoldPriority, mplsLspState=mplsLspState, mplsPathInfoRecordRouteWithLabels=mplsPathInfoRecordRouteWithLabels, mplsLspFrom=mplsLspFrom, mplsLspInfoTransitions=mplsLspInfoTransitions, mplsPathInfoRecordRoute=mplsPathInfoRecordRoute, mplsActiveLsps=mplsActiveLsps, mplsSignalingProto=mplsSignalingProto, mplsAdminGroupNumber=mplsAdminGroupNumber, mplsPathInfoBandwidth=mplsPathInfoBandwidth, mplsPathInfoExclude=mplsPathInfoExclude, mplsConfiguredLsps=mplsConfiguredLsps, mplsLspPathDown=mplsLspPathDown, mpls=mpls, mplsLspInfoList=mplsLspInfoList, mplsLspInfoState=mplsLspInfoState, mplsLspInfoPathChanges=mplsLspInfoPathChanges, mplsLspTimeUp=mplsLspTimeUp, mplsLspInfoAggrPackets=mplsLspInfoAggrPackets, mplsLspPathUp=mplsLspPathUp, mplsPathHoldPriority=mplsPathHoldPriority, mplsAdminGroup=mplsAdminGroup, mplsPathInfoCOS=mplsPathInfoCOS, mplsPathInfoSetupPriority=mplsPathInfoSetupPriority, mplsLspPrimaryTimeUp=mplsLspPrimaryTimeUp, mplsLspUp=mplsLspUp, mplsLspInfoPrimaryTimeUp=mplsLspInfoPrimaryTimeUp, mplsLspLastTransition=mplsLspLastTransition, mplsTraps=mplsTraps, mplsLspInfoPathDown=mplsLspInfoPathDown, mplsLspOctets=mplsLspOctets, mplsLspInfoConfiguredPaths=mplsLspInfoConfiguredPaths, mplsLspStandbyPaths=mplsLspStandbyPaths, mplsLspPackets=mplsLspPackets, mplsPathBandwidth=mplsPathBandwidth, mplsLspList=mplsLspList, mplsPathSetupPriority=mplsPathSetupPriority, mplsLspInfoFrom=mplsLspInfoFrom, mplsLspLastPathChange=mplsLspLastPathChange, mplsLspInfoName=mplsLspInfoName, mplsLspPathChanges=mplsLspPathChanges, PYSNMP_MODULE_ID=mpls, mplsLspInfoTimeUp=mplsLspInfoTimeUp, mplsLspInfoLastTransition=mplsLspInfoLastTransition, mplsLspInfoUp=mplsLspInfoUp, mplsLspConfiguredPaths=mplsLspConfiguredPaths, mplsPathInfoInclude=mplsPathInfoInclude, mplsLspInfoOctets=mplsLspInfoOctets, mplsLspInfoEntry=mplsLspInfoEntry, mplsInfo=mplsInfo, mplsLspInfoOperationalPaths=mplsLspInfoOperationalPaths, mplsPathCOS=mplsPathCOS, mplsLspChange=mplsLspChange, mplsLspName=mplsLspName, mplsPathInfoName=mplsPathInfoName)
(integer, octet_string, object_identifier) = mibBuilder.importSymbols('ASN1', 'Integer', 'OctetString', 'ObjectIdentifier') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (value_size_constraint, single_value_constraint, constraints_intersection, value_range_constraint, constraints_union) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueSizeConstraint', 'SingleValueConstraint', 'ConstraintsIntersection', 'ValueRangeConstraint', 'ConstraintsUnion') (jnx_mibs,) = mibBuilder.importSymbols('JUNIPER-SMI', 'jnxMibs') (notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance') (mib_identifier, time_ticks, notification_type, object_identity, module_identity, bits, integer32, mib_scalar, mib_table, mib_table_row, mib_table_column, gauge32, unsigned32, counter32, iso, ip_address, counter64) = mibBuilder.importSymbols('SNMPv2-SMI', 'MibIdentifier', 'TimeTicks', 'NotificationType', 'ObjectIdentity', 'ModuleIdentity', 'Bits', 'Integer32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Gauge32', 'Unsigned32', 'Counter32', 'iso', 'IpAddress', 'Counter64') (textual_convention, display_string, time_stamp) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString', 'TimeStamp') mpls = module_identity((1, 3, 6, 1, 4, 1, 2636, 3, 2)) mpls.setRevisions(('2009-02-23 14:45',)) if mibBuilder.loadTexts: mpls.setLastUpdated('200902231445Z') if mibBuilder.loadTexts: mpls.setOrganization('Juniper Networks, Inc.') mpls_info = mib_identifier((1, 3, 6, 1, 4, 1, 2636, 3, 2, 1)) mpls_version = mib_scalar((1, 3, 6, 1, 4, 1, 2636, 3, 2, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsVersion.setStatus('current') mpls_signaling_proto = mib_scalar((1, 3, 6, 1, 4, 1, 2636, 3, 2, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('none', 1), ('other', 2), ('rsvp', 3), ('ldp', 4)))).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsSignalingProto.setStatus('current') mpls_configured_lsps = mib_scalar((1, 3, 6, 1, 4, 1, 2636, 3, 2, 1, 3), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsConfiguredLsps.setStatus('current') mpls_active_lsps = mib_scalar((1, 3, 6, 1, 4, 1, 2636, 3, 2, 1, 4), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsActiveLsps.setStatus('current') mpls_te_info = mib_identifier((1, 3, 6, 1, 4, 1, 2636, 3, 2, 2)) mpls_te_dist_protocol = mib_scalar((1, 3, 6, 1, 4, 1, 2636, 3, 2, 2, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('none', 1), ('isis', 2), ('ospf', 3), ('isis-ospf', 4)))).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsTEDistProtocol.setStatus('current') mpls_admin_group_list = mib_table((1, 3, 6, 1, 4, 1, 2636, 3, 2, 2, 2)) if mibBuilder.loadTexts: mplsAdminGroupList.setStatus('current') mpls_admin_group = mib_table_row((1, 3, 6, 1, 4, 1, 2636, 3, 2, 2, 2, 1)).setIndexNames((0, 'MPLS-MIB', 'mplsAdminGroupNumber')) if mibBuilder.loadTexts: mplsAdminGroup.setStatus('current') mpls_admin_group_number = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 2, 2, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 31))).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsAdminGroupNumber.setStatus('current') mpls_admin_group_name = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 2, 2, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 16))).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsAdminGroupName.setStatus('current') mpls_lsp_list = mib_table((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3)) if mibBuilder.loadTexts: mplsLspList.setStatus('deprecated') mpls_lsp_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1)).setIndexNames((0, 'MPLS-MIB', 'mplsLspName')) if mibBuilder.loadTexts: mplsLspEntry.setStatus('deprecated') mpls_lsp_name = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 1), display_string().subtype(subtypeSpec=value_size_constraint(32, 32)).setFixedLength(32)).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsLspName.setStatus('deprecated') mpls_lsp_state = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('unknown', 1), ('up', 2), ('down', 3), ('notInService', 4), ('backupActive', 5)))).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsLspState.setStatus('deprecated') mpls_lsp_octets = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 3), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsLspOctets.setStatus('deprecated') mpls_lsp_packets = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 4), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsLspPackets.setStatus('deprecated') mpls_lsp_age = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 5), time_stamp()).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsLspAge.setStatus('deprecated') mpls_lsp_time_up = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 6), time_stamp()).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsLspTimeUp.setStatus('deprecated') mpls_lsp_primary_time_up = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 7), time_stamp()).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsLspPrimaryTimeUp.setStatus('deprecated') mpls_lsp_transitions = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 8), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsLspTransitions.setStatus('deprecated') mpls_lsp_last_transition = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 9), time_stamp()).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsLspLastTransition.setStatus('deprecated') mpls_lsp_path_changes = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 10), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsLspPathChanges.setStatus('deprecated') mpls_lsp_last_path_change = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 11), time_stamp()).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsLspLastPathChange.setStatus('deprecated') mpls_lsp_configured_paths = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 12), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsLspConfiguredPaths.setStatus('deprecated') mpls_lsp_standby_paths = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 13), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsLspStandbyPaths.setStatus('deprecated') mpls_lsp_operational_paths = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 14), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsLspOperationalPaths.setStatus('deprecated') mpls_lsp_from = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 15), ip_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsLspFrom.setStatus('deprecated') mpls_lsp_to = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 16), ip_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsLspTo.setStatus('deprecated') mpls_path_name = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 17), display_string().subtype(subtypeSpec=value_size_constraint(0, 16))).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsPathName.setStatus('deprecated') mpls_path_type = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 18), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('other', 1), ('primary', 2), ('standby', 3), ('secondary', 4), ('bypass', 5)))).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsPathType.setStatus('deprecated') mpls_path_explicit_route = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 19), octet_string().subtype(subtypeSpec=value_size_constraint(0, 1024))).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsPathExplicitRoute.setStatus('deprecated') mpls_path_record_route = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 20), octet_string().subtype(subtypeSpec=value_size_constraint(0, 1024))).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsPathRecordRoute.setStatus('deprecated') mpls_path_bandwidth = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 21), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsPathBandwidth.setStatus('deprecated') mpls_path_cos = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 22), integer32().subtype(subtypeSpec=constraints_union(value_range_constraint(0, 7), value_range_constraint(255, 255)))).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsPathCOS.setStatus('deprecated') mpls_path_include = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 23), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsPathInclude.setStatus('deprecated') mpls_path_exclude = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 24), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsPathExclude.setStatus('deprecated') mpls_path_setup_priority = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 25), integer32().subtype(subtypeSpec=value_range_constraint(0, 7))).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsPathSetupPriority.setStatus('deprecated') mpls_path_hold_priority = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 26), integer32().subtype(subtypeSpec=value_range_constraint(0, 7))).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsPathHoldPriority.setStatus('deprecated') mpls_path_properties = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 3, 1, 27), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 4, 8, 16, 32, 64))).clone(namedValues=named_values(('record-route', 1), ('adaptive', 2), ('cspf', 4), ('mergeable', 8), ('preemptable', 16), ('preemptive', 32), ('fast-reroute', 64)))).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsPathProperties.setStatus('deprecated') mpls_lsp_info_list = mib_table((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5)) if mibBuilder.loadTexts: mplsLspInfoList.setStatus('current') mpls_lsp_info_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1)).setIndexNames((1, 'MPLS-MIB', 'mplsLspInfoName')) if mibBuilder.loadTexts: mplsLspInfoEntry.setStatus('current') mpls_lsp_info_name = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 1), display_string().subtype(subtypeSpec=value_size_constraint(1, 64))).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: mplsLspInfoName.setStatus('current') mpls_lsp_info_state = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('unknown', 1), ('up', 2), ('down', 3), ('notInService', 4), ('backupActive', 5)))).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsLspInfoState.setStatus('current') mpls_lsp_info_octets = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 3), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsLspInfoOctets.setStatus('current') mpls_lsp_info_packets = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 4), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsLspInfoPackets.setStatus('current') mpls_lsp_info_age = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 5), time_stamp()).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsLspInfoAge.setStatus('current') mpls_lsp_info_time_up = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 6), time_stamp()).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsLspInfoTimeUp.setStatus('current') mpls_lsp_info_primary_time_up = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 7), time_stamp()).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsLspInfoPrimaryTimeUp.setStatus('current') mpls_lsp_info_transitions = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 8), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsLspInfoTransitions.setStatus('current') mpls_lsp_info_last_transition = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 9), time_stamp()).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsLspInfoLastTransition.setStatus('current') mpls_lsp_info_path_changes = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 10), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsLspInfoPathChanges.setStatus('current') mpls_lsp_info_last_path_change = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 11), time_stamp()).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsLspInfoLastPathChange.setStatus('current') mpls_lsp_info_configured_paths = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 12), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsLspInfoConfiguredPaths.setStatus('current') mpls_lsp_info_standby_paths = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 13), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsLspInfoStandbyPaths.setStatus('current') mpls_lsp_info_operational_paths = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 14), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsLspInfoOperationalPaths.setStatus('current') mpls_lsp_info_from = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 15), ip_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsLspInfoFrom.setStatus('current') mpls_lsp_info_to = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 16), ip_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsLspInfoTo.setStatus('current') mpls_path_info_name = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 17), display_string().subtype(subtypeSpec=value_size_constraint(0, 16))).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsPathInfoName.setStatus('current') mpls_path_info_type = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 18), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('other', 1), ('primary', 2), ('standby', 3), ('secondary', 4), ('bypass', 5)))).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsPathInfoType.setStatus('current') mpls_path_info_explicit_route = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 19), octet_string().subtype(subtypeSpec=value_size_constraint(0, 1024))).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsPathInfoExplicitRoute.setStatus('current') mpls_path_info_record_route = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 20), octet_string().subtype(subtypeSpec=value_size_constraint(0, 1024))).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsPathInfoRecordRoute.setStatus('current') mpls_path_info_bandwidth = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 21), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsPathInfoBandwidth.setStatus('current') mpls_path_info_cos = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 22), integer32().subtype(subtypeSpec=constraints_union(value_range_constraint(0, 7), value_range_constraint(255, 255)))).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsPathInfoCOS.setStatus('current') mpls_path_info_include = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 23), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsPathInfoInclude.setStatus('current') mpls_path_info_exclude = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 24), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsPathInfoExclude.setStatus('current') mpls_path_info_setup_priority = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 25), integer32().subtype(subtypeSpec=value_range_constraint(0, 7))).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsPathInfoSetupPriority.setStatus('current') mpls_path_info_hold_priority = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 26), integer32().subtype(subtypeSpec=value_range_constraint(0, 7))).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsPathInfoHoldPriority.setStatus('current') mpls_path_info_properties = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 27), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 4, 8, 16, 32, 64))).clone(namedValues=named_values(('record-route', 1), ('adaptive', 2), ('cspf', 4), ('mergeable', 8), ('preemptable', 16), ('preemptive', 32), ('fast-reroute', 64)))).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsPathInfoProperties.setStatus('current') mpls_lsp_info_aggr_octets = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 28), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsLspInfoAggrOctets.setStatus('current') mpls_lsp_info_aggr_packets = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 29), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsLspInfoAggrPackets.setStatus('current') mpls_path_info_record_route_with_labels = mib_table_column((1, 3, 6, 1, 4, 1, 2636, 3, 2, 5, 1, 30), octet_string().subtype(subtypeSpec=value_size_constraint(0, 1024))).setMaxAccess('readonly') if mibBuilder.loadTexts: mplsPathInfoRecordRouteWithLabels.setStatus('current') mpls_traps = mib_identifier((1, 3, 6, 1, 4, 1, 2636, 3, 2, 4)) mpls_lsp_up = notification_type((1, 3, 6, 1, 4, 1, 2636, 3, 2, 4, 1)).setObjects(('MPLS-MIB', 'mplsLspName'), ('MPLS-MIB', 'mplsPathName')) if mibBuilder.loadTexts: mplsLspUp.setStatus('deprecated') mpls_lsp_down = notification_type((1, 3, 6, 1, 4, 1, 2636, 3, 2, 4, 2)).setObjects(('MPLS-MIB', 'mplsLspName'), ('MPLS-MIB', 'mplsPathName')) if mibBuilder.loadTexts: mplsLspDown.setStatus('deprecated') mpls_lsp_change = notification_type((1, 3, 6, 1, 4, 1, 2636, 3, 2, 4, 3)).setObjects(('MPLS-MIB', 'mplsLspName'), ('MPLS-MIB', 'mplsPathName')) if mibBuilder.loadTexts: mplsLspChange.setStatus('deprecated') mpls_lsp_path_down = notification_type((1, 3, 6, 1, 4, 1, 2636, 3, 2, 4, 4)).setObjects(('MPLS-MIB', 'mplsLspName'), ('MPLS-MIB', 'mplsPathName')) if mibBuilder.loadTexts: mplsLspPathDown.setStatus('deprecated') mpls_lsp_path_up = notification_type((1, 3, 6, 1, 4, 1, 2636, 3, 2, 4, 5)).setObjects(('MPLS-MIB', 'mplsLspName'), ('MPLS-MIB', 'mplsPathName')) if mibBuilder.loadTexts: mplsLspPathUp.setStatus('deprecated') mpls_lsp_traps = mib_identifier((1, 3, 6, 1, 4, 1, 2636, 3, 2, 0)) mpls_lsp_info_up = notification_type((1, 3, 6, 1, 4, 1, 2636, 3, 2, 0, 1)).setObjects(('MPLS-MIB', 'mplsLspInfoName'), ('MPLS-MIB', 'mplsPathInfoName')) if mibBuilder.loadTexts: mplsLspInfoUp.setStatus('current') mpls_lsp_info_down = notification_type((1, 3, 6, 1, 4, 1, 2636, 3, 2, 0, 2)).setObjects(('MPLS-MIB', 'mplsLspInfoName'), ('MPLS-MIB', 'mplsPathInfoName')) if mibBuilder.loadTexts: mplsLspInfoDown.setStatus('current') mpls_lsp_info_change = notification_type((1, 3, 6, 1, 4, 1, 2636, 3, 2, 0, 3)).setObjects(('MPLS-MIB', 'mplsLspInfoName'), ('MPLS-MIB', 'mplsPathInfoName')) if mibBuilder.loadTexts: mplsLspInfoChange.setStatus('current') mpls_lsp_info_path_down = notification_type((1, 3, 6, 1, 4, 1, 2636, 3, 2, 0, 4)).setObjects(('MPLS-MIB', 'mplsLspInfoName'), ('MPLS-MIB', 'mplsPathInfoName')) if mibBuilder.loadTexts: mplsLspInfoPathDown.setStatus('current') mpls_lsp_info_path_up = notification_type((1, 3, 6, 1, 4, 1, 2636, 3, 2, 0, 5)).setObjects(('MPLS-MIB', 'mplsLspInfoName'), ('MPLS-MIB', 'mplsPathInfoName')) if mibBuilder.loadTexts: mplsLspInfoPathUp.setStatus('current') mibBuilder.exportSymbols('MPLS-MIB', mplsLspInfoPathUp=mplsLspInfoPathUp, mplsLspAge=mplsLspAge, mplsPathInfoProperties=mplsPathInfoProperties, mplsLspTransitions=mplsLspTransitions, mplsPathExclude=mplsPathExclude, mplsPathInfoType=mplsPathInfoType, mplsLspTraps=mplsLspTraps, mplsLspOperationalPaths=mplsLspOperationalPaths, mplsLspInfoAge=mplsLspInfoAge, mplsLspTo=mplsLspTo, mplsTEDistProtocol=mplsTEDistProtocol, mplsLspInfoAggrOctets=mplsLspInfoAggrOctets, mplsPathRecordRoute=mplsPathRecordRoute, mplsLspInfoStandbyPaths=mplsLspInfoStandbyPaths, mplsLspInfoChange=mplsLspInfoChange, mplsPathType=mplsPathType, mplsPathExplicitRoute=mplsPathExplicitRoute, mplsLspDown=mplsLspDown, mplsLspInfoPackets=mplsLspInfoPackets, mplsAdminGroupList=mplsAdminGroupList, mplsAdminGroupName=mplsAdminGroupName, mplsPathInclude=mplsPathInclude, mplsLspEntry=mplsLspEntry, mplsLspInfoLastPathChange=mplsLspInfoLastPathChange, mplsPathProperties=mplsPathProperties, mplsTEInfo=mplsTEInfo, mplsLspInfoDown=mplsLspInfoDown, mplsPathName=mplsPathName, mplsLspInfoTo=mplsLspInfoTo, mplsVersion=mplsVersion, mplsPathInfoExplicitRoute=mplsPathInfoExplicitRoute, mplsPathInfoHoldPriority=mplsPathInfoHoldPriority, mplsLspState=mplsLspState, mplsPathInfoRecordRouteWithLabels=mplsPathInfoRecordRouteWithLabels, mplsLspFrom=mplsLspFrom, mplsLspInfoTransitions=mplsLspInfoTransitions, mplsPathInfoRecordRoute=mplsPathInfoRecordRoute, mplsActiveLsps=mplsActiveLsps, mplsSignalingProto=mplsSignalingProto, mplsAdminGroupNumber=mplsAdminGroupNumber, mplsPathInfoBandwidth=mplsPathInfoBandwidth, mplsPathInfoExclude=mplsPathInfoExclude, mplsConfiguredLsps=mplsConfiguredLsps, mplsLspPathDown=mplsLspPathDown, mpls=mpls, mplsLspInfoList=mplsLspInfoList, mplsLspInfoState=mplsLspInfoState, mplsLspInfoPathChanges=mplsLspInfoPathChanges, mplsLspTimeUp=mplsLspTimeUp, mplsLspInfoAggrPackets=mplsLspInfoAggrPackets, mplsLspPathUp=mplsLspPathUp, mplsPathHoldPriority=mplsPathHoldPriority, mplsAdminGroup=mplsAdminGroup, mplsPathInfoCOS=mplsPathInfoCOS, mplsPathInfoSetupPriority=mplsPathInfoSetupPriority, mplsLspPrimaryTimeUp=mplsLspPrimaryTimeUp, mplsLspUp=mplsLspUp, mplsLspInfoPrimaryTimeUp=mplsLspInfoPrimaryTimeUp, mplsLspLastTransition=mplsLspLastTransition, mplsTraps=mplsTraps, mplsLspInfoPathDown=mplsLspInfoPathDown, mplsLspOctets=mplsLspOctets, mplsLspInfoConfiguredPaths=mplsLspInfoConfiguredPaths, mplsLspStandbyPaths=mplsLspStandbyPaths, mplsLspPackets=mplsLspPackets, mplsPathBandwidth=mplsPathBandwidth, mplsLspList=mplsLspList, mplsPathSetupPriority=mplsPathSetupPriority, mplsLspInfoFrom=mplsLspInfoFrom, mplsLspLastPathChange=mplsLspLastPathChange, mplsLspInfoName=mplsLspInfoName, mplsLspPathChanges=mplsLspPathChanges, PYSNMP_MODULE_ID=mpls, mplsLspInfoTimeUp=mplsLspInfoTimeUp, mplsLspInfoLastTransition=mplsLspInfoLastTransition, mplsLspInfoUp=mplsLspInfoUp, mplsLspConfiguredPaths=mplsLspConfiguredPaths, mplsPathInfoInclude=mplsPathInfoInclude, mplsLspInfoOctets=mplsLspInfoOctets, mplsLspInfoEntry=mplsLspInfoEntry, mplsInfo=mplsInfo, mplsLspInfoOperationalPaths=mplsLspInfoOperationalPaths, mplsPathCOS=mplsPathCOS, mplsLspChange=mplsLspChange, mplsLspName=mplsLspName, mplsPathInfoName=mplsPathInfoName)
def RC(value, tolerance=5.0, power=None, package="0603",pkgcode="07"): res = {"manufacturer": "Yageo"} suffix = ['R', 'K', 'M'] digits = 3 if tolerance < 5 else 2 while value >= 1000: value = value/1000. suffix.pop(0) suffix = suffix[0] whole = str(int(value)) decimal = str(round((value-int(value)) * 10**(digits-len(whole)))) v_str = (whole+suffix+decimal).strip("0") if v_str == "R": v_str = "0R" if tolerance == 0.5: t_str = 'D' elif tolerance == 1.0: t_str = 'F' else: t_str = 'J' res["MPN"] = "RC{}{}R-{}{}L".format(package, t_str, pkgcode, v_str) return res _cc_voltages = {6300: '5', 10000: '6', 16000: '7', 25000: '8', 50000: '9'} def CC_XxR(value, tolerance=10, voltage=16, package='0603', pkgcode='R', dielectric="X7R"): res = {"manufacturer": "Yageo"} c_pf = int(value * 1e12) exp = 0 while c_pf >= 100: exp += 1 c_pf /= 10 if package > '0603' and pkgcode == 'R': pkgcode = 'K' c_str = str(int(c_pf))+str(exp) v_mv = round(voltage*1e3) v_str = _cc_voltages.get(v_mv, '9') t_str = 'K' res["MPN"] = "CC{}{}{}{}{}BB{}".format(package, t_str, pkgcode, dielectric, v_str, c_str) return res
def rc(value, tolerance=5.0, power=None, package='0603', pkgcode='07'): res = {'manufacturer': 'Yageo'} suffix = ['R', 'K', 'M'] digits = 3 if tolerance < 5 else 2 while value >= 1000: value = value / 1000.0 suffix.pop(0) suffix = suffix[0] whole = str(int(value)) decimal = str(round((value - int(value)) * 10 ** (digits - len(whole)))) v_str = (whole + suffix + decimal).strip('0') if v_str == 'R': v_str = '0R' if tolerance == 0.5: t_str = 'D' elif tolerance == 1.0: t_str = 'F' else: t_str = 'J' res['MPN'] = 'RC{}{}R-{}{}L'.format(package, t_str, pkgcode, v_str) return res _cc_voltages = {6300: '5', 10000: '6', 16000: '7', 25000: '8', 50000: '9'} def cc__xx_r(value, tolerance=10, voltage=16, package='0603', pkgcode='R', dielectric='X7R'): res = {'manufacturer': 'Yageo'} c_pf = int(value * 1000000000000.0) exp = 0 while c_pf >= 100: exp += 1 c_pf /= 10 if package > '0603' and pkgcode == 'R': pkgcode = 'K' c_str = str(int(c_pf)) + str(exp) v_mv = round(voltage * 1000.0) v_str = _cc_voltages.get(v_mv, '9') t_str = 'K' res['MPN'] = 'CC{}{}{}{}{}BB{}'.format(package, t_str, pkgcode, dielectric, v_str, c_str) return res
class Animal(object): def run(self): print('Animal is running...') def eat(self): print('Animal is eating...') class Dog(Animal): def run(self): print('Dog is running...') class Cat(Animal): def __init__(self): self.name = 'Tom' def __str__(self): return self.name def __len__(self): return 100 dog = Dog() dog.run() dog.eat() cat = Cat() cat.run() print(cat)
class Animal(object): def run(self): print('Animal is running...') def eat(self): print('Animal is eating...') class Dog(Animal): def run(self): print('Dog is running...') class Cat(Animal): def __init__(self): self.name = 'Tom' def __str__(self): return self.name def __len__(self): return 100 dog = dog() dog.run() dog.eat() cat = cat() cat.run() print(cat)
x = [15 ,12, 8, 8, 7, 7, 7, 6, 5, 3] y = [10 ,25, 17, 11, 13, 17, 20, 13, 9, 15] n = len(x) xy = [x[i] * y[i] for i in range(n)] x_square = [x[i] * x[i] for i in range(n)] avg_x = sum(x) / n avg_y = sum(y) / n avg_xy = sum(xy) / n avg_xsqr = sum(x_square) / n m = ((avg_x * avg_y) - avg_xy) / (avg_x ** 2 - avg_xsqr) c = avg_y - (m * avg_x) print(round((m * 10 + c), 2))
x = [15, 12, 8, 8, 7, 7, 7, 6, 5, 3] y = [10, 25, 17, 11, 13, 17, 20, 13, 9, 15] n = len(x) xy = [x[i] * y[i] for i in range(n)] x_square = [x[i] * x[i] for i in range(n)] avg_x = sum(x) / n avg_y = sum(y) / n avg_xy = sum(xy) / n avg_xsqr = sum(x_square) / n m = (avg_x * avg_y - avg_xy) / (avg_x ** 2 - avg_xsqr) c = avg_y - m * avg_x print(round(m * 10 + c, 2))
#MenuTitle: Activate all Bold instances # -*- coding: utf-8 -*- __doc__=""" Activate all Bold instances (and deactivates all others) Ignores instances where custom parameter "familyName" == "Master Condensed" or "Master Wide" """ thisFont = Glyphs.font Glyphs.clearLog() Glyphs.showMacroWindow() for instance in thisFont.instances: if instance.active: instance.active = False if instance.weight == "Bold": instance.active = True if instance.familyName == "Master Condensed": instance.active = False if instance.familyName == "Master Wide": instance.active = False
__doc__ = '\nActivate all Bold instances (and deactivates all others)\nIgnores instances where custom parameter "familyName" == "Master Condensed" or "Master Wide"\n' this_font = Glyphs.font Glyphs.clearLog() Glyphs.showMacroWindow() for instance in thisFont.instances: if instance.active: instance.active = False if instance.weight == 'Bold': instance.active = True if instance.familyName == 'Master Condensed': instance.active = False if instance.familyName == 'Master Wide': instance.active = False
""" Sorting the array into a wave-like array. For eg: arr[] = {1,2,3,4,5} Output: 2 1 4 3 5 """ def convertToWave(length,array): for i in range(0, length - length%2, 2): #swapping alternatively temp=array[i] array[i]=array[i+1] array[i+1]=temp return array arr = list(map(int,input("Enter the elements of the array : ").split())) N = len(arr) # length of the array arr = convertToWave(N,arr) print("Wave Array: ") for el in arr: print(el, end=" ") """ Time complexity : O(1) Space complexity : O(1) INPUT:- Enter the elements of the array : 1 2 3 4 5 6 7 OUTPUT:- Wave Array: 2 1 4 3 6 5 7 """
""" Sorting the array into a wave-like array. For eg: arr[] = {1,2,3,4,5} Output: 2 1 4 3 5 """ def convert_to_wave(length, array): for i in range(0, length - length % 2, 2): temp = array[i] array[i] = array[i + 1] array[i + 1] = temp return array arr = list(map(int, input('Enter the elements of the array : ').split())) n = len(arr) arr = convert_to_wave(N, arr) print('Wave Array: ') for el in arr: print(el, end=' ') '\nTime complexity : O(1) \nSpace complexity : O(1) \n\nINPUT:-\nEnter the elements of the array : 1 2 3 4 5 6 7\nOUTPUT:-\nWave Array: 2 1 4 3 6 5 7 \n\n'
filename_prefix = 'Rebuttal-SawyerLift-ADR' xlabel = 'Environment steps (3M)' ylabel = "Average Discounted Rewards" mopa_cutoff_step = 1000000 others_cutoff_step = 2000000 max_step = 3000000 max_y_axis_value = 110 legend = False data_key = "train_ep/rew_discounted" bc_y_value = 34.77 plot_labels = { "Ours": [ 'Rebuttal_Ours_Lift_1234_smart-river-671', 'Rebuttal_Ours_Lift_200_clean-cherry-673', 'Rebuttal_Ours_Lift_2320_clear-water-695', 'Rebuttal_Ours_Lift_500_vivid-lake-675', 'Rebuttal_Ours_Lift_1800_lilac-butterfly-676', ], "Ours (w/o BC smoothing)": [ 'Rebuttal_Ours(wo_bc_smoothing)_Lift_1234_sparkling-terrain-670', 'Rebuttal_Ours(wo_bc_smoothing)_Lift_200_toasty-pine-678', 'Rebuttal_Ours(wo_bc_smoothing)_Lift_2320_ethereal-deluge-692', 'Rebuttal_Ours(wo_bc_smoothing)_Lift_500_floral-water-679', 'Rebuttal_Ours(wo_bc_smoothing)_Lift_1800_youthful-microwave-674', ], "CoL": [ 'Rebuttal_CoL_MoPA_Lift_1234_stoic-fire-187', 'Rebuttal_CoL_MoPA_Lift_200_wandering-waterfall-188', 'Rebuttal_CoL_MoPA_Lift_2320_desert-flower-696', 'Rebuttal_CoL_MoPA_Lift_500_expert-brook-189', 'Rebuttal_CoL_MoPA_Lift_1800_usual-cloud-224', ], "CoL(w BC smoothing)": [ 'Rebuttal_CoL_Lift_1234_scarlet-yogurt-681', 'Rebuttal_CoL_Lift_200_lunar-sun-683', 'Rebuttal_CoL_Lift_2320_lyric-frog-689', 'Rebuttal_CoL_Lift_500_scarlet-eon-685', 'Rebuttal_CoL_Lift_1800_astral-night-671', ], "MoPA Asym. SAC": [ 'Rebuttal_MoPA-Asym._SAC_Lift_1234_rl.SawyerLiftObstacle-v0.08.21.07.52.Asymmetric-MoPA-SAC.0', 'Rebuttal_MoPA-Asym._SAC_Lift_200_rl.SawyerLiftObstacle-v0.08.22.01.30.Asymmetric-MoPA-SAC.0', 'Rebuttal_MoPA-Asym._SAC_Lift_2320_rl.SawyerLiftObstacle-v0.08.28.15.22.Asymmetric-MoPA-SAC.0', 'Rebuttal_MoPA-Asym._SAC_Lift_500_rl.SawyerLiftObstacle-v0.08.22.01.35.Asymmetric-MoPA-SAC.0', 'Rebuttal_MoPA-Asym._SAC_Lift_1800_rl.SawyerLiftObstacle-v0.08.30.07.28.Asymmetric-MoPA-SAC.0', ], "Asym. SAC": [ 'Rebuttal_Asym._SAC_Lift_1234_fast-bee-631', 'Rebuttal_Asym._SAC_Lift_200_swift-smoke-632', 'Rebuttal_Asym._SAC_Lift_500_visionary-dream-633', 'Rebuttal_Asym._SAC_Lift_2320_MyMachine_rural-valley-691', 'Rebuttal_Asym._SAC_Lift_1800_zany-wave-684', ], } # choosing Rebuttal_Asym._SAC_Assembly_200_comfy-violet-635 because it has 3m env. steps line_labels = { "BC-Visual": ['Rebuttal_Asym._SAC_Assembly_200_comfy-violet-635'], } line_colors = { 'Ours': 'C0', 'Ours (w/o BC smoothing)': 'C1', 'CoL': 'C2', 'CoL(w BC smoothing)': 'C3', 'MoPA Asym. SAC': 'C4', 'Asym. SAC': 'C5', 'BC-Visual': 'C6', } mopa_curve = { "Ours": 'Rebuttal_MoPA_RL_Lift_2000_rl.SawyerLiftObstacle-v0.08.27.MoPA-SAC.2000', "Ours (w/o BC smoothing)": 'Rebuttal_MoPA_RL_Lift_2000_rl.SawyerLiftObstacle-v0.08.27.MoPA-SAC.2000', "CoL": 'Rebuttal_MoPA_RL_Lift_2000_rl.SawyerLiftObstacle-v0.08.27.MoPA-SAC.2000', "CoL(w BC smoothing)": 'Rebuttal_MoPA_RL_Lift_2000_rl.SawyerLiftObstacle-v0.08.27.MoPA-SAC.2000', } # plot_labels = { # "Ours": [], # "Ours (w/o BC smoothing)": [], # "CoL": [], # "CoL(w BC smoothing)": [], # "MoPA Asym. SAC": [], # "Asym. SAC": [], # } # line_labels = { # "BC-Visual": [], # }
filename_prefix = 'Rebuttal-SawyerLift-ADR' xlabel = 'Environment steps (3M)' ylabel = 'Average Discounted Rewards' mopa_cutoff_step = 1000000 others_cutoff_step = 2000000 max_step = 3000000 max_y_axis_value = 110 legend = False data_key = 'train_ep/rew_discounted' bc_y_value = 34.77 plot_labels = {'Ours': ['Rebuttal_Ours_Lift_1234_smart-river-671', 'Rebuttal_Ours_Lift_200_clean-cherry-673', 'Rebuttal_Ours_Lift_2320_clear-water-695', 'Rebuttal_Ours_Lift_500_vivid-lake-675', 'Rebuttal_Ours_Lift_1800_lilac-butterfly-676'], 'Ours (w/o BC smoothing)': ['Rebuttal_Ours(wo_bc_smoothing)_Lift_1234_sparkling-terrain-670', 'Rebuttal_Ours(wo_bc_smoothing)_Lift_200_toasty-pine-678', 'Rebuttal_Ours(wo_bc_smoothing)_Lift_2320_ethereal-deluge-692', 'Rebuttal_Ours(wo_bc_smoothing)_Lift_500_floral-water-679', 'Rebuttal_Ours(wo_bc_smoothing)_Lift_1800_youthful-microwave-674'], 'CoL': ['Rebuttal_CoL_MoPA_Lift_1234_stoic-fire-187', 'Rebuttal_CoL_MoPA_Lift_200_wandering-waterfall-188', 'Rebuttal_CoL_MoPA_Lift_2320_desert-flower-696', 'Rebuttal_CoL_MoPA_Lift_500_expert-brook-189', 'Rebuttal_CoL_MoPA_Lift_1800_usual-cloud-224'], 'CoL(w BC smoothing)': ['Rebuttal_CoL_Lift_1234_scarlet-yogurt-681', 'Rebuttal_CoL_Lift_200_lunar-sun-683', 'Rebuttal_CoL_Lift_2320_lyric-frog-689', 'Rebuttal_CoL_Lift_500_scarlet-eon-685', 'Rebuttal_CoL_Lift_1800_astral-night-671'], 'MoPA Asym. SAC': ['Rebuttal_MoPA-Asym._SAC_Lift_1234_rl.SawyerLiftObstacle-v0.08.21.07.52.Asymmetric-MoPA-SAC.0', 'Rebuttal_MoPA-Asym._SAC_Lift_200_rl.SawyerLiftObstacle-v0.08.22.01.30.Asymmetric-MoPA-SAC.0', 'Rebuttal_MoPA-Asym._SAC_Lift_2320_rl.SawyerLiftObstacle-v0.08.28.15.22.Asymmetric-MoPA-SAC.0', 'Rebuttal_MoPA-Asym._SAC_Lift_500_rl.SawyerLiftObstacle-v0.08.22.01.35.Asymmetric-MoPA-SAC.0', 'Rebuttal_MoPA-Asym._SAC_Lift_1800_rl.SawyerLiftObstacle-v0.08.30.07.28.Asymmetric-MoPA-SAC.0'], 'Asym. SAC': ['Rebuttal_Asym._SAC_Lift_1234_fast-bee-631', 'Rebuttal_Asym._SAC_Lift_200_swift-smoke-632', 'Rebuttal_Asym._SAC_Lift_500_visionary-dream-633', 'Rebuttal_Asym._SAC_Lift_2320_MyMachine_rural-valley-691', 'Rebuttal_Asym._SAC_Lift_1800_zany-wave-684']} line_labels = {'BC-Visual': ['Rebuttal_Asym._SAC_Assembly_200_comfy-violet-635']} line_colors = {'Ours': 'C0', 'Ours (w/o BC smoothing)': 'C1', 'CoL': 'C2', 'CoL(w BC smoothing)': 'C3', 'MoPA Asym. SAC': 'C4', 'Asym. SAC': 'C5', 'BC-Visual': 'C6'} mopa_curve = {'Ours': 'Rebuttal_MoPA_RL_Lift_2000_rl.SawyerLiftObstacle-v0.08.27.MoPA-SAC.2000', 'Ours (w/o BC smoothing)': 'Rebuttal_MoPA_RL_Lift_2000_rl.SawyerLiftObstacle-v0.08.27.MoPA-SAC.2000', 'CoL': 'Rebuttal_MoPA_RL_Lift_2000_rl.SawyerLiftObstacle-v0.08.27.MoPA-SAC.2000', 'CoL(w BC smoothing)': 'Rebuttal_MoPA_RL_Lift_2000_rl.SawyerLiftObstacle-v0.08.27.MoPA-SAC.2000'}
class Credential: """ Class that generates new instances of users. """ credential_list = [] def __init__(self,credential_name,user_name,password,email): self.credential_name = credential_name self.user_name = user_name self.password = password self.email = email def save_credential(self): Credential.credential_list.append(self) def delete_credential(self): Credential.credential_list.remove(self) @classmethod def find_by_name(cls,name): for credential in cls.credential_list: if credential.credential_name == name: return credential @classmethod def credential_exist(cls,name): for credential in cls.credential_list: if credential.password == name: return credential return False @classmethod def display_credential(cls): return cls.credential_list
class Credential: """ Class that generates new instances of users. """ credential_list = [] def __init__(self, credential_name, user_name, password, email): self.credential_name = credential_name self.user_name = user_name self.password = password self.email = email def save_credential(self): Credential.credential_list.append(self) def delete_credential(self): Credential.credential_list.remove(self) @classmethod def find_by_name(cls, name): for credential in cls.credential_list: if credential.credential_name == name: return credential @classmethod def credential_exist(cls, name): for credential in cls.credential_list: if credential.password == name: return credential return False @classmethod def display_credential(cls): return cls.credential_list
def say_hello(): print('Hello') def say_goodbye(): print('Goodbye')
def say_hello(): print('Hello') def say_goodbye(): print('Goodbye')
# coding: utf-8 """***************************************************************************** * Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries. * * Subject to your compliance with these terms, you may use Microchip software * and any derivatives exclusively with Microchip products. It is your * responsibility to comply with third party license terms applicable to your * use of third party software (including open source software) that may * accompany Microchip software. * * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER * EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED * WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A * PARTICULAR PURPOSE. * * IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, * INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND * WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS * BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE * FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN * ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. *****************************************************************************""" ################################################################################ ########## EVSYS DATABASE COMPONENTS ##################### ################################################################################ global user global generator global path global channel global evsysInstanceName global InterruptVector global InterruptHandler global InterruptHandlerLock channel = 0 path = {} user = {} generator = {} generator_module = {} user_module = {} def userStatus(symbol, event): global channelUserMap global user channelNumber = int(str(symbol.getID()).split( "EVSYS_CHANNEL_")[1].split("_USER_READY")[0]) if event["id"].startswith("EVSYS_USER_"): channelAssigned = event["value"] - 1 channelUser = user.get(int(event["id"].split("EVSYS_USER_")[1])) channelUserMap[event["id"]] = channelAssigned userAvailable = False for key in channelUserMap.keys(): if channelUserMap.get(key) == channelNumber: if Database.getSymbolValue(event["namespace"], "USER_" + user.get(int(key.split("EVSYS_USER_")[1])) + "_READY") == False: userAvailable = False break else: userAvailable = True symbol.setValue(userAvailable, 2) def channelSource(symbol, event): global evsysGenerator channelNumber = int(str(symbol.getID()).split( "EVSYS_CHANNEL_")[1].split("_GENERATOR_ACTIVE")[0]) symbol.setValue(Database.getSymbolValue(event["namespace"], "GENERATOR_" + str( evsysGenerator[channelNumber].getSelectedKey()) + "_ACTIVE"), 2) def channelMenu(symbol, event): symbol.setVisible(event["value"]) def channelClockEnable(symbol, event): chID = event["id"].split('EVSYS_CHANNEL_')[1] if event["value"] == True: Database.setSymbolValue( "core", evsysInstanceName.getValue() + "_" + chID + "_CLOCK_ENABLE", True, 1) else: Database.setSymbolValue("core", evsysInstanceName.getValue( ) + "_" + chID + "_CLOCK_ENABLE", False, 1) def overrunInterrupt(interrupt, event): interrupt.setVisible(event["value"] != 2) def eventInterrupt(interrupt, event): interrupt.setVisible(event["value"] != 2) def evsysIntset(interrupt, val): global InterruptVector global InterruptHandler global InterruptHandlerLock global numsyncChannels channel = int(interrupt.getID().split("EVSYS_INTERRUPT_MODE")[1]) event = Database.getSymbolValue( val["namespace"], "EVSYS_CHANNEL_" + str(channel) + "_EVENT") overflow = Database.getSymbolValue( val["namespace"], "EVSYS_CHANNEL_" + str(channel) + "_OVERRUN") result = event or overflow interrupt.setValue(result, 2) if Database.getSymbolValue(val["namespace"], "INTERRUPT_ACTIVE") != result: Database.setSymbolValue(val["namespace"], "INTERRUPT_ACTIVE", result, 2) if channel > len(InterruptVector) - 1: Database.setSymbolValue(val["namespace"], "EVSYS_INTERRUPT_MODE_OTHER", False, 2) for id in range(len(InterruptVector) - 1 , numsyncChannels): if (Database.getSymbolValue(val["namespace"], "EVSYS_CHANNEL_" + str(id) + "_EVENT") or Database.getSymbolValue(val["namespace"], "EVSYS_CHANNEL_" + str(id) + "_OVERRUN")): Database.setSymbolValue(val["namespace"], "EVSYS_INTERRUPT_MODE_OTHER", True, 2) if channel > len(InterruptVector) - 1: channel = len(InterruptVector) - 1 Database.setSymbolValue("core", InterruptVector[channel], result, 2) Database.setSymbolValue("core", InterruptHandlerLock[channel], result, 2) if result: Database.setSymbolValue("core", InterruptHandler[channel], str( InterruptHandler[channel].split("_INTERRUPT_HANDLER")[0]) + "_InterruptHandler", 2) else: Database.setSymbolValue("core", InterruptHandler[channel], InterruptHandler[channel].split( "_INTERRUPT_HANDLER")[0] + "_Handler", 2) def updateEVSYSInterruptWarringStatus(symbol, event): if evsysInterrupt.getValue() == True: symbol.setVisible(event["value"]) def instantiateComponent(evsysComponent): global evsysInstanceName global InterruptVector InterruptVector=[] global InterruptHandler InterruptHandler=[] global InterruptHandlerLock InterruptHandlerLock=[] InterruptVectorUpdate=[] global evsysInterrupt global numsyncChannels global user global channel global channelUserMap channelUserMap={} global evsysGenerator evsysGenerator=[] channelUserDependency=[] # Get the number of channels supporting Synchronous and asynchronous path dummyNode=ATDF.getNode( '/avr-tools-device-file/modules/module@[name="EVSYS"]/register-group@[name="EVSYS"]/register@[name="INTSTATUS"]') numsyncChannels=len(dummyNode.getChildren()) - 1 evsysInstanceName=evsysComponent.createStringSymbol( "EVSYS_INSTANCE_NAME", None) evsysInstanceName.setVisible(False) evsysInstanceName.setDefaultValue(evsysComponent.getID().upper()) Log.writeInfoMessage("Running " + evsysInstanceName.getValue()) # EVSYS Main Menu evsysSym_Menu=evsysComponent.createMenuSymbol("EVSYS_MENU", None) evsysSym_Menu.setLabel("EVSYS MODULE SETTINGS ") generatorSymbol=[] generatorsNode=ATDF.getNode( "/avr-tools-device-file/devices/device/events/generators") for id in range(0, len(generatorsNode.getChildren())): generator[generatorsNode.getChildren()[id].getAttribute("name")]=int( generatorsNode.getChildren()[id].getAttribute("index")) generatorActive=evsysComponent.createBooleanSymbol( "GENERATOR_" + str(generatorsNode.getChildren()[id].getAttribute("name")) + "_ACTIVE", evsysSym_Menu) generatorActive.setVisible(False) generatorActive.setDefaultValue(False) generatorSymbol.append( "GENERATOR_" + str(generatorsNode.getChildren()[id].getAttribute("name")) + "_ACTIVE") usersNode=ATDF.getNode( "/avr-tools-device-file/devices/device/events/users") for id in range(0, len(usersNode.getChildren())): user[int(usersNode.getChildren()[id].getAttribute("index")) ]=usersNode.getChildren()[id].getAttribute("name") userReady=evsysComponent.createBooleanSymbol( "USER_" + str(usersNode.getChildren()[id].getAttribute("name")) + "_READY", evsysSym_Menu) userReady.setVisible(False) userReady.setDefaultValue(False) channelUserMap["EVSYS_USER_" + str(usersNode.getChildren()[id].getAttribute("index"))]= -1 channelUserDependency.append( "EVSYS_USER_" + str(usersNode.getChildren()[id].getAttribute("index"))) channelUserDependency.append( "USER_" + str(usersNode.getChildren()[id].getAttribute("name")) + "_READY") channelNode=ATDF.getNode( '/avr-tools-device-file/devices/device/peripherals/module@[name="EVSYS"]/instance@[name="' + evsysInstanceName.getValue() + '"]/parameters') for id in range(0, len(channelNode.getChildren())): if channelNode.getChildren()[id].getAttribute("name") == "CHANNELS": channel=int(channelNode.getChildren()[id].getAttribute("value")) break evsysChannelNum=evsysComponent.createIntegerSymbol( "EVSYS_CHANNEL_NUMBER", evsysSym_Menu) evsysChannelNum.setVisible(False) evsysChannelNum.setDefaultValue(int(channel)) evsysChannelNum.setVisible(False) evsysChannelNum=evsysComponent.createIntegerSymbol( "NUM_SYNC_CHANNELS", evsysSym_Menu) evsysChannelNum.setVisible(False) evsysChannelNum.setDefaultValue(int(numsyncChannels)) evsysUserNum=evsysComponent.createIntegerSymbol( "EVSYS_USER_NUMBER", evsysSym_Menu) evsysUserNum.setVisible(False) evsysUserNum.setDefaultValue(int(max(user.keys()))) evsysPriority=evsysComponent.createKeyValueSetSymbol( "EVSYS_CHANNEL_SCHEDULING", evsysSym_Menu) evsysPriority.setLabel("Scheduling Policy") evsysPriority.addKey( "STATIC", "0", "Static scheduling scheme for channels with level priority") evsysPriority.addKey( "ROUND-ROBIN", "1", "Round-robin scheduling scheme for channels with level priority") evsysPriority.setOutputMode("Value") for id in range(0, channel): evsysChannel=evsysComponent.createBooleanSymbol( "EVSYS_CHANNEL_" + str(id), evsysSym_Menu) evsysChannel.setLabel("Enable Channel" + str(id)) evsysChannel.setDefaultValue(False) # Dummy symbol to control clock enable evsysClockEnable=evsysComponent.createBooleanSymbol( "EVSYS_CLOCK_ENABLE_" + str(id), evsysSym_Menu) evsysClockEnable.setDefaultValue(False) evsysClockEnable.setVisible(False) evsysClockEnable.setDependencies( channelClockEnable, ["EVSYS_CHANNEL_" + str(id)]) evsysChannelMenu=evsysComponent.createMenuSymbol( "EVSYS_MENU_" + str(id), evsysChannel) evsysChannelMenu.setLabel("EVSYS Channel Configuration") evsysChannelMenu.setVisible(False) evsysChannelMenu.setDependencies( channelMenu, ["EVSYS_CHANNEL_" + str(id)]) evsysGenerator.append(id) evsysGenerator[id]=evsysComponent.createKeyValueSetSymbol( "EVSYS_CHANNEL_" + str(id) + "_GENERATOR", evsysChannelMenu) evsysGenerator[id].setLabel("Event Generator") evsysGenerator[id].setOutputMode("Value") for key in sorted(generator.keys()): evsysGenerator[id].addKey(key, str(generator.get(key)), key) evsysGeneratorActive=evsysComponent.createBooleanSymbol( "EVSYS_CHANNEL_" + str(id) + "_GENERATOR_ACTIVE", evsysChannelMenu) evsysGeneratorActive.setDefaultValue(False) evsysGeneratorActive.setVisible(True) evsysGeneratorActive.setLabel("Channel Generator source Active") generatorSymbol.append("EVSYS_CHANNEL_" + str(id) + "_GENERATOR") evsysGeneratorActive.setDependencies(channelSource, generatorSymbol) del generatorSymbol[-1] evsysPath=evsysComponent.createKeyValueSetSymbol( "EVSYS_CHANNEL_" + str(id) + "_PATH", evsysChannelMenu) evsysPath.setLabel("Path Selection") evsysPath.setOutputMode("Value") pathNode=ATDF.getNode( '/avr-tools-device-file/modules/module@[name="EVSYS"]/value-group@[name="EVSYS_CHANNEL__PATH"]') for i in range(0, len(pathNode.getChildren())): evsysPath.addKey(pathNode.getChildren()[i].getAttribute("name"), str(pathNode.getChildren()[ i].getAttribute("value")), pathNode.getChildren()[i].getAttribute("caption")) evsysPath.setDefaultValue(2) if id > numsyncChannels: evsysPath.setReadOnly(True) evsysEdge=evsysComponent.createKeyValueSetSymbol( "EVSYS_CHANNEL_" + str(id) + "_EDGE", evsysChannelMenu) evsysEdge.setLabel("Event Edge Selection") edgeNode=ATDF.getNode( '/avr-tools-device-file/modules/module@[name="EVSYS"]/value-group@[name="EVSYS_CHANNEL__EDGSEL"]') for i in range(0, len(edgeNode.getChildren())): evsysEdge.addKey(edgeNode.getChildren()[i].getAttribute("name"), str(edgeNode.getChildren()[ i].getAttribute("value")), edgeNode.getChildren()[i].getAttribute("caption")) evsysEdge.setDefaultValue(0) evsysEdge.setOutputMode("Value") evsysOnDemand=evsysComponent.createBooleanSymbol( "EVSYS_CHANNEL_" + str(id) + "_ONDEMAND", evsysChannelMenu) evsysOnDemand.setLabel("Generic Clock On Demand") evsysOnDemand.setDefaultValue(False) evsysRunStandby=evsysComponent.createBooleanSymbol( "EVSYS_CHANNEL_" + str(id) + "_RUNSTANDBY", evsysChannelMenu) evsysRunStandby.setLabel("Run In Standby Sleep Mode") evsysRunStandby.setDefaultValue(False) evsysEvent=evsysComponent.createBooleanSymbol( "EVSYS_CHANNEL_" + str(id) + "_EVENT", evsysChannelMenu) evsysEvent.setLabel("Enable Event Detection Interrupt") evsysEvent.setDefaultValue(False) evsysEvent.setVisible(False) evsysEvent.setDependencies( eventInterrupt, ["EVSYS_CHANNEL_" + str(id) + "_PATH"]) evsysOverRun=evsysComponent.createBooleanSymbol( "EVSYS_CHANNEL_" + str(id) + "_OVERRUN", evsysChannelMenu) evsysOverRun.setLabel("Enable Overrun Interrupt") evsysOverRun.setDefaultValue(False) evsysOverRun.setVisible(False) evsysOverRun.setDependencies( overrunInterrupt, ["EVSYS_CHANNEL_" + str(id) + "_PATH"]) evsysUserReady=evsysComponent.createBooleanSymbol( "EVSYS_CHANNEL_" + str(id) + "_USER_READY", evsysChannelMenu) evsysUserReady.setDefaultValue(False) evsysUserReady.setVisible(False) evsysUserReady.setLabel("Channel" + str(id) + "Users Ready") evsysUserReady.setDependencies(userStatus, channelUserDependency) if id <= numsyncChannels: evsysInterrupt=evsysComponent.createBooleanSymbol( "EVSYS_INTERRUPT_MODE" + str(id), evsysSym_Menu) evsysInterrupt.setVisible(False) evsysInterrupt.setDefaultValue(False) evsysInterrupt.setDependencies(evsysIntset, [ "EVSYS_CHANNEL_" + str(id) + "_OVERRUN", "EVSYS_CHANNEL_" + str(id) + "_EVENT"]) evsysUserMenu=evsysComponent.createMenuSymbol( "EVSYS_USER_MENU", evsysSym_Menu) evsysUserMenu.setLabel("EVSYS User SETTINGS ") for id in user.keys(): evsysUserChannel=evsysComponent.createKeyValueSetSymbol( "EVSYS_USER_" + str(id), evsysUserMenu) evsysUserChannel.setLabel(str(user.get(id)) + " Chanel Selection") evsysUserChannel.addKey("NONE", str(0), "No Channel Selected") for i in range(0, channel): evsysUserChannel.addKey( "CHANNEL_" + str(i), str(hex(i + 1)), "Use Channel" + str(id)) evsysUserChannel.setOutputMode("Value") ############################################################################ #### Dependency #### ############################################################################ vectorNode=ATDF.getNode( "/avr-tools-device-file/devices/device/interrupts") vectorValues=vectorNode.getChildren() for id in range(0, len(vectorNode.getChildren())): if vectorValues[id].getAttribute("module-instance") == "EVSYS": name=vectorValues[id].getAttribute("name") InterruptVector.append(name + "_INTERRUPT_ENABLE") InterruptHandler.append(name + "_INTERRUPT_HANDLER") InterruptHandlerLock.append(name + "_INTERRUPT_HANDLER_LOCK") InterruptVectorUpdate.append( "core." + name + "_INTERRUPT_ENABLE_UPDATE") # Interrupt Warning status evsysSym_IntEnComment=evsysComponent.createCommentSymbol( "EVSYS_INTERRUPT_ENABLE_COMMENT", None) evsysSym_IntEnComment.setVisible(False) evsysSym_IntEnComment.setLabel( "Warning!!! EVSYS Interrupt is Disabled in Interrupt Manager") evsysSym_IntEnComment.setDependencies( updateEVSYSInterruptWarringStatus, InterruptVectorUpdate) evsysInterruptMode = evsysComponent.createBooleanSymbol("INTERRUPT_ACTIVE", None) evsysInterruptMode.setDefaultValue(False) evsysInterruptMode.setVisible(False) if numsyncChannels > len(InterruptVector): evsysIntOther = evsysComponent.createBooleanSymbol( "EVSYS_INTERRUPT_MODE_OTHER", evsysSym_Menu) evsysIntOther.setVisible(False) # ################################################################################ # ########## CODE GENERATION ############################# # ################################################################################ configName=Variables.get("__CONFIGURATION_NAME") evsysSym_HeaderFile=evsysComponent.createFileSymbol("EVSYS_HEADER", None) evsysSym_HeaderFile.setSourcePath( "../peripheral/evsys_u2504/templates/plib_evsys.h.ftl") evsysSym_HeaderFile.setOutputName( "plib_" + evsysInstanceName.getValue().lower() + ".h") evsysSym_HeaderFile.setDestPath("peripheral/evsys") evsysSym_HeaderFile.setProjectPath( "config/" + configName + "/peripheral/evsys") evsysSym_HeaderFile.setType("HEADER") evsysSym_HeaderFile.setMarkup(True) evsysSym_SourceFile=evsysComponent.createFileSymbol("EVSYS_SOURCE", None) evsysSym_SourceFile.setSourcePath( "../peripheral/evsys_u2504/templates/plib_evsys.c.ftl") evsysSym_SourceFile.setOutputName( "plib_" + evsysInstanceName.getValue().lower() + ".c") evsysSym_SourceFile.setDestPath("peripheral/evsys") evsysSym_SourceFile.setProjectPath( "config/" + configName + "/peripheral/evsys") evsysSym_SourceFile.setType("SOURCE") evsysSym_SourceFile.setMarkup(True) evsysSystemInitFile=evsysComponent.createFileSymbol( "EVSYS_SYS_INIT", None) evsysSystemInitFile.setType("STRING") evsysSystemInitFile.setOutputName( "core.LIST_SYSTEM_INIT_C_SYS_INITIALIZE_PERIPHERALS") evsysSystemInitFile.setSourcePath( "../peripheral/evsys_u2504/templates/system/initialization.c.ftl") evsysSystemInitFile.setMarkup(True) evsysSystemDefFile=evsysComponent.createFileSymbol("EVSYS_SYS_DEF", None) evsysSystemDefFile.setType("STRING") evsysSystemDefFile.setOutputName("core.LIST_SYSTEM_DEFINITIONS_H_INCLUDES") evsysSystemDefFile.setSourcePath( "../peripheral/evsys_u2504/templates/system/definitions.h.ftl") evsysSystemDefFile.setMarkup(True) evsysComponent.addPlugin( "../peripheral/evsys_u2504/plugin/eventsystem.jar")
"""***************************************************************************** * Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries. * * Subject to your compliance with these terms, you may use Microchip software * and any derivatives exclusively with Microchip products. It is your * responsibility to comply with third party license terms applicable to your * use of third party software (including open source software) that may * accompany Microchip software. * * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER * EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED * WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A * PARTICULAR PURPOSE. * * IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, * INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND * WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS * BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE * FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN * ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. *****************************************************************************""" global user global generator global path global channel global evsysInstanceName global InterruptVector global InterruptHandler global InterruptHandlerLock channel = 0 path = {} user = {} generator = {} generator_module = {} user_module = {} def user_status(symbol, event): global channelUserMap global user channel_number = int(str(symbol.getID()).split('EVSYS_CHANNEL_')[1].split('_USER_READY')[0]) if event['id'].startswith('EVSYS_USER_'): channel_assigned = event['value'] - 1 channel_user = user.get(int(event['id'].split('EVSYS_USER_')[1])) channelUserMap[event['id']] = channelAssigned user_available = False for key in channelUserMap.keys(): if channelUserMap.get(key) == channelNumber: if Database.getSymbolValue(event['namespace'], 'USER_' + user.get(int(key.split('EVSYS_USER_')[1])) + '_READY') == False: user_available = False break else: user_available = True symbol.setValue(userAvailable, 2) def channel_source(symbol, event): global evsysGenerator channel_number = int(str(symbol.getID()).split('EVSYS_CHANNEL_')[1].split('_GENERATOR_ACTIVE')[0]) symbol.setValue(Database.getSymbolValue(event['namespace'], 'GENERATOR_' + str(evsysGenerator[channelNumber].getSelectedKey()) + '_ACTIVE'), 2) def channel_menu(symbol, event): symbol.setVisible(event['value']) def channel_clock_enable(symbol, event): ch_id = event['id'].split('EVSYS_CHANNEL_')[1] if event['value'] == True: Database.setSymbolValue('core', evsysInstanceName.getValue() + '_' + chID + '_CLOCK_ENABLE', True, 1) else: Database.setSymbolValue('core', evsysInstanceName.getValue() + '_' + chID + '_CLOCK_ENABLE', False, 1) def overrun_interrupt(interrupt, event): interrupt.setVisible(event['value'] != 2) def event_interrupt(interrupt, event): interrupt.setVisible(event['value'] != 2) def evsys_intset(interrupt, val): global InterruptVector global InterruptHandler global InterruptHandlerLock global numsyncChannels channel = int(interrupt.getID().split('EVSYS_INTERRUPT_MODE')[1]) event = Database.getSymbolValue(val['namespace'], 'EVSYS_CHANNEL_' + str(channel) + '_EVENT') overflow = Database.getSymbolValue(val['namespace'], 'EVSYS_CHANNEL_' + str(channel) + '_OVERRUN') result = event or overflow interrupt.setValue(result, 2) if Database.getSymbolValue(val['namespace'], 'INTERRUPT_ACTIVE') != result: Database.setSymbolValue(val['namespace'], 'INTERRUPT_ACTIVE', result, 2) if channel > len(InterruptVector) - 1: Database.setSymbolValue(val['namespace'], 'EVSYS_INTERRUPT_MODE_OTHER', False, 2) for id in range(len(InterruptVector) - 1, numsyncChannels): if Database.getSymbolValue(val['namespace'], 'EVSYS_CHANNEL_' + str(id) + '_EVENT') or Database.getSymbolValue(val['namespace'], 'EVSYS_CHANNEL_' + str(id) + '_OVERRUN'): Database.setSymbolValue(val['namespace'], 'EVSYS_INTERRUPT_MODE_OTHER', True, 2) if channel > len(InterruptVector) - 1: channel = len(InterruptVector) - 1 Database.setSymbolValue('core', InterruptVector[channel], result, 2) Database.setSymbolValue('core', InterruptHandlerLock[channel], result, 2) if result: Database.setSymbolValue('core', InterruptHandler[channel], str(InterruptHandler[channel].split('_INTERRUPT_HANDLER')[0]) + '_InterruptHandler', 2) else: Database.setSymbolValue('core', InterruptHandler[channel], InterruptHandler[channel].split('_INTERRUPT_HANDLER')[0] + '_Handler', 2) def update_evsys_interrupt_warring_status(symbol, event): if evsysInterrupt.getValue() == True: symbol.setVisible(event['value']) def instantiate_component(evsysComponent): global evsysInstanceName global InterruptVector interrupt_vector = [] global InterruptHandler interrupt_handler = [] global InterruptHandlerLock interrupt_handler_lock = [] interrupt_vector_update = [] global evsysInterrupt global numsyncChannels global user global channel global channelUserMap channel_user_map = {} global evsysGenerator evsys_generator = [] channel_user_dependency = [] dummy_node = ATDF.getNode('/avr-tools-device-file/modules/module@[name="EVSYS"]/register-group@[name="EVSYS"]/register@[name="INTSTATUS"]') numsync_channels = len(dummyNode.getChildren()) - 1 evsys_instance_name = evsysComponent.createStringSymbol('EVSYS_INSTANCE_NAME', None) evsysInstanceName.setVisible(False) evsysInstanceName.setDefaultValue(evsysComponent.getID().upper()) Log.writeInfoMessage('Running ' + evsysInstanceName.getValue()) evsys_sym__menu = evsysComponent.createMenuSymbol('EVSYS_MENU', None) evsysSym_Menu.setLabel('EVSYS MODULE SETTINGS ') generator_symbol = [] generators_node = ATDF.getNode('/avr-tools-device-file/devices/device/events/generators') for id in range(0, len(generatorsNode.getChildren())): generator[generatorsNode.getChildren()[id].getAttribute('name')] = int(generatorsNode.getChildren()[id].getAttribute('index')) generator_active = evsysComponent.createBooleanSymbol('GENERATOR_' + str(generatorsNode.getChildren()[id].getAttribute('name')) + '_ACTIVE', evsysSym_Menu) generatorActive.setVisible(False) generatorActive.setDefaultValue(False) generatorSymbol.append('GENERATOR_' + str(generatorsNode.getChildren()[id].getAttribute('name')) + '_ACTIVE') users_node = ATDF.getNode('/avr-tools-device-file/devices/device/events/users') for id in range(0, len(usersNode.getChildren())): user[int(usersNode.getChildren()[id].getAttribute('index'))] = usersNode.getChildren()[id].getAttribute('name') user_ready = evsysComponent.createBooleanSymbol('USER_' + str(usersNode.getChildren()[id].getAttribute('name')) + '_READY', evsysSym_Menu) userReady.setVisible(False) userReady.setDefaultValue(False) channelUserMap['EVSYS_USER_' + str(usersNode.getChildren()[id].getAttribute('index'))] = -1 channelUserDependency.append('EVSYS_USER_' + str(usersNode.getChildren()[id].getAttribute('index'))) channelUserDependency.append('USER_' + str(usersNode.getChildren()[id].getAttribute('name')) + '_READY') channel_node = ATDF.getNode('/avr-tools-device-file/devices/device/peripherals/module@[name="EVSYS"]/instance@[name="' + evsysInstanceName.getValue() + '"]/parameters') for id in range(0, len(channelNode.getChildren())): if channelNode.getChildren()[id].getAttribute('name') == 'CHANNELS': channel = int(channelNode.getChildren()[id].getAttribute('value')) break evsys_channel_num = evsysComponent.createIntegerSymbol('EVSYS_CHANNEL_NUMBER', evsysSym_Menu) evsysChannelNum.setVisible(False) evsysChannelNum.setDefaultValue(int(channel)) evsysChannelNum.setVisible(False) evsys_channel_num = evsysComponent.createIntegerSymbol('NUM_SYNC_CHANNELS', evsysSym_Menu) evsysChannelNum.setVisible(False) evsysChannelNum.setDefaultValue(int(numsyncChannels)) evsys_user_num = evsysComponent.createIntegerSymbol('EVSYS_USER_NUMBER', evsysSym_Menu) evsysUserNum.setVisible(False) evsysUserNum.setDefaultValue(int(max(user.keys()))) evsys_priority = evsysComponent.createKeyValueSetSymbol('EVSYS_CHANNEL_SCHEDULING', evsysSym_Menu) evsysPriority.setLabel('Scheduling Policy') evsysPriority.addKey('STATIC', '0', 'Static scheduling scheme for channels with level priority') evsysPriority.addKey('ROUND-ROBIN', '1', 'Round-robin scheduling scheme for channels with level priority') evsysPriority.setOutputMode('Value') for id in range(0, channel): evsys_channel = evsysComponent.createBooleanSymbol('EVSYS_CHANNEL_' + str(id), evsysSym_Menu) evsysChannel.setLabel('Enable Channel' + str(id)) evsysChannel.setDefaultValue(False) evsys_clock_enable = evsysComponent.createBooleanSymbol('EVSYS_CLOCK_ENABLE_' + str(id), evsysSym_Menu) evsysClockEnable.setDefaultValue(False) evsysClockEnable.setVisible(False) evsysClockEnable.setDependencies(channelClockEnable, ['EVSYS_CHANNEL_' + str(id)]) evsys_channel_menu = evsysComponent.createMenuSymbol('EVSYS_MENU_' + str(id), evsysChannel) evsysChannelMenu.setLabel('EVSYS Channel Configuration') evsysChannelMenu.setVisible(False) evsysChannelMenu.setDependencies(channelMenu, ['EVSYS_CHANNEL_' + str(id)]) evsysGenerator.append(id) evsysGenerator[id] = evsysComponent.createKeyValueSetSymbol('EVSYS_CHANNEL_' + str(id) + '_GENERATOR', evsysChannelMenu) evsysGenerator[id].setLabel('Event Generator') evsysGenerator[id].setOutputMode('Value') for key in sorted(generator.keys()): evsysGenerator[id].addKey(key, str(generator.get(key)), key) evsys_generator_active = evsysComponent.createBooleanSymbol('EVSYS_CHANNEL_' + str(id) + '_GENERATOR_ACTIVE', evsysChannelMenu) evsysGeneratorActive.setDefaultValue(False) evsysGeneratorActive.setVisible(True) evsysGeneratorActive.setLabel('Channel Generator source Active') generatorSymbol.append('EVSYS_CHANNEL_' + str(id) + '_GENERATOR') evsysGeneratorActive.setDependencies(channelSource, generatorSymbol) del generatorSymbol[-1] evsys_path = evsysComponent.createKeyValueSetSymbol('EVSYS_CHANNEL_' + str(id) + '_PATH', evsysChannelMenu) evsysPath.setLabel('Path Selection') evsysPath.setOutputMode('Value') path_node = ATDF.getNode('/avr-tools-device-file/modules/module@[name="EVSYS"]/value-group@[name="EVSYS_CHANNEL__PATH"]') for i in range(0, len(pathNode.getChildren())): evsysPath.addKey(pathNode.getChildren()[i].getAttribute('name'), str(pathNode.getChildren()[i].getAttribute('value')), pathNode.getChildren()[i].getAttribute('caption')) evsysPath.setDefaultValue(2) if id > numsyncChannels: evsysPath.setReadOnly(True) evsys_edge = evsysComponent.createKeyValueSetSymbol('EVSYS_CHANNEL_' + str(id) + '_EDGE', evsysChannelMenu) evsysEdge.setLabel('Event Edge Selection') edge_node = ATDF.getNode('/avr-tools-device-file/modules/module@[name="EVSYS"]/value-group@[name="EVSYS_CHANNEL__EDGSEL"]') for i in range(0, len(edgeNode.getChildren())): evsysEdge.addKey(edgeNode.getChildren()[i].getAttribute('name'), str(edgeNode.getChildren()[i].getAttribute('value')), edgeNode.getChildren()[i].getAttribute('caption')) evsysEdge.setDefaultValue(0) evsysEdge.setOutputMode('Value') evsys_on_demand = evsysComponent.createBooleanSymbol('EVSYS_CHANNEL_' + str(id) + '_ONDEMAND', evsysChannelMenu) evsysOnDemand.setLabel('Generic Clock On Demand') evsysOnDemand.setDefaultValue(False) evsys_run_standby = evsysComponent.createBooleanSymbol('EVSYS_CHANNEL_' + str(id) + '_RUNSTANDBY', evsysChannelMenu) evsysRunStandby.setLabel('Run In Standby Sleep Mode') evsysRunStandby.setDefaultValue(False) evsys_event = evsysComponent.createBooleanSymbol('EVSYS_CHANNEL_' + str(id) + '_EVENT', evsysChannelMenu) evsysEvent.setLabel('Enable Event Detection Interrupt') evsysEvent.setDefaultValue(False) evsysEvent.setVisible(False) evsysEvent.setDependencies(eventInterrupt, ['EVSYS_CHANNEL_' + str(id) + '_PATH']) evsys_over_run = evsysComponent.createBooleanSymbol('EVSYS_CHANNEL_' + str(id) + '_OVERRUN', evsysChannelMenu) evsysOverRun.setLabel('Enable Overrun Interrupt') evsysOverRun.setDefaultValue(False) evsysOverRun.setVisible(False) evsysOverRun.setDependencies(overrunInterrupt, ['EVSYS_CHANNEL_' + str(id) + '_PATH']) evsys_user_ready = evsysComponent.createBooleanSymbol('EVSYS_CHANNEL_' + str(id) + '_USER_READY', evsysChannelMenu) evsysUserReady.setDefaultValue(False) evsysUserReady.setVisible(False) evsysUserReady.setLabel('Channel' + str(id) + 'Users Ready') evsysUserReady.setDependencies(userStatus, channelUserDependency) if id <= numsyncChannels: evsys_interrupt = evsysComponent.createBooleanSymbol('EVSYS_INTERRUPT_MODE' + str(id), evsysSym_Menu) evsysInterrupt.setVisible(False) evsysInterrupt.setDefaultValue(False) evsysInterrupt.setDependencies(evsysIntset, ['EVSYS_CHANNEL_' + str(id) + '_OVERRUN', 'EVSYS_CHANNEL_' + str(id) + '_EVENT']) evsys_user_menu = evsysComponent.createMenuSymbol('EVSYS_USER_MENU', evsysSym_Menu) evsysUserMenu.setLabel('EVSYS User SETTINGS ') for id in user.keys(): evsys_user_channel = evsysComponent.createKeyValueSetSymbol('EVSYS_USER_' + str(id), evsysUserMenu) evsysUserChannel.setLabel(str(user.get(id)) + ' Chanel Selection') evsysUserChannel.addKey('NONE', str(0), 'No Channel Selected') for i in range(0, channel): evsysUserChannel.addKey('CHANNEL_' + str(i), str(hex(i + 1)), 'Use Channel' + str(id)) evsysUserChannel.setOutputMode('Value') vector_node = ATDF.getNode('/avr-tools-device-file/devices/device/interrupts') vector_values = vectorNode.getChildren() for id in range(0, len(vectorNode.getChildren())): if vectorValues[id].getAttribute('module-instance') == 'EVSYS': name = vectorValues[id].getAttribute('name') InterruptVector.append(name + '_INTERRUPT_ENABLE') InterruptHandler.append(name + '_INTERRUPT_HANDLER') InterruptHandlerLock.append(name + '_INTERRUPT_HANDLER_LOCK') InterruptVectorUpdate.append('core.' + name + '_INTERRUPT_ENABLE_UPDATE') evsys_sym__int_en_comment = evsysComponent.createCommentSymbol('EVSYS_INTERRUPT_ENABLE_COMMENT', None) evsysSym_IntEnComment.setVisible(False) evsysSym_IntEnComment.setLabel('Warning!!! EVSYS Interrupt is Disabled in Interrupt Manager') evsysSym_IntEnComment.setDependencies(updateEVSYSInterruptWarringStatus, InterruptVectorUpdate) evsys_interrupt_mode = evsysComponent.createBooleanSymbol('INTERRUPT_ACTIVE', None) evsysInterruptMode.setDefaultValue(False) evsysInterruptMode.setVisible(False) if numsyncChannels > len(InterruptVector): evsys_int_other = evsysComponent.createBooleanSymbol('EVSYS_INTERRUPT_MODE_OTHER', evsysSym_Menu) evsysIntOther.setVisible(False) config_name = Variables.get('__CONFIGURATION_NAME') evsys_sym__header_file = evsysComponent.createFileSymbol('EVSYS_HEADER', None) evsysSym_HeaderFile.setSourcePath('../peripheral/evsys_u2504/templates/plib_evsys.h.ftl') evsysSym_HeaderFile.setOutputName('plib_' + evsysInstanceName.getValue().lower() + '.h') evsysSym_HeaderFile.setDestPath('peripheral/evsys') evsysSym_HeaderFile.setProjectPath('config/' + configName + '/peripheral/evsys') evsysSym_HeaderFile.setType('HEADER') evsysSym_HeaderFile.setMarkup(True) evsys_sym__source_file = evsysComponent.createFileSymbol('EVSYS_SOURCE', None) evsysSym_SourceFile.setSourcePath('../peripheral/evsys_u2504/templates/plib_evsys.c.ftl') evsysSym_SourceFile.setOutputName('plib_' + evsysInstanceName.getValue().lower() + '.c') evsysSym_SourceFile.setDestPath('peripheral/evsys') evsysSym_SourceFile.setProjectPath('config/' + configName + '/peripheral/evsys') evsysSym_SourceFile.setType('SOURCE') evsysSym_SourceFile.setMarkup(True) evsys_system_init_file = evsysComponent.createFileSymbol('EVSYS_SYS_INIT', None) evsysSystemInitFile.setType('STRING') evsysSystemInitFile.setOutputName('core.LIST_SYSTEM_INIT_C_SYS_INITIALIZE_PERIPHERALS') evsysSystemInitFile.setSourcePath('../peripheral/evsys_u2504/templates/system/initialization.c.ftl') evsysSystemInitFile.setMarkup(True) evsys_system_def_file = evsysComponent.createFileSymbol('EVSYS_SYS_DEF', None) evsysSystemDefFile.setType('STRING') evsysSystemDefFile.setOutputName('core.LIST_SYSTEM_DEFINITIONS_H_INCLUDES') evsysSystemDefFile.setSourcePath('../peripheral/evsys_u2504/templates/system/definitions.h.ftl') evsysSystemDefFile.setMarkup(True) evsysComponent.addPlugin('../peripheral/evsys_u2504/plugin/eventsystem.jar')
_base_ = "./ss_v1_dibr_mlBCE_FreezeBN_woCenter_refinePM10_ape.py" OUTPUT_DIR = "output/self6dpp/ssLM/ss_v1_dibr_mlBCE_FreezeBN_woCenter_refinePM10/glue" DATASETS = dict( TRAIN=("lm_real_glue_train",), TRAIN2=("lm_pbr_glue_train",), TRAIN2_RATIO=0.0, TEST=("lm_real_glue_test",) ) MODEL = dict( WEIGHTS="output/gdrn/lm_pbr/resnest50d_a6_AugCosyAAEGray_BG05_mlBCE_lm_pbr_100e/glue_Rsym/model_final_wo_optim-324d8f16.pth" )
_base_ = './ss_v1_dibr_mlBCE_FreezeBN_woCenter_refinePM10_ape.py' output_dir = 'output/self6dpp/ssLM/ss_v1_dibr_mlBCE_FreezeBN_woCenter_refinePM10/glue' datasets = dict(TRAIN=('lm_real_glue_train',), TRAIN2=('lm_pbr_glue_train',), TRAIN2_RATIO=0.0, TEST=('lm_real_glue_test',)) model = dict(WEIGHTS='output/gdrn/lm_pbr/resnest50d_a6_AugCosyAAEGray_BG05_mlBCE_lm_pbr_100e/glue_Rsym/model_final_wo_optim-324d8f16.pth')
class DefaultConfigurations: @staticmethod def get(): return {}
class Defaultconfigurations: @staticmethod def get(): return {}
freeze('../../../../../../Micropython-Library-Development/lib/', 'uasyncio/asyn.py') freeze('../../../../../../Micropython-Library-Development/lib/', 'uasyncio/core.py') freeze('../../../../../../Micropython-Library-Development/lib/', 'uasyncio/__init__.py') freeze('../../../../../../Micropython-Library-Development/lib/', 'uasyncio/queues.py') freeze('../../../../../../Micropython-Library-Development/lib/', 'uasyncio/synchro.py') freeze('../../../../../../Micropython-Library-Development/lib/', 'unittest.py') freeze('../../../../../../Micropython-Library-Development/lib/', 'upysh.py')
freeze('../../../../../../Micropython-Library-Development/lib/', 'uasyncio/asyn.py') freeze('../../../../../../Micropython-Library-Development/lib/', 'uasyncio/core.py') freeze('../../../../../../Micropython-Library-Development/lib/', 'uasyncio/__init__.py') freeze('../../../../../../Micropython-Library-Development/lib/', 'uasyncio/queues.py') freeze('../../../../../../Micropython-Library-Development/lib/', 'uasyncio/synchro.py') freeze('../../../../../../Micropython-Library-Development/lib/', 'unittest.py') freeze('../../../../../../Micropython-Library-Development/lib/', 'upysh.py')
name = "Bob" greeting = "Hello, Bob" print(greeting) name = "Rolf" print(greeting) greeting = f"Hello, {name}" print(greeting) # -- name = "Anne" print( greeting ) # This still prints "Hello, Rolf" because `greeting` was calculated earlier. print( f"Hello, {name}" ) # This is correct, since it uses `name` at the current point in time. # -- Using .format() -- # We can define template strings and then replace parts of it with another value, instead of doing it directly in the string. greeting = "Hello, {}" with_name = greeting.format("Rolf") print(with_name) longer_phrase = "Hello, {}. Today is {}." formatted = longer_phrase.format("Rolf", "Monday") print(formatted)
name = 'Bob' greeting = 'Hello, Bob' print(greeting) name = 'Rolf' print(greeting) greeting = f'Hello, {name}' print(greeting) name = 'Anne' print(greeting) print(f'Hello, {name}') greeting = 'Hello, {}' with_name = greeting.format('Rolf') print(with_name) longer_phrase = 'Hello, {}. Today is {}.' formatted = longer_phrase.format('Rolf', 'Monday') print(formatted)
""" Brian Kerninghan - Count the number of set bits in an integer Time Complexity - O(log n) Key idea: n & (n-1) """ def count(n): count = 0 while (n != 0): n = n & (n-1) count += 1 return count #n = int(raw_input("Enter any interger \n")) #print brian_kerninghan(n)
""" Brian Kerninghan - Count the number of set bits in an integer Time Complexity - O(log n) Key idea: n & (n-1) """ def count(n): count = 0 while n != 0: n = n & n - 1 count += 1 return count
class Player: def __init__(self, player_id: int, nickname: str, websocket, is_vip: bool = False): self.player_id = player_id self.nickname = nickname self.is_vip = is_vip self.websocket = websocket def __repr__(self): return 'Player({}, {})'.format(self.player_id, self.nickname)
class Player: def __init__(self, player_id: int, nickname: str, websocket, is_vip: bool=False): self.player_id = player_id self.nickname = nickname self.is_vip = is_vip self.websocket = websocket def __repr__(self): return 'Player({}, {})'.format(self.player_id, self.nickname)
Word = "Hello" Letters = [] for w in Word: print(w) if w == "e": print("Funny") Letters.append(w) print(Letters) Numbers = [1,2,3,4,5] for l in Numbers: print(l) Numbers1 = [] # for num in range(10): for num in range(-1, 13, 3): Numbers.append(num) print(num) # While loops counter = 1 while (counter <= 10): print(counter) counter += 1 # Break loop Participants = ["Jen", "Alex", "Tina", "Joe", "Ben"] position = 1 for name in Participants: if name == "Tina": print("About to break") break print("About to increment") position = position + 1 print(position) # Continue loop for number in range(10): if number % 3 == 0: print(number) continue print("Not")
word = 'Hello' letters = [] for w in Word: print(w) if w == 'e': print('Funny') Letters.append(w) print(Letters) numbers = [1, 2, 3, 4, 5] for l in Numbers: print(l) numbers1 = [] for num in range(-1, 13, 3): Numbers.append(num) print(num) counter = 1 while counter <= 10: print(counter) counter += 1 participants = ['Jen', 'Alex', 'Tina', 'Joe', 'Ben'] position = 1 for name in Participants: if name == 'Tina': print('About to break') break print('About to increment') position = position + 1 print(position) for number in range(10): if number % 3 == 0: print(number) continue print('Not')
def ROTRIGHT(i: int, bits: int) -> int: return i >> bits | i << 32 - bits # Two Extreme Bits (8 bits) def TEB(i: int) -> int: return ((i & 0x80) >> 6) | (i & 1) # Two Extreme Bits Reversed (8 bits) def TEBR(i: int) -> int: return (i & 0xFF) >> 7 | (i & 1) << 1 # Middles Extreme Bits (32 bits) def MEB(i: int) -> int: return TEB(i >> 24) << 6 | TEB(i >> 16) << 4 | TEB(i >> 8) << 2 | TEB(i) lookup_reversed_bytes = [ 0x00, 0x10, 0x20, 0x30, 0x40, 0x50, 0x60, 0x70, 0x80, 0x90, 0xA0, 0xB0, 0xC0, 0xD0, 0xE0, 0xF0, 0x01, 0x11, 0x21, 0x31, 0x41, 0x51, 0x61, 0x71, 0x81, 0x91, 0xA1, 0xB1, 0xC1, 0xD1, 0xE1, 0xF1, 0x02, 0x12, 0x22, 0x32, 0x42, 0x52, 0x62, 0x72, 0x82, 0x92, 0xA2, 0xB2, 0xC2, 0xD2, 0xE2, 0xF2, 0x03, 0x13, 0x23, 0x33, 0x43, 0x53, 0x63, 0x73, 0x83, 0x93, 0xA3, 0xB3, 0xC3, 0xD3, 0xE3, 0xF3, 0x04, 0x14, 0x24, 0x34, 0x44, 0x54, 0x64, 0x74, 0x84, 0x94, 0xA4, 0xB4, 0xC4, 0xD4, 0xE4, 0xF4, 0x05, 0x15, 0x25, 0x35, 0x45, 0x55, 0x65, 0x75, 0x85, 0x95, 0xA5, 0xB5, 0xC5, 0xD5, 0xE5, 0xF5, 0x06, 0x16, 0x26, 0x36, 0x46, 0x56, 0x66, 0x76, 0x86, 0x96, 0xA6, 0xB6, 0xC6, 0xD6, 0xE6, 0xF6, 0x07, 0x17, 0x27, 0x37, 0x47, 0x57, 0x67, 0x77, 0x87, 0x97, 0xA7, 0xB7, 0xC7, 0xD7, 0xE7, 0xF7, 0x08, 0x18, 0x28, 0x38, 0x48, 0x58, 0x68, 0x78, 0x88, 0x98, 0xA8, 0xB8, 0xC8, 0xD8, 0xE8, 0xF8, 0x09, 0x19, 0x29, 0x39, 0x49, 0x59, 0x69, 0x79, 0x89, 0x99, 0xA9, 0xB9, 0xC9, 0xD9, 0xE9, 0xF9, 0x0A, 0x1A, 0x2A, 0x3A, 0x4A, 0x5A, 0x6A, 0x7A, 0x8A, 0x9A, 0xAA, 0xBA, 0xCA, 0xDA, 0xEA, 0xFA, 0x0B, 0x1B, 0x2B, 0x3B, 0x4B, 0x5B, 0x6B, 0x7B, 0x8B, 0x9B, 0xAB, 0xBB, 0xCB, 0xDB, 0xEB, 0xFB, 0x0C, 0x1C, 0x2C, 0x3C, 0x4C, 0x5C, 0x6C, 0x7C, 0x8C, 0x9C, 0xAC, 0xBC, 0xCC, 0xDC, 0xEC, 0xFC, 0x0D, 0x1D, 0x2D, 0x3D, 0x4D, 0x5D, 0x6D, 0x7D, 0x8D, 0x9D, 0xAD, 0xBD, 0xCD, 0xDD, 0xED, 0xFD, 0x0E, 0x1E, 0x2E, 0x3E, 0x4E, 0x5E, 0x6E, 0x7E, 0x8E, 0x9E, 0xAE, 0xBE, 0xCE, 0xDE, 0xEE, 0xFE, 0x0F, 0x1F, 0x2F, 0x3F, 0x4F, 0x5F, 0x6F, 0x7F, 0x8F, 0x9F, 0xAF, 0xBF, 0xCF, 0xDF, 0xEF, 0xFF, ] def kkv_hash(data: bytes) -> int: length = len(data) if length == 0 or (length == 1 and data[0] == 0): return 0 hash, i = length, 0 hash ^= data[i] << 24 while i < length: hash = (hash << 3) & 0xFFFFFFFF hash ^= hash >> 2 hash |= 0x80000000 hash += lookup_reversed_bytes[data[i]] hash &= 0xFFFFFFFF hash ^= ROTRIGHT(hash, 17) hash += ROTRIGHT(hash ^ MEB(hash), TEBR(data[i])) hash &= 0xFFFFFFFF hash >>= 1 i += 1 hash ^= (MEB(hash) << 23) & 0xFFFFFFFF | (MEB(hash) << 7) & 0xFFFFFFFF return hash
def rotright(i: int, bits: int) -> int: return i >> bits | i << 32 - bits def teb(i: int) -> int: return (i & 128) >> 6 | i & 1 def tebr(i: int) -> int: return (i & 255) >> 7 | (i & 1) << 1 def meb(i: int) -> int: return teb(i >> 24) << 6 | teb(i >> 16) << 4 | teb(i >> 8) << 2 | teb(i) lookup_reversed_bytes = [0, 16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240, 1, 17, 33, 49, 65, 81, 97, 113, 129, 145, 161, 177, 193, 209, 225, 241, 2, 18, 34, 50, 66, 82, 98, 114, 130, 146, 162, 178, 194, 210, 226, 242, 3, 19, 35, 51, 67, 83, 99, 115, 131, 147, 163, 179, 195, 211, 227, 243, 4, 20, 36, 52, 68, 84, 100, 116, 132, 148, 164, 180, 196, 212, 228, 244, 5, 21, 37, 53, 69, 85, 101, 117, 133, 149, 165, 181, 197, 213, 229, 245, 6, 22, 38, 54, 70, 86, 102, 118, 134, 150, 166, 182, 198, 214, 230, 246, 7, 23, 39, 55, 71, 87, 103, 119, 135, 151, 167, 183, 199, 215, 231, 247, 8, 24, 40, 56, 72, 88, 104, 120, 136, 152, 168, 184, 200, 216, 232, 248, 9, 25, 41, 57, 73, 89, 105, 121, 137, 153, 169, 185, 201, 217, 233, 249, 10, 26, 42, 58, 74, 90, 106, 122, 138, 154, 170, 186, 202, 218, 234, 250, 11, 27, 43, 59, 75, 91, 107, 123, 139, 155, 171, 187, 203, 219, 235, 251, 12, 28, 44, 60, 76, 92, 108, 124, 140, 156, 172, 188, 204, 220, 236, 252, 13, 29, 45, 61, 77, 93, 109, 125, 141, 157, 173, 189, 205, 221, 237, 253, 14, 30, 46, 62, 78, 94, 110, 126, 142, 158, 174, 190, 206, 222, 238, 254, 15, 31, 47, 63, 79, 95, 111, 127, 143, 159, 175, 191, 207, 223, 239, 255] def kkv_hash(data: bytes) -> int: length = len(data) if length == 0 or (length == 1 and data[0] == 0): return 0 (hash, i) = (length, 0) hash ^= data[i] << 24 while i < length: hash = hash << 3 & 4294967295 hash ^= hash >> 2 hash |= 2147483648 hash += lookup_reversed_bytes[data[i]] hash &= 4294967295 hash ^= rotright(hash, 17) hash += rotright(hash ^ meb(hash), tebr(data[i])) hash &= 4294967295 hash >>= 1 i += 1 hash ^= meb(hash) << 23 & 4294967295 | meb(hash) << 7 & 4294967295 return hash
game = [[0, 0, 0, ' '], [0, 0, 0, ' '], [0, 0, 0, ' '], [0, 0, 0, ' '], [0, 0, 0, ' ']] frame_counter = 0 # Ask score for frames for frame in game: if frame_counter < 4: shot_number = 0 for shot in range(2): game[frame_counter][shot_number] = int(input(f'Score for frame {frame_counter + 1}, shot {shot_number + 1}: ')) shot_number += 1 frame_counter += 1 if 0 > game[frame_counter][0] + game[frame_counter][0] > 10: raise ValueError('values are too large or too small') else: for shot in range(game[frame_counter].count(0) - 1): game[4][shot] = int(input(f'Score for frame 10, shot {shot + 1}: ')) if 0 > game[4][shot] > 10: raise ValueError('Value is too large or too small') if game[4][0] == 10 and game[4][1] == 10: game[4] = ([10, 10, 20, 'X', 'X'], [0, 0, ' ']) game[4][1][0] = int(input('Score for frame 10, shot 3: ')) game[4][1][1] = game[4][1][0] elif game[4][0] == 10: game[4] = ([10, 10, 'X'], [game[4][1], 0, 0, ' ']) game[4][1][1] = int(input('Score for frame 10, shot 3: ')) elif game[4][0] + game[4][1] == 10: game[4] = ([game[4][0], game[4][1], 10, '/'], [0, 0, ' ']) game[4][1][0] = int(input('Score for frame 10, shot 3: ')) game[4][1][1] = game[4][1][0] frame_counter = 1 print(game) game.reverse() # Count and organize scores for frame in game[1:]: if frame[0] == 10 and frame[1] == 0: game[frame_counter][2] = 10 + game[frame_counter - 1][0] if game[frame_counter - 1][0] == 10 and frame_counter != 1: game[frame_counter][2] += game[frame_counter - 2][0] else: game[frame_counter][2] += game[frame_counter - 1][1] game[frame_counter][3] = 'X' elif frame[0] + frame[1] == 10: game[frame_counter][2] = 10 + game[frame_counter - 1][0] game[frame_counter][3] = '/' elif 0 < frame[0] + frame[1] < 10: game[frame_counter][2] = frame[0] + frame[1] game[frame_counter][3] = f'{frame[0] + frame[1]}' elif frame[0] + frame[1] == 0: game[frame_counter][2] = 0 game[frame_counter][3] = '0' print(f'frame {4 - frame_counter} finished') print(game) frame_counter += 1 game.reverse() print(game)
game = [[0, 0, 0, ' '], [0, 0, 0, ' '], [0, 0, 0, ' '], [0, 0, 0, ' '], [0, 0, 0, ' ']] frame_counter = 0 for frame in game: if frame_counter < 4: shot_number = 0 for shot in range(2): game[frame_counter][shot_number] = int(input(f'Score for frame {frame_counter + 1}, shot {shot_number + 1}: ')) shot_number += 1 frame_counter += 1 if 0 > game[frame_counter][0] + game[frame_counter][0] > 10: raise value_error('values are too large or too small') else: for shot in range(game[frame_counter].count(0) - 1): game[4][shot] = int(input(f'Score for frame 10, shot {shot + 1}: ')) if 0 > game[4][shot] > 10: raise value_error('Value is too large or too small') if game[4][0] == 10 and game[4][1] == 10: game[4] = ([10, 10, 20, 'X', 'X'], [0, 0, ' ']) game[4][1][0] = int(input('Score for frame 10, shot 3: ')) game[4][1][1] = game[4][1][0] elif game[4][0] == 10: game[4] = ([10, 10, 'X'], [game[4][1], 0, 0, ' ']) game[4][1][1] = int(input('Score for frame 10, shot 3: ')) elif game[4][0] + game[4][1] == 10: game[4] = ([game[4][0], game[4][1], 10, '/'], [0, 0, ' ']) game[4][1][0] = int(input('Score for frame 10, shot 3: ')) game[4][1][1] = game[4][1][0] frame_counter = 1 print(game) game.reverse() for frame in game[1:]: if frame[0] == 10 and frame[1] == 0: game[frame_counter][2] = 10 + game[frame_counter - 1][0] if game[frame_counter - 1][0] == 10 and frame_counter != 1: game[frame_counter][2] += game[frame_counter - 2][0] else: game[frame_counter][2] += game[frame_counter - 1][1] game[frame_counter][3] = 'X' elif frame[0] + frame[1] == 10: game[frame_counter][2] = 10 + game[frame_counter - 1][0] game[frame_counter][3] = '/' elif 0 < frame[0] + frame[1] < 10: game[frame_counter][2] = frame[0] + frame[1] game[frame_counter][3] = f'{frame[0] + frame[1]}' elif frame[0] + frame[1] == 0: game[frame_counter][2] = 0 game[frame_counter][3] = '0' print(f'frame {4 - frame_counter} finished') print(game) frame_counter += 1 game.reverse() print(game)
# Prime Numbers, Sieve of Eratosthenes def prime_list(min_num, max_num): sieve = [True] * (max_num + 1) # Sieve of Eratosthenes m = int(max_num ** 0.5) # sqrt(n) for i in range(2, m + 1): if sieve[i] == True: for j in range(i+i, max_num+1, i): sieve[j] = False sieve[1] = False return [i for i in range(min_num, max_num+1) if sieve[i] == True] M, N = map(int, input().split(" ")) primes = prime_list(M, N) for prime in primes: print(prime)
def prime_list(min_num, max_num): sieve = [True] * (max_num + 1) m = int(max_num ** 0.5) for i in range(2, m + 1): if sieve[i] == True: for j in range(i + i, max_num + 1, i): sieve[j] = False sieve[1] = False return [i for i in range(min_num, max_num + 1) if sieve[i] == True] (m, n) = map(int, input().split(' ')) primes = prime_list(M, N) for prime in primes: print(prime)
class Status(object): """This encapsulates the Twitter reply to a tweet.""" def __init__(self, status): """This initializes the object storing metadata.""" self._status = status @property def id(self): return self._status.id @property def username(self): """This formats the username.""" return '@{}'.format(self._status.user.screen_name) @property def link(self): """This formats the URL to the link for the tweet.""" return 'https://twitter.com/{0.user.screen_name}/status/{0.id}'.format( self._status, ) @property def text(self): return self._status.text @property def time(self): """This provides access to creation time.""" return self._status.created_at def __repr__(self): """This returns a representation of the status object.""" return '{0.time} {0.id} {0.username} {0.text}'.format(self)
class Status(object): """This encapsulates the Twitter reply to a tweet.""" def __init__(self, status): """This initializes the object storing metadata.""" self._status = status @property def id(self): return self._status.id @property def username(self): """This formats the username.""" return '@{}'.format(self._status.user.screen_name) @property def link(self): """This formats the URL to the link for the tweet.""" return 'https://twitter.com/{0.user.screen_name}/status/{0.id}'.format(self._status) @property def text(self): return self._status.text @property def time(self): """This provides access to creation time.""" return self._status.created_at def __repr__(self): """This returns a representation of the status object.""" return '{0.time} {0.id} {0.username} {0.text}'.format(self)
letters = ['o', 's', 'h', 'a', 'd', 'a'] print(letters.index('h')) print(letters.index('d')) print(max(letters)) print(min(letters)) print(letters.count('a')) print(letters.remove('h')) #after remove r from the list print(letters) #reverse the whole list print(letters.reverse()) print(letters)
letters = ['o', 's', 'h', 'a', 'd', 'a'] print(letters.index('h')) print(letters.index('d')) print(max(letters)) print(min(letters)) print(letters.count('a')) print(letters.remove('h')) print(letters) print(letters.reverse()) print(letters)
def isPalindromeLinkedList(self, head: ListNode) -> bool: arr = [] while head: arr.append(head.val) head = head.next return arr == arr[::-1]
def is_palindrome_linked_list(self, head: ListNode) -> bool: arr = [] while head: arr.append(head.val) head = head.next return arr == arr[::-1]
#!/usr/bin/env python3 # https://codeforces.com/problemset/problem/1020/A def f(l): dist = lambda a,b:a-b if a>b else b-a global a,b ta,fa,tb,fb = l ht = dist(ta,tb) if (fa>=a and fa<=b) or (fb>=a and fb<=b) or ht==0: return ht + dist(fa,fb) return ht + min(dist(fa,a)+dist(fb,a),dist(fa,b)+dist(fb,b)) n,h,a,b,k = list(map(int,input().split())) [print(f(list(map(int,input().split())))) for _ in range(k)]
def f(l): dist = lambda a, b: a - b if a > b else b - a global a, b (ta, fa, tb, fb) = l ht = dist(ta, tb) if fa >= a and fa <= b or (fb >= a and fb <= b) or ht == 0: return ht + dist(fa, fb) return ht + min(dist(fa, a) + dist(fb, a), dist(fa, b) + dist(fb, b)) (n, h, a, b, k) = list(map(int, input().split())) [print(f(list(map(int, input().split())))) for _ in range(k)]
#!/usr/bin/env python data = [ [ 7, [ 3.50016331673, 7.37909364700, 8.02381229401, 8.01285839081, 9.77704334259, 9.15692901611, 8.73682498932, 7.93067312241 ], ], [ 4.202, [ 2.06499981880, 2.08285713196, 2.18571448326, 2.19214320183, 2.19214320183, 2.19357180595, 2.19500041008, 2.19714307785 ], ], [ 9.8592, [ 3.56500029564, 3.61142873764, 3.63214302063, 3.63357162476, 3.63428616524, 3.63428616524, 3.63428616524, 3.63428568840, 3.63285756111 ] ] ] # setup path = [] text = [] dx, dy = 48, -24 nx, ny = 8, 12 # axes X = dx * nx Y = dy * ny U = dx V = dy * 2 M = nx N = ny // 2 path += [ '<path fill="none" stroke="currentColor" stroke-width="1" d="', 'M0 0h%sv%sh%sz' % (X, Y, -X), 'M0 0' + ('m%s -4v4' % U * (M - 1)), 'M0 0' + ('m4 %sh-4' % V * (N - 1)), 'M0 %s' % Y + ('m%s 4v-4' % U * (M - 1)), 'M%s 0' % X + ('m-4 %sh4' % V * (N - 1)), '" />' ] # data marker = 'square' for tflops, tt in data: x = 0 d = 'M0 %.1f' % (dy * tt[0]) for t in tt[1:]: x += dx y = dy * t d += ' %.0f %.1f' % (x, y) a = '<text x="%s" y="%s">%.0fTFlops</text>' % (x, y + 24, tflops) text.append(a) path.append( '<path fill="none" stroke="currentColor" stroke-width="3"' ' marker-start="url(#%s)"' % marker + ' marker-mid="url(#%s)"' % marker + ' marker-end="url(#%s)"' % marker + ' d="%s" />' % d ) marker = 'circle' # axes text for i in range(0, N + 1, 2): y = V * i + 6 t = 2 * i a = '<text x="-8" y="%s" text-anchor="end">%s</text>' % (y, t) text.append(a) for i in range(0, nx + 1): x = dx * i if i > 4: t = '%sk' % (4 ** (i - 5)) else: t = 4 ** i a = '<text x="%s" y="20">%s</text>' % (x, t) text.append(a) # labels for x, y, u, v, t in [ (4, 12, 0, -12, 'Runtime/step (s)'), (4, 9.8, 0, -12, 'TACC Ranger (8M elem/core)'), (4, 3.6, 0, -16, 'ALCF Intrepid (1M elem/core)'), (4, 2.2, 0, 24, 'ALCF Vesta (1M elem/core)'), (4, 0, 0, 40, 'Cores'), ]: x = x * dx + u y = y * dy + v s = '<text x="%.0f" y="%.0f">' % (x, y) + t + '</text>' text.append(s) # SVG output x = 64 + X y = 80 - Y out = [ '<svg width="%s" height="auto"' % x + ' viewBox="%s %s %s %s"' % (-32, Y - 32, x, y) + ' fill="#fff" stroke="#fff"' ' xmlns="http://www.w3.org/2000/svg">', '<defs>', '<marker id="circle"' ' refX="4" refY="4" markerWidth="8" markerHeight="8">', '<circle stroke="currentColor" stroke-width="1" r="1" cx="4" cy="4"/>', '</marker>', '<marker id="square"' ' refX="4" refY="4" markerWidth="8" markerHeight="8">', '<path stroke="currentColor" stroke-width="1" d="M3 3h2v2h-2z" />', '</marker>', '</defs>' ] + path + [ '<g fill="none" stroke-width="8" font-size="16" text-anchor="middle"' ' font-family="-apple-system, sans-serif">' ] + text + [ '</g>', '<g fill="currentColor" stroke="none" font-size="16" text-anchor="middle"' ' font-family="-apple-system, sans-serif">' ] + text + [ '</g>', '</svg>' ] out = '\n'.join(out) + '\n' out = out.encode('utf-8') open('SORD-Benchmark.svg', 'w').write(out)
data = [[7, [3.50016331673, 7.379093647, 8.02381229401, 8.01285839081, 9.77704334259, 9.15692901611, 8.73682498932, 7.93067312241]], [4.202, [2.0649998188, 2.08285713196, 2.18571448326, 2.19214320183, 2.19214320183, 2.19357180595, 2.19500041008, 2.19714307785]], [9.8592, [3.56500029564, 3.61142873764, 3.63214302063, 3.63357162476, 3.63428616524, 3.63428616524, 3.63428616524, 3.6342856884, 3.63285756111]]] path = [] text = [] (dx, dy) = (48, -24) (nx, ny) = (8, 12) x = dx * nx y = dy * ny u = dx v = dy * 2 m = nx n = ny // 2 path += ['<path fill="none" stroke="currentColor" stroke-width="1" d="', 'M0 0h%sv%sh%sz' % (X, Y, -X), 'M0 0' + 'm%s -4v4' % U * (M - 1), 'M0 0' + 'm4 %sh-4' % V * (N - 1), 'M0 %s' % Y + 'm%s 4v-4' % U * (M - 1), 'M%s 0' % X + 'm-4 %sh4' % V * (N - 1), '" />'] marker = 'square' for (tflops, tt) in data: x = 0 d = 'M0 %.1f' % (dy * tt[0]) for t in tt[1:]: x += dx y = dy * t d += ' %.0f %.1f' % (x, y) a = '<text x="%s" y="%s">%.0fTFlops</text>' % (x, y + 24, tflops) text.append(a) path.append('<path fill="none" stroke="currentColor" stroke-width="3" marker-start="url(#%s)"' % marker + ' marker-mid="url(#%s)"' % marker + ' marker-end="url(#%s)"' % marker + ' d="%s" />' % d) marker = 'circle' for i in range(0, N + 1, 2): y = V * i + 6 t = 2 * i a = '<text x="-8" y="%s" text-anchor="end">%s</text>' % (y, t) text.append(a) for i in range(0, nx + 1): x = dx * i if i > 4: t = '%sk' % 4 ** (i - 5) else: t = 4 ** i a = '<text x="%s" y="20">%s</text>' % (x, t) text.append(a) for (x, y, u, v, t) in [(4, 12, 0, -12, 'Runtime/step (s)'), (4, 9.8, 0, -12, 'TACC Ranger (8M elem/core)'), (4, 3.6, 0, -16, 'ALCF Intrepid (1M elem/core)'), (4, 2.2, 0, 24, 'ALCF Vesta (1M elem/core)'), (4, 0, 0, 40, 'Cores')]: x = x * dx + u y = y * dy + v s = '<text x="%.0f" y="%.0f">' % (x, y) + t + '</text>' text.append(s) x = 64 + X y = 80 - Y out = ['<svg width="%s" height="auto"' % x + ' viewBox="%s %s %s %s"' % (-32, Y - 32, x, y) + ' fill="#fff" stroke="#fff" xmlns="http://www.w3.org/2000/svg">', '<defs>', '<marker id="circle" refX="4" refY="4" markerWidth="8" markerHeight="8">', '<circle stroke="currentColor" stroke-width="1" r="1" cx="4" cy="4"/>', '</marker>', '<marker id="square" refX="4" refY="4" markerWidth="8" markerHeight="8">', '<path stroke="currentColor" stroke-width="1" d="M3 3h2v2h-2z" />', '</marker>', '</defs>'] + path + ['<g fill="none" stroke-width="8" font-size="16" text-anchor="middle" font-family="-apple-system, sans-serif">'] + text + ['</g>', '<g fill="currentColor" stroke="none" font-size="16" text-anchor="middle" font-family="-apple-system, sans-serif">'] + text + ['</g>', '</svg>'] out = '\n'.join(out) + '\n' out = out.encode('utf-8') open('SORD-Benchmark.svg', 'w').write(out)
def solution(string, markers): output = [] for line in string.split("\n"): containsCommentIndicator = "" for c in line: if c in markers: containsCommentIndicator = c break if containsCommentIndicator != "": line = line[:line.find(containsCommentIndicator)] line = line.rstrip(" ") output.append(line) return '\n'.join(output) print(solution("apples, pears # and bananas\ngrapes\nbananas !apples", ["#", "!"]))
def solution(string, markers): output = [] for line in string.split('\n'): contains_comment_indicator = '' for c in line: if c in markers: contains_comment_indicator = c break if containsCommentIndicator != '': line = line[:line.find(containsCommentIndicator)] line = line.rstrip(' ') output.append(line) return '\n'.join(output) print(solution('apples, pears # and bananas\ngrapes\nbananas !apples', ['#', '!']))
__author__ = 'The dashQC_fmri developers' __copyright__ = 'Copyright 2018, The SIMEXP lab' __credits__ = [ 'Jonathan Armoza', 'Pierre Bellec', 'Yassine Benhajali', 'Sebastian Urchs' ] __license__ = 'MIT' __maintainer__ = 'Sebastian Urchs' __email__ = 'sebastian.urchs@mail.mcgill.com' __status__ = 'Prototype' __url__ = 'https://github.com/SIMEXP/bids_qcdash' __packagename__ = 'dashQC_fmri' # TODO update description __description__ = ("dashQC_fmri is an interactive quality control dashboard that facilitates " "the manual rating of resting state fMRI focused preprocessing.") # TODO long description __longdesc__ = """\ Coming soon. """ SETUP_REQUIRES = [ 'setuptools>=18.0', ] REQUIRES = [ 'numpy', 'pandas', 'nibabel', 'pillow', 'matplotlib', 'nilearn', 'scipy', 'scikit-learn' ] LINKS_REQUIRES = [ ] TESTS_REQUIRES = [ ] CLASSIFIERS = [ 'Development Status :: 3 - Alpha', 'Intended Audience :: Science/Research', 'Topic :: Scientific/Engineering :: Image Analysis', 'License :: MIT License', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', ]
__author__ = 'The dashQC_fmri developers' __copyright__ = 'Copyright 2018, The SIMEXP lab' __credits__ = ['Jonathan Armoza', 'Pierre Bellec', 'Yassine Benhajali', 'Sebastian Urchs'] __license__ = 'MIT' __maintainer__ = 'Sebastian Urchs' __email__ = 'sebastian.urchs@mail.mcgill.com' __status__ = 'Prototype' __url__ = 'https://github.com/SIMEXP/bids_qcdash' __packagename__ = 'dashQC_fmri' __description__ = 'dashQC_fmri is an interactive quality control dashboard that facilitates the manual rating of resting state fMRI focused preprocessing.' __longdesc__ = 'Coming soon.\n' setup_requires = ['setuptools>=18.0'] requires = ['numpy', 'pandas', 'nibabel', 'pillow', 'matplotlib', 'nilearn', 'scipy', 'scikit-learn'] links_requires = [] tests_requires = [] classifiers = ['Development Status :: 3 - Alpha', 'Intended Audience :: Science/Research', 'Topic :: Scientific/Engineering :: Image Analysis', 'License :: MIT License', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8']
__title__ = 'fipeapi' __description__ = 'Python Extra Oficial API for REST Request to consult Vehicles Prices.' __url__ = 'https://github.com/deibsoncarvalho/tabela-fipe-api' __version__ = '0.1.0' __author__ = 'Deibson Carvalho' __author_email__ = 'eu@deibsoncarvalho.com' __license__ = 'Apache 2.0' __copyright__ = 'Copyright 2020 Deibson Carvalho'
__title__ = 'fipeapi' __description__ = 'Python Extra Oficial API for REST Request to consult Vehicles Prices.' __url__ = 'https://github.com/deibsoncarvalho/tabela-fipe-api' __version__ = '0.1.0' __author__ = 'Deibson Carvalho' __author_email__ = 'eu@deibsoncarvalho.com' __license__ = 'Apache 2.0' __copyright__ = 'Copyright 2020 Deibson Carvalho'
def _update_Spr(Gp, Gr, Rpr, Spr_shape, I, B, t): # F Reconstruction F = np.zeros(Spr_shape) F += np.linalg.multi_dot((Gp.T, Rpr[0], Gr)) Gk = Gp * I[:, t][:, np.newaxis] Ik = np.reshape(I[:, t], (len(I[:, t]), 1)) bk = np.reshape(B[t, :], (1, len(B[t, :]))) F += 2*np.linalg.multi_dot((Gk.T, Ik, bk)) # # C construction # C = np.zeros(Spr_shape) # Gks = [] # bks = [] # for l in range(len(Rpr)): # C += np.linalg.multi_dot((Gp.T, Rpr[l], Gr)) # for tk in range(I.shape[1]): # Gk = Gp * I[:, tk][:, np.newaxis] # Gks.append(Gk) # Ik = np.reshape(I[:, tk], (len(I[:, tk]), 1)) # bk = np.reshape(B[tk, :], (1, len(B[tk, :]))) # bks.append(bk) # C += 2*np.linalg.multi_dot((Gk.T, Ik, bk)) # print(C.shape) # A construction A = Gp.T.dot(Gp) C = Gk.T.dot(Gk) # for tk in range(I.shape[1]): # A.append(2*Gks[tk].T.dot(Gks[tk])) #print(A) # B construction B = Gr.T.dot(Gr) D = bk.T.dot(bk) pinv_C = np.linalg.pinv(C) pinv_B = np.linalg.pinv(B) A_new = pinv_C.dot(A) B_new = D.dot(pinv_B) C_new = pinv_C.dot(F.dot(pinv_B)) return solve_sylvester(A_new, B_new, C_new) # for tk in range(I.shape[1]): # B.append(bks[tk].T.dot(bks[tk])) #print(B) # print("sto cominciando gd") # S = np.zeros(Spr_shape) # mu = 1e-7 # for i in range(100): # S_old = S # print("siamo all'iterzione ", i) # # print(_M(A=A, B=B, X=S)) # #print(C) # grad = (_M(A=A, B=B, X=S) - C) # S = S + mu * (grad) # #print(S) # if np.linalg.norm(S-S_old) < 1e-3: # break # print(S) # print("numero di iterazioni fatte %d, valore a convergenza %4f" %(i, np.linalg.norm(S-S_old))) # # gss = GeneralizedSylvesterSolver(max_iter=500, verbose=0) # gss.fit(A, B, C) #return S def _update_B(Gp, Spr, I): B = np.zeros((I.shape[1], Spr[0].shape[1])) for t in range(I.shape[1]): y = np.reshape(I[:, t], (len(I[:, t]), 1)) X = Gp.dot(Spr[0]) * y ls = LinearRegression() ls.fit(X, y) B[t, :] = ls.coef_ return B def _iterative_gradient_solver(A, B, C, tol=1e-3, max_iter=500, verbose=0, random_state=0): return None # # Xs = [random_state.randn(C.shape[0], C.shape[1])] # iterates_error = [] # objective_error = [] # mu = (1/2*np.sum([np.linalg.norm(Aj)*np.linalg.norm(Bj) # for Aj, Bj in zip(A, B)]))-1e-5 # for _iter in range(max_iter): # AXB = _M(A=A, B=B, X=Xs[-1].copy()) # gradients = [] # for i in range(len(A)): # gradients.append(np.linalg.multi_dot((A[i].T, C - AXB, B[i].T))) # if(np.any(np.isnan(np.array(gradients)))): # print("bbbbbbbbbbbbbbbbbbbbbbbbbbbbb") # break # X = np.sum(np.array([Xs[-1] + mu*grad # for grad in gradients]), axis=0)/len(A) # if(np.any(np.isnan(X))): # print("aaaaaaaaaaaaaaaaaaaaaaaaaacle") # break # Xs.append(X) # iterates_error.append(np.linalg.norm(Xs[-2] - Xs[-1])) # objective_error.append(np.linalg.norm(C - _M(A, B, Xs[-1]))) # # if objective_error[-1] < tol: # print("iteration %d" % _iter) # break # else: # print("The algorithm did not converge") # return X # # def _iterative_gradient_smaller_solver(A, B, F, tol=1e-3, max_iter=200, verbose=0, random_state=0): return None # # Xs = [np.zeros(C.shape)] # iterates_error = [] # objective_error = [] # print(2*np.sum([np.linalg.norm(Aj)*np.linalg.norm(Bj) # for Aj, Bj in zip(A, B)])) # mu = (1/(2*np.sum([np.linalg.norm(Aj)*np.linalg.norm(Bj) # for Aj, Bj in zip(A, B)])))-1e-7 # print(mu) # a = A[0] # c = A[1] # b = B[0] # d = B[1] # for _iter in range(max_iter): # grad = F - a.dot(Xs[-1]).dot(b) - c.dot(Xs[-1]).dot(d) # print(grad) # X_1 = Xs[-1] + mu * a.T.dot(grad).dot(b.T) # X_2 = Xs[-1] + mu * c.T.dot(grad).dot(d.T) # Xs.append(np.array((X_1 + X_2)/2)) # # print(Xs[-2]) # # print(Xs[-1]) # diff = Xs[-2] - Xs[-1] # # print(1e-4 < 1e-3) # # print(np.linalg.norm(diff)) # # print(tol) # iterates_error.append(np.linalg.norm(diff)/F.shape[0]) # #print(iterates_error[-1]) # # objective_error.append(np.linalg.norm(F - _M(A=A, B=B, X=Xs[-1]))/F.shape[0]) # # print(objective_error[-1]) # # print(float(objective_error[-1]) < float(tol)) # if objective_error[-1] < tol: # print("iteration %d" % _iter) # break # else: # print("The algorithm did not converge") # return Xs[-1]tr
def _update__spr(Gp, Gr, Rpr, Spr_shape, I, B, t): f = np.zeros(Spr_shape) f += np.linalg.multi_dot((Gp.T, Rpr[0], Gr)) gk = Gp * I[:, t][:, np.newaxis] ik = np.reshape(I[:, t], (len(I[:, t]), 1)) bk = np.reshape(B[t, :], (1, len(B[t, :]))) f += 2 * np.linalg.multi_dot((Gk.T, Ik, bk)) a = Gp.T.dot(Gp) c = Gk.T.dot(Gk) b = Gr.T.dot(Gr) d = bk.T.dot(bk) pinv_c = np.linalg.pinv(C) pinv_b = np.linalg.pinv(B) a_new = pinv_C.dot(A) b_new = D.dot(pinv_B) c_new = pinv_C.dot(F.dot(pinv_B)) return solve_sylvester(A_new, B_new, C_new) def _update_b(Gp, Spr, I): b = np.zeros((I.shape[1], Spr[0].shape[1])) for t in range(I.shape[1]): y = np.reshape(I[:, t], (len(I[:, t]), 1)) x = Gp.dot(Spr[0]) * y ls = linear_regression() ls.fit(X, y) B[t, :] = ls.coef_ return B def _iterative_gradient_solver(A, B, C, tol=0.001, max_iter=500, verbose=0, random_state=0): return None def _iterative_gradient_smaller_solver(A, B, F, tol=0.001, max_iter=200, verbose=0, random_state=0): return None
with open("vocab_origin.txt", "r") as f: lines = f.readlines() for i in range(185): lines.append("<s_{}>".format(i)) with open("vocab.txt", "w") as f: for line in lines: f.write(line.strip() + "\n")
with open('vocab_origin.txt', 'r') as f: lines = f.readlines() for i in range(185): lines.append('<s_{}>'.format(i)) with open('vocab.txt', 'w') as f: for line in lines: f.write(line.strip() + '\n')
# Go to http://apps.twitter.com and create an app. # The consumer key and secret will be generated for you API_KEY = "" API_SECRET_KEY = "" # After the step above, you will be redirected to your app's page. # Create an access token under the the "Your access token" section ACCESS_TOKEN = "" ACCESS_TOKEN_SECRET = ""
api_key = '' api_secret_key = '' access_token = '' access_token_secret = ''
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. UNTRIAGED = 0 TRIAGED_INCORRECT = 1 TRIAGED_CORRECT = 2 TRIAGED_UNSURE = 3 TRIAGE_STATUS_TO_DESCRIPTION = { UNTRIAGED: 'Untriaged', TRIAGED_INCORRECT: 'Incorrect', TRIAGED_CORRECT: 'Correct', TRIAGED_UNSURE: 'Unsure', }
untriaged = 0 triaged_incorrect = 1 triaged_correct = 2 triaged_unsure = 3 triage_status_to_description = {UNTRIAGED: 'Untriaged', TRIAGED_INCORRECT: 'Incorrect', TRIAGED_CORRECT: 'Correct', TRIAGED_UNSURE: 'Unsure'}
#!/usr/bin/env python Nmp = 345 nbound = [0]*1037 step = 0 for l in open('test'): step += 1 for i in range(Nmp): if int(l[i]) > 0: nbound[i] += 1 for i in range(Nmp): print ('%i %i %f' % (i+1, nbound[i], nbound[i] / float(step)))
nmp = 345 nbound = [0] * 1037 step = 0 for l in open('test'): step += 1 for i in range(Nmp): if int(l[i]) > 0: nbound[i] += 1 for i in range(Nmp): print('%i %i %f' % (i + 1, nbound[i], nbound[i] / float(step)))
def file_upload(f): with open('static/upload/'+f.name,'wb+') as destination: for i in f.chunks(): destination.write(i)
def file_upload(f): with open('static/upload/' + f.name, 'wb+') as destination: for i in f.chunks(): destination.write(i)
def calculate_s(data_counts, qubit_indices, pauli_bases): number_of_data_points = 0 s = 0 #print("qubit_indices", qubit_indices) #print("pauli_bases", pauli_bases) #print("data_counts", data_counts.items()) # loop through indices and read measurments for key, value in data_counts.items(): number_of_data_points += value number_of_1s = 0 for i in range(len(qubit_indices)): # indexing a string ordered from left qubit to right if key[qubit_indices[i]] == "1": if pauli_bases[qubit_indices[i]] != 'I': # when not Identity basis number_of_1s += 1 if number_of_1s % 2 == 1: # odd number of 1s s -= value else: # even number of 1s s += value # turn counts into probabilities final_s = s / number_of_data_points return final_s
def calculate_s(data_counts, qubit_indices, pauli_bases): number_of_data_points = 0 s = 0 for (key, value) in data_counts.items(): number_of_data_points += value number_of_1s = 0 for i in range(len(qubit_indices)): if key[qubit_indices[i]] == '1': if pauli_bases[qubit_indices[i]] != 'I': number_of_1s += 1 if number_of_1s % 2 == 1: s -= value else: s += value final_s = s / number_of_data_points return final_s
def longest_linked_list_chain(keys, buckets, loops=10): """ Rolls `keys` number of random keys into `buckets` buckets and counts the collisions. Run `loops` number of times. """ for i in range(loops): key_counts = {} for i in range(buckets): key_counts[i] = 0 for i in range(keys): random_key = str(random.random()) hash_index = hash(random_key) % buckets key_counts[hash_index] += 1 largest_n = 0 for key in key_counts: if key_counts[key] > largest_n: largest_n = key_counts[key] print( f"Longest Linked List Chain for {keys} keys in {buckets} buckets (Load Factor: {keys/buckets:.2f}): {largest_n}" ) longest_linked_list_chain(4, 16, 5) longest_linked_list_chain(16, 16, 5) longest_linked_list_chain(32, 16, 5) longest_linked_list_chain(1024, 128, 5)
def longest_linked_list_chain(keys, buckets, loops=10): """ Rolls `keys` number of random keys into `buckets` buckets and counts the collisions. Run `loops` number of times. """ for i in range(loops): key_counts = {} for i in range(buckets): key_counts[i] = 0 for i in range(keys): random_key = str(random.random()) hash_index = hash(random_key) % buckets key_counts[hash_index] += 1 largest_n = 0 for key in key_counts: if key_counts[key] > largest_n: largest_n = key_counts[key] print(f'Longest Linked List Chain for {keys} keys in {buckets} buckets (Load Factor: {keys / buckets:.2f}): {largest_n}') longest_linked_list_chain(4, 16, 5) longest_linked_list_chain(16, 16, 5) longest_linked_list_chain(32, 16, 5) longest_linked_list_chain(1024, 128, 5)
lisi = 1 lisi1 = 1 lisi2 = 2 zhangsan3 = 3 lisi3 = 3 dev = 1
lisi = 1 lisi1 = 1 lisi2 = 2 zhangsan3 = 3 lisi3 = 3 dev = 1
#################################################################### # ### k8s_resource_keys.py ### #################################################################### # ### Author: SAS Institute Inc. ### #################################################################### # ### # Copyright (c) 2021, SAS Institute Inc., Cary, NC, USA. ### # All Rights Reserved. ### # SPDX-License-Identifier: Apache-2.0 ### # ### #################################################################### class KubernetesResourceKeys(object): """ Class providing static access to commonly used key names in Kubernetes resources (list is not all-inclusive). """ ADDRESSES = "addresses" ANNOTATIONS = "annotations" ANNOTATION_PROXY_BODY_SIZE = "nginx.ingress.kubernetes.io/proxy-body-size" ANNOTATION_COMPONENT_NAME = "sas.com/component-name" ANNOTATION_COMPONENT_VERSION = "sas.com/component-version" ANNOTATION_VERSION = "sas.com/version" API_VERSION = "apiVersion" ARCHITECTURE = "architecture" AVAILABLE_REPLICAS = "availableReplicas" BACKEND = "backend" CAPACITY = "capacity" CLUSTER_IP = "clusterIP" COLLISION_COUNT = "collisionCount" COMPLETION_TIME = "completionTime" CONDITIONS = "conditions" CONTAINER_RUNTIME_VERSION = "containerRuntimeVersion" CONTAINER_STATUSES = "containerStatuses" CONTAINERS = "containers" CONTROLLER_TEMPLATE = "controllerTemplate" CREATION_TIMESTAMP = "creationTimestamp" CURRENT_REPLICAS = "currentReplicas" DATA = "data" DESTINATION = "destination" ENV = "env" EXACT = "exact" FULLY_LABELED_REPLICAS = "fullyLabeledReplicas" GATEWAYS = "gateways" GENERATION = "generation" HTTP = "http" HOST = "host" HOSTS = "hosts" HOST_IP = "hostIP" IMAGE = "image" IMAGES = "images" INIT_CONTAINERS = "initContainers" ITEMS = "items" KERNEL_VERSION = "kernelVersion" KIND = "kind" KUBE_PROXY_VERSION = "kubeProxyVersion" KUBELET_VERSION = "kubeletVersion" LABEL_CAS_NODE_TYPE = "cas-node-type" LABEL_CAS_SERVER = "cas-server" LABEL_MANAGED_BY = "app.kubernetes.io/managed-by" LABEL_PG_CLUSTER = "pg-cluster" LABEL_PG_DEPLOYMENT_NAME = "deployment-name" LABEL_PG_SERVICE_NAME = "service-name" LABEL_SAS_DEPLOYMENT = "sas.com/deployment" LABELS = "labels" MANAGED_FIELDS = "managedFields" MATCH = "match" MATCH_LABELS = "matchLabels" METADATA = "metadata" NAME = "name" NAMESPACE = "namespace" NODE_INFO = "nodeInfo" NODE_NAME = "nodeName" NUMBER = "number" OBSERVED_GENERATION = "observedGeneration" OPERATING_SYSTEM = "operatingSystem" OS_IMAGE = "osImage" OWNER_REFERENCES = "ownerReferences" PARAMETERS = "parameters" PATH = "path" PATHS = "paths" PHASE = "phase" POD_CIDR = "podCIDR" POD_CIDRS = "podCIDRs" POD_IP = "podIP" POD_IPS = "podIPs" PORT = "port" PORTS = "ports" PROTOCOL = "protocol" PROVISIONER = "provisioner" PUBLISH_NODE_PORT_SERVICE = "publishNodePortService" READY = "ready" READY_REPLICAS = "readyReplicas" REPLICAS = "replicas" RESOURCES = "resources" RESOURCE_VERSION = "resourceVersion" RESTART_COUNT = "restartCount" ROUTE = "route" ROUTES = "routes" RULES = "rules" SELECTOR = "selector" SELF_LINK = "selfLink" SERVICE = "service" SERVICE_PORT = "servicePort" SERVICE_NAME = "serviceName" SERVICES = "services" SPEC = "spec" START_TIME = "startTime" STARTED = "started" STATE = "state" STATUS = "status" SUCCEEDED = "succeeded" TARGET_PORT = "targetPort" TCP = "tcp" TO = "to" TEMPLATE = "template" TYPE = "type" UID = "uid" URI = "uri" UPDATED_REPLICAS = "updatedReplicas" UNAVAILABLE_REPLICAS = "unavailableReplicas" WORKER_TEMPLATE = "workerTemplate" WORKERS = "workers"
class Kubernetesresourcekeys(object): """ Class providing static access to commonly used key names in Kubernetes resources (list is not all-inclusive). """ addresses = 'addresses' annotations = 'annotations' annotation_proxy_body_size = 'nginx.ingress.kubernetes.io/proxy-body-size' annotation_component_name = 'sas.com/component-name' annotation_component_version = 'sas.com/component-version' annotation_version = 'sas.com/version' api_version = 'apiVersion' architecture = 'architecture' available_replicas = 'availableReplicas' backend = 'backend' capacity = 'capacity' cluster_ip = 'clusterIP' collision_count = 'collisionCount' completion_time = 'completionTime' conditions = 'conditions' container_runtime_version = 'containerRuntimeVersion' container_statuses = 'containerStatuses' containers = 'containers' controller_template = 'controllerTemplate' creation_timestamp = 'creationTimestamp' current_replicas = 'currentReplicas' data = 'data' destination = 'destination' env = 'env' exact = 'exact' fully_labeled_replicas = 'fullyLabeledReplicas' gateways = 'gateways' generation = 'generation' http = 'http' host = 'host' hosts = 'hosts' host_ip = 'hostIP' image = 'image' images = 'images' init_containers = 'initContainers' items = 'items' kernel_version = 'kernelVersion' kind = 'kind' kube_proxy_version = 'kubeProxyVersion' kubelet_version = 'kubeletVersion' label_cas_node_type = 'cas-node-type' label_cas_server = 'cas-server' label_managed_by = 'app.kubernetes.io/managed-by' label_pg_cluster = 'pg-cluster' label_pg_deployment_name = 'deployment-name' label_pg_service_name = 'service-name' label_sas_deployment = 'sas.com/deployment' labels = 'labels' managed_fields = 'managedFields' match = 'match' match_labels = 'matchLabels' metadata = 'metadata' name = 'name' namespace = 'namespace' node_info = 'nodeInfo' node_name = 'nodeName' number = 'number' observed_generation = 'observedGeneration' operating_system = 'operatingSystem' os_image = 'osImage' owner_references = 'ownerReferences' parameters = 'parameters' path = 'path' paths = 'paths' phase = 'phase' pod_cidr = 'podCIDR' pod_cidrs = 'podCIDRs' pod_ip = 'podIP' pod_ips = 'podIPs' port = 'port' ports = 'ports' protocol = 'protocol' provisioner = 'provisioner' publish_node_port_service = 'publishNodePortService' ready = 'ready' ready_replicas = 'readyReplicas' replicas = 'replicas' resources = 'resources' resource_version = 'resourceVersion' restart_count = 'restartCount' route = 'route' routes = 'routes' rules = 'rules' selector = 'selector' self_link = 'selfLink' service = 'service' service_port = 'servicePort' service_name = 'serviceName' services = 'services' spec = 'spec' start_time = 'startTime' started = 'started' state = 'state' status = 'status' succeeded = 'succeeded' target_port = 'targetPort' tcp = 'tcp' to = 'to' template = 'template' type = 'type' uid = 'uid' uri = 'uri' updated_replicas = 'updatedReplicas' unavailable_replicas = 'unavailableReplicas' worker_template = 'workerTemplate' workers = 'workers'
decimal = int(input("Decimal: ")) binary = "" while decimal != 0: rest = decimal % 2 binary = str(rest) + binary decimal = decimal // 2 print ("Binary: %s" % binary)
decimal = int(input('Decimal: ')) binary = '' while decimal != 0: rest = decimal % 2 binary = str(rest) + binary decimal = decimal // 2 print('Binary: %s' % binary)
def swap_in_place(arr, idx1, idx2): new_arr = arr[:] if idx1 > len(arr) - 1 or idx2 > len(arr) - 1: return arr new_arr.insert(idx1, new_arr.pop(idx2)) #print(new_arr) new_arr.insert(idx2, new_arr.pop(idx1 + 1)) return new_arr def test_case(arr, idx1, idx2, solution, test_func): output = test_func(arr, idx1, idx2) if output == solution: print("Passed") else: print(f"Failed, expected {solution}, got {output}") test_case([1, 2, 3, 4, 5], 1, 3, [1, 4, 3, 2, 5], swap_in_place) test_case([1, 2, 3, 4, 5], 0, 4, [5, 2, 3, 4, 1], swap_in_place) test_case([1, 2], 0, 1, [2, 1], swap_in_place) test_case([], 0, 0, [], swap_in_place)
def swap_in_place(arr, idx1, idx2): new_arr = arr[:] if idx1 > len(arr) - 1 or idx2 > len(arr) - 1: return arr new_arr.insert(idx1, new_arr.pop(idx2)) new_arr.insert(idx2, new_arr.pop(idx1 + 1)) return new_arr def test_case(arr, idx1, idx2, solution, test_func): output = test_func(arr, idx1, idx2) if output == solution: print('Passed') else: print(f'Failed, expected {solution}, got {output}') test_case([1, 2, 3, 4, 5], 1, 3, [1, 4, 3, 2, 5], swap_in_place) test_case([1, 2, 3, 4, 5], 0, 4, [5, 2, 3, 4, 1], swap_in_place) test_case([1, 2], 0, 1, [2, 1], swap_in_place) test_case([], 0, 0, [], swap_in_place)
""" This file provides a library of music exception types that are used throughout the project to better report errors to the user. Exception Types: TabException - general exception type for the project used to report general errors in the tab that cannot be reported more specifically MeasureException - caused by the construction of a Measure whose length is not <= 1 TabFileException - error caused by incorrect input tab file TabIOException - error caused by file reading/writing in tab program. TabConfigurationException - exception caused by incorrect program configuration file StaffException - caused by illegal StaffString object construction StaffOutOfBoundsException - caused by accessing a StaffString index that is out of bounds LoggingException - caused by failure of logging operations. Some of these exceptions are used in try-except clauses that handle a more generic Python exception (e.g. ValueError, IOError) and then raise one of these exception types to better inform the user. author: Chami Lamelas date: Summer 2019 """ UNIDENTIFIED_LINE_IN_FILE = -1 # for exceptions that report a file line no. as part of the error, use this to report that line couldn't be found class TabException(Exception): def __init__(self, msg): self.msg = msg def __str__(self): return str(self.msg) class MeasureException(TabException): def __init__(self, op, reason): super().__init__("Operation on Measure failed: {0}. Reason: {1}.".format(op, reason)) class TabFileException(TabException): def __init__(self, issue = "unknown", reason="unknown", line=UNIDENTIFIED_LINE_IN_FILE): self.issue = issue self.reason = reason self.line = line errorMsg = "Issue with the tab file: \"{0}\". Reason: {1}.".format(issue, reason) if line != UNIDENTIFIED_LINE_IN_FILE: errorMsg += " Approximate line number: {0}.".format(line) super().__init__(errorMsg) class TabIOException(TabException): def __init__(self, issue, reason): super().__init__("I/O Error with \"{0}\". Reason: {1}.".format(issue, reason)) class TabConfigurationException(TabException): def __init__(self, reason="not specified", line=UNIDENTIFIED_LINE_IN_FILE): errorMsg = "Program configuration failed. Reason: {0}.".format(reason) if line != UNIDENTIFIED_LINE_IN_FILE: errorMsg += " Approximate line number: {0}.".format(line) errorMsg += " To reset the config. file, you can redownload it from the repository." super().__init__(errorMsg) class StaffException(TabException): def __init__(self, op, reason, str): super().__init__("Staff operation cannot be performed: \"{0}\", Reason: {1}. str={2}".format(op, reason, str)) class StaffOutOfBoundsException(TabException): def __init__(self, reason, viol): super().__init__("Bounds Violation, reason: {0} ({1})".format(reason, viol)) class LoggingException(Exception): def __init__(self, op, reason): self.msg = "Log operation \"{0}\" failed. Reason: {1}".format(op, reason) def __str__(self): return str(self.msg)
""" This file provides a library of music exception types that are used throughout the project to better report errors to the user. Exception Types: TabException - general exception type for the project used to report general errors in the tab that cannot be reported more specifically MeasureException - caused by the construction of a Measure whose length is not <= 1 TabFileException - error caused by incorrect input tab file TabIOException - error caused by file reading/writing in tab program. TabConfigurationException - exception caused by incorrect program configuration file StaffException - caused by illegal StaffString object construction StaffOutOfBoundsException - caused by accessing a StaffString index that is out of bounds LoggingException - caused by failure of logging operations. Some of these exceptions are used in try-except clauses that handle a more generic Python exception (e.g. ValueError, IOError) and then raise one of these exception types to better inform the user. author: Chami Lamelas date: Summer 2019 """ unidentified_line_in_file = -1 class Tabexception(Exception): def __init__(self, msg): self.msg = msg def __str__(self): return str(self.msg) class Measureexception(TabException): def __init__(self, op, reason): super().__init__('Operation on Measure failed: {0}. Reason: {1}.'.format(op, reason)) class Tabfileexception(TabException): def __init__(self, issue='unknown', reason='unknown', line=UNIDENTIFIED_LINE_IN_FILE): self.issue = issue self.reason = reason self.line = line error_msg = 'Issue with the tab file: "{0}". Reason: {1}.'.format(issue, reason) if line != UNIDENTIFIED_LINE_IN_FILE: error_msg += ' Approximate line number: {0}.'.format(line) super().__init__(errorMsg) class Tabioexception(TabException): def __init__(self, issue, reason): super().__init__('I/O Error with "{0}". Reason: {1}.'.format(issue, reason)) class Tabconfigurationexception(TabException): def __init__(self, reason='not specified', line=UNIDENTIFIED_LINE_IN_FILE): error_msg = 'Program configuration failed. Reason: {0}.'.format(reason) if line != UNIDENTIFIED_LINE_IN_FILE: error_msg += ' Approximate line number: {0}.'.format(line) error_msg += ' To reset the config. file, you can redownload it from the repository.' super().__init__(errorMsg) class Staffexception(TabException): def __init__(self, op, reason, str): super().__init__('Staff operation cannot be performed: "{0}", Reason: {1}. str={2}'.format(op, reason, str)) class Staffoutofboundsexception(TabException): def __init__(self, reason, viol): super().__init__('Bounds Violation, reason: {0} ({1})'.format(reason, viol)) class Loggingexception(Exception): def __init__(self, op, reason): self.msg = 'Log operation "{0}" failed. Reason: {1}'.format(op, reason) def __str__(self): return str(self.msg)
# you can use print for debugging purposes, e.g. # print "this is a debug message" # The strategy is to iterate through the string, putting each character onto # a specific stack, depending on its type. # A, When we put the character onto the stack, we check to see if the one before it # is an opposite - eg. { then } are opposites. If we find an opposite pair, we annihilate them. # When a pair is annihilated, we check to see if any other types have priority # The strategy is to iterate through the array, putting each character onto the stack. If the opposite character is present on the stack, immediately annihilate both. At the end if the size of the stack is zero, the string is properly formatted. def solution(S): annihilate = { ')': '(', ']': '[', '}': '{', } stack = [] if not S: return 1 for char in S: #print char if char in annihilate.keys() and len(stack) > 0: if stack[-1] == annihilate[char]: stack.pop() else: stack.append(char) else: stack.append(char) #print stack if len(stack) == 0: return 1 else: return 0
def solution(S): annihilate = {')': '(', ']': '[', '}': '{'} stack = [] if not S: return 1 for char in S: if char in annihilate.keys() and len(stack) > 0: if stack[-1] == annihilate[char]: stack.pop() else: stack.append(char) else: stack.append(char) if len(stack) == 0: return 1 else: return 0
""" Functions for positioning geometry """ def CheckFeasibility(newPart, candidatePositionIndex, sheet): candidatePosition = sheet.extremePoints[candidatePositionIndex] check = True for i in range(2): # check if violate sheet limits if newPart.Dim[i] + candidatePosition[i] > sheet.useableSize[i]: check = False for j in range(len(sheet.currentParts)): # check if overlap with current parts if overlap(newPart,candidatePosition, sheet.currentParts[j]): check = False return check def overlap(Part1, position, Part2): ov = True if position[0] >= Part2.Dim[0] + Part2.Position[0]: ov = False if Part2.Position[0] >= position[0] + Part1.Dim[0]: ov = False if position[1] >= Part2.Dim[1] + Part2.Position[1]: ov = False if Part2.Position[1] >= position[1] + Part1.Dim[1]: ov = False return ov def TakesProjection(Part1, Part2, proj_dir): pd = proj_dir od = 1-pd check = True if Part2.Dim[pd] + Part2.Position[pd] > Part1.Position[pd]: #i.e. piece is further from axis in projection direction check = False if Part2.Position[od] > Part1.Position[od]: #i.e. piece too far check = False if Part2.Position[od] + Part2.Dim[od] < Part1.Position[od] : # i.e. piece not far enough check = False return check
""" Functions for positioning geometry """ def check_feasibility(newPart, candidatePositionIndex, sheet): candidate_position = sheet.extremePoints[candidatePositionIndex] check = True for i in range(2): if newPart.Dim[i] + candidatePosition[i] > sheet.useableSize[i]: check = False for j in range(len(sheet.currentParts)): if overlap(newPart, candidatePosition, sheet.currentParts[j]): check = False return check def overlap(Part1, position, Part2): ov = True if position[0] >= Part2.Dim[0] + Part2.Position[0]: ov = False if Part2.Position[0] >= position[0] + Part1.Dim[0]: ov = False if position[1] >= Part2.Dim[1] + Part2.Position[1]: ov = False if Part2.Position[1] >= position[1] + Part1.Dim[1]: ov = False return ov def takes_projection(Part1, Part2, proj_dir): pd = proj_dir od = 1 - pd check = True if Part2.Dim[pd] + Part2.Position[pd] > Part1.Position[pd]: check = False if Part2.Position[od] > Part1.Position[od]: check = False if Part2.Position[od] + Part2.Dim[od] < Part1.Position[od]: check = False return check
def prepare(base_class, engine): """ Reflect base class to current database engine. """ base_class.prepare(engine, reflect=True)
def prepare(base_class, engine): """ Reflect base class to current database engine. """ base_class.prepare(engine, reflect=True)
class Pattern_Twenty_Three: '''Pattern twenty_three ooooooooooooooooo ooooooooooooooooo ooooooooooooooooo oooo oooo oooo ooooooooooooooooo ooooooooooooooooo ooooooooooooooooo oooo oooo oooo ooooooooooooooooo ooooooooooooooooo ooooooooooooooooo ''' def __init__(self, strings='o'): if not isinstance(strings, str): strings = str(strings) for i in range(15): if i == 0: print(f' {strings * 17}') elif i in [3, 4, 5]: print(f'{strings * 4}') elif i in [9, 10, 11]: print(f'{(strings * 4).rjust(17)}') elif i in [1, 2, 6, 7, 8, 12, 13, 14]: print(f'{strings * 17}') if __name__ == '__main__': Pattern_Twenty_Three()
class Pattern_Twenty_Three: """Pattern twenty_three ooooooooooooooooo ooooooooooooooooo ooooooooooooooooo oooo oooo oooo ooooooooooooooooo ooooooooooooooooo ooooooooooooooooo oooo oooo oooo ooooooooooooooooo ooooooooooooooooo ooooooooooooooooo """ def __init__(self, strings='o'): if not isinstance(strings, str): strings = str(strings) for i in range(15): if i == 0: print(f' {strings * 17}') elif i in [3, 4, 5]: print(f'{strings * 4}') elif i in [9, 10, 11]: print(f'{(strings * 4).rjust(17)}') elif i in [1, 2, 6, 7, 8, 12, 13, 14]: print(f'{strings * 17}') if __name__ == '__main__': pattern__twenty__three()
expected_output = { 'chassis_feature': 'V2 AC PEM', 'clei': 'IPMUP00BRB', 'desc': 'ASR 9006 4 Line Card Slot Chassis with V2 AC PEM', 'device_family': 'ASR', 'device_series': '9006', 'num_line_cards': 4, 'pid': 'ASR-9006-AC-V2', 'rack_num': 0, 'sn': 'FOX1810G8LR', 'top_assy_num': '68-4235-02', 'vid': 'V02'}
expected_output = {'chassis_feature': 'V2 AC PEM', 'clei': 'IPMUP00BRB', 'desc': 'ASR 9006 4 Line Card Slot Chassis with V2 AC PEM', 'device_family': 'ASR', 'device_series': '9006', 'num_line_cards': 4, 'pid': 'ASR-9006-AC-V2', 'rack_num': 0, 'sn': 'FOX1810G8LR', 'top_assy_num': '68-4235-02', 'vid': 'V02'}
directions_2 = [ [ 1, 0 ], [ 0, 1 ], [ 2, 0 ], [ 0, 2 ], [ 1, 1 ], [ 1, -1 ], [ 3, 0 ], [ 0, 3 ], [ 1, 2 ], [ 2, 1 ], [ 1, -2 ], [-2, 1 ], [ 4, 0 ], [ 0, 4 ], [ 1, 3 ], [ 3, 1 ], [ 1, -3 ], [-3, 1 ], [ 2, 2 ], [ 2, -2 ], [ 5, 0 ], [ 0, 5 ], [ 1, 4 ], [ 4, 1 ], [ 1, -4 ], [-4, 1 ], [ 2, 3 ], [ 3, 2 ], [ 2, -3 ], [-3, 2 ], [-1, 0 ], [ 0, -1 ], [-2, 0 ], [ 0, -2 ], [-1, -1 ], [-1, 1 ], [-3, 0 ], [ 0, -3 ], [-1, -2 ], [-2, -1 ], [-1, 2 ], [ 2, -1 ], [-4, 0 ], [ 0, -4 ], [-1, -3 ], [-3, -1 ], [-1, 3 ], [ 3, -1 ], [-2, -2 ], [-2, 2 ], [-5, 0 ], [ 0, -5 ], [-1, -4 ], [-4, -1 ], [-1, 4 ], [ 4, -1 ], [-2, -3 ], [-3, -2 ], [-2, 3 ], [ 3, -2 ], [ 0, 0 ] ] directions_3 = [ [ 1, 0, 0], [ 0, 1, 0], [ 0, 0, 1], [-1, 1, 1], [ 1, -1, 1], [ 1, 1, -1], [-2, 1, 0], [ 1, -2, 0], [-2, 0, 1], [ 0, -2, 1], [ 1, 0, -2], [ 0, 1, -2], [-1, 0, 0], [ 0, -1, 0], [ 0, 0, -1], [ 1, -1, -1], [-1, 1, -1], [-1, -1, 1], [ 2, -1, 0], [-1, 2, 0], [ 2, 0, -1], [ 0, 2, -1], [-1, 0, 2], [ 0, -1, 2], [ 3, 0, 0], [ 0, 3, 0], [ 0, 0, 3], [ 2, 1, 0], [ 2, 0, 1], [ 1, 2, 0], [ 0, 2, 1], [ 1, 0, 2], [ 0, 1, 2], [ 1, 1, 1], [-3, 0, 0], [ 0, -3, 0], [ 0, 0, -3], [-2, -1, 0], [-2, 0, -1], [-1, -2, 0], [ 0, -2, -1], [-1, 0, -2], [ 0, -1, -2], [-1, -1, -1] ] def idx_ppar( directions, idx, coo ): """ Return a pair [ index, data_name ]""" cood = ["x", "y", "z"] return [ directions.index(idx) * 6 + cood.index(coo) * 2, "[%s] in %s-axis" % ( ', '.join( map( str, idx ) ), coo ) ]
directions_2 = [[1, 0], [0, 1], [2, 0], [0, 2], [1, 1], [1, -1], [3, 0], [0, 3], [1, 2], [2, 1], [1, -2], [-2, 1], [4, 0], [0, 4], [1, 3], [3, 1], [1, -3], [-3, 1], [2, 2], [2, -2], [5, 0], [0, 5], [1, 4], [4, 1], [1, -4], [-4, 1], [2, 3], [3, 2], [2, -3], [-3, 2], [-1, 0], [0, -1], [-2, 0], [0, -2], [-1, -1], [-1, 1], [-3, 0], [0, -3], [-1, -2], [-2, -1], [-1, 2], [2, -1], [-4, 0], [0, -4], [-1, -3], [-3, -1], [-1, 3], [3, -1], [-2, -2], [-2, 2], [-5, 0], [0, -5], [-1, -4], [-4, -1], [-1, 4], [4, -1], [-2, -3], [-3, -2], [-2, 3], [3, -2], [0, 0]] directions_3 = [[1, 0, 0], [0, 1, 0], [0, 0, 1], [-1, 1, 1], [1, -1, 1], [1, 1, -1], [-2, 1, 0], [1, -2, 0], [-2, 0, 1], [0, -2, 1], [1, 0, -2], [0, 1, -2], [-1, 0, 0], [0, -1, 0], [0, 0, -1], [1, -1, -1], [-1, 1, -1], [-1, -1, 1], [2, -1, 0], [-1, 2, 0], [2, 0, -1], [0, 2, -1], [-1, 0, 2], [0, -1, 2], [3, 0, 0], [0, 3, 0], [0, 0, 3], [2, 1, 0], [2, 0, 1], [1, 2, 0], [0, 2, 1], [1, 0, 2], [0, 1, 2], [1, 1, 1], [-3, 0, 0], [0, -3, 0], [0, 0, -3], [-2, -1, 0], [-2, 0, -1], [-1, -2, 0], [0, -2, -1], [-1, 0, -2], [0, -1, -2], [-1, -1, -1]] def idx_ppar(directions, idx, coo): """ Return a pair [ index, data_name ]""" cood = ['x', 'y', 'z'] return [directions.index(idx) * 6 + cood.index(coo) * 2, '[%s] in %s-axis' % (', '.join(map(str, idx)), coo)]
ALL_NODES_TYPE = '<all>' ALL_PRIMITIVES_TYPES = '<all-primitives>' ALL_REGION_TYPES = '<all-regions>' ALL_CONDITIONS_TYPES = '<all-conditions>' LOCATION_OR_WAYPOINT = '<location-or-waypoint>' STRING_TYPE = '<string>' NUMBER_TYPE = '<number>' BOOLEAN_TYPE = '<boolean>' ENUM_TYPE = '<enum>' ARBITRARY_OBJ_TYPE = '<arbitrary-obj>' PARAMETERS_FIELD_DCT = '<parameters>'
all_nodes_type = '<all>' all_primitives_types = '<all-primitives>' all_region_types = '<all-regions>' all_conditions_types = '<all-conditions>' location_or_waypoint = '<location-or-waypoint>' string_type = '<string>' number_type = '<number>' boolean_type = '<boolean>' enum_type = '<enum>' arbitrary_obj_type = '<arbitrary-obj>' parameters_field_dct = '<parameters>'
# 2021-02-08 # Emma Benjaminson # Implementation of Linked List # for ch2-p1 (at least) # need init, delete methods (possibly traverse?) # singly linked list for now # class Node # this will contain init method # attribute is next which is pointer to the next node class Node: def __init__(self, data): self.data = data self.next = None # this can be replaced later def __repr__(self): # the repr is a machine-friendly string representation (__str__ supersedes __repr__ if present) return self.data # class LinkedList # contain init, delete methods # internal traverse method? class LinkedList: def __init__(self, nodes=None): # what parameters do I need here? head? Do I pass in head? or not, for now? self.head = None # if nodes is not None, then we have to add them to the list # we use pop to remove elements from nodes # we assign the first node to the head # then we iterate through the remaining nodes and create new nodes that are connected if nodes is not None: node = Node(data=nodes.pop(0)) self.head = node for elem in nodes: node.next = Node(data=elem) node = node.next def __repr__(self): # this prints a machine-friendly string representing the class object (superseded by __str__ if present) node = self.head nodes = [] while node is not None: nodes.append(node.data) node = node.next nodes.append("None") return " -> ".join(nodes) def __iter__(self): # this makes the LinkedList class iterable node = self.head while node is not None: yield node node = node.next def add_first(self, node): # this node is going to become the head # first set node.next equal to current head # then make current head equal to node node.next = self.head self.head = node def add_last(self, node): # check that the list is not empty # if it is, then we just make node the head if not self.head: self.head = node return # run through the nodes (while node.next is not none) # then arrive at the last node # assign its next pointer to the new node # assign the pointer of this new last node to none for curr_node in self: pass curr_node.next = node def remove_node(self, target_node): # check that the list is not empty # otherwise raise an exception if not self.head: raise Exception('List is empty') # check if the target_node is the head if self.head == target_node: self.head = self.head.next return # save the head as the previous node prev_node = self.head # iterate through the nodes for node in self: # if node is the target_node then assign prev_node.next = node.next if node == target_node: prev_node.next = node.next return prev_node = node raise Exception('Node with data %s is not in linked list.' % target_node.data)
class Node: def __init__(self, data): self.data = data self.next = None def __repr__(self): return self.data class Linkedlist: def __init__(self, nodes=None): self.head = None if nodes is not None: node = node(data=nodes.pop(0)) self.head = node for elem in nodes: node.next = node(data=elem) node = node.next def __repr__(self): node = self.head nodes = [] while node is not None: nodes.append(node.data) node = node.next nodes.append('None') return ' -> '.join(nodes) def __iter__(self): node = self.head while node is not None: yield node node = node.next def add_first(self, node): node.next = self.head self.head = node def add_last(self, node): if not self.head: self.head = node return for curr_node in self: pass curr_node.next = node def remove_node(self, target_node): if not self.head: raise exception('List is empty') if self.head == target_node: self.head = self.head.next return prev_node = self.head for node in self: if node == target_node: prev_node.next = node.next return prev_node = node raise exception('Node with data %s is not in linked list.' % target_node.data)
#To find first index of an element in an array. def firstIndex(arr, si, x): l = len(arr) #length of array. if l == 0: #base case return -1 if arr[si] == x: #if element is found at start index of an array then return that index. return si return firstIndex(arr, si+1, x) #recursive call. arr = [] #initialised array. n=int(input("Enter size of array : ")) for i in range(n): #input array. ele=int(input()) arr.append(ele) x=int(input("Enter element to be searched ")) #element to be searched print(firstIndex(arr, 0, x))
def first_index(arr, si, x): l = len(arr) if l == 0: return -1 if arr[si] == x: return si return first_index(arr, si + 1, x) arr = [] n = int(input('Enter size of array : ')) for i in range(n): ele = int(input()) arr.append(ele) x = int(input('Enter element to be searched ')) print(first_index(arr, 0, x))
rest_api_version = 99 extensions = dict( required_params=['training_frame', 'x'], validate_required_params="", set_required_params=""" parms$training_frame <- training_frame if(!missing(x)) parms$ignored_columns <- .verify_datacols(training_frame, x)$cols_ignore """, with_model=""" model@model$aggregated_frame_id <- model@model$output_frame$name """, module=""" #' Retrieve an aggregated frame from an Aggregator model #' #' Retrieve an aggregated frame from the Aggregator model and use it to create a new frame. #' #' @param model an \linkS4class{H2OClusteringModel} corresponding from a \code{h2o.aggregator} call. #' @examples #' \dontrun{ #' library(h2o) #' h2o.init() #' df <- h2o.createFrame(rows = 100, #' cols = 5, #' categorical_fraction = 0.6, #' integer_fraction = 0, #' binary_fraction = 0, #' real_range = 100, #' integer_range = 100, #' missing_fraction = 0) #' target_num_exemplars = 1000 #' rel_tol_num_exemplars = 0.5 #' encoding = "Eigen" #' agg <- h2o.aggregator(training_frame = df, #' target_num_exemplars = target_num_exemplars, #' rel_tol_num_exemplars = rel_tol_num_exemplars, #' categorical_encoding = encoding) #' # Use the aggregated frame to create a new dataframe #' new_df <- h2o.aggregated_frame(agg) #' } #' @export h2o.aggregated_frame <- function(model) { key <- model@model$aggregated_frame_id h2o.getFrame(key) } """, ) doc = dict( preamble=""" Build an Aggregated Frame Builds an Aggregated Frame of an H2OFrame. """, params=dict( x="""A vector containing the \code{character} names of the predictors in the model.""" ), examples=""" library(h2o) h2o.init() df <- h2o.createFrame(rows = 100, cols = 5, categorical_fraction = 0.6, integer_fraction = 0, binary_fraction = 0, real_range = 100, integer_range = 100, missing_fraction = 0) target_num_exemplars = 1000 rel_tol_num_exemplars = 0.5 encoding = "Eigen" agg <- h2o.aggregator(training_frame = df, target_num_exemplars = target_num_exemplars, rel_tol_num_exemplars = rel_tol_num_exemplars, categorical_encoding = encoding) """ )
rest_api_version = 99 extensions = dict(required_params=['training_frame', 'x'], validate_required_params='', set_required_params='\nparms$training_frame <- training_frame\nif(!missing(x))\n parms$ignored_columns <- .verify_datacols(training_frame, x)$cols_ignore\n', with_model='\nmodel@model$aggregated_frame_id <- model@model$output_frame$name\n', module='\n#\' Retrieve an aggregated frame from an Aggregator model\n#\'\n#\' Retrieve an aggregated frame from the Aggregator model and use it to create a new frame.\n#\'\n#\' @param model an \\linkS4class{H2OClusteringModel} corresponding from a \\code{h2o.aggregator} call.\n#\' @examples\n#\' \\dontrun{\n#\' library(h2o)\n#\' h2o.init()\n#\' df <- h2o.createFrame(rows = 100, \n#\' cols = 5, \n#\' categorical_fraction = 0.6, \n#\' integer_fraction = 0,\n#\' binary_fraction = 0, \n#\' real_range = 100, \n#\' integer_range = 100, \n#\' missing_fraction = 0)\n#\' target_num_exemplars = 1000\n#\' rel_tol_num_exemplars = 0.5\n#\' encoding = "Eigen"\n#\' agg <- h2o.aggregator(training_frame = df,\n#\' target_num_exemplars = target_num_exemplars,\n#\' rel_tol_num_exemplars = rel_tol_num_exemplars,\n#\' categorical_encoding = encoding)\n#\' # Use the aggregated frame to create a new dataframe\n#\' new_df <- h2o.aggregated_frame(agg)\n#\' }\n#\' @export\nh2o.aggregated_frame <- function(model) {\n key <- model@model$aggregated_frame_id\n h2o.getFrame(key)\n}\n') doc = dict(preamble='\nBuild an Aggregated Frame\n\nBuilds an Aggregated Frame of an H2OFrame.\n', params=dict(x='A vector containing the \\code{character} names of the predictors in the model.'), examples='\nlibrary(h2o)\nh2o.init()\ndf <- h2o.createFrame(rows = 100, \n cols = 5, \n categorical_fraction = 0.6, \n integer_fraction = 0,\n binary_fraction = 0, \n real_range = 100, \n integer_range = 100, \n missing_fraction = 0)\ntarget_num_exemplars = 1000\nrel_tol_num_exemplars = 0.5\nencoding = "Eigen"\nagg <- h2o.aggregator(training_frame = df,\n target_num_exemplars = target_num_exemplars,\n rel_tol_num_exemplars = rel_tol_num_exemplars,\n categorical_encoding = encoding)\n')
# SPDX-License-Identifier: MIT # Copyright (c) 2020 Akumatic # #https://adventofcode.com/2020/day/12 def readFile() -> list: with open(f"{__file__.rstrip('code.py')}input.txt", "r") as f: return [line.strip() for line in f.readlines()] def part1(input: list) -> int: x, y = 0, 0 dirs = ((1,0), (0, 1), (-1, 0), (0, -1)) idx = 0 for instruction in input: action = instruction[0] value = int(instruction[1:]) if action == "N": y += value elif action == "S": y -= value elif action == "E": x += value elif action == "W": x -= value elif action == "F": x += dirs[idx][0] * value y += dirs[idx][1] * value else: # action in ("R", "L") sig = 1 if action == "L" else -1 idx = (idx + sig * value // 90) % 4 return abs(x) + abs(y) def part2(input: list) -> int: x, y, wx, wy = 0, 0, 10, 1 dirs = ((1,1), (-1, 1), (-1, -1), (1, -1)) idx = 0 for instruction in input: action = instruction[0] value = int(instruction[1:]) if action == "N": wy += value elif action == "S": wy -= value elif action == "E": wx += value elif action == "W": wx -= value elif action == "F": x += wx * value y += wy * value else: # action in ("R", "L") sig = 1 if action == "L" else -1 for _ in range(value // 90): idx_prev, idx = idx, (idx + sig) % 4 tmp_wx = wx wx = wy * dirs[idx_prev][1] * dirs[idx][0] wy = tmp_wx * dirs[idx_prev][0] * dirs[idx][1] return abs(x) + abs(y) if __name__ == "__main__": input = readFile() print(f"Part 1: {part1(input)}") print(f"Part 2: {part2(input)}")
def read_file() -> list: with open(f"{__file__.rstrip('code.py')}input.txt", 'r') as f: return [line.strip() for line in f.readlines()] def part1(input: list) -> int: (x, y) = (0, 0) dirs = ((1, 0), (0, 1), (-1, 0), (0, -1)) idx = 0 for instruction in input: action = instruction[0] value = int(instruction[1:]) if action == 'N': y += value elif action == 'S': y -= value elif action == 'E': x += value elif action == 'W': x -= value elif action == 'F': x += dirs[idx][0] * value y += dirs[idx][1] * value else: sig = 1 if action == 'L' else -1 idx = (idx + sig * value // 90) % 4 return abs(x) + abs(y) def part2(input: list) -> int: (x, y, wx, wy) = (0, 0, 10, 1) dirs = ((1, 1), (-1, 1), (-1, -1), (1, -1)) idx = 0 for instruction in input: action = instruction[0] value = int(instruction[1:]) if action == 'N': wy += value elif action == 'S': wy -= value elif action == 'E': wx += value elif action == 'W': wx -= value elif action == 'F': x += wx * value y += wy * value else: sig = 1 if action == 'L' else -1 for _ in range(value // 90): (idx_prev, idx) = (idx, (idx + sig) % 4) tmp_wx = wx wx = wy * dirs[idx_prev][1] * dirs[idx][0] wy = tmp_wx * dirs[idx_prev][0] * dirs[idx][1] return abs(x) + abs(y) if __name__ == '__main__': input = read_file() print(f'Part 1: {part1(input)}') print(f'Part 2: {part2(input)}')
print("Please inser the following") print() adjective = input("adjetive: ") animal = input("animal: ") verb1 = input("verb: ") exclamation = input("exclamation: ") verb2 = input ("verb: ") verb3 = input("verb: ") print() print() print("Your story is: ") print() print(f"The other day, I was really in trouble. It all started when I saw a very\n{adjective} {animal} {verb1} down the hallway. '{exclamation}!' I yelled. but all\nI could think to do was to {verb2} over and over. Miraculously, \nthat caused it to stop, but not before it tried to {verb3}\nright in front of my family.")
print('Please inser the following') print() adjective = input('adjetive: ') animal = input('animal: ') verb1 = input('verb: ') exclamation = input('exclamation: ') verb2 = input('verb: ') verb3 = input('verb: ') print() print() print('Your story is: ') print() print(f"The other day, I was really in trouble. It all started when I saw a very\n{adjective} {animal} {verb1} down the hallway. '{exclamation}!' I yelled. but all\nI could think to do was to {verb2} over and over. Miraculously, \nthat caused it to stop, but not before it tried to {verb3}\nright in front of my family.")