content
stringlengths 7
1.05M
| fixed_cases
stringlengths 1
1.28M
|
---|---|
# generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/parallels/catkin_ws/install/include".split(';') if "/home/parallels/catkin_ws/install/include" != "" else []
PROJECT_CATKIN_DEPENDS = "cv_bridge;image_geometry;image_transport;camera_info_manager;pcl_ros;roscpp;tf;visualization_msgs;std_msgs;tf2;message_runtime;sensor_msgs;geometry_msgs;resource_retriever;pcl_conversions;dynamic_reconfigure".replace(';', ' ')
PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else []
PROJECT_NAME = "baxter_kinect_calibration"
PROJECT_SPACE_DIR = "/home/parallels/catkin_ws/install"
PROJECT_VERSION = "0.2.0"
| catkin_package_prefix = ''
project_pkg_config_include_dirs = '/home/parallels/catkin_ws/install/include'.split(';') if '/home/parallels/catkin_ws/install/include' != '' else []
project_catkin_depends = 'cv_bridge;image_geometry;image_transport;camera_info_manager;pcl_ros;roscpp;tf;visualization_msgs;std_msgs;tf2;message_runtime;sensor_msgs;geometry_msgs;resource_retriever;pcl_conversions;dynamic_reconfigure'.replace(';', ' ')
pkg_config_libraries_with_prefix = ''.split(';') if '' != '' else []
project_name = 'baxter_kinect_calibration'
project_space_dir = '/home/parallels/catkin_ws/install'
project_version = '0.2.0' |
self.description = "Fileconflict file -> dir on package replacement (FS#24904)"
lp = pmpkg("dummy")
lp.files = ["dir/filepath",
"dir/file"]
self.addpkg2db("local", lp)
p1 = pmpkg("replace")
p1.provides = ["dummy"]
p1.replaces = ["dummy"]
p1.files = ["dir/filepath/",
"dir/filepath/file",
"dir/file",
"dir/file2"]
self.addpkg2db("sync", p1)
self.args = "-Su"
self.addrule("PACMAN_RETCODE=0")
self.addrule("!PKG_EXIST=dummy")
self.addrule("PKG_EXIST=replace")
| self.description = 'Fileconflict file -> dir on package replacement (FS#24904)'
lp = pmpkg('dummy')
lp.files = ['dir/filepath', 'dir/file']
self.addpkg2db('local', lp)
p1 = pmpkg('replace')
p1.provides = ['dummy']
p1.replaces = ['dummy']
p1.files = ['dir/filepath/', 'dir/filepath/file', 'dir/file', 'dir/file2']
self.addpkg2db('sync', p1)
self.args = '-Su'
self.addrule('PACMAN_RETCODE=0')
self.addrule('!PKG_EXIST=dummy')
self.addrule('PKG_EXIST=replace') |
def find_lowest(lst):
# Return the lowest positive
# number in a list.
def lowest(first, rest):
# Base case
if len(rest) == 0:
return first
if first > rest[0] or first < 0:
return lowest(rest[0], rest[1:])
else:
return lowest(first, rest)
return lowest(lst[0], lst[1:])
a = [16, -6, 1, 6, 6]
print(find_lowest(a)) | def find_lowest(lst):
def lowest(first, rest):
if len(rest) == 0:
return first
if first > rest[0] or first < 0:
return lowest(rest[0], rest[1:])
else:
return lowest(first, rest)
return lowest(lst[0], lst[1:])
a = [16, -6, 1, 6, 6]
print(find_lowest(a)) |
# AUTOGENERATED BY NBDEV! DO NOT EDIT!
__all__ = ["index", "modules", "custom_doc_links", "git_url"]
index = {"get_installed_dependencies": "00_checker.ipynb",
"check_new_version": "00_checker.ipynb"}
modules = ["checker.py"]
doc_url = "https://muellerzr.github.io/dependency_checker/"
git_url = "https://github.com/muellerzr/dependency_checker/tree/master/"
def custom_doc_links(name): return None
| __all__ = ['index', 'modules', 'custom_doc_links', 'git_url']
index = {'get_installed_dependencies': '00_checker.ipynb', 'check_new_version': '00_checker.ipynb'}
modules = ['checker.py']
doc_url = 'https://muellerzr.github.io/dependency_checker/'
git_url = 'https://github.com/muellerzr/dependency_checker/tree/master/'
def custom_doc_links(name):
return None |
num = 600851475143
p = int(num**0.5) + 1
factors = []
def addToFactors(x):
for f in factors:
if not x % f:
return
factors.append(x)
for i in range(2, p):
if not num % i: addToFactors(i)
print(max(factors))
| num = 600851475143
p = int(num ** 0.5) + 1
factors = []
def add_to_factors(x):
for f in factors:
if not x % f:
return
factors.append(x)
for i in range(2, p):
if not num % i:
add_to_factors(i)
print(max(factors)) |
# https://codeforces.com/problemset/problem/230/B
n = int(input())
numbers = [int(x) for x in input().split()]
counter = 0
for number in numbers:
if number == 1 or number == 2:
print('NO')
continue
for x in range(2, number):
if counter > 1:
break
if number % x == 0:
counter += 1
if counter == 1:
print('YES')
else:
print('NO')
counter = 0
| n = int(input())
numbers = [int(x) for x in input().split()]
counter = 0
for number in numbers:
if number == 1 or number == 2:
print('NO')
continue
for x in range(2, number):
if counter > 1:
break
if number % x == 0:
counter += 1
if counter == 1:
print('YES')
else:
print('NO')
counter = 0 |
# Default dt for the imaging
DEF_DT = 0.2
# Parameters for cropping around bouts:
PRE_INT_BT_S = 2 # before
POST_INT_BT_S = 6 # after
| def_dt = 0.2
pre_int_bt_s = 2
post_int_bt_s = 6 |
first_sequence = list(map(int, input().split()))
second_sequence = list(map(int, input().split()))
line = input()
while not line == 'nexus':
first_pair, second_pair = line.split('|')
first_list_index1, second_list_index1 = list(map(int, first_pair.split(':')))
first_list_index2, second_list_index2 = list(map(int, second_pair.split(':')))
if first_list_index1 < second_list_index1 \
and first_list_index2 > second_list_index2 \
and first_list_index1 < first_list_index2 \
and second_list_index1 > second_list_index2:
connected_elements_sum = first_sequence[first_list_index1] + first_sequence[first_list_index2] \
+ second_sequence[second_list_index1] + second_sequence[second_list_index2]
first_sequence = first_sequence[:first_list_index1] + first_sequence[first_list_index2+1:]
first_sequence = [el + connected_elements_sum for el in first_sequence]
second_sequence = second_sequence[:second_list_index2] + second_sequence[second_list_index1+1:]
second_sequence = [el + connected_elements_sum for el in second_sequence]
elif first_list_index1 > second_list_index1 \
and first_list_index2 < second_list_index2 \
and first_list_index2 < first_list_index1 \
and second_list_index1 < second_list_index2:
connected_elements_sum = first_sequence[first_list_index1] + first_sequence[first_list_index2] \
+ second_sequence[second_list_index1] + second_sequence[second_list_index2]
first_sequence = first_sequence[:first_list_index2] + first_sequence[first_list_index1 + 1:]
first_sequence = [el + connected_elements_sum for el in first_sequence]
second_sequence = second_sequence[:second_list_index1] + second_sequence[second_list_index2 + 1:]
second_sequence = [el + connected_elements_sum for el in second_sequence]
line = input()
print(', '.join(map(str, first_sequence)))
print(', '.join(map(str, second_sequence)))
| first_sequence = list(map(int, input().split()))
second_sequence = list(map(int, input().split()))
line = input()
while not line == 'nexus':
(first_pair, second_pair) = line.split('|')
(first_list_index1, second_list_index1) = list(map(int, first_pair.split(':')))
(first_list_index2, second_list_index2) = list(map(int, second_pair.split(':')))
if first_list_index1 < second_list_index1 and first_list_index2 > second_list_index2 and (first_list_index1 < first_list_index2) and (second_list_index1 > second_list_index2):
connected_elements_sum = first_sequence[first_list_index1] + first_sequence[first_list_index2] + second_sequence[second_list_index1] + second_sequence[second_list_index2]
first_sequence = first_sequence[:first_list_index1] + first_sequence[first_list_index2 + 1:]
first_sequence = [el + connected_elements_sum for el in first_sequence]
second_sequence = second_sequence[:second_list_index2] + second_sequence[second_list_index1 + 1:]
second_sequence = [el + connected_elements_sum for el in second_sequence]
elif first_list_index1 > second_list_index1 and first_list_index2 < second_list_index2 and (first_list_index2 < first_list_index1) and (second_list_index1 < second_list_index2):
connected_elements_sum = first_sequence[first_list_index1] + first_sequence[first_list_index2] + second_sequence[second_list_index1] + second_sequence[second_list_index2]
first_sequence = first_sequence[:first_list_index2] + first_sequence[first_list_index1 + 1:]
first_sequence = [el + connected_elements_sum for el in first_sequence]
second_sequence = second_sequence[:second_list_index1] + second_sequence[second_list_index2 + 1:]
second_sequence = [el + connected_elements_sum for el in second_sequence]
line = input()
print(', '.join(map(str, first_sequence)))
print(', '.join(map(str, second_sequence))) |
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
class Solution:
def mergeKLists(self, lists: List[Optional[ListNode]]) -> Optional[ListNode]:
node_list = []
sentinel = head = ListNode(0, None)
for item in lists:
while item:
node_list.append(item.val)
item = item.next
for item in sorted(node_list):
head.next = ListNode(item, None)
head = head.next
return sentinel.next
| class Solution:
def merge_k_lists(self, lists: List[Optional[ListNode]]) -> Optional[ListNode]:
node_list = []
sentinel = head = list_node(0, None)
for item in lists:
while item:
node_list.append(item.val)
item = item.next
for item in sorted(node_list):
head.next = list_node(item, None)
head = head.next
return sentinel.next |
# https://leetcode.com/problems/fair-candy-swap/discuss/161269/C%2B%2BJavaPython-Straight-Forward
class Solution:
def fairCandySwap(self, A: List[int], B: List[int]) -> List[int]:
diff = (sum(A) - sum(B)) // 2
B = set(B)
A = set(A)
for b in B:
if b + diff in A:
return [b+diff, b] | class Solution:
def fair_candy_swap(self, A: List[int], B: List[int]) -> List[int]:
diff = (sum(A) - sum(B)) // 2
b = set(B)
a = set(A)
for b in B:
if b + diff in A:
return [b + diff, b] |
# create node class
class Node:
def __init__(self, value=None, next=None):
self.value = value
self.next = next
# create stack
class Stack:
def __init__(self):
self.top = None
def isEmpty(self):
if self.top == None:
return True
else:
return False
def peek(self):
if self.isEmpty():
raise Exception('cannot peek empty stack')
else:
return self.top.value
def push(self, val):
self.top = Node(val, self.top)
return True
def pop(self):
if self.isEmpty():
raise Exception('cannot pop empty stack')
else:
temp = self.top.value
self.top = self.top.next
return temp | class Node:
def __init__(self, value=None, next=None):
self.value = value
self.next = next
class Stack:
def __init__(self):
self.top = None
def is_empty(self):
if self.top == None:
return True
else:
return False
def peek(self):
if self.isEmpty():
raise exception('cannot peek empty stack')
else:
return self.top.value
def push(self, val):
self.top = node(val, self.top)
return True
def pop(self):
if self.isEmpty():
raise exception('cannot pop empty stack')
else:
temp = self.top.value
self.top = self.top.next
return temp |
# -*- coding: utf-8 -*-
class Hero(object):
def __init__(self, forename, surname, hero):
self.forename = forename
self.surname = surname
self.heroname = hero
| class Hero(object):
def __init__(self, forename, surname, hero):
self.forename = forename
self.surname = surname
self.heroname = hero |
class Ball:
def __init__(self):
self.x, self.y = 320, 240
self.speed_x = -10
self.speed_y = 10
self.size = 8
def movement(self, player1, player2):
self.x += self.speed_x
self.y += self.speed_y
if self.y <= 0:
self.speed_y *= -1
elif self.y >= 480 - self.size:
self.speed_y *= -1
if self.x <= 0:
self.__init__()
elif self.x >= 640 - self.size:
self.__init__()
self.speed_x *= -1
self.speed_y *= -1
for n in range(-self.size, 64):
if self.y == player1.y + n:
if self.x <= player1.x + 8:
self.speed_x *= -1
break
n += 1
for n in range(-self.size, 64):
if self.y == player2.y + n:
if self.x >= player2.x - 8:
self.speed_x *= -1
break
n += 1
class Player:
def __init__(self):
pass
| class Ball:
def __init__(self):
(self.x, self.y) = (320, 240)
self.speed_x = -10
self.speed_y = 10
self.size = 8
def movement(self, player1, player2):
self.x += self.speed_x
self.y += self.speed_y
if self.y <= 0:
self.speed_y *= -1
elif self.y >= 480 - self.size:
self.speed_y *= -1
if self.x <= 0:
self.__init__()
elif self.x >= 640 - self.size:
self.__init__()
self.speed_x *= -1
self.speed_y *= -1
for n in range(-self.size, 64):
if self.y == player1.y + n:
if self.x <= player1.x + 8:
self.speed_x *= -1
break
n += 1
for n in range(-self.size, 64):
if self.y == player2.y + n:
if self.x >= player2.x - 8:
self.speed_x *= -1
break
n += 1
class Player:
def __init__(self):
pass |
def fizzbuzz(n):
if n%3 == 0 and n%5 != 0:
resultado = "Fizz"
elif n%5 == 0 and n%3 != 0:
resultado = "Buzz"
elif n%3 == 0 and n%5 == 0:
resultado = "FizzBuzz"
else:
resultado = n
return resultado
| def fizzbuzz(n):
if n % 3 == 0 and n % 5 != 0:
resultado = 'Fizz'
elif n % 5 == 0 and n % 3 != 0:
resultado = 'Buzz'
elif n % 3 == 0 and n % 5 == 0:
resultado = 'FizzBuzz'
else:
resultado = n
return resultado |
{
"includes": [
"ext/snowcrash/common.gypi"
],
"targets" : [
# LIBSOS
{
'target_name': 'libsos',
'type': 'static_library',
'direct_dependent_settings' : {
'include_dirs': [ 'ext/sos/src' ],
},
'sources': [
'ext/sos/src/sos.cc',
'ext/sos/src/sos.h',
'ext/sos/src/sosJSON.h',
'ext/sos/src/sosYAML.h'
]
},
# LIBDRAFTER
{
"target_name": "libdrafter",
'type': '<(libdrafter_type)',
"conditions" : [
[ 'libdrafter_type=="shared_library"', { 'defines' : [ 'DRAFTER_BUILD_SHARED' ] }, { 'defines' : [ 'DRAFTER_BUILD_STATIC' ] }],
],
'direct_dependent_settings' : {
'include_dirs': [
'src',
],
},
'export_dependent_settings': [
'libsos',
'ext/snowcrash/snowcrash.gyp:libsnowcrash',
],
"sources": [
"src/drafter.h",
"src/drafter.cc",
"src/drafter_private.h",
"src/drafter_private.cc",
"src/stream.h",
"src/Version.h",
"src/NodeInfo.h",
"src/Serialize.h",
"src/Serialize.cc",
"src/SerializeAST.h",
"src/SerializeAST.cc",
"src/SerializeSourcemap.h",
"src/SerializeSourcemap.cc",
"src/SerializeResult.h",
"src/SerializeResult.cc",
"src/RefractAPI.h",
"src/RefractAPI.cc",
"src/RefractDataStructure.h",
"src/RefractDataStructure.cc",
"src/RefractSourceMap.h",
"src/RefractSourceMap.cc",
"src/Render.h",
"src/Render.cc",
"src/NamedTypesRegistry.cc",
"src/NamedTypesRegistry.h",
"src/RefractElementFactory.h",
"src/RefractElementFactory.cc",
"src/ConversionContext.cc",
"src/ConversionContext.h",
# librefract parts - will be separated into other project
"src/refract/Element.h",
"src/refract/Element.cc",
"src/refract/ElementFwd.h",
"src/refract/Visitor.h",
"src/refract/VisitorUtils.h",
"src/refract/VisitorUtils.cc",
"src/refract/SerializeCompactVisitor.h",
"src/refract/SerializeCompactVisitor.cc",
"src/refract/SerializeVisitor.h",
"src/refract/SerializeVisitor.cc",
"src/refract/ComparableVisitor.h",
"src/refract/ComparableVisitor.cc",
"src/refract/TypeQueryVisitor.h",
"src/refract/TypeQueryVisitor.cc",
"src/refract/IsExpandableVisitor.h",
"src/refract/IsExpandableVisitor.cc",
"src/refract/ExpandVisitor.h",
"src/refract/ExpandVisitor.cc",
"src/refract/RenderJSONVisitor.h",
"src/refract/RenderJSONVisitor.cc",
"src/refract/PrintVisitor.h",
"src/refract/PrintVisitor.cc",
"src/refract/JSONSchemaVisitor.h",
"src/refract/JSONSchemaVisitor.cc",
"src/refract/FilterVisitor.h",
"src/refract/Registry.h",
"src/refract/Registry.cc",
"src/refract/Build.h",
"src/refract/AppendDecorator.h",
"src/refract/ElementInserter.h",
"src/refract/Query.h",
"src/refract/Query.cc",
"src/refract/Iterate.h",
],
"dependencies": [
"libsos",
"ext/snowcrash/snowcrash.gyp:libsnowcrash",
],
},
# TESTLIBDRAFTER
{
'target_name': 'test-libdrafter',
'type': 'executable',
'include_dirs': [
'test/vendor/Catch/include',
'test/vendor/dtl/dtl',
'src/refract',
],
'sources': [
"test/test-drafter.cc",
"test/test-SerializeResultTest.cc",
"test/test-SerializeSourceMapTest.cc",
"test/test-RefractDataStructureTest.cc",
"test/test-RefractAPITest.cc",
"test/test-RefractParseResultTest.cc",
"test/test-RenderTest.cc",
"test/test-RefractSourceMapTest.cc",
"test/test-SchemaTest.cc",
"test/test-CircularReferenceTest.cc",
"test/test-ApplyVisitorTest.cc",
"test/test-ExtendElementTest.cc",
"test/test-ElementFactoryTest.cc",
"test/test-OneOfTest.cc",
"test/test-SyntaxIssuesTest.cc",
],
'dependencies': [
"libdrafter",
],
'conditions': [
[ 'OS=="win"', { 'defines' : [ 'WIN' ] } ]
],
},
# DRAFTER
{
"target_name": "drafter",
"type": "executable",
"conditions" : [
[ 'libdrafter_type=="static_library"', { 'defines' : [ 'DRAFTER_BUILD_STATIC' ] }],
],
"sources": [
"src/main.cc",
"src/config.cc",
"src/config.h",
"src/reporting.cc",
"src/reporting.h",
],
"include_dirs": [
"ext/cmdline",
],
"dependencies": [
"libdrafter",
],
},
# DRAFTER C-API TEST
{
"target_name": "test-capi",
"type": "executable",
"conditions" : [
[ 'libdrafter_type=="static_library"', { 'defines' : [ 'DRAFTER_BUILD_STATIC' ] }],
],
"sources": [
"test/test-CAPI.c"
],
"dependencies": [
"libdrafter",
],
},
],
}
| {'includes': ['ext/snowcrash/common.gypi'], 'targets': [{'target_name': 'libsos', 'type': 'static_library', 'direct_dependent_settings': {'include_dirs': ['ext/sos/src']}, 'sources': ['ext/sos/src/sos.cc', 'ext/sos/src/sos.h', 'ext/sos/src/sosJSON.h', 'ext/sos/src/sosYAML.h']}, {'target_name': 'libdrafter', 'type': '<(libdrafter_type)', 'conditions': [['libdrafter_type=="shared_library"', {'defines': ['DRAFTER_BUILD_SHARED']}, {'defines': ['DRAFTER_BUILD_STATIC']}]], 'direct_dependent_settings': {'include_dirs': ['src']}, 'export_dependent_settings': ['libsos', 'ext/snowcrash/snowcrash.gyp:libsnowcrash'], 'sources': ['src/drafter.h', 'src/drafter.cc', 'src/drafter_private.h', 'src/drafter_private.cc', 'src/stream.h', 'src/Version.h', 'src/NodeInfo.h', 'src/Serialize.h', 'src/Serialize.cc', 'src/SerializeAST.h', 'src/SerializeAST.cc', 'src/SerializeSourcemap.h', 'src/SerializeSourcemap.cc', 'src/SerializeResult.h', 'src/SerializeResult.cc', 'src/RefractAPI.h', 'src/RefractAPI.cc', 'src/RefractDataStructure.h', 'src/RefractDataStructure.cc', 'src/RefractSourceMap.h', 'src/RefractSourceMap.cc', 'src/Render.h', 'src/Render.cc', 'src/NamedTypesRegistry.cc', 'src/NamedTypesRegistry.h', 'src/RefractElementFactory.h', 'src/RefractElementFactory.cc', 'src/ConversionContext.cc', 'src/ConversionContext.h', 'src/refract/Element.h', 'src/refract/Element.cc', 'src/refract/ElementFwd.h', 'src/refract/Visitor.h', 'src/refract/VisitorUtils.h', 'src/refract/VisitorUtils.cc', 'src/refract/SerializeCompactVisitor.h', 'src/refract/SerializeCompactVisitor.cc', 'src/refract/SerializeVisitor.h', 'src/refract/SerializeVisitor.cc', 'src/refract/ComparableVisitor.h', 'src/refract/ComparableVisitor.cc', 'src/refract/TypeQueryVisitor.h', 'src/refract/TypeQueryVisitor.cc', 'src/refract/IsExpandableVisitor.h', 'src/refract/IsExpandableVisitor.cc', 'src/refract/ExpandVisitor.h', 'src/refract/ExpandVisitor.cc', 'src/refract/RenderJSONVisitor.h', 'src/refract/RenderJSONVisitor.cc', 'src/refract/PrintVisitor.h', 'src/refract/PrintVisitor.cc', 'src/refract/JSONSchemaVisitor.h', 'src/refract/JSONSchemaVisitor.cc', 'src/refract/FilterVisitor.h', 'src/refract/Registry.h', 'src/refract/Registry.cc', 'src/refract/Build.h', 'src/refract/AppendDecorator.h', 'src/refract/ElementInserter.h', 'src/refract/Query.h', 'src/refract/Query.cc', 'src/refract/Iterate.h'], 'dependencies': ['libsos', 'ext/snowcrash/snowcrash.gyp:libsnowcrash']}, {'target_name': 'test-libdrafter', 'type': 'executable', 'include_dirs': ['test/vendor/Catch/include', 'test/vendor/dtl/dtl', 'src/refract'], 'sources': ['test/test-drafter.cc', 'test/test-SerializeResultTest.cc', 'test/test-SerializeSourceMapTest.cc', 'test/test-RefractDataStructureTest.cc', 'test/test-RefractAPITest.cc', 'test/test-RefractParseResultTest.cc', 'test/test-RenderTest.cc', 'test/test-RefractSourceMapTest.cc', 'test/test-SchemaTest.cc', 'test/test-CircularReferenceTest.cc', 'test/test-ApplyVisitorTest.cc', 'test/test-ExtendElementTest.cc', 'test/test-ElementFactoryTest.cc', 'test/test-OneOfTest.cc', 'test/test-SyntaxIssuesTest.cc'], 'dependencies': ['libdrafter'], 'conditions': [['OS=="win"', {'defines': ['WIN']}]]}, {'target_name': 'drafter', 'type': 'executable', 'conditions': [['libdrafter_type=="static_library"', {'defines': ['DRAFTER_BUILD_STATIC']}]], 'sources': ['src/main.cc', 'src/config.cc', 'src/config.h', 'src/reporting.cc', 'src/reporting.h'], 'include_dirs': ['ext/cmdline'], 'dependencies': ['libdrafter']}, {'target_name': 'test-capi', 'type': 'executable', 'conditions': [['libdrafter_type=="static_library"', {'defines': ['DRAFTER_BUILD_STATIC']}]], 'sources': ['test/test-CAPI.c'], 'dependencies': ['libdrafter']}]} |
# Config key of the MYSQL tag in config.ini
MSSQL_TAG = "MSSQL"
HOST_CONFIG = "host"
DATABASE_CONFIG = "database"
USER_CONFIG = "user"
PASSWORD_CONFIG = "password"
TABLE_CONFIG = "table"
DRIVER_CONFIG = "driver"
INSTANCE_NAME_FIELD_CONFIG = "instance_name_column"
TIMESTAMP_FIELD_CONFIG = "timestamp_column"
TIMESTAMP_FORMAT_CONFIG = "timestamp_format"
# Config key of the INSIGHTFINDER tag in config.ini
IF_TAG = "INSIGHTFINDER"
LICENSE_KEY_CONFIG = "license_key"
PROJECT_NAME_CONFIG = "project_name"
USER_NAME_CONFIG = "user_name"
SERVER_URL_CONFIG = "server_url"
SAMPLING_INTERVAL = "sampling_interval"
# Constant
CONFIG_FILE = "config.ini"
GMT = "GMT"
RAW_DATA_KEY = "data"
TIMESTAMP_KEY = "timestamp"
INSTANCE_NAME_KEY = "tag"
SUCCESS_CODE = 200
METRIC_DATA = "metricData"
LICENSE_KEY = "licenseKey"
PROJECT_NAME = "projectName"
USER_NAME = "userName"
AGENT_TYPE = "agentType"
AGENT_TYPE_LOG_STREAMING = "LogStreaming"
CUSTOM_PROJECT_RAW_DATA_URL = "/customprojectrawdata"
NONE = "NONE"
CHUNK_SIZE = 1000
# Time Constant
ONE_MINUTE = 1000 * 60
FIVE_MINUTES = ONE_MINUTE * 5
| mssql_tag = 'MSSQL'
host_config = 'host'
database_config = 'database'
user_config = 'user'
password_config = 'password'
table_config = 'table'
driver_config = 'driver'
instance_name_field_config = 'instance_name_column'
timestamp_field_config = 'timestamp_column'
timestamp_format_config = 'timestamp_format'
if_tag = 'INSIGHTFINDER'
license_key_config = 'license_key'
project_name_config = 'project_name'
user_name_config = 'user_name'
server_url_config = 'server_url'
sampling_interval = 'sampling_interval'
config_file = 'config.ini'
gmt = 'GMT'
raw_data_key = 'data'
timestamp_key = 'timestamp'
instance_name_key = 'tag'
success_code = 200
metric_data = 'metricData'
license_key = 'licenseKey'
project_name = 'projectName'
user_name = 'userName'
agent_type = 'agentType'
agent_type_log_streaming = 'LogStreaming'
custom_project_raw_data_url = '/customprojectrawdata'
none = 'NONE'
chunk_size = 1000
one_minute = 1000 * 60
five_minutes = ONE_MINUTE * 5 |
print("hello, what is your name?")
name = input()
print("hi " + name)
| print('hello, what is your name?')
name = input()
print('hi ' + name) |
#Python 3.X solution for Easy Challenge #0007
#GitHub: https://github.com/Ashkore
#https://www.reddit.com/user/Ashkoree/
alphabet = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]
morase = [".-","-...","-.-.","-..",".","..-.","--.","....","..",".---","-.-",".-..","--","-.","---",".--.","--.-",".-.","...","-","..-",".--","-..-","-.--","--.."]
def tomorase(string):
string = list(string)
newstring =[]
for char in string:
try:
char = char.upper()
newstring.append(morase[alphabet.index(char)]+" ")
except:
if char == " ":
newstring.append("/ ")
else:
newstring.append("? ")
return "".join(map(str,newstring))
def frommorase(string):
string = string.split(" ")
newstring = []
for char in string:
try:
newstring.append(alphabet[morase.index(char)])
except:
if char == "/":
newstring.append(" ")
if char == "?":
newstring.append("_")
return "".join(map(str,newstring))
string = input("What is your string?")
print("Morase: "+tomorase(string))
print("Normal: "+frommorase(tomorase(string)))
| alphabet = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
morase = ['.-', '-...', '-.-.', '-..', '.', '..-.', '--.', '....', '..', '.---', '-.-', '.-..', '--', '-.', '---', '.--.', '--.-', '.-.', '...', '-', '..-', '.--', '-..-', '-.--', '--..']
def tomorase(string):
string = list(string)
newstring = []
for char in string:
try:
char = char.upper()
newstring.append(morase[alphabet.index(char)] + ' ')
except:
if char == ' ':
newstring.append('/ ')
else:
newstring.append('? ')
return ''.join(map(str, newstring))
def frommorase(string):
string = string.split(' ')
newstring = []
for char in string:
try:
newstring.append(alphabet[morase.index(char)])
except:
if char == '/':
newstring.append(' ')
if char == '?':
newstring.append('_')
return ''.join(map(str, newstring))
string = input('What is your string?')
print('Morase: ' + tomorase(string))
print('Normal: ' + frommorase(tomorase(string))) |
# Write a function or lambda using the implementation of fold below that will
# return the product of the elements of a list.
def or_else(lhs, rhs):
if lhs != None:
return lhs
else:
return rhs
def fold(function, arguments, initializer, accumulator = None):
if len(arguments) == 0:
return accumulator
else:
return fold(
function,
arguments[1:],
initializer,
function(
or_else(accumulator, initializer),
arguments[0]))
| def or_else(lhs, rhs):
if lhs != None:
return lhs
else:
return rhs
def fold(function, arguments, initializer, accumulator=None):
if len(arguments) == 0:
return accumulator
else:
return fold(function, arguments[1:], initializer, function(or_else(accumulator, initializer), arguments[0])) |
def solution(A):
nums = {}
for num in A:
nums[num] = 1
for num in nums:
if num + 1 in nums or num - 1 in nums:
return True
return False
def solution(N):
num = N
numStr = str(N)
if num < 0:
length = len(numStr) - 1
while length > 0:
if numStr[length] == '5':
numStr = numStr[:length] + numStr[length+1:]
return int(numStr)
length-=1
else:
for i in range(len(numStr)):
if numStr[i] == '5':
numStr = numStr[:i] + numStr[i+1:]
return int(numStr) | def solution(A):
nums = {}
for num in A:
nums[num] = 1
for num in nums:
if num + 1 in nums or num - 1 in nums:
return True
return False
def solution(N):
num = N
num_str = str(N)
if num < 0:
length = len(numStr) - 1
while length > 0:
if numStr[length] == '5':
num_str = numStr[:length] + numStr[length + 1:]
return int(numStr)
length -= 1
else:
for i in range(len(numStr)):
if numStr[i] == '5':
num_str = numStr[:i] + numStr[i + 1:]
return int(numStr) |
test = { 'name': 'q1_1',
'points': 1,
'suites': [ { 'cases': [{'code': ">>> unemployment.select('Date', 'NEI', 'NEI-PTER').take(0).column(0).item(0) == '1994-01-01'\nTrue", 'hidden': False, 'locked': False}],
'scored': True,
'setup': '',
'teardown': '',
'type': 'doctest'}]}
| test = {'name': 'q1_1', 'points': 1, 'suites': [{'cases': [{'code': ">>> unemployment.select('Date', 'NEI', 'NEI-PTER').take(0).column(0).item(0) == '1994-01-01'\nTrue", 'hidden': False, 'locked': False}], 'scored': True, 'setup': '', 'teardown': '', 'type': 'doctest'}]} |
command = input()
numbers_sequence = [int(x) for x in input().split()]
odd_numbers = []
even_numbers = []
for number in numbers_sequence:
if number % 2 == 0:
even_numbers.append(number)
else:
odd_numbers.append(number)
if command == 'Odd':
print(sum(odd_numbers) * len(numbers_sequence))
elif command == 'Even':
print(sum(even_numbers) * len(numbers_sequence))
| command = input()
numbers_sequence = [int(x) for x in input().split()]
odd_numbers = []
even_numbers = []
for number in numbers_sequence:
if number % 2 == 0:
even_numbers.append(number)
else:
odd_numbers.append(number)
if command == 'Odd':
print(sum(odd_numbers) * len(numbers_sequence))
elif command == 'Even':
print(sum(even_numbers) * len(numbers_sequence)) |
def sainte_claire1(general, dev, msg) :
code = 2
prio = 500
prio += adjust_prio(general, dev, msg)
keys=list();
keys.append('Sainte Claire')
if ( not contains(dev, keys) ) : return (0, 0, 0, '', '')
if ( dev['Sainte Claire']['count'] < 3) :
return (0, 0, 0, '', '')
title = "RU @ Sainte Claire?"
body = "\
Are you staying at Sainte Claire? I noticed your device had been detected there when I visited the Loca stand in the South Hall. You were detected by their network at the hotel reception %d times, so I guess that means you are checked in! :) I must have just missed you, I was by the hotel reception myself at %s which is when you were last seen there." % ( \
dev['Sainte Claire']['count'], approx_time_date(dev['Sainte Claire']['last_seen']) \
)
body += sig('Sly')
body += location_and_time(general)
body += dev_log(general, dev, msg)
body += loca_sig()
return ( prio, code, title, title, body )
| def sainte_claire1(general, dev, msg):
code = 2
prio = 500
prio += adjust_prio(general, dev, msg)
keys = list()
keys.append('Sainte Claire')
if not contains(dev, keys):
return (0, 0, 0, '', '')
if dev['Sainte Claire']['count'] < 3:
return (0, 0, 0, '', '')
title = 'RU @ Sainte Claire?'
body = 'Are you staying at Sainte Claire? I noticed your device had been detected there when I visited the Loca stand in the South Hall. You were detected by their network at the hotel reception %d times, so I guess that means you are checked in! :) I must have just missed you, I was by the hotel reception myself at %s which is when you were last seen there.' % (dev['Sainte Claire']['count'], approx_time_date(dev['Sainte Claire']['last_seen']))
body += sig('Sly')
body += location_and_time(general)
body += dev_log(general, dev, msg)
body += loca_sig()
return (prio, code, title, title, body) |
# General
TEMP_FILES_PATH = '/tmp/temp_files_parkun'
PERSONAL_FOLDER = 'broadcaster'
BOLD = 'bold'
ITALIC = 'italic'
MONO = 'mono'
STRIKE = 'strike'
POST_URL = 'post_url'
# Twitter
TWITTER_ENABLED = False
CONSUMER_KEY = 'consumer_key'
CONSUMER_SECRET = 'consumer_secret'
ACCESS_TOKEN = 'access_token'
ACCESS_TOKEN_SECRET = 'access_token_secret'
MAX_TWI_CHARACTERS = 280
MAX_TWI_PHOTOS = 4
TWI_URL = 'twitter.com/SOME_TWITTER_ACCOUNT'
# RabbitMQ
RABBIT_HOST = 'localhost'
RABBIT_AMQP_PORT = '5672'
RABBIT_HTTP_PORT = '15672'
RABBIT_LOGIN = 'broadcaster'
RABBIT_PASSWORD = 'broadcaster'
RABBIT_AMQP_ADDRESS = \
f'amqp://{RABBIT_LOGIN}:{RABBIT_PASSWORD}@{RABBIT_HOST}:{RABBIT_AMQP_PORT}'
RABBIT_HTTP_ADDRESS = \
f'http://{RABBIT_LOGIN}:{RABBIT_PASSWORD}@{RABBIT_HOST}:{RABBIT_HTTP_PORT}'
BROADCAST_QUEUE = 'broadcast'
RABBIT_EXCHANGE_SHARING = 'sharing'
ROUTING_KEY = 'sharing_status'
# VK (see readme.md)
VK_ENABLED = False
VK_APP_ID = 'vk_app_id' # just to remember
VK_GROUP_ID = 'vk_group_id'
VK_API_TOKEN = 'vk_api_token'
# Telegram
TG_ENABLED = False
TG_BOT_TOKEN = 'PUT_TOKEN_HERE'
TG_CHANNEL = '@channel_name'
| temp_files_path = '/tmp/temp_files_parkun'
personal_folder = 'broadcaster'
bold = 'bold'
italic = 'italic'
mono = 'mono'
strike = 'strike'
post_url = 'post_url'
twitter_enabled = False
consumer_key = 'consumer_key'
consumer_secret = 'consumer_secret'
access_token = 'access_token'
access_token_secret = 'access_token_secret'
max_twi_characters = 280
max_twi_photos = 4
twi_url = 'twitter.com/SOME_TWITTER_ACCOUNT'
rabbit_host = 'localhost'
rabbit_amqp_port = '5672'
rabbit_http_port = '15672'
rabbit_login = 'broadcaster'
rabbit_password = 'broadcaster'
rabbit_amqp_address = f'amqp://{RABBIT_LOGIN}:{RABBIT_PASSWORD}@{RABBIT_HOST}:{RABBIT_AMQP_PORT}'
rabbit_http_address = f'http://{RABBIT_LOGIN}:{RABBIT_PASSWORD}@{RABBIT_HOST}:{RABBIT_HTTP_PORT}'
broadcast_queue = 'broadcast'
rabbit_exchange_sharing = 'sharing'
routing_key = 'sharing_status'
vk_enabled = False
vk_app_id = 'vk_app_id'
vk_group_id = 'vk_group_id'
vk_api_token = 'vk_api_token'
tg_enabled = False
tg_bot_token = 'PUT_TOKEN_HERE'
tg_channel = '@channel_name' |
'''
Author : MiKueen
Level : Easy
Problem Statement : Convert Binary Number in a Linked List to Integer
Given head which is a reference node to a singly-linked list. The value of each node in the linked list is either 0 or 1.
The linked list holds the binary representation of a number.
Return the decimal value of the number in the linked list.
Example 1:
Input: head = [1,0,1]
Output: 5
Explanation: (101) in base 2 = (5) in base 10
Example 2:
Input: head = [0]
Output: 0
Example 3:
Input: head = [1]
Output: 1
Example 4:
Input: head = [1,0,0,1,0,0,1,1,1,0,0,0,0,0,0]
Output: 18880
Example 5:
Input: head = [0,0]
Output: 0
Constraints:
The Linked List is not empty.
Number of nodes will not exceed 30.
Each node's value is either 0 or 1.
'''
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
class Solution:
def getDecimalValue(self, head: ListNode) -> int:
if head.next is None:
return head.val
# Method 1
res = ''
while head:
res += str(head.val)
head = head.next
return int(res, 2)
# Method 2 - Cool trick
res = 0
while head:
res = 2 * res + head.val
head = head.next
return res
| """
Author : MiKueen
Level : Easy
Problem Statement : Convert Binary Number in a Linked List to Integer
Given head which is a reference node to a singly-linked list. The value of each node in the linked list is either 0 or 1.
The linked list holds the binary representation of a number.
Return the decimal value of the number in the linked list.
Example 1:
Input: head = [1,0,1]
Output: 5
Explanation: (101) in base 2 = (5) in base 10
Example 2:
Input: head = [0]
Output: 0
Example 3:
Input: head = [1]
Output: 1
Example 4:
Input: head = [1,0,0,1,0,0,1,1,1,0,0,0,0,0,0]
Output: 18880
Example 5:
Input: head = [0,0]
Output: 0
Constraints:
The Linked List is not empty.
Number of nodes will not exceed 30.
Each node's value is either 0 or 1.
"""
class Solution:
def get_decimal_value(self, head: ListNode) -> int:
if head.next is None:
return head.val
res = ''
while head:
res += str(head.val)
head = head.next
return int(res, 2)
res = 0
while head:
res = 2 * res + head.val
head = head.next
return res |
def computepay(h,r):
return 42.37
hrs = input("Enter Hours : ")
h = float(hrs)
rate = input("Enter rate per hour : ")
r = float(rate)
if h > 40:
gross = (40*r)+(h-40)*(r*1.5)
print(gross)
else:
gross=h*r
print(gross)
| def computepay(h, r):
return 42.37
hrs = input('Enter Hours : ')
h = float(hrs)
rate = input('Enter rate per hour : ')
r = float(rate)
if h > 40:
gross = 40 * r + (h - 40) * (r * 1.5)
print(gross)
else:
gross = h * r
print(gross) |
for t in range(int(input())):
p, q = map(int, input().split())
q = q + 1
hori = [0 for _ in range(q)]
vert = [0 for _ in range(q)]
for _ in range(p):
x, y, d = input().split()
x = int(x)
y = int(y)
if d == 'N':
vert[y + 1] += 1
if d == 'S':
vert[y] -= 1
vert[0] += 1
if d == 'E':
hori[x + 1] += 1
if d == 'W':
hori[x] -= 1
hori[0] += 1
x, y = 0, 0
cum_sum_h, max_h = 0, 0
cum_sum_v, max_v = 0, 0
for i in range(q):
cum_sum_h += hori[i]
if cum_sum_h > max_h:
max_h = cum_sum_h
x = i
cum_sum_v += vert[i]
if cum_sum_v > max_v:
max_v = cum_sum_v
y = i
print('Case #{n}: {x} {y}'.format(n = t + 1, x=x, y=y))
| for t in range(int(input())):
(p, q) = map(int, input().split())
q = q + 1
hori = [0 for _ in range(q)]
vert = [0 for _ in range(q)]
for _ in range(p):
(x, y, d) = input().split()
x = int(x)
y = int(y)
if d == 'N':
vert[y + 1] += 1
if d == 'S':
vert[y] -= 1
vert[0] += 1
if d == 'E':
hori[x + 1] += 1
if d == 'W':
hori[x] -= 1
hori[0] += 1
(x, y) = (0, 0)
(cum_sum_h, max_h) = (0, 0)
(cum_sum_v, max_v) = (0, 0)
for i in range(q):
cum_sum_h += hori[i]
if cum_sum_h > max_h:
max_h = cum_sum_h
x = i
cum_sum_v += vert[i]
if cum_sum_v > max_v:
max_v = cum_sum_v
y = i
print('Case #{n}: {x} {y}'.format(n=t + 1, x=x, y=y)) |
matrix = [sublist.split() for sublist in input().split("|")][::-1]
print(' '.join([str(number) for sublist in matrix for number in sublist]))
| matrix = [sublist.split() for sublist in input().split('|')][::-1]
print(' '.join([str(number) for sublist in matrix for number in sublist])) |
LOGIN_URL = "/login"
XPATH_EMAIL_INPUT = "//form//input[contains(@placeholder,'Email')]"
XPATH_PASSWORD_INPUT = "//form//input[contains(@placeholder,'Password')]"
XPATH_SUBMIT = "//form//button[contains(@type,'submit')]"
| login_url = '/login'
xpath_email_input = "//form//input[contains(@placeholder,'Email')]"
xpath_password_input = "//form//input[contains(@placeholder,'Password')]"
xpath_submit = "//form//button[contains(@type,'submit')]" |
dataset=["gossipcop_fake" "gossipcop_real" "politifact_fake" "politifact_real" "Aminer"]
methods=["proposed" "HITS" "CoHITS" "BGRM" "BiRank"]
| dataset = ['gossipcop_fakegossipcop_realpolitifact_fakepolitifact_realAminer']
methods = ['proposedHITSCoHITSBGRMBiRank'] |
'''
https://docs.python.org/3/reference/datamodel.html#object.__getitem__
'''
class XXX(object):
def __init__(self):
self.data = {int(i): str(i) for i in range(3)}
def __len__(self):
return len(self.data)
def __getitem__(self, index):
if index >= len(self): raise IndexError
return self.data[index], index
x = XXX()
for v, i in x:
print(v, i)
| """
https://docs.python.org/3/reference/datamodel.html#object.__getitem__
"""
class Xxx(object):
def __init__(self):
self.data = {int(i): str(i) for i in range(3)}
def __len__(self):
return len(self.data)
def __getitem__(self, index):
if index >= len(self):
raise IndexError
return (self.data[index], index)
x = xxx()
for (v, i) in x:
print(v, i) |
def search(list, key):
pos = -1
for i in range(0,len(list)):
if list[i] == key:
pos = i + 1
break
if pos != -1:
print("\n\nThe value {} is found to be at {} position!".format(key,pos))
else:
print("\n\nThe value {} cannot be found!".format(key))
print("\nEnter the elements of the array in one string with spaces: \n")
array = list(map(int, input().split()))
("\nEnter the number you want to find: \n")
key = int(input("\nEnter the number you want to find: \n"))
search(array,key)
| def search(list, key):
pos = -1
for i in range(0, len(list)):
if list[i] == key:
pos = i + 1
break
if pos != -1:
print('\n\nThe value {} is found to be at {} position!'.format(key, pos))
else:
print('\n\nThe value {} cannot be found!'.format(key))
print('\nEnter the elements of the array in one string with spaces: \n')
array = list(map(int, input().split()))
'\nEnter the number you want to find: \n'
key = int(input('\nEnter the number you want to find: \n'))
search(array, key) |
def diagonalDifference(arr, n):
mtotal = 0
stotal = 0
for i in range(n):
mtotal += arr[i][i]
stotal += arr[n - 1 - i][i]
return abs(mtotal - stotal)
n = int(input())
arr = [
list(map(int, input().split())) for _ in range(n)
]
print(diagonalDifference(arr, n))
| def diagonal_difference(arr, n):
mtotal = 0
stotal = 0
for i in range(n):
mtotal += arr[i][i]
stotal += arr[n - 1 - i][i]
return abs(mtotal - stotal)
n = int(input())
arr = [list(map(int, input().split())) for _ in range(n)]
print(diagonal_difference(arr, n)) |
first_name = "Hannah"
last_name = "Louisa"
full_name = f"{first_name} {last_name}"
print(full_name)
print(f"Hello, {full_name.upper()}")
message = f"Howdy, {full_name.title()}"
print(message)
| first_name = 'Hannah'
last_name = 'Louisa'
full_name = f'{first_name} {last_name}'
print(full_name)
print(f'Hello, {full_name.upper()}')
message = f'Howdy, {full_name.title()}'
print(message) |
#
# PySNMP MIB module DOCS-MCAST-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/DOCS-MCAST-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 18:38:33 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ConstraintsUnion, ValueSizeConstraint, SingleValueConstraint, ConstraintsIntersection, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "ValueSizeConstraint", "SingleValueConstraint", "ConstraintsIntersection", "ValueRangeConstraint")
clabProjDocsis, = mibBuilder.importSymbols("CLAB-DEF-MIB", "clabProjDocsis")
DocsSAId, DocsBpkmDataEncryptAlg = mibBuilder.importSymbols("DOCS-IETF-BPI2-MIB", "DocsSAId", "DocsBpkmDataEncryptAlg")
ChSetId, Dsid = mibBuilder.importSymbols("DOCS-IF3-MIB", "ChSetId", "Dsid")
CounterBasedGauge64, = mibBuilder.importSymbols("HCNUM-TC", "CounterBasedGauge64")
ifIndex, InterfaceIndex = mibBuilder.importSymbols("IF-MIB", "ifIndex", "InterfaceIndex")
InetAddress, InetAddressType, InetAddressPrefixLength = mibBuilder.importSymbols("INET-ADDRESS-MIB", "InetAddress", "InetAddressType", "InetAddressPrefixLength")
SnmpAdminString, = mibBuilder.importSymbols("SNMP-FRAMEWORK-MIB", "SnmpAdminString")
ModuleCompliance, NotificationGroup, ObjectGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup", "ObjectGroup")
Counter64, MibIdentifier, Unsigned32, Integer32, Counter32, TimeTicks, Gauge32, IpAddress, iso, ModuleIdentity, NotificationType, Bits, MibScalar, MibTable, MibTableRow, MibTableColumn, ObjectIdentity = mibBuilder.importSymbols("SNMPv2-SMI", "Counter64", "MibIdentifier", "Unsigned32", "Integer32", "Counter32", "TimeTicks", "Gauge32", "IpAddress", "iso", "ModuleIdentity", "NotificationType", "Bits", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "ObjectIdentity")
RowStatus, MacAddress, TextualConvention, TruthValue, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "RowStatus", "MacAddress", "TextualConvention", "TruthValue", "DisplayString")
docsMcastMib = ModuleIdentity((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18))
docsMcastMib.setRevisions(('2015-04-22 00:00', '2014-07-29 00:00', '2007-08-03 00:00', '2006-12-07 17:00',))
if mibBuilder.loadTexts: docsMcastMib.setLastUpdated('201504220000Z')
if mibBuilder.loadTexts: docsMcastMib.setOrganization('Cable Television Laboratories, Inc.')
docsMcastMibObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1))
docsMcastCmtsGrpCfgTable = MibTable((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 1), )
if mibBuilder.loadTexts: docsMcastCmtsGrpCfgTable.setStatus('current')
docsMcastCmtsGrpCfgEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 1, 1), ).setIndexNames((0, "DOCS-MCAST-MIB", "docsMcastCmtsGrpCfgId"))
if mibBuilder.loadTexts: docsMcastCmtsGrpCfgEntry.setStatus('current')
docsMcastCmtsGrpCfgId = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 1, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4294967295)))
if mibBuilder.loadTexts: docsMcastCmtsGrpCfgId.setStatus('current')
docsMcastCmtsGrpCfgRulePriority = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 1, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: docsMcastCmtsGrpCfgRulePriority.setStatus('current')
docsMcastCmtsGrpCfgPrefixAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 1, 1, 3), InetAddressType()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: docsMcastCmtsGrpCfgPrefixAddrType.setStatus('current')
docsMcastCmtsGrpCfgSrcPrefixAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 1, 1, 4), InetAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: docsMcastCmtsGrpCfgSrcPrefixAddr.setStatus('current')
docsMcastCmtsGrpCfgSrcPrefixLen = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 1, 1, 5), InetAddressPrefixLength()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: docsMcastCmtsGrpCfgSrcPrefixLen.setStatus('current')
docsMcastCmtsGrpCfgGrpPrefixAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 1, 1, 6), InetAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: docsMcastCmtsGrpCfgGrpPrefixAddr.setStatus('current')
docsMcastCmtsGrpCfgGrpPrefixLen = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 1, 1, 7), InetAddressPrefixLength()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: docsMcastCmtsGrpCfgGrpPrefixLen.setStatus('current')
docsMcastCmtsGrpCfgTosLow = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 1, 1, 8), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 1)).setFixedLength(1)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: docsMcastCmtsGrpCfgTosLow.setStatus('current')
docsMcastCmtsGrpCfgTosHigh = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 1, 1, 9), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 1)).setFixedLength(1)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: docsMcastCmtsGrpCfgTosHigh.setStatus('current')
docsMcastCmtsGrpCfgTosMask = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 1, 1, 10), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 1)).setFixedLength(1)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: docsMcastCmtsGrpCfgTosMask.setStatus('current')
docsMcastCmtsGrpCfgQosConfigId = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 1, 1, 11), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: docsMcastCmtsGrpCfgQosConfigId.setStatus('current')
docsMcastCmtsGrpCfgEncryptConfigId = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 1, 1, 12), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: docsMcastCmtsGrpCfgEncryptConfigId.setStatus('current')
docsMcastCmtsGrpCfgPhsConfigId = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 1, 1, 13), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: docsMcastCmtsGrpCfgPhsConfigId.setStatus('current')
docsMcastCmtsGrpCfgRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 1, 1, 14), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: docsMcastCmtsGrpCfgRowStatus.setStatus('current')
docsMcastCmtsGrpEncryptCfgTable = MibTable((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 2), )
if mibBuilder.loadTexts: docsMcastCmtsGrpEncryptCfgTable.setStatus('current')
docsMcastCmtsGrpEncryptCfgEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 2, 1), ).setIndexNames((0, "DOCS-MCAST-MIB", "docsMcastCmtsGrpEncryptCfgId"))
if mibBuilder.loadTexts: docsMcastCmtsGrpEncryptCfgEntry.setStatus('current')
docsMcastCmtsGrpEncryptCfgId = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 2, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535)))
if mibBuilder.loadTexts: docsMcastCmtsGrpEncryptCfgId.setStatus('current')
docsMcastCmtsGrpEncryptCfgCtrl = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 2, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("cmts", 1), ("mgmt", 2))).clone('mgmt')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: docsMcastCmtsGrpEncryptCfgCtrl.setStatus('current')
docsMcastCmtsGrpEncryptCfgAlg = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 2, 1, 3), DocsBpkmDataEncryptAlg().clone('des56CbcMode')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: docsMcastCmtsGrpEncryptCfgAlg.setStatus('current')
docsMcastCmtsGrpEncryptCfgRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 2, 1, 4), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: docsMcastCmtsGrpEncryptCfgRowStatus.setStatus('current')
docsMcastCmtsGrpPhsCfgTable = MibTable((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 3), )
if mibBuilder.loadTexts: docsMcastCmtsGrpPhsCfgTable.setStatus('current')
docsMcastCmtsGrpPhsCfgEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 3, 1), ).setIndexNames((0, "DOCS-MCAST-MIB", "docsMcastCmtsGrpPhsCfgId"))
if mibBuilder.loadTexts: docsMcastCmtsGrpPhsCfgEntry.setStatus('current')
docsMcastCmtsGrpPhsCfgId = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 3, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535)))
if mibBuilder.loadTexts: docsMcastCmtsGrpPhsCfgId.setStatus('current')
docsMcastCmtsGrpPhsCfgPhsField = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 3, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: docsMcastCmtsGrpPhsCfgPhsField.setStatus('current')
docsMcastCmtsGrpPhsCfgPhsMask = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 3, 1, 3), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: docsMcastCmtsGrpPhsCfgPhsMask.setStatus('current')
docsMcastCmtsGrpPhsCfgPhsSize = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 3, 1, 4), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setUnits('Bytes').setMaxAccess("readcreate")
if mibBuilder.loadTexts: docsMcastCmtsGrpPhsCfgPhsSize.setStatus('current')
docsMcastCmtsGrpPhsCfgPhsVerify = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 3, 1, 5), TruthValue().clone('false')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: docsMcastCmtsGrpPhsCfgPhsVerify.setStatus('current')
docsMcastCmtsGrpPhsCfgRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 3, 1, 6), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: docsMcastCmtsGrpPhsCfgRowStatus.setStatus('current')
docsMcastCmtsGrpQosCfgTable = MibTable((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 4), )
if mibBuilder.loadTexts: docsMcastCmtsGrpQosCfgTable.setStatus('current')
docsMcastCmtsGrpQosCfgEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 4, 1), ).setIndexNames((0, "DOCS-MCAST-MIB", "docsMcastCmtsGrpQosCfgId"))
if mibBuilder.loadTexts: docsMcastCmtsGrpQosCfgEntry.setStatus('current')
docsMcastCmtsGrpQosCfgId = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 4, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535)))
if mibBuilder.loadTexts: docsMcastCmtsGrpQosCfgId.setStatus('current')
docsMcastCmtsGrpQosCfgServiceClassName = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 4, 1, 2), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(1, 15)).clone(hexValue="")).setMaxAccess("readcreate")
if mibBuilder.loadTexts: docsMcastCmtsGrpQosCfgServiceClassName.setStatus('current')
docsMcastCmtsGrpQosCfgQosCtrl = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 4, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("singleSsession", 1), ("aggregateSession", 2)))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: docsMcastCmtsGrpQosCfgQosCtrl.setStatus('current')
docsMcastCmtsGrpQosCfgAggSessLimit = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 4, 1, 4), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: docsMcastCmtsGrpQosCfgAggSessLimit.setStatus('current')
docsMcastCmtsGrpQosCfgAppId = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 4, 1, 5), Unsigned32()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: docsMcastCmtsGrpQosCfgAppId.setStatus('current')
docsMcastCmtsGrpQosCfgRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 4, 1, 6), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: docsMcastCmtsGrpQosCfgRowStatus.setStatus('current')
docsMcastCmtsReplSessTable = MibTable((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 5), )
if mibBuilder.loadTexts: docsMcastCmtsReplSessTable.setStatus('current')
docsMcastCmtsReplSessEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 5, 1), ).setIndexNames((0, "DOCS-MCAST-MIB", "docsMcastCmtsReplSessPrefixAddrType"), (0, "DOCS-MCAST-MIB", "docsMcastCmtsReplSessGrpPrefix"), (0, "DOCS-MCAST-MIB", "docsMcastCmtsReplSessSrcPrefix"), (0, "DOCS-MCAST-MIB", "docsMcastCmtsReplSessMdIfIndex"), (0, "DOCS-MCAST-MIB", "docsMcastCmtsReplSessDcsId"), (0, "DOCS-MCAST-MIB", "docsMcastCmtsReplSessServiceFlowId"))
if mibBuilder.loadTexts: docsMcastCmtsReplSessEntry.setStatus('current')
docsMcastCmtsReplSessPrefixAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 5, 1, 1), InetAddressType())
if mibBuilder.loadTexts: docsMcastCmtsReplSessPrefixAddrType.setStatus('current')
docsMcastCmtsReplSessGrpPrefix = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 5, 1, 2), InetAddress())
if mibBuilder.loadTexts: docsMcastCmtsReplSessGrpPrefix.setStatus('current')
docsMcastCmtsReplSessSrcPrefix = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 5, 1, 3), InetAddress())
if mibBuilder.loadTexts: docsMcastCmtsReplSessSrcPrefix.setStatus('current')
docsMcastCmtsReplSessMdIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 5, 1, 4), InterfaceIndex())
if mibBuilder.loadTexts: docsMcastCmtsReplSessMdIfIndex.setStatus('current')
docsMcastCmtsReplSessDcsId = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 5, 1, 5), ChSetId())
if mibBuilder.loadTexts: docsMcastCmtsReplSessDcsId.setStatus('current')
docsMcastCmtsReplSessServiceFlowId = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 5, 1, 6), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4294967295)))
if mibBuilder.loadTexts: docsMcastCmtsReplSessServiceFlowId.setStatus('current')
docsMcastCmtsReplSessDsid = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 5, 1, 7), Dsid()).setMaxAccess("readonly")
if mibBuilder.loadTexts: docsMcastCmtsReplSessDsid.setStatus('current')
docsMcastCmtsReplSessSaid = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 5, 1, 8), DocsSAId()).setMaxAccess("readonly")
if mibBuilder.loadTexts: docsMcastCmtsReplSessSaid.setStatus('current')
docsMcastDefGrpSvcClass = MibIdentifier((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 6))
docsMcastDefGrpSvcClassDef = MibScalar((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 6, 1), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0, 15)).clone(hexValue="")).setMaxAccess("readwrite")
if mibBuilder.loadTexts: docsMcastDefGrpSvcClassDef.setStatus('current')
docsMcastDsidPhsTable = MibTable((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 7), )
if mibBuilder.loadTexts: docsMcastDsidPhsTable.setStatus('current')
docsMcastDsidPhsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 7, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "DOCS-MCAST-MIB", "docsMcastDsidPhsDsid"))
if mibBuilder.loadTexts: docsMcastDsidPhsEntry.setStatus('current')
docsMcastDsidPhsDsid = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 7, 1, 1), Dsid())
if mibBuilder.loadTexts: docsMcastDsidPhsDsid.setStatus('current')
docsMcastDsidPhsPhsField = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 7, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: docsMcastDsidPhsPhsField.setStatus('current')
docsMcastDsidPhsPhsMask = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 7, 1, 3), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readonly")
if mibBuilder.loadTexts: docsMcastDsidPhsPhsMask.setStatus('current')
docsMcastDsidPhsPhsSize = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 7, 1, 4), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: docsMcastDsidPhsPhsSize.setStatus('current')
docsMcastDsidPhsPhsVerify = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 7, 1, 5), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: docsMcastDsidPhsPhsVerify.setStatus('current')
docsMcastStatsTable = MibTable((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 8), )
if mibBuilder.loadTexts: docsMcastStatsTable.setStatus('current')
docsMcastStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 8, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "DOCS-MCAST-MIB", "docsMcastStatsGrpAddrType"), (0, "DOCS-MCAST-MIB", "docsMcastStatsGrpAddr"), (0, "DOCS-MCAST-MIB", "docsMcastStatsGrpPrefixLen"), (0, "DOCS-MCAST-MIB", "docsMcastStatsSrcAddrType"), (0, "DOCS-MCAST-MIB", "docsMcastStatsSrcAddr"), (0, "DOCS-MCAST-MIB", "docsMcastStatsSrcPrefixLen"))
if mibBuilder.loadTexts: docsMcastStatsEntry.setStatus('current')
docsMcastStatsGrpAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 8, 1, 1), InetAddressType())
if mibBuilder.loadTexts: docsMcastStatsGrpAddrType.setStatus('current')
docsMcastStatsGrpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 8, 1, 2), InetAddress())
if mibBuilder.loadTexts: docsMcastStatsGrpAddr.setStatus('current')
docsMcastStatsGrpPrefixLen = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 8, 1, 3), InetAddressPrefixLength())
if mibBuilder.loadTexts: docsMcastStatsGrpPrefixLen.setStatus('current')
docsMcastStatsSrcAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 8, 1, 4), InetAddressType())
if mibBuilder.loadTexts: docsMcastStatsSrcAddrType.setStatus('current')
docsMcastStatsSrcAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 8, 1, 5), InetAddress())
if mibBuilder.loadTexts: docsMcastStatsSrcAddr.setStatus('current')
docsMcastStatsSrcPrefixLen = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 8, 1, 6), InetAddressPrefixLength())
if mibBuilder.loadTexts: docsMcastStatsSrcPrefixLen.setStatus('current')
docsMcastStatsDroppedPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 8, 1, 7), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: docsMcastStatsDroppedPkts.setStatus('current')
docsMcastStatsDroppedOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 8, 1, 8), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: docsMcastStatsDroppedOctets.setStatus('current')
docsMcastCpeListTable = MibTable((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 9), )
if mibBuilder.loadTexts: docsMcastCpeListTable.setStatus('current')
docsMcastCpeListEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 9, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "DOCS-MCAST-MIB", "docsMcastCpeListGrpAddrType"), (0, "DOCS-MCAST-MIB", "docsMcastCpeListGrpAddr"), (0, "DOCS-MCAST-MIB", "docsMcastCpeListGrpPrefixLen"), (0, "DOCS-MCAST-MIB", "docsMcastCpeListSrcAddrType"), (0, "DOCS-MCAST-MIB", "docsMcastCpeListSrcAddr"), (0, "DOCS-MCAST-MIB", "docsMcastCpeListSrcPrefixLen"), (0, "DOCS-MCAST-MIB", "docsMcastCpeListCmMacAddr"))
if mibBuilder.loadTexts: docsMcastCpeListEntry.setStatus('current')
docsMcastCpeListGrpAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 9, 1, 1), InetAddressType())
if mibBuilder.loadTexts: docsMcastCpeListGrpAddrType.setStatus('current')
docsMcastCpeListGrpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 9, 1, 2), InetAddress())
if mibBuilder.loadTexts: docsMcastCpeListGrpAddr.setStatus('current')
docsMcastCpeListGrpPrefixLen = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 9, 1, 3), InetAddressPrefixLength())
if mibBuilder.loadTexts: docsMcastCpeListGrpPrefixLen.setStatus('current')
docsMcastCpeListSrcAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 9, 1, 4), InetAddressType())
if mibBuilder.loadTexts: docsMcastCpeListSrcAddrType.setStatus('current')
docsMcastCpeListSrcAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 9, 1, 5), InetAddress())
if mibBuilder.loadTexts: docsMcastCpeListSrcAddr.setStatus('current')
docsMcastCpeListSrcPrefixLen = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 9, 1, 6), InetAddressPrefixLength())
if mibBuilder.loadTexts: docsMcastCpeListSrcPrefixLen.setStatus('current')
docsMcastCpeListCmMacAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 9, 1, 7), MacAddress())
if mibBuilder.loadTexts: docsMcastCpeListCmMacAddr.setStatus('current')
docsMcastCpeListDsid = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 9, 1, 8), Dsid()).setMaxAccess("readonly")
if mibBuilder.loadTexts: docsMcastCpeListDsid.setStatus('current')
docsMcastCpeListCpeMacAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 9, 1, 9), MacAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: docsMcastCpeListCpeMacAddr.setStatus('current')
docsMcastCpeListCpeIpAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 9, 1, 10), InetAddressType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: docsMcastCpeListCpeIpAddrType.setStatus('current')
docsMcastCpeListCpeIpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 9, 1, 11), InetAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: docsMcastCpeListCpeIpAddr.setStatus('current')
docsMcastBandwidthTable = MibTable((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 10), )
if mibBuilder.loadTexts: docsMcastBandwidthTable.setStatus('current')
docsMcastBandwidthEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 10, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"))
if mibBuilder.loadTexts: docsMcastBandwidthEntry.setStatus('current')
docsMcastBandwidthAdmittedAggrBW = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 10, 1, 1), CounterBasedGauge64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: docsMcastBandwidthAdmittedAggrBW.setStatus('current')
docsMcastBandwidthAdmittedAggrLowWater = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 10, 1, 2), CounterBasedGauge64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: docsMcastBandwidthAdmittedAggrLowWater.setStatus('current')
docsMcastBandwidthAdmittedAggrHighWater = MibTableColumn((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 10, 1, 3), CounterBasedGauge64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: docsMcastBandwidthAdmittedAggrHighWater.setStatus('current')
docsMcastMibConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 2))
docsMcastMibCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 2, 1))
docsMcastMibGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 2, 2))
docsMcastCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 2, 1, 1)).setObjects(("DOCS-MCAST-MIB", "docsMcastGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
docsMcastCompliance = docsMcastCompliance.setStatus('current')
docsMcastGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 2, 2, 1)).setObjects(("DOCS-MCAST-MIB", "docsMcastCmtsReplSessDsid"), ("DOCS-MCAST-MIB", "docsMcastCmtsReplSessSaid"), ("DOCS-MCAST-MIB", "docsMcastDefGrpSvcClassDef"), ("DOCS-MCAST-MIB", "docsMcastDsidPhsPhsField"), ("DOCS-MCAST-MIB", "docsMcastDsidPhsPhsMask"), ("DOCS-MCAST-MIB", "docsMcastDsidPhsPhsSize"), ("DOCS-MCAST-MIB", "docsMcastDsidPhsPhsVerify"), ("DOCS-MCAST-MIB", "docsMcastCmtsGrpCfgRulePriority"), ("DOCS-MCAST-MIB", "docsMcastCmtsGrpCfgPrefixAddrType"), ("DOCS-MCAST-MIB", "docsMcastCmtsGrpCfgSrcPrefixAddr"), ("DOCS-MCAST-MIB", "docsMcastCmtsGrpCfgSrcPrefixLen"), ("DOCS-MCAST-MIB", "docsMcastCmtsGrpCfgGrpPrefixAddr"), ("DOCS-MCAST-MIB", "docsMcastCmtsGrpCfgGrpPrefixLen"), ("DOCS-MCAST-MIB", "docsMcastCmtsGrpCfgTosLow"), ("DOCS-MCAST-MIB", "docsMcastCmtsGrpCfgTosHigh"), ("DOCS-MCAST-MIB", "docsMcastCmtsGrpCfgTosMask"), ("DOCS-MCAST-MIB", "docsMcastCmtsGrpCfgQosConfigId"), ("DOCS-MCAST-MIB", "docsMcastCmtsGrpCfgEncryptConfigId"), ("DOCS-MCAST-MIB", "docsMcastCmtsGrpCfgPhsConfigId"), ("DOCS-MCAST-MIB", "docsMcastCmtsGrpCfgRowStatus"), ("DOCS-MCAST-MIB", "docsMcastCmtsGrpQosCfgServiceClassName"), ("DOCS-MCAST-MIB", "docsMcastCmtsGrpQosCfgQosCtrl"), ("DOCS-MCAST-MIB", "docsMcastCmtsGrpQosCfgAggSessLimit"), ("DOCS-MCAST-MIB", "docsMcastCmtsGrpQosCfgAppId"), ("DOCS-MCAST-MIB", "docsMcastCmtsGrpQosCfgRowStatus"), ("DOCS-MCAST-MIB", "docsMcastCmtsGrpEncryptCfgCtrl"), ("DOCS-MCAST-MIB", "docsMcastCmtsGrpEncryptCfgAlg"), ("DOCS-MCAST-MIB", "docsMcastCmtsGrpEncryptCfgRowStatus"), ("DOCS-MCAST-MIB", "docsMcastCmtsGrpPhsCfgPhsField"), ("DOCS-MCAST-MIB", "docsMcastCmtsGrpPhsCfgPhsMask"), ("DOCS-MCAST-MIB", "docsMcastCmtsGrpPhsCfgPhsSize"), ("DOCS-MCAST-MIB", "docsMcastCmtsGrpPhsCfgPhsVerify"), ("DOCS-MCAST-MIB", "docsMcastCmtsGrpPhsCfgRowStatus"), ("DOCS-MCAST-MIB", "docsMcastStatsDroppedPkts"), ("DOCS-MCAST-MIB", "docsMcastStatsDroppedOctets"), ("DOCS-MCAST-MIB", "docsMcastCpeListDsid"), ("DOCS-MCAST-MIB", "docsMcastCpeListCpeMacAddr"), ("DOCS-MCAST-MIB", "docsMcastCpeListCpeIpAddrType"), ("DOCS-MCAST-MIB", "docsMcastCpeListCpeIpAddr"), ("DOCS-MCAST-MIB", "docsMcastBandwidthAdmittedAggrBW"), ("DOCS-MCAST-MIB", "docsMcastBandwidthAdmittedAggrLowWater"), ("DOCS-MCAST-MIB", "docsMcastBandwidthAdmittedAggrHighWater"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
docsMcastGroup = docsMcastGroup.setStatus('current')
mibBuilder.exportSymbols("DOCS-MCAST-MIB", docsMcastCmtsGrpEncryptCfgCtrl=docsMcastCmtsGrpEncryptCfgCtrl, docsMcastCpeListDsid=docsMcastCpeListDsid, docsMcastCmtsReplSessDsid=docsMcastCmtsReplSessDsid, docsMcastDsidPhsDsid=docsMcastDsidPhsDsid, docsMcastDsidPhsPhsMask=docsMcastDsidPhsPhsMask, docsMcastCpeListCmMacAddr=docsMcastCpeListCmMacAddr, docsMcastCmtsGrpEncryptCfgTable=docsMcastCmtsGrpEncryptCfgTable, docsMcastStatsDroppedOctets=docsMcastStatsDroppedOctets, docsMcastCmtsReplSessServiceFlowId=docsMcastCmtsReplSessServiceFlowId, docsMcastCpeListSrcAddrType=docsMcastCpeListSrcAddrType, docsMcastCmtsGrpCfgRowStatus=docsMcastCmtsGrpCfgRowStatus, docsMcastCmtsGrpEncryptCfgAlg=docsMcastCmtsGrpEncryptCfgAlg, docsMcastGroup=docsMcastGroup, docsMcastCmtsReplSessMdIfIndex=docsMcastCmtsReplSessMdIfIndex, docsMcastCmtsGrpCfgTosHigh=docsMcastCmtsGrpCfgTosHigh, docsMcastCmtsGrpEncryptCfgId=docsMcastCmtsGrpEncryptCfgId, docsMcastCmtsGrpCfgQosConfigId=docsMcastCmtsGrpCfgQosConfigId, docsMcastCmtsGrpPhsCfgRowStatus=docsMcastCmtsGrpPhsCfgRowStatus, docsMcastMibObjects=docsMcastMibObjects, docsMcastStatsGrpAddr=docsMcastStatsGrpAddr, docsMcastCmtsGrpQosCfgAppId=docsMcastCmtsGrpQosCfgAppId, docsMcastCmtsGrpQosCfgEntry=docsMcastCmtsGrpQosCfgEntry, docsMcastCpeListGrpPrefixLen=docsMcastCpeListGrpPrefixLen, docsMcastDsidPhsTable=docsMcastDsidPhsTable, docsMcastCmtsReplSessDcsId=docsMcastCmtsReplSessDcsId, docsMcastCmtsGrpPhsCfgPhsSize=docsMcastCmtsGrpPhsCfgPhsSize, docsMcastCmtsGrpCfgGrpPrefixAddr=docsMcastCmtsGrpCfgGrpPrefixAddr, docsMcastCmtsGrpCfgSrcPrefixAddr=docsMcastCmtsGrpCfgSrcPrefixAddr, docsMcastMibGroups=docsMcastMibGroups, docsMcastCmtsReplSessPrefixAddrType=docsMcastCmtsReplSessPrefixAddrType, docsMcastStatsSrcAddrType=docsMcastStatsSrcAddrType, docsMcastCmtsGrpCfgGrpPrefixLen=docsMcastCmtsGrpCfgGrpPrefixLen, docsMcastCmtsGrpCfgPrefixAddrType=docsMcastCmtsGrpCfgPrefixAddrType, docsMcastDsidPhsPhsSize=docsMcastDsidPhsPhsSize, docsMcastCmtsGrpPhsCfgPhsField=docsMcastCmtsGrpPhsCfgPhsField, docsMcastStatsSrcAddr=docsMcastStatsSrcAddr, docsMcastCmtsGrpCfgTosMask=docsMcastCmtsGrpCfgTosMask, docsMcastDsidPhsEntry=docsMcastDsidPhsEntry, docsMcastCmtsReplSessSrcPrefix=docsMcastCmtsReplSessSrcPrefix, docsMcastCmtsGrpCfgRulePriority=docsMcastCmtsGrpCfgRulePriority, docsMcastCmtsGrpQosCfgTable=docsMcastCmtsGrpQosCfgTable, docsMcastCmtsGrpQosCfgServiceClassName=docsMcastCmtsGrpQosCfgServiceClassName, docsMcastMib=docsMcastMib, docsMcastCmtsGrpCfgId=docsMcastCmtsGrpCfgId, docsMcastCmtsGrpPhsCfgId=docsMcastCmtsGrpPhsCfgId, docsMcastCmtsGrpQosCfgId=docsMcastCmtsGrpQosCfgId, docsMcastCmtsReplSessSaid=docsMcastCmtsReplSessSaid, docsMcastCmtsGrpQosCfgRowStatus=docsMcastCmtsGrpQosCfgRowStatus, docsMcastCmtsReplSessEntry=docsMcastCmtsReplSessEntry, docsMcastCmtsGrpEncryptCfgRowStatus=docsMcastCmtsGrpEncryptCfgRowStatus, docsMcastCpeListGrpAddrType=docsMcastCpeListGrpAddrType, docsMcastStatsTable=docsMcastStatsTable, docsMcastDsidPhsPhsField=docsMcastDsidPhsPhsField, docsMcastCmtsGrpQosCfgQosCtrl=docsMcastCmtsGrpQosCfgQosCtrl, docsMcastStatsDroppedPkts=docsMcastStatsDroppedPkts, docsMcastBandwidthAdmittedAggrBW=docsMcastBandwidthAdmittedAggrBW, docsMcastCmtsGrpCfgSrcPrefixLen=docsMcastCmtsGrpCfgSrcPrefixLen, docsMcastCmtsGrpPhsCfgEntry=docsMcastCmtsGrpPhsCfgEntry, docsMcastMibConformance=docsMcastMibConformance, docsMcastCmtsGrpCfgPhsConfigId=docsMcastCmtsGrpCfgPhsConfigId, docsMcastBandwidthEntry=docsMcastBandwidthEntry, docsMcastCmtsReplSessTable=docsMcastCmtsReplSessTable, docsMcastCpeListSrcPrefixLen=docsMcastCpeListSrcPrefixLen, docsMcastCpeListCpeIpAddrType=docsMcastCpeListCpeIpAddrType, docsMcastStatsGrpAddrType=docsMcastStatsGrpAddrType, docsMcastCmtsReplSessGrpPrefix=docsMcastCmtsReplSessGrpPrefix, PYSNMP_MODULE_ID=docsMcastMib, docsMcastCmtsGrpEncryptCfgEntry=docsMcastCmtsGrpEncryptCfgEntry, docsMcastStatsEntry=docsMcastStatsEntry, docsMcastCpeListGrpAddr=docsMcastCpeListGrpAddr, docsMcastCmtsGrpQosCfgAggSessLimit=docsMcastCmtsGrpQosCfgAggSessLimit, docsMcastCpeListSrcAddr=docsMcastCpeListSrcAddr, docsMcastCmtsGrpCfgTable=docsMcastCmtsGrpCfgTable, docsMcastCpeListTable=docsMcastCpeListTable, docsMcastDefGrpSvcClassDef=docsMcastDefGrpSvcClassDef, docsMcastCmtsGrpPhsCfgPhsMask=docsMcastCmtsGrpPhsCfgPhsMask, docsMcastStatsGrpPrefixLen=docsMcastStatsGrpPrefixLen, docsMcastCmtsGrpCfgTosLow=docsMcastCmtsGrpCfgTosLow, docsMcastDsidPhsPhsVerify=docsMcastDsidPhsPhsVerify, docsMcastMibCompliances=docsMcastMibCompliances, docsMcastCompliance=docsMcastCompliance, docsMcastCmtsGrpPhsCfgTable=docsMcastCmtsGrpPhsCfgTable, docsMcastDefGrpSvcClass=docsMcastDefGrpSvcClass, docsMcastCpeListCpeMacAddr=docsMcastCpeListCpeMacAddr, docsMcastBandwidthTable=docsMcastBandwidthTable, docsMcastCmtsGrpPhsCfgPhsVerify=docsMcastCmtsGrpPhsCfgPhsVerify, docsMcastCpeListCpeIpAddr=docsMcastCpeListCpeIpAddr, docsMcastCmtsGrpCfgEntry=docsMcastCmtsGrpCfgEntry, docsMcastBandwidthAdmittedAggrLowWater=docsMcastBandwidthAdmittedAggrLowWater, docsMcastCpeListEntry=docsMcastCpeListEntry, docsMcastStatsSrcPrefixLen=docsMcastStatsSrcPrefixLen, docsMcastBandwidthAdmittedAggrHighWater=docsMcastBandwidthAdmittedAggrHighWater, docsMcastCmtsGrpCfgEncryptConfigId=docsMcastCmtsGrpCfgEncryptConfigId)
| (object_identifier, octet_string, integer) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'OctetString', 'Integer')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(constraints_union, value_size_constraint, single_value_constraint, constraints_intersection, value_range_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsUnion', 'ValueSizeConstraint', 'SingleValueConstraint', 'ConstraintsIntersection', 'ValueRangeConstraint')
(clab_proj_docsis,) = mibBuilder.importSymbols('CLAB-DEF-MIB', 'clabProjDocsis')
(docs_sa_id, docs_bpkm_data_encrypt_alg) = mibBuilder.importSymbols('DOCS-IETF-BPI2-MIB', 'DocsSAId', 'DocsBpkmDataEncryptAlg')
(ch_set_id, dsid) = mibBuilder.importSymbols('DOCS-IF3-MIB', 'ChSetId', 'Dsid')
(counter_based_gauge64,) = mibBuilder.importSymbols('HCNUM-TC', 'CounterBasedGauge64')
(if_index, interface_index) = mibBuilder.importSymbols('IF-MIB', 'ifIndex', 'InterfaceIndex')
(inet_address, inet_address_type, inet_address_prefix_length) = mibBuilder.importSymbols('INET-ADDRESS-MIB', 'InetAddress', 'InetAddressType', 'InetAddressPrefixLength')
(snmp_admin_string,) = mibBuilder.importSymbols('SNMP-FRAMEWORK-MIB', 'SnmpAdminString')
(module_compliance, notification_group, object_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup', 'ObjectGroup')
(counter64, mib_identifier, unsigned32, integer32, counter32, time_ticks, gauge32, ip_address, iso, module_identity, notification_type, bits, mib_scalar, mib_table, mib_table_row, mib_table_column, object_identity) = mibBuilder.importSymbols('SNMPv2-SMI', 'Counter64', 'MibIdentifier', 'Unsigned32', 'Integer32', 'Counter32', 'TimeTicks', 'Gauge32', 'IpAddress', 'iso', 'ModuleIdentity', 'NotificationType', 'Bits', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'ObjectIdentity')
(row_status, mac_address, textual_convention, truth_value, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'RowStatus', 'MacAddress', 'TextualConvention', 'TruthValue', 'DisplayString')
docs_mcast_mib = module_identity((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18))
docsMcastMib.setRevisions(('2015-04-22 00:00', '2014-07-29 00:00', '2007-08-03 00:00', '2006-12-07 17:00'))
if mibBuilder.loadTexts:
docsMcastMib.setLastUpdated('201504220000Z')
if mibBuilder.loadTexts:
docsMcastMib.setOrganization('Cable Television Laboratories, Inc.')
docs_mcast_mib_objects = mib_identifier((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1))
docs_mcast_cmts_grp_cfg_table = mib_table((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 1))
if mibBuilder.loadTexts:
docsMcastCmtsGrpCfgTable.setStatus('current')
docs_mcast_cmts_grp_cfg_entry = mib_table_row((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 1, 1)).setIndexNames((0, 'DOCS-MCAST-MIB', 'docsMcastCmtsGrpCfgId'))
if mibBuilder.loadTexts:
docsMcastCmtsGrpCfgEntry.setStatus('current')
docs_mcast_cmts_grp_cfg_id = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 1, 1, 1), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4294967295)))
if mibBuilder.loadTexts:
docsMcastCmtsGrpCfgId.setStatus('current')
docs_mcast_cmts_grp_cfg_rule_priority = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 1, 1, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
docsMcastCmtsGrpCfgRulePriority.setStatus('current')
docs_mcast_cmts_grp_cfg_prefix_addr_type = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 1, 1, 3), inet_address_type()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
docsMcastCmtsGrpCfgPrefixAddrType.setStatus('current')
docs_mcast_cmts_grp_cfg_src_prefix_addr = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 1, 1, 4), inet_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
docsMcastCmtsGrpCfgSrcPrefixAddr.setStatus('current')
docs_mcast_cmts_grp_cfg_src_prefix_len = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 1, 1, 5), inet_address_prefix_length()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
docsMcastCmtsGrpCfgSrcPrefixLen.setStatus('current')
docs_mcast_cmts_grp_cfg_grp_prefix_addr = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 1, 1, 6), inet_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
docsMcastCmtsGrpCfgGrpPrefixAddr.setStatus('current')
docs_mcast_cmts_grp_cfg_grp_prefix_len = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 1, 1, 7), inet_address_prefix_length()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
docsMcastCmtsGrpCfgGrpPrefixLen.setStatus('current')
docs_mcast_cmts_grp_cfg_tos_low = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 1, 1, 8), octet_string().subtype(subtypeSpec=value_size_constraint(1, 1)).setFixedLength(1)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
docsMcastCmtsGrpCfgTosLow.setStatus('current')
docs_mcast_cmts_grp_cfg_tos_high = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 1, 1, 9), octet_string().subtype(subtypeSpec=value_size_constraint(1, 1)).setFixedLength(1)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
docsMcastCmtsGrpCfgTosHigh.setStatus('current')
docs_mcast_cmts_grp_cfg_tos_mask = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 1, 1, 10), octet_string().subtype(subtypeSpec=value_size_constraint(1, 1)).setFixedLength(1)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
docsMcastCmtsGrpCfgTosMask.setStatus('current')
docs_mcast_cmts_grp_cfg_qos_config_id = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 1, 1, 11), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
docsMcastCmtsGrpCfgQosConfigId.setStatus('current')
docs_mcast_cmts_grp_cfg_encrypt_config_id = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 1, 1, 12), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
docsMcastCmtsGrpCfgEncryptConfigId.setStatus('current')
docs_mcast_cmts_grp_cfg_phs_config_id = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 1, 1, 13), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
docsMcastCmtsGrpCfgPhsConfigId.setStatus('current')
docs_mcast_cmts_grp_cfg_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 1, 1, 14), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
docsMcastCmtsGrpCfgRowStatus.setStatus('current')
docs_mcast_cmts_grp_encrypt_cfg_table = mib_table((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 2))
if mibBuilder.loadTexts:
docsMcastCmtsGrpEncryptCfgTable.setStatus('current')
docs_mcast_cmts_grp_encrypt_cfg_entry = mib_table_row((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 2, 1)).setIndexNames((0, 'DOCS-MCAST-MIB', 'docsMcastCmtsGrpEncryptCfgId'))
if mibBuilder.loadTexts:
docsMcastCmtsGrpEncryptCfgEntry.setStatus('current')
docs_mcast_cmts_grp_encrypt_cfg_id = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 2, 1, 1), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 65535)))
if mibBuilder.loadTexts:
docsMcastCmtsGrpEncryptCfgId.setStatus('current')
docs_mcast_cmts_grp_encrypt_cfg_ctrl = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 2, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('cmts', 1), ('mgmt', 2))).clone('mgmt')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
docsMcastCmtsGrpEncryptCfgCtrl.setStatus('current')
docs_mcast_cmts_grp_encrypt_cfg_alg = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 2, 1, 3), docs_bpkm_data_encrypt_alg().clone('des56CbcMode')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
docsMcastCmtsGrpEncryptCfgAlg.setStatus('current')
docs_mcast_cmts_grp_encrypt_cfg_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 2, 1, 4), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
docsMcastCmtsGrpEncryptCfgRowStatus.setStatus('current')
docs_mcast_cmts_grp_phs_cfg_table = mib_table((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 3))
if mibBuilder.loadTexts:
docsMcastCmtsGrpPhsCfgTable.setStatus('current')
docs_mcast_cmts_grp_phs_cfg_entry = mib_table_row((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 3, 1)).setIndexNames((0, 'DOCS-MCAST-MIB', 'docsMcastCmtsGrpPhsCfgId'))
if mibBuilder.loadTexts:
docsMcastCmtsGrpPhsCfgEntry.setStatus('current')
docs_mcast_cmts_grp_phs_cfg_id = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 3, 1, 1), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 65535)))
if mibBuilder.loadTexts:
docsMcastCmtsGrpPhsCfgId.setStatus('current')
docs_mcast_cmts_grp_phs_cfg_phs_field = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 3, 1, 2), octet_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
docsMcastCmtsGrpPhsCfgPhsField.setStatus('current')
docs_mcast_cmts_grp_phs_cfg_phs_mask = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 3, 1, 3), octet_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
docsMcastCmtsGrpPhsCfgPhsMask.setStatus('current')
docs_mcast_cmts_grp_phs_cfg_phs_size = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 3, 1, 4), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 255))).setUnits('Bytes').setMaxAccess('readcreate')
if mibBuilder.loadTexts:
docsMcastCmtsGrpPhsCfgPhsSize.setStatus('current')
docs_mcast_cmts_grp_phs_cfg_phs_verify = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 3, 1, 5), truth_value().clone('false')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
docsMcastCmtsGrpPhsCfgPhsVerify.setStatus('current')
docs_mcast_cmts_grp_phs_cfg_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 3, 1, 6), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
docsMcastCmtsGrpPhsCfgRowStatus.setStatus('current')
docs_mcast_cmts_grp_qos_cfg_table = mib_table((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 4))
if mibBuilder.loadTexts:
docsMcastCmtsGrpQosCfgTable.setStatus('current')
docs_mcast_cmts_grp_qos_cfg_entry = mib_table_row((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 4, 1)).setIndexNames((0, 'DOCS-MCAST-MIB', 'docsMcastCmtsGrpQosCfgId'))
if mibBuilder.loadTexts:
docsMcastCmtsGrpQosCfgEntry.setStatus('current')
docs_mcast_cmts_grp_qos_cfg_id = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 4, 1, 1), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 65535)))
if mibBuilder.loadTexts:
docsMcastCmtsGrpQosCfgId.setStatus('current')
docs_mcast_cmts_grp_qos_cfg_service_class_name = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 4, 1, 2), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(1, 15)).clone(hexValue='')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
docsMcastCmtsGrpQosCfgServiceClassName.setStatus('current')
docs_mcast_cmts_grp_qos_cfg_qos_ctrl = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 4, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('singleSsession', 1), ('aggregateSession', 2)))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
docsMcastCmtsGrpQosCfgQosCtrl.setStatus('current')
docs_mcast_cmts_grp_qos_cfg_agg_sess_limit = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 4, 1, 4), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 65535))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
docsMcastCmtsGrpQosCfgAggSessLimit.setStatus('current')
docs_mcast_cmts_grp_qos_cfg_app_id = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 4, 1, 5), unsigned32()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
docsMcastCmtsGrpQosCfgAppId.setStatus('current')
docs_mcast_cmts_grp_qos_cfg_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 4, 1, 6), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
docsMcastCmtsGrpQosCfgRowStatus.setStatus('current')
docs_mcast_cmts_repl_sess_table = mib_table((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 5))
if mibBuilder.loadTexts:
docsMcastCmtsReplSessTable.setStatus('current')
docs_mcast_cmts_repl_sess_entry = mib_table_row((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 5, 1)).setIndexNames((0, 'DOCS-MCAST-MIB', 'docsMcastCmtsReplSessPrefixAddrType'), (0, 'DOCS-MCAST-MIB', 'docsMcastCmtsReplSessGrpPrefix'), (0, 'DOCS-MCAST-MIB', 'docsMcastCmtsReplSessSrcPrefix'), (0, 'DOCS-MCAST-MIB', 'docsMcastCmtsReplSessMdIfIndex'), (0, 'DOCS-MCAST-MIB', 'docsMcastCmtsReplSessDcsId'), (0, 'DOCS-MCAST-MIB', 'docsMcastCmtsReplSessServiceFlowId'))
if mibBuilder.loadTexts:
docsMcastCmtsReplSessEntry.setStatus('current')
docs_mcast_cmts_repl_sess_prefix_addr_type = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 5, 1, 1), inet_address_type())
if mibBuilder.loadTexts:
docsMcastCmtsReplSessPrefixAddrType.setStatus('current')
docs_mcast_cmts_repl_sess_grp_prefix = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 5, 1, 2), inet_address())
if mibBuilder.loadTexts:
docsMcastCmtsReplSessGrpPrefix.setStatus('current')
docs_mcast_cmts_repl_sess_src_prefix = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 5, 1, 3), inet_address())
if mibBuilder.loadTexts:
docsMcastCmtsReplSessSrcPrefix.setStatus('current')
docs_mcast_cmts_repl_sess_md_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 5, 1, 4), interface_index())
if mibBuilder.loadTexts:
docsMcastCmtsReplSessMdIfIndex.setStatus('current')
docs_mcast_cmts_repl_sess_dcs_id = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 5, 1, 5), ch_set_id())
if mibBuilder.loadTexts:
docsMcastCmtsReplSessDcsId.setStatus('current')
docs_mcast_cmts_repl_sess_service_flow_id = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 5, 1, 6), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4294967295)))
if mibBuilder.loadTexts:
docsMcastCmtsReplSessServiceFlowId.setStatus('current')
docs_mcast_cmts_repl_sess_dsid = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 5, 1, 7), dsid()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
docsMcastCmtsReplSessDsid.setStatus('current')
docs_mcast_cmts_repl_sess_said = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 5, 1, 8), docs_sa_id()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
docsMcastCmtsReplSessSaid.setStatus('current')
docs_mcast_def_grp_svc_class = mib_identifier((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 6))
docs_mcast_def_grp_svc_class_def = mib_scalar((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 6, 1), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(0, 15)).clone(hexValue='')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
docsMcastDefGrpSvcClassDef.setStatus('current')
docs_mcast_dsid_phs_table = mib_table((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 7))
if mibBuilder.loadTexts:
docsMcastDsidPhsTable.setStatus('current')
docs_mcast_dsid_phs_entry = mib_table_row((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 7, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'), (0, 'DOCS-MCAST-MIB', 'docsMcastDsidPhsDsid'))
if mibBuilder.loadTexts:
docsMcastDsidPhsEntry.setStatus('current')
docs_mcast_dsid_phs_dsid = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 7, 1, 1), dsid())
if mibBuilder.loadTexts:
docsMcastDsidPhsDsid.setStatus('current')
docs_mcast_dsid_phs_phs_field = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 7, 1, 2), octet_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
docsMcastDsidPhsPhsField.setStatus('current')
docs_mcast_dsid_phs_phs_mask = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 7, 1, 3), octet_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
docsMcastDsidPhsPhsMask.setStatus('current')
docs_mcast_dsid_phs_phs_size = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 7, 1, 4), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
docsMcastDsidPhsPhsSize.setStatus('current')
docs_mcast_dsid_phs_phs_verify = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 7, 1, 5), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
docsMcastDsidPhsPhsVerify.setStatus('current')
docs_mcast_stats_table = mib_table((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 8))
if mibBuilder.loadTexts:
docsMcastStatsTable.setStatus('current')
docs_mcast_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 8, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'), (0, 'DOCS-MCAST-MIB', 'docsMcastStatsGrpAddrType'), (0, 'DOCS-MCAST-MIB', 'docsMcastStatsGrpAddr'), (0, 'DOCS-MCAST-MIB', 'docsMcastStatsGrpPrefixLen'), (0, 'DOCS-MCAST-MIB', 'docsMcastStatsSrcAddrType'), (0, 'DOCS-MCAST-MIB', 'docsMcastStatsSrcAddr'), (0, 'DOCS-MCAST-MIB', 'docsMcastStatsSrcPrefixLen'))
if mibBuilder.loadTexts:
docsMcastStatsEntry.setStatus('current')
docs_mcast_stats_grp_addr_type = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 8, 1, 1), inet_address_type())
if mibBuilder.loadTexts:
docsMcastStatsGrpAddrType.setStatus('current')
docs_mcast_stats_grp_addr = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 8, 1, 2), inet_address())
if mibBuilder.loadTexts:
docsMcastStatsGrpAddr.setStatus('current')
docs_mcast_stats_grp_prefix_len = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 8, 1, 3), inet_address_prefix_length())
if mibBuilder.loadTexts:
docsMcastStatsGrpPrefixLen.setStatus('current')
docs_mcast_stats_src_addr_type = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 8, 1, 4), inet_address_type())
if mibBuilder.loadTexts:
docsMcastStatsSrcAddrType.setStatus('current')
docs_mcast_stats_src_addr = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 8, 1, 5), inet_address())
if mibBuilder.loadTexts:
docsMcastStatsSrcAddr.setStatus('current')
docs_mcast_stats_src_prefix_len = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 8, 1, 6), inet_address_prefix_length())
if mibBuilder.loadTexts:
docsMcastStatsSrcPrefixLen.setStatus('current')
docs_mcast_stats_dropped_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 8, 1, 7), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
docsMcastStatsDroppedPkts.setStatus('current')
docs_mcast_stats_dropped_octets = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 8, 1, 8), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
docsMcastStatsDroppedOctets.setStatus('current')
docs_mcast_cpe_list_table = mib_table((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 9))
if mibBuilder.loadTexts:
docsMcastCpeListTable.setStatus('current')
docs_mcast_cpe_list_entry = mib_table_row((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 9, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'), (0, 'DOCS-MCAST-MIB', 'docsMcastCpeListGrpAddrType'), (0, 'DOCS-MCAST-MIB', 'docsMcastCpeListGrpAddr'), (0, 'DOCS-MCAST-MIB', 'docsMcastCpeListGrpPrefixLen'), (0, 'DOCS-MCAST-MIB', 'docsMcastCpeListSrcAddrType'), (0, 'DOCS-MCAST-MIB', 'docsMcastCpeListSrcAddr'), (0, 'DOCS-MCAST-MIB', 'docsMcastCpeListSrcPrefixLen'), (0, 'DOCS-MCAST-MIB', 'docsMcastCpeListCmMacAddr'))
if mibBuilder.loadTexts:
docsMcastCpeListEntry.setStatus('current')
docs_mcast_cpe_list_grp_addr_type = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 9, 1, 1), inet_address_type())
if mibBuilder.loadTexts:
docsMcastCpeListGrpAddrType.setStatus('current')
docs_mcast_cpe_list_grp_addr = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 9, 1, 2), inet_address())
if mibBuilder.loadTexts:
docsMcastCpeListGrpAddr.setStatus('current')
docs_mcast_cpe_list_grp_prefix_len = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 9, 1, 3), inet_address_prefix_length())
if mibBuilder.loadTexts:
docsMcastCpeListGrpPrefixLen.setStatus('current')
docs_mcast_cpe_list_src_addr_type = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 9, 1, 4), inet_address_type())
if mibBuilder.loadTexts:
docsMcastCpeListSrcAddrType.setStatus('current')
docs_mcast_cpe_list_src_addr = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 9, 1, 5), inet_address())
if mibBuilder.loadTexts:
docsMcastCpeListSrcAddr.setStatus('current')
docs_mcast_cpe_list_src_prefix_len = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 9, 1, 6), inet_address_prefix_length())
if mibBuilder.loadTexts:
docsMcastCpeListSrcPrefixLen.setStatus('current')
docs_mcast_cpe_list_cm_mac_addr = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 9, 1, 7), mac_address())
if mibBuilder.loadTexts:
docsMcastCpeListCmMacAddr.setStatus('current')
docs_mcast_cpe_list_dsid = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 9, 1, 8), dsid()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
docsMcastCpeListDsid.setStatus('current')
docs_mcast_cpe_list_cpe_mac_addr = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 9, 1, 9), mac_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
docsMcastCpeListCpeMacAddr.setStatus('current')
docs_mcast_cpe_list_cpe_ip_addr_type = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 9, 1, 10), inet_address_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
docsMcastCpeListCpeIpAddrType.setStatus('current')
docs_mcast_cpe_list_cpe_ip_addr = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 9, 1, 11), inet_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
docsMcastCpeListCpeIpAddr.setStatus('current')
docs_mcast_bandwidth_table = mib_table((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 10))
if mibBuilder.loadTexts:
docsMcastBandwidthTable.setStatus('current')
docs_mcast_bandwidth_entry = mib_table_row((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 10, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'))
if mibBuilder.loadTexts:
docsMcastBandwidthEntry.setStatus('current')
docs_mcast_bandwidth_admitted_aggr_bw = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 10, 1, 1), counter_based_gauge64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
docsMcastBandwidthAdmittedAggrBW.setStatus('current')
docs_mcast_bandwidth_admitted_aggr_low_water = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 10, 1, 2), counter_based_gauge64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
docsMcastBandwidthAdmittedAggrLowWater.setStatus('current')
docs_mcast_bandwidth_admitted_aggr_high_water = mib_table_column((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 1, 10, 1, 3), counter_based_gauge64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
docsMcastBandwidthAdmittedAggrHighWater.setStatus('current')
docs_mcast_mib_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 2))
docs_mcast_mib_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 2, 1))
docs_mcast_mib_groups = mib_identifier((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 2, 2))
docs_mcast_compliance = module_compliance((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 2, 1, 1)).setObjects(('DOCS-MCAST-MIB', 'docsMcastGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
docs_mcast_compliance = docsMcastCompliance.setStatus('current')
docs_mcast_group = object_group((1, 3, 6, 1, 4, 1, 4491, 2, 1, 18, 2, 2, 1)).setObjects(('DOCS-MCAST-MIB', 'docsMcastCmtsReplSessDsid'), ('DOCS-MCAST-MIB', 'docsMcastCmtsReplSessSaid'), ('DOCS-MCAST-MIB', 'docsMcastDefGrpSvcClassDef'), ('DOCS-MCAST-MIB', 'docsMcastDsidPhsPhsField'), ('DOCS-MCAST-MIB', 'docsMcastDsidPhsPhsMask'), ('DOCS-MCAST-MIB', 'docsMcastDsidPhsPhsSize'), ('DOCS-MCAST-MIB', 'docsMcastDsidPhsPhsVerify'), ('DOCS-MCAST-MIB', 'docsMcastCmtsGrpCfgRulePriority'), ('DOCS-MCAST-MIB', 'docsMcastCmtsGrpCfgPrefixAddrType'), ('DOCS-MCAST-MIB', 'docsMcastCmtsGrpCfgSrcPrefixAddr'), ('DOCS-MCAST-MIB', 'docsMcastCmtsGrpCfgSrcPrefixLen'), ('DOCS-MCAST-MIB', 'docsMcastCmtsGrpCfgGrpPrefixAddr'), ('DOCS-MCAST-MIB', 'docsMcastCmtsGrpCfgGrpPrefixLen'), ('DOCS-MCAST-MIB', 'docsMcastCmtsGrpCfgTosLow'), ('DOCS-MCAST-MIB', 'docsMcastCmtsGrpCfgTosHigh'), ('DOCS-MCAST-MIB', 'docsMcastCmtsGrpCfgTosMask'), ('DOCS-MCAST-MIB', 'docsMcastCmtsGrpCfgQosConfigId'), ('DOCS-MCAST-MIB', 'docsMcastCmtsGrpCfgEncryptConfigId'), ('DOCS-MCAST-MIB', 'docsMcastCmtsGrpCfgPhsConfigId'), ('DOCS-MCAST-MIB', 'docsMcastCmtsGrpCfgRowStatus'), ('DOCS-MCAST-MIB', 'docsMcastCmtsGrpQosCfgServiceClassName'), ('DOCS-MCAST-MIB', 'docsMcastCmtsGrpQosCfgQosCtrl'), ('DOCS-MCAST-MIB', 'docsMcastCmtsGrpQosCfgAggSessLimit'), ('DOCS-MCAST-MIB', 'docsMcastCmtsGrpQosCfgAppId'), ('DOCS-MCAST-MIB', 'docsMcastCmtsGrpQosCfgRowStatus'), ('DOCS-MCAST-MIB', 'docsMcastCmtsGrpEncryptCfgCtrl'), ('DOCS-MCAST-MIB', 'docsMcastCmtsGrpEncryptCfgAlg'), ('DOCS-MCAST-MIB', 'docsMcastCmtsGrpEncryptCfgRowStatus'), ('DOCS-MCAST-MIB', 'docsMcastCmtsGrpPhsCfgPhsField'), ('DOCS-MCAST-MIB', 'docsMcastCmtsGrpPhsCfgPhsMask'), ('DOCS-MCAST-MIB', 'docsMcastCmtsGrpPhsCfgPhsSize'), ('DOCS-MCAST-MIB', 'docsMcastCmtsGrpPhsCfgPhsVerify'), ('DOCS-MCAST-MIB', 'docsMcastCmtsGrpPhsCfgRowStatus'), ('DOCS-MCAST-MIB', 'docsMcastStatsDroppedPkts'), ('DOCS-MCAST-MIB', 'docsMcastStatsDroppedOctets'), ('DOCS-MCAST-MIB', 'docsMcastCpeListDsid'), ('DOCS-MCAST-MIB', 'docsMcastCpeListCpeMacAddr'), ('DOCS-MCAST-MIB', 'docsMcastCpeListCpeIpAddrType'), ('DOCS-MCAST-MIB', 'docsMcastCpeListCpeIpAddr'), ('DOCS-MCAST-MIB', 'docsMcastBandwidthAdmittedAggrBW'), ('DOCS-MCAST-MIB', 'docsMcastBandwidthAdmittedAggrLowWater'), ('DOCS-MCAST-MIB', 'docsMcastBandwidthAdmittedAggrHighWater'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
docs_mcast_group = docsMcastGroup.setStatus('current')
mibBuilder.exportSymbols('DOCS-MCAST-MIB', docsMcastCmtsGrpEncryptCfgCtrl=docsMcastCmtsGrpEncryptCfgCtrl, docsMcastCpeListDsid=docsMcastCpeListDsid, docsMcastCmtsReplSessDsid=docsMcastCmtsReplSessDsid, docsMcastDsidPhsDsid=docsMcastDsidPhsDsid, docsMcastDsidPhsPhsMask=docsMcastDsidPhsPhsMask, docsMcastCpeListCmMacAddr=docsMcastCpeListCmMacAddr, docsMcastCmtsGrpEncryptCfgTable=docsMcastCmtsGrpEncryptCfgTable, docsMcastStatsDroppedOctets=docsMcastStatsDroppedOctets, docsMcastCmtsReplSessServiceFlowId=docsMcastCmtsReplSessServiceFlowId, docsMcastCpeListSrcAddrType=docsMcastCpeListSrcAddrType, docsMcastCmtsGrpCfgRowStatus=docsMcastCmtsGrpCfgRowStatus, docsMcastCmtsGrpEncryptCfgAlg=docsMcastCmtsGrpEncryptCfgAlg, docsMcastGroup=docsMcastGroup, docsMcastCmtsReplSessMdIfIndex=docsMcastCmtsReplSessMdIfIndex, docsMcastCmtsGrpCfgTosHigh=docsMcastCmtsGrpCfgTosHigh, docsMcastCmtsGrpEncryptCfgId=docsMcastCmtsGrpEncryptCfgId, docsMcastCmtsGrpCfgQosConfigId=docsMcastCmtsGrpCfgQosConfigId, docsMcastCmtsGrpPhsCfgRowStatus=docsMcastCmtsGrpPhsCfgRowStatus, docsMcastMibObjects=docsMcastMibObjects, docsMcastStatsGrpAddr=docsMcastStatsGrpAddr, docsMcastCmtsGrpQosCfgAppId=docsMcastCmtsGrpQosCfgAppId, docsMcastCmtsGrpQosCfgEntry=docsMcastCmtsGrpQosCfgEntry, docsMcastCpeListGrpPrefixLen=docsMcastCpeListGrpPrefixLen, docsMcastDsidPhsTable=docsMcastDsidPhsTable, docsMcastCmtsReplSessDcsId=docsMcastCmtsReplSessDcsId, docsMcastCmtsGrpPhsCfgPhsSize=docsMcastCmtsGrpPhsCfgPhsSize, docsMcastCmtsGrpCfgGrpPrefixAddr=docsMcastCmtsGrpCfgGrpPrefixAddr, docsMcastCmtsGrpCfgSrcPrefixAddr=docsMcastCmtsGrpCfgSrcPrefixAddr, docsMcastMibGroups=docsMcastMibGroups, docsMcastCmtsReplSessPrefixAddrType=docsMcastCmtsReplSessPrefixAddrType, docsMcastStatsSrcAddrType=docsMcastStatsSrcAddrType, docsMcastCmtsGrpCfgGrpPrefixLen=docsMcastCmtsGrpCfgGrpPrefixLen, docsMcastCmtsGrpCfgPrefixAddrType=docsMcastCmtsGrpCfgPrefixAddrType, docsMcastDsidPhsPhsSize=docsMcastDsidPhsPhsSize, docsMcastCmtsGrpPhsCfgPhsField=docsMcastCmtsGrpPhsCfgPhsField, docsMcastStatsSrcAddr=docsMcastStatsSrcAddr, docsMcastCmtsGrpCfgTosMask=docsMcastCmtsGrpCfgTosMask, docsMcastDsidPhsEntry=docsMcastDsidPhsEntry, docsMcastCmtsReplSessSrcPrefix=docsMcastCmtsReplSessSrcPrefix, docsMcastCmtsGrpCfgRulePriority=docsMcastCmtsGrpCfgRulePriority, docsMcastCmtsGrpQosCfgTable=docsMcastCmtsGrpQosCfgTable, docsMcastCmtsGrpQosCfgServiceClassName=docsMcastCmtsGrpQosCfgServiceClassName, docsMcastMib=docsMcastMib, docsMcastCmtsGrpCfgId=docsMcastCmtsGrpCfgId, docsMcastCmtsGrpPhsCfgId=docsMcastCmtsGrpPhsCfgId, docsMcastCmtsGrpQosCfgId=docsMcastCmtsGrpQosCfgId, docsMcastCmtsReplSessSaid=docsMcastCmtsReplSessSaid, docsMcastCmtsGrpQosCfgRowStatus=docsMcastCmtsGrpQosCfgRowStatus, docsMcastCmtsReplSessEntry=docsMcastCmtsReplSessEntry, docsMcastCmtsGrpEncryptCfgRowStatus=docsMcastCmtsGrpEncryptCfgRowStatus, docsMcastCpeListGrpAddrType=docsMcastCpeListGrpAddrType, docsMcastStatsTable=docsMcastStatsTable, docsMcastDsidPhsPhsField=docsMcastDsidPhsPhsField, docsMcastCmtsGrpQosCfgQosCtrl=docsMcastCmtsGrpQosCfgQosCtrl, docsMcastStatsDroppedPkts=docsMcastStatsDroppedPkts, docsMcastBandwidthAdmittedAggrBW=docsMcastBandwidthAdmittedAggrBW, docsMcastCmtsGrpCfgSrcPrefixLen=docsMcastCmtsGrpCfgSrcPrefixLen, docsMcastCmtsGrpPhsCfgEntry=docsMcastCmtsGrpPhsCfgEntry, docsMcastMibConformance=docsMcastMibConformance, docsMcastCmtsGrpCfgPhsConfigId=docsMcastCmtsGrpCfgPhsConfigId, docsMcastBandwidthEntry=docsMcastBandwidthEntry, docsMcastCmtsReplSessTable=docsMcastCmtsReplSessTable, docsMcastCpeListSrcPrefixLen=docsMcastCpeListSrcPrefixLen, docsMcastCpeListCpeIpAddrType=docsMcastCpeListCpeIpAddrType, docsMcastStatsGrpAddrType=docsMcastStatsGrpAddrType, docsMcastCmtsReplSessGrpPrefix=docsMcastCmtsReplSessGrpPrefix, PYSNMP_MODULE_ID=docsMcastMib, docsMcastCmtsGrpEncryptCfgEntry=docsMcastCmtsGrpEncryptCfgEntry, docsMcastStatsEntry=docsMcastStatsEntry, docsMcastCpeListGrpAddr=docsMcastCpeListGrpAddr, docsMcastCmtsGrpQosCfgAggSessLimit=docsMcastCmtsGrpQosCfgAggSessLimit, docsMcastCpeListSrcAddr=docsMcastCpeListSrcAddr, docsMcastCmtsGrpCfgTable=docsMcastCmtsGrpCfgTable, docsMcastCpeListTable=docsMcastCpeListTable, docsMcastDefGrpSvcClassDef=docsMcastDefGrpSvcClassDef, docsMcastCmtsGrpPhsCfgPhsMask=docsMcastCmtsGrpPhsCfgPhsMask, docsMcastStatsGrpPrefixLen=docsMcastStatsGrpPrefixLen, docsMcastCmtsGrpCfgTosLow=docsMcastCmtsGrpCfgTosLow, docsMcastDsidPhsPhsVerify=docsMcastDsidPhsPhsVerify, docsMcastMibCompliances=docsMcastMibCompliances, docsMcastCompliance=docsMcastCompliance, docsMcastCmtsGrpPhsCfgTable=docsMcastCmtsGrpPhsCfgTable, docsMcastDefGrpSvcClass=docsMcastDefGrpSvcClass, docsMcastCpeListCpeMacAddr=docsMcastCpeListCpeMacAddr, docsMcastBandwidthTable=docsMcastBandwidthTable, docsMcastCmtsGrpPhsCfgPhsVerify=docsMcastCmtsGrpPhsCfgPhsVerify, docsMcastCpeListCpeIpAddr=docsMcastCpeListCpeIpAddr, docsMcastCmtsGrpCfgEntry=docsMcastCmtsGrpCfgEntry, docsMcastBandwidthAdmittedAggrLowWater=docsMcastBandwidthAdmittedAggrLowWater, docsMcastCpeListEntry=docsMcastCpeListEntry, docsMcastStatsSrcPrefixLen=docsMcastStatsSrcPrefixLen, docsMcastBandwidthAdmittedAggrHighWater=docsMcastBandwidthAdmittedAggrHighWater, docsMcastCmtsGrpCfgEncryptConfigId=docsMcastCmtsGrpCfgEncryptConfigId) |
def square(x):
return x*x
print(type(square))
print(id(square))
print(str(square)) | def square(x):
return x * x
print(type(square))
print(id(square))
print(str(square)) |
#
# PySNMP MIB module CISCO-VOICE-ATM-DIAL-CONTROL-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-VOICE-ATM-DIAL-CONTROL-MIB
# Produced by pysmi-0.3.4 at Wed May 1 12:19:12 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueSizeConstraint, SingleValueConstraint, ConstraintsUnion, ConstraintsIntersection, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "SingleValueConstraint", "ConstraintsUnion", "ConstraintsIntersection", "ValueRangeConstraint")
cCallHistoryIndex, = mibBuilder.importSymbols("CISCO-DIAL-CONTROL-MIB", "cCallHistoryIndex")
ciscoExperiment, = mibBuilder.importSymbols("CISCO-SMI", "ciscoExperiment")
CvcSpeechCoderRate, CvcInBandSignaling, CvcGUid, CvcFaxTransmitRate = mibBuilder.importSymbols("CISCO-VOICE-COMMON-DIAL-CONTROL-MIB", "CvcSpeechCoderRate", "CvcInBandSignaling", "CvcGUid", "CvcFaxTransmitRate")
callActiveSetupTime, callActiveIndex = mibBuilder.importSymbols("DIAL-CONTROL-MIB", "callActiveSetupTime", "callActiveIndex")
ifIndex, = mibBuilder.importSymbols("IF-MIB", "ifIndex")
ObjectGroup, NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "ObjectGroup", "NotificationGroup", "ModuleCompliance")
NotificationType, Bits, Counter64, ObjectIdentity, IpAddress, MibIdentifier, MibScalar, MibTable, MibTableRow, MibTableColumn, Gauge32, iso, ModuleIdentity, Counter32, TimeTicks, Integer32, Unsigned32 = mibBuilder.importSymbols("SNMPv2-SMI", "NotificationType", "Bits", "Counter64", "ObjectIdentity", "IpAddress", "MibIdentifier", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Gauge32", "iso", "ModuleIdentity", "Counter32", "TimeTicks", "Integer32", "Unsigned32")
DisplayString, TruthValue, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TruthValue", "TextualConvention")
ciscoVoiceAtmDialControlMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 9, 10, 35))
ciscoVoiceAtmDialControlMIB.setRevisions(('2002-11-17 00:00', '1999-03-20 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: ciscoVoiceAtmDialControlMIB.setRevisionsDescriptions(('Modify the following objects: [1] Add a new enum definition in CvAtmSessionProtocol [2] Change the default value in cvAtmPeerCfgInBandSignaling ', 'Add new objects for handling the following: [1] Call History object ids 6-17 to bring MIB inline with stored Call History record. [2] Added Call Active Entry objects [3] Added Dialpeer Objects for VoATM ',))
if mibBuilder.loadTexts: ciscoVoiceAtmDialControlMIB.setLastUpdated('200211170000Z')
if mibBuilder.loadTexts: ciscoVoiceAtmDialControlMIB.setOrganization('Cisco Systems, Inc.')
if mibBuilder.loadTexts: ciscoVoiceAtmDialControlMIB.setContactInfo(' Cisco Systems Customer Service Postal: 170 W. Tasman Drive San Jose, CA 95134 USA Tel: +1 800 553-NETS E-mail: [email protected]')
if mibBuilder.loadTexts: ciscoVoiceAtmDialControlMIB.setDescription('This MIB module enhances the IETF Dial Control MIB (RFC2128) by providing ATM management information over a data network.')
ciscoVoiceAtmDialControlMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 35, 1))
cvAtmCallHistory = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 1))
cvAtmCallActive = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 2))
cvAtmDialPeer = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 3))
class CvAtmSessionProtocol(TextualConvention, Integer32):
description = 'Represents a Session Protocol used by Voice calls between a local and remote router via the ATM backbone. other - none of the following. ciscoSwitched - cisco proprietary ATM session protocol. '
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3))
namedValues = NamedValues(("other", 1), ("ciscoSwitched", 2), ("aal2Trunk", 3))
cvAtmCallHistoryTable = MibTable((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 1, 1), )
if mibBuilder.loadTexts: cvAtmCallHistoryTable.setStatus('current')
if mibBuilder.loadTexts: cvAtmCallHistoryTable.setDescription('This table is the ATM extension to the call history table of IETF Dial Control MIB. It contains ATM call leg information about specific voice over ATM call.')
cvAtmCallHistoryEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 1, 1, 1), ).setIndexNames((0, "CISCO-DIAL-CONTROL-MIB", "cCallHistoryIndex"))
if mibBuilder.loadTexts: cvAtmCallHistoryEntry.setStatus('current')
if mibBuilder.loadTexts: cvAtmCallHistoryEntry.setDescription('The information regarding a single ATM call leg. An entry of this table is created when its associated call history entry in the IETF Dial Control MIB is created and the call history entry contains information for the call establishment to the peer on the data network backbone via a voice over ATM peer. Th the IETF Dial Control MIB is deleted.')
cvAtmCallHistoryConnectionId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 1, 1, 1, 1), CvcGUid()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cvAtmCallHistoryConnectionId.setStatus('current')
if mibBuilder.loadTexts: cvAtmCallHistoryConnectionId.setDescription('The global call identifier for the ATM call.')
cvAtmCallHistoryVpi = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 1, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4095))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cvAtmCallHistoryVpi.setStatus('current')
if mibBuilder.loadTexts: cvAtmCallHistoryVpi.setDescription('The VPI used for this ATM connection.')
cvAtmCallHistoryVci = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 1, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cvAtmCallHistoryVci.setStatus('current')
if mibBuilder.loadTexts: cvAtmCallHistoryVci.setDescription('The VCI used for this ATM connection.')
cvAtmCallHistoryLowerIfName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 1, 1, 1, 4), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cvAtmCallHistoryLowerIfName.setStatus('current')
if mibBuilder.loadTexts: cvAtmCallHistoryLowerIfName.setDescription('The ifName of the ATM interface associated with this call.')
cvAtmCallHistorySessionTarget = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 1, 1, 1, 5), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cvAtmCallHistorySessionTarget.setStatus('current')
if mibBuilder.loadTexts: cvAtmCallHistorySessionTarget.setDescription('The object indicates the session target of the peer that was used for the voice over ATM call. A zero length string indicates that the value is unavailable.')
cvAtmCallHistorySubchannelID = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 1, 1, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cvAtmCallHistorySubchannelID.setStatus('current')
if mibBuilder.loadTexts: cvAtmCallHistorySubchannelID.setDescription('The subchannel used for this ATM connection.')
cvAtmCallHistorySessionProtocol = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 1, 1, 1, 7), CvAtmSessionProtocol()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cvAtmCallHistorySessionProtocol.setStatus('current')
if mibBuilder.loadTexts: cvAtmCallHistorySessionProtocol.setDescription('Indicates the session protocol used on this call.')
cvAtmCallHistoryCalledNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 1, 1, 1, 8), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cvAtmCallHistoryCalledNumber.setStatus('current')
if mibBuilder.loadTexts: cvAtmCallHistoryCalledNumber.setDescription('Indicates the called party number for trunk connection calls. A zero length string indicates that this data is unavailable.')
cvAtmCallHistoryDtmfRelay = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 1, 1, 1, 9), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cvAtmCallHistoryDtmfRelay.setStatus('current')
if mibBuilder.loadTexts: cvAtmCallHistoryDtmfRelay.setDescription('Indicates if Dtmf Relay was enabled for the call.')
cvAtmCallHistoryUseSeqNumbers = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 1, 1, 1, 10), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cvAtmCallHistoryUseSeqNumbers.setStatus('current')
if mibBuilder.loadTexts: cvAtmCallHistoryUseSeqNumbers.setDescription('Indicates if Sequence Numbers were used on the voice data packets.')
cvAtmCallActiveTable = MibTable((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 2, 1), )
if mibBuilder.loadTexts: cvAtmCallActiveTable.setStatus('current')
if mibBuilder.loadTexts: cvAtmCallActiveTable.setDescription('This table is the ATM extension to the active call table of IETF Dial Control MIB. It contains ATM call leg information about specific voice over ATM call.')
cvAtmCallActiveEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 2, 1, 1), ).setIndexNames((0, "DIAL-CONTROL-MIB", "callActiveSetupTime"), (0, "DIAL-CONTROL-MIB", "callActiveIndex"))
if mibBuilder.loadTexts: cvAtmCallActiveEntry.setStatus('current')
if mibBuilder.loadTexts: cvAtmCallActiveEntry.setDescription('The information regarding a single ATM call leg. An entry of this table is created when its associated call active entry in the IETF Dial Control MIB is created. The call active entry contains information for the call establishment to the peer on the data network backbone via a voice over ATM peer. The entry is deleted when its associated call active entry in the IETF Dial Control MIB is deleted.')
cvAtmCallActiveConnectionId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 2, 1, 1, 1), CvcGUid()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cvAtmCallActiveConnectionId.setStatus('current')
if mibBuilder.loadTexts: cvAtmCallActiveConnectionId.setDescription('The global call identifier for the ATM call.')
cvAtmCallActiveVpi = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 2, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4095))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cvAtmCallActiveVpi.setStatus('current')
if mibBuilder.loadTexts: cvAtmCallActiveVpi.setDescription('The VPI used for this ATM connection.')
cvAtmCallActiveVci = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 2, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cvAtmCallActiveVci.setStatus('current')
if mibBuilder.loadTexts: cvAtmCallActiveVci.setDescription('The VCI used for this ATM connection.')
cvAtmCallActiveLowerIfName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 2, 1, 1, 4), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cvAtmCallActiveLowerIfName.setStatus('current')
if mibBuilder.loadTexts: cvAtmCallActiveLowerIfName.setDescription('The ifName of the ATM interface associated with this call.')
cvAtmCallActiveSessionTarget = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 2, 1, 1, 5), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cvAtmCallActiveSessionTarget.setStatus('current')
if mibBuilder.loadTexts: cvAtmCallActiveSessionTarget.setDescription('The object indicates the session target of the peer that is used for the voice over ATM call. A null string indicates that the value is unavailable.')
cvAtmCallActiveSubchannelID = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 2, 1, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cvAtmCallActiveSubchannelID.setStatus('current')
if mibBuilder.loadTexts: cvAtmCallActiveSubchannelID.setDescription('The subchannel used for this ATM connection.')
cvAtmCallActiveSessionProtocol = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 2, 1, 1, 7), CvAtmSessionProtocol()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cvAtmCallActiveSessionProtocol.setStatus('current')
if mibBuilder.loadTexts: cvAtmCallActiveSessionProtocol.setDescription('Indicates the session protocol being used on this call.')
cvAtmCallActiveCalledNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 2, 1, 1, 8), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cvAtmCallActiveCalledNumber.setStatus('current')
if mibBuilder.loadTexts: cvAtmCallActiveCalledNumber.setDescription('Indicates the called party number for trunk connection calls. A null string indicates that this data is unavailable.')
cvAtmCallActiveDtmfRelay = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 2, 1, 1, 9), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cvAtmCallActiveDtmfRelay.setStatus('current')
if mibBuilder.loadTexts: cvAtmCallActiveDtmfRelay.setDescription('Indicates if Dtmf Relay is enabled for the call.')
cvAtmCallActiveUseSeqNumbers = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 2, 1, 1, 10), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cvAtmCallActiveUseSeqNumbers.setStatus('current')
if mibBuilder.loadTexts: cvAtmCallActiveUseSeqNumbers.setDescription('Indicates if Sequence Numbers are used on the voice data packets.')
cvAtmPeerCfgTable = MibTable((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 3, 1), )
if mibBuilder.loadTexts: cvAtmPeerCfgTable.setStatus('current')
if mibBuilder.loadTexts: cvAtmPeerCfgTable.setDescription('The table contains the Voice over ATM (ATM) peer specific information that is required to accept or place voice calls via the ATM backbone with the session protocol specified in cvAtmPeerCfgSessionProtocol.')
cvAtmPeerCfgEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 3, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"))
if mibBuilder.loadTexts: cvAtmPeerCfgEntry.setStatus('current')
if mibBuilder.loadTexts: cvAtmPeerCfgEntry.setDescription("A single ATM specific Peer. One entry per ATM encapsulation. The entry is created when its associated 'voiceOverATM(152)' encapsulation ifEntry is created. This entry is deleted when its associated ifEntry is deleted.")
cvAtmPeerCfgSessionProtocol = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 3, 1, 1, 1), CvAtmSessionProtocol().clone('ciscoSwitched')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cvAtmPeerCfgSessionProtocol.setStatus('current')
if mibBuilder.loadTexts: cvAtmPeerCfgSessionProtocol.setDescription('The object specifies the session protocol to be used for Internet call between local and remote router via ATM backbone.')
cvAtmPeerCfgInterfaceName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 3, 1, 1, 2), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cvAtmPeerCfgInterfaceName.setStatus('current')
if mibBuilder.loadTexts: cvAtmPeerCfgInterfaceName.setDescription('The object specifies the ifName on which the call will go out. A zero length string indicates that no interface has been assigned.')
cvAtmPeerCfgVpi = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 3, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4095))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cvAtmPeerCfgVpi.setStatus('current')
if mibBuilder.loadTexts: cvAtmPeerCfgVpi.setDescription('The VPI used for this ATM connection.')
cvAtmPeerCfgVci = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 3, 1, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cvAtmPeerCfgVci.setStatus('current')
if mibBuilder.loadTexts: cvAtmPeerCfgVci.setDescription('The VCI used for this ATM connection.')
cvAtmPeerCfgVcName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 3, 1, 1, 5), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cvAtmPeerCfgVcName.setStatus('current')
if mibBuilder.loadTexts: cvAtmPeerCfgVcName.setDescription('The VC Name used for this ATM connection.')
cvAtmPeerCfgCoderRate = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 3, 1, 1, 6), CvcSpeechCoderRate().clone('g729Ar8000')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cvAtmPeerCfgCoderRate.setStatus('current')
if mibBuilder.loadTexts: cvAtmPeerCfgCoderRate.setDescription('This object specifies the default voice coder rate of speech for the ATM peer.')
cvAtmPeerCfgCodecBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 3, 1, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 240)).clone(30)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cvAtmPeerCfgCodecBytes.setStatus('current')
if mibBuilder.loadTexts: cvAtmPeerCfgCodecBytes.setDescription('This object specifies the payload size for the voice packets to be transmitted during the call.')
cvAtmPeerCfgFaxRate = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 3, 1, 1, 8), CvcFaxTransmitRate().clone('voiceRate')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cvAtmPeerCfgFaxRate.setStatus('current')
if mibBuilder.loadTexts: cvAtmPeerCfgFaxRate.setDescription("This object specifies the default transmit rate of FAX for the ATM peer. If the value of this object is 'none', then the Fax relay feature is disabled; otherwise the Fax relay feature is enabled.")
cvAtmPeerCfgFaxBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 3, 1, 1, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 240)).clone(30)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cvAtmPeerCfgFaxBytes.setStatus('current')
if mibBuilder.loadTexts: cvAtmPeerCfgFaxBytes.setDescription('This object specifies the payload size for the fax packets to be transmitted during the call.')
cvAtmPeerCfgInBandSignaling = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 3, 1, 1, 10), CvcInBandSignaling().clone('cas')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cvAtmPeerCfgInBandSignaling.setStatus('current')
if mibBuilder.loadTexts: cvAtmPeerCfgInBandSignaling.setDescription('This object specifies the type of in-band signaling used between the two end points of the call and is used by the router to determine how to interpret the ABCD signaling bits sent as part of the voice payload data.')
cvAtmPeerCfgVADEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 3, 1, 1, 11), TruthValue().clone('true')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cvAtmPeerCfgVADEnable.setStatus('current')
if mibBuilder.loadTexts: cvAtmPeerCfgVADEnable.setDescription("This object specifies whether or not VAD (Voice Activity Detection) is enabled. If the object value is 'false', then the voice data is continuously transmitted to ATM backbone.")
cvAtmPeerCfgUseSeqNumbers = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 3, 1, 1, 12), TruthValue().clone('false')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cvAtmPeerCfgUseSeqNumbers.setStatus('current')
if mibBuilder.loadTexts: cvAtmPeerCfgUseSeqNumbers.setDescription('This object specifies whether or not Sequence Numbers are generated on voice packets.')
cvAtmPeerCfgDtmfRelay = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 3, 1, 1, 13), TruthValue().clone('false')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cvAtmPeerCfgDtmfRelay.setStatus('current')
if mibBuilder.loadTexts: cvAtmPeerCfgDtmfRelay.setDescription('This object specifies whether or not Dtmf Relay is enabled. If it is then dtmf digits are transported as FRF11 Annex C packets, instead of being encoded as speech.')
ciscoVoiceAtmDialControlMIBNotificationPrefix = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 35, 2))
ciscoVoiceAtmDialControlMIBNotifications = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 35, 2, 0))
ciscoVoiceAtmDialControlMIBConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 35, 3))
ciscoVoiceAtmDialControlMIBCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 35, 3, 1))
ciscoVoiceAtmDialControlMIBGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 35, 3, 2))
ciscoVoiceAtmDialControlMIBCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 10, 35, 3, 1, 1)).setObjects(("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmCallHistoryGroup"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmCallActiveGroup"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmPeerCfgGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ciscoVoiceAtmDialControlMIBCompliance = ciscoVoiceAtmDialControlMIBCompliance.setStatus('current')
if mibBuilder.loadTexts: ciscoVoiceAtmDialControlMIBCompliance.setDescription('The compliance statement for entities which implement the CISCO VOICE ATM DIAL CONTROL MIB')
cvAtmCallHistoryGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 10, 35, 3, 2, 1)).setObjects(("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmCallHistoryConnectionId"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmCallHistoryVpi"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmCallHistoryVci"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmCallHistoryLowerIfName"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmCallHistorySessionTarget"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmCallHistorySubchannelID"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmCallHistorySessionProtocol"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmCallHistoryCalledNumber"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmCallHistoryDtmfRelay"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmCallHistoryUseSeqNumbers"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cvAtmCallHistoryGroup = cvAtmCallHistoryGroup.setStatus('current')
if mibBuilder.loadTexts: cvAtmCallHistoryGroup.setDescription('A collection of objects providing the ATM Call History entry capability.')
cvAtmCallActiveGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 10, 35, 3, 2, 2)).setObjects(("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmCallActiveConnectionId"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmCallActiveVpi"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmCallActiveVci"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmCallActiveLowerIfName"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmCallActiveSessionTarget"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmCallActiveSubchannelID"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmCallActiveSessionProtocol"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmCallActiveCalledNumber"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmCallActiveDtmfRelay"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmCallActiveUseSeqNumbers"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cvAtmCallActiveGroup = cvAtmCallActiveGroup.setStatus('current')
if mibBuilder.loadTexts: cvAtmCallActiveGroup.setDescription('A collection of objects providing the ATM Call Active entry capability.')
cvAtmPeerCfgGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 10, 35, 3, 2, 3)).setObjects(("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmPeerCfgSessionProtocol"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmPeerCfgInterfaceName"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmPeerCfgVpi"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmPeerCfgVci"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmPeerCfgVcName"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmPeerCfgCoderRate"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmPeerCfgCodecBytes"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmPeerCfgFaxRate"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmPeerCfgFaxBytes"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmPeerCfgInBandSignaling"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmPeerCfgVADEnable"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmPeerCfgUseSeqNumbers"), ("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", "cvAtmPeerCfgDtmfRelay"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cvAtmPeerCfgGroup = cvAtmPeerCfgGroup.setStatus('current')
if mibBuilder.loadTexts: cvAtmPeerCfgGroup.setDescription('A collection of objects providing the ATM Dialpeer capability. These objects have been implemented as read-only.')
mibBuilder.exportSymbols("CISCO-VOICE-ATM-DIAL-CONTROL-MIB", cvAtmPeerCfgFaxRate=cvAtmPeerCfgFaxRate, cvAtmCallActiveSessionTarget=cvAtmCallActiveSessionTarget, cvAtmCallHistoryGroup=cvAtmCallHistoryGroup, cvAtmCallHistoryUseSeqNumbers=cvAtmCallHistoryUseSeqNumbers, ciscoVoiceAtmDialControlMIBConformance=ciscoVoiceAtmDialControlMIBConformance, cvAtmPeerCfgGroup=cvAtmPeerCfgGroup, cvAtmCallHistoryVpi=cvAtmCallHistoryVpi, cvAtmCallActiveVpi=cvAtmCallActiveVpi, cvAtmCallActiveDtmfRelay=cvAtmCallActiveDtmfRelay, cvAtmCallHistorySessionTarget=cvAtmCallHistorySessionTarget, cvAtmCallActiveSubchannelID=cvAtmCallActiveSubchannelID, cvAtmCallHistoryEntry=cvAtmCallHistoryEntry, cvAtmCallActiveUseSeqNumbers=cvAtmCallActiveUseSeqNumbers, cvAtmPeerCfgTable=cvAtmPeerCfgTable, cvAtmCallHistoryConnectionId=cvAtmCallHistoryConnectionId, cvAtmCallActiveSessionProtocol=cvAtmCallActiveSessionProtocol, cvAtmCallActive=cvAtmCallActive, cvAtmPeerCfgVci=cvAtmPeerCfgVci, ciscoVoiceAtmDialControlMIBNotifications=ciscoVoiceAtmDialControlMIBNotifications, cvAtmCallActiveLowerIfName=cvAtmCallActiveLowerIfName, cvAtmCallHistoryTable=cvAtmCallHistoryTable, cvAtmCallActiveEntry=cvAtmCallActiveEntry, cvAtmCallActiveCalledNumber=cvAtmCallActiveCalledNumber, cvAtmPeerCfgInterfaceName=cvAtmPeerCfgInterfaceName, cvAtmCallActiveTable=cvAtmCallActiveTable, ciscoVoiceAtmDialControlMIB=ciscoVoiceAtmDialControlMIB, cvAtmCallHistorySessionProtocol=cvAtmCallHistorySessionProtocol, cvAtmPeerCfgVcName=cvAtmPeerCfgVcName, cvAtmCallHistoryDtmfRelay=cvAtmCallHistoryDtmfRelay, ciscoVoiceAtmDialControlMIBCompliance=ciscoVoiceAtmDialControlMIBCompliance, cvAtmPeerCfgEntry=cvAtmPeerCfgEntry, cvAtmPeerCfgCoderRate=cvAtmPeerCfgCoderRate, ciscoVoiceAtmDialControlMIBObjects=ciscoVoiceAtmDialControlMIBObjects, cvAtmCallActiveConnectionId=cvAtmCallActiveConnectionId, cvAtmPeerCfgSessionProtocol=cvAtmPeerCfgSessionProtocol, CvAtmSessionProtocol=CvAtmSessionProtocol, cvAtmDialPeer=cvAtmDialPeer, cvAtmPeerCfgInBandSignaling=cvAtmPeerCfgInBandSignaling, cvAtmPeerCfgFaxBytes=cvAtmPeerCfgFaxBytes, cvAtmPeerCfgVpi=cvAtmPeerCfgVpi, cvAtmCallHistoryVci=cvAtmCallHistoryVci, cvAtmPeerCfgUseSeqNumbers=cvAtmPeerCfgUseSeqNumbers, cvAtmPeerCfgVADEnable=cvAtmPeerCfgVADEnable, cvAtmPeerCfgDtmfRelay=cvAtmPeerCfgDtmfRelay, cvAtmCallActiveVci=cvAtmCallActiveVci, cvAtmCallHistoryCalledNumber=cvAtmCallHistoryCalledNumber, ciscoVoiceAtmDialControlMIBNotificationPrefix=ciscoVoiceAtmDialControlMIBNotificationPrefix, cvAtmPeerCfgCodecBytes=cvAtmPeerCfgCodecBytes, ciscoVoiceAtmDialControlMIBGroups=ciscoVoiceAtmDialControlMIBGroups, cvAtmCallHistoryLowerIfName=cvAtmCallHistoryLowerIfName, cvAtmCallActiveGroup=cvAtmCallActiveGroup, PYSNMP_MODULE_ID=ciscoVoiceAtmDialControlMIB, ciscoVoiceAtmDialControlMIBCompliances=ciscoVoiceAtmDialControlMIBCompliances, cvAtmCallHistory=cvAtmCallHistory, cvAtmCallHistorySubchannelID=cvAtmCallHistorySubchannelID)
| (octet_string, object_identifier, integer) = mibBuilder.importSymbols('ASN1', 'OctetString', 'ObjectIdentifier', 'Integer')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_size_constraint, single_value_constraint, constraints_union, constraints_intersection, value_range_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueSizeConstraint', 'SingleValueConstraint', 'ConstraintsUnion', 'ConstraintsIntersection', 'ValueRangeConstraint')
(c_call_history_index,) = mibBuilder.importSymbols('CISCO-DIAL-CONTROL-MIB', 'cCallHistoryIndex')
(cisco_experiment,) = mibBuilder.importSymbols('CISCO-SMI', 'ciscoExperiment')
(cvc_speech_coder_rate, cvc_in_band_signaling, cvc_g_uid, cvc_fax_transmit_rate) = mibBuilder.importSymbols('CISCO-VOICE-COMMON-DIAL-CONTROL-MIB', 'CvcSpeechCoderRate', 'CvcInBandSignaling', 'CvcGUid', 'CvcFaxTransmitRate')
(call_active_setup_time, call_active_index) = mibBuilder.importSymbols('DIAL-CONTROL-MIB', 'callActiveSetupTime', 'callActiveIndex')
(if_index,) = mibBuilder.importSymbols('IF-MIB', 'ifIndex')
(object_group, notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'ObjectGroup', 'NotificationGroup', 'ModuleCompliance')
(notification_type, bits, counter64, object_identity, ip_address, mib_identifier, mib_scalar, mib_table, mib_table_row, mib_table_column, gauge32, iso, module_identity, counter32, time_ticks, integer32, unsigned32) = mibBuilder.importSymbols('SNMPv2-SMI', 'NotificationType', 'Bits', 'Counter64', 'ObjectIdentity', 'IpAddress', 'MibIdentifier', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Gauge32', 'iso', 'ModuleIdentity', 'Counter32', 'TimeTicks', 'Integer32', 'Unsigned32')
(display_string, truth_value, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TruthValue', 'TextualConvention')
cisco_voice_atm_dial_control_mib = module_identity((1, 3, 6, 1, 4, 1, 9, 10, 35))
ciscoVoiceAtmDialControlMIB.setRevisions(('2002-11-17 00:00', '1999-03-20 00:00'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts:
ciscoVoiceAtmDialControlMIB.setRevisionsDescriptions(('Modify the following objects: [1] Add a new enum definition in CvAtmSessionProtocol [2] Change the default value in cvAtmPeerCfgInBandSignaling ', 'Add new objects for handling the following: [1] Call History object ids 6-17 to bring MIB inline with stored Call History record. [2] Added Call Active Entry objects [3] Added Dialpeer Objects for VoATM '))
if mibBuilder.loadTexts:
ciscoVoiceAtmDialControlMIB.setLastUpdated('200211170000Z')
if mibBuilder.loadTexts:
ciscoVoiceAtmDialControlMIB.setOrganization('Cisco Systems, Inc.')
if mibBuilder.loadTexts:
ciscoVoiceAtmDialControlMIB.setContactInfo(' Cisco Systems Customer Service Postal: 170 W. Tasman Drive San Jose, CA 95134 USA Tel: +1 800 553-NETS E-mail: [email protected]')
if mibBuilder.loadTexts:
ciscoVoiceAtmDialControlMIB.setDescription('This MIB module enhances the IETF Dial Control MIB (RFC2128) by providing ATM management information over a data network.')
cisco_voice_atm_dial_control_mib_objects = mib_identifier((1, 3, 6, 1, 4, 1, 9, 10, 35, 1))
cv_atm_call_history = mib_identifier((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 1))
cv_atm_call_active = mib_identifier((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 2))
cv_atm_dial_peer = mib_identifier((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 3))
class Cvatmsessionprotocol(TextualConvention, Integer32):
description = 'Represents a Session Protocol used by Voice calls between a local and remote router via the ATM backbone. other - none of the following. ciscoSwitched - cisco proprietary ATM session protocol. '
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3))
named_values = named_values(('other', 1), ('ciscoSwitched', 2), ('aal2Trunk', 3))
cv_atm_call_history_table = mib_table((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 1, 1))
if mibBuilder.loadTexts:
cvAtmCallHistoryTable.setStatus('current')
if mibBuilder.loadTexts:
cvAtmCallHistoryTable.setDescription('This table is the ATM extension to the call history table of IETF Dial Control MIB. It contains ATM call leg information about specific voice over ATM call.')
cv_atm_call_history_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 1, 1, 1)).setIndexNames((0, 'CISCO-DIAL-CONTROL-MIB', 'cCallHistoryIndex'))
if mibBuilder.loadTexts:
cvAtmCallHistoryEntry.setStatus('current')
if mibBuilder.loadTexts:
cvAtmCallHistoryEntry.setDescription('The information regarding a single ATM call leg. An entry of this table is created when its associated call history entry in the IETF Dial Control MIB is created and the call history entry contains information for the call establishment to the peer on the data network backbone via a voice over ATM peer. Th the IETF Dial Control MIB is deleted.')
cv_atm_call_history_connection_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 1, 1, 1, 1), cvc_g_uid()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cvAtmCallHistoryConnectionId.setStatus('current')
if mibBuilder.loadTexts:
cvAtmCallHistoryConnectionId.setDescription('The global call identifier for the ATM call.')
cv_atm_call_history_vpi = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 1, 1, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 4095))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cvAtmCallHistoryVpi.setStatus('current')
if mibBuilder.loadTexts:
cvAtmCallHistoryVpi.setDescription('The VPI used for this ATM connection.')
cv_atm_call_history_vci = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 1, 1, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cvAtmCallHistoryVci.setStatus('current')
if mibBuilder.loadTexts:
cvAtmCallHistoryVci.setDescription('The VCI used for this ATM connection.')
cv_atm_call_history_lower_if_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 1, 1, 1, 4), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cvAtmCallHistoryLowerIfName.setStatus('current')
if mibBuilder.loadTexts:
cvAtmCallHistoryLowerIfName.setDescription('The ifName of the ATM interface associated with this call.')
cv_atm_call_history_session_target = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 1, 1, 1, 5), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cvAtmCallHistorySessionTarget.setStatus('current')
if mibBuilder.loadTexts:
cvAtmCallHistorySessionTarget.setDescription('The object indicates the session target of the peer that was used for the voice over ATM call. A zero length string indicates that the value is unavailable.')
cv_atm_call_history_subchannel_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 1, 1, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cvAtmCallHistorySubchannelID.setStatus('current')
if mibBuilder.loadTexts:
cvAtmCallHistorySubchannelID.setDescription('The subchannel used for this ATM connection.')
cv_atm_call_history_session_protocol = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 1, 1, 1, 7), cv_atm_session_protocol()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cvAtmCallHistorySessionProtocol.setStatus('current')
if mibBuilder.loadTexts:
cvAtmCallHistorySessionProtocol.setDescription('Indicates the session protocol used on this call.')
cv_atm_call_history_called_number = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 1, 1, 1, 8), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cvAtmCallHistoryCalledNumber.setStatus('current')
if mibBuilder.loadTexts:
cvAtmCallHistoryCalledNumber.setDescription('Indicates the called party number for trunk connection calls. A zero length string indicates that this data is unavailable.')
cv_atm_call_history_dtmf_relay = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 1, 1, 1, 9), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cvAtmCallHistoryDtmfRelay.setStatus('current')
if mibBuilder.loadTexts:
cvAtmCallHistoryDtmfRelay.setDescription('Indicates if Dtmf Relay was enabled for the call.')
cv_atm_call_history_use_seq_numbers = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 1, 1, 1, 10), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cvAtmCallHistoryUseSeqNumbers.setStatus('current')
if mibBuilder.loadTexts:
cvAtmCallHistoryUseSeqNumbers.setDescription('Indicates if Sequence Numbers were used on the voice data packets.')
cv_atm_call_active_table = mib_table((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 2, 1))
if mibBuilder.loadTexts:
cvAtmCallActiveTable.setStatus('current')
if mibBuilder.loadTexts:
cvAtmCallActiveTable.setDescription('This table is the ATM extension to the active call table of IETF Dial Control MIB. It contains ATM call leg information about specific voice over ATM call.')
cv_atm_call_active_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 2, 1, 1)).setIndexNames((0, 'DIAL-CONTROL-MIB', 'callActiveSetupTime'), (0, 'DIAL-CONTROL-MIB', 'callActiveIndex'))
if mibBuilder.loadTexts:
cvAtmCallActiveEntry.setStatus('current')
if mibBuilder.loadTexts:
cvAtmCallActiveEntry.setDescription('The information regarding a single ATM call leg. An entry of this table is created when its associated call active entry in the IETF Dial Control MIB is created. The call active entry contains information for the call establishment to the peer on the data network backbone via a voice over ATM peer. The entry is deleted when its associated call active entry in the IETF Dial Control MIB is deleted.')
cv_atm_call_active_connection_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 2, 1, 1, 1), cvc_g_uid()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cvAtmCallActiveConnectionId.setStatus('current')
if mibBuilder.loadTexts:
cvAtmCallActiveConnectionId.setDescription('The global call identifier for the ATM call.')
cv_atm_call_active_vpi = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 2, 1, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 4095))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cvAtmCallActiveVpi.setStatus('current')
if mibBuilder.loadTexts:
cvAtmCallActiveVpi.setDescription('The VPI used for this ATM connection.')
cv_atm_call_active_vci = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 2, 1, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cvAtmCallActiveVci.setStatus('current')
if mibBuilder.loadTexts:
cvAtmCallActiveVci.setDescription('The VCI used for this ATM connection.')
cv_atm_call_active_lower_if_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 2, 1, 1, 4), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cvAtmCallActiveLowerIfName.setStatus('current')
if mibBuilder.loadTexts:
cvAtmCallActiveLowerIfName.setDescription('The ifName of the ATM interface associated with this call.')
cv_atm_call_active_session_target = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 2, 1, 1, 5), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cvAtmCallActiveSessionTarget.setStatus('current')
if mibBuilder.loadTexts:
cvAtmCallActiveSessionTarget.setDescription('The object indicates the session target of the peer that is used for the voice over ATM call. A null string indicates that the value is unavailable.')
cv_atm_call_active_subchannel_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 2, 1, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cvAtmCallActiveSubchannelID.setStatus('current')
if mibBuilder.loadTexts:
cvAtmCallActiveSubchannelID.setDescription('The subchannel used for this ATM connection.')
cv_atm_call_active_session_protocol = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 2, 1, 1, 7), cv_atm_session_protocol()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cvAtmCallActiveSessionProtocol.setStatus('current')
if mibBuilder.loadTexts:
cvAtmCallActiveSessionProtocol.setDescription('Indicates the session protocol being used on this call.')
cv_atm_call_active_called_number = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 2, 1, 1, 8), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cvAtmCallActiveCalledNumber.setStatus('current')
if mibBuilder.loadTexts:
cvAtmCallActiveCalledNumber.setDescription('Indicates the called party number for trunk connection calls. A null string indicates that this data is unavailable.')
cv_atm_call_active_dtmf_relay = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 2, 1, 1, 9), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cvAtmCallActiveDtmfRelay.setStatus('current')
if mibBuilder.loadTexts:
cvAtmCallActiveDtmfRelay.setDescription('Indicates if Dtmf Relay is enabled for the call.')
cv_atm_call_active_use_seq_numbers = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 2, 1, 1, 10), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cvAtmCallActiveUseSeqNumbers.setStatus('current')
if mibBuilder.loadTexts:
cvAtmCallActiveUseSeqNumbers.setDescription('Indicates if Sequence Numbers are used on the voice data packets.')
cv_atm_peer_cfg_table = mib_table((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 3, 1))
if mibBuilder.loadTexts:
cvAtmPeerCfgTable.setStatus('current')
if mibBuilder.loadTexts:
cvAtmPeerCfgTable.setDescription('The table contains the Voice over ATM (ATM) peer specific information that is required to accept or place voice calls via the ATM backbone with the session protocol specified in cvAtmPeerCfgSessionProtocol.')
cv_atm_peer_cfg_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 3, 1, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'))
if mibBuilder.loadTexts:
cvAtmPeerCfgEntry.setStatus('current')
if mibBuilder.loadTexts:
cvAtmPeerCfgEntry.setDescription("A single ATM specific Peer. One entry per ATM encapsulation. The entry is created when its associated 'voiceOverATM(152)' encapsulation ifEntry is created. This entry is deleted when its associated ifEntry is deleted.")
cv_atm_peer_cfg_session_protocol = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 3, 1, 1, 1), cv_atm_session_protocol().clone('ciscoSwitched')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cvAtmPeerCfgSessionProtocol.setStatus('current')
if mibBuilder.loadTexts:
cvAtmPeerCfgSessionProtocol.setDescription('The object specifies the session protocol to be used for Internet call between local and remote router via ATM backbone.')
cv_atm_peer_cfg_interface_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 3, 1, 1, 2), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cvAtmPeerCfgInterfaceName.setStatus('current')
if mibBuilder.loadTexts:
cvAtmPeerCfgInterfaceName.setDescription('The object specifies the ifName on which the call will go out. A zero length string indicates that no interface has been assigned.')
cv_atm_peer_cfg_vpi = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 3, 1, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 4095))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cvAtmPeerCfgVpi.setStatus('current')
if mibBuilder.loadTexts:
cvAtmPeerCfgVpi.setDescription('The VPI used for this ATM connection.')
cv_atm_peer_cfg_vci = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 3, 1, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cvAtmPeerCfgVci.setStatus('current')
if mibBuilder.loadTexts:
cvAtmPeerCfgVci.setDescription('The VCI used for this ATM connection.')
cv_atm_peer_cfg_vc_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 3, 1, 1, 5), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cvAtmPeerCfgVcName.setStatus('current')
if mibBuilder.loadTexts:
cvAtmPeerCfgVcName.setDescription('The VC Name used for this ATM connection.')
cv_atm_peer_cfg_coder_rate = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 3, 1, 1, 6), cvc_speech_coder_rate().clone('g729Ar8000')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cvAtmPeerCfgCoderRate.setStatus('current')
if mibBuilder.loadTexts:
cvAtmPeerCfgCoderRate.setDescription('This object specifies the default voice coder rate of speech for the ATM peer.')
cv_atm_peer_cfg_codec_bytes = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 3, 1, 1, 7), integer32().subtype(subtypeSpec=value_range_constraint(0, 240)).clone(30)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cvAtmPeerCfgCodecBytes.setStatus('current')
if mibBuilder.loadTexts:
cvAtmPeerCfgCodecBytes.setDescription('This object specifies the payload size for the voice packets to be transmitted during the call.')
cv_atm_peer_cfg_fax_rate = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 3, 1, 1, 8), cvc_fax_transmit_rate().clone('voiceRate')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cvAtmPeerCfgFaxRate.setStatus('current')
if mibBuilder.loadTexts:
cvAtmPeerCfgFaxRate.setDescription("This object specifies the default transmit rate of FAX for the ATM peer. If the value of this object is 'none', then the Fax relay feature is disabled; otherwise the Fax relay feature is enabled.")
cv_atm_peer_cfg_fax_bytes = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 3, 1, 1, 9), integer32().subtype(subtypeSpec=value_range_constraint(0, 240)).clone(30)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cvAtmPeerCfgFaxBytes.setStatus('current')
if mibBuilder.loadTexts:
cvAtmPeerCfgFaxBytes.setDescription('This object specifies the payload size for the fax packets to be transmitted during the call.')
cv_atm_peer_cfg_in_band_signaling = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 3, 1, 1, 10), cvc_in_band_signaling().clone('cas')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cvAtmPeerCfgInBandSignaling.setStatus('current')
if mibBuilder.loadTexts:
cvAtmPeerCfgInBandSignaling.setDescription('This object specifies the type of in-band signaling used between the two end points of the call and is used by the router to determine how to interpret the ABCD signaling bits sent as part of the voice payload data.')
cv_atm_peer_cfg_vad_enable = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 3, 1, 1, 11), truth_value().clone('true')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cvAtmPeerCfgVADEnable.setStatus('current')
if mibBuilder.loadTexts:
cvAtmPeerCfgVADEnable.setDescription("This object specifies whether or not VAD (Voice Activity Detection) is enabled. If the object value is 'false', then the voice data is continuously transmitted to ATM backbone.")
cv_atm_peer_cfg_use_seq_numbers = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 3, 1, 1, 12), truth_value().clone('false')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cvAtmPeerCfgUseSeqNumbers.setStatus('current')
if mibBuilder.loadTexts:
cvAtmPeerCfgUseSeqNumbers.setDescription('This object specifies whether or not Sequence Numbers are generated on voice packets.')
cv_atm_peer_cfg_dtmf_relay = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 35, 1, 3, 1, 1, 13), truth_value().clone('false')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cvAtmPeerCfgDtmfRelay.setStatus('current')
if mibBuilder.loadTexts:
cvAtmPeerCfgDtmfRelay.setDescription('This object specifies whether or not Dtmf Relay is enabled. If it is then dtmf digits are transported as FRF11 Annex C packets, instead of being encoded as speech.')
cisco_voice_atm_dial_control_mib_notification_prefix = mib_identifier((1, 3, 6, 1, 4, 1, 9, 10, 35, 2))
cisco_voice_atm_dial_control_mib_notifications = mib_identifier((1, 3, 6, 1, 4, 1, 9, 10, 35, 2, 0))
cisco_voice_atm_dial_control_mib_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 9, 10, 35, 3))
cisco_voice_atm_dial_control_mib_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 9, 10, 35, 3, 1))
cisco_voice_atm_dial_control_mib_groups = mib_identifier((1, 3, 6, 1, 4, 1, 9, 10, 35, 3, 2))
cisco_voice_atm_dial_control_mib_compliance = module_compliance((1, 3, 6, 1, 4, 1, 9, 10, 35, 3, 1, 1)).setObjects(('CISCO-VOICE-ATM-DIAL-CONTROL-MIB', 'cvAtmCallHistoryGroup'), ('CISCO-VOICE-ATM-DIAL-CONTROL-MIB', 'cvAtmCallActiveGroup'), ('CISCO-VOICE-ATM-DIAL-CONTROL-MIB', 'cvAtmPeerCfgGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cisco_voice_atm_dial_control_mib_compliance = ciscoVoiceAtmDialControlMIBCompliance.setStatus('current')
if mibBuilder.loadTexts:
ciscoVoiceAtmDialControlMIBCompliance.setDescription('The compliance statement for entities which implement the CISCO VOICE ATM DIAL CONTROL MIB')
cv_atm_call_history_group = object_group((1, 3, 6, 1, 4, 1, 9, 10, 35, 3, 2, 1)).setObjects(('CISCO-VOICE-ATM-DIAL-CONTROL-MIB', 'cvAtmCallHistoryConnectionId'), ('CISCO-VOICE-ATM-DIAL-CONTROL-MIB', 'cvAtmCallHistoryVpi'), ('CISCO-VOICE-ATM-DIAL-CONTROL-MIB', 'cvAtmCallHistoryVci'), ('CISCO-VOICE-ATM-DIAL-CONTROL-MIB', 'cvAtmCallHistoryLowerIfName'), ('CISCO-VOICE-ATM-DIAL-CONTROL-MIB', 'cvAtmCallHistorySessionTarget'), ('CISCO-VOICE-ATM-DIAL-CONTROL-MIB', 'cvAtmCallHistorySubchannelID'), ('CISCO-VOICE-ATM-DIAL-CONTROL-MIB', 'cvAtmCallHistorySessionProtocol'), ('CISCO-VOICE-ATM-DIAL-CONTROL-MIB', 'cvAtmCallHistoryCalledNumber'), ('CISCO-VOICE-ATM-DIAL-CONTROL-MIB', 'cvAtmCallHistoryDtmfRelay'), ('CISCO-VOICE-ATM-DIAL-CONTROL-MIB', 'cvAtmCallHistoryUseSeqNumbers'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cv_atm_call_history_group = cvAtmCallHistoryGroup.setStatus('current')
if mibBuilder.loadTexts:
cvAtmCallHistoryGroup.setDescription('A collection of objects providing the ATM Call History entry capability.')
cv_atm_call_active_group = object_group((1, 3, 6, 1, 4, 1, 9, 10, 35, 3, 2, 2)).setObjects(('CISCO-VOICE-ATM-DIAL-CONTROL-MIB', 'cvAtmCallActiveConnectionId'), ('CISCO-VOICE-ATM-DIAL-CONTROL-MIB', 'cvAtmCallActiveVpi'), ('CISCO-VOICE-ATM-DIAL-CONTROL-MIB', 'cvAtmCallActiveVci'), ('CISCO-VOICE-ATM-DIAL-CONTROL-MIB', 'cvAtmCallActiveLowerIfName'), ('CISCO-VOICE-ATM-DIAL-CONTROL-MIB', 'cvAtmCallActiveSessionTarget'), ('CISCO-VOICE-ATM-DIAL-CONTROL-MIB', 'cvAtmCallActiveSubchannelID'), ('CISCO-VOICE-ATM-DIAL-CONTROL-MIB', 'cvAtmCallActiveSessionProtocol'), ('CISCO-VOICE-ATM-DIAL-CONTROL-MIB', 'cvAtmCallActiveCalledNumber'), ('CISCO-VOICE-ATM-DIAL-CONTROL-MIB', 'cvAtmCallActiveDtmfRelay'), ('CISCO-VOICE-ATM-DIAL-CONTROL-MIB', 'cvAtmCallActiveUseSeqNumbers'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cv_atm_call_active_group = cvAtmCallActiveGroup.setStatus('current')
if mibBuilder.loadTexts:
cvAtmCallActiveGroup.setDescription('A collection of objects providing the ATM Call Active entry capability.')
cv_atm_peer_cfg_group = object_group((1, 3, 6, 1, 4, 1, 9, 10, 35, 3, 2, 3)).setObjects(('CISCO-VOICE-ATM-DIAL-CONTROL-MIB', 'cvAtmPeerCfgSessionProtocol'), ('CISCO-VOICE-ATM-DIAL-CONTROL-MIB', 'cvAtmPeerCfgInterfaceName'), ('CISCO-VOICE-ATM-DIAL-CONTROL-MIB', 'cvAtmPeerCfgVpi'), ('CISCO-VOICE-ATM-DIAL-CONTROL-MIB', 'cvAtmPeerCfgVci'), ('CISCO-VOICE-ATM-DIAL-CONTROL-MIB', 'cvAtmPeerCfgVcName'), ('CISCO-VOICE-ATM-DIAL-CONTROL-MIB', 'cvAtmPeerCfgCoderRate'), ('CISCO-VOICE-ATM-DIAL-CONTROL-MIB', 'cvAtmPeerCfgCodecBytes'), ('CISCO-VOICE-ATM-DIAL-CONTROL-MIB', 'cvAtmPeerCfgFaxRate'), ('CISCO-VOICE-ATM-DIAL-CONTROL-MIB', 'cvAtmPeerCfgFaxBytes'), ('CISCO-VOICE-ATM-DIAL-CONTROL-MIB', 'cvAtmPeerCfgInBandSignaling'), ('CISCO-VOICE-ATM-DIAL-CONTROL-MIB', 'cvAtmPeerCfgVADEnable'), ('CISCO-VOICE-ATM-DIAL-CONTROL-MIB', 'cvAtmPeerCfgUseSeqNumbers'), ('CISCO-VOICE-ATM-DIAL-CONTROL-MIB', 'cvAtmPeerCfgDtmfRelay'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cv_atm_peer_cfg_group = cvAtmPeerCfgGroup.setStatus('current')
if mibBuilder.loadTexts:
cvAtmPeerCfgGroup.setDescription('A collection of objects providing the ATM Dialpeer capability. These objects have been implemented as read-only.')
mibBuilder.exportSymbols('CISCO-VOICE-ATM-DIAL-CONTROL-MIB', cvAtmPeerCfgFaxRate=cvAtmPeerCfgFaxRate, cvAtmCallActiveSessionTarget=cvAtmCallActiveSessionTarget, cvAtmCallHistoryGroup=cvAtmCallHistoryGroup, cvAtmCallHistoryUseSeqNumbers=cvAtmCallHistoryUseSeqNumbers, ciscoVoiceAtmDialControlMIBConformance=ciscoVoiceAtmDialControlMIBConformance, cvAtmPeerCfgGroup=cvAtmPeerCfgGroup, cvAtmCallHistoryVpi=cvAtmCallHistoryVpi, cvAtmCallActiveVpi=cvAtmCallActiveVpi, cvAtmCallActiveDtmfRelay=cvAtmCallActiveDtmfRelay, cvAtmCallHistorySessionTarget=cvAtmCallHistorySessionTarget, cvAtmCallActiveSubchannelID=cvAtmCallActiveSubchannelID, cvAtmCallHistoryEntry=cvAtmCallHistoryEntry, cvAtmCallActiveUseSeqNumbers=cvAtmCallActiveUseSeqNumbers, cvAtmPeerCfgTable=cvAtmPeerCfgTable, cvAtmCallHistoryConnectionId=cvAtmCallHistoryConnectionId, cvAtmCallActiveSessionProtocol=cvAtmCallActiveSessionProtocol, cvAtmCallActive=cvAtmCallActive, cvAtmPeerCfgVci=cvAtmPeerCfgVci, ciscoVoiceAtmDialControlMIBNotifications=ciscoVoiceAtmDialControlMIBNotifications, cvAtmCallActiveLowerIfName=cvAtmCallActiveLowerIfName, cvAtmCallHistoryTable=cvAtmCallHistoryTable, cvAtmCallActiveEntry=cvAtmCallActiveEntry, cvAtmCallActiveCalledNumber=cvAtmCallActiveCalledNumber, cvAtmPeerCfgInterfaceName=cvAtmPeerCfgInterfaceName, cvAtmCallActiveTable=cvAtmCallActiveTable, ciscoVoiceAtmDialControlMIB=ciscoVoiceAtmDialControlMIB, cvAtmCallHistorySessionProtocol=cvAtmCallHistorySessionProtocol, cvAtmPeerCfgVcName=cvAtmPeerCfgVcName, cvAtmCallHistoryDtmfRelay=cvAtmCallHistoryDtmfRelay, ciscoVoiceAtmDialControlMIBCompliance=ciscoVoiceAtmDialControlMIBCompliance, cvAtmPeerCfgEntry=cvAtmPeerCfgEntry, cvAtmPeerCfgCoderRate=cvAtmPeerCfgCoderRate, ciscoVoiceAtmDialControlMIBObjects=ciscoVoiceAtmDialControlMIBObjects, cvAtmCallActiveConnectionId=cvAtmCallActiveConnectionId, cvAtmPeerCfgSessionProtocol=cvAtmPeerCfgSessionProtocol, CvAtmSessionProtocol=CvAtmSessionProtocol, cvAtmDialPeer=cvAtmDialPeer, cvAtmPeerCfgInBandSignaling=cvAtmPeerCfgInBandSignaling, cvAtmPeerCfgFaxBytes=cvAtmPeerCfgFaxBytes, cvAtmPeerCfgVpi=cvAtmPeerCfgVpi, cvAtmCallHistoryVci=cvAtmCallHistoryVci, cvAtmPeerCfgUseSeqNumbers=cvAtmPeerCfgUseSeqNumbers, cvAtmPeerCfgVADEnable=cvAtmPeerCfgVADEnable, cvAtmPeerCfgDtmfRelay=cvAtmPeerCfgDtmfRelay, cvAtmCallActiveVci=cvAtmCallActiveVci, cvAtmCallHistoryCalledNumber=cvAtmCallHistoryCalledNumber, ciscoVoiceAtmDialControlMIBNotificationPrefix=ciscoVoiceAtmDialControlMIBNotificationPrefix, cvAtmPeerCfgCodecBytes=cvAtmPeerCfgCodecBytes, ciscoVoiceAtmDialControlMIBGroups=ciscoVoiceAtmDialControlMIBGroups, cvAtmCallHistoryLowerIfName=cvAtmCallHistoryLowerIfName, cvAtmCallActiveGroup=cvAtmCallActiveGroup, PYSNMP_MODULE_ID=ciscoVoiceAtmDialControlMIB, ciscoVoiceAtmDialControlMIBCompliances=ciscoVoiceAtmDialControlMIBCompliances, cvAtmCallHistory=cvAtmCallHistory, cvAtmCallHistorySubchannelID=cvAtmCallHistorySubchannelID) |
def quote(msg: str):
return msg.replace("`", "")
def cleanup_code(content):
if content.startswith("```") and content.endswith("```"):
output = content[3:-3].rstrip("\n").lstrip("\n")
return output
return content.strip("` \n") | def quote(msg: str):
return msg.replace('`', '')
def cleanup_code(content):
if content.startswith('```') and content.endswith('```'):
output = content[3:-3].rstrip('\n').lstrip('\n')
return output
return content.strip('` \n') |
# Joe defined a dictionary listing his favorite artists, their albums,
# and the song from each of the albums. It looks as follows:
#tracks = {"Woodkid": {"The Golden Age": "Run Boy Run",
# "On the Other Side": "Samara"},
# "Cure": {"Disintegration": "Lovesong",
# "Wish": "Friday I'm in love"}}
# Joe's tastes can change, though.
# Your task is to define a tracklist() function that would take
# several keyword arguments representing musicians and
# dictionaries with albums and songs as values. For the example
# above, the call of this function will look as follows:
# The function should print the values from the dictionary in the
# following form:
def tracklist(**tracks):
for key, value in tracks.items():
print(key)
for k, v in value.items():
print(f'ALBUM: {k} TRACK: {v}')
def tracklist(**artists):
for artist, album in artists.items():
print(artist)
print("\n".join(f'ALBUM: {album_name} TRACK: {track}' for album_name, track in album.items()))
def tracklist(**artists):
for artist, albums in artists.items():
print(artist, *[f"ALBUM: {album} TRACK: {track}" for album, track in albums.items()], sep='\n')
tracklist(Woodkid={"The Golden Age": "Run Boy Run",
"On the Other Side": "Samara"},
Cure={"Disintergration": "Lovesong",
"Wish": "Friday I'm in love"}) | def tracklist(**tracks):
for (key, value) in tracks.items():
print(key)
for (k, v) in value.items():
print(f'ALBUM: {k} TRACK: {v}')
def tracklist(**artists):
for (artist, album) in artists.items():
print(artist)
print('\n'.join((f'ALBUM: {album_name} TRACK: {track}' for (album_name, track) in album.items())))
def tracklist(**artists):
for (artist, albums) in artists.items():
print(artist, *[f'ALBUM: {album} TRACK: {track}' for (album, track) in albums.items()], sep='\n')
tracklist(Woodkid={'The Golden Age': 'Run Boy Run', 'On the Other Side': 'Samara'}, Cure={'Disintergration': 'Lovesong', 'Wish': "Friday I'm in love"}) |
# Challenge Link - https://app.codility.com/programmers/lessons/2-arrays/cyclic_rotation/
# My Results - https://app.codility.com/demo/results/trainingFGAZZW-5XB/
def solution(A, K):
# write your code in Python 3.6
if not A:
return []
idx = [i for i in range(0, len(A))]
while K:
idx = [i + 1 for i in idx]
max_index = idx.index(max(idx))
idx[max_index] = 0
K = K - 1
new_list = [0] * len(A)
for n, index in zip(A, idx):
new_list[index] = n
return new_list
| def solution(A, K):
if not A:
return []
idx = [i for i in range(0, len(A))]
while K:
idx = [i + 1 for i in idx]
max_index = idx.index(max(idx))
idx[max_index] = 0
k = K - 1
new_list = [0] * len(A)
for (n, index) in zip(A, idx):
new_list[index] = n
return new_list |
class Account:
resource = 'accounts'
def __init__(self, requestor):
self.requestor = requestor
def retrieve(self):
return self.requestor.request('GET', '{}'.format(self.resource))
| class Account:
resource = 'accounts'
def __init__(self, requestor):
self.requestor = requestor
def retrieve(self):
return self.requestor.request('GET', '{}'.format(self.resource)) |
_base_ = 'resnet50_head1_4xb64-steplr1e-1-20e_in1k-10pct.py'
# optimizer
optimizer = dict(lr=0.01)
| _base_ = 'resnet50_head1_4xb64-steplr1e-1-20e_in1k-10pct.py'
optimizer = dict(lr=0.01) |
# -*- coding: utf-8 -*-
def search(key, arr):
return list(filter(lambda n: n[0] == key, arr))
def main():
arr = [[100, 2], [300, 3], [500, 4], [800, 5], [200, 6]]
inp_id = 200
ret = search(inp_id, arr)
print(ret)
if len(ret) > 0:
print("ok")
else:
print("Error")
if __name__ == '__main__':
main()
| def search(key, arr):
return list(filter(lambda n: n[0] == key, arr))
def main():
arr = [[100, 2], [300, 3], [500, 4], [800, 5], [200, 6]]
inp_id = 200
ret = search(inp_id, arr)
print(ret)
if len(ret) > 0:
print('ok')
else:
print('Error')
if __name__ == '__main__':
main() |
file = open("BoyNames.txt", "r")
data = file.read()
boys_names = data.split('\n')
file = open("GirlNames.txt", "r")
data = file.read()
girls_names = data.split('\n')
file.close()
choice = input("Enter 'boy', 'girl', or 'both':")
if choice == "boy":
name = input("Enter a boy's name:")
if name in boys_names:
print(f"{name} was a popular boy's name between 2000 and 2009.")
else:
print(f"{name} was not a popular boy's name between 2000 and 2009.")
elif choice == "girl":
name = input("Enter a girl's name:")
if name in girls_names:
print(f"{name} was a popular girl's name between 2000 and 2009.")
else:
print(f"{name} was not a popular girl's name between 2000 and 2009.")
elif choice == "both":
bname = input("Enter a boy's name:")
if bname in boys_names:
print(f"{bname} was a popular boy's name between 2000 and 2009.")
else:
print(f"{bname} was not a popular boy's name between 2000 and 2009.")
gname = input("Enter a girl's name:")
if gname in girls_names:
print(f"{gname} was a popular girl's name between 2000 and 2009.")
else:
print(f"{gname} was not a popular girl's name between 2000 and 2009.")
| file = open('BoyNames.txt', 'r')
data = file.read()
boys_names = data.split('\n')
file = open('GirlNames.txt', 'r')
data = file.read()
girls_names = data.split('\n')
file.close()
choice = input("Enter 'boy', 'girl', or 'both':")
if choice == 'boy':
name = input("Enter a boy's name:")
if name in boys_names:
print(f"{name} was a popular boy's name between 2000 and 2009.")
else:
print(f"{name} was not a popular boy's name between 2000 and 2009.")
elif choice == 'girl':
name = input("Enter a girl's name:")
if name in girls_names:
print(f"{name} was a popular girl's name between 2000 and 2009.")
else:
print(f"{name} was not a popular girl's name between 2000 and 2009.")
elif choice == 'both':
bname = input("Enter a boy's name:")
if bname in boys_names:
print(f"{bname} was a popular boy's name between 2000 and 2009.")
else:
print(f"{bname} was not a popular boy's name between 2000 and 2009.")
gname = input("Enter a girl's name:")
if gname in girls_names:
print(f"{gname} was a popular girl's name between 2000 and 2009.")
else:
print(f"{gname} was not a popular girl's name between 2000 and 2009.") |
a = int(input())
for _ in range(a):
x = input()
y = x[::-1]
counter = 0
while x != y or not counter:
x = str(int(x) + int(y))
y = x[::-1]
counter += 1
print(counter, x)
| a = int(input())
for _ in range(a):
x = input()
y = x[::-1]
counter = 0
while x != y or not counter:
x = str(int(x) + int(y))
y = x[::-1]
counter += 1
print(counter, x) |
# Input.
s = '36743676522426214741687639282183216978128565594112364817283598621384839756628424146779311928318383597235968644687665159591573413233616717112157752469191845757712928347624726438516211153946892241449523148419426259291788938621886334734497823163281389389853675932246734153563861233894952657625868415432316155487242813798425779743561987563734944962846865263722712768674838244444385768568489842989878163655771847362656153372265945464128668412439248966939398765446171855144544285463517258749813731314365947372548811434646381595273172982466142248474238762554858654679415418693478512641864168398722199638775667744977941183772494538685398862344164521446115925528534491788728448668455349588972443295391385389551783289417349823383324748411689198219329996666752251815562522759374542652969147696419669914534586732436912798519697722586795746371697338416716842214313393228587413399534716394984183943123375517819622837972796431166264646432893478557659387795573234889141897313158457637142238315327877493994933514112645586351127139429281675912366669475931711974332271368287413985682374943195886455927839573986464555141679291998645936683639162588375974549467767623463935561847869527383395278248952314792112113126231246742753119748113828843917812547224498319849947517745625844819175973986843636628414965664466582172419197227695368492433353199233558872319529626825788288176275546566474824257336863977574347328469153319428883748696399544974133392589823343773897313173336568883385364166336362398636684459886283964242249228938383219255513996468586953519638111599935229115228837559242752925943653623682985576323929415445443378189472782454958232341986626791182861644112974418239286486722654442144851173538756859647218768134572858331849543266169672745221391659363674921469481143686952478771714585793322926824623482923579986434741714167134346384551362664177865452895348948953472328966995731169672573555621939584872187999325322327893336736611929752613241935211664248961527687778371971259654541239471766714469122213793348414477789271187324629397292446879752673'
d = {}
swapped_in_last = False
for i, c in enumerate(s):
k = int(c)
# Edge cases.
if i == 0 and c == s[-1]:
d[k] = d.get(k, 0) + 1
swapped_in_last = True
if i == len(s) - 2 and swapped_in_last:
break
if i < len(s) - 1 and s[i+1] == c:
d[k] = d.get(k, 0) + 1
total = 0
for k, n in d.items():
total += k*n
print(total)
| s = '36743676522426214741687639282183216978128565594112364817283598621384839756628424146779311928318383597235968644687665159591573413233616717112157752469191845757712928347624726438516211153946892241449523148419426259291788938621886334734497823163281389389853675932246734153563861233894952657625868415432316155487242813798425779743561987563734944962846865263722712768674838244444385768568489842989878163655771847362656153372265945464128668412439248966939398765446171855144544285463517258749813731314365947372548811434646381595273172982466142248474238762554858654679415418693478512641864168398722199638775667744977941183772494538685398862344164521446115925528534491788728448668455349588972443295391385389551783289417349823383324748411689198219329996666752251815562522759374542652969147696419669914534586732436912798519697722586795746371697338416716842214313393228587413399534716394984183943123375517819622837972796431166264646432893478557659387795573234889141897313158457637142238315327877493994933514112645586351127139429281675912366669475931711974332271368287413985682374943195886455927839573986464555141679291998645936683639162588375974549467767623463935561847869527383395278248952314792112113126231246742753119748113828843917812547224498319849947517745625844819175973986843636628414965664466582172419197227695368492433353199233558872319529626825788288176275546566474824257336863977574347328469153319428883748696399544974133392589823343773897313173336568883385364166336362398636684459886283964242249228938383219255513996468586953519638111599935229115228837559242752925943653623682985576323929415445443378189472782454958232341986626791182861644112974418239286486722654442144851173538756859647218768134572858331849543266169672745221391659363674921469481143686952478771714585793322926824623482923579986434741714167134346384551362664177865452895348948953472328966995731169672573555621939584872187999325322327893336736611929752613241935211664248961527687778371971259654541239471766714469122213793348414477789271187324629397292446879752673'
d = {}
swapped_in_last = False
for (i, c) in enumerate(s):
k = int(c)
if i == 0 and c == s[-1]:
d[k] = d.get(k, 0) + 1
swapped_in_last = True
if i == len(s) - 2 and swapped_in_last:
break
if i < len(s) - 1 and s[i + 1] == c:
d[k] = d.get(k, 0) + 1
total = 0
for (k, n) in d.items():
total += k * n
print(total) |
try:
a = int(input("Primeiro numero: "))
b = int(input("Segundo numero: "))
r = a / b
except Exception as erro:
print("Problema encontrado foi {}".format(erro.__class__))
else:
print("O resultado e {:.1f}".format(r))
finally:
print("Volte Sempre! Muito Obrigado :)")
| try:
a = int(input('Primeiro numero: '))
b = int(input('Segundo numero: '))
r = a / b
except Exception as erro:
print('Problema encontrado foi {}'.format(erro.__class__))
else:
print('O resultado e {:.1f}'.format(r))
finally:
print('Volte Sempre! Muito Obrigado :)') |
# Isaac Roberts
# Imports
# Functions
# Main execution of the program.
def main():
# Open provided CSV file
f = open("Python/airport-project/Airports.txt", 'r')
# Define list to store seperated CSV file in.
airports_list = []
# Loop through file and split each line into seperate lists.
for i in f:
split_line = i.split(',')
# Delete the unneeded newline (\n) from the list
del split_line[-1]
# Append the split lines into one list to create a listed version of our CSV file.
airports_list.append(split_line)
menu(airports_list)
# Kills program when called.
def exitProgram():
exit()
# Command line option menu.
def menu(airports_list):
while True:
choice = input(
'''
Choose an option by typing the respective number:
1 - Enter airport details
2 - Enter flight details
3 - Enter price plan and calculate profit
4 - Clear data
5 - Quit
'''
)
try:
if choice == '1':
print("Enter airport details")
elif choice == '2':
print("Enter flight details")
elif choice == '3':
print("Enter price plan and calculate profit")
elif choice == '4':
print("Clear Data")
elif choice == '5':
exitProgram()
except:
print("Please enter a valid input.")
main() | def main():
f = open('Python/airport-project/Airports.txt', 'r')
airports_list = []
for i in f:
split_line = i.split(',')
del split_line[-1]
airports_list.append(split_line)
menu(airports_list)
def exit_program():
exit()
def menu(airports_list):
while True:
choice = input('\nChoose an option by typing the respective number:\n 1 - Enter airport details\n 2 - Enter flight details\n 3 - Enter price plan and calculate profit\n 4 - Clear data\n 5 - Quit\n ')
try:
if choice == '1':
print('Enter airport details')
elif choice == '2':
print('Enter flight details')
elif choice == '3':
print('Enter price plan and calculate profit')
elif choice == '4':
print('Clear Data')
elif choice == '5':
exit_program()
except:
print('Please enter a valid input.')
main() |
class settings:
def init():
global baseURL
global password
global username
global usertestingpassword
global usertestingemail
global twilliotemplate | class Settings:
def init():
global baseURL
global password
global username
global usertestingpassword
global usertestingemail
global twilliotemplate |
#
# PySNMP MIB module NETONIX-SWITCH-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/NETONIX-SWITCH-MIB
# Produced by pysmi-0.3.4 at Wed May 1 14:19:56 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
OctetString, Integer, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "OctetString", "Integer", "ObjectIdentifier")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
SingleValueConstraint, ValueRangeConstraint, ValueSizeConstraint, ConstraintsUnion, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ValueRangeConstraint", "ValueSizeConstraint", "ConstraintsUnion", "ConstraintsIntersection")
ObjectGroup, NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "ObjectGroup", "NotificationGroup", "ModuleCompliance")
snmpMIBGroups, = mibBuilder.importSymbols("SNMPv2-MIB", "snmpMIBGroups")
Unsigned32, ObjectIdentity, ModuleIdentity, Counter64, IpAddress, Gauge32, iso, Bits, Counter32, MibIdentifier, Integer32, MibScalar, MibTable, MibTableRow, MibTableColumn, TimeTicks, enterprises, NotificationType = mibBuilder.importSymbols("SNMPv2-SMI", "Unsigned32", "ObjectIdentity", "ModuleIdentity", "Counter64", "IpAddress", "Gauge32", "iso", "Bits", "Counter32", "MibIdentifier", "Integer32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "TimeTicks", "enterprises", "NotificationType")
DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention")
netonixSwitch = ModuleIdentity((1, 3, 6, 1, 4, 1, 46242))
netonixSwitch.setRevisions(('1998-03-23 18:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: netonixSwitch.setRevisionsDescriptions(('The MIB Module for Netonix Switches.',))
if mibBuilder.loadTexts: netonixSwitch.setLastUpdated('9803231800Z')
if mibBuilder.loadTexts: netonixSwitch.setOrganization('Netonix')
if mibBuilder.loadTexts: netonixSwitch.setContactInfo('[email protected]')
if mibBuilder.loadTexts: netonixSwitch.setDescription('The MIB Module for Netonix Switches.')
netonixSwitchGroup = ObjectGroup((1, 3, 6, 1, 6, 3, 1, 2, 2, 8)).setObjects(("NETONIX-SWITCH-MIB", "firmwareVersion"), ("NETONIX-SWITCH-MIB", "fanSpeed"), ("NETONIX-SWITCH-MIB", "tempDescription"), ("NETONIX-SWITCH-MIB", "temp"), ("NETONIX-SWITCH-MIB", "voltageDescription"), ("NETONIX-SWITCH-MIB", "voltage"), ("NETONIX-SWITCH-MIB", "poeStatus"), ("NETONIX-SWITCH-MIB", "totalPowerConsumption"), ("NETONIX-SWITCH-MIB", "dcdcInputCurrent"), ("NETONIX-SWITCH-MIB", "dcdcEfficiency"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
netonixSwitchGroup = netonixSwitchGroup.setStatus('current')
if mibBuilder.loadTexts: netonixSwitchGroup.setDescription('A collection of objects providing basic instrumentation and control of an SNMPv2 entity.')
netonixSwitchConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 46242, 99))
netonixSwitchGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 46242, 99, 1))
netonixSwitchCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 46242, 99, 2))
netonixSwitchCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 46242, 99, 2, 1)).setObjects(("NETONIX-SWITCH-MIB", "netonixSwitchGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
netonixSwitchCompliance = netonixSwitchCompliance.setStatus('current')
if mibBuilder.loadTexts: netonixSwitchCompliance.setDescription('The compliance statement for switches which implement the Netonix Switch MIB.')
class VoltageTC(TextualConvention, Integer32):
description = 'A voltage with 2 decimal places'
status = 'current'
displayHint = 'd-2'
class PowerTC(TextualConvention, Integer32):
description = 'Power consumption in watts with 1 decimal place'
status = 'current'
displayHint = 'd-1'
class CurrentTC(TextualConvention, Integer32):
description = 'Current in amps with 1 decimal place'
status = 'current'
displayHint = 'd-1'
firmwareVersion = MibScalar((1, 3, 6, 1, 4, 1, 46242, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: firmwareVersion.setStatus('current')
if mibBuilder.loadTexts: firmwareVersion.setDescription('The version of the firmware running on the switch')
totalPowerConsumption = MibScalar((1, 3, 6, 1, 4, 1, 46242, 6), PowerTC()).setMaxAccess("readonly")
if mibBuilder.loadTexts: totalPowerConsumption.setStatus('current')
if mibBuilder.loadTexts: totalPowerConsumption.setDescription('Total power being consumed by the switch, in Watts')
dcdcInputCurrent = MibScalar((1, 3, 6, 1, 4, 1, 46242, 7), CurrentTC()).setMaxAccess("readonly")
if mibBuilder.loadTexts: dcdcInputCurrent.setStatus('current')
if mibBuilder.loadTexts: dcdcInputCurrent.setDescription('DCDC Input Current in amps')
dcdcEfficiency = MibScalar((1, 3, 6, 1, 4, 1, 46242, 8), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: dcdcEfficiency.setStatus('current')
if mibBuilder.loadTexts: dcdcEfficiency.setDescription('DCDC power supply efficiency, percentage')
fanTable = MibTable((1, 3, 6, 1, 4, 1, 46242, 2), )
if mibBuilder.loadTexts: fanTable.setStatus('current')
if mibBuilder.loadTexts: fanTable.setDescription('Fan watching information.')
fanEntry = MibTableRow((1, 3, 6, 1, 4, 1, 46242, 2, 1), ).setIndexNames((0, "NETONIX-SWITCH-MIB", "fanIndex"))
if mibBuilder.loadTexts: fanEntry.setStatus('current')
if mibBuilder.loadTexts: fanEntry.setDescription('An entry containing a disk and its statistics.')
fanIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 46242, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535)))
if mibBuilder.loadTexts: fanIndex.setStatus('current')
if mibBuilder.loadTexts: fanIndex.setDescription('Integer reference number (row number) for the fan mib.')
fanSpeed = MibTableColumn((1, 3, 6, 1, 4, 1, 46242, 2, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: fanSpeed.setStatus('current')
if mibBuilder.loadTexts: fanSpeed.setDescription('Integer reference number (row number) for the fan mib.')
poeStatusTable = MibTable((1, 3, 6, 1, 4, 1, 46242, 5), )
if mibBuilder.loadTexts: poeStatusTable.setStatus('current')
if mibBuilder.loadTexts: poeStatusTable.setDescription('PoE Status per port.')
poeStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 46242, 5, 1), ).setIndexNames((0, "NETONIX-SWITCH-MIB", "poeStatusIndex"))
if mibBuilder.loadTexts: poeStatusEntry.setStatus('current')
if mibBuilder.loadTexts: poeStatusEntry.setDescription('An entry containing poe status.')
poeStatusIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 46242, 5, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535)))
if mibBuilder.loadTexts: poeStatusIndex.setStatus('current')
if mibBuilder.loadTexts: poeStatusIndex.setDescription('Integer reference number (row number) for the poe status.')
poeStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 46242, 5, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: poeStatus.setStatus('current')
if mibBuilder.loadTexts: poeStatus.setDescription('poe status.')
tempTable = MibTable((1, 3, 6, 1, 4, 1, 46242, 3), )
if mibBuilder.loadTexts: tempTable.setStatus('current')
if mibBuilder.loadTexts: tempTable.setDescription('Temperature watching information.')
tempEntry = MibTableRow((1, 3, 6, 1, 4, 1, 46242, 3, 1), ).setIndexNames((0, "NETONIX-SWITCH-MIB", "tempIndex"))
if mibBuilder.loadTexts: tempEntry.setStatus('current')
if mibBuilder.loadTexts: tempEntry.setDescription('An entry containing a temperature sensor.')
tempIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 46242, 3, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535)))
if mibBuilder.loadTexts: tempIndex.setStatus('current')
if mibBuilder.loadTexts: tempIndex.setDescription('Integer reference number (row number) for the temp mib.')
tempDescription = MibTableColumn((1, 3, 6, 1, 4, 1, 46242, 3, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: tempDescription.setStatus('current')
if mibBuilder.loadTexts: tempDescription.setDescription('Description of this temperature sensor')
temp = MibTableColumn((1, 3, 6, 1, 4, 1, 46242, 3, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: temp.setStatus('current')
if mibBuilder.loadTexts: temp.setDescription('The current temperature for this sensor')
voltageTable = MibTable((1, 3, 6, 1, 4, 1, 46242, 4), )
if mibBuilder.loadTexts: voltageTable.setStatus('current')
if mibBuilder.loadTexts: voltageTable.setDescription('Voltage watching information.')
voltageEntry = MibTableRow((1, 3, 6, 1, 4, 1, 46242, 4, 1), ).setIndexNames((0, "NETONIX-SWITCH-MIB", "voltageIndex"))
if mibBuilder.loadTexts: voltageEntry.setStatus('current')
if mibBuilder.loadTexts: voltageEntry.setDescription('An entry containing a voltage sensor.')
voltageIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 46242, 4, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535)))
if mibBuilder.loadTexts: voltageIndex.setStatus('current')
if mibBuilder.loadTexts: voltageIndex.setDescription('Integer reference number (row number) for the voltage mib.')
voltageDescription = MibTableColumn((1, 3, 6, 1, 4, 1, 46242, 4, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: voltageDescription.setStatus('current')
if mibBuilder.loadTexts: voltageDescription.setDescription('Description of this voltage sensor')
voltage = MibTableColumn((1, 3, 6, 1, 4, 1, 46242, 4, 1, 3), VoltageTC()).setMaxAccess("readonly")
if mibBuilder.loadTexts: voltage.setStatus('current')
if mibBuilder.loadTexts: voltage.setDescription('The current voltage for this sensor')
mibBuilder.exportSymbols("NETONIX-SWITCH-MIB", VoltageTC=VoltageTC, netonixSwitchGroup=netonixSwitchGroup, dcdcEfficiency=dcdcEfficiency, voltageIndex=voltageIndex, voltage=voltage, firmwareVersion=firmwareVersion, netonixSwitchConformance=netonixSwitchConformance, tempTable=tempTable, fanIndex=fanIndex, voltageEntry=voltageEntry, tempDescription=tempDescription, tempIndex=tempIndex, fanTable=fanTable, poeStatusIndex=poeStatusIndex, netonixSwitchCompliances=netonixSwitchCompliances, netonixSwitch=netonixSwitch, fanEntry=fanEntry, CurrentTC=CurrentTC, netonixSwitchGroups=netonixSwitchGroups, dcdcInputCurrent=dcdcInputCurrent, netonixSwitchCompliance=netonixSwitchCompliance, fanSpeed=fanSpeed, poeStatusEntry=poeStatusEntry, voltageDescription=voltageDescription, totalPowerConsumption=totalPowerConsumption, PYSNMP_MODULE_ID=netonixSwitch, poeStatus=poeStatus, voltageTable=voltageTable, tempEntry=tempEntry, poeStatusTable=poeStatusTable, temp=temp, PowerTC=PowerTC)
| (octet_string, integer, object_identifier) = mibBuilder.importSymbols('ASN1', 'OctetString', 'Integer', 'ObjectIdentifier')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(single_value_constraint, value_range_constraint, value_size_constraint, constraints_union, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'SingleValueConstraint', 'ValueRangeConstraint', 'ValueSizeConstraint', 'ConstraintsUnion', 'ConstraintsIntersection')
(object_group, notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'ObjectGroup', 'NotificationGroup', 'ModuleCompliance')
(snmp_mib_groups,) = mibBuilder.importSymbols('SNMPv2-MIB', 'snmpMIBGroups')
(unsigned32, object_identity, module_identity, counter64, ip_address, gauge32, iso, bits, counter32, mib_identifier, integer32, mib_scalar, mib_table, mib_table_row, mib_table_column, time_ticks, enterprises, notification_type) = mibBuilder.importSymbols('SNMPv2-SMI', 'Unsigned32', 'ObjectIdentity', 'ModuleIdentity', 'Counter64', 'IpAddress', 'Gauge32', 'iso', 'Bits', 'Counter32', 'MibIdentifier', 'Integer32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'TimeTicks', 'enterprises', 'NotificationType')
(display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention')
netonix_switch = module_identity((1, 3, 6, 1, 4, 1, 46242))
netonixSwitch.setRevisions(('1998-03-23 18:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts:
netonixSwitch.setRevisionsDescriptions(('The MIB Module for Netonix Switches.',))
if mibBuilder.loadTexts:
netonixSwitch.setLastUpdated('9803231800Z')
if mibBuilder.loadTexts:
netonixSwitch.setOrganization('Netonix')
if mibBuilder.loadTexts:
netonixSwitch.setContactInfo('[email protected]')
if mibBuilder.loadTexts:
netonixSwitch.setDescription('The MIB Module for Netonix Switches.')
netonix_switch_group = object_group((1, 3, 6, 1, 6, 3, 1, 2, 2, 8)).setObjects(('NETONIX-SWITCH-MIB', 'firmwareVersion'), ('NETONIX-SWITCH-MIB', 'fanSpeed'), ('NETONIX-SWITCH-MIB', 'tempDescription'), ('NETONIX-SWITCH-MIB', 'temp'), ('NETONIX-SWITCH-MIB', 'voltageDescription'), ('NETONIX-SWITCH-MIB', 'voltage'), ('NETONIX-SWITCH-MIB', 'poeStatus'), ('NETONIX-SWITCH-MIB', 'totalPowerConsumption'), ('NETONIX-SWITCH-MIB', 'dcdcInputCurrent'), ('NETONIX-SWITCH-MIB', 'dcdcEfficiency'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
netonix_switch_group = netonixSwitchGroup.setStatus('current')
if mibBuilder.loadTexts:
netonixSwitchGroup.setDescription('A collection of objects providing basic instrumentation and control of an SNMPv2 entity.')
netonix_switch_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 46242, 99))
netonix_switch_groups = mib_identifier((1, 3, 6, 1, 4, 1, 46242, 99, 1))
netonix_switch_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 46242, 99, 2))
netonix_switch_compliance = module_compliance((1, 3, 6, 1, 4, 1, 46242, 99, 2, 1)).setObjects(('NETONIX-SWITCH-MIB', 'netonixSwitchGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
netonix_switch_compliance = netonixSwitchCompliance.setStatus('current')
if mibBuilder.loadTexts:
netonixSwitchCompliance.setDescription('The compliance statement for switches which implement the Netonix Switch MIB.')
class Voltagetc(TextualConvention, Integer32):
description = 'A voltage with 2 decimal places'
status = 'current'
display_hint = 'd-2'
class Powertc(TextualConvention, Integer32):
description = 'Power consumption in watts with 1 decimal place'
status = 'current'
display_hint = 'd-1'
class Currenttc(TextualConvention, Integer32):
description = 'Current in amps with 1 decimal place'
status = 'current'
display_hint = 'd-1'
firmware_version = mib_scalar((1, 3, 6, 1, 4, 1, 46242, 1), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
firmwareVersion.setStatus('current')
if mibBuilder.loadTexts:
firmwareVersion.setDescription('The version of the firmware running on the switch')
total_power_consumption = mib_scalar((1, 3, 6, 1, 4, 1, 46242, 6), power_tc()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
totalPowerConsumption.setStatus('current')
if mibBuilder.loadTexts:
totalPowerConsumption.setDescription('Total power being consumed by the switch, in Watts')
dcdc_input_current = mib_scalar((1, 3, 6, 1, 4, 1, 46242, 7), current_tc()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dcdcInputCurrent.setStatus('current')
if mibBuilder.loadTexts:
dcdcInputCurrent.setDescription('DCDC Input Current in amps')
dcdc_efficiency = mib_scalar((1, 3, 6, 1, 4, 1, 46242, 8), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dcdcEfficiency.setStatus('current')
if mibBuilder.loadTexts:
dcdcEfficiency.setDescription('DCDC power supply efficiency, percentage')
fan_table = mib_table((1, 3, 6, 1, 4, 1, 46242, 2))
if mibBuilder.loadTexts:
fanTable.setStatus('current')
if mibBuilder.loadTexts:
fanTable.setDescription('Fan watching information.')
fan_entry = mib_table_row((1, 3, 6, 1, 4, 1, 46242, 2, 1)).setIndexNames((0, 'NETONIX-SWITCH-MIB', 'fanIndex'))
if mibBuilder.loadTexts:
fanEntry.setStatus('current')
if mibBuilder.loadTexts:
fanEntry.setDescription('An entry containing a disk and its statistics.')
fan_index = mib_table_column((1, 3, 6, 1, 4, 1, 46242, 2, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535)))
if mibBuilder.loadTexts:
fanIndex.setStatus('current')
if mibBuilder.loadTexts:
fanIndex.setDescription('Integer reference number (row number) for the fan mib.')
fan_speed = mib_table_column((1, 3, 6, 1, 4, 1, 46242, 2, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
fanSpeed.setStatus('current')
if mibBuilder.loadTexts:
fanSpeed.setDescription('Integer reference number (row number) for the fan mib.')
poe_status_table = mib_table((1, 3, 6, 1, 4, 1, 46242, 5))
if mibBuilder.loadTexts:
poeStatusTable.setStatus('current')
if mibBuilder.loadTexts:
poeStatusTable.setDescription('PoE Status per port.')
poe_status_entry = mib_table_row((1, 3, 6, 1, 4, 1, 46242, 5, 1)).setIndexNames((0, 'NETONIX-SWITCH-MIB', 'poeStatusIndex'))
if mibBuilder.loadTexts:
poeStatusEntry.setStatus('current')
if mibBuilder.loadTexts:
poeStatusEntry.setDescription('An entry containing poe status.')
poe_status_index = mib_table_column((1, 3, 6, 1, 4, 1, 46242, 5, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535)))
if mibBuilder.loadTexts:
poeStatusIndex.setStatus('current')
if mibBuilder.loadTexts:
poeStatusIndex.setDescription('Integer reference number (row number) for the poe status.')
poe_status = mib_table_column((1, 3, 6, 1, 4, 1, 46242, 5, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
poeStatus.setStatus('current')
if mibBuilder.loadTexts:
poeStatus.setDescription('poe status.')
temp_table = mib_table((1, 3, 6, 1, 4, 1, 46242, 3))
if mibBuilder.loadTexts:
tempTable.setStatus('current')
if mibBuilder.loadTexts:
tempTable.setDescription('Temperature watching information.')
temp_entry = mib_table_row((1, 3, 6, 1, 4, 1, 46242, 3, 1)).setIndexNames((0, 'NETONIX-SWITCH-MIB', 'tempIndex'))
if mibBuilder.loadTexts:
tempEntry.setStatus('current')
if mibBuilder.loadTexts:
tempEntry.setDescription('An entry containing a temperature sensor.')
temp_index = mib_table_column((1, 3, 6, 1, 4, 1, 46242, 3, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535)))
if mibBuilder.loadTexts:
tempIndex.setStatus('current')
if mibBuilder.loadTexts:
tempIndex.setDescription('Integer reference number (row number) for the temp mib.')
temp_description = mib_table_column((1, 3, 6, 1, 4, 1, 46242, 3, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
tempDescription.setStatus('current')
if mibBuilder.loadTexts:
tempDescription.setDescription('Description of this temperature sensor')
temp = mib_table_column((1, 3, 6, 1, 4, 1, 46242, 3, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
temp.setStatus('current')
if mibBuilder.loadTexts:
temp.setDescription('The current temperature for this sensor')
voltage_table = mib_table((1, 3, 6, 1, 4, 1, 46242, 4))
if mibBuilder.loadTexts:
voltageTable.setStatus('current')
if mibBuilder.loadTexts:
voltageTable.setDescription('Voltage watching information.')
voltage_entry = mib_table_row((1, 3, 6, 1, 4, 1, 46242, 4, 1)).setIndexNames((0, 'NETONIX-SWITCH-MIB', 'voltageIndex'))
if mibBuilder.loadTexts:
voltageEntry.setStatus('current')
if mibBuilder.loadTexts:
voltageEntry.setDescription('An entry containing a voltage sensor.')
voltage_index = mib_table_column((1, 3, 6, 1, 4, 1, 46242, 4, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535)))
if mibBuilder.loadTexts:
voltageIndex.setStatus('current')
if mibBuilder.loadTexts:
voltageIndex.setDescription('Integer reference number (row number) for the voltage mib.')
voltage_description = mib_table_column((1, 3, 6, 1, 4, 1, 46242, 4, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
voltageDescription.setStatus('current')
if mibBuilder.loadTexts:
voltageDescription.setDescription('Description of this voltage sensor')
voltage = mib_table_column((1, 3, 6, 1, 4, 1, 46242, 4, 1, 3), voltage_tc()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
voltage.setStatus('current')
if mibBuilder.loadTexts:
voltage.setDescription('The current voltage for this sensor')
mibBuilder.exportSymbols('NETONIX-SWITCH-MIB', VoltageTC=VoltageTC, netonixSwitchGroup=netonixSwitchGroup, dcdcEfficiency=dcdcEfficiency, voltageIndex=voltageIndex, voltage=voltage, firmwareVersion=firmwareVersion, netonixSwitchConformance=netonixSwitchConformance, tempTable=tempTable, fanIndex=fanIndex, voltageEntry=voltageEntry, tempDescription=tempDescription, tempIndex=tempIndex, fanTable=fanTable, poeStatusIndex=poeStatusIndex, netonixSwitchCompliances=netonixSwitchCompliances, netonixSwitch=netonixSwitch, fanEntry=fanEntry, CurrentTC=CurrentTC, netonixSwitchGroups=netonixSwitchGroups, dcdcInputCurrent=dcdcInputCurrent, netonixSwitchCompliance=netonixSwitchCompliance, fanSpeed=fanSpeed, poeStatusEntry=poeStatusEntry, voltageDescription=voltageDescription, totalPowerConsumption=totalPowerConsumption, PYSNMP_MODULE_ID=netonixSwitch, poeStatus=poeStatus, voltageTable=voltageTable, tempEntry=tempEntry, poeStatusTable=poeStatusTable, temp=temp, PowerTC=PowerTC) |
###checks to see which elements in array1, a1, are substrings of elements in array2, a2###
###returns sorted array of these elements###
def in_array(a1, a2):
inArray = set()
for i in a1:
for x in a2:
if i in x:
inArray.add(i)
return sorted(inArray)
| def in_array(a1, a2):
in_array = set()
for i in a1:
for x in a2:
if i in x:
inArray.add(i)
return sorted(inArray) |
AI_TYPE_TO_ROLE = {"redis_ycsb": ("ycsb", "redis"), "hadoop": ("hadoopmaster", "hadoopslave"),
"linpack": ("linpack",), "wrk": ("wrk", "apache"), "filebench": ("filebench",),
"sysbench": ("sysbench", "mysql"),
#"unixbench": ("unixbench",), "netperf": ("netclient", "netserver"),
#"memtier": ("memtier", "redis"),
"multichase": ("multichase",),
"oldisim": ("oldisimdriver", "oldisimlb", "oldisimroot", "oldisimleaf"),
"open_daytrader": ("client_open_daytrader", "geronimo", "mysql")}
#"mongo_ycsb": ("ycsb", "mongos", "mongo_cfg_server", "mongodb")}
AI_ROLE_TO_TYPE = {role: t for t, roles in AI_TYPE_TO_ROLE.items() for role in roles}
AI_TYPE_TO_METRICS = {t: ("latency", "throughput") for t, _ in AI_TYPE_TO_ROLE.items()}
AI_TYPE_TO_METRICS_OVERRIDE = {"linpack": ("throughput",), "filebench": ("throughput",),
"unixbench": ("throughput",), "netperf": ("bandwidth",),
"multichase": ("throughput", "completion_time", "quiescent_time")}
AI_TYPE_TO_METRICS.update(AI_TYPE_TO_METRICS_OVERRIDE)
AI_ROLE_TO_COUNT = {role: 1 for role in AI_ROLE_TO_TYPE.keys()}
AI_ROLE_TO_COUNT_OVERRIDE = {"hadoopslave": 2, "mongodb": 3, "oldisimleaf": 2}
AI_ROLE_TO_COUNT.update(AI_ROLE_TO_COUNT_OVERRIDE)
def getPerfColName(t):
m = AI_TYPE_TO_METRICS[t][0]
metric = f"avg_{m}_rescaled"
if m == "throughput":
metric = f"{metric}_inverse"
return metric
| ai_type_to_role = {'redis_ycsb': ('ycsb', 'redis'), 'hadoop': ('hadoopmaster', 'hadoopslave'), 'linpack': ('linpack',), 'wrk': ('wrk', 'apache'), 'filebench': ('filebench',), 'sysbench': ('sysbench', 'mysql'), 'multichase': ('multichase',), 'oldisim': ('oldisimdriver', 'oldisimlb', 'oldisimroot', 'oldisimleaf'), 'open_daytrader': ('client_open_daytrader', 'geronimo', 'mysql')}
ai_role_to_type = {role: t for (t, roles) in AI_TYPE_TO_ROLE.items() for role in roles}
ai_type_to_metrics = {t: ('latency', 'throughput') for (t, _) in AI_TYPE_TO_ROLE.items()}
ai_type_to_metrics_override = {'linpack': ('throughput',), 'filebench': ('throughput',), 'unixbench': ('throughput',), 'netperf': ('bandwidth',), 'multichase': ('throughput', 'completion_time', 'quiescent_time')}
AI_TYPE_TO_METRICS.update(AI_TYPE_TO_METRICS_OVERRIDE)
ai_role_to_count = {role: 1 for role in AI_ROLE_TO_TYPE.keys()}
ai_role_to_count_override = {'hadoopslave': 2, 'mongodb': 3, 'oldisimleaf': 2}
AI_ROLE_TO_COUNT.update(AI_ROLE_TO_COUNT_OVERRIDE)
def get_perf_col_name(t):
m = AI_TYPE_TO_METRICS[t][0]
metric = f'avg_{m}_rescaled'
if m == 'throughput':
metric = f'{metric}_inverse'
return metric |
def permutation(input_list):
if len(input_list) == 0:
return []
elif len(input_list) == 1:
return [input_list]
else:
result = []
for i in range(len(input_list)):
element = input_list[i]
other_elements = input_list[:i] + input_list[i + 1:]
for p in permutation(other_elements):
result.append([element] + p)
return result
def permutation2(input_list):
if len(input_list) == 0:
yield []
elif len(input_list) == 1:
yield input_list
else:
for i in range(len(input_list)):
element = input_list[i]
other_elements = input_list[:i] + input_list[i + 1:]
for p in permutation2(other_elements):
yield [element] + p
| def permutation(input_list):
if len(input_list) == 0:
return []
elif len(input_list) == 1:
return [input_list]
else:
result = []
for i in range(len(input_list)):
element = input_list[i]
other_elements = input_list[:i] + input_list[i + 1:]
for p in permutation(other_elements):
result.append([element] + p)
return result
def permutation2(input_list):
if len(input_list) == 0:
yield []
elif len(input_list) == 1:
yield input_list
else:
for i in range(len(input_list)):
element = input_list[i]
other_elements = input_list[:i] + input_list[i + 1:]
for p in permutation2(other_elements):
yield ([element] + p) |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
def main():
REAL_FLAG = "oren_ctf_spectre!"
FAKE_FLAG = "oren_ctf_z3r0d4y!"
license = [chr(ord(c1) ^ ord(c2)) for c1,c2 in zip(REAL_FLAG, FAKE_FLAG)]
with open('license.bin', 'wb') as licensefile:
for byte in license:
licensefile.write(bytes(byte, 'utf-8'))
if __name__ == "__main__":
main()
| def main():
real_flag = 'oren_ctf_spectre!'
fake_flag = 'oren_ctf_z3r0d4y!'
license = [chr(ord(c1) ^ ord(c2)) for (c1, c2) in zip(REAL_FLAG, FAKE_FLAG)]
with open('license.bin', 'wb') as licensefile:
for byte in license:
licensefile.write(bytes(byte, 'utf-8'))
if __name__ == '__main__':
main() |
class OUTGOING:
TOKEN = 'token'
TEAM_ID = 'team_id'
TEAM_DOMAIN = 'team_domain'
CHANNEL_ID = 'channel_id'
CHANNEL_NAME = 'channel_name'
TIMESTAMP = 'timestamp'
USER_ID = 'user_id'
USER_NAME = 'user_name'
TEXT = 'text'
TRIGGER_WORD = 'trigger_word'
class INCOMING:
USER_NAME = 'username'
TEXT = 'text'
ICON_URL = 'icon_url'
ICON_EMOJI = 'icon_emoji'
| class Outgoing:
token = 'token'
team_id = 'team_id'
team_domain = 'team_domain'
channel_id = 'channel_id'
channel_name = 'channel_name'
timestamp = 'timestamp'
user_id = 'user_id'
user_name = 'user_name'
text = 'text'
trigger_word = 'trigger_word'
class Incoming:
user_name = 'username'
text = 'text'
icon_url = 'icon_url'
icon_emoji = 'icon_emoji' |
ODL_IP = "127.0.0.1"
ODL_PORT = "8181"
ODL_USER = "admin"
ODL_PASS = "admin"
| odl_ip = '127.0.0.1'
odl_port = '8181'
odl_user = 'admin'
odl_pass = 'admin' |
def arithmetic_arranger(problems, solutions = False):
if len(problems) > 5:
return 'Error: Too many problems.'
problem_list = []
for prob in problems:
output = ''
arr = prob.split(' ')
if arr[1] != '+' or arr[1] != '+':
return "Error: Operator must be '+' or '-'."
if arr[0].isdigit() == False or arr[2].isdigit() == False:
return "Error: Numbers must only contain digits."
if len(arr[0]) > 4 or len(arr[2]) > 4:
return "Error: Numbers cannot be more than four digits."
max_digits = max([len(arr[0]), len(arr[2])])
for space in range(max_digits - len(arr[0])):
output += ' '
output += arr[0] + '\n'
output += arr[1] + ' '
for space in range(max_digits - len(arr[2])):
output += ' '
output += arr[2] + '\n'
for space in range(max_digits):
output += '-'
output += '\n'
if solutions:
if arr[1] == '+':
solution = (arr[0]) + int(arr[1])
else:
solution = (arr[0]) - int(arr[1])
output += str(solution)
problem_list.append(output)
return problem_list.split(' ')
| def arithmetic_arranger(problems, solutions=False):
if len(problems) > 5:
return 'Error: Too many problems.'
problem_list = []
for prob in problems:
output = ''
arr = prob.split(' ')
if arr[1] != '+' or arr[1] != '+':
return "Error: Operator must be '+' or '-'."
if arr[0].isdigit() == False or arr[2].isdigit() == False:
return 'Error: Numbers must only contain digits.'
if len(arr[0]) > 4 or len(arr[2]) > 4:
return 'Error: Numbers cannot be more than four digits.'
max_digits = max([len(arr[0]), len(arr[2])])
for space in range(max_digits - len(arr[0])):
output += ' '
output += arr[0] + '\n'
output += arr[1] + ' '
for space in range(max_digits - len(arr[2])):
output += ' '
output += arr[2] + '\n'
for space in range(max_digits):
output += '-'
output += '\n'
if solutions:
if arr[1] == '+':
solution = arr[0] + int(arr[1])
else:
solution = arr[0] - int(arr[1])
output += str(solution)
problem_list.append(output)
return problem_list.split(' ') |
_, ax = plt.subplots(figsize=(8, 8))
ax = sns.kdeplot(
data=X_train_scaled,
x="Culmen Length (mm)",
y="Culmen Depth (mm)",
levels=10,
fill=True,
cmap=plt.cm.viridis,
ax=ax,
)
_ = ax.axis("square")
| (_, ax) = plt.subplots(figsize=(8, 8))
ax = sns.kdeplot(data=X_train_scaled, x='Culmen Length (mm)', y='Culmen Depth (mm)', levels=10, fill=True, cmap=plt.cm.viridis, ax=ax)
_ = ax.axis('square') |
def doiList():
return [
"10.1016/j.jksuci.2019.05.004", # ScienceDirect good example
"10.1016/j.eswa.2019.04.070"
]
| def doi_list():
return ['10.1016/j.jksuci.2019.05.004', '10.1016/j.eswa.2019.04.070'] |
class IPGroup():
def __init__(self, key, packet_count, total_packet_size, process_number):
self.packet_count = packet_count
self.total_packet_size = total_packet_size
self.process_number = process_number
self.groupname = key
@property
def averagePacketSize(self):
return self.total_packet_size / self.packet_count
@property
def averagePacketCountPerProcess(self):
return self.packet_count / self.process_number | class Ipgroup:
def __init__(self, key, packet_count, total_packet_size, process_number):
self.packet_count = packet_count
self.total_packet_size = total_packet_size
self.process_number = process_number
self.groupname = key
@property
def average_packet_size(self):
return self.total_packet_size / self.packet_count
@property
def average_packet_count_per_process(self):
return self.packet_count / self.process_number |
# Specifies the login method to use -- whether the user logs in by entering
# his username, e-mail address, or either one of both. Possible values
# are 'username' | 'email' | 'username_email'
# ACCOUNT_AUTHENTICATION_METHOD
# The URL to redirect to after a successful e-mail confirmation, in case no
# user is logged in. Default value is settings.LOGIN_URL.
# ACCOUNT_EMAIL_CONFIRMATION_ANONYMOUS_REDIRECT_URL
# The URL to redirect to after a successful e-mail confirmation, in case of
# an authenticated user. Default is settings.LOGIN_REDIRECT_URL
# ACCOUNT_EMAIL_CONFIRMATION_AUTHENTICATED_REDIRECT_URL
# Determines the expiration date of email confirmation mails (# of days).
# ACCOUNT_EMAIL_CONFIRMATION_EXPIRE_DAYS = 3
# The user is required to hand over an e-mail address when signing up.
ACCOUNT_EMAIL_REQUIRED = True
# Determines the e-mail verification method during signup. When set to
# "mandatory" the user is blocked from logging in until the email
# address is verified. Choose "optional" or "none" to allow logins
# with an unverified e-mail address. In case of "optional", the e-mail
# verification mail is still sent, whereas in case of "none" no e-mail
# verification mails are sent.
ACCOUNT_EMAIL_VERIFICATION = "optional"
# Subject-line prefix to use for email messages sent. By default, the name
# of the current Site (django.contrib.sites) is used.
# ACCOUNT_EMAIL_SUBJECT_PREFIX = '[Site] '
# A string pointing to a custom form class (e.g. 'myapp.forms.SignupForm')
# that is used during signup to ask the user for additional input
# (e.g. newsletter signup, birth date). This class should implement a
# 'save' method, accepting the newly signed up user as its only parameter.
# ACCOUNT_SIGNUP_FORM_CLASS = None
# When signing up, let the user type in his password twice to avoid typ-o's.
# ACCOUNT_SIGNUP_PASSWORD_VERIFICATION = True
# Enforce uniqueness of e-mail addresses.
ACCOUNT_UNIQUE_EMAIL = True
# A callable (or string of the form 'some.module.callable_name') that takes
# a user as its only argument and returns the display name of the user. The
# default implementation returns user.username.
# ACCOUNT_USER_DISPLAY
# An integer specifying the minimum allowed length of a username.
# ACCOUNT_USERNAME_MIN_LENGTH = 1
# The user is required to enter a username when signing up. Note that the
# user will be asked to do so even if ACCOUNT_AUTHENTICATION_METHOD is set
# to email. Set to False when you do not wish to prompt the user to enter a
# username.
ACCOUNT_USERNAME_REQUIRED = True
# render_value parameter as passed to PasswordInput fields.
# ACCOUNT_PASSWORD_INPUT_RENDER_VALUE = False
# An integer specifying the minimum password length.
ACCOUNT_PASSWORD_MIN_LENGTH = 6
# Request e-mail address from 3rd party account provider? E.g. using OpenID
# AX, or the Facebook 'email' permission.
# SOCIALACCOUNT_QUERY_EMAIL = ACCOUNT_EMAIL_REQUIRED
# Attempt to bypass the signup form by using fields (e.g. username, email)
# retrieved from the social account provider. If a conflict arises due to a
# duplicate e-mail address the signup form will still kick in.
# SOCIALACCOUNT_AUTO_SIGNUP = True
# Enable support for django-avatar. When enabled, the profile image of the
# user is copied locally into django-avatar at signup. Default is
# 'avatar' in settings.INSTALLED_APPS.
# SOCIALACCOUNT_AVATAR_SUPPORT
# Dictionary containing provider specific settings.
SOCIALACCOUNT_PROVIDERS = {
'google': {
'SCOPE': [
'profile',
'email',
],
'AUTH_PARAMS': {
'access_type': 'online',
}
},
'facebook': {
'METHOD': 'oauth2',
'SCOPE': ['email', 'public_profile', 'user_friends'],
'AUTH_PARAMS': {'auth_type': 'reauthenticate'},
'INIT_PARAMS': {'cookie': True},
'FIELDS': [
'id',
'email',
'name',
'first_name',
'last_name',
'verified',
'locale',
'timezone',
'link',
'gender',
'updated_time',
],
'EXCHANGE_TOKEN': True,
'VERIFIED_EMAIL': False,
'VERSION': 'v2.4',
},
'github': {
'SCOPE': [
'user',
'repo',
'read:org',
],
},
}
| account_email_required = True
account_email_verification = 'optional'
account_unique_email = True
account_username_required = True
account_password_min_length = 6
socialaccount_providers = {'google': {'SCOPE': ['profile', 'email'], 'AUTH_PARAMS': {'access_type': 'online'}}, 'facebook': {'METHOD': 'oauth2', 'SCOPE': ['email', 'public_profile', 'user_friends'], 'AUTH_PARAMS': {'auth_type': 'reauthenticate'}, 'INIT_PARAMS': {'cookie': True}, 'FIELDS': ['id', 'email', 'name', 'first_name', 'last_name', 'verified', 'locale', 'timezone', 'link', 'gender', 'updated_time'], 'EXCHANGE_TOKEN': True, 'VERIFIED_EMAIL': False, 'VERSION': 'v2.4'}, 'github': {'SCOPE': ['user', 'repo', 'read:org']}} |
'''
A Popular Strategy Using Autocorrelation
One puzzling anomaly with stocks is that investors tend to overreact to news. Following large jumps, either up or down, stock prices tend to reverse. This is described as mean reversion in stock prices: prices tend to bounce back, or revert, towards previous levels after large moves, which are observed over time horizons of about a week. A more mathematical way to describe mean reversion is to say that stock returns are negatively autocorrelated.
This simple idea is actually the basis for a popular hedge fund strategy. If you're curious to learn more about this hedge fund strategy (although it's not necessary reading for anything else later in the course), see here.
You'll look at the autocorrelation of weekly returns of MSFT stock from 2012 to 2017. You'll start with a DataFrame MSFT of daily prices. You should use the .resample() method to get weekly prices and then compute returns from prices. Use the pandas method .autocorr() to get the autocorrelation and show that the autocorrelation is negative. Note that the .autocorr() method only works on Series, not DataFrames (even DataFrames with one column), so you will have to select the column in the DataFrame.
INSTRUCTIONS
100XP
INSTRUCTIONS
100XP
Use the .resample() method with rule='W' and how='last'to convert daily data to weekly data.
Create a new DataFrame, returns, of percent changes in weekly prices using the .pct_change() method.
Compute the autocorrelation using the .autocorr() method on the series of closing stock prices, which is the column Adj Close in the DataFrame returns.
'''
# Convert the daily data to weekly data
MSFT = MSFT.resample(rule='w',how='last')
# Compute the percentage change of prices
returns = MSFT.pct_change()
# Compute and print the autocorrelation of returns
autocorrelation = returns['Adj Close'].autocorr()
print("The autocorrelation of weekly returns is %4.2f" %(autocorrelation)) | """
A Popular Strategy Using Autocorrelation
One puzzling anomaly with stocks is that investors tend to overreact to news. Following large jumps, either up or down, stock prices tend to reverse. This is described as mean reversion in stock prices: prices tend to bounce back, or revert, towards previous levels after large moves, which are observed over time horizons of about a week. A more mathematical way to describe mean reversion is to say that stock returns are negatively autocorrelated.
This simple idea is actually the basis for a popular hedge fund strategy. If you're curious to learn more about this hedge fund strategy (although it's not necessary reading for anything else later in the course), see here.
You'll look at the autocorrelation of weekly returns of MSFT stock from 2012 to 2017. You'll start with a DataFrame MSFT of daily prices. You should use the .resample() method to get weekly prices and then compute returns from prices. Use the pandas method .autocorr() to get the autocorrelation and show that the autocorrelation is negative. Note that the .autocorr() method only works on Series, not DataFrames (even DataFrames with one column), so you will have to select the column in the DataFrame.
INSTRUCTIONS
100XP
INSTRUCTIONS
100XP
Use the .resample() method with rule='W' and how='last'to convert daily data to weekly data.
Create a new DataFrame, returns, of percent changes in weekly prices using the .pct_change() method.
Compute the autocorrelation using the .autocorr() method on the series of closing stock prices, which is the column Adj Close in the DataFrame returns.
"""
msft = MSFT.resample(rule='w', how='last')
returns = MSFT.pct_change()
autocorrelation = returns['Adj Close'].autocorr()
print('The autocorrelation of weekly returns is %4.2f' % autocorrelation) |
# Colors
blue = '#377EB8'
red = '#E41A1C'
green = '#4DAF4A'
| blue = '#377EB8'
red = '#E41A1C'
green = '#4DAF4A' |
class ConfigClass:
def __init__(self):
# link to a zip file in google drive with your pretrained model
self._model_url = "https://drive.google.com/file/d/14VduVhV12k1mgLJMJ0WMhtRlFqwqMKtN/view?usp=sharing"
# False/True flag indicating whether the testing system will download
# and overwrite the existing model files. In other words, keep this as
# False until you update the model, submit with True to download
# the updated model (with a valid model_url), then turn back to False
# in subsequent submissions to avoid the slow downloading of the large
# model file with every submission.
self._download_model = True
self.corpusPath = ''
self.savedFileMainFolder = ''
self.saveFilesWithStem = self.savedFileMainFolder + "/WithStem"
self.saveFilesWithoutStem = self.savedFileMainFolder + "/WithoutStem"
self.toStem = False
print('Project was created successfully..')
def get__corpusPath(self):
return self.corpusPath
def get_model_url(self):
return self._model_url
def get_download_model(self):
return self._download_model
| class Configclass:
def __init__(self):
self._model_url = 'https://drive.google.com/file/d/14VduVhV12k1mgLJMJ0WMhtRlFqwqMKtN/view?usp=sharing'
self._download_model = True
self.corpusPath = ''
self.savedFileMainFolder = ''
self.saveFilesWithStem = self.savedFileMainFolder + '/WithStem'
self.saveFilesWithoutStem = self.savedFileMainFolder + '/WithoutStem'
self.toStem = False
print('Project was created successfully..')
def get__corpus_path(self):
return self.corpusPath
def get_model_url(self):
return self._model_url
def get_download_model(self):
return self._download_model |
'''4. Write a Python program to add two positive integers without using the '+' operator.
Note: Use bit wise operations to add two numbers.'''
num1 = 4
num2 = 34
num3 = num1.__add__(num2)
print(num3) | """4. Write a Python program to add two positive integers without using the '+' operator.
Note: Use bit wise operations to add two numbers."""
num1 = 4
num2 = 34
num3 = num1.__add__(num2)
print(num3) |
__copyright__ = "Copyright 2019, RISE Research Institutes of Sweden"
__author__ = "Naveed Anwar Bhatti and Martina Brachmann"
def maprange(a, b, s):
'''
Maps an input value to an ouput value depending on a sensors' and actuators's range
Parameters
----------
a : tupel (float, float)
the sensors' known/given range (from, to)
b : tupel (float, float)
the actuators' known/given range (from, to)
s : float
current input value
Returns
-------
float : the mapped value
'''
(a1, a2), (b1, b2) = a, b
return b1 + ((s - a1) * (b2 - b1) / (a2 - a1))
def maprange_by_factor(a, b, s, fac):
return maprange(a, b, s * fac)
def maprange_by_hop_factor(a, b, s, h_f):
(hops, factor) = h_f
fac = 1
for hop in range(1, hops+1):
factor = factor / hop
fac = fac + factor
return maprange_by_factor(a, b, s, fac)
def maprange_by_neighbor(a, b, s, neighbor):
pass | __copyright__ = 'Copyright 2019, RISE Research Institutes of Sweden'
__author__ = 'Naveed Anwar Bhatti and Martina Brachmann'
def maprange(a, b, s):
"""
Maps an input value to an ouput value depending on a sensors' and actuators's range
Parameters
----------
a : tupel (float, float)
the sensors' known/given range (from, to)
b : tupel (float, float)
the actuators' known/given range (from, to)
s : float
current input value
Returns
-------
float : the mapped value
"""
((a1, a2), (b1, b2)) = (a, b)
return b1 + (s - a1) * (b2 - b1) / (a2 - a1)
def maprange_by_factor(a, b, s, fac):
return maprange(a, b, s * fac)
def maprange_by_hop_factor(a, b, s, h_f):
(hops, factor) = h_f
fac = 1
for hop in range(1, hops + 1):
factor = factor / hop
fac = fac + factor
return maprange_by_factor(a, b, s, fac)
def maprange_by_neighbor(a, b, s, neighbor):
pass |
class Card:
def __init__(self,rank,suit): # instance recevies two parameters rank and suit
self.rank = rank
self.suit = suit
self.rank_list = ['2', '3', '4', '5', '6', '7', '8', '9', 'T', 'J', 'Q', 'K', 'A'] # a list contains all ranks
self.suit_list = ['H', 'C', 'D', 'S'] # a list containing all suits
assert self.rank.upper() in self.rank_list, 'Invalid Rank' # checks if the rank is in the list, not case sensitive
assert self.suit.upper() in self.suit_list, 'Invalid Suit' # checks if the suit is in the list, not case sensitive
def get(self): # returns rank and the suit
return self.rank+self.suit
def get_rank(self): # returns rank
return self.rank
def get_suit(self): # returns suit
return self.suit
def __gt__(self,other): # checks if the rank of the passed card is smaller
for i in range(len(self.rank_list)): # ranks are ordered in increasing order in self.rank_list, so higher the rank, higher the index
if self.rank_list[i] == self.rank: # checks for the rank in the list and stores the index
rank = i
if self.rank_list[i] == other.rank:
rank_other = i
return rank > rank_other # compares the index to determines if the passed card's rank is smaller or greater
def __lt__(self,other): # checks if the rank of the passed card is greater
for i in range(len(self.rank_list)): # ranks are ordered in increasing order in self.rank_list, so higher the rank, higher the index
if self.rank_list[i] == self.rank: # checks for the rank in the list and stores the index
rank = i
if self.rank_list[i] == other.rank:
rank_other = i
return rank < rank_other # compares the index to determines if the passed card's rank is smaller or greater
def __eq__(self,other):
return self.rank == other.rank # returns if the rank of the passed card is equal
def __str__(self): # converts card object to a printable form
return self.rank + self.suit
def convert_rank(self,rank): # converts rank accordding to its positon in the list, adds two to the index as the index counting starts from 0 in python and the ranks start from 2
for i in range(len(self.rank_list)):
if self.rank_list[i] == rank:
return i+2
| class Card:
def __init__(self, rank, suit):
self.rank = rank
self.suit = suit
self.rank_list = ['2', '3', '4', '5', '6', '7', '8', '9', 'T', 'J', 'Q', 'K', 'A']
self.suit_list = ['H', 'C', 'D', 'S']
assert self.rank.upper() in self.rank_list, 'Invalid Rank'
assert self.suit.upper() in self.suit_list, 'Invalid Suit'
def get(self):
return self.rank + self.suit
def get_rank(self):
return self.rank
def get_suit(self):
return self.suit
def __gt__(self, other):
for i in range(len(self.rank_list)):
if self.rank_list[i] == self.rank:
rank = i
if self.rank_list[i] == other.rank:
rank_other = i
return rank > rank_other
def __lt__(self, other):
for i in range(len(self.rank_list)):
if self.rank_list[i] == self.rank:
rank = i
if self.rank_list[i] == other.rank:
rank_other = i
return rank < rank_other
def __eq__(self, other):
return self.rank == other.rank
def __str__(self):
return self.rank + self.suit
def convert_rank(self, rank):
for i in range(len(self.rank_list)):
if self.rank_list[i] == rank:
return i + 2 |
n = 1
while True:
num = int(input(f"Enter value{n}: "))
if num == -99:
break
n += 1
print(f"You entered {n-1} numbers.") | n = 1
while True:
num = int(input(f'Enter value{n}: '))
if num == -99:
break
n += 1
print(f'You entered {n - 1} numbers.') |
while True:
n = int(input())
if n == -1:
break
last_elapsed = 0
distance = 0
for _ in range(n):
s, t = map(int, input().split())
_t = t - last_elapsed
distance += s * _t
last_elapsed = t
print(distance, "miles")
| while True:
n = int(input())
if n == -1:
break
last_elapsed = 0
distance = 0
for _ in range(n):
(s, t) = map(int, input().split())
_t = t - last_elapsed
distance += s * _t
last_elapsed = t
print(distance, 'miles') |
POSTGRES_DATA_TYPES = {
"int2": "smallint",
"integer": "integer",
"uuid": "uuid",
"string": "varchar",
"timestamp": "timestamp",
}
| postgres_data_types = {'int2': 'smallint', 'integer': 'integer', 'uuid': 'uuid', 'string': 'varchar', 'timestamp': 'timestamp'} |
def rotLeft(a, d):
for x in range(d):
temp = a[0]
a.pop(0)
a.append(temp)
return a
no_of_inputs = 5
no_of_rotation = 4
my_str = "1 2 3 4 5"
my_arr = [s for s in my_str.strip().split()]
print(rotLeft(my_arr, no_of_rotation))
| def rot_left(a, d):
for x in range(d):
temp = a[0]
a.pop(0)
a.append(temp)
return a
no_of_inputs = 5
no_of_rotation = 4
my_str = '1 2 3 4 5'
my_arr = [s for s in my_str.strip().split()]
print(rot_left(my_arr, no_of_rotation)) |
# We have tossed a coin a 6 times and saved the results in a list
# called heads_or_tails. The values are integers: 1 stands for a
# head, while 0 denotes a tail.
# Add some code to find out whether the list has any heads. Do
# not print the variable check, just store the result in it.
# Fingers crossed
check = any(heads_or_tails)# are there any heads in the list heads_or_tails | check = any(heads_or_tails) |
A, B, C = list(map(int, input().split()))
if C <= B:
print('-1')
else:
print(int(A / (C-B) + 1))
| (a, b, c) = list(map(int, input().split()))
if C <= B:
print('-1')
else:
print(int(A / (C - B) + 1)) |
'''
Intuition
----
Intuition is an engine, some building bricks and a set of tools meant to let
you efficiently and intuitively make your own automated quantitative trading
system. It is designed to let traders, developers and scientists explore,
improve and deploy market technical hacks.
:copyright (c) 2014 Xavier Bruhiere
:license: Apache 2.0, see LICENSE for more details.
'''
__project__ = 'intuition'
__author__ = 'Xavier Bruhiere'
__copyright__ = 'Xavier Bruhiere'
__licence__ = 'Apache 2.0'
__version__ = '0.4.0'
| """
Intuition
----
Intuition is an engine, some building bricks and a set of tools meant to let
you efficiently and intuitively make your own automated quantitative trading
system. It is designed to let traders, developers and scientists explore,
improve and deploy market technical hacks.
:copyright (c) 2014 Xavier Bruhiere
:license: Apache 2.0, see LICENSE for more details.
"""
__project__ = 'intuition'
__author__ = 'Xavier Bruhiere'
__copyright__ = 'Xavier Bruhiere'
__licence__ = 'Apache 2.0'
__version__ = '0.4.0' |
#assignment2 homework1
student1=input("Enter student name1:")
student2=input("Enter student name2:")
student3=input("Enter student name3:")
print("Student1 Name is:"+student1+"\n"+"Student2 Name is:"+student2+"\n"+"Student3 Name is:"+student3)
#assignment2 homework2
def function1():
print("Function1 output:",age)
def function2():
age=30
print("Function2 output:",age)
def function3():
global age
age=40
print("Function3 output:",age)
age=20
function1()
function2()
function3()
print("Outside function output:",age)
| student1 = input('Enter student name1:')
student2 = input('Enter student name2:')
student3 = input('Enter student name3:')
print('Student1 Name is:' + student1 + '\n' + 'Student2 Name is:' + student2 + '\n' + 'Student3 Name is:' + student3)
def function1():
print('Function1 output:', age)
def function2():
age = 30
print('Function2 output:', age)
def function3():
global age
age = 40
print('Function3 output:', age)
age = 20
function1()
function2()
function3()
print('Outside function output:', age) |
class LimitedStack:
def __init__ (self,max_size=200):
self.stack = []
self.max_size = max_size
def add (self,item=None):
self.stack.append(item)
if len(self.stack) > self.max_size:
self.stack = self.stack[1:]
def get (self):
if self.stack:
return self.stack.pop()
| class Limitedstack:
def __init__(self, max_size=200):
self.stack = []
self.max_size = max_size
def add(self, item=None):
self.stack.append(item)
if len(self.stack) > self.max_size:
self.stack = self.stack[1:]
def get(self):
if self.stack:
return self.stack.pop() |
class Config(object):
env = 'default'
backbone = 'resnet18'
classify = 'softmax'
num_classes = 5000
metric = 'arc_margin'
easy_margin = False
use_se = False
loss = 'focal_loss'
display = False
finetune = False
meta_train = '/preprocessed/train_meta.csv'
train_root = '/preprocessed'
train_list = 'full_data_train.txt'
val_list = 'full_data_val.txt'
checkpoints_path = 'checkpoints'
save_interval = 1
train_batch_size = 32 # batch size
input_shape = (630, 80)
mp3aug_ratio = 1.0
npy_aug = True
optimizer = 'sgd'
use_gpu = True # use GPU or not
gpu_id = '0, 1'
num_workers = 0 # how many workers for loading data
print_freq = 100 # print info every N batch
debug_file = '/tmp/debug' # if os.path.exists(debug_file): enter ipdb
result_file = '/result/submission.csv'
max_epoch = 100
lr = 1e-2 # initial learning rate
lr_step = 10
lr_decay = 0.5 # when val_loss increase, lr = lr*lr_decay
weight_decay = 1e-1
| class Config(object):
env = 'default'
backbone = 'resnet18'
classify = 'softmax'
num_classes = 5000
metric = 'arc_margin'
easy_margin = False
use_se = False
loss = 'focal_loss'
display = False
finetune = False
meta_train = '/preprocessed/train_meta.csv'
train_root = '/preprocessed'
train_list = 'full_data_train.txt'
val_list = 'full_data_val.txt'
checkpoints_path = 'checkpoints'
save_interval = 1
train_batch_size = 32
input_shape = (630, 80)
mp3aug_ratio = 1.0
npy_aug = True
optimizer = 'sgd'
use_gpu = True
gpu_id = '0, 1'
num_workers = 0
print_freq = 100
debug_file = '/tmp/debug'
result_file = '/result/submission.csv'
max_epoch = 100
lr = 0.01
lr_step = 10
lr_decay = 0.5
weight_decay = 0.1 |
#
# PySNMP MIB module ENTERASYS-POWER-ETHERNET-EXT-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ENTERASYS-POWER-ETHERNET-EXT-MIB
# Produced by pysmi-0.3.4 at Wed May 1 13:04:21 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, ObjectIdentifier, OctetString = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ConstraintsUnion, SingleValueConstraint, ConstraintsIntersection, ValueSizeConstraint, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "SingleValueConstraint", "ConstraintsIntersection", "ValueSizeConstraint", "ValueRangeConstraint")
etsysModules, = mibBuilder.importSymbols("ENTERASYS-MIB-NAMES", "etsysModules")
entPhysicalIndex, = mibBuilder.importSymbols("ENTITY-MIB", "entPhysicalIndex")
EnabledStatus, = mibBuilder.importSymbols("P-BRIDGE-MIB", "EnabledStatus")
pethPsePortEntry, pethMainPseEntry = mibBuilder.importSymbols("POWER-ETHERNET-MIB", "pethPsePortEntry", "pethMainPseEntry")
NotificationGroup, ModuleCompliance, ObjectGroup = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance", "ObjectGroup")
MibIdentifier, TimeTicks, MibScalar, MibTable, MibTableRow, MibTableColumn, Counter64, ModuleIdentity, ObjectIdentity, Unsigned32, NotificationType, Integer32, Bits, iso, IpAddress, Counter32, Bits, Gauge32 = mibBuilder.importSymbols("SNMPv2-SMI", "MibIdentifier", "TimeTicks", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter64", "ModuleIdentity", "ObjectIdentity", "Unsigned32", "NotificationType", "Integer32", "Bits", "iso", "IpAddress", "Counter32", "Bits", "Gauge32")
TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString")
etsysPowerEthernetMibExtMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50))
etsysPowerEthernetMibExtMIB.setRevisions(('2009-08-27 20:31', '2005-01-10 16:30', '2004-08-17 22:27',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: etsysPowerEthernetMibExtMIB.setRevisionsDescriptions(('Adding objects to support IEEE Std. 802.3at functionality. Changes to etsysPsePortPowerManagementTable: - Increased max etsysPsePortPowerLimit range to 34000. - Added etsysPsePortCapability, etsysPsePortCapabilitySelect, and etsysPsePortDetectionStatus objects.', 'Added the power management functionality.', 'The initial version of this MIB module',))
if mibBuilder.loadTexts: etsysPowerEthernetMibExtMIB.setLastUpdated('200908272031Z')
if mibBuilder.loadTexts: etsysPowerEthernetMibExtMIB.setOrganization('Enterasys Networks, Inc')
if mibBuilder.loadTexts: etsysPowerEthernetMibExtMIB.setContactInfo('Postal: Enterasys Networks 50 Minuteman Rd. Andover, MA 01810-1008 USA Phone: +1 978 684 1000 E-mail: [email protected] WWW: http://www.enterasys.com')
if mibBuilder.loadTexts: etsysPowerEthernetMibExtMIB.setDescription('This MIB module defines a portion of the SNMP MIB under the Enterasys Networks enterprise OID pertaining to the allocation of power in a Pse chassis.')
etsysPowerEthernetObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1))
etsysPseChassisPowerAllocation = MibIdentifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 1))
etsysPseSlotPowerAllocation = MibIdentifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 2))
etsysPseChassisPowerStatus = MibIdentifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 3))
etsysPseSlotPowerManagement = MibIdentifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 4))
etsysPsePortPowerManagement = MibIdentifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 5))
etsysPsePowerNotification = MibIdentifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 0))
etsysPseChassisPowerAllocationMode = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("auto", 1), ("manual", 2))).clone('auto')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: etsysPseChassisPowerAllocationMode.setStatus('current')
if mibBuilder.loadTexts: etsysPseChassisPowerAllocationMode.setDescription('In auto mode, a Pse Power Management Algorithm handles the allocation of power to all the modules. In manual mode, power is manually allocated to the modules via the etsysPseSlotPowerAllocationTable. The value of etsysPseChassisPowerAllocationAvailable is used to determine the power available for allocation in this chassis in both auto and manual mode. Maintaining the value of this object across agent reboots is REQUIRED.')
etsysPseChassisPowerSnmpNotification = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 1, 2), EnabledStatus()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: etsysPseChassisPowerSnmpNotification.setStatus('current')
if mibBuilder.loadTexts: etsysPseChassisPowerSnmpNotification.setDescription('The current state of the SNMP Notification functionality for Pse. enabled (1) - The Pse will generate SNMP Notifications for potentially adverse Pse power conditions. The generation of these notifications are NOT dependant upon the state of etsysPseChassisPowerAllocationMode. disabled (2) - The SNMP Notifications defined in this MIB will NOT be generated under any conditions. Agents are not required to generate SNMP Notifications for conditions that exist when this object is set to enabled. Maintaining the value of this object across agent reboots is REQUIRED.')
etsysPseChassisPowerAvailableMaximum = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 1, 3), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 100)).clone(100)).setUnits('percent').setMaxAccess("readwrite")
if mibBuilder.loadTexts: etsysPseChassisPowerAvailableMaximum.setStatus('current')
if mibBuilder.loadTexts: etsysPseChassisPowerAvailableMaximum.setDescription('The maximum percentage of power from the Pse Power Supply that this chassis can use. The default value should be 100 percent, meaning the chassis can use all the power detected from Pse Power Supply. Maintaining the value of this object across agent reboots is REQUIRED.')
etsysPseSlotPowerAllocationTable = MibTable((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 2, 1), )
if mibBuilder.loadTexts: etsysPseSlotPowerAllocationTable.setStatus('current')
if mibBuilder.loadTexts: etsysPseSlotPowerAllocationTable.setDescription('Power allocation management information for all slots.')
etsysPseSlotPowerAllocationEntry = MibTableRow((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 2, 1, 1), ).setIndexNames((0, "ENTITY-MIB", "entPhysicalIndex"))
if mibBuilder.loadTexts: etsysPseSlotPowerAllocationEntry.setStatus('current')
if mibBuilder.loadTexts: etsysPseSlotPowerAllocationEntry.setDescription('Power allocation management information for an entPhysicalEntry that has an entPhysicalClass of container(5) and represents a slot in the chassis that could be occupied by a Pse module.')
etsysPseSlotPowerMaximum = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 2, 1, 1, 1), Unsigned32()).setUnits('Watts').setMaxAccess("readonly")
if mibBuilder.loadTexts: etsysPseSlotPowerMaximum.setStatus('current')
if mibBuilder.loadTexts: etsysPseSlotPowerMaximum.setDescription("The maximum power that can be consumed by the module in this slot, based on the module's characteristics. For slots without Pse modules this object MUST return zero.")
etsysPseSlotPowerAssigned = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 2, 1, 1, 2), Unsigned32()).setUnits('Watts').setMaxAccess("readwrite")
if mibBuilder.loadTexts: etsysPseSlotPowerAssigned.setStatus('current')
if mibBuilder.loadTexts: etsysPseSlotPowerAssigned.setDescription('The power that will be allocated to this slot in manual mode. In auto mode, this object has no effect. Maintaining the value of this object across agent reboots is REQUIRED.')
etsysPseChassisPowerDetected = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 3, 1), Gauge32()).setUnits('Watts').setMaxAccess("readonly")
if mibBuilder.loadTexts: etsysPseChassisPowerDetected.setStatus('current')
if mibBuilder.loadTexts: etsysPseChassisPowerDetected.setDescription('The total power detected by the chassis from Pse Power Supply.')
etsysPseChassisPowerAvailable = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 3, 2), Gauge32()).setUnits('Watts').setMaxAccess("readonly")
if mibBuilder.loadTexts: etsysPseChassisPowerAvailable.setStatus('current')
if mibBuilder.loadTexts: etsysPseChassisPowerAvailable.setDescription('The total power available for this chassis. This is ( etsysPseChassisPowerDetected * ( etsysPseChassisPowerAvailableMaximum / 100 ) ).')
etsysPseChassisPowerConsumable = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 3, 3), Gauge32()).setUnits('Watts').setMaxAccess("readonly")
if mibBuilder.loadTexts: etsysPseChassisPowerConsumable.setStatus('current')
if mibBuilder.loadTexts: etsysPseChassisPowerConsumable.setDescription('The total power that could be consumed by all of the Pse modules in the chassis. This is the summation of the values of all of the etsysPseSlotPowerMaximum objects.')
etsysPseChassisPowerAssigned = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 3, 4), Unsigned32()).setUnits('Watts').setMaxAccess("readonly")
if mibBuilder.loadTexts: etsysPseChassisPowerAssigned.setStatus('current')
if mibBuilder.loadTexts: etsysPseChassisPowerAssigned.setDescription('The total power assigned to the slots in the chassis. This is the summation of the values of all of the etsysPseSlotPowerAssigned objects.')
etsysPseChassisPowerRedundancy = MibScalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 3, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("redundant", 1), ("notRedundant", 2), ("notSupported", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: etsysPseChassisPowerRedundancy.setStatus('current')
if mibBuilder.loadTexts: etsysPseChassisPowerRedundancy.setDescription('Denotes whether or not the Pse power system has redundant capacity.')
etsysPseModulePowerManagementTable = MibTable((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 4, 1), )
if mibBuilder.loadTexts: etsysPseModulePowerManagementTable.setStatus('current')
if mibBuilder.loadTexts: etsysPseModulePowerManagementTable.setDescription('This table augments the pethMainPseTable of the PowerEthernetMIB (rfc3621). It provides objects that are used to budget power.')
etsysPseModulePowerManagementEntry = MibTableRow((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 4, 1, 1), )
pethMainPseEntry.registerAugmentions(("ENTERASYS-POWER-ETHERNET-EXT-MIB", "etsysPseModulePowerManagementEntry"))
etsysPseModulePowerManagementEntry.setIndexNames(*pethMainPseEntry.getIndexNames())
if mibBuilder.loadTexts: etsysPseModulePowerManagementEntry.setStatus('current')
if mibBuilder.loadTexts: etsysPseModulePowerManagementEntry.setDescription('A set of objects that display, control, and calculate the power consumption of a PSE.')
etsysPseModulePowerMode = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 4, 1, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("realtime", 1), ("class", 2))).clone('realtime')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: etsysPseModulePowerMode.setStatus('current')
if mibBuilder.loadTexts: etsysPseModulePowerMode.setDescription('This object controls the power management of the PSE. It also controls how etsysPseModulePowerClassBudget, etsysPseModulePowerUsage and etsysPsePortPowerLimit are utilized. In realtime mode, the power is managed based on the actual power consumption of the ports. etsysPseModulePowerClassBudget is sum of power consumed by all ports, measured in real-time. The etsysPseModulePowerUsage is ratio of pethMainPseConsumptionPower over pethMainPsePower, expressed in percents. In class mode, the power is managed based on the IEEE 802.3af definition of the class upper limit, except classes 0 & 4 for which the actual power consumption is used. etsysPseModulePowerClassBudget is sum of all ports power according to their class upper bound, except classes 0 & 4 for which the actual power consumption is accounted. The etsysPseModulePowerUsage is ratio of etsysPseModulePowerClassBudget over pethMainPsePower, expressed in percents. The effect of etsysPseModulePowerMode to etsysPsePortPowerLimit is described in etsysPsePortPowerLimit definition. Maintaining the value of this object across agent reboots is REQUIRED.')
etsysPseModulePowerClassBudget = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 4, 1, 1, 2), Gauge32()).setUnits('Watts').setMaxAccess("readonly")
if mibBuilder.loadTexts: etsysPseModulePowerClassBudget.setStatus('current')
if mibBuilder.loadTexts: etsysPseModulePowerClassBudget.setDescription('In class mode, this is sum of all ports power according to their class upper bound, except classes 0 & 4 for which the actual power consumption is accounted. In realtime mode, this is sum of power consumed by all ports, measured in real-time.')
etsysPseModulePowerUsage = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 4, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setUnits('%').setMaxAccess("readonly")
if mibBuilder.loadTexts: etsysPseModulePowerUsage.setStatus('current')
if mibBuilder.loadTexts: etsysPseModulePowerUsage.setDescription('In class mode, this is ratio of etsysPseModulePowerClassBudget over pethMainPsePower, expressed in percents. In realtime mode, this is ratio of pethMainPseConsumptionPower over pethMainPsePower, expressed in percents.')
etsysPsePortPowerManagementTable = MibTable((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 5, 1), )
if mibBuilder.loadTexts: etsysPsePortPowerManagementTable.setStatus('current')
if mibBuilder.loadTexts: etsysPsePortPowerManagementTable.setDescription('This table augments the pethPsePortTable of the PowerEthernetMIB (rfc3621). It provides objects that are used to budget power.')
etsysPsePortPowerManagementEntry = MibTableRow((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 5, 1, 1), )
pethPsePortEntry.registerAugmentions(("ENTERASYS-POWER-ETHERNET-EXT-MIB", "etsysPsePortPowerManagementEntry"))
etsysPsePortPowerManagementEntry.setIndexNames(*pethPsePortEntry.getIndexNames())
if mibBuilder.loadTexts: etsysPsePortPowerManagementEntry.setStatus('current')
if mibBuilder.loadTexts: etsysPsePortPowerManagementEntry.setDescription('A set of objects that display and control the power consumption of a PSE, at the port level.')
etsysPsePortPowerLimit = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 5, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 34000)).clone(15400)).setUnits('milliwatts').setMaxAccess("readwrite")
if mibBuilder.loadTexts: etsysPsePortPowerLimit.setStatus('current')
if mibBuilder.loadTexts: etsysPsePortPowerLimit.setDescription("This object sets the maximum power allowed on this port. If the port exceeds its power limit, it will be shut down. This object has effect only when its module is in realtime mode (specified by etsysPseModulePowerMode). In class mode, the power limit of a port is defined by port's class upper bound, according to the IEEE standard selected in etsysPsePortCapabilitySelect.")
etsysPsePortPowerUsage = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 5, 1, 1, 2), Gauge32()).setUnits('milliwatts').setMaxAccess("readonly")
if mibBuilder.loadTexts: etsysPsePortPowerUsage.setStatus('current')
if mibBuilder.loadTexts: etsysPsePortPowerUsage.setDescription('Actual power consumption measured in real-time.')
etsysPsePortPDType = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 5, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("legacy", 1), ("ieee8023af", 2), ("other", 3), ("ieee8023", 4), ("ieee8023at", 5)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: etsysPsePortPDType.setReference('IEEE Std 802.3af IEEE Std 802.3at')
if mibBuilder.loadTexts: etsysPsePortPDType.setStatus('current')
if mibBuilder.loadTexts: etsysPsePortPDType.setDescription('Describes the detected PD type on this port. A value of legacy(1) - indicates that the PD is using a capacitive signature, which is pre-IEEE standard. A value of ieee8023af(2)- indicates that the PD is using a resistive signature and is compliant with the IEEE Std 802.3af. A value of other(3) - indicates that the PD type could not be determined. A value of ieee8023(4)- indicates that the PD is using a resistive signature and is compliant with the IEEE Std 802.3af and/or IEEE Std 802.3at specifications. A value of ieee8023at(5)- indicates that the PD is using a resistive signature and is compliant with the IEEE Std 802.3at.')
etsysPsePortCapability = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 5, 1, 1, 4), Bits().clone(namedValues=NamedValues(("other", 0), ("ieee8023afCapable", 1), ("ieee8023atCapable", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: etsysPsePortCapability.setReference('IEEE Std 802.3af IEEE Std 802.3at')
if mibBuilder.loadTexts: etsysPsePortCapability.setStatus('current')
if mibBuilder.loadTexts: etsysPsePortCapability.setDescription('This object indicates the IEEE Power over Ethernet standard this port supports.')
etsysPsePortCapabilitySelect = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 5, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("ieee8023af", 1), ("ieee8023at", 2))).clone('ieee8023af')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: etsysPsePortCapabilitySelect.setReference('IEEE Std 802.3af IEEE Std 802.3at')
if mibBuilder.loadTexts: etsysPsePortCapabilitySelect.setStatus('current')
if mibBuilder.loadTexts: etsysPsePortCapabilitySelect.setDescription("This object sets the port's power management capabilities based on the IEEE standard. ieee8023af (1) : IEEE Std 802.3af ieee8023at (2) : IEEE Std 802.3at Attempting to set this value to a capability that is not supported, as indicated by etsysPsePortCapability, will result in an inconsistentValue error.")
etsysPsePortDetectionStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 5, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("disabled", 1), ("searching", 2), ("deliveringPower", 3), ("fault", 4), ("test", 5), ("otherFault", 6), ("requestingPower", 7)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: etsysPsePortDetectionStatus.setStatus('current')
if mibBuilder.loadTexts: etsysPsePortDetectionStatus.setDescription("Describes the operational status of the port PD detection. A value of disabled(1)- indicates that the PSE State diagram is in the state DISABLED. A value of deliveringPower(3) - indicates that the PSE State diagram is in the state POWER_ON for a duration greater than tlim max. A value of fault(4) - indicates that the PSE State diagram is in the state TEST_ERROR. A value of test(5) - indicates that the PSE State diagram is in the state TEST_MODE. A value of otherFault(6) - indicates that the PSE State diagram is in the state IDLE due to the variable error_conditions. A value of searching(2)- indicates the PSE State diagram is in a state other than those listed above. A value of requestingPower(7) - indicates the PSE State diagram is in the state IDLE after transitioning from the state POWER_DENIED due to insufficient PSE power being available to satisfy the PD's requirements.")
etsysPsePowerSupplyStatusTable = MibTable((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 3, 6), )
if mibBuilder.loadTexts: etsysPsePowerSupplyStatusTable.setStatus('current')
if mibBuilder.loadTexts: etsysPsePowerSupplyStatusTable.setDescription('Status information for all of the Pse power supply modules.')
etsysPsePowerSupplyStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 3, 6, 1), ).setIndexNames((0, "ENTERASYS-POWER-ETHERNET-EXT-MIB", "etsysPsePowerSupplyModuleNumber"))
if mibBuilder.loadTexts: etsysPsePowerSupplyStatusEntry.setStatus('current')
if mibBuilder.loadTexts: etsysPsePowerSupplyStatusEntry.setDescription('Status information for an individual Pse power supply module.')
etsysPsePowerSupplyModuleNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 3, 6, 1, 1), Unsigned32())
if mibBuilder.loadTexts: etsysPsePowerSupplyModuleNumber.setStatus('current')
if mibBuilder.loadTexts: etsysPsePowerSupplyModuleNumber.setDescription("A unique number that identifies the Pse power supply and is relative to the module's physical location.")
etsysPsePowerSupplyModuleStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 3, 6, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("infoNotAvailable", 1), ("notInstalled", 2), ("installedAndOperating", 3), ("installedAndNotOperating", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: etsysPsePowerSupplyModuleStatus.setStatus('current')
if mibBuilder.loadTexts: etsysPsePowerSupplyModuleStatus.setDescription("Denotes the power supply's status.")
etsysPseChassisPowerRedundant = NotificationType((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 0, 1)).setObjects(("ENTERASYS-POWER-ETHERNET-EXT-MIB", "etsysPseChassisPowerDetected"))
if mibBuilder.loadTexts: etsysPseChassisPowerRedundant.setStatus('current')
if mibBuilder.loadTexts: etsysPseChassisPowerRedundant.setDescription('Pse chassis power is in redundant state. At least 500 msec must elapse between notifications being emitted by the same object instance.')
etsysPseChassisPowerNonRedundant = NotificationType((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 0, 2)).setObjects(("ENTERASYS-POWER-ETHERNET-EXT-MIB", "etsysPseChassisPowerDetected"))
if mibBuilder.loadTexts: etsysPseChassisPowerNonRedundant.setStatus('current')
if mibBuilder.loadTexts: etsysPseChassisPowerNonRedundant.setDescription('Pse chassis power is in non-redundant state. At least 500 msec must elapse between notifications being emitted by the same object instance.')
etsysPsePowerSupplyModuleStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 0, 3)).setObjects(("ENTERASYS-POWER-ETHERNET-EXT-MIB", "etsysPsePowerSupplyModuleStatus"))
if mibBuilder.loadTexts: etsysPsePowerSupplyModuleStatusChange.setStatus('current')
if mibBuilder.loadTexts: etsysPsePowerSupplyModuleStatusChange.setDescription('A Pse Power Supply module has changed state. At least 500 msec must elapse between notifications being emitted by the same object instance.')
etsysPsePowerAllocationConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 2))
etsysPsePowerAllocationGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 2, 1))
etsysPsePowerAllocationCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 2, 2))
etsysPsePowerAllocationControlGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 2, 1, 1)).setObjects(("ENTERASYS-POWER-ETHERNET-EXT-MIB", "etsysPseChassisPowerAllocationMode"), ("ENTERASYS-POWER-ETHERNET-EXT-MIB", "etsysPseChassisPowerSnmpNotification"), ("ENTERASYS-POWER-ETHERNET-EXT-MIB", "etsysPseChassisPowerAvailableMaximum"), ("ENTERASYS-POWER-ETHERNET-EXT-MIB", "etsysPseSlotPowerMaximum"), ("ENTERASYS-POWER-ETHERNET-EXT-MIB", "etsysPseSlotPowerAssigned"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
etsysPsePowerAllocationControlGroup = etsysPsePowerAllocationControlGroup.setStatus('current')
if mibBuilder.loadTexts: etsysPsePowerAllocationControlGroup.setDescription('Power over Ethernet Power Allocation Control group.')
etsysPseChassisPowerStatusGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 2, 1, 2)).setObjects(("ENTERASYS-POWER-ETHERNET-EXT-MIB", "etsysPseChassisPowerDetected"), ("ENTERASYS-POWER-ETHERNET-EXT-MIB", "etsysPseChassisPowerAvailable"), ("ENTERASYS-POWER-ETHERNET-EXT-MIB", "etsysPseChassisPowerConsumable"), ("ENTERASYS-POWER-ETHERNET-EXT-MIB", "etsysPseChassisPowerAssigned"), ("ENTERASYS-POWER-ETHERNET-EXT-MIB", "etsysPseChassisPowerRedundancy"), ("ENTERASYS-POWER-ETHERNET-EXT-MIB", "etsysPsePowerSupplyModuleStatus"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
etsysPseChassisPowerStatusGroup = etsysPseChassisPowerStatusGroup.setStatus('current')
if mibBuilder.loadTexts: etsysPseChassisPowerStatusGroup.setDescription('Power over Ethernet Power Supply group.')
etsysPsePowerNotificationGroup = NotificationGroup((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 2, 1, 3)).setObjects(("ENTERASYS-POWER-ETHERNET-EXT-MIB", "etsysPseChassisPowerRedundant"), ("ENTERASYS-POWER-ETHERNET-EXT-MIB", "etsysPseChassisPowerNonRedundant"), ("ENTERASYS-POWER-ETHERNET-EXT-MIB", "etsysPsePowerSupplyModuleStatusChange"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
etsysPsePowerNotificationGroup = etsysPsePowerNotificationGroup.setStatus('current')
if mibBuilder.loadTexts: etsysPsePowerNotificationGroup.setDescription('Power over Ethernet Power Redundancy Notifications group.')
etsysPseModulePowerManagementGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 2, 1, 4)).setObjects(("ENTERASYS-POWER-ETHERNET-EXT-MIB", "etsysPseModulePowerMode"), ("ENTERASYS-POWER-ETHERNET-EXT-MIB", "etsysPseModulePowerClassBudget"), ("ENTERASYS-POWER-ETHERNET-EXT-MIB", "etsysPseModulePowerUsage"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
etsysPseModulePowerManagementGroup = etsysPseModulePowerManagementGroup.setStatus('current')
if mibBuilder.loadTexts: etsysPseModulePowerManagementGroup.setDescription('Power over Ethernet Module Power Budget Management group.')
etsysPsePortPowerManagementGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 2, 1, 5)).setObjects(("ENTERASYS-POWER-ETHERNET-EXT-MIB", "etsysPsePortPowerLimit"), ("ENTERASYS-POWER-ETHERNET-EXT-MIB", "etsysPsePortPowerUsage"), ("ENTERASYS-POWER-ETHERNET-EXT-MIB", "etsysPsePortPDType"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
etsysPsePortPowerManagementGroup = etsysPsePortPowerManagementGroup.setStatus('deprecated')
if mibBuilder.loadTexts: etsysPsePortPowerManagementGroup.setDescription('Power over Ethernet Port Power Budget Management group.')
etsysPsePortPowerManagementGroupRev2 = ObjectGroup((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 2, 1, 6)).setObjects(("ENTERASYS-POWER-ETHERNET-EXT-MIB", "etsysPsePortPowerLimit"), ("ENTERASYS-POWER-ETHERNET-EXT-MIB", "etsysPsePortPowerUsage"), ("ENTERASYS-POWER-ETHERNET-EXT-MIB", "etsysPsePortPDType"), ("ENTERASYS-POWER-ETHERNET-EXT-MIB", "etsysPsePortCapability"), ("ENTERASYS-POWER-ETHERNET-EXT-MIB", "etsysPsePortCapabilitySelect"), ("ENTERASYS-POWER-ETHERNET-EXT-MIB", "etsysPsePortDetectionStatus"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
etsysPsePortPowerManagementGroupRev2 = etsysPsePortPowerManagementGroupRev2.setStatus('current')
if mibBuilder.loadTexts: etsysPsePortPowerManagementGroupRev2.setDescription('Power over Ethernet Port Power Budget Management group.')
etsysPsePowerAllocationCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 2, 2, 1)).setObjects(("ENTERASYS-POWER-ETHERNET-EXT-MIB", "etsysPsePowerAllocationControlGroup"), ("ENTERASYS-POWER-ETHERNET-EXT-MIB", "etsysPseChassisPowerStatusGroup"), ("ENTERASYS-POWER-ETHERNET-EXT-MIB", "etsysPsePowerNotificationGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
etsysPsePowerAllocationCompliance = etsysPsePowerAllocationCompliance.setStatus('current')
if mibBuilder.loadTexts: etsysPsePowerAllocationCompliance.setDescription('The compliance statement for devices that support manual power allocation.')
etsysPsePowerAllocationCompliance2 = ModuleCompliance((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 2, 2, 2)).setObjects(("ENTERASYS-POWER-ETHERNET-EXT-MIB", "etsysPsePowerAllocationControlGroup"), ("ENTERASYS-POWER-ETHERNET-EXT-MIB", "etsysPseChassisPowerStatusGroup"), ("ENTERASYS-POWER-ETHERNET-EXT-MIB", "etsysPsePowerNotificationGroup"), ("ENTERASYS-POWER-ETHERNET-EXT-MIB", "etsysPseModulePowerManagementGroup"), ("ENTERASYS-POWER-ETHERNET-EXT-MIB", "etsysPsePortPowerManagementGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
etsysPsePowerAllocationCompliance2 = etsysPsePowerAllocationCompliance2.setStatus('deprecated')
if mibBuilder.loadTexts: etsysPsePowerAllocationCompliance2.setDescription('The compliance statement for devices that support power budgets.')
etsysPsePowerAllocationCompliance2Rev2 = ModuleCompliance((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 2, 2, 3)).setObjects(("ENTERASYS-POWER-ETHERNET-EXT-MIB", "etsysPsePowerAllocationControlGroup"), ("ENTERASYS-POWER-ETHERNET-EXT-MIB", "etsysPseChassisPowerStatusGroup"), ("ENTERASYS-POWER-ETHERNET-EXT-MIB", "etsysPsePowerNotificationGroup"), ("ENTERASYS-POWER-ETHERNET-EXT-MIB", "etsysPseModulePowerManagementGroup"), ("ENTERASYS-POWER-ETHERNET-EXT-MIB", "etsysPsePortPowerManagementGroupRev2"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
etsysPsePowerAllocationCompliance2Rev2 = etsysPsePowerAllocationCompliance2Rev2.setStatus('current')
if mibBuilder.loadTexts: etsysPsePowerAllocationCompliance2Rev2.setDescription('The compliance statement for devices that support power budgets.')
mibBuilder.exportSymbols("ENTERASYS-POWER-ETHERNET-EXT-MIB", etsysPseChassisPowerAvailable=etsysPseChassisPowerAvailable, etsysPseChassisPowerRedundancy=etsysPseChassisPowerRedundancy, etsysPsePortPowerManagementTable=etsysPsePortPowerManagementTable, etsysPseSlotPowerAllocationTable=etsysPseSlotPowerAllocationTable, etsysPseSlotPowerAssigned=etsysPseSlotPowerAssigned, etsysPseModulePowerManagementGroup=etsysPseModulePowerManagementGroup, etsysPowerEthernetMibExtMIB=etsysPowerEthernetMibExtMIB, etsysPseSlotPowerManagement=etsysPseSlotPowerManagement, etsysPseSlotPowerAllocation=etsysPseSlotPowerAllocation, etsysPseModulePowerManagementTable=etsysPseModulePowerManagementTable, etsysPsePortDetectionStatus=etsysPsePortDetectionStatus, etsysPseChassisPowerAssigned=etsysPseChassisPowerAssigned, etsysPsePowerSupplyModuleStatusChange=etsysPsePowerSupplyModuleStatusChange, etsysPsePowerAllocationConformance=etsysPsePowerAllocationConformance, etsysPsePortPDType=etsysPsePortPDType, etsysPsePowerSupplyModuleStatus=etsysPsePowerSupplyModuleStatus, etsysPsePortPowerManagementGroup=etsysPsePortPowerManagementGroup, etsysPsePowerSupplyModuleNumber=etsysPsePowerSupplyModuleNumber, etsysPsePowerAllocationGroups=etsysPsePowerAllocationGroups, etsysPowerEthernetObjects=etsysPowerEthernetObjects, etsysPsePortPowerLimit=etsysPsePortPowerLimit, etsysPsePortPowerManagementEntry=etsysPsePortPowerManagementEntry, etsysPseChassisPowerAllocationMode=etsysPseChassisPowerAllocationMode, etsysPsePowerAllocationCompliance2Rev2=etsysPsePowerAllocationCompliance2Rev2, etsysPseChassisPowerConsumable=etsysPseChassisPowerConsumable, etsysPsePowerSupplyStatusEntry=etsysPsePowerSupplyStatusEntry, etsysPseChassisPowerStatus=etsysPseChassisPowerStatus, etsysPsePowerAllocationControlGroup=etsysPsePowerAllocationControlGroup, etsysPseModulePowerClassBudget=etsysPseModulePowerClassBudget, etsysPsePowerAllocationCompliance2=etsysPsePowerAllocationCompliance2, etsysPseChassisPowerAvailableMaximum=etsysPseChassisPowerAvailableMaximum, etsysPseChassisPowerDetected=etsysPseChassisPowerDetected, etsysPsePortPowerUsage=etsysPsePortPowerUsage, etsysPsePowerSupplyStatusTable=etsysPsePowerSupplyStatusTable, etsysPseChassisPowerNonRedundant=etsysPseChassisPowerNonRedundant, etsysPseChassisPowerAllocation=etsysPseChassisPowerAllocation, etsysPseModulePowerUsage=etsysPseModulePowerUsage, etsysPseSlotPowerMaximum=etsysPseSlotPowerMaximum, etsysPsePowerAllocationCompliances=etsysPsePowerAllocationCompliances, etsysPsePortCapabilitySelect=etsysPsePortCapabilitySelect, etsysPseChassisPowerStatusGroup=etsysPseChassisPowerStatusGroup, etsysPsePowerAllocationCompliance=etsysPsePowerAllocationCompliance, etsysPseModulePowerManagementEntry=etsysPseModulePowerManagementEntry, etsysPsePortCapability=etsysPsePortCapability, etsysPseSlotPowerAllocationEntry=etsysPseSlotPowerAllocationEntry, etsysPsePowerNotification=etsysPsePowerNotification, etsysPseChassisPowerRedundant=etsysPseChassisPowerRedundant, etsysPsePortPowerManagementGroupRev2=etsysPsePortPowerManagementGroupRev2, etsysPseModulePowerMode=etsysPseModulePowerMode, etsysPsePortPowerManagement=etsysPsePortPowerManagement, PYSNMP_MODULE_ID=etsysPowerEthernetMibExtMIB, etsysPseChassisPowerSnmpNotification=etsysPseChassisPowerSnmpNotification, etsysPsePowerNotificationGroup=etsysPsePowerNotificationGroup)
| (integer, object_identifier, octet_string) = mibBuilder.importSymbols('ASN1', 'Integer', 'ObjectIdentifier', 'OctetString')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(constraints_union, single_value_constraint, constraints_intersection, value_size_constraint, value_range_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsUnion', 'SingleValueConstraint', 'ConstraintsIntersection', 'ValueSizeConstraint', 'ValueRangeConstraint')
(etsys_modules,) = mibBuilder.importSymbols('ENTERASYS-MIB-NAMES', 'etsysModules')
(ent_physical_index,) = mibBuilder.importSymbols('ENTITY-MIB', 'entPhysicalIndex')
(enabled_status,) = mibBuilder.importSymbols('P-BRIDGE-MIB', 'EnabledStatus')
(peth_pse_port_entry, peth_main_pse_entry) = mibBuilder.importSymbols('POWER-ETHERNET-MIB', 'pethPsePortEntry', 'pethMainPseEntry')
(notification_group, module_compliance, object_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance', 'ObjectGroup')
(mib_identifier, time_ticks, mib_scalar, mib_table, mib_table_row, mib_table_column, counter64, module_identity, object_identity, unsigned32, notification_type, integer32, bits, iso, ip_address, counter32, bits, gauge32) = mibBuilder.importSymbols('SNMPv2-SMI', 'MibIdentifier', 'TimeTicks', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Counter64', 'ModuleIdentity', 'ObjectIdentity', 'Unsigned32', 'NotificationType', 'Integer32', 'Bits', 'iso', 'IpAddress', 'Counter32', 'Bits', 'Gauge32')
(textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString')
etsys_power_ethernet_mib_ext_mib = module_identity((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50))
etsysPowerEthernetMibExtMIB.setRevisions(('2009-08-27 20:31', '2005-01-10 16:30', '2004-08-17 22:27'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts:
etsysPowerEthernetMibExtMIB.setRevisionsDescriptions(('Adding objects to support IEEE Std. 802.3at functionality. Changes to etsysPsePortPowerManagementTable: - Increased max etsysPsePortPowerLimit range to 34000. - Added etsysPsePortCapability, etsysPsePortCapabilitySelect, and etsysPsePortDetectionStatus objects.', 'Added the power management functionality.', 'The initial version of this MIB module'))
if mibBuilder.loadTexts:
etsysPowerEthernetMibExtMIB.setLastUpdated('200908272031Z')
if mibBuilder.loadTexts:
etsysPowerEthernetMibExtMIB.setOrganization('Enterasys Networks, Inc')
if mibBuilder.loadTexts:
etsysPowerEthernetMibExtMIB.setContactInfo('Postal: Enterasys Networks 50 Minuteman Rd. Andover, MA 01810-1008 USA Phone: +1 978 684 1000 E-mail: [email protected] WWW: http://www.enterasys.com')
if mibBuilder.loadTexts:
etsysPowerEthernetMibExtMIB.setDescription('This MIB module defines a portion of the SNMP MIB under the Enterasys Networks enterprise OID pertaining to the allocation of power in a Pse chassis.')
etsys_power_ethernet_objects = mib_identifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1))
etsys_pse_chassis_power_allocation = mib_identifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 1))
etsys_pse_slot_power_allocation = mib_identifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 2))
etsys_pse_chassis_power_status = mib_identifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 3))
etsys_pse_slot_power_management = mib_identifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 4))
etsys_pse_port_power_management = mib_identifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 5))
etsys_pse_power_notification = mib_identifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 0))
etsys_pse_chassis_power_allocation_mode = mib_scalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('auto', 1), ('manual', 2))).clone('auto')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
etsysPseChassisPowerAllocationMode.setStatus('current')
if mibBuilder.loadTexts:
etsysPseChassisPowerAllocationMode.setDescription('In auto mode, a Pse Power Management Algorithm handles the allocation of power to all the modules. In manual mode, power is manually allocated to the modules via the etsysPseSlotPowerAllocationTable. The value of etsysPseChassisPowerAllocationAvailable is used to determine the power available for allocation in this chassis in both auto and manual mode. Maintaining the value of this object across agent reboots is REQUIRED.')
etsys_pse_chassis_power_snmp_notification = mib_scalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 1, 2), enabled_status()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
etsysPseChassisPowerSnmpNotification.setStatus('current')
if mibBuilder.loadTexts:
etsysPseChassisPowerSnmpNotification.setDescription('The current state of the SNMP Notification functionality for Pse. enabled (1) - The Pse will generate SNMP Notifications for potentially adverse Pse power conditions. The generation of these notifications are NOT dependant upon the state of etsysPseChassisPowerAllocationMode. disabled (2) - The SNMP Notifications defined in this MIB will NOT be generated under any conditions. Agents are not required to generate SNMP Notifications for conditions that exist when this object is set to enabled. Maintaining the value of this object across agent reboots is REQUIRED.')
etsys_pse_chassis_power_available_maximum = mib_scalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 1, 3), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 100)).clone(100)).setUnits('percent').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
etsysPseChassisPowerAvailableMaximum.setStatus('current')
if mibBuilder.loadTexts:
etsysPseChassisPowerAvailableMaximum.setDescription('The maximum percentage of power from the Pse Power Supply that this chassis can use. The default value should be 100 percent, meaning the chassis can use all the power detected from Pse Power Supply. Maintaining the value of this object across agent reboots is REQUIRED.')
etsys_pse_slot_power_allocation_table = mib_table((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 2, 1))
if mibBuilder.loadTexts:
etsysPseSlotPowerAllocationTable.setStatus('current')
if mibBuilder.loadTexts:
etsysPseSlotPowerAllocationTable.setDescription('Power allocation management information for all slots.')
etsys_pse_slot_power_allocation_entry = mib_table_row((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 2, 1, 1)).setIndexNames((0, 'ENTITY-MIB', 'entPhysicalIndex'))
if mibBuilder.loadTexts:
etsysPseSlotPowerAllocationEntry.setStatus('current')
if mibBuilder.loadTexts:
etsysPseSlotPowerAllocationEntry.setDescription('Power allocation management information for an entPhysicalEntry that has an entPhysicalClass of container(5) and represents a slot in the chassis that could be occupied by a Pse module.')
etsys_pse_slot_power_maximum = mib_table_column((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 2, 1, 1, 1), unsigned32()).setUnits('Watts').setMaxAccess('readonly')
if mibBuilder.loadTexts:
etsysPseSlotPowerMaximum.setStatus('current')
if mibBuilder.loadTexts:
etsysPseSlotPowerMaximum.setDescription("The maximum power that can be consumed by the module in this slot, based on the module's characteristics. For slots without Pse modules this object MUST return zero.")
etsys_pse_slot_power_assigned = mib_table_column((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 2, 1, 1, 2), unsigned32()).setUnits('Watts').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
etsysPseSlotPowerAssigned.setStatus('current')
if mibBuilder.loadTexts:
etsysPseSlotPowerAssigned.setDescription('The power that will be allocated to this slot in manual mode. In auto mode, this object has no effect. Maintaining the value of this object across agent reboots is REQUIRED.')
etsys_pse_chassis_power_detected = mib_scalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 3, 1), gauge32()).setUnits('Watts').setMaxAccess('readonly')
if mibBuilder.loadTexts:
etsysPseChassisPowerDetected.setStatus('current')
if mibBuilder.loadTexts:
etsysPseChassisPowerDetected.setDescription('The total power detected by the chassis from Pse Power Supply.')
etsys_pse_chassis_power_available = mib_scalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 3, 2), gauge32()).setUnits('Watts').setMaxAccess('readonly')
if mibBuilder.loadTexts:
etsysPseChassisPowerAvailable.setStatus('current')
if mibBuilder.loadTexts:
etsysPseChassisPowerAvailable.setDescription('The total power available for this chassis. This is ( etsysPseChassisPowerDetected * ( etsysPseChassisPowerAvailableMaximum / 100 ) ).')
etsys_pse_chassis_power_consumable = mib_scalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 3, 3), gauge32()).setUnits('Watts').setMaxAccess('readonly')
if mibBuilder.loadTexts:
etsysPseChassisPowerConsumable.setStatus('current')
if mibBuilder.loadTexts:
etsysPseChassisPowerConsumable.setDescription('The total power that could be consumed by all of the Pse modules in the chassis. This is the summation of the values of all of the etsysPseSlotPowerMaximum objects.')
etsys_pse_chassis_power_assigned = mib_scalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 3, 4), unsigned32()).setUnits('Watts').setMaxAccess('readonly')
if mibBuilder.loadTexts:
etsysPseChassisPowerAssigned.setStatus('current')
if mibBuilder.loadTexts:
etsysPseChassisPowerAssigned.setDescription('The total power assigned to the slots in the chassis. This is the summation of the values of all of the etsysPseSlotPowerAssigned objects.')
etsys_pse_chassis_power_redundancy = mib_scalar((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 3, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('redundant', 1), ('notRedundant', 2), ('notSupported', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
etsysPseChassisPowerRedundancy.setStatus('current')
if mibBuilder.loadTexts:
etsysPseChassisPowerRedundancy.setDescription('Denotes whether or not the Pse power system has redundant capacity.')
etsys_pse_module_power_management_table = mib_table((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 4, 1))
if mibBuilder.loadTexts:
etsysPseModulePowerManagementTable.setStatus('current')
if mibBuilder.loadTexts:
etsysPseModulePowerManagementTable.setDescription('This table augments the pethMainPseTable of the PowerEthernetMIB (rfc3621). It provides objects that are used to budget power.')
etsys_pse_module_power_management_entry = mib_table_row((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 4, 1, 1))
pethMainPseEntry.registerAugmentions(('ENTERASYS-POWER-ETHERNET-EXT-MIB', 'etsysPseModulePowerManagementEntry'))
etsysPseModulePowerManagementEntry.setIndexNames(*pethMainPseEntry.getIndexNames())
if mibBuilder.loadTexts:
etsysPseModulePowerManagementEntry.setStatus('current')
if mibBuilder.loadTexts:
etsysPseModulePowerManagementEntry.setDescription('A set of objects that display, control, and calculate the power consumption of a PSE.')
etsys_pse_module_power_mode = mib_table_column((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 4, 1, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('realtime', 1), ('class', 2))).clone('realtime')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
etsysPseModulePowerMode.setStatus('current')
if mibBuilder.loadTexts:
etsysPseModulePowerMode.setDescription('This object controls the power management of the PSE. It also controls how etsysPseModulePowerClassBudget, etsysPseModulePowerUsage and etsysPsePortPowerLimit are utilized. In realtime mode, the power is managed based on the actual power consumption of the ports. etsysPseModulePowerClassBudget is sum of power consumed by all ports, measured in real-time. The etsysPseModulePowerUsage is ratio of pethMainPseConsumptionPower over pethMainPsePower, expressed in percents. In class mode, the power is managed based on the IEEE 802.3af definition of the class upper limit, except classes 0 & 4 for which the actual power consumption is used. etsysPseModulePowerClassBudget is sum of all ports power according to their class upper bound, except classes 0 & 4 for which the actual power consumption is accounted. The etsysPseModulePowerUsage is ratio of etsysPseModulePowerClassBudget over pethMainPsePower, expressed in percents. The effect of etsysPseModulePowerMode to etsysPsePortPowerLimit is described in etsysPsePortPowerLimit definition. Maintaining the value of this object across agent reboots is REQUIRED.')
etsys_pse_module_power_class_budget = mib_table_column((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 4, 1, 1, 2), gauge32()).setUnits('Watts').setMaxAccess('readonly')
if mibBuilder.loadTexts:
etsysPseModulePowerClassBudget.setStatus('current')
if mibBuilder.loadTexts:
etsysPseModulePowerClassBudget.setDescription('In class mode, this is sum of all ports power according to their class upper bound, except classes 0 & 4 for which the actual power consumption is accounted. In realtime mode, this is sum of power consumed by all ports, measured in real-time.')
etsys_pse_module_power_usage = mib_table_column((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 4, 1, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setUnits('%').setMaxAccess('readonly')
if mibBuilder.loadTexts:
etsysPseModulePowerUsage.setStatus('current')
if mibBuilder.loadTexts:
etsysPseModulePowerUsage.setDescription('In class mode, this is ratio of etsysPseModulePowerClassBudget over pethMainPsePower, expressed in percents. In realtime mode, this is ratio of pethMainPseConsumptionPower over pethMainPsePower, expressed in percents.')
etsys_pse_port_power_management_table = mib_table((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 5, 1))
if mibBuilder.loadTexts:
etsysPsePortPowerManagementTable.setStatus('current')
if mibBuilder.loadTexts:
etsysPsePortPowerManagementTable.setDescription('This table augments the pethPsePortTable of the PowerEthernetMIB (rfc3621). It provides objects that are used to budget power.')
etsys_pse_port_power_management_entry = mib_table_row((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 5, 1, 1))
pethPsePortEntry.registerAugmentions(('ENTERASYS-POWER-ETHERNET-EXT-MIB', 'etsysPsePortPowerManagementEntry'))
etsysPsePortPowerManagementEntry.setIndexNames(*pethPsePortEntry.getIndexNames())
if mibBuilder.loadTexts:
etsysPsePortPowerManagementEntry.setStatus('current')
if mibBuilder.loadTexts:
etsysPsePortPowerManagementEntry.setDescription('A set of objects that display and control the power consumption of a PSE, at the port level.')
etsys_pse_port_power_limit = mib_table_column((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 5, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 34000)).clone(15400)).setUnits('milliwatts').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
etsysPsePortPowerLimit.setStatus('current')
if mibBuilder.loadTexts:
etsysPsePortPowerLimit.setDescription("This object sets the maximum power allowed on this port. If the port exceeds its power limit, it will be shut down. This object has effect only when its module is in realtime mode (specified by etsysPseModulePowerMode). In class mode, the power limit of a port is defined by port's class upper bound, according to the IEEE standard selected in etsysPsePortCapabilitySelect.")
etsys_pse_port_power_usage = mib_table_column((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 5, 1, 1, 2), gauge32()).setUnits('milliwatts').setMaxAccess('readonly')
if mibBuilder.loadTexts:
etsysPsePortPowerUsage.setStatus('current')
if mibBuilder.loadTexts:
etsysPsePortPowerUsage.setDescription('Actual power consumption measured in real-time.')
etsys_pse_port_pd_type = mib_table_column((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 5, 1, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('legacy', 1), ('ieee8023af', 2), ('other', 3), ('ieee8023', 4), ('ieee8023at', 5)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
etsysPsePortPDType.setReference('IEEE Std 802.3af IEEE Std 802.3at')
if mibBuilder.loadTexts:
etsysPsePortPDType.setStatus('current')
if mibBuilder.loadTexts:
etsysPsePortPDType.setDescription('Describes the detected PD type on this port. A value of legacy(1) - indicates that the PD is using a capacitive signature, which is pre-IEEE standard. A value of ieee8023af(2)- indicates that the PD is using a resistive signature and is compliant with the IEEE Std 802.3af. A value of other(3) - indicates that the PD type could not be determined. A value of ieee8023(4)- indicates that the PD is using a resistive signature and is compliant with the IEEE Std 802.3af and/or IEEE Std 802.3at specifications. A value of ieee8023at(5)- indicates that the PD is using a resistive signature and is compliant with the IEEE Std 802.3at.')
etsys_pse_port_capability = mib_table_column((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 5, 1, 1, 4), bits().clone(namedValues=named_values(('other', 0), ('ieee8023afCapable', 1), ('ieee8023atCapable', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
etsysPsePortCapability.setReference('IEEE Std 802.3af IEEE Std 802.3at')
if mibBuilder.loadTexts:
etsysPsePortCapability.setStatus('current')
if mibBuilder.loadTexts:
etsysPsePortCapability.setDescription('This object indicates the IEEE Power over Ethernet standard this port supports.')
etsys_pse_port_capability_select = mib_table_column((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 5, 1, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('ieee8023af', 1), ('ieee8023at', 2))).clone('ieee8023af')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
etsysPsePortCapabilitySelect.setReference('IEEE Std 802.3af IEEE Std 802.3at')
if mibBuilder.loadTexts:
etsysPsePortCapabilitySelect.setStatus('current')
if mibBuilder.loadTexts:
etsysPsePortCapabilitySelect.setDescription("This object sets the port's power management capabilities based on the IEEE standard. ieee8023af (1) : IEEE Std 802.3af ieee8023at (2) : IEEE Std 802.3at Attempting to set this value to a capability that is not supported, as indicated by etsysPsePortCapability, will result in an inconsistentValue error.")
etsys_pse_port_detection_status = mib_table_column((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 5, 1, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=named_values(('disabled', 1), ('searching', 2), ('deliveringPower', 3), ('fault', 4), ('test', 5), ('otherFault', 6), ('requestingPower', 7)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
etsysPsePortDetectionStatus.setStatus('current')
if mibBuilder.loadTexts:
etsysPsePortDetectionStatus.setDescription("Describes the operational status of the port PD detection. A value of disabled(1)- indicates that the PSE State diagram is in the state DISABLED. A value of deliveringPower(3) - indicates that the PSE State diagram is in the state POWER_ON for a duration greater than tlim max. A value of fault(4) - indicates that the PSE State diagram is in the state TEST_ERROR. A value of test(5) - indicates that the PSE State diagram is in the state TEST_MODE. A value of otherFault(6) - indicates that the PSE State diagram is in the state IDLE due to the variable error_conditions. A value of searching(2)- indicates the PSE State diagram is in a state other than those listed above. A value of requestingPower(7) - indicates the PSE State diagram is in the state IDLE after transitioning from the state POWER_DENIED due to insufficient PSE power being available to satisfy the PD's requirements.")
etsys_pse_power_supply_status_table = mib_table((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 3, 6))
if mibBuilder.loadTexts:
etsysPsePowerSupplyStatusTable.setStatus('current')
if mibBuilder.loadTexts:
etsysPsePowerSupplyStatusTable.setDescription('Status information for all of the Pse power supply modules.')
etsys_pse_power_supply_status_entry = mib_table_row((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 3, 6, 1)).setIndexNames((0, 'ENTERASYS-POWER-ETHERNET-EXT-MIB', 'etsysPsePowerSupplyModuleNumber'))
if mibBuilder.loadTexts:
etsysPsePowerSupplyStatusEntry.setStatus('current')
if mibBuilder.loadTexts:
etsysPsePowerSupplyStatusEntry.setDescription('Status information for an individual Pse power supply module.')
etsys_pse_power_supply_module_number = mib_table_column((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 3, 6, 1, 1), unsigned32())
if mibBuilder.loadTexts:
etsysPsePowerSupplyModuleNumber.setStatus('current')
if mibBuilder.loadTexts:
etsysPsePowerSupplyModuleNumber.setDescription("A unique number that identifies the Pse power supply and is relative to the module's physical location.")
etsys_pse_power_supply_module_status = mib_table_column((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 3, 6, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('infoNotAvailable', 1), ('notInstalled', 2), ('installedAndOperating', 3), ('installedAndNotOperating', 4)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
etsysPsePowerSupplyModuleStatus.setStatus('current')
if mibBuilder.loadTexts:
etsysPsePowerSupplyModuleStatus.setDescription("Denotes the power supply's status.")
etsys_pse_chassis_power_redundant = notification_type((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 0, 1)).setObjects(('ENTERASYS-POWER-ETHERNET-EXT-MIB', 'etsysPseChassisPowerDetected'))
if mibBuilder.loadTexts:
etsysPseChassisPowerRedundant.setStatus('current')
if mibBuilder.loadTexts:
etsysPseChassisPowerRedundant.setDescription('Pse chassis power is in redundant state. At least 500 msec must elapse between notifications being emitted by the same object instance.')
etsys_pse_chassis_power_non_redundant = notification_type((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 0, 2)).setObjects(('ENTERASYS-POWER-ETHERNET-EXT-MIB', 'etsysPseChassisPowerDetected'))
if mibBuilder.loadTexts:
etsysPseChassisPowerNonRedundant.setStatus('current')
if mibBuilder.loadTexts:
etsysPseChassisPowerNonRedundant.setDescription('Pse chassis power is in non-redundant state. At least 500 msec must elapse between notifications being emitted by the same object instance.')
etsys_pse_power_supply_module_status_change = notification_type((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 1, 0, 3)).setObjects(('ENTERASYS-POWER-ETHERNET-EXT-MIB', 'etsysPsePowerSupplyModuleStatus'))
if mibBuilder.loadTexts:
etsysPsePowerSupplyModuleStatusChange.setStatus('current')
if mibBuilder.loadTexts:
etsysPsePowerSupplyModuleStatusChange.setDescription('A Pse Power Supply module has changed state. At least 500 msec must elapse between notifications being emitted by the same object instance.')
etsys_pse_power_allocation_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 2))
etsys_pse_power_allocation_groups = mib_identifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 2, 1))
etsys_pse_power_allocation_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 2, 2))
etsys_pse_power_allocation_control_group = object_group((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 2, 1, 1)).setObjects(('ENTERASYS-POWER-ETHERNET-EXT-MIB', 'etsysPseChassisPowerAllocationMode'), ('ENTERASYS-POWER-ETHERNET-EXT-MIB', 'etsysPseChassisPowerSnmpNotification'), ('ENTERASYS-POWER-ETHERNET-EXT-MIB', 'etsysPseChassisPowerAvailableMaximum'), ('ENTERASYS-POWER-ETHERNET-EXT-MIB', 'etsysPseSlotPowerMaximum'), ('ENTERASYS-POWER-ETHERNET-EXT-MIB', 'etsysPseSlotPowerAssigned'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
etsys_pse_power_allocation_control_group = etsysPsePowerAllocationControlGroup.setStatus('current')
if mibBuilder.loadTexts:
etsysPsePowerAllocationControlGroup.setDescription('Power over Ethernet Power Allocation Control group.')
etsys_pse_chassis_power_status_group = object_group((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 2, 1, 2)).setObjects(('ENTERASYS-POWER-ETHERNET-EXT-MIB', 'etsysPseChassisPowerDetected'), ('ENTERASYS-POWER-ETHERNET-EXT-MIB', 'etsysPseChassisPowerAvailable'), ('ENTERASYS-POWER-ETHERNET-EXT-MIB', 'etsysPseChassisPowerConsumable'), ('ENTERASYS-POWER-ETHERNET-EXT-MIB', 'etsysPseChassisPowerAssigned'), ('ENTERASYS-POWER-ETHERNET-EXT-MIB', 'etsysPseChassisPowerRedundancy'), ('ENTERASYS-POWER-ETHERNET-EXT-MIB', 'etsysPsePowerSupplyModuleStatus'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
etsys_pse_chassis_power_status_group = etsysPseChassisPowerStatusGroup.setStatus('current')
if mibBuilder.loadTexts:
etsysPseChassisPowerStatusGroup.setDescription('Power over Ethernet Power Supply group.')
etsys_pse_power_notification_group = notification_group((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 2, 1, 3)).setObjects(('ENTERASYS-POWER-ETHERNET-EXT-MIB', 'etsysPseChassisPowerRedundant'), ('ENTERASYS-POWER-ETHERNET-EXT-MIB', 'etsysPseChassisPowerNonRedundant'), ('ENTERASYS-POWER-ETHERNET-EXT-MIB', 'etsysPsePowerSupplyModuleStatusChange'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
etsys_pse_power_notification_group = etsysPsePowerNotificationGroup.setStatus('current')
if mibBuilder.loadTexts:
etsysPsePowerNotificationGroup.setDescription('Power over Ethernet Power Redundancy Notifications group.')
etsys_pse_module_power_management_group = object_group((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 2, 1, 4)).setObjects(('ENTERASYS-POWER-ETHERNET-EXT-MIB', 'etsysPseModulePowerMode'), ('ENTERASYS-POWER-ETHERNET-EXT-MIB', 'etsysPseModulePowerClassBudget'), ('ENTERASYS-POWER-ETHERNET-EXT-MIB', 'etsysPseModulePowerUsage'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
etsys_pse_module_power_management_group = etsysPseModulePowerManagementGroup.setStatus('current')
if mibBuilder.loadTexts:
etsysPseModulePowerManagementGroup.setDescription('Power over Ethernet Module Power Budget Management group.')
etsys_pse_port_power_management_group = object_group((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 2, 1, 5)).setObjects(('ENTERASYS-POWER-ETHERNET-EXT-MIB', 'etsysPsePortPowerLimit'), ('ENTERASYS-POWER-ETHERNET-EXT-MIB', 'etsysPsePortPowerUsage'), ('ENTERASYS-POWER-ETHERNET-EXT-MIB', 'etsysPsePortPDType'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
etsys_pse_port_power_management_group = etsysPsePortPowerManagementGroup.setStatus('deprecated')
if mibBuilder.loadTexts:
etsysPsePortPowerManagementGroup.setDescription('Power over Ethernet Port Power Budget Management group.')
etsys_pse_port_power_management_group_rev2 = object_group((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 2, 1, 6)).setObjects(('ENTERASYS-POWER-ETHERNET-EXT-MIB', 'etsysPsePortPowerLimit'), ('ENTERASYS-POWER-ETHERNET-EXT-MIB', 'etsysPsePortPowerUsage'), ('ENTERASYS-POWER-ETHERNET-EXT-MIB', 'etsysPsePortPDType'), ('ENTERASYS-POWER-ETHERNET-EXT-MIB', 'etsysPsePortCapability'), ('ENTERASYS-POWER-ETHERNET-EXT-MIB', 'etsysPsePortCapabilitySelect'), ('ENTERASYS-POWER-ETHERNET-EXT-MIB', 'etsysPsePortDetectionStatus'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
etsys_pse_port_power_management_group_rev2 = etsysPsePortPowerManagementGroupRev2.setStatus('current')
if mibBuilder.loadTexts:
etsysPsePortPowerManagementGroupRev2.setDescription('Power over Ethernet Port Power Budget Management group.')
etsys_pse_power_allocation_compliance = module_compliance((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 2, 2, 1)).setObjects(('ENTERASYS-POWER-ETHERNET-EXT-MIB', 'etsysPsePowerAllocationControlGroup'), ('ENTERASYS-POWER-ETHERNET-EXT-MIB', 'etsysPseChassisPowerStatusGroup'), ('ENTERASYS-POWER-ETHERNET-EXT-MIB', 'etsysPsePowerNotificationGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
etsys_pse_power_allocation_compliance = etsysPsePowerAllocationCompliance.setStatus('current')
if mibBuilder.loadTexts:
etsysPsePowerAllocationCompliance.setDescription('The compliance statement for devices that support manual power allocation.')
etsys_pse_power_allocation_compliance2 = module_compliance((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 2, 2, 2)).setObjects(('ENTERASYS-POWER-ETHERNET-EXT-MIB', 'etsysPsePowerAllocationControlGroup'), ('ENTERASYS-POWER-ETHERNET-EXT-MIB', 'etsysPseChassisPowerStatusGroup'), ('ENTERASYS-POWER-ETHERNET-EXT-MIB', 'etsysPsePowerNotificationGroup'), ('ENTERASYS-POWER-ETHERNET-EXT-MIB', 'etsysPseModulePowerManagementGroup'), ('ENTERASYS-POWER-ETHERNET-EXT-MIB', 'etsysPsePortPowerManagementGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
etsys_pse_power_allocation_compliance2 = etsysPsePowerAllocationCompliance2.setStatus('deprecated')
if mibBuilder.loadTexts:
etsysPsePowerAllocationCompliance2.setDescription('The compliance statement for devices that support power budgets.')
etsys_pse_power_allocation_compliance2_rev2 = module_compliance((1, 3, 6, 1, 4, 1, 5624, 1, 2, 50, 2, 2, 3)).setObjects(('ENTERASYS-POWER-ETHERNET-EXT-MIB', 'etsysPsePowerAllocationControlGroup'), ('ENTERASYS-POWER-ETHERNET-EXT-MIB', 'etsysPseChassisPowerStatusGroup'), ('ENTERASYS-POWER-ETHERNET-EXT-MIB', 'etsysPsePowerNotificationGroup'), ('ENTERASYS-POWER-ETHERNET-EXT-MIB', 'etsysPseModulePowerManagementGroup'), ('ENTERASYS-POWER-ETHERNET-EXT-MIB', 'etsysPsePortPowerManagementGroupRev2'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
etsys_pse_power_allocation_compliance2_rev2 = etsysPsePowerAllocationCompliance2Rev2.setStatus('current')
if mibBuilder.loadTexts:
etsysPsePowerAllocationCompliance2Rev2.setDescription('The compliance statement for devices that support power budgets.')
mibBuilder.exportSymbols('ENTERASYS-POWER-ETHERNET-EXT-MIB', etsysPseChassisPowerAvailable=etsysPseChassisPowerAvailable, etsysPseChassisPowerRedundancy=etsysPseChassisPowerRedundancy, etsysPsePortPowerManagementTable=etsysPsePortPowerManagementTable, etsysPseSlotPowerAllocationTable=etsysPseSlotPowerAllocationTable, etsysPseSlotPowerAssigned=etsysPseSlotPowerAssigned, etsysPseModulePowerManagementGroup=etsysPseModulePowerManagementGroup, etsysPowerEthernetMibExtMIB=etsysPowerEthernetMibExtMIB, etsysPseSlotPowerManagement=etsysPseSlotPowerManagement, etsysPseSlotPowerAllocation=etsysPseSlotPowerAllocation, etsysPseModulePowerManagementTable=etsysPseModulePowerManagementTable, etsysPsePortDetectionStatus=etsysPsePortDetectionStatus, etsysPseChassisPowerAssigned=etsysPseChassisPowerAssigned, etsysPsePowerSupplyModuleStatusChange=etsysPsePowerSupplyModuleStatusChange, etsysPsePowerAllocationConformance=etsysPsePowerAllocationConformance, etsysPsePortPDType=etsysPsePortPDType, etsysPsePowerSupplyModuleStatus=etsysPsePowerSupplyModuleStatus, etsysPsePortPowerManagementGroup=etsysPsePortPowerManagementGroup, etsysPsePowerSupplyModuleNumber=etsysPsePowerSupplyModuleNumber, etsysPsePowerAllocationGroups=etsysPsePowerAllocationGroups, etsysPowerEthernetObjects=etsysPowerEthernetObjects, etsysPsePortPowerLimit=etsysPsePortPowerLimit, etsysPsePortPowerManagementEntry=etsysPsePortPowerManagementEntry, etsysPseChassisPowerAllocationMode=etsysPseChassisPowerAllocationMode, etsysPsePowerAllocationCompliance2Rev2=etsysPsePowerAllocationCompliance2Rev2, etsysPseChassisPowerConsumable=etsysPseChassisPowerConsumable, etsysPsePowerSupplyStatusEntry=etsysPsePowerSupplyStatusEntry, etsysPseChassisPowerStatus=etsysPseChassisPowerStatus, etsysPsePowerAllocationControlGroup=etsysPsePowerAllocationControlGroup, etsysPseModulePowerClassBudget=etsysPseModulePowerClassBudget, etsysPsePowerAllocationCompliance2=etsysPsePowerAllocationCompliance2, etsysPseChassisPowerAvailableMaximum=etsysPseChassisPowerAvailableMaximum, etsysPseChassisPowerDetected=etsysPseChassisPowerDetected, etsysPsePortPowerUsage=etsysPsePortPowerUsage, etsysPsePowerSupplyStatusTable=etsysPsePowerSupplyStatusTable, etsysPseChassisPowerNonRedundant=etsysPseChassisPowerNonRedundant, etsysPseChassisPowerAllocation=etsysPseChassisPowerAllocation, etsysPseModulePowerUsage=etsysPseModulePowerUsage, etsysPseSlotPowerMaximum=etsysPseSlotPowerMaximum, etsysPsePowerAllocationCompliances=etsysPsePowerAllocationCompliances, etsysPsePortCapabilitySelect=etsysPsePortCapabilitySelect, etsysPseChassisPowerStatusGroup=etsysPseChassisPowerStatusGroup, etsysPsePowerAllocationCompliance=etsysPsePowerAllocationCompliance, etsysPseModulePowerManagementEntry=etsysPseModulePowerManagementEntry, etsysPsePortCapability=etsysPsePortCapability, etsysPseSlotPowerAllocationEntry=etsysPseSlotPowerAllocationEntry, etsysPsePowerNotification=etsysPsePowerNotification, etsysPseChassisPowerRedundant=etsysPseChassisPowerRedundant, etsysPsePortPowerManagementGroupRev2=etsysPsePortPowerManagementGroupRev2, etsysPseModulePowerMode=etsysPseModulePowerMode, etsysPsePortPowerManagement=etsysPsePortPowerManagement, PYSNMP_MODULE_ID=etsysPowerEthernetMibExtMIB, etsysPseChassisPowerSnmpNotification=etsysPseChassisPowerSnmpNotification, etsysPsePowerNotificationGroup=etsysPsePowerNotificationGroup) |
# vim: fdm=indent
'''
author: Fabio Zanini
date: 31/08/15
content: Module that contains fast conversion factories between private and
anonymyzed versions of data.
Such a module is useful during research development, when consensus
on anonymized patient/sample names has not been reached yet.
NOTE: remember to always anonymyze data before publishing them!
'''
# pdict is a dictionary with the anonymyzed patient names as keys and the actual
# names as values. It must be invertible (do not reuse values).
pdict = {'p1': 'WRITE_ME',
}
| """
author: Fabio Zanini
date: 31/08/15
content: Module that contains fast conversion factories between private and
anonymyzed versions of data.
Such a module is useful during research development, when consensus
on anonymized patient/sample names has not been reached yet.
NOTE: remember to always anonymyze data before publishing them!
"""
pdict = {'p1': 'WRITE_ME'} |
def get_index(word):
while True:
try:
pos = int(input("Enter an index: "))
if pos == -1:
return pos
elif pos >= len(word):
print("invalid index")
elif pos <= -1:
print("invalid index")
else:
return pos
except ValueError:
print("invalid index")
def get_letter():
while True:
char = str(input("Enter a letter: "))
if char.islower() and len(char)==1:
return char
elif not char.islower():
print("Character must be a lowercase letter!")
elif len(char) > 1:
print("Must be exactly one character!")
def word_ladder(word):
while True:
pos = get_index(word)
if pos == -1:
return
else:
char=get_letter()
word = list(word)
word[pos] = char
word = ("").join(word)
print(word)
word = input("Enter a word: ")
word_ladder(word) | def get_index(word):
while True:
try:
pos = int(input('Enter an index: '))
if pos == -1:
return pos
elif pos >= len(word):
print('invalid index')
elif pos <= -1:
print('invalid index')
else:
return pos
except ValueError:
print('invalid index')
def get_letter():
while True:
char = str(input('Enter a letter: '))
if char.islower() and len(char) == 1:
return char
elif not char.islower():
print('Character must be a lowercase letter!')
elif len(char) > 1:
print('Must be exactly one character!')
def word_ladder(word):
while True:
pos = get_index(word)
if pos == -1:
return
else:
char = get_letter()
word = list(word)
word[pos] = char
word = ''.join(word)
print(word)
word = input('Enter a word: ')
word_ladder(word) |
x = 50
def func(x):
print('x is', x)
x = 2
print('Changed local x to', x)
func(x)
print('x is still', x) | x = 50
def func(x):
print('x is', x)
x = 2
print('Changed local x to', x)
func(x)
print('x is still', x) |
# package information.
INFO = dict(
name = "latexutils",
description = "Utils for making Latex documents",
author = "Daisuke Kataoka",
author_email = "[email protected]",
url = "https://github.com/dai39suke/latexutils",
classifiers = [
"Programming Language :: Python :: 3.6"
]
)
| info = dict(name='latexutils', description='Utils for making Latex documents', author='Daisuke Kataoka', author_email='[email protected]', url='https://github.com/dai39suke/latexutils', classifiers=['Programming Language :: Python :: 3.6']) |
## (y - y1) / (x - x1) = (y2 - y1) / (x2 - x1)
y = lambda x, x1, x2, y1, y2: y1 + (y2-y1) / (x2-x1) * (x-x1)
def interpolation(xp, X, Y):
if xp < X[0]:
print("Given x-value is out of range")
return None
for i, Xi in enumerate(X):
if xp < Xi:
return y(xp, X[i-1], X[i], Y[i-1], Y[i])
else:
print("Given x-value is out of range")
time = [0, 20, 40, 60, 80, 100]
temp = [26.0, 48.6, 61.6, 71.2, 74.8, 75.2]
print("time =", time)
print("temp =", temp, end='\n\n')
xp = float(input("Find temparture at time = "))
yp = interpolation(xp, time, temp)
print("The temperature =", yp)
| y = lambda x, x1, x2, y1, y2: y1 + (y2 - y1) / (x2 - x1) * (x - x1)
def interpolation(xp, X, Y):
if xp < X[0]:
print('Given x-value is out of range')
return None
for (i, xi) in enumerate(X):
if xp < Xi:
return y(xp, X[i - 1], X[i], Y[i - 1], Y[i])
else:
print('Given x-value is out of range')
time = [0, 20, 40, 60, 80, 100]
temp = [26.0, 48.6, 61.6, 71.2, 74.8, 75.2]
print('time =', time)
print('temp =', temp, end='\n\n')
xp = float(input('Find temparture at time = '))
yp = interpolation(xp, time, temp)
print('The temperature =', yp) |
'''
Let us say your expense for every month are listed below,
January - 2200
February - 2350
March - 2600
April - 2130
May - 2190
Create a list to store these monthly expenses and using that find out,
1. In Feb, how many dollars you spent extra compare to January?
2. Find out your total expense in first quarter (first three months) of the year.
3. Find out if you spent exactly 2000 dollars in any month
4. June month just finished and your expense is 1980 dollar. Add this item to our monthly expense list
5. You returned an item that you bought in a month of April and
got a refund of 200$. Make a correction to your monthly expense list
based on this
'''
Expenses=[2200,2350,2600,2190]
#1 solution
ans1=Expenses[1]-Expenses[0]
print(ans1)
#2 solution
ans2=Expenses[0]+Expenses[1]+Expenses[2]
print(ans2)
#3 solution
for i in range(len(Expenses)):
if(Expenses[i]==2000):
print(i)
else:
pass
#04 solution
ans3=Expenses.insert(4,1980)
print(Expenses)
#05 solution
ans4=Expenses[3]-200
print(ans4)
| """
Let us say your expense for every month are listed below,
January - 2200
February - 2350
March - 2600
April - 2130
May - 2190
Create a list to store these monthly expenses and using that find out,
1. In Feb, how many dollars you spent extra compare to January?
2. Find out your total expense in first quarter (first three months) of the year.
3. Find out if you spent exactly 2000 dollars in any month
4. June month just finished and your expense is 1980 dollar. Add this item to our monthly expense list
5. You returned an item that you bought in a month of April and
got a refund of 200$. Make a correction to your monthly expense list
based on this
"""
expenses = [2200, 2350, 2600, 2190]
ans1 = Expenses[1] - Expenses[0]
print(ans1)
ans2 = Expenses[0] + Expenses[1] + Expenses[2]
print(ans2)
for i in range(len(Expenses)):
if Expenses[i] == 2000:
print(i)
else:
pass
ans3 = Expenses.insert(4, 1980)
print(Expenses)
ans4 = Expenses[3] - 200
print(ans4) |
class Solution:
def shortestWordDistance(self, words: 'List[str]', word1: 'str', word2: 'str') -> 'int':
i1 = i2 = -1
ans = math.inf
equal = word1 == word2
for i, word in enumerate(words):
if word == word1:
i1 = i
if word == word2:
if equal:
i1 = i2
i2 = i
if i1 != -1 and i2 != -1:
ans = min(ans, abs(i1 - i2))
return ans
| class Solution:
def shortest_word_distance(self, words: 'List[str]', word1: 'str', word2: 'str') -> 'int':
i1 = i2 = -1
ans = math.inf
equal = word1 == word2
for (i, word) in enumerate(words):
if word == word1:
i1 = i
if word == word2:
if equal:
i1 = i2
i2 = i
if i1 != -1 and i2 != -1:
ans = min(ans, abs(i1 - i2))
return ans |
f = open("HaltestellenVVS_simplified_utf8.csv", "r")
r = open("HaltestellenVVS_simplified_utf8_stationID.csv", "w")
r.write(f.readline())
lines = f.readlines()
for line in lines:
stationID = line.split(",")[0]
newStationID = int(stationID)+5000000
outLine = str(newStationID) + line[len(stationID):]
r.write(outLine)
r.close()
f.close()
| f = open('HaltestellenVVS_simplified_utf8.csv', 'r')
r = open('HaltestellenVVS_simplified_utf8_stationID.csv', 'w')
r.write(f.readline())
lines = f.readlines()
for line in lines:
station_id = line.split(',')[0]
new_station_id = int(stationID) + 5000000
out_line = str(newStationID) + line[len(stationID):]
r.write(outLine)
r.close()
f.close() |
# Definition for a binary tree node
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution:
# @param root, a tree node
# @return a list of lists of integers
def levelOrder(self, root):
vals = []
if not root:
return vals
cache = [root]
while len(cache) > 0:
tmp = []
level = []
for node in cache:
level.append(node.val)
if node.left:
tmp.append(node.left)
if node.right:
tmp.append(node.right)
vals.append(level)
cache = tmp
return vals
| class Solution:
def level_order(self, root):
vals = []
if not root:
return vals
cache = [root]
while len(cache) > 0:
tmp = []
level = []
for node in cache:
level.append(node.val)
if node.left:
tmp.append(node.left)
if node.right:
tmp.append(node.right)
vals.append(level)
cache = tmp
return vals |
def quicksorted(L):
#base case
if len(L) < 2:
return L[:]
# Divide!
pivot = L[-1]
LT = [e for e in L if e < pivot]
ET = [e for e in L if e == pivot]
GT = [e for e in L if e > pivot]
# Conquer
A = quicksorted(LT)
B = quicksorted(GT)
# Combine
return A + ET + B
def quicksort(L, left = 0, right = None):
if right is None:
right = len(L)
if right - left > 1:
# Divide!
mid = partition(L, left, right)
# Conquer!
quicksort(L, left, mid)
quicksort(L, mid+1, right)
# Combine!
# Nothing to do!
def partition(L, left, right):
pivot = right - 1
i = left # index in left half
j = pivot - 1 # index in right half
while i < j:
# Move i to point to an element >= L[pivot]
while L[i] < L[pivot]:
i = i + 1
# Move j to point to an element < L[pivot]
while i < j and L[j] >= L[pivot]:
j = j - 1
# Swap elements i and j if i < j
if i < j:
L[i], L[j] = L[j], L[i]
# Put the pivot in place.
if L[pivot] <= L[i]:
L[pivot], L[i] = L[i], L[pivot]
pivot = i
# Return the index of the pivot.
return pivot
| def quicksorted(L):
if len(L) < 2:
return L[:]
pivot = L[-1]
lt = [e for e in L if e < pivot]
et = [e for e in L if e == pivot]
gt = [e for e in L if e > pivot]
a = quicksorted(LT)
b = quicksorted(GT)
return A + ET + B
def quicksort(L, left=0, right=None):
if right is None:
right = len(L)
if right - left > 1:
mid = partition(L, left, right)
quicksort(L, left, mid)
quicksort(L, mid + 1, right)
def partition(L, left, right):
pivot = right - 1
i = left
j = pivot - 1
while i < j:
while L[i] < L[pivot]:
i = i + 1
while i < j and L[j] >= L[pivot]:
j = j - 1
if i < j:
(L[i], L[j]) = (L[j], L[i])
if L[pivot] <= L[i]:
(L[pivot], L[i]) = (L[i], L[pivot])
pivot = i
return pivot |
# Parsed from https://www.ibm.com/docs/en/spectrum-lsf/10.1.0?topic=options-o
bjobs_fields = [
{"name": "jobid", "width": 7, "aliases": "id", "unit": None},
{"name": "jobindex", "width": 8, "aliases": None, "unit": None},
{"name": "stat", "width": 5, "aliases": None, "unit": None},
{"name": "user", "width": 7, "aliases": None, "unit": None},
{"name": "user_group", "width": 15, "aliases": "ugroup", "unit": None},
{"name": "queue", "width": 10, "aliases": None, "unit": None},
{"name": "job_name", "width": 10, "aliases": "name", "unit": None},
{"name": "job_description", "width": 17, "aliases": "description", "unit": None},
{"name": "proj_name", "width": 11, "aliases": "proj, project", "unit": None},
{"name": "application", "width": 13, "aliases": "app", "unit": None},
{"name": "service_class", "width": 13, "aliases": "sla", "unit": None},
{"name": "job_group", "width": 10, "aliases": "group", "unit": None},
{"name": "job_priority", "width": 12, "aliases": "priority", "unit": None},
{"name": "rsvid", "width": 40, "aliases": None, "unit": None},
{"name": "esub", "width": 20, "aliases": None, "unit": None},
{"name": "kill_reason", "width": 50, "aliases": None, "unit": None},
{"name": "suspend_reason", "width": 50, "aliases": None, "unit": None},
{"name": "resume_reason", "width": 50, "aliases": None, "unit": None},
{"name": "kill_issue_host", "width": 50, "aliases": None, "unit": None},
{"name": "suspend_issue_host", "width": 50, "aliases": None, "unit": None},
{"name": "resume_issue_host", "width": 50, "aliases": None, "unit": None},
{"name": "dependency", "width": 15, "aliases": None, "unit": None},
{"name": "pend_reason", "width": 11, "aliases": None, "unit": None},
{"name": "charged_saap", "width": 50, "aliases": "saap", "unit": None},
{"name": "command", "width": 15, "aliases": "cmd", "unit": None},
{"name": "pre_exec_command", "width": 16, "aliases": "pre_cmd", "unit": None},
{"name": "post_exec_command", "width": 17, "aliases": "post_cmd", "unit": None},
{
"name": "resize_notification_command",
"width": 27,
"aliases": "resize_cmd",
"unit": None,
},
{"name": "pids", "width": 20, "aliases": None, "unit": None},
{"name": "exit_code", "width": 10, "aliases": None, "unit": None},
{"name": "exit_reason", "width": 50, "aliases": None, "unit": None},
{"name": "interactive", "width": 11, "aliases": None, "unit": None},
{"name": "from_host", "width": 11, "aliases": None, "unit": None},
{"name": "first_host", "width": 11, "aliases": None, "unit": None},
{"name": "exec_host", "width": 11, "aliases": None, "unit": None},
{"name": "nexec_host", "width": 10, "aliases": None, "unit": None},
{"name": "ask_hosts", "width": 30, "aliases": None, "unit": None},
{"name": "alloc_slot", "width": 20, "aliases": None, "unit": None},
{"name": "nalloc_slot", "width": 10, "aliases": None, "unit": None},
{"name": "host_file", "width": 10, "aliases": None, "unit": None},
{"name": "exclusive", "width": 13, "aliases": None, "unit": None},
{"name": "nreq_slot", "width": 10, "aliases": None, "unit": None},
{"name": "submit_time", "width": 15, "aliases": None, "unit": "time stamp"},
{"name": "start_time", "width": 15, "aliases": None, "unit": "time stamp"},
{
"name": "estimated_start_time",
"width": 20,
"aliases": "estart_time",
"unit": "time stamp",
},
{
"name": "specified_start_time",
"width": 20,
"aliases": "sstart_time",
"unit": "time stamp",
},
{
"name": "specified_terminate_time",
"width": 24,
"aliases": "sterminate_time",
"unit": "time stamp",
},
{"name": "time_left", "width": 11, "aliases": None, "unit": "seconds"},
{"name": "finish_time", "width": 16, "aliases": None, "unit": "time stamp"},
{"name": "estimated_run_time", "width": 20, "aliases": "ertime", "unit": "seconds"},
{"name": "ru_utime", "width": 12, "aliases": None, "unit": "seconds"},
{"name": "ru_stime", "width": 12, "aliases": None, "unit": "seconds"},
{"name": "%complete", "width": 11, "aliases": None, "unit": None},
{"name": "warning_action", "width": 15, "aliases": "warn_act", "unit": None},
{"name": "action_warning_time", "width": 19, "aliases": "warn_time", "unit": None},
{"name": "pendstate", "width": 9, "aliases": None, "unit": None},
{"name": "pend_time", "width": 12, "aliases": None, "unit": "seconds"},
{"name": "ependtime", "width": 12, "aliases": None, "unit": "seconds"},
{"name": "ipendtime", "width": 12, "aliases": None, "unit": "seconds"},
{
"name": "estimated_sim_start_time",
"width": 24,
"aliases": "esstart_time",
"unit": "time stamp",
},
{"name": "effective_plimit", "width": 18, "aliases": None, "unit": "seconds"},
{"name": "plimit_remain", "width": 15, "aliases": None, "unit": "seconds"},
{"name": "effective_eplimit", "width": 19, "aliases": None, "unit": "seconds"},
{"name": "eplimit_remain", "width": 16, "aliases": None, "unit": "seconds"},
{"name": "cpu_used", "width": 10, "aliases": None, "unit": None},
{"name": "run_time", "width": 15, "aliases": None, "unit": "seconds"},
{"name": "idle_factor", "width": 11, "aliases": None, "unit": None},
{"name": "exception_status", "width": 16, "aliases": "except_stat", "unit": None},
{"name": "slots", "width": 5, "aliases": None, "unit": None},
{"name": "mem", "width": 15, "aliases": None, "unit": "LSF_UNIT_FOR_LIMITS"},
{"name": "max_mem", "width": 15, "aliases": None, "unit": "LSF_UNIT_FOR_LIMITS"},
{"name": "avg_mem", "width": 15, "aliases": None, "unit": "LSF_UNIT_FOR_LIMITS"},
{"name": "memlimit", "width": 15, "aliases": None, "unit": "LSF_UNIT_FOR_LIMITS"},
{"name": "swap", "width": 15, "aliases": None, "unit": "LSF_UNIT_FOR_LIMITS"},
{"name": "swaplimit", "width": 15, "aliases": None, "unit": "LSF_UNIT_FOR_LIMITS"},
{"name": "gpu_num", "width": 10, "aliases": "gnum", "unit": None},
{"name": "gpu_mode", "width": 20, "aliases": "gmode", "unit": None},
{"name": "j_exclusive", "width": 15, "aliases": "j_excl", "unit": None},
{"name": "gpu_alloc", "width": 30, "aliases": "galloc", "unit": None},
{"name": "nthreads", "width": 10, "aliases": None, "unit": None},
{"name": "hrusage", "width": 50, "aliases": None, "unit": None},
{"name": "min_req_proc", "width": 12, "aliases": None, "unit": None},
{"name": "max_req_proc", "width": 12, "aliases": None, "unit": None},
{"name": "effective_resreq", "width": 17, "aliases": "eresreq", "unit": None},
{"name": "combined_resreq", "width": 20, "aliases": "cresreq", "unit": None},
{"name": "network_req", "width": 15, "aliases": None, "unit": None},
{"name": "filelimit", "width": 10, "aliases": None, "unit": None},
{"name": "corelimit", "width": 15, "aliases": None, "unit": None},
{"name": "stacklimit", "width": 15, "aliases": None, "unit": None},
{"name": "processlimit", "width": 12, "aliases": None, "unit": None},
{"name": "runtimelimit", "width": 12, "aliases": None, "unit": None},
{"name": "plimit", "width": 10, "aliases": None, "unit": "seconds"},
{"name": "eplimit", "width": 10, "aliases": None, "unit": "seconds"},
{"name": "input_file", "width": 10, "aliases": None, "unit": None},
{"name": "output_file", "width": 11, "aliases": None, "unit": None},
{"name": "error_file", "width": 10, "aliases": None, "unit": None},
{"name": "output_dir", "width": 15, "aliases": None, "unit": None},
{"name": "sub_cwd", "width": 10, "aliases": None, "unit": None},
{"name": "exec_home", "width": 10, "aliases": None, "unit": None},
{"name": "exec_cwd", "width": 10, "aliases": None, "unit": None},
{"name": "licproject", "width": 20, "aliases": None, "unit": None},
{"name": "forward_cluster", "width": 15, "aliases": "fwd_cluster", "unit": None},
{"name": "forward_time", "width": 15, "aliases": "fwd_time", "unit": "time stamp"},
{"name": "srcjobid", "width": 8, "aliases": None, "unit": None},
{"name": "dstjobid", "width": 8, "aliases": None, "unit": None},
{"name": "source_cluster", "width": 15, "aliases": "srcluster", "unit": None},
{"name": "energy", "width": None, "aliases": None, "unit": "Joule"},
{"name": "gpfsio", "width": None, "aliases": None, "unit": None},
]
| bjobs_fields = [{'name': 'jobid', 'width': 7, 'aliases': 'id', 'unit': None}, {'name': 'jobindex', 'width': 8, 'aliases': None, 'unit': None}, {'name': 'stat', 'width': 5, 'aliases': None, 'unit': None}, {'name': 'user', 'width': 7, 'aliases': None, 'unit': None}, {'name': 'user_group', 'width': 15, 'aliases': 'ugroup', 'unit': None}, {'name': 'queue', 'width': 10, 'aliases': None, 'unit': None}, {'name': 'job_name', 'width': 10, 'aliases': 'name', 'unit': None}, {'name': 'job_description', 'width': 17, 'aliases': 'description', 'unit': None}, {'name': 'proj_name', 'width': 11, 'aliases': 'proj, project', 'unit': None}, {'name': 'application', 'width': 13, 'aliases': 'app', 'unit': None}, {'name': 'service_class', 'width': 13, 'aliases': 'sla', 'unit': None}, {'name': 'job_group', 'width': 10, 'aliases': 'group', 'unit': None}, {'name': 'job_priority', 'width': 12, 'aliases': 'priority', 'unit': None}, {'name': 'rsvid', 'width': 40, 'aliases': None, 'unit': None}, {'name': 'esub', 'width': 20, 'aliases': None, 'unit': None}, {'name': 'kill_reason', 'width': 50, 'aliases': None, 'unit': None}, {'name': 'suspend_reason', 'width': 50, 'aliases': None, 'unit': None}, {'name': 'resume_reason', 'width': 50, 'aliases': None, 'unit': None}, {'name': 'kill_issue_host', 'width': 50, 'aliases': None, 'unit': None}, {'name': 'suspend_issue_host', 'width': 50, 'aliases': None, 'unit': None}, {'name': 'resume_issue_host', 'width': 50, 'aliases': None, 'unit': None}, {'name': 'dependency', 'width': 15, 'aliases': None, 'unit': None}, {'name': 'pend_reason', 'width': 11, 'aliases': None, 'unit': None}, {'name': 'charged_saap', 'width': 50, 'aliases': 'saap', 'unit': None}, {'name': 'command', 'width': 15, 'aliases': 'cmd', 'unit': None}, {'name': 'pre_exec_command', 'width': 16, 'aliases': 'pre_cmd', 'unit': None}, {'name': 'post_exec_command', 'width': 17, 'aliases': 'post_cmd', 'unit': None}, {'name': 'resize_notification_command', 'width': 27, 'aliases': 'resize_cmd', 'unit': None}, {'name': 'pids', 'width': 20, 'aliases': None, 'unit': None}, {'name': 'exit_code', 'width': 10, 'aliases': None, 'unit': None}, {'name': 'exit_reason', 'width': 50, 'aliases': None, 'unit': None}, {'name': 'interactive', 'width': 11, 'aliases': None, 'unit': None}, {'name': 'from_host', 'width': 11, 'aliases': None, 'unit': None}, {'name': 'first_host', 'width': 11, 'aliases': None, 'unit': None}, {'name': 'exec_host', 'width': 11, 'aliases': None, 'unit': None}, {'name': 'nexec_host', 'width': 10, 'aliases': None, 'unit': None}, {'name': 'ask_hosts', 'width': 30, 'aliases': None, 'unit': None}, {'name': 'alloc_slot', 'width': 20, 'aliases': None, 'unit': None}, {'name': 'nalloc_slot', 'width': 10, 'aliases': None, 'unit': None}, {'name': 'host_file', 'width': 10, 'aliases': None, 'unit': None}, {'name': 'exclusive', 'width': 13, 'aliases': None, 'unit': None}, {'name': 'nreq_slot', 'width': 10, 'aliases': None, 'unit': None}, {'name': 'submit_time', 'width': 15, 'aliases': None, 'unit': 'time stamp'}, {'name': 'start_time', 'width': 15, 'aliases': None, 'unit': 'time stamp'}, {'name': 'estimated_start_time', 'width': 20, 'aliases': 'estart_time', 'unit': 'time stamp'}, {'name': 'specified_start_time', 'width': 20, 'aliases': 'sstart_time', 'unit': 'time stamp'}, {'name': 'specified_terminate_time', 'width': 24, 'aliases': 'sterminate_time', 'unit': 'time stamp'}, {'name': 'time_left', 'width': 11, 'aliases': None, 'unit': 'seconds'}, {'name': 'finish_time', 'width': 16, 'aliases': None, 'unit': 'time stamp'}, {'name': 'estimated_run_time', 'width': 20, 'aliases': 'ertime', 'unit': 'seconds'}, {'name': 'ru_utime', 'width': 12, 'aliases': None, 'unit': 'seconds'}, {'name': 'ru_stime', 'width': 12, 'aliases': None, 'unit': 'seconds'}, {'name': '%complete', 'width': 11, 'aliases': None, 'unit': None}, {'name': 'warning_action', 'width': 15, 'aliases': 'warn_act', 'unit': None}, {'name': 'action_warning_time', 'width': 19, 'aliases': 'warn_time', 'unit': None}, {'name': 'pendstate', 'width': 9, 'aliases': None, 'unit': None}, {'name': 'pend_time', 'width': 12, 'aliases': None, 'unit': 'seconds'}, {'name': 'ependtime', 'width': 12, 'aliases': None, 'unit': 'seconds'}, {'name': 'ipendtime', 'width': 12, 'aliases': None, 'unit': 'seconds'}, {'name': 'estimated_sim_start_time', 'width': 24, 'aliases': 'esstart_time', 'unit': 'time stamp'}, {'name': 'effective_plimit', 'width': 18, 'aliases': None, 'unit': 'seconds'}, {'name': 'plimit_remain', 'width': 15, 'aliases': None, 'unit': 'seconds'}, {'name': 'effective_eplimit', 'width': 19, 'aliases': None, 'unit': 'seconds'}, {'name': 'eplimit_remain', 'width': 16, 'aliases': None, 'unit': 'seconds'}, {'name': 'cpu_used', 'width': 10, 'aliases': None, 'unit': None}, {'name': 'run_time', 'width': 15, 'aliases': None, 'unit': 'seconds'}, {'name': 'idle_factor', 'width': 11, 'aliases': None, 'unit': None}, {'name': 'exception_status', 'width': 16, 'aliases': 'except_stat', 'unit': None}, {'name': 'slots', 'width': 5, 'aliases': None, 'unit': None}, {'name': 'mem', 'width': 15, 'aliases': None, 'unit': 'LSF_UNIT_FOR_LIMITS'}, {'name': 'max_mem', 'width': 15, 'aliases': None, 'unit': 'LSF_UNIT_FOR_LIMITS'}, {'name': 'avg_mem', 'width': 15, 'aliases': None, 'unit': 'LSF_UNIT_FOR_LIMITS'}, {'name': 'memlimit', 'width': 15, 'aliases': None, 'unit': 'LSF_UNIT_FOR_LIMITS'}, {'name': 'swap', 'width': 15, 'aliases': None, 'unit': 'LSF_UNIT_FOR_LIMITS'}, {'name': 'swaplimit', 'width': 15, 'aliases': None, 'unit': 'LSF_UNIT_FOR_LIMITS'}, {'name': 'gpu_num', 'width': 10, 'aliases': 'gnum', 'unit': None}, {'name': 'gpu_mode', 'width': 20, 'aliases': 'gmode', 'unit': None}, {'name': 'j_exclusive', 'width': 15, 'aliases': 'j_excl', 'unit': None}, {'name': 'gpu_alloc', 'width': 30, 'aliases': 'galloc', 'unit': None}, {'name': 'nthreads', 'width': 10, 'aliases': None, 'unit': None}, {'name': 'hrusage', 'width': 50, 'aliases': None, 'unit': None}, {'name': 'min_req_proc', 'width': 12, 'aliases': None, 'unit': None}, {'name': 'max_req_proc', 'width': 12, 'aliases': None, 'unit': None}, {'name': 'effective_resreq', 'width': 17, 'aliases': 'eresreq', 'unit': None}, {'name': 'combined_resreq', 'width': 20, 'aliases': 'cresreq', 'unit': None}, {'name': 'network_req', 'width': 15, 'aliases': None, 'unit': None}, {'name': 'filelimit', 'width': 10, 'aliases': None, 'unit': None}, {'name': 'corelimit', 'width': 15, 'aliases': None, 'unit': None}, {'name': 'stacklimit', 'width': 15, 'aliases': None, 'unit': None}, {'name': 'processlimit', 'width': 12, 'aliases': None, 'unit': None}, {'name': 'runtimelimit', 'width': 12, 'aliases': None, 'unit': None}, {'name': 'plimit', 'width': 10, 'aliases': None, 'unit': 'seconds'}, {'name': 'eplimit', 'width': 10, 'aliases': None, 'unit': 'seconds'}, {'name': 'input_file', 'width': 10, 'aliases': None, 'unit': None}, {'name': 'output_file', 'width': 11, 'aliases': None, 'unit': None}, {'name': 'error_file', 'width': 10, 'aliases': None, 'unit': None}, {'name': 'output_dir', 'width': 15, 'aliases': None, 'unit': None}, {'name': 'sub_cwd', 'width': 10, 'aliases': None, 'unit': None}, {'name': 'exec_home', 'width': 10, 'aliases': None, 'unit': None}, {'name': 'exec_cwd', 'width': 10, 'aliases': None, 'unit': None}, {'name': 'licproject', 'width': 20, 'aliases': None, 'unit': None}, {'name': 'forward_cluster', 'width': 15, 'aliases': 'fwd_cluster', 'unit': None}, {'name': 'forward_time', 'width': 15, 'aliases': 'fwd_time', 'unit': 'time stamp'}, {'name': 'srcjobid', 'width': 8, 'aliases': None, 'unit': None}, {'name': 'dstjobid', 'width': 8, 'aliases': None, 'unit': None}, {'name': 'source_cluster', 'width': 15, 'aliases': 'srcluster', 'unit': None}, {'name': 'energy', 'width': None, 'aliases': None, 'unit': 'Joule'}, {'name': 'gpfsio', 'width': None, 'aliases': None, 'unit': None}] |
# from ncats.translator.module.disease.gene import disease_associated_genes
@given('a disease term {disease_identifier} for disease label {disease_label} in Translator Modules')
def step_impl(context, disease_identifier, disease_label):
context.disease = {"disease_identifier":disease_identifier, "disease_label":disease_label}
@when('we run the disease associated genes Translator Module')
def step_impl(context):
#translator-modules/ncats/translator/modules/disease/gene/
#initialization will run the method
context.module = DiseaseAssociatedGeneSet(context.disease)
@then('the module result contains {gene_ids}')
def step_impl(context):
hit_ids = [ x["hit_id"] for x in context.module.disease_associated_genes ]
gene_ids = gene_ids.split(",")
for gene in gene_ids:
assert gene in hit_ids
| @given('a disease term {disease_identifier} for disease label {disease_label} in Translator Modules')
def step_impl(context, disease_identifier, disease_label):
context.disease = {'disease_identifier': disease_identifier, 'disease_label': disease_label}
@when('we run the disease associated genes Translator Module')
def step_impl(context):
context.module = disease_associated_gene_set(context.disease)
@then('the module result contains {gene_ids}')
def step_impl(context):
hit_ids = [x['hit_id'] for x in context.module.disease_associated_genes]
gene_ids = gene_ids.split(',')
for gene in gene_ids:
assert gene in hit_ids |
N=int(input())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
count=0
for i in range(N):
count+=min(A[i],B[i])
if A[i]<B[i]:
if A[i+1]<B[i]-A[i]:
count+=A[i+1]
A[i+1]=0
else:
count+=B[i]-A[i]
A[i+1]-=B[i]-A[i]
print(count) | n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
count = 0
for i in range(N):
count += min(A[i], B[i])
if A[i] < B[i]:
if A[i + 1] < B[i] - A[i]:
count += A[i + 1]
A[i + 1] = 0
else:
count += B[i] - A[i]
A[i + 1] -= B[i] - A[i]
print(count) |
def ground_ship(weight):
flat = 20
if weight <= 2:
return weight*1.5 + flat
elif weight > 2 and weight <= 6:
return weight*3.0 + flat
elif weight > 6 and weight <= 10:
return weight*4.0 + flat
else:
return weight*4.75 + flat
cost = ground_ship(8.4)
print(cost)
def drone_ship(weight):
flat = 0
if weight <= 2:
return weight*4.5 + flat
elif weight > 2 and weight <= 6:
return weight*9.0 + flat
elif weight > 6 and weight <= 10:
return weight*12.0 + flat
else:
return weight*14.25 + flat
cost1 = drone_ship(1.5)
print(cost1) | def ground_ship(weight):
flat = 20
if weight <= 2:
return weight * 1.5 + flat
elif weight > 2 and weight <= 6:
return weight * 3.0 + flat
elif weight > 6 and weight <= 10:
return weight * 4.0 + flat
else:
return weight * 4.75 + flat
cost = ground_ship(8.4)
print(cost)
def drone_ship(weight):
flat = 0
if weight <= 2:
return weight * 4.5 + flat
elif weight > 2 and weight <= 6:
return weight * 9.0 + flat
elif weight > 6 and weight <= 10:
return weight * 12.0 + flat
else:
return weight * 14.25 + flat
cost1 = drone_ship(1.5)
print(cost1) |
# Copyright 2018 ZTE Corporation.
#
# 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.
GRANT_DATA = {
'vnfInstanceId': '1',
'vnfLcmOpOccId': '2',
'vnfdId': '3',
'flavourId': '4',
'operation': 'INSTANTIATE',
'isAutomaticInvocation': True,
'instantiationLevelId': '5',
'addResources': [
{
'id': '1',
'type': 'COMPUTE',
'vduId': '2',
'resourceTemplateId': '3',
'resourceTemplate': {
'vimConnectionId': '4',
'resourceProviderId': '5',
'resourceId': '6',
'vimLevelResourceType': '7'
}
}
],
'placementConstraints': [
{
'affinityOrAntiAffinity': 'AFFINITY',
'scope': 'NFVI_POP',
'resource': [
{
'idType': 'RES_MGMT',
'resourceId': '1',
'vimConnectionId': '2',
'resourceProviderId': '3'
}
]
}
],
'vimConstraints': [
{
'sameResourceGroup': True,
'resource': [
{
'idType': 'RES_MGMT',
'resourceId': '1',
'vimConnectionId': '2',
'resourceProviderId': '3'
}
]
}
],
'additionalParams': {},
'_links': {
'vnfLcmOpOcc': {
'href': '1'
},
'vnfInstance': {
'href': '2'
}
}
}
VNF_LCM_OP_OCC_NOTIFICATION_DATA = {
'id': 'string',
'notificationType': 'VnfLcmOperationOccurrenceNotification',
'subscriptionId': 'string',
'timeStamp': 'string',
'notificationStatus': 'START',
'operationState': 'STARTING',
'vnfInstanceId': 'string',
'operation': 'INSTANTIATE',
'isAutomaticInvocation': True,
'vnfLcmOpOccId': 'string',
'affectedVnfcs': [{
'id': 'string',
'vduId': 'string',
'changeType': 'ADDED',
'computeResource': {
'vimConnectionId': 'string',
'resourceProviderId': 'string',
'resourceId': 'string',
'vimLevelResourceType': 'string'
},
'metadata': {},
'affectedVnfcCpIds': [],
'addedStorageResourceIds': [],
'removedStorageResourceIds': [],
}],
'affectedVirtualLinks': [{
'id': 'string',
'virtualLinkDescId': 'string',
'changeType': 'ADDED',
'networkResource': {
'vimConnectionId': 'string',
'resourceProviderId': 'string',
'resourceId': 'string',
'vimLevelResourceType': 'network',
}
}],
'affectedVirtualStorages': [{
'id': 'string',
'virtualStorageDescId': 'string',
'changeType': 'ADDED',
'storageResource': {
'vimConnectionId': 'string',
'resourceProviderId': 'string',
'resourceId': 'string',
'vimLevelResourceType': 'network',
},
'metadata': {}
}],
'changedInfo': {
'vnfInstanceName': 'string',
'vnfInstanceDescription': 'string',
'vnfConfigurableProperties': {
'additionalProp1': 'string',
'additionalProp2': 'string',
'additionalProp3': 'string'
},
'metadata': {
'additionalProp1': 'string',
'additionalProp2': 'string',
'additionalProp3': 'string'
},
'extensions': {
'additionalProp1': 'string',
'additionalProp2': 'string',
'additionalProp3': 'string'
},
'vimConnectionInfo': [{
'id': 'string',
'vimId': 'string',
'vimType': 'string',
'interfaceInfo': {
'additionalProp1': 'string',
'additionalProp2': 'string',
'additionalProp3': 'string'
},
'accessInfo': {
'additionalProp1': 'string',
'additionalProp2': 'string',
'additionalProp3': 'string'
},
'extra': {
'additionalProp1': 'string',
'additionalProp2': 'string',
'additionalProp3': 'string'
}
}],
'vnfPkgId': 'string',
'vnfdId': 'string',
'vnfProvider': 'string',
'vnfProductName': 'string',
'vnfSoftwareVersion': 'string',
'vnfdVersion': 'string'
},
'changedExtConnectivity': [{
'id': 'string',
'resourceHandle': {
'vimConnectionId': 'string',
'resourceProviderId': 'string',
'resourceId': 'string',
'vimLevelResourceType': 'string'
},
'extLinkPorts': [{
'id': 'string',
'resourceHandle': {
'vimConnectionId': 'string',
'resourceProviderId': 'string',
'resourceId': 'string',
'vimLevelResourceType': 'string'
},
'cpInstanceId': 'string'
}]
}],
'error': {
'type': 'string',
'title': 'string',
'status': 0,
'detail': 'string',
'instance': 'string'
},
'_links': {
'vnfInstance': {'href': 'string'},
'subscription': {'href': 'string'},
'vnfLcmOpOcc': {'href': 'string'}
}
}
VNF_IDENTIFIER_CREATION_NOTIFICATION_DATA = {
'id': 'Identifier of this notification',
'notificationType': 'VnfIdentifierCreationNotification',
'subscriptionId': 'Identifier of the subscription',
'timeStamp': '2018-9-12T00:00:00',
'vnfInstanceId': '2',
'_links': {
'vnfInstance': {'href': 'URI of the referenced resource'},
'subscription': {'href': 'URI of the referenced resource'},
'vnfLcmOpOcc': {'href': 'URI of the referenced resource'}
}
}
VNF_IDENTIFIER_DELETION_NOTIFICATION_DATA = {
'id': 'Identifier of this notification',
'notificationType': 'VnfIdentifierDeletionNotification',
'subscriptionId': 'Identifier of the subscription',
'timeStamp': '2018-9-12T00:00:00',
'vnfInstanceId': '2',
'_links': {
'vnfInstance': {'href': 'URI of the referenced resource'},
'subscription': {'href': 'URI of the referenced resource'},
'vnfLcmOpOcc': {'href': 'URI of the referenced resource'}
}
}
| grant_data = {'vnfInstanceId': '1', 'vnfLcmOpOccId': '2', 'vnfdId': '3', 'flavourId': '4', 'operation': 'INSTANTIATE', 'isAutomaticInvocation': True, 'instantiationLevelId': '5', 'addResources': [{'id': '1', 'type': 'COMPUTE', 'vduId': '2', 'resourceTemplateId': '3', 'resourceTemplate': {'vimConnectionId': '4', 'resourceProviderId': '5', 'resourceId': '6', 'vimLevelResourceType': '7'}}], 'placementConstraints': [{'affinityOrAntiAffinity': 'AFFINITY', 'scope': 'NFVI_POP', 'resource': [{'idType': 'RES_MGMT', 'resourceId': '1', 'vimConnectionId': '2', 'resourceProviderId': '3'}]}], 'vimConstraints': [{'sameResourceGroup': True, 'resource': [{'idType': 'RES_MGMT', 'resourceId': '1', 'vimConnectionId': '2', 'resourceProviderId': '3'}]}], 'additionalParams': {}, '_links': {'vnfLcmOpOcc': {'href': '1'}, 'vnfInstance': {'href': '2'}}}
vnf_lcm_op_occ_notification_data = {'id': 'string', 'notificationType': 'VnfLcmOperationOccurrenceNotification', 'subscriptionId': 'string', 'timeStamp': 'string', 'notificationStatus': 'START', 'operationState': 'STARTING', 'vnfInstanceId': 'string', 'operation': 'INSTANTIATE', 'isAutomaticInvocation': True, 'vnfLcmOpOccId': 'string', 'affectedVnfcs': [{'id': 'string', 'vduId': 'string', 'changeType': 'ADDED', 'computeResource': {'vimConnectionId': 'string', 'resourceProviderId': 'string', 'resourceId': 'string', 'vimLevelResourceType': 'string'}, 'metadata': {}, 'affectedVnfcCpIds': [], 'addedStorageResourceIds': [], 'removedStorageResourceIds': []}], 'affectedVirtualLinks': [{'id': 'string', 'virtualLinkDescId': 'string', 'changeType': 'ADDED', 'networkResource': {'vimConnectionId': 'string', 'resourceProviderId': 'string', 'resourceId': 'string', 'vimLevelResourceType': 'network'}}], 'affectedVirtualStorages': [{'id': 'string', 'virtualStorageDescId': 'string', 'changeType': 'ADDED', 'storageResource': {'vimConnectionId': 'string', 'resourceProviderId': 'string', 'resourceId': 'string', 'vimLevelResourceType': 'network'}, 'metadata': {}}], 'changedInfo': {'vnfInstanceName': 'string', 'vnfInstanceDescription': 'string', 'vnfConfigurableProperties': {'additionalProp1': 'string', 'additionalProp2': 'string', 'additionalProp3': 'string'}, 'metadata': {'additionalProp1': 'string', 'additionalProp2': 'string', 'additionalProp3': 'string'}, 'extensions': {'additionalProp1': 'string', 'additionalProp2': 'string', 'additionalProp3': 'string'}, 'vimConnectionInfo': [{'id': 'string', 'vimId': 'string', 'vimType': 'string', 'interfaceInfo': {'additionalProp1': 'string', 'additionalProp2': 'string', 'additionalProp3': 'string'}, 'accessInfo': {'additionalProp1': 'string', 'additionalProp2': 'string', 'additionalProp3': 'string'}, 'extra': {'additionalProp1': 'string', 'additionalProp2': 'string', 'additionalProp3': 'string'}}], 'vnfPkgId': 'string', 'vnfdId': 'string', 'vnfProvider': 'string', 'vnfProductName': 'string', 'vnfSoftwareVersion': 'string', 'vnfdVersion': 'string'}, 'changedExtConnectivity': [{'id': 'string', 'resourceHandle': {'vimConnectionId': 'string', 'resourceProviderId': 'string', 'resourceId': 'string', 'vimLevelResourceType': 'string'}, 'extLinkPorts': [{'id': 'string', 'resourceHandle': {'vimConnectionId': 'string', 'resourceProviderId': 'string', 'resourceId': 'string', 'vimLevelResourceType': 'string'}, 'cpInstanceId': 'string'}]}], 'error': {'type': 'string', 'title': 'string', 'status': 0, 'detail': 'string', 'instance': 'string'}, '_links': {'vnfInstance': {'href': 'string'}, 'subscription': {'href': 'string'}, 'vnfLcmOpOcc': {'href': 'string'}}}
vnf_identifier_creation_notification_data = {'id': 'Identifier of this notification', 'notificationType': 'VnfIdentifierCreationNotification', 'subscriptionId': 'Identifier of the subscription', 'timeStamp': '2018-9-12T00:00:00', 'vnfInstanceId': '2', '_links': {'vnfInstance': {'href': 'URI of the referenced resource'}, 'subscription': {'href': 'URI of the referenced resource'}, 'vnfLcmOpOcc': {'href': 'URI of the referenced resource'}}}
vnf_identifier_deletion_notification_data = {'id': 'Identifier of this notification', 'notificationType': 'VnfIdentifierDeletionNotification', 'subscriptionId': 'Identifier of the subscription', 'timeStamp': '2018-9-12T00:00:00', 'vnfInstanceId': '2', '_links': {'vnfInstance': {'href': 'URI of the referenced resource'}, 'subscription': {'href': 'URI of the referenced resource'}, 'vnfLcmOpOcc': {'href': 'URI of the referenced resource'}}} |
def my_func():
print("Foo")
my_other_func = lambda: print("Bar")
my_arr = [my_func, my_other_func]
for i in range (0, 2):
my_arr[i]()
# Bots Position
BOT_POS = [(5401, 1530),(3686, 1857),(3733, 2626),(2325, 1814),
(1718, 1282),(1288, 2418),(1249, 506),(2513,1286)
]
print("\n")
for (x,y) in BOT_POS:
print(x, y)
| def my_func():
print('Foo')
my_other_func = lambda : print('Bar')
my_arr = [my_func, my_other_func]
for i in range(0, 2):
my_arr[i]()
bot_pos = [(5401, 1530), (3686, 1857), (3733, 2626), (2325, 1814), (1718, 1282), (1288, 2418), (1249, 506), (2513, 1286)]
print('\n')
for (x, y) in BOT_POS:
print(x, y) |
class Solution:
# @return a string
def convert(self, s, nRows):
if nRows == 1 or len(s) <= 2:
return s
# compute the length of the zigzag
zigzagLen = 2*nRows - 2;
lens = len(s)
res = ''
for i in range(nRows):
idx = i
while idx < lens:
res = res + s[idx]
if i != 0 and i != nRows - 1:
x = idx + (zigzagLen - 2*i)
if (x < lens):
res = res + s[x]
idx = idx + zigzagLen
return res
s = Solution()
assert s.convert('0123456789', 5) == '0817926354'
assert s.convert('0123456789', 3) == '0481357926'
assert s.convert('0123456789', 2) == '0246813579'
assert s.convert('012', 1) == '012'
| class Solution:
def convert(self, s, nRows):
if nRows == 1 or len(s) <= 2:
return s
zigzag_len = 2 * nRows - 2
lens = len(s)
res = ''
for i in range(nRows):
idx = i
while idx < lens:
res = res + s[idx]
if i != 0 and i != nRows - 1:
x = idx + (zigzagLen - 2 * i)
if x < lens:
res = res + s[x]
idx = idx + zigzagLen
return res
s = solution()
assert s.convert('0123456789', 5) == '0817926354'
assert s.convert('0123456789', 3) == '0481357926'
assert s.convert('0123456789', 2) == '0246813579'
assert s.convert('012', 1) == '012' |
amountNumbers = int(input())
arrNumbers = set(map(int, input().split()))
amountCommands = int(input())
for i in range(amountCommands):
command = input().split()
if command[0] == "pop":
arrNumbers.pop()
elif command[0] == "remove":
if int(command[1]) in arrNumbers:
arrNumbers.remove(int(command[1]))
elif command[0] == "discard":
if int(command[1]) in arrNumbers:
arrNumbers.discard(int(command[1]))
print(sum(arrNumbers))
| amount_numbers = int(input())
arr_numbers = set(map(int, input().split()))
amount_commands = int(input())
for i in range(amountCommands):
command = input().split()
if command[0] == 'pop':
arrNumbers.pop()
elif command[0] == 'remove':
if int(command[1]) in arrNumbers:
arrNumbers.remove(int(command[1]))
elif command[0] == 'discard':
if int(command[1]) in arrNumbers:
arrNumbers.discard(int(command[1]))
print(sum(arrNumbers)) |
# 238. Product of Array Except Self
class Solution:
def productExceptSelf(self, nums: List[int]) -> List[int]:
cur, n = 1, len(nums)
out = [1]*n
for i in range(1, n):
cur *= nums[i-1]
out[i] = cur
cur = 1
for i in range(n-2, -1, -1):
cur *= nums[i+1]
out[i] *= cur
return out | class Solution:
def product_except_self(self, nums: List[int]) -> List[int]:
(cur, n) = (1, len(nums))
out = [1] * n
for i in range(1, n):
cur *= nums[i - 1]
out[i] = cur
cur = 1
for i in range(n - 2, -1, -1):
cur *= nums[i + 1]
out[i] *= cur
return out |
try:
myfile1=open("E:\\python_progs\\demochange\\mydir2\\pic1.jpg","rb")
myfile2=open("E:\\python_progs\\demochange\\mydir2\\newpic1.jpg","wb")
bytes=myfile1.read()
myfile2.write(bytes)
print("A new Image is available having name as: newpic1.jpg")
finally:
myfile1.close()
myfile2.close()
| try:
myfile1 = open('E:\\python_progs\\demochange\\mydir2\\pic1.jpg', 'rb')
myfile2 = open('E:\\python_progs\\demochange\\mydir2\\newpic1.jpg', 'wb')
bytes = myfile1.read()
myfile2.write(bytes)
print('A new Image is available having name as: newpic1.jpg')
finally:
myfile1.close()
myfile2.close() |
expected_output = {
'power-usage-information': {
'power-usage-item': [
{
'name': 'PSM 0',
'state': 'Online',
'dc-input-detail2': {
'dc-input-status':
'OK (INP0 feed expected, INP0 feed connected)'
},
'pem-capacity-detail': {
'capacity-actual': '2100',
'capacity-max': '2500'
},
'dc-output-detail2': {
'str-dc-power': '489.25',
'str-zone': 'Lower',
'str-dc-current': '9.50',
'str-dc-voltage': '51.50',
'str-dc-load': '23.30'
}
}, {
'name': 'PSM 1',
'state': 'Online',
'dc-input-detail2': {
'dc-input-status':
'OK (INP0 feed expected, INP0 feed connected)'
},
'pem-capacity-detail': {
'capacity-actual': '2100',
'capacity-max': '2500'
},
'dc-output-detail2': {
'str-dc-power': '489.25',
'str-zone': 'Lower',
'str-dc-current': '9.50',
'str-dc-voltage': '51.50',
'str-dc-load': '23.30'
}
}, {
'name': 'PSM 2',
'state': 'Online',
'dc-input-detail2': {
'dc-input-status':
'OK (INP0 feed expected, INP0 feed connected)'
},
'pem-capacity-detail': {
'capacity-actual': '2100',
'capacity-max': '2500'
},
'dc-output-detail2': {
'str-dc-power': '504.56',
'str-zone': 'Lower',
'str-dc-current': '9.75',
'str-dc-voltage': '51.75',
'str-dc-load': '24.03'
}
}, {
'name': 'PSM 3',
'state': 'Online',
'dc-input-detail2': {
'dc-input-status':
'OK (INP0 feed expected, INP0 feed connected)'
},
'pem-capacity-detail': {
'capacity-actual': '2100',
'capacity-max': '2500'
},
'dc-output-detail2': {
'str-dc-power': '491.62',
'str-zone': 'Lower',
'str-dc-current': '9.50',
'str-dc-voltage': '51.75',
'str-dc-load': '23.41'
}
}, {
'name': 'PSM 4',
'state': 'Present',
'dc-input-detail2': {
'dc-input-status':
'Check (No feed expected, No feed connected)'
},
'pem-capacity-detail': {
'capacity-actual': '2100',
'capacity-max': '2500'
},
'dc-output-detail2': {
'str-dc-power': '0.00',
'str-zone': 'Lower',
'str-dc-current': '0.00',
'str-dc-voltage': '0.00',
'str-dc-load': '0.00'
}
}, {
'name': 'PSM 5',
'state': 'Present',
'dc-input-detail2': {
'dc-input-status':
'Check (No feed expected, No feed connected)'
},
'pem-capacity-detail': {
'capacity-actual': '2100',
'capacity-max': '2500'
},
'dc-output-detail2': {
'str-dc-power': '0.00',
'str-zone': 'Lower',
'str-dc-current': '0.00',
'str-dc-voltage': '0.00',
'str-dc-load': '0.00'
}
}, {
'name': 'PSM 6',
'state': 'Present',
'dc-input-detail2': {
'dc-input-status':
'Check (No feed expected, No feed connected)'
},
'pem-capacity-detail': {
'capacity-actual': '2100',
'capacity-max': '2500'
},
'dc-output-detail2': {
'str-dc-power': '0.00',
'str-zone': 'Lower',
'str-dc-current': '0.00',
'str-dc-voltage': '0.00',
'str-dc-load': '0.00'
}
}, {
'name': 'PSM 7',
'state': 'Present',
'dc-input-detail2': {
'dc-input-status':
'Check (No feed expected, No feed connected)'
},
'pem-capacity-detail': {
'capacity-actual': '2100',
'capacity-max': '2500'
},
'dc-output-detail2': {
'str-dc-power': '0.00',
'str-zone': 'Lower',
'str-dc-current': '0.00',
'str-dc-voltage': '0.00',
'str-dc-load': '0.00'
}
}, {
'name': 'PSM 8',
'state': 'Present',
'dc-input-detail2': {
'dc-input-status':
'Check (No feed expected, No feed connected)'
},
'pem-capacity-detail': {
'capacity-actual': '2100',
'capacity-max': '2500'
},
'dc-output-detail2': {
'str-dc-power': '0.00',
'str-zone': 'Lower',
'str-dc-current': '0.00',
'str-dc-voltage': '0.00',
'str-dc-load': '0.00'
}
}, {
'name': 'PSM 9',
'state': 'Online',
'dc-input-detail2': {
'dc-input-status':
'OK (INP0 feed expected, INP0 feed connected)'
},
'pem-capacity-detail': {
'capacity-actual': '2100',
'capacity-max': '2500'
},
'dc-output-detail2': {
'str-dc-power': '309.00',
'str-zone': 'Upper',
'str-dc-current': '6.00',
'str-dc-voltage': '51.50',
'str-dc-load': '14.71'
}
}, {
'name': 'PSM 10',
'state': 'Online',
'dc-input-detail2': {
'dc-input-status':
'OK (INP0 feed expected, INP0 feed connected)'
},
'pem-capacity-detail': {
'capacity-actual': '2100',
'capacity-max': '2500'
},
'dc-output-detail2': {
'str-dc-power': '307.50',
'str-zone': 'Upper',
'str-dc-current': '6.00',
'str-dc-voltage': '51.25',
'str-dc-load': '14.64'
}
}, {
'name': 'PSM 11',
'state': 'Online',
'dc-input-detail2': {
'dc-input-status':
'OK (INP0 feed expected, INP0 feed connected)'
},
'pem-capacity-detail': {
'capacity-actual': '2100',
'capacity-max': '2500'
},
'dc-output-detail2': {
'str-dc-power': '309.00',
'str-zone': 'Upper',
'str-dc-current': '6.00',
'str-dc-voltage': '51.50',
'str-dc-load': '14.71'
}
}, {
'name': 'PSM 12',
'state': 'Present',
'dc-input-detail2': {
'dc-input-status':
'Check (No feed expected, No feed connected)'
},
'pem-capacity-detail': {
'capacity-actual': '2100',
'capacity-max': '2500'
},
'dc-output-detail2': {
'str-dc-power': '0.00',
'str-zone': 'Upper',
'str-dc-current': '0.00',
'str-dc-voltage': '0.00',
'str-dc-load': '0.00'
}
}, {
'name': 'PSM 13',
'state': 'Present',
'dc-input-detail2': {
'dc-input-status':
'Check (No feed expected, No feed connected)'
},
'pem-capacity-detail': {
'capacity-actual': '2100',
'capacity-max': '2500'
},
'dc-output-detail2': {
'str-dc-power': '0.00',
'str-zone': 'Upper',
'str-dc-current': '0.00',
'str-dc-voltage': '0.00',
'str-dc-load': '0.00'
}
}, {
'name': 'PSM 14',
'state': 'Present',
'dc-input-detail2': {
'dc-input-status':
'Check (No feed expected, No feed connected)'
},
'pem-capacity-detail': {
'capacity-actual': '2100',
'capacity-max': '2500'
},
'dc-output-detail2': {
'str-dc-power': '0.00',
'str-zone': 'Upper',
'str-dc-current': '0.00',
'str-dc-voltage': '0.00',
'str-dc-load': '0.00'
}
}, {
'name': 'PSM 15',
'state': 'Unknown',
'dc-input-detail2': {
'dc-input-status': 'Not ready'
},
'pem-capacity-detail': {
'capacity-actual': '2100',
'capacity-max': '2500'
},
'dc-output-detail2': {
'str-dc-power': '0.00',
'str-zone': 'Upper',
'str-dc-current': '0.00',
'str-dc-voltage': '0.00',
'str-dc-load': '0.00'
}
}, {
'name': 'PSM 16',
'state': 'Present',
'dc-input-detail2': {
'dc-input-status':
'Check (No feed expected, No feed connected)'
},
'pem-capacity-detail': {
'capacity-actual': '2100',
'capacity-max': '2500'
},
'dc-output-detail2': {
'str-dc-power': '0.00',
'str-zone': 'Upper',
'str-dc-current': '0.00',
'str-dc-voltage': '0.00',
'str-dc-load': '0.00'
}
}, {
'name': 'PSM 17',
'state': 'Present',
'dc-input-detail2': {
'dc-input-status':
'Check (No feed expected, No feed connected)'
},
'pem-capacity-detail': {
'capacity-actual': '2100',
'capacity-max': '2500'
},
'dc-output-detail2': {
'str-dc-power': '0.00',
'str-zone': 'Upper',
'str-dc-current': '0.00',
'str-dc-voltage': '0.00',
'str-dc-load': '0.00'
}
}
],
'power-usage-system': {
'power-usage-zone-information': [{
'str-zone': 'Upper',
'capacity-actual': '6300',
'capacity-max': '7500',
'capacity-allocated': '3332',
'capacity-remaining': '2968',
'capacity-actual-usage': '925.50'
}, {
'str-zone': 'Lower',
'capacity-actual': '8400',
'capacity-max': '10000',
'capacity-allocated': '6294',
'capacity-remaining': '2106',
'capacity-actual-usage': '1974.69'
}],
'capacity-sys-actual':
'14700',
'capacity-sys-max':
'17500',
'capacity-sys-remaining':
'5074'
}
}
}
| expected_output = {'power-usage-information': {'power-usage-item': [{'name': 'PSM 0', 'state': 'Online', 'dc-input-detail2': {'dc-input-status': 'OK (INP0 feed expected, INP0 feed connected)'}, 'pem-capacity-detail': {'capacity-actual': '2100', 'capacity-max': '2500'}, 'dc-output-detail2': {'str-dc-power': '489.25', 'str-zone': 'Lower', 'str-dc-current': '9.50', 'str-dc-voltage': '51.50', 'str-dc-load': '23.30'}}, {'name': 'PSM 1', 'state': 'Online', 'dc-input-detail2': {'dc-input-status': 'OK (INP0 feed expected, INP0 feed connected)'}, 'pem-capacity-detail': {'capacity-actual': '2100', 'capacity-max': '2500'}, 'dc-output-detail2': {'str-dc-power': '489.25', 'str-zone': 'Lower', 'str-dc-current': '9.50', 'str-dc-voltage': '51.50', 'str-dc-load': '23.30'}}, {'name': 'PSM 2', 'state': 'Online', 'dc-input-detail2': {'dc-input-status': 'OK (INP0 feed expected, INP0 feed connected)'}, 'pem-capacity-detail': {'capacity-actual': '2100', 'capacity-max': '2500'}, 'dc-output-detail2': {'str-dc-power': '504.56', 'str-zone': 'Lower', 'str-dc-current': '9.75', 'str-dc-voltage': '51.75', 'str-dc-load': '24.03'}}, {'name': 'PSM 3', 'state': 'Online', 'dc-input-detail2': {'dc-input-status': 'OK (INP0 feed expected, INP0 feed connected)'}, 'pem-capacity-detail': {'capacity-actual': '2100', 'capacity-max': '2500'}, 'dc-output-detail2': {'str-dc-power': '491.62', 'str-zone': 'Lower', 'str-dc-current': '9.50', 'str-dc-voltage': '51.75', 'str-dc-load': '23.41'}}, {'name': 'PSM 4', 'state': 'Present', 'dc-input-detail2': {'dc-input-status': 'Check (No feed expected, No feed connected)'}, 'pem-capacity-detail': {'capacity-actual': '2100', 'capacity-max': '2500'}, 'dc-output-detail2': {'str-dc-power': '0.00', 'str-zone': 'Lower', 'str-dc-current': '0.00', 'str-dc-voltage': '0.00', 'str-dc-load': '0.00'}}, {'name': 'PSM 5', 'state': 'Present', 'dc-input-detail2': {'dc-input-status': 'Check (No feed expected, No feed connected)'}, 'pem-capacity-detail': {'capacity-actual': '2100', 'capacity-max': '2500'}, 'dc-output-detail2': {'str-dc-power': '0.00', 'str-zone': 'Lower', 'str-dc-current': '0.00', 'str-dc-voltage': '0.00', 'str-dc-load': '0.00'}}, {'name': 'PSM 6', 'state': 'Present', 'dc-input-detail2': {'dc-input-status': 'Check (No feed expected, No feed connected)'}, 'pem-capacity-detail': {'capacity-actual': '2100', 'capacity-max': '2500'}, 'dc-output-detail2': {'str-dc-power': '0.00', 'str-zone': 'Lower', 'str-dc-current': '0.00', 'str-dc-voltage': '0.00', 'str-dc-load': '0.00'}}, {'name': 'PSM 7', 'state': 'Present', 'dc-input-detail2': {'dc-input-status': 'Check (No feed expected, No feed connected)'}, 'pem-capacity-detail': {'capacity-actual': '2100', 'capacity-max': '2500'}, 'dc-output-detail2': {'str-dc-power': '0.00', 'str-zone': 'Lower', 'str-dc-current': '0.00', 'str-dc-voltage': '0.00', 'str-dc-load': '0.00'}}, {'name': 'PSM 8', 'state': 'Present', 'dc-input-detail2': {'dc-input-status': 'Check (No feed expected, No feed connected)'}, 'pem-capacity-detail': {'capacity-actual': '2100', 'capacity-max': '2500'}, 'dc-output-detail2': {'str-dc-power': '0.00', 'str-zone': 'Lower', 'str-dc-current': '0.00', 'str-dc-voltage': '0.00', 'str-dc-load': '0.00'}}, {'name': 'PSM 9', 'state': 'Online', 'dc-input-detail2': {'dc-input-status': 'OK (INP0 feed expected, INP0 feed connected)'}, 'pem-capacity-detail': {'capacity-actual': '2100', 'capacity-max': '2500'}, 'dc-output-detail2': {'str-dc-power': '309.00', 'str-zone': 'Upper', 'str-dc-current': '6.00', 'str-dc-voltage': '51.50', 'str-dc-load': '14.71'}}, {'name': 'PSM 10', 'state': 'Online', 'dc-input-detail2': {'dc-input-status': 'OK (INP0 feed expected, INP0 feed connected)'}, 'pem-capacity-detail': {'capacity-actual': '2100', 'capacity-max': '2500'}, 'dc-output-detail2': {'str-dc-power': '307.50', 'str-zone': 'Upper', 'str-dc-current': '6.00', 'str-dc-voltage': '51.25', 'str-dc-load': '14.64'}}, {'name': 'PSM 11', 'state': 'Online', 'dc-input-detail2': {'dc-input-status': 'OK (INP0 feed expected, INP0 feed connected)'}, 'pem-capacity-detail': {'capacity-actual': '2100', 'capacity-max': '2500'}, 'dc-output-detail2': {'str-dc-power': '309.00', 'str-zone': 'Upper', 'str-dc-current': '6.00', 'str-dc-voltage': '51.50', 'str-dc-load': '14.71'}}, {'name': 'PSM 12', 'state': 'Present', 'dc-input-detail2': {'dc-input-status': 'Check (No feed expected, No feed connected)'}, 'pem-capacity-detail': {'capacity-actual': '2100', 'capacity-max': '2500'}, 'dc-output-detail2': {'str-dc-power': '0.00', 'str-zone': 'Upper', 'str-dc-current': '0.00', 'str-dc-voltage': '0.00', 'str-dc-load': '0.00'}}, {'name': 'PSM 13', 'state': 'Present', 'dc-input-detail2': {'dc-input-status': 'Check (No feed expected, No feed connected)'}, 'pem-capacity-detail': {'capacity-actual': '2100', 'capacity-max': '2500'}, 'dc-output-detail2': {'str-dc-power': '0.00', 'str-zone': 'Upper', 'str-dc-current': '0.00', 'str-dc-voltage': '0.00', 'str-dc-load': '0.00'}}, {'name': 'PSM 14', 'state': 'Present', 'dc-input-detail2': {'dc-input-status': 'Check (No feed expected, No feed connected)'}, 'pem-capacity-detail': {'capacity-actual': '2100', 'capacity-max': '2500'}, 'dc-output-detail2': {'str-dc-power': '0.00', 'str-zone': 'Upper', 'str-dc-current': '0.00', 'str-dc-voltage': '0.00', 'str-dc-load': '0.00'}}, {'name': 'PSM 15', 'state': 'Unknown', 'dc-input-detail2': {'dc-input-status': 'Not ready'}, 'pem-capacity-detail': {'capacity-actual': '2100', 'capacity-max': '2500'}, 'dc-output-detail2': {'str-dc-power': '0.00', 'str-zone': 'Upper', 'str-dc-current': '0.00', 'str-dc-voltage': '0.00', 'str-dc-load': '0.00'}}, {'name': 'PSM 16', 'state': 'Present', 'dc-input-detail2': {'dc-input-status': 'Check (No feed expected, No feed connected)'}, 'pem-capacity-detail': {'capacity-actual': '2100', 'capacity-max': '2500'}, 'dc-output-detail2': {'str-dc-power': '0.00', 'str-zone': 'Upper', 'str-dc-current': '0.00', 'str-dc-voltage': '0.00', 'str-dc-load': '0.00'}}, {'name': 'PSM 17', 'state': 'Present', 'dc-input-detail2': {'dc-input-status': 'Check (No feed expected, No feed connected)'}, 'pem-capacity-detail': {'capacity-actual': '2100', 'capacity-max': '2500'}, 'dc-output-detail2': {'str-dc-power': '0.00', 'str-zone': 'Upper', 'str-dc-current': '0.00', 'str-dc-voltage': '0.00', 'str-dc-load': '0.00'}}], 'power-usage-system': {'power-usage-zone-information': [{'str-zone': 'Upper', 'capacity-actual': '6300', 'capacity-max': '7500', 'capacity-allocated': '3332', 'capacity-remaining': '2968', 'capacity-actual-usage': '925.50'}, {'str-zone': 'Lower', 'capacity-actual': '8400', 'capacity-max': '10000', 'capacity-allocated': '6294', 'capacity-remaining': '2106', 'capacity-actual-usage': '1974.69'}], 'capacity-sys-actual': '14700', 'capacity-sys-max': '17500', 'capacity-sys-remaining': '5074'}}} |
def list3(str):
result = 0
for i in str:
if i == 'a':
result += 1
return result
def main():
print(list3(['Hello', 'world', 'a']))
print(list3(['a', 'a']))
print(list3(['Computational', 'thinking']))
print(list3(['a', 'A', 'A']))
if __name__ == '__main__':
main()
| def list3(str):
result = 0
for i in str:
if i == 'a':
result += 1
return result
def main():
print(list3(['Hello', 'world', 'a']))
print(list3(['a', 'a']))
print(list3(['Computational', 'thinking']))
print(list3(['a', 'A', 'A']))
if __name__ == '__main__':
main() |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.