content
stringlengths
7
1.05M
fixed_cases
stringlengths
1
1.28M
# Program verificare nr prim/compus num = int(input("Enter number: ")) # nr prime sunt mai mari decat 1 if num > 1: # verificare for i in range(2,num): if (num % i) == 0: print(num,"is not a prime number") print(i,"times",num//i,"is",num) break else: print(num,"is a prime number") else: print(num,"is not a prime number")
num = int(input('Enter number: ')) if num > 1: for i in range(2, num): if num % i == 0: print(num, 'is not a prime number') print(i, 'times', num // i, 'is', num) break else: print(num, 'is a prime number') else: print(num, 'is not a prime number')
expected_output = { "vrf": { "default": { "address_family": { "ipv4": { "routes": { "10.121.65.0/24": { "active": True, "candidate_default": False, "date": "7w0d", "metric": 20, "next_hop": { "next_hop_list": { 1: { "index": 1, "next_hop": "10.121.64.35", "outgoing_interface_name": "inside", }, 2: { "index": 2, "next_hop": "10.121.64.34", "outgoing_interface_name": "inside", }, } }, "route": "10.121.65.0/24", "route_preference": 110, "source_protocol": "ospf", "source_protocol_codes": "O", }, "10.121.67.0/24": { "active": True, "candidate_default": False, "date": "2w1d", "metric": 345856, "next_hop": { "next_hop_list": { 1: { "index": 1, "next_hop": "10.9.193.99", "outgoing_interface_name": "esavpn", }, 2: { "index": 2, "next_hop": "10.9.193.98", "outgoing_interface_name": "esavpn", }, } }, "route": "10.121.67.0/24", "route_preference": 170, "source_protocol": "eigrp", "source_protocol_codes": "EX", }, "10.121.68.0/24": { "active": True, "candidate_default": False, "date": "2w1d", "metric": 345856, "next_hop": { "next_hop_list": { 1: { "index": 1, "next_hop": "10.9.193.99", "outgoing_interface_name": "esavpn", }, 2: { "index": 2, "next_hop": "10.9.193.98", "outgoing_interface_name": "esavpn", }, } }, "route": "10.121.68.0/24", "route_preference": 170, "source_protocol": "eigrp", "source_protocol_codes": "EX", }, "10.121.69.0/24": { "active": True, "candidate_default": False, "date": "7w0d", "metric": 20, "next_hop": { "next_hop_list": { 1: { "index": 1, "next_hop": "10.121.64.35", "outgoing_interface_name": "inside", }, 2: { "index": 2, "next_hop": "10.121.64.34", "outgoing_interface_name": "inside", }, } }, "route": "10.121.69.0/24", "route_preference": 110, "source_protocol": "ospf", "source_protocol_codes": "O", }, "10.121.70.0/24": { "active": True, "candidate_default": False, "date": "2w1d", "metric": 345856, "next_hop": { "next_hop_list": { 1: { "index": 1, "next_hop": "10.9.193.99", "outgoing_interface_name": "esavpn", }, 2: { "index": 2, "next_hop": "10.9.193.98", "outgoing_interface_name": "esavpn", }, } }, "route": "10.121.70.0/24", "route_preference": 170, "source_protocol": "eigrp", "source_protocol_codes": "EX", }, "10.121.71.0/24": { "active": True, "candidate_default": False, "date": "2w1d", "metric": 345856, "next_hop": { "next_hop_list": { 1: { "index": 1, "next_hop": "10.9.193.99", "outgoing_interface_name": "esavpn", }, 2: { "index": 2, "next_hop": "10.9.193.98", "outgoing_interface_name": "esavpn", }, } }, "route": "10.121.71.0/24", "route_preference": 170, "source_protocol": "eigrp", "source_protocol_codes": "EX", }, } } } } } }
expected_output = {'vrf': {'default': {'address_family': {'ipv4': {'routes': {'10.121.65.0/24': {'active': True, 'candidate_default': False, 'date': '7w0d', 'metric': 20, 'next_hop': {'next_hop_list': {1: {'index': 1, 'next_hop': '10.121.64.35', 'outgoing_interface_name': 'inside'}, 2: {'index': 2, 'next_hop': '10.121.64.34', 'outgoing_interface_name': 'inside'}}}, 'route': '10.121.65.0/24', 'route_preference': 110, 'source_protocol': 'ospf', 'source_protocol_codes': 'O'}, '10.121.67.0/24': {'active': True, 'candidate_default': False, 'date': '2w1d', 'metric': 345856, 'next_hop': {'next_hop_list': {1: {'index': 1, 'next_hop': '10.9.193.99', 'outgoing_interface_name': 'esavpn'}, 2: {'index': 2, 'next_hop': '10.9.193.98', 'outgoing_interface_name': 'esavpn'}}}, 'route': '10.121.67.0/24', 'route_preference': 170, 'source_protocol': 'eigrp', 'source_protocol_codes': 'EX'}, '10.121.68.0/24': {'active': True, 'candidate_default': False, 'date': '2w1d', 'metric': 345856, 'next_hop': {'next_hop_list': {1: {'index': 1, 'next_hop': '10.9.193.99', 'outgoing_interface_name': 'esavpn'}, 2: {'index': 2, 'next_hop': '10.9.193.98', 'outgoing_interface_name': 'esavpn'}}}, 'route': '10.121.68.0/24', 'route_preference': 170, 'source_protocol': 'eigrp', 'source_protocol_codes': 'EX'}, '10.121.69.0/24': {'active': True, 'candidate_default': False, 'date': '7w0d', 'metric': 20, 'next_hop': {'next_hop_list': {1: {'index': 1, 'next_hop': '10.121.64.35', 'outgoing_interface_name': 'inside'}, 2: {'index': 2, 'next_hop': '10.121.64.34', 'outgoing_interface_name': 'inside'}}}, 'route': '10.121.69.0/24', 'route_preference': 110, 'source_protocol': 'ospf', 'source_protocol_codes': 'O'}, '10.121.70.0/24': {'active': True, 'candidate_default': False, 'date': '2w1d', 'metric': 345856, 'next_hop': {'next_hop_list': {1: {'index': 1, 'next_hop': '10.9.193.99', 'outgoing_interface_name': 'esavpn'}, 2: {'index': 2, 'next_hop': '10.9.193.98', 'outgoing_interface_name': 'esavpn'}}}, 'route': '10.121.70.0/24', 'route_preference': 170, 'source_protocol': 'eigrp', 'source_protocol_codes': 'EX'}, '10.121.71.0/24': {'active': True, 'candidate_default': False, 'date': '2w1d', 'metric': 345856, 'next_hop': {'next_hop_list': {1: {'index': 1, 'next_hop': '10.9.193.99', 'outgoing_interface_name': 'esavpn'}, 2: {'index': 2, 'next_hop': '10.9.193.98', 'outgoing_interface_name': 'esavpn'}}}, 'route': '10.121.71.0/24', 'route_preference': 170, 'source_protocol': 'eigrp', 'source_protocol_codes': 'EX'}}}}}}}
#n=int(input('Diga o valor')) #print('O quadrado {}'.format(n**2)) #print('O Antecessor {} Sucessor {}'.format(n+1,n-1)) dist=int(input('Diga o valor Distancia')) comb=int(input('Diga o valor Combustivel')) print('O consumo Medio {}'.format(dist/comb))
dist = int(input('Diga o valor Distancia')) comb = int(input('Diga o valor Combustivel')) print('O consumo Medio {}'.format(dist / comb))
def ali_sta_seznama_enaka(sez1, sez2): slo1 = {} slo2 = {} for i in sez1: slo1[i] = slo1.get(i, 0) + 1 for i in sez2: slo2[i] = slo2.get(i, 0) + 1 if slo1 == slo2: return True else: return False def permutacijsko_stevilo(): x = 1 while True: sez1 = [int(t) for t in str(x)] sez2 = [int(t) for t in str(2 * x)] sez3 = [int(t) for t in str(3 * x)] sez4 = [int(t) for t in str(4 * x)] sez5 = [int(t) for t in str(5 * x)] sez6 = [int(t) for t in str(6 * x)] if ali_sta_seznama_enaka(sez1, sez2) and ali_sta_seznama_enaka(sez1, sez3) and ali_sta_seznama_enaka(sez1, sez4) and ali_sta_seznama_enaka(sez1, sez5) and ali_sta_seznama_enaka(sez1, sez6): return x x += 1 print(permutacijsko_stevilo())
def ali_sta_seznama_enaka(sez1, sez2): slo1 = {} slo2 = {} for i in sez1: slo1[i] = slo1.get(i, 0) + 1 for i in sez2: slo2[i] = slo2.get(i, 0) + 1 if slo1 == slo2: return True else: return False def permutacijsko_stevilo(): x = 1 while True: sez1 = [int(t) for t in str(x)] sez2 = [int(t) for t in str(2 * x)] sez3 = [int(t) for t in str(3 * x)] sez4 = [int(t) for t in str(4 * x)] sez5 = [int(t) for t in str(5 * x)] sez6 = [int(t) for t in str(6 * x)] if ali_sta_seznama_enaka(sez1, sez2) and ali_sta_seznama_enaka(sez1, sez3) and ali_sta_seznama_enaka(sez1, sez4) and ali_sta_seznama_enaka(sez1, sez5) and ali_sta_seznama_enaka(sez1, sez6): return x x += 1 print(permutacijsko_stevilo())
def solution(s: str) -> bool: stack = [] left = 0 right = 0 for c in s: if not stack: if c == ")": return False stack.append(c) left += 1 continue if c == ")": if stack[-1] == "(": stack.pop() right += 1 else: return False else: stack.append(c) left += 1 return left == right if __name__ == "__main__": # i = "(())()" i = ")()(" print(solution(i))
def solution(s: str) -> bool: stack = [] left = 0 right = 0 for c in s: if not stack: if c == ')': return False stack.append(c) left += 1 continue if c == ')': if stack[-1] == '(': stack.pop() right += 1 else: return False else: stack.append(c) left += 1 return left == right if __name__ == '__main__': i = ')()(' print(solution(i))
self.description = "Quick check for using XferCommand" # this setting forces us to download packages self.cachepkgs = False #wget doesn't support file:// urls. curl does self.option['XferCommand'] = ['/usr/bin/curl %u -o %o'] numpkgs = 10 pkgnames = [] for i in range(numpkgs): name = "pkg_%s" % i pkgnames.append(name) p = pmpkg(name) p.files = ["usr/bin/foo-%s" % i] self.addpkg2db("sync", p) self.args = "-S %s" % ' '.join(pkgnames) for name in pkgnames: self.addrule("PKG_EXIST=%s" % name)
self.description = 'Quick check for using XferCommand' self.cachepkgs = False self.option['XferCommand'] = ['/usr/bin/curl %u -o %o'] numpkgs = 10 pkgnames = [] for i in range(numpkgs): name = 'pkg_%s' % i pkgnames.append(name) p = pmpkg(name) p.files = ['usr/bin/foo-%s' % i] self.addpkg2db('sync', p) self.args = '-S %s' % ' '.join(pkgnames) for name in pkgnames: self.addrule('PKG_EXIST=%s' % name)
class Solution: def search(self, nums: List[int], target: int) -> bool: start_idx = 0 for i in range(len(nums)-1): if nums[i] > nums[i + 1]: start_idx = i + 1 break originList = nums[start_idx:] + nums[:start_idx] if target < originList[0] or target > originList[-1]: return False start, end = 0 , len(nums) - 1 while start <= end: if start == end: if target == originList[start]: return True else: return False mid = (start + end) // 2 if target == originList[start] or target == originList[mid] or target == originList[end]: return True elif target > originList[mid]: start = mid if start != mid else start + 1 elif target <originList[mid]: end = mid return False
class Solution: def search(self, nums: List[int], target: int) -> bool: start_idx = 0 for i in range(len(nums) - 1): if nums[i] > nums[i + 1]: start_idx = i + 1 break origin_list = nums[start_idx:] + nums[:start_idx] if target < originList[0] or target > originList[-1]: return False (start, end) = (0, len(nums) - 1) while start <= end: if start == end: if target == originList[start]: return True else: return False mid = (start + end) // 2 if target == originList[start] or target == originList[mid] or target == originList[end]: return True elif target > originList[mid]: start = mid if start != mid else start + 1 elif target < originList[mid]: end = mid return False
VERSION = (0, 6) __version__ = '.'.join(map(str, VERSION)) __author__ = 'Ministry of Justice' __email__ = 'dev@digital.justice.gov.uk' default_app_config = 'govuk_forms.apps.FormsAppConfig'
version = (0, 6) __version__ = '.'.join(map(str, VERSION)) __author__ = 'Ministry of Justice' __email__ = 'dev@digital.justice.gov.uk' default_app_config = 'govuk_forms.apps.FormsAppConfig'
# -*- coding: utf-8 -*- VERSION = (1, 0, 0, 'beta') __version__ = ".".join(map(str, VERSION[0:3])) + "".join(VERSION[3:]) __author__ = 'Kuba Janoszek'
version = (1, 0, 0, 'beta') __version__ = '.'.join(map(str, VERSION[0:3])) + ''.join(VERSION[3:]) __author__ = 'Kuba Janoszek'
# Make an algorithm that reads an employee's salary and shows his new salary, with a 15% increase n1 = float(input('Enter the employee`s salary: US$ ')) n2 = n1 * 1.15 print('The new salary, with 15% increase, is US${:.2f}'.format(n2))
n1 = float(input('Enter the employee`s salary: US$ ')) n2 = n1 * 1.15 print('The new salary, with 15% increase, is US${:.2f}'.format(n2))
def get_string_count_to_by(to, by): if by < 1: raise ValueError("'by' must be > 0") if to < 1: raise ValueError("'to' must be > 0") if to <= by: return str(to) return get_string_count_to_by(to - by, by) + ", " + str(to) def count_to_by(to, by): print(get_string_count_to_by(to, by)) def main(): count_to_by(10,1) count_to_by(34,5) count_to_by(17,3) if __name__ == '__main__': main()
def get_string_count_to_by(to, by): if by < 1: raise value_error("'by' must be > 0") if to < 1: raise value_error("'to' must be > 0") if to <= by: return str(to) return get_string_count_to_by(to - by, by) + ', ' + str(to) def count_to_by(to, by): print(get_string_count_to_by(to, by)) def main(): count_to_by(10, 1) count_to_by(34, 5) count_to_by(17, 3) if __name__ == '__main__': main()
def sol(): N, M = map(int, input().split(" ")) data = sorted(list(map(int, input().split(" ")))) visited = [False] * (N + 1) save = set() dfs(N, M, data, visited, save, 0, "") def dfs(N, M, data, visited, save, cnt, line): if cnt == M: if line not in save: save.add(line) print(line) return for i in range(1, N + 1): if not visited[i]: visited[i] = True if cnt == 0: dfs(N, M, data, visited, save, cnt + 1, str(data[i - 1])) else: dfs(N, M, data, visited, save, cnt + 1, line + " " + str(data[i - 1])) visited[i] = False if __name__ == "__main__": sol()
def sol(): (n, m) = map(int, input().split(' ')) data = sorted(list(map(int, input().split(' ')))) visited = [False] * (N + 1) save = set() dfs(N, M, data, visited, save, 0, '') def dfs(N, M, data, visited, save, cnt, line): if cnt == M: if line not in save: save.add(line) print(line) return for i in range(1, N + 1): if not visited[i]: visited[i] = True if cnt == 0: dfs(N, M, data, visited, save, cnt + 1, str(data[i - 1])) else: dfs(N, M, data, visited, save, cnt + 1, line + ' ' + str(data[i - 1])) visited[i] = False if __name__ == '__main__': sol()
def generate_instance_name(name): out = name[0].lower() for char in name[1:]: if char.isupper(): out += "_%s" % char.lower() else: out += char return out def generate_human_name(name): out = name[0] for char in name[1:]: if char.isupper(): out += " %s" % char.lower() else: out += char return out
def generate_instance_name(name): out = name[0].lower() for char in name[1:]: if char.isupper(): out += '_%s' % char.lower() else: out += char return out def generate_human_name(name): out = name[0] for char in name[1:]: if char.isupper(): out += ' %s' % char.lower() else: out += char return out
# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. _base_ = [ '../_base_/models/upernet_convnext.py', '../_base_/datasets/ade20k.py', '../_base_/default_runtime.py', '../_base_/schedules/schedule_160k.py' ] crop_size = (512, 512) model = dict( backbone=dict( type='ConvNeXt', in_chans=3, depths=[3, 3, 9, 3], dims=[96, 192, 384, 768], drop_path_rate=0.4, layer_scale_init_value=1.0, out_indices=[0, 1, 2, 3], ), decode_head=dict( in_channels=[96, 192, 384, 768], num_classes=150, ), auxiliary_head=dict( in_channels=384, num_classes=150 ), test_cfg = dict(mode='slide', crop_size=crop_size, stride=(341, 341)), ) optimizer = dict(constructor='LearningRateDecayOptimizerConstructor', _delete_=True, type='AdamW', lr=0.0001, betas=(0.9, 0.999), weight_decay=0.05, paramwise_cfg={'decay_rate': 0.9, 'decay_type': 'stage_wise', 'num_layers': 6}) lr_config = dict(_delete_=True, policy='poly', warmup='linear', warmup_iters=1500, warmup_ratio=1e-6, power=1.0, min_lr=0.0, by_epoch=False) # By default, models are trained on 8 GPUs with 2 images per GPU data=dict(samples_per_gpu=2) runner = dict(type='IterBasedRunnerAmp') # do not use mmdet version fp16 fp16 = None optimizer_config = dict( type="DistOptimizerHook", update_interval=1, grad_clip=None, coalesce=True, bucket_size_mb=-1, use_fp16=True, )
_base_ = ['../_base_/models/upernet_convnext.py', '../_base_/datasets/ade20k.py', '../_base_/default_runtime.py', '../_base_/schedules/schedule_160k.py'] crop_size = (512, 512) model = dict(backbone=dict(type='ConvNeXt', in_chans=3, depths=[3, 3, 9, 3], dims=[96, 192, 384, 768], drop_path_rate=0.4, layer_scale_init_value=1.0, out_indices=[0, 1, 2, 3]), decode_head=dict(in_channels=[96, 192, 384, 768], num_classes=150), auxiliary_head=dict(in_channels=384, num_classes=150), test_cfg=dict(mode='slide', crop_size=crop_size, stride=(341, 341))) optimizer = dict(constructor='LearningRateDecayOptimizerConstructor', _delete_=True, type='AdamW', lr=0.0001, betas=(0.9, 0.999), weight_decay=0.05, paramwise_cfg={'decay_rate': 0.9, 'decay_type': 'stage_wise', 'num_layers': 6}) lr_config = dict(_delete_=True, policy='poly', warmup='linear', warmup_iters=1500, warmup_ratio=1e-06, power=1.0, min_lr=0.0, by_epoch=False) data = dict(samples_per_gpu=2) runner = dict(type='IterBasedRunnerAmp') fp16 = None optimizer_config = dict(type='DistOptimizerHook', update_interval=1, grad_clip=None, coalesce=True, bucket_size_mb=-1, use_fp16=True)
''' Kompresi Benny Menyederhanakan sebuah kata dengan membuat beberapa karakter yang sama dan berurutan hanya akan menjadi satu karakter saja. ''' def kompresi(a_str): ''' Mengompres a_str sehingga tidak ada karakter yang sama yang bersebelahan. Contoh: kompresi('aabbbbaaacddeae') akan mengembalikan 'abacdeae' ''' if len(a_str) <= 1: return a_str ''' Apabila karakter pertama dan kedua adalah sama, maka langsung panggil kompresi tanpa karakter pertama. ''' if a_str[0] == a_str[1]: return kompresi(a_str[1:]) return a_str[0] + kompresi(a_str[1:]) if __name__ == '__main__': while True: the_str = input(">>> ") print("Hasil kompresinya adalah {}".format(kompresi(the_str)))
""" Kompresi Benny Menyederhanakan sebuah kata dengan membuat beberapa karakter yang sama dan berurutan hanya akan menjadi satu karakter saja. """ def kompresi(a_str): """ Mengompres a_str sehingga tidak ada karakter yang sama yang bersebelahan. Contoh: kompresi('aabbbbaaacddeae') akan mengembalikan 'abacdeae' """ if len(a_str) <= 1: return a_str '\n Apabila karakter pertama dan kedua adalah sama,\n maka langsung panggil kompresi tanpa karakter\n pertama.\n ' if a_str[0] == a_str[1]: return kompresi(a_str[1:]) return a_str[0] + kompresi(a_str[1:]) if __name__ == '__main__': while True: the_str = input('>>> ') print('Hasil kompresinya adalah {}'.format(kompresi(the_str)))
__all__ = ['CommandError', 'CommandLineError'] class CommandError(Exception): pass class CommandLineError(Exception): pass class SubcommandError(Exception): pass class MaincommandError(Exception): pass class CommandCollectionError(Exception): pass
__all__ = ['CommandError', 'CommandLineError'] class Commanderror(Exception): pass class Commandlineerror(Exception): pass class Subcommanderror(Exception): pass class Maincommanderror(Exception): pass class Commandcollectionerror(Exception): pass
# Copyright (c) 2021, Carlos Millett # All rights reserved. # # This software may be modified and distributed under the terms # of the Simplified BSD License. See the LICENSE file for details. ''' Renamer renames your TV files into a nice new format. The new filename includes the TV show name, season and episode numbers and the episode title. ''' __version__ = '0.3.2' __author__ = 'Carlos Millett <carlos4735@gmail.com>'
""" Renamer renames your TV files into a nice new format. The new filename includes the TV show name, season and episode numbers and the episode title. """ __version__ = '0.3.2' __author__ = 'Carlos Millett <carlos4735@gmail.com>'
s = open('input.txt','r').read() s = [k for k in s.split("\n")] ans = 0 p = "" q = 0 for line in s: if line == "": x = [0]*26 for i in p: j = ord(i) - 97 if 0 <= j < 26: x[j] += 1 ans += len([k for k in x if k == q]) p = "" q = 0 else: p += line q += 1 print(ans)
s = open('input.txt', 'r').read() s = [k for k in s.split('\n')] ans = 0 p = '' q = 0 for line in s: if line == '': x = [0] * 26 for i in p: j = ord(i) - 97 if 0 <= j < 26: x[j] += 1 ans += len([k for k in x if k == q]) p = '' q = 0 else: p += line q += 1 print(ans)
# Python - 3.6.0 def presses(phrase): keypads = ['1', 'ABC2', 'DEF3', 'GHI4', 'JKL5', 'MNO6', 'PQRS7', 'TUV8', 'WXYZ9', '*', ' 0', '#'] times, i = 0, 0 for p in phrase.upper(): for keypad in keypads: i = keypad.find(p) if i >= 0: break times += i + 1 return times
def presses(phrase): keypads = ['1', 'ABC2', 'DEF3', 'GHI4', 'JKL5', 'MNO6', 'PQRS7', 'TUV8', 'WXYZ9', '*', ' 0', '#'] (times, i) = (0, 0) for p in phrase.upper(): for keypad in keypads: i = keypad.find(p) if i >= 0: break times += i + 1 return times
# Copyright 2017 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. DEPS = [ 'flavor', 'recipe_engine/properties', 'recipe_engine/raw_io', 'run', 'vars', ] def test_exceptions(api): try: api.flavor.copy_directory_contents_to_device('src', 'dst') except ValueError: pass try: api.flavor.copy_directory_contents_to_host('src', 'dst') except ValueError: pass try: api.flavor.copy_file_to_device('src', 'dst') except ValueError: pass def RunSteps(api): api.vars.setup() api.flavor.setup() if api.properties.get('is_testing_exceptions') == 'True': return test_exceptions(api) api.flavor.compile('dm') api.flavor.copy_extra_build_products(api.vars.swarming_out_dir) assert str(api.flavor.out_dir) != '' if 'Build' not in api.properties['buildername']: try: api.flavor.copy_file_to_device('file.txt', 'file.txt') api.flavor.create_clean_host_dir('results_dir') api.flavor.create_clean_device_dir('device_results_dir') api.flavor.install_everything() if 'Test' in api.properties['buildername']: api.flavor.step('dm', ['dm', '--some-flag']) api.flavor.copy_directory_contents_to_host( api.flavor.device_dirs.dm_dir, api.vars.dm_dir) elif 'Perf' in api.properties['buildername']: api.flavor.step('nanobench', ['nanobench', '--some-flag']) api.flavor.copy_directory_contents_to_host( api.flavor.device_dirs.perf_data_dir, api.vars.perf_data_dir) finally: api.flavor.cleanup_steps() api.run.check_failure() TEST_BUILDERS = [ 'Build-Debian9-Clang-arm-Release-Android_API26', 'Build-Debian9-Clang-arm-Release-Chromebook_GLES', 'Build-Debian9-Clang-arm-Release-Android_ASAN', 'Build-Debian9-Clang-arm64-Release-Android_ASAN', 'Build-Debian9-Clang-universal-devrel-Android_SKQP', 'Build-Debian9-Clang-x86_64-Debug-Chromebook_GLES', 'Build-Debian9-Clang-x86_64-Debug-SK_USE_DISCARDABLE_SCALEDIMAGECACHE', 'Build-Debian9-Clang-x86_64-Release-Fast', 'Build-Debian9-Clang-x86_64-Release-Mini', 'Build-Debian9-Clang-x86_64-Release-NoDEPS', 'Build-Debian9-Clang-x86_64-Release-Vulkan', 'Build-Debian9-EMCC-wasm-Release', 'Build-Debian9-GCC-x86_64-Debug-EmbededResouces', 'Build-Debian9-GCC-x86_64-Release-ANGLE', 'Build-Debian9-GCC-x86_64-Release-Flutter_Android', 'Build-Debian9-GCC-x86_64-Release-NoGPU', 'Build-Debian9-GCC-x86_64-Release-PDFium', 'Build-Debian9-GCC-x86_64-Release-PDFium_SkiaPaths', 'Build-Debian9-GCC-x86_64-Release-Shared', 'Build-Mac-Clang-arm64-Debug-Android_Vulkan', 'Build-Mac-Clang-arm64-Debug-iOS', 'Build-Mac-Clang-x86_64-Debug-CommandBuffer', 'Build-Mac-Clang-x86_64-Debug-Metal', 'Build-Win-Clang-arm64-Release-Android', 'Build-Win-Clang-x86-Debug-Exceptions', 'Build-Win-Clang-x86_64-Debug-GDI', 'Build-Win-Clang-x86_64-Release', 'Build-Win-Clang-x86_64-Release-Vulkan', 'Housekeeper-PerCommit-CheckGeneratedFiles', 'Perf-Android-Clang-GalaxyS7_G930FD-GPU-MaliT880-arm64-Debug-All-Android', 'Perf-Android-Clang-Nexus5x-GPU-Adreno418-arm64-Debug-All-Android', 'Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Debug-All-Android', 'Perf-Android-Clang-Pixel-GPU-Adreno530-arm64-Debug-All-Android', 'Perf-ChromeOS-Clang-SamsungChromebookPlus-GPU-MaliT860-arm-Release-All', 'Perf-Chromecast-GCC-Chorizo-CPU-Cortex_A7-arm-Release-All', 'Perf-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-All-MSAN', 'Perf-Debian9-Clang-GCE-CPU-AVX2-x86_64-Release-All-ASAN', 'Perf-Ubuntu14-Clang-GCE-CPU-AVX2-x86_64-Release-All-CT_BENCH_1k_SKPs', 'Test-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Release-All-Android', 'Test-Android-Clang-GalaxyS7_G930FD-GPU-MaliT880-arm64-Debug-All-Android', 'Test-Android-Clang-Nexus5x-GPU-Adreno418-arm64-Debug-All-Android', 'Test-Android-Clang-Nexus5x-GPU-Adreno418-arm64-Release-All-Android_ASAN', 'Test-Android-Clang-Nexus7-CPU-Tegra3-arm-Release-All-Android', 'Test-Android-Clang-Pixel-GPU-Adreno530-arm64-Debug-All-Android', 'Test-ChromeOS-Clang-SamsungChromebookPlus-GPU-MaliT860-arm-Release-All', 'Test-Debian9-Clang-GCE-CPU-AVX2-universal-devrel-All-Android_SKQP', 'Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-All-Coverage', 'Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Release-All-TSAN', 'Test-Debian9-GCC-GCE-CPU-AVX2-x86_64-Release-All', 'Test-Ubuntu16-Clang-NUC7i5BNK-GPU-IntelIris640-x86_64-Debug-All-Vulkan', ('Test-Ubuntu17-GCC-Golo-GPU-QuadroP400-x86_64-Release-All' '-Valgrind_AbandonGpuContext_SK_CPU_LIMIT_SSE41'), 'Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-Vulkan_ProcDump', 'Test-Win10-MSVC-ShuttleA-GPU-GTX660-x86_64-Debug-All', 'Test-iOS-Clang-iPadPro-GPU-GT7800-arm64-Debug-All', 'Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-All-SafeStack', ] # Default properties used for TEST_BUILDERS. defaultProps = lambda buildername: dict( buildername=buildername, repository='https://skia.googlesource.com/skia.git', revision='abc123', path_config='kitchen', patch_set=2, swarm_out_dir='[SWARM_OUT_DIR]' ) def GenTests(api): for buildername in TEST_BUILDERS: test = ( api.test(buildername) + api.properties(**defaultProps(buildername)) ) if 'Chromebook' in buildername and not 'Build' in buildername: test += api.step_data( 'read chromeos ip', stdout=api.raw_io.output('{"user_ip":"foo@127.0.0.1"}')) if 'Chromecast' in buildername: test += api.step_data( 'read chromecast ip', stdout=api.raw_io.output('192.168.1.2:5555')) yield test builder = 'Test-Debian9-GCC-GCE-CPU-AVX2-x86_64-Release-All' yield ( api.test('exceptions') + api.properties(buildername=builder, repository='https://skia.googlesource.com/skia.git', revision='abc123', path_config='kitchen', swarm_out_dir='[SWARM_OUT_DIR]', is_testing_exceptions='True') ) builder = 'Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Debug-All-Android' yield ( api.test('failed_infra_step') + api.properties(buildername=builder, repository='https://skia.googlesource.com/skia.git', revision='abc123', path_config='kitchen', swarm_out_dir='[SWARM_OUT_DIR]') + api.step_data('get swarming bot id', stdout=api.raw_io.output('build123-m2--device5')) + api.step_data('dump log', retcode=1) ) builder = 'Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Debug-All-Android' yield ( api.test('failed_read_version') + api.properties(buildername=builder, repository='https://skia.googlesource.com/skia.git', revision='abc123', path_config='kitchen', swarm_out_dir='[SWARM_OUT_DIR]') + api.step_data('read /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION', retcode=1) ) builder = 'Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Debug-All-Android' yield ( api.test('retry_adb_command') + api.properties(buildername=builder, repository='https://skia.googlesource.com/skia.git', revision='abc123', path_config='kitchen', swarm_out_dir='[SWARM_OUT_DIR]') + api.step_data('mkdir /sdcard/revenge_of_the_skiabot/resources', retcode=1) ) builder = 'Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Debug-All-Android' fail_step_name = 'mkdir /sdcard/revenge_of_the_skiabot/resources' yield ( api.test('retry_adb_command_retries_exhausted') + api.properties(buildername=builder, repository='https://skia.googlesource.com/skia.git', revision='abc123', path_config='kitchen', swarm_out_dir='[SWARM_OUT_DIR]') + api.step_data('get swarming bot id', stdout=api.raw_io.output('build123-m2--device5')) + api.step_data(fail_step_name, retcode=1) + api.step_data(fail_step_name + ' (attempt 2)', retcode=1) + api.step_data(fail_step_name + ' (attempt 3)', retcode=1) ) yield ( api.test('cpu_scale_failed') + api.properties(buildername=builder, repository='https://skia.googlesource.com/skia.git', revision='abc123', path_config='kitchen', swarm_out_dir='[SWARM_OUT_DIR]') + api.step_data('Scale CPU 0 to 0.600000', retcode=1) ) builder = 'Test-iOS-Clang-iPhone7-GPU-GT7600-arm64-Release-All' fail_step_name = 'install_dm' yield ( api.test('retry_ios_install') + api.properties(buildername=builder, repository='https://skia.googlesource.com/skia.git', revision='abc123', path_config='kitchen', swarm_out_dir='[SWARM_OUT_DIR]') + api.step_data(fail_step_name, retcode=1) ) yield ( api.test('retry_ios_install_retries_exhausted') + api.properties(buildername=builder, repository='https://skia.googlesource.com/skia.git', revision='abc123', path_config='kitchen', swarm_out_dir='[SWARM_OUT_DIR]') + api.step_data(fail_step_name, retcode=1) + api.step_data(fail_step_name + ' (attempt 2)', retcode=1) )
deps = ['flavor', 'recipe_engine/properties', 'recipe_engine/raw_io', 'run', 'vars'] def test_exceptions(api): try: api.flavor.copy_directory_contents_to_device('src', 'dst') except ValueError: pass try: api.flavor.copy_directory_contents_to_host('src', 'dst') except ValueError: pass try: api.flavor.copy_file_to_device('src', 'dst') except ValueError: pass def run_steps(api): api.vars.setup() api.flavor.setup() if api.properties.get('is_testing_exceptions') == 'True': return test_exceptions(api) api.flavor.compile('dm') api.flavor.copy_extra_build_products(api.vars.swarming_out_dir) assert str(api.flavor.out_dir) != '' if 'Build' not in api.properties['buildername']: try: api.flavor.copy_file_to_device('file.txt', 'file.txt') api.flavor.create_clean_host_dir('results_dir') api.flavor.create_clean_device_dir('device_results_dir') api.flavor.install_everything() if 'Test' in api.properties['buildername']: api.flavor.step('dm', ['dm', '--some-flag']) api.flavor.copy_directory_contents_to_host(api.flavor.device_dirs.dm_dir, api.vars.dm_dir) elif 'Perf' in api.properties['buildername']: api.flavor.step('nanobench', ['nanobench', '--some-flag']) api.flavor.copy_directory_contents_to_host(api.flavor.device_dirs.perf_data_dir, api.vars.perf_data_dir) finally: api.flavor.cleanup_steps() api.run.check_failure() test_builders = ['Build-Debian9-Clang-arm-Release-Android_API26', 'Build-Debian9-Clang-arm-Release-Chromebook_GLES', 'Build-Debian9-Clang-arm-Release-Android_ASAN', 'Build-Debian9-Clang-arm64-Release-Android_ASAN', 'Build-Debian9-Clang-universal-devrel-Android_SKQP', 'Build-Debian9-Clang-x86_64-Debug-Chromebook_GLES', 'Build-Debian9-Clang-x86_64-Debug-SK_USE_DISCARDABLE_SCALEDIMAGECACHE', 'Build-Debian9-Clang-x86_64-Release-Fast', 'Build-Debian9-Clang-x86_64-Release-Mini', 'Build-Debian9-Clang-x86_64-Release-NoDEPS', 'Build-Debian9-Clang-x86_64-Release-Vulkan', 'Build-Debian9-EMCC-wasm-Release', 'Build-Debian9-GCC-x86_64-Debug-EmbededResouces', 'Build-Debian9-GCC-x86_64-Release-ANGLE', 'Build-Debian9-GCC-x86_64-Release-Flutter_Android', 'Build-Debian9-GCC-x86_64-Release-NoGPU', 'Build-Debian9-GCC-x86_64-Release-PDFium', 'Build-Debian9-GCC-x86_64-Release-PDFium_SkiaPaths', 'Build-Debian9-GCC-x86_64-Release-Shared', 'Build-Mac-Clang-arm64-Debug-Android_Vulkan', 'Build-Mac-Clang-arm64-Debug-iOS', 'Build-Mac-Clang-x86_64-Debug-CommandBuffer', 'Build-Mac-Clang-x86_64-Debug-Metal', 'Build-Win-Clang-arm64-Release-Android', 'Build-Win-Clang-x86-Debug-Exceptions', 'Build-Win-Clang-x86_64-Debug-GDI', 'Build-Win-Clang-x86_64-Release', 'Build-Win-Clang-x86_64-Release-Vulkan', 'Housekeeper-PerCommit-CheckGeneratedFiles', 'Perf-Android-Clang-GalaxyS7_G930FD-GPU-MaliT880-arm64-Debug-All-Android', 'Perf-Android-Clang-Nexus5x-GPU-Adreno418-arm64-Debug-All-Android', 'Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Debug-All-Android', 'Perf-Android-Clang-Pixel-GPU-Adreno530-arm64-Debug-All-Android', 'Perf-ChromeOS-Clang-SamsungChromebookPlus-GPU-MaliT860-arm-Release-All', 'Perf-Chromecast-GCC-Chorizo-CPU-Cortex_A7-arm-Release-All', 'Perf-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-All-MSAN', 'Perf-Debian9-Clang-GCE-CPU-AVX2-x86_64-Release-All-ASAN', 'Perf-Ubuntu14-Clang-GCE-CPU-AVX2-x86_64-Release-All-CT_BENCH_1k_SKPs', 'Test-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Release-All-Android', 'Test-Android-Clang-GalaxyS7_G930FD-GPU-MaliT880-arm64-Debug-All-Android', 'Test-Android-Clang-Nexus5x-GPU-Adreno418-arm64-Debug-All-Android', 'Test-Android-Clang-Nexus5x-GPU-Adreno418-arm64-Release-All-Android_ASAN', 'Test-Android-Clang-Nexus7-CPU-Tegra3-arm-Release-All-Android', 'Test-Android-Clang-Pixel-GPU-Adreno530-arm64-Debug-All-Android', 'Test-ChromeOS-Clang-SamsungChromebookPlus-GPU-MaliT860-arm-Release-All', 'Test-Debian9-Clang-GCE-CPU-AVX2-universal-devrel-All-Android_SKQP', 'Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-All-Coverage', 'Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Release-All-TSAN', 'Test-Debian9-GCC-GCE-CPU-AVX2-x86_64-Release-All', 'Test-Ubuntu16-Clang-NUC7i5BNK-GPU-IntelIris640-x86_64-Debug-All-Vulkan', 'Test-Ubuntu17-GCC-Golo-GPU-QuadroP400-x86_64-Release-All-Valgrind_AbandonGpuContext_SK_CPU_LIMIT_SSE41', 'Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-Vulkan_ProcDump', 'Test-Win10-MSVC-ShuttleA-GPU-GTX660-x86_64-Debug-All', 'Test-iOS-Clang-iPadPro-GPU-GT7800-arm64-Debug-All', 'Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-All-SafeStack'] default_props = lambda buildername: dict(buildername=buildername, repository='https://skia.googlesource.com/skia.git', revision='abc123', path_config='kitchen', patch_set=2, swarm_out_dir='[SWARM_OUT_DIR]') def gen_tests(api): for buildername in TEST_BUILDERS: test = api.test(buildername) + api.properties(**default_props(buildername)) if 'Chromebook' in buildername and (not 'Build' in buildername): test += api.step_data('read chromeos ip', stdout=api.raw_io.output('{"user_ip":"foo@127.0.0.1"}')) if 'Chromecast' in buildername: test += api.step_data('read chromecast ip', stdout=api.raw_io.output('192.168.1.2:5555')) yield test builder = 'Test-Debian9-GCC-GCE-CPU-AVX2-x86_64-Release-All' yield (api.test('exceptions') + api.properties(buildername=builder, repository='https://skia.googlesource.com/skia.git', revision='abc123', path_config='kitchen', swarm_out_dir='[SWARM_OUT_DIR]', is_testing_exceptions='True')) builder = 'Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Debug-All-Android' yield (api.test('failed_infra_step') + api.properties(buildername=builder, repository='https://skia.googlesource.com/skia.git', revision='abc123', path_config='kitchen', swarm_out_dir='[SWARM_OUT_DIR]') + api.step_data('get swarming bot id', stdout=api.raw_io.output('build123-m2--device5')) + api.step_data('dump log', retcode=1)) builder = 'Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Debug-All-Android' yield (api.test('failed_read_version') + api.properties(buildername=builder, repository='https://skia.googlesource.com/skia.git', revision='abc123', path_config='kitchen', swarm_out_dir='[SWARM_OUT_DIR]') + api.step_data('read /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION', retcode=1)) builder = 'Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Debug-All-Android' yield (api.test('retry_adb_command') + api.properties(buildername=builder, repository='https://skia.googlesource.com/skia.git', revision='abc123', path_config='kitchen', swarm_out_dir='[SWARM_OUT_DIR]') + api.step_data('mkdir /sdcard/revenge_of_the_skiabot/resources', retcode=1)) builder = 'Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Debug-All-Android' fail_step_name = 'mkdir /sdcard/revenge_of_the_skiabot/resources' yield (api.test('retry_adb_command_retries_exhausted') + api.properties(buildername=builder, repository='https://skia.googlesource.com/skia.git', revision='abc123', path_config='kitchen', swarm_out_dir='[SWARM_OUT_DIR]') + api.step_data('get swarming bot id', stdout=api.raw_io.output('build123-m2--device5')) + api.step_data(fail_step_name, retcode=1) + api.step_data(fail_step_name + ' (attempt 2)', retcode=1) + api.step_data(fail_step_name + ' (attempt 3)', retcode=1)) yield (api.test('cpu_scale_failed') + api.properties(buildername=builder, repository='https://skia.googlesource.com/skia.git', revision='abc123', path_config='kitchen', swarm_out_dir='[SWARM_OUT_DIR]') + api.step_data('Scale CPU 0 to 0.600000', retcode=1)) builder = 'Test-iOS-Clang-iPhone7-GPU-GT7600-arm64-Release-All' fail_step_name = 'install_dm' yield (api.test('retry_ios_install') + api.properties(buildername=builder, repository='https://skia.googlesource.com/skia.git', revision='abc123', path_config='kitchen', swarm_out_dir='[SWARM_OUT_DIR]') + api.step_data(fail_step_name, retcode=1)) yield (api.test('retry_ios_install_retries_exhausted') + api.properties(buildername=builder, repository='https://skia.googlesource.com/skia.git', revision='abc123', path_config='kitchen', swarm_out_dir='[SWARM_OUT_DIR]') + api.step_data(fail_step_name, retcode=1) + api.step_data(fail_step_name + ' (attempt 2)', retcode=1))
pass_marks = 70 if pass_marks == 70: print('pass') its_raining = True # you can change this to False if its_raining: print("It's raining!") its_raining = True # you can change this to False its_not_raining = not its_raining # False if its_raining, True otherwise if its_raining: print("It's raining!") if its_not_raining: print("It's not raining.") if its_raining: print("It's raining!") else: print("It's not raining.") if pass_marks < 70: print('Retake Exam') elif pass_marks == 70: print('Just Pass') elif pass_marks == 80: print('Pass C grade') elif pass_marks == 90: print('Pass B grade') elif 90 <= pass_marks <= 95: # elif pass_marks >= 90 and pass_marks <= 95: print('Pass A grade') else: print(f'Not sure what to do with pass marks: {pass_marks}')
pass_marks = 70 if pass_marks == 70: print('pass') its_raining = True if its_raining: print("It's raining!") its_raining = True its_not_raining = not its_raining if its_raining: print("It's raining!") if its_not_raining: print("It's not raining.") if its_raining: print("It's raining!") else: print("It's not raining.") if pass_marks < 70: print('Retake Exam') elif pass_marks == 70: print('Just Pass') elif pass_marks == 80: print('Pass C grade') elif pass_marks == 90: print('Pass B grade') elif 90 <= pass_marks <= 95: print('Pass A grade') else: print(f'Not sure what to do with pass marks: {pass_marks}')
a = 28 b = 1.5 c = "Hello!" d = True e = None
a = 28 b = 1.5 c = 'Hello!' d = True e = None
#1) Indexing lists and tuples list_values = [1, 2, 3] set_values = (10, 20, 30) print(list_values[0]) print(set_values[0]) #2) Changing values: lists vs tuples list_values = [1, 2, 3] set_values = (10, 20, 30) list_values[0] = 100 print(list_values) set_values[0] = 100 #3) Tuple vs List Expanding list_values = [1, 2, 3] set_values = (1, 2, 3) print(id(list_values)) print(id(set_values)) print() list_values += [4, 5, 6] set_values += (4, 5, 6) print(id(list_values)) print(id(set_values)) #4) Other Immutable Data Type Examples number = 42 print(id(number)) number += 1 print(id(number)) text = "Data Science" print(id(text)) text += " with Python" print(id(text)) #5) Copying Mutable Objects by Reference values = [4, 5, 6] values2 = values print(id(values)) print(id(values2)) values.append(7) print(values is values2) print(values) print(values2) #6) Copying Immutable Objects text = "Python" text2 = text print(id(text)) print(id(text2)) print(text is text2) print() text += " is awesome" print(id(text)) print(id(text2)) print(text is text2) print() print(text) print(text2)
list_values = [1, 2, 3] set_values = (10, 20, 30) print(list_values[0]) print(set_values[0]) list_values = [1, 2, 3] set_values = (10, 20, 30) list_values[0] = 100 print(list_values) set_values[0] = 100 list_values = [1, 2, 3] set_values = (1, 2, 3) print(id(list_values)) print(id(set_values)) print() list_values += [4, 5, 6] set_values += (4, 5, 6) print(id(list_values)) print(id(set_values)) number = 42 print(id(number)) number += 1 print(id(number)) text = 'Data Science' print(id(text)) text += ' with Python' print(id(text)) values = [4, 5, 6] values2 = values print(id(values)) print(id(values2)) values.append(7) print(values is values2) print(values) print(values2) text = 'Python' text2 = text print(id(text)) print(id(text2)) print(text is text2) print() text += ' is awesome' print(id(text)) print(id(text2)) print(text is text2) print() print(text) print(text2)
dic_cal = {} def cal(a, b): if (a, b) in dic_cal: return dic_cal[(a, b)] return cal(a - 1, b) + cal(a, b - 1) if __name__ == '__main__': for j in range(0, 1): for k in range(0, 21): dic_cal[(j, k)] = 1 for j in range(0, 21): for k in range(0, 1): dic_cal[(j, k)] = 1 for j in range(0, 21): for k in range(0, 21): dic_cal[(j, k)] = cal(j, k) print(cal(20, 20))
dic_cal = {} def cal(a, b): if (a, b) in dic_cal: return dic_cal[a, b] return cal(a - 1, b) + cal(a, b - 1) if __name__ == '__main__': for j in range(0, 1): for k in range(0, 21): dic_cal[j, k] = 1 for j in range(0, 21): for k in range(0, 1): dic_cal[j, k] = 1 for j in range(0, 21): for k in range(0, 21): dic_cal[j, k] = cal(j, k) print(cal(20, 20))
# shorthand for tabulation def get_tabs(num): ret = "" for _ in range(num): ret += "\t" return ret
def get_tabs(num): ret = '' for _ in range(num): ret += '\t' return ret
n = int(input()) chars_of_each_string = [[char for char in input()] for _ in range(n)] chars = [] for characters in chars_of_each_string: chars += list(set(characters)) chars_used_in_all = [] for char in set(chars): if chars.count(char) == n: chars_used_in_all.append(char) if not chars_used_in_all: print("") exit() chars_used_in_all.sort() accepted_chars_of_each_string = [ [char for char in chars if char in chars_used_in_all] for chars in chars_of_each_string ] print(accepted_chars_of_each_string) each_count = dict([(char, 0) for char in chars_used_in_all]) for char in chars_used_in_all: for i in range(n): count = accepted_chars_of_each_string[i].count(char) if i == 0: min_count = count min_count = min(min_count, count) each_count[char] = min_count # res = '' # for char, count in each_count.items(): # res += char * count # print(res) res = [] for char, count in each_count.items(): res.append(char * count) ans = "".join(res) print(ans)
n = int(input()) chars_of_each_string = [[char for char in input()] for _ in range(n)] chars = [] for characters in chars_of_each_string: chars += list(set(characters)) chars_used_in_all = [] for char in set(chars): if chars.count(char) == n: chars_used_in_all.append(char) if not chars_used_in_all: print('') exit() chars_used_in_all.sort() accepted_chars_of_each_string = [[char for char in chars if char in chars_used_in_all] for chars in chars_of_each_string] print(accepted_chars_of_each_string) each_count = dict([(char, 0) for char in chars_used_in_all]) for char in chars_used_in_all: for i in range(n): count = accepted_chars_of_each_string[i].count(char) if i == 0: min_count = count min_count = min(min_count, count) each_count[char] = min_count res = [] for (char, count) in each_count.items(): res.append(char * count) ans = ''.join(res) print(ans)
''' Description: exercise: finding the area Version: 1.0.0.20210113 Author: Arvin Zhao Date: 2021-01-13 12:20:06 Last Editors: Arvin Zhao LastEditTime: 2021-01-13 12:48:56 ''' def display_square_area() -> None: ''' Calculate and display the area of a square. ''' while True: try: side = float(input('Enter the length of a square\'s side: ')) print('Area:', side * side) # Calculate the area of a square by the formula "side length * side length". break except ValueError: print('Error! Invalid input!') def display_triangle_area() -> None: ''' Calculate and display the area of a triangle. ''' while True: try: base, height = [float(value) for value in input("Enter the base and height separated by space: ").split()] if base > 0 and height > 0: print('Area:', base * height / 2) # Calculate the area of a triangle by the formula "base * height / 2". break else: raise ValueError except ValueError: print('Error! Invalid input!') if __name__ == '__main__': print('1) Square') print('2) Triangle') while True: choice = input('Enter 1 or 2 as your choice: ').strip() if choice == '1': display_square_area() break elif choice == '2': display_triangle_area() break else: print('Error! No such option!')
""" Description: exercise: finding the area Version: 1.0.0.20210113 Author: Arvin Zhao Date: 2021-01-13 12:20:06 Last Editors: Arvin Zhao LastEditTime: 2021-01-13 12:48:56 """ def display_square_area() -> None: """ Calculate and display the area of a square. """ while True: try: side = float(input("Enter the length of a square's side: ")) print('Area:', side * side) break except ValueError: print('Error! Invalid input!') def display_triangle_area() -> None: """ Calculate and display the area of a triangle. """ while True: try: (base, height) = [float(value) for value in input('Enter the base and height separated by space: ').split()] if base > 0 and height > 0: print('Area:', base * height / 2) break else: raise ValueError except ValueError: print('Error! Invalid input!') if __name__ == '__main__': print('1) Square') print('2) Triangle') while True: choice = input('Enter 1 or 2 as your choice: ').strip() if choice == '1': display_square_area() break elif choice == '2': display_triangle_area() break else: print('Error! No such option!')
class MultiheadAttention(Module): __parameters__ = ["in_proj_weight", "in_proj_bias", ] __buffers__ = [] in_proj_weight : Tensor in_proj_bias : Tensor training : bool out_proj : __torch__.torch.nn.modules.linear.___torch_mangle_9395._LinearWithBias def forward(self: __torch__.torch.nn.modules.activation.___torch_mangle_9396.MultiheadAttention, argument_1: Tensor) -> Tensor: _0 = self.out_proj.bias _1 = self.out_proj.weight _2 = self.in_proj_bias _3 = self.in_proj_weight tgt_len = ops.prim.NumToTensor(torch.size(argument_1, 0)) _4 = int(tgt_len) _5 = int(tgt_len) bsz = ops.prim.NumToTensor(torch.size(argument_1, 1)) _6 = int(bsz) embed_dim = ops.prim.NumToTensor(torch.size(argument_1, 2)) _7 = int(embed_dim) head_dim = torch.floor_divide(embed_dim, CONSTANTS.c0) _8 = int(head_dim) _9 = int(head_dim) _10 = int(head_dim) output = torch.matmul(argument_1.float(), torch.t(_3).float()) _11 = torch.chunk(torch.add_(output, _2, alpha=1), 3, -1) q, k, v, = _11 q0 = torch.mul(q, CONSTANTS.c1) q1 = torch.contiguous(q0, memory_format=0) _12 = [_5, int(torch.mul(bsz, CONSTANTS.c0)), _10] q2 = torch.transpose(torch.view(q1, _12), 0, 1) _13 = torch.contiguous(k, memory_format=0) _14 = [-1, int(torch.mul(bsz, CONSTANTS.c0)), _9] k0 = torch.transpose(torch.view(_13, _14), 0, 1) _15 = torch.contiguous(v, memory_format=0) _16 = [-1, int(torch.mul(bsz, CONSTANTS.c0)), _8] v0 = torch.transpose(torch.view(_15, _16), 0, 1) attn_output_weights = torch.bmm(q2, torch.transpose(k0, 1, 2)) input = torch.softmax(attn_output_weights, -1, None) attn_output_weights0 = torch.dropout(input, 0., True) attn_output = torch.bmm(attn_output_weights0, v0) _17 = torch.contiguous(torch.transpose(attn_output, 0, 1), memory_format=0) input0 = torch.view(_17, [_4, _6, _7]) output0 = torch.matmul(input0, torch.t(_1)) return torch.add_(output0, _0, alpha=1) def forward1(self: __torch__.torch.nn.modules.activation.___torch_mangle_9396.MultiheadAttention, argument_1: Tensor) -> Tensor: _18 = self.out_proj.bias _19 = self.out_proj.weight _20 = self.in_proj_bias _21 = self.in_proj_weight tgt_len = ops.prim.NumToTensor(torch.size(argument_1, 0)) _22 = int(tgt_len) _23 = int(tgt_len) bsz = ops.prim.NumToTensor(torch.size(argument_1, 1)) _24 = int(bsz) embed_dim = ops.prim.NumToTensor(torch.size(argument_1, 2)) _25 = int(embed_dim) head_dim = torch.floor_divide(embed_dim, CONSTANTS.c0) _26 = int(head_dim) _27 = int(head_dim) _28 = int(head_dim) output = torch.matmul(argument_1, torch.t(_21)) _29 = torch.chunk(torch.add_(output, _20, alpha=1), 3, -1) q, k, v, = _29 q3 = torch.mul(q, CONSTANTS.c1) q4 = torch.contiguous(q3, memory_format=0) _30 = [_23, int(torch.mul(bsz, CONSTANTS.c0)), _28] q5 = torch.transpose(torch.view(q4, _30), 0, 1) _31 = torch.contiguous(k, memory_format=0) _32 = [-1, int(torch.mul(bsz, CONSTANTS.c0)), _27] k1 = torch.transpose(torch.view(_31, _32), 0, 1) _33 = torch.contiguous(v, memory_format=0) _34 = [-1, int(torch.mul(bsz, CONSTANTS.c0)), _26] v1 = torch.transpose(torch.view(_33, _34), 0, 1) attn_output_weights = torch.bmm(q5, torch.transpose(k1, 1, 2)) input = torch.softmax(attn_output_weights, -1, None) attn_output_weights1 = torch.dropout(input, 0., True) attn_output = torch.bmm(attn_output_weights1, v1) _35 = torch.contiguous(torch.transpose(attn_output, 0, 1), memory_format=0) input1 = torch.view(_35, [_22, _24, _25]) output1 = torch.matmul(input1, torch.t(_19)) return torch.add_(output1, _18, alpha=1)
class Multiheadattention(Module): __parameters__ = ['in_proj_weight', 'in_proj_bias'] __buffers__ = [] in_proj_weight: Tensor in_proj_bias: Tensor training: bool out_proj: __torch__.torch.nn.modules.linear.___torch_mangle_9395._LinearWithBias def forward(self: __torch__.torch.nn.modules.activation.___torch_mangle_9396.MultiheadAttention, argument_1: Tensor) -> Tensor: _0 = self.out_proj.bias _1 = self.out_proj.weight _2 = self.in_proj_bias _3 = self.in_proj_weight tgt_len = ops.prim.NumToTensor(torch.size(argument_1, 0)) _4 = int(tgt_len) _5 = int(tgt_len) bsz = ops.prim.NumToTensor(torch.size(argument_1, 1)) _6 = int(bsz) embed_dim = ops.prim.NumToTensor(torch.size(argument_1, 2)) _7 = int(embed_dim) head_dim = torch.floor_divide(embed_dim, CONSTANTS.c0) _8 = int(head_dim) _9 = int(head_dim) _10 = int(head_dim) output = torch.matmul(argument_1.float(), torch.t(_3).float()) _11 = torch.chunk(torch.add_(output, _2, alpha=1), 3, -1) (q, k, v) = _11 q0 = torch.mul(q, CONSTANTS.c1) q1 = torch.contiguous(q0, memory_format=0) _12 = [_5, int(torch.mul(bsz, CONSTANTS.c0)), _10] q2 = torch.transpose(torch.view(q1, _12), 0, 1) _13 = torch.contiguous(k, memory_format=0) _14 = [-1, int(torch.mul(bsz, CONSTANTS.c0)), _9] k0 = torch.transpose(torch.view(_13, _14), 0, 1) _15 = torch.contiguous(v, memory_format=0) _16 = [-1, int(torch.mul(bsz, CONSTANTS.c0)), _8] v0 = torch.transpose(torch.view(_15, _16), 0, 1) attn_output_weights = torch.bmm(q2, torch.transpose(k0, 1, 2)) input = torch.softmax(attn_output_weights, -1, None) attn_output_weights0 = torch.dropout(input, 0.0, True) attn_output = torch.bmm(attn_output_weights0, v0) _17 = torch.contiguous(torch.transpose(attn_output, 0, 1), memory_format=0) input0 = torch.view(_17, [_4, _6, _7]) output0 = torch.matmul(input0, torch.t(_1)) return torch.add_(output0, _0, alpha=1) def forward1(self: __torch__.torch.nn.modules.activation.___torch_mangle_9396.MultiheadAttention, argument_1: Tensor) -> Tensor: _18 = self.out_proj.bias _19 = self.out_proj.weight _20 = self.in_proj_bias _21 = self.in_proj_weight tgt_len = ops.prim.NumToTensor(torch.size(argument_1, 0)) _22 = int(tgt_len) _23 = int(tgt_len) bsz = ops.prim.NumToTensor(torch.size(argument_1, 1)) _24 = int(bsz) embed_dim = ops.prim.NumToTensor(torch.size(argument_1, 2)) _25 = int(embed_dim) head_dim = torch.floor_divide(embed_dim, CONSTANTS.c0) _26 = int(head_dim) _27 = int(head_dim) _28 = int(head_dim) output = torch.matmul(argument_1, torch.t(_21)) _29 = torch.chunk(torch.add_(output, _20, alpha=1), 3, -1) (q, k, v) = _29 q3 = torch.mul(q, CONSTANTS.c1) q4 = torch.contiguous(q3, memory_format=0) _30 = [_23, int(torch.mul(bsz, CONSTANTS.c0)), _28] q5 = torch.transpose(torch.view(q4, _30), 0, 1) _31 = torch.contiguous(k, memory_format=0) _32 = [-1, int(torch.mul(bsz, CONSTANTS.c0)), _27] k1 = torch.transpose(torch.view(_31, _32), 0, 1) _33 = torch.contiguous(v, memory_format=0) _34 = [-1, int(torch.mul(bsz, CONSTANTS.c0)), _26] v1 = torch.transpose(torch.view(_33, _34), 0, 1) attn_output_weights = torch.bmm(q5, torch.transpose(k1, 1, 2)) input = torch.softmax(attn_output_weights, -1, None) attn_output_weights1 = torch.dropout(input, 0.0, True) attn_output = torch.bmm(attn_output_weights1, v1) _35 = torch.contiguous(torch.transpose(attn_output, 0, 1), memory_format=0) input1 = torch.view(_35, [_22, _24, _25]) output1 = torch.matmul(input1, torch.t(_19)) return torch.add_(output1, _18, alpha=1)
# # PySNMP MIB module Nortel-MsCarrier-MscPassport-DataCollectionMIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Nortel-MsCarrier-MscPassport-DataCollectionMIB # Produced by pysmi-0.3.4 at Wed May 1 14:29:37 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueRangeConstraint, ValueSizeConstraint, SingleValueConstraint, ConstraintsUnion, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ValueSizeConstraint", "SingleValueConstraint", "ConstraintsUnion", "ConstraintsIntersection") Unsigned32, RowStatus, Integer32, Gauge32, DisplayString, Counter32, StorageType = mibBuilder.importSymbols("Nortel-MsCarrier-MscPassport-StandardTextualConventionsMIB", "Unsigned32", "RowStatus", "Integer32", "Gauge32", "DisplayString", "Counter32", "StorageType") NonReplicated, EnterpriseDateAndTime, AsciiString = mibBuilder.importSymbols("Nortel-MsCarrier-MscPassport-TextualConventionsMIB", "NonReplicated", "EnterpriseDateAndTime", "AsciiString") mscComponents, mscPassportMIBs = mibBuilder.importSymbols("Nortel-MsCarrier-MscPassport-UsefulDefinitionsMIB", "mscComponents", "mscPassportMIBs") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") ObjectIdentity, TimeTicks, Counter64, Unsigned32, MibIdentifier, MibScalar, MibTable, MibTableRow, MibTableColumn, Integer32, Bits, Gauge32, IpAddress, Counter32, NotificationType, iso, ModuleIdentity = mibBuilder.importSymbols("SNMPv2-SMI", "ObjectIdentity", "TimeTicks", "Counter64", "Unsigned32", "MibIdentifier", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Integer32", "Bits", "Gauge32", "IpAddress", "Counter32", "NotificationType", "iso", "ModuleIdentity") TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString") dataCollectionMIB = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 14)) mscCol = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21)) mscColRowStatusTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 1), ) if mibBuilder.loadTexts: mscColRowStatusTable.setStatus('mandatory') if mibBuilder.loadTexts: mscColRowStatusTable.setDescription('This entry controls the addition and deletion of mscCol components.') mscColRowStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 1, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-DataCollectionMIB", "mscColIndex")) if mibBuilder.loadTexts: mscColRowStatusEntry.setStatus('mandatory') if mibBuilder.loadTexts: mscColRowStatusEntry.setDescription('A single entry in the table represents a single mscCol component.') mscColRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 1, 1, 1), RowStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mscColRowStatus.setStatus('mandatory') if mibBuilder.loadTexts: mscColRowStatus.setDescription('This variable is used as the basis for SNMP naming of mscCol components. These components can be added.') mscColComponentName = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 1, 1, 2), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColComponentName.setStatus('mandatory') if mibBuilder.loadTexts: mscColComponentName.setDescription("This variable provides the component's string name for use with the ASCII Console Interface") mscColStorageType = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 1, 1, 4), StorageType()).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColStorageType.setStatus('mandatory') if mibBuilder.loadTexts: mscColStorageType.setDescription('This variable represents the storage type value for the mscCol tables.') mscColIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 1, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("accounting", 0), ("alarm", 1), ("log", 2), ("debug", 3), ("scn", 4), ("trap", 5), ("stats", 6)))) if mibBuilder.loadTexts: mscColIndex.setStatus('mandatory') if mibBuilder.loadTexts: mscColIndex.setDescription('This variable represents the index for the mscCol tables.') mscColProvTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 10), ) if mibBuilder.loadTexts: mscColProvTable.setStatus('mandatory') if mibBuilder.loadTexts: mscColProvTable.setDescription('This group specifies all of the provisioning data for a DCS Collector.') mscColProvEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 10, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-DataCollectionMIB", "mscColIndex")) if mibBuilder.loadTexts: mscColProvEntry.setStatus('mandatory') if mibBuilder.loadTexts: mscColProvEntry.setDescription('An entry in the mscColProvTable.') mscColAgentQueueSize = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 10, 1, 1), Unsigned32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(20, 10000), ))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mscColAgentQueueSize.setStatus('obsolete') if mibBuilder.loadTexts: mscColAgentQueueSize.setDescription("This attribute has been replaced with the agentQueueSize attribute in the Lp Engineering DataStream Ov component. Upon migration, if the existing provisioned value of this attribute is the same as the system default for this type of data, no new components are added because the default is what the DataStream component already would be using. Otherwise, if the value is not the same as the system default, then for each Lp which is provisioned at the time of the migration, a DataStream is provisioned and the Ov's agentQueueSize is set to the non-default value.") mscColStatsTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 11), ) if mibBuilder.loadTexts: mscColStatsTable.setStatus('mandatory') if mibBuilder.loadTexts: mscColStatsTable.setDescription('This group specifies the statistics operational attributes of the DCS Collector, Agent and Spooler components.') mscColStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 11, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-DataCollectionMIB", "mscColIndex")) if mibBuilder.loadTexts: mscColStatsEntry.setStatus('mandatory') if mibBuilder.loadTexts: mscColStatsEntry.setDescription('An entry in the mscColStatsTable.') mscColCurrentQueueSize = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 11, 1, 1), Gauge32().subtype(subtypeSpec=ValueRangeConstraint(0, 4294967295))).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColCurrentQueueSize.setStatus('mandatory') if mibBuilder.loadTexts: mscColCurrentQueueSize.setDescription('This gauge contains the current number of records held by this DCS component.') mscColRecordsRx = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 11, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColRecordsRx.setStatus('mandatory') if mibBuilder.loadTexts: mscColRecordsRx.setDescription('This counter contains the cumulative number of records received by a DCS component, from applications which send data to it, since the processor last restarted. This counter wraps to 0 when the maximum value is exceeded.') mscColRecordsDiscarded = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 11, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColRecordsDiscarded.setStatus('mandatory') if mibBuilder.loadTexts: mscColRecordsDiscarded.setDescription('This is the cumulative number of records discarded by this DCS component since the processor last restarted. This counter wraps to 0 when the maximum value is exceeded.') mscColTimesTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 266), ) if mibBuilder.loadTexts: mscColTimesTable.setStatus('mandatory') if mibBuilder.loadTexts: mscColTimesTable.setDescription('This attribute specifies the scheduled times at which data should be collected. Only accounting applications need the capability to generate data in this way. Setting this attribute for other streams has no effect. The user can enter the times in any order and duplicates are prevented at data entry. There is a limit of 24 entries, which is imposed at semantic check time. The collection times are triggered in chronological order. A semantic check error is issued if any 2 entries are less than 1 hour apart or if any 2 entries are more than 12 hours apart (which implies that if any entries are provided, there must be at least 2 entries). Note that by default (that is, in the absence of a provisioned schedule), a Virtual Circuit (VC) starts its own 12-hour accounting timer. If any collection times are provisioned here, then the Time- Of-Day-Accounting (TODA) method is used in place of 12-hour accounting. This is applicable to both Switched VCs and Permanent VCs.') mscColTimesEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 266, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-DataCollectionMIB", "mscColIndex"), (0, "Nortel-MsCarrier-MscPassport-DataCollectionMIB", "mscColTimesValue")) if mibBuilder.loadTexts: mscColTimesEntry.setStatus('mandatory') if mibBuilder.loadTexts: mscColTimesEntry.setDescription('An entry in the mscColTimesTable.') mscColTimesValue = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 266, 1, 1), EnterpriseDateAndTime().subtype(subtypeSpec=ValueSizeConstraint(5, 5)).setFixedLength(5)).setMaxAccess("readwrite") if mibBuilder.loadTexts: mscColTimesValue.setStatus('mandatory') if mibBuilder.loadTexts: mscColTimesValue.setDescription('This variable represents both the value and the index for the mscColTimesTable.') mscColTimesRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 266, 1, 2), RowStatus()).setMaxAccess("writeonly") if mibBuilder.loadTexts: mscColTimesRowStatus.setStatus('mandatory') if mibBuilder.loadTexts: mscColTimesRowStatus.setDescription('This variable is used to control the addition and deletion of individual values of the mscColTimesTable.') mscColLastTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 275), ) if mibBuilder.loadTexts: mscColLastTable.setStatus('obsolete') if mibBuilder.loadTexts: mscColLastTable.setDescription('Note: This was made obsolete in R4.1 (BD0108A). This attribute is used for Collector/stats and Collector/account. For statistics, when collection is turned off, or prior to the very first probe, the value is the empty list. Otherwise, this is the network time at which the last probe was sent out (that is, the last time that statistics were collected from, or at least reset by, the applications providing them). For accounting, when no entries exist in collectionTimes, or prior to the very first collection time, the value is the empty list. Otherwise, this is the network time at which the last time-of-day changeover occurred.') mscColLastEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 275, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-DataCollectionMIB", "mscColIndex"), (0, "Nortel-MsCarrier-MscPassport-DataCollectionMIB", "mscColLastValue")) if mibBuilder.loadTexts: mscColLastEntry.setStatus('obsolete') if mibBuilder.loadTexts: mscColLastEntry.setDescription('An entry in the mscColLastTable.') mscColLastValue = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 275, 1, 1), EnterpriseDateAndTime().subtype(subtypeSpec=ValueSizeConstraint(19, 19)).setFixedLength(19)).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColLastValue.setStatus('obsolete') if mibBuilder.loadTexts: mscColLastValue.setDescription('This variable represents both the value and the index for the mscColLastTable.') mscColPeakTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 279), ) if mibBuilder.loadTexts: mscColPeakTable.setStatus('mandatory') if mibBuilder.loadTexts: mscColPeakTable.setDescription('This attribute specifies the length of the accounting peak water mark interval. It is at least one minute and at most 15 minutes long. An accounting peak water mark within a given accounting interval is the accounting count which occured during a peak water mark interval with the highest traffic. Peak water marks are used to determine traffic bursts. If no value is provisioned for this attribute value of 5 minutes is assumed. Peak water mark is only measured if attribute collectionTimes in Collector/account is provisioned.') mscColPeakEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 279, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-DataCollectionMIB", "mscColIndex"), (0, "Nortel-MsCarrier-MscPassport-DataCollectionMIB", "mscColPeakValue")) if mibBuilder.loadTexts: mscColPeakEntry.setStatus('mandatory') if mibBuilder.loadTexts: mscColPeakEntry.setDescription('An entry in the mscColPeakTable.') mscColPeakValue = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 279, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 15))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mscColPeakValue.setStatus('mandatory') if mibBuilder.loadTexts: mscColPeakValue.setDescription('This variable represents both the value and the index for the mscColPeakTable.') mscColPeakRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 279, 1, 2), RowStatus()).setMaxAccess("writeonly") if mibBuilder.loadTexts: mscColPeakRowStatus.setStatus('mandatory') if mibBuilder.loadTexts: mscColPeakRowStatus.setDescription('This variable is used to control the addition and deletion of individual values of the mscColPeakTable.') mscColSp = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2)) mscColSpRowStatusTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 1), ) if mibBuilder.loadTexts: mscColSpRowStatusTable.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpRowStatusTable.setDescription('This entry controls the addition and deletion of mscColSp components.') mscColSpRowStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 1, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-DataCollectionMIB", "mscColIndex"), (0, "Nortel-MsCarrier-MscPassport-DataCollectionMIB", "mscColSpIndex")) if mibBuilder.loadTexts: mscColSpRowStatusEntry.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpRowStatusEntry.setDescription('A single entry in the table represents a single mscColSp component.') mscColSpRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 1, 1, 1), RowStatus()).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColSpRowStatus.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpRowStatus.setDescription('This variable is used as the basis for SNMP naming of mscColSp components. These components cannot be added nor deleted.') mscColSpComponentName = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 1, 1, 2), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColSpComponentName.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpComponentName.setDescription("This variable provides the component's string name for use with the ASCII Console Interface") mscColSpStorageType = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 1, 1, 4), StorageType()).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColSpStorageType.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpStorageType.setDescription('This variable represents the storage type value for the mscColSp tables.') mscColSpIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 1, 1, 10), NonReplicated()) if mibBuilder.loadTexts: mscColSpIndex.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpIndex.setDescription('This variable represents the index for the mscColSp tables.') mscColSpProvTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 10), ) if mibBuilder.loadTexts: mscColSpProvTable.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpProvTable.setDescription('This group specifies all of the provisioning data for a DCS Spooler.') mscColSpProvEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 10, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-DataCollectionMIB", "mscColIndex"), (0, "Nortel-MsCarrier-MscPassport-DataCollectionMIB", "mscColSpIndex")) if mibBuilder.loadTexts: mscColSpProvEntry.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpProvEntry.setDescription('An entry in the mscColSpProvTable.') mscColSpSpooling = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 10, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("off", 0), ("on", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mscColSpSpooling.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpSpooling.setDescription('This attribute specifies whether or not this type of data is spooled to the disk. If set to off, it is roughly equivalent to Locking the Spooler (except this will survive processor restarts). The following defaults are used: - alarm: on - accounting: on - log: on - debug: off - scn: on - trap: off (see Note below) - stats: on Note that SNMP Traps cannot be spooled. A semantic check prevents the user from setting the value to on for the trap stream.') mscColSpMaximumNumberOfFiles = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 10, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 200))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mscColSpMaximumNumberOfFiles.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpMaximumNumberOfFiles.setDescription("This attribute specifies the maximum number of files that should be kept on the disk in the directory containing the closed files of this type. The value 0 is defined to mean 'unlimited'. A different default for each type of Spooler is defined as follows: - alarm: 30 - accounting: 200 - debug: 2 - log: 10 - scn: 10 - trap: 2 (this value is meaningless and is ignored) - stats: 200") mscColSpStateTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 11), ) if mibBuilder.loadTexts: mscColSpStateTable.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpStateTable.setDescription('This group contains the three OSI State attributes and the six OSI Status attributes. The descriptions generically indicate what each attribute implies about the component. Note that not all the values and state combinations described here are supported by every component which uses this group. For component-specific information and the valid state combinations, refer to NTP 241- 7001-150, Passport Operations and Maintenance Guide.') mscColSpStateEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 11, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-DataCollectionMIB", "mscColIndex"), (0, "Nortel-MsCarrier-MscPassport-DataCollectionMIB", "mscColSpIndex")) if mibBuilder.loadTexts: mscColSpStateEntry.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpStateEntry.setDescription('An entry in the mscColSpStateTable.') mscColSpAdminState = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 11, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("locked", 0), ("unlocked", 1), ("shuttingDown", 2))).clone('unlocked')).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColSpAdminState.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpAdminState.setDescription('This attribute indicates the OSI Administrative State of the component. The value locked indicates that the component is administratively prohibited from providing services for its users. A Lock or Lock - force command has been previously issued for this component. When the value is locked, the value of usageState must be idle. The value shuttingDown indicates that the component is administratively permitted to provide service to its existing users only. A Lock command was issued against the component and it is in the process of shutting down. The value unlocked indicates that the component is administratively permitted to provide services for its users. To enter this state, issue an Unlock command to this component. The OSI Status attributes, if supported by the component, may provide more details, qualifying the state of the component.') mscColSpOperationalState = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 11, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1))).clone('disabled')).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColSpOperationalState.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpOperationalState.setDescription('This attribute indicates the OSI Operational State of the component. The value enabled indicates that the component is available for operation. Note that if adminState is locked, it would still not be providing service. The value disabled indicates that the component is not available for operation. For example, something is wrong with the component itself, or with another component on which this one depends. If the value is disabled, the usageState must be idle. The OSI Status attributes, if supported by the component, may provide more details, qualifying the state of the component.') mscColSpUsageState = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 11, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("idle", 0), ("active", 1), ("busy", 2))).clone('idle')).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColSpUsageState.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpUsageState.setDescription('This attribute indicates the OSI Usage State of the component. The value idle indicates that the component is not currently in use. The value active indicates that the component is in use and has spare capacity to provide for additional users. The value busy indicates that the component is in use and has no spare operating capacity for additional users at this time. The OSI Status attributes, if supported by the component, may provide more details, qualifying the state of the component.') mscColSpAvailabilityStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 11, 1, 4), OctetString().subtype(subtypeSpec=ValueSizeConstraint(2, 2)).setFixedLength(2)).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColSpAvailabilityStatus.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpAvailabilityStatus.setDescription('If supported by the component, this attribute indicates the OSI Availability status of the component. Note that, even though it is defined as a multi-valued set, at most one value is shown to the user. When no values are in the set, this indicates that either the attribute is not supported or that none of the status conditions described below are present. The value inTest indicates that the resource is undergoing a test procedure. If adminState is locked or shuttingDown, the normal users are precluded from using the resource and controlStatus is reservedForTest. Tests that do not exclude additional users can be present in any operational or administrative state but the reservedForTest condition should not be present. The value failed indicates that the component has an internal fault that prevents it from operating. The operationalState is disabled. The value dependency indicates that the component cannot operate because some other resource on which it depends is unavailable. The operationalState is disabled. The value powerOff indicates the resource requires power to be applied and it is not powered on. The operationalState is disabled. The value offLine indicates the resource requires a routine operation (either manual, automatic, or both) to be performed to place it on-line and make it available for use. The operationalState is disabled. The value offDuty indicates the resource is inactive in accordance with a predetermined time schedule. In the absence of other disabling conditions, the operationalState is enabled or disabled. The value degraded indicates the service provided by the component is degraded in some way, such as in speed or operating capacity. However, the resource remains available for service. The operationalState is enabled. The value notInstalled indicates the resource is not present. The operationalState is disabled. The value logFull is not used. Description of bits: inTest(0) failed(1) powerOff(2) offLine(3) offDuty(4) dependency(5) degraded(6) notInstalled(7) logFull(8)') mscColSpProceduralStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 11, 1, 5), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 1)).setFixedLength(1)).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColSpProceduralStatus.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpProceduralStatus.setDescription("If supported by the component, this attribute indicates the OSI Procedural status of the component. Note that, even though it is defined as a multi-valued set, at most one value is shown to the user. When no values are in the set, this indicates that either the attribute is not supported or that none of the status conditions described below are present. The value initializationRequired indicates (for a resource which doesn't initialize autonomously) that initialization is required before it can perform its normal functions, and this procedure has not been initiated. The operationalState is disabled. The value notInitialized indicates (for a resource which does initialize autonomously) that initialization is required before it can perform its normal functions, and this procedure has not been initiated. The operationalState may be enabled or disabled. The value initializing indicates that initialization has been initiated but is not yet complete. The operationalState may be enabled or disabled. The value reporting indicates the resource has completed some processing operation and is notifying the results. The operationalState is enabled. The value terminating indicates the component is in a termination phase. If the resource doesn't reinitialize autonomously, operationalState is disabled; otherwise it is enabled or disabled. Description of bits: initializationRequired(0) notInitialized(1) initializing(2) reporting(3) terminating(4)") mscColSpControlStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 11, 1, 6), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 1)).setFixedLength(1)).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColSpControlStatus.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpControlStatus.setDescription('If supported by the component, this attribute indicates the OSI Control status of the component. Note that, even though it is defined as a multi-valued set, at most one value is shown to the user. When no values are in the set, this indicates that either the attribute is not supported or that none of the status conditions described below are present. The value subjectToTest indicates the resource is available but tests may be conducted simultaneously at unpredictable times, which may cause it to exhibit unusual characteristics. The value partOfServicesLocked indicates that part of the service is restricted from users of a resource. The adminState is unlocked. The value reservedForTest indicates that the component is administratively unavailable because it is undergoing a test procedure. The adminState is locked. The value suspended indicates that the service has been administratively suspended. Description of bits: subjectToTest(0) partOfServicesLocked(1) reservedForTest(2) suspended(3)') mscColSpAlarmStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 11, 1, 7), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 1)).setFixedLength(1)).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColSpAlarmStatus.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpAlarmStatus.setDescription('If supported by the component, this attribute indicates the OSI Alarm status of the component. Note that, even though it is defined as a multi-valued set, at most one value is shown to the user. When no values are in the set, this indicates that either the attribute is not supported or that none of the status conditions described below are present. The value underRepair indicates the component is currently being repaired. The operationalState is enabled or disabled. The value critical indicates one or more critical alarms are outstanding against the component. Other, less severe, alarms may also be outstanding. The operationalState is enabled or disabled. The value major indicates one or more major alarms are outstanding against the component. Other, less severe, alarms may also be outstanding. The operationalState is enabled or disabled. The value minor indicates one or more minor alarms are outstanding against the component. Other, less severe, alarms may also be outstanding. The operationalState is enabled or disabled. The value alarmOutstanding generically indicates that an alarm of some severity is outstanding against the component. Description of bits: underRepair(0) critical(1) major(2) minor(3) alarmOutstanding(4)') mscColSpStandbyStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 11, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 15))).clone(namedValues=NamedValues(("hotStandby", 0), ("coldStandby", 1), ("providingService", 2), ("notSet", 15))).clone('notSet')).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColSpStandbyStatus.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpStandbyStatus.setDescription('If supported by the component, this attribute indicates the OSI Standby status of the component. The value notSet indicates that either the attribute is not supported or that none of the status conditions described below are present. Note that this is a non-standard value, used because the original specification indicated this attribute was set-valued and thus, did not provide a value to indicate that none of the other three are applicable. The value hotStandby indicates that the resource is not providing service but will be immediately able to take over the role of the resource to be backed up, without initialization activity, and containing the same information as the resource to be backed up. The value coldStandby indicates the resource is a backup for another resource but will not be immediately able to take over the role of the backed up resource and will require some initialization activity. The value providingService indicates that this component, as a backup resource, is currently backing up another resource.') mscColSpUnknownStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 11, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("false", 0), ("true", 1))).clone('false')).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColSpUnknownStatus.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpUnknownStatus.setDescription('This attribute indicates the OSI Unknown status of the component. The value false indicates that all of the other OSI State and Status attribute values can be considered accurate. The value true indicates that the actual state of the component is not known for sure.') mscColSpOperTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 12), ) if mibBuilder.loadTexts: mscColSpOperTable.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpOperTable.setDescription('This group contains the operational attributes specific to a DCS Spooler.') mscColSpOperEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 12, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-DataCollectionMIB", "mscColIndex"), (0, "Nortel-MsCarrier-MscPassport-DataCollectionMIB", "mscColSpIndex")) if mibBuilder.loadTexts: mscColSpOperEntry.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpOperEntry.setDescription('An entry in the mscColSpOperTable.') mscColSpSpoolingFileName = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 12, 1, 1), AsciiString().subtype(subtypeSpec=ValueSizeConstraint(0, 128))).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColSpSpoolingFileName.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpSpoolingFileName.setDescription('When spooling is on, this attribute contains the name of the open file into which data is currently being spooled. When spooling is off, the value of this attribute is the empty string.') mscColSpStatsTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 13), ) if mibBuilder.loadTexts: mscColSpStatsTable.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpStatsTable.setDescription('This group specifies the statistics operational attributes of the DCS Collector, Agent and Spooler components.') mscColSpStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 13, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-DataCollectionMIB", "mscColIndex"), (0, "Nortel-MsCarrier-MscPassport-DataCollectionMIB", "mscColSpIndex")) if mibBuilder.loadTexts: mscColSpStatsEntry.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpStatsEntry.setDescription('An entry in the mscColSpStatsTable.') mscColSpCurrentQueueSize = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 13, 1, 1), Gauge32().subtype(subtypeSpec=ValueRangeConstraint(0, 4294967295))).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColSpCurrentQueueSize.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpCurrentQueueSize.setDescription('This gauge contains the current number of records held by this DCS component.') mscColSpRecordsRx = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 13, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColSpRecordsRx.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpRecordsRx.setDescription('This counter contains the cumulative number of records received by a DCS component, from applications which send data to it, since the processor last restarted. This counter wraps to 0 when the maximum value is exceeded.') mscColSpRecordsDiscarded = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 13, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColSpRecordsDiscarded.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpRecordsDiscarded.setDescription('This is the cumulative number of records discarded by this DCS component since the processor last restarted. This counter wraps to 0 when the maximum value is exceeded.') mscColAg = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3)) mscColAgRowStatusTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 1), ) if mibBuilder.loadTexts: mscColAgRowStatusTable.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgRowStatusTable.setDescription('*** THIS TABLE CURRENTLY NOT IMPLEMENTED *** This entry controls the addition and deletion of mscColAg components.') mscColAgRowStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 1, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-DataCollectionMIB", "mscColIndex"), (0, "Nortel-MsCarrier-MscPassport-DataCollectionMIB", "mscColAgIndex")) if mibBuilder.loadTexts: mscColAgRowStatusEntry.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgRowStatusEntry.setDescription('A single entry in the table represents a single mscColAg component.') mscColAgRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 1, 1, 1), RowStatus()).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColAgRowStatus.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgRowStatus.setDescription('This variable is used as the basis for SNMP naming of mscColAg components. These components cannot be added nor deleted.') mscColAgComponentName = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 1, 1, 2), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColAgComponentName.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgComponentName.setDescription("This variable provides the component's string name for use with the ASCII Console Interface") mscColAgStorageType = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 1, 1, 4), StorageType()).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColAgStorageType.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgStorageType.setDescription('This variable represents the storage type value for the mscColAg tables.') mscColAgIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 1, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 15))) if mibBuilder.loadTexts: mscColAgIndex.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgIndex.setDescription('This variable represents the index for the mscColAg tables.') mscColAgStatsTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 10), ) if mibBuilder.loadTexts: mscColAgStatsTable.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgStatsTable.setDescription('*** THIS TABLE CURRENTLY NOT IMPLEMENTED *** This group specifies the statistics operational attributes of the DCS Collector, Agent and Spooler components.') mscColAgStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 10, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-DataCollectionMIB", "mscColIndex"), (0, "Nortel-MsCarrier-MscPassport-DataCollectionMIB", "mscColAgIndex")) if mibBuilder.loadTexts: mscColAgStatsEntry.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgStatsEntry.setDescription('An entry in the mscColAgStatsTable.') mscColAgCurrentQueueSize = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 10, 1, 1), Gauge32().subtype(subtypeSpec=ValueRangeConstraint(0, 4294967295))).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColAgCurrentQueueSize.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgCurrentQueueSize.setDescription('This gauge contains the current number of records held by this DCS component.') mscColAgRecordsRx = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 10, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColAgRecordsRx.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgRecordsRx.setDescription('This counter contains the cumulative number of records received by a DCS component, from applications which send data to it, since the processor last restarted. This counter wraps to 0 when the maximum value is exceeded.') mscColAgRecordsDiscarded = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 10, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColAgRecordsDiscarded.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgRecordsDiscarded.setDescription('This is the cumulative number of records discarded by this DCS component since the processor last restarted. This counter wraps to 0 when the maximum value is exceeded.') mscColAgAgentStatsTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 11), ) if mibBuilder.loadTexts: mscColAgAgentStatsTable.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgAgentStatsTable.setDescription('*** THIS TABLE CURRENTLY NOT IMPLEMENTED *** This group contains the statistical attributes specific to the DCS Agent components.') mscColAgAgentStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 11, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-DataCollectionMIB", "mscColIndex"), (0, "Nortel-MsCarrier-MscPassport-DataCollectionMIB", "mscColAgIndex")) if mibBuilder.loadTexts: mscColAgAgentStatsEntry.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgAgentStatsEntry.setDescription('An entry in the mscColAgAgentStatsTable.') mscColAgRecordsNotGenerated = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 11, 1, 1), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mscColAgRecordsNotGenerated.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgRecordsNotGenerated.setDescription('This attribute counts the records of a particular event type on this Card which could not be generated by some application due to some problem such as insufficient resources. One cannot tell exactly which event could not be generated, nor which application instance tried to generate it, but when this count increases, it is an indicator that some re-engineering may be required and will provide some idea as to why a record is missing. This counter wraps to 0 when the maximum value is exceeded.') dataCollectionGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 14, 1)) dataCollectionGroupCA = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 14, 1, 1)) dataCollectionGroupCA02 = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 14, 1, 1, 3)) dataCollectionGroupCA02A = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 14, 1, 1, 3, 2)) dataCollectionCapabilities = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 14, 3)) dataCollectionCapabilitiesCA = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 14, 3, 1)) dataCollectionCapabilitiesCA02 = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 14, 3, 1, 3)) dataCollectionCapabilitiesCA02A = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 14, 3, 1, 3, 2)) mibBuilder.exportSymbols("Nortel-MsCarrier-MscPassport-DataCollectionMIB", mscColSpComponentName=mscColSpComponentName, dataCollectionCapabilitiesCA02=dataCollectionCapabilitiesCA02, mscColAgCurrentQueueSize=mscColAgCurrentQueueSize, mscColProvEntry=mscColProvEntry, mscColAgRowStatus=mscColAgRowStatus, mscColTimesRowStatus=mscColTimesRowStatus, mscColRowStatusTable=mscColRowStatusTable, mscColStorageType=mscColStorageType, mscColSpStorageType=mscColSpStorageType, mscColSpCurrentQueueSize=mscColSpCurrentQueueSize, mscColSpRowStatusEntry=mscColSpRowStatusEntry, mscColSpRowStatusTable=mscColSpRowStatusTable, mscColStatsEntry=mscColStatsEntry, mscColProvTable=mscColProvTable, mscColRecordsDiscarded=mscColRecordsDiscarded, mscColTimesValue=mscColTimesValue, mscColPeakRowStatus=mscColPeakRowStatus, mscColSpSpoolingFileName=mscColSpSpoolingFileName, mscColRecordsRx=mscColRecordsRx, mscColSpSpooling=mscColSpSpooling, mscColAgStatsTable=mscColAgStatsTable, dataCollectionCapabilitiesCA=dataCollectionCapabilitiesCA, mscColLastEntry=mscColLastEntry, mscColSpRowStatus=mscColSpRowStatus, dataCollectionGroupCA02=dataCollectionGroupCA02, mscColAg=mscColAg, mscColAgentQueueSize=mscColAgentQueueSize, mscColAgComponentName=mscColAgComponentName, mscColAgAgentStatsTable=mscColAgAgentStatsTable, mscColSpStateTable=mscColSpStateTable, mscColSpMaximumNumberOfFiles=mscColSpMaximumNumberOfFiles, mscColSpStatsTable=mscColSpStatsTable, mscColPeakValue=mscColPeakValue, mscColSpOperEntry=mscColSpOperEntry, mscColAgIndex=mscColAgIndex, mscColSpProceduralStatus=mscColSpProceduralStatus, dataCollectionMIB=dataCollectionMIB, dataCollectionGroupCA=dataCollectionGroupCA, mscColSpAvailabilityStatus=mscColSpAvailabilityStatus, mscColTimesTable=mscColTimesTable, mscColSpRecordsRx=mscColSpRecordsRx, mscColRowStatusEntry=mscColRowStatusEntry, mscColSpProvEntry=mscColSpProvEntry, dataCollectionCapabilities=dataCollectionCapabilities, mscColSpIndex=mscColSpIndex, mscColIndex=mscColIndex, mscColSpOperationalState=mscColSpOperationalState, mscColSpStateEntry=mscColSpStateEntry, mscColLastTable=mscColLastTable, mscColAgRecordsRx=mscColAgRecordsRx, mscColAgRowStatusTable=mscColAgRowStatusTable, mscColSp=mscColSp, mscColSpUnknownStatus=mscColSpUnknownStatus, mscColAgStatsEntry=mscColAgStatsEntry, mscColLastValue=mscColLastValue, mscColSpStandbyStatus=mscColSpStandbyStatus, dataCollectionGroup=dataCollectionGroup, mscColAgRowStatusEntry=mscColAgRowStatusEntry, mscColStatsTable=mscColStatsTable, mscColSpProvTable=mscColSpProvTable, mscColAgAgentStatsEntry=mscColAgAgentStatsEntry, mscColSpAdminState=mscColSpAdminState, mscColComponentName=mscColComponentName, mscColCurrentQueueSize=mscColCurrentQueueSize, mscColPeakEntry=mscColPeakEntry, mscColAgRecordsDiscarded=mscColAgRecordsDiscarded, mscColRowStatus=mscColRowStatus, mscColPeakTable=mscColPeakTable, mscColAgRecordsNotGenerated=mscColAgRecordsNotGenerated, dataCollectionCapabilitiesCA02A=dataCollectionCapabilitiesCA02A, mscCol=mscCol, mscColSpStatsEntry=mscColSpStatsEntry, mscColSpRecordsDiscarded=mscColSpRecordsDiscarded, mscColTimesEntry=mscColTimesEntry, mscColSpControlStatus=mscColSpControlStatus, mscColSpUsageState=mscColSpUsageState, dataCollectionGroupCA02A=dataCollectionGroupCA02A, mscColAgStorageType=mscColAgStorageType, mscColSpAlarmStatus=mscColSpAlarmStatus, mscColSpOperTable=mscColSpOperTable)
(object_identifier, octet_string, integer) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'OctetString', 'Integer') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (value_range_constraint, value_size_constraint, single_value_constraint, constraints_union, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'ValueSizeConstraint', 'SingleValueConstraint', 'ConstraintsUnion', 'ConstraintsIntersection') (unsigned32, row_status, integer32, gauge32, display_string, counter32, storage_type) = mibBuilder.importSymbols('Nortel-MsCarrier-MscPassport-StandardTextualConventionsMIB', 'Unsigned32', 'RowStatus', 'Integer32', 'Gauge32', 'DisplayString', 'Counter32', 'StorageType') (non_replicated, enterprise_date_and_time, ascii_string) = mibBuilder.importSymbols('Nortel-MsCarrier-MscPassport-TextualConventionsMIB', 'NonReplicated', 'EnterpriseDateAndTime', 'AsciiString') (msc_components, msc_passport_mi_bs) = mibBuilder.importSymbols('Nortel-MsCarrier-MscPassport-UsefulDefinitionsMIB', 'mscComponents', 'mscPassportMIBs') (notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance') (object_identity, time_ticks, counter64, unsigned32, mib_identifier, mib_scalar, mib_table, mib_table_row, mib_table_column, integer32, bits, gauge32, ip_address, counter32, notification_type, iso, module_identity) = mibBuilder.importSymbols('SNMPv2-SMI', 'ObjectIdentity', 'TimeTicks', 'Counter64', 'Unsigned32', 'MibIdentifier', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Integer32', 'Bits', 'Gauge32', 'IpAddress', 'Counter32', 'NotificationType', 'iso', 'ModuleIdentity') (textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString') data_collection_mib = mib_identifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 14)) msc_col = mib_identifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21)) msc_col_row_status_table = mib_table((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 1)) if mibBuilder.loadTexts: mscColRowStatusTable.setStatus('mandatory') if mibBuilder.loadTexts: mscColRowStatusTable.setDescription('This entry controls the addition and deletion of mscCol components.') msc_col_row_status_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 1, 1)).setIndexNames((0, 'Nortel-MsCarrier-MscPassport-DataCollectionMIB', 'mscColIndex')) if mibBuilder.loadTexts: mscColRowStatusEntry.setStatus('mandatory') if mibBuilder.loadTexts: mscColRowStatusEntry.setDescription('A single entry in the table represents a single mscCol component.') msc_col_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 1, 1, 1), row_status()).setMaxAccess('readwrite') if mibBuilder.loadTexts: mscColRowStatus.setStatus('mandatory') if mibBuilder.loadTexts: mscColRowStatus.setDescription('This variable is used as the basis for SNMP naming of mscCol components. These components can be added.') msc_col_component_name = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 1, 1, 2), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColComponentName.setStatus('mandatory') if mibBuilder.loadTexts: mscColComponentName.setDescription("This variable provides the component's string name for use with the ASCII Console Interface") msc_col_storage_type = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 1, 1, 4), storage_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColStorageType.setStatus('mandatory') if mibBuilder.loadTexts: mscColStorageType.setDescription('This variable represents the storage type value for the mscCol tables.') msc_col_index = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 1, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6))).clone(namedValues=named_values(('accounting', 0), ('alarm', 1), ('log', 2), ('debug', 3), ('scn', 4), ('trap', 5), ('stats', 6)))) if mibBuilder.loadTexts: mscColIndex.setStatus('mandatory') if mibBuilder.loadTexts: mscColIndex.setDescription('This variable represents the index for the mscCol tables.') msc_col_prov_table = mib_table((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 10)) if mibBuilder.loadTexts: mscColProvTable.setStatus('mandatory') if mibBuilder.loadTexts: mscColProvTable.setDescription('This group specifies all of the provisioning data for a DCS Collector.') msc_col_prov_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 10, 1)).setIndexNames((0, 'Nortel-MsCarrier-MscPassport-DataCollectionMIB', 'mscColIndex')) if mibBuilder.loadTexts: mscColProvEntry.setStatus('mandatory') if mibBuilder.loadTexts: mscColProvEntry.setDescription('An entry in the mscColProvTable.') msc_col_agent_queue_size = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 10, 1, 1), unsigned32().subtype(subtypeSpec=constraints_union(value_range_constraint(0, 0), value_range_constraint(20, 10000)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: mscColAgentQueueSize.setStatus('obsolete') if mibBuilder.loadTexts: mscColAgentQueueSize.setDescription("This attribute has been replaced with the agentQueueSize attribute in the Lp Engineering DataStream Ov component. Upon migration, if the existing provisioned value of this attribute is the same as the system default for this type of data, no new components are added because the default is what the DataStream component already would be using. Otherwise, if the value is not the same as the system default, then for each Lp which is provisioned at the time of the migration, a DataStream is provisioned and the Ov's agentQueueSize is set to the non-default value.") msc_col_stats_table = mib_table((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 11)) if mibBuilder.loadTexts: mscColStatsTable.setStatus('mandatory') if mibBuilder.loadTexts: mscColStatsTable.setDescription('This group specifies the statistics operational attributes of the DCS Collector, Agent and Spooler components.') msc_col_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 11, 1)).setIndexNames((0, 'Nortel-MsCarrier-MscPassport-DataCollectionMIB', 'mscColIndex')) if mibBuilder.loadTexts: mscColStatsEntry.setStatus('mandatory') if mibBuilder.loadTexts: mscColStatsEntry.setDescription('An entry in the mscColStatsTable.') msc_col_current_queue_size = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 11, 1, 1), gauge32().subtype(subtypeSpec=value_range_constraint(0, 4294967295))).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColCurrentQueueSize.setStatus('mandatory') if mibBuilder.loadTexts: mscColCurrentQueueSize.setDescription('This gauge contains the current number of records held by this DCS component.') msc_col_records_rx = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 11, 1, 2), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColRecordsRx.setStatus('mandatory') if mibBuilder.loadTexts: mscColRecordsRx.setDescription('This counter contains the cumulative number of records received by a DCS component, from applications which send data to it, since the processor last restarted. This counter wraps to 0 when the maximum value is exceeded.') msc_col_records_discarded = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 11, 1, 3), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColRecordsDiscarded.setStatus('mandatory') if mibBuilder.loadTexts: mscColRecordsDiscarded.setDescription('This is the cumulative number of records discarded by this DCS component since the processor last restarted. This counter wraps to 0 when the maximum value is exceeded.') msc_col_times_table = mib_table((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 266)) if mibBuilder.loadTexts: mscColTimesTable.setStatus('mandatory') if mibBuilder.loadTexts: mscColTimesTable.setDescription('This attribute specifies the scheduled times at which data should be collected. Only accounting applications need the capability to generate data in this way. Setting this attribute for other streams has no effect. The user can enter the times in any order and duplicates are prevented at data entry. There is a limit of 24 entries, which is imposed at semantic check time. The collection times are triggered in chronological order. A semantic check error is issued if any 2 entries are less than 1 hour apart or if any 2 entries are more than 12 hours apart (which implies that if any entries are provided, there must be at least 2 entries). Note that by default (that is, in the absence of a provisioned schedule), a Virtual Circuit (VC) starts its own 12-hour accounting timer. If any collection times are provisioned here, then the Time- Of-Day-Accounting (TODA) method is used in place of 12-hour accounting. This is applicable to both Switched VCs and Permanent VCs.') msc_col_times_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 266, 1)).setIndexNames((0, 'Nortel-MsCarrier-MscPassport-DataCollectionMIB', 'mscColIndex'), (0, 'Nortel-MsCarrier-MscPassport-DataCollectionMIB', 'mscColTimesValue')) if mibBuilder.loadTexts: mscColTimesEntry.setStatus('mandatory') if mibBuilder.loadTexts: mscColTimesEntry.setDescription('An entry in the mscColTimesTable.') msc_col_times_value = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 266, 1, 1), enterprise_date_and_time().subtype(subtypeSpec=value_size_constraint(5, 5)).setFixedLength(5)).setMaxAccess('readwrite') if mibBuilder.loadTexts: mscColTimesValue.setStatus('mandatory') if mibBuilder.loadTexts: mscColTimesValue.setDescription('This variable represents both the value and the index for the mscColTimesTable.') msc_col_times_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 266, 1, 2), row_status()).setMaxAccess('writeonly') if mibBuilder.loadTexts: mscColTimesRowStatus.setStatus('mandatory') if mibBuilder.loadTexts: mscColTimesRowStatus.setDescription('This variable is used to control the addition and deletion of individual values of the mscColTimesTable.') msc_col_last_table = mib_table((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 275)) if mibBuilder.loadTexts: mscColLastTable.setStatus('obsolete') if mibBuilder.loadTexts: mscColLastTable.setDescription('Note: This was made obsolete in R4.1 (BD0108A). This attribute is used for Collector/stats and Collector/account. For statistics, when collection is turned off, or prior to the very first probe, the value is the empty list. Otherwise, this is the network time at which the last probe was sent out (that is, the last time that statistics were collected from, or at least reset by, the applications providing them). For accounting, when no entries exist in collectionTimes, or prior to the very first collection time, the value is the empty list. Otherwise, this is the network time at which the last time-of-day changeover occurred.') msc_col_last_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 275, 1)).setIndexNames((0, 'Nortel-MsCarrier-MscPassport-DataCollectionMIB', 'mscColIndex'), (0, 'Nortel-MsCarrier-MscPassport-DataCollectionMIB', 'mscColLastValue')) if mibBuilder.loadTexts: mscColLastEntry.setStatus('obsolete') if mibBuilder.loadTexts: mscColLastEntry.setDescription('An entry in the mscColLastTable.') msc_col_last_value = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 275, 1, 1), enterprise_date_and_time().subtype(subtypeSpec=value_size_constraint(19, 19)).setFixedLength(19)).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColLastValue.setStatus('obsolete') if mibBuilder.loadTexts: mscColLastValue.setDescription('This variable represents both the value and the index for the mscColLastTable.') msc_col_peak_table = mib_table((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 279)) if mibBuilder.loadTexts: mscColPeakTable.setStatus('mandatory') if mibBuilder.loadTexts: mscColPeakTable.setDescription('This attribute specifies the length of the accounting peak water mark interval. It is at least one minute and at most 15 minutes long. An accounting peak water mark within a given accounting interval is the accounting count which occured during a peak water mark interval with the highest traffic. Peak water marks are used to determine traffic bursts. If no value is provisioned for this attribute value of 5 minutes is assumed. Peak water mark is only measured if attribute collectionTimes in Collector/account is provisioned.') msc_col_peak_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 279, 1)).setIndexNames((0, 'Nortel-MsCarrier-MscPassport-DataCollectionMIB', 'mscColIndex'), (0, 'Nortel-MsCarrier-MscPassport-DataCollectionMIB', 'mscColPeakValue')) if mibBuilder.loadTexts: mscColPeakEntry.setStatus('mandatory') if mibBuilder.loadTexts: mscColPeakEntry.setDescription('An entry in the mscColPeakTable.') msc_col_peak_value = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 279, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 15))).setMaxAccess('readwrite') if mibBuilder.loadTexts: mscColPeakValue.setStatus('mandatory') if mibBuilder.loadTexts: mscColPeakValue.setDescription('This variable represents both the value and the index for the mscColPeakTable.') msc_col_peak_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 279, 1, 2), row_status()).setMaxAccess('writeonly') if mibBuilder.loadTexts: mscColPeakRowStatus.setStatus('mandatory') if mibBuilder.loadTexts: mscColPeakRowStatus.setDescription('This variable is used to control the addition and deletion of individual values of the mscColPeakTable.') msc_col_sp = mib_identifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2)) msc_col_sp_row_status_table = mib_table((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 1)) if mibBuilder.loadTexts: mscColSpRowStatusTable.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpRowStatusTable.setDescription('This entry controls the addition and deletion of mscColSp components.') msc_col_sp_row_status_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 1, 1)).setIndexNames((0, 'Nortel-MsCarrier-MscPassport-DataCollectionMIB', 'mscColIndex'), (0, 'Nortel-MsCarrier-MscPassport-DataCollectionMIB', 'mscColSpIndex')) if mibBuilder.loadTexts: mscColSpRowStatusEntry.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpRowStatusEntry.setDescription('A single entry in the table represents a single mscColSp component.') msc_col_sp_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 1, 1, 1), row_status()).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColSpRowStatus.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpRowStatus.setDescription('This variable is used as the basis for SNMP naming of mscColSp components. These components cannot be added nor deleted.') msc_col_sp_component_name = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 1, 1, 2), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColSpComponentName.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpComponentName.setDescription("This variable provides the component's string name for use with the ASCII Console Interface") msc_col_sp_storage_type = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 1, 1, 4), storage_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColSpStorageType.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpStorageType.setDescription('This variable represents the storage type value for the mscColSp tables.') msc_col_sp_index = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 1, 1, 10), non_replicated()) if mibBuilder.loadTexts: mscColSpIndex.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpIndex.setDescription('This variable represents the index for the mscColSp tables.') msc_col_sp_prov_table = mib_table((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 10)) if mibBuilder.loadTexts: mscColSpProvTable.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpProvTable.setDescription('This group specifies all of the provisioning data for a DCS Spooler.') msc_col_sp_prov_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 10, 1)).setIndexNames((0, 'Nortel-MsCarrier-MscPassport-DataCollectionMIB', 'mscColIndex'), (0, 'Nortel-MsCarrier-MscPassport-DataCollectionMIB', 'mscColSpIndex')) if mibBuilder.loadTexts: mscColSpProvEntry.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpProvEntry.setDescription('An entry in the mscColSpProvTable.') msc_col_sp_spooling = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 10, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('off', 0), ('on', 1)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: mscColSpSpooling.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpSpooling.setDescription('This attribute specifies whether or not this type of data is spooled to the disk. If set to off, it is roughly equivalent to Locking the Spooler (except this will survive processor restarts). The following defaults are used: - alarm: on - accounting: on - log: on - debug: off - scn: on - trap: off (see Note below) - stats: on Note that SNMP Traps cannot be spooled. A semantic check prevents the user from setting the value to on for the trap stream.') msc_col_sp_maximum_number_of_files = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 10, 1, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 200))).setMaxAccess('readwrite') if mibBuilder.loadTexts: mscColSpMaximumNumberOfFiles.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpMaximumNumberOfFiles.setDescription("This attribute specifies the maximum number of files that should be kept on the disk in the directory containing the closed files of this type. The value 0 is defined to mean 'unlimited'. A different default for each type of Spooler is defined as follows: - alarm: 30 - accounting: 200 - debug: 2 - log: 10 - scn: 10 - trap: 2 (this value is meaningless and is ignored) - stats: 200") msc_col_sp_state_table = mib_table((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 11)) if mibBuilder.loadTexts: mscColSpStateTable.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpStateTable.setDescription('This group contains the three OSI State attributes and the six OSI Status attributes. The descriptions generically indicate what each attribute implies about the component. Note that not all the values and state combinations described here are supported by every component which uses this group. For component-specific information and the valid state combinations, refer to NTP 241- 7001-150, Passport Operations and Maintenance Guide.') msc_col_sp_state_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 11, 1)).setIndexNames((0, 'Nortel-MsCarrier-MscPassport-DataCollectionMIB', 'mscColIndex'), (0, 'Nortel-MsCarrier-MscPassport-DataCollectionMIB', 'mscColSpIndex')) if mibBuilder.loadTexts: mscColSpStateEntry.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpStateEntry.setDescription('An entry in the mscColSpStateTable.') msc_col_sp_admin_state = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 11, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('locked', 0), ('unlocked', 1), ('shuttingDown', 2))).clone('unlocked')).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColSpAdminState.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpAdminState.setDescription('This attribute indicates the OSI Administrative State of the component. The value locked indicates that the component is administratively prohibited from providing services for its users. A Lock or Lock - force command has been previously issued for this component. When the value is locked, the value of usageState must be idle. The value shuttingDown indicates that the component is administratively permitted to provide service to its existing users only. A Lock command was issued against the component and it is in the process of shutting down. The value unlocked indicates that the component is administratively permitted to provide services for its users. To enter this state, issue an Unlock command to this component. The OSI Status attributes, if supported by the component, may provide more details, qualifying the state of the component.') msc_col_sp_operational_state = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 11, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('disabled', 0), ('enabled', 1))).clone('disabled')).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColSpOperationalState.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpOperationalState.setDescription('This attribute indicates the OSI Operational State of the component. The value enabled indicates that the component is available for operation. Note that if adminState is locked, it would still not be providing service. The value disabled indicates that the component is not available for operation. For example, something is wrong with the component itself, or with another component on which this one depends. If the value is disabled, the usageState must be idle. The OSI Status attributes, if supported by the component, may provide more details, qualifying the state of the component.') msc_col_sp_usage_state = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 11, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('idle', 0), ('active', 1), ('busy', 2))).clone('idle')).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColSpUsageState.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpUsageState.setDescription('This attribute indicates the OSI Usage State of the component. The value idle indicates that the component is not currently in use. The value active indicates that the component is in use and has spare capacity to provide for additional users. The value busy indicates that the component is in use and has no spare operating capacity for additional users at this time. The OSI Status attributes, if supported by the component, may provide more details, qualifying the state of the component.') msc_col_sp_availability_status = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 11, 1, 4), octet_string().subtype(subtypeSpec=value_size_constraint(2, 2)).setFixedLength(2)).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColSpAvailabilityStatus.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpAvailabilityStatus.setDescription('If supported by the component, this attribute indicates the OSI Availability status of the component. Note that, even though it is defined as a multi-valued set, at most one value is shown to the user. When no values are in the set, this indicates that either the attribute is not supported or that none of the status conditions described below are present. The value inTest indicates that the resource is undergoing a test procedure. If adminState is locked or shuttingDown, the normal users are precluded from using the resource and controlStatus is reservedForTest. Tests that do not exclude additional users can be present in any operational or administrative state but the reservedForTest condition should not be present. The value failed indicates that the component has an internal fault that prevents it from operating. The operationalState is disabled. The value dependency indicates that the component cannot operate because some other resource on which it depends is unavailable. The operationalState is disabled. The value powerOff indicates the resource requires power to be applied and it is not powered on. The operationalState is disabled. The value offLine indicates the resource requires a routine operation (either manual, automatic, or both) to be performed to place it on-line and make it available for use. The operationalState is disabled. The value offDuty indicates the resource is inactive in accordance with a predetermined time schedule. In the absence of other disabling conditions, the operationalState is enabled or disabled. The value degraded indicates the service provided by the component is degraded in some way, such as in speed or operating capacity. However, the resource remains available for service. The operationalState is enabled. The value notInstalled indicates the resource is not present. The operationalState is disabled. The value logFull is not used. Description of bits: inTest(0) failed(1) powerOff(2) offLine(3) offDuty(4) dependency(5) degraded(6) notInstalled(7) logFull(8)') msc_col_sp_procedural_status = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 11, 1, 5), octet_string().subtype(subtypeSpec=value_size_constraint(1, 1)).setFixedLength(1)).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColSpProceduralStatus.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpProceduralStatus.setDescription("If supported by the component, this attribute indicates the OSI Procedural status of the component. Note that, even though it is defined as a multi-valued set, at most one value is shown to the user. When no values are in the set, this indicates that either the attribute is not supported or that none of the status conditions described below are present. The value initializationRequired indicates (for a resource which doesn't initialize autonomously) that initialization is required before it can perform its normal functions, and this procedure has not been initiated. The operationalState is disabled. The value notInitialized indicates (for a resource which does initialize autonomously) that initialization is required before it can perform its normal functions, and this procedure has not been initiated. The operationalState may be enabled or disabled. The value initializing indicates that initialization has been initiated but is not yet complete. The operationalState may be enabled or disabled. The value reporting indicates the resource has completed some processing operation and is notifying the results. The operationalState is enabled. The value terminating indicates the component is in a termination phase. If the resource doesn't reinitialize autonomously, operationalState is disabled; otherwise it is enabled or disabled. Description of bits: initializationRequired(0) notInitialized(1) initializing(2) reporting(3) terminating(4)") msc_col_sp_control_status = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 11, 1, 6), octet_string().subtype(subtypeSpec=value_size_constraint(1, 1)).setFixedLength(1)).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColSpControlStatus.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpControlStatus.setDescription('If supported by the component, this attribute indicates the OSI Control status of the component. Note that, even though it is defined as a multi-valued set, at most one value is shown to the user. When no values are in the set, this indicates that either the attribute is not supported or that none of the status conditions described below are present. The value subjectToTest indicates the resource is available but tests may be conducted simultaneously at unpredictable times, which may cause it to exhibit unusual characteristics. The value partOfServicesLocked indicates that part of the service is restricted from users of a resource. The adminState is unlocked. The value reservedForTest indicates that the component is administratively unavailable because it is undergoing a test procedure. The adminState is locked. The value suspended indicates that the service has been administratively suspended. Description of bits: subjectToTest(0) partOfServicesLocked(1) reservedForTest(2) suspended(3)') msc_col_sp_alarm_status = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 11, 1, 7), octet_string().subtype(subtypeSpec=value_size_constraint(1, 1)).setFixedLength(1)).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColSpAlarmStatus.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpAlarmStatus.setDescription('If supported by the component, this attribute indicates the OSI Alarm status of the component. Note that, even though it is defined as a multi-valued set, at most one value is shown to the user. When no values are in the set, this indicates that either the attribute is not supported or that none of the status conditions described below are present. The value underRepair indicates the component is currently being repaired. The operationalState is enabled or disabled. The value critical indicates one or more critical alarms are outstanding against the component. Other, less severe, alarms may also be outstanding. The operationalState is enabled or disabled. The value major indicates one or more major alarms are outstanding against the component. Other, less severe, alarms may also be outstanding. The operationalState is enabled or disabled. The value minor indicates one or more minor alarms are outstanding against the component. Other, less severe, alarms may also be outstanding. The operationalState is enabled or disabled. The value alarmOutstanding generically indicates that an alarm of some severity is outstanding against the component. Description of bits: underRepair(0) critical(1) major(2) minor(3) alarmOutstanding(4)') msc_col_sp_standby_status = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 11, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 15))).clone(namedValues=named_values(('hotStandby', 0), ('coldStandby', 1), ('providingService', 2), ('notSet', 15))).clone('notSet')).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColSpStandbyStatus.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpStandbyStatus.setDescription('If supported by the component, this attribute indicates the OSI Standby status of the component. The value notSet indicates that either the attribute is not supported or that none of the status conditions described below are present. Note that this is a non-standard value, used because the original specification indicated this attribute was set-valued and thus, did not provide a value to indicate that none of the other three are applicable. The value hotStandby indicates that the resource is not providing service but will be immediately able to take over the role of the resource to be backed up, without initialization activity, and containing the same information as the resource to be backed up. The value coldStandby indicates the resource is a backup for another resource but will not be immediately able to take over the role of the backed up resource and will require some initialization activity. The value providingService indicates that this component, as a backup resource, is currently backing up another resource.') msc_col_sp_unknown_status = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 11, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('false', 0), ('true', 1))).clone('false')).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColSpUnknownStatus.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpUnknownStatus.setDescription('This attribute indicates the OSI Unknown status of the component. The value false indicates that all of the other OSI State and Status attribute values can be considered accurate. The value true indicates that the actual state of the component is not known for sure.') msc_col_sp_oper_table = mib_table((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 12)) if mibBuilder.loadTexts: mscColSpOperTable.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpOperTable.setDescription('This group contains the operational attributes specific to a DCS Spooler.') msc_col_sp_oper_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 12, 1)).setIndexNames((0, 'Nortel-MsCarrier-MscPassport-DataCollectionMIB', 'mscColIndex'), (0, 'Nortel-MsCarrier-MscPassport-DataCollectionMIB', 'mscColSpIndex')) if mibBuilder.loadTexts: mscColSpOperEntry.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpOperEntry.setDescription('An entry in the mscColSpOperTable.') msc_col_sp_spooling_file_name = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 12, 1, 1), ascii_string().subtype(subtypeSpec=value_size_constraint(0, 128))).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColSpSpoolingFileName.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpSpoolingFileName.setDescription('When spooling is on, this attribute contains the name of the open file into which data is currently being spooled. When spooling is off, the value of this attribute is the empty string.') msc_col_sp_stats_table = mib_table((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 13)) if mibBuilder.loadTexts: mscColSpStatsTable.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpStatsTable.setDescription('This group specifies the statistics operational attributes of the DCS Collector, Agent and Spooler components.') msc_col_sp_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 13, 1)).setIndexNames((0, 'Nortel-MsCarrier-MscPassport-DataCollectionMIB', 'mscColIndex'), (0, 'Nortel-MsCarrier-MscPassport-DataCollectionMIB', 'mscColSpIndex')) if mibBuilder.loadTexts: mscColSpStatsEntry.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpStatsEntry.setDescription('An entry in the mscColSpStatsTable.') msc_col_sp_current_queue_size = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 13, 1, 1), gauge32().subtype(subtypeSpec=value_range_constraint(0, 4294967295))).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColSpCurrentQueueSize.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpCurrentQueueSize.setDescription('This gauge contains the current number of records held by this DCS component.') msc_col_sp_records_rx = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 13, 1, 2), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColSpRecordsRx.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpRecordsRx.setDescription('This counter contains the cumulative number of records received by a DCS component, from applications which send data to it, since the processor last restarted. This counter wraps to 0 when the maximum value is exceeded.') msc_col_sp_records_discarded = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 2, 13, 1, 3), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColSpRecordsDiscarded.setStatus('mandatory') if mibBuilder.loadTexts: mscColSpRecordsDiscarded.setDescription('This is the cumulative number of records discarded by this DCS component since the processor last restarted. This counter wraps to 0 when the maximum value is exceeded.') msc_col_ag = mib_identifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3)) msc_col_ag_row_status_table = mib_table((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 1)) if mibBuilder.loadTexts: mscColAgRowStatusTable.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgRowStatusTable.setDescription('*** THIS TABLE CURRENTLY NOT IMPLEMENTED *** This entry controls the addition and deletion of mscColAg components.') msc_col_ag_row_status_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 1, 1)).setIndexNames((0, 'Nortel-MsCarrier-MscPassport-DataCollectionMIB', 'mscColIndex'), (0, 'Nortel-MsCarrier-MscPassport-DataCollectionMIB', 'mscColAgIndex')) if mibBuilder.loadTexts: mscColAgRowStatusEntry.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgRowStatusEntry.setDescription('A single entry in the table represents a single mscColAg component.') msc_col_ag_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 1, 1, 1), row_status()).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColAgRowStatus.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgRowStatus.setDescription('This variable is used as the basis for SNMP naming of mscColAg components. These components cannot be added nor deleted.') msc_col_ag_component_name = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 1, 1, 2), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColAgComponentName.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgComponentName.setDescription("This variable provides the component's string name for use with the ASCII Console Interface") msc_col_ag_storage_type = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 1, 1, 4), storage_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColAgStorageType.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgStorageType.setDescription('This variable represents the storage type value for the mscColAg tables.') msc_col_ag_index = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 1, 1, 10), integer32().subtype(subtypeSpec=value_range_constraint(0, 15))) if mibBuilder.loadTexts: mscColAgIndex.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgIndex.setDescription('This variable represents the index for the mscColAg tables.') msc_col_ag_stats_table = mib_table((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 10)) if mibBuilder.loadTexts: mscColAgStatsTable.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgStatsTable.setDescription('*** THIS TABLE CURRENTLY NOT IMPLEMENTED *** This group specifies the statistics operational attributes of the DCS Collector, Agent and Spooler components.') msc_col_ag_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 10, 1)).setIndexNames((0, 'Nortel-MsCarrier-MscPassport-DataCollectionMIB', 'mscColIndex'), (0, 'Nortel-MsCarrier-MscPassport-DataCollectionMIB', 'mscColAgIndex')) if mibBuilder.loadTexts: mscColAgStatsEntry.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgStatsEntry.setDescription('An entry in the mscColAgStatsTable.') msc_col_ag_current_queue_size = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 10, 1, 1), gauge32().subtype(subtypeSpec=value_range_constraint(0, 4294967295))).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColAgCurrentQueueSize.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgCurrentQueueSize.setDescription('This gauge contains the current number of records held by this DCS component.') msc_col_ag_records_rx = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 10, 1, 2), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColAgRecordsRx.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgRecordsRx.setDescription('This counter contains the cumulative number of records received by a DCS component, from applications which send data to it, since the processor last restarted. This counter wraps to 0 when the maximum value is exceeded.') msc_col_ag_records_discarded = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 10, 1, 3), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColAgRecordsDiscarded.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgRecordsDiscarded.setDescription('This is the cumulative number of records discarded by this DCS component since the processor last restarted. This counter wraps to 0 when the maximum value is exceeded.') msc_col_ag_agent_stats_table = mib_table((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 11)) if mibBuilder.loadTexts: mscColAgAgentStatsTable.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgAgentStatsTable.setDescription('*** THIS TABLE CURRENTLY NOT IMPLEMENTED *** This group contains the statistical attributes specific to the DCS Agent components.') msc_col_ag_agent_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 11, 1)).setIndexNames((0, 'Nortel-MsCarrier-MscPassport-DataCollectionMIB', 'mscColIndex'), (0, 'Nortel-MsCarrier-MscPassport-DataCollectionMIB', 'mscColAgIndex')) if mibBuilder.loadTexts: mscColAgAgentStatsEntry.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgAgentStatsEntry.setDescription('An entry in the mscColAgAgentStatsTable.') msc_col_ag_records_not_generated = mib_table_column((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 21, 3, 11, 1, 1), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: mscColAgRecordsNotGenerated.setStatus('mandatory') if mibBuilder.loadTexts: mscColAgRecordsNotGenerated.setDescription('This attribute counts the records of a particular event type on this Card which could not be generated by some application due to some problem such as insufficient resources. One cannot tell exactly which event could not be generated, nor which application instance tried to generate it, but when this count increases, it is an indicator that some re-engineering may be required and will provide some idea as to why a record is missing. This counter wraps to 0 when the maximum value is exceeded.') data_collection_group = mib_identifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 14, 1)) data_collection_group_ca = mib_identifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 14, 1, 1)) data_collection_group_ca02 = mib_identifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 14, 1, 1, 3)) data_collection_group_ca02_a = mib_identifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 14, 1, 1, 3, 2)) data_collection_capabilities = mib_identifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 14, 3)) data_collection_capabilities_ca = mib_identifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 14, 3, 1)) data_collection_capabilities_ca02 = mib_identifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 14, 3, 1, 3)) data_collection_capabilities_ca02_a = mib_identifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 14, 3, 1, 3, 2)) mibBuilder.exportSymbols('Nortel-MsCarrier-MscPassport-DataCollectionMIB', mscColSpComponentName=mscColSpComponentName, dataCollectionCapabilitiesCA02=dataCollectionCapabilitiesCA02, mscColAgCurrentQueueSize=mscColAgCurrentQueueSize, mscColProvEntry=mscColProvEntry, mscColAgRowStatus=mscColAgRowStatus, mscColTimesRowStatus=mscColTimesRowStatus, mscColRowStatusTable=mscColRowStatusTable, mscColStorageType=mscColStorageType, mscColSpStorageType=mscColSpStorageType, mscColSpCurrentQueueSize=mscColSpCurrentQueueSize, mscColSpRowStatusEntry=mscColSpRowStatusEntry, mscColSpRowStatusTable=mscColSpRowStatusTable, mscColStatsEntry=mscColStatsEntry, mscColProvTable=mscColProvTable, mscColRecordsDiscarded=mscColRecordsDiscarded, mscColTimesValue=mscColTimesValue, mscColPeakRowStatus=mscColPeakRowStatus, mscColSpSpoolingFileName=mscColSpSpoolingFileName, mscColRecordsRx=mscColRecordsRx, mscColSpSpooling=mscColSpSpooling, mscColAgStatsTable=mscColAgStatsTable, dataCollectionCapabilitiesCA=dataCollectionCapabilitiesCA, mscColLastEntry=mscColLastEntry, mscColSpRowStatus=mscColSpRowStatus, dataCollectionGroupCA02=dataCollectionGroupCA02, mscColAg=mscColAg, mscColAgentQueueSize=mscColAgentQueueSize, mscColAgComponentName=mscColAgComponentName, mscColAgAgentStatsTable=mscColAgAgentStatsTable, mscColSpStateTable=mscColSpStateTable, mscColSpMaximumNumberOfFiles=mscColSpMaximumNumberOfFiles, mscColSpStatsTable=mscColSpStatsTable, mscColPeakValue=mscColPeakValue, mscColSpOperEntry=mscColSpOperEntry, mscColAgIndex=mscColAgIndex, mscColSpProceduralStatus=mscColSpProceduralStatus, dataCollectionMIB=dataCollectionMIB, dataCollectionGroupCA=dataCollectionGroupCA, mscColSpAvailabilityStatus=mscColSpAvailabilityStatus, mscColTimesTable=mscColTimesTable, mscColSpRecordsRx=mscColSpRecordsRx, mscColRowStatusEntry=mscColRowStatusEntry, mscColSpProvEntry=mscColSpProvEntry, dataCollectionCapabilities=dataCollectionCapabilities, mscColSpIndex=mscColSpIndex, mscColIndex=mscColIndex, mscColSpOperationalState=mscColSpOperationalState, mscColSpStateEntry=mscColSpStateEntry, mscColLastTable=mscColLastTable, mscColAgRecordsRx=mscColAgRecordsRx, mscColAgRowStatusTable=mscColAgRowStatusTable, mscColSp=mscColSp, mscColSpUnknownStatus=mscColSpUnknownStatus, mscColAgStatsEntry=mscColAgStatsEntry, mscColLastValue=mscColLastValue, mscColSpStandbyStatus=mscColSpStandbyStatus, dataCollectionGroup=dataCollectionGroup, mscColAgRowStatusEntry=mscColAgRowStatusEntry, mscColStatsTable=mscColStatsTable, mscColSpProvTable=mscColSpProvTable, mscColAgAgentStatsEntry=mscColAgAgentStatsEntry, mscColSpAdminState=mscColSpAdminState, mscColComponentName=mscColComponentName, mscColCurrentQueueSize=mscColCurrentQueueSize, mscColPeakEntry=mscColPeakEntry, mscColAgRecordsDiscarded=mscColAgRecordsDiscarded, mscColRowStatus=mscColRowStatus, mscColPeakTable=mscColPeakTable, mscColAgRecordsNotGenerated=mscColAgRecordsNotGenerated, dataCollectionCapabilitiesCA02A=dataCollectionCapabilitiesCA02A, mscCol=mscCol, mscColSpStatsEntry=mscColSpStatsEntry, mscColSpRecordsDiscarded=mscColSpRecordsDiscarded, mscColTimesEntry=mscColTimesEntry, mscColSpControlStatus=mscColSpControlStatus, mscColSpUsageState=mscColSpUsageState, dataCollectionGroupCA02A=dataCollectionGroupCA02A, mscColAgStorageType=mscColAgStorageType, mscColSpAlarmStatus=mscColSpAlarmStatus, mscColSpOperTable=mscColSpOperTable)
# Algocia is placed on a great dessert and consists of cities and oases connected by roads. There is # exactly one road leading from each gate to one oasis (but any given oasis can have any number of roads # leading to them, oases can also be interconnected by roads). Algocian law requires that if someone # enters a city through one gate, they must leave the other. Check of Algocia decided to send a bishop # who will read the prohibition of formulating tasks "about the chessboard" (insult majesty) task in # every city. Check wants the bishop to visit each city exactly once (but there is no limit how many # times the bishop will visit each oasis). Bishop departs from the capital of Algocia city x, and after # visiting all cities the bishop has to come back to city x. Find algorithm that determines if there # is a suitable route for bishop. def check_and_bishop(graph, oasis): changed_graph = [] for i in range(len(graph)): if i not in oasis: changed_graph.append([graph[i][0], graph[i][1], 0]) else: for j in range(len(graph[i])): if graph[i][j] in oasis: if [graph[i][j], i, 1] not in changed_graph: changed_graph.append([i, graph[i][j], 1]) count = 0 vertices = [] for i in range(len(changed_graph)): if changed_graph[i][2] == 1: vertices.append((changed_graph[i][0], changed_graph[i][1])) count += 1 for i in range(len(vertices)): for j in range(len(changed_graph)): if changed_graph[j][0] in vertices[i]: changed_graph[j][0] = min(vertices[i]) if changed_graph[j][1] in vertices[i]: changed_graph[j][1] = min(vertices[i]) i = 0 while i < len(changed_graph): j = i + 1 while j < len(changed_graph): if changed_graph[i][0] == changed_graph[j][0] and changed_graph[i][1] == changed_graph[j][1] and \ changed_graph[i][2] == 1: changed_graph.remove(changed_graph[i]) elif changed_graph[i][0] == changed_graph[j][0] and changed_graph[i][1] == changed_graph[j][1] and \ changed_graph[j][2] == 1: changed_graph.remove(changed_graph[j]) j += 1 i += 1 new_graph = [] for i in range(len(changed_graph)): if changed_graph[i][0] not in new_graph: new_graph.append(changed_graph[i][0]) if changed_graph[i][1] not in new_graph: new_graph.append(changed_graph[i][1]) for i in range(len(new_graph)): new_graph[i] = [new_graph[i], 0] for i in range(len(new_graph)): for j in range(len(changed_graph)): if new_graph[i][0] == changed_graph[j][0]: new_graph[i][1] += 1 if new_graph[i][0] == changed_graph[j][1]: new_graph[i][1] += 1 for i in range(len(new_graph)): if new_graph[i][1] % 2 == 1: return False return True oasis = [2, 4, 5, 7, 9] graph = [[2, 4], [2, 9], [0, 4, 3], [2, 5], [0, 2, 6], [3, 7, 8], [4, 7], [5, 6, 8], [5, 7], [1]] print(check_and_bishop(graph, oasis))
def check_and_bishop(graph, oasis): changed_graph = [] for i in range(len(graph)): if i not in oasis: changed_graph.append([graph[i][0], graph[i][1], 0]) else: for j in range(len(graph[i])): if graph[i][j] in oasis: if [graph[i][j], i, 1] not in changed_graph: changed_graph.append([i, graph[i][j], 1]) count = 0 vertices = [] for i in range(len(changed_graph)): if changed_graph[i][2] == 1: vertices.append((changed_graph[i][0], changed_graph[i][1])) count += 1 for i in range(len(vertices)): for j in range(len(changed_graph)): if changed_graph[j][0] in vertices[i]: changed_graph[j][0] = min(vertices[i]) if changed_graph[j][1] in vertices[i]: changed_graph[j][1] = min(vertices[i]) i = 0 while i < len(changed_graph): j = i + 1 while j < len(changed_graph): if changed_graph[i][0] == changed_graph[j][0] and changed_graph[i][1] == changed_graph[j][1] and (changed_graph[i][2] == 1): changed_graph.remove(changed_graph[i]) elif changed_graph[i][0] == changed_graph[j][0] and changed_graph[i][1] == changed_graph[j][1] and (changed_graph[j][2] == 1): changed_graph.remove(changed_graph[j]) j += 1 i += 1 new_graph = [] for i in range(len(changed_graph)): if changed_graph[i][0] not in new_graph: new_graph.append(changed_graph[i][0]) if changed_graph[i][1] not in new_graph: new_graph.append(changed_graph[i][1]) for i in range(len(new_graph)): new_graph[i] = [new_graph[i], 0] for i in range(len(new_graph)): for j in range(len(changed_graph)): if new_graph[i][0] == changed_graph[j][0]: new_graph[i][1] += 1 if new_graph[i][0] == changed_graph[j][1]: new_graph[i][1] += 1 for i in range(len(new_graph)): if new_graph[i][1] % 2 == 1: return False return True oasis = [2, 4, 5, 7, 9] graph = [[2, 4], [2, 9], [0, 4, 3], [2, 5], [0, 2, 6], [3, 7, 8], [4, 7], [5, 6, 8], [5, 7], [1]] print(check_and_bishop(graph, oasis))
''' You are given a circular array nums of positive and negative integers. If a number k at an index is positive, then move forward k steps. Conversely, if it's negative (-k), move backward k steps. Since the array is circular, you may assume that the last element's next element is the first element, and the first element's previous element is the last element. Determine if there is a loop (or a cycle) in nums. A cycle must start and end at the same index and the cycle's length > 1. Furthermore, movements in a cycle must all follow a single direction. In other words, a cycle must not consist of both forward and backward movements. Example 1: Input: [2,-1,1,2,2] Output: true Explanation: There is a cycle, from index 0 -> 2 -> 3 -> 0. The cycle's length is 3. Example 2: Input: [-1,2] Output: false Explanation: The movement from index 1 -> 1 -> 1 ... is not a cycle, because the cycle's length is 1. By definition the cycle's length must be greater than 1. Example 3: Input: [-2,1,-1,-2,-2] Output: false Explanation: The movement from index 1 -> 2 -> 1 -> ... is not a cycle, because movement from index 1 -> 2 is a forward movement, but movement from index 2 -> 1 is a backward movement. All movements in a cycle must follow a single direction. SOLUTION: Lets first think how to detect cycles only in the forward direction. We can start traversing from index 0. We will maintain a visited set during a traversal. If we encounter an index which is already visited before in this traversal, then cycle exits. On the other hand, if we encounter a -ve element, the cycle cannot exist in this traversal. If the current traversal is not cyclic, then at the end of the traversal, we can mark all the elements of this traversal as 'safe'. This is the basic idea. See the code for detail. Also, for the other direction, we just reverse the array and reverse the sign of the elements and re-run the exact same algo on that. For O(1) solution, we can detect cycle using slow and fast pointer, and for marking 'safe' indices, we can use some dummy -ve value. But its not that simple; we need to distinguish between 'safe' indices and 'visited' (in current run) indices. For that we can use 2 dummy values; We can first modify every arr[i] to arr[i]%n; it will not affect the final result. Then we can use the dummy value 'n' for round 1, '2n' for round 2 and so on... VARIATION: What if forward and backward steps are allowed in one cycle? Then we can just model the array as a directed graph and find cycle in that. ''' def is_cycle(arr, start, safe): i = start visited = set() visited.add(i) while True: i = (i + arr[i]) % len(arr) if i in safe: break if i in visited: if len(visited) == 1: # We cannot mark it as safe yet. # What if some other vertex redirects to here? return False return True visited.add(i) for i in visited: safe.add(i) return False def is_cyclic(arr): i = 0 start = 0 safe = set() for i in range(len(arr)): if arr[i] <= 0: safe.add(i) while start < len(arr): if start in safe: start += 1 continue if is_cycle(arr, start, safe): return True return False def is_cyclic_outer(arr): arr_copy = list(arr) if is_cyclic(arr): return True arr = arr_copy arr.reverse() for i in range(len(arr)): arr[i] = -arr[i] return is_cyclic(arr) def main(): arr = [2, -1, 1, 2, 2] arr = [-1, 2] arr = [-2, 1, -1, -2, -2] arr = [1, 2] ans = is_cyclic_outer(arr) print(ans) main()
""" You are given a circular array nums of positive and negative integers. If a number k at an index is positive, then move forward k steps. Conversely, if it's negative (-k), move backward k steps. Since the array is circular, you may assume that the last element's next element is the first element, and the first element's previous element is the last element. Determine if there is a loop (or a cycle) in nums. A cycle must start and end at the same index and the cycle's length > 1. Furthermore, movements in a cycle must all follow a single direction. In other words, a cycle must not consist of both forward and backward movements. Example 1: Input: [2,-1,1,2,2] Output: true Explanation: There is a cycle, from index 0 -> 2 -> 3 -> 0. The cycle's length is 3. Example 2: Input: [-1,2] Output: false Explanation: The movement from index 1 -> 1 -> 1 ... is not a cycle, because the cycle's length is 1. By definition the cycle's length must be greater than 1. Example 3: Input: [-2,1,-1,-2,-2] Output: false Explanation: The movement from index 1 -> 2 -> 1 -> ... is not a cycle, because movement from index 1 -> 2 is a forward movement, but movement from index 2 -> 1 is a backward movement. All movements in a cycle must follow a single direction. SOLUTION: Lets first think how to detect cycles only in the forward direction. We can start traversing from index 0. We will maintain a visited set during a traversal. If we encounter an index which is already visited before in this traversal, then cycle exits. On the other hand, if we encounter a -ve element, the cycle cannot exist in this traversal. If the current traversal is not cyclic, then at the end of the traversal, we can mark all the elements of this traversal as 'safe'. This is the basic idea. See the code for detail. Also, for the other direction, we just reverse the array and reverse the sign of the elements and re-run the exact same algo on that. For O(1) solution, we can detect cycle using slow and fast pointer, and for marking 'safe' indices, we can use some dummy -ve value. But its not that simple; we need to distinguish between 'safe' indices and 'visited' (in current run) indices. For that we can use 2 dummy values; We can first modify every arr[i] to arr[i]%n; it will not affect the final result. Then we can use the dummy value 'n' for round 1, '2n' for round 2 and so on... VARIATION: What if forward and backward steps are allowed in one cycle? Then we can just model the array as a directed graph and find cycle in that. """ def is_cycle(arr, start, safe): i = start visited = set() visited.add(i) while True: i = (i + arr[i]) % len(arr) if i in safe: break if i in visited: if len(visited) == 1: return False return True visited.add(i) for i in visited: safe.add(i) return False def is_cyclic(arr): i = 0 start = 0 safe = set() for i in range(len(arr)): if arr[i] <= 0: safe.add(i) while start < len(arr): if start in safe: start += 1 continue if is_cycle(arr, start, safe): return True return False def is_cyclic_outer(arr): arr_copy = list(arr) if is_cyclic(arr): return True arr = arr_copy arr.reverse() for i in range(len(arr)): arr[i] = -arr[i] return is_cyclic(arr) def main(): arr = [2, -1, 1, 2, 2] arr = [-1, 2] arr = [-2, 1, -1, -2, -2] arr = [1, 2] ans = is_cyclic_outer(arr) print(ans) main()
class PartyAnimal: x = 0 name = "" def __init__(self, nameCons): self.name = nameCons print("name: ", self.name) def party(self): self.x = self.x + 1 print(self.name," - party count: ", self.x) class FootballFan(PartyAnimal): points = 0 def touchdown(self): self.points = self.points + 7 self.party() print(self.name, "points", self.points) s = FootballFan("Sally") s.party() j = FootballFan("Jim") j.party() j.touchdown()
class Partyanimal: x = 0 name = '' def __init__(self, nameCons): self.name = nameCons print('name: ', self.name) def party(self): self.x = self.x + 1 print(self.name, ' - party count: ', self.x) class Footballfan(PartyAnimal): points = 0 def touchdown(self): self.points = self.points + 7 self.party() print(self.name, 'points', self.points) s = football_fan('Sally') s.party() j = football_fan('Jim') j.party() j.touchdown()
__author__ = 'Nathen' input_str = input('Paste input nums: ') k, m, n = map(lambda num: float(num), input_str.split(' ')) population = k + m + n # odds when dominant first pK = k / population # odds when heterozygous first pMK = (m / population) * (k / (population - 1.0)) pMM = (m / population) * ((m - 1.0) / (population - 1.0)) * 0.75 pMN = (m / population) * (n / (population - 1.0)) * 0.5 # odds when we choose recessive first pNK = (n / population) * (k / (population - 1.0)) pNM = (n / population) * (m / (population - 1.0)) * 0.5 result = pK + pMK + pMM + pMN + pNK + pNM print(result)
__author__ = 'Nathen' input_str = input('Paste input nums: ') (k, m, n) = map(lambda num: float(num), input_str.split(' ')) population = k + m + n p_k = k / population p_mk = m / population * (k / (population - 1.0)) p_mm = m / population * ((m - 1.0) / (population - 1.0)) * 0.75 p_mn = m / population * (n / (population - 1.0)) * 0.5 p_nk = n / population * (k / (population - 1.0)) p_nm = n / population * (m / (population - 1.0)) * 0.5 result = pK + pMK + pMM + pMN + pNK + pNM print(result)
with open("tinder_api/utils/token.txt", "r") as f: tinder_token = f.read() # it is best for you to write in the token to save yourself the file I/O # especially if you have python byte code off #tinder_token = "" headers = { 'app_version': '6.9.4', 'platform': 'ios', 'content-type': 'application/json', 'User-agent': 'Tinder/7.5.3 (iPohone; iOS 10.3.2; Scale/2.00)', 'X-Auth-Token': 'enter_auth_token', } host = 'https://api.gotinder.com' if __name__ == '__main__': pass
with open('tinder_api/utils/token.txt', 'r') as f: tinder_token = f.read() headers = {'app_version': '6.9.4', 'platform': 'ios', 'content-type': 'application/json', 'User-agent': 'Tinder/7.5.3 (iPohone; iOS 10.3.2; Scale/2.00)', 'X-Auth-Token': 'enter_auth_token'} host = 'https://api.gotinder.com' if __name__ == '__main__': pass
with open('day9.txt') as f: data = f.read().splitlines()[0].split(' ') nPlayers = int(data[0]) nMarbles = int(data[6]) # Players playerScores = [0] * nPlayers currentPlayer = -1 # Marbles right = [None] * nMarbles left = [None] * nMarbles # Initialise current = 0 total = 1 right[current] = current left[current] = current for i in range(1, nMarbles): # Update player currentPlayer = (currentPlayer + 1) % nPlayers # Update marbles if i % 23 == 0: # Add new marble to score playerScores[currentPlayer] += i # Remove the 7th marble counterclockwise and keep marble7 = left[left[left[left[left[left[left[current]]]]]]] playerScores[currentPlayer] += marble7 # Set new current current = right[marble7] # Redo the adjacency lists posLeft = left[marble7] posRight = right[marble7] right[posLeft] = posRight left[posRight] = posLeft right[marble7] = None left[marble7] = None else: posLeft = right[current] posRight = right[right[current]] right[posLeft] = i right[i] = posRight left[i] = posLeft left[posRight] = i current = i print(max(playerScores))
with open('day9.txt') as f: data = f.read().splitlines()[0].split(' ') n_players = int(data[0]) n_marbles = int(data[6]) player_scores = [0] * nPlayers current_player = -1 right = [None] * nMarbles left = [None] * nMarbles current = 0 total = 1 right[current] = current left[current] = current for i in range(1, nMarbles): current_player = (currentPlayer + 1) % nPlayers if i % 23 == 0: playerScores[currentPlayer] += i marble7 = left[left[left[left[left[left[left[current]]]]]]] playerScores[currentPlayer] += marble7 current = right[marble7] pos_left = left[marble7] pos_right = right[marble7] right[posLeft] = posRight left[posRight] = posLeft right[marble7] = None left[marble7] = None else: pos_left = right[current] pos_right = right[right[current]] right[posLeft] = i right[i] = posRight left[i] = posLeft left[posRight] = i current = i print(max(playerScores))
LUCYFER_SETTINGS = { "SAVED_SEARCHES_ENABLE": False, "SAVED_SEARCHES_KEY": None, }
lucyfer_settings = {'SAVED_SEARCHES_ENABLE': False, 'SAVED_SEARCHES_KEY': None}
r = 'S' while r == "S": n = int(input('Digite um numero: ')) r = str(input('Quer continuar [S/N]: ')).upper() print('Acabou')
r = 'S' while r == 'S': n = int(input('Digite um numero: ')) r = str(input('Quer continuar [S/N]: ')).upper() print('Acabou')
def reverse(number): stack = [] result = "" for num in str(number): stack.append(num) for i in range(len(stack)): result += stack.pop() print(result) return int(result) reverse(3479)
def reverse(number): stack = [] result = '' for num in str(number): stack.append(num) for i in range(len(stack)): result += stack.pop() print(result) return int(result) reverse(3479)
T_Call = 0 T_Squat = 1 T_Shank = 2 T_Jump = 3 T_Slap = 4 T_EyeContact = 5 function_name_dict = { T_Call: "call", T_Squat: "squat", T_Shank: "shank", T_Jump: "jump", T_Slap: "slap", T_EyeContact: "eye_contact" } RESPECT_MAX = 255
t__call = 0 t__squat = 1 t__shank = 2 t__jump = 3 t__slap = 4 t__eye_contact = 5 function_name_dict = {T_Call: 'call', T_Squat: 'squat', T_Shank: 'shank', T_Jump: 'jump', T_Slap: 'slap', T_EyeContact: 'eye_contact'} respect_max = 255
def power_of_two(x): if x == 1: return True if x < 1: return False return power_of_two(x / 2)
def power_of_two(x): if x == 1: return True if x < 1: return False return power_of_two(x / 2)
class Solution: def searchRange(self, nums: List[int], target: int) -> List[int]: def search(lo, hi): if nums[lo] == target == nums[hi]: return [lo, hi] if nums[lo] <= target <= nums[hi]: mid = (lo + hi) // 2 l, r = search(lo, mid), search(mid+1, hi) return max(l, r) if -1 in l+r else [l[0], r[1]] return [-1, -1] if len(nums)==0: return [-1,-1] return search(0, len(nums)-1)
class Solution: def search_range(self, nums: List[int], target: int) -> List[int]: def search(lo, hi): if nums[lo] == target == nums[hi]: return [lo, hi] if nums[lo] <= target <= nums[hi]: mid = (lo + hi) // 2 (l, r) = (search(lo, mid), search(mid + 1, hi)) return max(l, r) if -1 in l + r else [l[0], r[1]] return [-1, -1] if len(nums) == 0: return [-1, -1] return search(0, len(nums) - 1)
#15 Distance units # Askng for distance in feet. x = float(input("Enter the distance in feet = ")) inches = x * 12 yards = x * 0.33333 miles = x * 0.000189 print("Inches = ",inches," Yards = ",yards," Miles = ",miles)
x = float(input('Enter the distance in feet = ')) inches = x * 12 yards = x * 0.33333 miles = x * 0.000189 print('Inches = ', inches, ' Yards = ', yards, ' Miles = ', miles)
load("@berty_go//:config.bzl", "berty_go_config") load("@co_znly_rules_gomobile//:repositories.bzl", "gomobile_repositories") load("@build_bazel_apple_support//lib:repositories.bzl", "apple_support_dependencies") load("@build_bazel_rules_swift//swift:repositories.bzl", "swift_rules_dependencies") def berty_bridge_config(): # fetch and config berty go dependencies berty_go_config() # config gomobile repositories gomobile_repositories() # config ios apple_support_dependencies() swift_rules_dependencies()
load('@berty_go//:config.bzl', 'berty_go_config') load('@co_znly_rules_gomobile//:repositories.bzl', 'gomobile_repositories') load('@build_bazel_apple_support//lib:repositories.bzl', 'apple_support_dependencies') load('@build_bazel_rules_swift//swift:repositories.bzl', 'swift_rules_dependencies') def berty_bridge_config(): berty_go_config() gomobile_repositories() apple_support_dependencies() swift_rules_dependencies()
n = 95 for i in range(1,1000): a = n ^ i print(bin(a),a) print(i,bin(n),n) print()
n = 95 for i in range(1, 1000): a = n ^ i print(bin(a), a) print(i, bin(n), n) print()
''' Description : Use Of Basic Input / Output Function Date : 07 Feb 2021 Function Author : Prasad Dangare Input : Str Output : -- ''' print("Enter One Number") # to display on screen no = input() # to accept the standard input device ie keyword print ("Your Number Is : ", no) print ("Data Type Of Give Number Is : ", type(no))
""" Description : Use Of Basic Input / Output Function Date : 07 Feb 2021 Function Author : Prasad Dangare Input : Str Output : -- """ print('Enter One Number') no = input() print('Your Number Is : ', no) print('Data Type Of Give Number Is : ', type(no))
# Global Reach # Demonstrates global variables def read_global(): print("From inside the local scope of read_global(), value is:", value) def shadow_global(): value = -10 print("From inside the local scope of shadow_global(), value is:", value) def change_global(): global value value = -10 print("From inside the local scope of change_global(), value is:", value) # main # value is a global variable because we're in the global scope here value = 10 print("In the global scope, value has been set to:", value, "\n") read_global() print("Back in the global scope, value is still:", value, "\n") shadow_global() print("Back in the global scope, value is still:", value, "\n") change_global() print("Back in the global scope, value has now changed to:", value) input("\n\nPress the enter key to exit.")
def read_global(): print('From inside the local scope of read_global(), value is:', value) def shadow_global(): value = -10 print('From inside the local scope of shadow_global(), value is:', value) def change_global(): global value value = -10 print('From inside the local scope of change_global(), value is:', value) value = 10 print('In the global scope, value has been set to:', value, '\n') read_global() print('Back in the global scope, value is still:', value, '\n') shadow_global() print('Back in the global scope, value is still:', value, '\n') change_global() print('Back in the global scope, value has now changed to:', value) input('\n\nPress the enter key to exit.')
a = int(input("Enter: ")) reserve = a temp = 0 rev=0 while a>0: temp = a%10 a = a//10 rev = rev*10 + temp if reserve == rev: print("Palindrome") else: print("not")
a = int(input('Enter: ')) reserve = a temp = 0 rev = 0 while a > 0: temp = a % 10 a = a // 10 rev = rev * 10 + temp if reserve == rev: print('Palindrome') else: print('not')
class Track(object): id = 0 header_line = 1 filename = "" key_color = "#FF4D55" name = "" description = "" track_image_url = "http://lorempixel.com/400/200" location = "" gid = "" order = -1 def __init__(self, id, name, header_line, key_color, location, gid, order): super(Track, self).__init__() self.id = id self.name = name self.header_line = header_line self.key_color = key_color self.track_image_url = "http://lorempixel.com/400/200" self.location = location self.gid = gid self.order = order class Service(object): id = 0 service = "" url = "" def __init__(self, id, service, url): super(Service, self).__init__() self.id = id self.service = service self.url = url class LogoIco(object): logo_url = "" ico_url = "" main_page_url = "" def __init__(self, logo_url, ico_url, main_page_url): super(LogoIco, self).__init__() self.logo_url = logo_url self.ico_url = ico_url self.main_page_url = main_page_url class Speaker(object): def __init__(self): super(Speaker, self).__init__() class Copyright(object): def __init__(self): super(Copyright, self).__init__() class Session(object): def __init__(self): super(Session, self).__init__() class Sponsor(object): def __init__(self): super(Sponsor, self).__init__() class Microlocation(object): def __init__(self): super(Microlocation, self).__init__()
class Track(object): id = 0 header_line = 1 filename = '' key_color = '#FF4D55' name = '' description = '' track_image_url = 'http://lorempixel.com/400/200' location = '' gid = '' order = -1 def __init__(self, id, name, header_line, key_color, location, gid, order): super(Track, self).__init__() self.id = id self.name = name self.header_line = header_line self.key_color = key_color self.track_image_url = 'http://lorempixel.com/400/200' self.location = location self.gid = gid self.order = order class Service(object): id = 0 service = '' url = '' def __init__(self, id, service, url): super(Service, self).__init__() self.id = id self.service = service self.url = url class Logoico(object): logo_url = '' ico_url = '' main_page_url = '' def __init__(self, logo_url, ico_url, main_page_url): super(LogoIco, self).__init__() self.logo_url = logo_url self.ico_url = ico_url self.main_page_url = main_page_url class Speaker(object): def __init__(self): super(Speaker, self).__init__() class Copyright(object): def __init__(self): super(Copyright, self).__init__() class Session(object): def __init__(self): super(Session, self).__init__() class Sponsor(object): def __init__(self): super(Sponsor, self).__init__() class Microlocation(object): def __init__(self): super(Microlocation, self).__init__()
#!/usr/bin/env python3 if __name__ == '__main__': students_list = [] while True: command = input("Add, list, exit: ").lower() if command == 'exit': break elif command == 'add': last_name = input('Your last name^ ') class_name = input('Class ') grades = [] n = 0 while n < 5: grades.append(int(input('Your grades '))) n += 1 student = { 'Last name': last_name, 'Class': class_name, 'Grades': grades, } students_list.append(student) if len(students_list) > 1: students_list.sort(key=lambda item: item.get('Last name', '')) print(students_list) elif command == 'list': for index in range(len(students_list)): for key in students_list: print(students_list[index][key])
if __name__ == '__main__': students_list = [] while True: command = input('Add, list, exit: ').lower() if command == 'exit': break elif command == 'add': last_name = input('Your last name^ ') class_name = input('Class ') grades = [] n = 0 while n < 5: grades.append(int(input('Your grades '))) n += 1 student = {'Last name': last_name, 'Class': class_name, 'Grades': grades} students_list.append(student) if len(students_list) > 1: students_list.sort(key=lambda item: item.get('Last name', '')) print(students_list) elif command == 'list': for index in range(len(students_list)): for key in students_list: print(students_list[index][key])
# model settings norm_cfg = dict(type='SyncBN', requires_grad=True) model = dict( type='EncoderDecoder', # pretrained='checkpoints/metanet-b4/det_fmtb4_v1.pth.tar', backbone=dict( type='Central_Model', backbone_name='MTB4', task_names=('gv_patch', 'gv_global'), main_task_name='gv_global', trans_type='crossconvhrnetlayer', task_name_to_backbone={ 'gv_global': { 'repeats': [2, 3, 6, 6, 6, 12], 'expansion': [1, 4, 6, 3, 2, 5], 'channels': [32, 64, 128, 192, 192, 384], 'final_drop': 0.0, 'block_ops': ['MBConv3x3'] * 4 + ['SABlock'] * 2, 'input_size': 256 }, 'gv_patch': { 'repeats': [2, 3, 6, 6, 6, 12], 'expansion': [1, 4, 6, 3, 2, 5], 'channels': [32, 64, 128, 192, 192, 384], 'final_drop': 0.0, 'block_ops': ['MBConv3x3'] * 4 + ['SABlock'] * 2, 'input_size': 256 } }, layer2channel={ 'layer1': 64, 'layer2': 128, 'layer3': 192 }, layer2auxlayers={ 'layer1': [ 'layer1', ], 'layer2': [ 'layer1', 'layer2', ], 'layer3': ['layer1', 'layer2', 'layer3'], }, trans_layers=['layer1', 'layer2', 'layer3'], channels=[64, 128, 192], ), decode_head=dict(type='ASPPHead', in_channels=384, in_index=3, channels=512, dilations=(1, 12, 24, 36), dropout_ratio=0.1, num_classes=19, norm_cfg=norm_cfg, align_corners=False, loss_decode=dict(type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0)), auxiliary_head=dict(type='FCNHead', in_channels=192, in_index=2, channels=256, num_convs=1, concat_input=False, dropout_ratio=0.1, num_classes=19, norm_cfg=norm_cfg, align_corners=False, loss_decode=dict(type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.4)), # model training and testing settings train_cfg=dict(), test_cfg=dict(mode='whole')) custom_imports = dict(imports=[ 'gvbenchmark.seg.models.backbones.central_model', ], allow_failed_imports=False)
norm_cfg = dict(type='SyncBN', requires_grad=True) model = dict(type='EncoderDecoder', backbone=dict(type='Central_Model', backbone_name='MTB4', task_names=('gv_patch', 'gv_global'), main_task_name='gv_global', trans_type='crossconvhrnetlayer', task_name_to_backbone={'gv_global': {'repeats': [2, 3, 6, 6, 6, 12], 'expansion': [1, 4, 6, 3, 2, 5], 'channels': [32, 64, 128, 192, 192, 384], 'final_drop': 0.0, 'block_ops': ['MBConv3x3'] * 4 + ['SABlock'] * 2, 'input_size': 256}, 'gv_patch': {'repeats': [2, 3, 6, 6, 6, 12], 'expansion': [1, 4, 6, 3, 2, 5], 'channels': [32, 64, 128, 192, 192, 384], 'final_drop': 0.0, 'block_ops': ['MBConv3x3'] * 4 + ['SABlock'] * 2, 'input_size': 256}}, layer2channel={'layer1': 64, 'layer2': 128, 'layer3': 192}, layer2auxlayers={'layer1': ['layer1'], 'layer2': ['layer1', 'layer2'], 'layer3': ['layer1', 'layer2', 'layer3']}, trans_layers=['layer1', 'layer2', 'layer3'], channels=[64, 128, 192]), decode_head=dict(type='ASPPHead', in_channels=384, in_index=3, channels=512, dilations=(1, 12, 24, 36), dropout_ratio=0.1, num_classes=19, norm_cfg=norm_cfg, align_corners=False, loss_decode=dict(type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0)), auxiliary_head=dict(type='FCNHead', in_channels=192, in_index=2, channels=256, num_convs=1, concat_input=False, dropout_ratio=0.1, num_classes=19, norm_cfg=norm_cfg, align_corners=False, loss_decode=dict(type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.4)), train_cfg=dict(), test_cfg=dict(mode='whole')) custom_imports = dict(imports=['gvbenchmark.seg.models.backbones.central_model'], allow_failed_imports=False)
# OpenWeatherMap API Key weather_api_key = "2e751db150eed8a2a8ae9dc91e31a091" # Google API Key g_key = "AIzaSyBqrWs9x-quXSBQkAVuz-x7PP3t64gJj7E"
weather_api_key = '2e751db150eed8a2a8ae9dc91e31a091' g_key = 'AIzaSyBqrWs9x-quXSBQkAVuz-x7PP3t64gJj7E'
def main(): s = input() weathers = ['Sunny', 'Cloudy', 'Rainy'] length = weathers.__len__() index = weathers.index(s) + 1 if index >= length: index = 0 print(weathers[index]) if __name__ == "__main__": main()
def main(): s = input() weathers = ['Sunny', 'Cloudy', 'Rainy'] length = weathers.__len__() index = weathers.index(s) + 1 if index >= length: index = 0 print(weathers[index]) if __name__ == '__main__': main()
# Find height of a given binary tree class Node(): def __init__(self, value): self.left = None self.right = None self.value = value class Tree(): def height(self, node: Node): if node is None or (node.left is None and node.right is None): return 0 else: left_sub_tree_height = self.height(node.left) right_sub_tree_height = self.height(node.right) return max(left_sub_tree_height, right_sub_tree_height) + 1 n = Node(15) n.left = Node(10) n.right = Node(20) n.left.right = Node(12) n.right.left = Node(18) n.right.right = Node(30) # Creating left skewed tree n1 = Node(5) n1.left = Node(0) n1.left.left = Node(0) n1.left.left.left = Node(0) n1.left.left.left.left = Node(0) n1.left.left.left.left.left = Node(0) n1.left.left.left.left.left.left = Node(0) n.left.left = n1 print(f'The height of the tree is {Tree().height(n)}')
class Node: def __init__(self, value): self.left = None self.right = None self.value = value class Tree: def height(self, node: Node): if node is None or (node.left is None and node.right is None): return 0 else: left_sub_tree_height = self.height(node.left) right_sub_tree_height = self.height(node.right) return max(left_sub_tree_height, right_sub_tree_height) + 1 n = node(15) n.left = node(10) n.right = node(20) n.left.right = node(12) n.right.left = node(18) n.right.right = node(30) n1 = node(5) n1.left = node(0) n1.left.left = node(0) n1.left.left.left = node(0) n1.left.left.left.left = node(0) n1.left.left.left.left.left = node(0) n1.left.left.left.left.left.left = node(0) n.left.left = n1 print(f'The height of the tree is {tree().height(n)}')
#!/usr/local/bin/python3 message = str(input("Message: ")) secret = "" for character in reversed(message): secret = secret + str(chr(ord(character)+1)) print(secret)
message = str(input('Message: ')) secret = '' for character in reversed(message): secret = secret + str(chr(ord(character) + 1)) print(secret)
class Solution: def majorityElement(self, nums: List[int]) -> int: counter = {} for num in nums: if num not in counter: counter[num] = 1 else: counter[num] += 1 for key, value in counter.items(): if value > len(nums)/2: return key
class Solution: def majority_element(self, nums: List[int]) -> int: counter = {} for num in nums: if num not in counter: counter[num] = 1 else: counter[num] += 1 for (key, value) in counter.items(): if value > len(nums) / 2: return key
oo000 = 0 for ii in range ( 11 ) : oo000 += ii if 51 - 51: IiI1i11I print ( oo000 ) # dd678faae9ac167bc83abf78e5cb2f3f0688d3a3
oo000 = 0 for ii in range(11): oo000 += ii if 51 - 51: IiI1i11I print(oo000)
APP_PORT = 7991 LOGFILE_PATH = "/var/log/application/db_replication.log" MASTER_MYSQL = { 'host': '127.0.0.1', 'port': 3306, 'user': 'root', 'password': 'password' }
app_port = 7991 logfile_path = '/var/log/application/db_replication.log' master_mysql = {'host': '127.0.0.1', 'port': 3306, 'user': 'root', 'password': 'password'}
############################################################################# #Replace with the persons name that you were texting leftName = "Bob" #Replace with your name rightName = "John" #############################################################################
left_name = 'Bob' right_name = 'John'
BASE_DIR="" DATA_DIR="/mnt/nfs/work1/akshay/akshay/projects/oracle_cb/data/" REMOTE_PATH_TO_PYTHON="/mnt/nfs/work1/akshay/akshay/anaconda3/python3" REMOTE_BASE_DIR="/mnt/nfs/work1/akshay/akshay/projects/oracle_cb/"
base_dir = '' data_dir = '/mnt/nfs/work1/akshay/akshay/projects/oracle_cb/data/' remote_path_to_python = '/mnt/nfs/work1/akshay/akshay/anaconda3/python3' remote_base_dir = '/mnt/nfs/work1/akshay/akshay/projects/oracle_cb/'
def prime(num): flag=False for a in range(2,num-1): #basically prime no are divisible by itself and by 1 only so set input value -1 so i takes previous num if num%a==0: flag=True if flag==False: print("prime") else: print("not prime") num=int(input("enter the no")) prime(num)
def prime(num): flag = False for a in range(2, num - 1): if num % a == 0: flag = True if flag == False: print('prime') else: print('not prime') num = int(input('enter the no')) prime(num)
#!/usr/bin/env python ############################################################################### # Copyright 2017 The Apollo Authors. All Rights Reserved. # Modifications Copyright (c) 2018 LG Electronics, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. ############################################################################### class ADVehicle: def __init__(self): self._chassis_pb = None self._localization_pb = None self.front_edge_to_center = 3.89 self.back_edge_to_center = 1.043 self.left_edge_to_center = 1.055 self.right_edge_to_center = 1.055 self.speed_mps = None self.x = None self.y = None self.heading = None def update_chassis(self, chassis_pb): self._chassis_pb = chassis_pb self.speed_mps = self._chassis_pb.speed_mps def update_localization(self, localization_pb): self._localization_pb = localization_pb self.x = self._localization_pb.pose.position.x self.y = self._localization_pb.pose.position.y self.heading = self._localization_pb.pose.heading def is_ready(self): if self._chassis_pb is None or self._localization_pb is None: return False return True
class Advehicle: def __init__(self): self._chassis_pb = None self._localization_pb = None self.front_edge_to_center = 3.89 self.back_edge_to_center = 1.043 self.left_edge_to_center = 1.055 self.right_edge_to_center = 1.055 self.speed_mps = None self.x = None self.y = None self.heading = None def update_chassis(self, chassis_pb): self._chassis_pb = chassis_pb self.speed_mps = self._chassis_pb.speed_mps def update_localization(self, localization_pb): self._localization_pb = localization_pb self.x = self._localization_pb.pose.position.x self.y = self._localization_pb.pose.position.y self.heading = self._localization_pb.pose.heading def is_ready(self): if self._chassis_pb is None or self._localization_pb is None: return False return True
HTTP_STATUS_CODES = { "100": "Continue", "101": "Switching Protocols", "102": "Processing", "200": "OK", "201": "Created", "202": "Accepted", "203": "Non-Authoritative Information", "204": "No Content", "205": "Reset Content", "206": "Partial Content", "207": "Multi-Status", "208": "Already Reported", "226": "IM Used", "300": "Multiple Choices", "301": "Moved Permanently", "302": "Found", "303": "See Other", "304": "Not Modified", "305": "Use Proxy", "306": "Switch Proxy", "307": "Temporary Redirect", "308": "Permanent Redirect", "400": "Bad Request", "401": "Unauthorized", "402": "Payment Required", "403": "Forbidden", "404": "Not Found", "405": "Method Not Allowed", "406": "Not Acceptable", "407": "Proxy Authentication Required", "408": "Request Timeout", "409": "Conflict", "410": "Gone", "411": "Length Required", "412": "Precondition Failed", "413": "Payload Too Large", "414": "URI Too Long", "415": "Unsupported Media Type", "416": "Range Not Satisfiable", "417": "Expectation Failed", "418": "I'm a teapot", "421": "Misdirected Request", "422": "Unprocessable Entity", "423": "Locked", "424": "Failed Dependency", "425": "Too Early", "426": "Upgrade Required", "428": "Precontidion Required", "429": "Too Many Requests", "431": "Request Header Fields Too Large", "451": "Unavailable For Legal Reasons", "500": "Internal Server Error", "501": "Not Implemented", "502": "Bad Gateway", "503": "Service Unavailable", "504": "Gateway Timeout", "505": "HTTP Version Not Supported", "506": "Variant Also Negotiates", "507": "Insufficient Storage", "508": "Loop Detected", "510": "Not Extended", "511": "Network Authentication Require", }
http_status_codes = {'100': 'Continue', '101': 'Switching Protocols', '102': 'Processing', '200': 'OK', '201': 'Created', '202': 'Accepted', '203': 'Non-Authoritative Information', '204': 'No Content', '205': 'Reset Content', '206': 'Partial Content', '207': 'Multi-Status', '208': 'Already Reported', '226': 'IM Used', '300': 'Multiple Choices', '301': 'Moved Permanently', '302': 'Found', '303': 'See Other', '304': 'Not Modified', '305': 'Use Proxy', '306': 'Switch Proxy', '307': 'Temporary Redirect', '308': 'Permanent Redirect', '400': 'Bad Request', '401': 'Unauthorized', '402': 'Payment Required', '403': 'Forbidden', '404': 'Not Found', '405': 'Method Not Allowed', '406': 'Not Acceptable', '407': 'Proxy Authentication Required', '408': 'Request Timeout', '409': 'Conflict', '410': 'Gone', '411': 'Length Required', '412': 'Precondition Failed', '413': 'Payload Too Large', '414': 'URI Too Long', '415': 'Unsupported Media Type', '416': 'Range Not Satisfiable', '417': 'Expectation Failed', '418': "I'm a teapot", '421': 'Misdirected Request', '422': 'Unprocessable Entity', '423': 'Locked', '424': 'Failed Dependency', '425': 'Too Early', '426': 'Upgrade Required', '428': 'Precontidion Required', '429': 'Too Many Requests', '431': 'Request Header Fields Too Large', '451': 'Unavailable For Legal Reasons', '500': 'Internal Server Error', '501': 'Not Implemented', '502': 'Bad Gateway', '503': 'Service Unavailable', '504': 'Gateway Timeout', '505': 'HTTP Version Not Supported', '506': 'Variant Also Negotiates', '507': 'Insufficient Storage', '508': 'Loop Detected', '510': 'Not Extended', '511': 'Network Authentication Require'}
# Write your code here N = int(input()) arr = list(map(int, input().split())) def give_soln(n): return ((2**n) - (1 + (n) + (n*(n-1)/2))) my_dict = dict() for i in arr: if i in my_dict: my_dict[i] += 1 else: my_dict[i] = 1 count = 0 for side in my_dict: if my_dict[side] >=3: count += give_soln(my_dict[side]) print(int(count)%(10**9 + 7))
n = int(input()) arr = list(map(int, input().split())) def give_soln(n): return 2 ** n - (1 + n + n * (n - 1) / 2) my_dict = dict() for i in arr: if i in my_dict: my_dict[i] += 1 else: my_dict[i] = 1 count = 0 for side in my_dict: if my_dict[side] >= 3: count += give_soln(my_dict[side]) print(int(count) % (10 ** 9 + 7))
model = dict( type='GroupFree3DNet', backbone=dict( type='PointNet2SASSG', in_channels=3, num_points=(2048, 1024, 512, 256), radius=(0.2, 0.4, 0.8, 1.2), num_samples=(64, 32, 16, 16), sa_channels=((64, 64, 128), (128, 128, 256), (128, 128, 256), (128, 128, 256)), fp_channels=((256, 256), (256, 288)), norm_cfg=dict(type='BN2d'), sa_cfg=dict( type='PointSAModule', pool_mod='max', use_xyz=True, normalize_xyz=True)), bbox_head=dict( type='GroupFree3DHead', in_channels=288, num_decoder_layers=6, num_proposal=256, transformerlayers=dict( type='BaseTransformerLayer', attn_cfgs=dict( type='GroupFree3DMHA', embed_dims=288, num_heads=8, attn_drop=0.1, dropout_layer=dict(type='Dropout', drop_prob=0.1)), ffn_cfgs=dict( embed_dims=288, feedforward_channels=2048, ffn_drop=0.1, act_cfg=dict(type='ReLU', inplace=True)), operation_order=('self_attn', 'norm', 'cross_attn', 'norm', 'ffn', 'norm')), pred_layer_cfg=dict( in_channels=288, shared_conv_channels=(288, 288), bias=True), sampling_objectness_loss=dict( type='FocalLoss', use_sigmoid=True, gamma=2.0, alpha=0.25, loss_weight=8.0), objectness_loss=dict( type='FocalLoss', use_sigmoid=True, gamma=2.0, alpha=0.25, loss_weight=1.0), center_loss=dict( type='SmoothL1Loss', reduction='sum', loss_weight=10.0), dir_class_loss=dict( type='CrossEntropyLoss', reduction='sum', loss_weight=1.0), dir_res_loss=dict( type='SmoothL1Loss', reduction='sum', loss_weight=10.0), size_class_loss=dict( type='CrossEntropyLoss', reduction='sum', loss_weight=1.0), size_res_loss=dict( type='SmoothL1Loss', beta=1.0, reduction='sum', loss_weight=10.0), semantic_loss=dict( type='CrossEntropyLoss', reduction='sum', loss_weight=1.0)), # model training and testing settings train_cfg=dict(sample_mod='kps'), test_cfg=dict( sample_mod='kps', nms_thr=0.25, score_thr=0.0, per_class_proposal=True, prediction_stages='last'))
model = dict(type='GroupFree3DNet', backbone=dict(type='PointNet2SASSG', in_channels=3, num_points=(2048, 1024, 512, 256), radius=(0.2, 0.4, 0.8, 1.2), num_samples=(64, 32, 16, 16), sa_channels=((64, 64, 128), (128, 128, 256), (128, 128, 256), (128, 128, 256)), fp_channels=((256, 256), (256, 288)), norm_cfg=dict(type='BN2d'), sa_cfg=dict(type='PointSAModule', pool_mod='max', use_xyz=True, normalize_xyz=True)), bbox_head=dict(type='GroupFree3DHead', in_channels=288, num_decoder_layers=6, num_proposal=256, transformerlayers=dict(type='BaseTransformerLayer', attn_cfgs=dict(type='GroupFree3DMHA', embed_dims=288, num_heads=8, attn_drop=0.1, dropout_layer=dict(type='Dropout', drop_prob=0.1)), ffn_cfgs=dict(embed_dims=288, feedforward_channels=2048, ffn_drop=0.1, act_cfg=dict(type='ReLU', inplace=True)), operation_order=('self_attn', 'norm', 'cross_attn', 'norm', 'ffn', 'norm')), pred_layer_cfg=dict(in_channels=288, shared_conv_channels=(288, 288), bias=True), sampling_objectness_loss=dict(type='FocalLoss', use_sigmoid=True, gamma=2.0, alpha=0.25, loss_weight=8.0), objectness_loss=dict(type='FocalLoss', use_sigmoid=True, gamma=2.0, alpha=0.25, loss_weight=1.0), center_loss=dict(type='SmoothL1Loss', reduction='sum', loss_weight=10.0), dir_class_loss=dict(type='CrossEntropyLoss', reduction='sum', loss_weight=1.0), dir_res_loss=dict(type='SmoothL1Loss', reduction='sum', loss_weight=10.0), size_class_loss=dict(type='CrossEntropyLoss', reduction='sum', loss_weight=1.0), size_res_loss=dict(type='SmoothL1Loss', beta=1.0, reduction='sum', loss_weight=10.0), semantic_loss=dict(type='CrossEntropyLoss', reduction='sum', loss_weight=1.0)), train_cfg=dict(sample_mod='kps'), test_cfg=dict(sample_mod='kps', nms_thr=0.25, score_thr=0.0, per_class_proposal=True, prediction_stages='last'))
#!/usr/bin/env python __all__ = ['adaptor', 'get_by_cai','util'] __author__ = "Rob Knight" __copyright__ = "Copyright 2007-2012, The Cogent Project" __credits__ = ["Rob Knight", "Stephanie Wilson", "Michael Eaton"] __license__ = "GPL" __version__ = "1.5.3" __maintainer__ = "Rob Knight" __email__ = "rob@spot.colorado.edu" __status__ = "Production"
__all__ = ['adaptor', 'get_by_cai', 'util'] __author__ = 'Rob Knight' __copyright__ = 'Copyright 2007-2012, The Cogent Project' __credits__ = ['Rob Knight', 'Stephanie Wilson', 'Michael Eaton'] __license__ = 'GPL' __version__ = '1.5.3' __maintainer__ = 'Rob Knight' __email__ = 'rob@spot.colorado.edu' __status__ = 'Production'
# -*- coding: utf-8 -*- class FieldError(Exception): pass class FieldDoesNotExist(Exception): pass class ReadOnlyError(AttributeError): pass
class Fielderror(Exception): pass class Fielddoesnotexist(Exception): pass class Readonlyerror(AttributeError): pass
# Created by MechAviv # Quest ID :: 34931 # Not coded yet sm.setSpeakerID(3001510) sm.setSpeakerType(3) sm.flipDialogue() sm.setBoxChat() sm.boxChatPlayerAsSpeaker() sm.setBoxOverrideSpeaker() sm.flipBoxChat() sm.flipBoxChatPlayerAsSpeaker() sm.setColor(1) sm.sendNext("#face1#Good work! I'm getting the signal again. We need to move quickly. Follow me.") sm.setSpeakerID(3001509) sm.setSpeakerType(3) sm.flipDialogue() sm.setBoxChat() sm.boxChatPlayerAsSpeaker() sm.setBoxOverrideSpeaker() sm.flipBoxChat() sm.flipBoxChatPlayerAsSpeaker() sm.setColor(1) sm.sendSay("#face3#Oh, we didn't let the sandstorm get us down!\r\nNow our trouble's behind us, and we're searchin' around!") # Update Quest Record EX | Quest ID: [34995] | Data: 00=h1;10=h0;01=h0;11=h0;02=h0;12=h0;13=h0;04=h0;23=h0;14=h0;05=h0;24=h0;15=h0;06=h0;16=h0;07=h0;17=h0;09=h0 sm.completeQuest(34931) # Unhandled Stat Changed [EXP] Packet: 00 00 00 00 01 00 00 00 00 00 EB 21 00 00 00 00 00 00 FF 00 00 00 00 sm.giveExp(7360) # Update Quest Record EX | Quest ID: [34931] | Data: exp=1 # Update Quest Record EX | Quest ID: [34995] | Data: 00=h1;10=h0;01=h0;11=h1;02=h0;12=h0;13=h0;04=h0;23=h0;14=h0;05=h0;24=h0;15=h0;06=h0;16=h0;07=h0;17=h0;09=h0 # Unhandled Message [47] Packet: 2F 0A 00 00 00 40 9C 00 00 00 00 00 00 28 00 00 00 00 00 00 80 05 BB 46 E6 17 02 0C 00 75 73 65 72 5F 6C 76 75 70 3D 32 36 B8 58 08 00 00 00 00 00 23 02 00 00 00 00 00 80 05 BB 46 E6 17 02 0D 00 6D 6F 62 5F 6B 69 6C 6C 3D 34 39 35 38 58 68 08 00 00 00 00 00 27 02 00 00 00 00 00 80 05 BB 46 E6 17 02 0D 00 6D 6F 62 5F 6B 69 6C 6C 3D 34 39 35 38 B0 83 08 00 00 00 00 00 2E 02 00 00 00 00 00 80 05 BB 46 E6 17 02 0B 00 6D 6F 62 5F 6B 69 6C 6C 3D 31 38 70 5E 09 00 00 00 00 00 66 02 00 00 00 00 00 80 05 BB 46 E6 17 02 14 00 63 6F 6D 62 6F 6B 69 6C 6C 5F 69 6E 63 72 65 73 65 3D 32 32 E0 75 09 00 00 00 00 00 6C 02 00 00 00 00 00 80 05 BB 46 E6 17 02 0D 00 6D 75 6C 74 69 6B 69 6C 6C 3D 34 32 34 98 81 09 00 00 00 00 00 6F 02 00 00 00 00 00 80 05 BB 46 E6 17 02 0D 00 6D 75 6C 74 69 6B 69 6C 6C 3D 34 32 34 50 8D 09 00 00 00 00 00 72 02 00 00 00 00 00 80 05 BB 46 E6 17 02 0A 00 6D 6F 62 5F 6B 69 6C 6C 3D 38 08 99 09 00 00 00 00 00 75 02 00 00 00 00 00 80 05 BB 46 E6 17 02 0A 00 6D 6F 62 5F 6B 69 6C 6C 3D 38 C4 22 11 00 00 00 00 00 63 04 00 00 0C 02 A0 18 36 98 8A D6 D4 01 0D 00 66 69 65 6C 64 5F 65 6E 74 65 72 3D 31 sm.warp(402090005, 0)
sm.setSpeakerID(3001510) sm.setSpeakerType(3) sm.flipDialogue() sm.setBoxChat() sm.boxChatPlayerAsSpeaker() sm.setBoxOverrideSpeaker() sm.flipBoxChat() sm.flipBoxChatPlayerAsSpeaker() sm.setColor(1) sm.sendNext("#face1#Good work! I'm getting the signal again. We need to move quickly. Follow me.") sm.setSpeakerID(3001509) sm.setSpeakerType(3) sm.flipDialogue() sm.setBoxChat() sm.boxChatPlayerAsSpeaker() sm.setBoxOverrideSpeaker() sm.flipBoxChat() sm.flipBoxChatPlayerAsSpeaker() sm.setColor(1) sm.sendSay("#face3#Oh, we didn't let the sandstorm get us down!\r\nNow our trouble's behind us, and we're searchin' around!") sm.completeQuest(34931) sm.giveExp(7360) sm.warp(402090005, 0)
__all__ = ["InvalidCredentialsException"] class InvalidCredentialsException(Exception): pass class NoHostsConnectedToException(Exception): pass
__all__ = ['InvalidCredentialsException'] class Invalidcredentialsexception(Exception): pass class Nohostsconnectedtoexception(Exception): pass
# More details on this kata # https://www.codewars.com/kata/51c8e37cee245da6b40000bd def solution(string,markers): if len(string) == 0: return '' t, tt, test, l, j, ret= [], [], [], [], [], '' s = string.split('\n') for _s in s: for m in markers: if _s.find(m) != -1: t.append(_s.find(m)) test.append(t) t = [] for a in test: tt.append(sorted(a)) for i, _s in zip(tt, s): if i == []: l.append(_s) if i != []: l.append(_s[:i[0]]) for s in l: if s != '': if s[-1] == ' ': j.append(s[:-1]) continue else: j.append(s) continue else: j.append(s) for i, s in enumerate(j): if i == len(j) - 1: ret += s continue ret += s + '\n' return ret
def solution(string, markers): if len(string) == 0: return '' (t, tt, test, l, j, ret) = ([], [], [], [], [], '') s = string.split('\n') for _s in s: for m in markers: if _s.find(m) != -1: t.append(_s.find(m)) test.append(t) t = [] for a in test: tt.append(sorted(a)) for (i, _s) in zip(tt, s): if i == []: l.append(_s) if i != []: l.append(_s[:i[0]]) for s in l: if s != '': if s[-1] == ' ': j.append(s[:-1]) continue else: j.append(s) continue else: j.append(s) for (i, s) in enumerate(j): if i == len(j) - 1: ret += s continue ret += s + '\n' return ret
def get_global_config(): result = { 'outcome' : 'success', 'data' : { 'credentials_file' : r'./config/config.ini', } } return result
def get_global_config(): result = {'outcome': 'success', 'data': {'credentials_file': './config/config.ini'}} return result
# Url to manually retrieve authorization code AUTH_URL = "https://auth.tdameritrade.com/auth" # API endpoint for token and authorization code authentication OAUTH_URL = "https://api.tdameritrade.com/v1/oauth2/token" # Quote endpoints GET_QUOTES_URL = "https://api.tdameritrade.com/v1/marketdata/quotes" GET_QUOTE_URL = "https://api.tdameritrade.com/v1/marketdata/" # History endpoint GET_PRICE_HISTORY_URL = "https://api.tdameritrade.com/v1/marketdata/"
auth_url = 'https://auth.tdameritrade.com/auth' oauth_url = 'https://api.tdameritrade.com/v1/oauth2/token' get_quotes_url = 'https://api.tdameritrade.com/v1/marketdata/quotes' get_quote_url = 'https://api.tdameritrade.com/v1/marketdata/' get_price_history_url = 'https://api.tdameritrade.com/v1/marketdata/'
def start(): print('\nThis is my Rock Paper Scissors Game!\n\n') Player_one = "Kaly" Player_two = "Erik" def choices(Player_one_choice, Player_two_choice): if Player_one_choice == 'rock' and Player_two_choice == 'paper': return('Paper cover Rock! ' + Player_two + ' Wins !') elif Player_one_choice == 'paper' and Player_two_choice == 'rock': return('Paper cover Rock! ' + Player_one + ' Wins !') elif Player_one_choice == 'scissors' and Player_two_choice == 'paper': return('Scissors cuts Paper! ' + Player_one + ' Wins !') elif Player_one_choice == 'paper' and Player_two_choice == 'scissors': return('Scissors cuts Paper! ' + Player_two + ' Wins !') elif Player_one_choice == 'scissors' and Player_two_choice == 'rock': return('Rock smashes Scissors! ' + Player_two + ' Wins !') elif Player_one_choice == 'rock' and Player_two_choice == 'scissors': return('Rock smashes Scissors! ' + Player_one + ' Wins !') elif Player_one_choice == Player_two_choice: return(Player_one+' and '+ Player_two + ' tied!') else: return('Please type Rock, Paper or Scissors!') Player_one_choose = input('Does '+ Player_one + ' choose Rock, Paper or Scissors? ').lower() Player_two_choose = input('Does '+ Player_two + ' choose Rock, Paper or Scissors? ').lower() print(choices(Player_one_choose, Player_two_choose)) def Play_Again(): Again = input("Would you like to play the game again? ").lower() if Again == 'no': quit() if Again == 'yes': start() else: print('Please enter Yes or No. Thank you!') Play_Again() Play_Again() start()
def start(): print('\nThis is my Rock Paper Scissors Game!\n\n') player_one = 'Kaly' player_two = 'Erik' def choices(Player_one_choice, Player_two_choice): if Player_one_choice == 'rock' and Player_two_choice == 'paper': return 'Paper cover Rock! ' + Player_two + ' Wins !' elif Player_one_choice == 'paper' and Player_two_choice == 'rock': return 'Paper cover Rock! ' + Player_one + ' Wins !' elif Player_one_choice == 'scissors' and Player_two_choice == 'paper': return 'Scissors cuts Paper! ' + Player_one + ' Wins !' elif Player_one_choice == 'paper' and Player_two_choice == 'scissors': return 'Scissors cuts Paper! ' + Player_two + ' Wins !' elif Player_one_choice == 'scissors' and Player_two_choice == 'rock': return 'Rock smashes Scissors! ' + Player_two + ' Wins !' elif Player_one_choice == 'rock' and Player_two_choice == 'scissors': return 'Rock smashes Scissors! ' + Player_one + ' Wins !' elif Player_one_choice == Player_two_choice: return Player_one + ' and ' + Player_two + ' tied!' else: return 'Please type Rock, Paper or Scissors!' player_one_choose = input('Does ' + Player_one + ' choose Rock, Paper or Scissors? ').lower() player_two_choose = input('Does ' + Player_two + ' choose Rock, Paper or Scissors? ').lower() print(choices(Player_one_choose, Player_two_choose)) def play__again(): again = input('Would you like to play the game again? ').lower() if Again == 'no': quit() if Again == 'yes': start() else: print('Please enter Yes or No. Thank you!') play__again() play__again() start()
def parameters(): epsilon = 0.0001 # regularization K = 3 # number of desired clusters n_iter = 5 # number of iterations skin_n_iter = 5 skin_epsilon = 0.0001 skin_K = 3 theta = 2.0 # threshold for skin detection return epsilon, K, n_iter, skin_n_iter, skin_epsilon, skin_K, theta
def parameters(): epsilon = 0.0001 k = 3 n_iter = 5 skin_n_iter = 5 skin_epsilon = 0.0001 skin_k = 3 theta = 2.0 return (epsilon, K, n_iter, skin_n_iter, skin_epsilon, skin_K, theta)
def perm(text1, text2): return sum(ord(c) for c in text1) == sum(ord(c) for c in text2) # test one = 'abc' two = 'bcaa' print(perm(one, two))
def perm(text1, text2): return sum((ord(c) for c in text1)) == sum((ord(c) for c in text2)) one = 'abc' two = 'bcaa' print(perm(one, two))
class Problem: def __init__(self, n, m): self.n = n self.m = m self.answer = [0 for _ in range(m)] self.used = [False for _ in range(n)] def printAnswer(self): for number in self.answer: print(number,end=' ') print() def makeAnswer(self, index): if index == len(self.answer): self.printAnswer() return for i in range(1, n+1): if index == 0 or (self.used[i-1] == False and self.answer[index-1]<i): self.answer[index] = i self.used[i-1] = True self.makeAnswer(index+1) self.used[i-1] = False self.answer[index] = 0 return def printAnswers(self): self.makeAnswer(0) return n, m = map(int, input().split()) problem = Problem(n, m) problem.printAnswers()
class Problem: def __init__(self, n, m): self.n = n self.m = m self.answer = [0 for _ in range(m)] self.used = [False for _ in range(n)] def print_answer(self): for number in self.answer: print(number, end=' ') print() def make_answer(self, index): if index == len(self.answer): self.printAnswer() return for i in range(1, n + 1): if index == 0 or (self.used[i - 1] == False and self.answer[index - 1] < i): self.answer[index] = i self.used[i - 1] = True self.makeAnswer(index + 1) self.used[i - 1] = False self.answer[index] = 0 return def print_answers(self): self.makeAnswer(0) return (n, m) = map(int, input().split()) problem = problem(n, m) problem.printAnswers()
class Node: def __init__(self, data): self.right = self.left = None self.data = data class Solution: def insert(self, root, data): if root is None: return Node(data) else: if data <= root.data: cur = self.insert(root.left, data) root.left = cur else: cur = self.insert(root.right, data) root.right = cur return root def level_order(self, root): tree_height = self.get_height(root) for level in range(1, tree_height + 1): self.print_nodes_in_level(root, level) def print_nodes_in_level(self, root, level): if root is not None: if level == 1: print(root.data, end=' ') elif level > 1: self.print_nodes_in_level(root.left, level - 1) self.print_nodes_in_level(root.right, level - 1) def get_height(self, root): if root is None: return 0 else: current = root height_left = self.get_height(current.left) height_right = self.get_height(current.right) return 1 + max(height_left, height_right) T = int(input()) myTree = Solution() root = None for i in range(T): data = int(input()) root = myTree.insert(root, data) myTree.level_order(root)
class Node: def __init__(self, data): self.right = self.left = None self.data = data class Solution: def insert(self, root, data): if root is None: return node(data) elif data <= root.data: cur = self.insert(root.left, data) root.left = cur else: cur = self.insert(root.right, data) root.right = cur return root def level_order(self, root): tree_height = self.get_height(root) for level in range(1, tree_height + 1): self.print_nodes_in_level(root, level) def print_nodes_in_level(self, root, level): if root is not None: if level == 1: print(root.data, end=' ') elif level > 1: self.print_nodes_in_level(root.left, level - 1) self.print_nodes_in_level(root.right, level - 1) def get_height(self, root): if root is None: return 0 else: current = root height_left = self.get_height(current.left) height_right = self.get_height(current.right) return 1 + max(height_left, height_right) t = int(input()) my_tree = solution() root = None for i in range(T): data = int(input()) root = myTree.insert(root, data) myTree.level_order(root)
def define_suit(card): if card.endswith("C"): return "clubs" if card.endswith("D"): return "diamonds" if card.endswith("H"): return "hearts" if card.endswith("S"): return "spades"
def define_suit(card): if card.endswith('C'): return 'clubs' if card.endswith('D'): return 'diamonds' if card.endswith('H'): return 'hearts' if card.endswith('S'): return 'spades'
_base_ = [ '../_base_/models/retinanet_r50_fpn.py', '../_base_/datasets/coco_detection.py', '../_base_/schedules/schedule_1x.py', '../_base_/default_runtime.py' ] model = dict( backbone=dict( type='ResNetEMOD', ar=dict(ratio=1. / 4.), stage_with_ar=(True, True, True, True) ), bbox_head=dict(num_classes=11)) # dataset settings dataset_type = 'CocoDataset' data_root = 'data/underwater/' classes=('Gastropoda', 'Osteroida', 'Cephalopoda', 'Decapoda', 'Aplousobranchia', 'NotPleuronectiformes', 'Perciformes', 'Fish', 'Rajiformes', 'NonLiving', 'Pleuronectiformes') img_norm_cfg = dict( mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True) train_pipeline = [ dict(type='LoadImageFromFile'), dict(type='LoadAnnotations', with_bbox=True), dict(type='Resize', img_scale=(1333, 800), keep_ratio=True), dict(type='RandomFlip', flip_ratio=0.5), dict(type='Normalize', **img_norm_cfg), dict(type='Pad', size_divisor=32), dict(type='DefaultFormatBundle'), dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels']), ] test_pipeline = [ dict(type='LoadImageFromFile'), dict( type='MultiScaleFlipAug', img_scale=(1333, 800), flip=False, transforms=[ dict(type='Resize', keep_ratio=True), dict(type='RandomFlip'), dict(type='Normalize', **img_norm_cfg), dict(type='Pad', size_divisor=32), dict(type='ImageToTensor', keys=['img']), dict(type='Collect', keys=['img']), ]) ] data = dict( samples_per_gpu=2, workers_per_gpu=2, train=dict( type=dataset_type, classes=classes, ann_file=data_root + 'annotations/habcam_seq0_training_1.mscoco.json', img_prefix=data_root + 'habcam_seq0/', pipeline=train_pipeline), val=dict( type=dataset_type, classes=classes, ann_file=data_root + 'annotations/habcam_seq0_validation_1.mscoco.json', img_prefix=data_root + 'habcam_seq0/', pipeline=test_pipeline), test=dict( type=dataset_type, classes=classes, ann_file=data_root + 'annotations/habcam_seq0_validation_1.mscoco.json', img_prefix=data_root + 'habcam_seq0/', pipeline=test_pipeline)) # optimizer optimizer = dict(type='SGD', lr=0.005, momentum=0.9, weight_decay=0.0001) optimizer_config = dict(grad_clip=dict(max_norm=35, norm_type=2),_delete_=True) # learning policy lr_config = dict( policy='step', warmup='linear', warmup_iters=500, warmup_ratio=0.1, step=[8, 11]) runner = dict(type='EpochBasedRunner', max_epochs=12)
_base_ = ['../_base_/models/retinanet_r50_fpn.py', '../_base_/datasets/coco_detection.py', '../_base_/schedules/schedule_1x.py', '../_base_/default_runtime.py'] model = dict(backbone=dict(type='ResNetEMOD', ar=dict(ratio=1.0 / 4.0), stage_with_ar=(True, True, True, True)), bbox_head=dict(num_classes=11)) dataset_type = 'CocoDataset' data_root = 'data/underwater/' classes = ('Gastropoda', 'Osteroida', 'Cephalopoda', 'Decapoda', 'Aplousobranchia', 'NotPleuronectiformes', 'Perciformes', 'Fish', 'Rajiformes', 'NonLiving', 'Pleuronectiformes') img_norm_cfg = dict(mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True) train_pipeline = [dict(type='LoadImageFromFile'), dict(type='LoadAnnotations', with_bbox=True), dict(type='Resize', img_scale=(1333, 800), keep_ratio=True), dict(type='RandomFlip', flip_ratio=0.5), dict(type='Normalize', **img_norm_cfg), dict(type='Pad', size_divisor=32), dict(type='DefaultFormatBundle'), dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels'])] test_pipeline = [dict(type='LoadImageFromFile'), dict(type='MultiScaleFlipAug', img_scale=(1333, 800), flip=False, transforms=[dict(type='Resize', keep_ratio=True), dict(type='RandomFlip'), dict(type='Normalize', **img_norm_cfg), dict(type='Pad', size_divisor=32), dict(type='ImageToTensor', keys=['img']), dict(type='Collect', keys=['img'])])] data = dict(samples_per_gpu=2, workers_per_gpu=2, train=dict(type=dataset_type, classes=classes, ann_file=data_root + 'annotations/habcam_seq0_training_1.mscoco.json', img_prefix=data_root + 'habcam_seq0/', pipeline=train_pipeline), val=dict(type=dataset_type, classes=classes, ann_file=data_root + 'annotations/habcam_seq0_validation_1.mscoco.json', img_prefix=data_root + 'habcam_seq0/', pipeline=test_pipeline), test=dict(type=dataset_type, classes=classes, ann_file=data_root + 'annotations/habcam_seq0_validation_1.mscoco.json', img_prefix=data_root + 'habcam_seq0/', pipeline=test_pipeline)) optimizer = dict(type='SGD', lr=0.005, momentum=0.9, weight_decay=0.0001) optimizer_config = dict(grad_clip=dict(max_norm=35, norm_type=2), _delete_=True) lr_config = dict(policy='step', warmup='linear', warmup_iters=500, warmup_ratio=0.1, step=[8, 11]) runner = dict(type='EpochBasedRunner', max_epochs=12)
class ValorantApi(Exception): pass class InvalidOrMissingParameter(ValorantApi): # 400 pass class NotFound(ValorantApi): # 404 pass class AttributeExistsError(ValorantApi): pass
class Valorantapi(Exception): pass class Invalidormissingparameter(ValorantApi): pass class Notfound(ValorantApi): pass class Attributeexistserror(ValorantApi): pass
class MobilePhone: def __init__(self, memory): self.memory = memory class Camera: def take_picture(self): print("Say cheese!") class CameraPhone(MobilePhone, Camera): pass iphone = CameraPhone('16GB') print(iphone.memory) iphone.take_picture()
class Mobilephone: def __init__(self, memory): self.memory = memory class Camera: def take_picture(self): print('Say cheese!') class Cameraphone(MobilePhone, Camera): pass iphone = camera_phone('16GB') print(iphone.memory) iphone.take_picture()
# =============================================================== # =======================AST=HIERARCHY=========================== # =============================================================== ERROR = 0 INTEGER = 1 class Node: def __init__(self): self.static_type = "" class ProgramNode(Node): def __init__(self, class_list): Node.__init__(self) self.class_list = class_list #self.expr = expr class ClassNode(Node): def __init__(self,name,parent,feature_list): Node.__init__(self) self.name = name self.parent = parent self.feature_list = feature_list class FeatureNode(Node): pass class Atribute_Definition(FeatureNode): def __init__(self,att_id,att_type,exp): Node.__init__(self) self.att_id = att_id self.att_type = att_type self.expr = exp class Method_Definition(FeatureNode): def __init__(self,meth_id,param_list, return_type, exp): Node.__init__(self) self.meth_id = meth_id self.param_list = param_list self.return_type = return_type self.exp = exp class ParamNode(Node): def __init__(self,par_id,par_type): Node.__init__(self) self.par_id = par_id self.par_type = par_type class ExpressionNode(Node): pass class DotNode(Node): def __init__(self,expression,method_id,exp,exp_type): Node.__init__(self) self.expression = expression self.method_id = method_id self.exp_type = exp_type self.exp = exp class MethodCallNode(Node): def __init__(self,method_id,exp): Node.__init__(self) self.method_id = method_id self.exp = exp class IfNode(Node): def __init__(self,condition,true_exp,false_exp): Node.__init__(self) self.condition = condition self.true_exp = true_exp self.false_exp = false_exp class WhileNode(Node): def __init__(self,condition,exp): Node.__init__(self) self.condition = condition self.exp = exp class CaseNode(Node): def __init__(self, cases_list, exp): Node.__init__(self) self.exp = exp self.cases_list = cases_list # Case[] class Case(Node): def __init__(self,var_id,exp_type,exp): Node.__init__(self) self.exp = exp self.exp_type = exp_type self.var_id = var_id class NewNode(Node): def __init__(self,n_type): Node.__init__(self) self.type = n_type class UtilNode(Node): pass class BinaryOperatorNode(ExpressionNode): def __init__(self, left, right): Node.__init__(self) self.left = left self.right = right class UnaryOperator(ExpressionNode): def __init__(self, expr): Node.__init__(self) self.expr = expr class CompareNode(ExpressionNode): def __init__(self, left, right): Node.__init__(self) self.left = left self.right = right class AtomicNode(ExpressionNode): pass class IsVoidNode(UnaryOperator): pass class PlusNode(BinaryOperatorNode): pass class MinusNode(BinaryOperatorNode): pass class StarNode(BinaryOperatorNode): pass class DivNode(BinaryOperatorNode): pass class NegationNode(UnaryOperator): pass class IntComplement(UnaryOperator): pass class LessThan(CompareNode): pass class LessThanEquals(CompareNode): pass class Equals(CompareNode): pass class LetInNode(AtomicNode): def __init__(self, declaration_list, expr): Node.__init__(self) self.declaration_list = declaration_list self.expr = expr class BlockNode(AtomicNode): def __init__(self, expr_list): Node.__init__(self) self.expr_list = expr_list class ParentesisNode(AtomicNode): def __init__(self, expr): Node.__init__(self) self.expr = expr class AssignNode(AtomicNode): def __init__(self, idx_token, expr): Node.__init__(self) self.idx_token = idx_token self.expr = expr self.variable_info = None class IntegerNode(AtomicNode): def __init__(self, integer_token): Node.__init__(self) self.integer_token = integer_token class StringNode(AtomicNode): def __init__(self, string): Node.__init__(self) self.string = string class BoolNode(AtomicNode): def __init__(self, boolean): Node.__init__(self) self.boolean = boolean class VariableNode(AtomicNode): def __init__(self, idx_token): Node.__init__(self) self.idx_token = idx_token self.variable_info = None class DeclarationNode(UtilNode): def __init__(self, idx_token, id_type, expr=None): Node.__init__(self) self.idx_token = idx_token self.id_type = id_type self.expr = expr self.variable_info = None
error = 0 integer = 1 class Node: def __init__(self): self.static_type = '' class Programnode(Node): def __init__(self, class_list): Node.__init__(self) self.class_list = class_list class Classnode(Node): def __init__(self, name, parent, feature_list): Node.__init__(self) self.name = name self.parent = parent self.feature_list = feature_list class Featurenode(Node): pass class Atribute_Definition(FeatureNode): def __init__(self, att_id, att_type, exp): Node.__init__(self) self.att_id = att_id self.att_type = att_type self.expr = exp class Method_Definition(FeatureNode): def __init__(self, meth_id, param_list, return_type, exp): Node.__init__(self) self.meth_id = meth_id self.param_list = param_list self.return_type = return_type self.exp = exp class Paramnode(Node): def __init__(self, par_id, par_type): Node.__init__(self) self.par_id = par_id self.par_type = par_type class Expressionnode(Node): pass class Dotnode(Node): def __init__(self, expression, method_id, exp, exp_type): Node.__init__(self) self.expression = expression self.method_id = method_id self.exp_type = exp_type self.exp = exp class Methodcallnode(Node): def __init__(self, method_id, exp): Node.__init__(self) self.method_id = method_id self.exp = exp class Ifnode(Node): def __init__(self, condition, true_exp, false_exp): Node.__init__(self) self.condition = condition self.true_exp = true_exp self.false_exp = false_exp class Whilenode(Node): def __init__(self, condition, exp): Node.__init__(self) self.condition = condition self.exp = exp class Casenode(Node): def __init__(self, cases_list, exp): Node.__init__(self) self.exp = exp self.cases_list = cases_list class Case(Node): def __init__(self, var_id, exp_type, exp): Node.__init__(self) self.exp = exp self.exp_type = exp_type self.var_id = var_id class Newnode(Node): def __init__(self, n_type): Node.__init__(self) self.type = n_type class Utilnode(Node): pass class Binaryoperatornode(ExpressionNode): def __init__(self, left, right): Node.__init__(self) self.left = left self.right = right class Unaryoperator(ExpressionNode): def __init__(self, expr): Node.__init__(self) self.expr = expr class Comparenode(ExpressionNode): def __init__(self, left, right): Node.__init__(self) self.left = left self.right = right class Atomicnode(ExpressionNode): pass class Isvoidnode(UnaryOperator): pass class Plusnode(BinaryOperatorNode): pass class Minusnode(BinaryOperatorNode): pass class Starnode(BinaryOperatorNode): pass class Divnode(BinaryOperatorNode): pass class Negationnode(UnaryOperator): pass class Intcomplement(UnaryOperator): pass class Lessthan(CompareNode): pass class Lessthanequals(CompareNode): pass class Equals(CompareNode): pass class Letinnode(AtomicNode): def __init__(self, declaration_list, expr): Node.__init__(self) self.declaration_list = declaration_list self.expr = expr class Blocknode(AtomicNode): def __init__(self, expr_list): Node.__init__(self) self.expr_list = expr_list class Parentesisnode(AtomicNode): def __init__(self, expr): Node.__init__(self) self.expr = expr class Assignnode(AtomicNode): def __init__(self, idx_token, expr): Node.__init__(self) self.idx_token = idx_token self.expr = expr self.variable_info = None class Integernode(AtomicNode): def __init__(self, integer_token): Node.__init__(self) self.integer_token = integer_token class Stringnode(AtomicNode): def __init__(self, string): Node.__init__(self) self.string = string class Boolnode(AtomicNode): def __init__(self, boolean): Node.__init__(self) self.boolean = boolean class Variablenode(AtomicNode): def __init__(self, idx_token): Node.__init__(self) self.idx_token = idx_token self.variable_info = None class Declarationnode(UtilNode): def __init__(self, idx_token, id_type, expr=None): Node.__init__(self) self.idx_token = idx_token self.id_type = id_type self.expr = expr self.variable_info = None
# for i in range(17): # print("{0:>2} in hex is {0:>02x}".format(i)) # # # x = 0x20 # y = 0x0a # # # print(x) # print(y) # print(x * y) # # # print(0b101010) # When converting a decimal number to binary, you look for the highest power # of 2 smaller than the number and put a 1 in that column. You then take the # remainder and repeat the process with the next highest power - putting a 1 # if it goes into the remainder and a zero otherwise. Keep repeating until you # have dealt with all powers down to 2 ** 0 (i.e., 1). # # Write a program that requests a number from the keyboard, then prints out # its binary representation. # # Obviously you could use a format string, but that is not allowed for this # challenge. # # The program should cater for numbers up to 65535; i.e. (2 ** 16) - 1 # # Hint: you will need integer division (//), and modulo (%) to get the remainder. # You will also need ** to raise one number to the power of another: # For example, 2 ** 8 raises 2 to the power 8. # # As an optional extra, avoid printing leading zeros. # # Once the program is working, modify it to print Octal rather than binary. powers = [] for power in range(15, -1, -1): powers.append(2 ** power) #binary # powers.append(8 ** power) #octal print(powers) x = int(input("Please enter a number: ")) printing = False for power in powers: # print(x // power, end="") bit = x // power if bit != 0 or power == 1: printing = True if printing: print(bit, end="") x %= power
powers = [] for power in range(15, -1, -1): powers.append(2 ** power) print(powers) x = int(input('Please enter a number: ')) printing = False for power in powers: bit = x // power if bit != 0 or power == 1: printing = True if printing: print(bit, end='') x %= power
class ListNode: def __init__(self, val=0, next=None): self.val = val self.next = next def __repr__(self): return str(self.val) # Brute Force; Time: O(n^2); Space: O(n) def next_larger_nodes(head): res = [] slow = head while slow: fast = slow.next while fast: if fast.val > slow.val: res.append(fast.val) break fast = fast.next else: res.append(0) slow = slow.next return res # Using Stack; Time: O(n); Space: O(n) def next_larger_nodes2(head): stack = [head.val] res = [0] cur = head.next while cur: count = 0 while stack and cur.val > stack[-1]: if res[-1 - count] == 0: res[-1 - count] = cur.val stack.pop() count += 1 stack.append(cur.val) res.append(0) cur = cur.next return res # Better implementation def next_larger_nodes3(head): stack, res, pos = [], [], 0 while head: res.append(0) while stack and head.val > stack[-1][1]: idx, _ = stack.pop() res[idx] = head.val stack.append((pos, head.val)) head = head.next pos += 1 return res # Test cases: head = ListNode(1) head.next = ListNode(2) head.next.next = ListNode(3) # head.next.next.next = ListNode(3) # head.next.next.next.next = ListNode(5) print(next_larger_nodes3(head))
class Listnode: def __init__(self, val=0, next=None): self.val = val self.next = next def __repr__(self): return str(self.val) def next_larger_nodes(head): res = [] slow = head while slow: fast = slow.next while fast: if fast.val > slow.val: res.append(fast.val) break fast = fast.next else: res.append(0) slow = slow.next return res def next_larger_nodes2(head): stack = [head.val] res = [0] cur = head.next while cur: count = 0 while stack and cur.val > stack[-1]: if res[-1 - count] == 0: res[-1 - count] = cur.val stack.pop() count += 1 stack.append(cur.val) res.append(0) cur = cur.next return res def next_larger_nodes3(head): (stack, res, pos) = ([], [], 0) while head: res.append(0) while stack and head.val > stack[-1][1]: (idx, _) = stack.pop() res[idx] = head.val stack.append((pos, head.val)) head = head.next pos += 1 return res head = list_node(1) head.next = list_node(2) head.next.next = list_node(3) print(next_larger_nodes3(head))
{ "targets": [ { "target_name": "crc", "sources": [ "./src/crc_module.c", "./src/crc.c" ] }, ] }
{'targets': [{'target_name': 'crc', 'sources': ['./src/crc_module.c', './src/crc.c']}]}
class Node: def __init__(self, val, next=None): self.val = val self.next = next input_list = [0, 1, 2, 3, 4] root = None for val in input_list: root = Node(val, root) cur = root while cur: print(cur.val) cur = cur.next print('Stack after pop: ') root = root.next cur = root while cur: print(cur.val) cur = cur.next print('Peeked data', root.val) print('Peeked data', root.val) print('Clearing out') root = None print('Stack is empty' if root is None else 'Stack is not empty')
class Node: def __init__(self, val, next=None): self.val = val self.next = next input_list = [0, 1, 2, 3, 4] root = None for val in input_list: root = node(val, root) cur = root while cur: print(cur.val) cur = cur.next print('Stack after pop: ') root = root.next cur = root while cur: print(cur.val) cur = cur.next print('Peeked data', root.val) print('Peeked data', root.val) print('Clearing out') root = None print('Stack is empty' if root is None else 'Stack is not empty')
class ExportObjStatus: SUCCESS = 'success' ERROR = 'error' IN_PROGRESS = 'in_progress' CHOICES = [ (SUCCESS, 'Success'), (ERROR, 'Error'), (IN_PROGRESS, 'In progress'), ]
class Exportobjstatus: success = 'success' error = 'error' in_progress = 'in_progress' choices = [(SUCCESS, 'Success'), (ERROR, 'Error'), (IN_PROGRESS, 'In progress')]
def capitalize(string): # We can't use title() here, consider the case: "123name" -> "123Name", which isn't correct. for substring in string.split(): string = string.replace(substring, substring.capitalize()) return string
def capitalize(string): for substring in string.split(): string = string.replace(substring, substring.capitalize()) return string
# https://leetcode.com/problems/find-leaves-of-binary-tree/ class Solution: def findLeaves(self, root: Optional[TreeNode]) -> List[List[int]]: result = [] while root.left or root.right: result.append(self.popLeaves(root, root, [])) result.append([root.val]) return result def popLeaves(self, root: Optional[TreeNode], parent: Optional[TreeNode], result: List[int]) -> List[int]: if root is None: return None if not (root.left or root.right): if parent.left == root: parent.left = None else: parent.right = None return result.append(root.val) self.popLeaves(root.left, root, result) self.popLeaves(root.right, root, result) return result # Efficient Solution class Solution: def findLeaves(self, root: Optional[TreeNode]) -> List[List[int]]: def dfs(node): if not node: return -1 height = 1 + max(dfs(node.left), dfs(node.right)) if height == len(result): result.append([]) result[height].append(node.val) return height result = [] dfs(root) return result
class Solution: def find_leaves(self, root: Optional[TreeNode]) -> List[List[int]]: result = [] while root.left or root.right: result.append(self.popLeaves(root, root, [])) result.append([root.val]) return result def pop_leaves(self, root: Optional[TreeNode], parent: Optional[TreeNode], result: List[int]) -> List[int]: if root is None: return None if not (root.left or root.right): if parent.left == root: parent.left = None else: parent.right = None return result.append(root.val) self.popLeaves(root.left, root, result) self.popLeaves(root.right, root, result) return result class Solution: def find_leaves(self, root: Optional[TreeNode]) -> List[List[int]]: def dfs(node): if not node: return -1 height = 1 + max(dfs(node.left), dfs(node.right)) if height == len(result): result.append([]) result[height].append(node.val) return height result = [] dfs(root) return result
class Monster: def __init__(self, name, color): self.name = name self.color = color def attack(self): print('I am attacking...') class Fogthing(Monster): def attack(self): print('I am killing...') def make_sound(self): print('Grrrrrrrrrr\n') fogthing = Fogthing("Fogthing", "Yellow") fogthing.attack() fogthing.make_sound()
class Monster: def __init__(self, name, color): self.name = name self.color = color def attack(self): print('I am attacking...') class Fogthing(Monster): def attack(self): print('I am killing...') def make_sound(self): print('Grrrrrrrrrr\n') fogthing = fogthing('Fogthing', 'Yellow') fogthing.attack() fogthing.make_sound()
# https://codeforces.com/problemset/problem/1367/A t = int(input()) for i in range(t): s = input() ss = [s[0]] for i in range(0, len(s)-1, 2): ss.append((s[i], s[i+1])[1]) print(''.join(ss))
t = int(input()) for i in range(t): s = input() ss = [s[0]] for i in range(0, len(s) - 1, 2): ss.append((s[i], s[i + 1])[1]) print(''.join(ss))
# coding : utf-8 ''' Copyright 2019 Agnese Salutari. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License ''' templatesRoot = "static/templates/" cssFilesRoot = "static/css/" jsFilesRoot = "static/scripts/" jsonFilesRoot = "static/json/" imgFilesRoot = "static/img/" templates = { "index.html": { "name": "index.html", "model": "IndexViewModel", }, "index": { "name": "index.html", "model": "IndexViewModel", }, "/": { "name": "index.html", "model": "IndexViewModel", }, "": { "name": "index.html", "model": "IndexViewModel", }, } actionsForPOST = { # "fooRequest": Models.Example.save, } def callbackTest(self, value): print("I'm the callbackTest!!! " + str(value)) callbacks = { "POST": callbackTest, "GET": callbackTest, }
""" Copyright 2019 Agnese Salutari. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License """ templates_root = 'static/templates/' css_files_root = 'static/css/' js_files_root = 'static/scripts/' json_files_root = 'static/json/' img_files_root = 'static/img/' templates = {'index.html': {'name': 'index.html', 'model': 'IndexViewModel'}, 'index': {'name': 'index.html', 'model': 'IndexViewModel'}, '/': {'name': 'index.html', 'model': 'IndexViewModel'}, '': {'name': 'index.html', 'model': 'IndexViewModel'}} actions_for_post = {} def callback_test(self, value): print("I'm the callbackTest!!! " + str(value)) callbacks = {'POST': callbackTest, 'GET': callbackTest}
ora_start=int(input("Ora=")) minut_start=int(input("Minute=")) durata_ore=int(input("Cate ore dureaza drumul=")) durata_minute=int(input("Cate minute dureaza drumul")) ora_fin = ora_start+durata_ore minute_fin = minut_start+durata_minute if minute_fin>60: minute_fin%=60 ora_fin+=1 print(ora_fin,minute_fin)
ora_start = int(input('Ora=')) minut_start = int(input('Minute=')) durata_ore = int(input('Cate ore dureaza drumul=')) durata_minute = int(input('Cate minute dureaza drumul')) ora_fin = ora_start + durata_ore minute_fin = minut_start + durata_minute if minute_fin > 60: minute_fin %= 60 ora_fin += 1 print(ora_fin, minute_fin)
def digitDifferenceSort(a): def dg(n): s = list(map(int, str(n))) return max(s) - min(s) ans = [(a[i], i) for i in range(len(a))] A = sorted(ans, key = lambda x: (dg(x[0]), -x[1])) return [c[0] for c in A]
def digit_difference_sort(a): def dg(n): s = list(map(int, str(n))) return max(s) - min(s) ans = [(a[i], i) for i in range(len(a))] a = sorted(ans, key=lambda x: (dg(x[0]), -x[1])) return [c[0] for c in A]
# Topology with a single loop # A --- B --- C # | | # D --- E topo = { 'A' : ['B', 'D'], 'B' : ['A', 'C', 'E'], 'C' : ['B'], 'D' : ['A', 'E'], 'E' : ['B', 'D'] }
topo = {'A': ['B', 'D'], 'B': ['A', 'C', 'E'], 'C': ['B'], 'D': ['A', 'E'], 'E': ['B', 'D']}
# # PySNMP MIB module IB-SMA-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/IB-SMA-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 19:39:05 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") ConstraintsUnion, ValueRangeConstraint, ValueSizeConstraint, SingleValueConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "ValueRangeConstraint", "ValueSizeConstraint", "SingleValueConstraint", "ConstraintsIntersection") IbDataPortAndInvalid, IbUnicastLid, IbMulticastLid, infinibandMIB, IbDataPort, IbGuid, IbSmPortList = mibBuilder.importSymbols("IB-TC-MIB", "IbDataPortAndInvalid", "IbUnicastLid", "IbMulticastLid", "infinibandMIB", "IbDataPort", "IbGuid", "IbSmPortList") SnmpAdminString, = mibBuilder.importSymbols("SNMP-FRAMEWORK-MIB", "SnmpAdminString") ModuleCompliance, NotificationGroup, ObjectGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup", "ObjectGroup") TimeTicks, Counter64, MibScalar, MibTable, MibTableRow, MibTableColumn, Counter32, iso, Bits, Gauge32, MibIdentifier, NotificationType, IpAddress, Integer32, ObjectIdentity, ModuleIdentity, Unsigned32 = mibBuilder.importSymbols("SNMPv2-SMI", "TimeTicks", "Counter64", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter32", "iso", "Bits", "Gauge32", "MibIdentifier", "NotificationType", "IpAddress", "Integer32", "ObjectIdentity", "ModuleIdentity", "Unsigned32") TextualConvention, DisplayString, TruthValue = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString", "TruthValue") ibSmaMIB = ModuleIdentity((1, 3, 6, 1, 3, 117, 3)) ibSmaMIB.setRevisions(('2005-09-01 12:00',)) if mibBuilder.loadTexts: ibSmaMIB.setLastUpdated('200509011200Z') if mibBuilder.loadTexts: ibSmaMIB.setOrganization('IETF IP Over IB (IPOIB) Working Group') ibSmaObjects = MibIdentifier((1, 3, 6, 1, 3, 117, 3, 1)) ibSmaNotifications = MibIdentifier((1, 3, 6, 1, 3, 117, 3, 2)) ibSmaConformance = MibIdentifier((1, 3, 6, 1, 3, 117, 3, 3)) ibSmaNodeInfo = MibIdentifier((1, 3, 6, 1, 3, 117, 3, 1, 1)) ibSmaNodeString = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 1), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(1, 64))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaNodeString.setStatus('current') ibSmaNodeBaseVersion = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaNodeBaseVersion.setStatus('current') ibSmaNodeClassVersion = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 3), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaNodeClassVersion.setStatus('current') ibSmaNodeType = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("channelAdapter", 1), ("switch", 2), ("router", 3), ("reserved", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaNodeType.setStatus('current') ibSmaNodeNumPorts = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 5), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 254))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaNodeNumPorts.setStatus('current') ibSmaSystemImageGuid = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 6), IbGuid()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaSystemImageGuid.setStatus('current') ibSmaNodeGuid = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 7), IbGuid()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaNodeGuid.setStatus('current') ibSmaNodePortGuid = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 8), IbGuid()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaNodePortGuid.setStatus('current') ibSmaNodePartitionTableNum = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 9), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaNodePartitionTableNum.setStatus('current') ibSmaNodeDeviceId = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 10), OctetString().subtype(subtypeSpec=ValueSizeConstraint(2, 2)).setFixedLength(2)).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaNodeDeviceId.setStatus('current') ibSmaNodeRevision = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 11), OctetString().subtype(subtypeSpec=ValueSizeConstraint(4, 4)).setFixedLength(4)).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaNodeRevision.setStatus('current') ibSmaNodeLocalPortNumOrZero = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 12), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 254))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaNodeLocalPortNumOrZero.setStatus('current') ibSmaNodeVendorId = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 13), OctetString().subtype(subtypeSpec=ValueSizeConstraint(3, 3)).setFixedLength(3)).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaNodeVendorId.setStatus('current') ibSmaNodeLid = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 14), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: ibSmaNodeLid.setStatus('current') ibSmaNodePortNum = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 15), IbDataPort()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: ibSmaNodePortNum.setStatus('current') ibSmaNodeMethod = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 16), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: ibSmaNodeMethod.setStatus('current') ibSmaNodeAttributeId = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 17), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: ibSmaNodeAttributeId.setStatus('current') ibSmaNodeAttributeModifier = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 18), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 4294967295))).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: ibSmaNodeAttributeModifier.setStatus('current') ibSmaNodeKey = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 19), OctetString().subtype(subtypeSpec=ValueSizeConstraint(8, 8)).setFixedLength(8)).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: ibSmaNodeKey.setStatus('current') ibSmaNodeLid2 = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 20), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: ibSmaNodeLid2.setStatus('current') ibSmaNodeServiceLevel = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 21), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 15))).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: ibSmaNodeServiceLevel.setStatus('current') ibSmaNodeQueuePair1 = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 22), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 16777215))).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: ibSmaNodeQueuePair1.setStatus('current') ibSmaNodeQueuePair2 = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 23), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 16777215))).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: ibSmaNodeQueuePair2.setStatus('current') ibSmaNodeGid1 = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 24), OctetString().subtype(subtypeSpec=ValueSizeConstraint(16, 16)).setFixedLength(16)).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: ibSmaNodeGid1.setStatus('current') ibSmaNodeGid2 = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 25), OctetString().subtype(subtypeSpec=ValueSizeConstraint(16, 16)).setFixedLength(16)).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: ibSmaNodeGid2.setStatus('current') ibSmaNodeCapMask = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 26), OctetString().subtype(subtypeSpec=ValueSizeConstraint(4, 4)).setFixedLength(4)).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: ibSmaNodeCapMask.setStatus('current') ibSmaNodeSwitchLid = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 27), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: ibSmaNodeSwitchLid.setStatus('current') ibSmaNodeDataValid = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 28), Bits().clone(namedValues=NamedValues(("lidaddr1", 0), ("lidaddr2", 1), ("pkey", 2), ("sl", 3), ("qp1", 4), ("qp2", 5), ("gidaddr1", 6), ("gidaddr2", 7)))).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: ibSmaNodeDataValid.setStatus('current') ibSmaSwitchInfo = MibIdentifier((1, 3, 6, 1, 3, 117, 3, 1, 2)) ibSmaSwLinearFdbTableNum = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 49151))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaSwLinearFdbTableNum.setStatus('current') ibSmaSwRandomFdbTableNum = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 49151))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaSwRandomFdbTableNum.setStatus('current') ibSmaSwMulticastFdbTableNum = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 3), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 16383))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaSwMulticastFdbTableNum.setStatus('current') ibSmaSwLinearFdbTop = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 4), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 49151))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaSwLinearFdbTop.setStatus('current') ibSmaSwDefaultPort = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 5), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 254))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaSwDefaultPort.setStatus('current') ibSmaSwDefMcastPriPort = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 6), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 254))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaSwDefMcastPriPort.setStatus('current') ibSmaSwDefMcastNotPriPort = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 7), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 254))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaSwDefMcastNotPriPort.setStatus('current') ibSmaSwLifeTimeValue = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 8), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 20))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaSwLifeTimeValue.setStatus('current') ibSmaSwPortStateChange = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 9), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaSwPortStateChange.setStatus('current') ibSmaSwLidsPerPort = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 10), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaSwLidsPerPort.setStatus('current') ibSmaSwPartitionEnforceNum = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 11), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaSwPartitionEnforceNum.setStatus('current') ibSmaSwInboundEnforceCap = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 12), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaSwInboundEnforceCap.setStatus('current') ibSmaSwOutboundEnforceCap = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 13), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaSwOutboundEnforceCap.setStatus('current') ibSmaSwFilterRawPktInputCap = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 14), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaSwFilterRawPktInputCap.setStatus('current') ibSmaSwFilterRawPktOutputCap = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 15), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaSwFilterRawPktOutputCap.setStatus('current') ibSmaSwEnhancedPort0 = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 16), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaSwEnhancedPort0.setStatus('current') ibSmaGuidInfo = MibIdentifier((1, 3, 6, 1, 3, 117, 3, 1, 3)) ibSmaGuidInfoTable = MibTable((1, 3, 6, 1, 3, 117, 3, 1, 3, 1), ) if mibBuilder.loadTexts: ibSmaGuidInfoTable.setStatus('current') ibSmaGuidInfoEntry = MibTableRow((1, 3, 6, 1, 3, 117, 3, 1, 3, 1, 1), ).setIndexNames((0, "IB-SMA-MIB", "ibSmaGuidPortIndex"), (0, "IB-SMA-MIB", "ibSmaGuidIndex")) if mibBuilder.loadTexts: ibSmaGuidInfoEntry.setStatus('current') ibSmaGuidPortIndex = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 3, 1, 1, 1), IbDataPort()) if mibBuilder.loadTexts: ibSmaGuidPortIndex.setStatus('current') ibSmaGuidIndex = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 3, 1, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 255))) if mibBuilder.loadTexts: ibSmaGuidIndex.setStatus('current') ibSmaGuidVal = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 3, 1, 1, 3), IbGuid()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaGuidVal.setStatus('current') ibSmaMgmtPortInfo = MibIdentifier((1, 3, 6, 1, 3, 117, 3, 1, 4)) ibSmaPortMKey = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(8, 8)).setFixedLength(8)).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortMKey.setStatus('current') ibSmaPortGidPrefix = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(8, 8)).setFixedLength(8)).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortGidPrefix.setStatus('current') ibSmaPortLid = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 3), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 49151))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortLid.setStatus('current') ibSmaPortMasterSmLid = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 4), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 49151))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortMasterSmLid.setStatus('current') ibSmaPortIsSubnetManager = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 5), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortIsSubnetManager.setStatus('current') ibSmaPortIsNoticeSupported = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 6), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortIsNoticeSupported.setStatus('current') ibSmaPortIsTrapSupported = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 7), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortIsTrapSupported.setStatus('current') ibSmaPortIsAutoMigrateSupported = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 8), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortIsAutoMigrateSupported.setStatus('current') ibSmaPortIsSlMappingSupported = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 9), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortIsSlMappingSupported.setStatus('current') ibSmaPortIsMKeyNvram = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 10), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortIsMKeyNvram.setStatus('current') ibSmaPortIsPKeyNvram = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 11), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortIsPKeyNvram.setStatus('current') ibSmaPortIsLedInfoSupported = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 12), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortIsLedInfoSupported.setStatus('current') ibSmaPortIsSmDisabled = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 13), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortIsSmDisabled.setStatus('current') ibSmaPortIsSysImgGuidSupported = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 14), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortIsSysImgGuidSupported.setStatus('current') ibSmaPortIsPKeyExtPortTrapSup = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 15), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortIsPKeyExtPortTrapSup.setStatus('current') ibSmaPortIsCommManageSupported = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 16), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortIsCommManageSupported.setStatus('current') ibSmaPortIsSnmpTunnelSupported = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 17), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortIsSnmpTunnelSupported.setStatus('current') ibSmaPortIsReinitSupported = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 18), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortIsReinitSupported.setStatus('current') ibSmaPortIsDevManageSupported = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 19), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortIsDevManageSupported.setStatus('current') ibSmaPortIsVendorClassSupported = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 20), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortIsVendorClassSupported.setStatus('current') ibSmaPortIsDrNoticeSupported = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 21), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortIsDrNoticeSupported.setStatus('current') ibSmaPortIsCapMaskNoticSupported = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 22), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortIsCapMaskNoticSupported.setStatus('current') ibSmaPortIsBootMgmtSupported = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 23), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortIsBootMgmtSupported.setStatus('current') ibSmaPortMKeyLeasePeriod = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 24), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortMKeyLeasePeriod.setStatus('current') ibSmaPortMKeyProtectBits = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 25), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("noMKeyProtection", 1), ("succeedWithReturnKey", 2), ("succeedWithReturnZeroes", 3), ("failOnNoMatch", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortMKeyProtectBits.setStatus('current') ibSmaPortMasterSmSl = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 26), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 15))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortMasterSmSl.setStatus('current') ibSmaPortInitTypeLoad = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 27), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortInitTypeLoad.setStatus('current') ibSmaPortInitTypeContent = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 28), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortInitTypeContent.setStatus('current') ibSmaPortInitTypePresence = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 29), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortInitTypePresence.setStatus('current') ibSmaPortInitTypeResuscitate = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 30), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortInitTypeResuscitate.setStatus('current') ibSmaPortInitNoLoadReply = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 31), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortInitNoLoadReply.setStatus('current') ibSmaPortInitPreserveContReply = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 32), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortInitPreserveContReply.setStatus('current') ibSmaPortInitPreservePresReply = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 33), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortInitPreservePresReply.setStatus('current') ibSmaPortMKeyViolations = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 34), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortMKeyViolations.setStatus('current') ibSmaPortPKeyViolations = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 35), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortPKeyViolations.setStatus('current') ibSmaPortQKeyViolations = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 36), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortQKeyViolations.setStatus('current') ibSmaPortNumGuid = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 37), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortNumGuid.setStatus('current') ibSmaPortSubnetTimeout = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 38), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 31))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortSubnetTimeout.setStatus('current') ibSmaPortResponseTimeValue = MibScalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 39), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 31))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortResponseTimeValue.setStatus('current') ibSmaDataPortInfo = MibIdentifier((1, 3, 6, 1, 3, 117, 3, 1, 5)) ibSmaPortInfoTable = MibTable((1, 3, 6, 1, 3, 117, 3, 1, 5, 1), ) if mibBuilder.loadTexts: ibSmaPortInfoTable.setStatus('current') ibSmaPortInfoEntry = MibTableRow((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1), ).setIndexNames((0, "IB-SMA-MIB", "ibSmaPortIndex")) if mibBuilder.loadTexts: ibSmaPortInfoEntry.setStatus('current') ibSmaPortIndex = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 1), IbDataPort()) if mibBuilder.loadTexts: ibSmaPortIndex.setStatus('current') ibSmaPortLinkWidthEnabled = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9))).clone(namedValues=NamedValues(("oneX", 1), ("fourX", 2), ("oneXOr4X", 3), ("twelveX", 4), ("oneXOr12X", 5), ("fourXOr12X", 6), ("oneX4XOr12X", 7), ("linkWidthSupported", 8), ("other", 9)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortLinkWidthEnabled.setStatus('current') ibSmaPortLinkWidthSupported = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("oneX", 1), ("oneXOr4X", 2), ("oneX4XOr12X", 3), ("other", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortLinkWidthSupported.setStatus('current') ibSmaPortLinkWidthActive = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("oneX", 1), ("fourX", 2), ("twelveX", 3), ("other", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortLinkWidthActive.setStatus('current') ibSmaPortLinkSpeedSupported = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("twoPoint5Gbps", 1), ("other", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortLinkSpeedSupported.setStatus('current') ibSmaPortLinkState = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("down", 1), ("init", 2), ("armed", 3), ("active", 4), ("other", 5)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortLinkState.setStatus('current') ibSmaPortPhysState = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("sleep", 1), ("polling", 2), ("disabled", 3), ("portConfigTraining", 4), ("linkUp", 5), ("linkErrorRecovery", 6), ("other", 7)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortPhysState.setStatus('current') ibSmaPortLinkDownDefaultState = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("sleep", 1), ("polling", 2), ("other", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortLinkDownDefaultState.setStatus('current') ibSmaPortLidMaskCount = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 9), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 7))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortLidMaskCount.setStatus('current') ibSmaPortLinkSpeedActive = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("twoPoint5Gbps", 1), ("other", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortLinkSpeedActive.setStatus('current') ibSmaPortLinkSpeedEnabled = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("twoPoint5Gbps", 1), ("linkSpeedSupported", 2), ("other", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortLinkSpeedEnabled.setStatus('current') ibSmaPortNeighborMtu = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("mtu256", 1), ("mtu512", 2), ("mtu1024", 3), ("mtu2048", 4), ("mtu4096", 5), ("other", 6)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortNeighborMtu.setStatus('current') ibSmaPortVirtLaneSupport = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("vl0", 1), ("vl0ToVl1", 2), ("vl0ToVl3", 3), ("vl0ToVl7", 4), ("vl0ToVl14", 5), ("other", 6)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortVirtLaneSupport.setStatus('current') ibSmaPortVlHighPriorityLimit = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 14), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortVlHighPriorityLimit.setStatus('current') ibSmaPortVlArbHighCapacity = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 15), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 64))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortVlArbHighCapacity.setStatus('current') ibSmaPortVlArbLowCapacity = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 16), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 64))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortVlArbLowCapacity.setStatus('current') ibSmaPortMtuCapacity = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 17), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("mtu256", 1), ("mtu512", 2), ("mtu1024", 3), ("mtu2048", 4), ("mtu4096", 5), ("other", 6)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortMtuCapacity.setStatus('current') ibSmaPortVlStallCount = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 18), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 7))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortVlStallCount.setStatus('current') ibSmaPortHeadOfQueueLife = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 19), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 20))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortHeadOfQueueLife.setStatus('current') ibSmaPortOperationalVls = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 20), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("vl0", 1), ("vl0ToVl1", 2), ("vl0ToVl3", 3), ("vl0ToVl7", 4), ("vl0ToVl14", 5), ("other", 6)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortOperationalVls.setStatus('current') ibSmaPortPartEnforceInbound = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 21), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortPartEnforceInbound.setStatus('current') ibSmaPortPartEnforceOutbound = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 22), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortPartEnforceOutbound.setStatus('current') ibSmaPortFilterRawPktInbound = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 23), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortFilterRawPktInbound.setStatus('current') ibSmaPortFilterRawPktOutbound = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 24), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortFilterRawPktOutbound.setStatus('current') ibSmaPortLocalPhysErrorThreshold = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 25), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 15))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortLocalPhysErrorThreshold.setStatus('current') ibSmaPortOverrunErrorThreshold = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 26), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 15))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortOverrunErrorThreshold.setStatus('current') ibSmaPKeyInfo = MibIdentifier((1, 3, 6, 1, 3, 117, 3, 1, 6)) ibSmaPKeyTable = MibTable((1, 3, 6, 1, 3, 117, 3, 1, 6, 1), ) if mibBuilder.loadTexts: ibSmaPKeyTable.setStatus('current') ibSmaPKeyEntry = MibTableRow((1, 3, 6, 1, 3, 117, 3, 1, 6, 1, 1), ).setIndexNames((0, "IB-SMA-MIB", "ibSmaPKeyIBAPortIndex"), (0, "IB-SMA-MIB", "ibSmaPKeyIndex")) if mibBuilder.loadTexts: ibSmaPKeyEntry.setStatus('current') ibSmaPKeyIBAPortIndex = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 6, 1, 1, 1), IbDataPortAndInvalid()) if mibBuilder.loadTexts: ibSmaPKeyIBAPortIndex.setStatus('current') ibSmaPKeyIndex = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 6, 1, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 65504))) if mibBuilder.loadTexts: ibSmaPKeyIndex.setStatus('current') ibSmaPKeyMembership = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 6, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("none", 1), ("limited", 2), ("full", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPKeyMembership.setStatus('current') ibSmaPKeyBase = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 6, 1, 1, 4), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 65527))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPKeyBase.setStatus('current') ibSmaSlToVlMapInfo = MibIdentifier((1, 3, 6, 1, 3, 117, 3, 1, 7)) ibSmaSL2VLMapTable = MibTable((1, 3, 6, 1, 3, 117, 3, 1, 7, 1), ) if mibBuilder.loadTexts: ibSmaSL2VLMapTable.setStatus('current') ibSmaSL2VLMapEntry = MibTableRow((1, 3, 6, 1, 3, 117, 3, 1, 7, 1, 1), ).setIndexNames((0, "IB-SMA-MIB", "ibSmaIBAOutPortIndex"), (0, "IB-SMA-MIB", "ibSmaIBAInPortIndex"), (0, "IB-SMA-MIB", "ibSmaServiceLevelIndex")) if mibBuilder.loadTexts: ibSmaSL2VLMapEntry.setStatus('current') ibSmaIBAOutPortIndex = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 7, 1, 1, 1), IbDataPortAndInvalid()) if mibBuilder.loadTexts: ibSmaIBAOutPortIndex.setStatus('current') ibSmaIBAInPortIndex = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 7, 1, 1, 2), IbDataPortAndInvalid()) if mibBuilder.loadTexts: ibSmaIBAInPortIndex.setStatus('current') ibSmaServiceLevelIndex = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 7, 1, 1, 3), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 15))) if mibBuilder.loadTexts: ibSmaServiceLevelIndex.setStatus('current') ibSmaVirtualLane = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 7, 1, 1, 4), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 15))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaVirtualLane.setStatus('current') ibSmaVLArbitInfo = MibIdentifier((1, 3, 6, 1, 3, 117, 3, 1, 8)) ibSmaHiPriVlArbTable = MibTable((1, 3, 6, 1, 3, 117, 3, 1, 8, 1), ) if mibBuilder.loadTexts: ibSmaHiPriVlArbTable.setStatus('current') ibSmaHiPriVlArbEntry = MibTableRow((1, 3, 6, 1, 3, 117, 3, 1, 8, 1, 1), ).setIndexNames((0, "IB-SMA-MIB", "ibSmaHiPriIBAPortIndex"), (0, "IB-SMA-MIB", "ibSmaHiPriNIndex")) if mibBuilder.loadTexts: ibSmaHiPriVlArbEntry.setStatus('current') ibSmaHiPriIBAPortIndex = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 8, 1, 1, 1), IbDataPort()) if mibBuilder.loadTexts: ibSmaHiPriIBAPortIndex.setStatus('current') ibSmaHiPriNIndex = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 8, 1, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 64))) if mibBuilder.loadTexts: ibSmaHiPriNIndex.setStatus('current') ibSmaHiPriVirtLane = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 8, 1, 1, 3), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 14))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaHiPriVirtLane.setStatus('current') ibSmaHiPriWeight = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 8, 1, 1, 4), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaHiPriWeight.setStatus('current') ibSmaLowPriVlArbTable = MibTable((1, 3, 6, 1, 3, 117, 3, 1, 8, 2), ) if mibBuilder.loadTexts: ibSmaLowPriVlArbTable.setStatus('current') ibSmaLowPriVlArbEntry = MibTableRow((1, 3, 6, 1, 3, 117, 3, 1, 8, 2, 1), ).setIndexNames((0, "IB-SMA-MIB", "ibSmaLowPriIBAPortIndex"), (0, "IB-SMA-MIB", "ibSmaLowPriNIndex")) if mibBuilder.loadTexts: ibSmaLowPriVlArbEntry.setStatus('current') ibSmaLowPriIBAPortIndex = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 8, 2, 1, 1), IbDataPort()) if mibBuilder.loadTexts: ibSmaLowPriIBAPortIndex.setStatus('current') ibSmaLowPriNIndex = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 8, 2, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 64))) if mibBuilder.loadTexts: ibSmaLowPriNIndex.setStatus('current') ibSmaLowPriVirtLane = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 8, 2, 1, 3), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 14))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaLowPriVirtLane.setStatus('current') ibSmaLowPriWeight = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 8, 2, 1, 4), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaLowPriWeight.setStatus('current') ibSmaLFTInfo = MibIdentifier((1, 3, 6, 1, 3, 117, 3, 1, 9)) ibSmaLinForTable = MibTable((1, 3, 6, 1, 3, 117, 3, 1, 9, 1), ) if mibBuilder.loadTexts: ibSmaLinForTable.setStatus('current') ibSmaLinForEntry = MibTableRow((1, 3, 6, 1, 3, 117, 3, 1, 9, 1, 1), ).setIndexNames((0, "IB-SMA-MIB", "ibSmaLinDestDLIDIndex")) if mibBuilder.loadTexts: ibSmaLinForEntry.setStatus('current') ibSmaLinDestDLIDIndex = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 9, 1, 1, 1), IbUnicastLid()) if mibBuilder.loadTexts: ibSmaLinDestDLIDIndex.setStatus('current') ibSmaLinForwEgressPort = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 9, 1, 1, 2), IbDataPortAndInvalid()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaLinForwEgressPort.setStatus('current') ibSmaRFTInfo = MibIdentifier((1, 3, 6, 1, 3, 117, 3, 1, 10)) ibSmaRandomForwardingTable = MibTable((1, 3, 6, 1, 3, 117, 3, 1, 10, 1), ) if mibBuilder.loadTexts: ibSmaRandomForwardingTable.setStatus('current') ibSmaRandomForwardingEntry = MibTableRow((1, 3, 6, 1, 3, 117, 3, 1, 10, 1, 1), ).setIndexNames((0, "IB-SMA-MIB", "ibSmaRandomForwardingPortIndex")) if mibBuilder.loadTexts: ibSmaRandomForwardingEntry.setStatus('current') ibSmaRandomForwardingPortIndex = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 10, 1, 1, 1), IbDataPort()) if mibBuilder.loadTexts: ibSmaRandomForwardingPortIndex.setStatus('current') ibSmaRandomDestLID = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 10, 1, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 49152))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaRandomDestLID.setStatus('current') ibSmaRandomForwEgressPort = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 10, 1, 1, 3), IbDataPort()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaRandomForwEgressPort.setStatus('current') ibSmaRandomLMC = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 10, 1, 1, 4), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 7))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaRandomLMC.setStatus('current') ibSmaRandomIsValid = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 10, 1, 1, 5), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaRandomIsValid.setStatus('current') ibSmaMFTInfo = MibIdentifier((1, 3, 6, 1, 3, 117, 3, 1, 11)) ibSmaMulForTable = MibTable((1, 3, 6, 1, 3, 117, 3, 1, 11, 1), ) if mibBuilder.loadTexts: ibSmaMulForTable.setStatus('current') ibSmaMulForEntry = MibTableRow((1, 3, 6, 1, 3, 117, 3, 1, 11, 1, 1), ).setIndexNames((0, "IB-SMA-MIB", "ibSmaMulDestDLIDIndex")) if mibBuilder.loadTexts: ibSmaMulForEntry.setStatus('current') ibSmaMulDestDLIDIndex = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 11, 1, 1, 1), IbMulticastLid()) if mibBuilder.loadTexts: ibSmaMulDestDLIDIndex.setStatus('current') ibSmaMulForwMask = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 11, 1, 1, 2), IbSmPortList()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaMulForwMask.setStatus('current') ibSmaSMInfo = MibIdentifier((1, 3, 6, 1, 3, 117, 3, 1, 12)) ibSmaSubMgrInfo = MibIdentifier((1, 3, 6, 1, 3, 117, 3, 1, 12, 1)) ibSmaSmInfoTable = MibTable((1, 3, 6, 1, 3, 117, 3, 1, 12, 1, 1), ) if mibBuilder.loadTexts: ibSmaSmInfoTable.setStatus('current') ibSmaSmInfoEntry = MibTableRow((1, 3, 6, 1, 3, 117, 3, 1, 12, 1, 1, 1), ).setIndexNames((0, "IB-SMA-MIB", "ibSmaSmInfoPortIndex")) if mibBuilder.loadTexts: ibSmaSmInfoEntry.setStatus('current') ibSmaSmInfoPortIndex = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 12, 1, 1, 1, 1), IbDataPort()) if mibBuilder.loadTexts: ibSmaSmInfoPortIndex.setStatus('current') ibSmaSmGuid = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 12, 1, 1, 1, 2), IbGuid()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaSmGuid.setStatus('current') ibSmaSmSmKey = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 12, 1, 1, 1, 3), OctetString().subtype(subtypeSpec=ValueSizeConstraint(8, 8)).setFixedLength(8)).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaSmSmKey.setStatus('current') ibSmaSmSmpCount = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 12, 1, 1, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaSmSmpCount.setStatus('current') ibSmaSmPriority = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 12, 1, 1, 1, 5), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 15))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaSmPriority.setStatus('current') ibSmaSmState = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 12, 1, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("notActive", 1), ("discovering", 2), ("standby", 3), ("master", 4), ("unknown", 5)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaSmState.setStatus('current') ibSmaVendDiagInfo = MibIdentifier((1, 3, 6, 1, 3, 117, 3, 1, 13)) ibSmaVendDiagInfoTable = MibTable((1, 3, 6, 1, 3, 117, 3, 1, 13, 1), ) if mibBuilder.loadTexts: ibSmaVendDiagInfoTable.setStatus('current') ibSmaVendDiagInfoEntry = MibTableRow((1, 3, 6, 1, 3, 117, 3, 1, 13, 1, 1), ).setIndexNames((0, "IB-SMA-MIB", "ibSmaVendDiagPortIndex")) if mibBuilder.loadTexts: ibSmaVendDiagInfoEntry.setStatus('current') ibSmaVendDiagPortIndex = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 13, 1, 1, 1), IbDataPortAndInvalid()) if mibBuilder.loadTexts: ibSmaVendDiagPortIndex.setStatus('current') ibSmaPortGenericDiagCode = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 13, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("portReady", 1), ("performingSelfTest", 2), ("initializing", 3), ("softError", 4), ("hardError", 5), ("other", 6)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortGenericDiagCode.setStatus('current') ibSmaPortVendorDiagCode = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 13, 1, 1, 3), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 2047))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortVendorDiagCode.setStatus('current') ibSmaPortVendorDiagIndexFwd = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 13, 1, 1, 4), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortVendorDiagIndexFwd.setStatus('current') ibSmaPortVendorDiagData = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 13, 1, 1, 5), OctetString().subtype(subtypeSpec=ValueSizeConstraint(124, 124)).setFixedLength(124)).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaPortVendorDiagData.setStatus('current') ibSmaLedInfo = MibIdentifier((1, 3, 6, 1, 3, 117, 3, 1, 14)) ibSmaLedInfoTable = MibTable((1, 3, 6, 1, 3, 117, 3, 1, 14, 1), ) if mibBuilder.loadTexts: ibSmaLedInfoTable.setStatus('current') ibSmaLedInfoEntry = MibTableRow((1, 3, 6, 1, 3, 117, 3, 1, 14, 1, 1), ).setIndexNames((0, "IB-SMA-MIB", "ibSmaLedIndex")) if mibBuilder.loadTexts: ibSmaLedInfoEntry.setStatus('current') ibSmaLedIndex = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 14, 1, 1, 1), IbDataPort()) if mibBuilder.loadTexts: ibSmaLedIndex.setStatus('current') ibSmaLedState = MibTableColumn((1, 3, 6, 1, 3, 117, 3, 1, 14, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("unknown", 1), ("on", 2), ("off", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ibSmaLedState.setStatus('current') ibSmaNotificationPrefix = MibIdentifier((1, 3, 6, 1, 3, 117, 3, 2, 0)) ibSmaPortLinkStateChange = NotificationType((1, 3, 6, 1, 3, 117, 3, 2, 0, 1)).setObjects(("IB-SMA-MIB", "ibSmaNodeLid")) if mibBuilder.loadTexts: ibSmaPortLinkStateChange.setStatus('current') ibSmaLinkIntegrityThresReached = NotificationType((1, 3, 6, 1, 3, 117, 3, 2, 0, 2)).setObjects(("IB-SMA-MIB", "ibSmaNodeLid"), ("IB-SMA-MIB", "ibSmaNodePortNum")) if mibBuilder.loadTexts: ibSmaLinkIntegrityThresReached.setStatus('current') ibSmaExcessBuffOverrunThres = NotificationType((1, 3, 6, 1, 3, 117, 3, 2, 0, 3)).setObjects(("IB-SMA-MIB", "ibSmaNodeLid"), ("IB-SMA-MIB", "ibSmaNodePortNum")) if mibBuilder.loadTexts: ibSmaExcessBuffOverrunThres.setStatus('current') ibSmaFlowCntrlUpdateTimerExpire = NotificationType((1, 3, 6, 1, 3, 117, 3, 2, 0, 4)).setObjects(("IB-SMA-MIB", "ibSmaNodeLid"), ("IB-SMA-MIB", "ibSmaNodePortNum")) if mibBuilder.loadTexts: ibSmaFlowCntrlUpdateTimerExpire.setStatus('current') ibSmaCapabilityMaskModified = NotificationType((1, 3, 6, 1, 3, 117, 3, 2, 0, 5)).setObjects(("IB-SMA-MIB", "ibSmaNodeLid"), ("IB-SMA-MIB", "ibSmaNodeCapMask")) if mibBuilder.loadTexts: ibSmaCapabilityMaskModified.setStatus('current') ibSmaSysImageGuidModified = NotificationType((1, 3, 6, 1, 3, 117, 3, 2, 0, 6)).setObjects(("IB-SMA-MIB", "ibSmaNodeLid"), ("IB-SMA-MIB", "ibSmaSystemImageGuid")) if mibBuilder.loadTexts: ibSmaSysImageGuidModified.setStatus('current') ibSmaBadManagementKey = NotificationType((1, 3, 6, 1, 3, 117, 3, 2, 0, 7)).setObjects(("IB-SMA-MIB", "ibSmaNodeKey"), ("IB-SMA-MIB", "ibSmaNodeLid"), ("IB-SMA-MIB", "ibSmaNodeMethod"), ("IB-SMA-MIB", "ibSmaNodeAttributeId"), ("IB-SMA-MIB", "ibSmaNodeAttributeModifier")) if mibBuilder.loadTexts: ibSmaBadManagementKey.setStatus('current') ibSmaBadPartitionKey = NotificationType((1, 3, 6, 1, 3, 117, 3, 2, 0, 8)).setObjects(("IB-SMA-MIB", "ibSmaNodeKey"), ("IB-SMA-MIB", "ibSmaNodeLid"), ("IB-SMA-MIB", "ibSmaNodeGid1"), ("IB-SMA-MIB", "ibSmaNodeQueuePair1"), ("IB-SMA-MIB", "ibSmaNodeLid2"), ("IB-SMA-MIB", "ibSmaNodeGid2"), ("IB-SMA-MIB", "ibSmaNodeQueuePair2"), ("IB-SMA-MIB", "ibSmaNodeServiceLevel")) if mibBuilder.loadTexts: ibSmaBadPartitionKey.setStatus('current') ibSmaBadQueueKey = NotificationType((1, 3, 6, 1, 3, 117, 3, 2, 0, 9)).setObjects(("IB-SMA-MIB", "ibSmaNodeKey"), ("IB-SMA-MIB", "ibSmaNodeLid"), ("IB-SMA-MIB", "ibSmaNodeGid1"), ("IB-SMA-MIB", "ibSmaNodeQueuePair1"), ("IB-SMA-MIB", "ibSmaNodeLid2"), ("IB-SMA-MIB", "ibSmaNodeGid2"), ("IB-SMA-MIB", "ibSmaNodeQueuePair2"), ("IB-SMA-MIB", "ibSmaNodeServiceLevel")) if mibBuilder.loadTexts: ibSmaBadQueueKey.setStatus('current') ibSmaBadPKeyAtSwitchPort = NotificationType((1, 3, 6, 1, 3, 117, 3, 2, 0, 10)).setObjects(("IB-SMA-MIB", "ibSmaNodeKey"), ("IB-SMA-MIB", "ibSmaNodeLid"), ("IB-SMA-MIB", "ibSmaNodeGid1"), ("IB-SMA-MIB", "ibSmaNodeQueuePair1"), ("IB-SMA-MIB", "ibSmaNodeLid2"), ("IB-SMA-MIB", "ibSmaNodeGid2"), ("IB-SMA-MIB", "ibSmaNodeQueuePair2"), ("IB-SMA-MIB", "ibSmaNodeServiceLevel"), ("IB-SMA-MIB", "ibSmaNodeSwitchLid"), ("IB-SMA-MIB", "ibSmaNodeDataValid")) if mibBuilder.loadTexts: ibSmaBadPKeyAtSwitchPort.setStatus('current') ibSmaCompliances = MibIdentifier((1, 3, 6, 1, 3, 117, 3, 3, 1)) ibSmaGroups = MibIdentifier((1, 3, 6, 1, 3, 117, 3, 3, 2)) ibSmaBasicNodeCompliance = ModuleCompliance((1, 3, 6, 1, 3, 117, 3, 3, 1, 1)).setObjects(("IB-SMA-MIB", "ibSmaNodeGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ibSmaBasicNodeCompliance = ibSmaBasicNodeCompliance.setStatus('current') ibSmaFullSwitchCompliance = ModuleCompliance((1, 3, 6, 1, 3, 117, 3, 3, 1, 2)).setObjects(("IB-SMA-MIB", "ibSmaNodeGroup"), ("IB-SMA-MIB", "ibSmaSwitchGroup"), ("IB-SMA-MIB", "ibSmaGuidGroup"), ("IB-SMA-MIB", "ibSmaMgmtPortGroup"), ("IB-SMA-MIB", "ibSmaDataPortGroup"), ("IB-SMA-MIB", "ibSmaPKeyGroup"), ("IB-SMA-MIB", "ibSmaSlToVlMapGroup"), ("IB-SMA-MIB", "ibSmaVLArbitGroup"), ("IB-SMA-MIB", "ibSmaLFTGroup"), ("IB-SMA-MIB", "ibSmaRFTGroup"), ("IB-SMA-MIB", "ibSmaMFTGroup"), ("IB-SMA-MIB", "ibSmaSMGroup"), ("IB-SMA-MIB", "ibSmaVendDiagGroup"), ("IB-SMA-MIB", "ibSmaLedGroup"), ("IB-SMA-MIB", "ibSmaNotificationsGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ibSmaFullSwitchCompliance = ibSmaFullSwitchCompliance.setStatus('current') ibSmaFullRouterCACompliance = ModuleCompliance((1, 3, 6, 1, 3, 117, 3, 3, 1, 3)).setObjects(("IB-SMA-MIB", "ibSmaNodeGroup"), ("IB-SMA-MIB", "ibSmaGuidGroup"), ("IB-SMA-MIB", "ibSmaMgmtPortGroup"), ("IB-SMA-MIB", "ibSmaDataPortGroup"), ("IB-SMA-MIB", "ibSmaPKeyGroup"), ("IB-SMA-MIB", "ibSmaSlToVlMapGroup"), ("IB-SMA-MIB", "ibSmaVLArbitGroup"), ("IB-SMA-MIB", "ibSmaSMGroup"), ("IB-SMA-MIB", "ibSmaVendDiagGroup"), ("IB-SMA-MIB", "ibSmaLedGroup"), ("IB-SMA-MIB", "ibSmaNotificationsGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ibSmaFullRouterCACompliance = ibSmaFullRouterCACompliance.setStatus('current') ibSmaNodeGroup = ObjectGroup((1, 3, 6, 1, 3, 117, 3, 3, 2, 1)).setObjects(("IB-SMA-MIB", "ibSmaNodeString"), ("IB-SMA-MIB", "ibSmaNodeBaseVersion"), ("IB-SMA-MIB", "ibSmaNodeClassVersion"), ("IB-SMA-MIB", "ibSmaNodeType"), ("IB-SMA-MIB", "ibSmaNodeNumPorts"), ("IB-SMA-MIB", "ibSmaSystemImageGuid"), ("IB-SMA-MIB", "ibSmaNodeGuid"), ("IB-SMA-MIB", "ibSmaNodePortGuid"), ("IB-SMA-MIB", "ibSmaNodePartitionTableNum"), ("IB-SMA-MIB", "ibSmaNodeDeviceId"), ("IB-SMA-MIB", "ibSmaNodeRevision"), ("IB-SMA-MIB", "ibSmaNodeLocalPortNumOrZero"), ("IB-SMA-MIB", "ibSmaNodeVendorId"), ("IB-SMA-MIB", "ibSmaNodeLid"), ("IB-SMA-MIB", "ibSmaNodePortNum"), ("IB-SMA-MIB", "ibSmaNodeMethod"), ("IB-SMA-MIB", "ibSmaNodeAttributeId"), ("IB-SMA-MIB", "ibSmaNodeAttributeModifier"), ("IB-SMA-MIB", "ibSmaNodeKey"), ("IB-SMA-MIB", "ibSmaNodeLid2"), ("IB-SMA-MIB", "ibSmaNodeServiceLevel"), ("IB-SMA-MIB", "ibSmaNodeQueuePair1"), ("IB-SMA-MIB", "ibSmaNodeQueuePair2"), ("IB-SMA-MIB", "ibSmaNodeGid1"), ("IB-SMA-MIB", "ibSmaNodeGid2"), ("IB-SMA-MIB", "ibSmaNodeCapMask"), ("IB-SMA-MIB", "ibSmaNodeSwitchLid"), ("IB-SMA-MIB", "ibSmaNodeDataValid")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ibSmaNodeGroup = ibSmaNodeGroup.setStatus('current') ibSmaSwitchGroup = ObjectGroup((1, 3, 6, 1, 3, 117, 3, 3, 2, 2)).setObjects(("IB-SMA-MIB", "ibSmaSwLinearFdbTableNum"), ("IB-SMA-MIB", "ibSmaSwRandomFdbTableNum"), ("IB-SMA-MIB", "ibSmaSwMulticastFdbTableNum"), ("IB-SMA-MIB", "ibSmaSwLinearFdbTop"), ("IB-SMA-MIB", "ibSmaSwDefaultPort"), ("IB-SMA-MIB", "ibSmaSwDefMcastPriPort"), ("IB-SMA-MIB", "ibSmaSwDefMcastNotPriPort"), ("IB-SMA-MIB", "ibSmaSwLifeTimeValue"), ("IB-SMA-MIB", "ibSmaSwPortStateChange"), ("IB-SMA-MIB", "ibSmaSwLidsPerPort"), ("IB-SMA-MIB", "ibSmaSwPartitionEnforceNum"), ("IB-SMA-MIB", "ibSmaSwInboundEnforceCap"), ("IB-SMA-MIB", "ibSmaSwOutboundEnforceCap"), ("IB-SMA-MIB", "ibSmaSwFilterRawPktInputCap"), ("IB-SMA-MIB", "ibSmaSwFilterRawPktOutputCap"), ("IB-SMA-MIB", "ibSmaSwEnhancedPort0")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ibSmaSwitchGroup = ibSmaSwitchGroup.setStatus('current') ibSmaGuidGroup = ObjectGroup((1, 3, 6, 1, 3, 117, 3, 3, 2, 3)).setObjects(("IB-SMA-MIB", "ibSmaGuidVal")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ibSmaGuidGroup = ibSmaGuidGroup.setStatus('current') ibSmaMgmtPortGroup = ObjectGroup((1, 3, 6, 1, 3, 117, 3, 3, 2, 4)).setObjects(("IB-SMA-MIB", "ibSmaPortMKey"), ("IB-SMA-MIB", "ibSmaPortGidPrefix"), ("IB-SMA-MIB", "ibSmaPortLid"), ("IB-SMA-MIB", "ibSmaPortMasterSmLid"), ("IB-SMA-MIB", "ibSmaPortIsSubnetManager"), ("IB-SMA-MIB", "ibSmaPortIsNoticeSupported"), ("IB-SMA-MIB", "ibSmaPortIsTrapSupported"), ("IB-SMA-MIB", "ibSmaPortIsAutoMigrateSupported"), ("IB-SMA-MIB", "ibSmaPortIsSlMappingSupported"), ("IB-SMA-MIB", "ibSmaPortIsMKeyNvram"), ("IB-SMA-MIB", "ibSmaPortIsPKeyNvram"), ("IB-SMA-MIB", "ibSmaPortIsLedInfoSupported"), ("IB-SMA-MIB", "ibSmaPortIsSmDisabled"), ("IB-SMA-MIB", "ibSmaPortIsSysImgGuidSupported"), ("IB-SMA-MIB", "ibSmaPortIsPKeyExtPortTrapSup"), ("IB-SMA-MIB", "ibSmaPortIsCommManageSupported"), ("IB-SMA-MIB", "ibSmaPortIsSnmpTunnelSupported"), ("IB-SMA-MIB", "ibSmaPortIsReinitSupported"), ("IB-SMA-MIB", "ibSmaPortIsDevManageSupported"), ("IB-SMA-MIB", "ibSmaPortIsVendorClassSupported"), ("IB-SMA-MIB", "ibSmaPortIsDrNoticeSupported"), ("IB-SMA-MIB", "ibSmaPortIsCapMaskNoticSupported"), ("IB-SMA-MIB", "ibSmaPortIsBootMgmtSupported"), ("IB-SMA-MIB", "ibSmaPortMKeyLeasePeriod"), ("IB-SMA-MIB", "ibSmaPortMKeyProtectBits"), ("IB-SMA-MIB", "ibSmaPortMasterSmSl"), ("IB-SMA-MIB", "ibSmaPortInitTypeLoad"), ("IB-SMA-MIB", "ibSmaPortInitTypeContent"), ("IB-SMA-MIB", "ibSmaPortInitTypePresence"), ("IB-SMA-MIB", "ibSmaPortInitTypeResuscitate"), ("IB-SMA-MIB", "ibSmaPortInitNoLoadReply"), ("IB-SMA-MIB", "ibSmaPortInitPreserveContReply"), ("IB-SMA-MIB", "ibSmaPortInitPreservePresReply"), ("IB-SMA-MIB", "ibSmaPortMKeyViolations"), ("IB-SMA-MIB", "ibSmaPortPKeyViolations"), ("IB-SMA-MIB", "ibSmaPortQKeyViolations"), ("IB-SMA-MIB", "ibSmaPortNumGuid"), ("IB-SMA-MIB", "ibSmaPortSubnetTimeout"), ("IB-SMA-MIB", "ibSmaPortResponseTimeValue")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ibSmaMgmtPortGroup = ibSmaMgmtPortGroup.setStatus('current') ibSmaDataPortGroup = ObjectGroup((1, 3, 6, 1, 3, 117, 3, 3, 2, 5)).setObjects(("IB-SMA-MIB", "ibSmaPortLinkWidthEnabled"), ("IB-SMA-MIB", "ibSmaPortLinkWidthSupported"), ("IB-SMA-MIB", "ibSmaPortLinkWidthActive"), ("IB-SMA-MIB", "ibSmaPortLinkSpeedSupported"), ("IB-SMA-MIB", "ibSmaPortLinkState"), ("IB-SMA-MIB", "ibSmaPortPhysState"), ("IB-SMA-MIB", "ibSmaPortLinkDownDefaultState"), ("IB-SMA-MIB", "ibSmaPortLidMaskCount"), ("IB-SMA-MIB", "ibSmaPortLinkSpeedActive"), ("IB-SMA-MIB", "ibSmaPortLinkSpeedEnabled"), ("IB-SMA-MIB", "ibSmaPortNeighborMtu"), ("IB-SMA-MIB", "ibSmaPortVirtLaneSupport"), ("IB-SMA-MIB", "ibSmaPortVlHighPriorityLimit"), ("IB-SMA-MIB", "ibSmaPortVlArbHighCapacity"), ("IB-SMA-MIB", "ibSmaPortVlArbLowCapacity"), ("IB-SMA-MIB", "ibSmaPortMtuCapacity"), ("IB-SMA-MIB", "ibSmaPortVlStallCount"), ("IB-SMA-MIB", "ibSmaPortHeadOfQueueLife"), ("IB-SMA-MIB", "ibSmaPortOperationalVls"), ("IB-SMA-MIB", "ibSmaPortPartEnforceInbound"), ("IB-SMA-MIB", "ibSmaPortPartEnforceOutbound"), ("IB-SMA-MIB", "ibSmaPortFilterRawPktInbound"), ("IB-SMA-MIB", "ibSmaPortFilterRawPktOutbound"), ("IB-SMA-MIB", "ibSmaPortLocalPhysErrorThreshold"), ("IB-SMA-MIB", "ibSmaPortOverrunErrorThreshold")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ibSmaDataPortGroup = ibSmaDataPortGroup.setStatus('current') ibSmaPKeyGroup = ObjectGroup((1, 3, 6, 1, 3, 117, 3, 3, 2, 6)).setObjects(("IB-SMA-MIB", "ibSmaPKeyMembership"), ("IB-SMA-MIB", "ibSmaPKeyBase")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ibSmaPKeyGroup = ibSmaPKeyGroup.setStatus('current') ibSmaSlToVlMapGroup = ObjectGroup((1, 3, 6, 1, 3, 117, 3, 3, 2, 7)).setObjects(("IB-SMA-MIB", "ibSmaVirtualLane")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ibSmaSlToVlMapGroup = ibSmaSlToVlMapGroup.setStatus('current') ibSmaVLArbitGroup = ObjectGroup((1, 3, 6, 1, 3, 117, 3, 3, 2, 8)).setObjects(("IB-SMA-MIB", "ibSmaHiPriVirtLane"), ("IB-SMA-MIB", "ibSmaHiPriWeight"), ("IB-SMA-MIB", "ibSmaLowPriVirtLane"), ("IB-SMA-MIB", "ibSmaLowPriWeight")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ibSmaVLArbitGroup = ibSmaVLArbitGroup.setStatus('current') ibSmaLFTGroup = ObjectGroup((1, 3, 6, 1, 3, 117, 3, 3, 2, 9)).setObjects(("IB-SMA-MIB", "ibSmaLinForwEgressPort")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ibSmaLFTGroup = ibSmaLFTGroup.setStatus('current') ibSmaRFTGroup = ObjectGroup((1, 3, 6, 1, 3, 117, 3, 3, 2, 10)).setObjects(("IB-SMA-MIB", "ibSmaRandomDestLID"), ("IB-SMA-MIB", "ibSmaRandomForwEgressPort"), ("IB-SMA-MIB", "ibSmaRandomLMC"), ("IB-SMA-MIB", "ibSmaRandomIsValid")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ibSmaRFTGroup = ibSmaRFTGroup.setStatus('current') ibSmaMFTGroup = ObjectGroup((1, 3, 6, 1, 3, 117, 3, 3, 2, 11)).setObjects(("IB-SMA-MIB", "ibSmaMulForwMask")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ibSmaMFTGroup = ibSmaMFTGroup.setStatus('current') ibSmaSMGroup = ObjectGroup((1, 3, 6, 1, 3, 117, 3, 3, 2, 12)).setObjects(("IB-SMA-MIB", "ibSmaSmGuid"), ("IB-SMA-MIB", "ibSmaSmSmKey"), ("IB-SMA-MIB", "ibSmaSmSmpCount"), ("IB-SMA-MIB", "ibSmaSmPriority"), ("IB-SMA-MIB", "ibSmaSmState")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ibSmaSMGroup = ibSmaSMGroup.setStatus('current') ibSmaVendDiagGroup = ObjectGroup((1, 3, 6, 1, 3, 117, 3, 3, 2, 13)).setObjects(("IB-SMA-MIB", "ibSmaPortGenericDiagCode"), ("IB-SMA-MIB", "ibSmaPortVendorDiagCode"), ("IB-SMA-MIB", "ibSmaPortVendorDiagIndexFwd"), ("IB-SMA-MIB", "ibSmaPortVendorDiagData")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ibSmaVendDiagGroup = ibSmaVendDiagGroup.setStatus('current') ibSmaLedGroup = ObjectGroup((1, 3, 6, 1, 3, 117, 3, 3, 2, 14)).setObjects(("IB-SMA-MIB", "ibSmaLedState")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ibSmaLedGroup = ibSmaLedGroup.setStatus('current') ibSmaNotificationsGroup = NotificationGroup((1, 3, 6, 1, 3, 117, 3, 3, 2, 15)).setObjects(("IB-SMA-MIB", "ibSmaPortLinkStateChange"), ("IB-SMA-MIB", "ibSmaLinkIntegrityThresReached"), ("IB-SMA-MIB", "ibSmaExcessBuffOverrunThres"), ("IB-SMA-MIB", "ibSmaFlowCntrlUpdateTimerExpire"), ("IB-SMA-MIB", "ibSmaCapabilityMaskModified"), ("IB-SMA-MIB", "ibSmaSysImageGuidModified"), ("IB-SMA-MIB", "ibSmaBadManagementKey"), ("IB-SMA-MIB", "ibSmaBadPartitionKey"), ("IB-SMA-MIB", "ibSmaBadQueueKey"), ("IB-SMA-MIB", "ibSmaBadPKeyAtSwitchPort")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ibSmaNotificationsGroup = ibSmaNotificationsGroup.setStatus('current') mibBuilder.exportSymbols("IB-SMA-MIB", ibSmaNodeBaseVersion=ibSmaNodeBaseVersion, ibSmaRandomForwardingTable=ibSmaRandomForwardingTable, ibSmaNotificationPrefix=ibSmaNotificationPrefix, ibSmaNodeRevision=ibSmaNodeRevision, ibSmaSmInfoEntry=ibSmaSmInfoEntry, ibSmaVendDiagInfoEntry=ibSmaVendDiagInfoEntry, ibSmaMgmtPortGroup=ibSmaMgmtPortGroup, ibSmaNodeType=ibSmaNodeType, ibSmaNodeGid1=ibSmaNodeGid1, ibSmaPKeyIBAPortIndex=ibSmaPKeyIBAPortIndex, ibSmaMIB=ibSmaMIB, ibSmaBadManagementKey=ibSmaBadManagementKey, ibSmaFullSwitchCompliance=ibSmaFullSwitchCompliance, ibSmaPKeyIndex=ibSmaPKeyIndex, ibSmaPortInitTypeContent=ibSmaPortInitTypeContent, ibSmaLinDestDLIDIndex=ibSmaLinDestDLIDIndex, ibSmaPortIndex=ibSmaPortIndex, ibSmaPKeyTable=ibSmaPKeyTable, ibSmaVendDiagInfoTable=ibSmaVendDiagInfoTable, ibSmaHiPriVirtLane=ibSmaHiPriVirtLane, ibSmaVLArbitGroup=ibSmaVLArbitGroup, ibSmaNodeNumPorts=ibSmaNodeNumPorts, ibSmaPortInitPreserveContReply=ibSmaPortInitPreserveContReply, ibSmaSubMgrInfo=ibSmaSubMgrInfo, ibSmaLFTInfo=ibSmaLFTInfo, ibSmaSwPartitionEnforceNum=ibSmaSwPartitionEnforceNum, ibSmaRandomForwardingPortIndex=ibSmaRandomForwardingPortIndex, ibSmaSMInfo=ibSmaSMInfo, ibSmaPortOperationalVls=ibSmaPortOperationalVls, ibSmaPortInitNoLoadReply=ibSmaPortInitNoLoadReply, ibSmaBadQueueKey=ibSmaBadQueueKey, ibSmaRFTInfo=ibSmaRFTInfo, ibSmaPortNumGuid=ibSmaPortNumGuid, ibSmaHiPriVlArbEntry=ibSmaHiPriVlArbEntry, ibSmaPortMKeyProtectBits=ibSmaPortMKeyProtectBits, ibSmaLowPriWeight=ibSmaLowPriWeight, ibSmaServiceLevelIndex=ibSmaServiceLevelIndex, ibSmaPortGenericDiagCode=ibSmaPortGenericDiagCode, ibSmaGroups=ibSmaGroups, ibSmaNodeAttributeId=ibSmaNodeAttributeId, ibSmaNodeQueuePair2=ibSmaNodeQueuePair2, ibSmaPortLinkSpeedActive=ibSmaPortLinkSpeedActive, ibSmaVendDiagGroup=ibSmaVendDiagGroup, ibSmaSwLinearFdbTop=ibSmaSwLinearFdbTop, ibSmaPortMasterSmSl=ibSmaPortMasterSmSl, ibSmaLinForwEgressPort=ibSmaLinForwEgressPort, ibSmaPortLinkDownDefaultState=ibSmaPortLinkDownDefaultState, ibSmaLedIndex=ibSmaLedIndex, ibSmaSwitchGroup=ibSmaSwitchGroup, ibSmaPortPhysState=ibSmaPortPhysState, ibSmaPortLinkState=ibSmaPortLinkState, ibSmaSwFilterRawPktInputCap=ibSmaSwFilterRawPktInputCap, ibSmaPortVlArbHighCapacity=ibSmaPortVlArbHighCapacity, ibSmaGuidIndex=ibSmaGuidIndex, ibSmaPortVlStallCount=ibSmaPortVlStallCount, ibSmaPortMKeyViolations=ibSmaPortMKeyViolations, ibSmaPortInfoEntry=ibSmaPortInfoEntry, ibSmaVendDiagInfo=ibSmaVendDiagInfo, ibSmaLedState=ibSmaLedState, ibSmaNodeDataValid=ibSmaNodeDataValid, ibSmaRandomIsValid=ibSmaRandomIsValid, ibSmaNodeLid=ibSmaNodeLid, ibSmaGuidGroup=ibSmaGuidGroup, ibSmaPortMtuCapacity=ibSmaPortMtuCapacity, ibSmaSysImageGuidModified=ibSmaSysImageGuidModified, ibSmaIBAOutPortIndex=ibSmaIBAOutPortIndex, ibSmaLowPriIBAPortIndex=ibSmaLowPriIBAPortIndex, ibSmaPortInitTypePresence=ibSmaPortInitTypePresence, ibSmaNodePartitionTableNum=ibSmaNodePartitionTableNum, ibSmaCompliances=ibSmaCompliances, ibSmaPortIsLedInfoSupported=ibSmaPortIsLedInfoSupported, ibSmaPortIsReinitSupported=ibSmaPortIsReinitSupported, ibSmaGuidInfoEntry=ibSmaGuidInfoEntry, PYSNMP_MODULE_ID=ibSmaMIB, ibSmaNodeKey=ibSmaNodeKey, ibSmaPortIsSysImgGuidSupported=ibSmaPortIsSysImgGuidSupported, ibSmaPortResponseTimeValue=ibSmaPortResponseTimeValue, ibSmaHiPriWeight=ibSmaHiPriWeight, ibSmaNodePortGuid=ibSmaNodePortGuid, ibSmaFullRouterCACompliance=ibSmaFullRouterCACompliance, ibSmaNodeGuid=ibSmaNodeGuid, ibSmaPortQKeyViolations=ibSmaPortQKeyViolations, ibSmaHiPriIBAPortIndex=ibSmaHiPriIBAPortIndex, ibSmaLowPriVlArbEntry=ibSmaLowPriVlArbEntry, ibSmaNotificationsGroup=ibSmaNotificationsGroup, ibSmaSmInfoTable=ibSmaSmInfoTable, ibSmaSwLifeTimeValue=ibSmaSwLifeTimeValue, ibSmaMulForwMask=ibSmaMulForwMask, ibSmaPKeyBase=ibSmaPKeyBase, ibSmaPortLocalPhysErrorThreshold=ibSmaPortLocalPhysErrorThreshold, ibSmaPortNeighborMtu=ibSmaPortNeighborMtu, ibSmaRandomForwardingEntry=ibSmaRandomForwardingEntry, ibSmaNodeInfo=ibSmaNodeInfo, ibSmaPortInitTypeResuscitate=ibSmaPortInitTypeResuscitate, ibSmaRandomForwEgressPort=ibSmaRandomForwEgressPort, ibSmaPortIsSlMappingSupported=ibSmaPortIsSlMappingSupported, ibSmaMulForEntry=ibSmaMulForEntry, ibSmaSlToVlMapGroup=ibSmaSlToVlMapGroup, ibSmaSwDefMcastPriPort=ibSmaSwDefMcastPriPort, ibSmaPortMasterSmLid=ibSmaPortMasterSmLid, ibSmaHiPriVlArbTable=ibSmaHiPriVlArbTable, ibSmaSwInboundEnforceCap=ibSmaSwInboundEnforceCap, ibSmaPortVlHighPriorityLimit=ibSmaPortVlHighPriorityLimit, ibSmaPortIsSubnetManager=ibSmaPortIsSubnetManager, ibSmaPortIsDrNoticeSupported=ibSmaPortIsDrNoticeSupported, ibSmaPortFilterRawPktInbound=ibSmaPortFilterRawPktInbound, ibSmaPortMKeyLeasePeriod=ibSmaPortMKeyLeasePeriod, ibSmaSystemImageGuid=ibSmaSystemImageGuid, ibSmaPortGidPrefix=ibSmaPortGidPrefix, ibSmaPortLid=ibSmaPortLid, ibSmaPortLidMaskCount=ibSmaPortLidMaskCount, ibSmaSmSmKey=ibSmaSmSmKey, ibSmaSMGroup=ibSmaSMGroup, ibSmaPortMKey=ibSmaPortMKey, ibSmaLedInfoTable=ibSmaLedInfoTable, ibSmaPortVendorDiagCode=ibSmaPortVendorDiagCode, ibSmaIBAInPortIndex=ibSmaIBAInPortIndex, ibSmaVendDiagPortIndex=ibSmaVendDiagPortIndex, ibSmaPortVendorDiagData=ibSmaPortVendorDiagData, ibSmaSwDefaultPort=ibSmaSwDefaultPort, ibSmaFlowCntrlUpdateTimerExpire=ibSmaFlowCntrlUpdateTimerExpire, ibSmaPortLinkSpeedEnabled=ibSmaPortLinkSpeedEnabled, ibSmaNodeVendorId=ibSmaNodeVendorId, ibSmaSwPortStateChange=ibSmaSwPortStateChange, ibSmaLowPriVlArbTable=ibSmaLowPriVlArbTable, ibSmaPortIsSmDisabled=ibSmaPortIsSmDisabled, ibSmaPortIsBootMgmtSupported=ibSmaPortIsBootMgmtSupported, ibSmaPKeyMembership=ibSmaPKeyMembership, ibSmaRandomDestLID=ibSmaRandomDestLID, ibSmaSmSmpCount=ibSmaSmSmpCount, ibSmaPortVendorDiagIndexFwd=ibSmaPortVendorDiagIndexFwd, ibSmaLinForEntry=ibSmaLinForEntry, ibSmaSwFilterRawPktOutputCap=ibSmaSwFilterRawPktOutputCap, ibSmaSmInfoPortIndex=ibSmaSmInfoPortIndex, ibSmaPortIsPKeyExtPortTrapSup=ibSmaPortIsPKeyExtPortTrapSup, ibSmaLFTGroup=ibSmaLFTGroup, ibSmaPortFilterRawPktOutbound=ibSmaPortFilterRawPktOutbound, ibSmaPortIsVendorClassSupported=ibSmaPortIsVendorClassSupported, ibSmaPortIsDevManageSupported=ibSmaPortIsDevManageSupported, ibSmaPortLinkWidthEnabled=ibSmaPortLinkWidthEnabled, ibSmaPortLinkWidthSupported=ibSmaPortLinkWidthSupported, ibSmaLinkIntegrityThresReached=ibSmaLinkIntegrityThresReached, ibSmaNodeClassVersion=ibSmaNodeClassVersion, ibSmaDataPortInfo=ibSmaDataPortInfo, ibSmaNodeLocalPortNumOrZero=ibSmaNodeLocalPortNumOrZero, ibSmaPortInitTypeLoad=ibSmaPortInitTypeLoad, ibSmaPKeyInfo=ibSmaPKeyInfo, ibSmaGuidVal=ibSmaGuidVal, ibSmaLinForTable=ibSmaLinForTable, ibSmaMgmtPortInfo=ibSmaMgmtPortInfo, ibSmaSwMulticastFdbTableNum=ibSmaSwMulticastFdbTableNum, ibSmaNodeDeviceId=ibSmaNodeDeviceId, ibSmaMFTGroup=ibSmaMFTGroup, ibSmaSwEnhancedPort0=ibSmaSwEnhancedPort0, ibSmaHiPriNIndex=ibSmaHiPriNIndex, ibSmaSwLidsPerPort=ibSmaSwLidsPerPort, ibSmaLedGroup=ibSmaLedGroup, ibSmaNodeGroup=ibSmaNodeGroup, ibSmaPortSubnetTimeout=ibSmaPortSubnetTimeout, ibSmaSL2VLMapEntry=ibSmaSL2VLMapEntry, ibSmaSlToVlMapInfo=ibSmaSlToVlMapInfo, ibSmaPortInitPreservePresReply=ibSmaPortInitPreservePresReply, ibSmaBasicNodeCompliance=ibSmaBasicNodeCompliance, ibSmaMulDestDLIDIndex=ibSmaMulDestDLIDIndex, ibSmaMFTInfo=ibSmaMFTInfo, ibSmaBadPartitionKey=ibSmaBadPartitionKey, ibSmaCapabilityMaskModified=ibSmaCapabilityMaskModified, ibSmaNodeString=ibSmaNodeString, ibSmaSmGuid=ibSmaSmGuid, ibSmaPortLinkStateChange=ibSmaPortLinkStateChange, ibSmaLowPriNIndex=ibSmaLowPriNIndex, ibSmaPortPKeyViolations=ibSmaPortPKeyViolations, ibSmaSmPriority=ibSmaSmPriority, ibSmaVirtualLane=ibSmaVirtualLane, ibSmaConformance=ibSmaConformance, ibSmaNodeGid2=ibSmaNodeGid2, ibSmaLedInfoEntry=ibSmaLedInfoEntry, ibSmaPortIsSnmpTunnelSupported=ibSmaPortIsSnmpTunnelSupported, ibSmaGuidInfo=ibSmaGuidInfo, ibSmaPKeyEntry=ibSmaPKeyEntry, ibSmaSwRandomFdbTableNum=ibSmaSwRandomFdbTableNum, ibSmaLowPriVirtLane=ibSmaLowPriVirtLane, ibSmaPortHeadOfQueueLife=ibSmaPortHeadOfQueueLife, ibSmaPortLinkWidthActive=ibSmaPortLinkWidthActive, ibSmaRFTGroup=ibSmaRFTGroup, ibSmaSwitchInfo=ibSmaSwitchInfo, ibSmaNodeAttributeModifier=ibSmaNodeAttributeModifier, ibSmaSL2VLMapTable=ibSmaSL2VLMapTable, ibSmaPortLinkSpeedSupported=ibSmaPortLinkSpeedSupported, ibSmaObjects=ibSmaObjects, ibSmaDataPortGroup=ibSmaDataPortGroup, ibSmaPortIsCommManageSupported=ibSmaPortIsCommManageSupported, ibSmaVLArbitInfo=ibSmaVLArbitInfo, ibSmaNodeLid2=ibSmaNodeLid2, ibSmaPortIsPKeyNvram=ibSmaPortIsPKeyNvram, ibSmaPortOverrunErrorThreshold=ibSmaPortOverrunErrorThreshold, ibSmaBadPKeyAtSwitchPort=ibSmaBadPKeyAtSwitchPort, ibSmaNotifications=ibSmaNotifications, ibSmaPortIsCapMaskNoticSupported=ibSmaPortIsCapMaskNoticSupported, ibSmaSwDefMcastNotPriPort=ibSmaSwDefMcastNotPriPort, ibSmaGuidInfoTable=ibSmaGuidInfoTable, ibSmaSwOutboundEnforceCap=ibSmaSwOutboundEnforceCap, ibSmaNodeQueuePair1=ibSmaNodeQueuePair1, ibSmaSwLinearFdbTableNum=ibSmaSwLinearFdbTableNum, ibSmaPortPartEnforceOutbound=ibSmaPortPartEnforceOutbound, ibSmaPortIsMKeyNvram=ibSmaPortIsMKeyNvram, ibSmaPortIsNoticeSupported=ibSmaPortIsNoticeSupported, ibSmaMulForTable=ibSmaMulForTable, ibSmaGuidPortIndex=ibSmaGuidPortIndex, ibSmaNodeServiceLevel=ibSmaNodeServiceLevel, ibSmaPortVlArbLowCapacity=ibSmaPortVlArbLowCapacity, ibSmaPortInfoTable=ibSmaPortInfoTable, ibSmaPKeyGroup=ibSmaPKeyGroup, ibSmaPortIsAutoMigrateSupported=ibSmaPortIsAutoMigrateSupported, ibSmaRandomLMC=ibSmaRandomLMC, ibSmaNodePortNum=ibSmaNodePortNum, ibSmaNodeSwitchLid=ibSmaNodeSwitchLid, ibSmaExcessBuffOverrunThres=ibSmaExcessBuffOverrunThres, ibSmaNodeCapMask=ibSmaNodeCapMask, ibSmaLedInfo=ibSmaLedInfo, ibSmaPortVirtLaneSupport=ibSmaPortVirtLaneSupport, ibSmaPortPartEnforceInbound=ibSmaPortPartEnforceInbound, ibSmaSmState=ibSmaSmState, ibSmaNodeMethod=ibSmaNodeMethod, ibSmaPortIsTrapSupported=ibSmaPortIsTrapSupported)
(integer, octet_string, object_identifier) = mibBuilder.importSymbols('ASN1', 'Integer', 'OctetString', 'ObjectIdentifier') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_union, value_range_constraint, value_size_constraint, single_value_constraint, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsUnion', 'ValueRangeConstraint', 'ValueSizeConstraint', 'SingleValueConstraint', 'ConstraintsIntersection') (ib_data_port_and_invalid, ib_unicast_lid, ib_multicast_lid, infiniband_mib, ib_data_port, ib_guid, ib_sm_port_list) = mibBuilder.importSymbols('IB-TC-MIB', 'IbDataPortAndInvalid', 'IbUnicastLid', 'IbMulticastLid', 'infinibandMIB', 'IbDataPort', 'IbGuid', 'IbSmPortList') (snmp_admin_string,) = mibBuilder.importSymbols('SNMP-FRAMEWORK-MIB', 'SnmpAdminString') (module_compliance, notification_group, object_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup', 'ObjectGroup') (time_ticks, counter64, mib_scalar, mib_table, mib_table_row, mib_table_column, counter32, iso, bits, gauge32, mib_identifier, notification_type, ip_address, integer32, object_identity, module_identity, unsigned32) = mibBuilder.importSymbols('SNMPv2-SMI', 'TimeTicks', 'Counter64', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Counter32', 'iso', 'Bits', 'Gauge32', 'MibIdentifier', 'NotificationType', 'IpAddress', 'Integer32', 'ObjectIdentity', 'ModuleIdentity', 'Unsigned32') (textual_convention, display_string, truth_value) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString', 'TruthValue') ib_sma_mib = module_identity((1, 3, 6, 1, 3, 117, 3)) ibSmaMIB.setRevisions(('2005-09-01 12:00',)) if mibBuilder.loadTexts: ibSmaMIB.setLastUpdated('200509011200Z') if mibBuilder.loadTexts: ibSmaMIB.setOrganization('IETF IP Over IB (IPOIB) Working Group') ib_sma_objects = mib_identifier((1, 3, 6, 1, 3, 117, 3, 1)) ib_sma_notifications = mib_identifier((1, 3, 6, 1, 3, 117, 3, 2)) ib_sma_conformance = mib_identifier((1, 3, 6, 1, 3, 117, 3, 3)) ib_sma_node_info = mib_identifier((1, 3, 6, 1, 3, 117, 3, 1, 1)) ib_sma_node_string = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 1), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(1, 64))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaNodeString.setStatus('current') ib_sma_node_base_version = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaNodeBaseVersion.setStatus('current') ib_sma_node_class_version = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 3), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaNodeClassVersion.setStatus('current') ib_sma_node_type = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('channelAdapter', 1), ('switch', 2), ('router', 3), ('reserved', 4)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaNodeType.setStatus('current') ib_sma_node_num_ports = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 5), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 254))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaNodeNumPorts.setStatus('current') ib_sma_system_image_guid = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 6), ib_guid()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaSystemImageGuid.setStatus('current') ib_sma_node_guid = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 7), ib_guid()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaNodeGuid.setStatus('current') ib_sma_node_port_guid = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 8), ib_guid()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaNodePortGuid.setStatus('current') ib_sma_node_partition_table_num = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 9), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 65535))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaNodePartitionTableNum.setStatus('current') ib_sma_node_device_id = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 10), octet_string().subtype(subtypeSpec=value_size_constraint(2, 2)).setFixedLength(2)).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaNodeDeviceId.setStatus('current') ib_sma_node_revision = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 11), octet_string().subtype(subtypeSpec=value_size_constraint(4, 4)).setFixedLength(4)).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaNodeRevision.setStatus('current') ib_sma_node_local_port_num_or_zero = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 12), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 254))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaNodeLocalPortNumOrZero.setStatus('current') ib_sma_node_vendor_id = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 13), octet_string().subtype(subtypeSpec=value_size_constraint(3, 3)).setFixedLength(3)).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaNodeVendorId.setStatus('current') ib_sma_node_lid = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 14), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: ibSmaNodeLid.setStatus('current') ib_sma_node_port_num = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 15), ib_data_port()).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: ibSmaNodePortNum.setStatus('current') ib_sma_node_method = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 16), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: ibSmaNodeMethod.setStatus('current') ib_sma_node_attribute_id = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 17), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: ibSmaNodeAttributeId.setStatus('current') ib_sma_node_attribute_modifier = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 18), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 4294967295))).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: ibSmaNodeAttributeModifier.setStatus('current') ib_sma_node_key = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 19), octet_string().subtype(subtypeSpec=value_size_constraint(8, 8)).setFixedLength(8)).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: ibSmaNodeKey.setStatus('current') ib_sma_node_lid2 = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 20), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: ibSmaNodeLid2.setStatus('current') ib_sma_node_service_level = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 21), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 15))).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: ibSmaNodeServiceLevel.setStatus('current') ib_sma_node_queue_pair1 = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 22), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 16777215))).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: ibSmaNodeQueuePair1.setStatus('current') ib_sma_node_queue_pair2 = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 23), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 16777215))).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: ibSmaNodeQueuePair2.setStatus('current') ib_sma_node_gid1 = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 24), octet_string().subtype(subtypeSpec=value_size_constraint(16, 16)).setFixedLength(16)).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: ibSmaNodeGid1.setStatus('current') ib_sma_node_gid2 = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 25), octet_string().subtype(subtypeSpec=value_size_constraint(16, 16)).setFixedLength(16)).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: ibSmaNodeGid2.setStatus('current') ib_sma_node_cap_mask = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 26), octet_string().subtype(subtypeSpec=value_size_constraint(4, 4)).setFixedLength(4)).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: ibSmaNodeCapMask.setStatus('current') ib_sma_node_switch_lid = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 27), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: ibSmaNodeSwitchLid.setStatus('current') ib_sma_node_data_valid = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 1, 28), bits().clone(namedValues=named_values(('lidaddr1', 0), ('lidaddr2', 1), ('pkey', 2), ('sl', 3), ('qp1', 4), ('qp2', 5), ('gidaddr1', 6), ('gidaddr2', 7)))).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: ibSmaNodeDataValid.setStatus('current') ib_sma_switch_info = mib_identifier((1, 3, 6, 1, 3, 117, 3, 1, 2)) ib_sma_sw_linear_fdb_table_num = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 1), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 49151))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaSwLinearFdbTableNum.setStatus('current') ib_sma_sw_random_fdb_table_num = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 49151))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaSwRandomFdbTableNum.setStatus('current') ib_sma_sw_multicast_fdb_table_num = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 3), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 16383))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaSwMulticastFdbTableNum.setStatus('current') ib_sma_sw_linear_fdb_top = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 4), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 49151))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaSwLinearFdbTop.setStatus('current') ib_sma_sw_default_port = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 5), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 254))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaSwDefaultPort.setStatus('current') ib_sma_sw_def_mcast_pri_port = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 6), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 254))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaSwDefMcastPriPort.setStatus('current') ib_sma_sw_def_mcast_not_pri_port = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 7), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 254))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaSwDefMcastNotPriPort.setStatus('current') ib_sma_sw_life_time_value = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 8), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 20))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaSwLifeTimeValue.setStatus('current') ib_sma_sw_port_state_change = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 9), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaSwPortStateChange.setStatus('current') ib_sma_sw_lids_per_port = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 10), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaSwLidsPerPort.setStatus('current') ib_sma_sw_partition_enforce_num = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 11), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaSwPartitionEnforceNum.setStatus('current') ib_sma_sw_inbound_enforce_cap = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 12), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaSwInboundEnforceCap.setStatus('current') ib_sma_sw_outbound_enforce_cap = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 13), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaSwOutboundEnforceCap.setStatus('current') ib_sma_sw_filter_raw_pkt_input_cap = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 14), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaSwFilterRawPktInputCap.setStatus('current') ib_sma_sw_filter_raw_pkt_output_cap = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 15), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaSwFilterRawPktOutputCap.setStatus('current') ib_sma_sw_enhanced_port0 = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 2, 16), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaSwEnhancedPort0.setStatus('current') ib_sma_guid_info = mib_identifier((1, 3, 6, 1, 3, 117, 3, 1, 3)) ib_sma_guid_info_table = mib_table((1, 3, 6, 1, 3, 117, 3, 1, 3, 1)) if mibBuilder.loadTexts: ibSmaGuidInfoTable.setStatus('current') ib_sma_guid_info_entry = mib_table_row((1, 3, 6, 1, 3, 117, 3, 1, 3, 1, 1)).setIndexNames((0, 'IB-SMA-MIB', 'ibSmaGuidPortIndex'), (0, 'IB-SMA-MIB', 'ibSmaGuidIndex')) if mibBuilder.loadTexts: ibSmaGuidInfoEntry.setStatus('current') ib_sma_guid_port_index = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 3, 1, 1, 1), ib_data_port()) if mibBuilder.loadTexts: ibSmaGuidPortIndex.setStatus('current') ib_sma_guid_index = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 3, 1, 1, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 255))) if mibBuilder.loadTexts: ibSmaGuidIndex.setStatus('current') ib_sma_guid_val = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 3, 1, 1, 3), ib_guid()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaGuidVal.setStatus('current') ib_sma_mgmt_port_info = mib_identifier((1, 3, 6, 1, 3, 117, 3, 1, 4)) ib_sma_port_m_key = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 1), octet_string().subtype(subtypeSpec=value_size_constraint(8, 8)).setFixedLength(8)).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortMKey.setStatus('current') ib_sma_port_gid_prefix = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 2), octet_string().subtype(subtypeSpec=value_size_constraint(8, 8)).setFixedLength(8)).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortGidPrefix.setStatus('current') ib_sma_port_lid = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 3), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 49151))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortLid.setStatus('current') ib_sma_port_master_sm_lid = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 4), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 49151))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortMasterSmLid.setStatus('current') ib_sma_port_is_subnet_manager = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 5), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortIsSubnetManager.setStatus('current') ib_sma_port_is_notice_supported = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 6), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortIsNoticeSupported.setStatus('current') ib_sma_port_is_trap_supported = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 7), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortIsTrapSupported.setStatus('current') ib_sma_port_is_auto_migrate_supported = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 8), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortIsAutoMigrateSupported.setStatus('current') ib_sma_port_is_sl_mapping_supported = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 9), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortIsSlMappingSupported.setStatus('current') ib_sma_port_is_m_key_nvram = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 10), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortIsMKeyNvram.setStatus('current') ib_sma_port_is_p_key_nvram = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 11), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortIsPKeyNvram.setStatus('current') ib_sma_port_is_led_info_supported = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 12), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortIsLedInfoSupported.setStatus('current') ib_sma_port_is_sm_disabled = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 13), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortIsSmDisabled.setStatus('current') ib_sma_port_is_sys_img_guid_supported = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 14), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortIsSysImgGuidSupported.setStatus('current') ib_sma_port_is_p_key_ext_port_trap_sup = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 15), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortIsPKeyExtPortTrapSup.setStatus('current') ib_sma_port_is_comm_manage_supported = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 16), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortIsCommManageSupported.setStatus('current') ib_sma_port_is_snmp_tunnel_supported = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 17), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortIsSnmpTunnelSupported.setStatus('current') ib_sma_port_is_reinit_supported = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 18), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortIsReinitSupported.setStatus('current') ib_sma_port_is_dev_manage_supported = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 19), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortIsDevManageSupported.setStatus('current') ib_sma_port_is_vendor_class_supported = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 20), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortIsVendorClassSupported.setStatus('current') ib_sma_port_is_dr_notice_supported = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 21), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortIsDrNoticeSupported.setStatus('current') ib_sma_port_is_cap_mask_notic_supported = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 22), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortIsCapMaskNoticSupported.setStatus('current') ib_sma_port_is_boot_mgmt_supported = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 23), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortIsBootMgmtSupported.setStatus('current') ib_sma_port_m_key_lease_period = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 24), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setUnits('seconds').setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortMKeyLeasePeriod.setStatus('current') ib_sma_port_m_key_protect_bits = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 25), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('noMKeyProtection', 1), ('succeedWithReturnKey', 2), ('succeedWithReturnZeroes', 3), ('failOnNoMatch', 4)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortMKeyProtectBits.setStatus('current') ib_sma_port_master_sm_sl = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 26), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 15))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortMasterSmSl.setStatus('current') ib_sma_port_init_type_load = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 27), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortInitTypeLoad.setStatus('current') ib_sma_port_init_type_content = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 28), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortInitTypeContent.setStatus('current') ib_sma_port_init_type_presence = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 29), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortInitTypePresence.setStatus('current') ib_sma_port_init_type_resuscitate = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 30), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortInitTypeResuscitate.setStatus('current') ib_sma_port_init_no_load_reply = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 31), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortInitNoLoadReply.setStatus('current') ib_sma_port_init_preserve_cont_reply = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 32), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortInitPreserveContReply.setStatus('current') ib_sma_port_init_preserve_pres_reply = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 33), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortInitPreservePresReply.setStatus('current') ib_sma_port_m_key_violations = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 34), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortMKeyViolations.setStatus('current') ib_sma_port_p_key_violations = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 35), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortPKeyViolations.setStatus('current') ib_sma_port_q_key_violations = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 36), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortQKeyViolations.setStatus('current') ib_sma_port_num_guid = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 37), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortNumGuid.setStatus('current') ib_sma_port_subnet_timeout = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 38), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 31))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortSubnetTimeout.setStatus('current') ib_sma_port_response_time_value = mib_scalar((1, 3, 6, 1, 3, 117, 3, 1, 4, 39), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 31))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortResponseTimeValue.setStatus('current') ib_sma_data_port_info = mib_identifier((1, 3, 6, 1, 3, 117, 3, 1, 5)) ib_sma_port_info_table = mib_table((1, 3, 6, 1, 3, 117, 3, 1, 5, 1)) if mibBuilder.loadTexts: ibSmaPortInfoTable.setStatus('current') ib_sma_port_info_entry = mib_table_row((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1)).setIndexNames((0, 'IB-SMA-MIB', 'ibSmaPortIndex')) if mibBuilder.loadTexts: ibSmaPortInfoEntry.setStatus('current') ib_sma_port_index = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 1), ib_data_port()) if mibBuilder.loadTexts: ibSmaPortIndex.setStatus('current') ib_sma_port_link_width_enabled = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9))).clone(namedValues=named_values(('oneX', 1), ('fourX', 2), ('oneXOr4X', 3), ('twelveX', 4), ('oneXOr12X', 5), ('fourXOr12X', 6), ('oneX4XOr12X', 7), ('linkWidthSupported', 8), ('other', 9)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortLinkWidthEnabled.setStatus('current') ib_sma_port_link_width_supported = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('oneX', 1), ('oneXOr4X', 2), ('oneX4XOr12X', 3), ('other', 4)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortLinkWidthSupported.setStatus('current') ib_sma_port_link_width_active = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('oneX', 1), ('fourX', 2), ('twelveX', 3), ('other', 4)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortLinkWidthActive.setStatus('current') ib_sma_port_link_speed_supported = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('twoPoint5Gbps', 1), ('other', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortLinkSpeedSupported.setStatus('current') ib_sma_port_link_state = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('down', 1), ('init', 2), ('armed', 3), ('active', 4), ('other', 5)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortLinkState.setStatus('current') ib_sma_port_phys_state = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=named_values(('sleep', 1), ('polling', 2), ('disabled', 3), ('portConfigTraining', 4), ('linkUp', 5), ('linkErrorRecovery', 6), ('other', 7)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortPhysState.setStatus('current') ib_sma_port_link_down_default_state = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('sleep', 1), ('polling', 2), ('other', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortLinkDownDefaultState.setStatus('current') ib_sma_port_lid_mask_count = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 9), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 7))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortLidMaskCount.setStatus('current') ib_sma_port_link_speed_active = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('twoPoint5Gbps', 1), ('other', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortLinkSpeedActive.setStatus('current') ib_sma_port_link_speed_enabled = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 11), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('twoPoint5Gbps', 1), ('linkSpeedSupported', 2), ('other', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortLinkSpeedEnabled.setStatus('current') ib_sma_port_neighbor_mtu = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 12), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6))).clone(namedValues=named_values(('mtu256', 1), ('mtu512', 2), ('mtu1024', 3), ('mtu2048', 4), ('mtu4096', 5), ('other', 6)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortNeighborMtu.setStatus('current') ib_sma_port_virt_lane_support = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 13), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6))).clone(namedValues=named_values(('vl0', 1), ('vl0ToVl1', 2), ('vl0ToVl3', 3), ('vl0ToVl7', 4), ('vl0ToVl14', 5), ('other', 6)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortVirtLaneSupport.setStatus('current') ib_sma_port_vl_high_priority_limit = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 14), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortVlHighPriorityLimit.setStatus('current') ib_sma_port_vl_arb_high_capacity = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 15), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 64))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortVlArbHighCapacity.setStatus('current') ib_sma_port_vl_arb_low_capacity = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 16), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 64))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortVlArbLowCapacity.setStatus('current') ib_sma_port_mtu_capacity = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 17), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6))).clone(namedValues=named_values(('mtu256', 1), ('mtu512', 2), ('mtu1024', 3), ('mtu2048', 4), ('mtu4096', 5), ('other', 6)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortMtuCapacity.setStatus('current') ib_sma_port_vl_stall_count = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 18), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 7))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortVlStallCount.setStatus('current') ib_sma_port_head_of_queue_life = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 19), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 20))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortHeadOfQueueLife.setStatus('current') ib_sma_port_operational_vls = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 20), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6))).clone(namedValues=named_values(('vl0', 1), ('vl0ToVl1', 2), ('vl0ToVl3', 3), ('vl0ToVl7', 4), ('vl0ToVl14', 5), ('other', 6)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortOperationalVls.setStatus('current') ib_sma_port_part_enforce_inbound = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 21), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortPartEnforceInbound.setStatus('current') ib_sma_port_part_enforce_outbound = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 22), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortPartEnforceOutbound.setStatus('current') ib_sma_port_filter_raw_pkt_inbound = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 23), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortFilterRawPktInbound.setStatus('current') ib_sma_port_filter_raw_pkt_outbound = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 24), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortFilterRawPktOutbound.setStatus('current') ib_sma_port_local_phys_error_threshold = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 25), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 15))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortLocalPhysErrorThreshold.setStatus('current') ib_sma_port_overrun_error_threshold = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 5, 1, 1, 26), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 15))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortOverrunErrorThreshold.setStatus('current') ib_sma_p_key_info = mib_identifier((1, 3, 6, 1, 3, 117, 3, 1, 6)) ib_sma_p_key_table = mib_table((1, 3, 6, 1, 3, 117, 3, 1, 6, 1)) if mibBuilder.loadTexts: ibSmaPKeyTable.setStatus('current') ib_sma_p_key_entry = mib_table_row((1, 3, 6, 1, 3, 117, 3, 1, 6, 1, 1)).setIndexNames((0, 'IB-SMA-MIB', 'ibSmaPKeyIBAPortIndex'), (0, 'IB-SMA-MIB', 'ibSmaPKeyIndex')) if mibBuilder.loadTexts: ibSmaPKeyEntry.setStatus('current') ib_sma_p_key_iba_port_index = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 6, 1, 1, 1), ib_data_port_and_invalid()) if mibBuilder.loadTexts: ibSmaPKeyIBAPortIndex.setStatus('current') ib_sma_p_key_index = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 6, 1, 1, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 65504))) if mibBuilder.loadTexts: ibSmaPKeyIndex.setStatus('current') ib_sma_p_key_membership = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 6, 1, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('none', 1), ('limited', 2), ('full', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPKeyMembership.setStatus('current') ib_sma_p_key_base = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 6, 1, 1, 4), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 65527))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPKeyBase.setStatus('current') ib_sma_sl_to_vl_map_info = mib_identifier((1, 3, 6, 1, 3, 117, 3, 1, 7)) ib_sma_sl2_vl_map_table = mib_table((1, 3, 6, 1, 3, 117, 3, 1, 7, 1)) if mibBuilder.loadTexts: ibSmaSL2VLMapTable.setStatus('current') ib_sma_sl2_vl_map_entry = mib_table_row((1, 3, 6, 1, 3, 117, 3, 1, 7, 1, 1)).setIndexNames((0, 'IB-SMA-MIB', 'ibSmaIBAOutPortIndex'), (0, 'IB-SMA-MIB', 'ibSmaIBAInPortIndex'), (0, 'IB-SMA-MIB', 'ibSmaServiceLevelIndex')) if mibBuilder.loadTexts: ibSmaSL2VLMapEntry.setStatus('current') ib_sma_iba_out_port_index = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 7, 1, 1, 1), ib_data_port_and_invalid()) if mibBuilder.loadTexts: ibSmaIBAOutPortIndex.setStatus('current') ib_sma_iba_in_port_index = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 7, 1, 1, 2), ib_data_port_and_invalid()) if mibBuilder.loadTexts: ibSmaIBAInPortIndex.setStatus('current') ib_sma_service_level_index = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 7, 1, 1, 3), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 15))) if mibBuilder.loadTexts: ibSmaServiceLevelIndex.setStatus('current') ib_sma_virtual_lane = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 7, 1, 1, 4), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 15))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaVirtualLane.setStatus('current') ib_sma_vl_arbit_info = mib_identifier((1, 3, 6, 1, 3, 117, 3, 1, 8)) ib_sma_hi_pri_vl_arb_table = mib_table((1, 3, 6, 1, 3, 117, 3, 1, 8, 1)) if mibBuilder.loadTexts: ibSmaHiPriVlArbTable.setStatus('current') ib_sma_hi_pri_vl_arb_entry = mib_table_row((1, 3, 6, 1, 3, 117, 3, 1, 8, 1, 1)).setIndexNames((0, 'IB-SMA-MIB', 'ibSmaHiPriIBAPortIndex'), (0, 'IB-SMA-MIB', 'ibSmaHiPriNIndex')) if mibBuilder.loadTexts: ibSmaHiPriVlArbEntry.setStatus('current') ib_sma_hi_pri_iba_port_index = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 8, 1, 1, 1), ib_data_port()) if mibBuilder.loadTexts: ibSmaHiPriIBAPortIndex.setStatus('current') ib_sma_hi_pri_n_index = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 8, 1, 1, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 64))) if mibBuilder.loadTexts: ibSmaHiPriNIndex.setStatus('current') ib_sma_hi_pri_virt_lane = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 8, 1, 1, 3), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 14))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaHiPriVirtLane.setStatus('current') ib_sma_hi_pri_weight = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 8, 1, 1, 4), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaHiPriWeight.setStatus('current') ib_sma_low_pri_vl_arb_table = mib_table((1, 3, 6, 1, 3, 117, 3, 1, 8, 2)) if mibBuilder.loadTexts: ibSmaLowPriVlArbTable.setStatus('current') ib_sma_low_pri_vl_arb_entry = mib_table_row((1, 3, 6, 1, 3, 117, 3, 1, 8, 2, 1)).setIndexNames((0, 'IB-SMA-MIB', 'ibSmaLowPriIBAPortIndex'), (0, 'IB-SMA-MIB', 'ibSmaLowPriNIndex')) if mibBuilder.loadTexts: ibSmaLowPriVlArbEntry.setStatus('current') ib_sma_low_pri_iba_port_index = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 8, 2, 1, 1), ib_data_port()) if mibBuilder.loadTexts: ibSmaLowPriIBAPortIndex.setStatus('current') ib_sma_low_pri_n_index = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 8, 2, 1, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 64))) if mibBuilder.loadTexts: ibSmaLowPriNIndex.setStatus('current') ib_sma_low_pri_virt_lane = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 8, 2, 1, 3), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 14))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaLowPriVirtLane.setStatus('current') ib_sma_low_pri_weight = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 8, 2, 1, 4), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaLowPriWeight.setStatus('current') ib_sma_lft_info = mib_identifier((1, 3, 6, 1, 3, 117, 3, 1, 9)) ib_sma_lin_for_table = mib_table((1, 3, 6, 1, 3, 117, 3, 1, 9, 1)) if mibBuilder.loadTexts: ibSmaLinForTable.setStatus('current') ib_sma_lin_for_entry = mib_table_row((1, 3, 6, 1, 3, 117, 3, 1, 9, 1, 1)).setIndexNames((0, 'IB-SMA-MIB', 'ibSmaLinDestDLIDIndex')) if mibBuilder.loadTexts: ibSmaLinForEntry.setStatus('current') ib_sma_lin_dest_dlid_index = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 9, 1, 1, 1), ib_unicast_lid()) if mibBuilder.loadTexts: ibSmaLinDestDLIDIndex.setStatus('current') ib_sma_lin_forw_egress_port = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 9, 1, 1, 2), ib_data_port_and_invalid()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaLinForwEgressPort.setStatus('current') ib_sma_rft_info = mib_identifier((1, 3, 6, 1, 3, 117, 3, 1, 10)) ib_sma_random_forwarding_table = mib_table((1, 3, 6, 1, 3, 117, 3, 1, 10, 1)) if mibBuilder.loadTexts: ibSmaRandomForwardingTable.setStatus('current') ib_sma_random_forwarding_entry = mib_table_row((1, 3, 6, 1, 3, 117, 3, 1, 10, 1, 1)).setIndexNames((0, 'IB-SMA-MIB', 'ibSmaRandomForwardingPortIndex')) if mibBuilder.loadTexts: ibSmaRandomForwardingEntry.setStatus('current') ib_sma_random_forwarding_port_index = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 10, 1, 1, 1), ib_data_port()) if mibBuilder.loadTexts: ibSmaRandomForwardingPortIndex.setStatus('current') ib_sma_random_dest_lid = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 10, 1, 1, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 49152))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaRandomDestLID.setStatus('current') ib_sma_random_forw_egress_port = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 10, 1, 1, 3), ib_data_port()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaRandomForwEgressPort.setStatus('current') ib_sma_random_lmc = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 10, 1, 1, 4), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 7))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaRandomLMC.setStatus('current') ib_sma_random_is_valid = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 10, 1, 1, 5), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaRandomIsValid.setStatus('current') ib_sma_mft_info = mib_identifier((1, 3, 6, 1, 3, 117, 3, 1, 11)) ib_sma_mul_for_table = mib_table((1, 3, 6, 1, 3, 117, 3, 1, 11, 1)) if mibBuilder.loadTexts: ibSmaMulForTable.setStatus('current') ib_sma_mul_for_entry = mib_table_row((1, 3, 6, 1, 3, 117, 3, 1, 11, 1, 1)).setIndexNames((0, 'IB-SMA-MIB', 'ibSmaMulDestDLIDIndex')) if mibBuilder.loadTexts: ibSmaMulForEntry.setStatus('current') ib_sma_mul_dest_dlid_index = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 11, 1, 1, 1), ib_multicast_lid()) if mibBuilder.loadTexts: ibSmaMulDestDLIDIndex.setStatus('current') ib_sma_mul_forw_mask = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 11, 1, 1, 2), ib_sm_port_list()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaMulForwMask.setStatus('current') ib_sma_sm_info = mib_identifier((1, 3, 6, 1, 3, 117, 3, 1, 12)) ib_sma_sub_mgr_info = mib_identifier((1, 3, 6, 1, 3, 117, 3, 1, 12, 1)) ib_sma_sm_info_table = mib_table((1, 3, 6, 1, 3, 117, 3, 1, 12, 1, 1)) if mibBuilder.loadTexts: ibSmaSmInfoTable.setStatus('current') ib_sma_sm_info_entry = mib_table_row((1, 3, 6, 1, 3, 117, 3, 1, 12, 1, 1, 1)).setIndexNames((0, 'IB-SMA-MIB', 'ibSmaSmInfoPortIndex')) if mibBuilder.loadTexts: ibSmaSmInfoEntry.setStatus('current') ib_sma_sm_info_port_index = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 12, 1, 1, 1, 1), ib_data_port()) if mibBuilder.loadTexts: ibSmaSmInfoPortIndex.setStatus('current') ib_sma_sm_guid = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 12, 1, 1, 1, 2), ib_guid()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaSmGuid.setStatus('current') ib_sma_sm_sm_key = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 12, 1, 1, 1, 3), octet_string().subtype(subtypeSpec=value_size_constraint(8, 8)).setFixedLength(8)).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaSmSmKey.setStatus('current') ib_sma_sm_smp_count = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 12, 1, 1, 1, 4), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaSmSmpCount.setStatus('current') ib_sma_sm_priority = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 12, 1, 1, 1, 5), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 15))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaSmPriority.setStatus('current') ib_sma_sm_state = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 12, 1, 1, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('notActive', 1), ('discovering', 2), ('standby', 3), ('master', 4), ('unknown', 5)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaSmState.setStatus('current') ib_sma_vend_diag_info = mib_identifier((1, 3, 6, 1, 3, 117, 3, 1, 13)) ib_sma_vend_diag_info_table = mib_table((1, 3, 6, 1, 3, 117, 3, 1, 13, 1)) if mibBuilder.loadTexts: ibSmaVendDiagInfoTable.setStatus('current') ib_sma_vend_diag_info_entry = mib_table_row((1, 3, 6, 1, 3, 117, 3, 1, 13, 1, 1)).setIndexNames((0, 'IB-SMA-MIB', 'ibSmaVendDiagPortIndex')) if mibBuilder.loadTexts: ibSmaVendDiagInfoEntry.setStatus('current') ib_sma_vend_diag_port_index = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 13, 1, 1, 1), ib_data_port_and_invalid()) if mibBuilder.loadTexts: ibSmaVendDiagPortIndex.setStatus('current') ib_sma_port_generic_diag_code = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 13, 1, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6))).clone(namedValues=named_values(('portReady', 1), ('performingSelfTest', 2), ('initializing', 3), ('softError', 4), ('hardError', 5), ('other', 6)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortGenericDiagCode.setStatus('current') ib_sma_port_vendor_diag_code = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 13, 1, 1, 3), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 2047))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortVendorDiagCode.setStatus('current') ib_sma_port_vendor_diag_index_fwd = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 13, 1, 1, 4), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortVendorDiagIndexFwd.setStatus('current') ib_sma_port_vendor_diag_data = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 13, 1, 1, 5), octet_string().subtype(subtypeSpec=value_size_constraint(124, 124)).setFixedLength(124)).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaPortVendorDiagData.setStatus('current') ib_sma_led_info = mib_identifier((1, 3, 6, 1, 3, 117, 3, 1, 14)) ib_sma_led_info_table = mib_table((1, 3, 6, 1, 3, 117, 3, 1, 14, 1)) if mibBuilder.loadTexts: ibSmaLedInfoTable.setStatus('current') ib_sma_led_info_entry = mib_table_row((1, 3, 6, 1, 3, 117, 3, 1, 14, 1, 1)).setIndexNames((0, 'IB-SMA-MIB', 'ibSmaLedIndex')) if mibBuilder.loadTexts: ibSmaLedInfoEntry.setStatus('current') ib_sma_led_index = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 14, 1, 1, 1), ib_data_port()) if mibBuilder.loadTexts: ibSmaLedIndex.setStatus('current') ib_sma_led_state = mib_table_column((1, 3, 6, 1, 3, 117, 3, 1, 14, 1, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('unknown', 1), ('on', 2), ('off', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ibSmaLedState.setStatus('current') ib_sma_notification_prefix = mib_identifier((1, 3, 6, 1, 3, 117, 3, 2, 0)) ib_sma_port_link_state_change = notification_type((1, 3, 6, 1, 3, 117, 3, 2, 0, 1)).setObjects(('IB-SMA-MIB', 'ibSmaNodeLid')) if mibBuilder.loadTexts: ibSmaPortLinkStateChange.setStatus('current') ib_sma_link_integrity_thres_reached = notification_type((1, 3, 6, 1, 3, 117, 3, 2, 0, 2)).setObjects(('IB-SMA-MIB', 'ibSmaNodeLid'), ('IB-SMA-MIB', 'ibSmaNodePortNum')) if mibBuilder.loadTexts: ibSmaLinkIntegrityThresReached.setStatus('current') ib_sma_excess_buff_overrun_thres = notification_type((1, 3, 6, 1, 3, 117, 3, 2, 0, 3)).setObjects(('IB-SMA-MIB', 'ibSmaNodeLid'), ('IB-SMA-MIB', 'ibSmaNodePortNum')) if mibBuilder.loadTexts: ibSmaExcessBuffOverrunThres.setStatus('current') ib_sma_flow_cntrl_update_timer_expire = notification_type((1, 3, 6, 1, 3, 117, 3, 2, 0, 4)).setObjects(('IB-SMA-MIB', 'ibSmaNodeLid'), ('IB-SMA-MIB', 'ibSmaNodePortNum')) if mibBuilder.loadTexts: ibSmaFlowCntrlUpdateTimerExpire.setStatus('current') ib_sma_capability_mask_modified = notification_type((1, 3, 6, 1, 3, 117, 3, 2, 0, 5)).setObjects(('IB-SMA-MIB', 'ibSmaNodeLid'), ('IB-SMA-MIB', 'ibSmaNodeCapMask')) if mibBuilder.loadTexts: ibSmaCapabilityMaskModified.setStatus('current') ib_sma_sys_image_guid_modified = notification_type((1, 3, 6, 1, 3, 117, 3, 2, 0, 6)).setObjects(('IB-SMA-MIB', 'ibSmaNodeLid'), ('IB-SMA-MIB', 'ibSmaSystemImageGuid')) if mibBuilder.loadTexts: ibSmaSysImageGuidModified.setStatus('current') ib_sma_bad_management_key = notification_type((1, 3, 6, 1, 3, 117, 3, 2, 0, 7)).setObjects(('IB-SMA-MIB', 'ibSmaNodeKey'), ('IB-SMA-MIB', 'ibSmaNodeLid'), ('IB-SMA-MIB', 'ibSmaNodeMethod'), ('IB-SMA-MIB', 'ibSmaNodeAttributeId'), ('IB-SMA-MIB', 'ibSmaNodeAttributeModifier')) if mibBuilder.loadTexts: ibSmaBadManagementKey.setStatus('current') ib_sma_bad_partition_key = notification_type((1, 3, 6, 1, 3, 117, 3, 2, 0, 8)).setObjects(('IB-SMA-MIB', 'ibSmaNodeKey'), ('IB-SMA-MIB', 'ibSmaNodeLid'), ('IB-SMA-MIB', 'ibSmaNodeGid1'), ('IB-SMA-MIB', 'ibSmaNodeQueuePair1'), ('IB-SMA-MIB', 'ibSmaNodeLid2'), ('IB-SMA-MIB', 'ibSmaNodeGid2'), ('IB-SMA-MIB', 'ibSmaNodeQueuePair2'), ('IB-SMA-MIB', 'ibSmaNodeServiceLevel')) if mibBuilder.loadTexts: ibSmaBadPartitionKey.setStatus('current') ib_sma_bad_queue_key = notification_type((1, 3, 6, 1, 3, 117, 3, 2, 0, 9)).setObjects(('IB-SMA-MIB', 'ibSmaNodeKey'), ('IB-SMA-MIB', 'ibSmaNodeLid'), ('IB-SMA-MIB', 'ibSmaNodeGid1'), ('IB-SMA-MIB', 'ibSmaNodeQueuePair1'), ('IB-SMA-MIB', 'ibSmaNodeLid2'), ('IB-SMA-MIB', 'ibSmaNodeGid2'), ('IB-SMA-MIB', 'ibSmaNodeQueuePair2'), ('IB-SMA-MIB', 'ibSmaNodeServiceLevel')) if mibBuilder.loadTexts: ibSmaBadQueueKey.setStatus('current') ib_sma_bad_p_key_at_switch_port = notification_type((1, 3, 6, 1, 3, 117, 3, 2, 0, 10)).setObjects(('IB-SMA-MIB', 'ibSmaNodeKey'), ('IB-SMA-MIB', 'ibSmaNodeLid'), ('IB-SMA-MIB', 'ibSmaNodeGid1'), ('IB-SMA-MIB', 'ibSmaNodeQueuePair1'), ('IB-SMA-MIB', 'ibSmaNodeLid2'), ('IB-SMA-MIB', 'ibSmaNodeGid2'), ('IB-SMA-MIB', 'ibSmaNodeQueuePair2'), ('IB-SMA-MIB', 'ibSmaNodeServiceLevel'), ('IB-SMA-MIB', 'ibSmaNodeSwitchLid'), ('IB-SMA-MIB', 'ibSmaNodeDataValid')) if mibBuilder.loadTexts: ibSmaBadPKeyAtSwitchPort.setStatus('current') ib_sma_compliances = mib_identifier((1, 3, 6, 1, 3, 117, 3, 3, 1)) ib_sma_groups = mib_identifier((1, 3, 6, 1, 3, 117, 3, 3, 2)) ib_sma_basic_node_compliance = module_compliance((1, 3, 6, 1, 3, 117, 3, 3, 1, 1)).setObjects(('IB-SMA-MIB', 'ibSmaNodeGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ib_sma_basic_node_compliance = ibSmaBasicNodeCompliance.setStatus('current') ib_sma_full_switch_compliance = module_compliance((1, 3, 6, 1, 3, 117, 3, 3, 1, 2)).setObjects(('IB-SMA-MIB', 'ibSmaNodeGroup'), ('IB-SMA-MIB', 'ibSmaSwitchGroup'), ('IB-SMA-MIB', 'ibSmaGuidGroup'), ('IB-SMA-MIB', 'ibSmaMgmtPortGroup'), ('IB-SMA-MIB', 'ibSmaDataPortGroup'), ('IB-SMA-MIB', 'ibSmaPKeyGroup'), ('IB-SMA-MIB', 'ibSmaSlToVlMapGroup'), ('IB-SMA-MIB', 'ibSmaVLArbitGroup'), ('IB-SMA-MIB', 'ibSmaLFTGroup'), ('IB-SMA-MIB', 'ibSmaRFTGroup'), ('IB-SMA-MIB', 'ibSmaMFTGroup'), ('IB-SMA-MIB', 'ibSmaSMGroup'), ('IB-SMA-MIB', 'ibSmaVendDiagGroup'), ('IB-SMA-MIB', 'ibSmaLedGroup'), ('IB-SMA-MIB', 'ibSmaNotificationsGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ib_sma_full_switch_compliance = ibSmaFullSwitchCompliance.setStatus('current') ib_sma_full_router_ca_compliance = module_compliance((1, 3, 6, 1, 3, 117, 3, 3, 1, 3)).setObjects(('IB-SMA-MIB', 'ibSmaNodeGroup'), ('IB-SMA-MIB', 'ibSmaGuidGroup'), ('IB-SMA-MIB', 'ibSmaMgmtPortGroup'), ('IB-SMA-MIB', 'ibSmaDataPortGroup'), ('IB-SMA-MIB', 'ibSmaPKeyGroup'), ('IB-SMA-MIB', 'ibSmaSlToVlMapGroup'), ('IB-SMA-MIB', 'ibSmaVLArbitGroup'), ('IB-SMA-MIB', 'ibSmaSMGroup'), ('IB-SMA-MIB', 'ibSmaVendDiagGroup'), ('IB-SMA-MIB', 'ibSmaLedGroup'), ('IB-SMA-MIB', 'ibSmaNotificationsGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ib_sma_full_router_ca_compliance = ibSmaFullRouterCACompliance.setStatus('current') ib_sma_node_group = object_group((1, 3, 6, 1, 3, 117, 3, 3, 2, 1)).setObjects(('IB-SMA-MIB', 'ibSmaNodeString'), ('IB-SMA-MIB', 'ibSmaNodeBaseVersion'), ('IB-SMA-MIB', 'ibSmaNodeClassVersion'), ('IB-SMA-MIB', 'ibSmaNodeType'), ('IB-SMA-MIB', 'ibSmaNodeNumPorts'), ('IB-SMA-MIB', 'ibSmaSystemImageGuid'), ('IB-SMA-MIB', 'ibSmaNodeGuid'), ('IB-SMA-MIB', 'ibSmaNodePortGuid'), ('IB-SMA-MIB', 'ibSmaNodePartitionTableNum'), ('IB-SMA-MIB', 'ibSmaNodeDeviceId'), ('IB-SMA-MIB', 'ibSmaNodeRevision'), ('IB-SMA-MIB', 'ibSmaNodeLocalPortNumOrZero'), ('IB-SMA-MIB', 'ibSmaNodeVendorId'), ('IB-SMA-MIB', 'ibSmaNodeLid'), ('IB-SMA-MIB', 'ibSmaNodePortNum'), ('IB-SMA-MIB', 'ibSmaNodeMethod'), ('IB-SMA-MIB', 'ibSmaNodeAttributeId'), ('IB-SMA-MIB', 'ibSmaNodeAttributeModifier'), ('IB-SMA-MIB', 'ibSmaNodeKey'), ('IB-SMA-MIB', 'ibSmaNodeLid2'), ('IB-SMA-MIB', 'ibSmaNodeServiceLevel'), ('IB-SMA-MIB', 'ibSmaNodeQueuePair1'), ('IB-SMA-MIB', 'ibSmaNodeQueuePair2'), ('IB-SMA-MIB', 'ibSmaNodeGid1'), ('IB-SMA-MIB', 'ibSmaNodeGid2'), ('IB-SMA-MIB', 'ibSmaNodeCapMask'), ('IB-SMA-MIB', 'ibSmaNodeSwitchLid'), ('IB-SMA-MIB', 'ibSmaNodeDataValid')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ib_sma_node_group = ibSmaNodeGroup.setStatus('current') ib_sma_switch_group = object_group((1, 3, 6, 1, 3, 117, 3, 3, 2, 2)).setObjects(('IB-SMA-MIB', 'ibSmaSwLinearFdbTableNum'), ('IB-SMA-MIB', 'ibSmaSwRandomFdbTableNum'), ('IB-SMA-MIB', 'ibSmaSwMulticastFdbTableNum'), ('IB-SMA-MIB', 'ibSmaSwLinearFdbTop'), ('IB-SMA-MIB', 'ibSmaSwDefaultPort'), ('IB-SMA-MIB', 'ibSmaSwDefMcastPriPort'), ('IB-SMA-MIB', 'ibSmaSwDefMcastNotPriPort'), ('IB-SMA-MIB', 'ibSmaSwLifeTimeValue'), ('IB-SMA-MIB', 'ibSmaSwPortStateChange'), ('IB-SMA-MIB', 'ibSmaSwLidsPerPort'), ('IB-SMA-MIB', 'ibSmaSwPartitionEnforceNum'), ('IB-SMA-MIB', 'ibSmaSwInboundEnforceCap'), ('IB-SMA-MIB', 'ibSmaSwOutboundEnforceCap'), ('IB-SMA-MIB', 'ibSmaSwFilterRawPktInputCap'), ('IB-SMA-MIB', 'ibSmaSwFilterRawPktOutputCap'), ('IB-SMA-MIB', 'ibSmaSwEnhancedPort0')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ib_sma_switch_group = ibSmaSwitchGroup.setStatus('current') ib_sma_guid_group = object_group((1, 3, 6, 1, 3, 117, 3, 3, 2, 3)).setObjects(('IB-SMA-MIB', 'ibSmaGuidVal')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ib_sma_guid_group = ibSmaGuidGroup.setStatus('current') ib_sma_mgmt_port_group = object_group((1, 3, 6, 1, 3, 117, 3, 3, 2, 4)).setObjects(('IB-SMA-MIB', 'ibSmaPortMKey'), ('IB-SMA-MIB', 'ibSmaPortGidPrefix'), ('IB-SMA-MIB', 'ibSmaPortLid'), ('IB-SMA-MIB', 'ibSmaPortMasterSmLid'), ('IB-SMA-MIB', 'ibSmaPortIsSubnetManager'), ('IB-SMA-MIB', 'ibSmaPortIsNoticeSupported'), ('IB-SMA-MIB', 'ibSmaPortIsTrapSupported'), ('IB-SMA-MIB', 'ibSmaPortIsAutoMigrateSupported'), ('IB-SMA-MIB', 'ibSmaPortIsSlMappingSupported'), ('IB-SMA-MIB', 'ibSmaPortIsMKeyNvram'), ('IB-SMA-MIB', 'ibSmaPortIsPKeyNvram'), ('IB-SMA-MIB', 'ibSmaPortIsLedInfoSupported'), ('IB-SMA-MIB', 'ibSmaPortIsSmDisabled'), ('IB-SMA-MIB', 'ibSmaPortIsSysImgGuidSupported'), ('IB-SMA-MIB', 'ibSmaPortIsPKeyExtPortTrapSup'), ('IB-SMA-MIB', 'ibSmaPortIsCommManageSupported'), ('IB-SMA-MIB', 'ibSmaPortIsSnmpTunnelSupported'), ('IB-SMA-MIB', 'ibSmaPortIsReinitSupported'), ('IB-SMA-MIB', 'ibSmaPortIsDevManageSupported'), ('IB-SMA-MIB', 'ibSmaPortIsVendorClassSupported'), ('IB-SMA-MIB', 'ibSmaPortIsDrNoticeSupported'), ('IB-SMA-MIB', 'ibSmaPortIsCapMaskNoticSupported'), ('IB-SMA-MIB', 'ibSmaPortIsBootMgmtSupported'), ('IB-SMA-MIB', 'ibSmaPortMKeyLeasePeriod'), ('IB-SMA-MIB', 'ibSmaPortMKeyProtectBits'), ('IB-SMA-MIB', 'ibSmaPortMasterSmSl'), ('IB-SMA-MIB', 'ibSmaPortInitTypeLoad'), ('IB-SMA-MIB', 'ibSmaPortInitTypeContent'), ('IB-SMA-MIB', 'ibSmaPortInitTypePresence'), ('IB-SMA-MIB', 'ibSmaPortInitTypeResuscitate'), ('IB-SMA-MIB', 'ibSmaPortInitNoLoadReply'), ('IB-SMA-MIB', 'ibSmaPortInitPreserveContReply'), ('IB-SMA-MIB', 'ibSmaPortInitPreservePresReply'), ('IB-SMA-MIB', 'ibSmaPortMKeyViolations'), ('IB-SMA-MIB', 'ibSmaPortPKeyViolations'), ('IB-SMA-MIB', 'ibSmaPortQKeyViolations'), ('IB-SMA-MIB', 'ibSmaPortNumGuid'), ('IB-SMA-MIB', 'ibSmaPortSubnetTimeout'), ('IB-SMA-MIB', 'ibSmaPortResponseTimeValue')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ib_sma_mgmt_port_group = ibSmaMgmtPortGroup.setStatus('current') ib_sma_data_port_group = object_group((1, 3, 6, 1, 3, 117, 3, 3, 2, 5)).setObjects(('IB-SMA-MIB', 'ibSmaPortLinkWidthEnabled'), ('IB-SMA-MIB', 'ibSmaPortLinkWidthSupported'), ('IB-SMA-MIB', 'ibSmaPortLinkWidthActive'), ('IB-SMA-MIB', 'ibSmaPortLinkSpeedSupported'), ('IB-SMA-MIB', 'ibSmaPortLinkState'), ('IB-SMA-MIB', 'ibSmaPortPhysState'), ('IB-SMA-MIB', 'ibSmaPortLinkDownDefaultState'), ('IB-SMA-MIB', 'ibSmaPortLidMaskCount'), ('IB-SMA-MIB', 'ibSmaPortLinkSpeedActive'), ('IB-SMA-MIB', 'ibSmaPortLinkSpeedEnabled'), ('IB-SMA-MIB', 'ibSmaPortNeighborMtu'), ('IB-SMA-MIB', 'ibSmaPortVirtLaneSupport'), ('IB-SMA-MIB', 'ibSmaPortVlHighPriorityLimit'), ('IB-SMA-MIB', 'ibSmaPortVlArbHighCapacity'), ('IB-SMA-MIB', 'ibSmaPortVlArbLowCapacity'), ('IB-SMA-MIB', 'ibSmaPortMtuCapacity'), ('IB-SMA-MIB', 'ibSmaPortVlStallCount'), ('IB-SMA-MIB', 'ibSmaPortHeadOfQueueLife'), ('IB-SMA-MIB', 'ibSmaPortOperationalVls'), ('IB-SMA-MIB', 'ibSmaPortPartEnforceInbound'), ('IB-SMA-MIB', 'ibSmaPortPartEnforceOutbound'), ('IB-SMA-MIB', 'ibSmaPortFilterRawPktInbound'), ('IB-SMA-MIB', 'ibSmaPortFilterRawPktOutbound'), ('IB-SMA-MIB', 'ibSmaPortLocalPhysErrorThreshold'), ('IB-SMA-MIB', 'ibSmaPortOverrunErrorThreshold')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ib_sma_data_port_group = ibSmaDataPortGroup.setStatus('current') ib_sma_p_key_group = object_group((1, 3, 6, 1, 3, 117, 3, 3, 2, 6)).setObjects(('IB-SMA-MIB', 'ibSmaPKeyMembership'), ('IB-SMA-MIB', 'ibSmaPKeyBase')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ib_sma_p_key_group = ibSmaPKeyGroup.setStatus('current') ib_sma_sl_to_vl_map_group = object_group((1, 3, 6, 1, 3, 117, 3, 3, 2, 7)).setObjects(('IB-SMA-MIB', 'ibSmaVirtualLane')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ib_sma_sl_to_vl_map_group = ibSmaSlToVlMapGroup.setStatus('current') ib_sma_vl_arbit_group = object_group((1, 3, 6, 1, 3, 117, 3, 3, 2, 8)).setObjects(('IB-SMA-MIB', 'ibSmaHiPriVirtLane'), ('IB-SMA-MIB', 'ibSmaHiPriWeight'), ('IB-SMA-MIB', 'ibSmaLowPriVirtLane'), ('IB-SMA-MIB', 'ibSmaLowPriWeight')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ib_sma_vl_arbit_group = ibSmaVLArbitGroup.setStatus('current') ib_sma_lft_group = object_group((1, 3, 6, 1, 3, 117, 3, 3, 2, 9)).setObjects(('IB-SMA-MIB', 'ibSmaLinForwEgressPort')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ib_sma_lft_group = ibSmaLFTGroup.setStatus('current') ib_sma_rft_group = object_group((1, 3, 6, 1, 3, 117, 3, 3, 2, 10)).setObjects(('IB-SMA-MIB', 'ibSmaRandomDestLID'), ('IB-SMA-MIB', 'ibSmaRandomForwEgressPort'), ('IB-SMA-MIB', 'ibSmaRandomLMC'), ('IB-SMA-MIB', 'ibSmaRandomIsValid')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ib_sma_rft_group = ibSmaRFTGroup.setStatus('current') ib_sma_mft_group = object_group((1, 3, 6, 1, 3, 117, 3, 3, 2, 11)).setObjects(('IB-SMA-MIB', 'ibSmaMulForwMask')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ib_sma_mft_group = ibSmaMFTGroup.setStatus('current') ib_sma_sm_group = object_group((1, 3, 6, 1, 3, 117, 3, 3, 2, 12)).setObjects(('IB-SMA-MIB', 'ibSmaSmGuid'), ('IB-SMA-MIB', 'ibSmaSmSmKey'), ('IB-SMA-MIB', 'ibSmaSmSmpCount'), ('IB-SMA-MIB', 'ibSmaSmPriority'), ('IB-SMA-MIB', 'ibSmaSmState')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ib_sma_sm_group = ibSmaSMGroup.setStatus('current') ib_sma_vend_diag_group = object_group((1, 3, 6, 1, 3, 117, 3, 3, 2, 13)).setObjects(('IB-SMA-MIB', 'ibSmaPortGenericDiagCode'), ('IB-SMA-MIB', 'ibSmaPortVendorDiagCode'), ('IB-SMA-MIB', 'ibSmaPortVendorDiagIndexFwd'), ('IB-SMA-MIB', 'ibSmaPortVendorDiagData')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ib_sma_vend_diag_group = ibSmaVendDiagGroup.setStatus('current') ib_sma_led_group = object_group((1, 3, 6, 1, 3, 117, 3, 3, 2, 14)).setObjects(('IB-SMA-MIB', 'ibSmaLedState')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ib_sma_led_group = ibSmaLedGroup.setStatus('current') ib_sma_notifications_group = notification_group((1, 3, 6, 1, 3, 117, 3, 3, 2, 15)).setObjects(('IB-SMA-MIB', 'ibSmaPortLinkStateChange'), ('IB-SMA-MIB', 'ibSmaLinkIntegrityThresReached'), ('IB-SMA-MIB', 'ibSmaExcessBuffOverrunThres'), ('IB-SMA-MIB', 'ibSmaFlowCntrlUpdateTimerExpire'), ('IB-SMA-MIB', 'ibSmaCapabilityMaskModified'), ('IB-SMA-MIB', 'ibSmaSysImageGuidModified'), ('IB-SMA-MIB', 'ibSmaBadManagementKey'), ('IB-SMA-MIB', 'ibSmaBadPartitionKey'), ('IB-SMA-MIB', 'ibSmaBadQueueKey'), ('IB-SMA-MIB', 'ibSmaBadPKeyAtSwitchPort')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ib_sma_notifications_group = ibSmaNotificationsGroup.setStatus('current') mibBuilder.exportSymbols('IB-SMA-MIB', ibSmaNodeBaseVersion=ibSmaNodeBaseVersion, ibSmaRandomForwardingTable=ibSmaRandomForwardingTable, ibSmaNotificationPrefix=ibSmaNotificationPrefix, ibSmaNodeRevision=ibSmaNodeRevision, ibSmaSmInfoEntry=ibSmaSmInfoEntry, ibSmaVendDiagInfoEntry=ibSmaVendDiagInfoEntry, ibSmaMgmtPortGroup=ibSmaMgmtPortGroup, ibSmaNodeType=ibSmaNodeType, ibSmaNodeGid1=ibSmaNodeGid1, ibSmaPKeyIBAPortIndex=ibSmaPKeyIBAPortIndex, ibSmaMIB=ibSmaMIB, ibSmaBadManagementKey=ibSmaBadManagementKey, ibSmaFullSwitchCompliance=ibSmaFullSwitchCompliance, ibSmaPKeyIndex=ibSmaPKeyIndex, ibSmaPortInitTypeContent=ibSmaPortInitTypeContent, ibSmaLinDestDLIDIndex=ibSmaLinDestDLIDIndex, ibSmaPortIndex=ibSmaPortIndex, ibSmaPKeyTable=ibSmaPKeyTable, ibSmaVendDiagInfoTable=ibSmaVendDiagInfoTable, ibSmaHiPriVirtLane=ibSmaHiPriVirtLane, ibSmaVLArbitGroup=ibSmaVLArbitGroup, ibSmaNodeNumPorts=ibSmaNodeNumPorts, ibSmaPortInitPreserveContReply=ibSmaPortInitPreserveContReply, ibSmaSubMgrInfo=ibSmaSubMgrInfo, ibSmaLFTInfo=ibSmaLFTInfo, ibSmaSwPartitionEnforceNum=ibSmaSwPartitionEnforceNum, ibSmaRandomForwardingPortIndex=ibSmaRandomForwardingPortIndex, ibSmaSMInfo=ibSmaSMInfo, ibSmaPortOperationalVls=ibSmaPortOperationalVls, ibSmaPortInitNoLoadReply=ibSmaPortInitNoLoadReply, ibSmaBadQueueKey=ibSmaBadQueueKey, ibSmaRFTInfo=ibSmaRFTInfo, ibSmaPortNumGuid=ibSmaPortNumGuid, ibSmaHiPriVlArbEntry=ibSmaHiPriVlArbEntry, ibSmaPortMKeyProtectBits=ibSmaPortMKeyProtectBits, ibSmaLowPriWeight=ibSmaLowPriWeight, ibSmaServiceLevelIndex=ibSmaServiceLevelIndex, ibSmaPortGenericDiagCode=ibSmaPortGenericDiagCode, ibSmaGroups=ibSmaGroups, ibSmaNodeAttributeId=ibSmaNodeAttributeId, ibSmaNodeQueuePair2=ibSmaNodeQueuePair2, ibSmaPortLinkSpeedActive=ibSmaPortLinkSpeedActive, ibSmaVendDiagGroup=ibSmaVendDiagGroup, ibSmaSwLinearFdbTop=ibSmaSwLinearFdbTop, ibSmaPortMasterSmSl=ibSmaPortMasterSmSl, ibSmaLinForwEgressPort=ibSmaLinForwEgressPort, ibSmaPortLinkDownDefaultState=ibSmaPortLinkDownDefaultState, ibSmaLedIndex=ibSmaLedIndex, ibSmaSwitchGroup=ibSmaSwitchGroup, ibSmaPortPhysState=ibSmaPortPhysState, ibSmaPortLinkState=ibSmaPortLinkState, ibSmaSwFilterRawPktInputCap=ibSmaSwFilterRawPktInputCap, ibSmaPortVlArbHighCapacity=ibSmaPortVlArbHighCapacity, ibSmaGuidIndex=ibSmaGuidIndex, ibSmaPortVlStallCount=ibSmaPortVlStallCount, ibSmaPortMKeyViolations=ibSmaPortMKeyViolations, ibSmaPortInfoEntry=ibSmaPortInfoEntry, ibSmaVendDiagInfo=ibSmaVendDiagInfo, ibSmaLedState=ibSmaLedState, ibSmaNodeDataValid=ibSmaNodeDataValid, ibSmaRandomIsValid=ibSmaRandomIsValid, ibSmaNodeLid=ibSmaNodeLid, ibSmaGuidGroup=ibSmaGuidGroup, ibSmaPortMtuCapacity=ibSmaPortMtuCapacity, ibSmaSysImageGuidModified=ibSmaSysImageGuidModified, ibSmaIBAOutPortIndex=ibSmaIBAOutPortIndex, ibSmaLowPriIBAPortIndex=ibSmaLowPriIBAPortIndex, ibSmaPortInitTypePresence=ibSmaPortInitTypePresence, ibSmaNodePartitionTableNum=ibSmaNodePartitionTableNum, ibSmaCompliances=ibSmaCompliances, ibSmaPortIsLedInfoSupported=ibSmaPortIsLedInfoSupported, ibSmaPortIsReinitSupported=ibSmaPortIsReinitSupported, ibSmaGuidInfoEntry=ibSmaGuidInfoEntry, PYSNMP_MODULE_ID=ibSmaMIB, ibSmaNodeKey=ibSmaNodeKey, ibSmaPortIsSysImgGuidSupported=ibSmaPortIsSysImgGuidSupported, ibSmaPortResponseTimeValue=ibSmaPortResponseTimeValue, ibSmaHiPriWeight=ibSmaHiPriWeight, ibSmaNodePortGuid=ibSmaNodePortGuid, ibSmaFullRouterCACompliance=ibSmaFullRouterCACompliance, ibSmaNodeGuid=ibSmaNodeGuid, ibSmaPortQKeyViolations=ibSmaPortQKeyViolations, ibSmaHiPriIBAPortIndex=ibSmaHiPriIBAPortIndex, ibSmaLowPriVlArbEntry=ibSmaLowPriVlArbEntry, ibSmaNotificationsGroup=ibSmaNotificationsGroup, ibSmaSmInfoTable=ibSmaSmInfoTable, ibSmaSwLifeTimeValue=ibSmaSwLifeTimeValue, ibSmaMulForwMask=ibSmaMulForwMask, ibSmaPKeyBase=ibSmaPKeyBase, ibSmaPortLocalPhysErrorThreshold=ibSmaPortLocalPhysErrorThreshold, ibSmaPortNeighborMtu=ibSmaPortNeighborMtu, ibSmaRandomForwardingEntry=ibSmaRandomForwardingEntry, ibSmaNodeInfo=ibSmaNodeInfo, ibSmaPortInitTypeResuscitate=ibSmaPortInitTypeResuscitate, ibSmaRandomForwEgressPort=ibSmaRandomForwEgressPort, ibSmaPortIsSlMappingSupported=ibSmaPortIsSlMappingSupported, ibSmaMulForEntry=ibSmaMulForEntry, ibSmaSlToVlMapGroup=ibSmaSlToVlMapGroup, ibSmaSwDefMcastPriPort=ibSmaSwDefMcastPriPort, ibSmaPortMasterSmLid=ibSmaPortMasterSmLid, ibSmaHiPriVlArbTable=ibSmaHiPriVlArbTable, ibSmaSwInboundEnforceCap=ibSmaSwInboundEnforceCap, ibSmaPortVlHighPriorityLimit=ibSmaPortVlHighPriorityLimit, ibSmaPortIsSubnetManager=ibSmaPortIsSubnetManager, ibSmaPortIsDrNoticeSupported=ibSmaPortIsDrNoticeSupported, ibSmaPortFilterRawPktInbound=ibSmaPortFilterRawPktInbound, ibSmaPortMKeyLeasePeriod=ibSmaPortMKeyLeasePeriod, ibSmaSystemImageGuid=ibSmaSystemImageGuid, ibSmaPortGidPrefix=ibSmaPortGidPrefix, ibSmaPortLid=ibSmaPortLid, ibSmaPortLidMaskCount=ibSmaPortLidMaskCount, ibSmaSmSmKey=ibSmaSmSmKey, ibSmaSMGroup=ibSmaSMGroup, ibSmaPortMKey=ibSmaPortMKey, ibSmaLedInfoTable=ibSmaLedInfoTable, ibSmaPortVendorDiagCode=ibSmaPortVendorDiagCode, ibSmaIBAInPortIndex=ibSmaIBAInPortIndex, ibSmaVendDiagPortIndex=ibSmaVendDiagPortIndex, ibSmaPortVendorDiagData=ibSmaPortVendorDiagData, ibSmaSwDefaultPort=ibSmaSwDefaultPort, ibSmaFlowCntrlUpdateTimerExpire=ibSmaFlowCntrlUpdateTimerExpire, ibSmaPortLinkSpeedEnabled=ibSmaPortLinkSpeedEnabled, ibSmaNodeVendorId=ibSmaNodeVendorId, ibSmaSwPortStateChange=ibSmaSwPortStateChange, ibSmaLowPriVlArbTable=ibSmaLowPriVlArbTable, ibSmaPortIsSmDisabled=ibSmaPortIsSmDisabled, ibSmaPortIsBootMgmtSupported=ibSmaPortIsBootMgmtSupported, ibSmaPKeyMembership=ibSmaPKeyMembership, ibSmaRandomDestLID=ibSmaRandomDestLID, ibSmaSmSmpCount=ibSmaSmSmpCount, ibSmaPortVendorDiagIndexFwd=ibSmaPortVendorDiagIndexFwd, ibSmaLinForEntry=ibSmaLinForEntry, ibSmaSwFilterRawPktOutputCap=ibSmaSwFilterRawPktOutputCap, ibSmaSmInfoPortIndex=ibSmaSmInfoPortIndex, ibSmaPortIsPKeyExtPortTrapSup=ibSmaPortIsPKeyExtPortTrapSup, ibSmaLFTGroup=ibSmaLFTGroup, ibSmaPortFilterRawPktOutbound=ibSmaPortFilterRawPktOutbound, ibSmaPortIsVendorClassSupported=ibSmaPortIsVendorClassSupported, ibSmaPortIsDevManageSupported=ibSmaPortIsDevManageSupported, ibSmaPortLinkWidthEnabled=ibSmaPortLinkWidthEnabled, ibSmaPortLinkWidthSupported=ibSmaPortLinkWidthSupported, ibSmaLinkIntegrityThresReached=ibSmaLinkIntegrityThresReached, ibSmaNodeClassVersion=ibSmaNodeClassVersion, ibSmaDataPortInfo=ibSmaDataPortInfo, ibSmaNodeLocalPortNumOrZero=ibSmaNodeLocalPortNumOrZero, ibSmaPortInitTypeLoad=ibSmaPortInitTypeLoad, ibSmaPKeyInfo=ibSmaPKeyInfo, ibSmaGuidVal=ibSmaGuidVal, ibSmaLinForTable=ibSmaLinForTable, ibSmaMgmtPortInfo=ibSmaMgmtPortInfo, ibSmaSwMulticastFdbTableNum=ibSmaSwMulticastFdbTableNum, ibSmaNodeDeviceId=ibSmaNodeDeviceId, ibSmaMFTGroup=ibSmaMFTGroup, ibSmaSwEnhancedPort0=ibSmaSwEnhancedPort0, ibSmaHiPriNIndex=ibSmaHiPriNIndex, ibSmaSwLidsPerPort=ibSmaSwLidsPerPort, ibSmaLedGroup=ibSmaLedGroup, ibSmaNodeGroup=ibSmaNodeGroup, ibSmaPortSubnetTimeout=ibSmaPortSubnetTimeout, ibSmaSL2VLMapEntry=ibSmaSL2VLMapEntry, ibSmaSlToVlMapInfo=ibSmaSlToVlMapInfo, ibSmaPortInitPreservePresReply=ibSmaPortInitPreservePresReply, ibSmaBasicNodeCompliance=ibSmaBasicNodeCompliance, ibSmaMulDestDLIDIndex=ibSmaMulDestDLIDIndex, ibSmaMFTInfo=ibSmaMFTInfo, ibSmaBadPartitionKey=ibSmaBadPartitionKey, ibSmaCapabilityMaskModified=ibSmaCapabilityMaskModified, ibSmaNodeString=ibSmaNodeString, ibSmaSmGuid=ibSmaSmGuid, ibSmaPortLinkStateChange=ibSmaPortLinkStateChange, ibSmaLowPriNIndex=ibSmaLowPriNIndex, ibSmaPortPKeyViolations=ibSmaPortPKeyViolations, ibSmaSmPriority=ibSmaSmPriority, ibSmaVirtualLane=ibSmaVirtualLane, ibSmaConformance=ibSmaConformance, ibSmaNodeGid2=ibSmaNodeGid2, ibSmaLedInfoEntry=ibSmaLedInfoEntry, ibSmaPortIsSnmpTunnelSupported=ibSmaPortIsSnmpTunnelSupported, ibSmaGuidInfo=ibSmaGuidInfo, ibSmaPKeyEntry=ibSmaPKeyEntry, ibSmaSwRandomFdbTableNum=ibSmaSwRandomFdbTableNum, ibSmaLowPriVirtLane=ibSmaLowPriVirtLane, ibSmaPortHeadOfQueueLife=ibSmaPortHeadOfQueueLife, ibSmaPortLinkWidthActive=ibSmaPortLinkWidthActive, ibSmaRFTGroup=ibSmaRFTGroup, ibSmaSwitchInfo=ibSmaSwitchInfo, ibSmaNodeAttributeModifier=ibSmaNodeAttributeModifier, ibSmaSL2VLMapTable=ibSmaSL2VLMapTable, ibSmaPortLinkSpeedSupported=ibSmaPortLinkSpeedSupported, ibSmaObjects=ibSmaObjects, ibSmaDataPortGroup=ibSmaDataPortGroup, ibSmaPortIsCommManageSupported=ibSmaPortIsCommManageSupported, ibSmaVLArbitInfo=ibSmaVLArbitInfo, ibSmaNodeLid2=ibSmaNodeLid2, ibSmaPortIsPKeyNvram=ibSmaPortIsPKeyNvram, ibSmaPortOverrunErrorThreshold=ibSmaPortOverrunErrorThreshold, ibSmaBadPKeyAtSwitchPort=ibSmaBadPKeyAtSwitchPort, ibSmaNotifications=ibSmaNotifications, ibSmaPortIsCapMaskNoticSupported=ibSmaPortIsCapMaskNoticSupported, ibSmaSwDefMcastNotPriPort=ibSmaSwDefMcastNotPriPort, ibSmaGuidInfoTable=ibSmaGuidInfoTable, ibSmaSwOutboundEnforceCap=ibSmaSwOutboundEnforceCap, ibSmaNodeQueuePair1=ibSmaNodeQueuePair1, ibSmaSwLinearFdbTableNum=ibSmaSwLinearFdbTableNum, ibSmaPortPartEnforceOutbound=ibSmaPortPartEnforceOutbound, ibSmaPortIsMKeyNvram=ibSmaPortIsMKeyNvram, ibSmaPortIsNoticeSupported=ibSmaPortIsNoticeSupported, ibSmaMulForTable=ibSmaMulForTable, ibSmaGuidPortIndex=ibSmaGuidPortIndex, ibSmaNodeServiceLevel=ibSmaNodeServiceLevel, ibSmaPortVlArbLowCapacity=ibSmaPortVlArbLowCapacity, ibSmaPortInfoTable=ibSmaPortInfoTable, ibSmaPKeyGroup=ibSmaPKeyGroup, ibSmaPortIsAutoMigrateSupported=ibSmaPortIsAutoMigrateSupported, ibSmaRandomLMC=ibSmaRandomLMC, ibSmaNodePortNum=ibSmaNodePortNum, ibSmaNodeSwitchLid=ibSmaNodeSwitchLid, ibSmaExcessBuffOverrunThres=ibSmaExcessBuffOverrunThres, ibSmaNodeCapMask=ibSmaNodeCapMask, ibSmaLedInfo=ibSmaLedInfo, ibSmaPortVirtLaneSupport=ibSmaPortVirtLaneSupport, ibSmaPortPartEnforceInbound=ibSmaPortPartEnforceInbound, ibSmaSmState=ibSmaSmState, ibSmaNodeMethod=ibSmaNodeMethod, ibSmaPortIsTrapSupported=ibSmaPortIsTrapSupported)
def phone_number(num): string = [(str(x)) for x in num] string = ''.join(string) return f'({string[:3]}) {string[3:6]}-{string[6:]}' print(phone_number([1,2,3,4,5,6,7,8,9,0]))
def phone_number(num): string = [str(x) for x in num] string = ''.join(string) return f'({string[:3]}) {string[3:6]}-{string[6:]}' print(phone_number([1, 2, 3, 4, 5, 6, 7, 8, 9, 0]))
freeze_as_mpy('$(MPY_DIR)/tools', 'upip.py') freeze_as_mpy('$(MPY_DIR)/tools', 'upip_utarfile.py', opt=3) freeze('$(MPY_DIR)/lib/lv_bindings/driver/linux', 'evdev.py') freeze('$(MPY_DIR)/lib/lv_bindings/lib', 'lv_colors.py') freeze('$(MPY_DIR)/lib/lv_bindings/lib', 'async_utils.py') freeze('$(MPY_DIR)/lib/lv_bindings/lib', 'display_driver_utils.py') freeze('$(MPY_DIR)/lib/lv_bindings/lib', 'imagetools.py') freeze('$(MPY_DIR)/lib/lv_bindings/lib', 'fs_driver.py')
freeze_as_mpy('$(MPY_DIR)/tools', 'upip.py') freeze_as_mpy('$(MPY_DIR)/tools', 'upip_utarfile.py', opt=3) freeze('$(MPY_DIR)/lib/lv_bindings/driver/linux', 'evdev.py') freeze('$(MPY_DIR)/lib/lv_bindings/lib', 'lv_colors.py') freeze('$(MPY_DIR)/lib/lv_bindings/lib', 'async_utils.py') freeze('$(MPY_DIR)/lib/lv_bindings/lib', 'display_driver_utils.py') freeze('$(MPY_DIR)/lib/lv_bindings/lib', 'imagetools.py') freeze('$(MPY_DIR)/lib/lv_bindings/lib', 'fs_driver.py')
NAME='fastrouter' CFLAGS = [] LDFLAGS = [] LIBS = [] REQUIRES = ['corerouter'] GCC_LIST = ['fastrouter']
name = 'fastrouter' cflags = [] ldflags = [] libs = [] requires = ['corerouter'] gcc_list = ['fastrouter']
# implicit conversion num_int=123 num_float=1.23 result=num_int+num_float print('datatype of num_int is',type(num_int)) print('datatype of num_float is',type(num_float)) print('datatype of result is',type(result)) # it automatically converts int to float to avoid data loss
num_int = 123 num_float = 1.23 result = num_int + num_float print('datatype of num_int is', type(num_int)) print('datatype of num_float is', type(num_float)) print('datatype of result is', type(result))
class Body(object): def __init__(self, mass, position, velocity, name = None): if (name != None): self.name = name self.mass = mass self.position = position self.velocity = velocity
class Body(object): def __init__(self, mass, position, velocity, name=None): if name != None: self.name = name self.mass = mass self.position = position self.velocity = velocity