content
stringlengths
7
1.05M
fixed_cases
stringlengths
1
1.28M
s = float(0) for i in range(1, 101): s = float(s + float(1) / float(i)) print(f"{s:.2f}")
s = float(0) for i in range(1, 101): s = float(s + float(1) / float(i)) print(f'{s:.2f}')
class MyList(list): pass def main(): my_list = MyList() my_list.append('a') my_list.append('b') print(my_list[0]) print(my_list[1]) if __name__ == "__main__": main()
class Mylist(list): pass def main(): my_list = my_list() my_list.append('a') my_list.append('b') print(my_list[0]) print(my_list[1]) if __name__ == '__main__': main()
n = int(input()) for i in range(n + 1, 2 * n): j = 2 while j * j <= i: if i % j == 0: break j += 1 else: print('YES') print(i) exit() print('NO')
n = int(input()) for i in range(n + 1, 2 * n): j = 2 while j * j <= i: if i % j == 0: break j += 1 else: print('YES') print(i) exit() print('NO')
def is_prime(a): for j in range(2, a): if a % j == 0: return False return True answer = [] for i in range(2, 101): if is_prime(i): answer.append(str(i)) print(" ".join(answer)) # is_first = True # for i in range(2, 101): # if is_prime(i): # if is_first: # is_first = False # else: # print(" ", end="") # print(f"{i}", end="")
def is_prime(a): for j in range(2, a): if a % j == 0: return False return True answer = [] for i in range(2, 101): if is_prime(i): answer.append(str(i)) print(' '.join(answer))
class Parser: def __init__(self, file_name): self.file_name = file_name self.tokens = self.load_tokens() def load_tokens(self): with open(self.file_name) as f: lines = map(lambda line: self.remove_comments(line).split(), f.readlines()) tokens = [line for line in lines if line != []] return tokens def remove_comments(self, line): j = 0 for i in range(1, len(line)): if line[j] == line[i] == "/": return line[:j] j += 1 return line def get_command(self): return self.tokens.pop(0) def has_more_commands(self): return self.tokens != [] if __name__ == "__main__": p = Parser("vm_example.vm") print(p.tokens)
class Parser: def __init__(self, file_name): self.file_name = file_name self.tokens = self.load_tokens() def load_tokens(self): with open(self.file_name) as f: lines = map(lambda line: self.remove_comments(line).split(), f.readlines()) tokens = [line for line in lines if line != []] return tokens def remove_comments(self, line): j = 0 for i in range(1, len(line)): if line[j] == line[i] == '/': return line[:j] j += 1 return line def get_command(self): return self.tokens.pop(0) def has_more_commands(self): return self.tokens != [] if __name__ == '__main__': p = parser('vm_example.vm') print(p.tokens)
def denominations(array): den_list = [] for i in range(len(array)): # since there is no coin with value 0 if i == 0: continue if array[i] > 0: if not den_list: den_list.append(i) continue if len(den_list) > 0: min_coins = get_min_coins(i, den_list) if min_coins != 0: den_list.append(i) return ", ".join([str(val) for val in den_list]) def get_min_coins(amount, denoms): print('amount', amount) print('denoms', denoms) if amount == 0: return 0 coins_used = None denom_to_use, index_cutoff = None, None for x, denom in enumerate(denoms): if amount >= denom: denom_to_use = denom index_cutoff = x break try: coins_used = amount // denom_to_use except TypeError: coins_used = None if coins_used is not None and amount - (denom_to_use * coins_used) in denoms: return coins_used + get_min_coins(amount - (denom_to_use * coins_used), denoms[index_cutoff + 1:]) else: return coins_used + get_min_coins(amount - denom_to_use, denoms[index_cutoff + 1:])
def denominations(array): den_list = [] for i in range(len(array)): if i == 0: continue if array[i] > 0: if not den_list: den_list.append(i) continue if len(den_list) > 0: min_coins = get_min_coins(i, den_list) if min_coins != 0: den_list.append(i) return ', '.join([str(val) for val in den_list]) def get_min_coins(amount, denoms): print('amount', amount) print('denoms', denoms) if amount == 0: return 0 coins_used = None (denom_to_use, index_cutoff) = (None, None) for (x, denom) in enumerate(denoms): if amount >= denom: denom_to_use = denom index_cutoff = x break try: coins_used = amount // denom_to_use except TypeError: coins_used = None if coins_used is not None and amount - denom_to_use * coins_used in denoms: return coins_used + get_min_coins(amount - denom_to_use * coins_used, denoms[index_cutoff + 1:]) else: return coins_used + get_min_coins(amount - denom_to_use, denoms[index_cutoff + 1:])
print("Interview by computer") name = input("your name : ") print(f"hello {name}") age = input("your age : ") favorite_color = input("your fav color : ") second_person_name_etc = input() # above is no an efficient way # Below is an efficient way (using Tuples) questions = ( "Your name: ", "Your age: ", "Favourite color: ", "Pet's name: ", ) answers = [] for question in questions: answers.append(input(question)) print(answers) # in the above program, input is tuple, and output is list # tuples are immutable # If you're never gonna change something after creating it, then it should be a tuple (so that it cannot be changed even accidentally)
print('Interview by computer') name = input('your name : ') print(f'hello {name}') age = input('your age : ') favorite_color = input('your fav color : ') second_person_name_etc = input() questions = ('Your name: ', 'Your age: ', 'Favourite color: ', "Pet's name: ") answers = [] for question in questions: answers.append(input(question)) print(answers)
class x: counter = 1 while x.counter < 10: x.counter = x.counter * 2 print(x.counter) del x.counter def f1(self, x, y): return min(x, x + y)
class X: counter = 1 while x.counter < 10: x.counter = x.counter * 2 print(x.counter) del x.counter def f1(self, x, y): return min(x, x + y)
#!/usr/bin/env python3 #-*- coding: utf-8 -*- def foo(s): return 10 / int(s) def bar(s): return foo(s) * 2 def main(): bar('0') main() print('runing is ok!')
def foo(s): return 10 / int(s) def bar(s): return foo(s) * 2 def main(): bar('0') main() print('runing is ok!')
resnext_101_32_path = './pretrained/resnext_101_32x4d.pth' pretrained_res_best = './pretrained/res_best.pth' pretrained_vgg_best = './pretrained/vgg_best.pth' DUTDefocus = './datasets/DUTDefocus' CUHKDefocus = './datasets/CUHKDefocus'
resnext_101_32_path = './pretrained/resnext_101_32x4d.pth' pretrained_res_best = './pretrained/res_best.pth' pretrained_vgg_best = './pretrained/vgg_best.pth' dut_defocus = './datasets/DUTDefocus' cuhk_defocus = './datasets/CUHKDefocus'
# Create veggies list veggies = ['tomato', 'spinach', 'pepper', 'pea'] print(veggies) # Remove first occurence of 'tomato' veggies.remove('tomato') print(veggies) # Append 'corn' veggies.append('corn') print(veggies) # Create meats list meats = ['chicken', 'beef', 'pork', 'fish'] print(meats) # Concatenate meats and veggies to create new foods list foods = meats + veggies print(foods) # Sort foods in place foods.sort() print(foods)
veggies = ['tomato', 'spinach', 'pepper', 'pea'] print(veggies) veggies.remove('tomato') print(veggies) veggies.append('corn') print(veggies) meats = ['chicken', 'beef', 'pork', 'fish'] print(meats) foods = meats + veggies print(foods) foods.sort() print(foods)
def test_something(): # (i'm going to delete this later, i just wanna make sure gh actions/etc. # is set up ok) assert 2 + 2 == 4
def test_something(): assert 2 + 2 == 4
# Write a function that receives 3 characters. Concatenate all the characters into one string and print it on the console. chr_1 = str(input()) chr_2 = str(input()) chr_3 = str(input()) print(chr_1+chr_2+chr_3)
chr_1 = str(input()) chr_2 = str(input()) chr_3 = str(input()) print(chr_1 + chr_2 + chr_3)
# This file is exec'd from settings.py, so it has access to and can # modify all the variables in settings.py. DEBUG = True # Make these unique, and don't share it with anybody. SECRET_KEY = "t6e%#%(w!lg1@1bk1$lhh%q_d4h&z*s3utakds-bzu-3b(bebe" NEVERCACHE_KEY = "dit-cgsc$(w%xx)z*=l1-1vtz%a6v1hwhv9jtlsm0_kcg(md0z" DATABASES = { "default": { # Ends with "postgresql_psycopg2", "mysql", "sqlite3" or "oracle". "ENGINE": "django.db.backends.sqlite3", # DB name or path to database file if using sqlite3. "NAME": "dev.db", # Not used with sqlite3. "USER": "", # Not used with sqlite3. "PASSWORD": "", # Set to empty string for localhost. Not used with sqlite3. "HOST": "", # Set to empty string for default. Not used with sqlite3. "PORT": "", } } ################### # DEPLOY SETTINGS # ################### # Domains for public site ALLOWED_HOSTS_PRODUCTION = ["example.com", ] # These settings are used by the default fabfile.py provided. # Check fabfile.py for defaults. FABRIC = { "DEPLOY_TOOL": "git", # Deploy with "git", "hg", or "rsync" "SSH_PASS": "yourpass", # SSH password (consider key-based authentication) "REPO_PATH": "git@github.com:linuxluigi/Django_CCTV.git", # Github Repo "SSH_USER": "pi", # VPS SSH username "HOSTS": ["django-cctv"], # The IP address of your VPS "DOMAINS": ALLOWED_HOSTS_PRODUCTION, # Edit domains in ALLOWED_HOSTS "REQUIREMENTS_PATH": "requirements.txt", # Project's pip requirements "LOCALE": "de_DE.UTF-8", # Should end with ".UTF-8" "DB_PASS": "h@cn8ExAvdFg!AFWyRULgOqdnXGS!@hcbEJumZSzoHL57Nrj7LwFaLtgo2UC", # Live database password "ADMIN_PASS": "3zX4sMLTbM@M5wxd4e39dCDp5cN!lBVOcFia$U8uJN9X4^r0comSY%1S^bigyo99!s&Yau", # Live admin user password "SECRET_KEY": SECRET_KEY, "NEVERCACHE_KEY": NEVERCACHE_KEY, "NGINX_AUTH_USER": "user", "NGINX_AUTH_PASS": "w4$Y%nMtu!W&04XiWPOFY6OZxVchx5", "CLOUDFLARE_ZONE": "example.com", "CLOUDFLARE_SUBDOMAIN": "cctv", "CLOUDFLARE_EMAIL": "name@server.com", "CLOUDFLARE_TOKEN": "0000000000000000000000000000000000000", }
debug = True secret_key = 't6e%#%(w!lg1@1bk1$lhh%q_d4h&z*s3utakds-bzu-3b(bebe' nevercache_key = 'dit-cgsc$(w%xx)z*=l1-1vtz%a6v1hwhv9jtlsm0_kcg(md0z' databases = {'default': {'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'dev.db', 'USER': '', 'PASSWORD': '', 'HOST': '', 'PORT': ''}} allowed_hosts_production = ['example.com'] fabric = {'DEPLOY_TOOL': 'git', 'SSH_PASS': 'yourpass', 'REPO_PATH': 'git@github.com:linuxluigi/Django_CCTV.git', 'SSH_USER': 'pi', 'HOSTS': ['django-cctv'], 'DOMAINS': ALLOWED_HOSTS_PRODUCTION, 'REQUIREMENTS_PATH': 'requirements.txt', 'LOCALE': 'de_DE.UTF-8', 'DB_PASS': 'h@cn8ExAvdFg!AFWyRULgOqdnXGS!@hcbEJumZSzoHL57Nrj7LwFaLtgo2UC', 'ADMIN_PASS': '3zX4sMLTbM@M5wxd4e39dCDp5cN!lBVOcFia$U8uJN9X4^r0comSY%1S^bigyo99!s&Yau', 'SECRET_KEY': SECRET_KEY, 'NEVERCACHE_KEY': NEVERCACHE_KEY, 'NGINX_AUTH_USER': 'user', 'NGINX_AUTH_PASS': 'w4$Y%nMtu!W&04XiWPOFY6OZxVchx5', 'CLOUDFLARE_ZONE': 'example.com', 'CLOUDFLARE_SUBDOMAIN': 'cctv', 'CLOUDFLARE_EMAIL': 'name@server.com', 'CLOUDFLARE_TOKEN': '0000000000000000000000000000000000000'}
lista = [] consoantes = 0 for i in range(10): lista.append(input("Digite uma letra: ").lower()) char = lista[i] if char not in ('a','e','i','o','u'): consoantes += 1 print(consoantes)
lista = [] consoantes = 0 for i in range(10): lista.append(input('Digite uma letra: ').lower()) char = lista[i] if char not in ('a', 'e', 'i', 'o', 'u'): consoantes += 1 print(consoantes)
ninjas = ( ("Kakashi", ["Raiton", "Doton", "Suiton", "Katon"]), ("Tobirama", ["Suiton", "Doton"]), ("Minato", ["Raiton", "Katon", "Futon"]), ("Naruto", ["Futon"]) ) print(ninjas[0]) print(ninjas[2][1])
ninjas = (('Kakashi', ['Raiton', 'Doton', 'Suiton', 'Katon']), ('Tobirama', ['Suiton', 'Doton']), ('Minato', ['Raiton', 'Katon', 'Futon']), ('Naruto', ['Futon'])) print(ninjas[0]) print(ninjas[2][1])
username = "" password = "" studentPassword = ""
username = '' password = '' student_password = ''
def who_eats_who(zoo_input): animals = {'antelope': ['grass'], 'big-fish': ['little-fish'], 'bug': ['leaves'], 'bear': ['big-fish', 'bug', 'chicken', 'cow', 'leaves', 'sheep'], 'chicken': ['bug'], 'cow': ['grass'], 'fox': ['chicken', 'sheep'], 'giraffe': ['leaves'], 'lion': ['antelope', 'cow'], 'panda': ['leaves'], 'sheep': ['grass']} zoo = zoo_input.split(',') output = [] i = 0 while True: try: if i - 1 < 0: raise IndexError elif zoo[i - 1] in animals.get(zoo[i], []): output.append('{} eats {}'.format(zoo[i], zoo.pop(i - 1))) i = 0 elif zoo[i + 1] in animals.get(zoo[i], []): output.append('{} eats {}'.format(zoo[i], zoo.pop(i + 1))) i = 0 else: i += 1 except IndexError: try: if zoo[i + 1] in animals.get(zoo[i], []): output.append('{} eats {}'.format(zoo[i], zoo.pop(i + 1))) i = 0 elif i < len(zoo) + 1: i += 1 except IndexError: output.append(','.join(zoo)) break return [zoo_input] + output zoo_animals = "fox,bug,chicken,grass,sheep" expected = ["fox,bug,chicken,grass,sheep", "chicken eats bug", "fox eats chicken", "sheep eats grass", "fox eats sheep", "fox"]
def who_eats_who(zoo_input): animals = {'antelope': ['grass'], 'big-fish': ['little-fish'], 'bug': ['leaves'], 'bear': ['big-fish', 'bug', 'chicken', 'cow', 'leaves', 'sheep'], 'chicken': ['bug'], 'cow': ['grass'], 'fox': ['chicken', 'sheep'], 'giraffe': ['leaves'], 'lion': ['antelope', 'cow'], 'panda': ['leaves'], 'sheep': ['grass']} zoo = zoo_input.split(',') output = [] i = 0 while True: try: if i - 1 < 0: raise IndexError elif zoo[i - 1] in animals.get(zoo[i], []): output.append('{} eats {}'.format(zoo[i], zoo.pop(i - 1))) i = 0 elif zoo[i + 1] in animals.get(zoo[i], []): output.append('{} eats {}'.format(zoo[i], zoo.pop(i + 1))) i = 0 else: i += 1 except IndexError: try: if zoo[i + 1] in animals.get(zoo[i], []): output.append('{} eats {}'.format(zoo[i], zoo.pop(i + 1))) i = 0 elif i < len(zoo) + 1: i += 1 except IndexError: output.append(','.join(zoo)) break return [zoo_input] + output zoo_animals = 'fox,bug,chicken,grass,sheep' expected = ['fox,bug,chicken,grass,sheep', 'chicken eats bug', 'fox eats chicken', 'sheep eats grass', 'fox eats sheep', 'fox']
class Subaccount(): def __init__(self, base): self.method = "" self.base = base def create(self, params={}): self.method = "createSubAccount" return self.base.request(self.method, params=params) def delete(self, params={}): self.method = "delSubAccount" return self.base.request(self.method, params=params) def fetch(self, params={}): self.method = "getSubAccounts" return self.base.request(self.method, params=params) def set(self, params={}): self.method = "setSubAccount" return self.base.request(self.method, params=params)
class Subaccount: def __init__(self, base): self.method = '' self.base = base def create(self, params={}): self.method = 'createSubAccount' return self.base.request(self.method, params=params) def delete(self, params={}): self.method = 'delSubAccount' return self.base.request(self.method, params=params) def fetch(self, params={}): self.method = 'getSubAccounts' return self.base.request(self.method, params=params) def set(self, params={}): self.method = 'setSubAccount' return self.base.request(self.method, params=params)
for x in range(3): print("Iteration" + str(x+1) + "of outer loop") for y in range(2): print(y+1) print("Out of inner loop") print("Out of outer loop")
for x in range(3): print('Iteration' + str(x + 1) + 'of outer loop') for y in range(2): print(y + 1) print('Out of inner loop') print('Out of outer loop')
s1=input() s2=input() s3=input() a = "".join(sorted(s1+s2)) b = "".join(sorted(s3)) if a==b: print("YES") else: print("NO")
s1 = input() s2 = input() s3 = input() a = ''.join(sorted(s1 + s2)) b = ''.join(sorted(s3)) if a == b: print('YES') else: print('NO')
p = 2 f = 1 MAXITER = 60000 def setup(): size(600, 600) this.surface.setTitle("Primzahl-Spirale") background(51) frameRate(1000) def draw(): colorMode(HSB) global p, f, i translate(width/2, height/2) noStroke() fill(p%255, 255, 255) # Satz von Wilson if f%p%2: x = p*sin(p)*0.005 y = p*cos(p)*0.005 ellipse(x, y, 2, 2) p += 1 f *= (p-2) if p > MAXITER: print("I did it, Babe!") noLoop()
p = 2 f = 1 maxiter = 60000 def setup(): size(600, 600) this.surface.setTitle('Primzahl-Spirale') background(51) frame_rate(1000) def draw(): color_mode(HSB) global p, f, i translate(width / 2, height / 2) no_stroke() fill(p % 255, 255, 255) if f % p % 2: x = p * sin(p) * 0.005 y = p * cos(p) * 0.005 ellipse(x, y, 2, 2) p += 1 f *= p - 2 if p > MAXITER: print('I did it, Babe!') no_loop()
lista=[1,2,3,4,5,6,7,8,8] l=len(lista) n=False for x in range(l): for y in range(l): if x!=y and lista[y]==lista[x]: n=True if n==True: print ('Yes') else: print('No')
lista = [1, 2, 3, 4, 5, 6, 7, 8, 8] l = len(lista) n = False for x in range(l): for y in range(l): if x != y and lista[y] == lista[x]: n = True if n == True: print('Yes') else: print('No')
class ConditionsMixin(object): conditions_url = 'conditions/conditions/' def list_conditions(self, **kwargs): return self.list(self.conditions_url, **kwargs) def index_conditions(self, **kwargs): kwargs.update({'list_route': 'index'}) return self.list(self.conditions_url, **kwargs) def retrieve_condition(self, pk): return self.retrieve(self.conditions_url, pk) def create_condition(self, data): return self.create(self.conditions_url, data) def update_condition(self, pk, data): return self.update(self.conditions_url, pk, data) def destroy_condition(self, pk): return self.destroy(self.conditions_url, pk)
class Conditionsmixin(object): conditions_url = 'conditions/conditions/' def list_conditions(self, **kwargs): return self.list(self.conditions_url, **kwargs) def index_conditions(self, **kwargs): kwargs.update({'list_route': 'index'}) return self.list(self.conditions_url, **kwargs) def retrieve_condition(self, pk): return self.retrieve(self.conditions_url, pk) def create_condition(self, data): return self.create(self.conditions_url, data) def update_condition(self, pk, data): return self.update(self.conditions_url, pk, data) def destroy_condition(self, pk): return self.destroy(self.conditions_url, pk)
# Copyright 2016 the V8 project authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # Use this to run several variants of the tests. ALL_VARIANT_FLAGS = { "default": [[]], "future": [["--future"]], "liftoff": [["--liftoff"]], "minor_mc": [["--minor-mc"]], "stress": [["--stress-opt", "--always-opt"]], # TODO(6792): Write protected code has been temporary added to the below # variant until the feature has been enabled (or staged) by default. "stress_incremental_marking": [["--stress-incremental-marking", "--write-protect-code-memory"]], # No optimization means disable all optimizations. OptimizeFunctionOnNextCall # would not force optimization too. It turns into a Nop. Please see # https://chromium-review.googlesource.com/c/452620/ for more discussion. "nooptimization": [["--noopt"]], "stress_background_compile": [["--background-compile", "--stress-background-compile"]], "wasm_traps": [["--wasm_trap_handler", "--invoke-weak-callbacks", "--wasm-jit-to-native"]], } # FAST_VARIANTS implies no --always-opt. FAST_VARIANT_FLAGS = dict( (k, [[f for f in v[0] if f != "--always-opt"]]) for k, v in ALL_VARIANT_FLAGS.iteritems() ) ALL_VARIANTS = set(ALL_VARIANT_FLAGS.keys())
all_variant_flags = {'default': [[]], 'future': [['--future']], 'liftoff': [['--liftoff']], 'minor_mc': [['--minor-mc']], 'stress': [['--stress-opt', '--always-opt']], 'stress_incremental_marking': [['--stress-incremental-marking', '--write-protect-code-memory']], 'nooptimization': [['--noopt']], 'stress_background_compile': [['--background-compile', '--stress-background-compile']], 'wasm_traps': [['--wasm_trap_handler', '--invoke-weak-callbacks', '--wasm-jit-to-native']]} fast_variant_flags = dict(((k, [[f for f in v[0] if f != '--always-opt']]) for (k, v) in ALL_VARIANT_FLAGS.iteritems())) all_variants = set(ALL_VARIANT_FLAGS.keys())
markup = var('Markup (%)', 0, '', number) if part.material: set_operation_name('{} Markup {}%'.format(part.material, markup)) markup_cost = get_price_value('--material--') * (markup / 100) PRICE = markup_cost DAYS = 0
markup = var('Markup (%)', 0, '', number) if part.material: set_operation_name('{} Markup {}%'.format(part.material, markup)) markup_cost = get_price_value('--material--') * (markup / 100) price = markup_cost days = 0
''' You are given an m x n binary matrix grid. An island is a group of 1's (representing land) connected 4-directionally (horizontal or vertical.) You may assume all four edges of the grid are surrounded by water. The area of an island is the number of cells with a value 1 in the island. Return the maximum area of an island in grid. If there is no island, return 0. Example: Input: grid = [[0,0,1,0,0,0,0,1,0,0,0,0,0], [0,0,0,0,0,0,0,1,1,1,0,0,0], [0,1,1,0,1,0,0,0,0,0,0,0,0], [0,1,0,0,1,1,0,0,1,0,1,0,0], [0,1,0,0,1,1,0,0,1,1,1,0,0], [0,0,0,0,0,0,0,0,0,0,1,0,0], [0,0,0,0,0,0,0,1,1,1,0,0,0], [0,0,0,0,0,0,0,1,1,0,0,0,0]] Output: 6 Explanation: The answer is not 11, because the island must be connected 4-directionally. Example: Input: grid = [[0,0,0,0,0,0,0,0]] Output: 0 Constraints: - m == grid.length - n == grid[i].length - 1 <= m, n <= 50 - grid[i][j] is either 0 or 1. ''' #Difficulty: Medium #728 / 728 test cases passed. #Runtime: 160 ms #Memory Usage: 16.3 MB #Runtime: 160 ms, faster than 23.97% of Python3 online submissions for Max Area of Island. #Memory Usage: 16.3 MB, less than 60.97% of Python3 online submissions for Max Area of Island. class Solution: def maxAreaOfIsland(self, grid: List[List[int]]) -> int: maxAreaOfIsland = 0 for i in range(len(grid)): for j in range(len(grid[i])): if grid[i][j] == 1: self.area = 0 self.dfs(grid, i, j) maxAreaOfIsland = max(maxAreaOfIsland, self.area) return maxAreaOfIsland def dfs(self, grid, row, col): if row < 0 or row > len(grid) - 1 or col < 0 or col > len(grid[row]) - 1 or grid[row][col] == 0: return grid[row][col] = 0 self.area += 1 self.dfs(grid, row, col - 1) self.dfs(grid, row - 1, col) self.dfs(grid, row, col + 1) self.dfs(grid, row + 1, col)
""" You are given an m x n binary matrix grid. An island is a group of 1's (representing land) connected 4-directionally (horizontal or vertical.) You may assume all four edges of the grid are surrounded by water. The area of an island is the number of cells with a value 1 in the island. Return the maximum area of an island in grid. If there is no island, return 0. Example: Input: grid = [[0,0,1,0,0,0,0,1,0,0,0,0,0], [0,0,0,0,0,0,0,1,1,1,0,0,0], [0,1,1,0,1,0,0,0,0,0,0,0,0], [0,1,0,0,1,1,0,0,1,0,1,0,0], [0,1,0,0,1,1,0,0,1,1,1,0,0], [0,0,0,0,0,0,0,0,0,0,1,0,0], [0,0,0,0,0,0,0,1,1,1,0,0,0], [0,0,0,0,0,0,0,1,1,0,0,0,0]] Output: 6 Explanation: The answer is not 11, because the island must be connected 4-directionally. Example: Input: grid = [[0,0,0,0,0,0,0,0]] Output: 0 Constraints: - m == grid.length - n == grid[i].length - 1 <= m, n <= 50 - grid[i][j] is either 0 or 1. """ class Solution: def max_area_of_island(self, grid: List[List[int]]) -> int: max_area_of_island = 0 for i in range(len(grid)): for j in range(len(grid[i])): if grid[i][j] == 1: self.area = 0 self.dfs(grid, i, j) max_area_of_island = max(maxAreaOfIsland, self.area) return maxAreaOfIsland def dfs(self, grid, row, col): if row < 0 or row > len(grid) - 1 or col < 0 or (col > len(grid[row]) - 1) or (grid[row][col] == 0): return grid[row][col] = 0 self.area += 1 self.dfs(grid, row, col - 1) self.dfs(grid, row - 1, col) self.dfs(grid, row, col + 1) self.dfs(grid, row + 1, col)
def teardown_function(function): pass def test(): pass
def teardown_function(function): pass def test(): pass
''' 937. Reorder Data in Log Files You have an array of logs. Each log is a space delimited string of words. For each log, the first word in each log is an alphanumeric identifier. Then, either: Each word after the identifier will consist only of lowercase letters, or; Each word after the identifier will consist only of digits. We will call these two varieties of logs letter-logs and digit-logs. It is guaranteed that each log has at least one word after its identifier. Reorder the logs so that all of the letter-logs come before any digit-log. The letter-logs are ordered lexicographically ignoring identifier, with the identifier used in case of ties. The digit-logs should be put in their original order. Return the final order of the logs. Example 1: Input: logs = ["dig1 8 1 5 1","let1 art can","dig2 3 6","let2 own kit dig","let3 art zero"] Output: ["let1 art can","let3 art zero","let2 own kit dig","dig1 8 1 5 1","dig2 3 6"] Constraints: 0 <= logs.length <= 100 3 <= logs[i].length <= 100 logs[i] is guaranteed to have an identifier, and a word after the identifier. ''' class Solution: def reorderLogFiles(self, logs: List[str]) -> List[str]: dig_log = [] let_log = [] for log in logs: if log.split(' ')[1].isalpha(): let_log.append(log) else: dig_log.append(log) # Sort the first part of letter logs let_log.sort(key=lambda x: x.split(' ')[0]) # Sort by remaining letter logs let_log.sort(key=lambda x: x.split(' ')[1:]) # Append the digit log let_log.extend(dig_log) return let_log
""" 937. Reorder Data in Log Files You have an array of logs. Each log is a space delimited string of words. For each log, the first word in each log is an alphanumeric identifier. Then, either: Each word after the identifier will consist only of lowercase letters, or; Each word after the identifier will consist only of digits. We will call these two varieties of logs letter-logs and digit-logs. It is guaranteed that each log has at least one word after its identifier. Reorder the logs so that all of the letter-logs come before any digit-log. The letter-logs are ordered lexicographically ignoring identifier, with the identifier used in case of ties. The digit-logs should be put in their original order. Return the final order of the logs. Example 1: Input: logs = ["dig1 8 1 5 1","let1 art can","dig2 3 6","let2 own kit dig","let3 art zero"] Output: ["let1 art can","let3 art zero","let2 own kit dig","dig1 8 1 5 1","dig2 3 6"] Constraints: 0 <= logs.length <= 100 3 <= logs[i].length <= 100 logs[i] is guaranteed to have an identifier, and a word after the identifier. """ class Solution: def reorder_log_files(self, logs: List[str]) -> List[str]: dig_log = [] let_log = [] for log in logs: if log.split(' ')[1].isalpha(): let_log.append(log) else: dig_log.append(log) let_log.sort(key=lambda x: x.split(' ')[0]) let_log.sort(key=lambda x: x.split(' ')[1:]) let_log.extend(dig_log) return let_log
def parenMenu(choices,prompt="> "): i = 0 for item in choices: i += 1 print("{!s}) {!s}".format(i,item)) while True: try: choice = int(raw_input(prompt)) choice -= 1 if choice in [x for x in range(0,len(choices))]: return choice except: continue
def paren_menu(choices, prompt='> '): i = 0 for item in choices: i += 1 print('{!s}) {!s}'.format(i, item)) while True: try: choice = int(raw_input(prompt)) choice -= 1 if choice in [x for x in range(0, len(choices))]: return choice except: continue
print('==============Calculadora de diretamente proporcional==============') num1=int(input('escolha o primeiro numeros:')) num2=int(input('escolha o segundo numeros:')) num3=int(input('escolha o terceiro numeros:')) total=int(input('qual o total:')) b=num2/num1 c=num3/num1 result=1+b+c result2=total/result result3=b*result2 result4=c*result2 print(num1,':',result2,'\t','//',num2,':',result3,'\t','//',num3,':',result4)
print('==============Calculadora de diretamente proporcional==============') num1 = int(input('escolha o primeiro numeros:')) num2 = int(input('escolha o segundo numeros:')) num3 = int(input('escolha o terceiro numeros:')) total = int(input('qual o total:')) b = num2 / num1 c = num3 / num1 result = 1 + b + c result2 = total / result result3 = b * result2 result4 = c * result2 print(num1, ':', result2, '\t', '//', num2, ':', result3, '\t', '//', num3, ':', result4)
class Sample: def __init__(self, num: int) -> None: self.num = num def __add__(self, other: "Sample") -> int: return self.num + other.num
class Sample: def __init__(self, num: int) -> None: self.num = num def __add__(self, other: 'Sample') -> int: return self.num + other.num
#!/usr/local/bin/python3.3 X = 88 print(X) def func(): global X X = 99 return func() print(X) y, z = 1, 2 def func2(): global x x = y + z return x print(func2()) y, z = 3, 4 print(func2())
x = 88 print(X) def func(): global X x = 99 return func() print(X) (y, z) = (1, 2) def func2(): global x x = y + z return x print(func2()) (y, z) = (3, 4) print(func2())
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: def sumEvenGrandparent(self, root: TreeNode) -> int: ans = 0 def dfs(node, gp=None, p=None): if node is not None: if gp is not None and gp.val % 2 == 0: nonlocal ans ans += node.val dfs(node.left, p, node) dfs(node.right, p, node) dfs(root) return ans
class Solution: def sum_even_grandparent(self, root: TreeNode) -> int: ans = 0 def dfs(node, gp=None, p=None): if node is not None: if gp is not None and gp.val % 2 == 0: nonlocal ans ans += node.val dfs(node.left, p, node) dfs(node.right, p, node) dfs(root) return ans
# uncompyle6 version 2.9.10 # Python bytecode 2.6 (62161) # Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10) # [GCC 6.2.0 20161005] # Embedded file name: c:\Temp\build\ZIBE\pyreadline\error.py # Compiled at: 2011-06-23 17:25:54 class ReadlineError(Exception): pass class GetSetError(ReadlineError): pass
class Readlineerror(Exception): pass class Getseterror(ReadlineError): pass
def page_layout(): response.headers['Content-Type']='text/css' boxes = get_boxes_on_page(request.vars.id) contents = "" for box in boxes : contents += ".cbox#c%(id)s { top:%(y)sem; left:%(x)sem; height:%(h)sem; width:%(w)sem; } \n"%dict(id=box.id, x=box.position_x, y=box.position_y, h=box.height, w=box.width) return dict(contents=contents)
def page_layout(): response.headers['Content-Type'] = 'text/css' boxes = get_boxes_on_page(request.vars.id) contents = '' for box in boxes: contents += '.cbox#c%(id)s { top:%(y)sem; left:%(x)sem; height:%(h)sem; width:%(w)sem; } \n' % dict(id=box.id, x=box.position_x, y=box.position_y, h=box.height, w=box.width) return dict(contents=contents)
############################################################################ # ##ABSOLUTE CORDINATE to screed CONVERSTION ############################################################################ def CorToSrc(x, y, ylen): i = ylen-1-y return(x, i) ############################################################################ # ##MATRIX TO ABSOLUTE CORDINATE CONVERSTION ############################################################################ def CorToMat(x, y, ylen): j = x i = ylen-1-y return(i, j) ############################################################################ # ##MATRIX TO ABSOLUTE CORDINATE CONVERSTION ############################################################################ def MatToCor(i, j, ylen): x = j y = ylen-1-i return (x, y) def giveAbsAngle(angle): if(angle < 0): return 360+angle elif(angle > 359): return angle-360 return angle
def cor_to_src(x, y, ylen): i = ylen - 1 - y return (x, i) def cor_to_mat(x, y, ylen): j = x i = ylen - 1 - y return (i, j) def mat_to_cor(i, j, ylen): x = j y = ylen - 1 - i return (x, y) def give_abs_angle(angle): if angle < 0: return 360 + angle elif angle > 359: return angle - 360 return angle
text = "The black cat climbed the green tree." print(text.index("c")) # 7 print(text.index("c", 8)) # 10 next c after index 8 print(text.index("gr", 8)) # 26 print(text.index("gr", 8, 16))
text = 'The black cat climbed the green tree.' print(text.index('c')) print(text.index('c', 8)) print(text.index('gr', 8)) print(text.index('gr', 8, 16))
class yin: pass class yang: def __del__(self): print("yang destruido") print("?")
class Yin: pass class Yang: def __del__(self): print('yang destruido') print('?')
def dicts_from_table(keys, array_of_values): dicts = [] for values in array_of_values: dicts.append({key: value for key, value in zip(keys, values)}) return dicts
def dicts_from_table(keys, array_of_values): dicts = [] for values in array_of_values: dicts.append({key: value for (key, value) in zip(keys, values)}) return dicts
''' Backtracking: Backtracking is a general algorithm for finding all (or some) solutions to some computational problems, notably constraint satisfaction problems. Problem statement: Given a set of n integers, divide the set into 2 halves such a way that the difference of sum of 2 sets is minimum. Input formate: Line1: Number of test casses Line2: The length of the array Line3: space seperated array elements Output formate: The 2 array subsets Method: Backtracking Intuition: As there can be any possibility we try to check all the possible chances of forming subarrays according to the given possibility. We intent to form one subset and push the rest of the elements to the other subset. For every element that we iterate through there are 2 possibilities 1) Belongs to first subset 2) Dosent belong to first subset While iterating we also check for the best solution so far and update it. Argument: int,Array return: Array ''' def utilfun(arr,n,curr,num,sol,min_diff,sumn,curr_sum,pos): ''' Here the arr is the input and n is its size curr is an arr containing curr elements in first subset and num is the length sol is the final boolean arr; true means the element is in the first subset sumn is tracking the sum of the first subset ''' #Base Case1 :check if the array is out of bound if(pos==n): return #Base Case2 :check if the number of elements is not less than the number of elements int he solution if ((int(n/2)-num)>(n-pos)): return #case1: when current element is not in the solution utilfun(arr,n,curr,num,sol,min_diff,sumn,curr_sum,pos+1) #case2: when the current element belongs to first subset num+=1 curr_sum+=arr[pos] curr[pos]=True #checking if we got the desired subset array length if(num==int(n/2)): #checking if the solution is better or not so far if(abs(int(sumn/2)-curr_sum)<min_diff[0]): min_diff[0]=abs(int(sumn/2)-curr_sum) for i in range(n): sol[i]=curr[i] else: utilfun(arr,n,curr,num,sol,min_diff,sumn,curr_sum,pos+1) curr[pos]=False def tugofwar(arr,n): curr=[False]*n sol=[False]*n min_diff=[999999999] sumn=0 for i in range(n): sumn+=arr[i] utilfun(arr, n, curr, 0, sol, min_diff, sumn, 0, 0) return sol # driver code def main(): for _ in range(int(input())): n=int(input()) arr=list(map(int,input().split())) sol=tugofwar(arr, n) print("First subset is: ",end="") for i in range(n): if(sol[i]==True): print(arr[i],end=" ") print("\n") print("Second subset is: ",end="") for i in range(n): if(sol[i]==False): print(arr[i],end=" ") print("\n") if __name__ == '__main__': main() ''' Sample Input: 1 11 23 45 -34 12 0 98 -99 4 189 -1 4 Sample output: First Subset is: 45 -34 12 98 -1 Second subset is: 23 0 -99 4 189 4 Time Complexity: O(n^2) Space Complexity: O(n) '''
""" Backtracking: Backtracking is a general algorithm for finding all (or some) solutions to some computational problems, notably constraint satisfaction problems. Problem statement: Given a set of n integers, divide the set into 2 halves such a way that the difference of sum of 2 sets is minimum. Input formate: Line1: Number of test casses Line2: The length of the array Line3: space seperated array elements Output formate: The 2 array subsets Method: Backtracking Intuition: As there can be any possibility we try to check all the possible chances of forming subarrays according to the given possibility. We intent to form one subset and push the rest of the elements to the other subset. For every element that we iterate through there are 2 possibilities 1) Belongs to first subset 2) Dosent belong to first subset While iterating we also check for the best solution so far and update it. Argument: int,Array return: Array """ def utilfun(arr, n, curr, num, sol, min_diff, sumn, curr_sum, pos): """ Here the arr is the input and n is its size curr is an arr containing curr elements in first subset and num is the length sol is the final boolean arr; true means the element is in the first subset sumn is tracking the sum of the first subset """ if pos == n: return if int(n / 2) - num > n - pos: return utilfun(arr, n, curr, num, sol, min_diff, sumn, curr_sum, pos + 1) num += 1 curr_sum += arr[pos] curr[pos] = True if num == int(n / 2): if abs(int(sumn / 2) - curr_sum) < min_diff[0]: min_diff[0] = abs(int(sumn / 2) - curr_sum) for i in range(n): sol[i] = curr[i] else: utilfun(arr, n, curr, num, sol, min_diff, sumn, curr_sum, pos + 1) curr[pos] = False def tugofwar(arr, n): curr = [False] * n sol = [False] * n min_diff = [999999999] sumn = 0 for i in range(n): sumn += arr[i] utilfun(arr, n, curr, 0, sol, min_diff, sumn, 0, 0) return sol def main(): for _ in range(int(input())): n = int(input()) arr = list(map(int, input().split())) sol = tugofwar(arr, n) print('First subset is: ', end='') for i in range(n): if sol[i] == True: print(arr[i], end=' ') print('\n') print('Second subset is: ', end='') for i in range(n): if sol[i] == False: print(arr[i], end=' ') print('\n') if __name__ == '__main__': main() '\nSample Input:\n1\n11\n23 45 -34 12 0 98 -99 4 189 -1 4\n\nSample output:\nFirst Subset is: 45 -34 12 98 -1\nSecond subset is: 23 0 -99 4 189 4\n\nTime Complexity: O(n^2)\nSpace Complexity: O(n)\n'
# flake8: noqa # http://patorjk.com/software/taag/#p=display&f=Big&t=Monero # http://patorjk.com/software/taag/#p=display&f=Big&t=XMR.to __xmrto__ = ( " __ ____ __ _____ _ \n" " \ \ / / \/ | __ \ | | \n" " \ V /| \ / | |__) || |_ ___ \n" " > < | |\/| | _ / | __/ _ \ \n" " / . \| | | | | \ \ | || (_) | \n" " /_/ \_\_| |_|_| \_(_)__\___/ \n" ) __monero__ = ( " __ __ \n" " | \/ | \n" " | \ / | ___ _ __ ___ _ __ ___ \n" " | |\/| |/ _ \| '_ \ / _ \ '__/ _ \ \n" " | | | | (_) | | | | __/ | | (_) | \n" " |_| |_|\___/|_| |_|\___|_| \___/ \n" ) __complete__ = __xmrto__ + __monero__
__xmrto__ = ' __ ____ __ _____ _ \n \\ \\ / / \\/ | __ \\ | | \n \\ V /| \\ / | |__) || |_ ___ \n > < | |\\/| | _ / | __/ _ \\ \n / . \\| | | | | \\ \\ | || (_) | \n /_/ \\_\\_| |_|_| \\_(_)__\\___/ \n' __monero__ = " __ __ \n | \\/ | \n | \\ / | ___ _ __ ___ _ __ ___ \n | |\\/| |/ _ \\| '_ \\ / _ \\ '__/ _ \\ \n | | | | (_) | | | | __/ | | (_) | \n |_| |_|\\___/|_| |_|\\___|_| \\___/ \n" __complete__ = __xmrto__ + __monero__
#!/usr/bin/env python3 left = pd.DataFrame({'key1': ['foo', 'foo', 'bar'], 'key2': ['one', 'two', 'one'], 'lval': [1, 2, 3]}) right = pd.DataFrame({'key1': ['foo', 'foo', 'bar', 'bar'], 'key2': ['one', 'one', 'one', 'two'], 'rval': [4, 5, 6, 7]})
left = pd.DataFrame({'key1': ['foo', 'foo', 'bar'], 'key2': ['one', 'two', 'one'], 'lval': [1, 2, 3]}) right = pd.DataFrame({'key1': ['foo', 'foo', 'bar', 'bar'], 'key2': ['one', 'one', 'one', 'two'], 'rval': [4, 5, 6, 7]})
''' Kattis - peasoup Just check membership in set. Time: O(sum(m) + n), Space: O(m) ''' n = int(input()) for _ in range(n): m = int(input()) name = input() s = set(input() for i in range(m)) if "pea soup" in s and "pancakes" in s: print(name) exit() print("Anywhere is fine I guess")
""" Kattis - peasoup Just check membership in set. Time: O(sum(m) + n), Space: O(m) """ n = int(input()) for _ in range(n): m = int(input()) name = input() s = set((input() for i in range(m))) if 'pea soup' in s and 'pancakes' in s: print(name) exit() print('Anywhere is fine I guess')
#sel_muni_name = "Giv'atayim" sel_muni_name = "Rishon LeZiyyon" # RLZ analysis_locs = [ {'name': 'RLZ_center_HertzelxRothchild', 'loc': ['31.963961', '34.803033'] }, {'name': 'RLZ_Azrieli_Rishonim', 'loc': ['31.949232', '34.803299'] }, {'name': 'RLZ_Canyon_Hazahav', 'loc': ['31.990121', '34.774849'] }, {'name': 'Moshe_Dayan_Train_Station', 'loc': ['31.987453', '34.757259'] }, {'name': 'ramathahayal', 'loc': ['32.10959', '34.83878'] }, {'name': 'Tel_Aviv_City_Hall', 'loc': ['32.081656', '34.781205'] }, {'name': 'hashalom_Azrieli_Tel_Aviv', 'loc': ['32.073600', '34.790000'] } ] ''' {'name': 'RLZ_center_HertzelxRothchild', 'loc': ['31.963961', '34.803033'] }, {'name': 'RLZ_Azrieli_Rishonim', 'loc': ['31.949232', '34.803299'] } {'name': 'RLZ_Canyon_Hazahav', 'loc': ['31.990121', '34.774849'] }, {'name': 'RLZ_Ikea', 'loc': ['31.951411', '34.771101'] }, {'name': 'Moshe_Dayan_Train_Station', 'loc': ['31.987453', '34.757259'] }, {'name': 'Tel_Aviv_City_Hall', 'loc': ['32.081656', '34.781205'] }, {'name': 'hashalom_Azrieli_Tel_Aviv', 'loc': ['32.073600', '34.790000'] }, {'name': 'TAU', 'loc': ['32.11249', '34.80559'] }, {'name': 'ramathahayal', 'loc': ['32.10959', '34.83878'] }, ''' gtfsdate1 = '20190526' servicedate1 = '20190526' gtfsdate2 = '20210425' servicedate2 = '20210425' analysis_time = '080000' percentofarealist = ['25','50','75'] local_url = "http://localhost:9191/v1/coverage/" munifilein = 'built_area_in_muni2017simplifyed50.geojson' #On demand date on local pc get_service_date = 'on_demand' processedpath = 'processed' mobilitypath = 'mobility' # transit_time_map config default_coverage_name = 'default' secondary_custom_coverage_name = 'secondary-cov' on_demand_coverage_prefix = 'ondemand-' time_map_server_local_url = "http://localhost:9191/v1/coverage/"
sel_muni_name = 'Rishon LeZiyyon' analysis_locs = [{'name': 'RLZ_center_HertzelxRothchild', 'loc': ['31.963961', '34.803033']}, {'name': 'RLZ_Azrieli_Rishonim', 'loc': ['31.949232', '34.803299']}, {'name': 'RLZ_Canyon_Hazahav', 'loc': ['31.990121', '34.774849']}, {'name': 'Moshe_Dayan_Train_Station', 'loc': ['31.987453', '34.757259']}, {'name': 'ramathahayal', 'loc': ['32.10959', '34.83878']}, {'name': 'Tel_Aviv_City_Hall', 'loc': ['32.081656', '34.781205']}, {'name': 'hashalom_Azrieli_Tel_Aviv', 'loc': ['32.073600', '34.790000']}] "\n {'name': 'RLZ_center_HertzelxRothchild', 'loc': ['31.963961', '34.803033'] },\n {'name': 'RLZ_Azrieli_Rishonim', 'loc': ['31.949232', '34.803299'] }\n {'name': 'RLZ_Canyon_Hazahav', 'loc': ['31.990121', '34.774849'] },\n {'name': 'RLZ_Ikea', 'loc': ['31.951411', '34.771101'] }, \n {'name': 'Moshe_Dayan_Train_Station', 'loc': ['31.987453', '34.757259'] }, \n {'name': 'Tel_Aviv_City_Hall', 'loc': ['32.081656', '34.781205'] }, \n {'name': 'hashalom_Azrieli_Tel_Aviv', 'loc': ['32.073600', '34.790000'] }, \n {'name': 'TAU', 'loc': ['32.11249', '34.80559'] }, \n {'name': 'ramathahayal', 'loc': ['32.10959', '34.83878'] }, \n" gtfsdate1 = '20190526' servicedate1 = '20190526' gtfsdate2 = '20210425' servicedate2 = '20210425' analysis_time = '080000' percentofarealist = ['25', '50', '75'] local_url = 'http://localhost:9191/v1/coverage/' munifilein = 'built_area_in_muni2017simplifyed50.geojson' get_service_date = 'on_demand' processedpath = 'processed' mobilitypath = 'mobility' default_coverage_name = 'default' secondary_custom_coverage_name = 'secondary-cov' on_demand_coverage_prefix = 'ondemand-' time_map_server_local_url = 'http://localhost:9191/v1/coverage/'
class HumioException(Exception): pass class HumioConnectionException(HumioException): pass class HumioHTTPException(HumioException): def __init__(self, message, status_code=None): self.message = message self.status_code = status_code class HumioTimeoutException(HumioException): pass class HumioConnectionDroppedException(HumioException): pass class HumioQueryJobExhaustedException(HumioException): pass class HumioQueryJobExpiredException(HumioException): pass
class Humioexception(Exception): pass class Humioconnectionexception(HumioException): pass class Humiohttpexception(HumioException): def __init__(self, message, status_code=None): self.message = message self.status_code = status_code class Humiotimeoutexception(HumioException): pass class Humioconnectiondroppedexception(HumioException): pass class Humioqueryjobexhaustedexception(HumioException): pass class Humioqueryjobexpiredexception(HumioException): pass
def fails(): x = 1 / 0 try: fails() except Exception as e: print(type(e)) print(e) print(e.args)
def fails(): x = 1 / 0 try: fails() except Exception as e: print(type(e)) print(e) print(e.args)
# # PySNMP MIB module A3COM-HUAWEI-BLG-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/A3COM-HUAWEI-BLG-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 16:49:09 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) # h3cCommon, = mibBuilder.importSymbols("A3COM-HUAWEI-OID-MIB", "h3cCommon") ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsUnion, ValueSizeConstraint, SingleValueConstraint, ValueRangeConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "ValueSizeConstraint", "SingleValueConstraint", "ValueRangeConstraint", "ConstraintsIntersection") ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup") MibScalar, MibTable, MibTableRow, MibTableColumn, Gauge32, Unsigned32, ObjectIdentity, IpAddress, ModuleIdentity, Counter64, TimeTicks, iso, MibIdentifier, NotificationType, Integer32, Counter32, Bits = mibBuilder.importSymbols("SNMPv2-SMI", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Gauge32", "Unsigned32", "ObjectIdentity", "IpAddress", "ModuleIdentity", "Counter64", "TimeTicks", "iso", "MibIdentifier", "NotificationType", "Integer32", "Counter32", "Bits") TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString") h3cBlg = ModuleIdentity((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 108)) h3cBlg.setRevisions(('2009-09-15 11:11',)) if mibBuilder.loadTexts: h3cBlg.setLastUpdated('200909151111Z') if mibBuilder.loadTexts: h3cBlg.setOrganization('H3C Technologies Co., Ltd.') class CounterClear(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2)) namedValues = NamedValues(("cleared", 1), ("nouse", 2)) h3cBlgObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 108, 1)) h3cBlgStatsTable = MibTable((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 108, 1, 1), ) if mibBuilder.loadTexts: h3cBlgStatsTable.setStatus('current') h3cBlgStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 108, 1, 1, 1), ).setIndexNames((0, "A3COM-HUAWEI-BLG-MIB", "h3cBlgIndex")) if mibBuilder.loadTexts: h3cBlgStatsEntry.setStatus('current') h3cBlgIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 108, 1, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647))) if mibBuilder.loadTexts: h3cBlgIndex.setStatus('current') h3cBlgGroupTxPacketCount = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 108, 1, 1, 1, 2), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cBlgGroupTxPacketCount.setStatus('current') h3cBlgGroupRxPacketCount = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 108, 1, 1, 1, 3), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cBlgGroupRxPacketCount.setStatus('current') h3cBlgGroupTxByteCount = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 108, 1, 1, 1, 4), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cBlgGroupTxByteCount.setStatus('current') h3cBlgGroupRxByteCount = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 108, 1, 1, 1, 5), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cBlgGroupRxByteCount.setStatus('current') h3cBlgGroupCountClear = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 108, 1, 1, 1, 6), CounterClear()).setMaxAccess("readwrite") if mibBuilder.loadTexts: h3cBlgGroupCountClear.setStatus('current') mibBuilder.exportSymbols("A3COM-HUAWEI-BLG-MIB", h3cBlg=h3cBlg, h3cBlgObjects=h3cBlgObjects, h3cBlgStatsEntry=h3cBlgStatsEntry, h3cBlgGroupTxPacketCount=h3cBlgGroupTxPacketCount, h3cBlgGroupRxByteCount=h3cBlgGroupRxByteCount, PYSNMP_MODULE_ID=h3cBlg, CounterClear=CounterClear, h3cBlgGroupTxByteCount=h3cBlgGroupTxByteCount, h3cBlgIndex=h3cBlgIndex, h3cBlgStatsTable=h3cBlgStatsTable, h3cBlgGroupRxPacketCount=h3cBlgGroupRxPacketCount, h3cBlgGroupCountClear=h3cBlgGroupCountClear)
(h3c_common,) = mibBuilder.importSymbols('A3COM-HUAWEI-OID-MIB', 'h3cCommon') (object_identifier, integer, octet_string) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'Integer', 'OctetString') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_union, value_size_constraint, single_value_constraint, value_range_constraint, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsUnion', 'ValueSizeConstraint', 'SingleValueConstraint', 'ValueRangeConstraint', 'ConstraintsIntersection') (module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup') (mib_scalar, mib_table, mib_table_row, mib_table_column, gauge32, unsigned32, object_identity, ip_address, module_identity, counter64, time_ticks, iso, mib_identifier, notification_type, integer32, counter32, bits) = mibBuilder.importSymbols('SNMPv2-SMI', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Gauge32', 'Unsigned32', 'ObjectIdentity', 'IpAddress', 'ModuleIdentity', 'Counter64', 'TimeTicks', 'iso', 'MibIdentifier', 'NotificationType', 'Integer32', 'Counter32', 'Bits') (textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString') h3c_blg = module_identity((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 108)) h3cBlg.setRevisions(('2009-09-15 11:11',)) if mibBuilder.loadTexts: h3cBlg.setLastUpdated('200909151111Z') if mibBuilder.loadTexts: h3cBlg.setOrganization('H3C Technologies Co., Ltd.') class Counterclear(TextualConvention, Integer32): status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2)) named_values = named_values(('cleared', 1), ('nouse', 2)) h3c_blg_objects = mib_identifier((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 108, 1)) h3c_blg_stats_table = mib_table((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 108, 1, 1)) if mibBuilder.loadTexts: h3cBlgStatsTable.setStatus('current') h3c_blg_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 108, 1, 1, 1)).setIndexNames((0, 'A3COM-HUAWEI-BLG-MIB', 'h3cBlgIndex')) if mibBuilder.loadTexts: h3cBlgStatsEntry.setStatus('current') h3c_blg_index = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 108, 1, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647))) if mibBuilder.loadTexts: h3cBlgIndex.setStatus('current') h3c_blg_group_tx_packet_count = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 108, 1, 1, 1, 2), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cBlgGroupTxPacketCount.setStatus('current') h3c_blg_group_rx_packet_count = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 108, 1, 1, 1, 3), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cBlgGroupRxPacketCount.setStatus('current') h3c_blg_group_tx_byte_count = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 108, 1, 1, 1, 4), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cBlgGroupTxByteCount.setStatus('current') h3c_blg_group_rx_byte_count = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 108, 1, 1, 1, 5), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cBlgGroupRxByteCount.setStatus('current') h3c_blg_group_count_clear = mib_table_column((1, 3, 6, 1, 4, 1, 43, 45, 1, 10, 2, 108, 1, 1, 1, 6), counter_clear()).setMaxAccess('readwrite') if mibBuilder.loadTexts: h3cBlgGroupCountClear.setStatus('current') mibBuilder.exportSymbols('A3COM-HUAWEI-BLG-MIB', h3cBlg=h3cBlg, h3cBlgObjects=h3cBlgObjects, h3cBlgStatsEntry=h3cBlgStatsEntry, h3cBlgGroupTxPacketCount=h3cBlgGroupTxPacketCount, h3cBlgGroupRxByteCount=h3cBlgGroupRxByteCount, PYSNMP_MODULE_ID=h3cBlg, CounterClear=CounterClear, h3cBlgGroupTxByteCount=h3cBlgGroupTxByteCount, h3cBlgIndex=h3cBlgIndex, h3cBlgStatsTable=h3cBlgStatsTable, h3cBlgGroupRxPacketCount=h3cBlgGroupRxPacketCount, h3cBlgGroupCountClear=h3cBlgGroupCountClear)
def command(*command_list): def add_attribute(function): function.command_list = command_list return function return add_attribute
def command(*command_list): def add_attribute(function): function.command_list = command_list return function return add_attribute
class Solution: def countOrders(self, n: int) -> int: @functools.cache def totalWays(unpicked, undelivered): if not unpicked and not undelivered: # We have completed all orders. return 1 if (unpicked < 0 or undelivered < 0 or undelivered < unpicked): # We can't pick or deliver more than N items # Number of deliveries can't exceed number of pickups # as we can only deliver after a pickup. return 0 # Count all choices of picking up an order. ans = unpicked * totalWays(unpicked - 1, undelivered) ans %= MOD # Count all choices of delivering a picked order. ans += (undelivered - unpicked) * \ totalWays(unpicked, undelivered - 1) ans %= MOD return ans MOD = 1_000_000_007 return totalWays(n, n)
class Solution: def count_orders(self, n: int) -> int: @functools.cache def total_ways(unpicked, undelivered): if not unpicked and (not undelivered): return 1 if unpicked < 0 or undelivered < 0 or undelivered < unpicked: return 0 ans = unpicked * total_ways(unpicked - 1, undelivered) ans %= MOD ans += (undelivered - unpicked) * total_ways(unpicked, undelivered - 1) ans %= MOD return ans mod = 1000000007 return total_ways(n, n)
lista = [] for x in range(0, 4+1): num = int(input("Informe um valor: ")) if x == 0 or num > lista[-1]: lista.append(num) else: pos = 0 while pos < len(lista): if num <= lista[pos]: lista.insert(pos, num) break pos += 1 print('-' * 30) print(lista)
lista = [] for x in range(0, 4 + 1): num = int(input('Informe um valor: ')) if x == 0 or num > lista[-1]: lista.append(num) else: pos = 0 while pos < len(lista): if num <= lista[pos]: lista.insert(pos, num) break pos += 1 print('-' * 30) print(lista)
A, B = map(int, input().split()) C, D = A // B, A % B if A != 0 and D < 0: C, D = C + 1, D - B print(C) print(D)
(a, b) = map(int, input().split()) (c, d) = (A // B, A % B) if A != 0 and D < 0: (c, d) = (C + 1, D - B) print(C) print(D)
#: Common folder in which all data are stored BASE_FOLDER = r'/Users/mdartiailh/Labber/Data/2019/11/Data_1114' #: Name of the sample and associated parameters as a dict. #: The currently expected keys are: #: - path #: - Tc (in K) #: - gap size (in nm) SAMPLES = {"JJ200": {"path": "JS129D_BM001_030.hdf5", "Tc": 1.44, "gap size": 200}, "JJ1000": {"path": "JS129D_BM001_032.hdf5", "Tc": 1.44, "gap size": 1000}, "JJ500": {"path": "JS129D_BM001_033.hdf5", "Tc": 1.44, "gap size": 500}, "JJ100": {"path": "JS129D_BM001_034.hdf5", "Tc": 1.44, "gap size": 100}, "JJ50": {"path": "JS129D_BM001_035.hdf5", "Tc": 1.44, "gap size": 50}, } #: Path to the file in which to write the output OUTPUT = "/Users/mdartiailh/Documents/PostDocNYU/DataAnalysis/JJ/JS129/results.csv" #: For all the following parameters one can use a dictionary with sample names #: as keys can be used. #: Name or index of the column containing the voltage bias data. #: This should be a stepped channel ! use the applied voltage not the #: measured current BIAS_NAME = 0 #: Name or index of the column containing the voltage data VOLTAGE_NAME = {"JJ200": 1, "JJ1000": 2, "JJ500": 2, "JJ100": 2, "JJ50": 2, } #: Name or index of the column containing the counter value for scans with #: multiple traces (use None if absent). Only the first trace is used in the #: analysis. COUNTER_NAME = {"JJ200": None, "JJ1000": 1, "JJ500": 1, "JJ100": 1, "JJ50": 1, } #: Should we correct the offset in voltage and if so on how many points to #: average CORRECT_VOLTAGE_OFFSET = 5 #: Conversion factor to apply to the current data (allow to convert from #: applied voltage to current bias). CURRENT_CONVERSION = 1e-6 #: Amplifier gain used to measure the voltage across the junction. AMPLIFIER_GAIN = 100 #: Threshold to use to determine the critical current (in raw data units). IC_VOLTAGE_THRESHOLD = 2e-5 #: Bias current at which we consider to be in the high bias regime and can fit #: the resistance. HIGH_BIAS_THRESHOLD = 20e-6
base_folder = '/Users/mdartiailh/Labber/Data/2019/11/Data_1114' samples = {'JJ200': {'path': 'JS129D_BM001_030.hdf5', 'Tc': 1.44, 'gap size': 200}, 'JJ1000': {'path': 'JS129D_BM001_032.hdf5', 'Tc': 1.44, 'gap size': 1000}, 'JJ500': {'path': 'JS129D_BM001_033.hdf5', 'Tc': 1.44, 'gap size': 500}, 'JJ100': {'path': 'JS129D_BM001_034.hdf5', 'Tc': 1.44, 'gap size': 100}, 'JJ50': {'path': 'JS129D_BM001_035.hdf5', 'Tc': 1.44, 'gap size': 50}} output = '/Users/mdartiailh/Documents/PostDocNYU/DataAnalysis/JJ/JS129/results.csv' bias_name = 0 voltage_name = {'JJ200': 1, 'JJ1000': 2, 'JJ500': 2, 'JJ100': 2, 'JJ50': 2} counter_name = {'JJ200': None, 'JJ1000': 1, 'JJ500': 1, 'JJ100': 1, 'JJ50': 1} correct_voltage_offset = 5 current_conversion = 1e-06 amplifier_gain = 100 ic_voltage_threshold = 2e-05 high_bias_threshold = 2e-05
# reverse a linkedlist # O(N) space:O(1) class Node: def __init__(self, value, next = None) -> None: self.value = value self.next = None def print_linkedlist(head): while head is not None: print(str(head.value) + "", end = "") head = head.next print() def reverse_linkedlist(head): if head is None or head.next is None: return head new_header = None while head is not None: pointer = head.next head.next = new_header new_header = head head = pointer return new_header head = Node(1) head.next = Node(2) head.next.next = Node(3) head.next.next.next = Node(4) head.next.next.next.next = Node(1) new_header = reverse_linkedlist(head) new_header.print_linkedlist()
class Node: def __init__(self, value, next=None) -> None: self.value = value self.next = None def print_linkedlist(head): while head is not None: print(str(head.value) + '', end='') head = head.next print() def reverse_linkedlist(head): if head is None or head.next is None: return head new_header = None while head is not None: pointer = head.next head.next = new_header new_header = head head = pointer return new_header head = node(1) head.next = node(2) head.next.next = node(3) head.next.next.next = node(4) head.next.next.next.next = node(1) new_header = reverse_linkedlist(head) new_header.print_linkedlist()
# terrascript/data/paultyng/twitter.py # Automatically generated by tools/makecode.py (24-Sep-2021 15:29:28 UTC) __all__ = []
__all__ = []
def validSolution(sudoku): row=[] column=[] box=[] for i in range(9): row.append([]) column.append([]) box.append([]) for r in sudoku: i= sudoku.index(r) for c in r: j= r.index(c) if c in row[i] or c in column[j] or c in box[(i/3)*3+j/3]: return False else: row[i].append(c) column[j].append(c) box[(i/3)*3+j/3].append(c) return True
def valid_solution(sudoku): row = [] column = [] box = [] for i in range(9): row.append([]) column.append([]) box.append([]) for r in sudoku: i = sudoku.index(r) for c in r: j = r.index(c) if c in row[i] or c in column[j] or c in box[i / 3 * 3 + j / 3]: return False else: row[i].append(c) column[j].append(c) box[i / 3 * 3 + j / 3].append(c) return True
# # PySNMP MIB module CISCO-ATM-EXT-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-ATM-EXT-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 17:33:12 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") SingleValueConstraint, ConstraintsIntersection, ValueRangeConstraint, ConstraintsUnion, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ConstraintsIntersection", "ValueRangeConstraint", "ConstraintsUnion", "ValueSizeConstraint") atmVclEntry, aal5VccEntry = mibBuilder.importSymbols("ATM-MIB", "atmVclEntry", "aal5VccEntry") ciscoMgmt, = mibBuilder.importSymbols("CISCO-SMI", "ciscoMgmt") NotificationGroup, ObjectGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ObjectGroup", "ModuleCompliance") ObjectIdentity, MibIdentifier, Integer32, Gauge32, iso, Bits, Counter64, Unsigned32, MibScalar, MibTable, MibTableRow, MibTableColumn, Counter32, NotificationType, ModuleIdentity, TimeTicks, IpAddress = mibBuilder.importSymbols("SNMPv2-SMI", "ObjectIdentity", "MibIdentifier", "Integer32", "Gauge32", "iso", "Bits", "Counter64", "Unsigned32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter32", "NotificationType", "ModuleIdentity", "TimeTicks", "IpAddress") TruthValue, TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TruthValue", "TextualConvention", "DisplayString") ciscoAtmExtMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 9, 9, 88)) ciscoAtmExtMIB.setRevisions(('2003-01-06 00:00', '1997-06-20 00:00',)) if mibBuilder.loadTexts: ciscoAtmExtMIB.setLastUpdated('200301060000Z') if mibBuilder.loadTexts: ciscoAtmExtMIB.setOrganization('Cisco Systems, Inc.') ciscoAtmExtMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 88, 1)) cAal5VccExtMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 1)) catmxVcl = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2)) class OamCCStatus(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5)) namedValues = NamedValues(("ready", 1), ("waitActiveResponse", 2), ("waitActiveConfirm", 3), ("active", 4), ("waitDeactiveConfirm", 5)) class OamCCVcState(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3)) namedValues = NamedValues(("verified", 1), ("aisrdi", 2), ("notManaged", 3)) cAal5VccExtTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 1, 1), ) if mibBuilder.loadTexts: cAal5VccExtTable.setStatus('current') cAal5VccExtEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 1, 1, 1), ) aal5VccEntry.registerAugmentions(("CISCO-ATM-EXT-MIB", "cAal5VccExtEntry")) cAal5VccExtEntry.setIndexNames(*aal5VccEntry.getIndexNames()) if mibBuilder.loadTexts: cAal5VccExtEntry.setStatus('current') cAal5VccExtCompEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 1, 1, 1, 1), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: cAal5VccExtCompEnabled.setStatus('current') cAal5VccExtVoice = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 1, 1, 1, 2), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: cAal5VccExtVoice.setStatus('current') cAal5VccExtInF5OamCells = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 1, 1, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cAal5VccExtInF5OamCells.setStatus('current') cAal5VccExtOutF5OamCells = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 1, 1, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cAal5VccExtOutF5OamCells.setStatus('current') catmxVclOamTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1), ) if mibBuilder.loadTexts: catmxVclOamTable.setStatus('current') catmxVclOamEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1), ) atmVclEntry.registerAugmentions(("CISCO-ATM-EXT-MIB", "catmxVclOamEntry")) catmxVclOamEntry.setIndexNames(*atmVclEntry.getIndexNames()) if mibBuilder.loadTexts: catmxVclOamEntry.setStatus('current') catmxVclOamLoopbackFreq = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 1), Unsigned32()).setUnits('seconds').setMaxAccess("readwrite") if mibBuilder.loadTexts: catmxVclOamLoopbackFreq.setStatus('current') catmxVclOamRetryFreq = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 2), Unsigned32()).setUnits('seconds').setMaxAccess("readwrite") if mibBuilder.loadTexts: catmxVclOamRetryFreq.setStatus('current') catmxVclOamUpRetryCount = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 3), Unsigned32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: catmxVclOamUpRetryCount.setStatus('current') catmxVclOamDownRetryCount = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 4), Unsigned32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: catmxVclOamDownRetryCount.setStatus('current') catmxVclOamEndCCActCount = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 5), Unsigned32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: catmxVclOamEndCCActCount.setStatus('current') catmxVclOamEndCCDeActCount = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 6), Unsigned32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: catmxVclOamEndCCDeActCount.setStatus('current') catmxVclOamEndCCRetryFreq = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 7), Unsigned32()).setUnits('seconds').setMaxAccess("readwrite") if mibBuilder.loadTexts: catmxVclOamEndCCRetryFreq.setStatus('current') catmxVclOamSegCCActCount = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 8), Unsigned32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: catmxVclOamSegCCActCount.setStatus('current') catmxVclOamSegCCDeActCount = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 9), Unsigned32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: catmxVclOamSegCCDeActCount.setStatus('current') catmxVclOamSegCCRetryFreq = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 10), Unsigned32()).setUnits('seconds').setMaxAccess("readwrite") if mibBuilder.loadTexts: catmxVclOamSegCCRetryFreq.setStatus('current') catmxVclOamManage = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 11), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: catmxVclOamManage.setStatus('current') catmxVclOamLoopBkStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("disabled", 1), ("sent", 2), ("received", 3), ("failed", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: catmxVclOamLoopBkStatus.setStatus('current') catmxVclOamVcState = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("downRetry", 1), ("verified", 2), ("notVerified", 3), ("upRetry", 4), ("aisRDI", 5), ("aisOut", 6), ("notManaged", 7)))).setMaxAccess("readonly") if mibBuilder.loadTexts: catmxVclOamVcState.setStatus('current') catmxVclOamEndCCStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 14), OamCCStatus()).setMaxAccess("readonly") if mibBuilder.loadTexts: catmxVclOamEndCCStatus.setStatus('current') catmxVclOamSegCCStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 15), OamCCStatus()).setMaxAccess("readonly") if mibBuilder.loadTexts: catmxVclOamSegCCStatus.setStatus('current') catmxVclOamEndCCVcState = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 16), OamCCVcState()).setMaxAccess("readonly") if mibBuilder.loadTexts: catmxVclOamEndCCVcState.setStatus('current') catmxVclOamSegCCVcState = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 17), OamCCVcState()).setMaxAccess("readonly") if mibBuilder.loadTexts: catmxVclOamSegCCVcState.setStatus('current') catmxVclOamCellsReceived = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 18), Counter32()).setUnits('cells').setMaxAccess("readonly") if mibBuilder.loadTexts: catmxVclOamCellsReceived.setStatus('current') catmxVclOamCellsSent = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 19), Counter32()).setUnits('cells').setMaxAccess("readonly") if mibBuilder.loadTexts: catmxVclOamCellsSent.setStatus('current') catmxVclOamCellsDropped = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 20), Counter32()).setUnits('cells').setMaxAccess("readonly") if mibBuilder.loadTexts: catmxVclOamCellsDropped.setStatus('current') catmxVclOamInF5ais = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 21), Counter32()).setUnits('cells').setMaxAccess("readonly") if mibBuilder.loadTexts: catmxVclOamInF5ais.setStatus('current') catmxVclOamOutF5ais = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 22), Counter32()).setUnits('cells').setMaxAccess("readonly") if mibBuilder.loadTexts: catmxVclOamOutF5ais.setStatus('current') catmxVclOamInF5rdi = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 23), Counter32()).setUnits('cells').setMaxAccess("readonly") if mibBuilder.loadTexts: catmxVclOamInF5rdi.setStatus('current') catmxVclOamOutF5rdi = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 24), Counter32()).setUnits('cells').setMaxAccess("readonly") if mibBuilder.loadTexts: catmxVclOamOutF5rdi.setStatus('current') ciscoAal5ExtMIBConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 88, 2)) ciscoAal5ExtMIBCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 88, 2, 1)) ciscoAal5ExtMIBGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 88, 2, 2)) ciscoAal5ExtMIBCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 88, 2, 1, 1)).setObjects(("CISCO-ATM-EXT-MIB", "ciscoAal5ExtMIBGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoAal5ExtMIBCompliance = ciscoAal5ExtMIBCompliance.setStatus('deprecated') ciscoAal5ExtMIBComplianceRev1 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 88, 2, 1, 2)).setObjects(("CISCO-ATM-EXT-MIB", "ciscoAal5ExtMIBGroup"), ("CISCO-ATM-EXT-MIB", "ciscoAtmExtVclOamGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoAal5ExtMIBComplianceRev1 = ciscoAal5ExtMIBComplianceRev1.setStatus('current') ciscoAal5ExtMIBGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 88, 2, 2, 1)).setObjects(("CISCO-ATM-EXT-MIB", "cAal5VccExtCompEnabled"), ("CISCO-ATM-EXT-MIB", "cAal5VccExtVoice"), ("CISCO-ATM-EXT-MIB", "cAal5VccExtInF5OamCells"), ("CISCO-ATM-EXT-MIB", "cAal5VccExtOutF5OamCells")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoAal5ExtMIBGroup = ciscoAal5ExtMIBGroup.setStatus('current') ciscoAtmExtVclOamGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 88, 2, 2, 2)).setObjects(("CISCO-ATM-EXT-MIB", "catmxVclOamLoopbackFreq"), ("CISCO-ATM-EXT-MIB", "catmxVclOamRetryFreq"), ("CISCO-ATM-EXT-MIB", "catmxVclOamUpRetryCount"), ("CISCO-ATM-EXT-MIB", "catmxVclOamDownRetryCount"), ("CISCO-ATM-EXT-MIB", "catmxVclOamEndCCActCount"), ("CISCO-ATM-EXT-MIB", "catmxVclOamEndCCDeActCount"), ("CISCO-ATM-EXT-MIB", "catmxVclOamEndCCRetryFreq"), ("CISCO-ATM-EXT-MIB", "catmxVclOamSegCCActCount"), ("CISCO-ATM-EXT-MIB", "catmxVclOamSegCCDeActCount"), ("CISCO-ATM-EXT-MIB", "catmxVclOamSegCCRetryFreq"), ("CISCO-ATM-EXT-MIB", "catmxVclOamManage"), ("CISCO-ATM-EXT-MIB", "catmxVclOamLoopBkStatus"), ("CISCO-ATM-EXT-MIB", "catmxVclOamVcState"), ("CISCO-ATM-EXT-MIB", "catmxVclOamEndCCStatus"), ("CISCO-ATM-EXT-MIB", "catmxVclOamSegCCStatus"), ("CISCO-ATM-EXT-MIB", "catmxVclOamEndCCVcState"), ("CISCO-ATM-EXT-MIB", "catmxVclOamSegCCVcState"), ("CISCO-ATM-EXT-MIB", "catmxVclOamCellsReceived"), ("CISCO-ATM-EXT-MIB", "catmxVclOamCellsSent"), ("CISCO-ATM-EXT-MIB", "catmxVclOamCellsDropped"), ("CISCO-ATM-EXT-MIB", "catmxVclOamInF5ais"), ("CISCO-ATM-EXT-MIB", "catmxVclOamOutF5ais"), ("CISCO-ATM-EXT-MIB", "catmxVclOamInF5rdi"), ("CISCO-ATM-EXT-MIB", "catmxVclOamOutF5rdi")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoAtmExtVclOamGroup = ciscoAtmExtVclOamGroup.setStatus('current') mibBuilder.exportSymbols("CISCO-ATM-EXT-MIB", catmxVclOamSegCCActCount=catmxVclOamSegCCActCount, cAal5VccExtCompEnabled=cAal5VccExtCompEnabled, catmxVclOamEndCCStatus=catmxVclOamEndCCStatus, ciscoAtmExtVclOamGroup=ciscoAtmExtVclOamGroup, ciscoAtmExtMIB=ciscoAtmExtMIB, cAal5VccExtInF5OamCells=cAal5VccExtInF5OamCells, catmxVclOamEndCCRetryFreq=catmxVclOamEndCCRetryFreq, catmxVclOamSegCCStatus=catmxVclOamSegCCStatus, catmxVclOamInF5ais=catmxVclOamInF5ais, cAal5VccExtTable=cAal5VccExtTable, ciscoAtmExtMIBObjects=ciscoAtmExtMIBObjects, catmxVclOamManage=catmxVclOamManage, catmxVclOamEntry=catmxVclOamEntry, catmxVclOamSegCCRetryFreq=catmxVclOamSegCCRetryFreq, catmxVclOamSegCCDeActCount=catmxVclOamSegCCDeActCount, catmxVclOamVcState=catmxVclOamVcState, cAal5VccExtEntry=cAal5VccExtEntry, ciscoAal5ExtMIBCompliances=ciscoAal5ExtMIBCompliances, PYSNMP_MODULE_ID=ciscoAtmExtMIB, catmxVclOamEndCCVcState=catmxVclOamEndCCVcState, ciscoAal5ExtMIBGroup=ciscoAal5ExtMIBGroup, catmxVclOamCellsReceived=catmxVclOamCellsReceived, catmxVclOamOutF5ais=catmxVclOamOutF5ais, OamCCStatus=OamCCStatus, catmxVclOamRetryFreq=catmxVclOamRetryFreq, catmxVclOamDownRetryCount=catmxVclOamDownRetryCount, ciscoAal5ExtMIBGroups=ciscoAal5ExtMIBGroups, catmxVclOamSegCCVcState=catmxVclOamSegCCVcState, catmxVclOamCellsSent=catmxVclOamCellsSent, catmxVclOamInF5rdi=catmxVclOamInF5rdi, catmxVclOamTable=catmxVclOamTable, ciscoAal5ExtMIBComplianceRev1=ciscoAal5ExtMIBComplianceRev1, cAal5VccExtMIBObjects=cAal5VccExtMIBObjects, cAal5VccExtVoice=cAal5VccExtVoice, catmxVcl=catmxVcl, catmxVclOamEndCCActCount=catmxVclOamEndCCActCount, ciscoAal5ExtMIBCompliance=ciscoAal5ExtMIBCompliance, catmxVclOamLoopbackFreq=catmxVclOamLoopbackFreq, OamCCVcState=OamCCVcState, catmxVclOamUpRetryCount=catmxVclOamUpRetryCount, catmxVclOamEndCCDeActCount=catmxVclOamEndCCDeActCount, catmxVclOamOutF5rdi=catmxVclOamOutF5rdi, catmxVclOamCellsDropped=catmxVclOamCellsDropped, cAal5VccExtOutF5OamCells=cAal5VccExtOutF5OamCells, ciscoAal5ExtMIBConformance=ciscoAal5ExtMIBConformance, catmxVclOamLoopBkStatus=catmxVclOamLoopBkStatus)
(object_identifier, integer, octet_string) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'Integer', 'OctetString') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (single_value_constraint, constraints_intersection, value_range_constraint, constraints_union, value_size_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'SingleValueConstraint', 'ConstraintsIntersection', 'ValueRangeConstraint', 'ConstraintsUnion', 'ValueSizeConstraint') (atm_vcl_entry, aal5_vcc_entry) = mibBuilder.importSymbols('ATM-MIB', 'atmVclEntry', 'aal5VccEntry') (cisco_mgmt,) = mibBuilder.importSymbols('CISCO-SMI', 'ciscoMgmt') (notification_group, object_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ObjectGroup', 'ModuleCompliance') (object_identity, mib_identifier, integer32, gauge32, iso, bits, counter64, unsigned32, mib_scalar, mib_table, mib_table_row, mib_table_column, counter32, notification_type, module_identity, time_ticks, ip_address) = mibBuilder.importSymbols('SNMPv2-SMI', 'ObjectIdentity', 'MibIdentifier', 'Integer32', 'Gauge32', 'iso', 'Bits', 'Counter64', 'Unsigned32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Counter32', 'NotificationType', 'ModuleIdentity', 'TimeTicks', 'IpAddress') (truth_value, textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TruthValue', 'TextualConvention', 'DisplayString') cisco_atm_ext_mib = module_identity((1, 3, 6, 1, 4, 1, 9, 9, 88)) ciscoAtmExtMIB.setRevisions(('2003-01-06 00:00', '1997-06-20 00:00')) if mibBuilder.loadTexts: ciscoAtmExtMIB.setLastUpdated('200301060000Z') if mibBuilder.loadTexts: ciscoAtmExtMIB.setOrganization('Cisco Systems, Inc.') cisco_atm_ext_mib_objects = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 88, 1)) c_aal5_vcc_ext_mib_objects = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 1)) catmx_vcl = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2)) class Oamccstatus(TextualConvention, Integer32): status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5)) named_values = named_values(('ready', 1), ('waitActiveResponse', 2), ('waitActiveConfirm', 3), ('active', 4), ('waitDeactiveConfirm', 5)) class Oamccvcstate(TextualConvention, Integer32): status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3)) named_values = named_values(('verified', 1), ('aisrdi', 2), ('notManaged', 3)) c_aal5_vcc_ext_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 1, 1)) if mibBuilder.loadTexts: cAal5VccExtTable.setStatus('current') c_aal5_vcc_ext_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 1, 1, 1)) aal5VccEntry.registerAugmentions(('CISCO-ATM-EXT-MIB', 'cAal5VccExtEntry')) cAal5VccExtEntry.setIndexNames(*aal5VccEntry.getIndexNames()) if mibBuilder.loadTexts: cAal5VccExtEntry.setStatus('current') c_aal5_vcc_ext_comp_enabled = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 1, 1, 1, 1), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: cAal5VccExtCompEnabled.setStatus('current') c_aal5_vcc_ext_voice = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 1, 1, 1, 2), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: cAal5VccExtVoice.setStatus('current') c_aal5_vcc_ext_in_f5_oam_cells = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 1, 1, 1, 3), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cAal5VccExtInF5OamCells.setStatus('current') c_aal5_vcc_ext_out_f5_oam_cells = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 1, 1, 1, 4), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: cAal5VccExtOutF5OamCells.setStatus('current') catmx_vcl_oam_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1)) if mibBuilder.loadTexts: catmxVclOamTable.setStatus('current') catmx_vcl_oam_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1)) atmVclEntry.registerAugmentions(('CISCO-ATM-EXT-MIB', 'catmxVclOamEntry')) catmxVclOamEntry.setIndexNames(*atmVclEntry.getIndexNames()) if mibBuilder.loadTexts: catmxVclOamEntry.setStatus('current') catmx_vcl_oam_loopback_freq = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 1), unsigned32()).setUnits('seconds').setMaxAccess('readwrite') if mibBuilder.loadTexts: catmxVclOamLoopbackFreq.setStatus('current') catmx_vcl_oam_retry_freq = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 2), unsigned32()).setUnits('seconds').setMaxAccess('readwrite') if mibBuilder.loadTexts: catmxVclOamRetryFreq.setStatus('current') catmx_vcl_oam_up_retry_count = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 3), unsigned32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: catmxVclOamUpRetryCount.setStatus('current') catmx_vcl_oam_down_retry_count = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 4), unsigned32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: catmxVclOamDownRetryCount.setStatus('current') catmx_vcl_oam_end_cc_act_count = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 5), unsigned32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: catmxVclOamEndCCActCount.setStatus('current') catmx_vcl_oam_end_cc_de_act_count = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 6), unsigned32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: catmxVclOamEndCCDeActCount.setStatus('current') catmx_vcl_oam_end_cc_retry_freq = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 7), unsigned32()).setUnits('seconds').setMaxAccess('readwrite') if mibBuilder.loadTexts: catmxVclOamEndCCRetryFreq.setStatus('current') catmx_vcl_oam_seg_cc_act_count = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 8), unsigned32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: catmxVclOamSegCCActCount.setStatus('current') catmx_vcl_oam_seg_cc_de_act_count = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 9), unsigned32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: catmxVclOamSegCCDeActCount.setStatus('current') catmx_vcl_oam_seg_cc_retry_freq = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 10), unsigned32()).setUnits('seconds').setMaxAccess('readwrite') if mibBuilder.loadTexts: catmxVclOamSegCCRetryFreq.setStatus('current') catmx_vcl_oam_manage = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 11), truth_value().clone('false')).setMaxAccess('readwrite') if mibBuilder.loadTexts: catmxVclOamManage.setStatus('current') catmx_vcl_oam_loop_bk_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 12), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('disabled', 1), ('sent', 2), ('received', 3), ('failed', 4)))).setMaxAccess('readonly') if mibBuilder.loadTexts: catmxVclOamLoopBkStatus.setStatus('current') catmx_vcl_oam_vc_state = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 13), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=named_values(('downRetry', 1), ('verified', 2), ('notVerified', 3), ('upRetry', 4), ('aisRDI', 5), ('aisOut', 6), ('notManaged', 7)))).setMaxAccess('readonly') if mibBuilder.loadTexts: catmxVclOamVcState.setStatus('current') catmx_vcl_oam_end_cc_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 14), oam_cc_status()).setMaxAccess('readonly') if mibBuilder.loadTexts: catmxVclOamEndCCStatus.setStatus('current') catmx_vcl_oam_seg_cc_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 15), oam_cc_status()).setMaxAccess('readonly') if mibBuilder.loadTexts: catmxVclOamSegCCStatus.setStatus('current') catmx_vcl_oam_end_cc_vc_state = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 16), oam_cc_vc_state()).setMaxAccess('readonly') if mibBuilder.loadTexts: catmxVclOamEndCCVcState.setStatus('current') catmx_vcl_oam_seg_cc_vc_state = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 17), oam_cc_vc_state()).setMaxAccess('readonly') if mibBuilder.loadTexts: catmxVclOamSegCCVcState.setStatus('current') catmx_vcl_oam_cells_received = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 18), counter32()).setUnits('cells').setMaxAccess('readonly') if mibBuilder.loadTexts: catmxVclOamCellsReceived.setStatus('current') catmx_vcl_oam_cells_sent = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 19), counter32()).setUnits('cells').setMaxAccess('readonly') if mibBuilder.loadTexts: catmxVclOamCellsSent.setStatus('current') catmx_vcl_oam_cells_dropped = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 20), counter32()).setUnits('cells').setMaxAccess('readonly') if mibBuilder.loadTexts: catmxVclOamCellsDropped.setStatus('current') catmx_vcl_oam_in_f5ais = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 21), counter32()).setUnits('cells').setMaxAccess('readonly') if mibBuilder.loadTexts: catmxVclOamInF5ais.setStatus('current') catmx_vcl_oam_out_f5ais = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 22), counter32()).setUnits('cells').setMaxAccess('readonly') if mibBuilder.loadTexts: catmxVclOamOutF5ais.setStatus('current') catmx_vcl_oam_in_f5rdi = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 23), counter32()).setUnits('cells').setMaxAccess('readonly') if mibBuilder.loadTexts: catmxVclOamInF5rdi.setStatus('current') catmx_vcl_oam_out_f5rdi = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 88, 1, 2, 1, 1, 24), counter32()).setUnits('cells').setMaxAccess('readonly') if mibBuilder.loadTexts: catmxVclOamOutF5rdi.setStatus('current') cisco_aal5_ext_mib_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 88, 2)) cisco_aal5_ext_mib_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 88, 2, 1)) cisco_aal5_ext_mib_groups = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 88, 2, 2)) cisco_aal5_ext_mib_compliance = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 88, 2, 1, 1)).setObjects(('CISCO-ATM-EXT-MIB', 'ciscoAal5ExtMIBGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_aal5_ext_mib_compliance = ciscoAal5ExtMIBCompliance.setStatus('deprecated') cisco_aal5_ext_mib_compliance_rev1 = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 88, 2, 1, 2)).setObjects(('CISCO-ATM-EXT-MIB', 'ciscoAal5ExtMIBGroup'), ('CISCO-ATM-EXT-MIB', 'ciscoAtmExtVclOamGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_aal5_ext_mib_compliance_rev1 = ciscoAal5ExtMIBComplianceRev1.setStatus('current') cisco_aal5_ext_mib_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 88, 2, 2, 1)).setObjects(('CISCO-ATM-EXT-MIB', 'cAal5VccExtCompEnabled'), ('CISCO-ATM-EXT-MIB', 'cAal5VccExtVoice'), ('CISCO-ATM-EXT-MIB', 'cAal5VccExtInF5OamCells'), ('CISCO-ATM-EXT-MIB', 'cAal5VccExtOutF5OamCells')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_aal5_ext_mib_group = ciscoAal5ExtMIBGroup.setStatus('current') cisco_atm_ext_vcl_oam_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 88, 2, 2, 2)).setObjects(('CISCO-ATM-EXT-MIB', 'catmxVclOamLoopbackFreq'), ('CISCO-ATM-EXT-MIB', 'catmxVclOamRetryFreq'), ('CISCO-ATM-EXT-MIB', 'catmxVclOamUpRetryCount'), ('CISCO-ATM-EXT-MIB', 'catmxVclOamDownRetryCount'), ('CISCO-ATM-EXT-MIB', 'catmxVclOamEndCCActCount'), ('CISCO-ATM-EXT-MIB', 'catmxVclOamEndCCDeActCount'), ('CISCO-ATM-EXT-MIB', 'catmxVclOamEndCCRetryFreq'), ('CISCO-ATM-EXT-MIB', 'catmxVclOamSegCCActCount'), ('CISCO-ATM-EXT-MIB', 'catmxVclOamSegCCDeActCount'), ('CISCO-ATM-EXT-MIB', 'catmxVclOamSegCCRetryFreq'), ('CISCO-ATM-EXT-MIB', 'catmxVclOamManage'), ('CISCO-ATM-EXT-MIB', 'catmxVclOamLoopBkStatus'), ('CISCO-ATM-EXT-MIB', 'catmxVclOamVcState'), ('CISCO-ATM-EXT-MIB', 'catmxVclOamEndCCStatus'), ('CISCO-ATM-EXT-MIB', 'catmxVclOamSegCCStatus'), ('CISCO-ATM-EXT-MIB', 'catmxVclOamEndCCVcState'), ('CISCO-ATM-EXT-MIB', 'catmxVclOamSegCCVcState'), ('CISCO-ATM-EXT-MIB', 'catmxVclOamCellsReceived'), ('CISCO-ATM-EXT-MIB', 'catmxVclOamCellsSent'), ('CISCO-ATM-EXT-MIB', 'catmxVclOamCellsDropped'), ('CISCO-ATM-EXT-MIB', 'catmxVclOamInF5ais'), ('CISCO-ATM-EXT-MIB', 'catmxVclOamOutF5ais'), ('CISCO-ATM-EXT-MIB', 'catmxVclOamInF5rdi'), ('CISCO-ATM-EXT-MIB', 'catmxVclOamOutF5rdi')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_atm_ext_vcl_oam_group = ciscoAtmExtVclOamGroup.setStatus('current') mibBuilder.exportSymbols('CISCO-ATM-EXT-MIB', catmxVclOamSegCCActCount=catmxVclOamSegCCActCount, cAal5VccExtCompEnabled=cAal5VccExtCompEnabled, catmxVclOamEndCCStatus=catmxVclOamEndCCStatus, ciscoAtmExtVclOamGroup=ciscoAtmExtVclOamGroup, ciscoAtmExtMIB=ciscoAtmExtMIB, cAal5VccExtInF5OamCells=cAal5VccExtInF5OamCells, catmxVclOamEndCCRetryFreq=catmxVclOamEndCCRetryFreq, catmxVclOamSegCCStatus=catmxVclOamSegCCStatus, catmxVclOamInF5ais=catmxVclOamInF5ais, cAal5VccExtTable=cAal5VccExtTable, ciscoAtmExtMIBObjects=ciscoAtmExtMIBObjects, catmxVclOamManage=catmxVclOamManage, catmxVclOamEntry=catmxVclOamEntry, catmxVclOamSegCCRetryFreq=catmxVclOamSegCCRetryFreq, catmxVclOamSegCCDeActCount=catmxVclOamSegCCDeActCount, catmxVclOamVcState=catmxVclOamVcState, cAal5VccExtEntry=cAal5VccExtEntry, ciscoAal5ExtMIBCompliances=ciscoAal5ExtMIBCompliances, PYSNMP_MODULE_ID=ciscoAtmExtMIB, catmxVclOamEndCCVcState=catmxVclOamEndCCVcState, ciscoAal5ExtMIBGroup=ciscoAal5ExtMIBGroup, catmxVclOamCellsReceived=catmxVclOamCellsReceived, catmxVclOamOutF5ais=catmxVclOamOutF5ais, OamCCStatus=OamCCStatus, catmxVclOamRetryFreq=catmxVclOamRetryFreq, catmxVclOamDownRetryCount=catmxVclOamDownRetryCount, ciscoAal5ExtMIBGroups=ciscoAal5ExtMIBGroups, catmxVclOamSegCCVcState=catmxVclOamSegCCVcState, catmxVclOamCellsSent=catmxVclOamCellsSent, catmxVclOamInF5rdi=catmxVclOamInF5rdi, catmxVclOamTable=catmxVclOamTable, ciscoAal5ExtMIBComplianceRev1=ciscoAal5ExtMIBComplianceRev1, cAal5VccExtMIBObjects=cAal5VccExtMIBObjects, cAal5VccExtVoice=cAal5VccExtVoice, catmxVcl=catmxVcl, catmxVclOamEndCCActCount=catmxVclOamEndCCActCount, ciscoAal5ExtMIBCompliance=ciscoAal5ExtMIBCompliance, catmxVclOamLoopbackFreq=catmxVclOamLoopbackFreq, OamCCVcState=OamCCVcState, catmxVclOamUpRetryCount=catmxVclOamUpRetryCount, catmxVclOamEndCCDeActCount=catmxVclOamEndCCDeActCount, catmxVclOamOutF5rdi=catmxVclOamOutF5rdi, catmxVclOamCellsDropped=catmxVclOamCellsDropped, cAal5VccExtOutF5OamCells=cAal5VccExtOutF5OamCells, ciscoAal5ExtMIBConformance=ciscoAal5ExtMIBConformance, catmxVclOamLoopBkStatus=catmxVclOamLoopBkStatus)
# Set window of past points for LSTM model window = 10 # Split 80/20 into train/test data last = int(n/5.0) Xtrain = X[:-last] Xtest = X[-last-window:] # Store window number of points as a sequence xin = [] next_X = [] for i in range(window,len(Xtrain)): xin.append(Xtrain[i-window:i]) next_X.append(Xtrain[i]) # Reshape data to format for LSTM xin, next_X = np.array(xin), np.array(next_X) xin = xin.reshape(xin.shape[0], xin.shape[1], 1)
window = 10 last = int(n / 5.0) xtrain = X[:-last] xtest = X[-last - window:] xin = [] next_x = [] for i in range(window, len(Xtrain)): xin.append(Xtrain[i - window:i]) next_X.append(Xtrain[i]) (xin, next_x) = (np.array(xin), np.array(next_X)) xin = xin.reshape(xin.shape[0], xin.shape[1], 1)
COLUMNS = [ 'TIPO_REGISTRO', 'NRO_FILIAL_PONTO_VENDA', 'NRO_RESUMO_VENDAS', 'DT_CV', 'VL_BRUTO', 'VL_DESCONTO', 'VL_LIQUIDO', 'NRO_CARTAO', 'TIPO_TRANSACAO', 'NRO_CV', 'DT_CREDITO', 'STATUS_TRANSACAO', 'HR_TRANSACAO', 'NRO_TERMINAL', 'TIPO_CAPTURA', 'RESERVADO', 'VL_COMPRA', 'VL_SAQUE', 'BANDEIRA' ]
columns = ['TIPO_REGISTRO', 'NRO_FILIAL_PONTO_VENDA', 'NRO_RESUMO_VENDAS', 'DT_CV', 'VL_BRUTO', 'VL_DESCONTO', 'VL_LIQUIDO', 'NRO_CARTAO', 'TIPO_TRANSACAO', 'NRO_CV', 'DT_CREDITO', 'STATUS_TRANSACAO', 'HR_TRANSACAO', 'NRO_TERMINAL', 'TIPO_CAPTURA', 'RESERVADO', 'VL_COMPRA', 'VL_SAQUE', 'BANDEIRA']
# Large non-Mersenne prime def solve(): return (28433 * pow(2, 7830457, 10**10) + 1) % 10**10 if __name__ == "__main__": print(solve())
def solve(): return (28433 * pow(2, 7830457, 10 ** 10) + 1) % 10 ** 10 if __name__ == '__main__': print(solve())
# 3 row=0 while row<8: col=0 while col<6: if (row==0) or (row==1 and col==4) or (row==2 and col==3)or (row==3 and col==2)or (row==4 and col==3)or (row==5 and col==4) or row==6: print("*",end=" ") else: print(" ",end=" ") col +=1 row +=1 print()
row = 0 while row < 8: col = 0 while col < 6: if row == 0 or (row == 1 and col == 4) or (row == 2 and col == 3) or (row == 3 and col == 2) or (row == 4 and col == 3) or (row == 5 and col == 4) or (row == 6): print('*', end=' ') else: print(' ', end=' ') col += 1 row += 1 print()
# Data Structure Base Class class DS: def __init__(self, cmp): raise NotImplementedError def gettop(self): raise NotImplementedError def extracttop(self): raise NotImplementedError def insert(self, val): raise NotImplementedError def print(self): raise NotImplementedError
class Ds: def __init__(self, cmp): raise NotImplementedError def gettop(self): raise NotImplementedError def extracttop(self): raise NotImplementedError def insert(self, val): raise NotImplementedError def print(self): raise NotImplementedError
def arg_parse_common(parser): parser.add_argument('-d', action = 'store_true', help = "Debug mode") parser.add_argument('-f', type = str, nargs = '?', help = 'Format output') parser.add_argument('-b', type = str, nargs = '?', help = 'Batch file') parser.add_argument('-config', type = str, nargs = '?', help = 'Config file') parser.add_argument('-list', action = 'store_true', help = 'List cache') parser.add_argument('-test', action = 'store_true', help = 'Run tests') parser.add_argument('-sort', type = str, nargs = '?', help = '') parser.add_argument('-order', type = str, nargs = '?', help = '') parser.add_argument('--cache', type = str, nargs = '?', help = 'Cache sqlite3 database') parser.add_argument('--cache_expire', type = int, nargs = '?', help = 'Cache expiration time') parser.add_argument('--rate_limit', type = str, nargs = '?', help = 'Query rate limit') parser.add_argument('--machine', action = 'store_true', help = 'Machine-readable output') parser.add_argument('query', nargs = '*')
def arg_parse_common(parser): parser.add_argument('-d', action='store_true', help='Debug mode') parser.add_argument('-f', type=str, nargs='?', help='Format output') parser.add_argument('-b', type=str, nargs='?', help='Batch file') parser.add_argument('-config', type=str, nargs='?', help='Config file') parser.add_argument('-list', action='store_true', help='List cache') parser.add_argument('-test', action='store_true', help='Run tests') parser.add_argument('-sort', type=str, nargs='?', help='') parser.add_argument('-order', type=str, nargs='?', help='') parser.add_argument('--cache', type=str, nargs='?', help='Cache sqlite3 database') parser.add_argument('--cache_expire', type=int, nargs='?', help='Cache expiration time') parser.add_argument('--rate_limit', type=str, nargs='?', help='Query rate limit') parser.add_argument('--machine', action='store_true', help='Machine-readable output') parser.add_argument('query', nargs='*')
def hello (s): print("Hello, " + s + "!") hello("world") hello("python") hello("Sergey")
def hello(s): print('Hello, ' + s + '!') hello('world') hello('python') hello('Sergey')
# class Tree: # def __init__(self, val, left=None, right=None): # self.val = val # self.left = left # self.right = right # class LLNode: # def __init__(self, val, next=None): # self.val = val # self.next = next class Solution: def solve(self, root): ans = LLNode(0) cur = ans def iot(node): nonlocal cur if not node: return iot(node.left) cur.next = LLNode(node.val) cur = cur.next iot(node.right) iot(root) return ans.next
class Solution: def solve(self, root): ans = ll_node(0) cur = ans def iot(node): nonlocal cur if not node: return iot(node.left) cur.next = ll_node(node.val) cur = cur.next iot(node.right) iot(root) return ans.next
class Main: def __init__(self): self.pi = 3.14159 self.r = float(input()) def output(self): print("A=%0.4f" % (self.pi * self.r ** 2)) if __name__ == '__main__': obj = Main() obj.output()
class Main: def __init__(self): self.pi = 3.14159 self.r = float(input()) def output(self): print('A=%0.4f' % (self.pi * self.r ** 2)) if __name__ == '__main__': obj = main() obj.output()
class Perceptron(object): def __init__(self, lr=0.1, epoch=10): self.lr = lr self.epoch = epoch def fit(self, x, y): self.n_classes = len(np.unique(test_y)) self.w = np.zeros((x.shape[1]+1,self.n_classes)) for _ in range(self.epoch): for xi, yi in zip(x,y): dw = self.lr*(yi-self.predict(xi)) self.w[1:,yi] += dw*xi self.w[0,yi] += dw def predict(self, v): tmp = np.dot(v, self.w[1:,:])+self.w[0,:] try: return np.argmax(tmp, axis=1) except: return np.argmax(tmp) class Adaline(object): def __init__(self,lr=0.1, epoch=10): self.lr = lr self.epoch = epoch def fit(self, x, y): self.n_classes = len(np.unique(test_y)) self.w = np.zeros((x.shape[1]+1,self.n_classes)) for xi, yi in zip(x, y): for _ in range(self.epoch): dw = self.lr*(yi-self.net_input(xi,yi)) self.w[1:,yi] += dw*xi self.w[0,yi] += dw def net_input(self, x, y): return np.dot(x, self.w[1:,y]+self.w[0,y]) def predict(self, v): tmp = np.dot(v, self.w[1:,:])+self.w[0,:] print(tmp) try: return np.argmax(tmp, axis=1) except: return np.argmax(tmp)
class Perceptron(object): def __init__(self, lr=0.1, epoch=10): self.lr = lr self.epoch = epoch def fit(self, x, y): self.n_classes = len(np.unique(test_y)) self.w = np.zeros((x.shape[1] + 1, self.n_classes)) for _ in range(self.epoch): for (xi, yi) in zip(x, y): dw = self.lr * (yi - self.predict(xi)) self.w[1:, yi] += dw * xi self.w[0, yi] += dw def predict(self, v): tmp = np.dot(v, self.w[1:, :]) + self.w[0, :] try: return np.argmax(tmp, axis=1) except: return np.argmax(tmp) class Adaline(object): def __init__(self, lr=0.1, epoch=10): self.lr = lr self.epoch = epoch def fit(self, x, y): self.n_classes = len(np.unique(test_y)) self.w = np.zeros((x.shape[1] + 1, self.n_classes)) for (xi, yi) in zip(x, y): for _ in range(self.epoch): dw = self.lr * (yi - self.net_input(xi, yi)) self.w[1:, yi] += dw * xi self.w[0, yi] += dw def net_input(self, x, y): return np.dot(x, self.w[1:, y] + self.w[0, y]) def predict(self, v): tmp = np.dot(v, self.w[1:, :]) + self.w[0, :] print(tmp) try: return np.argmax(tmp, axis=1) except: return np.argmax(tmp)
# # PySNMP MIB module CISCO-SESS-BORDER-CTRLR-STATS-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-SESS-BORDER-CTRLR-STATS-MIB # Produced by pysmi-0.3.4 at Wed May 1 12:11:55 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, ConstraintsUnion, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "SingleValueConstraint", "ConstraintsIntersection", "ConstraintsUnion", "ValueRangeConstraint") csbCallStatsServiceIndex, csbCallStatsInstanceIndex, CiscoSbcPeriodicStatsInterval = mibBuilder.importSymbols("CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCallStatsServiceIndex", "csbCallStatsInstanceIndex", "CiscoSbcPeriodicStatsInterval") ciscoMgmt, = mibBuilder.importSymbols("CISCO-SMI", "ciscoMgmt") SnmpAdminString, = mibBuilder.importSymbols("SNMP-FRAMEWORK-MIB", "SnmpAdminString") NotificationGroup, ModuleCompliance, ObjectGroup = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance", "ObjectGroup") Counter32, NotificationType, Integer32, IpAddress, MibScalar, MibTable, MibTableRow, MibTableColumn, iso, Bits, ObjectIdentity, Gauge32, TimeTicks, MibIdentifier, ModuleIdentity, Counter64, Unsigned32 = mibBuilder.importSymbols("SNMPv2-SMI", "Counter32", "NotificationType", "Integer32", "IpAddress", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "iso", "Bits", "ObjectIdentity", "Gauge32", "TimeTicks", "MibIdentifier", "ModuleIdentity", "Counter64", "Unsigned32") TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString") ciscoSbcStatsMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 9, 9, 757)) ciscoSbcStatsMIB.setRevisions(('2010-09-15 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: ciscoSbcStatsMIB.setRevisionsDescriptions(('Latest version of this MIB module.',)) if mibBuilder.loadTexts: ciscoSbcStatsMIB.setLastUpdated('201009150000Z') if mibBuilder.loadTexts: ciscoSbcStatsMIB.setOrganization('Cisco Systems, Inc.') if mibBuilder.loadTexts: ciscoSbcStatsMIB.setContactInfo('Cisco Systems Customer Service Postal: 170 W Tasman Drive San Jose, CA 95134 USA Tel: +1 800 553-NETS E-mail: sbc-dev@cisco.com') if mibBuilder.loadTexts: ciscoSbcStatsMIB.setDescription('The main purpose of this MIB is to define the statistics information for Session Border Controller application. This MIB categorizes the statistics information into following types: 1. RADIUS Messages Statistics - Represents statistics of various RADIUS messages for RADIUS servers with which the client (SBC) shares a secret. 2. Rf Billing Statistics- Represents Rf billing statistics information which monitors the messages sent per-realm over IMS Rx interface by Rf billing manager(SBC). 3. SIP Statistics - Represents SIP requests and various SIP responses on a SIP adjacency in a given interval. The Session Border Controller (SBC) enables direct IP-to-IP interconnect between multiple administrative domains for session-based services providing protocol inter-working, security, and admission control and management. The SBC is a voice over IP (VoIP) device that sits on the border of a network and controls call admission to that network. The primary purpose of an SBC is to protect the interior of the network from excessive call load and malicious traffic. Additional functions provided by the SBC include media bridging and billing services. Periodic Statistics - Represents the SBC call statistics information for a particular time interval. E.g. you can specify that you want to retrieve statistics for a summary period of the current or previous 5 minutes, 15 minutes, hour, or day. The statistics for 5 minutes are divided into five minute intervals past the hour - that is, at 0 minutes, 5 minutes, 10 minutes... past the hour. When you retrieve statistics for the current five minute period, you will be given statistics from the start of the interval to the current time. When you retrieve statistics for the previous five minutes, you will be given the statistics for the entirety of the previous interval. For example, if it is currently 12:43 - the current 5 minute statistics cover 12:40 - 12:43 - the previous 5 minute statistics cover 12:35 - 12:40 The other intervals work similarly. 15 minute statistics are divided into 15 minute intervals past the hour (0 minutes, 15 minutes, 30 minutes, 45 minutes). Hourly statistics are divided into intervals on the hour. Daily statistics are divided into intervals at 0:00 each day. Therefore, if you retrieve the statistics at 12:43 for each of these intervals, the periods covered are as follows. - current 15 minutes: 12:30 - 12:43 - previous 15 minutes: 12:15 - 12:30 - current hour: 12:00 - 12:43 - last hour: 11:00 - 12:00 - current day: 00:00 - 12:43 - last day: 00:00 (the day before) - 00:00. GLOSSARY SBC: Session Border Controller CSB: CISCO Session Border Controller Adjacency: An adjacency contains the system information to be transmitted to next HOP. ACR: Accounting Request ACA: Accounting Accept AVP: Attribute-Value Pairs REFERENCES 1. CISCO Session Border Controller Documents and FAQ http://zed.cisco.com/confluence/display/SBC/SBC') class CiscoSbcSIPMethod(TextualConvention, Integer32): description = 'This textual convention represents the various SIP Methods.' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14)) namedValues = NamedValues(("unknown", 1), ("ack", 2), ("bye", 3), ("cancel", 4), ("info", 5), ("invite", 6), ("message", 7), ("notify", 8), ("options", 9), ("prack", 10), ("refer", 11), ("register", 12), ("subscribe", 13), ("update", 14)) class CiscoSbcRadiusClientType(TextualConvention, Integer32): description = 'This textual convention represents the type of RADIUS client.' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2)) namedValues = NamedValues(("authentication", 1), ("accounting", 2)) ciscoSbcStatsMIBNotifs = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 757, 0)) ciscoSbcStatsMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 757, 1)) ciscoSbcStatsMIBConform = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 757, 2)) csbRadiusStatsTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 1), ) if mibBuilder.loadTexts: csbRadiusStatsTable.setStatus('current') if mibBuilder.loadTexts: csbRadiusStatsTable.setDescription('This table has the reporting statistics of various RADIUS messages for RADIUS servers with which the client (SBC) shares a secret. Each entry in this table is identified by a value of csbRadiusStatsEntIndex. The other indices of this table are csbCallStatsInstanceIndex defined in csbCallStatsInstanceTable and csbCallStatsServiceIndex defined in csbCallStatsTable.') csbRadiusStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 1, 1), ).setIndexNames((0, "CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCallStatsInstanceIndex"), (0, "CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCallStatsServiceIndex"), (0, "CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbRadiusStatsEntIndex")) if mibBuilder.loadTexts: csbRadiusStatsEntry.setStatus('current') if mibBuilder.loadTexts: csbRadiusStatsEntry.setDescription('A conceptual row in the csbRadiusStatsTable. There is an entry in this table for each RADIUS server, as identified by a value of csbRadiusStatsEntIndex. The other indices of this table are csbCallStatsInstanceIndex defined in csbCallStatsInstanceTable and csbCallStatsServiceIndex defined in csbCallStatsTable.') csbRadiusStatsEntIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 1, 1, 1), Unsigned32()) if mibBuilder.loadTexts: csbRadiusStatsEntIndex.setStatus('current') if mibBuilder.loadTexts: csbRadiusStatsEntIndex.setDescription('This object indicates the index of the RADIUS client entity that this server is configured on. This index is assigned arbitrarily by the engine and is not saved over reboots.') csbRadiusStatsClientName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 1, 1, 2), SnmpAdminString()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbRadiusStatsClientName.setStatus('current') if mibBuilder.loadTexts: csbRadiusStatsClientName.setDescription('This object indicates the client name of the RADIUS client to which that these statistics apply.') csbRadiusStatsClientType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 1, 1, 3), CiscoSbcRadiusClientType()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbRadiusStatsClientType.setStatus('current') if mibBuilder.loadTexts: csbRadiusStatsClientType.setDescription('This object indicates the type(authentication or accounting) of the RADIUS clients configured on SBC.') csbRadiusStatsSrvrName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 1, 1, 4), SnmpAdminString()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbRadiusStatsSrvrName.setStatus('current') if mibBuilder.loadTexts: csbRadiusStatsSrvrName.setDescription('This object indicates the server name of the RADIUS server to which that these statistics apply.') csbRadiusStatsAcsReqs = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 1, 1, 5), Counter64()).setUnits('packets').setMaxAccess("readonly") if mibBuilder.loadTexts: csbRadiusStatsAcsReqs.setStatus('current') if mibBuilder.loadTexts: csbRadiusStatsAcsReqs.setDescription('This object indicates the number of RADIUS Access-Request packets sent to this server. This does not include retransmissions.') csbRadiusStatsAcsRtrns = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 1, 1, 6), Counter64()).setUnits('packets').setMaxAccess("readonly") if mibBuilder.loadTexts: csbRadiusStatsAcsRtrns.setStatus('current') if mibBuilder.loadTexts: csbRadiusStatsAcsRtrns.setDescription('This object indicates the number of RADIUS Access-Request packets retransmitted to this RADIUS server.') csbRadiusStatsAcsAccpts = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 1, 1, 7), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbRadiusStatsAcsAccpts.setStatus('current') if mibBuilder.loadTexts: csbRadiusStatsAcsAccpts.setDescription('This object indicates the number of RADIUS Access-Accept packets (valid or invalid) received from this server.') csbRadiusStatsAcsRejects = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 1, 1, 8), Counter64()).setUnits('packets').setMaxAccess("readonly") if mibBuilder.loadTexts: csbRadiusStatsAcsRejects.setStatus('current') if mibBuilder.loadTexts: csbRadiusStatsAcsRejects.setDescription('This object indicates the number of RADIUS Access-Reject packets (valid or invalid) received from this server.') csbRadiusStatsAcsChalls = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 1, 1, 9), Counter64()).setUnits('packets').setMaxAccess("readonly") if mibBuilder.loadTexts: csbRadiusStatsAcsChalls.setStatus('current') if mibBuilder.loadTexts: csbRadiusStatsAcsChalls.setDescription('This object indicates the number of RADIUS Access-Challenge packets (valid or invalid) received from this server.') csbRadiusStatsActReqs = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 1, 1, 10), Counter64()).setUnits('packets').setMaxAccess("readonly") if mibBuilder.loadTexts: csbRadiusStatsActReqs.setStatus('current') if mibBuilder.loadTexts: csbRadiusStatsActReqs.setDescription('This object indicates the number of RADIUS Accounting-Request packets sent to this server. This does not include retransmissions.') csbRadiusStatsActRetrans = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 1, 1, 11), Counter64()).setUnits('packets').setMaxAccess("readonly") if mibBuilder.loadTexts: csbRadiusStatsActRetrans.setStatus('current') if mibBuilder.loadTexts: csbRadiusStatsActRetrans.setDescription('This object indicates the number of RADIUS Accounting-Request packets retransmitted to this RADIUS server.') csbRadiusStatsActRsps = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 1, 1, 12), Counter64()).setUnits('packets').setMaxAccess("readonly") if mibBuilder.loadTexts: csbRadiusStatsActRsps.setStatus('current') if mibBuilder.loadTexts: csbRadiusStatsActRsps.setDescription('This object indicates the number of RADIUS Accounting-Response packets (valid or invalid) received from this server.') csbRadiusStatsMalformedRsps = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 1, 1, 13), Counter64()).setUnits('packets').setMaxAccess("readonly") if mibBuilder.loadTexts: csbRadiusStatsMalformedRsps.setStatus('current') if mibBuilder.loadTexts: csbRadiusStatsMalformedRsps.setDescription('This object indicates the number of malformed RADIUS response packets received from this server. Malformed packets include packets with an invalid length. Bad authenticators, Signature attributes and unknown types are not included as malformed access responses.') csbRadiusStatsBadAuths = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 1, 1, 14), Counter64()).setUnits('packets').setMaxAccess("readonly") if mibBuilder.loadTexts: csbRadiusStatsBadAuths.setStatus('current') if mibBuilder.loadTexts: csbRadiusStatsBadAuths.setDescription('This object indicates the number of RADIUS response packets containing invalid authenticators or Signature attributes received from this server.') csbRadiusStatsPending = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 1, 1, 15), Gauge32()).setUnits('packets').setMaxAccess("readonly") if mibBuilder.loadTexts: csbRadiusStatsPending.setStatus('current') if mibBuilder.loadTexts: csbRadiusStatsPending.setDescription('This object indicates the number of RADIUS request packets destined for this server that have not yet timed out or received a response. This variable is incremented when a request is sent and decremented on receipt of the response or on a timeout or retransmission.') csbRadiusStatsTimeouts = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 1, 1, 16), Counter64()).setUnits('packets').setMaxAccess("readonly") if mibBuilder.loadTexts: csbRadiusStatsTimeouts.setStatus('current') if mibBuilder.loadTexts: csbRadiusStatsTimeouts.setDescription('This object indicates the number of RADIUS request timeouts to this server. After a timeout the client may retry to a different server or give up. A retry to a different server is counted as a request as well as a timeout.') csbRadiusStatsUnknownType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 1, 1, 17), Counter64()).setUnits('packets').setMaxAccess("readonly") if mibBuilder.loadTexts: csbRadiusStatsUnknownType.setStatus('current') if mibBuilder.loadTexts: csbRadiusStatsUnknownType.setDescription('This object indicates the number of RADIUS packets of unknown type which were received from this server.') csbRadiusStatsDropped = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 1, 1, 18), Counter64()).setUnits('packets').setMaxAccess("readonly") if mibBuilder.loadTexts: csbRadiusStatsDropped.setStatus('current') if mibBuilder.loadTexts: csbRadiusStatsDropped.setDescription('This object indicates the number of RADIUS packets which were received from this server and dropped for some other reason.') csbRfBillRealmStatsTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 2), ) if mibBuilder.loadTexts: csbRfBillRealmStatsTable.setStatus('current') if mibBuilder.loadTexts: csbRfBillRealmStatsTable.setDescription('This table describes the Rf billing statistics information which monitors the messages sent per-realm by Rf billing manager(SBC). SBC sends Rf billing data using Diameter as a transport protocol. Rf billing uses only ACR and ACA Diameter messages for the transport of billing data. The Accounting-Record-Type AVP on the ACR message labels the type of the accounting request. The following types are used by Rf billing. 1. For session-based charging, the types Start (session begins), Interim (session is modified) and Stop (session ends) are used. 2. For event-based charging, the type Event is used when a chargeable event occurs outside the scope of a session. Each row of this table is identified by a value of csbRfBillRealmStatsIndex and csbRfBillRealmStatsRealmName. The other indices of this table are csbCallStatsInstanceIndex defined in csbCallStatsInstanceTable and csbCallStatsServiceIndex defined in csbCallStatsTable.') csbRfBillRealmStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 2, 1), ).setIndexNames((0, "CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCallStatsInstanceIndex"), (0, "CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCallStatsServiceIndex"), (0, "CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbRfBillRealmStatsIndex"), (0, "CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbRfBillRealmStatsRealmName")) if mibBuilder.loadTexts: csbRfBillRealmStatsEntry.setStatus('current') if mibBuilder.loadTexts: csbRfBillRealmStatsEntry.setDescription('A conceptual row in the csbRfBillRealmStatsTable. There is an entry in this table for each realm, as identified by a value of csbRfBillRealmStatsIndex and csbRfBillRealmStatsRealmName. The other indices of this table are csbCallStatsInstanceIndex defined in csbCallStatsInstanceTable and csbCallStatsServiceIndex defined in csbCallStatsTable.') csbRfBillRealmStatsIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 2, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 31))) if mibBuilder.loadTexts: csbRfBillRealmStatsIndex.setStatus('current') if mibBuilder.loadTexts: csbRfBillRealmStatsIndex.setDescription('This object indicates the billing method instance index. The range of valid values for this field is 0 - 31.') csbRfBillRealmStatsRealmName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 2, 1, 2), SnmpAdminString()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbRfBillRealmStatsRealmName.setStatus('current') if mibBuilder.loadTexts: csbRfBillRealmStatsRealmName.setDescription('This object indicates the realm for which these statistics are collected. The length of this object is zero when value is not assigned to it.') csbRfBillRealmStatsTotalStartAcrs = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 2, 1, 3), Unsigned32()).setUnits('ACRs').setMaxAccess("readonly") if mibBuilder.loadTexts: csbRfBillRealmStatsTotalStartAcrs.setStatus('current') if mibBuilder.loadTexts: csbRfBillRealmStatsTotalStartAcrs.setDescription('This object indicates the combined sum of successful and failed Start ACRs since start of day or the last time the statistics were reset.') csbRfBillRealmStatsTotalInterimAcrs = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 2, 1, 4), Unsigned32()).setUnits('ACRs').setMaxAccess("readonly") if mibBuilder.loadTexts: csbRfBillRealmStatsTotalInterimAcrs.setStatus('current') if mibBuilder.loadTexts: csbRfBillRealmStatsTotalInterimAcrs.setDescription('This object indicates the combined sum of successful and failed Interim ACRs since start of day or the last time the statistics were reset.') csbRfBillRealmStatsTotalStopAcrs = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 2, 1, 5), Unsigned32()).setUnits('ACRs').setMaxAccess("readonly") if mibBuilder.loadTexts: csbRfBillRealmStatsTotalStopAcrs.setStatus('current') if mibBuilder.loadTexts: csbRfBillRealmStatsTotalStopAcrs.setDescription('This object indicates the combined sum of successful and failed Stop ACRs since start of day or the last time the statistics were reset.') csbRfBillRealmStatsTotalEventAcrs = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 2, 1, 6), Unsigned32()).setUnits('ACRs').setMaxAccess("readonly") if mibBuilder.loadTexts: csbRfBillRealmStatsTotalEventAcrs.setStatus('current') if mibBuilder.loadTexts: csbRfBillRealmStatsTotalEventAcrs.setDescription('This object indicates the combined sum of successful and failed Event ACRs since start of day or the last time the statistics were reset.') csbRfBillRealmStatsSuccStartAcrs = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 2, 1, 7), Unsigned32()).setUnits('ACRs').setMaxAccess("readonly") if mibBuilder.loadTexts: csbRfBillRealmStatsSuccStartAcrs.setStatus('current') if mibBuilder.loadTexts: csbRfBillRealmStatsSuccStartAcrs.setDescription('This object indicates the total number of successful Start ACRs since start of day or the last time the statistics were reset.') csbRfBillRealmStatsSuccInterimAcrs = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 2, 1, 8), Unsigned32()).setUnits('ACRs').setMaxAccess("readonly") if mibBuilder.loadTexts: csbRfBillRealmStatsSuccInterimAcrs.setStatus('current') if mibBuilder.loadTexts: csbRfBillRealmStatsSuccInterimAcrs.setDescription('This object indicates the total number of successful Interim ACRs since start of day or the last time the statistics were reset.') csbRfBillRealmStatsSuccStopAcrs = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 2, 1, 9), Unsigned32()).setUnits('ACRs').setMaxAccess("readonly") if mibBuilder.loadTexts: csbRfBillRealmStatsSuccStopAcrs.setStatus('current') if mibBuilder.loadTexts: csbRfBillRealmStatsSuccStopAcrs.setDescription('This object indicates the total number of successful Stop ACRs since start of day or the last time the statistics were reset.') csbRfBillRealmStatsSuccEventAcrs = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 2, 1, 10), Unsigned32()).setUnits('ACRs').setMaxAccess("readonly") if mibBuilder.loadTexts: csbRfBillRealmStatsSuccEventAcrs.setStatus('current') if mibBuilder.loadTexts: csbRfBillRealmStatsSuccEventAcrs.setDescription('This object indicates the total number of successful Event ACRs since start of day or the last time the statistics were reset.') csbRfBillRealmStatsFailStartAcrs = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 2, 1, 11), Unsigned32()).setUnits('ACRs').setMaxAccess("readonly") if mibBuilder.loadTexts: csbRfBillRealmStatsFailStartAcrs.setStatus('current') if mibBuilder.loadTexts: csbRfBillRealmStatsFailStartAcrs.setDescription('This object indicates the total number of failed Start ACRs since start of day or the last time the statistics were reset.') csbRfBillRealmStatsFailInterimAcrs = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 2, 1, 12), Unsigned32()).setUnits('ACRs').setMaxAccess("readonly") if mibBuilder.loadTexts: csbRfBillRealmStatsFailInterimAcrs.setStatus('current') if mibBuilder.loadTexts: csbRfBillRealmStatsFailInterimAcrs.setDescription('This object indicates the total number of failed Interim ACRs since start of day or the last time the statistics were reset.') csbRfBillRealmStatsFailStopAcrs = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 2, 1, 13), Unsigned32()).setUnits('ACRs').setMaxAccess("readonly") if mibBuilder.loadTexts: csbRfBillRealmStatsFailStopAcrs.setStatus('current') if mibBuilder.loadTexts: csbRfBillRealmStatsFailStopAcrs.setDescription('This object indicates the total number of failed Stop ACRs since start of day or the last time the statistics were reset.') csbRfBillRealmStatsFailEventAcrs = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 2, 1, 14), Unsigned32()).setUnits('ACRs').setMaxAccess("readonly") if mibBuilder.loadTexts: csbRfBillRealmStatsFailEventAcrs.setStatus('current') if mibBuilder.loadTexts: csbRfBillRealmStatsFailEventAcrs.setDescription('This object indicates the total number of failed Event ACRs since start of day or the last time the statistics were reset.') csbSIPMthdCurrentStatsTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 3), ) if mibBuilder.loadTexts: csbSIPMthdCurrentStatsTable.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsTable.setDescription('This table reports count of SIP request and various SIP responses for each SIP method on a SIP adjacency in a given interval. Each entry in this table represents a SIP method, its incoming and outgoing count, individual incoming and outgoing count of various SIP responses for this method on a SIP adjacency in a given interval. To understand the meaning of interval please refer <Periodic Statistics> section in description of ciscoSbcStatsMIB. This table is indexed on csbSIPMthdCurrentStatsAdjName, csbSIPMthdCurrentStatsMethod and csbSIPMthdCurrentStatsInterval. The other indices of this table are csbCallStatsInstanceIndex defined in csbCallStatsInstanceTable and csbCallStatsServiceIndex defined in csbCallStatsTable.') csbSIPMthdCurrentStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 3, 1), ).setIndexNames((0, "CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCallStatsInstanceIndex"), (0, "CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCallStatsServiceIndex"), (0, "CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdCurrentStatsAdjName"), (0, "CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdCurrentStatsMethod"), (0, "CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdCurrentStatsInterval")) if mibBuilder.loadTexts: csbSIPMthdCurrentStatsEntry.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsEntry.setDescription('A conceptual row in the csbSIPMthdCurrentStatsTable. Each row describes a SIP method and various responses count for this method on a given SIP adjacency and given interval. This table is indexed on csbSIPMthdCurrentStatsAdjName, csbSIPMthdCurrentStatsMethod and csbSIPMthdCurrentStatsInterval. The other indices of this table are csbCallStatsInstanceIndex defined in csbCallStatsInstanceTable and csbCallStatsServiceIndex defined in csbCallStatsTable.') csbSIPMthdCurrentStatsAdjName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 3, 1, 1), SnmpAdminString()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbSIPMthdCurrentStatsAdjName.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsAdjName.setDescription('This object indicates the name of the SIP adjacency for which stats related with SIP request and all kind of corresponding SIP responses are reported. The object acts as an index of the table.') csbSIPMthdCurrentStatsMethod = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 3, 1, 2), CiscoSbcSIPMethod()) if mibBuilder.loadTexts: csbSIPMthdCurrentStatsMethod.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsMethod.setDescription('This object indicates the SIP method Request. The object acts as an index of the table.') csbSIPMthdCurrentStatsInterval = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 3, 1, 3), CiscoSbcPeriodicStatsInterval()) if mibBuilder.loadTexts: csbSIPMthdCurrentStatsInterval.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsInterval.setDescription('This object indicates the interval for which the periodic statistics information is to be displayed. The interval values can be 5 minutes, 15 minutes, 1 hour , 1 Day. This object acts as an index for the table.') csbSIPMthdCurrentStatsMethodName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 3, 1, 4), SnmpAdminString()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbSIPMthdCurrentStatsMethodName.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsMethodName.setDescription('This object indicates the text representation of the SIP method request. E.g. INVITE, ACK, BYE etc.') csbSIPMthdCurrentStatsReqIn = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 3, 1, 5), Gauge32()).setUnits('requests').setMaxAccess("readonly") if mibBuilder.loadTexts: csbSIPMthdCurrentStatsReqIn.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsReqIn.setDescription('This object indicates the total incoming SIP message requests of this type on this SIP adjacency.') csbSIPMthdCurrentStatsReqOut = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 3, 1, 6), Gauge32()).setUnits('requests').setMaxAccess("readonly") if mibBuilder.loadTexts: csbSIPMthdCurrentStatsReqOut.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsReqOut.setDescription('This object indicates the total outgoing SIP message requests of this type on this SIP adjacency.') csbSIPMthdCurrentStatsResp1xxIn = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 3, 1, 7), Gauge32()).setUnits('responses').setMaxAccess("readonly") if mibBuilder.loadTexts: csbSIPMthdCurrentStatsResp1xxIn.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsResp1xxIn.setDescription('This object indicates the total 1xx responses for this method received on this SIP adjacency.') csbSIPMthdCurrentStatsResp1xxOut = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 3, 1, 8), Gauge32()).setUnits('responses').setMaxAccess("readonly") if mibBuilder.loadTexts: csbSIPMthdCurrentStatsResp1xxOut.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsResp1xxOut.setDescription('This object indicates the total 1xx responses for this method sent on this SIP adjacency.') csbSIPMthdCurrentStatsResp2xxIn = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 3, 1, 9), Gauge32()).setUnits('responses').setMaxAccess("readonly") if mibBuilder.loadTexts: csbSIPMthdCurrentStatsResp2xxIn.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsResp2xxIn.setDescription('This object indicates the total 2xx responses for this method received on this SIP adjacency.') csbSIPMthdCurrentStatsResp2xxOut = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 3, 1, 10), Gauge32()).setUnits('responses').setMaxAccess("readonly") if mibBuilder.loadTexts: csbSIPMthdCurrentStatsResp2xxOut.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsResp2xxOut.setDescription('This object indicates the total 2xx responses for this method sent on this SIP adjacency.') csbSIPMthdCurrentStatsResp3xxIn = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 3, 1, 11), Gauge32()).setUnits('responses').setMaxAccess("readonly") if mibBuilder.loadTexts: csbSIPMthdCurrentStatsResp3xxIn.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsResp3xxIn.setDescription('This object indicates the total 3xx responses for this method received on this SIP adjacency.') csbSIPMthdCurrentStatsResp3xxOut = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 3, 1, 12), Gauge32()).setUnits('responses').setMaxAccess("readonly") if mibBuilder.loadTexts: csbSIPMthdCurrentStatsResp3xxOut.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsResp3xxOut.setDescription('This object indicates the total 3xx responses for this method sent on this SIP adjacency.') csbSIPMthdCurrentStatsResp4xxIn = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 3, 1, 13), Gauge32()).setUnits('responses').setMaxAccess("readonly") if mibBuilder.loadTexts: csbSIPMthdCurrentStatsResp4xxIn.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsResp4xxIn.setDescription('This object indicates the total 4xx responses for this method received on this SIP adjacency.') csbSIPMthdCurrentStatsResp4xxOut = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 3, 1, 14), Gauge32()).setUnits('responses').setMaxAccess("readonly") if mibBuilder.loadTexts: csbSIPMthdCurrentStatsResp4xxOut.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsResp4xxOut.setDescription('This object indicates the total 4xx responses for this method sent on this SIP adjacency.') csbSIPMthdCurrentStatsResp5xxIn = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 3, 1, 15), Gauge32()).setUnits('responses').setMaxAccess("readonly") if mibBuilder.loadTexts: csbSIPMthdCurrentStatsResp5xxIn.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsResp5xxIn.setDescription('This object indicates the total 5xx responses for this method received on this SIP adjacency.') csbSIPMthdCurrentStatsResp5xxOut = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 3, 1, 16), Gauge32()).setUnits('responses').setMaxAccess("readonly") if mibBuilder.loadTexts: csbSIPMthdCurrentStatsResp5xxOut.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsResp5xxOut.setDescription('This object indicates the total 5xx responses for this method sent on this SIP adjacency.') csbSIPMthdCurrentStatsResp6xxIn = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 3, 1, 17), Gauge32()).setUnits('responses').setMaxAccess("readonly") if mibBuilder.loadTexts: csbSIPMthdCurrentStatsResp6xxIn.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsResp6xxIn.setDescription('This object indicates the total 6xx responses for this method received on this SIP adjacency.') csbSIPMthdCurrentStatsResp6xxOut = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 3, 1, 18), Gauge32()).setUnits('responses').setMaxAccess("readonly") if mibBuilder.loadTexts: csbSIPMthdCurrentStatsResp6xxOut.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsResp6xxOut.setDescription('This object indicates the total 6xx responses for this method sent on this SIP adjacency.') csbSIPMthdHistoryStatsTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 4), ) if mibBuilder.loadTexts: csbSIPMthdHistoryStatsTable.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsTable.setDescription('This table provide historical count of SIP request and various SIP responses for each SIP method on a SIP adjacency in various interval length defined by the csbSIPMthdHistoryStatsInterval object. Each entry in this table represents a SIP method, its incoming and outgoing count, individual incoming and outgoing count of various SIP responses for this method on a SIP adjacency in a given interval. The possible values of interval will be previous 5 minutes, previous 15 minutes, previous 1 hour and previous day. To understand the meaning of interval please refer <Periodic Statistics> description of ciscoSbcStatsMIB. This table is indexed on csbSIPMthdHistoryStatsAdjName, csbSIPMthdHistoryStatsMethod and csbSIPMthdHistoryStatsInterval. The other indices of this table are csbCallStatsInstanceIndex defined in csbCallStatsInstanceTable and csbCallStatsServiceIndex defined in csbCallStatsTable.') csbSIPMthdHistoryStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 4, 1), ).setIndexNames((0, "CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCallStatsInstanceIndex"), (0, "CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCallStatsServiceIndex"), (0, "CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdHistoryStatsAdjName"), (0, "CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdHistoryStatsMethod"), (0, "CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdHistoryStatsInterval")) if mibBuilder.loadTexts: csbSIPMthdHistoryStatsEntry.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsEntry.setDescription('A conceptual row in the csbSIPMthdHistoryStatsTable. The entries in this table are updated as interval completes in the csbSIPMthdCurrentStatsTable table and the data is moved from that table to this one. This table is indexed on csbSIPMthdHistoryStatsAdjName, csbSIPMthdHistoryStatsMethod and csbSIPMthdHistoryStatsInterval. The other indices of this table are csbCallStatsInstanceIndex defined in csbCallStatsInstanceTable and csbCallStatsServiceIndex defined in csbCallStatsTable.') csbSIPMthdHistoryStatsAdjName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 4, 1, 1), SnmpAdminString()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbSIPMthdHistoryStatsAdjName.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsAdjName.setDescription('This object indicates the name of the SIP adjacency for which stats related with SIP request and all kind of corresponding SIP responses are reported. The object acts as an index of the table.') csbSIPMthdHistoryStatsMethod = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 4, 1, 2), CiscoSbcSIPMethod()) if mibBuilder.loadTexts: csbSIPMthdHistoryStatsMethod.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsMethod.setDescription('This object indicates the SIP method Request. The object acts as an index of the table.') csbSIPMthdHistoryStatsInterval = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 4, 1, 3), CiscoSbcPeriodicStatsInterval()) if mibBuilder.loadTexts: csbSIPMthdHistoryStatsInterval.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsInterval.setDescription('This object indicates the interval for which the historical statistics information is to be displayed. The interval values can be previous 5 minutes, previous 15 minutes, previous 1 hour and previous 1 Day. This object acts as an index for the table.') csbSIPMthdHistoryStatsMethodName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 4, 1, 4), SnmpAdminString()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbSIPMthdHistoryStatsMethodName.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsMethodName.setDescription('This object indicates the text representation of the SIP method request. E.g. INVITE, ACK, BYE etc.') csbSIPMthdHistoryStatsReqIn = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 4, 1, 5), Gauge32()).setUnits('requests').setMaxAccess("readonly") if mibBuilder.loadTexts: csbSIPMthdHistoryStatsReqIn.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsReqIn.setDescription('This object indicates the total incoming SIP message requests of this type on this SIP adjacency.') csbSIPMthdHistoryStatsReqOut = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 4, 1, 6), Gauge32()).setUnits('requests').setMaxAccess("readonly") if mibBuilder.loadTexts: csbSIPMthdHistoryStatsReqOut.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsReqOut.setDescription('This object indicates the total outgoing SIP message requests of this type on this SIP adjacency.') csbSIPMthdHistoryStatsResp1xxIn = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 4, 1, 7), Gauge32()).setUnits('responses').setMaxAccess("readonly") if mibBuilder.loadTexts: csbSIPMthdHistoryStatsResp1xxIn.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsResp1xxIn.setDescription('This object indicates the total 1xx responses for this method received on this SIP adjacency.') csbSIPMthdHistoryStatsResp1xxOut = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 4, 1, 8), Gauge32()).setUnits('responses').setMaxAccess("readonly") if mibBuilder.loadTexts: csbSIPMthdHistoryStatsResp1xxOut.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsResp1xxOut.setDescription('This object indicates the total 1xx responses for this method sent on this SIP adjacency.') csbSIPMthdHistoryStatsResp2xxIn = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 4, 1, 9), Gauge32()).setUnits('responses').setMaxAccess("readonly") if mibBuilder.loadTexts: csbSIPMthdHistoryStatsResp2xxIn.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsResp2xxIn.setDescription('This object indicates the total 2xx responses for this method received on this SIP adjacency.') csbSIPMthdHistoryStatsResp2xxOut = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 4, 1, 10), Gauge32()).setUnits('responses').setMaxAccess("readonly") if mibBuilder.loadTexts: csbSIPMthdHistoryStatsResp2xxOut.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsResp2xxOut.setDescription('This object indicates the total 2xx responses for this method sent on this SIP adjacency.') csbSIPMthdHistoryStatsResp3xxIn = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 4, 1, 11), Gauge32()).setUnits('responses').setMaxAccess("readonly") if mibBuilder.loadTexts: csbSIPMthdHistoryStatsResp3xxIn.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsResp3xxIn.setDescription('This object indicates the total 3xx responses for this method received on this SIP adjacency.') csbSIPMthdHistoryStatsResp3xxOut = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 4, 1, 12), Gauge32()).setUnits('responses').setMaxAccess("readonly") if mibBuilder.loadTexts: csbSIPMthdHistoryStatsResp3xxOut.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsResp3xxOut.setDescription('This object indicates the total 3xx responses for this method sent on this SIP adjacency.') csbSIPMthdHistoryStatsResp4xxIn = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 4, 1, 13), Gauge32()).setUnits('responses').setMaxAccess("readonly") if mibBuilder.loadTexts: csbSIPMthdHistoryStatsResp4xxIn.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsResp4xxIn.setDescription('This object indicates the total 4xx responses for this method received on this SIP adjacency.') csbSIPMthdHistoryStatsResp4xxOut = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 4, 1, 14), Gauge32()).setUnits('responses').setMaxAccess("readonly") if mibBuilder.loadTexts: csbSIPMthdHistoryStatsResp4xxOut.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsResp4xxOut.setDescription('This object indicates the total 4xx responses for this method sent on this SIP adjacency.') csbSIPMthdHistoryStatsResp5xxIn = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 4, 1, 15), Gauge32()).setUnits('responses').setMaxAccess("readonly") if mibBuilder.loadTexts: csbSIPMthdHistoryStatsResp5xxIn.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsResp5xxIn.setDescription('This object indicates the total 5xx responses for this method received on this SIP adjacency.') csbSIPMthdHistoryStatsResp5xxOut = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 4, 1, 16), Gauge32()).setUnits('responses').setMaxAccess("readonly") if mibBuilder.loadTexts: csbSIPMthdHistoryStatsResp5xxOut.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsResp5xxOut.setDescription('This object indicates the total 5xx responses for this method sent on this SIP adjacency.') csbSIPMthdHistoryStatsResp6xxIn = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 4, 1, 17), Gauge32()).setUnits('responses').setMaxAccess("readonly") if mibBuilder.loadTexts: csbSIPMthdHistoryStatsResp6xxIn.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsResp6xxIn.setDescription('This object indicates the total 6xx responses for this method received on this SIP adjacency.') csbSIPMthdHistoryStatsResp6xxOut = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 4, 1, 18), Gauge32()).setUnits('responses').setMaxAccess("readonly") if mibBuilder.loadTexts: csbSIPMthdHistoryStatsResp6xxOut.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsResp6xxOut.setDescription('This object indicates the total 6xx responses for this method sent on this SIP adjacency.') csbSIPMthdRCCurrentStatsTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 5), ) if mibBuilder.loadTexts: csbSIPMthdRCCurrentStatsTable.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdRCCurrentStatsTable.setDescription('This table reports SIP method request and response code statistics for each method and response code combination on given SIP adjacency in a given interval. To understand the meaning of interval please refer <Periodic Statistics> section in description of ciscoSbcStatsMIB. An exact lookup will return a row only if - 1) detailed response code statistics are turned on in SBC 2) response code messages sent or received is non zero for given SIP adjacency, method and interval. Also an inexact lookup will only return rows for messages with non-zero counts, to protect the user from large numbers of rows for response codes which have not been received or sent.') csbSIPMthdRCCurrentStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 5, 1), ).setIndexNames((0, "CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCallStatsInstanceIndex"), (0, "CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCallStatsServiceIndex"), (0, "CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdRCCurrentStatsAdjName"), (0, "CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdRCCurrentStatsMethod"), (0, "CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdRCCurrentStatsRespCode"), (0, "CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdRCCurrentStatsInterval")) if mibBuilder.loadTexts: csbSIPMthdRCCurrentStatsEntry.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdRCCurrentStatsEntry.setDescription('A conceptual row in the csbSIPMthdRCCurrentStatsTable. Each entry in this table represents a method and response code combination. Each entry in this table is identified by a value of csbSIPMthdRCCurrentStatsAdjName, csbSIPMthdRCCurrentStatsMethod, csbSIPMthdRCCurrentStatsRespCode and csbSIPMthdRCCurrentStatsInterval. The other indices of this table are csbCallStatsInstanceIndex defined in csbCallStatsInstanceTable and csbCallStatsServiceIndex defined in csbCallStatsTable.') csbSIPMthdRCCurrentStatsAdjName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 5, 1, 1), SnmpAdminString()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbSIPMthdRCCurrentStatsAdjName.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdRCCurrentStatsAdjName.setDescription('This identifies the name of the adjacency for which statistics are reported. This object acts as an index for the table.') csbSIPMthdRCCurrentStatsMethod = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 5, 1, 2), CiscoSbcSIPMethod()) if mibBuilder.loadTexts: csbSIPMthdRCCurrentStatsMethod.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdRCCurrentStatsMethod.setDescription('This object indicates the SIP method request. This object acts as an index for the table.') csbSIPMthdRCCurrentStatsRespCode = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 5, 1, 3), Unsigned32()) if mibBuilder.loadTexts: csbSIPMthdRCCurrentStatsRespCode.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdRCCurrentStatsRespCode.setDescription('This object indicates the response code for the SIP message request. The range of valid values for SIP response codes is 100 - 999. This object acts as an index for the table.') csbSIPMthdRCCurrentStatsInterval = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 5, 1, 4), CiscoSbcPeriodicStatsInterval()) if mibBuilder.loadTexts: csbSIPMthdRCCurrentStatsInterval.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdRCCurrentStatsInterval.setDescription('This object identifies the interval for which the periodic statistics information is to be displayed. The interval values can be 5 min, 15 mins, 1 hour , 1 Day. This object acts as an index for the table.') csbSIPMthdRCCurrentStatsMethodName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 5, 1, 5), SnmpAdminString()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbSIPMthdRCCurrentStatsMethodName.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdRCCurrentStatsMethodName.setDescription('This object indicates the text representation of the SIP method request. E.g. INVITE, ACK, BYE etc.') csbSIPMthdRCCurrentStatsRespIn = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 5, 1, 6), Gauge32()).setUnits('responses').setMaxAccess("readonly") if mibBuilder.loadTexts: csbSIPMthdRCCurrentStatsRespIn.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdRCCurrentStatsRespIn.setDescription('This object indicates the total SIP messages with this response code this method received on this SIP adjacency.') csbSIPMthdRCCurrentStatsRespOut = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 5, 1, 7), Gauge32()).setUnits('responses').setMaxAccess("readonly") if mibBuilder.loadTexts: csbSIPMthdRCCurrentStatsRespOut.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdRCCurrentStatsRespOut.setDescription('This object indicates the total SIP messages with this response code for this method sent on this SIP adjacency.') csbSIPMthdRCHistoryStatsTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 6), ) if mibBuilder.loadTexts: csbSIPMthdRCHistoryStatsTable.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdRCHistoryStatsTable.setDescription('This table reports historical data for SIP method request and response code statistics for each method and response code combination in a given past interval. The possible values of interval will be previous 5 minutes, previous 15 minutes, previous 1 hour and previous day. To understand the meaning of interval please refer <Periodic Statistics> section in description of ciscoSbcStatsMIB. An exact lookup will return a row only if - 1) detailed response code statistics are turned on in SBC 2) response code messages sent or received is non zero for given SIP adjacency, method and interval. Also an inexact lookup will only return rows for messages with non-zero counts, to protect the user from large numbers of rows for response codes which have not been received or sent.') csbSIPMthdRCHistoryStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 6, 1), ).setIndexNames((0, "CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCallStatsInstanceIndex"), (0, "CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB", "csbCallStatsServiceIndex"), (0, "CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdRCHistoryStatsAdjName"), (0, "CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdRCHistoryStatsMethod"), (0, "CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdRCHistoryStatsRespCode"), (0, "CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdRCHistoryStatsInterval")) if mibBuilder.loadTexts: csbSIPMthdRCHistoryStatsEntry.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdRCHistoryStatsEntry.setDescription('A conceptual row in the csbSIPMthdRCHistoryStatsTable. The entries in this table are updated as interval completes in the csbSIPMthdRCCurrentStatsTable table and the data is moved from that table to this one. Each entry in this table is identified by a value of csbSIPMthdRCHistoryStatsAdjName, csbSIPMthdRCHistoryStatsMethod, csbSIPMthdRCHistoryStatsRespCode and csbSIPMthdRCHistoryStatsInterval. The other indices of this table are csbCallStatsInstanceIndex defined in csbCallStatsInstanceTable and csbCallStatsServiceIndex defined in csbCallStatsTable.') csbSIPMthdRCHistoryStatsAdjName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 6, 1, 1), SnmpAdminString()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbSIPMthdRCHistoryStatsAdjName.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdRCHistoryStatsAdjName.setDescription('This identifies the name of the adjacency for which statistics are reported. This object acts as an index for the table.') csbSIPMthdRCHistoryStatsMethod = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 6, 1, 2), CiscoSbcSIPMethod()) if mibBuilder.loadTexts: csbSIPMthdRCHistoryStatsMethod.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdRCHistoryStatsMethod.setDescription('This object indicates the SIP method request. This object acts as an index for the table.') csbSIPMthdRCHistoryStatsMethodName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 6, 1, 3), SnmpAdminString()).setMaxAccess("readonly") if mibBuilder.loadTexts: csbSIPMthdRCHistoryStatsMethodName.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdRCHistoryStatsMethodName.setDescription('This object indicates the text representation of the SIP method request. E.g. INVITE, ACK, BYE etc.') csbSIPMthdRCHistoryStatsRespCode = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 6, 1, 4), Unsigned32()) if mibBuilder.loadTexts: csbSIPMthdRCHistoryStatsRespCode.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdRCHistoryStatsRespCode.setDescription('This object indicates the response code for the SIP message request. The range of valid values for SIP response codes is 100 - 999. This object acts as an index for the table.') csbSIPMthdRCHistoryStatsInterval = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 6, 1, 5), CiscoSbcPeriodicStatsInterval()) if mibBuilder.loadTexts: csbSIPMthdRCHistoryStatsInterval.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdRCHistoryStatsInterval.setDescription('This object identifies the interval for which the periodic statistics information is to be displayed. The interval values can be previous 5 min, previous 15 mins, previous 1 hour , previous 1 Day. This object acts as an index for the table.') csbSIPMthdRCHistoryStatsRespIn = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 6, 1, 6), Gauge32()).setUnits('responses').setMaxAccess("readonly") if mibBuilder.loadTexts: csbSIPMthdRCHistoryStatsRespIn.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdRCHistoryStatsRespIn.setDescription('This object indicates the total SIP messages with this response code this method received on this SIP adjacency.') csbSIPMthdRCHistoryStatsRespOut = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 6, 1, 7), Gauge32()).setUnits('responses').setMaxAccess("readonly") if mibBuilder.loadTexts: csbSIPMthdRCHistoryStatsRespOut.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdRCHistoryStatsRespOut.setDescription('This object indicates the total SIP messages with this response code for this method sent on this SIP adjacency.') csbStatsMIBCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 757, 2, 1)) csbStatsMIBGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 757, 2, 2)) csbStatsMIBCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 757, 2, 1, 1)).setObjects(("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbRadiusStatsGroup"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbRfBillRealmStatsGroup"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdCurrentStatsGroup"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdHistoryStatsGroup"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdRCHistoryStatsGroup"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdRCCurrentStatsGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csbStatsMIBCompliance = csbStatsMIBCompliance.setStatus('current') if mibBuilder.loadTexts: csbStatsMIBCompliance.setDescription('This is a default module-compliance containing csbStatsMIBGroups.') csbRadiusStatsGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 757, 2, 2, 1)).setObjects(("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbRadiusStatsClientName"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbRadiusStatsClientType"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbRadiusStatsSrvrName"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbRadiusStatsAcsReqs"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbRadiusStatsAcsRtrns"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbRadiusStatsAcsAccpts"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbRadiusStatsAcsRejects"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbRadiusStatsAcsChalls"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbRadiusStatsActReqs"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbRadiusStatsActRetrans"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbRadiusStatsActRsps"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbRadiusStatsMalformedRsps"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbRadiusStatsBadAuths"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbRadiusStatsPending"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbRadiusStatsTimeouts"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbRadiusStatsUnknownType"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbRadiusStatsDropped")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csbRadiusStatsGroup = csbRadiusStatsGroup.setStatus('current') if mibBuilder.loadTexts: csbRadiusStatsGroup.setDescription('A collection of objects providing RADIUS messages statistics for configured RADIUS servers on Cisco Session Border Controller (SBC).') csbRfBillRealmStatsGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 757, 2, 2, 2)).setObjects(("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbRfBillRealmStatsRealmName"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbRfBillRealmStatsTotalStartAcrs"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbRfBillRealmStatsTotalInterimAcrs"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbRfBillRealmStatsTotalStopAcrs"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbRfBillRealmStatsTotalEventAcrs"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbRfBillRealmStatsSuccStartAcrs"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbRfBillRealmStatsSuccInterimAcrs"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbRfBillRealmStatsSuccStopAcrs"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbRfBillRealmStatsSuccEventAcrs"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbRfBillRealmStatsFailStartAcrs"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbRfBillRealmStatsFailInterimAcrs"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbRfBillRealmStatsFailStopAcrs"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbRfBillRealmStatsFailEventAcrs")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csbRfBillRealmStatsGroup = csbRfBillRealmStatsGroup.setStatus('current') if mibBuilder.loadTexts: csbRfBillRealmStatsGroup.setDescription('A collection of objects providing Rf billing statistics information on Cisco Session Border Controller (SBC).') csbSIPMthdCurrentStatsGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 757, 2, 2, 3)).setObjects(("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdCurrentStatsAdjName"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdCurrentStatsMethodName"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdCurrentStatsReqIn"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdCurrentStatsReqOut"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdCurrentStatsResp1xxIn"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdCurrentStatsResp1xxOut"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdCurrentStatsResp2xxIn"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdCurrentStatsResp2xxOut"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdCurrentStatsResp3xxIn"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdCurrentStatsResp3xxOut"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdCurrentStatsResp4xxIn"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdCurrentStatsResp4xxOut"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdCurrentStatsResp5xxIn"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdCurrentStatsResp5xxOut"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdCurrentStatsResp6xxIn"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdCurrentStatsResp6xxOut")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csbSIPMthdCurrentStatsGroup = csbSIPMthdCurrentStatsGroup.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsGroup.setDescription('A collection of objects providing statistics for a SIP method and various responses count for this method on a given SIP adjacency and given interval for Cisco Session Border Controller (SBC).') csbSIPMthdHistoryStatsGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 757, 2, 2, 4)).setObjects(("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdHistoryStatsAdjName"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdHistoryStatsMethodName"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdHistoryStatsReqIn"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdHistoryStatsReqOut"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdHistoryStatsResp1xxIn"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdHistoryStatsResp1xxOut"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdHistoryStatsResp2xxIn"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdHistoryStatsResp2xxOut"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdHistoryStatsResp3xxIn"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdHistoryStatsResp3xxOut"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdHistoryStatsResp4xxIn"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdHistoryStatsResp4xxOut"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdHistoryStatsResp5xxIn"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdHistoryStatsResp5xxOut"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdHistoryStatsResp6xxIn"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdHistoryStatsResp6xxOut")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csbSIPMthdHistoryStatsGroup = csbSIPMthdHistoryStatsGroup.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsGroup.setDescription('A collection of objects providing historical statistics for a SIP method and various responses count for this method on a given SIP adjacency and given interval for Cisco Session Border Controller (SBC).') csbSIPMthdRCCurrentStatsGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 757, 2, 2, 5)).setObjects(("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdRCCurrentStatsAdjName"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdRCCurrentStatsMethodName"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdRCCurrentStatsRespIn"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdRCCurrentStatsRespOut")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csbSIPMthdRCCurrentStatsGroup = csbSIPMthdRCCurrentStatsGroup.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdRCCurrentStatsGroup.setDescription('A collection of objects providing SIP statistics for a method and response code combination for Cisco Session Border Controller (SBC).') csbSIPMthdRCHistoryStatsGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 757, 2, 2, 6)).setObjects(("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdRCHistoryStatsAdjName"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdRCHistoryStatsMethodName"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdRCHistoryStatsRespIn"), ("CISCO-SESS-BORDER-CTRLR-STATS-MIB", "csbSIPMthdRCHistoryStatsRespOut")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csbSIPMthdRCHistoryStatsGroup = csbSIPMthdRCHistoryStatsGroup.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdRCHistoryStatsGroup.setDescription('A collection of objects providing SIP historical statistics for a method and response code combination for Cisco Session Border Controller (SBC).') mibBuilder.exportSymbols("CISCO-SESS-BORDER-CTRLR-STATS-MIB", csbSIPMthdHistoryStatsResp2xxOut=csbSIPMthdHistoryStatsResp2xxOut, csbSIPMthdRCHistoryStatsGroup=csbSIPMthdRCHistoryStatsGroup, csbRfBillRealmStatsFailStopAcrs=csbRfBillRealmStatsFailStopAcrs, csbSIPMthdCurrentStatsMethod=csbSIPMthdCurrentStatsMethod, csbSIPMthdHistoryStatsResp4xxOut=csbSIPMthdHistoryStatsResp4xxOut, csbRadiusStatsEntry=csbRadiusStatsEntry, csbRadiusStatsAcsReqs=csbRadiusStatsAcsReqs, ciscoSbcStatsMIBObjects=ciscoSbcStatsMIBObjects, csbSIPMthdHistoryStatsReqOut=csbSIPMthdHistoryStatsReqOut, csbStatsMIBCompliances=csbStatsMIBCompliances, csbRadiusStatsActReqs=csbRadiusStatsActReqs, ciscoSbcStatsMIB=ciscoSbcStatsMIB, csbSIPMthdCurrentStatsResp4xxOut=csbSIPMthdCurrentStatsResp4xxOut, csbRadiusStatsMalformedRsps=csbRadiusStatsMalformedRsps, csbSIPMthdCurrentStatsResp6xxIn=csbSIPMthdCurrentStatsResp6xxIn, csbRadiusStatsPending=csbRadiusStatsPending, csbSIPMthdHistoryStatsInterval=csbSIPMthdHistoryStatsInterval, csbSIPMthdHistoryStatsEntry=csbSIPMthdHistoryStatsEntry, csbSIPMthdCurrentStatsResp1xxIn=csbSIPMthdCurrentStatsResp1xxIn, csbSIPMthdHistoryStatsResp6xxIn=csbSIPMthdHistoryStatsResp6xxIn, csbRadiusStatsDropped=csbRadiusStatsDropped, csbSIPMthdCurrentStatsResp3xxIn=csbSIPMthdCurrentStatsResp3xxIn, csbSIPMthdRCCurrentStatsRespOut=csbSIPMthdRCCurrentStatsRespOut, csbSIPMthdHistoryStatsResp4xxIn=csbSIPMthdHistoryStatsResp4xxIn, csbSIPMthdRCCurrentStatsGroup=csbSIPMthdRCCurrentStatsGroup, CiscoSbcSIPMethod=CiscoSbcSIPMethod, csbSIPMthdRCCurrentStatsRespIn=csbSIPMthdRCCurrentStatsRespIn, csbRfBillRealmStatsTotalStopAcrs=csbRfBillRealmStatsTotalStopAcrs, csbRfBillRealmStatsGroup=csbRfBillRealmStatsGroup, csbSIPMthdCurrentStatsReqIn=csbSIPMthdCurrentStatsReqIn, csbStatsMIBCompliance=csbStatsMIBCompliance, csbRadiusStatsTable=csbRadiusStatsTable, csbSIPMthdCurrentStatsReqOut=csbSIPMthdCurrentStatsReqOut, csbRfBillRealmStatsTotalStartAcrs=csbRfBillRealmStatsTotalStartAcrs, csbRadiusStatsUnknownType=csbRadiusStatsUnknownType, csbSIPMthdCurrentStatsResp2xxOut=csbSIPMthdCurrentStatsResp2xxOut, csbRfBillRealmStatsTable=csbRfBillRealmStatsTable, csbSIPMthdRCHistoryStatsTable=csbSIPMthdRCHistoryStatsTable, csbSIPMthdCurrentStatsResp5xxOut=csbSIPMthdCurrentStatsResp5xxOut, csbSIPMthdCurrentStatsEntry=csbSIPMthdCurrentStatsEntry, csbSIPMthdRCHistoryStatsMethodName=csbSIPMthdRCHistoryStatsMethodName, csbRadiusStatsBadAuths=csbRadiusStatsBadAuths, csbRfBillRealmStatsEntry=csbRfBillRealmStatsEntry, csbSIPMthdRCHistoryStatsRespOut=csbSIPMthdRCHistoryStatsRespOut, csbSIPMthdHistoryStatsMethod=csbSIPMthdHistoryStatsMethod, csbSIPMthdHistoryStatsGroup=csbSIPMthdHistoryStatsGroup, csbRfBillRealmStatsSuccStopAcrs=csbRfBillRealmStatsSuccStopAcrs, csbSIPMthdRCCurrentStatsEntry=csbSIPMthdRCCurrentStatsEntry, csbRadiusStatsActRsps=csbRadiusStatsActRsps, csbSIPMthdCurrentStatsAdjName=csbSIPMthdCurrentStatsAdjName, csbSIPMthdRCHistoryStatsInterval=csbSIPMthdRCHistoryStatsInterval, csbRfBillRealmStatsFailInterimAcrs=csbRfBillRealmStatsFailInterimAcrs, csbRadiusStatsGroup=csbRadiusStatsGroup, csbRadiusStatsAcsChalls=csbRadiusStatsAcsChalls, csbSIPMthdRCCurrentStatsMethod=csbSIPMthdRCCurrentStatsMethod, csbSIPMthdHistoryStatsTable=csbSIPMthdHistoryStatsTable, csbSIPMthdHistoryStatsResp5xxOut=csbSIPMthdHistoryStatsResp5xxOut, csbSIPMthdRCHistoryStatsMethod=csbSIPMthdRCHistoryStatsMethod, csbStatsMIBGroups=csbStatsMIBGroups, csbRadiusStatsClientType=csbRadiusStatsClientType, csbSIPMthdCurrentStatsResp5xxIn=csbSIPMthdCurrentStatsResp5xxIn, csbSIPMthdHistoryStatsResp3xxOut=csbSIPMthdHistoryStatsResp3xxOut, csbRadiusStatsAcsRejects=csbRadiusStatsAcsRejects, csbSIPMthdCurrentStatsGroup=csbSIPMthdCurrentStatsGroup, csbSIPMthdCurrentStatsResp6xxOut=csbSIPMthdCurrentStatsResp6xxOut, csbSIPMthdRCCurrentStatsMethodName=csbSIPMthdRCCurrentStatsMethodName, csbSIPMthdHistoryStatsResp2xxIn=csbSIPMthdHistoryStatsResp2xxIn, csbRadiusStatsActRetrans=csbRadiusStatsActRetrans, csbRfBillRealmStatsIndex=csbRfBillRealmStatsIndex, csbSIPMthdHistoryStatsResp5xxIn=csbSIPMthdHistoryStatsResp5xxIn, csbRfBillRealmStatsFailStartAcrs=csbRfBillRealmStatsFailStartAcrs, csbSIPMthdHistoryStatsResp6xxOut=csbSIPMthdHistoryStatsResp6xxOut, csbSIPMthdHistoryStatsMethodName=csbSIPMthdHistoryStatsMethodName, csbRfBillRealmStatsSuccStartAcrs=csbRfBillRealmStatsSuccStartAcrs, csbSIPMthdRCHistoryStatsAdjName=csbSIPMthdRCHistoryStatsAdjName, csbRfBillRealmStatsSuccInterimAcrs=csbRfBillRealmStatsSuccInterimAcrs, csbSIPMthdRCCurrentStatsRespCode=csbSIPMthdRCCurrentStatsRespCode, csbSIPMthdCurrentStatsMethodName=csbSIPMthdCurrentStatsMethodName, csbRadiusStatsTimeouts=csbRadiusStatsTimeouts, PYSNMP_MODULE_ID=ciscoSbcStatsMIB, csbSIPMthdCurrentStatsTable=csbSIPMthdCurrentStatsTable, csbSIPMthdRCHistoryStatsRespCode=csbSIPMthdRCHistoryStatsRespCode, csbSIPMthdHistoryStatsAdjName=csbSIPMthdHistoryStatsAdjName, csbSIPMthdRCCurrentStatsInterval=csbSIPMthdRCCurrentStatsInterval, csbSIPMthdCurrentStatsResp2xxIn=csbSIPMthdCurrentStatsResp2xxIn, csbRfBillRealmStatsTotalEventAcrs=csbRfBillRealmStatsTotalEventAcrs, csbSIPMthdCurrentStatsResp1xxOut=csbSIPMthdCurrentStatsResp1xxOut, csbRadiusStatsClientName=csbRadiusStatsClientName, ciscoSbcStatsMIBConform=ciscoSbcStatsMIBConform, csbSIPMthdCurrentStatsResp3xxOut=csbSIPMthdCurrentStatsResp3xxOut, csbRadiusStatsSrvrName=csbRadiusStatsSrvrName, ciscoSbcStatsMIBNotifs=ciscoSbcStatsMIBNotifs, csbRfBillRealmStatsFailEventAcrs=csbRfBillRealmStatsFailEventAcrs, csbSIPMthdRCHistoryStatsRespIn=csbSIPMthdRCHistoryStatsRespIn, csbSIPMthdHistoryStatsResp3xxIn=csbSIPMthdHistoryStatsResp3xxIn, csbSIPMthdRCHistoryStatsEntry=csbSIPMthdRCHistoryStatsEntry, csbSIPMthdRCCurrentStatsAdjName=csbSIPMthdRCCurrentStatsAdjName, csbRfBillRealmStatsTotalInterimAcrs=csbRfBillRealmStatsTotalInterimAcrs, csbSIPMthdCurrentStatsResp4xxIn=csbSIPMthdCurrentStatsResp4xxIn, csbSIPMthdHistoryStatsResp1xxOut=csbSIPMthdHistoryStatsResp1xxOut, csbRfBillRealmStatsRealmName=csbRfBillRealmStatsRealmName, csbRadiusStatsEntIndex=csbRadiusStatsEntIndex, csbRadiusStatsAcsRtrns=csbRadiusStatsAcsRtrns, csbRadiusStatsAcsAccpts=csbRadiusStatsAcsAccpts, csbRfBillRealmStatsSuccEventAcrs=csbRfBillRealmStatsSuccEventAcrs, csbSIPMthdCurrentStatsInterval=csbSIPMthdCurrentStatsInterval, csbSIPMthdRCCurrentStatsTable=csbSIPMthdRCCurrentStatsTable, CiscoSbcRadiusClientType=CiscoSbcRadiusClientType, csbSIPMthdHistoryStatsReqIn=csbSIPMthdHistoryStatsReqIn, csbSIPMthdHistoryStatsResp1xxIn=csbSIPMthdHistoryStatsResp1xxIn)
(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, constraints_union, value_range_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueSizeConstraint', 'SingleValueConstraint', 'ConstraintsIntersection', 'ConstraintsUnion', 'ValueRangeConstraint') (csb_call_stats_service_index, csb_call_stats_instance_index, cisco_sbc_periodic_stats_interval) = mibBuilder.importSymbols('CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCallStatsServiceIndex', 'csbCallStatsInstanceIndex', 'CiscoSbcPeriodicStatsInterval') (cisco_mgmt,) = mibBuilder.importSymbols('CISCO-SMI', 'ciscoMgmt') (snmp_admin_string,) = mibBuilder.importSymbols('SNMP-FRAMEWORK-MIB', 'SnmpAdminString') (notification_group, module_compliance, object_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance', 'ObjectGroup') (counter32, notification_type, integer32, ip_address, mib_scalar, mib_table, mib_table_row, mib_table_column, iso, bits, object_identity, gauge32, time_ticks, mib_identifier, module_identity, counter64, unsigned32) = mibBuilder.importSymbols('SNMPv2-SMI', 'Counter32', 'NotificationType', 'Integer32', 'IpAddress', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'iso', 'Bits', 'ObjectIdentity', 'Gauge32', 'TimeTicks', 'MibIdentifier', 'ModuleIdentity', 'Counter64', 'Unsigned32') (textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString') cisco_sbc_stats_mib = module_identity((1, 3, 6, 1, 4, 1, 9, 9, 757)) ciscoSbcStatsMIB.setRevisions(('2010-09-15 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: ciscoSbcStatsMIB.setRevisionsDescriptions(('Latest version of this MIB module.',)) if mibBuilder.loadTexts: ciscoSbcStatsMIB.setLastUpdated('201009150000Z') if mibBuilder.loadTexts: ciscoSbcStatsMIB.setOrganization('Cisco Systems, Inc.') if mibBuilder.loadTexts: ciscoSbcStatsMIB.setContactInfo('Cisco Systems Customer Service Postal: 170 W Tasman Drive San Jose, CA 95134 USA Tel: +1 800 553-NETS E-mail: sbc-dev@cisco.com') if mibBuilder.loadTexts: ciscoSbcStatsMIB.setDescription('The main purpose of this MIB is to define the statistics information for Session Border Controller application. This MIB categorizes the statistics information into following types: 1. RADIUS Messages Statistics - Represents statistics of various RADIUS messages for RADIUS servers with which the client (SBC) shares a secret. 2. Rf Billing Statistics- Represents Rf billing statistics information which monitors the messages sent per-realm over IMS Rx interface by Rf billing manager(SBC). 3. SIP Statistics - Represents SIP requests and various SIP responses on a SIP adjacency in a given interval. The Session Border Controller (SBC) enables direct IP-to-IP interconnect between multiple administrative domains for session-based services providing protocol inter-working, security, and admission control and management. The SBC is a voice over IP (VoIP) device that sits on the border of a network and controls call admission to that network. The primary purpose of an SBC is to protect the interior of the network from excessive call load and malicious traffic. Additional functions provided by the SBC include media bridging and billing services. Periodic Statistics - Represents the SBC call statistics information for a particular time interval. E.g. you can specify that you want to retrieve statistics for a summary period of the current or previous 5 minutes, 15 minutes, hour, or day. The statistics for 5 minutes are divided into five minute intervals past the hour - that is, at 0 minutes, 5 minutes, 10 minutes... past the hour. When you retrieve statistics for the current five minute period, you will be given statistics from the start of the interval to the current time. When you retrieve statistics for the previous five minutes, you will be given the statistics for the entirety of the previous interval. For example, if it is currently 12:43 - the current 5 minute statistics cover 12:40 - 12:43 - the previous 5 minute statistics cover 12:35 - 12:40 The other intervals work similarly. 15 minute statistics are divided into 15 minute intervals past the hour (0 minutes, 15 minutes, 30 minutes, 45 minutes). Hourly statistics are divided into intervals on the hour. Daily statistics are divided into intervals at 0:00 each day. Therefore, if you retrieve the statistics at 12:43 for each of these intervals, the periods covered are as follows. - current 15 minutes: 12:30 - 12:43 - previous 15 minutes: 12:15 - 12:30 - current hour: 12:00 - 12:43 - last hour: 11:00 - 12:00 - current day: 00:00 - 12:43 - last day: 00:00 (the day before) - 00:00. GLOSSARY SBC: Session Border Controller CSB: CISCO Session Border Controller Adjacency: An adjacency contains the system information to be transmitted to next HOP. ACR: Accounting Request ACA: Accounting Accept AVP: Attribute-Value Pairs REFERENCES 1. CISCO Session Border Controller Documents and FAQ http://zed.cisco.com/confluence/display/SBC/SBC') class Ciscosbcsipmethod(TextualConvention, Integer32): description = 'This textual convention represents the various SIP Methods.' status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14)) named_values = named_values(('unknown', 1), ('ack', 2), ('bye', 3), ('cancel', 4), ('info', 5), ('invite', 6), ('message', 7), ('notify', 8), ('options', 9), ('prack', 10), ('refer', 11), ('register', 12), ('subscribe', 13), ('update', 14)) class Ciscosbcradiusclienttype(TextualConvention, Integer32): description = 'This textual convention represents the type of RADIUS client.' status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2)) named_values = named_values(('authentication', 1), ('accounting', 2)) cisco_sbc_stats_mib_notifs = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 757, 0)) cisco_sbc_stats_mib_objects = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 757, 1)) cisco_sbc_stats_mib_conform = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 757, 2)) csb_radius_stats_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 1)) if mibBuilder.loadTexts: csbRadiusStatsTable.setStatus('current') if mibBuilder.loadTexts: csbRadiusStatsTable.setDescription('This table has the reporting statistics of various RADIUS messages for RADIUS servers with which the client (SBC) shares a secret. Each entry in this table is identified by a value of csbRadiusStatsEntIndex. The other indices of this table are csbCallStatsInstanceIndex defined in csbCallStatsInstanceTable and csbCallStatsServiceIndex defined in csbCallStatsTable.') csb_radius_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 1, 1)).setIndexNames((0, 'CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCallStatsInstanceIndex'), (0, 'CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCallStatsServiceIndex'), (0, 'CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbRadiusStatsEntIndex')) if mibBuilder.loadTexts: csbRadiusStatsEntry.setStatus('current') if mibBuilder.loadTexts: csbRadiusStatsEntry.setDescription('A conceptual row in the csbRadiusStatsTable. There is an entry in this table for each RADIUS server, as identified by a value of csbRadiusStatsEntIndex. The other indices of this table are csbCallStatsInstanceIndex defined in csbCallStatsInstanceTable and csbCallStatsServiceIndex defined in csbCallStatsTable.') csb_radius_stats_ent_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 1, 1, 1), unsigned32()) if mibBuilder.loadTexts: csbRadiusStatsEntIndex.setStatus('current') if mibBuilder.loadTexts: csbRadiusStatsEntIndex.setDescription('This object indicates the index of the RADIUS client entity that this server is configured on. This index is assigned arbitrarily by the engine and is not saved over reboots.') csb_radius_stats_client_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 1, 1, 2), snmp_admin_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbRadiusStatsClientName.setStatus('current') if mibBuilder.loadTexts: csbRadiusStatsClientName.setDescription('This object indicates the client name of the RADIUS client to which that these statistics apply.') csb_radius_stats_client_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 1, 1, 3), cisco_sbc_radius_client_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbRadiusStatsClientType.setStatus('current') if mibBuilder.loadTexts: csbRadiusStatsClientType.setDescription('This object indicates the type(authentication or accounting) of the RADIUS clients configured on SBC.') csb_radius_stats_srvr_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 1, 1, 4), snmp_admin_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbRadiusStatsSrvrName.setStatus('current') if mibBuilder.loadTexts: csbRadiusStatsSrvrName.setDescription('This object indicates the server name of the RADIUS server to which that these statistics apply.') csb_radius_stats_acs_reqs = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 1, 1, 5), counter64()).setUnits('packets').setMaxAccess('readonly') if mibBuilder.loadTexts: csbRadiusStatsAcsReqs.setStatus('current') if mibBuilder.loadTexts: csbRadiusStatsAcsReqs.setDescription('This object indicates the number of RADIUS Access-Request packets sent to this server. This does not include retransmissions.') csb_radius_stats_acs_rtrns = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 1, 1, 6), counter64()).setUnits('packets').setMaxAccess('readonly') if mibBuilder.loadTexts: csbRadiusStatsAcsRtrns.setStatus('current') if mibBuilder.loadTexts: csbRadiusStatsAcsRtrns.setDescription('This object indicates the number of RADIUS Access-Request packets retransmitted to this RADIUS server.') csb_radius_stats_acs_accpts = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 1, 1, 7), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbRadiusStatsAcsAccpts.setStatus('current') if mibBuilder.loadTexts: csbRadiusStatsAcsAccpts.setDescription('This object indicates the number of RADIUS Access-Accept packets (valid or invalid) received from this server.') csb_radius_stats_acs_rejects = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 1, 1, 8), counter64()).setUnits('packets').setMaxAccess('readonly') if mibBuilder.loadTexts: csbRadiusStatsAcsRejects.setStatus('current') if mibBuilder.loadTexts: csbRadiusStatsAcsRejects.setDescription('This object indicates the number of RADIUS Access-Reject packets (valid or invalid) received from this server.') csb_radius_stats_acs_challs = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 1, 1, 9), counter64()).setUnits('packets').setMaxAccess('readonly') if mibBuilder.loadTexts: csbRadiusStatsAcsChalls.setStatus('current') if mibBuilder.loadTexts: csbRadiusStatsAcsChalls.setDescription('This object indicates the number of RADIUS Access-Challenge packets (valid or invalid) received from this server.') csb_radius_stats_act_reqs = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 1, 1, 10), counter64()).setUnits('packets').setMaxAccess('readonly') if mibBuilder.loadTexts: csbRadiusStatsActReqs.setStatus('current') if mibBuilder.loadTexts: csbRadiusStatsActReqs.setDescription('This object indicates the number of RADIUS Accounting-Request packets sent to this server. This does not include retransmissions.') csb_radius_stats_act_retrans = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 1, 1, 11), counter64()).setUnits('packets').setMaxAccess('readonly') if mibBuilder.loadTexts: csbRadiusStatsActRetrans.setStatus('current') if mibBuilder.loadTexts: csbRadiusStatsActRetrans.setDescription('This object indicates the number of RADIUS Accounting-Request packets retransmitted to this RADIUS server.') csb_radius_stats_act_rsps = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 1, 1, 12), counter64()).setUnits('packets').setMaxAccess('readonly') if mibBuilder.loadTexts: csbRadiusStatsActRsps.setStatus('current') if mibBuilder.loadTexts: csbRadiusStatsActRsps.setDescription('This object indicates the number of RADIUS Accounting-Response packets (valid or invalid) received from this server.') csb_radius_stats_malformed_rsps = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 1, 1, 13), counter64()).setUnits('packets').setMaxAccess('readonly') if mibBuilder.loadTexts: csbRadiusStatsMalformedRsps.setStatus('current') if mibBuilder.loadTexts: csbRadiusStatsMalformedRsps.setDescription('This object indicates the number of malformed RADIUS response packets received from this server. Malformed packets include packets with an invalid length. Bad authenticators, Signature attributes and unknown types are not included as malformed access responses.') csb_radius_stats_bad_auths = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 1, 1, 14), counter64()).setUnits('packets').setMaxAccess('readonly') if mibBuilder.loadTexts: csbRadiusStatsBadAuths.setStatus('current') if mibBuilder.loadTexts: csbRadiusStatsBadAuths.setDescription('This object indicates the number of RADIUS response packets containing invalid authenticators or Signature attributes received from this server.') csb_radius_stats_pending = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 1, 1, 15), gauge32()).setUnits('packets').setMaxAccess('readonly') if mibBuilder.loadTexts: csbRadiusStatsPending.setStatus('current') if mibBuilder.loadTexts: csbRadiusStatsPending.setDescription('This object indicates the number of RADIUS request packets destined for this server that have not yet timed out or received a response. This variable is incremented when a request is sent and decremented on receipt of the response or on a timeout or retransmission.') csb_radius_stats_timeouts = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 1, 1, 16), counter64()).setUnits('packets').setMaxAccess('readonly') if mibBuilder.loadTexts: csbRadiusStatsTimeouts.setStatus('current') if mibBuilder.loadTexts: csbRadiusStatsTimeouts.setDescription('This object indicates the number of RADIUS request timeouts to this server. After a timeout the client may retry to a different server or give up. A retry to a different server is counted as a request as well as a timeout.') csb_radius_stats_unknown_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 1, 1, 17), counter64()).setUnits('packets').setMaxAccess('readonly') if mibBuilder.loadTexts: csbRadiusStatsUnknownType.setStatus('current') if mibBuilder.loadTexts: csbRadiusStatsUnknownType.setDescription('This object indicates the number of RADIUS packets of unknown type which were received from this server.') csb_radius_stats_dropped = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 1, 1, 18), counter64()).setUnits('packets').setMaxAccess('readonly') if mibBuilder.loadTexts: csbRadiusStatsDropped.setStatus('current') if mibBuilder.loadTexts: csbRadiusStatsDropped.setDescription('This object indicates the number of RADIUS packets which were received from this server and dropped for some other reason.') csb_rf_bill_realm_stats_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 2)) if mibBuilder.loadTexts: csbRfBillRealmStatsTable.setStatus('current') if mibBuilder.loadTexts: csbRfBillRealmStatsTable.setDescription('This table describes the Rf billing statistics information which monitors the messages sent per-realm by Rf billing manager(SBC). SBC sends Rf billing data using Diameter as a transport protocol. Rf billing uses only ACR and ACA Diameter messages for the transport of billing data. The Accounting-Record-Type AVP on the ACR message labels the type of the accounting request. The following types are used by Rf billing. 1. For session-based charging, the types Start (session begins), Interim (session is modified) and Stop (session ends) are used. 2. For event-based charging, the type Event is used when a chargeable event occurs outside the scope of a session. Each row of this table is identified by a value of csbRfBillRealmStatsIndex and csbRfBillRealmStatsRealmName. The other indices of this table are csbCallStatsInstanceIndex defined in csbCallStatsInstanceTable and csbCallStatsServiceIndex defined in csbCallStatsTable.') csb_rf_bill_realm_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 2, 1)).setIndexNames((0, 'CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCallStatsInstanceIndex'), (0, 'CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCallStatsServiceIndex'), (0, 'CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbRfBillRealmStatsIndex'), (0, 'CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbRfBillRealmStatsRealmName')) if mibBuilder.loadTexts: csbRfBillRealmStatsEntry.setStatus('current') if mibBuilder.loadTexts: csbRfBillRealmStatsEntry.setDescription('A conceptual row in the csbRfBillRealmStatsTable. There is an entry in this table for each realm, as identified by a value of csbRfBillRealmStatsIndex and csbRfBillRealmStatsRealmName. The other indices of this table are csbCallStatsInstanceIndex defined in csbCallStatsInstanceTable and csbCallStatsServiceIndex defined in csbCallStatsTable.') csb_rf_bill_realm_stats_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 2, 1, 1), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 31))) if mibBuilder.loadTexts: csbRfBillRealmStatsIndex.setStatus('current') if mibBuilder.loadTexts: csbRfBillRealmStatsIndex.setDescription('This object indicates the billing method instance index. The range of valid values for this field is 0 - 31.') csb_rf_bill_realm_stats_realm_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 2, 1, 2), snmp_admin_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbRfBillRealmStatsRealmName.setStatus('current') if mibBuilder.loadTexts: csbRfBillRealmStatsRealmName.setDescription('This object indicates the realm for which these statistics are collected. The length of this object is zero when value is not assigned to it.') csb_rf_bill_realm_stats_total_start_acrs = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 2, 1, 3), unsigned32()).setUnits('ACRs').setMaxAccess('readonly') if mibBuilder.loadTexts: csbRfBillRealmStatsTotalStartAcrs.setStatus('current') if mibBuilder.loadTexts: csbRfBillRealmStatsTotalStartAcrs.setDescription('This object indicates the combined sum of successful and failed Start ACRs since start of day or the last time the statistics were reset.') csb_rf_bill_realm_stats_total_interim_acrs = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 2, 1, 4), unsigned32()).setUnits('ACRs').setMaxAccess('readonly') if mibBuilder.loadTexts: csbRfBillRealmStatsTotalInterimAcrs.setStatus('current') if mibBuilder.loadTexts: csbRfBillRealmStatsTotalInterimAcrs.setDescription('This object indicates the combined sum of successful and failed Interim ACRs since start of day or the last time the statistics were reset.') csb_rf_bill_realm_stats_total_stop_acrs = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 2, 1, 5), unsigned32()).setUnits('ACRs').setMaxAccess('readonly') if mibBuilder.loadTexts: csbRfBillRealmStatsTotalStopAcrs.setStatus('current') if mibBuilder.loadTexts: csbRfBillRealmStatsTotalStopAcrs.setDescription('This object indicates the combined sum of successful and failed Stop ACRs since start of day or the last time the statistics were reset.') csb_rf_bill_realm_stats_total_event_acrs = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 2, 1, 6), unsigned32()).setUnits('ACRs').setMaxAccess('readonly') if mibBuilder.loadTexts: csbRfBillRealmStatsTotalEventAcrs.setStatus('current') if mibBuilder.loadTexts: csbRfBillRealmStatsTotalEventAcrs.setDescription('This object indicates the combined sum of successful and failed Event ACRs since start of day or the last time the statistics were reset.') csb_rf_bill_realm_stats_succ_start_acrs = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 2, 1, 7), unsigned32()).setUnits('ACRs').setMaxAccess('readonly') if mibBuilder.loadTexts: csbRfBillRealmStatsSuccStartAcrs.setStatus('current') if mibBuilder.loadTexts: csbRfBillRealmStatsSuccStartAcrs.setDescription('This object indicates the total number of successful Start ACRs since start of day or the last time the statistics were reset.') csb_rf_bill_realm_stats_succ_interim_acrs = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 2, 1, 8), unsigned32()).setUnits('ACRs').setMaxAccess('readonly') if mibBuilder.loadTexts: csbRfBillRealmStatsSuccInterimAcrs.setStatus('current') if mibBuilder.loadTexts: csbRfBillRealmStatsSuccInterimAcrs.setDescription('This object indicates the total number of successful Interim ACRs since start of day or the last time the statistics were reset.') csb_rf_bill_realm_stats_succ_stop_acrs = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 2, 1, 9), unsigned32()).setUnits('ACRs').setMaxAccess('readonly') if mibBuilder.loadTexts: csbRfBillRealmStatsSuccStopAcrs.setStatus('current') if mibBuilder.loadTexts: csbRfBillRealmStatsSuccStopAcrs.setDescription('This object indicates the total number of successful Stop ACRs since start of day or the last time the statistics were reset.') csb_rf_bill_realm_stats_succ_event_acrs = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 2, 1, 10), unsigned32()).setUnits('ACRs').setMaxAccess('readonly') if mibBuilder.loadTexts: csbRfBillRealmStatsSuccEventAcrs.setStatus('current') if mibBuilder.loadTexts: csbRfBillRealmStatsSuccEventAcrs.setDescription('This object indicates the total number of successful Event ACRs since start of day or the last time the statistics were reset.') csb_rf_bill_realm_stats_fail_start_acrs = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 2, 1, 11), unsigned32()).setUnits('ACRs').setMaxAccess('readonly') if mibBuilder.loadTexts: csbRfBillRealmStatsFailStartAcrs.setStatus('current') if mibBuilder.loadTexts: csbRfBillRealmStatsFailStartAcrs.setDescription('This object indicates the total number of failed Start ACRs since start of day or the last time the statistics were reset.') csb_rf_bill_realm_stats_fail_interim_acrs = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 2, 1, 12), unsigned32()).setUnits('ACRs').setMaxAccess('readonly') if mibBuilder.loadTexts: csbRfBillRealmStatsFailInterimAcrs.setStatus('current') if mibBuilder.loadTexts: csbRfBillRealmStatsFailInterimAcrs.setDescription('This object indicates the total number of failed Interim ACRs since start of day or the last time the statistics were reset.') csb_rf_bill_realm_stats_fail_stop_acrs = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 2, 1, 13), unsigned32()).setUnits('ACRs').setMaxAccess('readonly') if mibBuilder.loadTexts: csbRfBillRealmStatsFailStopAcrs.setStatus('current') if mibBuilder.loadTexts: csbRfBillRealmStatsFailStopAcrs.setDescription('This object indicates the total number of failed Stop ACRs since start of day or the last time the statistics were reset.') csb_rf_bill_realm_stats_fail_event_acrs = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 2, 1, 14), unsigned32()).setUnits('ACRs').setMaxAccess('readonly') if mibBuilder.loadTexts: csbRfBillRealmStatsFailEventAcrs.setStatus('current') if mibBuilder.loadTexts: csbRfBillRealmStatsFailEventAcrs.setDescription('This object indicates the total number of failed Event ACRs since start of day or the last time the statistics were reset.') csb_sip_mthd_current_stats_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 3)) if mibBuilder.loadTexts: csbSIPMthdCurrentStatsTable.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsTable.setDescription('This table reports count of SIP request and various SIP responses for each SIP method on a SIP adjacency in a given interval. Each entry in this table represents a SIP method, its incoming and outgoing count, individual incoming and outgoing count of various SIP responses for this method on a SIP adjacency in a given interval. To understand the meaning of interval please refer <Periodic Statistics> section in description of ciscoSbcStatsMIB. This table is indexed on csbSIPMthdCurrentStatsAdjName, csbSIPMthdCurrentStatsMethod and csbSIPMthdCurrentStatsInterval. The other indices of this table are csbCallStatsInstanceIndex defined in csbCallStatsInstanceTable and csbCallStatsServiceIndex defined in csbCallStatsTable.') csb_sip_mthd_current_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 3, 1)).setIndexNames((0, 'CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCallStatsInstanceIndex'), (0, 'CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCallStatsServiceIndex'), (0, 'CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdCurrentStatsAdjName'), (0, 'CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdCurrentStatsMethod'), (0, 'CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdCurrentStatsInterval')) if mibBuilder.loadTexts: csbSIPMthdCurrentStatsEntry.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsEntry.setDescription('A conceptual row in the csbSIPMthdCurrentStatsTable. Each row describes a SIP method and various responses count for this method on a given SIP adjacency and given interval. This table is indexed on csbSIPMthdCurrentStatsAdjName, csbSIPMthdCurrentStatsMethod and csbSIPMthdCurrentStatsInterval. The other indices of this table are csbCallStatsInstanceIndex defined in csbCallStatsInstanceTable and csbCallStatsServiceIndex defined in csbCallStatsTable.') csb_sip_mthd_current_stats_adj_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 3, 1, 1), snmp_admin_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsAdjName.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsAdjName.setDescription('This object indicates the name of the SIP adjacency for which stats related with SIP request and all kind of corresponding SIP responses are reported. The object acts as an index of the table.') csb_sip_mthd_current_stats_method = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 3, 1, 2), cisco_sbc_sip_method()) if mibBuilder.loadTexts: csbSIPMthdCurrentStatsMethod.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsMethod.setDescription('This object indicates the SIP method Request. The object acts as an index of the table.') csb_sip_mthd_current_stats_interval = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 3, 1, 3), cisco_sbc_periodic_stats_interval()) if mibBuilder.loadTexts: csbSIPMthdCurrentStatsInterval.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsInterval.setDescription('This object indicates the interval for which the periodic statistics information is to be displayed. The interval values can be 5 minutes, 15 minutes, 1 hour , 1 Day. This object acts as an index for the table.') csb_sip_mthd_current_stats_method_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 3, 1, 4), snmp_admin_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsMethodName.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsMethodName.setDescription('This object indicates the text representation of the SIP method request. E.g. INVITE, ACK, BYE etc.') csb_sip_mthd_current_stats_req_in = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 3, 1, 5), gauge32()).setUnits('requests').setMaxAccess('readonly') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsReqIn.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsReqIn.setDescription('This object indicates the total incoming SIP message requests of this type on this SIP adjacency.') csb_sip_mthd_current_stats_req_out = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 3, 1, 6), gauge32()).setUnits('requests').setMaxAccess('readonly') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsReqOut.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsReqOut.setDescription('This object indicates the total outgoing SIP message requests of this type on this SIP adjacency.') csb_sip_mthd_current_stats_resp1xx_in = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 3, 1, 7), gauge32()).setUnits('responses').setMaxAccess('readonly') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsResp1xxIn.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsResp1xxIn.setDescription('This object indicates the total 1xx responses for this method received on this SIP adjacency.') csb_sip_mthd_current_stats_resp1xx_out = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 3, 1, 8), gauge32()).setUnits('responses').setMaxAccess('readonly') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsResp1xxOut.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsResp1xxOut.setDescription('This object indicates the total 1xx responses for this method sent on this SIP adjacency.') csb_sip_mthd_current_stats_resp2xx_in = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 3, 1, 9), gauge32()).setUnits('responses').setMaxAccess('readonly') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsResp2xxIn.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsResp2xxIn.setDescription('This object indicates the total 2xx responses for this method received on this SIP adjacency.') csb_sip_mthd_current_stats_resp2xx_out = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 3, 1, 10), gauge32()).setUnits('responses').setMaxAccess('readonly') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsResp2xxOut.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsResp2xxOut.setDescription('This object indicates the total 2xx responses for this method sent on this SIP adjacency.') csb_sip_mthd_current_stats_resp3xx_in = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 3, 1, 11), gauge32()).setUnits('responses').setMaxAccess('readonly') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsResp3xxIn.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsResp3xxIn.setDescription('This object indicates the total 3xx responses for this method received on this SIP adjacency.') csb_sip_mthd_current_stats_resp3xx_out = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 3, 1, 12), gauge32()).setUnits('responses').setMaxAccess('readonly') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsResp3xxOut.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsResp3xxOut.setDescription('This object indicates the total 3xx responses for this method sent on this SIP adjacency.') csb_sip_mthd_current_stats_resp4xx_in = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 3, 1, 13), gauge32()).setUnits('responses').setMaxAccess('readonly') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsResp4xxIn.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsResp4xxIn.setDescription('This object indicates the total 4xx responses for this method received on this SIP adjacency.') csb_sip_mthd_current_stats_resp4xx_out = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 3, 1, 14), gauge32()).setUnits('responses').setMaxAccess('readonly') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsResp4xxOut.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsResp4xxOut.setDescription('This object indicates the total 4xx responses for this method sent on this SIP adjacency.') csb_sip_mthd_current_stats_resp5xx_in = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 3, 1, 15), gauge32()).setUnits('responses').setMaxAccess('readonly') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsResp5xxIn.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsResp5xxIn.setDescription('This object indicates the total 5xx responses for this method received on this SIP adjacency.') csb_sip_mthd_current_stats_resp5xx_out = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 3, 1, 16), gauge32()).setUnits('responses').setMaxAccess('readonly') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsResp5xxOut.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsResp5xxOut.setDescription('This object indicates the total 5xx responses for this method sent on this SIP adjacency.') csb_sip_mthd_current_stats_resp6xx_in = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 3, 1, 17), gauge32()).setUnits('responses').setMaxAccess('readonly') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsResp6xxIn.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsResp6xxIn.setDescription('This object indicates the total 6xx responses for this method received on this SIP adjacency.') csb_sip_mthd_current_stats_resp6xx_out = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 3, 1, 18), gauge32()).setUnits('responses').setMaxAccess('readonly') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsResp6xxOut.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsResp6xxOut.setDescription('This object indicates the total 6xx responses for this method sent on this SIP adjacency.') csb_sip_mthd_history_stats_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 4)) if mibBuilder.loadTexts: csbSIPMthdHistoryStatsTable.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsTable.setDescription('This table provide historical count of SIP request and various SIP responses for each SIP method on a SIP adjacency in various interval length defined by the csbSIPMthdHistoryStatsInterval object. Each entry in this table represents a SIP method, its incoming and outgoing count, individual incoming and outgoing count of various SIP responses for this method on a SIP adjacency in a given interval. The possible values of interval will be previous 5 minutes, previous 15 minutes, previous 1 hour and previous day. To understand the meaning of interval please refer <Periodic Statistics> description of ciscoSbcStatsMIB. This table is indexed on csbSIPMthdHistoryStatsAdjName, csbSIPMthdHistoryStatsMethod and csbSIPMthdHistoryStatsInterval. The other indices of this table are csbCallStatsInstanceIndex defined in csbCallStatsInstanceTable and csbCallStatsServiceIndex defined in csbCallStatsTable.') csb_sip_mthd_history_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 4, 1)).setIndexNames((0, 'CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCallStatsInstanceIndex'), (0, 'CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCallStatsServiceIndex'), (0, 'CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdHistoryStatsAdjName'), (0, 'CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdHistoryStatsMethod'), (0, 'CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdHistoryStatsInterval')) if mibBuilder.loadTexts: csbSIPMthdHistoryStatsEntry.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsEntry.setDescription('A conceptual row in the csbSIPMthdHistoryStatsTable. The entries in this table are updated as interval completes in the csbSIPMthdCurrentStatsTable table and the data is moved from that table to this one. This table is indexed on csbSIPMthdHistoryStatsAdjName, csbSIPMthdHistoryStatsMethod and csbSIPMthdHistoryStatsInterval. The other indices of this table are csbCallStatsInstanceIndex defined in csbCallStatsInstanceTable and csbCallStatsServiceIndex defined in csbCallStatsTable.') csb_sip_mthd_history_stats_adj_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 4, 1, 1), snmp_admin_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsAdjName.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsAdjName.setDescription('This object indicates the name of the SIP adjacency for which stats related with SIP request and all kind of corresponding SIP responses are reported. The object acts as an index of the table.') csb_sip_mthd_history_stats_method = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 4, 1, 2), cisco_sbc_sip_method()) if mibBuilder.loadTexts: csbSIPMthdHistoryStatsMethod.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsMethod.setDescription('This object indicates the SIP method Request. The object acts as an index of the table.') csb_sip_mthd_history_stats_interval = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 4, 1, 3), cisco_sbc_periodic_stats_interval()) if mibBuilder.loadTexts: csbSIPMthdHistoryStatsInterval.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsInterval.setDescription('This object indicates the interval for which the historical statistics information is to be displayed. The interval values can be previous 5 minutes, previous 15 minutes, previous 1 hour and previous 1 Day. This object acts as an index for the table.') csb_sip_mthd_history_stats_method_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 4, 1, 4), snmp_admin_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsMethodName.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsMethodName.setDescription('This object indicates the text representation of the SIP method request. E.g. INVITE, ACK, BYE etc.') csb_sip_mthd_history_stats_req_in = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 4, 1, 5), gauge32()).setUnits('requests').setMaxAccess('readonly') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsReqIn.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsReqIn.setDescription('This object indicates the total incoming SIP message requests of this type on this SIP adjacency.') csb_sip_mthd_history_stats_req_out = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 4, 1, 6), gauge32()).setUnits('requests').setMaxAccess('readonly') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsReqOut.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsReqOut.setDescription('This object indicates the total outgoing SIP message requests of this type on this SIP adjacency.') csb_sip_mthd_history_stats_resp1xx_in = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 4, 1, 7), gauge32()).setUnits('responses').setMaxAccess('readonly') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsResp1xxIn.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsResp1xxIn.setDescription('This object indicates the total 1xx responses for this method received on this SIP adjacency.') csb_sip_mthd_history_stats_resp1xx_out = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 4, 1, 8), gauge32()).setUnits('responses').setMaxAccess('readonly') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsResp1xxOut.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsResp1xxOut.setDescription('This object indicates the total 1xx responses for this method sent on this SIP adjacency.') csb_sip_mthd_history_stats_resp2xx_in = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 4, 1, 9), gauge32()).setUnits('responses').setMaxAccess('readonly') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsResp2xxIn.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsResp2xxIn.setDescription('This object indicates the total 2xx responses for this method received on this SIP adjacency.') csb_sip_mthd_history_stats_resp2xx_out = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 4, 1, 10), gauge32()).setUnits('responses').setMaxAccess('readonly') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsResp2xxOut.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsResp2xxOut.setDescription('This object indicates the total 2xx responses for this method sent on this SIP adjacency.') csb_sip_mthd_history_stats_resp3xx_in = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 4, 1, 11), gauge32()).setUnits('responses').setMaxAccess('readonly') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsResp3xxIn.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsResp3xxIn.setDescription('This object indicates the total 3xx responses for this method received on this SIP adjacency.') csb_sip_mthd_history_stats_resp3xx_out = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 4, 1, 12), gauge32()).setUnits('responses').setMaxAccess('readonly') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsResp3xxOut.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsResp3xxOut.setDescription('This object indicates the total 3xx responses for this method sent on this SIP adjacency.') csb_sip_mthd_history_stats_resp4xx_in = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 4, 1, 13), gauge32()).setUnits('responses').setMaxAccess('readonly') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsResp4xxIn.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsResp4xxIn.setDescription('This object indicates the total 4xx responses for this method received on this SIP adjacency.') csb_sip_mthd_history_stats_resp4xx_out = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 4, 1, 14), gauge32()).setUnits('responses').setMaxAccess('readonly') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsResp4xxOut.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsResp4xxOut.setDescription('This object indicates the total 4xx responses for this method sent on this SIP adjacency.') csb_sip_mthd_history_stats_resp5xx_in = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 4, 1, 15), gauge32()).setUnits('responses').setMaxAccess('readonly') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsResp5xxIn.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsResp5xxIn.setDescription('This object indicates the total 5xx responses for this method received on this SIP adjacency.') csb_sip_mthd_history_stats_resp5xx_out = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 4, 1, 16), gauge32()).setUnits('responses').setMaxAccess('readonly') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsResp5xxOut.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsResp5xxOut.setDescription('This object indicates the total 5xx responses for this method sent on this SIP adjacency.') csb_sip_mthd_history_stats_resp6xx_in = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 4, 1, 17), gauge32()).setUnits('responses').setMaxAccess('readonly') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsResp6xxIn.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsResp6xxIn.setDescription('This object indicates the total 6xx responses for this method received on this SIP adjacency.') csb_sip_mthd_history_stats_resp6xx_out = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 4, 1, 18), gauge32()).setUnits('responses').setMaxAccess('readonly') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsResp6xxOut.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsResp6xxOut.setDescription('This object indicates the total 6xx responses for this method sent on this SIP adjacency.') csb_sip_mthd_rc_current_stats_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 5)) if mibBuilder.loadTexts: csbSIPMthdRCCurrentStatsTable.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdRCCurrentStatsTable.setDescription('This table reports SIP method request and response code statistics for each method and response code combination on given SIP adjacency in a given interval. To understand the meaning of interval please refer <Periodic Statistics> section in description of ciscoSbcStatsMIB. An exact lookup will return a row only if - 1) detailed response code statistics are turned on in SBC 2) response code messages sent or received is non zero for given SIP adjacency, method and interval. Also an inexact lookup will only return rows for messages with non-zero counts, to protect the user from large numbers of rows for response codes which have not been received or sent.') csb_sip_mthd_rc_current_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 5, 1)).setIndexNames((0, 'CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCallStatsInstanceIndex'), (0, 'CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCallStatsServiceIndex'), (0, 'CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdRCCurrentStatsAdjName'), (0, 'CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdRCCurrentStatsMethod'), (0, 'CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdRCCurrentStatsRespCode'), (0, 'CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdRCCurrentStatsInterval')) if mibBuilder.loadTexts: csbSIPMthdRCCurrentStatsEntry.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdRCCurrentStatsEntry.setDescription('A conceptual row in the csbSIPMthdRCCurrentStatsTable. Each entry in this table represents a method and response code combination. Each entry in this table is identified by a value of csbSIPMthdRCCurrentStatsAdjName, csbSIPMthdRCCurrentStatsMethod, csbSIPMthdRCCurrentStatsRespCode and csbSIPMthdRCCurrentStatsInterval. The other indices of this table are csbCallStatsInstanceIndex defined in csbCallStatsInstanceTable and csbCallStatsServiceIndex defined in csbCallStatsTable.') csb_sip_mthd_rc_current_stats_adj_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 5, 1, 1), snmp_admin_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbSIPMthdRCCurrentStatsAdjName.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdRCCurrentStatsAdjName.setDescription('This identifies the name of the adjacency for which statistics are reported. This object acts as an index for the table.') csb_sip_mthd_rc_current_stats_method = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 5, 1, 2), cisco_sbc_sip_method()) if mibBuilder.loadTexts: csbSIPMthdRCCurrentStatsMethod.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdRCCurrentStatsMethod.setDescription('This object indicates the SIP method request. This object acts as an index for the table.') csb_sip_mthd_rc_current_stats_resp_code = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 5, 1, 3), unsigned32()) if mibBuilder.loadTexts: csbSIPMthdRCCurrentStatsRespCode.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdRCCurrentStatsRespCode.setDescription('This object indicates the response code for the SIP message request. The range of valid values for SIP response codes is 100 - 999. This object acts as an index for the table.') csb_sip_mthd_rc_current_stats_interval = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 5, 1, 4), cisco_sbc_periodic_stats_interval()) if mibBuilder.loadTexts: csbSIPMthdRCCurrentStatsInterval.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdRCCurrentStatsInterval.setDescription('This object identifies the interval for which the periodic statistics information is to be displayed. The interval values can be 5 min, 15 mins, 1 hour , 1 Day. This object acts as an index for the table.') csb_sip_mthd_rc_current_stats_method_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 5, 1, 5), snmp_admin_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbSIPMthdRCCurrentStatsMethodName.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdRCCurrentStatsMethodName.setDescription('This object indicates the text representation of the SIP method request. E.g. INVITE, ACK, BYE etc.') csb_sip_mthd_rc_current_stats_resp_in = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 5, 1, 6), gauge32()).setUnits('responses').setMaxAccess('readonly') if mibBuilder.loadTexts: csbSIPMthdRCCurrentStatsRespIn.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdRCCurrentStatsRespIn.setDescription('This object indicates the total SIP messages with this response code this method received on this SIP adjacency.') csb_sip_mthd_rc_current_stats_resp_out = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 5, 1, 7), gauge32()).setUnits('responses').setMaxAccess('readonly') if mibBuilder.loadTexts: csbSIPMthdRCCurrentStatsRespOut.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdRCCurrentStatsRespOut.setDescription('This object indicates the total SIP messages with this response code for this method sent on this SIP adjacency.') csb_sip_mthd_rc_history_stats_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 6)) if mibBuilder.loadTexts: csbSIPMthdRCHistoryStatsTable.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdRCHistoryStatsTable.setDescription('This table reports historical data for SIP method request and response code statistics for each method and response code combination in a given past interval. The possible values of interval will be previous 5 minutes, previous 15 minutes, previous 1 hour and previous day. To understand the meaning of interval please refer <Periodic Statistics> section in description of ciscoSbcStatsMIB. An exact lookup will return a row only if - 1) detailed response code statistics are turned on in SBC 2) response code messages sent or received is non zero for given SIP adjacency, method and interval. Also an inexact lookup will only return rows for messages with non-zero counts, to protect the user from large numbers of rows for response codes which have not been received or sent.') csb_sip_mthd_rc_history_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 6, 1)).setIndexNames((0, 'CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCallStatsInstanceIndex'), (0, 'CISCO-SESS-BORDER-CTRLR-CALL-STATS-MIB', 'csbCallStatsServiceIndex'), (0, 'CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdRCHistoryStatsAdjName'), (0, 'CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdRCHistoryStatsMethod'), (0, 'CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdRCHistoryStatsRespCode'), (0, 'CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdRCHistoryStatsInterval')) if mibBuilder.loadTexts: csbSIPMthdRCHistoryStatsEntry.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdRCHistoryStatsEntry.setDescription('A conceptual row in the csbSIPMthdRCHistoryStatsTable. The entries in this table are updated as interval completes in the csbSIPMthdRCCurrentStatsTable table and the data is moved from that table to this one. Each entry in this table is identified by a value of csbSIPMthdRCHistoryStatsAdjName, csbSIPMthdRCHistoryStatsMethod, csbSIPMthdRCHistoryStatsRespCode and csbSIPMthdRCHistoryStatsInterval. The other indices of this table are csbCallStatsInstanceIndex defined in csbCallStatsInstanceTable and csbCallStatsServiceIndex defined in csbCallStatsTable.') csb_sip_mthd_rc_history_stats_adj_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 6, 1, 1), snmp_admin_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbSIPMthdRCHistoryStatsAdjName.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdRCHistoryStatsAdjName.setDescription('This identifies the name of the adjacency for which statistics are reported. This object acts as an index for the table.') csb_sip_mthd_rc_history_stats_method = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 6, 1, 2), cisco_sbc_sip_method()) if mibBuilder.loadTexts: csbSIPMthdRCHistoryStatsMethod.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdRCHistoryStatsMethod.setDescription('This object indicates the SIP method request. This object acts as an index for the table.') csb_sip_mthd_rc_history_stats_method_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 6, 1, 3), snmp_admin_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: csbSIPMthdRCHistoryStatsMethodName.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdRCHistoryStatsMethodName.setDescription('This object indicates the text representation of the SIP method request. E.g. INVITE, ACK, BYE etc.') csb_sip_mthd_rc_history_stats_resp_code = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 6, 1, 4), unsigned32()) if mibBuilder.loadTexts: csbSIPMthdRCHistoryStatsRespCode.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdRCHistoryStatsRespCode.setDescription('This object indicates the response code for the SIP message request. The range of valid values for SIP response codes is 100 - 999. This object acts as an index for the table.') csb_sip_mthd_rc_history_stats_interval = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 6, 1, 5), cisco_sbc_periodic_stats_interval()) if mibBuilder.loadTexts: csbSIPMthdRCHistoryStatsInterval.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdRCHistoryStatsInterval.setDescription('This object identifies the interval for which the periodic statistics information is to be displayed. The interval values can be previous 5 min, previous 15 mins, previous 1 hour , previous 1 Day. This object acts as an index for the table.') csb_sip_mthd_rc_history_stats_resp_in = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 6, 1, 6), gauge32()).setUnits('responses').setMaxAccess('readonly') if mibBuilder.loadTexts: csbSIPMthdRCHistoryStatsRespIn.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdRCHistoryStatsRespIn.setDescription('This object indicates the total SIP messages with this response code this method received on this SIP adjacency.') csb_sip_mthd_rc_history_stats_resp_out = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 757, 1, 6, 1, 7), gauge32()).setUnits('responses').setMaxAccess('readonly') if mibBuilder.loadTexts: csbSIPMthdRCHistoryStatsRespOut.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdRCHistoryStatsRespOut.setDescription('This object indicates the total SIP messages with this response code for this method sent on this SIP adjacency.') csb_stats_mib_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 757, 2, 1)) csb_stats_mib_groups = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 757, 2, 2)) csb_stats_mib_compliance = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 757, 2, 1, 1)).setObjects(('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbRadiusStatsGroup'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbRfBillRealmStatsGroup'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdCurrentStatsGroup'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdHistoryStatsGroup'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdRCHistoryStatsGroup'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdRCCurrentStatsGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csb_stats_mib_compliance = csbStatsMIBCompliance.setStatus('current') if mibBuilder.loadTexts: csbStatsMIBCompliance.setDescription('This is a default module-compliance containing csbStatsMIBGroups.') csb_radius_stats_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 757, 2, 2, 1)).setObjects(('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbRadiusStatsClientName'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbRadiusStatsClientType'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbRadiusStatsSrvrName'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbRadiusStatsAcsReqs'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbRadiusStatsAcsRtrns'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbRadiusStatsAcsAccpts'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbRadiusStatsAcsRejects'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbRadiusStatsAcsChalls'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbRadiusStatsActReqs'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbRadiusStatsActRetrans'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbRadiusStatsActRsps'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbRadiusStatsMalformedRsps'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbRadiusStatsBadAuths'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbRadiusStatsPending'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbRadiusStatsTimeouts'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbRadiusStatsUnknownType'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbRadiusStatsDropped')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csb_radius_stats_group = csbRadiusStatsGroup.setStatus('current') if mibBuilder.loadTexts: csbRadiusStatsGroup.setDescription('A collection of objects providing RADIUS messages statistics for configured RADIUS servers on Cisco Session Border Controller (SBC).') csb_rf_bill_realm_stats_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 757, 2, 2, 2)).setObjects(('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbRfBillRealmStatsRealmName'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbRfBillRealmStatsTotalStartAcrs'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbRfBillRealmStatsTotalInterimAcrs'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbRfBillRealmStatsTotalStopAcrs'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbRfBillRealmStatsTotalEventAcrs'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbRfBillRealmStatsSuccStartAcrs'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbRfBillRealmStatsSuccInterimAcrs'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbRfBillRealmStatsSuccStopAcrs'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbRfBillRealmStatsSuccEventAcrs'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbRfBillRealmStatsFailStartAcrs'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbRfBillRealmStatsFailInterimAcrs'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbRfBillRealmStatsFailStopAcrs'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbRfBillRealmStatsFailEventAcrs')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csb_rf_bill_realm_stats_group = csbRfBillRealmStatsGroup.setStatus('current') if mibBuilder.loadTexts: csbRfBillRealmStatsGroup.setDescription('A collection of objects providing Rf billing statistics information on Cisco Session Border Controller (SBC).') csb_sip_mthd_current_stats_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 757, 2, 2, 3)).setObjects(('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdCurrentStatsAdjName'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdCurrentStatsMethodName'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdCurrentStatsReqIn'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdCurrentStatsReqOut'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdCurrentStatsResp1xxIn'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdCurrentStatsResp1xxOut'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdCurrentStatsResp2xxIn'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdCurrentStatsResp2xxOut'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdCurrentStatsResp3xxIn'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdCurrentStatsResp3xxOut'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdCurrentStatsResp4xxIn'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdCurrentStatsResp4xxOut'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdCurrentStatsResp5xxIn'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdCurrentStatsResp5xxOut'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdCurrentStatsResp6xxIn'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdCurrentStatsResp6xxOut')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csb_sip_mthd_current_stats_group = csbSIPMthdCurrentStatsGroup.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdCurrentStatsGroup.setDescription('A collection of objects providing statistics for a SIP method and various responses count for this method on a given SIP adjacency and given interval for Cisco Session Border Controller (SBC).') csb_sip_mthd_history_stats_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 757, 2, 2, 4)).setObjects(('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdHistoryStatsAdjName'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdHistoryStatsMethodName'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdHistoryStatsReqIn'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdHistoryStatsReqOut'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdHistoryStatsResp1xxIn'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdHistoryStatsResp1xxOut'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdHistoryStatsResp2xxIn'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdHistoryStatsResp2xxOut'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdHistoryStatsResp3xxIn'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdHistoryStatsResp3xxOut'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdHistoryStatsResp4xxIn'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdHistoryStatsResp4xxOut'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdHistoryStatsResp5xxIn'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdHistoryStatsResp5xxOut'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdHistoryStatsResp6xxIn'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdHistoryStatsResp6xxOut')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csb_sip_mthd_history_stats_group = csbSIPMthdHistoryStatsGroup.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdHistoryStatsGroup.setDescription('A collection of objects providing historical statistics for a SIP method and various responses count for this method on a given SIP adjacency and given interval for Cisco Session Border Controller (SBC).') csb_sip_mthd_rc_current_stats_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 757, 2, 2, 5)).setObjects(('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdRCCurrentStatsAdjName'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdRCCurrentStatsMethodName'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdRCCurrentStatsRespIn'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdRCCurrentStatsRespOut')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csb_sip_mthd_rc_current_stats_group = csbSIPMthdRCCurrentStatsGroup.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdRCCurrentStatsGroup.setDescription('A collection of objects providing SIP statistics for a method and response code combination for Cisco Session Border Controller (SBC).') csb_sip_mthd_rc_history_stats_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 757, 2, 2, 6)).setObjects(('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdRCHistoryStatsAdjName'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdRCHistoryStatsMethodName'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdRCHistoryStatsRespIn'), ('CISCO-SESS-BORDER-CTRLR-STATS-MIB', 'csbSIPMthdRCHistoryStatsRespOut')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): csb_sip_mthd_rc_history_stats_group = csbSIPMthdRCHistoryStatsGroup.setStatus('current') if mibBuilder.loadTexts: csbSIPMthdRCHistoryStatsGroup.setDescription('A collection of objects providing SIP historical statistics for a method and response code combination for Cisco Session Border Controller (SBC).') mibBuilder.exportSymbols('CISCO-SESS-BORDER-CTRLR-STATS-MIB', csbSIPMthdHistoryStatsResp2xxOut=csbSIPMthdHistoryStatsResp2xxOut, csbSIPMthdRCHistoryStatsGroup=csbSIPMthdRCHistoryStatsGroup, csbRfBillRealmStatsFailStopAcrs=csbRfBillRealmStatsFailStopAcrs, csbSIPMthdCurrentStatsMethod=csbSIPMthdCurrentStatsMethod, csbSIPMthdHistoryStatsResp4xxOut=csbSIPMthdHistoryStatsResp4xxOut, csbRadiusStatsEntry=csbRadiusStatsEntry, csbRadiusStatsAcsReqs=csbRadiusStatsAcsReqs, ciscoSbcStatsMIBObjects=ciscoSbcStatsMIBObjects, csbSIPMthdHistoryStatsReqOut=csbSIPMthdHistoryStatsReqOut, csbStatsMIBCompliances=csbStatsMIBCompliances, csbRadiusStatsActReqs=csbRadiusStatsActReqs, ciscoSbcStatsMIB=ciscoSbcStatsMIB, csbSIPMthdCurrentStatsResp4xxOut=csbSIPMthdCurrentStatsResp4xxOut, csbRadiusStatsMalformedRsps=csbRadiusStatsMalformedRsps, csbSIPMthdCurrentStatsResp6xxIn=csbSIPMthdCurrentStatsResp6xxIn, csbRadiusStatsPending=csbRadiusStatsPending, csbSIPMthdHistoryStatsInterval=csbSIPMthdHistoryStatsInterval, csbSIPMthdHistoryStatsEntry=csbSIPMthdHistoryStatsEntry, csbSIPMthdCurrentStatsResp1xxIn=csbSIPMthdCurrentStatsResp1xxIn, csbSIPMthdHistoryStatsResp6xxIn=csbSIPMthdHistoryStatsResp6xxIn, csbRadiusStatsDropped=csbRadiusStatsDropped, csbSIPMthdCurrentStatsResp3xxIn=csbSIPMthdCurrentStatsResp3xxIn, csbSIPMthdRCCurrentStatsRespOut=csbSIPMthdRCCurrentStatsRespOut, csbSIPMthdHistoryStatsResp4xxIn=csbSIPMthdHistoryStatsResp4xxIn, csbSIPMthdRCCurrentStatsGroup=csbSIPMthdRCCurrentStatsGroup, CiscoSbcSIPMethod=CiscoSbcSIPMethod, csbSIPMthdRCCurrentStatsRespIn=csbSIPMthdRCCurrentStatsRespIn, csbRfBillRealmStatsTotalStopAcrs=csbRfBillRealmStatsTotalStopAcrs, csbRfBillRealmStatsGroup=csbRfBillRealmStatsGroup, csbSIPMthdCurrentStatsReqIn=csbSIPMthdCurrentStatsReqIn, csbStatsMIBCompliance=csbStatsMIBCompliance, csbRadiusStatsTable=csbRadiusStatsTable, csbSIPMthdCurrentStatsReqOut=csbSIPMthdCurrentStatsReqOut, csbRfBillRealmStatsTotalStartAcrs=csbRfBillRealmStatsTotalStartAcrs, csbRadiusStatsUnknownType=csbRadiusStatsUnknownType, csbSIPMthdCurrentStatsResp2xxOut=csbSIPMthdCurrentStatsResp2xxOut, csbRfBillRealmStatsTable=csbRfBillRealmStatsTable, csbSIPMthdRCHistoryStatsTable=csbSIPMthdRCHistoryStatsTable, csbSIPMthdCurrentStatsResp5xxOut=csbSIPMthdCurrentStatsResp5xxOut, csbSIPMthdCurrentStatsEntry=csbSIPMthdCurrentStatsEntry, csbSIPMthdRCHistoryStatsMethodName=csbSIPMthdRCHistoryStatsMethodName, csbRadiusStatsBadAuths=csbRadiusStatsBadAuths, csbRfBillRealmStatsEntry=csbRfBillRealmStatsEntry, csbSIPMthdRCHistoryStatsRespOut=csbSIPMthdRCHistoryStatsRespOut, csbSIPMthdHistoryStatsMethod=csbSIPMthdHistoryStatsMethod, csbSIPMthdHistoryStatsGroup=csbSIPMthdHistoryStatsGroup, csbRfBillRealmStatsSuccStopAcrs=csbRfBillRealmStatsSuccStopAcrs, csbSIPMthdRCCurrentStatsEntry=csbSIPMthdRCCurrentStatsEntry, csbRadiusStatsActRsps=csbRadiusStatsActRsps, csbSIPMthdCurrentStatsAdjName=csbSIPMthdCurrentStatsAdjName, csbSIPMthdRCHistoryStatsInterval=csbSIPMthdRCHistoryStatsInterval, csbRfBillRealmStatsFailInterimAcrs=csbRfBillRealmStatsFailInterimAcrs, csbRadiusStatsGroup=csbRadiusStatsGroup, csbRadiusStatsAcsChalls=csbRadiusStatsAcsChalls, csbSIPMthdRCCurrentStatsMethod=csbSIPMthdRCCurrentStatsMethod, csbSIPMthdHistoryStatsTable=csbSIPMthdHistoryStatsTable, csbSIPMthdHistoryStatsResp5xxOut=csbSIPMthdHistoryStatsResp5xxOut, csbSIPMthdRCHistoryStatsMethod=csbSIPMthdRCHistoryStatsMethod, csbStatsMIBGroups=csbStatsMIBGroups, csbRadiusStatsClientType=csbRadiusStatsClientType, csbSIPMthdCurrentStatsResp5xxIn=csbSIPMthdCurrentStatsResp5xxIn, csbSIPMthdHistoryStatsResp3xxOut=csbSIPMthdHistoryStatsResp3xxOut, csbRadiusStatsAcsRejects=csbRadiusStatsAcsRejects, csbSIPMthdCurrentStatsGroup=csbSIPMthdCurrentStatsGroup, csbSIPMthdCurrentStatsResp6xxOut=csbSIPMthdCurrentStatsResp6xxOut, csbSIPMthdRCCurrentStatsMethodName=csbSIPMthdRCCurrentStatsMethodName, csbSIPMthdHistoryStatsResp2xxIn=csbSIPMthdHistoryStatsResp2xxIn, csbRadiusStatsActRetrans=csbRadiusStatsActRetrans, csbRfBillRealmStatsIndex=csbRfBillRealmStatsIndex, csbSIPMthdHistoryStatsResp5xxIn=csbSIPMthdHistoryStatsResp5xxIn, csbRfBillRealmStatsFailStartAcrs=csbRfBillRealmStatsFailStartAcrs, csbSIPMthdHistoryStatsResp6xxOut=csbSIPMthdHistoryStatsResp6xxOut, csbSIPMthdHistoryStatsMethodName=csbSIPMthdHistoryStatsMethodName, csbRfBillRealmStatsSuccStartAcrs=csbRfBillRealmStatsSuccStartAcrs, csbSIPMthdRCHistoryStatsAdjName=csbSIPMthdRCHistoryStatsAdjName, csbRfBillRealmStatsSuccInterimAcrs=csbRfBillRealmStatsSuccInterimAcrs, csbSIPMthdRCCurrentStatsRespCode=csbSIPMthdRCCurrentStatsRespCode, csbSIPMthdCurrentStatsMethodName=csbSIPMthdCurrentStatsMethodName, csbRadiusStatsTimeouts=csbRadiusStatsTimeouts, PYSNMP_MODULE_ID=ciscoSbcStatsMIB, csbSIPMthdCurrentStatsTable=csbSIPMthdCurrentStatsTable, csbSIPMthdRCHistoryStatsRespCode=csbSIPMthdRCHistoryStatsRespCode, csbSIPMthdHistoryStatsAdjName=csbSIPMthdHistoryStatsAdjName, csbSIPMthdRCCurrentStatsInterval=csbSIPMthdRCCurrentStatsInterval, csbSIPMthdCurrentStatsResp2xxIn=csbSIPMthdCurrentStatsResp2xxIn, csbRfBillRealmStatsTotalEventAcrs=csbRfBillRealmStatsTotalEventAcrs, csbSIPMthdCurrentStatsResp1xxOut=csbSIPMthdCurrentStatsResp1xxOut, csbRadiusStatsClientName=csbRadiusStatsClientName, ciscoSbcStatsMIBConform=ciscoSbcStatsMIBConform, csbSIPMthdCurrentStatsResp3xxOut=csbSIPMthdCurrentStatsResp3xxOut, csbRadiusStatsSrvrName=csbRadiusStatsSrvrName, ciscoSbcStatsMIBNotifs=ciscoSbcStatsMIBNotifs, csbRfBillRealmStatsFailEventAcrs=csbRfBillRealmStatsFailEventAcrs, csbSIPMthdRCHistoryStatsRespIn=csbSIPMthdRCHistoryStatsRespIn, csbSIPMthdHistoryStatsResp3xxIn=csbSIPMthdHistoryStatsResp3xxIn, csbSIPMthdRCHistoryStatsEntry=csbSIPMthdRCHistoryStatsEntry, csbSIPMthdRCCurrentStatsAdjName=csbSIPMthdRCCurrentStatsAdjName, csbRfBillRealmStatsTotalInterimAcrs=csbRfBillRealmStatsTotalInterimAcrs, csbSIPMthdCurrentStatsResp4xxIn=csbSIPMthdCurrentStatsResp4xxIn, csbSIPMthdHistoryStatsResp1xxOut=csbSIPMthdHistoryStatsResp1xxOut, csbRfBillRealmStatsRealmName=csbRfBillRealmStatsRealmName, csbRadiusStatsEntIndex=csbRadiusStatsEntIndex, csbRadiusStatsAcsRtrns=csbRadiusStatsAcsRtrns, csbRadiusStatsAcsAccpts=csbRadiusStatsAcsAccpts, csbRfBillRealmStatsSuccEventAcrs=csbRfBillRealmStatsSuccEventAcrs, csbSIPMthdCurrentStatsInterval=csbSIPMthdCurrentStatsInterval, csbSIPMthdRCCurrentStatsTable=csbSIPMthdRCCurrentStatsTable, CiscoSbcRadiusClientType=CiscoSbcRadiusClientType, csbSIPMthdHistoryStatsReqIn=csbSIPMthdHistoryStatsReqIn, csbSIPMthdHistoryStatsResp1xxIn=csbSIPMthdHistoryStatsResp1xxIn)
def print_formatted(number): s=len(bin(number)[2:]) for i in range(1,number+1): print(repr(i).rjust(s),oct(i)[2:].rjust(s+1),hex(i)[2:].upper().rjust(s+1),bin(i)[2:].rjust(s+1)) # your code goes here if __name__ == '__main__': print_formatted(17)
def print_formatted(number): s = len(bin(number)[2:]) for i in range(1, number + 1): print(repr(i).rjust(s), oct(i)[2:].rjust(s + 1), hex(i)[2:].upper().rjust(s + 1), bin(i)[2:].rjust(s + 1)) if __name__ == '__main__': print_formatted(17)
def cycle(arg, all_ids=None): if all_ids is None: all_ids = set() arg_id = id(arg) if arg_id not in all_ids: all_ids.add(arg_id) if isinstance(arg, list): for a in arg: for b in cycle(a, all_ids): yield b elif isinstance(arg, dict): for k, v in sorted(arg.iteritems()): for c in cycle(v, all_ids): yield c else: yield arg
def cycle(arg, all_ids=None): if all_ids is None: all_ids = set() arg_id = id(arg) if arg_id not in all_ids: all_ids.add(arg_id) if isinstance(arg, list): for a in arg: for b in cycle(a, all_ids): yield b elif isinstance(arg, dict): for (k, v) in sorted(arg.iteritems()): for c in cycle(v, all_ids): yield c else: yield arg
menor = 0 maior = 0 for c in range(1, 5): pes = int(input('Em Que Ano a \033[35m{}\033[m Pessoa Nasceu?'.format(c))) if pes >= 1999: menor = menor + 1 else: maior = maior + 1 print('A \033[35m {}\033[m menor de idade e \033[36m{}\033[m maior de idade'.format(menor, maior))
menor = 0 maior = 0 for c in range(1, 5): pes = int(input('Em Que Ano a \x1b[35m{}\x1b[m Pessoa Nasceu?'.format(c))) if pes >= 1999: menor = menor + 1 else: maior = maior + 1 print('A \x1b[35m {}\x1b[m menor de idade e \x1b[36m{}\x1b[m maior de idade'.format(menor, maior))
def is_integral(n): return int(n) == n LOCALES = { "af": { "format": { "date": "%Y-%m-%-d", "datetime": "%Y-%m-%-d %-I:%M:%S %p", "datetime_short": "%Y-%m-%-d %-I:%M %p", "decimal_point": ",", "time": "%-I:%M:%S %p", "time_short": "%-I:%M %p" }, "name": "Afrikaans", "native_name": "Afrikaans", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'p') }, "am": { "format": { "date": "%-d/%m/%Y", "datetime": "%-d/%m/%Y %-I:%M:%S %p", "datetime_short": "%-d/%m/%Y %-I:%M %p", "decimal_point": ".", "time": "%-I:%M:%S %p", "time_short": "%-I:%M %p" }, "name": "Amharic", "native_name": "\u12a0\u121b\u122d\u129b", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'p') }, "ar": { "format": { "date": "%-d\u200f/%m\u200f/%Y", "datetime": "%-d\u200f/%m\u200f/%Y %-I:%M:%S %p", "datetime_short": "%-d\u200f/%m\u200f/%Y %-I:%M %p", "decimal_point": "\u066b", "time": "%-I:%M:%S %p", "time_short": "%-I:%M %p" }, "name": "Arabic", "native_name": "\u0627\u0644\u0639\u0631\u0628\u064a\u0629", "number_rule": lambda n: 'p' if not is_integral(n) else ('z' if n == 0 else '' if n == 1 else 't' if n == 2 else 'w' if n % 100 >= 3 and n % 100 <= 10 else 'y' if n % 100 >= 11 else 'p') }, "az": { "format": { "date": "%-d.%m.%Y", "datetime": "%-d.%m.%Y %-H:%M:%S", "datetime_short": "%-d.%m.%Y %-H:%M", "decimal_point": ",", "time": "%-H:%M:%S", "time_short": "%-H:%M" }, "name": "Azeri", "native_name": "az\u0259rbaycan", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'p') }, "bg": { "format": { "date": "%-d.%m.%Y '\u0433'.", "datetime": "%-d.%m.%Y '\u0433'., %-H:%M:%S", "datetime_short": "%-d.%m.%Y '\u0433'., %-H:%M", "decimal_point": ",", "time": "%-H:%M:%S", "time_short": "%-H:%M" }, "name": "Bulgarian", "native_name": "\u0431\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'p') }, "bn": { "format": { "date": "%-d/%m/%Y", "datetime": "%-d/%m/%Y %-I:%M:%S %p", "datetime_short": "%-d/%m/%Y %-I:%M %p", "decimal_point": ".", "time": "%-I:%M:%S %p", "time_short": "%-I:%M %p" }, "name": "Bengali", "native_name": "\u09ac\u09be\u0982\u09b2\u09be", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'p') }, "bs": { "format": { "date": "%-d.%m.%Y.", "datetime": "%-d.%m.%Y. %-H:%M:%S", "datetime_short": "%-d.%m.%Y. %-H:%M", "decimal_point": ",", "time": "%-H:%M:%S", "time_short": "%-H:%M" }, "name": "Bosnian", "native_name": "bosanski", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n % 10 == 1 and n % 100 != 11 else 'w' if n % 10 >= 2 and n % 10 <= 4 and (n % 100 < 10 or n % 100 >= 20) else 'p') }, "ca": { "format": { "date": "%-d/%m/%Y", "datetime": "%-d/%m/%Y %-H:%M:%S", "datetime_short": "%-d/%m/%Y %-H:%M", "decimal_point": ",", "time": "%-H:%M:%S", "time_short": "%-H:%M" }, "name": "Catalan", "native_name": "catal\u00e0", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'p') }, "cs": { "format": { "date": "%-d.%m.%Y", "datetime": "%-d.%m.%Y %-H:%M:%S", "datetime_short": "%-d.%m.%Y %-H:%M", "decimal_point": ",", "time": "%-H:%M:%S", "time_short": "%-H:%M" }, "name": "Czech", "native_name": "\u010de\u0161tina", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if (n == 1) else 'w' if (n >= 2 and n <= 4) else 'p') }, "cy": { "format": { "date": "%-d/%m/%Y", "datetime": "%-d/%m/%Y %-H:%M:%S", "datetime_short": "%-d/%m/%Y %-H:%M", "decimal_point": ".", "time": "%-H:%M:%S", "time_short": "%-H:%M" }, "name": "Welsh", "native_name": "Cymraeg", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if (n == 1) else 't' if (n == 2) else 'p' if (n != 8 and n != 11) else 'y') }, "da": { "format": { "date": "%-d/%m/%Y", "datetime": "%-d/%m/%Y %-H.%M.%S", "datetime_short": "%-d/%m/%Y %-H.%M", "decimal_point": ",", "time": "%-H.%M.%S", "time_short": "%-H.%M" }, "name": "Danish", "native_name": "dansk", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'p') }, "de": { "format": { "date": "%-d.%m.%Y", "datetime": "%-d.%m.%Y, %-H:%M:%S", "datetime_short": "%-d.%m.%Y, %-H:%M", "decimal_point": ",", "time": "%-H:%M:%S", "time_short": "%-H:%M" }, "name": "German", "native_name": "Deutsch", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'p') }, "dz": { "format": { "date": "%Y-%m-%-d", "datetime": "%Y-%m-%-d \u0f46\u0f74\u0f0b\u0f5a\u0f7c\u0f51\u0f0b%-I:%M:%S %p", "datetime_short": "%Y-%m-%-d \u0f46\u0f74\u0f0b\u0f5a\u0f7c\u0f51\u0f0b %-I \u0f66\u0f90\u0f62\u0f0b\u0f58\u0f0b %M %p", "decimal_point": ".", "time": "\u0f46\u0f74\u0f0b\u0f5a\u0f7c\u0f51\u0f0b%-I:%M:%S %p", "time_short": "\u0f46\u0f74\u0f0b\u0f5a\u0f7c\u0f51\u0f0b %-I \u0f66\u0f90\u0f62\u0f0b\u0f58\u0f0b %M %p" }, "name": "Dzongkha", "native_name": "\u0f62\u0fab\u0f7c\u0f44\u0f0b\u0f41", "number_rule": lambda n: '' }, "el": { "format": { "date": "%-d/%m/%Y", "datetime": "%-d/%m/%Y, %-I:%M:%S %p", "datetime_short": "%-d/%m/%Y, %-I:%M %p", "decimal_point": ",", "time": "%-I:%M:%S %p", "time_short": "%-I:%M %p" }, "name": "Greek", "native_name": "\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'p') }, "en": { "format": { "date": "%Y-%-m-%-d", "datetime": "%Y-%-m-%-d, %-I:%M:%S %p", "datetime_short": "%Y-%-m-%-d, %-I:%M %p", "decimal_point": ".", "time": "%-I:%M:%S %p", "time_short": "%-I:%M %p" }, "name": "English", "native_name": "English", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'p') }, "en-US": { "format": { "date": "%-m/%-d/%Y", "datetime": "%-m/%-d/%Y, %-I:%M:%S %p", "datetime_short": "%-m/%-d/%Y, %-I:%M %p", "decimal_point": ".", "time": "%-I:%M:%S %p", "time_short": "%-I:%M %p" }, "name": "English", "native_name": "English", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'p') }, "es": { "format": { "date": "%-d/%m/%Y", "datetime": "%-d/%m/%Y %-H:%M:%S", "datetime_short": "%-d/%m/%Y %-H:%M", "decimal_point": ",", "time": "%-H:%M:%S", "time_short": "%-H:%M" }, "name": "Spanish", "native_name": "espa\u00f1ol", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'p') }, "et": { "format": { "date": "%-d.%m.%Y", "datetime": "%-d.%m.%Y %-H:%M.%S", "datetime_short": "%-d.%m.%Y %-H:%M", "decimal_point": ",", "time": "%-H:%M.%S", "time_short": "%-H:%M" }, "name": "Estonian", "native_name": "eesti", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'p') }, "eu": { "format": { "date": "%Y/%m/%-d", "datetime": "%Y/%m/%-d %-H:%M:%S", "datetime_short": "%Y/%m/%-d %-H:%M", "decimal_point": ",", "time": "%-H:%M:%S", "time_short": "%-H:%M" }, "name": "Basque", "native_name": "euskara", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'p') }, "fa": { "format": { "date": "%Y/%m/%-d", "datetime": "%Y/%m/%-d\u060c\u200f %-H:%M:%S", "datetime_short": "%Y/%m/%-d\u060c\u200f %-H:%M", "decimal_point": "\u066b", "time": "%-H:%M:%S", "time_short": "%-H:%M" }, "name": "Persian", "native_name": "\u0641\u0627\u0631\u0633\u06cc", "number_rule": lambda n: '' }, "fi": { "format": { "date": "%-d.%m.%Y", "datetime": "%-d.%m.%Y %-H.%M.%S", "datetime_short": "%-d.%m.%Y %-H.%M", "decimal_point": ",", "time": "%-H.%M.%S", "time_short": "%-H.%M" }, "name": "Finnish", "native_name": "suomi", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'p') }, "fo": { "format": { "date": "%-d-%m-%Y", "datetime": "%-d-%m-%Y %-H:%M:%S", "datetime_short": "%-d-%m-%Y %-H:%M", "decimal_point": ",", "time": "%-H:%M:%S", "time_short": "%-H:%M" }, "name": "Faroese", "native_name": "f\u00f8royskt", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'p') }, "fr": { "format": { "date": "%-d/%m/%Y", "datetime": "%-d/%m/%Y %-H:%M:%S", "datetime_short": "%-d/%m/%Y %-H:%M", "decimal_point": ",", "time": "%-H:%M:%S", "time_short": "%-H:%M" }, "name": "French", "native_name": "fran\u00e7ais", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'p') }, "fy": { "format": { "date": "%-d-%m-%Y", "datetime": "%-d-%m-%Y %-H:%M:%S", "datetime_short": "%-d-%m-%Y %-H:%M", "decimal_point": ",", "time": "%-H:%M:%S", "time_short": "%-H:%M" }, "name": "Western Frisian", "native_name": "West-Frysk", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'p') }, "ga": { "format": { "date": "%-d/%m/%Y", "datetime": "%-d/%m/%Y %-H:%M:%S", "datetime_short": "%-d/%m/%Y %-H:%M", "decimal_point": ".", "time": "%-H:%M:%S", "time_short": "%-H:%M" }, "name": "Irish", "native_name": "Gaeilge", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 't' if n == 2 else 't' if (n > 2 and n < 7) else 'y' if (n > 6 and n < 11) else 'p') }, "gd": { "format": { "date": "%-d/%m/%Y", "datetime": "%-d/%m/%Y %-H:%M:%S", "datetime_short": "%-d/%m/%Y %-H:%M", "decimal_point": ".", "time": "%-H:%M:%S", "time_short": "%-H:%M" }, "name": "Scottish Gaelic", "native_name": "G\u00e0idhlig", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if (n == 1 or n == 11) else 't' if (n == 2 or n == 12) else 'w' if (n > 2 and n < 20) else 'p') }, "gl": { "format": { "date": "%-d/%m/%Y", "datetime": "%-d/%m/%Y %-H:%M:%S", "datetime_short": "%-d/%m/%Y %-H:%M", "decimal_point": ",", "time": "%-H:%M:%S", "time_short": "%-H:%M" }, "name": "Galician", "native_name": "galego", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'p') }, "gu": { "format": { "date": "%-d/%m/%Y", "datetime": "%-d/%m/%Y %-I:%M:%S %p", "datetime_short": "%-d/%m/%Y %-I:%M %p", "decimal_point": ".", "time": "%-I:%M:%S %p", "time_short": "%-I:%M %p" }, "name": "Gujarati", "native_name": "\u0a97\u0ac1\u0a9c\u0ab0\u0abe\u0aa4\u0ac0", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'p') }, "he": { "format": { "date": "%-d.%m.%Y", "datetime": "%-d.%m.%Y, %-H:%M:%S", "datetime_short": "%-d.%m.%Y, %-H:%M", "decimal_point": ".", "time": "%-H:%M:%S", "time_short": "%-H:%M" }, "name": "Hebrew", "native_name": "\u05e2\u05d1\u05e8\u05d9\u05ea", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'p') }, "hi": { "format": { "date": "%-d/%m/%Y", "datetime": "%-d/%m/%Y, %-I:%M:%S %p", "datetime_short": "%-d/%m/%Y, %-I:%M %p", "decimal_point": ".", "time": "%-I:%M:%S %p", "time_short": "%-I:%M %p" }, "name": "Hindi", "native_name": "\u0939\u093f\u0928\u094d\u0926\u0940", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'p') }, "hr": { "format": { "date": "%-d.%m.%Y.", "datetime": "%-d.%m.%Y. %-H:%M:%S", "datetime_short": "%-d.%m.%Y. %-H:%M", "decimal_point": ",", "time": "%-H:%M:%S", "time_short": "%-H:%M" }, "name": "Croatian", "native_name": "hrvatski", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n % 10 == 1 and n % 100 != 11 else 'w' if n % 10 >= 2 and n % 10 <= 4 and (n % 100 < 10 or n % 100 >= 20) else 'p') }, "hu": { "format": { "date": "%Y. %m. %-d.", "datetime": "%Y. %m. %-d. %-H:%M:%S", "datetime_short": "%Y. %m. %-d. %-H:%M", "decimal_point": ",", "time": "%-H:%M:%S", "time_short": "%-H:%M" }, "name": "Hungarian", "native_name": "magyar", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'p') }, "hy": { "format": { "date": "%-d.%m.%Y", "datetime": "%-d.%m.%Y, %-H:%M:%S", "datetime_short": "%-d.%m.%Y, %-H:%M", "decimal_point": ",", "time": "%-H:%M:%S", "time_short": "%-H:%M" }, "name": "Armenian", "native_name": "\u0570\u0561\u0575\u0565\u0580\u0565\u0576", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'p') }, "id": { "format": { "date": "%-d/%m/%Y", "datetime": "%-d/%m/%Y %-H.%M.%S", "datetime_short": "%-d/%m/%Y %-H.%M", "decimal_point": ",", "time": "%-H.%M.%S", "time_short": "%-H.%M" }, "name": "Indonesian", "native_name": "Bahasa Indonesia", "number_rule": lambda n: '' }, "is": { "format": { "date": "%-d.%m.%Y", "datetime": "%-d.%m.%Y, %-H:%M:%S", "datetime_short": "%-d.%m.%Y, %-H:%M", "decimal_point": ",", "time": "%-H:%M:%S", "time_short": "%-H:%M" }, "name": "Icelandic", "native_name": "\u00edslenska", "number_rule": lambda n: 'p' if not is_integral(n) else ('p' if (n % 10 != 1 or n % 100 == 11) else '') }, "it": { "format": { "date": "%-d/%m/%Y", "datetime": "%-d/%m/%Y, %-H:%M:%S", "datetime_short": "%-d/%m/%Y, %-H:%M", "decimal_point": ",", "time": "%-H:%M:%S", "time_short": "%-H:%M" }, "name": "Italian", "native_name": "italiano", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'p') }, "ja": { "format": { "date": "%Y/%m/%-d", "datetime": "%Y/%m/%-d %-H:%M:%S", "datetime_short": "%Y/%m/%-d %-H:%M", "decimal_point": ".", "time": "%-H:%M:%S", "time_short": "%-H:%M" }, "name": "Japanese", "native_name": "\u65e5\u672c\u8a9e", "number_rule": lambda n: '' }, "ka": { "format": { "date": "%-d.%m.%Y", "datetime": "%-d.%m.%Y, %-H:%M:%S", "datetime_short": "%-d.%m.%Y, %-H:%M", "decimal_point": ",", "time": "%-H:%M:%S", "time_short": "%-H:%M" }, "name": "Georgian", "native_name": "\u10e5\u10d0\u10e0\u10d7\u10e3\u10da\u10d8", "number_rule": lambda n: '' }, "kk": { "format": { "date": "%-d/%m/%Y", "datetime": "%-d/%m/%Y %-H:%M:%S", "datetime_short": "%-d/%m/%Y %-H:%M", "decimal_point": ",", "time": "%-H:%M:%S", "time_short": "%-H:%M" }, "name": "Kazakh", "native_name": "\u049b\u0430\u0437\u0430\u049b \u0442\u0456\u043b\u0456", "number_rule": lambda n: '' }, "kl": { "format": { "date": "%Y-%m-%-d", "datetime": "%Y-%m-%-d %-I:%M:%S %p", "datetime_short": "%Y-%m-%-d %-I:%M %p", "decimal_point": ",", "time": "%-I:%M:%S %p", "time_short": "%-I:%M %p" }, "name": "Kalaallisut", "native_name": "kalaallisut", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'p') }, "km": { "format": { "date": "%-d/%m/%Y", "datetime": "%-d/%m/%Y, %-I:%M:%S %p", "datetime_short": "%-d/%m/%Y, %-I:%M %p", "decimal_point": ",", "time": "%-I:%M:%S %p", "time_short": "%-I:%M %p" }, "name": "Khmer", "native_name": "\u1781\u17d2\u1798\u17c2\u179a", "number_rule": lambda n: '' }, "kn": { "format": { "date": "%-m/%-d/%Y", "datetime": "%-m/%-d/%Y %-I:%M:%S %p", "datetime_short": "%-m/%-d/%Y %-I:%M %p", "decimal_point": ".", "time": "%-I:%M:%S %p", "time_short": "%-I:%M %p" }, "name": "Kannada", "native_name": "\u0c95\u0ca8\u0ccd\u0ca8\u0ca1", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'p') }, "ko": { "format": { "date": "%Y. %m. %-d.", "datetime": "%Y. %m. %-d. %p %-I:%M:%S", "datetime_short": "%Y. %m. %-d. %p %-I:%M", "decimal_point": ".", "time": "%p %-I:%M:%S", "time_short": "%p %-I:%M" }, "name": "Korean", "native_name": "\ud55c\uad6d\uc5b4", "number_rule": lambda n: '' }, "ks": { "format": { "date": "%-m/%-d/%Y", "datetime": "%-m/%-d/%Y %-I:%M:%S %p", "datetime_short": "%-m/%-d/%Y %-I:%M %p", "decimal_point": ".", "time": "%-I:%M:%S %p", "time_short": "%-I:%M %p" }, "name": "Kashmiri", "native_name": "\u06a9\u0672\u0634\u064f\u0631", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'p') }, "ky": { "format": { "date": "%-d.%m.%Y", "datetime": "%-d.%m.%Y %-H:%M:%S", "datetime_short": "%-d.%m.%Y %-H:%M", "decimal_point": ",", "time": "%-H:%M:%S", "time_short": "%-H:%M" }, "name": "Kirghiz", "native_name": "\u043a\u044b\u0440\u0433\u044b\u0437\u0447\u0430", "number_rule": lambda n: '' }, "lb": { "format": { "date": "%-d.%m.%Y", "datetime": "%-d.%m.%Y %-H:%M:%S", "datetime_short": "%-d.%m.%Y %-H:%M", "decimal_point": ",", "time": "%-H:%M:%S", "time_short": "%-H:%M" }, "name": "Luxembourgish", "native_name": "L\u00ebtzebuergesch", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'p') }, "lo": { "format": { "date": "%-d/%m/%Y", "datetime": "%-d/%m/%Y, %-H:%M:%S", "datetime_short": "%-d/%m/%Y, %-H:%M", "decimal_point": ",", "time": "%-H:%M:%S", "time_short": "%-H:%M" }, "name": "Lao", "native_name": "\u0ea5\u0eb2\u0ea7", "number_rule": lambda n: '' }, "lt": { "format": { "date": "%Y-%m-%-d", "datetime": "%Y-%m-%-d %-H:%M:%S", "datetime_short": "%Y-%m-%-d %-H:%M", "decimal_point": ",", "time": "%-H:%M:%S", "time_short": "%-H:%M" }, "name": "Lithuanian", "native_name": "lietuvi\u0173", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n % 10 == 1 and n % 100 != 11 else 'w' if n % 10 >= 2 and (n % 100 < 10 or n % 100 >= 20) else 'p') }, "lv": { "format": { "date": "%-d.%m.%Y", "datetime": "%-d.%m.%Y %-H:%M:%S", "datetime_short": "%-d.%m.%Y %-H:%M", "decimal_point": ",", "time": "%-H:%M:%S", "time_short": "%-H:%M" }, "name": "Latvian", "native_name": "latvie\u0161u", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n % 10 == 1 and n % 100 != 11 else 'p' if n != 0 else 'z') }, "mk": { "format": { "date": "%-d.%m.%Y", "datetime": "%-d.%m.%Y %-H:%M:%S", "datetime_short": "%-d.%m.%Y %-H:%M", "decimal_point": ",", "time": "%-H:%M:%S", "time_short": "%-H:%M" }, "name": "Macedonian", "native_name": "\u043c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'p') }, "ml": { "format": { "date": "%-d/%m/%Y", "datetime": "%-d/%m/%Y %-I:%M:%S %p", "datetime_short": "%-d/%m/%Y %-I:%M %p", "decimal_point": ".", "time": "%-I:%M:%S %p", "time_short": "%-I:%M %p" }, "name": "Malayalam", "native_name": "\u0d2e\u0d32\u0d2f\u0d3e\u0d33\u0d02", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'p') }, "mn": { "format": { "date": "%Y-%m-%-d", "datetime": "%Y-%m-%-d, %-H:%M:%S", "datetime_short": "%Y-%m-%-d, %-H:%M", "decimal_point": ".", "time": "%-H:%M:%S", "time_short": "%-H:%M" }, "name": "Mongolian", "native_name": "\u043c\u043e\u043d\u0433\u043e\u043b", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'p') }, "mr": { "format": { "date": "%-d/%m/%Y", "datetime": "%-d/%m/%Y, %-I:%M:%S %p", "datetime_short": "%-d/%m/%Y, %-I:%M %p", "decimal_point": ".", "time": "%-I:%M:%S %p", "time_short": "%-I:%M %p" }, "name": "Marathi", "native_name": "\u092e\u0930\u093e\u0920\u0940", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'p') }, "ms": { "format": { "date": "%-d/%m/%Y", "datetime": "%-d/%m/%Y %-I:%M:%S %p", "datetime_short": "%-d/%m/%Y %-I:%M %p", "decimal_point": ".", "time": "%-I:%M:%S %p", "time_short": "%-I:%M %p" }, "name": "Malay", "native_name": "Bahasa Melayu", "number_rule": lambda n: '' }, "my": { "format": { "date": "%-d-%m-%Y", "datetime": "%-d-%m-%Y %-H:%M:%S", "datetime_short": "%-d-%m-%Y %-H:%M", "decimal_point": ".", "time": "%-H:%M:%S", "time_short": "%-H:%M" }, "name": "Burmese", "native_name": "\u1017\u1019\u102c", "number_rule": lambda n: '' }, "nb": { "format": { "date": "%-d.%m.%Y", "datetime": "%-d.%m.%Y, %-H.%M.%S", "datetime_short": "%-d.%m.%Y, %-H.%M", "decimal_point": ",", "time": "%-H.%M.%S", "time_short": "%-H.%M" }, "name": "Norwegian Bokm\u00e5l", "native_name": "norsk bokm\u00e5l", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'p') }, "ne": { "format": { "date": "%Y-%m-%-d", "datetime": "%Y-%m-%-d, %-H:%M:%S", "datetime_short": "%Y-%m-%-d, %-H:%M", "decimal_point": ".", "time": "%-H:%M:%S", "time_short": "%-H:%M" }, "name": "Nepali", "native_name": "\u0928\u0947\u092a\u093e\u0932\u0940", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'p') }, "nl": { "format": { "date": "%-d-%m-%Y", "datetime": "%-d-%m-%Y %-H:%M:%S", "datetime_short": "%-d-%m-%Y %-H:%M", "decimal_point": ",", "time": "%-H:%M:%S", "time_short": "%-H:%M" }, "name": "Dutch", "native_name": "Nederlands", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'p') }, "nn": { "format": { "date": "%-d.%m.%Y", "datetime": "%-d.%m.%Y, %-H:%M:%S", "datetime_short": "%-d.%m.%Y, %-H:%M", "decimal_point": ",", "time": "%-H:%M:%S", "time_short": "%-H:%M" }, "name": "Norwegian Nynorsk", "native_name": "nynorsk", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'p') }, "os": { "format": { "date": "%-d.%m.%Y", "datetime": "%-d.%m.%Y, %-H:%M:%S", "datetime_short": "%-d.%m.%Y, %-H:%M", "decimal_point": ",", "time": "%-H:%M:%S", "time_short": "%-H:%M" }, "name": "Ossetic", "native_name": "\u0438\u0440\u043e\u043d", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'p') }, "pa": { "format": { "date": "%-d/%m/%Y", "datetime": "%-d/%m/%Y, %-I:%M:%S %p", "datetime_short": "%-d/%m/%Y, %-I:%M %p", "decimal_point": "\u066b", "time": "%-I:%M:%S %p", "time_short": "%-I:%M %p" }, "name": "Punjabi", "native_name": "\u0a2a\u0a70\u0a1c\u0a3e\u0a2c\u0a40", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'p') }, "pl": { "format": { "date": "%-d.%m.%Y", "datetime": "%-d.%m.%Y, %-H:%M:%S", "datetime_short": "%-d.%m.%Y, %-H:%M", "decimal_point": ",", "time": "%-H:%M:%S", "time_short": "%-H:%M" }, "name": "Polish", "native_name": "polski", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'w' if n % 10 >= 2 and n % 10 <= 4 and (n % 100 < 10 or n % 100 >= 20) else 'p') }, "pt": { "format": { "date": "%-d/%m/%Y", "datetime": "%-d/%m/%Y %-H:%M:%S", "datetime_short": "%-d/%m/%Y %-H:%M", "decimal_point": ",", "time": "%-H:%M:%S", "time_short": "%-H:%M" }, "name": "Portuguese", "native_name": "portugu\u00eas", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'p') }, "ro": { "format": { "date": "%-d.%m.%Y", "datetime": "%-d.%m.%Y, %-H:%M:%S", "datetime_short": "%-d.%m.%Y, %-H:%M", "decimal_point": ",", "time": "%-H:%M:%S", "time_short": "%-H:%M" }, "name": "Romanian", "native_name": "rom\u00e2n\u0103", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'w' if (n == 0 or (n % 100 > 0 and n % 100 < 20)) else 'p') }, "ru": { "format": { "date": "%-d.%m.%Y", "datetime": "%-d.%m.%Y, %-H:%M:%S", "datetime_short": "%-d.%m.%Y, %-H:%M", "decimal_point": ",", "time": "%-H:%M:%S", "time_short": "%-H:%M" }, "name": "Russian", "native_name": "\u0440\u0443\u0441\u0441\u043a\u0438\u0439", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n % 10 == 1 and n % 100 != 11 else 'w' if n % 10 >= 2 and n % 10 <= 4 and (n % 100 < 10 or n % 100 >= 20) else 'p') }, "si": { "format": { "date": "%Y-%m-%-d", "datetime": "%Y-%m-%-d %p %-I.%M.%S", "datetime_short": "%Y-%m-%-d %p %-I.%M", "decimal_point": ".", "time": "%p %-I.%M.%S", "time_short": "%p %-I.%M" }, "name": "Sinhala", "native_name": "\u0dc3\u0dd2\u0d82\u0dc4\u0dbd", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'p') }, "sk": { "format": { "date": "%-d.%m.%Y", "datetime": "%-d.%m.%Y %-H:%M:%S", "datetime_short": "%-d.%m.%Y %-H:%M", "decimal_point": ",", "time": "%-H:%M:%S", "time_short": "%-H:%M" }, "name": "Slovak", "native_name": "sloven\u010dina", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if (n == 1) else 'w' if (n >= 2 and n <= 4) else 'p') }, "sl": { "format": { "date": "%-d. %m. %Y", "datetime": "%-d. %m. %Y %-H:%M:%S", "datetime_short": "%-d. %m. %Y %-H:%M", "decimal_point": ",", "time": "%-H:%M:%S", "time_short": "%-H:%M" }, "name": "Slovenian", "native_name": "sloven\u0161\u010dina", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n % 100 == 1 else 't' if n % 100 == 2 else 'w' if n % 100 == 3 or n % 100 == 4 else 'p') }, "sq": { "format": { "date": "%-d.%m.%Y", "datetime": "%-d.%m.%Y, %-H:%M:%S", "datetime_short": "%-d.%m.%Y, %-H:%M", "decimal_point": ",", "time": "%-H:%M:%S", "time_short": "%-H:%M" }, "name": "Albanian", "native_name": "shqip", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'p') }, "sr": { "format": { "date": "%-d.%m.%Y.", "datetime": "%-d.%m.%Y. %-H.%M.%S", "datetime_short": "%-d.%m.%Y. %-H.%M", "decimal_point": ",", "time": "%-H.%M.%S", "time_short": "%-H.%M" }, "name": "Serbian", "native_name": "\u0441\u0440\u043f\u0441\u043a\u0438", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n % 10 == 1 and n % 100 != 11 else 'w' if n % 10 >= 2 and n % 10 <= 4 and (n % 100 < 10 or n % 100 >= 20) else 'p') }, "sv": { "format": { "date": "%Y-%m-%-d", "datetime": "%Y-%m-%-d %-H:%M:%S", "datetime_short": "%Y-%m-%-d %-H:%M", "decimal_point": ",", "time": "%-H:%M:%S", "time_short": "%-H:%M" }, "name": "Swedish", "native_name": "svenska", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'p') }, "sw": { "format": { "date": "%-d/%m/%Y", "datetime": "%-d/%m/%Y %-I:%M:%S %p", "datetime_short": "%-d/%m/%Y %-I:%M %p", "decimal_point": ".", "time": "%-I:%M:%S %p", "time_short": "%-I:%M %p" }, "name": "Swahili", "native_name": "Kiswahili", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'p') }, "ta": { "format": { "date": "%-d-%m-%Y", "datetime": "%-d-%m-%Y, %-I:%M:%S %p", "datetime_short": "%-d-%m-%Y, %-I:%M %p", "decimal_point": ".", "time": "%-I:%M:%S %p", "time_short": "%-I:%M %p" }, "name": "Tamil", "native_name": "\u0ba4\u0bae\u0bbf\u0bb4\u0bcd", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'p') }, "te": { "format": { "date": "%-d-%m-%Y", "datetime": "%-d-%m-%Y %-I:%M:%S %p", "datetime_short": "%-d-%m-%Y %-I:%M %p", "decimal_point": ".", "time": "%-I:%M:%S %p", "time_short": "%-I:%M %p" }, "name": "Telugu", "native_name": "\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'p') }, "th": { "format": { "date": "%-d/%m/%Y", "datetime": "%-d/%m/%Y %-H:%M:%S", "datetime_short": "%-d/%m/%Y %-H:%M", "decimal_point": ".", "time": "%-H:%M:%S", "time_short": "%-H:%M" }, "name": "Thai", "native_name": "\u0e44\u0e17\u0e22", "number_rule": lambda n: '' }, "to": { "format": { "date": "%-d/%m/%Y", "datetime": "%-d/%m/%Y %-I:%M:%S %p", "datetime_short": "%-d/%m/%Y %-I:%M %p", "decimal_point": ".", "time": "%-I:%M:%S %p", "time_short": "%-I:%M %p" }, "name": "Tongan", "native_name": "lea fakatonga", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'p') }, "tr": { "format": { "date": "%-d.%m.%Y", "datetime": "%-d.%m.%Y %-H:%M:%S", "datetime_short": "%-d.%m.%Y %-H:%M", "decimal_point": ",", "time": "%-H:%M:%S", "time_short": "%-H:%M" }, "name": "Turkish", "native_name": "T\u00fcrk\u00e7e", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'p') }, "ug": { "format": { "date": "%-m/%-d/%Y", "datetime": "%-m/%-d/%Y\u060c %-I:%M:%S %p", "datetime_short": "%-m/%-d/%Y\u060c %-I:%M %p", "decimal_point": ".", "time": "%-I:%M:%S %p", "time_short": "%-I:%M %p" }, "name": "Uighur", "native_name": "\u0626\u06c7\u064a\u063a\u06c7\u0631\u0686\u06d5", "number_rule": lambda n: '' }, "uk": { "format": { "date": "%-d.%m.%Y", "datetime": "%-d.%m.%Y %-H:%M:%S", "datetime_short": "%-d.%m.%Y %-H:%M", "decimal_point": ",", "time": "%-H:%M:%S", "time_short": "%-H:%M" }, "name": "Ukrainian", "native_name": "\u0443\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n % 10 == 1 and n % 100 != 11 else 'w' if n % 10 >= 2 and n % 10 <= 4 and (n % 100 < 10 or n % 100 >= 20) else 'p') }, "ur": { "format": { "date": "%-d/%m/%Y", "datetime": "%-d/%m/%Y %-I:%M:%S %p", "datetime_short": "%-d/%m/%Y %-I:%M %p", "decimal_point": ".", "time": "%-I:%M:%S %p", "time_short": "%-I:%M %p" }, "name": "Urdu", "native_name": "\u0627\u0631\u062f\u0648", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'p') }, "uz": { "format": { "date": "%Y/%m/%-d", "datetime": "%Y/%m/%-d %-H:%M:%S", "datetime_short": "%Y/%m/%-d %-H:%M", "decimal_point": "\u066b", "time": "%-H:%M:%S", "time_short": "%-H:%M" }, "name": "Uzbek", "native_name": "o\u02bbzbekcha", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'p') }, "vi": { "format": { "date": "%-d/%m/%Y", "datetime": "%-H:%M:%S %-d/%m/%Y", "datetime_short": "%-H:%M %-d/%m/%Y", "decimal_point": ",", "time": "%-H:%M:%S", "time_short": "%-H:%M" }, "name": "Vietnamese", "native_name": "Ti\u1ebfng Vi\u1ec7t", "number_rule": lambda n: '' }, "yi": { "format": { "date": "%-d/%m/%Y", "datetime": "%-d/%m/%Y, %-H:%M:%S", "datetime_short": "%-d/%m/%Y, %-H:%M", "decimal_point": ".", "time": "%-H:%M:%S", "time_short": "%-H:%M" }, "name": "Yiddish", "native_name": "\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'p') }, "zh": { "format": { "date": "%Y/%m/%-d", "datetime": "%Y/%m/%-d %p%-I:%M:%S", "datetime_short": "%Y/%m/%-d %p%-I:%M", "decimal_point": ".", "time": "%p%-I:%M:%S", "time_short": "%p%-I:%M" }, "name": "Chinese", "native_name": "\u4e2d\u6587", "number_rule": lambda n: '' }, "zu": { "format": { "date": "%-m/%-d/%Y", "datetime": "%-m/%-d/%Y %-I:%M:%S %p", "datetime_short": "%-m/%-d/%Y %-I:%M %p", "decimal_point": ".", "time": "%-I:%M:%S %p", "time_short": "%-I:%M %p" }, "name": "Zulu", "native_name": "isiZulu", "number_rule": lambda n: 'p' if not is_integral(n) else ('' if n == 1 else 'p') } }
def is_integral(n): return int(n) == n locales = {'af': {'format': {'date': '%Y-%m-%-d', 'datetime': '%Y-%m-%-d %-I:%M:%S %p', 'datetime_short': '%Y-%m-%-d %-I:%M %p', 'decimal_point': ',', 'time': '%-I:%M:%S %p', 'time_short': '%-I:%M %p'}, 'name': 'Afrikaans', 'native_name': 'Afrikaans', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'p'}, 'am': {'format': {'date': '%-d/%m/%Y', 'datetime': '%-d/%m/%Y %-I:%M:%S %p', 'datetime_short': '%-d/%m/%Y %-I:%M %p', 'decimal_point': '.', 'time': '%-I:%M:%S %p', 'time_short': '%-I:%M %p'}, 'name': 'Amharic', 'native_name': 'አማርኛ', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'p'}, 'ar': {'format': {'date': '%-d\u200f/%m\u200f/%Y', 'datetime': '%-d\u200f/%m\u200f/%Y %-I:%M:%S %p', 'datetime_short': '%-d\u200f/%m\u200f/%Y %-I:%M %p', 'decimal_point': '٫', 'time': '%-I:%M:%S %p', 'time_short': '%-I:%M %p'}, 'name': 'Arabic', 'native_name': 'العربية', 'number_rule': lambda n: 'p' if not is_integral(n) else 'z' if n == 0 else '' if n == 1 else 't' if n == 2 else 'w' if n % 100 >= 3 and n % 100 <= 10 else 'y' if n % 100 >= 11 else 'p'}, 'az': {'format': {'date': '%-d.%m.%Y', 'datetime': '%-d.%m.%Y %-H:%M:%S', 'datetime_short': '%-d.%m.%Y %-H:%M', 'decimal_point': ',', 'time': '%-H:%M:%S', 'time_short': '%-H:%M'}, 'name': 'Azeri', 'native_name': 'azərbaycan', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'p'}, 'bg': {'format': {'date': "%-d.%m.%Y 'г'.", 'datetime': "%-d.%m.%Y 'г'., %-H:%M:%S", 'datetime_short': "%-d.%m.%Y 'г'., %-H:%M", 'decimal_point': ',', 'time': '%-H:%M:%S', 'time_short': '%-H:%M'}, 'name': 'Bulgarian', 'native_name': 'български', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'p'}, 'bn': {'format': {'date': '%-d/%m/%Y', 'datetime': '%-d/%m/%Y %-I:%M:%S %p', 'datetime_short': '%-d/%m/%Y %-I:%M %p', 'decimal_point': '.', 'time': '%-I:%M:%S %p', 'time_short': '%-I:%M %p'}, 'name': 'Bengali', 'native_name': 'বাংলা', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'p'}, 'bs': {'format': {'date': '%-d.%m.%Y.', 'datetime': '%-d.%m.%Y. %-H:%M:%S', 'datetime_short': '%-d.%m.%Y. %-H:%M', 'decimal_point': ',', 'time': '%-H:%M:%S', 'time_short': '%-H:%M'}, 'name': 'Bosnian', 'native_name': 'bosanski', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n % 10 == 1 and n % 100 != 11 else 'w' if n % 10 >= 2 and n % 10 <= 4 and (n % 100 < 10 or n % 100 >= 20) else 'p'}, 'ca': {'format': {'date': '%-d/%m/%Y', 'datetime': '%-d/%m/%Y %-H:%M:%S', 'datetime_short': '%-d/%m/%Y %-H:%M', 'decimal_point': ',', 'time': '%-H:%M:%S', 'time_short': '%-H:%M'}, 'name': 'Catalan', 'native_name': 'català', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'p'}, 'cs': {'format': {'date': '%-d.%m.%Y', 'datetime': '%-d.%m.%Y %-H:%M:%S', 'datetime_short': '%-d.%m.%Y %-H:%M', 'decimal_point': ',', 'time': '%-H:%M:%S', 'time_short': '%-H:%M'}, 'name': 'Czech', 'native_name': 'čeština', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'w' if n >= 2 and n <= 4 else 'p'}, 'cy': {'format': {'date': '%-d/%m/%Y', 'datetime': '%-d/%m/%Y %-H:%M:%S', 'datetime_short': '%-d/%m/%Y %-H:%M', 'decimal_point': '.', 'time': '%-H:%M:%S', 'time_short': '%-H:%M'}, 'name': 'Welsh', 'native_name': 'Cymraeg', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 't' if n == 2 else 'p' if n != 8 and n != 11 else 'y'}, 'da': {'format': {'date': '%-d/%m/%Y', 'datetime': '%-d/%m/%Y %-H.%M.%S', 'datetime_short': '%-d/%m/%Y %-H.%M', 'decimal_point': ',', 'time': '%-H.%M.%S', 'time_short': '%-H.%M'}, 'name': 'Danish', 'native_name': 'dansk', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'p'}, 'de': {'format': {'date': '%-d.%m.%Y', 'datetime': '%-d.%m.%Y, %-H:%M:%S', 'datetime_short': '%-d.%m.%Y, %-H:%M', 'decimal_point': ',', 'time': '%-H:%M:%S', 'time_short': '%-H:%M'}, 'name': 'German', 'native_name': 'Deutsch', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'p'}, 'dz': {'format': {'date': '%Y-%m-%-d', 'datetime': '%Y-%m-%-d ཆུ་ཚོད་%-I:%M:%S %p', 'datetime_short': '%Y-%m-%-d ཆུ་ཚོད་ %-I སྐར་མ་ %M %p', 'decimal_point': '.', 'time': 'ཆུ་ཚོད་%-I:%M:%S %p', 'time_short': 'ཆུ་ཚོད་ %-I སྐར་མ་ %M %p'}, 'name': 'Dzongkha', 'native_name': 'རྫོང་ཁ', 'number_rule': lambda n: ''}, 'el': {'format': {'date': '%-d/%m/%Y', 'datetime': '%-d/%m/%Y, %-I:%M:%S %p', 'datetime_short': '%-d/%m/%Y, %-I:%M %p', 'decimal_point': ',', 'time': '%-I:%M:%S %p', 'time_short': '%-I:%M %p'}, 'name': 'Greek', 'native_name': 'Ελληνικά', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'p'}, 'en': {'format': {'date': '%Y-%-m-%-d', 'datetime': '%Y-%-m-%-d, %-I:%M:%S %p', 'datetime_short': '%Y-%-m-%-d, %-I:%M %p', 'decimal_point': '.', 'time': '%-I:%M:%S %p', 'time_short': '%-I:%M %p'}, 'name': 'English', 'native_name': 'English', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'p'}, 'en-US': {'format': {'date': '%-m/%-d/%Y', 'datetime': '%-m/%-d/%Y, %-I:%M:%S %p', 'datetime_short': '%-m/%-d/%Y, %-I:%M %p', 'decimal_point': '.', 'time': '%-I:%M:%S %p', 'time_short': '%-I:%M %p'}, 'name': 'English', 'native_name': 'English', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'p'}, 'es': {'format': {'date': '%-d/%m/%Y', 'datetime': '%-d/%m/%Y %-H:%M:%S', 'datetime_short': '%-d/%m/%Y %-H:%M', 'decimal_point': ',', 'time': '%-H:%M:%S', 'time_short': '%-H:%M'}, 'name': 'Spanish', 'native_name': 'español', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'p'}, 'et': {'format': {'date': '%-d.%m.%Y', 'datetime': '%-d.%m.%Y %-H:%M.%S', 'datetime_short': '%-d.%m.%Y %-H:%M', 'decimal_point': ',', 'time': '%-H:%M.%S', 'time_short': '%-H:%M'}, 'name': 'Estonian', 'native_name': 'eesti', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'p'}, 'eu': {'format': {'date': '%Y/%m/%-d', 'datetime': '%Y/%m/%-d %-H:%M:%S', 'datetime_short': '%Y/%m/%-d %-H:%M', 'decimal_point': ',', 'time': '%-H:%M:%S', 'time_short': '%-H:%M'}, 'name': 'Basque', 'native_name': 'euskara', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'p'}, 'fa': {'format': {'date': '%Y/%m/%-d', 'datetime': '%Y/%m/%-d،\u200f %-H:%M:%S', 'datetime_short': '%Y/%m/%-d،\u200f %-H:%M', 'decimal_point': '٫', 'time': '%-H:%M:%S', 'time_short': '%-H:%M'}, 'name': 'Persian', 'native_name': 'فارسی', 'number_rule': lambda n: ''}, 'fi': {'format': {'date': '%-d.%m.%Y', 'datetime': '%-d.%m.%Y %-H.%M.%S', 'datetime_short': '%-d.%m.%Y %-H.%M', 'decimal_point': ',', 'time': '%-H.%M.%S', 'time_short': '%-H.%M'}, 'name': 'Finnish', 'native_name': 'suomi', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'p'}, 'fo': {'format': {'date': '%-d-%m-%Y', 'datetime': '%-d-%m-%Y %-H:%M:%S', 'datetime_short': '%-d-%m-%Y %-H:%M', 'decimal_point': ',', 'time': '%-H:%M:%S', 'time_short': '%-H:%M'}, 'name': 'Faroese', 'native_name': 'føroyskt', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'p'}, 'fr': {'format': {'date': '%-d/%m/%Y', 'datetime': '%-d/%m/%Y %-H:%M:%S', 'datetime_short': '%-d/%m/%Y %-H:%M', 'decimal_point': ',', 'time': '%-H:%M:%S', 'time_short': '%-H:%M'}, 'name': 'French', 'native_name': 'français', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'p'}, 'fy': {'format': {'date': '%-d-%m-%Y', 'datetime': '%-d-%m-%Y %-H:%M:%S', 'datetime_short': '%-d-%m-%Y %-H:%M', 'decimal_point': ',', 'time': '%-H:%M:%S', 'time_short': '%-H:%M'}, 'name': 'Western Frisian', 'native_name': 'West-Frysk', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'p'}, 'ga': {'format': {'date': '%-d/%m/%Y', 'datetime': '%-d/%m/%Y %-H:%M:%S', 'datetime_short': '%-d/%m/%Y %-H:%M', 'decimal_point': '.', 'time': '%-H:%M:%S', 'time_short': '%-H:%M'}, 'name': 'Irish', 'native_name': 'Gaeilge', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 't' if n == 2 else 't' if n > 2 and n < 7 else 'y' if n > 6 and n < 11 else 'p'}, 'gd': {'format': {'date': '%-d/%m/%Y', 'datetime': '%-d/%m/%Y %-H:%M:%S', 'datetime_short': '%-d/%m/%Y %-H:%M', 'decimal_point': '.', 'time': '%-H:%M:%S', 'time_short': '%-H:%M'}, 'name': 'Scottish Gaelic', 'native_name': 'Gàidhlig', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 or n == 11 else 't' if n == 2 or n == 12 else 'w' if n > 2 and n < 20 else 'p'}, 'gl': {'format': {'date': '%-d/%m/%Y', 'datetime': '%-d/%m/%Y %-H:%M:%S', 'datetime_short': '%-d/%m/%Y %-H:%M', 'decimal_point': ',', 'time': '%-H:%M:%S', 'time_short': '%-H:%M'}, 'name': 'Galician', 'native_name': 'galego', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'p'}, 'gu': {'format': {'date': '%-d/%m/%Y', 'datetime': '%-d/%m/%Y %-I:%M:%S %p', 'datetime_short': '%-d/%m/%Y %-I:%M %p', 'decimal_point': '.', 'time': '%-I:%M:%S %p', 'time_short': '%-I:%M %p'}, 'name': 'Gujarati', 'native_name': 'ગુજરાતી', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'p'}, 'he': {'format': {'date': '%-d.%m.%Y', 'datetime': '%-d.%m.%Y, %-H:%M:%S', 'datetime_short': '%-d.%m.%Y, %-H:%M', 'decimal_point': '.', 'time': '%-H:%M:%S', 'time_short': '%-H:%M'}, 'name': 'Hebrew', 'native_name': 'עברית', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'p'}, 'hi': {'format': {'date': '%-d/%m/%Y', 'datetime': '%-d/%m/%Y, %-I:%M:%S %p', 'datetime_short': '%-d/%m/%Y, %-I:%M %p', 'decimal_point': '.', 'time': '%-I:%M:%S %p', 'time_short': '%-I:%M %p'}, 'name': 'Hindi', 'native_name': 'हिन्दी', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'p'}, 'hr': {'format': {'date': '%-d.%m.%Y.', 'datetime': '%-d.%m.%Y. %-H:%M:%S', 'datetime_short': '%-d.%m.%Y. %-H:%M', 'decimal_point': ',', 'time': '%-H:%M:%S', 'time_short': '%-H:%M'}, 'name': 'Croatian', 'native_name': 'hrvatski', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n % 10 == 1 and n % 100 != 11 else 'w' if n % 10 >= 2 and n % 10 <= 4 and (n % 100 < 10 or n % 100 >= 20) else 'p'}, 'hu': {'format': {'date': '%Y. %m. %-d.', 'datetime': '%Y. %m. %-d. %-H:%M:%S', 'datetime_short': '%Y. %m. %-d. %-H:%M', 'decimal_point': ',', 'time': '%-H:%M:%S', 'time_short': '%-H:%M'}, 'name': 'Hungarian', 'native_name': 'magyar', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'p'}, 'hy': {'format': {'date': '%-d.%m.%Y', 'datetime': '%-d.%m.%Y, %-H:%M:%S', 'datetime_short': '%-d.%m.%Y, %-H:%M', 'decimal_point': ',', 'time': '%-H:%M:%S', 'time_short': '%-H:%M'}, 'name': 'Armenian', 'native_name': 'հայերեն', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'p'}, 'id': {'format': {'date': '%-d/%m/%Y', 'datetime': '%-d/%m/%Y %-H.%M.%S', 'datetime_short': '%-d/%m/%Y %-H.%M', 'decimal_point': ',', 'time': '%-H.%M.%S', 'time_short': '%-H.%M'}, 'name': 'Indonesian', 'native_name': 'Bahasa Indonesia', 'number_rule': lambda n: ''}, 'is': {'format': {'date': '%-d.%m.%Y', 'datetime': '%-d.%m.%Y, %-H:%M:%S', 'datetime_short': '%-d.%m.%Y, %-H:%M', 'decimal_point': ',', 'time': '%-H:%M:%S', 'time_short': '%-H:%M'}, 'name': 'Icelandic', 'native_name': 'íslenska', 'number_rule': lambda n: 'p' if not is_integral(n) else 'p' if n % 10 != 1 or n % 100 == 11 else ''}, 'it': {'format': {'date': '%-d/%m/%Y', 'datetime': '%-d/%m/%Y, %-H:%M:%S', 'datetime_short': '%-d/%m/%Y, %-H:%M', 'decimal_point': ',', 'time': '%-H:%M:%S', 'time_short': '%-H:%M'}, 'name': 'Italian', 'native_name': 'italiano', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'p'}, 'ja': {'format': {'date': '%Y/%m/%-d', 'datetime': '%Y/%m/%-d %-H:%M:%S', 'datetime_short': '%Y/%m/%-d %-H:%M', 'decimal_point': '.', 'time': '%-H:%M:%S', 'time_short': '%-H:%M'}, 'name': 'Japanese', 'native_name': '日本語', 'number_rule': lambda n: ''}, 'ka': {'format': {'date': '%-d.%m.%Y', 'datetime': '%-d.%m.%Y, %-H:%M:%S', 'datetime_short': '%-d.%m.%Y, %-H:%M', 'decimal_point': ',', 'time': '%-H:%M:%S', 'time_short': '%-H:%M'}, 'name': 'Georgian', 'native_name': 'ქართული', 'number_rule': lambda n: ''}, 'kk': {'format': {'date': '%-d/%m/%Y', 'datetime': '%-d/%m/%Y %-H:%M:%S', 'datetime_short': '%-d/%m/%Y %-H:%M', 'decimal_point': ',', 'time': '%-H:%M:%S', 'time_short': '%-H:%M'}, 'name': 'Kazakh', 'native_name': 'қазақ тілі', 'number_rule': lambda n: ''}, 'kl': {'format': {'date': '%Y-%m-%-d', 'datetime': '%Y-%m-%-d %-I:%M:%S %p', 'datetime_short': '%Y-%m-%-d %-I:%M %p', 'decimal_point': ',', 'time': '%-I:%M:%S %p', 'time_short': '%-I:%M %p'}, 'name': 'Kalaallisut', 'native_name': 'kalaallisut', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'p'}, 'km': {'format': {'date': '%-d/%m/%Y', 'datetime': '%-d/%m/%Y, %-I:%M:%S %p', 'datetime_short': '%-d/%m/%Y, %-I:%M %p', 'decimal_point': ',', 'time': '%-I:%M:%S %p', 'time_short': '%-I:%M %p'}, 'name': 'Khmer', 'native_name': 'ខ្មែរ', 'number_rule': lambda n: ''}, 'kn': {'format': {'date': '%-m/%-d/%Y', 'datetime': '%-m/%-d/%Y %-I:%M:%S %p', 'datetime_short': '%-m/%-d/%Y %-I:%M %p', 'decimal_point': '.', 'time': '%-I:%M:%S %p', 'time_short': '%-I:%M %p'}, 'name': 'Kannada', 'native_name': 'ಕನ್ನಡ', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'p'}, 'ko': {'format': {'date': '%Y. %m. %-d.', 'datetime': '%Y. %m. %-d. %p %-I:%M:%S', 'datetime_short': '%Y. %m. %-d. %p %-I:%M', 'decimal_point': '.', 'time': '%p %-I:%M:%S', 'time_short': '%p %-I:%M'}, 'name': 'Korean', 'native_name': '한국어', 'number_rule': lambda n: ''}, 'ks': {'format': {'date': '%-m/%-d/%Y', 'datetime': '%-m/%-d/%Y %-I:%M:%S %p', 'datetime_short': '%-m/%-d/%Y %-I:%M %p', 'decimal_point': '.', 'time': '%-I:%M:%S %p', 'time_short': '%-I:%M %p'}, 'name': 'Kashmiri', 'native_name': 'کٲشُر', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'p'}, 'ky': {'format': {'date': '%-d.%m.%Y', 'datetime': '%-d.%m.%Y %-H:%M:%S', 'datetime_short': '%-d.%m.%Y %-H:%M', 'decimal_point': ',', 'time': '%-H:%M:%S', 'time_short': '%-H:%M'}, 'name': 'Kirghiz', 'native_name': 'кыргызча', 'number_rule': lambda n: ''}, 'lb': {'format': {'date': '%-d.%m.%Y', 'datetime': '%-d.%m.%Y %-H:%M:%S', 'datetime_short': '%-d.%m.%Y %-H:%M', 'decimal_point': ',', 'time': '%-H:%M:%S', 'time_short': '%-H:%M'}, 'name': 'Luxembourgish', 'native_name': 'Lëtzebuergesch', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'p'}, 'lo': {'format': {'date': '%-d/%m/%Y', 'datetime': '%-d/%m/%Y, %-H:%M:%S', 'datetime_short': '%-d/%m/%Y, %-H:%M', 'decimal_point': ',', 'time': '%-H:%M:%S', 'time_short': '%-H:%M'}, 'name': 'Lao', 'native_name': 'ລາວ', 'number_rule': lambda n: ''}, 'lt': {'format': {'date': '%Y-%m-%-d', 'datetime': '%Y-%m-%-d %-H:%M:%S', 'datetime_short': '%Y-%m-%-d %-H:%M', 'decimal_point': ',', 'time': '%-H:%M:%S', 'time_short': '%-H:%M'}, 'name': 'Lithuanian', 'native_name': 'lietuvių', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n % 10 == 1 and n % 100 != 11 else 'w' if n % 10 >= 2 and (n % 100 < 10 or n % 100 >= 20) else 'p'}, 'lv': {'format': {'date': '%-d.%m.%Y', 'datetime': '%-d.%m.%Y %-H:%M:%S', 'datetime_short': '%-d.%m.%Y %-H:%M', 'decimal_point': ',', 'time': '%-H:%M:%S', 'time_short': '%-H:%M'}, 'name': 'Latvian', 'native_name': 'latviešu', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n % 10 == 1 and n % 100 != 11 else 'p' if n != 0 else 'z'}, 'mk': {'format': {'date': '%-d.%m.%Y', 'datetime': '%-d.%m.%Y %-H:%M:%S', 'datetime_short': '%-d.%m.%Y %-H:%M', 'decimal_point': ',', 'time': '%-H:%M:%S', 'time_short': '%-H:%M'}, 'name': 'Macedonian', 'native_name': 'македонски', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'p'}, 'ml': {'format': {'date': '%-d/%m/%Y', 'datetime': '%-d/%m/%Y %-I:%M:%S %p', 'datetime_short': '%-d/%m/%Y %-I:%M %p', 'decimal_point': '.', 'time': '%-I:%M:%S %p', 'time_short': '%-I:%M %p'}, 'name': 'Malayalam', 'native_name': 'മലയാളം', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'p'}, 'mn': {'format': {'date': '%Y-%m-%-d', 'datetime': '%Y-%m-%-d, %-H:%M:%S', 'datetime_short': '%Y-%m-%-d, %-H:%M', 'decimal_point': '.', 'time': '%-H:%M:%S', 'time_short': '%-H:%M'}, 'name': 'Mongolian', 'native_name': 'монгол', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'p'}, 'mr': {'format': {'date': '%-d/%m/%Y', 'datetime': '%-d/%m/%Y, %-I:%M:%S %p', 'datetime_short': '%-d/%m/%Y, %-I:%M %p', 'decimal_point': '.', 'time': '%-I:%M:%S %p', 'time_short': '%-I:%M %p'}, 'name': 'Marathi', 'native_name': 'मराठी', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'p'}, 'ms': {'format': {'date': '%-d/%m/%Y', 'datetime': '%-d/%m/%Y %-I:%M:%S %p', 'datetime_short': '%-d/%m/%Y %-I:%M %p', 'decimal_point': '.', 'time': '%-I:%M:%S %p', 'time_short': '%-I:%M %p'}, 'name': 'Malay', 'native_name': 'Bahasa Melayu', 'number_rule': lambda n: ''}, 'my': {'format': {'date': '%-d-%m-%Y', 'datetime': '%-d-%m-%Y %-H:%M:%S', 'datetime_short': '%-d-%m-%Y %-H:%M', 'decimal_point': '.', 'time': '%-H:%M:%S', 'time_short': '%-H:%M'}, 'name': 'Burmese', 'native_name': 'ဗမာ', 'number_rule': lambda n: ''}, 'nb': {'format': {'date': '%-d.%m.%Y', 'datetime': '%-d.%m.%Y, %-H.%M.%S', 'datetime_short': '%-d.%m.%Y, %-H.%M', 'decimal_point': ',', 'time': '%-H.%M.%S', 'time_short': '%-H.%M'}, 'name': 'Norwegian Bokmål', 'native_name': 'norsk bokmål', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'p'}, 'ne': {'format': {'date': '%Y-%m-%-d', 'datetime': '%Y-%m-%-d, %-H:%M:%S', 'datetime_short': '%Y-%m-%-d, %-H:%M', 'decimal_point': '.', 'time': '%-H:%M:%S', 'time_short': '%-H:%M'}, 'name': 'Nepali', 'native_name': 'नेपाली', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'p'}, 'nl': {'format': {'date': '%-d-%m-%Y', 'datetime': '%-d-%m-%Y %-H:%M:%S', 'datetime_short': '%-d-%m-%Y %-H:%M', 'decimal_point': ',', 'time': '%-H:%M:%S', 'time_short': '%-H:%M'}, 'name': 'Dutch', 'native_name': 'Nederlands', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'p'}, 'nn': {'format': {'date': '%-d.%m.%Y', 'datetime': '%-d.%m.%Y, %-H:%M:%S', 'datetime_short': '%-d.%m.%Y, %-H:%M', 'decimal_point': ',', 'time': '%-H:%M:%S', 'time_short': '%-H:%M'}, 'name': 'Norwegian Nynorsk', 'native_name': 'nynorsk', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'p'}, 'os': {'format': {'date': '%-d.%m.%Y', 'datetime': '%-d.%m.%Y, %-H:%M:%S', 'datetime_short': '%-d.%m.%Y, %-H:%M', 'decimal_point': ',', 'time': '%-H:%M:%S', 'time_short': '%-H:%M'}, 'name': 'Ossetic', 'native_name': 'ирон', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'p'}, 'pa': {'format': {'date': '%-d/%m/%Y', 'datetime': '%-d/%m/%Y, %-I:%M:%S %p', 'datetime_short': '%-d/%m/%Y, %-I:%M %p', 'decimal_point': '٫', 'time': '%-I:%M:%S %p', 'time_short': '%-I:%M %p'}, 'name': 'Punjabi', 'native_name': 'ਪੰਜਾਬੀ', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'p'}, 'pl': {'format': {'date': '%-d.%m.%Y', 'datetime': '%-d.%m.%Y, %-H:%M:%S', 'datetime_short': '%-d.%m.%Y, %-H:%M', 'decimal_point': ',', 'time': '%-H:%M:%S', 'time_short': '%-H:%M'}, 'name': 'Polish', 'native_name': 'polski', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'w' if n % 10 >= 2 and n % 10 <= 4 and (n % 100 < 10 or n % 100 >= 20) else 'p'}, 'pt': {'format': {'date': '%-d/%m/%Y', 'datetime': '%-d/%m/%Y %-H:%M:%S', 'datetime_short': '%-d/%m/%Y %-H:%M', 'decimal_point': ',', 'time': '%-H:%M:%S', 'time_short': '%-H:%M'}, 'name': 'Portuguese', 'native_name': 'português', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'p'}, 'ro': {'format': {'date': '%-d.%m.%Y', 'datetime': '%-d.%m.%Y, %-H:%M:%S', 'datetime_short': '%-d.%m.%Y, %-H:%M', 'decimal_point': ',', 'time': '%-H:%M:%S', 'time_short': '%-H:%M'}, 'name': 'Romanian', 'native_name': 'română', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'w' if n == 0 or (n % 100 > 0 and n % 100 < 20) else 'p'}, 'ru': {'format': {'date': '%-d.%m.%Y', 'datetime': '%-d.%m.%Y, %-H:%M:%S', 'datetime_short': '%-d.%m.%Y, %-H:%M', 'decimal_point': ',', 'time': '%-H:%M:%S', 'time_short': '%-H:%M'}, 'name': 'Russian', 'native_name': 'русский', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n % 10 == 1 and n % 100 != 11 else 'w' if n % 10 >= 2 and n % 10 <= 4 and (n % 100 < 10 or n % 100 >= 20) else 'p'}, 'si': {'format': {'date': '%Y-%m-%-d', 'datetime': '%Y-%m-%-d %p %-I.%M.%S', 'datetime_short': '%Y-%m-%-d %p %-I.%M', 'decimal_point': '.', 'time': '%p %-I.%M.%S', 'time_short': '%p %-I.%M'}, 'name': 'Sinhala', 'native_name': 'සිංහල', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'p'}, 'sk': {'format': {'date': '%-d.%m.%Y', 'datetime': '%-d.%m.%Y %-H:%M:%S', 'datetime_short': '%-d.%m.%Y %-H:%M', 'decimal_point': ',', 'time': '%-H:%M:%S', 'time_short': '%-H:%M'}, 'name': 'Slovak', 'native_name': 'slovenčina', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'w' if n >= 2 and n <= 4 else 'p'}, 'sl': {'format': {'date': '%-d. %m. %Y', 'datetime': '%-d. %m. %Y %-H:%M:%S', 'datetime_short': '%-d. %m. %Y %-H:%M', 'decimal_point': ',', 'time': '%-H:%M:%S', 'time_short': '%-H:%M'}, 'name': 'Slovenian', 'native_name': 'slovenščina', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n % 100 == 1 else 't' if n % 100 == 2 else 'w' if n % 100 == 3 or n % 100 == 4 else 'p'}, 'sq': {'format': {'date': '%-d.%m.%Y', 'datetime': '%-d.%m.%Y, %-H:%M:%S', 'datetime_short': '%-d.%m.%Y, %-H:%M', 'decimal_point': ',', 'time': '%-H:%M:%S', 'time_short': '%-H:%M'}, 'name': 'Albanian', 'native_name': 'shqip', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'p'}, 'sr': {'format': {'date': '%-d.%m.%Y.', 'datetime': '%-d.%m.%Y. %-H.%M.%S', 'datetime_short': '%-d.%m.%Y. %-H.%M', 'decimal_point': ',', 'time': '%-H.%M.%S', 'time_short': '%-H.%M'}, 'name': 'Serbian', 'native_name': 'српски', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n % 10 == 1 and n % 100 != 11 else 'w' if n % 10 >= 2 and n % 10 <= 4 and (n % 100 < 10 or n % 100 >= 20) else 'p'}, 'sv': {'format': {'date': '%Y-%m-%-d', 'datetime': '%Y-%m-%-d %-H:%M:%S', 'datetime_short': '%Y-%m-%-d %-H:%M', 'decimal_point': ',', 'time': '%-H:%M:%S', 'time_short': '%-H:%M'}, 'name': 'Swedish', 'native_name': 'svenska', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'p'}, 'sw': {'format': {'date': '%-d/%m/%Y', 'datetime': '%-d/%m/%Y %-I:%M:%S %p', 'datetime_short': '%-d/%m/%Y %-I:%M %p', 'decimal_point': '.', 'time': '%-I:%M:%S %p', 'time_short': '%-I:%M %p'}, 'name': 'Swahili', 'native_name': 'Kiswahili', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'p'}, 'ta': {'format': {'date': '%-d-%m-%Y', 'datetime': '%-d-%m-%Y, %-I:%M:%S %p', 'datetime_short': '%-d-%m-%Y, %-I:%M %p', 'decimal_point': '.', 'time': '%-I:%M:%S %p', 'time_short': '%-I:%M %p'}, 'name': 'Tamil', 'native_name': 'தமிழ்', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'p'}, 'te': {'format': {'date': '%-d-%m-%Y', 'datetime': '%-d-%m-%Y %-I:%M:%S %p', 'datetime_short': '%-d-%m-%Y %-I:%M %p', 'decimal_point': '.', 'time': '%-I:%M:%S %p', 'time_short': '%-I:%M %p'}, 'name': 'Telugu', 'native_name': 'తెలుగు', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'p'}, 'th': {'format': {'date': '%-d/%m/%Y', 'datetime': '%-d/%m/%Y %-H:%M:%S', 'datetime_short': '%-d/%m/%Y %-H:%M', 'decimal_point': '.', 'time': '%-H:%M:%S', 'time_short': '%-H:%M'}, 'name': 'Thai', 'native_name': 'ไทย', 'number_rule': lambda n: ''}, 'to': {'format': {'date': '%-d/%m/%Y', 'datetime': '%-d/%m/%Y %-I:%M:%S %p', 'datetime_short': '%-d/%m/%Y %-I:%M %p', 'decimal_point': '.', 'time': '%-I:%M:%S %p', 'time_short': '%-I:%M %p'}, 'name': 'Tongan', 'native_name': 'lea fakatonga', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'p'}, 'tr': {'format': {'date': '%-d.%m.%Y', 'datetime': '%-d.%m.%Y %-H:%M:%S', 'datetime_short': '%-d.%m.%Y %-H:%M', 'decimal_point': ',', 'time': '%-H:%M:%S', 'time_short': '%-H:%M'}, 'name': 'Turkish', 'native_name': 'Türkçe', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'p'}, 'ug': {'format': {'date': '%-m/%-d/%Y', 'datetime': '%-m/%-d/%Y، %-I:%M:%S %p', 'datetime_short': '%-m/%-d/%Y، %-I:%M %p', 'decimal_point': '.', 'time': '%-I:%M:%S %p', 'time_short': '%-I:%M %p'}, 'name': 'Uighur', 'native_name': 'ئۇيغۇرچە', 'number_rule': lambda n: ''}, 'uk': {'format': {'date': '%-d.%m.%Y', 'datetime': '%-d.%m.%Y %-H:%M:%S', 'datetime_short': '%-d.%m.%Y %-H:%M', 'decimal_point': ',', 'time': '%-H:%M:%S', 'time_short': '%-H:%M'}, 'name': 'Ukrainian', 'native_name': 'українська', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n % 10 == 1 and n % 100 != 11 else 'w' if n % 10 >= 2 and n % 10 <= 4 and (n % 100 < 10 or n % 100 >= 20) else 'p'}, 'ur': {'format': {'date': '%-d/%m/%Y', 'datetime': '%-d/%m/%Y %-I:%M:%S %p', 'datetime_short': '%-d/%m/%Y %-I:%M %p', 'decimal_point': '.', 'time': '%-I:%M:%S %p', 'time_short': '%-I:%M %p'}, 'name': 'Urdu', 'native_name': 'اردو', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'p'}, 'uz': {'format': {'date': '%Y/%m/%-d', 'datetime': '%Y/%m/%-d %-H:%M:%S', 'datetime_short': '%Y/%m/%-d %-H:%M', 'decimal_point': '٫', 'time': '%-H:%M:%S', 'time_short': '%-H:%M'}, 'name': 'Uzbek', 'native_name': 'oʻzbekcha', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'p'}, 'vi': {'format': {'date': '%-d/%m/%Y', 'datetime': '%-H:%M:%S %-d/%m/%Y', 'datetime_short': '%-H:%M %-d/%m/%Y', 'decimal_point': ',', 'time': '%-H:%M:%S', 'time_short': '%-H:%M'}, 'name': 'Vietnamese', 'native_name': 'Tiếng Việt', 'number_rule': lambda n: ''}, 'yi': {'format': {'date': '%-d/%m/%Y', 'datetime': '%-d/%m/%Y, %-H:%M:%S', 'datetime_short': '%-d/%m/%Y, %-H:%M', 'decimal_point': '.', 'time': '%-H:%M:%S', 'time_short': '%-H:%M'}, 'name': 'Yiddish', 'native_name': 'ייִדיש', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'p'}, 'zh': {'format': {'date': '%Y/%m/%-d', 'datetime': '%Y/%m/%-d %p%-I:%M:%S', 'datetime_short': '%Y/%m/%-d %p%-I:%M', 'decimal_point': '.', 'time': '%p%-I:%M:%S', 'time_short': '%p%-I:%M'}, 'name': 'Chinese', 'native_name': '中文', 'number_rule': lambda n: ''}, 'zu': {'format': {'date': '%-m/%-d/%Y', 'datetime': '%-m/%-d/%Y %-I:%M:%S %p', 'datetime_short': '%-m/%-d/%Y %-I:%M %p', 'decimal_point': '.', 'time': '%-I:%M:%S %p', 'time_short': '%-I:%M %p'}, 'name': 'Zulu', 'native_name': 'isiZulu', 'number_rule': lambda n: 'p' if not is_integral(n) else '' if n == 1 else 'p'}}
def load(h): return ({'abbr': 0, 'code': 0, 'title': 'Confidence index'}, {'abbr': 1, 'code': 1, 'title': 'Quality indicator'}, {'abbr': 2, 'code': 2, 'title': 'Correlation of product with used calibration product'}, {'abbr': 3, 'code': 3, 'title': 'Standard deviation'}, {'abbr': 4, 'code': 4, 'title': 'Random error'}, {'abbr': None, 'code': 255, 'title': 'Missing'})
def load(h): return ({'abbr': 0, 'code': 0, 'title': 'Confidence index'}, {'abbr': 1, 'code': 1, 'title': 'Quality indicator'}, {'abbr': 2, 'code': 2, 'title': 'Correlation of product with used calibration product'}, {'abbr': 3, 'code': 3, 'title': 'Standard deviation'}, {'abbr': 4, 'code': 4, 'title': 'Random error'}, {'abbr': None, 'code': 255, 'title': 'Missing'})
def binary_search(arr, low, high, number): while(low <= high): mid = (low + high)//2 if arr[mid] == number: return True elif(arr[mid] > number): high = mid -1 else: low = mid + 1 return False if __name__ == "__main__": print(binary_search([3,4,5,6,7,87,96534],0, 6, 87)) def binary_search_recursive(arr, low, high, number): if low <= high: mid = (low + high)//2 if arr[mid] == number: return True if arr[mid] > number: return binary_search_recursive(arr, low, mid-1, number) return binary_search_recursive(arr, mid+1, high, number) return False if __name__ == "__main__": print(binary_search_recursive([3,4,5,6,7,87,96534],0, 6, 96534))
def binary_search(arr, low, high, number): while low <= high: mid = (low + high) // 2 if arr[mid] == number: return True elif arr[mid] > number: high = mid - 1 else: low = mid + 1 return False if __name__ == '__main__': print(binary_search([3, 4, 5, 6, 7, 87, 96534], 0, 6, 87)) def binary_search_recursive(arr, low, high, number): if low <= high: mid = (low + high) // 2 if arr[mid] == number: return True if arr[mid] > number: return binary_search_recursive(arr, low, mid - 1, number) return binary_search_recursive(arr, mid + 1, high, number) return False if __name__ == '__main__': print(binary_search_recursive([3, 4, 5, 6, 7, 87, 96534], 0, 6, 96534))
def _flatten(x): result = [] for el in x: if hasattr(el, "__iter__") and not isinstance(el, basestring): result.extend(_flatten(el)) else: result.append(el) return result class Utils: @staticmethod def _deleteEmpty(str): return str != "" @staticmethod def _getInt(val): if val.replace('.','',1).isdigit(): val = str(int(float(val))) return val # from http://stackoverflow.com/questions/406121/flattening-a-shallow-list-in-python _flatten = staticmethod(_flatten) @staticmethod def _isInfinity(value): return value == "Infinity" or value == "-Infinity"
def _flatten(x): result = [] for el in x: if hasattr(el, '__iter__') and (not isinstance(el, basestring)): result.extend(_flatten(el)) else: result.append(el) return result class Utils: @staticmethod def _delete_empty(str): return str != '' @staticmethod def _get_int(val): if val.replace('.', '', 1).isdigit(): val = str(int(float(val))) return val _flatten = staticmethod(_flatten) @staticmethod def _is_infinity(value): return value == 'Infinity' or value == '-Infinity'
# Length of Last Word # https://www.interviewbit.com/problems/length-of-last-word/ # # Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string. # # If the last word does not exist, return 0. # # Note: A word is defined as a character sequence consists of non-space characters only. # # Example: # # Given s = "Hello World", # # return 5 as length("World") = 5. # # Please make sure you try to solve this problem without using library functions. Make sure you only traverse the string once. # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Approach I # def lengthOfLastWord(self, A): # i, length = len(A) - 1, 0 # if i >= 0: # while i >= 0 and A[i].isspace(): # i -= 1 # # while i >= 0 and not A[i].isspace(): # length += 1 # i -= 1 # # return length class Solution: # @param A : string # @return an integer def lengthOfLastWord(self, A): words = A.split() return len(words[-1]) if len(words) > 0 else 0 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # if __name__ == "__main__": s = Solution() print(s.lengthOfLastWord("")) print(s.lengthOfLastWord("ana voli milovana"))
class Solution: def length_of_last_word(self, A): words = A.split() return len(words[-1]) if len(words) > 0 else 0 if __name__ == '__main__': s = solution() print(s.lengthOfLastWord('')) print(s.lengthOfLastWord('ana voli milovana'))
# # @lc app=leetcode id=845 lang=python3 # # [845] Longest Mountain in Array # # @lc code=start class Solution: def longestMountain(self, A) -> int: tend = [] for i in range(0, len(A) - 1): if A[i + 1] > A[i]: tend.append(1) elif A[i + 1] == A[i]: tend.append(0) else: tend.append(-1) peeks = [] i = 0 pre = 0 tmp = 0 has_up = 0 while i < len(tend): if tend[i] == 0: if tmp > 0 and pre == -1: peeks.append(tmp) pre = 0 tmp = 0 has_up = 0 elif tend[i] == 1: if pre != -1: tmp += 1 pre = 1 has_up = 1 else: if tmp > 0: peeks.append(tmp) pre = 1 has_up = 1 tmp = 1 else: if has_up: pre = -1 tmp += 1 i += 1 if tmp and pre == -1: peeks.append(tmp) return max(peeks) + 1 if peeks else 0 if __name__ == '__main__': a = Solution() b = a.longestMountain([0,1,2,3,4,5,4,3,2,1,0]) print(b) # @lc code=end
class Solution: def longest_mountain(self, A) -> int: tend = [] for i in range(0, len(A) - 1): if A[i + 1] > A[i]: tend.append(1) elif A[i + 1] == A[i]: tend.append(0) else: tend.append(-1) peeks = [] i = 0 pre = 0 tmp = 0 has_up = 0 while i < len(tend): if tend[i] == 0: if tmp > 0 and pre == -1: peeks.append(tmp) pre = 0 tmp = 0 has_up = 0 elif tend[i] == 1: if pre != -1: tmp += 1 pre = 1 has_up = 1 else: if tmp > 0: peeks.append(tmp) pre = 1 has_up = 1 tmp = 1 elif has_up: pre = -1 tmp += 1 i += 1 if tmp and pre == -1: peeks.append(tmp) return max(peeks) + 1 if peeks else 0 if __name__ == '__main__': a = solution() b = a.longestMountain([0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0]) print(b)
#replace blank space with / def replace(a): temp=a.split(" ") temp2='/' for i in range(0,len(temp)): temp2=temp2+temp[i]+'/' print(temp2) a=raw_input("enter string") replace(a)
def replace(a): temp = a.split(' ') temp2 = '/' for i in range(0, len(temp)): temp2 = temp2 + temp[i] + '/' print(temp2) a = raw_input('enter string') replace(a)
def main(request, response): response.headers.set("Access-Control-Allow-Origin", "*") response.headers.set("Access-Control-Max-Age", 0) response.headers.set('Access-Control-Allow-Headers', "x-test") if request.method == "OPTIONS": if not request.headers.get("User-Agent"): response.content = "FAIL: User-Agent header missing in preflight request." response.status = 400 else: if request.headers.get("User-Agent"): response.content = "PASS" else: response.content = "FAIL: User-Agent header missing in request" response.status = 400
def main(request, response): response.headers.set('Access-Control-Allow-Origin', '*') response.headers.set('Access-Control-Max-Age', 0) response.headers.set('Access-Control-Allow-Headers', 'x-test') if request.method == 'OPTIONS': if not request.headers.get('User-Agent'): response.content = 'FAIL: User-Agent header missing in preflight request.' response.status = 400 elif request.headers.get('User-Agent'): response.content = 'PASS' else: response.content = 'FAIL: User-Agent header missing in request' response.status = 400
class HealthCheck: _instance = None def __new__(cls, *args, **kwargs): if not HealthCheck._instance: HealthCheck._instance = super(HealthCheck, cls).__new__(cls, *args, **kwargs) return HealthCheck._instance def __init__(self): self._servers = [] def add_server(self): self._servers.append("Server 1") self._servers.append("Server 2") self._servers.append("Server 3") self._servers.append("Server 4") def change_server(self): self._servers.pop() self._servers.append("Server 5") hc1 = HealthCheck() hc2 = HealthCheck() print(hc1, hc2) hc1.add_server() print("Schedule heath check for servers (1)..") for i in range(4): print("Checking ", hc1._servers[i]) hc2.change_server() print("Schedule health check for servers (2)..") for i in range(4): print("Checking ", hc2._servers[i])
class Healthcheck: _instance = None def __new__(cls, *args, **kwargs): if not HealthCheck._instance: HealthCheck._instance = super(HealthCheck, cls).__new__(cls, *args, **kwargs) return HealthCheck._instance def __init__(self): self._servers = [] def add_server(self): self._servers.append('Server 1') self._servers.append('Server 2') self._servers.append('Server 3') self._servers.append('Server 4') def change_server(self): self._servers.pop() self._servers.append('Server 5') hc1 = health_check() hc2 = health_check() print(hc1, hc2) hc1.add_server() print('Schedule heath check for servers (1)..') for i in range(4): print('Checking ', hc1._servers[i]) hc2.change_server() print('Schedule health check for servers (2)..') for i in range(4): print('Checking ', hc2._servers[i])
n=int(input("Enter a Number - ")) for i in range (1,n+1): if (n%i==0): print (i)
n = int(input('Enter a Number - ')) for i in range(1, n + 1): if n % i == 0: print(i)
print("hello.") def test_hello(): print("\ntesting the words 'hello' and 'goodbye'\n") assert "hello" > "goodbye" def test_add(): assert 1==2-1
print('hello.') def test_hello(): print("\ntesting the words 'hello' and 'goodbye'\n") assert 'hello' > 'goodbye' def test_add(): assert 1 == 2 - 1
# suites SIMPLE = 'simple' ARGS = 'args' GENERATOR = 'generator' LAZY_GENERATOR = 'lazy_generator' FIXTURE = 'fixture' FIXTURE_ARGS = 'fixture_args' FIXTURE_GENERATOR = 'fixture_generator' FIXTURE_LAZY_GENERATOR = 'fixture_lazy_generator' FIXTURE_BUILDER = 'fixture_builder' FIXTURE_BUILDER_ARGS = 'fixture_builder_args' FIXTURE_BUILDER_GENERATOR = 'fixture_builder_generator' FIXTURE_BUILDER_LAZY_GENERATOR = 'fixture_builder_lazy_generator' # dataset used to compare different backends # sltbench supports: all # googlebench supports: SIMPLE && FIXTURE # nonius supports: SIMPLE COMPARABLE = [ SIMPLE, ] # all suites ALL = [ SIMPLE, ARGS, GENERATOR, LAZY_GENERATOR, FIXTURE, FIXTURE_ARGS, FIXTURE_GENERATOR, FIXTURE_LAZY_GENERATOR, FIXTURE_BUILDER, FIXTURE_BUILDER_ARGS, FIXTURE_BUILDER_GENERATOR, FIXTURE_BUILDER_LAZY_GENERATOR ] # available input ALL_INPUT = ['comparable', 'all'] + ALL def create(args): if args.dataset == 'comparable': return COMPARABLE if args.dataset == 'all': return ALL return [args.dataset]
simple = 'simple' args = 'args' generator = 'generator' lazy_generator = 'lazy_generator' fixture = 'fixture' fixture_args = 'fixture_args' fixture_generator = 'fixture_generator' fixture_lazy_generator = 'fixture_lazy_generator' fixture_builder = 'fixture_builder' fixture_builder_args = 'fixture_builder_args' fixture_builder_generator = 'fixture_builder_generator' fixture_builder_lazy_generator = 'fixture_builder_lazy_generator' comparable = [SIMPLE] all = [SIMPLE, ARGS, GENERATOR, LAZY_GENERATOR, FIXTURE, FIXTURE_ARGS, FIXTURE_GENERATOR, FIXTURE_LAZY_GENERATOR, FIXTURE_BUILDER, FIXTURE_BUILDER_ARGS, FIXTURE_BUILDER_GENERATOR, FIXTURE_BUILDER_LAZY_GENERATOR] all_input = ['comparable', 'all'] + ALL def create(args): if args.dataset == 'comparable': return COMPARABLE if args.dataset == 'all': return ALL return [args.dataset]
#User function Template for python3 class Solution: def subsetSums(self, arr, N): # code here def subset(arr,N,ind,sum,res): if ind==N: res.append(sum) return subset(arr,N,ind+1,sum+arr[ind],res) subset(arr,N,ind+1,sum,res) re=[] subset(arr,N,0,0,re) return re #{ # Driver Code Starts #Initial Template for Python 3 if __name__ == '__main__': T=int(input()) for i in range(T): N = int(input()) arr = [int(x) for x in input().split()] ob = Solution() ans = ob.subsetSums(arr, N) ans.sort() for x in ans: print(x,end=" ") print("") # } Driver Code Ends
class Solution: def subset_sums(self, arr, N): def subset(arr, N, ind, sum, res): if ind == N: res.append(sum) return subset(arr, N, ind + 1, sum + arr[ind], res) subset(arr, N, ind + 1, sum, res) re = [] subset(arr, N, 0, 0, re) return re if __name__ == '__main__': t = int(input()) for i in range(T): n = int(input()) arr = [int(x) for x in input().split()] ob = solution() ans = ob.subsetSums(arr, N) ans.sort() for x in ans: print(x, end=' ') print('')
# https://www.interviewbit.com/problems/merge-intervals/ # Definition for an interval. # class Interval: # def __init__(self, s=0, e=0): # self.start = s # self.end = e class Solution: # @param intervals, a list of Intervals # @param new_interval, a Interval # @return a list of Interval def insert(self, intervals, new_interval): #intervals.append(new_interval) #intervals.sort(key=lambda x: x.start) # sorting not needed if len(intervals) == 0: return [new_interval] # inserting new interval in log(n) time low = 0 high = len(intervals) if new_interval.start <= intervals[0].start: intervals.insert(0, new_interval) elif new_interval.start >= intervals[-1].start: intervals.append(new_interval) else: while low <= high: mid = (low + high) // 2 if intervals[mid].start <= new_interval.start and intervals[mid+1].start > new_interval.start: break elif intervals[mid].start > new_interval.start: high = mid - 1 else: low = mid + 1 intervals.insert(mid+1, new_interval) # merge in O(n) time merged = [intervals[0]] for i in range(1,len(intervals)): if intervals[i].start <= merged[-1].end: merged[-1].end = max(merged[-1].end, intervals[i].end) # merging action else: merged.append(intervals[i]) return merged
class Solution: def insert(self, intervals, new_interval): if len(intervals) == 0: return [new_interval] low = 0 high = len(intervals) if new_interval.start <= intervals[0].start: intervals.insert(0, new_interval) elif new_interval.start >= intervals[-1].start: intervals.append(new_interval) else: while low <= high: mid = (low + high) // 2 if intervals[mid].start <= new_interval.start and intervals[mid + 1].start > new_interval.start: break elif intervals[mid].start > new_interval.start: high = mid - 1 else: low = mid + 1 intervals.insert(mid + 1, new_interval) merged = [intervals[0]] for i in range(1, len(intervals)): if intervals[i].start <= merged[-1].end: merged[-1].end = max(merged[-1].end, intervals[i].end) else: merged.append(intervals[i]) return merged
RELEASE_HUMAN = "104" RELEASE_MOUSE = "104" ASSEMBLY_HUMAN = f"Homo_sapiens.GRCh38.{RELEASE_HUMAN}" ASSEMBLY_MOUSE = f"Mus_musculus.GRCm39.{RELEASE_MOUSE}" CELLTYPES = ["adventitial cell", "endothelial cell", "acinar cell", "pancreatic PP cell", "type B pancreatic cell"] CL_VERSION = "v2021-08-10"
release_human = '104' release_mouse = '104' assembly_human = f'Homo_sapiens.GRCh38.{RELEASE_HUMAN}' assembly_mouse = f'Mus_musculus.GRCm39.{RELEASE_MOUSE}' celltypes = ['adventitial cell', 'endothelial cell', 'acinar cell', 'pancreatic PP cell', 'type B pancreatic cell'] cl_version = 'v2021-08-10'
def subarray_sum_non_negative(lst, target_sum): ''' Simple 2-pointer-window. ''' window_idx_left = 0 window_idx_right = 1 current_sum = lst[0] while True: if current_sum == target_sum: return window_idx_left, window_idx_right - 1 if window_idx_right >= len(lst): break if current_sum < target_sum: current_sum += lst[window_idx_right] window_idx_right += 1 else: current_sum -= lst[window_idx_left] window_idx_left += 1 if window_idx_left == window_idx_right: assert (current_sum == 0) if window_idx_right < len(lst): current_sum += lst[window_idx_right] window_idx_right += 1 return -1, -1 def main(): lst = [5, 1, 3, 4, 2] sum = 4 i, j = subarray_sum_non_negative(lst, sum) print(f'{i}, {j}') if __name__ == "__main__": main()
def subarray_sum_non_negative(lst, target_sum): """ Simple 2-pointer-window. """ window_idx_left = 0 window_idx_right = 1 current_sum = lst[0] while True: if current_sum == target_sum: return (window_idx_left, window_idx_right - 1) if window_idx_right >= len(lst): break if current_sum < target_sum: current_sum += lst[window_idx_right] window_idx_right += 1 else: current_sum -= lst[window_idx_left] window_idx_left += 1 if window_idx_left == window_idx_right: assert current_sum == 0 if window_idx_right < len(lst): current_sum += lst[window_idx_right] window_idx_right += 1 return (-1, -1) def main(): lst = [5, 1, 3, 4, 2] sum = 4 (i, j) = subarray_sum_non_negative(lst, sum) print(f'{i}, {j}') if __name__ == '__main__': main()
### Mock Config ### env = { "name": "mock_env", "render": False, } agent = { "name": "mock_agent", "network": "mock_network", } optim = { "name": "mock_optim", "lr": 0.0001, } train = { "training": True, "load_path": None, "run_step": 100000, "print_period": 1000, "save_period": 10000, "eval_iteration": 10, "record": False, "record_period": None, # distributed setting "update_period": 32, "num_workers": 8, }
env = {'name': 'mock_env', 'render': False} agent = {'name': 'mock_agent', 'network': 'mock_network'} optim = {'name': 'mock_optim', 'lr': 0.0001} train = {'training': True, 'load_path': None, 'run_step': 100000, 'print_period': 1000, 'save_period': 10000, 'eval_iteration': 10, 'record': False, 'record_period': None, 'update_period': 32, 'num_workers': 8}
APIS = [{ 'field_name': 'SymbolDescription', 'field_price': 'AvgPrice', 'field_symbol': 'Symbol', 'name': 'SASE', 'root': 'http://www.sase.ba', 'params': { 'type': 19 }, 'request_type': "POST", 'status': 'FeedServices/HandlerChart.ashx', 'type': 'json' }, { 'field_name': 'Description', 'field_price': 'AvgPrice', 'field_symbol': 'Code', 'name': 'BL berza', 'root': 'https://www.blberza.com', 'params': { 'langId': 1 }, 'request_type': "GET", 'status': 'services/defaultTicker.ashx', 'type': 'json' }]
apis = [{'field_name': 'SymbolDescription', 'field_price': 'AvgPrice', 'field_symbol': 'Symbol', 'name': 'SASE', 'root': 'http://www.sase.ba', 'params': {'type': 19}, 'request_type': 'POST', 'status': 'FeedServices/HandlerChart.ashx', 'type': 'json'}, {'field_name': 'Description', 'field_price': 'AvgPrice', 'field_symbol': 'Code', 'name': 'BL berza', 'root': 'https://www.blberza.com', 'params': {'langId': 1}, 'request_type': 'GET', 'status': 'services/defaultTicker.ashx', 'type': 'json'}]
ah1 = input() ah2 = input() if len(ah1) < len(ah2): print("no") else: print("go")
ah1 = input() ah2 = input() if len(ah1) < len(ah2): print('no') else: print('go')
class Node: def __init__(self, value=None, next_=None): self.value = value self.next_ = next_ class Stack: def __init__(self, top=None): self.top = top def push(self, value): new_node = Node(value, self.top) self.top = new_node def pop(self): if not self.top: raise TypeError remove_node = self.top self.top = remove_node.next_ return remove_node def peek(self): if not self.top: raise TypeError return self.top def isEmpty(self): if not self.top: return True else: return False class Queue: def __init__(self, front=None, back=None): self.front = front self.back = back def enqueue(self, value): current_last = self.back current_last.next_ = Node(value) self.back = current_last.next_ def dequeue(self): if not self.front: raise TypeError remove_node = self.front self.front = remove_node.next_ return remove_node def peek(self): if not self.front: raise TypeError return self.front def isEmpty(self): if not self.front: return True else: return False
class Node: def __init__(self, value=None, next_=None): self.value = value self.next_ = next_ class Stack: def __init__(self, top=None): self.top = top def push(self, value): new_node = node(value, self.top) self.top = new_node def pop(self): if not self.top: raise TypeError remove_node = self.top self.top = remove_node.next_ return remove_node def peek(self): if not self.top: raise TypeError return self.top def is_empty(self): if not self.top: return True else: return False class Queue: def __init__(self, front=None, back=None): self.front = front self.back = back def enqueue(self, value): current_last = self.back current_last.next_ = node(value) self.back = current_last.next_ def dequeue(self): if not self.front: raise TypeError remove_node = self.front self.front = remove_node.next_ return remove_node def peek(self): if not self.front: raise TypeError return self.front def is_empty(self): if not self.front: return True else: return False
#: The AWS access key. Should look something like this:: #: #: AUTH = {'aws_access_key_id': 'XXXXXXXXXXXXXXXXX', #: 'aws_secret_access_key': 'aaaaaaaaaaaa\BBBBBBBBB\dsaddad'} #: AUTH = {} #: The default AWS region to use with the commands where REGION is supported. DEFAULT_REGION = 'eu-west-1' #: Default ssh user if the ``awsfab-ssh-user`` tag is not set EC2_INSTANCE_DEFAULT_SSHUSER = 'root' #: Directories to search for "<key_name>.pem". These paths are filtered through #: os.path.expanduser, so paths like ``~/.ssh/`` works. KEYPAIR_PATH = ['.', '~/.ssh/'] #: Extra SSH arguments. Used with ``ssh`` and ``rsync``. EXTRA_SSH_ARGS = '-o StrictHostKeyChecking=no' #: Configuration for ec2_launch_instance (see the docs) EC2_LAUNCH_CONFIGS = {} #: S3 bucket suffix. This is used for all tasks taking bucketname as parameter. #: The actual bucketname used become:: #: #: S3_BUCKET_PATTERN.format(bucketname=bucketname) #: #: This is typically used to add your domain name or company name to all bucket #: names, but avoid having to type the entire name for each task. Examples:: #: #: S3_BUCKET_PATTERN = '{bucketname}.example.com' #: S3_BUCKET_PATTERN = 'example.com.{bucketname}' #: #: The default, ``"{bucketname}"``, uses the bucket name as provided by the #: user without any changes. #: #: .. seealso:: #: :meth:`awsfabrictasks.s3.api.S3ConnectionWrapper.get_bucket_using_pattern`, #: :func:`awsfabrictasks.s3.api.settingsformat_bucketname` S3_BUCKET_PATTERN = '{bucketname}'
auth = {} default_region = 'eu-west-1' ec2_instance_default_sshuser = 'root' keypair_path = ['.', '~/.ssh/'] extra_ssh_args = '-o StrictHostKeyChecking=no' ec2_launch_configs = {} s3_bucket_pattern = '{bucketname}'
# This software and supporting documentation are distributed by # Institut Federatif de Recherche 49 # CEA/NeuroSpin, Batiment 145, # 91191 Gif-sur-Yvette cedex # France # # This software is governed by the CeCILL-B license under # French law and abiding by the rules of distribution of free software. # You can use, modify and/or redistribute the software under the # terms of the CeCILL-B license as circulated by CEA, CNRS # and INRIA at the following URL "http://www.cecill.info". # # As a counterpart to the access to the source code and rights to copy, # modify and redistribute granted by the license, users are provided only # with a limited warranty and the software's author, the holder of the # economic rights, and the successive licensors have only limited # liability. # # In this respect, the user's attention is drawn to the risks associated # with loading, using, modifying and/or developing or reproducing the # software by the user in light of its specific status of free software, # that may mean that it is complicated to manipulate, and that also # therefore means that it is reserved for developers and experienced # professionals having in-depth computer knowledge. Users are therefore # encouraged to load and test the software's suitability as regards their # requirements in conditions enabling the security of their systems and/or # data to be ensured and, more generally, to use and operate it in the # same conditions as regards security. # # The fact that you are presently reading this means that you have had # knowledge of the CeCILL-B license and that you accept its terms. typessub.update( { 'Moment<Void>' : { 'typecode' : 'Moment_VOID', 'pyFromC' : '', 'CFromPy' : '', 'castFromSip' : '', 'deref' : '*', 'pyderef' : '*', 'address' : '&', 'pyaddress' : '&', 'defScalar' : '', 'new' : 'new Moment<Void>', 'NumType' : 'PyArray_OBJECT', 'PyType' : 'Moment_VOID', 'sipClass' : 'Moment_VOID', 'typeinclude' : \ '#include <aims/moment/moment.h>', 'sipinclude' : '#if SIP_VERSION < 0x040700\n' '#include "sipaimsalgosipMoment_VOID.h"\n' '#endif\n' '#ifndef PYAIMSALGO_MOMENT_VOID_DEFINED\n' '#define PYAIMSALGO_MOMENT_VOID_DEFINED\n' 'inline int pyaimsalgoMoment_VOID_Check( PyObject* o )\n' '{ return sipCanConvertToInstance( o, sipClass_Moment_VOID, SIP_NOT_NONE | SIP_NO_CONVERTORS ); }\n' '#endif', 'module' : 'aimsalgo', 'testPyType' : 'pyaimsalgoMoment_VOID_Check', }, 'Samplable<float,3>' : \ { 'typecode' : 'Samplable_FLOAT_3', 'pyFromC' : '', 'CFromPy' : '', 'castFromSip' : '', 'deref' : '*', 'pyderef' : '*', 'address' : '&', 'pyaddress' : '&', 'defScalar' : '', 'new' : '', 'NumType' : '', 'PyType' : 'Samplable_FLOAT_3', 'sipClass' : 'Samplable_FLOAT_3', 'typeinclude' : \ '#include <aims/resampling/samplable.h>', 'sipinclude' : '#if SIP_VERSION < 0x040700\n' '#include "sipaimsalgosipSamplable_FLOAT_3.h"\n' '#endif\n' '#ifndef PYAIMSALGO_SAMPLABLE_FLOAT_3_DEFINED\n' '#define PYAIMSALGO_SAMPLABLE_FLOAT_3_DEFINED\n' 'inline int pyaimsalgoSamplable_FLOAT_3_Check( PyObject* o )\n' '{ return sipCanConvertToInstance( o, Samplable_FLOAT_3, SIP_NOT_NONE | SIP_NO_CONVERTORS ); }\n' '#endif', 'module' : 'aimsalgo', 'testPyType' : 'pyaimsalgoSamplable_FLOAT_3_Check', }, 'BucketMapSampler<float,3>' : \ { 'typecode' : 'BucketMapSampler_FLOAT_3', 'pyFromC' : '', 'CFromPy' : '', 'castFromSip' : '', 'deref' : '*', 'pyderef' : '*', 'address' : '&', 'pyaddress' : '&', 'defScalar' : '', 'new' : '', 'NumType' : '', 'PyType' : 'BucketMapSampler_FLOAT_3', 'sipClass' : 'BucketMapSampler_FLOAT_3', 'typeinclude' : \ '#include <aims/resampling/bucketmapsampler.h>', 'sipinclude' : '#if SIP_VERSION < 0x040700\n' '#include "sipaimsalgosipBucketMapSampler_FLOAT_3.h"\n' '#endif\n' '#ifndef PYAIMSALGO_BUCKETMAPSAMPLER_FLOAT_3_DEFINED\n' '#define PYAIMSALGO_BUCKETMAPSAMPLER_FLOAT_3_DEFINED\n' 'inline int pyaimsalgoBucketMapSampler_FLOAT_3_Check( PyObject* o )\n' '{ return sipCanConvertToInstance( o, BucketMapSampler_FLOAT_3, SIP_NOT_NONE | SIP_NO_CONVERTORS ); }\n' '#endif', 'module' : 'aimsalgo', 'testPyType' : 'pyaimsalgoBucketMapSampler_FLOAT_3_Check', }, 'GeneralSampler<float,3>' : \ { 'typecode' : 'GeneralSampler_FLOAT_3', 'pyFromC' : '', 'CFromPy' : '', 'castFromSip' : '', 'deref' : '*', 'pyderef' : '*', 'address' : '&', 'pyaddress' : '&', 'defScalar' : '', 'new' : '', 'NumType' : '', 'PyType' : 'GeneralSampler_FLOAT_3', 'sipClass' : 'GeneralSampler_FLOAT_3', 'typeinclude' : \ '#include <aims/resampling/generalsampler.h>', 'sipinclude' : '#if SIP_VERSION < 0x040700\n' '#include "sipaimsalgosipGeneralSampler_FLOAT_3.h"\n' '#endif\n' '#ifndef PYAIMSALGO_GENERALSAMPLER_FLOAT_3_DEFINED\n' '#define PYAIMSALGO_GENERALSAMPLER_FLOAT_3_DEFINED\n' 'inline int pyaimsalgoGeneralSampler_FLOAT_3_Check( PyObject* o )\n' '{ return sipCanConvertToInstance( o, GeneralSampler_FLOAT_3, SIP_NOT_NONE | SIP_NO_CONVERTORS ); }\n' '#endif', 'module' : 'aimsalgo', 'testPyType' : 'pyaimsalgoGeneralSampler_FLOAT_3_Check', }, 'Polynomial<float,3>' : \ { 'typecode' : 'Polynomial_FLOAT_3', 'pyFromC' : '', 'CFromPy' : '', 'castFromSip' : '', 'deref' : '*', 'pyderef' : '*', 'address' : '&', 'pyaddress' : '&', 'defScalar' : '', 'new' : '', 'NumType' : '', 'PyType' : 'Polynomial_FLOAT_3', 'sipClass' : 'Polynomial_FLOAT_3', 'typeinclude' : \ '#include <aims/resampling/polynomial.h>', 'sipinclude' : '#if SIP_VERSION < 0x040700\n' '#include "sipaimsalgosipPolynomial_FLOAT_3.h"\n' '#endif\n' '#ifndef PYAIMSALGO_POLYNOMIAL_FLOAT_3_DEFINED\n' '#define PYAIMSALGO_POLYNOMIAL_FLOAT_3_DEFINED\n' 'inline int pyaimsalgoPolynomial_FLOAT_3_Check( PyObject* o )\n' '{ return sipCanConvertToInstance( o, Polynomial_FLOAT_3, SIP_NOT_NONE | SIP_NO_CONVERTORS ); }\n' '#endif', 'module' : 'aimsalgo', 'testPyType' : 'pyaimsalgoPolynomial_FLOAT_3_Check', }, 'Resampler<int16_t>' : \ { 'typecode' : 'Resampler_S16', 'pyFromC' : '', 'CFromPy' : '', 'castFromSip' : '', 'deref' : '*', 'pyderef' : '*', 'address' : '&', 'pyaddress' : '&', 'defScalar' : '', 'new' : '', 'NumType' : '', 'PyType' : 'Resampler_S16', 'sipClass' : 'Resampler_S16', 'typeinclude' : \ '#include <aims/resampling/resampler.h>', 'sipinclude' : '#if SIP_VERSION < 0x040700\n' '#include "sipaimsalgosipResampler_S16.h"\n' '#endif\n' '#ifndef PYAIMSALGO_RESAMPLER_S16_DEFINED\n' '#define PYAIMSALGO_RESAMPLER_S16_DEFINED\n' 'inline int pyaimsalgoResampler_S16_Check( PyObject* o )\n' '{ return sipCanConvertToInstance( o, Resampler_S16, SIP_NOT_NONE | SIP_NO_CONVERTORS ); }\n' '#endif', 'module' : 'aimsalgo', 'testPyType' : 'pyaimsalgoResampler_S16_Check', }, 'SplineResampler<int16_t>' : \ { 'typecode' : 'SplineResampler_S16', 'pyFromC' : '', 'CFromPy' : '', 'castFromSip' : '', 'deref' : '*', 'pyderef' : '*', 'address' : '&', 'pyaddress' : '&', 'defScalar' : '', 'new' : '', 'NumType' : '', 'PyType' : 'SplineResampler_S16', 'sipClass' : 'SplineResampler_S16', 'typeinclude' : \ '#include <aims/resampling/splineresampler.h>', 'sipinclude' : '#if SIP_VERSION < 0x040700\n' '#include "sipaimsalgosipSplineResampler_S16.h"\n' '#endif\n' '#ifndef PYAIMSALGO_SPLINERESAMPLER_S16_DEFINED\n' '#define PYAIMSALGO_SPLINERESAMPLER_S16_DEFINED\n' 'inline int pyaimsalgoSplineResampler_S16_Check( PyObject* o )\n' '{ return sipCanConvertToInstance( o, SplineResampler_S16, SIP_NOT_NONE | SIP_NO_CONVERTORS ); }\n' '#endif', 'module' : 'aimsalgo', 'testPyType' : 'pyaimsalgoSplineResampler_S16_Check', }, 'MaskLinearResampler<int16_t>' : \ { 'typecode' : 'MaskLinearResampler_S16', 'pyFromC' : '', 'CFromPy' : '', 'castFromSip' : '', 'deref' : '*', 'pyderef' : '*', 'address' : '&', 'pyaddress' : '&', 'defScalar' : '', 'new' : '', 'NumType' : '', 'PyType' : 'MaskLinearResampler_S16', 'sipClass' : 'MaskLinearResampler_S16', 'typeinclude' : \ '#include <aims/resampling/masklinresampler.h>', 'sipinclude' : '#if SIP_VERSION < 0x040700\n' '#include "sipaimsalgosipMaskLinearResampler_S16.h"\n' '#endif\n' '#ifndef PYAIMSALGO_MASKLINEARRESAMPLER_S16_DEFINED\n' '#define PYAIMSALGO_MASKLINEARRESAMPLER_S16_DEFINED\n' 'inline int pyaimsalgoMaskLinearResampler_S16_Check( PyObject* o )\n' '{ return sipCanConvertToInstance( o, MaskLinearResampler_S16, SIP_NOT_NONE | SIP_NO_CONVERTORS ); }\n' '#endif', 'module' : 'aimsalgo', 'testPyType' : 'pyaimsalgoMaskLinearResampler_S16_Check', }, 'NearestNeighborResampler<int16_t>' : \ { 'typecode' : 'NearestNeighborResampler_S16', 'pyFromC' : '', 'CFromPy' : '', 'castFromSip' : '', 'deref' : '*', 'pyderef' : '*', 'address' : '&', 'pyaddress' : '&', 'defScalar' : '', 'new' : '', 'NumType' : '', 'PyType' : 'NearestNeighborResampler_S16', 'sipClass' : 'NearestNeighborResampler_S16', 'typeinclude' : \ '#include <aims/resampling/nearestneighborresampler.h>', 'sipinclude' : '#if SIP_VERSION < 0x040700\n' '#include "sipaimsalgosipNearestNeighborResampler_S16.h"\n' '#endif\n' '#ifndef PYAIMSALGO_NEARESTNEIGHBORRESAMPLER_S16_DEFINED\n' '#define PYAIMSALGO_NEARESTNEIGHBORRESAMPLER_S16_DEFINED\n' 'inline int pyaimsalgoNearestNeighborResampler_S16_Check( PyObject* o )\n' '{ return sipCanConvertToInstance( o, NearestNeighborResampler_S16, SIP_NOT_NONE | SIP_NO_CONVERTORS ); }\n' '#endif', 'module' : 'aimsalgo', 'testPyType' : 'pyaimsalgoNearestNeighborResampler_S16_Check', }, 'CubicResampler<int16_t>' : \ { 'typecode' : 'CubicResampler_S16', 'pyFromC' : '', 'CFromPy' : '', 'castFromSip' : '', 'deref' : '*', 'pyderef' : '*', 'address' : '&', 'pyaddress' : '&', 'defScalar' : '', 'new' : '', 'NumType' : '', 'PyType' : 'CubicResampler_S16', 'sipClass' : 'CubicResampler_S16', 'typeinclude' : \ '#include <aims/resampling/cubicresampler.h>', 'sipinclude' : '#if SIP_VERSION < 0x040700\n' '#include "sipaimsalgosipCubicResampler_S16.h"\n' '#endif\n' '#ifndef PYAIMSALGO_CUBICRESAMPLER_S16_DEFINED\n' '#define PYAIMSALGO_CUBICRESAMPLER_S16_DEFINED\n' 'inline int pyaimsalgoCubicResampler_S16_Check( PyObject* o )\n' '{ return sipCanConvertToInstance( o, CubicResampler_S16, SIP_NOT_NONE | SIP_NO_CONVERTORS ); }\n' '#endif', 'module' : 'aimsalgo', 'testPyType' : 'pyaimsalgoCubicResampler_S16_Check', }, 'QuinticResampler<int16_t>' : \ { 'typecode' : 'QuinticResampler_S16', 'pyFromC' : '', 'CFromPy' : '', 'castFromSip' : '', 'deref' : '*', 'pyderef' : '*', 'address' : '&', 'pyaddress' : '&', 'defScalar' : '', 'new' : '', 'NumType' : '', 'PyType' : 'QuinticResampler_S16', 'sipClass' : 'QuinticResampler_S16', 'typeinclude' : \ '#include <aims/resampling/quinticresampler.h>', 'sipinclude' : '#if SIP_VERSION < 0x040700\n' '#include "sipaimsalgosipQuinticResampler_S16.h"\n' '#endif\n' '#ifndef PYAIMSALGO_QUINTICRESAMPLER_S16_DEFINED\n' '#define PYAIMSALGO_QUINTICRESAMPLER_S16_DEFINED\n' 'inline int pyaimsalgoQuinticResampler_S16_Check( PyObject* o )\n' '{ return sipCanConvertToInstance( o, QuinticResampler_S16, SIP_NOT_NONE | SIP_NO_CONVERTORS ); }\n' '#endif', 'module' : 'aimsalgo', 'testPyType' : 'pyaimsalgoQuinticResampler_S16_Check', }, 'SixthOrderResampler<int16_t>' : \ { 'typecode' : 'SixthOrderResampler_S16', 'pyFromC' : '', 'CFromPy' : '', 'castFromSip' : '', 'deref' : '*', 'pyderef' : '*', 'address' : '&', 'pyaddress' : '&', 'defScalar' : '', 'new' : '', 'NumType' : '', 'PyType' : 'SixthOrderResampler_S16', 'sipClass' : 'SixthOrderResampler_S16', 'typeinclude' : \ '#include <aims/resampling/sixthorderresampler.h>', 'sipinclude' : '#if SIP_VERSION < 0x040700\n' '#include "sipaimsalgosipSixthOrderResampler_S16.h"\n' '#endif\n' '#ifndef PYAIMSALGO_SIXTHORDERRESAMPLER_S16_DEFINED\n' '#define PYAIMSALGO_SIXTHORDERRESAMPLER_S16_DEFINED\n' 'inline int pyaimsalgoSixthOrderResampler_S16_Check( PyObject* o )\n' '{ return sipCanConvertToInstance( o, SixthOrderResampler_S16, SIP_NOT_NONE | SIP_NO_CONVERTORS ); }\n' '#endif', 'module' : 'aimsalgo', 'testPyType' : 'pyaimsalgoSixthOrderResampler_S16_Check', }, 'SeventhOrderResampler<int16_t>' : \ { 'typecode' : 'SeventhOrderResampler_S16', 'pyFromC' : '', 'CFromPy' : '', 'castFromSip' : '', 'deref' : '*', 'pyderef' : '*', 'address' : '&', 'pyaddress' : '&', 'defScalar' : '', 'new' : '', 'NumType' : '', 'PyType' : 'SeventhOrderResampler_S16', 'sipClass' : 'SeventhOrderResampler_S16', 'typeinclude' : \ '#include <aims/resampling/seventhorderresampler.h>', 'sipinclude' : '#if SIP_VERSION < 0x040700\n' '#include "sipaimsalgosipSeventhOrderResampler_S16.h"\n' '#endif\n' '#ifndef PYAIMSALGO_SEVENTHORDERRESAMPLER_S16_DEFINED\n' '#define PYAIMSALGO_SEVENTHORDERRESAMPLER_S16_DEFINED\n' 'inline int pyaimsalgoSeventhOrderResampler_S16_Check( PyObject* o )\n' '{ return sipCanConvertToInstance( o, SeventhOrderResampler_S16, SIP_NOT_NONE | SIP_NO_CONVERTORS ); }\n' '#endif', 'module' : 'aimsalgo', 'testPyType' : 'pyaimsalgoSeventhOrderResampler_S16_Check', }, 'LinearResampler<int16_t>' : \ { 'typecode' : 'LinearResampler_S16', 'pyFromC' : '', 'CFromPy' : '', 'castFromSip' : '', 'deref' : '*', 'pyderef' : '*', 'address' : '&', 'pyaddress' : '&', 'defScalar' : '', 'new' : '', 'NumType' : '', 'PyType' : 'LinearResampler_S16', 'sipClass' : 'LinearResampler_S16', 'typeinclude' : \ '#include <aims/resampling/linearresampler.h>', 'sipinclude' : '#if SIP_VERSION < 0x040700\n' '#include "sipaimsalgosipLinearResampler_S16.h"\n' '#endif\n' '#ifndef PYAIMSALGO_LINEARRESAMPLER_S16_DEFINED\n' '#define PYAIMSALGO_LINEARRESAMPLER_S16_DEFINED\n' 'inline int pyaimsalgoLinearResampler_S16_Check( PyObject* o )\n' '{ return sipCanConvertToInstance( o, LinearResampler_S16, SIP_NOT_NONE | SIP_NO_CONVERTORS ); }\n' '#endif', 'module' : 'aimsalgo', 'testPyType' : 'pyaimsalgoLinearResampler_S16_Check', }, 'ResamplerFactory<int16_t>' : \ { 'typecode' : 'ResamplerFactory_S16', 'pyFromC' : '', 'CFromPy' : '', 'castFromSip' : '', 'deref' : '*', 'pyderef' : '*', 'address' : '&', 'pyaddress' : '&', 'defScalar' : '', 'new' : '', 'NumType' : '', 'PyType' : 'ResamplerFactory_S16', 'sipClass' : 'ResamplerFactory_S16', 'typeinclude' : \ '#include <aims/resampling/resamplerfactory.h>', 'sipinclude' : '#if SIP_VERSION < 0x040700\n' '#include "sipaimsalgosipResamplerFactory_S16.h"\n' '#endif\n' '#ifndef PYAIMSALGO_RESAMPLERFACTORY_S16_DEFINED\n' '#define PYAIMSALGO_RESAMPLERFACTORY_S16_DEFINED\n' 'inline int pyaimsalgoResamplerFactory_S16_Check( PyObject* o )\n' '{ return sipCanConvertToInstance( o, ResamplerFactory_S16, SIP_NOT_NONE | SIP_NO_CONVERTORS ); }\n' '#endif', 'module' : 'aimsalgo', 'testPyType' : 'pyaimsalgoResamplerFactory_S16_Check', }, 'aims::FfdTransformation': classInAimsNamespace( 'aims/registration/ffd.h', 'FfdTransformation'), 'aims::SplineFfd': classInAimsNamespace( 'aims/registration/ffd.h', 'SplineFfd'), 'aims::TrilinearFfd': classInAimsNamespace( 'aims/registration/ffd.h', 'TrilinearFfd'), 'aims::GeometricProperties': classInAimsNamespace( 'aims/mesh/geometric.h', 'GeometricProperties'), } ) completeTypesSub( typessub )
typessub.update({'Moment<Void>': {'typecode': 'Moment_VOID', 'pyFromC': '', 'CFromPy': '', 'castFromSip': '', 'deref': '*', 'pyderef': '*', 'address': '&', 'pyaddress': '&', 'defScalar': '', 'new': 'new Moment<Void>', 'NumType': 'PyArray_OBJECT', 'PyType': 'Moment_VOID', 'sipClass': 'Moment_VOID', 'typeinclude': '#include <aims/moment/moment.h>', 'sipinclude': '#if SIP_VERSION < 0x040700\n#include "sipaimsalgosipMoment_VOID.h"\n#endif\n#ifndef PYAIMSALGO_MOMENT_VOID_DEFINED\n#define PYAIMSALGO_MOMENT_VOID_DEFINED\ninline int pyaimsalgoMoment_VOID_Check( PyObject* o )\n{ return sipCanConvertToInstance( o, sipClass_Moment_VOID, SIP_NOT_NONE | SIP_NO_CONVERTORS ); }\n#endif', 'module': 'aimsalgo', 'testPyType': 'pyaimsalgoMoment_VOID_Check'}, 'Samplable<float,3>': {'typecode': 'Samplable_FLOAT_3', 'pyFromC': '', 'CFromPy': '', 'castFromSip': '', 'deref': '*', 'pyderef': '*', 'address': '&', 'pyaddress': '&', 'defScalar': '', 'new': '', 'NumType': '', 'PyType': 'Samplable_FLOAT_3', 'sipClass': 'Samplable_FLOAT_3', 'typeinclude': '#include <aims/resampling/samplable.h>', 'sipinclude': '#if SIP_VERSION < 0x040700\n#include "sipaimsalgosipSamplable_FLOAT_3.h"\n#endif\n#ifndef PYAIMSALGO_SAMPLABLE_FLOAT_3_DEFINED\n#define PYAIMSALGO_SAMPLABLE_FLOAT_3_DEFINED\ninline int pyaimsalgoSamplable_FLOAT_3_Check( PyObject* o )\n{ return sipCanConvertToInstance( o, Samplable_FLOAT_3, SIP_NOT_NONE | SIP_NO_CONVERTORS ); }\n#endif', 'module': 'aimsalgo', 'testPyType': 'pyaimsalgoSamplable_FLOAT_3_Check'}, 'BucketMapSampler<float,3>': {'typecode': 'BucketMapSampler_FLOAT_3', 'pyFromC': '', 'CFromPy': '', 'castFromSip': '', 'deref': '*', 'pyderef': '*', 'address': '&', 'pyaddress': '&', 'defScalar': '', 'new': '', 'NumType': '', 'PyType': 'BucketMapSampler_FLOAT_3', 'sipClass': 'BucketMapSampler_FLOAT_3', 'typeinclude': '#include <aims/resampling/bucketmapsampler.h>', 'sipinclude': '#if SIP_VERSION < 0x040700\n#include "sipaimsalgosipBucketMapSampler_FLOAT_3.h"\n#endif\n#ifndef PYAIMSALGO_BUCKETMAPSAMPLER_FLOAT_3_DEFINED\n#define PYAIMSALGO_BUCKETMAPSAMPLER_FLOAT_3_DEFINED\ninline int pyaimsalgoBucketMapSampler_FLOAT_3_Check( PyObject* o )\n{ return sipCanConvertToInstance( o, BucketMapSampler_FLOAT_3, SIP_NOT_NONE | SIP_NO_CONVERTORS ); }\n#endif', 'module': 'aimsalgo', 'testPyType': 'pyaimsalgoBucketMapSampler_FLOAT_3_Check'}, 'GeneralSampler<float,3>': {'typecode': 'GeneralSampler_FLOAT_3', 'pyFromC': '', 'CFromPy': '', 'castFromSip': '', 'deref': '*', 'pyderef': '*', 'address': '&', 'pyaddress': '&', 'defScalar': '', 'new': '', 'NumType': '', 'PyType': 'GeneralSampler_FLOAT_3', 'sipClass': 'GeneralSampler_FLOAT_3', 'typeinclude': '#include <aims/resampling/generalsampler.h>', 'sipinclude': '#if SIP_VERSION < 0x040700\n#include "sipaimsalgosipGeneralSampler_FLOAT_3.h"\n#endif\n#ifndef PYAIMSALGO_GENERALSAMPLER_FLOAT_3_DEFINED\n#define PYAIMSALGO_GENERALSAMPLER_FLOAT_3_DEFINED\ninline int pyaimsalgoGeneralSampler_FLOAT_3_Check( PyObject* o )\n{ return sipCanConvertToInstance( o, GeneralSampler_FLOAT_3, SIP_NOT_NONE | SIP_NO_CONVERTORS ); }\n#endif', 'module': 'aimsalgo', 'testPyType': 'pyaimsalgoGeneralSampler_FLOAT_3_Check'}, 'Polynomial<float,3>': {'typecode': 'Polynomial_FLOAT_3', 'pyFromC': '', 'CFromPy': '', 'castFromSip': '', 'deref': '*', 'pyderef': '*', 'address': '&', 'pyaddress': '&', 'defScalar': '', 'new': '', 'NumType': '', 'PyType': 'Polynomial_FLOAT_3', 'sipClass': 'Polynomial_FLOAT_3', 'typeinclude': '#include <aims/resampling/polynomial.h>', 'sipinclude': '#if SIP_VERSION < 0x040700\n#include "sipaimsalgosipPolynomial_FLOAT_3.h"\n#endif\n#ifndef PYAIMSALGO_POLYNOMIAL_FLOAT_3_DEFINED\n#define PYAIMSALGO_POLYNOMIAL_FLOAT_3_DEFINED\ninline int pyaimsalgoPolynomial_FLOAT_3_Check( PyObject* o )\n{ return sipCanConvertToInstance( o, Polynomial_FLOAT_3, SIP_NOT_NONE | SIP_NO_CONVERTORS ); }\n#endif', 'module': 'aimsalgo', 'testPyType': 'pyaimsalgoPolynomial_FLOAT_3_Check'}, 'Resampler<int16_t>': {'typecode': 'Resampler_S16', 'pyFromC': '', 'CFromPy': '', 'castFromSip': '', 'deref': '*', 'pyderef': '*', 'address': '&', 'pyaddress': '&', 'defScalar': '', 'new': '', 'NumType': '', 'PyType': 'Resampler_S16', 'sipClass': 'Resampler_S16', 'typeinclude': '#include <aims/resampling/resampler.h>', 'sipinclude': '#if SIP_VERSION < 0x040700\n#include "sipaimsalgosipResampler_S16.h"\n#endif\n#ifndef PYAIMSALGO_RESAMPLER_S16_DEFINED\n#define PYAIMSALGO_RESAMPLER_S16_DEFINED\ninline int pyaimsalgoResampler_S16_Check( PyObject* o )\n{ return sipCanConvertToInstance( o, Resampler_S16, SIP_NOT_NONE | SIP_NO_CONVERTORS ); }\n#endif', 'module': 'aimsalgo', 'testPyType': 'pyaimsalgoResampler_S16_Check'}, 'SplineResampler<int16_t>': {'typecode': 'SplineResampler_S16', 'pyFromC': '', 'CFromPy': '', 'castFromSip': '', 'deref': '*', 'pyderef': '*', 'address': '&', 'pyaddress': '&', 'defScalar': '', 'new': '', 'NumType': '', 'PyType': 'SplineResampler_S16', 'sipClass': 'SplineResampler_S16', 'typeinclude': '#include <aims/resampling/splineresampler.h>', 'sipinclude': '#if SIP_VERSION < 0x040700\n#include "sipaimsalgosipSplineResampler_S16.h"\n#endif\n#ifndef PYAIMSALGO_SPLINERESAMPLER_S16_DEFINED\n#define PYAIMSALGO_SPLINERESAMPLER_S16_DEFINED\ninline int pyaimsalgoSplineResampler_S16_Check( PyObject* o )\n{ return sipCanConvertToInstance( o, SplineResampler_S16, SIP_NOT_NONE | SIP_NO_CONVERTORS ); }\n#endif', 'module': 'aimsalgo', 'testPyType': 'pyaimsalgoSplineResampler_S16_Check'}, 'MaskLinearResampler<int16_t>': {'typecode': 'MaskLinearResampler_S16', 'pyFromC': '', 'CFromPy': '', 'castFromSip': '', 'deref': '*', 'pyderef': '*', 'address': '&', 'pyaddress': '&', 'defScalar': '', 'new': '', 'NumType': '', 'PyType': 'MaskLinearResampler_S16', 'sipClass': 'MaskLinearResampler_S16', 'typeinclude': '#include <aims/resampling/masklinresampler.h>', 'sipinclude': '#if SIP_VERSION < 0x040700\n#include "sipaimsalgosipMaskLinearResampler_S16.h"\n#endif\n#ifndef PYAIMSALGO_MASKLINEARRESAMPLER_S16_DEFINED\n#define PYAIMSALGO_MASKLINEARRESAMPLER_S16_DEFINED\ninline int pyaimsalgoMaskLinearResampler_S16_Check( PyObject* o )\n{ return sipCanConvertToInstance( o, MaskLinearResampler_S16, SIP_NOT_NONE | SIP_NO_CONVERTORS ); }\n#endif', 'module': 'aimsalgo', 'testPyType': 'pyaimsalgoMaskLinearResampler_S16_Check'}, 'NearestNeighborResampler<int16_t>': {'typecode': 'NearestNeighborResampler_S16', 'pyFromC': '', 'CFromPy': '', 'castFromSip': '', 'deref': '*', 'pyderef': '*', 'address': '&', 'pyaddress': '&', 'defScalar': '', 'new': '', 'NumType': '', 'PyType': 'NearestNeighborResampler_S16', 'sipClass': 'NearestNeighborResampler_S16', 'typeinclude': '#include <aims/resampling/nearestneighborresampler.h>', 'sipinclude': '#if SIP_VERSION < 0x040700\n#include "sipaimsalgosipNearestNeighborResampler_S16.h"\n#endif\n#ifndef PYAIMSALGO_NEARESTNEIGHBORRESAMPLER_S16_DEFINED\n#define PYAIMSALGO_NEARESTNEIGHBORRESAMPLER_S16_DEFINED\ninline int pyaimsalgoNearestNeighborResampler_S16_Check( PyObject* o )\n{ return sipCanConvertToInstance( o, NearestNeighborResampler_S16, SIP_NOT_NONE | SIP_NO_CONVERTORS ); }\n#endif', 'module': 'aimsalgo', 'testPyType': 'pyaimsalgoNearestNeighborResampler_S16_Check'}, 'CubicResampler<int16_t>': {'typecode': 'CubicResampler_S16', 'pyFromC': '', 'CFromPy': '', 'castFromSip': '', 'deref': '*', 'pyderef': '*', 'address': '&', 'pyaddress': '&', 'defScalar': '', 'new': '', 'NumType': '', 'PyType': 'CubicResampler_S16', 'sipClass': 'CubicResampler_S16', 'typeinclude': '#include <aims/resampling/cubicresampler.h>', 'sipinclude': '#if SIP_VERSION < 0x040700\n#include "sipaimsalgosipCubicResampler_S16.h"\n#endif\n#ifndef PYAIMSALGO_CUBICRESAMPLER_S16_DEFINED\n#define PYAIMSALGO_CUBICRESAMPLER_S16_DEFINED\ninline int pyaimsalgoCubicResampler_S16_Check( PyObject* o )\n{ return sipCanConvertToInstance( o, CubicResampler_S16, SIP_NOT_NONE | SIP_NO_CONVERTORS ); }\n#endif', 'module': 'aimsalgo', 'testPyType': 'pyaimsalgoCubicResampler_S16_Check'}, 'QuinticResampler<int16_t>': {'typecode': 'QuinticResampler_S16', 'pyFromC': '', 'CFromPy': '', 'castFromSip': '', 'deref': '*', 'pyderef': '*', 'address': '&', 'pyaddress': '&', 'defScalar': '', 'new': '', 'NumType': '', 'PyType': 'QuinticResampler_S16', 'sipClass': 'QuinticResampler_S16', 'typeinclude': '#include <aims/resampling/quinticresampler.h>', 'sipinclude': '#if SIP_VERSION < 0x040700\n#include "sipaimsalgosipQuinticResampler_S16.h"\n#endif\n#ifndef PYAIMSALGO_QUINTICRESAMPLER_S16_DEFINED\n#define PYAIMSALGO_QUINTICRESAMPLER_S16_DEFINED\ninline int pyaimsalgoQuinticResampler_S16_Check( PyObject* o )\n{ return sipCanConvertToInstance( o, QuinticResampler_S16, SIP_NOT_NONE | SIP_NO_CONVERTORS ); }\n#endif', 'module': 'aimsalgo', 'testPyType': 'pyaimsalgoQuinticResampler_S16_Check'}, 'SixthOrderResampler<int16_t>': {'typecode': 'SixthOrderResampler_S16', 'pyFromC': '', 'CFromPy': '', 'castFromSip': '', 'deref': '*', 'pyderef': '*', 'address': '&', 'pyaddress': '&', 'defScalar': '', 'new': '', 'NumType': '', 'PyType': 'SixthOrderResampler_S16', 'sipClass': 'SixthOrderResampler_S16', 'typeinclude': '#include <aims/resampling/sixthorderresampler.h>', 'sipinclude': '#if SIP_VERSION < 0x040700\n#include "sipaimsalgosipSixthOrderResampler_S16.h"\n#endif\n#ifndef PYAIMSALGO_SIXTHORDERRESAMPLER_S16_DEFINED\n#define PYAIMSALGO_SIXTHORDERRESAMPLER_S16_DEFINED\ninline int pyaimsalgoSixthOrderResampler_S16_Check( PyObject* o )\n{ return sipCanConvertToInstance( o, SixthOrderResampler_S16, SIP_NOT_NONE | SIP_NO_CONVERTORS ); }\n#endif', 'module': 'aimsalgo', 'testPyType': 'pyaimsalgoSixthOrderResampler_S16_Check'}, 'SeventhOrderResampler<int16_t>': {'typecode': 'SeventhOrderResampler_S16', 'pyFromC': '', 'CFromPy': '', 'castFromSip': '', 'deref': '*', 'pyderef': '*', 'address': '&', 'pyaddress': '&', 'defScalar': '', 'new': '', 'NumType': '', 'PyType': 'SeventhOrderResampler_S16', 'sipClass': 'SeventhOrderResampler_S16', 'typeinclude': '#include <aims/resampling/seventhorderresampler.h>', 'sipinclude': '#if SIP_VERSION < 0x040700\n#include "sipaimsalgosipSeventhOrderResampler_S16.h"\n#endif\n#ifndef PYAIMSALGO_SEVENTHORDERRESAMPLER_S16_DEFINED\n#define PYAIMSALGO_SEVENTHORDERRESAMPLER_S16_DEFINED\ninline int pyaimsalgoSeventhOrderResampler_S16_Check( PyObject* o )\n{ return sipCanConvertToInstance( o, SeventhOrderResampler_S16, SIP_NOT_NONE | SIP_NO_CONVERTORS ); }\n#endif', 'module': 'aimsalgo', 'testPyType': 'pyaimsalgoSeventhOrderResampler_S16_Check'}, 'LinearResampler<int16_t>': {'typecode': 'LinearResampler_S16', 'pyFromC': '', 'CFromPy': '', 'castFromSip': '', 'deref': '*', 'pyderef': '*', 'address': '&', 'pyaddress': '&', 'defScalar': '', 'new': '', 'NumType': '', 'PyType': 'LinearResampler_S16', 'sipClass': 'LinearResampler_S16', 'typeinclude': '#include <aims/resampling/linearresampler.h>', 'sipinclude': '#if SIP_VERSION < 0x040700\n#include "sipaimsalgosipLinearResampler_S16.h"\n#endif\n#ifndef PYAIMSALGO_LINEARRESAMPLER_S16_DEFINED\n#define PYAIMSALGO_LINEARRESAMPLER_S16_DEFINED\ninline int pyaimsalgoLinearResampler_S16_Check( PyObject* o )\n{ return sipCanConvertToInstance( o, LinearResampler_S16, SIP_NOT_NONE | SIP_NO_CONVERTORS ); }\n#endif', 'module': 'aimsalgo', 'testPyType': 'pyaimsalgoLinearResampler_S16_Check'}, 'ResamplerFactory<int16_t>': {'typecode': 'ResamplerFactory_S16', 'pyFromC': '', 'CFromPy': '', 'castFromSip': '', 'deref': '*', 'pyderef': '*', 'address': '&', 'pyaddress': '&', 'defScalar': '', 'new': '', 'NumType': '', 'PyType': 'ResamplerFactory_S16', 'sipClass': 'ResamplerFactory_S16', 'typeinclude': '#include <aims/resampling/resamplerfactory.h>', 'sipinclude': '#if SIP_VERSION < 0x040700\n#include "sipaimsalgosipResamplerFactory_S16.h"\n#endif\n#ifndef PYAIMSALGO_RESAMPLERFACTORY_S16_DEFINED\n#define PYAIMSALGO_RESAMPLERFACTORY_S16_DEFINED\ninline int pyaimsalgoResamplerFactory_S16_Check( PyObject* o )\n{ return sipCanConvertToInstance( o, ResamplerFactory_S16, SIP_NOT_NONE | SIP_NO_CONVERTORS ); }\n#endif', 'module': 'aimsalgo', 'testPyType': 'pyaimsalgoResamplerFactory_S16_Check'}, 'aims::FfdTransformation': class_in_aims_namespace('aims/registration/ffd.h', 'FfdTransformation'), 'aims::SplineFfd': class_in_aims_namespace('aims/registration/ffd.h', 'SplineFfd'), 'aims::TrilinearFfd': class_in_aims_namespace('aims/registration/ffd.h', 'TrilinearFfd'), 'aims::GeometricProperties': class_in_aims_namespace('aims/mesh/geometric.h', 'GeometricProperties')}) complete_types_sub(typessub)
cups = [True, False, False] steps = list(input()) for c in list(steps): if c == 'A': _ = cups[0] cups[0] = cups[1] cups[1] = _ elif c == 'B': _ = cups[1] cups[1] = cups[2] cups[2] = _ else: _ = cups[0] cups[0] = cups[2] cups[2] = _ print(cups.index(True)+1)
cups = [True, False, False] steps = list(input()) for c in list(steps): if c == 'A': _ = cups[0] cups[0] = cups[1] cups[1] = _ elif c == 'B': _ = cups[1] cups[1] = cups[2] cups[2] = _ else: _ = cups[0] cups[0] = cups[2] cups[2] = _ print(cups.index(True) + 1)
PASSWORD = "Lq#QHMnpyk6Y+.]" def check(selenium_obj, host): current_host = f"http://na2.{host}/" selenium_obj.get(current_host) selenium_obj.add_cookie({'name': 'token', 'value': PASSWORD, 'path': '/'})
password = 'Lq#QHMnpyk6Y+.]' def check(selenium_obj, host): current_host = f'http://na2.{host}/' selenium_obj.get(current_host) selenium_obj.add_cookie({'name': 'token', 'value': PASSWORD, 'path': '/'})
LEFT_PADDING = ' ' # using spaces instead of tabs ('/t') creates more consistent results #DIGRAPH_START = 'digraph G { \n' DIGRAPH_END = ' }' # todo: fix padding for sub-graphs class Graph_Dot_Render: def __init__(self, graph, sub_graphs, graph_name='G', graph_type='digraph'): self.graph_name = graph_name self.graph_type = graph_type self.dot_code = "" self.extra_dot_code = "" self.label = "" self.node_params = {} self.concentrate = None self.size = None self.rank_dir = None self.rank_sep = None self.ranks = {} self.graph = graph self.sub_graphs = sub_graphs pass #self.graph_dot = graph_dot # helpers def join_params(self,params): return ' '.join([f'{key}="{value}"' for key, value in params.items()]) def parse_into_params(self, source, skip_names): params = "" for param_name,param_value in source.items(): if param_name in skip_names : continue if param_value: params += f'{param_name}="{param_value}" ' return params def edge_link(self, edge_node): # add support for record shape linking in edges if ':' in edge_node: items = edge_node.split(':') # todo: refactor how this is done return f'"{items[0]}":"{items[1]}"' else: return f'"{edge_node}"' # render main def render(self): self.dot_code = f'{self.graph_type} {self.graph_name} {{' ( self.add_rand_dir() .add_rank_sep() .add_size() .add_label() .add_node_params() .add_concentrate() .add_sub_graphs() ) self.add_line().add_comment ('###### Nodes #######') for node in self.graph.nodes(): key = node.get('key') label = node.get('value') or key params = self.parse_into_params(node, ['key']) if params: self.add_line(f'"{key}" [{params}]') else: self.add_line(f'"{key}" ["label"="{label}"]') self.add_line().add_comment('###### Edges #######') for edge in self.graph.edges(): from_key = self.edge_link(edge.get('from')) to_key = self.edge_link(edge.get('to')) params = self.parse_into_params(edge, ['from','to']) self.add_line(f' {from_key} -> {to_key} [{params}]') (self.add_ranks() .add_extra_dot_code()) self.dot_code += DIGRAPH_END return self.dot_code def add_sub_graphs(self): for sub_graph in self.sub_graphs: self.add_line().add_line(sub_graph.render.render()) return self # render methods def add_concentrate(self): if self.concentrate: self.add_line('concentrate=true') return self def add_extra_dot_code(self): if self.extra_dot_code: self.dot_code += self.extra_dot_code return self def add_label(self): if self.label: self.add_line(f'label="{self.label}";') \ .add_line('labelloc = "t"') # default to put label at the top return self def add_line(self, value=''): # todo: refactor all add_*** methods into separate 'build' class self.dot_code += f'{LEFT_PADDING}{value} \n' return self def add_size(self): if self.size: self.add_line(f'size = "{self.size},{self.size}"') return self def add_rand_dir(self): if self.rank_dir: self.add_line(f'rankdir={self.rank_dir};') return self def add_rank_sep(self): if self.rank_sep: self.add_line(f'ranksep={self.rank_sep};') return self def add_comment(self, value): return self.add_line(f'#{value} \n') def add_node_params(self): if self.node_params: self.add_line(f'node [{self.join_params(self.node_params)}]') return self def add_ranks(self): for rank, node_ids in self.ranks.items(): node_list = ', '.join(['"%s"' % node_id for node_id in node_ids]) self.add_line(f'{{ rank={rank}; {node_list} }}') return self
left_padding = ' ' digraph_end = ' }' class Graph_Dot_Render: def __init__(self, graph, sub_graphs, graph_name='G', graph_type='digraph'): self.graph_name = graph_name self.graph_type = graph_type self.dot_code = '' self.extra_dot_code = '' self.label = '' self.node_params = {} self.concentrate = None self.size = None self.rank_dir = None self.rank_sep = None self.ranks = {} self.graph = graph self.sub_graphs = sub_graphs pass def join_params(self, params): return ' '.join([f'{key}="{value}"' for (key, value) in params.items()]) def parse_into_params(self, source, skip_names): params = '' for (param_name, param_value) in source.items(): if param_name in skip_names: continue if param_value: params += f'{param_name}="{param_value}" ' return params def edge_link(self, edge_node): if ':' in edge_node: items = edge_node.split(':') return f'"{items[0]}":"{items[1]}"' else: return f'"{edge_node}"' def render(self): self.dot_code = f'{self.graph_type} {self.graph_name} {{' self.add_rand_dir().add_rank_sep().add_size().add_label().add_node_params().add_concentrate().add_sub_graphs() self.add_line().add_comment('###### Nodes #######') for node in self.graph.nodes(): key = node.get('key') label = node.get('value') or key params = self.parse_into_params(node, ['key']) if params: self.add_line(f'"{key}" [{params}]') else: self.add_line(f'"{key}" ["label"="{label}"]') self.add_line().add_comment('###### Edges #######') for edge in self.graph.edges(): from_key = self.edge_link(edge.get('from')) to_key = self.edge_link(edge.get('to')) params = self.parse_into_params(edge, ['from', 'to']) self.add_line(f' {from_key} -> {to_key} [{params}]') self.add_ranks().add_extra_dot_code() self.dot_code += DIGRAPH_END return self.dot_code def add_sub_graphs(self): for sub_graph in self.sub_graphs: self.add_line().add_line(sub_graph.render.render()) return self def add_concentrate(self): if self.concentrate: self.add_line('concentrate=true') return self def add_extra_dot_code(self): if self.extra_dot_code: self.dot_code += self.extra_dot_code return self def add_label(self): if self.label: self.add_line(f'label="{self.label}";').add_line('labelloc = "t"') return self def add_line(self, value=''): self.dot_code += f'{LEFT_PADDING}{value} \n' return self def add_size(self): if self.size: self.add_line(f'size = "{self.size},{self.size}"') return self def add_rand_dir(self): if self.rank_dir: self.add_line(f'rankdir={self.rank_dir};') return self def add_rank_sep(self): if self.rank_sep: self.add_line(f'ranksep={self.rank_sep};') return self def add_comment(self, value): return self.add_line(f'#{value} \n') def add_node_params(self): if self.node_params: self.add_line(f'node [{self.join_params(self.node_params)}]') return self def add_ranks(self): for (rank, node_ids) in self.ranks.items(): node_list = ', '.join(['"%s"' % node_id for node_id in node_ids]) self.add_line(f'{{ rank={rank}; {node_list} }}') return self
def to_pandas_table(self, ): self.lock.aquire() try: asks_tbl = pd.DataFrame(data=self._asks, index=range(len(self._asks))) asks_tbl = pd.DataFrame(data=self._bids, index=range(len(self._bids))) finally: self.lock.release()
def to_pandas_table(self): self.lock.aquire() try: asks_tbl = pd.DataFrame(data=self._asks, index=range(len(self._asks))) asks_tbl = pd.DataFrame(data=self._bids, index=range(len(self._bids))) finally: self.lock.release()
print('hello, world !') print('---------------') for v in range(0, 5+1): if v % 2 == 0: print('hello, world !') else: print(v, " is odd")
print('hello, world !') print('---------------') for v in range(0, 5 + 1): if v % 2 == 0: print('hello, world !') else: print(v, ' is odd')
def barplot(x_data, y_data, error_data, x_label="", y_label="", title=""): _, ax = plt.subplots() # Draw bars, position them in the center of the tick mark on the x-axis ax.bar(x_data, y_data, color = '#539caf', align = 'center') # Draw error bars to show standard deviation, set ls to 'none' # to remove line between points ax.errorbar(x_data, y_data, yerr = error_data, color = '#297083', ls = 'none', lw = 2, capthick = 2) ax.set_ylabel(y_label) ax.set_xlabel(x_label) ax.set_title(title) def stackedbarplot(x_data, y_data_list, colors, y_data_names="", x_label="", y_label="", title=""): _, ax = plt.subplots() # Draw bars, one category at a time for i in range(0, len(y_data_list)): if i == 0: ax.bar(x_data, y_data_list[i], color = colors[i], align = 'center', label = y_data_names[i]) else: # For each category after the first, the bottom of the # bar will be the top of the last category ax.bar(x_data, y_data_list[i], color = colors[i], bottom = y_data_list[i - 1], align = 'center', label = y_data_names[i]) ax.set_ylabel(y_label) ax.set_xlabel(x_label) ax.set_title(title) ax.legend(loc = 'upper right') def groupedbarplot(x_data, y_data_list, colors, y_data_names="", x_label="", y_label="", title=""): _, ax = plt.subplots() # Total width for all bars at one x location total_width = 0.8 # Width of each individual bar ind_width = total_width / len(y_data_list) # This centers each cluster of bars about the x tick mark alteration = np.arange(-(total_width/2), total_width/2, ind_width) # Draw bars, one category at a time for i in range(0, len(y_data_list)): # Move the bar to the right on the x-axis so it doesn't # overlap with previously drawn ones ax.bar(x_data + alteration[i], y_data_list[i], color = colors[i], label = y_data_names[i], width = ind_width) ax.set_ylabel(y_label) ax.set_xlabel(x_label) ax.set_title(title) ax.legend(loc = 'upper right')
def barplot(x_data, y_data, error_data, x_label='', y_label='', title=''): (_, ax) = plt.subplots() ax.bar(x_data, y_data, color='#539caf', align='center') ax.errorbar(x_data, y_data, yerr=error_data, color='#297083', ls='none', lw=2, capthick=2) ax.set_ylabel(y_label) ax.set_xlabel(x_label) ax.set_title(title) def stackedbarplot(x_data, y_data_list, colors, y_data_names='', x_label='', y_label='', title=''): (_, ax) = plt.subplots() for i in range(0, len(y_data_list)): if i == 0: ax.bar(x_data, y_data_list[i], color=colors[i], align='center', label=y_data_names[i]) else: ax.bar(x_data, y_data_list[i], color=colors[i], bottom=y_data_list[i - 1], align='center', label=y_data_names[i]) ax.set_ylabel(y_label) ax.set_xlabel(x_label) ax.set_title(title) ax.legend(loc='upper right') def groupedbarplot(x_data, y_data_list, colors, y_data_names='', x_label='', y_label='', title=''): (_, ax) = plt.subplots() total_width = 0.8 ind_width = total_width / len(y_data_list) alteration = np.arange(-(total_width / 2), total_width / 2, ind_width) for i in range(0, len(y_data_list)): ax.bar(x_data + alteration[i], y_data_list[i], color=colors[i], label=y_data_names[i], width=ind_width) ax.set_ylabel(y_label) ax.set_xlabel(x_label) ax.set_title(title) ax.legend(loc='upper right')
class ListNode: def __init__(self, x): self.val = x self.next = None def __eq__(self, other): if isinstance(other, ListNode): m = self n = other while m and n: if m.val != n.val: return False m = m.next n = n.next if m or n: return False return True return False def __str__(self): n = self s = '' while n: s += '->' s += str(n.val) n = n.next return s def makeListNode(list_int): a = None cur = None for i in list_int: tmp = ListNode(int(i)) tmp.next = None if not a: a = tmp cur = a else: cur.next = tmp cur = cur.next return a
class Listnode: def __init__(self, x): self.val = x self.next = None def __eq__(self, other): if isinstance(other, ListNode): m = self n = other while m and n: if m.val != n.val: return False m = m.next n = n.next if m or n: return False return True return False def __str__(self): n = self s = '' while n: s += '->' s += str(n.val) n = n.next return s def make_list_node(list_int): a = None cur = None for i in list_int: tmp = list_node(int(i)) tmp.next = None if not a: a = tmp cur = a else: cur.next = tmp cur = cur.next return a