content stringlengths 7 1.05M | fixed_cases stringlengths 1 1.28M |
|---|---|
class Solution:
# @param {integer[]} nums
# @return {string}
def largestNumber(self, nums):
nums = sorted(nums, cmp=self.compare)
res, j = '', 0
for i in range(len(nums) - 1):
if nums[i] != 0:
break
else:
j += 1
for k in range(j, len(nums)):
res += str(nums[k])
return res
def compare(self, x, y):
tmp1, tmp2 = str(x) + str(y), str(y) + str(x)
res = 0
if tmp1 > tmp2:
res = -1
elif tmp1 < tmp2:
res = 1
return res
| class Solution:
def largest_number(self, nums):
nums = sorted(nums, cmp=self.compare)
(res, j) = ('', 0)
for i in range(len(nums) - 1):
if nums[i] != 0:
break
else:
j += 1
for k in range(j, len(nums)):
res += str(nums[k])
return res
def compare(self, x, y):
(tmp1, tmp2) = (str(x) + str(y), str(y) + str(x))
res = 0
if tmp1 > tmp2:
res = -1
elif tmp1 < tmp2:
res = 1
return res |
n = int(input())
sequence = []
for i in range(n):
sequence.append(int(input()))
print(f"Max number: {max(sequence)}\nMin number: {min(sequence)}")
| n = int(input())
sequence = []
for i in range(n):
sequence.append(int(input()))
print(f'Max number: {max(sequence)}\nMin number: {min(sequence)}') |
#python
evt = lx.args()[0]
if evt == 'onDo':
lx.eval("?kelvin.quickScale")
elif evt == 'onDrop':
pass
| evt = lx.args()[0]
if evt == 'onDo':
lx.eval('?kelvin.quickScale')
elif evt == 'onDrop':
pass |
class Solution:
def lexicalOrder(self, n: int) -> List[int]:
ans = [1]
while len(ans) < n:
nxt = ans[-1] * 10
while nxt > n:
nxt //= 10
nxt += 1
while nxt % 10 == 0:
nxt //= 10
ans.append(nxt)
return ans
| class Solution:
def lexical_order(self, n: int) -> List[int]:
ans = [1]
while len(ans) < n:
nxt = ans[-1] * 10
while nxt > n:
nxt //= 10
nxt += 1
while nxt % 10 == 0:
nxt //= 10
ans.append(nxt)
return ans |
# Advent of Code - Day 2
# day_2_advent_2020.py
# 2020.12.02
# Jimmy Taylor
# Reading data from text file, spliting each value as separate lines without line break
input_data = open('inputs/day2.txt').read().splitlines()
# Cleaning up the data in each row to make it easier to parse later as individual rows
modified_data = [line.replace('-',' ').replace(':','').replace(' ',',') for line in input_data]
# Tracking good and bad passwords
valid_passwords_part_1 = 0
bad_passwords_part_1 = 0
valid_passwords_part_2 = 0
bad_passwords_part_2 = 0
for row in modified_data:
row = list(row.split(','))
# Part 1
min_val = int(row[0])
max_val = int(row[1])
letter = row[2]
password = row[3]
# Counting instances of the letter in the password
letter_count = password.count(letter)
# Checking if letter count is within the range
if (letter_count >= min_val) and (letter_count <= max_val):
valid_passwords_part_1 += 1
else:
bad_passwords_part_1 +=1
# Part 2
# Subtracting by 1 to calibrate character position
first_pos = int(row[0]) - 1
second_pos = int(row[1]) - 1
letter = row[2]
password = row[3]
# Looking through the characters and capturing their positions
positions = [pos for pos, char in enumerate(password) if char == letter]
# Looking if letter is in both positions; if so, bad password
if (first_pos in positions) and (second_pos in positions):
bad_passwords_part_2 +=1
# If letter in one position, valid password
elif (first_pos in positions):
valid_passwords_part_2 += 1
elif (second_pos in positions):
valid_passwords_part_2 += 1
# If letter is not in any position, bad password
else:
bad_passwords_part_2 +=1
print(f"Part 1 Valid Passwords: {valid_passwords_part_1}")
print(f"Part 1 Bad Passwords: {bad_passwords_part_1}")
print(f"Part 2 Valid Passwords: {valid_passwords_part_2}")
print(f"Part 2 Bad Passwords: {bad_passwords_part_2}") | input_data = open('inputs/day2.txt').read().splitlines()
modified_data = [line.replace('-', ' ').replace(':', '').replace(' ', ',') for line in input_data]
valid_passwords_part_1 = 0
bad_passwords_part_1 = 0
valid_passwords_part_2 = 0
bad_passwords_part_2 = 0
for row in modified_data:
row = list(row.split(','))
min_val = int(row[0])
max_val = int(row[1])
letter = row[2]
password = row[3]
letter_count = password.count(letter)
if letter_count >= min_val and letter_count <= max_val:
valid_passwords_part_1 += 1
else:
bad_passwords_part_1 += 1
first_pos = int(row[0]) - 1
second_pos = int(row[1]) - 1
letter = row[2]
password = row[3]
positions = [pos for (pos, char) in enumerate(password) if char == letter]
if first_pos in positions and second_pos in positions:
bad_passwords_part_2 += 1
elif first_pos in positions:
valid_passwords_part_2 += 1
elif second_pos in positions:
valid_passwords_part_2 += 1
else:
bad_passwords_part_2 += 1
print(f'Part 1 Valid Passwords: {valid_passwords_part_1}')
print(f'Part 1 Bad Passwords: {bad_passwords_part_1}')
print(f'Part 2 Valid Passwords: {valid_passwords_part_2}')
print(f'Part 2 Bad Passwords: {bad_passwords_part_2}') |
for t in range(int(input())):
G = int(input())
for g in range(G):
I,N,Q = map(int,input().split())
if I == 1 :
if N%2:
heads = N//2
tails = N - N//2
if Q == 1:
print(heads)
else:
print(tails)
else:
print(N//2)
else:
if N%2:
heads = N - N//2
tails = N//2
if Q == 1:
print(heads)
else:
print(tails)
else:
print(N//2)
| for t in range(int(input())):
g = int(input())
for g in range(G):
(i, n, q) = map(int, input().split())
if I == 1:
if N % 2:
heads = N // 2
tails = N - N // 2
if Q == 1:
print(heads)
else:
print(tails)
else:
print(N // 2)
elif N % 2:
heads = N - N // 2
tails = N // 2
if Q == 1:
print(heads)
else:
print(tails)
else:
print(N // 2) |
class Tile():
def __init__(self, pos):
self.white = True
self.pos = pos
def flip(self):
self.white = not self.white
def get_new_coord(from_tile, instructions):
curr = [from_tile.pos[0], from_tile.pos[1]]
for instruction in instructions:
if instruction == "ne":
curr[1] += 1
elif instruction == "e":
curr[0] += 1
elif instruction == "se":
curr[0] += 1
curr[1] -= 1
elif instruction == "sw":
curr[1] -= 1
elif instruction == "w":
curr[0] -= 1
elif instruction == "nw":
curr[0] -= 1
curr[1] += 1
return (curr[0], curr[1])
def part_1():
file = open('input.txt', 'r')
tiles = {}
starting_tile = Tile((0,0))
tiles[starting_tile.pos] = starting_tile
for line in file:
line = line.strip("\n")
instructions_on_line = []
index = 0
while index < len(line):
if line[index] == "w" or line[index] == "e":
instructions_on_line.append(line[index])
else:
if line[index+1] == "w" or line[index+1] == "e":
instructions_on_line.append(line[index:index+2])
index += 1
else:
instructions_on_line.append(line[index])
index += 1
line_coord = get_new_coord(starting_tile,instructions_on_line)
if line_coord in tiles:
tiles[line_coord].flip()
else:
new_tile = Tile(line_coord)
new_tile.flip()
tiles[line_coord] = new_tile
black_tiles = 0
for coord in tiles:
if tiles[coord].white == False:
black_tiles += 1
return black_tiles
print(part_1()) | class Tile:
def __init__(self, pos):
self.white = True
self.pos = pos
def flip(self):
self.white = not self.white
def get_new_coord(from_tile, instructions):
curr = [from_tile.pos[0], from_tile.pos[1]]
for instruction in instructions:
if instruction == 'ne':
curr[1] += 1
elif instruction == 'e':
curr[0] += 1
elif instruction == 'se':
curr[0] += 1
curr[1] -= 1
elif instruction == 'sw':
curr[1] -= 1
elif instruction == 'w':
curr[0] -= 1
elif instruction == 'nw':
curr[0] -= 1
curr[1] += 1
return (curr[0], curr[1])
def part_1():
file = open('input.txt', 'r')
tiles = {}
starting_tile = tile((0, 0))
tiles[starting_tile.pos] = starting_tile
for line in file:
line = line.strip('\n')
instructions_on_line = []
index = 0
while index < len(line):
if line[index] == 'w' or line[index] == 'e':
instructions_on_line.append(line[index])
elif line[index + 1] == 'w' or line[index + 1] == 'e':
instructions_on_line.append(line[index:index + 2])
index += 1
else:
instructions_on_line.append(line[index])
index += 1
line_coord = get_new_coord(starting_tile, instructions_on_line)
if line_coord in tiles:
tiles[line_coord].flip()
else:
new_tile = tile(line_coord)
new_tile.flip()
tiles[line_coord] = new_tile
black_tiles = 0
for coord in tiles:
if tiles[coord].white == False:
black_tiles += 1
return black_tiles
print(part_1()) |
# Example 1:
# Input: digits = "23"
# Output: ["ad","ae","af","bd","be","bf","cd","ce","cf"]
# Example 2:
# Input: digits = ""
# Output: []
# Example 3:
# Input: digits = "2"
# Output: ["a","b","c"]
class Solution:
def letterCombinations(self, digits: str) -> List[str]:
phone_keyboard = {2: 'abc', 3: 'def', 4: 'ghi',
5: 'jkl', 6: 'mno', 7: 'pqrs',
8: 'tuv', 9: 'wxyz'}
answer = [''] if digits else []
for x in digits:
answer = [i + j for i in answer for j in phone_keyboard[int(x)]]
return answer
| class Solution:
def letter_combinations(self, digits: str) -> List[str]:
phone_keyboard = {2: 'abc', 3: 'def', 4: 'ghi', 5: 'jkl', 6: 'mno', 7: 'pqrs', 8: 'tuv', 9: 'wxyz'}
answer = [''] if digits else []
for x in digits:
answer = [i + j for i in answer for j in phone_keyboard[int(x)]]
return answer |
# Write a program to read through the mbox-short.txt and figure out who has sent
# the greatest number of mail messages. The program looks for 'From ' lines and
# takes the second word of those lines as the person who sent the mail
# The program creates a Python dictionary that maps the sender's mail address to a ' \
# 'count of the number of times they appear in the file.
# After the dictionary is produced, the program reads through the dictionary using
# a maximum loop to find the most prolific committer.
md = dict()
name = input("Enter file:")
if len(name) < 1: name = "mbox-short.txt"
handle = open(name)
for linem in handle:
if linem.startswith("From "):
key = linem.split()[1]
md[key] = md.get(key, 0) + 1
# count calculation
bigcnt = None
bigwd = None
for wd, cnt in md.items():
if bigcnt is None or cnt > bigcnt:
bigcnt = cnt
bigwd = wd
print(bigwd, bigcnt)
| md = dict()
name = input('Enter file:')
if len(name) < 1:
name = 'mbox-short.txt'
handle = open(name)
for linem in handle:
if linem.startswith('From '):
key = linem.split()[1]
md[key] = md.get(key, 0) + 1
bigcnt = None
bigwd = None
for (wd, cnt) in md.items():
if bigcnt is None or cnt > bigcnt:
bigcnt = cnt
bigwd = wd
print(bigwd, bigcnt) |
#List of Numbers
list1 = [12, -7, 5, 64, -14]
#Iterating each number in the lsit
for i in list1:
#checking the condition
if i >= 0:
print(i, end = " ")
| list1 = [12, -7, 5, 64, -14]
for i in list1:
if i >= 0:
print(i, end=' ') |
def Rotate2DArray(arr):
n = len(arr[0])
for i in range(0, n//2):
for j in range(i, n-i-1):
temp = arr[i][j]
arr[i][j] = arr[n-1-j][i]
arr[n-j-1][i] = arr[n-1-i][n-j-1]
arr[n-i-1][n-j-1] = arr[j][n-i-1]
arr[j][n-i-1] = temp
return arr
arr = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
newarr = Rotate2DArray(arr)
print(newarr) | def rotate2_d_array(arr):
n = len(arr[0])
for i in range(0, n // 2):
for j in range(i, n - i - 1):
temp = arr[i][j]
arr[i][j] = arr[n - 1 - j][i]
arr[n - j - 1][i] = arr[n - 1 - i][n - j - 1]
arr[n - i - 1][n - j - 1] = arr[j][n - i - 1]
arr[j][n - i - 1] = temp
return arr
arr = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
newarr = rotate2_d_array(arr)
print(newarr) |
class Scene:
def __init__(self, name="svg", height=400, width=400):
self.name = name
self.items = []
self.height = height
self.width = width
return
def add(self, item): self.items.append(item)
def strarray(self):
var = ["<?xml version=\"1.0\"?>\n",
"<svg height=\"%d\" width=\"%d\" >\n" % (
self.height, self.width),
" <g style=\"fill-opacity:1.0; stroke:black;\n",
" stroke-width:1;\">\n"]
for item in self.items:
var += item.strarray()
var += [" </g>\n</svg>\n"]
return var
def write_svg(self, filename=None):
if filename:
self.svgname = filename
else:
self.svgname = self.name + ".svg"
file = open(self.svgname, 'w')
file.writelines(self.strarray())
file.close()
return self.strarray()
class Line:
def __init__(self, start, end):
self.start = start # xy tuple
self.end = end # xy tuple
return
def strarray(self):
return [" <line x1=\"%d\" y1=\"%d\" x2=\"%d\" y2=\"%d\" />\n" %
(self.start[0], self.start[1], self.end[0], self.end[1])]
class Rectangle:
def __init__(self, origin, height, width, color=(255, 255, 255)):
self.origin = origin
self.height = height
self.width = width
self.color = color
return
def strarray(self):
return [" <rect x=\"%d\" y=\"%d\" height=\"%d\"\n" %
(self.origin[0], self.origin[1], self.height),
" width=\"%d\" style=\"fill:%s;\" />\n" %
(self.width, colorstr(self.color))]
class Text:
def __init__(self, origin, text, size=18, align_horizontal="middle", align_vertical="auto"):
self.origin = origin
self.text = text
self.size = size
self.align_horizontal = align_horizontal
self.align_vertical = align_vertical
return
def strarray(self):
return [" <text x=\"%d\" y=\"%d\" font-size=\"%d\"" %
(self.origin[0], self.origin[1],
self.size), " text-anchor=\"", self.align_horizontal, "\"",
" dominant-baseline=\"", self.align_vertical, "\">\n",
" %s\n" % self.text,
" </text>\n"]
class Textbox:
def __init__(self, origin, height, width, text, color=(255, 255, 255), text_size=16):
self.Outer = Rectangle(origin, height, width, color)
self.Inner = Text((origin[0]+width//2, origin[1]+height//2),
text, text_size, align_horizontal="middle", align_vertical="middle")
return
def strarray(self):
return self.Outer.strarray() + self.Inner.strarray()
def colorstr(rgb): return "rgb({}, {}, {})".format(rgb[0], rgb[1], rgb[2])
| class Scene:
def __init__(self, name='svg', height=400, width=400):
self.name = name
self.items = []
self.height = height
self.width = width
return
def add(self, item):
self.items.append(item)
def strarray(self):
var = ['<?xml version="1.0"?>\n', '<svg height="%d" width="%d" >\n' % (self.height, self.width), ' <g style="fill-opacity:1.0; stroke:black;\n', ' stroke-width:1;">\n']
for item in self.items:
var += item.strarray()
var += [' </g>\n</svg>\n']
return var
def write_svg(self, filename=None):
if filename:
self.svgname = filename
else:
self.svgname = self.name + '.svg'
file = open(self.svgname, 'w')
file.writelines(self.strarray())
file.close()
return self.strarray()
class Line:
def __init__(self, start, end):
self.start = start
self.end = end
return
def strarray(self):
return [' <line x1="%d" y1="%d" x2="%d" y2="%d" />\n' % (self.start[0], self.start[1], self.end[0], self.end[1])]
class Rectangle:
def __init__(self, origin, height, width, color=(255, 255, 255)):
self.origin = origin
self.height = height
self.width = width
self.color = color
return
def strarray(self):
return [' <rect x="%d" y="%d" height="%d"\n' % (self.origin[0], self.origin[1], self.height), ' width="%d" style="fill:%s;" />\n' % (self.width, colorstr(self.color))]
class Text:
def __init__(self, origin, text, size=18, align_horizontal='middle', align_vertical='auto'):
self.origin = origin
self.text = text
self.size = size
self.align_horizontal = align_horizontal
self.align_vertical = align_vertical
return
def strarray(self):
return [' <text x="%d" y="%d" font-size="%d"' % (self.origin[0], self.origin[1], self.size), ' text-anchor="', self.align_horizontal, '"', ' dominant-baseline="', self.align_vertical, '">\n', ' %s\n' % self.text, ' </text>\n']
class Textbox:
def __init__(self, origin, height, width, text, color=(255, 255, 255), text_size=16):
self.Outer = rectangle(origin, height, width, color)
self.Inner = text((origin[0] + width // 2, origin[1] + height // 2), text, text_size, align_horizontal='middle', align_vertical='middle')
return
def strarray(self):
return self.Outer.strarray() + self.Inner.strarray()
def colorstr(rgb):
return 'rgb({}, {}, {})'.format(rgb[0], rgb[1], rgb[2]) |
#Leia uma temperatura em graus celsius e apresente-a convertida em fahrenheit.
# A formula da conversao eh: F=C*(9/5)+32,
# sendo F a temperatura em fahrenheit e c a temperatura em celsius.
C=float(input("Informe a temperatura em Celsius: "))
F=C*(9/5)+32
print(f"A temperatura em Fahrenheit eh {round(F,1)}") | c = float(input('Informe a temperatura em Celsius: '))
f = C * (9 / 5) + 32
print(f'A temperatura em Fahrenheit eh {round(F, 1)}') |
def main(j, args, params, tags, tasklet):
page = args.page
action = args.requestContext.params.get('action')
domain = args.requestContext.params.get('domain')
name = args.requestContext.params.get('name')
version = args.requestContext.params.get('version')
nid = args.requestContext.params.get('nid')
if not nid:
nid = j.application.whoAmI.nid
message = j.apps.system.packagemanager.action(nid=nid, domain=domain, pname=name, version=version, action=action)
page.addHTML(message)
params.result = page
return params
def match(j, args, params, tags, tasklet):
return True
| def main(j, args, params, tags, tasklet):
page = args.page
action = args.requestContext.params.get('action')
domain = args.requestContext.params.get('domain')
name = args.requestContext.params.get('name')
version = args.requestContext.params.get('version')
nid = args.requestContext.params.get('nid')
if not nid:
nid = j.application.whoAmI.nid
message = j.apps.system.packagemanager.action(nid=nid, domain=domain, pname=name, version=version, action=action)
page.addHTML(message)
params.result = page
return params
def match(j, args, params, tags, tasklet):
return True |
STATS = [
{
"num_node_expansions": 25,
"plan_length": 20,
"search_time": 0.04,
"total_time": 0.04
},
{
"num_node_expansions": 22,
"plan_length": 18,
"search_time": 0.04,
"total_time": 0.04
},
{
"num_node_expansions": 24,
"plan_length": 21,
"search_time": 0.33,
"total_time": 0.33
},
{
"num_node_expansions": 26,
"plan_length": 20,
"search_time": 0.41,
"total_time": 0.41
},
{
"num_node_expansions": 19,
"plan_length": 14,
"search_time": 0.44,
"total_time": 0.44
},
{
"num_node_expansions": 28,
"plan_length": 24,
"search_time": 0.76,
"total_time": 0.76
},
{
"num_node_expansions": 22,
"plan_length": 18,
"search_time": 0.15,
"total_time": 0.15
},
{
"num_node_expansions": 19,
"plan_length": 17,
"search_time": 0.15,
"total_time": 0.15
},
{
"num_node_expansions": 19,
"plan_length": 17,
"search_time": 0.03,
"total_time": 0.03
},
{
"num_node_expansions": 16,
"plan_length": 12,
"search_time": 0.02,
"total_time": 0.02
},
{
"num_node_expansions": 13,
"plan_length": 11,
"search_time": 0.1,
"total_time": 0.1
},
{
"num_node_expansions": 17,
"plan_length": 15,
"search_time": 0.1,
"total_time": 0.1
},
{
"num_node_expansions": 18,
"plan_length": 15,
"search_time": 0.03,
"total_time": 0.03
},
{
"num_node_expansions": 12,
"plan_length": 10,
"search_time": 0.03,
"total_time": 0.03
},
{
"num_node_expansions": 18,
"plan_length": 16,
"search_time": 0.04,
"total_time": 0.04
},
{
"num_node_expansions": 15,
"plan_length": 13,
"search_time": 0.04,
"total_time": 0.04
},
{
"num_node_expansions": 27,
"plan_length": 23,
"search_time": 0.04,
"total_time": 0.04
},
{
"num_node_expansions": 31,
"plan_length": 27,
"search_time": 0.04,
"total_time": 0.04
},
{
"num_node_expansions": 28,
"plan_length": 24,
"search_time": 0.04,
"total_time": 0.04
},
{
"num_node_expansions": 18,
"plan_length": 16,
"search_time": 0.04,
"total_time": 0.04
},
{
"num_node_expansions": 17,
"plan_length": 13,
"search_time": 0.15,
"total_time": 0.15
},
{
"num_node_expansions": 20,
"plan_length": 16,
"search_time": 0.19,
"total_time": 0.19
},
{
"num_node_expansions": 16,
"plan_length": 13,
"search_time": 0.1,
"total_time": 0.1
},
{
"num_node_expansions": 28,
"plan_length": 24,
"search_time": 0.21,
"total_time": 0.21
},
{
"num_node_expansions": 13,
"plan_length": 11,
"search_time": 0.01,
"total_time": 0.01
},
{
"num_node_expansions": 19,
"plan_length": 16,
"search_time": 0.02,
"total_time": 0.02
},
{
"num_node_expansions": 17,
"plan_length": 13,
"search_time": 0.22,
"total_time": 0.22
},
{
"num_node_expansions": 16,
"plan_length": 14,
"search_time": 0.23,
"total_time": 0.23
},
{
"num_node_expansions": 20,
"plan_length": 15,
"search_time": 0.13,
"total_time": 0.13
},
{
"num_node_expansions": 16,
"plan_length": 13,
"search_time": 0.12,
"total_time": 0.12
},
{
"num_node_expansions": 27,
"plan_length": 22,
"search_time": 0.2,
"total_time": 0.2
},
{
"num_node_expansions": 21,
"plan_length": 16,
"search_time": 0.13,
"total_time": 0.13
},
{
"num_node_expansions": 19,
"plan_length": 16,
"search_time": 0.15,
"total_time": 0.15
},
{
"num_node_expansions": 22,
"plan_length": 20,
"search_time": 0.18,
"total_time": 0.18
},
{
"num_node_expansions": 25,
"plan_length": 19,
"search_time": 0.09,
"total_time": 0.09
},
{
"num_node_expansions": 21,
"plan_length": 19,
"search_time": 0.1,
"total_time": 0.1
},
{
"num_node_expansions": 17,
"plan_length": 14,
"search_time": 0.34,
"total_time": 0.34
},
{
"num_node_expansions": 38,
"plan_length": 33,
"search_time": 0.62,
"total_time": 0.62
},
{
"num_node_expansions": 17,
"plan_length": 14,
"search_time": 0.1,
"total_time": 0.1
},
{
"num_node_expansions": 23,
"plan_length": 20,
"search_time": 0.15,
"total_time": 0.15
},
{
"num_node_expansions": 21,
"plan_length": 17,
"search_time": 0.17,
"total_time": 0.17
},
{
"num_node_expansions": 9,
"plan_length": 7,
"search_time": 0.09,
"total_time": 0.09
},
{
"num_node_expansions": 18,
"plan_length": 13,
"search_time": 0.17,
"total_time": 0.17
},
{
"num_node_expansions": 29,
"plan_length": 27,
"search_time": 0.3,
"total_time": 0.3
},
{
"num_node_expansions": 15,
"plan_length": 13,
"search_time": 0.42,
"total_time": 0.42
},
{
"num_node_expansions": 35,
"plan_length": 26,
"search_time": 0.91,
"total_time": 0.91
},
{
"num_node_expansions": 18,
"plan_length": 16,
"search_time": 0.14,
"total_time": 0.14
},
{
"num_node_expansions": 22,
"plan_length": 19,
"search_time": 0.2,
"total_time": 0.2
},
{
"num_node_expansions": 24,
"plan_length": 19,
"search_time": 0.39,
"total_time": 0.39
},
{
"num_node_expansions": 17,
"plan_length": 15,
"search_time": 0.28,
"total_time": 0.28
},
{
"num_node_expansions": 10,
"plan_length": 8,
"search_time": 0.04,
"total_time": 0.04
},
{
"num_node_expansions": 17,
"plan_length": 14,
"search_time": 0.04,
"total_time": 0.04
},
{
"num_node_expansions": 28,
"plan_length": 25,
"search_time": 1.05,
"total_time": 1.05
},
{
"num_node_expansions": 19,
"plan_length": 14,
"search_time": 0.74,
"total_time": 0.74
},
{
"num_node_expansions": 11,
"plan_length": 9,
"search_time": 0.61,
"total_time": 0.61
},
{
"num_node_expansions": 39,
"plan_length": 34,
"search_time": 0.97,
"total_time": 0.97
},
{
"num_node_expansions": 15,
"plan_length": 13,
"search_time": 0.01,
"total_time": 0.01
},
{
"num_node_expansions": 25,
"plan_length": 19,
"search_time": 0.02,
"total_time": 0.02
},
{
"num_node_expansions": 20,
"plan_length": 18,
"search_time": 0.19,
"total_time": 0.19
},
{
"num_node_expansions": 27,
"plan_length": 21,
"search_time": 0.25,
"total_time": 0.25
},
{
"num_node_expansions": 14,
"plan_length": 11,
"search_time": 0.05,
"total_time": 0.05
},
{
"num_node_expansions": 31,
"plan_length": 24,
"search_time": 0.13,
"total_time": 0.13
},
{
"num_node_expansions": 9,
"plan_length": 7,
"search_time": 0.37,
"total_time": 0.37
},
{
"num_node_expansions": 33,
"plan_length": 31,
"search_time": 0.87,
"total_time": 0.87
},
{
"num_node_expansions": 18,
"plan_length": 15,
"search_time": 0.26,
"total_time": 0.26
},
{
"num_node_expansions": 18,
"plan_length": 15,
"search_time": 0.18,
"total_time": 0.18
},
{
"num_node_expansions": 18,
"plan_length": 16,
"search_time": 0.06,
"total_time": 0.06
},
{
"num_node_expansions": 18,
"plan_length": 13,
"search_time": 0.06,
"total_time": 0.06
},
{
"num_node_expansions": 11,
"plan_length": 9,
"search_time": 0.1,
"total_time": 0.1
},
{
"num_node_expansions": 10,
"plan_length": 8,
"search_time": 0.1,
"total_time": 0.1
},
{
"num_node_expansions": 18,
"plan_length": 14,
"search_time": 0.03,
"total_time": 0.03
},
{
"num_node_expansions": 28,
"plan_length": 21,
"search_time": 0.06,
"total_time": 0.06
},
{
"num_node_expansions": 22,
"plan_length": 17,
"search_time": 0.12,
"total_time": 0.12
},
{
"num_node_expansions": 12,
"plan_length": 10,
"search_time": 0.09,
"total_time": 0.09
},
{
"num_node_expansions": 15,
"plan_length": 13,
"search_time": 0.0,
"total_time": 0.0
},
{
"num_node_expansions": 13,
"plan_length": 10,
"search_time": 0.0,
"total_time": 0.0
},
{
"num_node_expansions": 22,
"plan_length": 20,
"search_time": 0.5,
"total_time": 0.5
},
{
"num_node_expansions": 27,
"plan_length": 25,
"search_time": 0.57,
"total_time": 0.57
},
{
"num_node_expansions": 19,
"plan_length": 14,
"search_time": 0.12,
"total_time": 0.12
},
{
"num_node_expansions": 13,
"plan_length": 10,
"search_time": 0.11,
"total_time": 0.11
},
{
"num_node_expansions": 13,
"plan_length": 11,
"search_time": 0.0,
"total_time": 0.0
},
{
"num_node_expansions": 20,
"plan_length": 18,
"search_time": 0.01,
"total_time": 0.01
},
{
"num_node_expansions": 20,
"plan_length": 17,
"search_time": 0.21,
"total_time": 0.21
},
{
"num_node_expansions": 28,
"plan_length": 21,
"search_time": 0.23,
"total_time": 0.23
},
{
"num_node_expansions": 13,
"plan_length": 10,
"search_time": 0.03,
"total_time": 0.03
},
{
"num_node_expansions": 17,
"plan_length": 15,
"search_time": 0.03,
"total_time": 0.03
},
{
"num_node_expansions": 23,
"plan_length": 18,
"search_time": 0.08,
"total_time": 0.08
},
{
"num_node_expansions": 19,
"plan_length": 17,
"search_time": 0.08,
"total_time": 0.08
},
{
"num_node_expansions": 22,
"plan_length": 17,
"search_time": 0.09,
"total_time": 0.09
},
{
"num_node_expansions": 22,
"plan_length": 18,
"search_time": 0.09,
"total_time": 0.09
},
{
"num_node_expansions": 16,
"plan_length": 12,
"search_time": 0.02,
"total_time": 0.02
},
{
"num_node_expansions": 14,
"plan_length": 10,
"search_time": 0.03,
"total_time": 0.03
},
{
"num_node_expansions": 19,
"plan_length": 14,
"search_time": 0.01,
"total_time": 0.01
},
{
"num_node_expansions": 17,
"plan_length": 14,
"search_time": 0.01,
"total_time": 0.01
},
{
"num_node_expansions": 22,
"plan_length": 20,
"search_time": 0.17,
"total_time": 0.17
},
{
"num_node_expansions": 19,
"plan_length": 17,
"search_time": 0.15,
"total_time": 0.15
},
{
"num_node_expansions": 15,
"plan_length": 12,
"search_time": 0.09,
"total_time": 0.09
},
{
"num_node_expansions": 21,
"plan_length": 18,
"search_time": 0.1,
"total_time": 0.1
},
{
"num_node_expansions": 28,
"plan_length": 25,
"search_time": 1.75,
"total_time": 1.75
},
{
"num_node_expansions": 25,
"plan_length": 20,
"search_time": 1.54,
"total_time": 1.54
},
{
"num_node_expansions": 9,
"plan_length": 7,
"search_time": 0.0,
"total_time": 0.0
},
{
"num_node_expansions": 9,
"plan_length": 7,
"search_time": 0.01,
"total_time": 0.01
},
{
"num_node_expansions": 14,
"plan_length": 11,
"search_time": 0.02,
"total_time": 0.02
},
{
"num_node_expansions": 19,
"plan_length": 15,
"search_time": 0.03,
"total_time": 0.03
},
{
"num_node_expansions": 17,
"plan_length": 15,
"search_time": 0.1,
"total_time": 0.1
},
{
"num_node_expansions": 26,
"plan_length": 20,
"search_time": 0.13,
"total_time": 0.13
},
{
"num_node_expansions": 13,
"plan_length": 10,
"search_time": 0.1,
"total_time": 0.1
},
{
"num_node_expansions": 15,
"plan_length": 12,
"search_time": 0.11,
"total_time": 0.11
},
{
"num_node_expansions": 35,
"plan_length": 33,
"search_time": 0.69,
"total_time": 0.69
},
{
"num_node_expansions": 33,
"plan_length": 28,
"search_time": 0.64,
"total_time": 0.64
},
{
"num_node_expansions": 20,
"plan_length": 17,
"search_time": 0.07,
"total_time": 0.07
},
{
"num_node_expansions": 13,
"plan_length": 10,
"search_time": 0.05,
"total_time": 0.05
},
{
"num_node_expansions": 16,
"plan_length": 12,
"search_time": 1.02,
"total_time": 1.02
},
{
"num_node_expansions": 24,
"plan_length": 19,
"search_time": 1.73,
"total_time": 1.73
},
{
"num_node_expansions": 17,
"plan_length": 14,
"search_time": 0.08,
"total_time": 0.08
},
{
"num_node_expansions": 24,
"plan_length": 18,
"search_time": 0.1,
"total_time": 0.1
},
{
"num_node_expansions": 32,
"plan_length": 25,
"search_time": 0.4,
"total_time": 0.4
},
{
"num_node_expansions": 25,
"plan_length": 19,
"search_time": 0.29,
"total_time": 0.29
},
{
"num_node_expansions": 21,
"plan_length": 17,
"search_time": 0.04,
"total_time": 0.04
},
{
"num_node_expansions": 22,
"plan_length": 17,
"search_time": 0.04,
"total_time": 0.04
},
{
"num_node_expansions": 21,
"plan_length": 17,
"search_time": 0.0,
"total_time": 0.0
},
{
"num_node_expansions": 22,
"plan_length": 20,
"search_time": 0.0,
"total_time": 0.0
},
{
"num_node_expansions": 14,
"plan_length": 12,
"search_time": 0.13,
"total_time": 0.13
},
{
"num_node_expansions": 31,
"plan_length": 28,
"search_time": 0.28,
"total_time": 0.28
},
{
"num_node_expansions": 17,
"plan_length": 14,
"search_time": 0.09,
"total_time": 0.09
},
{
"num_node_expansions": 26,
"plan_length": 20,
"search_time": 0.13,
"total_time": 0.13
},
{
"num_node_expansions": 18,
"plan_length": 14,
"search_time": 0.23,
"total_time": 0.23
},
{
"num_node_expansions": 16,
"plan_length": 12,
"search_time": 0.18,
"total_time": 0.18
},
{
"num_node_expansions": 16,
"plan_length": 12,
"search_time": 0.02,
"total_time": 0.02
},
{
"num_node_expansions": 25,
"plan_length": 19,
"search_time": 0.02,
"total_time": 0.02
},
{
"num_node_expansions": 17,
"plan_length": 12,
"search_time": 0.0,
"total_time": 0.0
},
{
"num_node_expansions": 16,
"plan_length": 14,
"search_time": 0.0,
"total_time": 0.0
},
{
"num_node_expansions": 19,
"plan_length": 15,
"search_time": 0.11,
"total_time": 0.11
},
{
"num_node_expansions": 18,
"plan_length": 13,
"search_time": 0.1,
"total_time": 0.1
},
{
"num_node_expansions": 21,
"plan_length": 19,
"search_time": 0.01,
"total_time": 0.01
},
{
"num_node_expansions": 23,
"plan_length": 17,
"search_time": 0.02,
"total_time": 0.02
},
{
"num_node_expansions": 19,
"plan_length": 13,
"search_time": 0.07,
"total_time": 0.07
},
{
"num_node_expansions": 15,
"plan_length": 12,
"search_time": 0.06,
"total_time": 0.06
},
{
"num_node_expansions": 23,
"plan_length": 19,
"search_time": 0.09,
"total_time": 0.09
},
{
"num_node_expansions": 20,
"plan_length": 18,
"search_time": 0.08,
"total_time": 0.08
},
{
"num_node_expansions": 21,
"plan_length": 16,
"search_time": 0.26,
"total_time": 0.26
},
{
"num_node_expansions": 20,
"plan_length": 15,
"search_time": 0.29,
"total_time": 0.29
},
{
"num_node_expansions": 18,
"plan_length": 16,
"search_time": 1.07,
"total_time": 1.07
},
{
"num_node_expansions": 25,
"plan_length": 23,
"search_time": 1.64,
"total_time": 1.64
},
{
"num_node_expansions": 14,
"plan_length": 10,
"search_time": 0.04,
"total_time": 0.04
},
{
"num_node_expansions": 17,
"plan_length": 13,
"search_time": 0.05,
"total_time": 0.05
},
{
"num_node_expansions": 24,
"plan_length": 19,
"search_time": 0.05,
"total_time": 0.05
},
{
"num_node_expansions": 22,
"plan_length": 18,
"search_time": 0.03,
"total_time": 0.03
},
{
"num_node_expansions": 15,
"plan_length": 12,
"search_time": 0.02,
"total_time": 0.02
},
{
"num_node_expansions": 11,
"plan_length": 8,
"search_time": 0.01,
"total_time": 0.01
},
{
"num_node_expansions": 20,
"plan_length": 18,
"search_time": 0.01,
"total_time": 0.01
},
{
"num_node_expansions": 27,
"plan_length": 23,
"search_time": 0.01,
"total_time": 0.01
},
{
"num_node_expansions": 20,
"plan_length": 17,
"search_time": 0.35,
"total_time": 0.35
},
{
"num_node_expansions": 17,
"plan_length": 14,
"search_time": 0.28,
"total_time": 0.28
},
{
"num_node_expansions": 15,
"plan_length": 12,
"search_time": 0.03,
"total_time": 0.03
},
{
"num_node_expansions": 17,
"plan_length": 12,
"search_time": 0.04,
"total_time": 0.04
},
{
"num_node_expansions": 19,
"plan_length": 14,
"search_time": 0.22,
"total_time": 0.22
},
{
"num_node_expansions": 39,
"plan_length": 33,
"search_time": 0.43,
"total_time": 0.43
},
{
"num_node_expansions": 16,
"plan_length": 13,
"search_time": 0.14,
"total_time": 0.14
},
{
"num_node_expansions": 25,
"plan_length": 20,
"search_time": 0.19,
"total_time": 0.19
},
{
"num_node_expansions": 21,
"plan_length": 16,
"search_time": 0.02,
"total_time": 0.02
},
{
"num_node_expansions": 27,
"plan_length": 19,
"search_time": 0.03,
"total_time": 0.03
},
{
"num_node_expansions": 18,
"plan_length": 14,
"search_time": 0.03,
"total_time": 0.03
},
{
"num_node_expansions": 16,
"plan_length": 14,
"search_time": 0.03,
"total_time": 0.03
},
{
"num_node_expansions": 29,
"plan_length": 27,
"search_time": 0.05,
"total_time": 0.05
},
{
"num_node_expansions": 19,
"plan_length": 14,
"search_time": 0.04,
"total_time": 0.04
},
{
"num_node_expansions": 21,
"plan_length": 18,
"search_time": 0.24,
"total_time": 0.24
},
{
"num_node_expansions": 16,
"plan_length": 14,
"search_time": 0.28,
"total_time": 0.28
},
{
"num_node_expansions": 14,
"plan_length": 12,
"search_time": 0.01,
"total_time": 0.01
},
{
"num_node_expansions": 17,
"plan_length": 14,
"search_time": 0.0,
"total_time": 0.0
},
{
"num_node_expansions": 20,
"plan_length": 17,
"search_time": 0.51,
"total_time": 0.51
},
{
"num_node_expansions": 14,
"plan_length": 12,
"search_time": 0.39,
"total_time": 0.39
}
]
num_timeouts = 0
num_timeouts = 0
num_problems = 172
| stats = [{'num_node_expansions': 25, 'plan_length': 20, 'search_time': 0.04, 'total_time': 0.04}, {'num_node_expansions': 22, 'plan_length': 18, 'search_time': 0.04, 'total_time': 0.04}, {'num_node_expansions': 24, 'plan_length': 21, 'search_time': 0.33, 'total_time': 0.33}, {'num_node_expansions': 26, 'plan_length': 20, 'search_time': 0.41, 'total_time': 0.41}, {'num_node_expansions': 19, 'plan_length': 14, 'search_time': 0.44, 'total_time': 0.44}, {'num_node_expansions': 28, 'plan_length': 24, 'search_time': 0.76, 'total_time': 0.76}, {'num_node_expansions': 22, 'plan_length': 18, 'search_time': 0.15, 'total_time': 0.15}, {'num_node_expansions': 19, 'plan_length': 17, 'search_time': 0.15, 'total_time': 0.15}, {'num_node_expansions': 19, 'plan_length': 17, 'search_time': 0.03, 'total_time': 0.03}, {'num_node_expansions': 16, 'plan_length': 12, 'search_time': 0.02, 'total_time': 0.02}, {'num_node_expansions': 13, 'plan_length': 11, 'search_time': 0.1, 'total_time': 0.1}, {'num_node_expansions': 17, 'plan_length': 15, 'search_time': 0.1, 'total_time': 0.1}, {'num_node_expansions': 18, 'plan_length': 15, 'search_time': 0.03, 'total_time': 0.03}, {'num_node_expansions': 12, 'plan_length': 10, 'search_time': 0.03, 'total_time': 0.03}, {'num_node_expansions': 18, 'plan_length': 16, 'search_time': 0.04, 'total_time': 0.04}, {'num_node_expansions': 15, 'plan_length': 13, 'search_time': 0.04, 'total_time': 0.04}, {'num_node_expansions': 27, 'plan_length': 23, 'search_time': 0.04, 'total_time': 0.04}, {'num_node_expansions': 31, 'plan_length': 27, 'search_time': 0.04, 'total_time': 0.04}, {'num_node_expansions': 28, 'plan_length': 24, 'search_time': 0.04, 'total_time': 0.04}, {'num_node_expansions': 18, 'plan_length': 16, 'search_time': 0.04, 'total_time': 0.04}, {'num_node_expansions': 17, 'plan_length': 13, 'search_time': 0.15, 'total_time': 0.15}, {'num_node_expansions': 20, 'plan_length': 16, 'search_time': 0.19, 'total_time': 0.19}, {'num_node_expansions': 16, 'plan_length': 13, 'search_time': 0.1, 'total_time': 0.1}, {'num_node_expansions': 28, 'plan_length': 24, 'search_time': 0.21, 'total_time': 0.21}, {'num_node_expansions': 13, 'plan_length': 11, 'search_time': 0.01, 'total_time': 0.01}, {'num_node_expansions': 19, 'plan_length': 16, 'search_time': 0.02, 'total_time': 0.02}, {'num_node_expansions': 17, 'plan_length': 13, 'search_time': 0.22, 'total_time': 0.22}, {'num_node_expansions': 16, 'plan_length': 14, 'search_time': 0.23, 'total_time': 0.23}, {'num_node_expansions': 20, 'plan_length': 15, 'search_time': 0.13, 'total_time': 0.13}, {'num_node_expansions': 16, 'plan_length': 13, 'search_time': 0.12, 'total_time': 0.12}, {'num_node_expansions': 27, 'plan_length': 22, 'search_time': 0.2, 'total_time': 0.2}, {'num_node_expansions': 21, 'plan_length': 16, 'search_time': 0.13, 'total_time': 0.13}, {'num_node_expansions': 19, 'plan_length': 16, 'search_time': 0.15, 'total_time': 0.15}, {'num_node_expansions': 22, 'plan_length': 20, 'search_time': 0.18, 'total_time': 0.18}, {'num_node_expansions': 25, 'plan_length': 19, 'search_time': 0.09, 'total_time': 0.09}, {'num_node_expansions': 21, 'plan_length': 19, 'search_time': 0.1, 'total_time': 0.1}, {'num_node_expansions': 17, 'plan_length': 14, 'search_time': 0.34, 'total_time': 0.34}, {'num_node_expansions': 38, 'plan_length': 33, 'search_time': 0.62, 'total_time': 0.62}, {'num_node_expansions': 17, 'plan_length': 14, 'search_time': 0.1, 'total_time': 0.1}, {'num_node_expansions': 23, 'plan_length': 20, 'search_time': 0.15, 'total_time': 0.15}, {'num_node_expansions': 21, 'plan_length': 17, 'search_time': 0.17, 'total_time': 0.17}, {'num_node_expansions': 9, 'plan_length': 7, 'search_time': 0.09, 'total_time': 0.09}, {'num_node_expansions': 18, 'plan_length': 13, 'search_time': 0.17, 'total_time': 0.17}, {'num_node_expansions': 29, 'plan_length': 27, 'search_time': 0.3, 'total_time': 0.3}, {'num_node_expansions': 15, 'plan_length': 13, 'search_time': 0.42, 'total_time': 0.42}, {'num_node_expansions': 35, 'plan_length': 26, 'search_time': 0.91, 'total_time': 0.91}, {'num_node_expansions': 18, 'plan_length': 16, 'search_time': 0.14, 'total_time': 0.14}, {'num_node_expansions': 22, 'plan_length': 19, 'search_time': 0.2, 'total_time': 0.2}, {'num_node_expansions': 24, 'plan_length': 19, 'search_time': 0.39, 'total_time': 0.39}, {'num_node_expansions': 17, 'plan_length': 15, 'search_time': 0.28, 'total_time': 0.28}, {'num_node_expansions': 10, 'plan_length': 8, 'search_time': 0.04, 'total_time': 0.04}, {'num_node_expansions': 17, 'plan_length': 14, 'search_time': 0.04, 'total_time': 0.04}, {'num_node_expansions': 28, 'plan_length': 25, 'search_time': 1.05, 'total_time': 1.05}, {'num_node_expansions': 19, 'plan_length': 14, 'search_time': 0.74, 'total_time': 0.74}, {'num_node_expansions': 11, 'plan_length': 9, 'search_time': 0.61, 'total_time': 0.61}, {'num_node_expansions': 39, 'plan_length': 34, 'search_time': 0.97, 'total_time': 0.97}, {'num_node_expansions': 15, 'plan_length': 13, 'search_time': 0.01, 'total_time': 0.01}, {'num_node_expansions': 25, 'plan_length': 19, 'search_time': 0.02, 'total_time': 0.02}, {'num_node_expansions': 20, 'plan_length': 18, 'search_time': 0.19, 'total_time': 0.19}, {'num_node_expansions': 27, 'plan_length': 21, 'search_time': 0.25, 'total_time': 0.25}, {'num_node_expansions': 14, 'plan_length': 11, 'search_time': 0.05, 'total_time': 0.05}, {'num_node_expansions': 31, 'plan_length': 24, 'search_time': 0.13, 'total_time': 0.13}, {'num_node_expansions': 9, 'plan_length': 7, 'search_time': 0.37, 'total_time': 0.37}, {'num_node_expansions': 33, 'plan_length': 31, 'search_time': 0.87, 'total_time': 0.87}, {'num_node_expansions': 18, 'plan_length': 15, 'search_time': 0.26, 'total_time': 0.26}, {'num_node_expansions': 18, 'plan_length': 15, 'search_time': 0.18, 'total_time': 0.18}, {'num_node_expansions': 18, 'plan_length': 16, 'search_time': 0.06, 'total_time': 0.06}, {'num_node_expansions': 18, 'plan_length': 13, 'search_time': 0.06, 'total_time': 0.06}, {'num_node_expansions': 11, 'plan_length': 9, 'search_time': 0.1, 'total_time': 0.1}, {'num_node_expansions': 10, 'plan_length': 8, 'search_time': 0.1, 'total_time': 0.1}, {'num_node_expansions': 18, 'plan_length': 14, 'search_time': 0.03, 'total_time': 0.03}, {'num_node_expansions': 28, 'plan_length': 21, 'search_time': 0.06, 'total_time': 0.06}, {'num_node_expansions': 22, 'plan_length': 17, 'search_time': 0.12, 'total_time': 0.12}, {'num_node_expansions': 12, 'plan_length': 10, 'search_time': 0.09, 'total_time': 0.09}, {'num_node_expansions': 15, 'plan_length': 13, 'search_time': 0.0, 'total_time': 0.0}, {'num_node_expansions': 13, 'plan_length': 10, 'search_time': 0.0, 'total_time': 0.0}, {'num_node_expansions': 22, 'plan_length': 20, 'search_time': 0.5, 'total_time': 0.5}, {'num_node_expansions': 27, 'plan_length': 25, 'search_time': 0.57, 'total_time': 0.57}, {'num_node_expansions': 19, 'plan_length': 14, 'search_time': 0.12, 'total_time': 0.12}, {'num_node_expansions': 13, 'plan_length': 10, 'search_time': 0.11, 'total_time': 0.11}, {'num_node_expansions': 13, 'plan_length': 11, 'search_time': 0.0, 'total_time': 0.0}, {'num_node_expansions': 20, 'plan_length': 18, 'search_time': 0.01, 'total_time': 0.01}, {'num_node_expansions': 20, 'plan_length': 17, 'search_time': 0.21, 'total_time': 0.21}, {'num_node_expansions': 28, 'plan_length': 21, 'search_time': 0.23, 'total_time': 0.23}, {'num_node_expansions': 13, 'plan_length': 10, 'search_time': 0.03, 'total_time': 0.03}, {'num_node_expansions': 17, 'plan_length': 15, 'search_time': 0.03, 'total_time': 0.03}, {'num_node_expansions': 23, 'plan_length': 18, 'search_time': 0.08, 'total_time': 0.08}, {'num_node_expansions': 19, 'plan_length': 17, 'search_time': 0.08, 'total_time': 0.08}, {'num_node_expansions': 22, 'plan_length': 17, 'search_time': 0.09, 'total_time': 0.09}, {'num_node_expansions': 22, 'plan_length': 18, 'search_time': 0.09, 'total_time': 0.09}, {'num_node_expansions': 16, 'plan_length': 12, 'search_time': 0.02, 'total_time': 0.02}, {'num_node_expansions': 14, 'plan_length': 10, 'search_time': 0.03, 'total_time': 0.03}, {'num_node_expansions': 19, 'plan_length': 14, 'search_time': 0.01, 'total_time': 0.01}, {'num_node_expansions': 17, 'plan_length': 14, 'search_time': 0.01, 'total_time': 0.01}, {'num_node_expansions': 22, 'plan_length': 20, 'search_time': 0.17, 'total_time': 0.17}, {'num_node_expansions': 19, 'plan_length': 17, 'search_time': 0.15, 'total_time': 0.15}, {'num_node_expansions': 15, 'plan_length': 12, 'search_time': 0.09, 'total_time': 0.09}, {'num_node_expansions': 21, 'plan_length': 18, 'search_time': 0.1, 'total_time': 0.1}, {'num_node_expansions': 28, 'plan_length': 25, 'search_time': 1.75, 'total_time': 1.75}, {'num_node_expansions': 25, 'plan_length': 20, 'search_time': 1.54, 'total_time': 1.54}, {'num_node_expansions': 9, 'plan_length': 7, 'search_time': 0.0, 'total_time': 0.0}, {'num_node_expansions': 9, 'plan_length': 7, 'search_time': 0.01, 'total_time': 0.01}, {'num_node_expansions': 14, 'plan_length': 11, 'search_time': 0.02, 'total_time': 0.02}, {'num_node_expansions': 19, 'plan_length': 15, 'search_time': 0.03, 'total_time': 0.03}, {'num_node_expansions': 17, 'plan_length': 15, 'search_time': 0.1, 'total_time': 0.1}, {'num_node_expansions': 26, 'plan_length': 20, 'search_time': 0.13, 'total_time': 0.13}, {'num_node_expansions': 13, 'plan_length': 10, 'search_time': 0.1, 'total_time': 0.1}, {'num_node_expansions': 15, 'plan_length': 12, 'search_time': 0.11, 'total_time': 0.11}, {'num_node_expansions': 35, 'plan_length': 33, 'search_time': 0.69, 'total_time': 0.69}, {'num_node_expansions': 33, 'plan_length': 28, 'search_time': 0.64, 'total_time': 0.64}, {'num_node_expansions': 20, 'plan_length': 17, 'search_time': 0.07, 'total_time': 0.07}, {'num_node_expansions': 13, 'plan_length': 10, 'search_time': 0.05, 'total_time': 0.05}, {'num_node_expansions': 16, 'plan_length': 12, 'search_time': 1.02, 'total_time': 1.02}, {'num_node_expansions': 24, 'plan_length': 19, 'search_time': 1.73, 'total_time': 1.73}, {'num_node_expansions': 17, 'plan_length': 14, 'search_time': 0.08, 'total_time': 0.08}, {'num_node_expansions': 24, 'plan_length': 18, 'search_time': 0.1, 'total_time': 0.1}, {'num_node_expansions': 32, 'plan_length': 25, 'search_time': 0.4, 'total_time': 0.4}, {'num_node_expansions': 25, 'plan_length': 19, 'search_time': 0.29, 'total_time': 0.29}, {'num_node_expansions': 21, 'plan_length': 17, 'search_time': 0.04, 'total_time': 0.04}, {'num_node_expansions': 22, 'plan_length': 17, 'search_time': 0.04, 'total_time': 0.04}, {'num_node_expansions': 21, 'plan_length': 17, 'search_time': 0.0, 'total_time': 0.0}, {'num_node_expansions': 22, 'plan_length': 20, 'search_time': 0.0, 'total_time': 0.0}, {'num_node_expansions': 14, 'plan_length': 12, 'search_time': 0.13, 'total_time': 0.13}, {'num_node_expansions': 31, 'plan_length': 28, 'search_time': 0.28, 'total_time': 0.28}, {'num_node_expansions': 17, 'plan_length': 14, 'search_time': 0.09, 'total_time': 0.09}, {'num_node_expansions': 26, 'plan_length': 20, 'search_time': 0.13, 'total_time': 0.13}, {'num_node_expansions': 18, 'plan_length': 14, 'search_time': 0.23, 'total_time': 0.23}, {'num_node_expansions': 16, 'plan_length': 12, 'search_time': 0.18, 'total_time': 0.18}, {'num_node_expansions': 16, 'plan_length': 12, 'search_time': 0.02, 'total_time': 0.02}, {'num_node_expansions': 25, 'plan_length': 19, 'search_time': 0.02, 'total_time': 0.02}, {'num_node_expansions': 17, 'plan_length': 12, 'search_time': 0.0, 'total_time': 0.0}, {'num_node_expansions': 16, 'plan_length': 14, 'search_time': 0.0, 'total_time': 0.0}, {'num_node_expansions': 19, 'plan_length': 15, 'search_time': 0.11, 'total_time': 0.11}, {'num_node_expansions': 18, 'plan_length': 13, 'search_time': 0.1, 'total_time': 0.1}, {'num_node_expansions': 21, 'plan_length': 19, 'search_time': 0.01, 'total_time': 0.01}, {'num_node_expansions': 23, 'plan_length': 17, 'search_time': 0.02, 'total_time': 0.02}, {'num_node_expansions': 19, 'plan_length': 13, 'search_time': 0.07, 'total_time': 0.07}, {'num_node_expansions': 15, 'plan_length': 12, 'search_time': 0.06, 'total_time': 0.06}, {'num_node_expansions': 23, 'plan_length': 19, 'search_time': 0.09, 'total_time': 0.09}, {'num_node_expansions': 20, 'plan_length': 18, 'search_time': 0.08, 'total_time': 0.08}, {'num_node_expansions': 21, 'plan_length': 16, 'search_time': 0.26, 'total_time': 0.26}, {'num_node_expansions': 20, 'plan_length': 15, 'search_time': 0.29, 'total_time': 0.29}, {'num_node_expansions': 18, 'plan_length': 16, 'search_time': 1.07, 'total_time': 1.07}, {'num_node_expansions': 25, 'plan_length': 23, 'search_time': 1.64, 'total_time': 1.64}, {'num_node_expansions': 14, 'plan_length': 10, 'search_time': 0.04, 'total_time': 0.04}, {'num_node_expansions': 17, 'plan_length': 13, 'search_time': 0.05, 'total_time': 0.05}, {'num_node_expansions': 24, 'plan_length': 19, 'search_time': 0.05, 'total_time': 0.05}, {'num_node_expansions': 22, 'plan_length': 18, 'search_time': 0.03, 'total_time': 0.03}, {'num_node_expansions': 15, 'plan_length': 12, 'search_time': 0.02, 'total_time': 0.02}, {'num_node_expansions': 11, 'plan_length': 8, 'search_time': 0.01, 'total_time': 0.01}, {'num_node_expansions': 20, 'plan_length': 18, 'search_time': 0.01, 'total_time': 0.01}, {'num_node_expansions': 27, 'plan_length': 23, 'search_time': 0.01, 'total_time': 0.01}, {'num_node_expansions': 20, 'plan_length': 17, 'search_time': 0.35, 'total_time': 0.35}, {'num_node_expansions': 17, 'plan_length': 14, 'search_time': 0.28, 'total_time': 0.28}, {'num_node_expansions': 15, 'plan_length': 12, 'search_time': 0.03, 'total_time': 0.03}, {'num_node_expansions': 17, 'plan_length': 12, 'search_time': 0.04, 'total_time': 0.04}, {'num_node_expansions': 19, 'plan_length': 14, 'search_time': 0.22, 'total_time': 0.22}, {'num_node_expansions': 39, 'plan_length': 33, 'search_time': 0.43, 'total_time': 0.43}, {'num_node_expansions': 16, 'plan_length': 13, 'search_time': 0.14, 'total_time': 0.14}, {'num_node_expansions': 25, 'plan_length': 20, 'search_time': 0.19, 'total_time': 0.19}, {'num_node_expansions': 21, 'plan_length': 16, 'search_time': 0.02, 'total_time': 0.02}, {'num_node_expansions': 27, 'plan_length': 19, 'search_time': 0.03, 'total_time': 0.03}, {'num_node_expansions': 18, 'plan_length': 14, 'search_time': 0.03, 'total_time': 0.03}, {'num_node_expansions': 16, 'plan_length': 14, 'search_time': 0.03, 'total_time': 0.03}, {'num_node_expansions': 29, 'plan_length': 27, 'search_time': 0.05, 'total_time': 0.05}, {'num_node_expansions': 19, 'plan_length': 14, 'search_time': 0.04, 'total_time': 0.04}, {'num_node_expansions': 21, 'plan_length': 18, 'search_time': 0.24, 'total_time': 0.24}, {'num_node_expansions': 16, 'plan_length': 14, 'search_time': 0.28, 'total_time': 0.28}, {'num_node_expansions': 14, 'plan_length': 12, 'search_time': 0.01, 'total_time': 0.01}, {'num_node_expansions': 17, 'plan_length': 14, 'search_time': 0.0, 'total_time': 0.0}, {'num_node_expansions': 20, 'plan_length': 17, 'search_time': 0.51, 'total_time': 0.51}, {'num_node_expansions': 14, 'plan_length': 12, 'search_time': 0.39, 'total_time': 0.39}]
num_timeouts = 0
num_timeouts = 0
num_problems = 172 |
print(14514)
for i in range(3, 121):
for j in range(1, i + 1):
print(i, j, -1)
print(i, j, 1) | print(14514)
for i in range(3, 121):
for j in range(1, i + 1):
print(i, j, -1)
print(i, j, 1) |
obj_row, obj_col = 2978, 3083
first_code = 20151125
def generate(obj_row, obj_col):
x_row= obj_row + obj_col - 1
x_n = sum(range(1, x_row + 1)) - (x_row - obj_col)
print(x_n)
previous = first_code
aux = first_code
for i in range(1, x_n) :
aux = (previous * 252533) % 33554393
previous = aux
return aux
print("RESULT: ", generate(obj_row, obj_col))
| (obj_row, obj_col) = (2978, 3083)
first_code = 20151125
def generate(obj_row, obj_col):
x_row = obj_row + obj_col - 1
x_n = sum(range(1, x_row + 1)) - (x_row - obj_col)
print(x_n)
previous = first_code
aux = first_code
for i in range(1, x_n):
aux = previous * 252533 % 33554393
previous = aux
return aux
print('RESULT: ', generate(obj_row, obj_col)) |
def wait(t, c):
while c < t:
c += c
return c
s, t, n = [int(i) for i in raw_input().split()]
d = map(int, raw_input().split())
b = map(int, raw_input().split())
c = map(int, raw_input().split())
time = s
time += d[0]
for i in range(n):
time = wait(time, c[i])
time += b[i]
time += d[i+1]
print('yes' if time < t else 'no')
| def wait(t, c):
while c < t:
c += c
return c
(s, t, n) = [int(i) for i in raw_input().split()]
d = map(int, raw_input().split())
b = map(int, raw_input().split())
c = map(int, raw_input().split())
time = s
time += d[0]
for i in range(n):
time = wait(time, c[i])
time += b[i]
time += d[i + 1]
print('yes' if time < t else 'no') |
class Config:
SECRET_KEY = 'a22912297e93845c6cf4776991df63ec'
SQLALCHEMY_DATABASE_URI = 'sqlite:///site.db'
MAIL_SERVER = 'smtp.gmail.com'
MAIL_PORT = 587
MAIL_USE_TLS = True
MAIL_USERNAME = "noreplya006@gmail.com"
MAIL_PASSWORD = "#@1234abcd" | class Config:
secret_key = 'a22912297e93845c6cf4776991df63ec'
sqlalchemy_database_uri = 'sqlite:///site.db'
mail_server = 'smtp.gmail.com'
mail_port = 587
mail_use_tls = True
mail_username = 'noreplya006@gmail.com'
mail_password = '#@1234abcd' |
# https://practice.geeksforgeeks.org/problems/circular-tour-1587115620/1
# 4 6 7 4
# 6 5 3 5
# -2 1 4 -1
class Solution:
def tour(self, lis, n):
sum = 0
j = 0
for i in range(len(lis)):
pair = lis[i]
sum += pair[0]-pair[1]
if sum < 0:
sum = 0
j = i+1
if j>=n:
return -1
else:
return j
if __name__ == '__main__':
t = int(input())
for i in range(t):
n = int(input())
arr = list(map(int, input().strip().split()))
lis = []
for i in range(1, 2 * n, 2):
lis.append([arr[i - 1], arr[i]])
print(Solution().tour(lis, n))
| class Solution:
def tour(self, lis, n):
sum = 0
j = 0
for i in range(len(lis)):
pair = lis[i]
sum += pair[0] - pair[1]
if sum < 0:
sum = 0
j = i + 1
if j >= n:
return -1
else:
return j
if __name__ == '__main__':
t = int(input())
for i in range(t):
n = int(input())
arr = list(map(int, input().strip().split()))
lis = []
for i in range(1, 2 * n, 2):
lis.append([arr[i - 1], arr[i]])
print(solution().tour(lis, n)) |
MESSAGES = {
# name -> (message send, expected response)
"ping request":
(b'd1:ad2:id20:\x16\x01\xfb\xa7\xca\x18P\x9e\xe5\x1d\xcc\x0e\xf8\xc6Z\x1a\xfe<s\x81e1:q4:ping1:t2:aa1:y1:qe',
b'^d1:t2:aa1:y1:r1:rd2:id20:.{20}ee$'),
"ping request missing id":
(b'd1:ade1:q4:ping1:t2:XX1:y1:qe', b'^d1:t2:XX1:y1:e1:eli203e14:Protocol Erroree$'),
"find_node request":
(b'd1:ad2:id20:abcdefghij01234567896:target20:mnopqrstuvwxyz123456e1:q9:find_node1:t2:aa1:y1:qe',
b'^d1:t2:aa1:y1:r1:rd5:nodesl(26|38):.*ee$'),
}
| messages = {'ping request': (b'd1:ad2:id20:\x16\x01\xfb\xa7\xca\x18P\x9e\xe5\x1d\xcc\x0e\xf8\xc6Z\x1a\xfe<s\x81e1:q4:ping1:t2:aa1:y1:qe', b'^d1:t2:aa1:y1:r1:rd2:id20:.{20}ee$'), 'ping request missing id': (b'd1:ade1:q4:ping1:t2:XX1:y1:qe', b'^d1:t2:XX1:y1:e1:eli203e14:Protocol Erroree$'), 'find_node request': (b'd1:ad2:id20:abcdefghij01234567896:target20:mnopqrstuvwxyz123456e1:q9:find_node1:t2:aa1:y1:qe', b'^d1:t2:aa1:y1:r1:rd5:nodesl(26|38):.*ee$')} |
#!/usr/bin/env python
# PoC1.py
junk = "A"*1000
payload = junk
f = open('exploit.plf','w')
f.write(payload)
f.close()
| junk = 'A' * 1000
payload = junk
f = open('exploit.plf', 'w')
f.write(payload)
f.close() |
'''
Created on 22 Oct 2019
@author: Yvo
'''
name = "Rom Filter";
| """
Created on 22 Oct 2019
@author: Yvo
"""
name = 'Rom Filter' |
class State:
MOTION_STATIONARY = 0
MOTION_WALKING = 1
MOTION_RUNNING = 2
MOTION_DRIVING = 3
MOTION_BIKING = 4
LOCATION_HOME = 0
LOCATION_WORK = 1
LOCATION_OTHER = 2
RINGER_MODE_SILENT = 0
RINGER_MODE_VIBRATE = 1
RINGER_MODE_NORMAL = 2
SCREEN_STATUS_ON = 0
SCREEN_STATUS_OFF = 1
def __init__(self, timeOfDay, dayOfWeek, motion, location,
notificationTimeElapsed, ringerMode, screenStatus):
assert 0.0 <= timeOfDay and timeOfDay <= 1.0
assert 0.0 <= dayOfWeek and dayOfWeek <= 1.0
assert motion in State.allMotionValues()
assert location in State.allLocationValues()
assert 0.0 <= notificationTimeElapsed
assert ringerMode in State.allRingerModeValues()
assert screenStatus in State.allScreenStatusValues()
self.timeOfDay = timeOfDay
self.dayOfWeek = dayOfWeek
self.motion = motion
self.location = location
self.notificationTimeElapsed = notificationTimeElapsed
self.ringerMode = ringerMode
self.screenStatus = screenStatus
@staticmethod
def allMotionValues():
return [
State.MOTION_STATIONARY,
State.MOTION_WALKING,
State.MOTION_RUNNING,
State.MOTION_DRIVING,
State.MOTION_BIKING,
]
@staticmethod
def allLocationValues():
return [
State.LOCATION_HOME,
State.LOCATION_WORK,
State.LOCATION_OTHER,
]
@staticmethod
def allRingerModeValues():
return [
State.RINGER_MODE_SILENT,
State.RINGER_MODE_VIBRATE,
State.RINGER_MODE_NORMAL,
]
@staticmethod
def allScreenStatusValues():
return [
State.SCREEN_STATUS_ON,
State.SCREEN_STATUS_OFF,
]
@staticmethod
def getExampleState():
return State(
timeOfDay=0.,
dayOfWeek=0.,
motion=State.MOTION_STATIONARY,
location=State.LOCATION_HOME,
notificationTimeElapsed=1.,
ringerMode=State.RINGER_MODE_SILENT,
screenStatus=State.SCREEN_STATUS_ON,
)
def __eq__(self, other):
return all([
self.timeOfDay == other.timeOfDay,
self.dayOfWeek == other.dayOfWeek,
self.motion == other.motion,
self.location == other.location,
self.notificationTimeElapsed == other.notificationTimeElapsed,
self.ringerMode == other.ringerMode,
self.screenStatus == other.screenStatus,
])
| class State:
motion_stationary = 0
motion_walking = 1
motion_running = 2
motion_driving = 3
motion_biking = 4
location_home = 0
location_work = 1
location_other = 2
ringer_mode_silent = 0
ringer_mode_vibrate = 1
ringer_mode_normal = 2
screen_status_on = 0
screen_status_off = 1
def __init__(self, timeOfDay, dayOfWeek, motion, location, notificationTimeElapsed, ringerMode, screenStatus):
assert 0.0 <= timeOfDay and timeOfDay <= 1.0
assert 0.0 <= dayOfWeek and dayOfWeek <= 1.0
assert motion in State.allMotionValues()
assert location in State.allLocationValues()
assert 0.0 <= notificationTimeElapsed
assert ringerMode in State.allRingerModeValues()
assert screenStatus in State.allScreenStatusValues()
self.timeOfDay = timeOfDay
self.dayOfWeek = dayOfWeek
self.motion = motion
self.location = location
self.notificationTimeElapsed = notificationTimeElapsed
self.ringerMode = ringerMode
self.screenStatus = screenStatus
@staticmethod
def all_motion_values():
return [State.MOTION_STATIONARY, State.MOTION_WALKING, State.MOTION_RUNNING, State.MOTION_DRIVING, State.MOTION_BIKING]
@staticmethod
def all_location_values():
return [State.LOCATION_HOME, State.LOCATION_WORK, State.LOCATION_OTHER]
@staticmethod
def all_ringer_mode_values():
return [State.RINGER_MODE_SILENT, State.RINGER_MODE_VIBRATE, State.RINGER_MODE_NORMAL]
@staticmethod
def all_screen_status_values():
return [State.SCREEN_STATUS_ON, State.SCREEN_STATUS_OFF]
@staticmethod
def get_example_state():
return state(timeOfDay=0.0, dayOfWeek=0.0, motion=State.MOTION_STATIONARY, location=State.LOCATION_HOME, notificationTimeElapsed=1.0, ringerMode=State.RINGER_MODE_SILENT, screenStatus=State.SCREEN_STATUS_ON)
def __eq__(self, other):
return all([self.timeOfDay == other.timeOfDay, self.dayOfWeek == other.dayOfWeek, self.motion == other.motion, self.location == other.location, self.notificationTimeElapsed == other.notificationTimeElapsed, self.ringerMode == other.ringerMode, self.screenStatus == other.screenStatus]) |
class Solution:
def confusingNumberII(self, N: int) -> int:
table = {0:0, 1:1, 6:9, 8:8, 9:6}
keys = [0, 1, 6, 8, 9]
def dfs(num, rotation, base):
count = 0
if num != rotation:
count += 1
for d in keys:
if num == 0 and d == 0:
continue
if num * 10 + d > N:
break
count += dfs(num * 10 + d, table[d] * base + rotation, base * 10)
return count
return dfs(0, 0, 1)
| class Solution:
def confusing_number_ii(self, N: int) -> int:
table = {0: 0, 1: 1, 6: 9, 8: 8, 9: 6}
keys = [0, 1, 6, 8, 9]
def dfs(num, rotation, base):
count = 0
if num != rotation:
count += 1
for d in keys:
if num == 0 and d == 0:
continue
if num * 10 + d > N:
break
count += dfs(num * 10 + d, table[d] * base + rotation, base * 10)
return count
return dfs(0, 0, 1) |
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]))
add = lambda lhs, rhs: lhs + rhs
sum = lambda *xs: fold(add, xs, 0)
print(sum(2, 3, 5))
| 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]))
add = lambda lhs, rhs: lhs + rhs
sum = lambda *xs: fold(add, xs, 0)
print(sum(2, 3, 5)) |
## https://leetcode.com/problems/path-sum
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def hasPathSum(self, root: Optional[TreeNode], targetSum: int) -> bool:
if root is None:
return False
if root.left is None and root.right is None:
return root.val == targetSum
left = self.hasPathSum(root.left, targetSum - root.val)
right = self.hasPathSum(root.right, targetSum - root.val)
return left or right
| class Solution:
def has_path_sum(self, root: Optional[TreeNode], targetSum: int) -> bool:
if root is None:
return False
if root.left is None and root.right is None:
return root.val == targetSum
left = self.hasPathSum(root.left, targetSum - root.val)
right = self.hasPathSum(root.right, targetSum - root.val)
return left or right |
class Solution:
def groupAnagrams(self, strs: 'List[str]') -> 'List[List[str]]':
dic = {}
for anagram in strs:
key = ''.join(sorted(anagram))
if key in dic.keys():
dic[key].append(anagram)
else:
dic[key] = [anagram]
result = []
for key in dic.keys():
result.append(dic[key])
return result
| class Solution:
def group_anagrams(self, strs: 'List[str]') -> 'List[List[str]]':
dic = {}
for anagram in strs:
key = ''.join(sorted(anagram))
if key in dic.keys():
dic[key].append(anagram)
else:
dic[key] = [anagram]
result = []
for key in dic.keys():
result.append(dic[key])
return result |
#!/usr/bin/env python3
def format_log_level(level):
return [
'DEBUG',
'INFO ',
'WARN ',
'ERROR',
'FATAL',
][level]
def format_log_type(log_type):
return log_type.lstrip('TI')
def format_log_entry(log_entry):
return '{} {} {}:{} {}'.format(
log_entry['log_time'],
format_log_level(log_entry['log_level']),
log_entry['file_name'],
log_entry['file_line'],
log_entry['content'],
)
def format_log_entry_with_type(log_entry):
return '{} {} {} {}:{} {}'.format(
format_log_type(log_entry['log_type']),
log_entry['log_time'],
format_log_level(log_entry['log_level']),
log_entry['file_name'],
log_entry['file_line'],
log_entry['content'],
)
| def format_log_level(level):
return ['DEBUG', 'INFO ', 'WARN ', 'ERROR', 'FATAL'][level]
def format_log_type(log_type):
return log_type.lstrip('TI')
def format_log_entry(log_entry):
return '{} {} {}:{} {}'.format(log_entry['log_time'], format_log_level(log_entry['log_level']), log_entry['file_name'], log_entry['file_line'], log_entry['content'])
def format_log_entry_with_type(log_entry):
return '{} {} {} {}:{} {}'.format(format_log_type(log_entry['log_type']), log_entry['log_time'], format_log_level(log_entry['log_level']), log_entry['file_name'], log_entry['file_line'], log_entry['content']) |
# app/utils.py
def make_step_iter(step, max_):
num = 0
while True:
yield num
num = (num + step) % max_
| def make_step_iter(step, max_):
num = 0
while True:
yield num
num = (num + step) % max_ |
PASILLO_DID = "A1"
CUARTO_ESTE_DID = "A2"
CUARTO_OESTE_DID = "A4"
SALON_DID = "A5"
HEATER_DID = "C1"
HEATER_PROTOCOL = "X10"
HEATER_API = "http://localhost"
HEATER_USERNAME = "raton"
HEATER_PASSWORD = "xxxx"
HEATER_MARGIN = 0.0
HEATER_INCREMENT = 0.5
AWS_CREDS_PATH = "/etc/aws.keys"
AWS_ZONE = "us-east-1"
MINUTES_AFTER_SUNRISE_FOR_DAY = 60
MINUTES_AFTER_SUNSET_FOR_DAY = 60
#INTERNAL_TEMPERATURE_URI = "http://raspberry/therm/temperature"
#INTERNAL_TEMPERATURE_URI = "http://localhost:8000/therm/temperature"
LIST_THERMOMETERS_API = "http://172.27.225.2/thermometer/thermometers?"
#TEMPERATURES_API = "http://raspberry/therm/temperature_api/thermometers"
#THERMOMETER_API = "http://raspberry/therm/temperature_api/thermometer/"
FLAME_STATS = True
FLAME_STATS_PATH = "./flame_stats.log"
FLAME_STATS_DATE_FORMAT = "%d.%m.%Y %H:%M:%S"
| pasillo_did = 'A1'
cuarto_este_did = 'A2'
cuarto_oeste_did = 'A4'
salon_did = 'A5'
heater_did = 'C1'
heater_protocol = 'X10'
heater_api = 'http://localhost'
heater_username = 'raton'
heater_password = 'xxxx'
heater_margin = 0.0
heater_increment = 0.5
aws_creds_path = '/etc/aws.keys'
aws_zone = 'us-east-1'
minutes_after_sunrise_for_day = 60
minutes_after_sunset_for_day = 60
list_thermometers_api = 'http://172.27.225.2/thermometer/thermometers?'
flame_stats = True
flame_stats_path = './flame_stats.log'
flame_stats_date_format = '%d.%m.%Y %H:%M:%S' |
# best solution:
# https://leetcode.com/problems/merge-two-sorted-lists/discuss/9735/Python-solutions-(iteratively-recursively-iteratively-in-place).
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, x):
# self.val = x
# self.next = None
class Solution:
def mergeTwoLists(self, l1: ListNode, l2: ListNode) -> ListNode:
dummy = ListNode(0)
tmp = dummy
while l1 and l2:
dummy.next = ListNode(min(l1.val, l2.val))
dummy = dummy.next
if l1.val < l2.val:
l1 = l1.next
else:
l2 = l2.next
dummy.next = l1 or l2
# dummy.next = l1 if l1 else l2
return tmp.next | class Solution:
def merge_two_lists(self, l1: ListNode, l2: ListNode) -> ListNode:
dummy = list_node(0)
tmp = dummy
while l1 and l2:
dummy.next = list_node(min(l1.val, l2.val))
dummy = dummy.next
if l1.val < l2.val:
l1 = l1.next
else:
l2 = l2.next
dummy.next = l1 or l2
return tmp.next |
# Doris Zdravkovic, March, 2019
# Solution to problem 5.
# python primes.py
# Input of a positive integer
n = int(input("Please enter a positive integer: "))
# Prime number is always greater than 1
# Reference: https://docs.python.org/3/tutorial/controlflow.html
# If entered number is greater than 1, for every number in range of 2 to entered number
# If entered number divided by any number gives remainder of 0, print "This is not a prime number"
if n > 1:
for x in range(2, n):
if (n % x) == 0:
print("This is not a prime number.")
# Stop the loop
break
# In other cases print "n is a prime number"
else:
print (n, "is a prime number.")
# If the entered number is equal or less than 1 then it is not a prime number
else:
print(n, 'is a prime number')
| n = int(input('Please enter a positive integer: '))
if n > 1:
for x in range(2, n):
if n % x == 0:
print('This is not a prime number.')
break
else:
print(n, 'is a prime number.')
else:
print(n, 'is a prime number') |
#!/usr/bin/python
'''
This file is part of SNC
Copyright (c) 2014-2021, Richard Barnett
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
'''
# variables used in JSON sensor records
TIMESTAMP = 'timestamp' # seconds since epoch
ACCEL_DATA = 'accel' # accelerometer x, y, z data in gs
LIGHT_DATA = 'light' # light data in lux
TEMPERATURE_DATA = 'temperature' # temperature data in degrees C
PRESSURE_DATA = 'pressure' # pressure in Pa
HUMIDITY_DATA = 'humidity' # humidity in %RH
AIRQUALITY_DATA = 'airquality' # air quality index
| """
This file is part of SNC
Copyright (c) 2014-2021, Richard Barnett
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
"""
timestamp = 'timestamp'
accel_data = 'accel'
light_data = 'light'
temperature_data = 'temperature'
pressure_data = 'pressure'
humidity_data = 'humidity'
airquality_data = 'airquality' |
def get_menu_choice():
def print_menu(): # Your menu design here
print(" _ _ _____ _____ _ _ ")
print("| \ | | ___|_ _| / \ _ __| |_ ")
print("| \| | |_ | | / _ \ | '__| __|")
print("| |\ | _| | | / ___ \| | | |_ ")
print("|_| \_|_| |_| /_/ \_\_| \__|")
print(30 * "-", "MENU", 30 * "-")
print("1. Configure contract parameters ")
print("2. Whitelist wallets ")
print("3. Get listed wallets ")
print("4. Start token pre-sale ")
print("5. Listen contract events ")
print("6. Exit ")
print(73 * "-")
loop = True
int_choice = -1
while loop: # While loop which will keep going until loop = False
print_menu() # Displays menu
choice = input("Enter your choice [1-6]: ")
if choice == '1':
int_choice = 1
loop = False
elif choice == '2':
choice = ''
while len(choice) == 0:
choice = input("Enter custom folder name(s). It may be a list of folder's names (example: c:,d:\docs): ")
int_choice = 2
loop = False
elif choice == '3':
choice = ''
while len(choice) == 0:
choice = input("Enter a single filename of a file with custom folders list: ")
int_choice = 3
loop = False
elif choice == '4':
choice = ''
while len(choice) == 0:
choice = input("Enter a single filename of a conf file: ")
int_choice = 4
loop = False
elif choice == '6':
int_choice = -1
print("Exiting..")
loop = False # This will make the while loop to end
else:
# Any inputs other than values 1-4 we print an error message
input("Wrong menu selection. Enter any key to try again..")
return [int_choice, choice]
| def get_menu_choice():
def print_menu():
print(' _ _ _____ _____ _ _ ')
print('| \\ | | ___|_ _| / \\ _ __| |_ ')
print("| \\| | |_ | | / _ \\ | '__| __|")
print('| |\\ | _| | | / ___ \\| | | |_ ')
print('|_| \\_|_| |_| /_/ \\_\\_| \\__|')
print(30 * '-', 'MENU', 30 * '-')
print('1. Configure contract parameters ')
print('2. Whitelist wallets ')
print('3. Get listed wallets ')
print('4. Start token pre-sale ')
print('5. Listen contract events ')
print('6. Exit ')
print(73 * '-')
loop = True
int_choice = -1
while loop:
print_menu()
choice = input('Enter your choice [1-6]: ')
if choice == '1':
int_choice = 1
loop = False
elif choice == '2':
choice = ''
while len(choice) == 0:
choice = input("Enter custom folder name(s). It may be a list of folder's names (example: c:,d:\\docs): ")
int_choice = 2
loop = False
elif choice == '3':
choice = ''
while len(choice) == 0:
choice = input('Enter a single filename of a file with custom folders list: ')
int_choice = 3
loop = False
elif choice == '4':
choice = ''
while len(choice) == 0:
choice = input('Enter a single filename of a conf file: ')
int_choice = 4
loop = False
elif choice == '6':
int_choice = -1
print('Exiting..')
loop = False
else:
input('Wrong menu selection. Enter any key to try again..')
return [int_choice, choice] |
conversion = {'I': 1, 'V': 5, 'X': 10, 'L': 50, 'C': 100, 'D': 500, 'M': 1000}
roman_letter_order = dict((letter, ind) for ind, letter in enumerate('IVXLCDM'))
minimal_num_of_letter_needed_for_each_digit = {'0': 0, '1': 1, '2': 2, '3': 3, '4': 2,
'5': 1, '6': 2, '7': 3, '8': 4, '9': 2}
def check_order(long_form):
for ind1, char1 in enumerate(long_form[:-1]):
char2 = long_form[ind1 + 1]
if roman_letter_order[char1] < roman_letter_order[char2]:
if char1 + char2 not in ('IV', 'IX', 'XL', 'XC', 'CD', 'CM'):
return False
return True
def parse(long_form):
__sum__ = 0
for ind1, char1 in enumerate(long_form[:-1]):
char2 = long_form[ind1 + 1]
if roman_letter_order[char1] >= roman_letter_order[char2]:
__sum__ += conversion[char1]
else:
if char1 + char2 in ('IV', 'IX', 'XL', 'XC', 'CD', 'CM'):
__sum__ -= conversion[char1]
__sum__ += conversion[long_form[-1]]
return __sum__
def get_long_form_lst():
lst = []
with open('p089_roman.txt') as f:
for row in f.readlines():
lst.append(row.strip())
return lst
long_form_lst = get_long_form_lst()
total_length_saved = 0
patterns_to_replace_0 = ['VIIII', 'LXXXX', 'DCCCC']
patterns_to_replace_1 = ['IIII', 'XXXX', 'CCCC']
for long_form in long_form_lst:
if check_order(long_form) is True:
short_form_length = 0
parsed = str(parse(long_form))
for ind, digit in enumerate(reversed(parsed)):
if ind == 3: # no short form for the digit of M
short_form_length += int(digit)
#print(int(digit))
else:
short_form_length += minimal_num_of_letter_needed_for_each_digit[digit]
#print(minimal_num_of_letter_needed_for_each_digit[digit])
length_saved = len(long_form) - short_form_length
total_length_saved += length_saved
length_saved_2 = 0
for pattern0, pattern1 in zip(patterns_to_replace_0, patterns_to_replace_1):
if pattern0 in long_form:
length_saved_2 += 3
elif pattern1 in long_form:
length_saved_2 += 2
if length_saved != length_saved_2:
print(long_form, parse(long_form), length_saved, length_saved_2)
else:
print(long_form)
print(total_length_saved)
| conversion = {'I': 1, 'V': 5, 'X': 10, 'L': 50, 'C': 100, 'D': 500, 'M': 1000}
roman_letter_order = dict(((letter, ind) for (ind, letter) in enumerate('IVXLCDM')))
minimal_num_of_letter_needed_for_each_digit = {'0': 0, '1': 1, '2': 2, '3': 3, '4': 2, '5': 1, '6': 2, '7': 3, '8': 4, '9': 2}
def check_order(long_form):
for (ind1, char1) in enumerate(long_form[:-1]):
char2 = long_form[ind1 + 1]
if roman_letter_order[char1] < roman_letter_order[char2]:
if char1 + char2 not in ('IV', 'IX', 'XL', 'XC', 'CD', 'CM'):
return False
return True
def parse(long_form):
__sum__ = 0
for (ind1, char1) in enumerate(long_form[:-1]):
char2 = long_form[ind1 + 1]
if roman_letter_order[char1] >= roman_letter_order[char2]:
__sum__ += conversion[char1]
elif char1 + char2 in ('IV', 'IX', 'XL', 'XC', 'CD', 'CM'):
__sum__ -= conversion[char1]
__sum__ += conversion[long_form[-1]]
return __sum__
def get_long_form_lst():
lst = []
with open('p089_roman.txt') as f:
for row in f.readlines():
lst.append(row.strip())
return lst
long_form_lst = get_long_form_lst()
total_length_saved = 0
patterns_to_replace_0 = ['VIIII', 'LXXXX', 'DCCCC']
patterns_to_replace_1 = ['IIII', 'XXXX', 'CCCC']
for long_form in long_form_lst:
if check_order(long_form) is True:
short_form_length = 0
parsed = str(parse(long_form))
for (ind, digit) in enumerate(reversed(parsed)):
if ind == 3:
short_form_length += int(digit)
else:
short_form_length += minimal_num_of_letter_needed_for_each_digit[digit]
length_saved = len(long_form) - short_form_length
total_length_saved += length_saved
length_saved_2 = 0
for (pattern0, pattern1) in zip(patterns_to_replace_0, patterns_to_replace_1):
if pattern0 in long_form:
length_saved_2 += 3
elif pattern1 in long_form:
length_saved_2 += 2
if length_saved != length_saved_2:
print(long_form, parse(long_form), length_saved, length_saved_2)
else:
print(long_form)
print(total_length_saved) |
# Write a for loop using range() to print out multiples of 5 up to 30 inclusive
for mult in range(5, 31, 5): # prints out multiples of 5 up to 30 inclusive
print(mult)
| for mult in range(5, 31, 5):
print(mult) |
#
# PySNMP MIB module CISCO-SWITCH-HARDWARE-CAPACITY-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-SWITCH-HARDWARE-CAPACITY-MIB
# Produced by pysmi-0.3.4 at Wed May 1 12:13:27 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")
SingleValueConstraint, ValueSizeConstraint, ValueRangeConstraint, ConstraintsUnion, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ValueSizeConstraint", "ValueRangeConstraint", "ConstraintsUnion", "ConstraintsIntersection")
Percent, = mibBuilder.importSymbols("CISCO-QOS-PIB-MIB", "Percent")
ciscoMgmt, = mibBuilder.importSymbols("CISCO-SMI", "ciscoMgmt")
CiscoInterfaceIndexList, = mibBuilder.importSymbols("CISCO-TC", "CiscoInterfaceIndexList")
entPhysicalIndex, = mibBuilder.importSymbols("ENTITY-MIB", "entPhysicalIndex")
CounterBasedGauge64, = mibBuilder.importSymbols("HCNUM-TC", "CounterBasedGauge64")
InterfaceIndexOrZero, ifIndex = mibBuilder.importSymbols("IF-MIB", "InterfaceIndexOrZero", "ifIndex")
InetAddressType, = mibBuilder.importSymbols("INET-ADDRESS-MIB", "InetAddressType")
SnmpAdminString, = mibBuilder.importSymbols("SNMP-FRAMEWORK-MIB", "SnmpAdminString")
ModuleCompliance, ObjectGroup, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "ObjectGroup", "NotificationGroup")
NotificationType, TimeTicks, IpAddress, ObjectIdentity, MibIdentifier, ModuleIdentity, Counter32, Integer32, Gauge32, Unsigned32, Counter64, iso, MibScalar, MibTable, MibTableRow, MibTableColumn, Bits = mibBuilder.importSymbols("SNMPv2-SMI", "NotificationType", "TimeTicks", "IpAddress", "ObjectIdentity", "MibIdentifier", "ModuleIdentity", "Counter32", "Integer32", "Gauge32", "Unsigned32", "Counter64", "iso", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Bits")
DisplayString, TextualConvention, DateAndTime = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention", "DateAndTime")
ciscoSwitchHardwareCapacityMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 9, 9, 663))
ciscoSwitchHardwareCapacityMIB.setRevisions(('2014-09-16 00:00', '2014-01-24 00:00', '2013-05-08 00:00', '2010-11-22 00:00', '2008-07-02 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: ciscoSwitchHardwareCapacityMIB.setRevisionsDescriptions(('Added the following enumerations for object cshcProtocolFibTcamProtocol - allProtocols(14) Updated the description of cshcProtocolFibTcamTotal and cshcProtocolFibTcamLogicalTotal.', 'Added following OBJECT-GROUP - cshcProtocolFibTcamWidthTypeGroup Added the following enumerations for object cshcProtocolFibTcamProtocol - mplsVpn(11) - fcMpls(12) - ipv6LocalLink(13) Added new compliance - ciscoSwitchHardwareCapacityMIBCompliance3', 'Added following OBJECT-GROUP - cshcNetflowFlowResourceUsageGroup - cshcMacUsageExtGroup - cshcProtocolFibTcamUsageExtGroup - cshcAdjacencyResourceUsageGroup - cshcQosResourceUsageGroup - cshcModTopDropIfIndexListGroup - cshcMetResourceUsageGroup Added the following enumerations for object cshcProtocolFibTcamProtocol - l2VpnPeer(7) - l2VpnIpv4Multicast(8) - l2VpnIpv6Multicast(9) Added new compliance - ciscoSwitchHardwareCapacityMIBCompliance2', 'Add the following new enumerations to cshcCPURateLimiterNetworkLayer: layer2Input(3) and layer2Output(4). Add cshcFibTcamUsageExtGroup.', 'Initial revision of this MIB module.',))
if mibBuilder.loadTexts: ciscoSwitchHardwareCapacityMIB.setLastUpdated('201409160000Z')
if mibBuilder.loadTexts: ciscoSwitchHardwareCapacityMIB.setOrganization('Cisco Systems, Inc.')
if mibBuilder.loadTexts: ciscoSwitchHardwareCapacityMIB.setContactInfo('Cisco Systems Customer Service Postal: 170 W Tasman Drive San Jose, CA 95134 USA Tel: +1 800 553-NETS E-mail: cs-lan-switch-snmp@cisco.com')
if mibBuilder.loadTexts: ciscoSwitchHardwareCapacityMIB.setDescription('This MIB module defines the managed objects for hardware capacity of Cisco switching devices. The hardware capacity information covers the following but not limited to features: forwarding, rate-limiter ... The following terms are used throughout the MIB: CAM: Content Addressable Memory. TCAM: Ternary Content Addressable Memory. FIB: Forwarding Information Base. VPN: Virtual Private Network. QoS: Quality of Service. CPU rate-limiter: Mechanism to rate-limit or restrict undesired traffic to the CPU. MPLS: Multiprotocol Label Switching.')
ciscoSwitchHardwareCapacityMIBNotifs = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 663, 0))
ciscoSwitchHardwareCapacityMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 663, 1))
ciscoSwitchHardwareCapacityMIBConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 663, 2))
cshcForwarding = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1))
cshcInterface = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 2))
cshcCPURateLimiterResources = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 3))
cshcIcamResources = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 4))
cshcNetflowFlowMaskResources = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 5))
cshcNetflowResourceUsage = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 6))
cshcQosResourceUsage = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 7))
class CshcInternalChannelType(TextualConvention, Integer32):
description = 'An enumerated value indicating the type of an internal channel. eobc - ethernet out-of-band channel. ibc - in-band channel.'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("eobc", 1), ("ibc", 2))
cshcL2Forwarding = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 1))
cshcMacUsageTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 1, 1), )
if mibBuilder.loadTexts: cshcMacUsageTable.setStatus('current')
if mibBuilder.loadTexts: cshcMacUsageTable.setDescription('This table contains MAC table capacity for each switching engine, as specified by entPhysicalIndex in ENTITY-MIB, capable of providing this information.')
cshcMacUsageEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 1, 1, 1), ).setIndexNames((0, "ENTITY-MIB", "entPhysicalIndex"))
if mibBuilder.loadTexts: cshcMacUsageEntry.setStatus('current')
if mibBuilder.loadTexts: cshcMacUsageEntry.setDescription('Each row contains management information for MAC table hardware capacity on a switching engine.')
cshcMacCollisions = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 1, 1, 1, 1), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcMacCollisions.setStatus('current')
if mibBuilder.loadTexts: cshcMacCollisions.setDescription('This object indicates the number of Ethernet frames whose source MAC address the switching engine failed to learn while constructing its MAC table.')
cshcMacUsed = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 1, 1, 1, 2), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcMacUsed.setStatus('current')
if mibBuilder.loadTexts: cshcMacUsed.setDescription('This object indicates the number of MAC table entries that are currently in use for this switching engine.')
cshcMacTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 1, 1, 1, 3), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcMacTotal.setStatus('current')
if mibBuilder.loadTexts: cshcMacTotal.setDescription('This object indicates the total number of MAC table entries available for this switching engine.')
cshcMacMcast = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 1, 1, 1, 4), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcMacMcast.setStatus('current')
if mibBuilder.loadTexts: cshcMacMcast.setDescription('This object indicates the total number of multicast MAC table entries on this switching engine.')
cshcMacUcast = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 1, 1, 1, 5), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcMacUcast.setStatus('current')
if mibBuilder.loadTexts: cshcMacUcast.setDescription('This object indicates the total number of unicast MAC table entries on this switching engine.')
cshcMacLines = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 1, 1, 1, 6), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcMacLines.setStatus('current')
if mibBuilder.loadTexts: cshcMacLines.setDescription('This object indicates the total number of MAC table lines on this switching engine. The MAC table is organized as multiple MAC entries per line.')
cshcMacLinesFull = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 1, 1, 1, 7), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcMacLinesFull.setStatus('current')
if mibBuilder.loadTexts: cshcMacLinesFull.setDescription('This object indicates the total number of MAC table lines full on this switching engine. A line full means all the MAC entries on the line are occupied.')
cshcVpnCamUsageTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 1, 2), )
if mibBuilder.loadTexts: cshcVpnCamUsageTable.setStatus('current')
if mibBuilder.loadTexts: cshcVpnCamUsageTable.setDescription('This table contains VPN CAM capacity for each entity, as specified by entPhysicalIndex in ENTITY-MIB, capable of providing this information.')
cshcVpnCamUsageEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 1, 2, 1), ).setIndexNames((0, "ENTITY-MIB", "entPhysicalIndex"))
if mibBuilder.loadTexts: cshcVpnCamUsageEntry.setStatus('current')
if mibBuilder.loadTexts: cshcVpnCamUsageEntry.setDescription('Each row contains management information for VPN CAM hardware capacity on an entity.')
cshcVpnCamUsed = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 1, 2, 1, 1), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcVpnCamUsed.setStatus('current')
if mibBuilder.loadTexts: cshcVpnCamUsed.setDescription('This object indicates the number of VPN CAM entries that are currently in use.')
cshcVpnCamTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 1, 2, 1, 2), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcVpnCamTotal.setStatus('current')
if mibBuilder.loadTexts: cshcVpnCamTotal.setDescription('This object indicates the total number of VPN CAM entries.')
cshcL3Forwarding = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2))
cshcFibTcamUsageTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 1), )
if mibBuilder.loadTexts: cshcFibTcamUsageTable.setStatus('current')
if mibBuilder.loadTexts: cshcFibTcamUsageTable.setDescription('This table contains FIB TCAM capacity for each entity, as specified by entPhysicalIndex in ENTITY-MIB, capable of providing this information.')
cshcFibTcamUsageEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 1, 1), ).setIndexNames((0, "ENTITY-MIB", "entPhysicalIndex"))
if mibBuilder.loadTexts: cshcFibTcamUsageEntry.setStatus('current')
if mibBuilder.loadTexts: cshcFibTcamUsageEntry.setDescription('Each row contains management information for FIB TCAM hardware capacity on an entity.')
cshc72bitsFibTcamUsed = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 1, 1, 1), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshc72bitsFibTcamUsed.setStatus('current')
if mibBuilder.loadTexts: cshc72bitsFibTcamUsed.setDescription('This object indicates the number of 72 bits FIB TCAM entries that are currently in use.')
cshc72bitsFibTcamTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 1, 1, 2), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshc72bitsFibTcamTotal.setStatus('current')
if mibBuilder.loadTexts: cshc72bitsFibTcamTotal.setDescription('This object indicates the total number of 72 bits FIB TCAM entries available.')
cshc144bitsFibTcamUsed = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 1, 1, 3), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshc144bitsFibTcamUsed.setStatus('current')
if mibBuilder.loadTexts: cshc144bitsFibTcamUsed.setDescription('This object indicates the number of 144 bits FIB TCAM entries that are currently in use.')
cshc144bitsFibTcamTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 1, 1, 4), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshc144bitsFibTcamTotal.setStatus('current')
if mibBuilder.loadTexts: cshc144bitsFibTcamTotal.setDescription('This object indicates the total number of 144 bits FIB TCAM entries available.')
cshc288bitsFibTcamUsed = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 1, 1, 5), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshc288bitsFibTcamUsed.setStatus('current')
if mibBuilder.loadTexts: cshc288bitsFibTcamUsed.setDescription('This object indicates the number of 288 bits FIB TCAM entries that are currently in use.')
cshc288bitsFibTcamTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 1, 1, 6), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshc288bitsFibTcamTotal.setStatus('current')
if mibBuilder.loadTexts: cshc288bitsFibTcamTotal.setDescription('This object indicates the total number of 288 bits FIB TCAM entries available.')
cshcProtocolFibTcamUsageTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 2), )
if mibBuilder.loadTexts: cshcProtocolFibTcamUsageTable.setStatus('current')
if mibBuilder.loadTexts: cshcProtocolFibTcamUsageTable.setDescription('This table contains FIB TCAM usage per specified Layer 3 protocol on an entity capable of providing this information.')
cshcProtocolFibTcamUsageEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 2, 1), ).setIndexNames((0, "ENTITY-MIB", "entPhysicalIndex"), (0, "CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcProtocolFibTcamProtocol"))
if mibBuilder.loadTexts: cshcProtocolFibTcamUsageEntry.setStatus('current')
if mibBuilder.loadTexts: cshcProtocolFibTcamUsageEntry.setDescription('Each row contains management information for FIB TCAM usage for the specific Layer 3 protocol on an entity as specified by the entPhysicalIndex in ENTITY-MIB.')
cshcProtocolFibTcamProtocol = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 2, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14))).clone(namedValues=NamedValues(("ipv4", 1), ("mpls", 2), ("eom", 3), ("ipv6", 4), ("ipv4Multicast", 5), ("ipv6Multicast", 6), ("l2VpnPeer", 7), ("l2VpnIpv4Multicast", 8), ("l2VpnIpv6Multicast", 9), ("fcoe", 10), ("mplsVpn", 11), ("fcMpls", 12), ("ipv6LocalLink", 13), ("allProtocols", 14))))
if mibBuilder.loadTexts: cshcProtocolFibTcamProtocol.setStatus('current')
if mibBuilder.loadTexts: cshcProtocolFibTcamProtocol.setDescription("This object indicates the Layer 3 protocol utilizing FIB TCAM resource. 'ipv4' - indicates Internet Protocol version 4. 'mpls' - indicates Multiprotocol Label Switching. 'eom' - indicates Ethernet over MPLS. 'ipv6' - indicates Internet Protocol version 6. 'ipv4Multicast' - indicates Internet Protocol version 4 for multicast traffic. 'ipv6Multicast' - indicates Internet Protocol version 6 for multicast traffic. 'l2VpnPeer' - indicates Layer 2 VPN Peer traffic. 'l2VpnIpv4Multicast' - indicates Internet Protocol version 4 for multicast traffic on Layer 2 VPN. 'l2VpnIpv6Multicast' - indicates Internet Protocol version 6 for multicast traffic on Layer 2 VPN. 'fcoe' - indicates Fibre Channel over Ethernet. 'mplsVpn' - indicates MPLS Layer 3 VPN aggregate labels. 'fcMpls' - indicates Fibre Channel over MPLS tunnels. 'ipv6LocalLink' - indicates Internet Protocol version 6 Local Link. 'allProtocols' - indicates all protocols within the entPhysicalIndex.")
cshcProtocolFibTcamUsed = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 2, 1, 2), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcProtocolFibTcamUsed.setStatus('current')
if mibBuilder.loadTexts: cshcProtocolFibTcamUsed.setDescription('This object indicates the number of FIB TCAM entries that are currently in use for the protocol denoted by cshcProtocolFibTcamProtocol.')
cshcProtocolFibTcamTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 2, 1, 3), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcProtocolFibTcamTotal.setStatus('current')
if mibBuilder.loadTexts: cshcProtocolFibTcamTotal.setDescription('This object indicates the total number of FIB TCAM entries are currently allocated for the protocol denoted by cshcProtocolFibTcamProtocol. A value of zero indicates that the total number of FIB TCAM for the protocol denoted by cshcProtocolFibTcamProtocol is not available.')
cshcProtocolFibTcamLogicalUsed = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 2, 1, 4), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcProtocolFibTcamLogicalUsed.setStatus('current')
if mibBuilder.loadTexts: cshcProtocolFibTcamLogicalUsed.setDescription('This object indicates the number of logical FIB TCAM entries that are currently in use for the protocol denoted by cshcProtocolFibTcamProtocol.')
cshcProtocolFibTcamLogicalTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 2, 1, 5), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcProtocolFibTcamLogicalTotal.setStatus('current')
if mibBuilder.loadTexts: cshcProtocolFibTcamLogicalTotal.setDescription('This object indicates the total number of logical FIB TCAM entries that are currently allocated for the protocol denoted by cshcProtocolFibTcamProtocol. A value of zero indicates that the total number of logical FIB TCAM for the protocol denoted by cshcProtocolFibTcamProtocol is not available.')
cshcProtocolFibTcamWidthType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 2, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("singleWidth", 1), ("doubleWidth", 2), ("quadWidth", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcProtocolFibTcamWidthType.setStatus('current')
if mibBuilder.loadTexts: cshcProtocolFibTcamWidthType.setDescription("This object indicates the entry width type for the protocol denoted by cshcProtocolFibTcamProtocol. 'singleWidth' - indicates each logical entry is using one physical entry. 'doubleWidth' - indicates each logical entry is using two physical entries. 'quadWidth' - indicates each logical entry is using four physical entries.")
cshcAdjacencyUsageTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 3), )
if mibBuilder.loadTexts: cshcAdjacencyUsageTable.setStatus('current')
if mibBuilder.loadTexts: cshcAdjacencyUsageTable.setDescription('This table contains adjacency capacity for each entity capable of providing this information.')
cshcAdjacencyUsageEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 3, 1), ).setIndexNames((0, "ENTITY-MIB", "entPhysicalIndex"))
if mibBuilder.loadTexts: cshcAdjacencyUsageEntry.setStatus('current')
if mibBuilder.loadTexts: cshcAdjacencyUsageEntry.setDescription('Each row contains management information for adjacency hardware capacity on an entity, as specified by entPhysicalIndex in ENTITY-MIB.')
cshcAdjacencyUsed = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 3, 1, 1), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcAdjacencyUsed.setStatus('current')
if mibBuilder.loadTexts: cshcAdjacencyUsed.setDescription('This object indicates the number of adjacency entries that are currently in use.')
cshcAdjacencyTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 3, 1, 2), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcAdjacencyTotal.setStatus('current')
if mibBuilder.loadTexts: cshcAdjacencyTotal.setDescription('This object indicates the total number of adjacency entries available.')
cshcForwardingLoadTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 4), )
if mibBuilder.loadTexts: cshcForwardingLoadTable.setStatus('current')
if mibBuilder.loadTexts: cshcForwardingLoadTable.setDescription('This table contains Layer 3 forwarding load information for each switching engine capable of providing this information.')
cshcForwardingLoadEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 4, 1), ).setIndexNames((0, "ENTITY-MIB", "entPhysicalIndex"))
if mibBuilder.loadTexts: cshcForwardingLoadEntry.setStatus('current')
if mibBuilder.loadTexts: cshcForwardingLoadEntry.setDescription('Each row contains management information of Layer 3 forwarding load on a switching engine, as specified by entPhysicalIndex in ENTITY-MIB.')
cshcForwardingLoadPktRate = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 4, 1, 1), CounterBasedGauge64()).setUnits('pps').setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcForwardingLoadPktRate.setStatus('current')
if mibBuilder.loadTexts: cshcForwardingLoadPktRate.setDescription('This object indicates the forwarding rate of Layer 3 packets.')
cshcForwardingLoadPktPeakRate = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 4, 1, 2), CounterBasedGauge64()).setUnits('pps').setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcForwardingLoadPktPeakRate.setStatus('current')
if mibBuilder.loadTexts: cshcForwardingLoadPktPeakRate.setDescription('This object indicates the peak forwarding rate of Layer 3 packets.')
cshcForwardingLoadPktPeakTime = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 4, 1, 3), DateAndTime()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcForwardingLoadPktPeakTime.setStatus('current')
if mibBuilder.loadTexts: cshcForwardingLoadPktPeakTime.setDescription('This object describes the time when the peak forwarding rate of Layer 3 packets denoted by cshcForwardingLoadPktPeakRate occurs. This object will contain 0-1-1,00:00:00.0 if the peak time information is not available.')
cshcAdjacencyResourceUsageTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 5), )
if mibBuilder.loadTexts: cshcAdjacencyResourceUsageTable.setStatus('current')
if mibBuilder.loadTexts: cshcAdjacencyResourceUsageTable.setDescription('This table contains adjacency capacity per resource type and its usage for each entity capable of providing this information.')
cshcAdjacencyResourceUsageEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 5, 1), ).setIndexNames((0, "ENTITY-MIB", "entPhysicalIndex"), (0, "CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcAdjacencyResourceIndex"))
if mibBuilder.loadTexts: cshcAdjacencyResourceUsageEntry.setStatus('current')
if mibBuilder.loadTexts: cshcAdjacencyResourceUsageEntry.setDescription('Each row contains the management information for a particular adjacency resource and switch engine, as specified by entPhysicalIndex in ENTITY-MIB.')
cshcAdjacencyResourceIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 5, 1, 1), Unsigned32())
if mibBuilder.loadTexts: cshcAdjacencyResourceIndex.setStatus('current')
if mibBuilder.loadTexts: cshcAdjacencyResourceIndex.setDescription('This object indicates a unique value that identifies an adjacency resource.')
cshcAdjacencyResourceDescr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 5, 1, 2), SnmpAdminString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcAdjacencyResourceDescr.setStatus('current')
if mibBuilder.loadTexts: cshcAdjacencyResourceDescr.setDescription('This object indicates a description of the adjacency resource.')
cshcAdjacencyResourceUsed = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 5, 1, 3), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcAdjacencyResourceUsed.setStatus('current')
if mibBuilder.loadTexts: cshcAdjacencyResourceUsed.setDescription('This object indicates the number of adjacency entries that are currently in use.')
cshcAdjacencyResourceTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 5, 1, 4), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcAdjacencyResourceTotal.setStatus('current')
if mibBuilder.loadTexts: cshcAdjacencyResourceTotal.setDescription('This object indicates the total number of adjacency entries available.')
cshcMetResourceUsageTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 6), )
if mibBuilder.loadTexts: cshcMetResourceUsageTable.setStatus('current')
if mibBuilder.loadTexts: cshcMetResourceUsageTable.setDescription('This table contains information regarding Multicast Expansion Table (MET) resource usage and utilization for a switching engine capable of providing this information.')
cshcMetResourceUsageEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 6, 1), ).setIndexNames((0, "ENTITY-MIB", "entPhysicalIndex"), (0, "CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcMetResourceIndex"))
if mibBuilder.loadTexts: cshcMetResourceUsageEntry.setStatus('current')
if mibBuilder.loadTexts: cshcMetResourceUsageEntry.setDescription('Each row contains information of the usage and utilization for a particular MET resource and switching engine, as specified by entPhysicalIndex in ENTITY-MIB.')
cshcMetResourceIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 6, 1, 1), Unsigned32())
if mibBuilder.loadTexts: cshcMetResourceIndex.setStatus('current')
if mibBuilder.loadTexts: cshcMetResourceIndex.setDescription('An arbitrary positive integer value that uniquely identifies a Met resource.')
cshcMetResourceDescr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 6, 1, 2), SnmpAdminString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcMetResourceDescr.setStatus('current')
if mibBuilder.loadTexts: cshcMetResourceDescr.setDescription('This object indicates a description of the MET resource.')
cshcMetResourceUsed = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 6, 1, 3), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcMetResourceUsed.setStatus('current')
if mibBuilder.loadTexts: cshcMetResourceUsed.setDescription('This object indicates the number of MET entries used by this MET resource.')
cshcMetResourceTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 6, 1, 4), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcMetResourceTotal.setStatus('current')
if mibBuilder.loadTexts: cshcMetResourceTotal.setDescription('This object indicates the total number of MET entries available for this MET resource.')
cshcMetResourceMcastGrp = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 6, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcMetResourceMcastGrp.setStatus('current')
if mibBuilder.loadTexts: cshcMetResourceMcastGrp.setDescription('This object indicates the number of the multicast group for this MET resource. A value of -1 indicates that this object is not applicable on this MET feature.')
cshcModuleInterfaceDropsTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 2, 1), )
if mibBuilder.loadTexts: cshcModuleInterfaceDropsTable.setStatus('current')
if mibBuilder.loadTexts: cshcModuleInterfaceDropsTable.setDescription('This table contains interface drops information on each module capable of providing this information.')
cshcModuleInterfaceDropsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 2, 1, 1), ).setIndexNames((0, "ENTITY-MIB", "entPhysicalIndex"))
if mibBuilder.loadTexts: cshcModuleInterfaceDropsEntry.setStatus('current')
if mibBuilder.loadTexts: cshcModuleInterfaceDropsEntry.setDescription('Each row contains management information for dropped traffic on a specific module, identified by the entPhysicalIndex in ENTITY-MIB, and capable of providing this information.')
cshcModTxTotalDroppedPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 2, 1, 1, 1), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcModTxTotalDroppedPackets.setStatus('current')
if mibBuilder.loadTexts: cshcModTxTotalDroppedPackets.setDescription('This object indicates the total dropped outbound packets on all physical interfaces of this module.')
cshcModRxTotalDroppedPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 2, 1, 1, 2), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcModRxTotalDroppedPackets.setStatus('current')
if mibBuilder.loadTexts: cshcModRxTotalDroppedPackets.setDescription('This object indicates the total dropped inbound packets on all physical interfaces of this module.')
cshcModTxTopDropPort = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 2, 1, 1, 3), InterfaceIndexOrZero()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcModTxTopDropPort.setStatus('current')
if mibBuilder.loadTexts: cshcModTxTopDropPort.setDescription('This object indicates the ifIndex value of the interface that has the largest number of total dropped outbound packets among all the physical interfaces on this module. If there were no dropped outbound packets on any physical interfaces of this module, this object has the value 0. If there are multiple physical interfaces of this module having the same largest number of total dropped outbound packets, the ifIndex of the first such interfaces will be assigned to this object.')
cshcModRxTopDropPort = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 2, 1, 1, 4), InterfaceIndexOrZero()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcModRxTopDropPort.setStatus('current')
if mibBuilder.loadTexts: cshcModRxTopDropPort.setDescription('This object indicates the ifIndex value of the interface that has the largest number of total dropped inbound packets among all the physical interfaces of this module. If there were no dropped inbound packets on any physical interfaces of this module, this object has the value 0. If there are multiple physical interfaces of this module having the same largest number of total dropped inbound packets, the ifIndex of the first such interfaces will be assigned to this object.')
cshcModTxTopDropIfIndexList = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 2, 1, 1, 5), CiscoInterfaceIndexList()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcModTxTopDropIfIndexList.setStatus('current')
if mibBuilder.loadTexts: cshcModTxTopDropIfIndexList.setDescription('This object indicates the ifIndex values of the list of interfaces that have the largest number of total dropped outbound packets among all the physical interfaces of this module.')
cshcModRxTopDropIfIndexList = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 2, 1, 1, 6), CiscoInterfaceIndexList()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcModRxTopDropIfIndexList.setStatus('current')
if mibBuilder.loadTexts: cshcModRxTopDropIfIndexList.setDescription('This object indicates the ifIndex values of the list of interfaces that have the largest number of total dropped inbound packets among all the physical interfaces of this module.')
cshcInterfaceBufferTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 2, 2), )
if mibBuilder.loadTexts: cshcInterfaceBufferTable.setStatus('current')
if mibBuilder.loadTexts: cshcInterfaceBufferTable.setDescription('This table contains buffer capacity information for each physical interface capable of providing this information.')
cshcInterfaceBufferEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 2, 2, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"))
if mibBuilder.loadTexts: cshcInterfaceBufferEntry.setStatus('current')
if mibBuilder.loadTexts: cshcInterfaceBufferEntry.setDescription('Each row contains buffer capacity information for a specific physical interface capable of providing this information.')
cshcInterfaceTransmitBufferSize = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 2, 2, 1, 1), Unsigned32()).setUnits('bytes').setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcInterfaceTransmitBufferSize.setStatus('current')
if mibBuilder.loadTexts: cshcInterfaceTransmitBufferSize.setDescription('The aggregate buffer size of all the transmit queues on this interface.')
cshcInterfaceReceiveBufferSize = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 2, 2, 1, 2), Unsigned32()).setUnits('bytes').setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcInterfaceReceiveBufferSize.setStatus('current')
if mibBuilder.loadTexts: cshcInterfaceReceiveBufferSize.setDescription('The aggregate buffer size of all the receive queues on this interface.')
cshcInternalChannelTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 2, 3), )
if mibBuilder.loadTexts: cshcInternalChannelTable.setStatus('current')
if mibBuilder.loadTexts: cshcInternalChannelTable.setDescription('This table contains information for each internal channel interface on each physical entity, such as a module, capable of providing this information.')
cshcInternalChannelEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 2, 3, 1), ).setIndexNames((0, "ENTITY-MIB", "entPhysicalIndex"), (0, "CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcIntlChnlType"))
if mibBuilder.loadTexts: cshcInternalChannelEntry.setStatus('current')
if mibBuilder.loadTexts: cshcInternalChannelEntry.setDescription('Each row contains management information for an internal channel interface of a specific type on a specific physical entity, such as a module, identified by the entPhysicalIndex in ENTITY-MIB, and capable of providing this information.')
cshcIntlChnlType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 2, 3, 1, 1), CshcInternalChannelType())
if mibBuilder.loadTexts: cshcIntlChnlType.setStatus('current')
if mibBuilder.loadTexts: cshcIntlChnlType.setDescription('The type of this internal channel.')
cshcIntlChnlRxPacketRate = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 2, 3, 1, 2), CounterBasedGauge64()).setUnits('packets per second').setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcIntlChnlRxPacketRate.setStatus('current')
if mibBuilder.loadTexts: cshcIntlChnlRxPacketRate.setDescription('Five minute exponentially-decayed moving average of inbound packet rate for this channel.')
cshcIntlChnlRxTotalPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 2, 3, 1, 3), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcIntlChnlRxTotalPackets.setStatus('current')
if mibBuilder.loadTexts: cshcIntlChnlRxTotalPackets.setDescription('The total number of the inbound packets accounted for this channel.')
cshcIntlChnlRxDroppedPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 2, 3, 1, 4), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcIntlChnlRxDroppedPackets.setStatus('current')
if mibBuilder.loadTexts: cshcIntlChnlRxDroppedPackets.setDescription('The number of dropped inbound packets for this channel.')
cshcIntlChnlTxPacketRate = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 2, 3, 1, 5), CounterBasedGauge64()).setUnits('packets per second').setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcIntlChnlTxPacketRate.setStatus('current')
if mibBuilder.loadTexts: cshcIntlChnlTxPacketRate.setDescription('Five minute exponentially-decayed moving average of outbound packet rate for this channel.')
cshcIntlChnlTxTotalPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 2, 3, 1, 6), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcIntlChnlTxTotalPackets.setStatus('current')
if mibBuilder.loadTexts: cshcIntlChnlTxTotalPackets.setDescription('The total number of the outbound packets accounted for this channel.')
cshcIntlChnlTxDroppedPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 2, 3, 1, 7), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcIntlChnlTxDroppedPackets.setStatus('current')
if mibBuilder.loadTexts: cshcIntlChnlTxDroppedPackets.setDescription('The number of dropped outbound packets for this channel.')
cshcCPURateLimiterResourcesTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 3, 1), )
if mibBuilder.loadTexts: cshcCPURateLimiterResourcesTable.setStatus('current')
if mibBuilder.loadTexts: cshcCPURateLimiterResourcesTable.setDescription('This table contains information regarding CPU rate limiters resources.')
cshcCPURateLimiterResourcesEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 3, 1, 1), ).setIndexNames((0, "CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcCPURateLimiterNetworkLayer"))
if mibBuilder.loadTexts: cshcCPURateLimiterResourcesEntry.setStatus('current')
if mibBuilder.loadTexts: cshcCPURateLimiterResourcesEntry.setDescription('Each row contains management information of CPU rate limiter resources for a managed network layer.')
cshcCPURateLimiterNetworkLayer = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 3, 1, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("layer2", 1), ("layer3", 2), ("layer2Input", 3), ("layer2Output", 4))))
if mibBuilder.loadTexts: cshcCPURateLimiterNetworkLayer.setStatus('current')
if mibBuilder.loadTexts: cshcCPURateLimiterNetworkLayer.setDescription("This object indicates the network layer for which the CPU rate limiters are applied. 'layer2' - Layer 2. 'layer3' - Layer 3. 'layer2Input' - Ingress Layer 2. Applicable for devices which support CPU rate limiters on the Ingress Layer 2 traffic. 'layer2Output' - Egress Layer 2. Applicable for devices which support CPU rate limiters on the Egress Layer 2 traffic.")
cshcCPURateLimiterTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 3, 1, 1, 2), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcCPURateLimiterTotal.setStatus('current')
if mibBuilder.loadTexts: cshcCPURateLimiterTotal.setDescription('This object indicates the total number of CPU rate limiters avaiable.')
cshcCPURateLimiterUsed = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 3, 1, 1, 3), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcCPURateLimiterUsed.setStatus('current')
if mibBuilder.loadTexts: cshcCPURateLimiterUsed.setDescription('This object indicates the number of CPU rate limiters that is currently in use.')
cshcCPURateLimiterReserved = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 3, 1, 1, 4), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcCPURateLimiterReserved.setStatus('current')
if mibBuilder.loadTexts: cshcCPURateLimiterReserved.setDescription('This object indicates the number of CPU rate limiters which is reserved by the switching device.')
cshcIcamUtilizationTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 4, 1), )
if mibBuilder.loadTexts: cshcIcamUtilizationTable.setStatus('current')
if mibBuilder.loadTexts: cshcIcamUtilizationTable.setDescription('This table contains information regarding ICAM (Internal Content Addressable Memory) Resource usage and utilization for a switching engine capable of providing this information.')
cshcIcamUtilizationEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 4, 1, 1), ).setIndexNames((0, "ENTITY-MIB", "entPhysicalIndex"))
if mibBuilder.loadTexts: cshcIcamUtilizationEntry.setStatus('current')
if mibBuilder.loadTexts: cshcIcamUtilizationEntry.setDescription('Each row contains management information of ICAM usage and utilization for a switching engine, as specified as specified by entPhysicalIndex in ENTITY-MIB.')
cshcIcamCreated = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 4, 1, 1, 1), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcIcamCreated.setStatus('current')
if mibBuilder.loadTexts: cshcIcamCreated.setDescription('This object indicates the total number of ICAM entries created.')
cshcIcamFailed = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 4, 1, 1, 2), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcIcamFailed.setStatus('current')
if mibBuilder.loadTexts: cshcIcamFailed.setDescription('This object indicates the number of ICAM entries which failed to be created.')
cshcIcamUtilization = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 4, 1, 1, 3), Percent()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcIcamUtilization.setStatus('current')
if mibBuilder.loadTexts: cshcIcamUtilization.setDescription('This object indicates the ICAM utlization in percentage in this switching engine.')
cshcNetflowFlowMaskTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 5, 1), )
if mibBuilder.loadTexts: cshcNetflowFlowMaskTable.setStatus('current')
if mibBuilder.loadTexts: cshcNetflowFlowMaskTable.setDescription('This table contains information regarding Netflow flow mask features supported.')
cshcNetflowFlowMaskEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 5, 1, 1), ).setIndexNames((0, "CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcNetflowFlowMaskAddrType"), (0, "CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcNetflowFlowMaskIndex"))
if mibBuilder.loadTexts: cshcNetflowFlowMaskEntry.setStatus('current')
if mibBuilder.loadTexts: cshcNetflowFlowMaskEntry.setDescription('Each row contains supported feature information of a Netflow flow mask supported by the device.')
cshcNetflowFlowMaskAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 5, 1, 1, 1), InetAddressType())
if mibBuilder.loadTexts: cshcNetflowFlowMaskAddrType.setStatus('current')
if mibBuilder.loadTexts: cshcNetflowFlowMaskAddrType.setDescription('This object indicates Internet address type for this flow mask.')
cshcNetflowFlowMaskIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 5, 1, 1, 2), Unsigned32())
if mibBuilder.loadTexts: cshcNetflowFlowMaskIndex.setStatus('current')
if mibBuilder.loadTexts: cshcNetflowFlowMaskIndex.setDescription('This object indicates the unique flow mask number for a specific Internet address type.')
cshcNetflowFlowMaskType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 5, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37))).clone(namedValues=NamedValues(("null", 1), ("srcOnly", 2), ("destOnly", 3), ("srcDest", 4), ("interfaceSrcDest", 5), ("fullFlow", 6), ("interfaceFullFlow", 7), ("interfaceFullFlowOrFullFlow", 8), ("atleastInterfaceSrcDest", 9), ("atleastFullFlow", 10), ("atleastInterfaceFullFlow", 11), ("atleastSrc", 12), ("atleastDst", 13), ("atleastSrcDst", 14), ("shortest", 15), ("lessThanFullFlow", 16), ("exceptFullFlow", 17), ("exceptInterfaceFullFlow", 18), ("interfaceDest", 19), ("atleastInterfaceDest", 20), ("interfaceSrc", 21), ("atleastInterfaceSrc", 22), ("srcOnlyCR", 23), ("dstOnlyCR", 24), ("fullFlowCR", 25), ("interfaceFullFlowCR", 26), ("max", 27), ("conflict", 28), ("err", 29), ("unused", 30), ("fullFlow1", 31), ("fullFlow2", 32), ("fullFlow3", 33), ("vlanFullFlow1", 34), ("vlanFullFlow2", 35), ("vlanFullFlow3", 36), ("reserved", 37)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcNetflowFlowMaskType.setStatus('current')
if mibBuilder.loadTexts: cshcNetflowFlowMaskType.setDescription('This object indicates the type of flow mask.')
cshcNetflowFlowMaskFeature = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 5, 1, 1, 4), Bits().clone(namedValues=NamedValues(("null", 0), ("ipAcgIngress", 1), ("ipAcgEgress", 2), ("natIngress", 3), ("natEngress", 4), ("natInside", 5), ("pbr", 6), ("cryptoIngress", 7), ("cryptoEgress", 8), ("qos", 9), ("idsIngress", 10), ("tcpIntrcptEgress", 11), ("guardian", 12), ("ipv6AcgIngress", 13), ("ipv6AcgEgress", 14), ("mcastAcgIngress", 15), ("mcastAcgEgress", 16), ("mcastStub", 17), ("mcastUrd", 18), ("ipDsIngress", 19), ("ipDsEgress", 20), ("ipVaclIngress", 21), ("ipVaclEgress", 22), ("macVaclIngress", 23), ("macVaclEgress", 24), ("inspIngress", 25), ("inspEgress", 26), ("authProxy", 27), ("rpf", 28), ("wccpIngress", 29), ("wccpEgress", 30), ("inspDummyIngress", 31), ("inspDummyEgress", 32), ("nbarIngress", 33), ("nbarEgress", 34), ("ipv6Rpf", 35), ("ipv6GlobalDefault", 36), ("dai", 37), ("ipPaclIngress", 38), ("macPaclIngress", 39), ("mplsIcmpBridge", 40), ("ipSlb", 41), ("ipv4Default", 42), ("ipv6Default", 43), ("mplsDefault", 44), ("erSpanTermination", 45), ("ipv6Mcast", 46), ("ipDsL3Ingress", 47), ("ipDsL3Egress", 48), ("cryptoRedirectIngress", 49), ("otherDefault", 50), ("ipRecir", 51), ("iPAdmissionL3Eou", 52), ("iPAdmissionL2Eou", 53), ("iPAdmissionL2EouArp", 54), ("ipAdmissionL2Http", 55), ("ipAdmissionL2HttpArp", 56), ("ipv4L3IntfNde", 57), ("ipv4L2IntfNde", 58), ("ipSguardIngress", 59), ("pvtHostsIngress", 60), ("vrfNatIngress", 61), ("tcpAdjustMssIngress", 62), ("tcpAdjustMssEgress", 63), ("eomIw", 64), ("eomIw2", 65), ("ipv4VrfNdeEgress", 66), ("l1Egress", 67), ("l1Ingress", 68), ("l1GlobalEgress", 69), ("l1GlobalIngress", 70), ("ipDot1xAcl", 71), ("ipDot1xAclArp", 72), ("dot1ad", 73), ("ipSpanPcap", 74), ("ipv6CryptoRedirectIngress", 75), ("svcAcclrtIngress", 76), ("ipv6SvcAcclrtIngress", 77), ("nfAggregation", 78), ("nfSampling", 79), ("ipv6Guardian", 80), ("ipv6Qos", 81), ("none", 82)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcNetflowFlowMaskFeature.setStatus('current')
if mibBuilder.loadTexts: cshcNetflowFlowMaskFeature.setDescription('This object indicates the features supported by this flow mask.')
cshcNetflowResourceUsageTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 6, 1), )
if mibBuilder.loadTexts: cshcNetflowResourceUsageTable.setStatus('current')
if mibBuilder.loadTexts: cshcNetflowResourceUsageTable.setDescription('This table contains information regarding Netflow resource usage and utilization for a switching engine capable of providing this information.')
cshcNetflowResourceUsageEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 6, 1, 1), ).setIndexNames((0, "ENTITY-MIB", "entPhysicalIndex"), (0, "CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcNetflowResourceUsageIndex"))
if mibBuilder.loadTexts: cshcNetflowResourceUsageEntry.setStatus('current')
if mibBuilder.loadTexts: cshcNetflowResourceUsageEntry.setDescription('Each row contains information of the usage and utilization for a particular Netflow resource and switching engine, as specified by entPhysicalIndex in ENTITY-MIB.')
cshcNetflowResourceUsageIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 6, 1, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647)))
if mibBuilder.loadTexts: cshcNetflowResourceUsageIndex.setStatus('current')
if mibBuilder.loadTexts: cshcNetflowResourceUsageIndex.setDescription('An arbitrary positive integer value that uniquely identifies a Netflow resource.')
cshcNetflowResourceUsageDescr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 6, 1, 1, 2), SnmpAdminString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcNetflowResourceUsageDescr.setStatus('current')
if mibBuilder.loadTexts: cshcNetflowResourceUsageDescr.setDescription('This object indicates a description of the Netflow resource.')
cshcNetflowResourceUsageUtil = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 6, 1, 1, 3), Percent()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcNetflowResourceUsageUtil.setStatus('current')
if mibBuilder.loadTexts: cshcNetflowResourceUsageUtil.setDescription('This object indicates the Netflow resource usage in percentage value.')
cshcNetflowResourceUsageUsed = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 6, 1, 1, 4), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcNetflowResourceUsageUsed.setStatus('current')
if mibBuilder.loadTexts: cshcNetflowResourceUsageUsed.setDescription('This object indicates the number of Netflow entries used by this Netflow resource.')
cshcNetflowResourceUsageFree = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 6, 1, 1, 5), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcNetflowResourceUsageFree.setStatus('current')
if mibBuilder.loadTexts: cshcNetflowResourceUsageFree.setDescription('This object indicates the number of Netflow entries available for this Netflow resource.')
cshcNetflowResourceUsageFail = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 6, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(-1, -1), ValueRangeConstraint(0, 2147483647), ))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcNetflowResourceUsageFail.setStatus('current')
if mibBuilder.loadTexts: cshcNetflowResourceUsageFail.setDescription('This object indicates the number of Netflow entries which were failed to be created for this Netflow resource. A value of -1 indicates that this resource does not maintain this counter.')
cshcQosResourceUsageTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 7, 1), )
if mibBuilder.loadTexts: cshcQosResourceUsageTable.setStatus('current')
if mibBuilder.loadTexts: cshcQosResourceUsageTable.setDescription('This table contains QoS capacity per resource type and its usage for each entity capable of providing this information.')
cshcQosResourceUsageEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 7, 1, 1), ).setIndexNames((0, "ENTITY-MIB", "entPhysicalIndex"), (0, "CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcQosResourceType"))
if mibBuilder.loadTexts: cshcQosResourceUsageEntry.setStatus('current')
if mibBuilder.loadTexts: cshcQosResourceUsageEntry.setDescription('Each row contains management information for QoS capacity and its usage on an entity, as specified by entPhysicalIndex in ENTITY-MIB.')
cshcQosResourceType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 7, 1, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("aggregatePolicers", 1), ("distributedPolicers", 2), ("policerProfiles", 3))))
if mibBuilder.loadTexts: cshcQosResourceType.setStatus('current')
if mibBuilder.loadTexts: cshcQosResourceType.setDescription('This object indicates the QoS resource type.')
cshcQosResourceUsed = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 7, 1, 1, 2), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcQosResourceUsed.setStatus('current')
if mibBuilder.loadTexts: cshcQosResourceUsed.setDescription('This object indicates the number of QoS entries that are currently in use.')
cshcQosResourceTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 7, 1, 1, 3), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cshcQosResourceTotal.setStatus('current')
if mibBuilder.loadTexts: cshcQosResourceTotal.setDescription('This object indicates the total number of QoS entries available.')
ciscoSwitchHardwareCapacityMIBCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 1))
ciscoSwitchHardwareCapacityMIBGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 2))
ciscoSwitchHardwareCapacityMIBCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 1, 1)).setObjects(("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcMacUsageGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcVpnCamUsageGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcFibTcamUsageGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcProtocolFibTcamUsageGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcAdjacencyUsageGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcForwardingLoadGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcModuleInterfaceDropsGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcInterfaceBufferGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcInternalChannelGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcCPURateLimiterResourcesGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcIcamResourcesGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcNetflowFlowMaskResourceGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ciscoSwitchHardwareCapacityMIBCompliance = ciscoSwitchHardwareCapacityMIBCompliance.setStatus('deprecated')
if mibBuilder.loadTexts: ciscoSwitchHardwareCapacityMIBCompliance.setDescription('The compliance statement for CISCO-SWITCH-HARDWARE-CAPACITY-MIB. This statement is deprecated and superseded by ciscoSwitchHardwareCapacityMIBCompliance1.')
ciscoSwitchHardwareCapacityMIBCompliance1 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 1, 2)).setObjects(("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcMacUsageGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcVpnCamUsageGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcFibTcamUsageGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcProtocolFibTcamUsageGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcAdjacencyUsageGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcForwardingLoadGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcModuleInterfaceDropsGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcInterfaceBufferGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcInternalChannelGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcCPURateLimiterResourcesGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcIcamResourcesGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcNetflowFlowMaskResourceGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcFibTcamUsageExtGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ciscoSwitchHardwareCapacityMIBCompliance1 = ciscoSwitchHardwareCapacityMIBCompliance1.setStatus('deprecated')
if mibBuilder.loadTexts: ciscoSwitchHardwareCapacityMIBCompliance1.setDescription('The compliance statement for CISCO-SWITCH-HARDWARE-CAPACITY-MIB. This statement is deprecated and superseded by ciscoSwitchHardwareCapacityMIBCompliance2.')
ciscoSwitchHardwareCapacityMIBCompliance2 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 1, 3)).setObjects(("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcMacUsageGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcVpnCamUsageGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcFibTcamUsageGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcProtocolFibTcamUsageGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcAdjacencyUsageGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcForwardingLoadGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcModuleInterfaceDropsGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcInterfaceBufferGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcInternalChannelGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcCPURateLimiterResourcesGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcIcamResourcesGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcNetflowFlowMaskResourceGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcFibTcamUsageExtGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcNetflowFlowResourceUsageGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcMacUsageExtGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcProtocolFibTcamUsageExtGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcAdjacencyResourceUsageGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcQosResourceUsageGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcModTopDropIfIndexListGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcMetResourceUsageGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ciscoSwitchHardwareCapacityMIBCompliance2 = ciscoSwitchHardwareCapacityMIBCompliance2.setStatus('deprecated')
if mibBuilder.loadTexts: ciscoSwitchHardwareCapacityMIBCompliance2.setDescription('The compliance statement for CISCO-SWITCH-HARDWARE-CAPACITY-MIB')
ciscoSwitchHardwareCapacityMIBCompliance3 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 1, 4)).setObjects(("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcMacUsageGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcVpnCamUsageGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcFibTcamUsageGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcProtocolFibTcamUsageGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcAdjacencyUsageGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcForwardingLoadGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcModuleInterfaceDropsGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcInterfaceBufferGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcInternalChannelGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcCPURateLimiterResourcesGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcIcamResourcesGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcNetflowFlowMaskResourceGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcFibTcamUsageExtGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcNetflowFlowResourceUsageGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcMacUsageExtGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcProtocolFibTcamUsageExtGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcAdjacencyResourceUsageGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcQosResourceUsageGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcModTopDropIfIndexListGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcMetResourceUsageGroup"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcProtocolFibTcamWidthTypeGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ciscoSwitchHardwareCapacityMIBCompliance3 = ciscoSwitchHardwareCapacityMIBCompliance3.setStatus('current')
if mibBuilder.loadTexts: ciscoSwitchHardwareCapacityMIBCompliance3.setDescription('The compliance statement for CISCO-SWITCH-HARDWARE-CAPACITY-MIB')
cshcMacUsageGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 2, 1)).setObjects(("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcMacCollisions"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcMacUsed"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcMacTotal"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cshcMacUsageGroup = cshcMacUsageGroup.setStatus('current')
if mibBuilder.loadTexts: cshcMacUsageGroup.setDescription('A collection of objects which provides Layer 2 forwarding hardware capacity information in the device.')
cshcVpnCamUsageGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 2, 2)).setObjects(("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcVpnCamUsed"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcVpnCamTotal"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cshcVpnCamUsageGroup = cshcVpnCamUsageGroup.setStatus('current')
if mibBuilder.loadTexts: cshcVpnCamUsageGroup.setDescription('A collection of objects which provides VPN CAM hardware capacity information in the device.')
cshcFibTcamUsageGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 2, 3)).setObjects(("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshc72bitsFibTcamUsed"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshc72bitsFibTcamTotal"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshc144bitsFibTcamUsed"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshc144bitsFibTcamTotal"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cshcFibTcamUsageGroup = cshcFibTcamUsageGroup.setStatus('current')
if mibBuilder.loadTexts: cshcFibTcamUsageGroup.setDescription('A collection of objects which provides FIB TCAM hardware capacity information in the device.')
cshcProtocolFibTcamUsageGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 2, 4)).setObjects(("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcProtocolFibTcamUsed"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcProtocolFibTcamTotal"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cshcProtocolFibTcamUsageGroup = cshcProtocolFibTcamUsageGroup.setStatus('current')
if mibBuilder.loadTexts: cshcProtocolFibTcamUsageGroup.setDescription('A collection of objects which provides FIB TCAM hardware capacity information in conjunction with Layer 3 protocol in the device.')
cshcAdjacencyUsageGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 2, 5)).setObjects(("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcAdjacencyUsed"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcAdjacencyTotal"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cshcAdjacencyUsageGroup = cshcAdjacencyUsageGroup.setStatus('current')
if mibBuilder.loadTexts: cshcAdjacencyUsageGroup.setDescription('A collection of objects which provides adjacency hardware capacity information in the device.')
cshcForwardingLoadGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 2, 6)).setObjects(("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcForwardingLoadPktRate"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcForwardingLoadPktPeakRate"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcForwardingLoadPktPeakTime"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cshcForwardingLoadGroup = cshcForwardingLoadGroup.setStatus('current')
if mibBuilder.loadTexts: cshcForwardingLoadGroup.setDescription('A collection of objects which provides forwarding load information in the device.')
cshcModuleInterfaceDropsGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 2, 7)).setObjects(("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcModTxTotalDroppedPackets"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcModRxTotalDroppedPackets"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcModTxTopDropPort"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcModRxTopDropPort"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cshcModuleInterfaceDropsGroup = cshcModuleInterfaceDropsGroup.setStatus('current')
if mibBuilder.loadTexts: cshcModuleInterfaceDropsGroup.setDescription('A collection of objects which provides linecard drop traffic information on the device.')
cshcInterfaceBufferGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 2, 8)).setObjects(("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcInterfaceTransmitBufferSize"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcInterfaceReceiveBufferSize"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cshcInterfaceBufferGroup = cshcInterfaceBufferGroup.setStatus('current')
if mibBuilder.loadTexts: cshcInterfaceBufferGroup.setDescription('A collection of objects which provides interface buffer information on the device.')
cshcInternalChannelGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 2, 9)).setObjects(("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcIntlChnlRxPacketRate"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcIntlChnlRxTotalPackets"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcIntlChnlRxDroppedPackets"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcIntlChnlTxPacketRate"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcIntlChnlTxTotalPackets"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcIntlChnlTxDroppedPackets"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cshcInternalChannelGroup = cshcInternalChannelGroup.setStatus('current')
if mibBuilder.loadTexts: cshcInternalChannelGroup.setDescription('A collection of objects which provides internal channel information on the device.')
cshcCPURateLimiterResourcesGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 2, 10)).setObjects(("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcCPURateLimiterTotal"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcCPURateLimiterUsed"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcCPURateLimiterReserved"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cshcCPURateLimiterResourcesGroup = cshcCPURateLimiterResourcesGroup.setStatus('current')
if mibBuilder.loadTexts: cshcCPURateLimiterResourcesGroup.setDescription('A collection of objects which provides CPU rate limiter resource in the device.')
cshcIcamResourcesGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 2, 11)).setObjects(("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcIcamCreated"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcIcamFailed"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcIcamUtilization"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cshcIcamResourcesGroup = cshcIcamResourcesGroup.setStatus('current')
if mibBuilder.loadTexts: cshcIcamResourcesGroup.setDescription('A collection of objects which provides ICAM resources information in the device.')
cshcNetflowFlowMaskResourceGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 2, 12)).setObjects(("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcNetflowFlowMaskType"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcNetflowFlowMaskFeature"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cshcNetflowFlowMaskResourceGroup = cshcNetflowFlowMaskResourceGroup.setStatus('current')
if mibBuilder.loadTexts: cshcNetflowFlowMaskResourceGroup.setDescription('A collection of objects which provides Netflow FlowMask information in the device.')
cshcFibTcamUsageExtGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 2, 13)).setObjects(("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshc288bitsFibTcamUsed"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshc288bitsFibTcamTotal"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cshcFibTcamUsageExtGroup = cshcFibTcamUsageExtGroup.setStatus('current')
if mibBuilder.loadTexts: cshcFibTcamUsageExtGroup.setDescription('A collection of objects which provides additional FIB TCAM hardware capacity information in the device.')
cshcNetflowFlowResourceUsageGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 2, 14)).setObjects(("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcNetflowResourceUsageDescr"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcNetflowResourceUsageUtil"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcNetflowResourceUsageUsed"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcNetflowResourceUsageFree"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcNetflowResourceUsageFail"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cshcNetflowFlowResourceUsageGroup = cshcNetflowFlowResourceUsageGroup.setStatus('current')
if mibBuilder.loadTexts: cshcNetflowFlowResourceUsageGroup.setDescription('A collection of objects which provides Netflow resource usage information in the device.')
cshcMacUsageExtGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 2, 15)).setObjects(("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcMacMcast"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcMacUcast"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcMacLines"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcMacLinesFull"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cshcMacUsageExtGroup = cshcMacUsageExtGroup.setStatus('current')
if mibBuilder.loadTexts: cshcMacUsageExtGroup.setDescription('A collection of objects which provides additional Layer 2 forwarding hardware capacity information in the device.')
cshcProtocolFibTcamUsageExtGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 2, 16)).setObjects(("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcProtocolFibTcamLogicalUsed"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcProtocolFibTcamLogicalTotal"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cshcProtocolFibTcamUsageExtGroup = cshcProtocolFibTcamUsageExtGroup.setStatus('current')
if mibBuilder.loadTexts: cshcProtocolFibTcamUsageExtGroup.setDescription('A collection of objects which provides additional FIB TCAM hardware capacity information in conjunction with Layer 3 protocol in the device.')
cshcAdjacencyResourceUsageGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 2, 17)).setObjects(("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcAdjacencyResourceDescr"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcAdjacencyResourceUsed"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcAdjacencyResourceTotal"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cshcAdjacencyResourceUsageGroup = cshcAdjacencyResourceUsageGroup.setStatus('current')
if mibBuilder.loadTexts: cshcAdjacencyResourceUsageGroup.setDescription('A collection of objects which provides adjacency hardware capacity information per resource in the device.')
cshcQosResourceUsageGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 2, 18)).setObjects(("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcQosResourceUsed"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcQosResourceTotal"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cshcQosResourceUsageGroup = cshcQosResourceUsageGroup.setStatus('current')
if mibBuilder.loadTexts: cshcQosResourceUsageGroup.setDescription('A collection of objects which provides QoS hardware capacity information per resource in the device.')
cshcModTopDropIfIndexListGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 2, 19)).setObjects(("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcModTxTopDropIfIndexList"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcModRxTopDropIfIndexList"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cshcModTopDropIfIndexListGroup = cshcModTopDropIfIndexListGroup.setStatus('current')
if mibBuilder.loadTexts: cshcModTopDropIfIndexListGroup.setDescription('A collection of objects which provides information on multiple interfaces with largest number of drop traffic on a module.')
cshcMetResourceUsageGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 2, 20)).setObjects(("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcMetResourceDescr"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcMetResourceUsed"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcMetResourceTotal"), ("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcMetResourceMcastGrp"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cshcMetResourceUsageGroup = cshcMetResourceUsageGroup.setStatus('current')
if mibBuilder.loadTexts: cshcMetResourceUsageGroup.setDescription('A collection of objects which provides MET hardware capacity information per resource in the device.')
cshcProtocolFibTcamWidthTypeGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 2, 21)).setObjects(("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", "cshcProtocolFibTcamWidthType"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cshcProtocolFibTcamWidthTypeGroup = cshcProtocolFibTcamWidthTypeGroup.setStatus('current')
if mibBuilder.loadTexts: cshcProtocolFibTcamWidthTypeGroup.setDescription('A collection of objects which provides FIB TCAM entry width information in conjunction with Layer 3 protocol in the device.')
mibBuilder.exportSymbols("CISCO-SWITCH-HARDWARE-CAPACITY-MIB", cshcAdjacencyTotal=cshcAdjacencyTotal, cshcNetflowResourceUsageFail=cshcNetflowResourceUsageFail, cshcForwardingLoadEntry=cshcForwardingLoadEntry, cshcProtocolFibTcamWidthType=cshcProtocolFibTcamWidthType, cshcInterfaceTransmitBufferSize=cshcInterfaceTransmitBufferSize, cshcIcamCreated=cshcIcamCreated, cshcForwarding=cshcForwarding, cshcNetflowFlowMaskEntry=cshcNetflowFlowMaskEntry, cshcNetflowResourceUsageEntry=cshcNetflowResourceUsageEntry, cshcAdjacencyUsageGroup=cshcAdjacencyUsageGroup, cshcAdjacencyResourceIndex=cshcAdjacencyResourceIndex, cshcInterfaceBufferEntry=cshcInterfaceBufferEntry, cshcCPURateLimiterResourcesGroup=cshcCPURateLimiterResourcesGroup, cshcIcamUtilization=cshcIcamUtilization, cshcForwardingLoadPktRate=cshcForwardingLoadPktRate, cshcNetflowFlowMaskResourceGroup=cshcNetflowFlowMaskResourceGroup, cshcIntlChnlTxTotalPackets=cshcIntlChnlTxTotalPackets, ciscoSwitchHardwareCapacityMIBCompliance3=ciscoSwitchHardwareCapacityMIBCompliance3, cshcCPURateLimiterTotal=cshcCPURateLimiterTotal, cshcNetflowFlowMaskResources=cshcNetflowFlowMaskResources, cshcVpnCamUsed=cshcVpnCamUsed, ciscoSwitchHardwareCapacityMIBObjects=ciscoSwitchHardwareCapacityMIBObjects, cshcMetResourceDescr=cshcMetResourceDescr, cshcQosResourceUsed=cshcQosResourceUsed, ciscoSwitchHardwareCapacityMIBCompliance2=ciscoSwitchHardwareCapacityMIBCompliance2, cshcInterfaceBufferGroup=cshcInterfaceBufferGroup, PYSNMP_MODULE_ID=ciscoSwitchHardwareCapacityMIB, cshcMetResourceMcastGrp=cshcMetResourceMcastGrp, cshc288bitsFibTcamTotal=cshc288bitsFibTcamTotal, cshcModuleInterfaceDropsEntry=cshcModuleInterfaceDropsEntry, cshcInterface=cshcInterface, cshcAdjacencyUsageEntry=cshcAdjacencyUsageEntry, cshcInterfaceBufferTable=cshcInterfaceBufferTable, cshcL3Forwarding=cshcL3Forwarding, cshcNetflowFlowResourceUsageGroup=cshcNetflowFlowResourceUsageGroup, cshcProtocolFibTcamTotal=cshcProtocolFibTcamTotal, cshcProtocolFibTcamUsageTable=cshcProtocolFibTcamUsageTable, cshcModTxTotalDroppedPackets=cshcModTxTotalDroppedPackets, cshcMetResourceIndex=cshcMetResourceIndex, cshcFibTcamUsageGroup=cshcFibTcamUsageGroup, cshcAdjacencyResourceUsageTable=cshcAdjacencyResourceUsageTable, ciscoSwitchHardwareCapacityMIBGroups=ciscoSwitchHardwareCapacityMIBGroups, cshcNetflowFlowMaskAddrType=cshcNetflowFlowMaskAddrType, cshcMacUsageTable=cshcMacUsageTable, cshcInternalChannelEntry=cshcInternalChannelEntry, cshc144bitsFibTcamTotal=cshc144bitsFibTcamTotal, cshc72bitsFibTcamTotal=cshc72bitsFibTcamTotal, cshcModTxTopDropIfIndexList=cshcModTxTopDropIfIndexList, cshcMetResourceUsed=cshcMetResourceUsed, ciscoSwitchHardwareCapacityMIBNotifs=ciscoSwitchHardwareCapacityMIBNotifs, cshcAdjacencyUsageTable=cshcAdjacencyUsageTable, cshcIntlChnlRxPacketRate=cshcIntlChnlRxPacketRate, cshcAdjacencyUsed=cshcAdjacencyUsed, cshcAdjacencyResourceUsageEntry=cshcAdjacencyResourceUsageEntry, cshcVpnCamUsageEntry=cshcVpnCamUsageEntry, cshcForwardingLoadTable=cshcForwardingLoadTable, cshcQosResourceUsage=cshcQosResourceUsage, cshcProtocolFibTcamUsageEntry=cshcProtocolFibTcamUsageEntry, cshcForwardingLoadPktPeakRate=cshcForwardingLoadPktPeakRate, cshcCPURateLimiterResourcesTable=cshcCPURateLimiterResourcesTable, cshcCPURateLimiterNetworkLayer=cshcCPURateLimiterNetworkLayer, cshcModTopDropIfIndexListGroup=cshcModTopDropIfIndexListGroup, cshcVpnCamTotal=cshcVpnCamTotal, cshcMetResourceUsageEntry=cshcMetResourceUsageEntry, cshcAdjacencyResourceUsageGroup=cshcAdjacencyResourceUsageGroup, cshcCPURateLimiterResourcesEntry=cshcCPURateLimiterResourcesEntry, CshcInternalChannelType=CshcInternalChannelType, cshcAdjacencyResourceUsed=cshcAdjacencyResourceUsed, cshcForwardingLoadGroup=cshcForwardingLoadGroup, cshcIntlChnlTxPacketRate=cshcIntlChnlTxPacketRate, cshc72bitsFibTcamUsed=cshc72bitsFibTcamUsed, cshcModTxTopDropPort=cshcModTxTopDropPort, cshcModRxTopDropPort=cshcModRxTopDropPort, cshcForwardingLoadPktPeakTime=cshcForwardingLoadPktPeakTime, cshcMacUsageEntry=cshcMacUsageEntry, ciscoSwitchHardwareCapacityMIBConformance=ciscoSwitchHardwareCapacityMIBConformance, cshcQosResourceTotal=cshcQosResourceTotal, cshcNetflowResourceUsageUtil=cshcNetflowResourceUsageUtil, cshcFibTcamUsageExtGroup=cshcFibTcamUsageExtGroup, cshcIcamUtilizationEntry=cshcIcamUtilizationEntry, cshcVpnCamUsageTable=cshcVpnCamUsageTable, cshcMacUcast=cshcMacUcast, cshcMacUsageGroup=cshcMacUsageGroup, cshcIntlChnlType=cshcIntlChnlType, cshcIcamResources=cshcIcamResources, cshcMacLines=cshcMacLines, cshcMacCollisions=cshcMacCollisions, cshc288bitsFibTcamUsed=cshc288bitsFibTcamUsed, cshcIntlChnlRxDroppedPackets=cshcIntlChnlRxDroppedPackets, cshcProtocolFibTcamUsageGroup=cshcProtocolFibTcamUsageGroup, cshcAdjacencyResourceDescr=cshcAdjacencyResourceDescr, cshcModRxTopDropIfIndexList=cshcModRxTopDropIfIndexList, cshcNetflowFlowMaskTable=cshcNetflowFlowMaskTable, cshcNetflowResourceUsageUsed=cshcNetflowResourceUsageUsed, cshcNetflowFlowMaskIndex=cshcNetflowFlowMaskIndex, cshcProtocolFibTcamUsed=cshcProtocolFibTcamUsed, cshcProtocolFibTcamWidthTypeGroup=cshcProtocolFibTcamWidthTypeGroup, cshcMacUsageExtGroup=cshcMacUsageExtGroup, cshcInterfaceReceiveBufferSize=cshcInterfaceReceiveBufferSize, cshcNetflowResourceUsageIndex=cshcNetflowResourceUsageIndex, cshcQosResourceUsageTable=cshcQosResourceUsageTable, cshcQosResourceUsageEntry=cshcQosResourceUsageEntry, cshcIntlChnlRxTotalPackets=cshcIntlChnlRxTotalPackets, ciscoSwitchHardwareCapacityMIBCompliance1=ciscoSwitchHardwareCapacityMIBCompliance1, ciscoSwitchHardwareCapacityMIBCompliance=ciscoSwitchHardwareCapacityMIBCompliance, cshcInternalChannelGroup=cshcInternalChannelGroup, cshcModuleInterfaceDropsTable=cshcModuleInterfaceDropsTable, cshcVpnCamUsageGroup=cshcVpnCamUsageGroup, cshcFibTcamUsageTable=cshcFibTcamUsageTable, cshcL2Forwarding=cshcL2Forwarding, cshcFibTcamUsageEntry=cshcFibTcamUsageEntry, cshcMacMcast=cshcMacMcast, cshcIcamResourcesGroup=cshcIcamResourcesGroup, cshcModuleInterfaceDropsGroup=cshcModuleInterfaceDropsGroup, cshcCPURateLimiterUsed=cshcCPURateLimiterUsed, cshcProtocolFibTcamProtocol=cshcProtocolFibTcamProtocol, cshcMetResourceUsageGroup=cshcMetResourceUsageGroup, cshcIcamFailed=cshcIcamFailed, ciscoSwitchHardwareCapacityMIB=ciscoSwitchHardwareCapacityMIB, cshcNetflowResourceUsage=cshcNetflowResourceUsage, cshcMacTotal=cshcMacTotal, cshcCPURateLimiterReserved=cshcCPURateLimiterReserved, cshcQosResourceUsageGroup=cshcQosResourceUsageGroup, cshcMetResourceTotal=cshcMetResourceTotal, cshcMacUsed=cshcMacUsed, cshcInternalChannelTable=cshcInternalChannelTable, cshcNetflowResourceUsageTable=cshcNetflowResourceUsageTable, cshcQosResourceType=cshcQosResourceType, ciscoSwitchHardwareCapacityMIBCompliances=ciscoSwitchHardwareCapacityMIBCompliances, cshcNetflowResourceUsageFree=cshcNetflowResourceUsageFree, cshc144bitsFibTcamUsed=cshc144bitsFibTcamUsed, cshcNetflowResourceUsageDescr=cshcNetflowResourceUsageDescr, cshcModRxTotalDroppedPackets=cshcModRxTotalDroppedPackets, cshcAdjacencyResourceTotal=cshcAdjacencyResourceTotal, cshcProtocolFibTcamLogicalUsed=cshcProtocolFibTcamLogicalUsed, cshcIntlChnlTxDroppedPackets=cshcIntlChnlTxDroppedPackets, cshcIcamUtilizationTable=cshcIcamUtilizationTable, cshcCPURateLimiterResources=cshcCPURateLimiterResources, cshcNetflowFlowMaskFeature=cshcNetflowFlowMaskFeature, cshcProtocolFibTcamUsageExtGroup=cshcProtocolFibTcamUsageExtGroup, cshcMacLinesFull=cshcMacLinesFull, cshcProtocolFibTcamLogicalTotal=cshcProtocolFibTcamLogicalTotal, cshcMetResourceUsageTable=cshcMetResourceUsageTable, cshcNetflowFlowMaskType=cshcNetflowFlowMaskType)
| (integer, object_identifier, octet_string) = mibBuilder.importSymbols('ASN1', 'Integer', 'ObjectIdentifier', 'OctetString')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(single_value_constraint, value_size_constraint, value_range_constraint, constraints_union, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'SingleValueConstraint', 'ValueSizeConstraint', 'ValueRangeConstraint', 'ConstraintsUnion', 'ConstraintsIntersection')
(percent,) = mibBuilder.importSymbols('CISCO-QOS-PIB-MIB', 'Percent')
(cisco_mgmt,) = mibBuilder.importSymbols('CISCO-SMI', 'ciscoMgmt')
(cisco_interface_index_list,) = mibBuilder.importSymbols('CISCO-TC', 'CiscoInterfaceIndexList')
(ent_physical_index,) = mibBuilder.importSymbols('ENTITY-MIB', 'entPhysicalIndex')
(counter_based_gauge64,) = mibBuilder.importSymbols('HCNUM-TC', 'CounterBasedGauge64')
(interface_index_or_zero, if_index) = mibBuilder.importSymbols('IF-MIB', 'InterfaceIndexOrZero', 'ifIndex')
(inet_address_type,) = mibBuilder.importSymbols('INET-ADDRESS-MIB', 'InetAddressType')
(snmp_admin_string,) = mibBuilder.importSymbols('SNMP-FRAMEWORK-MIB', 'SnmpAdminString')
(module_compliance, object_group, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'ObjectGroup', 'NotificationGroup')
(notification_type, time_ticks, ip_address, object_identity, mib_identifier, module_identity, counter32, integer32, gauge32, unsigned32, counter64, iso, mib_scalar, mib_table, mib_table_row, mib_table_column, bits) = mibBuilder.importSymbols('SNMPv2-SMI', 'NotificationType', 'TimeTicks', 'IpAddress', 'ObjectIdentity', 'MibIdentifier', 'ModuleIdentity', 'Counter32', 'Integer32', 'Gauge32', 'Unsigned32', 'Counter64', 'iso', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Bits')
(display_string, textual_convention, date_and_time) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention', 'DateAndTime')
cisco_switch_hardware_capacity_mib = module_identity((1, 3, 6, 1, 4, 1, 9, 9, 663))
ciscoSwitchHardwareCapacityMIB.setRevisions(('2014-09-16 00:00', '2014-01-24 00:00', '2013-05-08 00:00', '2010-11-22 00:00', '2008-07-02 00:00'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts:
ciscoSwitchHardwareCapacityMIB.setRevisionsDescriptions(('Added the following enumerations for object cshcProtocolFibTcamProtocol - allProtocols(14) Updated the description of cshcProtocolFibTcamTotal and cshcProtocolFibTcamLogicalTotal.', 'Added following OBJECT-GROUP - cshcProtocolFibTcamWidthTypeGroup Added the following enumerations for object cshcProtocolFibTcamProtocol - mplsVpn(11) - fcMpls(12) - ipv6LocalLink(13) Added new compliance - ciscoSwitchHardwareCapacityMIBCompliance3', 'Added following OBJECT-GROUP - cshcNetflowFlowResourceUsageGroup - cshcMacUsageExtGroup - cshcProtocolFibTcamUsageExtGroup - cshcAdjacencyResourceUsageGroup - cshcQosResourceUsageGroup - cshcModTopDropIfIndexListGroup - cshcMetResourceUsageGroup Added the following enumerations for object cshcProtocolFibTcamProtocol - l2VpnPeer(7) - l2VpnIpv4Multicast(8) - l2VpnIpv6Multicast(9) Added new compliance - ciscoSwitchHardwareCapacityMIBCompliance2', 'Add the following new enumerations to cshcCPURateLimiterNetworkLayer: layer2Input(3) and layer2Output(4). Add cshcFibTcamUsageExtGroup.', 'Initial revision of this MIB module.'))
if mibBuilder.loadTexts:
ciscoSwitchHardwareCapacityMIB.setLastUpdated('201409160000Z')
if mibBuilder.loadTexts:
ciscoSwitchHardwareCapacityMIB.setOrganization('Cisco Systems, Inc.')
if mibBuilder.loadTexts:
ciscoSwitchHardwareCapacityMIB.setContactInfo('Cisco Systems Customer Service Postal: 170 W Tasman Drive San Jose, CA 95134 USA Tel: +1 800 553-NETS E-mail: cs-lan-switch-snmp@cisco.com')
if mibBuilder.loadTexts:
ciscoSwitchHardwareCapacityMIB.setDescription('This MIB module defines the managed objects for hardware capacity of Cisco switching devices. The hardware capacity information covers the following but not limited to features: forwarding, rate-limiter ... The following terms are used throughout the MIB: CAM: Content Addressable Memory. TCAM: Ternary Content Addressable Memory. FIB: Forwarding Information Base. VPN: Virtual Private Network. QoS: Quality of Service. CPU rate-limiter: Mechanism to rate-limit or restrict undesired traffic to the CPU. MPLS: Multiprotocol Label Switching.')
cisco_switch_hardware_capacity_mib_notifs = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 663, 0))
cisco_switch_hardware_capacity_mib_objects = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 663, 1))
cisco_switch_hardware_capacity_mib_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 663, 2))
cshc_forwarding = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1))
cshc_interface = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 2))
cshc_cpu_rate_limiter_resources = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 3))
cshc_icam_resources = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 4))
cshc_netflow_flow_mask_resources = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 5))
cshc_netflow_resource_usage = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 6))
cshc_qos_resource_usage = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 7))
class Cshcinternalchanneltype(TextualConvention, Integer32):
description = 'An enumerated value indicating the type of an internal channel. eobc - ethernet out-of-band channel. ibc - in-band channel.'
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2))
named_values = named_values(('eobc', 1), ('ibc', 2))
cshc_l2_forwarding = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 1))
cshc_mac_usage_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 1, 1))
if mibBuilder.loadTexts:
cshcMacUsageTable.setStatus('current')
if mibBuilder.loadTexts:
cshcMacUsageTable.setDescription('This table contains MAC table capacity for each switching engine, as specified by entPhysicalIndex in ENTITY-MIB, capable of providing this information.')
cshc_mac_usage_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 1, 1, 1)).setIndexNames((0, 'ENTITY-MIB', 'entPhysicalIndex'))
if mibBuilder.loadTexts:
cshcMacUsageEntry.setStatus('current')
if mibBuilder.loadTexts:
cshcMacUsageEntry.setDescription('Each row contains management information for MAC table hardware capacity on a switching engine.')
cshc_mac_collisions = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 1, 1, 1, 1), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcMacCollisions.setStatus('current')
if mibBuilder.loadTexts:
cshcMacCollisions.setDescription('This object indicates the number of Ethernet frames whose source MAC address the switching engine failed to learn while constructing its MAC table.')
cshc_mac_used = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 1, 1, 1, 2), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcMacUsed.setStatus('current')
if mibBuilder.loadTexts:
cshcMacUsed.setDescription('This object indicates the number of MAC table entries that are currently in use for this switching engine.')
cshc_mac_total = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 1, 1, 1, 3), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcMacTotal.setStatus('current')
if mibBuilder.loadTexts:
cshcMacTotal.setDescription('This object indicates the total number of MAC table entries available for this switching engine.')
cshc_mac_mcast = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 1, 1, 1, 4), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcMacMcast.setStatus('current')
if mibBuilder.loadTexts:
cshcMacMcast.setDescription('This object indicates the total number of multicast MAC table entries on this switching engine.')
cshc_mac_ucast = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 1, 1, 1, 5), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcMacUcast.setStatus('current')
if mibBuilder.loadTexts:
cshcMacUcast.setDescription('This object indicates the total number of unicast MAC table entries on this switching engine.')
cshc_mac_lines = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 1, 1, 1, 6), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcMacLines.setStatus('current')
if mibBuilder.loadTexts:
cshcMacLines.setDescription('This object indicates the total number of MAC table lines on this switching engine. The MAC table is organized as multiple MAC entries per line.')
cshc_mac_lines_full = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 1, 1, 1, 7), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcMacLinesFull.setStatus('current')
if mibBuilder.loadTexts:
cshcMacLinesFull.setDescription('This object indicates the total number of MAC table lines full on this switching engine. A line full means all the MAC entries on the line are occupied.')
cshc_vpn_cam_usage_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 1, 2))
if mibBuilder.loadTexts:
cshcVpnCamUsageTable.setStatus('current')
if mibBuilder.loadTexts:
cshcVpnCamUsageTable.setDescription('This table contains VPN CAM capacity for each entity, as specified by entPhysicalIndex in ENTITY-MIB, capable of providing this information.')
cshc_vpn_cam_usage_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 1, 2, 1)).setIndexNames((0, 'ENTITY-MIB', 'entPhysicalIndex'))
if mibBuilder.loadTexts:
cshcVpnCamUsageEntry.setStatus('current')
if mibBuilder.loadTexts:
cshcVpnCamUsageEntry.setDescription('Each row contains management information for VPN CAM hardware capacity on an entity.')
cshc_vpn_cam_used = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 1, 2, 1, 1), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcVpnCamUsed.setStatus('current')
if mibBuilder.loadTexts:
cshcVpnCamUsed.setDescription('This object indicates the number of VPN CAM entries that are currently in use.')
cshc_vpn_cam_total = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 1, 2, 1, 2), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcVpnCamTotal.setStatus('current')
if mibBuilder.loadTexts:
cshcVpnCamTotal.setDescription('This object indicates the total number of VPN CAM entries.')
cshc_l3_forwarding = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2))
cshc_fib_tcam_usage_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 1))
if mibBuilder.loadTexts:
cshcFibTcamUsageTable.setStatus('current')
if mibBuilder.loadTexts:
cshcFibTcamUsageTable.setDescription('This table contains FIB TCAM capacity for each entity, as specified by entPhysicalIndex in ENTITY-MIB, capable of providing this information.')
cshc_fib_tcam_usage_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 1, 1)).setIndexNames((0, 'ENTITY-MIB', 'entPhysicalIndex'))
if mibBuilder.loadTexts:
cshcFibTcamUsageEntry.setStatus('current')
if mibBuilder.loadTexts:
cshcFibTcamUsageEntry.setDescription('Each row contains management information for FIB TCAM hardware capacity on an entity.')
cshc72bits_fib_tcam_used = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 1, 1, 1), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshc72bitsFibTcamUsed.setStatus('current')
if mibBuilder.loadTexts:
cshc72bitsFibTcamUsed.setDescription('This object indicates the number of 72 bits FIB TCAM entries that are currently in use.')
cshc72bits_fib_tcam_total = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 1, 1, 2), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshc72bitsFibTcamTotal.setStatus('current')
if mibBuilder.loadTexts:
cshc72bitsFibTcamTotal.setDescription('This object indicates the total number of 72 bits FIB TCAM entries available.')
cshc144bits_fib_tcam_used = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 1, 1, 3), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshc144bitsFibTcamUsed.setStatus('current')
if mibBuilder.loadTexts:
cshc144bitsFibTcamUsed.setDescription('This object indicates the number of 144 bits FIB TCAM entries that are currently in use.')
cshc144bits_fib_tcam_total = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 1, 1, 4), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshc144bitsFibTcamTotal.setStatus('current')
if mibBuilder.loadTexts:
cshc144bitsFibTcamTotal.setDescription('This object indicates the total number of 144 bits FIB TCAM entries available.')
cshc288bits_fib_tcam_used = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 1, 1, 5), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshc288bitsFibTcamUsed.setStatus('current')
if mibBuilder.loadTexts:
cshc288bitsFibTcamUsed.setDescription('This object indicates the number of 288 bits FIB TCAM entries that are currently in use.')
cshc288bits_fib_tcam_total = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 1, 1, 6), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshc288bitsFibTcamTotal.setStatus('current')
if mibBuilder.loadTexts:
cshc288bitsFibTcamTotal.setDescription('This object indicates the total number of 288 bits FIB TCAM entries available.')
cshc_protocol_fib_tcam_usage_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 2))
if mibBuilder.loadTexts:
cshcProtocolFibTcamUsageTable.setStatus('current')
if mibBuilder.loadTexts:
cshcProtocolFibTcamUsageTable.setDescription('This table contains FIB TCAM usage per specified Layer 3 protocol on an entity capable of providing this information.')
cshc_protocol_fib_tcam_usage_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 2, 1)).setIndexNames((0, 'ENTITY-MIB', 'entPhysicalIndex'), (0, 'CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcProtocolFibTcamProtocol'))
if mibBuilder.loadTexts:
cshcProtocolFibTcamUsageEntry.setStatus('current')
if mibBuilder.loadTexts:
cshcProtocolFibTcamUsageEntry.setDescription('Each row contains management information for FIB TCAM usage for the specific Layer 3 protocol on an entity as specified by the entPhysicalIndex in ENTITY-MIB.')
cshc_protocol_fib_tcam_protocol = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 2, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14))).clone(namedValues=named_values(('ipv4', 1), ('mpls', 2), ('eom', 3), ('ipv6', 4), ('ipv4Multicast', 5), ('ipv6Multicast', 6), ('l2VpnPeer', 7), ('l2VpnIpv4Multicast', 8), ('l2VpnIpv6Multicast', 9), ('fcoe', 10), ('mplsVpn', 11), ('fcMpls', 12), ('ipv6LocalLink', 13), ('allProtocols', 14))))
if mibBuilder.loadTexts:
cshcProtocolFibTcamProtocol.setStatus('current')
if mibBuilder.loadTexts:
cshcProtocolFibTcamProtocol.setDescription("This object indicates the Layer 3 protocol utilizing FIB TCAM resource. 'ipv4' - indicates Internet Protocol version 4. 'mpls' - indicates Multiprotocol Label Switching. 'eom' - indicates Ethernet over MPLS. 'ipv6' - indicates Internet Protocol version 6. 'ipv4Multicast' - indicates Internet Protocol version 4 for multicast traffic. 'ipv6Multicast' - indicates Internet Protocol version 6 for multicast traffic. 'l2VpnPeer' - indicates Layer 2 VPN Peer traffic. 'l2VpnIpv4Multicast' - indicates Internet Protocol version 4 for multicast traffic on Layer 2 VPN. 'l2VpnIpv6Multicast' - indicates Internet Protocol version 6 for multicast traffic on Layer 2 VPN. 'fcoe' - indicates Fibre Channel over Ethernet. 'mplsVpn' - indicates MPLS Layer 3 VPN aggregate labels. 'fcMpls' - indicates Fibre Channel over MPLS tunnels. 'ipv6LocalLink' - indicates Internet Protocol version 6 Local Link. 'allProtocols' - indicates all protocols within the entPhysicalIndex.")
cshc_protocol_fib_tcam_used = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 2, 1, 2), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcProtocolFibTcamUsed.setStatus('current')
if mibBuilder.loadTexts:
cshcProtocolFibTcamUsed.setDescription('This object indicates the number of FIB TCAM entries that are currently in use for the protocol denoted by cshcProtocolFibTcamProtocol.')
cshc_protocol_fib_tcam_total = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 2, 1, 3), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcProtocolFibTcamTotal.setStatus('current')
if mibBuilder.loadTexts:
cshcProtocolFibTcamTotal.setDescription('This object indicates the total number of FIB TCAM entries are currently allocated for the protocol denoted by cshcProtocolFibTcamProtocol. A value of zero indicates that the total number of FIB TCAM for the protocol denoted by cshcProtocolFibTcamProtocol is not available.')
cshc_protocol_fib_tcam_logical_used = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 2, 1, 4), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcProtocolFibTcamLogicalUsed.setStatus('current')
if mibBuilder.loadTexts:
cshcProtocolFibTcamLogicalUsed.setDescription('This object indicates the number of logical FIB TCAM entries that are currently in use for the protocol denoted by cshcProtocolFibTcamProtocol.')
cshc_protocol_fib_tcam_logical_total = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 2, 1, 5), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcProtocolFibTcamLogicalTotal.setStatus('current')
if mibBuilder.loadTexts:
cshcProtocolFibTcamLogicalTotal.setDescription('This object indicates the total number of logical FIB TCAM entries that are currently allocated for the protocol denoted by cshcProtocolFibTcamProtocol. A value of zero indicates that the total number of logical FIB TCAM for the protocol denoted by cshcProtocolFibTcamProtocol is not available.')
cshc_protocol_fib_tcam_width_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 2, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('singleWidth', 1), ('doubleWidth', 2), ('quadWidth', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcProtocolFibTcamWidthType.setStatus('current')
if mibBuilder.loadTexts:
cshcProtocolFibTcamWidthType.setDescription("This object indicates the entry width type for the protocol denoted by cshcProtocolFibTcamProtocol. 'singleWidth' - indicates each logical entry is using one physical entry. 'doubleWidth' - indicates each logical entry is using two physical entries. 'quadWidth' - indicates each logical entry is using four physical entries.")
cshc_adjacency_usage_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 3))
if mibBuilder.loadTexts:
cshcAdjacencyUsageTable.setStatus('current')
if mibBuilder.loadTexts:
cshcAdjacencyUsageTable.setDescription('This table contains adjacency capacity for each entity capable of providing this information.')
cshc_adjacency_usage_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 3, 1)).setIndexNames((0, 'ENTITY-MIB', 'entPhysicalIndex'))
if mibBuilder.loadTexts:
cshcAdjacencyUsageEntry.setStatus('current')
if mibBuilder.loadTexts:
cshcAdjacencyUsageEntry.setDescription('Each row contains management information for adjacency hardware capacity on an entity, as specified by entPhysicalIndex in ENTITY-MIB.')
cshc_adjacency_used = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 3, 1, 1), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcAdjacencyUsed.setStatus('current')
if mibBuilder.loadTexts:
cshcAdjacencyUsed.setDescription('This object indicates the number of adjacency entries that are currently in use.')
cshc_adjacency_total = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 3, 1, 2), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcAdjacencyTotal.setStatus('current')
if mibBuilder.loadTexts:
cshcAdjacencyTotal.setDescription('This object indicates the total number of adjacency entries available.')
cshc_forwarding_load_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 4))
if mibBuilder.loadTexts:
cshcForwardingLoadTable.setStatus('current')
if mibBuilder.loadTexts:
cshcForwardingLoadTable.setDescription('This table contains Layer 3 forwarding load information for each switching engine capable of providing this information.')
cshc_forwarding_load_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 4, 1)).setIndexNames((0, 'ENTITY-MIB', 'entPhysicalIndex'))
if mibBuilder.loadTexts:
cshcForwardingLoadEntry.setStatus('current')
if mibBuilder.loadTexts:
cshcForwardingLoadEntry.setDescription('Each row contains management information of Layer 3 forwarding load on a switching engine, as specified by entPhysicalIndex in ENTITY-MIB.')
cshc_forwarding_load_pkt_rate = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 4, 1, 1), counter_based_gauge64()).setUnits('pps').setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcForwardingLoadPktRate.setStatus('current')
if mibBuilder.loadTexts:
cshcForwardingLoadPktRate.setDescription('This object indicates the forwarding rate of Layer 3 packets.')
cshc_forwarding_load_pkt_peak_rate = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 4, 1, 2), counter_based_gauge64()).setUnits('pps').setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcForwardingLoadPktPeakRate.setStatus('current')
if mibBuilder.loadTexts:
cshcForwardingLoadPktPeakRate.setDescription('This object indicates the peak forwarding rate of Layer 3 packets.')
cshc_forwarding_load_pkt_peak_time = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 4, 1, 3), date_and_time()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcForwardingLoadPktPeakTime.setStatus('current')
if mibBuilder.loadTexts:
cshcForwardingLoadPktPeakTime.setDescription('This object describes the time when the peak forwarding rate of Layer 3 packets denoted by cshcForwardingLoadPktPeakRate occurs. This object will contain 0-1-1,00:00:00.0 if the peak time information is not available.')
cshc_adjacency_resource_usage_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 5))
if mibBuilder.loadTexts:
cshcAdjacencyResourceUsageTable.setStatus('current')
if mibBuilder.loadTexts:
cshcAdjacencyResourceUsageTable.setDescription('This table contains adjacency capacity per resource type and its usage for each entity capable of providing this information.')
cshc_adjacency_resource_usage_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 5, 1)).setIndexNames((0, 'ENTITY-MIB', 'entPhysicalIndex'), (0, 'CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcAdjacencyResourceIndex'))
if mibBuilder.loadTexts:
cshcAdjacencyResourceUsageEntry.setStatus('current')
if mibBuilder.loadTexts:
cshcAdjacencyResourceUsageEntry.setDescription('Each row contains the management information for a particular adjacency resource and switch engine, as specified by entPhysicalIndex in ENTITY-MIB.')
cshc_adjacency_resource_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 5, 1, 1), unsigned32())
if mibBuilder.loadTexts:
cshcAdjacencyResourceIndex.setStatus('current')
if mibBuilder.loadTexts:
cshcAdjacencyResourceIndex.setDescription('This object indicates a unique value that identifies an adjacency resource.')
cshc_adjacency_resource_descr = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 5, 1, 2), snmp_admin_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcAdjacencyResourceDescr.setStatus('current')
if mibBuilder.loadTexts:
cshcAdjacencyResourceDescr.setDescription('This object indicates a description of the adjacency resource.')
cshc_adjacency_resource_used = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 5, 1, 3), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcAdjacencyResourceUsed.setStatus('current')
if mibBuilder.loadTexts:
cshcAdjacencyResourceUsed.setDescription('This object indicates the number of adjacency entries that are currently in use.')
cshc_adjacency_resource_total = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 5, 1, 4), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcAdjacencyResourceTotal.setStatus('current')
if mibBuilder.loadTexts:
cshcAdjacencyResourceTotal.setDescription('This object indicates the total number of adjacency entries available.')
cshc_met_resource_usage_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 6))
if mibBuilder.loadTexts:
cshcMetResourceUsageTable.setStatus('current')
if mibBuilder.loadTexts:
cshcMetResourceUsageTable.setDescription('This table contains information regarding Multicast Expansion Table (MET) resource usage and utilization for a switching engine capable of providing this information.')
cshc_met_resource_usage_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 6, 1)).setIndexNames((0, 'ENTITY-MIB', 'entPhysicalIndex'), (0, 'CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcMetResourceIndex'))
if mibBuilder.loadTexts:
cshcMetResourceUsageEntry.setStatus('current')
if mibBuilder.loadTexts:
cshcMetResourceUsageEntry.setDescription('Each row contains information of the usage and utilization for a particular MET resource and switching engine, as specified by entPhysicalIndex in ENTITY-MIB.')
cshc_met_resource_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 6, 1, 1), unsigned32())
if mibBuilder.loadTexts:
cshcMetResourceIndex.setStatus('current')
if mibBuilder.loadTexts:
cshcMetResourceIndex.setDescription('An arbitrary positive integer value that uniquely identifies a Met resource.')
cshc_met_resource_descr = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 6, 1, 2), snmp_admin_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcMetResourceDescr.setStatus('current')
if mibBuilder.loadTexts:
cshcMetResourceDescr.setDescription('This object indicates a description of the MET resource.')
cshc_met_resource_used = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 6, 1, 3), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcMetResourceUsed.setStatus('current')
if mibBuilder.loadTexts:
cshcMetResourceUsed.setDescription('This object indicates the number of MET entries used by this MET resource.')
cshc_met_resource_total = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 6, 1, 4), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcMetResourceTotal.setStatus('current')
if mibBuilder.loadTexts:
cshcMetResourceTotal.setDescription('This object indicates the total number of MET entries available for this MET resource.')
cshc_met_resource_mcast_grp = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 1, 2, 6, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(-1, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcMetResourceMcastGrp.setStatus('current')
if mibBuilder.loadTexts:
cshcMetResourceMcastGrp.setDescription('This object indicates the number of the multicast group for this MET resource. A value of -1 indicates that this object is not applicable on this MET feature.')
cshc_module_interface_drops_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 2, 1))
if mibBuilder.loadTexts:
cshcModuleInterfaceDropsTable.setStatus('current')
if mibBuilder.loadTexts:
cshcModuleInterfaceDropsTable.setDescription('This table contains interface drops information on each module capable of providing this information.')
cshc_module_interface_drops_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 2, 1, 1)).setIndexNames((0, 'ENTITY-MIB', 'entPhysicalIndex'))
if mibBuilder.loadTexts:
cshcModuleInterfaceDropsEntry.setStatus('current')
if mibBuilder.loadTexts:
cshcModuleInterfaceDropsEntry.setDescription('Each row contains management information for dropped traffic on a specific module, identified by the entPhysicalIndex in ENTITY-MIB, and capable of providing this information.')
cshc_mod_tx_total_dropped_packets = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 2, 1, 1, 1), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcModTxTotalDroppedPackets.setStatus('current')
if mibBuilder.loadTexts:
cshcModTxTotalDroppedPackets.setDescription('This object indicates the total dropped outbound packets on all physical interfaces of this module.')
cshc_mod_rx_total_dropped_packets = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 2, 1, 1, 2), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcModRxTotalDroppedPackets.setStatus('current')
if mibBuilder.loadTexts:
cshcModRxTotalDroppedPackets.setDescription('This object indicates the total dropped inbound packets on all physical interfaces of this module.')
cshc_mod_tx_top_drop_port = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 2, 1, 1, 3), interface_index_or_zero()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcModTxTopDropPort.setStatus('current')
if mibBuilder.loadTexts:
cshcModTxTopDropPort.setDescription('This object indicates the ifIndex value of the interface that has the largest number of total dropped outbound packets among all the physical interfaces on this module. If there were no dropped outbound packets on any physical interfaces of this module, this object has the value 0. If there are multiple physical interfaces of this module having the same largest number of total dropped outbound packets, the ifIndex of the first such interfaces will be assigned to this object.')
cshc_mod_rx_top_drop_port = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 2, 1, 1, 4), interface_index_or_zero()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcModRxTopDropPort.setStatus('current')
if mibBuilder.loadTexts:
cshcModRxTopDropPort.setDescription('This object indicates the ifIndex value of the interface that has the largest number of total dropped inbound packets among all the physical interfaces of this module. If there were no dropped inbound packets on any physical interfaces of this module, this object has the value 0. If there are multiple physical interfaces of this module having the same largest number of total dropped inbound packets, the ifIndex of the first such interfaces will be assigned to this object.')
cshc_mod_tx_top_drop_if_index_list = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 2, 1, 1, 5), cisco_interface_index_list()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcModTxTopDropIfIndexList.setStatus('current')
if mibBuilder.loadTexts:
cshcModTxTopDropIfIndexList.setDescription('This object indicates the ifIndex values of the list of interfaces that have the largest number of total dropped outbound packets among all the physical interfaces of this module.')
cshc_mod_rx_top_drop_if_index_list = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 2, 1, 1, 6), cisco_interface_index_list()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcModRxTopDropIfIndexList.setStatus('current')
if mibBuilder.loadTexts:
cshcModRxTopDropIfIndexList.setDescription('This object indicates the ifIndex values of the list of interfaces that have the largest number of total dropped inbound packets among all the physical interfaces of this module.')
cshc_interface_buffer_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 2, 2))
if mibBuilder.loadTexts:
cshcInterfaceBufferTable.setStatus('current')
if mibBuilder.loadTexts:
cshcInterfaceBufferTable.setDescription('This table contains buffer capacity information for each physical interface capable of providing this information.')
cshc_interface_buffer_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 2, 2, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'))
if mibBuilder.loadTexts:
cshcInterfaceBufferEntry.setStatus('current')
if mibBuilder.loadTexts:
cshcInterfaceBufferEntry.setDescription('Each row contains buffer capacity information for a specific physical interface capable of providing this information.')
cshc_interface_transmit_buffer_size = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 2, 2, 1, 1), unsigned32()).setUnits('bytes').setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcInterfaceTransmitBufferSize.setStatus('current')
if mibBuilder.loadTexts:
cshcInterfaceTransmitBufferSize.setDescription('The aggregate buffer size of all the transmit queues on this interface.')
cshc_interface_receive_buffer_size = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 2, 2, 1, 2), unsigned32()).setUnits('bytes').setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcInterfaceReceiveBufferSize.setStatus('current')
if mibBuilder.loadTexts:
cshcInterfaceReceiveBufferSize.setDescription('The aggregate buffer size of all the receive queues on this interface.')
cshc_internal_channel_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 2, 3))
if mibBuilder.loadTexts:
cshcInternalChannelTable.setStatus('current')
if mibBuilder.loadTexts:
cshcInternalChannelTable.setDescription('This table contains information for each internal channel interface on each physical entity, such as a module, capable of providing this information.')
cshc_internal_channel_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 2, 3, 1)).setIndexNames((0, 'ENTITY-MIB', 'entPhysicalIndex'), (0, 'CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcIntlChnlType'))
if mibBuilder.loadTexts:
cshcInternalChannelEntry.setStatus('current')
if mibBuilder.loadTexts:
cshcInternalChannelEntry.setDescription('Each row contains management information for an internal channel interface of a specific type on a specific physical entity, such as a module, identified by the entPhysicalIndex in ENTITY-MIB, and capable of providing this information.')
cshc_intl_chnl_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 2, 3, 1, 1), cshc_internal_channel_type())
if mibBuilder.loadTexts:
cshcIntlChnlType.setStatus('current')
if mibBuilder.loadTexts:
cshcIntlChnlType.setDescription('The type of this internal channel.')
cshc_intl_chnl_rx_packet_rate = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 2, 3, 1, 2), counter_based_gauge64()).setUnits('packets per second').setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcIntlChnlRxPacketRate.setStatus('current')
if mibBuilder.loadTexts:
cshcIntlChnlRxPacketRate.setDescription('Five minute exponentially-decayed moving average of inbound packet rate for this channel.')
cshc_intl_chnl_rx_total_packets = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 2, 3, 1, 3), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcIntlChnlRxTotalPackets.setStatus('current')
if mibBuilder.loadTexts:
cshcIntlChnlRxTotalPackets.setDescription('The total number of the inbound packets accounted for this channel.')
cshc_intl_chnl_rx_dropped_packets = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 2, 3, 1, 4), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcIntlChnlRxDroppedPackets.setStatus('current')
if mibBuilder.loadTexts:
cshcIntlChnlRxDroppedPackets.setDescription('The number of dropped inbound packets for this channel.')
cshc_intl_chnl_tx_packet_rate = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 2, 3, 1, 5), counter_based_gauge64()).setUnits('packets per second').setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcIntlChnlTxPacketRate.setStatus('current')
if mibBuilder.loadTexts:
cshcIntlChnlTxPacketRate.setDescription('Five minute exponentially-decayed moving average of outbound packet rate for this channel.')
cshc_intl_chnl_tx_total_packets = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 2, 3, 1, 6), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcIntlChnlTxTotalPackets.setStatus('current')
if mibBuilder.loadTexts:
cshcIntlChnlTxTotalPackets.setDescription('The total number of the outbound packets accounted for this channel.')
cshc_intl_chnl_tx_dropped_packets = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 2, 3, 1, 7), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcIntlChnlTxDroppedPackets.setStatus('current')
if mibBuilder.loadTexts:
cshcIntlChnlTxDroppedPackets.setDescription('The number of dropped outbound packets for this channel.')
cshc_cpu_rate_limiter_resources_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 3, 1))
if mibBuilder.loadTexts:
cshcCPURateLimiterResourcesTable.setStatus('current')
if mibBuilder.loadTexts:
cshcCPURateLimiterResourcesTable.setDescription('This table contains information regarding CPU rate limiters resources.')
cshc_cpu_rate_limiter_resources_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 3, 1, 1)).setIndexNames((0, 'CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcCPURateLimiterNetworkLayer'))
if mibBuilder.loadTexts:
cshcCPURateLimiterResourcesEntry.setStatus('current')
if mibBuilder.loadTexts:
cshcCPURateLimiterResourcesEntry.setDescription('Each row contains management information of CPU rate limiter resources for a managed network layer.')
cshc_cpu_rate_limiter_network_layer = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 3, 1, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('layer2', 1), ('layer3', 2), ('layer2Input', 3), ('layer2Output', 4))))
if mibBuilder.loadTexts:
cshcCPURateLimiterNetworkLayer.setStatus('current')
if mibBuilder.loadTexts:
cshcCPURateLimiterNetworkLayer.setDescription("This object indicates the network layer for which the CPU rate limiters are applied. 'layer2' - Layer 2. 'layer3' - Layer 3. 'layer2Input' - Ingress Layer 2. Applicable for devices which support CPU rate limiters on the Ingress Layer 2 traffic. 'layer2Output' - Egress Layer 2. Applicable for devices which support CPU rate limiters on the Egress Layer 2 traffic.")
cshc_cpu_rate_limiter_total = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 3, 1, 1, 2), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcCPURateLimiterTotal.setStatus('current')
if mibBuilder.loadTexts:
cshcCPURateLimiterTotal.setDescription('This object indicates the total number of CPU rate limiters avaiable.')
cshc_cpu_rate_limiter_used = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 3, 1, 1, 3), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcCPURateLimiterUsed.setStatus('current')
if mibBuilder.loadTexts:
cshcCPURateLimiterUsed.setDescription('This object indicates the number of CPU rate limiters that is currently in use.')
cshc_cpu_rate_limiter_reserved = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 3, 1, 1, 4), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcCPURateLimiterReserved.setStatus('current')
if mibBuilder.loadTexts:
cshcCPURateLimiterReserved.setDescription('This object indicates the number of CPU rate limiters which is reserved by the switching device.')
cshc_icam_utilization_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 4, 1))
if mibBuilder.loadTexts:
cshcIcamUtilizationTable.setStatus('current')
if mibBuilder.loadTexts:
cshcIcamUtilizationTable.setDescription('This table contains information regarding ICAM (Internal Content Addressable Memory) Resource usage and utilization for a switching engine capable of providing this information.')
cshc_icam_utilization_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 4, 1, 1)).setIndexNames((0, 'ENTITY-MIB', 'entPhysicalIndex'))
if mibBuilder.loadTexts:
cshcIcamUtilizationEntry.setStatus('current')
if mibBuilder.loadTexts:
cshcIcamUtilizationEntry.setDescription('Each row contains management information of ICAM usage and utilization for a switching engine, as specified as specified by entPhysicalIndex in ENTITY-MIB.')
cshc_icam_created = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 4, 1, 1, 1), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcIcamCreated.setStatus('current')
if mibBuilder.loadTexts:
cshcIcamCreated.setDescription('This object indicates the total number of ICAM entries created.')
cshc_icam_failed = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 4, 1, 1, 2), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcIcamFailed.setStatus('current')
if mibBuilder.loadTexts:
cshcIcamFailed.setDescription('This object indicates the number of ICAM entries which failed to be created.')
cshc_icam_utilization = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 4, 1, 1, 3), percent()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcIcamUtilization.setStatus('current')
if mibBuilder.loadTexts:
cshcIcamUtilization.setDescription('This object indicates the ICAM utlization in percentage in this switching engine.')
cshc_netflow_flow_mask_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 5, 1))
if mibBuilder.loadTexts:
cshcNetflowFlowMaskTable.setStatus('current')
if mibBuilder.loadTexts:
cshcNetflowFlowMaskTable.setDescription('This table contains information regarding Netflow flow mask features supported.')
cshc_netflow_flow_mask_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 5, 1, 1)).setIndexNames((0, 'CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcNetflowFlowMaskAddrType'), (0, 'CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcNetflowFlowMaskIndex'))
if mibBuilder.loadTexts:
cshcNetflowFlowMaskEntry.setStatus('current')
if mibBuilder.loadTexts:
cshcNetflowFlowMaskEntry.setDescription('Each row contains supported feature information of a Netflow flow mask supported by the device.')
cshc_netflow_flow_mask_addr_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 5, 1, 1, 1), inet_address_type())
if mibBuilder.loadTexts:
cshcNetflowFlowMaskAddrType.setStatus('current')
if mibBuilder.loadTexts:
cshcNetflowFlowMaskAddrType.setDescription('This object indicates Internet address type for this flow mask.')
cshc_netflow_flow_mask_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 5, 1, 1, 2), unsigned32())
if mibBuilder.loadTexts:
cshcNetflowFlowMaskIndex.setStatus('current')
if mibBuilder.loadTexts:
cshcNetflowFlowMaskIndex.setDescription('This object indicates the unique flow mask number for a specific Internet address type.')
cshc_netflow_flow_mask_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 5, 1, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37))).clone(namedValues=named_values(('null', 1), ('srcOnly', 2), ('destOnly', 3), ('srcDest', 4), ('interfaceSrcDest', 5), ('fullFlow', 6), ('interfaceFullFlow', 7), ('interfaceFullFlowOrFullFlow', 8), ('atleastInterfaceSrcDest', 9), ('atleastFullFlow', 10), ('atleastInterfaceFullFlow', 11), ('atleastSrc', 12), ('atleastDst', 13), ('atleastSrcDst', 14), ('shortest', 15), ('lessThanFullFlow', 16), ('exceptFullFlow', 17), ('exceptInterfaceFullFlow', 18), ('interfaceDest', 19), ('atleastInterfaceDest', 20), ('interfaceSrc', 21), ('atleastInterfaceSrc', 22), ('srcOnlyCR', 23), ('dstOnlyCR', 24), ('fullFlowCR', 25), ('interfaceFullFlowCR', 26), ('max', 27), ('conflict', 28), ('err', 29), ('unused', 30), ('fullFlow1', 31), ('fullFlow2', 32), ('fullFlow3', 33), ('vlanFullFlow1', 34), ('vlanFullFlow2', 35), ('vlanFullFlow3', 36), ('reserved', 37)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcNetflowFlowMaskType.setStatus('current')
if mibBuilder.loadTexts:
cshcNetflowFlowMaskType.setDescription('This object indicates the type of flow mask.')
cshc_netflow_flow_mask_feature = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 5, 1, 1, 4), bits().clone(namedValues=named_values(('null', 0), ('ipAcgIngress', 1), ('ipAcgEgress', 2), ('natIngress', 3), ('natEngress', 4), ('natInside', 5), ('pbr', 6), ('cryptoIngress', 7), ('cryptoEgress', 8), ('qos', 9), ('idsIngress', 10), ('tcpIntrcptEgress', 11), ('guardian', 12), ('ipv6AcgIngress', 13), ('ipv6AcgEgress', 14), ('mcastAcgIngress', 15), ('mcastAcgEgress', 16), ('mcastStub', 17), ('mcastUrd', 18), ('ipDsIngress', 19), ('ipDsEgress', 20), ('ipVaclIngress', 21), ('ipVaclEgress', 22), ('macVaclIngress', 23), ('macVaclEgress', 24), ('inspIngress', 25), ('inspEgress', 26), ('authProxy', 27), ('rpf', 28), ('wccpIngress', 29), ('wccpEgress', 30), ('inspDummyIngress', 31), ('inspDummyEgress', 32), ('nbarIngress', 33), ('nbarEgress', 34), ('ipv6Rpf', 35), ('ipv6GlobalDefault', 36), ('dai', 37), ('ipPaclIngress', 38), ('macPaclIngress', 39), ('mplsIcmpBridge', 40), ('ipSlb', 41), ('ipv4Default', 42), ('ipv6Default', 43), ('mplsDefault', 44), ('erSpanTermination', 45), ('ipv6Mcast', 46), ('ipDsL3Ingress', 47), ('ipDsL3Egress', 48), ('cryptoRedirectIngress', 49), ('otherDefault', 50), ('ipRecir', 51), ('iPAdmissionL3Eou', 52), ('iPAdmissionL2Eou', 53), ('iPAdmissionL2EouArp', 54), ('ipAdmissionL2Http', 55), ('ipAdmissionL2HttpArp', 56), ('ipv4L3IntfNde', 57), ('ipv4L2IntfNde', 58), ('ipSguardIngress', 59), ('pvtHostsIngress', 60), ('vrfNatIngress', 61), ('tcpAdjustMssIngress', 62), ('tcpAdjustMssEgress', 63), ('eomIw', 64), ('eomIw2', 65), ('ipv4VrfNdeEgress', 66), ('l1Egress', 67), ('l1Ingress', 68), ('l1GlobalEgress', 69), ('l1GlobalIngress', 70), ('ipDot1xAcl', 71), ('ipDot1xAclArp', 72), ('dot1ad', 73), ('ipSpanPcap', 74), ('ipv6CryptoRedirectIngress', 75), ('svcAcclrtIngress', 76), ('ipv6SvcAcclrtIngress', 77), ('nfAggregation', 78), ('nfSampling', 79), ('ipv6Guardian', 80), ('ipv6Qos', 81), ('none', 82)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcNetflowFlowMaskFeature.setStatus('current')
if mibBuilder.loadTexts:
cshcNetflowFlowMaskFeature.setDescription('This object indicates the features supported by this flow mask.')
cshc_netflow_resource_usage_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 6, 1))
if mibBuilder.loadTexts:
cshcNetflowResourceUsageTable.setStatus('current')
if mibBuilder.loadTexts:
cshcNetflowResourceUsageTable.setDescription('This table contains information regarding Netflow resource usage and utilization for a switching engine capable of providing this information.')
cshc_netflow_resource_usage_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 6, 1, 1)).setIndexNames((0, 'ENTITY-MIB', 'entPhysicalIndex'), (0, 'CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcNetflowResourceUsageIndex'))
if mibBuilder.loadTexts:
cshcNetflowResourceUsageEntry.setStatus('current')
if mibBuilder.loadTexts:
cshcNetflowResourceUsageEntry.setDescription('Each row contains information of the usage and utilization for a particular Netflow resource and switching engine, as specified by entPhysicalIndex in ENTITY-MIB.')
cshc_netflow_resource_usage_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 6, 1, 1, 1), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 2147483647)))
if mibBuilder.loadTexts:
cshcNetflowResourceUsageIndex.setStatus('current')
if mibBuilder.loadTexts:
cshcNetflowResourceUsageIndex.setDescription('An arbitrary positive integer value that uniquely identifies a Netflow resource.')
cshc_netflow_resource_usage_descr = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 6, 1, 1, 2), snmp_admin_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcNetflowResourceUsageDescr.setStatus('current')
if mibBuilder.loadTexts:
cshcNetflowResourceUsageDescr.setDescription('This object indicates a description of the Netflow resource.')
cshc_netflow_resource_usage_util = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 6, 1, 1, 3), percent()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcNetflowResourceUsageUtil.setStatus('current')
if mibBuilder.loadTexts:
cshcNetflowResourceUsageUtil.setDescription('This object indicates the Netflow resource usage in percentage value.')
cshc_netflow_resource_usage_used = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 6, 1, 1, 4), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcNetflowResourceUsageUsed.setStatus('current')
if mibBuilder.loadTexts:
cshcNetflowResourceUsageUsed.setDescription('This object indicates the number of Netflow entries used by this Netflow resource.')
cshc_netflow_resource_usage_free = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 6, 1, 1, 5), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcNetflowResourceUsageFree.setStatus('current')
if mibBuilder.loadTexts:
cshcNetflowResourceUsageFree.setDescription('This object indicates the number of Netflow entries available for this Netflow resource.')
cshc_netflow_resource_usage_fail = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 6, 1, 1, 6), integer32().subtype(subtypeSpec=constraints_union(value_range_constraint(-1, -1), value_range_constraint(0, 2147483647)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcNetflowResourceUsageFail.setStatus('current')
if mibBuilder.loadTexts:
cshcNetflowResourceUsageFail.setDescription('This object indicates the number of Netflow entries which were failed to be created for this Netflow resource. A value of -1 indicates that this resource does not maintain this counter.')
cshc_qos_resource_usage_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 7, 1))
if mibBuilder.loadTexts:
cshcQosResourceUsageTable.setStatus('current')
if mibBuilder.loadTexts:
cshcQosResourceUsageTable.setDescription('This table contains QoS capacity per resource type and its usage for each entity capable of providing this information.')
cshc_qos_resource_usage_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 7, 1, 1)).setIndexNames((0, 'ENTITY-MIB', 'entPhysicalIndex'), (0, 'CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcQosResourceType'))
if mibBuilder.loadTexts:
cshcQosResourceUsageEntry.setStatus('current')
if mibBuilder.loadTexts:
cshcQosResourceUsageEntry.setDescription('Each row contains management information for QoS capacity and its usage on an entity, as specified by entPhysicalIndex in ENTITY-MIB.')
cshc_qos_resource_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 7, 1, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('aggregatePolicers', 1), ('distributedPolicers', 2), ('policerProfiles', 3))))
if mibBuilder.loadTexts:
cshcQosResourceType.setStatus('current')
if mibBuilder.loadTexts:
cshcQosResourceType.setDescription('This object indicates the QoS resource type.')
cshc_qos_resource_used = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 7, 1, 1, 2), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcQosResourceUsed.setStatus('current')
if mibBuilder.loadTexts:
cshcQosResourceUsed.setDescription('This object indicates the number of QoS entries that are currently in use.')
cshc_qos_resource_total = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 663, 1, 7, 1, 1, 3), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cshcQosResourceTotal.setStatus('current')
if mibBuilder.loadTexts:
cshcQosResourceTotal.setDescription('This object indicates the total number of QoS entries available.')
cisco_switch_hardware_capacity_mib_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 1))
cisco_switch_hardware_capacity_mib_groups = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 2))
cisco_switch_hardware_capacity_mib_compliance = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 1, 1)).setObjects(('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcMacUsageGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcVpnCamUsageGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcFibTcamUsageGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcProtocolFibTcamUsageGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcAdjacencyUsageGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcForwardingLoadGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcModuleInterfaceDropsGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcInterfaceBufferGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcInternalChannelGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcCPURateLimiterResourcesGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcIcamResourcesGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcNetflowFlowMaskResourceGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cisco_switch_hardware_capacity_mib_compliance = ciscoSwitchHardwareCapacityMIBCompliance.setStatus('deprecated')
if mibBuilder.loadTexts:
ciscoSwitchHardwareCapacityMIBCompliance.setDescription('The compliance statement for CISCO-SWITCH-HARDWARE-CAPACITY-MIB. This statement is deprecated and superseded by ciscoSwitchHardwareCapacityMIBCompliance1.')
cisco_switch_hardware_capacity_mib_compliance1 = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 1, 2)).setObjects(('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcMacUsageGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcVpnCamUsageGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcFibTcamUsageGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcProtocolFibTcamUsageGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcAdjacencyUsageGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcForwardingLoadGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcModuleInterfaceDropsGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcInterfaceBufferGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcInternalChannelGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcCPURateLimiterResourcesGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcIcamResourcesGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcNetflowFlowMaskResourceGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcFibTcamUsageExtGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cisco_switch_hardware_capacity_mib_compliance1 = ciscoSwitchHardwareCapacityMIBCompliance1.setStatus('deprecated')
if mibBuilder.loadTexts:
ciscoSwitchHardwareCapacityMIBCompliance1.setDescription('The compliance statement for CISCO-SWITCH-HARDWARE-CAPACITY-MIB. This statement is deprecated and superseded by ciscoSwitchHardwareCapacityMIBCompliance2.')
cisco_switch_hardware_capacity_mib_compliance2 = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 1, 3)).setObjects(('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcMacUsageGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcVpnCamUsageGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcFibTcamUsageGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcProtocolFibTcamUsageGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcAdjacencyUsageGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcForwardingLoadGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcModuleInterfaceDropsGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcInterfaceBufferGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcInternalChannelGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcCPURateLimiterResourcesGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcIcamResourcesGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcNetflowFlowMaskResourceGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcFibTcamUsageExtGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcNetflowFlowResourceUsageGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcMacUsageExtGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcProtocolFibTcamUsageExtGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcAdjacencyResourceUsageGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcQosResourceUsageGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcModTopDropIfIndexListGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcMetResourceUsageGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cisco_switch_hardware_capacity_mib_compliance2 = ciscoSwitchHardwareCapacityMIBCompliance2.setStatus('deprecated')
if mibBuilder.loadTexts:
ciscoSwitchHardwareCapacityMIBCompliance2.setDescription('The compliance statement for CISCO-SWITCH-HARDWARE-CAPACITY-MIB')
cisco_switch_hardware_capacity_mib_compliance3 = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 1, 4)).setObjects(('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcMacUsageGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcVpnCamUsageGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcFibTcamUsageGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcProtocolFibTcamUsageGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcAdjacencyUsageGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcForwardingLoadGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcModuleInterfaceDropsGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcInterfaceBufferGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcInternalChannelGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcCPURateLimiterResourcesGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcIcamResourcesGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcNetflowFlowMaskResourceGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcFibTcamUsageExtGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcNetflowFlowResourceUsageGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcMacUsageExtGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcProtocolFibTcamUsageExtGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcAdjacencyResourceUsageGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcQosResourceUsageGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcModTopDropIfIndexListGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcMetResourceUsageGroup'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcProtocolFibTcamWidthTypeGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cisco_switch_hardware_capacity_mib_compliance3 = ciscoSwitchHardwareCapacityMIBCompliance3.setStatus('current')
if mibBuilder.loadTexts:
ciscoSwitchHardwareCapacityMIBCompliance3.setDescription('The compliance statement for CISCO-SWITCH-HARDWARE-CAPACITY-MIB')
cshc_mac_usage_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 2, 1)).setObjects(('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcMacCollisions'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcMacUsed'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcMacTotal'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cshc_mac_usage_group = cshcMacUsageGroup.setStatus('current')
if mibBuilder.loadTexts:
cshcMacUsageGroup.setDescription('A collection of objects which provides Layer 2 forwarding hardware capacity information in the device.')
cshc_vpn_cam_usage_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 2, 2)).setObjects(('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcVpnCamUsed'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcVpnCamTotal'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cshc_vpn_cam_usage_group = cshcVpnCamUsageGroup.setStatus('current')
if mibBuilder.loadTexts:
cshcVpnCamUsageGroup.setDescription('A collection of objects which provides VPN CAM hardware capacity information in the device.')
cshc_fib_tcam_usage_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 2, 3)).setObjects(('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshc72bitsFibTcamUsed'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshc72bitsFibTcamTotal'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshc144bitsFibTcamUsed'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshc144bitsFibTcamTotal'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cshc_fib_tcam_usage_group = cshcFibTcamUsageGroup.setStatus('current')
if mibBuilder.loadTexts:
cshcFibTcamUsageGroup.setDescription('A collection of objects which provides FIB TCAM hardware capacity information in the device.')
cshc_protocol_fib_tcam_usage_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 2, 4)).setObjects(('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcProtocolFibTcamUsed'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcProtocolFibTcamTotal'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cshc_protocol_fib_tcam_usage_group = cshcProtocolFibTcamUsageGroup.setStatus('current')
if mibBuilder.loadTexts:
cshcProtocolFibTcamUsageGroup.setDescription('A collection of objects which provides FIB TCAM hardware capacity information in conjunction with Layer 3 protocol in the device.')
cshc_adjacency_usage_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 2, 5)).setObjects(('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcAdjacencyUsed'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcAdjacencyTotal'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cshc_adjacency_usage_group = cshcAdjacencyUsageGroup.setStatus('current')
if mibBuilder.loadTexts:
cshcAdjacencyUsageGroup.setDescription('A collection of objects which provides adjacency hardware capacity information in the device.')
cshc_forwarding_load_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 2, 6)).setObjects(('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcForwardingLoadPktRate'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcForwardingLoadPktPeakRate'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcForwardingLoadPktPeakTime'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cshc_forwarding_load_group = cshcForwardingLoadGroup.setStatus('current')
if mibBuilder.loadTexts:
cshcForwardingLoadGroup.setDescription('A collection of objects which provides forwarding load information in the device.')
cshc_module_interface_drops_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 2, 7)).setObjects(('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcModTxTotalDroppedPackets'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcModRxTotalDroppedPackets'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcModTxTopDropPort'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcModRxTopDropPort'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cshc_module_interface_drops_group = cshcModuleInterfaceDropsGroup.setStatus('current')
if mibBuilder.loadTexts:
cshcModuleInterfaceDropsGroup.setDescription('A collection of objects which provides linecard drop traffic information on the device.')
cshc_interface_buffer_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 2, 8)).setObjects(('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcInterfaceTransmitBufferSize'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcInterfaceReceiveBufferSize'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cshc_interface_buffer_group = cshcInterfaceBufferGroup.setStatus('current')
if mibBuilder.loadTexts:
cshcInterfaceBufferGroup.setDescription('A collection of objects which provides interface buffer information on the device.')
cshc_internal_channel_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 2, 9)).setObjects(('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcIntlChnlRxPacketRate'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcIntlChnlRxTotalPackets'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcIntlChnlRxDroppedPackets'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcIntlChnlTxPacketRate'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcIntlChnlTxTotalPackets'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcIntlChnlTxDroppedPackets'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cshc_internal_channel_group = cshcInternalChannelGroup.setStatus('current')
if mibBuilder.loadTexts:
cshcInternalChannelGroup.setDescription('A collection of objects which provides internal channel information on the device.')
cshc_cpu_rate_limiter_resources_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 2, 10)).setObjects(('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcCPURateLimiterTotal'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcCPURateLimiterUsed'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcCPURateLimiterReserved'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cshc_cpu_rate_limiter_resources_group = cshcCPURateLimiterResourcesGroup.setStatus('current')
if mibBuilder.loadTexts:
cshcCPURateLimiterResourcesGroup.setDescription('A collection of objects which provides CPU rate limiter resource in the device.')
cshc_icam_resources_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 2, 11)).setObjects(('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcIcamCreated'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcIcamFailed'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcIcamUtilization'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cshc_icam_resources_group = cshcIcamResourcesGroup.setStatus('current')
if mibBuilder.loadTexts:
cshcIcamResourcesGroup.setDescription('A collection of objects which provides ICAM resources information in the device.')
cshc_netflow_flow_mask_resource_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 2, 12)).setObjects(('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcNetflowFlowMaskType'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcNetflowFlowMaskFeature'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cshc_netflow_flow_mask_resource_group = cshcNetflowFlowMaskResourceGroup.setStatus('current')
if mibBuilder.loadTexts:
cshcNetflowFlowMaskResourceGroup.setDescription('A collection of objects which provides Netflow FlowMask information in the device.')
cshc_fib_tcam_usage_ext_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 2, 13)).setObjects(('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshc288bitsFibTcamUsed'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshc288bitsFibTcamTotal'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cshc_fib_tcam_usage_ext_group = cshcFibTcamUsageExtGroup.setStatus('current')
if mibBuilder.loadTexts:
cshcFibTcamUsageExtGroup.setDescription('A collection of objects which provides additional FIB TCAM hardware capacity information in the device.')
cshc_netflow_flow_resource_usage_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 2, 14)).setObjects(('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcNetflowResourceUsageDescr'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcNetflowResourceUsageUtil'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcNetflowResourceUsageUsed'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcNetflowResourceUsageFree'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcNetflowResourceUsageFail'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cshc_netflow_flow_resource_usage_group = cshcNetflowFlowResourceUsageGroup.setStatus('current')
if mibBuilder.loadTexts:
cshcNetflowFlowResourceUsageGroup.setDescription('A collection of objects which provides Netflow resource usage information in the device.')
cshc_mac_usage_ext_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 2, 15)).setObjects(('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcMacMcast'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcMacUcast'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcMacLines'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcMacLinesFull'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cshc_mac_usage_ext_group = cshcMacUsageExtGroup.setStatus('current')
if mibBuilder.loadTexts:
cshcMacUsageExtGroup.setDescription('A collection of objects which provides additional Layer 2 forwarding hardware capacity information in the device.')
cshc_protocol_fib_tcam_usage_ext_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 2, 16)).setObjects(('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcProtocolFibTcamLogicalUsed'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcProtocolFibTcamLogicalTotal'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cshc_protocol_fib_tcam_usage_ext_group = cshcProtocolFibTcamUsageExtGroup.setStatus('current')
if mibBuilder.loadTexts:
cshcProtocolFibTcamUsageExtGroup.setDescription('A collection of objects which provides additional FIB TCAM hardware capacity information in conjunction with Layer 3 protocol in the device.')
cshc_adjacency_resource_usage_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 2, 17)).setObjects(('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcAdjacencyResourceDescr'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcAdjacencyResourceUsed'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcAdjacencyResourceTotal'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cshc_adjacency_resource_usage_group = cshcAdjacencyResourceUsageGroup.setStatus('current')
if mibBuilder.loadTexts:
cshcAdjacencyResourceUsageGroup.setDescription('A collection of objects which provides adjacency hardware capacity information per resource in the device.')
cshc_qos_resource_usage_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 2, 18)).setObjects(('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcQosResourceUsed'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcQosResourceTotal'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cshc_qos_resource_usage_group = cshcQosResourceUsageGroup.setStatus('current')
if mibBuilder.loadTexts:
cshcQosResourceUsageGroup.setDescription('A collection of objects which provides QoS hardware capacity information per resource in the device.')
cshc_mod_top_drop_if_index_list_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 2, 19)).setObjects(('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcModTxTopDropIfIndexList'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcModRxTopDropIfIndexList'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cshc_mod_top_drop_if_index_list_group = cshcModTopDropIfIndexListGroup.setStatus('current')
if mibBuilder.loadTexts:
cshcModTopDropIfIndexListGroup.setDescription('A collection of objects which provides information on multiple interfaces with largest number of drop traffic on a module.')
cshc_met_resource_usage_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 2, 20)).setObjects(('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcMetResourceDescr'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcMetResourceUsed'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcMetResourceTotal'), ('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcMetResourceMcastGrp'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cshc_met_resource_usage_group = cshcMetResourceUsageGroup.setStatus('current')
if mibBuilder.loadTexts:
cshcMetResourceUsageGroup.setDescription('A collection of objects which provides MET hardware capacity information per resource in the device.')
cshc_protocol_fib_tcam_width_type_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 663, 2, 2, 21)).setObjects(('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', 'cshcProtocolFibTcamWidthType'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cshc_protocol_fib_tcam_width_type_group = cshcProtocolFibTcamWidthTypeGroup.setStatus('current')
if mibBuilder.loadTexts:
cshcProtocolFibTcamWidthTypeGroup.setDescription('A collection of objects which provides FIB TCAM entry width information in conjunction with Layer 3 protocol in the device.')
mibBuilder.exportSymbols('CISCO-SWITCH-HARDWARE-CAPACITY-MIB', cshcAdjacencyTotal=cshcAdjacencyTotal, cshcNetflowResourceUsageFail=cshcNetflowResourceUsageFail, cshcForwardingLoadEntry=cshcForwardingLoadEntry, cshcProtocolFibTcamWidthType=cshcProtocolFibTcamWidthType, cshcInterfaceTransmitBufferSize=cshcInterfaceTransmitBufferSize, cshcIcamCreated=cshcIcamCreated, cshcForwarding=cshcForwarding, cshcNetflowFlowMaskEntry=cshcNetflowFlowMaskEntry, cshcNetflowResourceUsageEntry=cshcNetflowResourceUsageEntry, cshcAdjacencyUsageGroup=cshcAdjacencyUsageGroup, cshcAdjacencyResourceIndex=cshcAdjacencyResourceIndex, cshcInterfaceBufferEntry=cshcInterfaceBufferEntry, cshcCPURateLimiterResourcesGroup=cshcCPURateLimiterResourcesGroup, cshcIcamUtilization=cshcIcamUtilization, cshcForwardingLoadPktRate=cshcForwardingLoadPktRate, cshcNetflowFlowMaskResourceGroup=cshcNetflowFlowMaskResourceGroup, cshcIntlChnlTxTotalPackets=cshcIntlChnlTxTotalPackets, ciscoSwitchHardwareCapacityMIBCompliance3=ciscoSwitchHardwareCapacityMIBCompliance3, cshcCPURateLimiterTotal=cshcCPURateLimiterTotal, cshcNetflowFlowMaskResources=cshcNetflowFlowMaskResources, cshcVpnCamUsed=cshcVpnCamUsed, ciscoSwitchHardwareCapacityMIBObjects=ciscoSwitchHardwareCapacityMIBObjects, cshcMetResourceDescr=cshcMetResourceDescr, cshcQosResourceUsed=cshcQosResourceUsed, ciscoSwitchHardwareCapacityMIBCompliance2=ciscoSwitchHardwareCapacityMIBCompliance2, cshcInterfaceBufferGroup=cshcInterfaceBufferGroup, PYSNMP_MODULE_ID=ciscoSwitchHardwareCapacityMIB, cshcMetResourceMcastGrp=cshcMetResourceMcastGrp, cshc288bitsFibTcamTotal=cshc288bitsFibTcamTotal, cshcModuleInterfaceDropsEntry=cshcModuleInterfaceDropsEntry, cshcInterface=cshcInterface, cshcAdjacencyUsageEntry=cshcAdjacencyUsageEntry, cshcInterfaceBufferTable=cshcInterfaceBufferTable, cshcL3Forwarding=cshcL3Forwarding, cshcNetflowFlowResourceUsageGroup=cshcNetflowFlowResourceUsageGroup, cshcProtocolFibTcamTotal=cshcProtocolFibTcamTotal, cshcProtocolFibTcamUsageTable=cshcProtocolFibTcamUsageTable, cshcModTxTotalDroppedPackets=cshcModTxTotalDroppedPackets, cshcMetResourceIndex=cshcMetResourceIndex, cshcFibTcamUsageGroup=cshcFibTcamUsageGroup, cshcAdjacencyResourceUsageTable=cshcAdjacencyResourceUsageTable, ciscoSwitchHardwareCapacityMIBGroups=ciscoSwitchHardwareCapacityMIBGroups, cshcNetflowFlowMaskAddrType=cshcNetflowFlowMaskAddrType, cshcMacUsageTable=cshcMacUsageTable, cshcInternalChannelEntry=cshcInternalChannelEntry, cshc144bitsFibTcamTotal=cshc144bitsFibTcamTotal, cshc72bitsFibTcamTotal=cshc72bitsFibTcamTotal, cshcModTxTopDropIfIndexList=cshcModTxTopDropIfIndexList, cshcMetResourceUsed=cshcMetResourceUsed, ciscoSwitchHardwareCapacityMIBNotifs=ciscoSwitchHardwareCapacityMIBNotifs, cshcAdjacencyUsageTable=cshcAdjacencyUsageTable, cshcIntlChnlRxPacketRate=cshcIntlChnlRxPacketRate, cshcAdjacencyUsed=cshcAdjacencyUsed, cshcAdjacencyResourceUsageEntry=cshcAdjacencyResourceUsageEntry, cshcVpnCamUsageEntry=cshcVpnCamUsageEntry, cshcForwardingLoadTable=cshcForwardingLoadTable, cshcQosResourceUsage=cshcQosResourceUsage, cshcProtocolFibTcamUsageEntry=cshcProtocolFibTcamUsageEntry, cshcForwardingLoadPktPeakRate=cshcForwardingLoadPktPeakRate, cshcCPURateLimiterResourcesTable=cshcCPURateLimiterResourcesTable, cshcCPURateLimiterNetworkLayer=cshcCPURateLimiterNetworkLayer, cshcModTopDropIfIndexListGroup=cshcModTopDropIfIndexListGroup, cshcVpnCamTotal=cshcVpnCamTotal, cshcMetResourceUsageEntry=cshcMetResourceUsageEntry, cshcAdjacencyResourceUsageGroup=cshcAdjacencyResourceUsageGroup, cshcCPURateLimiterResourcesEntry=cshcCPURateLimiterResourcesEntry, CshcInternalChannelType=CshcInternalChannelType, cshcAdjacencyResourceUsed=cshcAdjacencyResourceUsed, cshcForwardingLoadGroup=cshcForwardingLoadGroup, cshcIntlChnlTxPacketRate=cshcIntlChnlTxPacketRate, cshc72bitsFibTcamUsed=cshc72bitsFibTcamUsed, cshcModTxTopDropPort=cshcModTxTopDropPort, cshcModRxTopDropPort=cshcModRxTopDropPort, cshcForwardingLoadPktPeakTime=cshcForwardingLoadPktPeakTime, cshcMacUsageEntry=cshcMacUsageEntry, ciscoSwitchHardwareCapacityMIBConformance=ciscoSwitchHardwareCapacityMIBConformance, cshcQosResourceTotal=cshcQosResourceTotal, cshcNetflowResourceUsageUtil=cshcNetflowResourceUsageUtil, cshcFibTcamUsageExtGroup=cshcFibTcamUsageExtGroup, cshcIcamUtilizationEntry=cshcIcamUtilizationEntry, cshcVpnCamUsageTable=cshcVpnCamUsageTable, cshcMacUcast=cshcMacUcast, cshcMacUsageGroup=cshcMacUsageGroup, cshcIntlChnlType=cshcIntlChnlType, cshcIcamResources=cshcIcamResources, cshcMacLines=cshcMacLines, cshcMacCollisions=cshcMacCollisions, cshc288bitsFibTcamUsed=cshc288bitsFibTcamUsed, cshcIntlChnlRxDroppedPackets=cshcIntlChnlRxDroppedPackets, cshcProtocolFibTcamUsageGroup=cshcProtocolFibTcamUsageGroup, cshcAdjacencyResourceDescr=cshcAdjacencyResourceDescr, cshcModRxTopDropIfIndexList=cshcModRxTopDropIfIndexList, cshcNetflowFlowMaskTable=cshcNetflowFlowMaskTable, cshcNetflowResourceUsageUsed=cshcNetflowResourceUsageUsed, cshcNetflowFlowMaskIndex=cshcNetflowFlowMaskIndex, cshcProtocolFibTcamUsed=cshcProtocolFibTcamUsed, cshcProtocolFibTcamWidthTypeGroup=cshcProtocolFibTcamWidthTypeGroup, cshcMacUsageExtGroup=cshcMacUsageExtGroup, cshcInterfaceReceiveBufferSize=cshcInterfaceReceiveBufferSize, cshcNetflowResourceUsageIndex=cshcNetflowResourceUsageIndex, cshcQosResourceUsageTable=cshcQosResourceUsageTable, cshcQosResourceUsageEntry=cshcQosResourceUsageEntry, cshcIntlChnlRxTotalPackets=cshcIntlChnlRxTotalPackets, ciscoSwitchHardwareCapacityMIBCompliance1=ciscoSwitchHardwareCapacityMIBCompliance1, ciscoSwitchHardwareCapacityMIBCompliance=ciscoSwitchHardwareCapacityMIBCompliance, cshcInternalChannelGroup=cshcInternalChannelGroup, cshcModuleInterfaceDropsTable=cshcModuleInterfaceDropsTable, cshcVpnCamUsageGroup=cshcVpnCamUsageGroup, cshcFibTcamUsageTable=cshcFibTcamUsageTable, cshcL2Forwarding=cshcL2Forwarding, cshcFibTcamUsageEntry=cshcFibTcamUsageEntry, cshcMacMcast=cshcMacMcast, cshcIcamResourcesGroup=cshcIcamResourcesGroup, cshcModuleInterfaceDropsGroup=cshcModuleInterfaceDropsGroup, cshcCPURateLimiterUsed=cshcCPURateLimiterUsed, cshcProtocolFibTcamProtocol=cshcProtocolFibTcamProtocol, cshcMetResourceUsageGroup=cshcMetResourceUsageGroup, cshcIcamFailed=cshcIcamFailed, ciscoSwitchHardwareCapacityMIB=ciscoSwitchHardwareCapacityMIB, cshcNetflowResourceUsage=cshcNetflowResourceUsage, cshcMacTotal=cshcMacTotal, cshcCPURateLimiterReserved=cshcCPURateLimiterReserved, cshcQosResourceUsageGroup=cshcQosResourceUsageGroup, cshcMetResourceTotal=cshcMetResourceTotal, cshcMacUsed=cshcMacUsed, cshcInternalChannelTable=cshcInternalChannelTable, cshcNetflowResourceUsageTable=cshcNetflowResourceUsageTable, cshcQosResourceType=cshcQosResourceType, ciscoSwitchHardwareCapacityMIBCompliances=ciscoSwitchHardwareCapacityMIBCompliances, cshcNetflowResourceUsageFree=cshcNetflowResourceUsageFree, cshc144bitsFibTcamUsed=cshc144bitsFibTcamUsed, cshcNetflowResourceUsageDescr=cshcNetflowResourceUsageDescr, cshcModRxTotalDroppedPackets=cshcModRxTotalDroppedPackets, cshcAdjacencyResourceTotal=cshcAdjacencyResourceTotal, cshcProtocolFibTcamLogicalUsed=cshcProtocolFibTcamLogicalUsed, cshcIntlChnlTxDroppedPackets=cshcIntlChnlTxDroppedPackets, cshcIcamUtilizationTable=cshcIcamUtilizationTable, cshcCPURateLimiterResources=cshcCPURateLimiterResources, cshcNetflowFlowMaskFeature=cshcNetflowFlowMaskFeature, cshcProtocolFibTcamUsageExtGroup=cshcProtocolFibTcamUsageExtGroup, cshcMacLinesFull=cshcMacLinesFull, cshcProtocolFibTcamLogicalTotal=cshcProtocolFibTcamLogicalTotal, cshcMetResourceUsageTable=cshcMetResourceUsageTable, cshcNetflowFlowMaskType=cshcNetflowFlowMaskType) |
#/usr/bin/env python3
GET_PHOTOS_PATTERN = "https://www.flickr.com/services/rest?method=flickr.people.getPhotos&api_key={}&user_id={}&format=json&page={}&per_page={}"
FIND_USER_BY_NAME_METHOD = "https://www.flickr.com/services/rest?method=flickr.people.findbyusername&api_key={}&username={}&format={}"
GET_PHOTO_COMMENTS = "https://www.flickr.com/services/rest?method=flickr.photos.comments.getList&api_key={}&photo_id={}&format=json"
GET_PHOTO_SIZE_PATTERN = "https://www.flickr.com/services/rest?method=flickr.photos.getSizes&api_key={}&photo_id={}&format=json"
GET_PHOTO_DESCRIPTION = "https://www.flickr.com/services/rest?method=flickr.photos.getInfo&api_key={}&photo_id={}&format=json"
PHOTO_DATA_KEYS = ['id', 'owner', 'secret', 'server', 'farm', 'title', 'ispublic', 'isfriend', 'isfamily']
USER_DATA_PATTERN = r'{"user":{"id":".*","nsid":".*","username":{"_content":".*"}},"stat":"ok"}'
PHOTO_SIZE_URL_PATTERN = r"https://live.staticflickr.com/\d*/.*.jpg"
ALPHANUMERIC = "0123456789abcdefghijklmnopqrstuvwxyz"
CAPITAL_ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
ALPHABET = "abcdefghijklmnopqrstuvwxyz"
USER_KEYS = ['id', 'nsid', 'username']
LOCALE_FORMAT = r"^[a-z]*-[A-Z]{2}"
USER_NOT_FOUND = "User not found"
ISO3166_1_FORMAT = r"[A-Z]{2}"
ALPHABET_REGEX = r"[a-zA-Z]*"
ISO639_FORMAT = r"^[a-z]*"
DESCRITION = "description"
USERNAME_KEY = "_content"
USERNAME = "username"
COMMENTS = "comments"
CONTENT = "_content"
COMMENT = "comment"
MESSAGE = 'message'
PHOTOS = "photos"
HEIGHT = "height"
SOURCE = "source"
TITLE = "title"
PAGES = "pages"
PHOTO = "photo"
LABEL = "label"
TOTAL = "total"
WIDTH = "width"
SIZES = "sizes"
JSON = "json"
NSID = "nsid"
SIZE = "size"
USER = "user"
STAT = "stat"
FAIL = "fail"
GET = "GET"
ID = "id"
CONSUMER_KEY = "consumer_key"
CONSUMER_SECRET = "consumer_secret"
FLICKR_KEYS = "flickr_keys"
LOCALE = "locale" | get_photos_pattern = 'https://www.flickr.com/services/rest?method=flickr.people.getPhotos&api_key={}&user_id={}&format=json&page={}&per_page={}'
find_user_by_name_method = 'https://www.flickr.com/services/rest?method=flickr.people.findbyusername&api_key={}&username={}&format={}'
get_photo_comments = 'https://www.flickr.com/services/rest?method=flickr.photos.comments.getList&api_key={}&photo_id={}&format=json'
get_photo_size_pattern = 'https://www.flickr.com/services/rest?method=flickr.photos.getSizes&api_key={}&photo_id={}&format=json'
get_photo_description = 'https://www.flickr.com/services/rest?method=flickr.photos.getInfo&api_key={}&photo_id={}&format=json'
photo_data_keys = ['id', 'owner', 'secret', 'server', 'farm', 'title', 'ispublic', 'isfriend', 'isfamily']
user_data_pattern = '{"user":{"id":".*","nsid":".*","username":{"_content":".*"}},"stat":"ok"}'
photo_size_url_pattern = 'https://live.staticflickr.com/\\d*/.*.jpg'
alphanumeric = '0123456789abcdefghijklmnopqrstuvwxyz'
capital_alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
alphabet = 'abcdefghijklmnopqrstuvwxyz'
user_keys = ['id', 'nsid', 'username']
locale_format = '^[a-z]*-[A-Z]{2}'
user_not_found = 'User not found'
iso3166_1_format = '[A-Z]{2}'
alphabet_regex = '[a-zA-Z]*'
iso639_format = '^[a-z]*'
descrition = 'description'
username_key = '_content'
username = 'username'
comments = 'comments'
content = '_content'
comment = 'comment'
message = 'message'
photos = 'photos'
height = 'height'
source = 'source'
title = 'title'
pages = 'pages'
photo = 'photo'
label = 'label'
total = 'total'
width = 'width'
sizes = 'sizes'
json = 'json'
nsid = 'nsid'
size = 'size'
user = 'user'
stat = 'stat'
fail = 'fail'
get = 'GET'
id = 'id'
consumer_key = 'consumer_key'
consumer_secret = 'consumer_secret'
flickr_keys = 'flickr_keys'
locale = 'locale' |
def sayhi():
print("hello")
def chat():
print("This is a calculator")
def exit():
print("Thank you")
def mul(n1,n2):
return n1*n2
def add(n1,n2):
return n1+n2
def sub(n1,n2):
return n1-n2
def div(n1,n2):
return n1/n2
sayhi()
chat()
i = int(input("Enter a number:- "))
j = int(input("Enter another number:- "))
print("Addition :-")
print(add(i,j))
print("Substraction :-")
print(sub(i,j))
print("Multiplication :-")
print(mul(i,j))
print("Division :-")
print(div(i,j))
exit()
| def sayhi():
print('hello')
def chat():
print('This is a calculator')
def exit():
print('Thank you')
def mul(n1, n2):
return n1 * n2
def add(n1, n2):
return n1 + n2
def sub(n1, n2):
return n1 - n2
def div(n1, n2):
return n1 / n2
sayhi()
chat()
i = int(input('Enter a number:- '))
j = int(input('Enter another number:- '))
print('Addition :-')
print(add(i, j))
print('Substraction :-')
print(sub(i, j))
print('Multiplication :-')
print(mul(i, j))
print('Division :-')
print(div(i, j))
exit() |
'''
m18 - maiores de 18
h - homens
m20 - mulheres menos de 20
'''
m18 = h = m20 = 0
while True:
print('-'*25)
print('CADSTRE UMA PESSOA')
print('-'*25)
idade = int(input('Idade: '))
if idade > 18:
m18 += 1
while True:
sexo = str(input('Sexo: [M/F] ')).upper()
if sexo in 'MF':
break
if sexo == 'M':
h += 1
if sexo == 'F' and idade < 20:
m20 += 1
while True:
print('-'*25)
variavel = str(input('Quer continuar [S/N]: ')).upper()
if variavel in 'SN':
break
if variavel == 'N':
break
print('===== FIM DO PROGRAMA =====')
print(f'Total de pessoas com mais de 18 anos: {m18}')
print(f'Ao todo temos {h} homens cadastrados')
print(f'E temos {m20} mulheres com menos com menos de 20 anos') | """
m18 - maiores de 18
h - homens
m20 - mulheres menos de 20
"""
m18 = h = m20 = 0
while True:
print('-' * 25)
print('CADSTRE UMA PESSOA')
print('-' * 25)
idade = int(input('Idade: '))
if idade > 18:
m18 += 1
while True:
sexo = str(input('Sexo: [M/F] ')).upper()
if sexo in 'MF':
break
if sexo == 'M':
h += 1
if sexo == 'F' and idade < 20:
m20 += 1
while True:
print('-' * 25)
variavel = str(input('Quer continuar [S/N]: ')).upper()
if variavel in 'SN':
break
if variavel == 'N':
break
print('===== FIM DO PROGRAMA =====')
print(f'Total de pessoas com mais de 18 anos: {m18}')
print(f'Ao todo temos {h} homens cadastrados')
print(f'E temos {m20} mulheres com menos com menos de 20 anos') |
bootstrap_url="http://agent-resources.cloudkick.com/"
s3_bucket="s3://agent-resources.cloudkick.com"
pubkey="etc/agent-linux.public.key"
branding_name="cloudkick-agent"
| bootstrap_url = 'http://agent-resources.cloudkick.com/'
s3_bucket = 's3://agent-resources.cloudkick.com'
pubkey = 'etc/agent-linux.public.key'
branding_name = 'cloudkick-agent' |
def binary_search(arr, num):
lo, hi = 0, len(arr)-1
while lo <= hi:
mid = (lo+hi)//2
if num < arr[mid]:
hi = mid-1
elif num > arr[mid]:
lo = mid+1
elif num == arr[mid]:
print(num, 'found in array.')
break
if lo > hi:
print(num, 'is not present in the array!')
if __name__ == '__main__':
arr = [2, 6, 8, 9, 10, 11, 13]
binary_search(arr, 12)
| def binary_search(arr, num):
(lo, hi) = (0, len(arr) - 1)
while lo <= hi:
mid = (lo + hi) // 2
if num < arr[mid]:
hi = mid - 1
elif num > arr[mid]:
lo = mid + 1
elif num == arr[mid]:
print(num, 'found in array.')
break
if lo > hi:
print(num, 'is not present in the array!')
if __name__ == '__main__':
arr = [2, 6, 8, 9, 10, 11, 13]
binary_search(arr, 12) |
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# TODO(borenet): This module belongs in the recipe engine. Remove it from this
# repo once it has been moved.
DEPS = [
'recipe_engine/json',
'recipe_engine/path',
'recipe_engine/python',
'recipe_engine/raw_io',
'recipe_engine/step',
]
| deps = ['recipe_engine/json', 'recipe_engine/path', 'recipe_engine/python', 'recipe_engine/raw_io', 'recipe_engine/step'] |
command = '/home/billerot/Git/alexa-flask/venv/bin/gunicorn'
pythonpath = '/home/billerot/Git/alexa-flask'
workers = 3
user = 'billerot'
bind = '0.0.0.0:8088'
logconfig = "/home/billerot/Git/alexa-flask/conf/logging.conf"
capture_output = True
timeout = 90
| command = '/home/billerot/Git/alexa-flask/venv/bin/gunicorn'
pythonpath = '/home/billerot/Git/alexa-flask'
workers = 3
user = 'billerot'
bind = '0.0.0.0:8088'
logconfig = '/home/billerot/Git/alexa-flask/conf/logging.conf'
capture_output = True
timeout = 90 |
# def minsteps1(n):
# memo = [0] * (n + 1)
# def loop(n):
# if n > 1:
# if memo[n] != 0:
# return memo[n]
# else:
# memo[n] = 1 + loop(n - 1)
# if n % 2 == 0:
# memo[n] = min(memo[n], 1 + loop(n // 2))
# if n % 3 == 0:
# memo[n] = min(memo[n], 1 + loop(n // 3))
# return memo[n]
# else:
# return 0
# return loop(n)
def minsteps(n):
memo = [0] * (n + 1)
for i in range(1, n+1):
memo[i] = 1 + memo[i-1]
if i % 2 == 0:
memo[i] = min(memo[i], memo[i // 2]+1)
if i % 3 == 0:
memo[i] = min(memo[i], memo[i // 3]+1)
return memo[n]-1
print(minsteps(10)) # 3
print(minsteps(317)) # 10
print(minsteps(514)) # 8
| def minsteps(n):
memo = [0] * (n + 1)
for i in range(1, n + 1):
memo[i] = 1 + memo[i - 1]
if i % 2 == 0:
memo[i] = min(memo[i], memo[i // 2] + 1)
if i % 3 == 0:
memo[i] = min(memo[i], memo[i // 3] + 1)
return memo[n] - 1
print(minsteps(10))
print(minsteps(317))
print(minsteps(514)) |
class TreeNode(object):
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Codec:
def serialize(self, root):
ans = ""
queue = [root]
while queue:
node = queue.pop(0)
if node:
ans += str(node.val) + ","
queue.append(node.left)
queue.append(node.right)
else:
ans += "#,"
return ans[:-1]
def deserialize(self, data: str):
if data == "#":
return None
data = data.split(",")
if not data:
return None
root = TreeNode(data[0])
nodes = [root]
i = 1
while i < len(data) - 1:
node = nodes.pop(0)
lv = data[i]
rv = data[i + 1]
node.left = l
node.right = r
i += 2
if lv != "#":
l = TreeNode(lv)
nodes.append(l)
if rv != "#":
r = TreeNode(rv)
nodes.append(r)
return root
c1 = Codec()
data = [1, 2, 3, None, None, 6, 7, None, None, 12, 13]
str_data = ",".join(map(lambda x: str(x) if x is not None else "#", data))
root = c1.deserialize(str_data)
print(c1.serialize(root))
| class Treenode(object):
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Codec:
def serialize(self, root):
ans = ''
queue = [root]
while queue:
node = queue.pop(0)
if node:
ans += str(node.val) + ','
queue.append(node.left)
queue.append(node.right)
else:
ans += '#,'
return ans[:-1]
def deserialize(self, data: str):
if data == '#':
return None
data = data.split(',')
if not data:
return None
root = tree_node(data[0])
nodes = [root]
i = 1
while i < len(data) - 1:
node = nodes.pop(0)
lv = data[i]
rv = data[i + 1]
node.left = l
node.right = r
i += 2
if lv != '#':
l = tree_node(lv)
nodes.append(l)
if rv != '#':
r = tree_node(rv)
nodes.append(r)
return root
c1 = codec()
data = [1, 2, 3, None, None, 6, 7, None, None, 12, 13]
str_data = ','.join(map(lambda x: str(x) if x is not None else '#', data))
root = c1.deserialize(str_data)
print(c1.serialize(root)) |
def f(x):
return x, x + 1
for a in b, c:
f(a)
| def f(x):
return (x, x + 1)
for a in (b, c):
f(a) |
class Proxy:
def __init__(self, obj):
self._obj = obj
# Delegate attribute lookup to internal obj
def __getattr__(self, name):
return getattr(self._obj, name)
# Delegate attribute assignment
def __setattr__(self, name, value):
if name.startswith('_'):
super().__setattr__(name, value) # Call original __setattr__
else:
setattr(self._obj, name, value)
if __name__ == '__main__':
class A:
def __init__(self, x):
self.x = x
def spam(self):
print('A.spam')
a = A(42)
p = Proxy(a)
print(p.x)
print(p.spam())
p.x = 37
print('Should be 37:', p.x)
print('Should be 37:', a.x)
| class Proxy:
def __init__(self, obj):
self._obj = obj
def __getattr__(self, name):
return getattr(self._obj, name)
def __setattr__(self, name, value):
if name.startswith('_'):
super().__setattr__(name, value)
else:
setattr(self._obj, name, value)
if __name__ == '__main__':
class A:
def __init__(self, x):
self.x = x
def spam(self):
print('A.spam')
a = a(42)
p = proxy(a)
print(p.x)
print(p.spam())
p.x = 37
print('Should be 37:', p.x)
print('Should be 37:', a.x) |
rolls = [6, 5, 3, 7, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
soma = 0
# for r in rolls:
# soma += r
# for twice in range(0, 3):
# soma +=rolls[twice]
# if soma == 10:
# rolls[2] *= 2
# print(rolls)
# # print(twice)
# print(rolls)
# print(rolls[0])
# row = [i for i in rolls]
# print(rolls)
for iterator in range(0, len(rolls)):
soma += rolls[iterator]
if soma == 10:
change = rolls[iterator+1]*2
rolls[iterator+1] = change
print(rolls) | rolls = [6, 5, 3, 7, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
soma = 0
for iterator in range(0, len(rolls)):
soma += rolls[iterator]
if soma == 10:
change = rolls[iterator + 1] * 2
rolls[iterator + 1] = change
print(rolls) |
def dfs(node,parent):
currsize=1
for child in tree[node]:
if child!=parent:
currsize+=dfs(child,node)
subsize[node]=currsize
return currsize
n=int(input())
tree=[[]for i in range(n)]
for i in range(n-1):
a,b=map(int,input().split())
a,b=a-1,b-1
tree[a].append(b)
tree[b].append(a)
subsize=[0 for i in range(n)]
dfs(0,-1)
print(subsize)
| def dfs(node, parent):
currsize = 1
for child in tree[node]:
if child != parent:
currsize += dfs(child, node)
subsize[node] = currsize
return currsize
n = int(input())
tree = [[] for i in range(n)]
for i in range(n - 1):
(a, b) = map(int, input().split())
(a, b) = (a - 1, b - 1)
tree[a].append(b)
tree[b].append(a)
subsize = [0 for i in range(n)]
dfs(0, -1)
print(subsize) |
''' Contains Hades gamedata '''
# Based on data in Weaponsets.lua
HeroMeleeWeapons = {
"SwordWeapon": "Stygian Blade",
"SpearWeapon": "Eternal Spear",
"ShieldWeapon": "Shield of Chaos",
"BowWeapon": "Heart-Seeking Bow",
"FistWeapon": "Twin Fists of Malphon",
"GunWeapon": "Adamant Rail",
}
# Based on data from TraitData.lua
AspectTraits = {
"SwordCriticalParryTrait": "Nemesis",
"SwordConsecrationTrait": "Arthur",
"ShieldRushBonusProjectileTrait": "Chaos",
"ShieldLoadAmmoTrait": "Beowulf",
# "ShieldBounceEmpowerTrait": "",
"ShieldTwoShieldTrait": "Zeus",
"SpearSpinTravel": "Guan Yu",
"GunGrenadeSelfEmpowerTrait": "Eris",
"FistVacuumTrait": "Talos",
"FistBaseUpgradeTrait": "Zagreus",
"FistWeaveTrait": "Demeter",
"FistDetonateTrait": "Gilgamesh",
"SwordBaseUpgradeTrait": "Zagreus",
"BowBaseUpgradeTrait": "Zagreus",
"SpearBaseUpgradeTrait": "Zagreus",
"ShieldBaseUpgradeTrait": "Zagreus",
"GunBaseUpgradeTrait": "Zagreus",
"DislodgeAmmoTrait": "Poseidon",
# "SwordAmmoWaveTrait": "",
"GunManualReloadTrait": "Hestia",
"GunLoadedGrenadeTrait": "Lucifer",
"BowMarkHomingTrait": "Chiron",
"BowLoadAmmoTrait": "Hera",
# "BowStoredChargeTrait": "",
"BowBondTrait": "Rama",
# "BowBeamTrait": "",
"SpearWeaveTrait": "Hades",
"SpearTeleportTrait": "Achilles",
}
| """ Contains Hades gamedata """
hero_melee_weapons = {'SwordWeapon': 'Stygian Blade', 'SpearWeapon': 'Eternal Spear', 'ShieldWeapon': 'Shield of Chaos', 'BowWeapon': 'Heart-Seeking Bow', 'FistWeapon': 'Twin Fists of Malphon', 'GunWeapon': 'Adamant Rail'}
aspect_traits = {'SwordCriticalParryTrait': 'Nemesis', 'SwordConsecrationTrait': 'Arthur', 'ShieldRushBonusProjectileTrait': 'Chaos', 'ShieldLoadAmmoTrait': 'Beowulf', 'ShieldTwoShieldTrait': 'Zeus', 'SpearSpinTravel': 'Guan Yu', 'GunGrenadeSelfEmpowerTrait': 'Eris', 'FistVacuumTrait': 'Talos', 'FistBaseUpgradeTrait': 'Zagreus', 'FistWeaveTrait': 'Demeter', 'FistDetonateTrait': 'Gilgamesh', 'SwordBaseUpgradeTrait': 'Zagreus', 'BowBaseUpgradeTrait': 'Zagreus', 'SpearBaseUpgradeTrait': 'Zagreus', 'ShieldBaseUpgradeTrait': 'Zagreus', 'GunBaseUpgradeTrait': 'Zagreus', 'DislodgeAmmoTrait': 'Poseidon', 'GunManualReloadTrait': 'Hestia', 'GunLoadedGrenadeTrait': 'Lucifer', 'BowMarkHomingTrait': 'Chiron', 'BowLoadAmmoTrait': 'Hera', 'BowBondTrait': 'Rama', 'SpearWeaveTrait': 'Hades', 'SpearTeleportTrait': 'Achilles'} |
class Property(object):
def __init__(self, **kwargs):
self.background = "#FFFFFF"
self.candle_hl = dict()
self.up_candle = dict()
self.down_candle = dict()
self.long_trade_line = dict()
self.short_trade_line = dict()
self.long_trade_tri = dict()
self.short_trade_tri = dict()
self.trade_close_tri = dict()
self.default_colors = [
'#fa8072',
'#9932cc',
'#800080',
'#ff4500',
'#4b0082',
'#483d8b',
'#191970',
'#a52a2a',
'#dc143c',
'#8b0000',
'#c71585',
'#ff0000',
'#008b8b',
'#2f4f4f',
'#2e8b57',
'#6b8e23',
'#556b2f',
'#ff8c00',
'#a0522d',
'#4682b4',
'#696969',
'#f08080',
]
for key, value in kwargs.items():
setattr(self, key, value)
# BigFishProperty -----------------------------------------------------
BF_LONG = "#208C13"
BF_SHORT = "#D32C25"
BF_CLOSE = "#F9D749"
BF_KLINE = "#4DB3C7"
BF_BG = "#FFFFFF"
BigFishProperty = Property(
background=BF_BG,
candle_hl=dict(
color=BF_KLINE
),
up_candle=dict(
fill_color=BF_BG,
line_color=BF_KLINE
),
down_candle = dict(
fill_color=BF_KLINE,
line_color=BF_KLINE
),
long_trade_line=dict(
color=BF_LONG
),
short_trade_line=dict(
color=BF_SHORT
),
long_trade_tri=dict(
line_color="black",
fill_color=BF_LONG
),
short_trade_tri=dict(
line_color="black",
fill_color=BF_SHORT
),
trade_close_tri=dict(
line_color="black",
fill_color=BF_CLOSE
)
)
# BigFishProperty -----------------------------------------------------
# MT4Property ---------------------------------------------------------
MT4_LONG = "blue"
MT4_SHORT = "red"
MT4_CLOSE = "gold"
MT4_KLINE = "#00FF00"
MT4_BG = "#000000"
MT4Property = Property(
background=MT4_BG,
candle_hl=dict(
color=MT4_KLINE
),
up_candle=dict(
fill_color=MT4_BG,
line_color=MT4_KLINE
),
down_candle = dict(
fill_color=MT4_KLINE,
line_color=MT4_KLINE
),
long_trade_line=dict(
color=MT4_LONG
),
short_trade_line=dict(
color=MT4_SHORT
),
long_trade_tri=dict(
line_color="#FFFFFF",
fill_color=MT4_LONG
),
short_trade_tri=dict(
line_color="#FFFFFF",
fill_color=MT4_SHORT
),
trade_close_tri=dict(
line_color="#FFFFFF",
fill_color=MT4_CLOSE
)
)
# MT4Property ---------------------------------------------------------
| class Property(object):
def __init__(self, **kwargs):
self.background = '#FFFFFF'
self.candle_hl = dict()
self.up_candle = dict()
self.down_candle = dict()
self.long_trade_line = dict()
self.short_trade_line = dict()
self.long_trade_tri = dict()
self.short_trade_tri = dict()
self.trade_close_tri = dict()
self.default_colors = ['#fa8072', '#9932cc', '#800080', '#ff4500', '#4b0082', '#483d8b', '#191970', '#a52a2a', '#dc143c', '#8b0000', '#c71585', '#ff0000', '#008b8b', '#2f4f4f', '#2e8b57', '#6b8e23', '#556b2f', '#ff8c00', '#a0522d', '#4682b4', '#696969', '#f08080']
for (key, value) in kwargs.items():
setattr(self, key, value)
bf_long = '#208C13'
bf_short = '#D32C25'
bf_close = '#F9D749'
bf_kline = '#4DB3C7'
bf_bg = '#FFFFFF'
big_fish_property = property(background=BF_BG, candle_hl=dict(color=BF_KLINE), up_candle=dict(fill_color=BF_BG, line_color=BF_KLINE), down_candle=dict(fill_color=BF_KLINE, line_color=BF_KLINE), long_trade_line=dict(color=BF_LONG), short_trade_line=dict(color=BF_SHORT), long_trade_tri=dict(line_color='black', fill_color=BF_LONG), short_trade_tri=dict(line_color='black', fill_color=BF_SHORT), trade_close_tri=dict(line_color='black', fill_color=BF_CLOSE))
mt4_long = 'blue'
mt4_short = 'red'
mt4_close = 'gold'
mt4_kline = '#00FF00'
mt4_bg = '#000000'
mt4_property = property(background=MT4_BG, candle_hl=dict(color=MT4_KLINE), up_candle=dict(fill_color=MT4_BG, line_color=MT4_KLINE), down_candle=dict(fill_color=MT4_KLINE, line_color=MT4_KLINE), long_trade_line=dict(color=MT4_LONG), short_trade_line=dict(color=MT4_SHORT), long_trade_tri=dict(line_color='#FFFFFF', fill_color=MT4_LONG), short_trade_tri=dict(line_color='#FFFFFF', fill_color=MT4_SHORT), trade_close_tri=dict(line_color='#FFFFFF', fill_color=MT4_CLOSE)) |
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
DEPS = [
'chromium',
'isolate',
'recipe_engine/properties',
]
def RunSteps(api):
api.chromium.set_config('chromium')
api.isolate.compare_build_artifacts('first_dir', 'second_dir')
def GenTests(api):
yield (
api.test('basic') +
api.properties(
buildername='test_buildername',
buildnumber=123)
)
yield (
api.test('failure') +
api.properties(
buildername='test_buildername',
buildnumber=123) +
api.step_data('compare_build_artifacts', retcode=1)
)
| deps = ['chromium', 'isolate', 'recipe_engine/properties']
def run_steps(api):
api.chromium.set_config('chromium')
api.isolate.compare_build_artifacts('first_dir', 'second_dir')
def gen_tests(api):
yield (api.test('basic') + api.properties(buildername='test_buildername', buildnumber=123))
yield (api.test('failure') + api.properties(buildername='test_buildername', buildnumber=123) + api.step_data('compare_build_artifacts', retcode=1)) |
'''
# Sample code to perform I/O:
name = input() # Reading input from STDIN
print('Hi, %s.' % name) # Writing output to STDOUT
# Warning: Printing unwanted or ill-formatted data to output will cause the test cases to fail
'''
# Write your code here
def arr():
return []
def bfs(g,a,b,n):
vis=[]
q=[a]
parent={}
while(len(q)>0):
t = q.pop(0)
vis.append(t)
n+=1
for i in g.get(t,[]):
if i not in vis:
parent[i]=t
if i==b:
return n+1,parent
q.append(i)
return -1,{}
n,m,t,c = map(int,input().split())
g = {}
for _ in range(m):
a,b = map(int,input().split())
if g.get(a)==None:
g[a]=[]
if g.get(b)==None:
g[b]=[]
g[a].append(b)
g[b].append(a)
c,p=bfs(g,1,n,0)
print(c)
pp=[n]
s=n
while(p.get(s)!=None):
pp.append(p.get(s))
s=p.get(s)
pp.reverse()
print(" ".join(map(str,pp)))
| """
# Sample code to perform I/O:
name = input() # Reading input from STDIN
print('Hi, %s.' % name) # Writing output to STDOUT
# Warning: Printing unwanted or ill-formatted data to output will cause the test cases to fail
"""
def arr():
return []
def bfs(g, a, b, n):
vis = []
q = [a]
parent = {}
while len(q) > 0:
t = q.pop(0)
vis.append(t)
n += 1
for i in g.get(t, []):
if i not in vis:
parent[i] = t
if i == b:
return (n + 1, parent)
q.append(i)
return (-1, {})
(n, m, t, c) = map(int, input().split())
g = {}
for _ in range(m):
(a, b) = map(int, input().split())
if g.get(a) == None:
g[a] = []
if g.get(b) == None:
g[b] = []
g[a].append(b)
g[b].append(a)
(c, p) = bfs(g, 1, n, 0)
print(c)
pp = [n]
s = n
while p.get(s) != None:
pp.append(p.get(s))
s = p.get(s)
pp.reverse()
print(' '.join(map(str, pp))) |
class Solution:
def convert(self, s: str, numRows: int) -> str:
if numRows == 1: return s
rows = [''] * min(numRows, len(s))
cur_row = 0
goind_down = False
for c in s:
rows[cur_row] += c
if cur_row == 0 or cur_row == numRows - 1:
goind_down = not goind_down
cur_row += 1 if goind_down else -1
result = ''
for row in rows:
result += row
return result
| class Solution:
def convert(self, s: str, numRows: int) -> str:
if numRows == 1:
return s
rows = [''] * min(numRows, len(s))
cur_row = 0
goind_down = False
for c in s:
rows[cur_row] += c
if cur_row == 0 or cur_row == numRows - 1:
goind_down = not goind_down
cur_row += 1 if goind_down else -1
result = ''
for row in rows:
result += row
return result |
class LowPassFilter(object):
def __init__(self, lpf_constants):
self.tau = lpf_constants[0]
self.ts = lpf_constants[1]
self.a = 1. / (self.tau / self.ts + 1.)
self.b = self.tau / self.ts / (self.tau / self.ts + 1.);
self.last_val = 0.
self.ready = False
def get(self):
return self.last_val
def filt(self, val):
if self.ready:
val = self.a * val + self.b * self.last_val
else:
self.ready = True
self.last_val = val
return val
| class Lowpassfilter(object):
def __init__(self, lpf_constants):
self.tau = lpf_constants[0]
self.ts = lpf_constants[1]
self.a = 1.0 / (self.tau / self.ts + 1.0)
self.b = self.tau / self.ts / (self.tau / self.ts + 1.0)
self.last_val = 0.0
self.ready = False
def get(self):
return self.last_val
def filt(self, val):
if self.ready:
val = self.a * val + self.b * self.last_val
else:
self.ready = True
self.last_val = val
return val |
'''
Problem Statement : Write a function that returns the boolean True if the given number is zero, the string "positive" if the number is greater than zero or the string "negative" if it's smaller than zero.
Problem Link : https://edabit.com/challenge/2TdPmSpLpa8NWh6m9
'''
def equilibrium(x):
return not x or ('negative', 'positive')[x > 0]
| """
Problem Statement : Write a function that returns the boolean True if the given number is zero, the string "positive" if the number is greater than zero or the string "negative" if it's smaller than zero.
Problem Link : https://edabit.com/challenge/2TdPmSpLpa8NWh6m9
"""
def equilibrium(x):
return not x or ('negative', 'positive')[x > 0] |
class Solution:
def findShortestSubArray(self, nums):
first, count, res, degree = {}, {}, 0, 0
for i, num in enumerate(nums):
first.setdefault(num, i)
count[num] = count.get(num, 0) + 1
if count[num] > degree:
degree = count[num]
res = i - first[num] + 1
elif count[num] == degree:
res = min(res, i - first[num] + 1)
return res
s = Solution()
print(s.findShortestSubArray([]))
print(s.findShortestSubArray([1]))
print(s.findShortestSubArray([1, 2, 2, 3, 1]))
print(s.findShortestSubArray([1, 2, 2, 3, 1, 4, 2]))
| class Solution:
def find_shortest_sub_array(self, nums):
(first, count, res, degree) = ({}, {}, 0, 0)
for (i, num) in enumerate(nums):
first.setdefault(num, i)
count[num] = count.get(num, 0) + 1
if count[num] > degree:
degree = count[num]
res = i - first[num] + 1
elif count[num] == degree:
res = min(res, i - first[num] + 1)
return res
s = solution()
print(s.findShortestSubArray([]))
print(s.findShortestSubArray([1]))
print(s.findShortestSubArray([1, 2, 2, 3, 1]))
print(s.findShortestSubArray([1, 2, 2, 3, 1, 4, 2])) |
DISCORD_API_BASE_URL = "https://discord.com/api"
DISCORD_AUTHORIZATION_BASE_URL = DISCORD_API_BASE_URL + "/oauth2/authorize"
DISCORD_TOKEN_URL = DISCORD_API_BASE_URL + "/oauth2/token"
DISCORD_OAUTH_ALL_SCOPES = [
"bot", "connections", "email", "identify", "guilds", "guilds.join",
"gdm.join", "messages.read", "rpc", "rpc.api", "rpc.notifications.read", "webhook.incoming",
]
DISCORD_OAUTH_DEFAULT_SCOPES = [
"identify", "email", "guilds", "guilds.join"
]
DISCORD_PASSTHROUGH_SCOPES = [
"bot", "webhook.incoming",
]
DISCORD_IMAGE_BASE_URL = "https://cdn.discordapp.com/"
DISCORD_EMBED_BASE_BASE_URL = "https://cdn.discordapp.com/"
DISCORD_IMAGE_FORMAT = "png"
DISCORD_ANIMATED_IMAGE_FORMAT = "gif"
DISCORD_USER_AVATAR_BASE_URL = DISCORD_IMAGE_BASE_URL + "avatars/{user_id}/{avatar_hash}.{format}"
DISCORD_DEFAULT_USER_AVATAR_BASE_URL = DISCORD_EMBED_BASE_BASE_URL + "embed/avatars/{modulo5}.png"
DISCORD_GUILD_ICON_BASE_URL = DISCORD_IMAGE_BASE_URL + "icons/{guild_id}/{icon_hash}.png"
DISCORD_USERS_CACHE_DEFAULT_MAX_LIMIT = 100
| discord_api_base_url = 'https://discord.com/api'
discord_authorization_base_url = DISCORD_API_BASE_URL + '/oauth2/authorize'
discord_token_url = DISCORD_API_BASE_URL + '/oauth2/token'
discord_oauth_all_scopes = ['bot', 'connections', 'email', 'identify', 'guilds', 'guilds.join', 'gdm.join', 'messages.read', 'rpc', 'rpc.api', 'rpc.notifications.read', 'webhook.incoming']
discord_oauth_default_scopes = ['identify', 'email', 'guilds', 'guilds.join']
discord_passthrough_scopes = ['bot', 'webhook.incoming']
discord_image_base_url = 'https://cdn.discordapp.com/'
discord_embed_base_base_url = 'https://cdn.discordapp.com/'
discord_image_format = 'png'
discord_animated_image_format = 'gif'
discord_user_avatar_base_url = DISCORD_IMAGE_BASE_URL + 'avatars/{user_id}/{avatar_hash}.{format}'
discord_default_user_avatar_base_url = DISCORD_EMBED_BASE_BASE_URL + 'embed/avatars/{modulo5}.png'
discord_guild_icon_base_url = DISCORD_IMAGE_BASE_URL + 'icons/{guild_id}/{icon_hash}.png'
discord_users_cache_default_max_limit = 100 |
CSRF_ENABLED = True
SECRET_KEY = 'blabla'
DOCUMENTDB_HOST = 'https://mongo-olx.documents.azure.com:443/'
DOCUMENTDB_KEY = 'hJJaII1eaMs2wUHNqvjDkzRF3wOz24x8x/J7+Zfw2D91KM/LTjNXcVg8WgMV2JiaNGuTnsnInSmO8jrqDRGw/g=='
DOCUMENTDB_DATABASE = 'olxDB'
DOCUMENTDB_COLLECTION = 'rentals'
DOCUMENTDB_DOCUMENT = 'rent-doc' | csrf_enabled = True
secret_key = 'blabla'
documentdb_host = 'https://mongo-olx.documents.azure.com:443/'
documentdb_key = 'hJJaII1eaMs2wUHNqvjDkzRF3wOz24x8x/J7+Zfw2D91KM/LTjNXcVg8WgMV2JiaNGuTnsnInSmO8jrqDRGw/g=='
documentdb_database = 'olxDB'
documentdb_collection = 'rentals'
documentdb_document = 'rent-doc' |
class Solution:
def numMovesStones(self, a: int, b: int, c: int) -> List[int]:
temp = [a,b,c]
temp.sort()
d1, d2 = temp[1] - temp[0], temp[2] - temp[1]
if d1 == 1 and d2 == 1:
return [0, 0]
elif d1 == 1 or d2 == 1:
return [1, max(d1, d2)-1]
elif d1 == 2 and d2 == 2:
return [1, 2]
elif d1 == 2 or d2 == 2:
return [1, d1+d2-2]
else:
return [2, d1+d2-2]
| class Solution:
def num_moves_stones(self, a: int, b: int, c: int) -> List[int]:
temp = [a, b, c]
temp.sort()
(d1, d2) = (temp[1] - temp[0], temp[2] - temp[1])
if d1 == 1 and d2 == 1:
return [0, 0]
elif d1 == 1 or d2 == 1:
return [1, max(d1, d2) - 1]
elif d1 == 2 and d2 == 2:
return [1, 2]
elif d1 == 2 or d2 == 2:
return [1, d1 + d2 - 2]
else:
return [2, d1 + d2 - 2] |
class GST_Company():
def __init__(self, gstno, rate,pos,st):
self.GSTNO = gstno
self.RATE = rate
self.POS=pos
self.ST=st
self.__taxable = 0.00
self.__cgst = 0.00
self.__sgst = 0.00
self.__igst = 0.00
self.__cess = 0
self.__total = 0.00
def updata_invoice(self, taxable, cgst, sgst, igst,cess):
self.__taxable += taxable
self.__cgst += cgst
self.__sgst += sgst
self.__igst += igst
self.__cess+= cess
self.__total += (taxable + cgst + sgst + igst + cess)
def generate_output(self):
return [
self.GSTNO, self.POS,self.ST,self.__taxable, self.RATE, self.__igst, self.__cgst, self.__sgst,self.__cess,
self.__total
]
def test(self):
return self.__taxable
@classmethod
def from_dict(cls,df_dict):
return cls(df_dict['GSTNO'],df_dict['RATE'],df_dict['POS'],df_dict['ST']) | class Gst_Company:
def __init__(self, gstno, rate, pos, st):
self.GSTNO = gstno
self.RATE = rate
self.POS = pos
self.ST = st
self.__taxable = 0.0
self.__cgst = 0.0
self.__sgst = 0.0
self.__igst = 0.0
self.__cess = 0
self.__total = 0.0
def updata_invoice(self, taxable, cgst, sgst, igst, cess):
self.__taxable += taxable
self.__cgst += cgst
self.__sgst += sgst
self.__igst += igst
self.__cess += cess
self.__total += taxable + cgst + sgst + igst + cess
def generate_output(self):
return [self.GSTNO, self.POS, self.ST, self.__taxable, self.RATE, self.__igst, self.__cgst, self.__sgst, self.__cess, self.__total]
def test(self):
return self.__taxable
@classmethod
def from_dict(cls, df_dict):
return cls(df_dict['GSTNO'], df_dict['RATE'], df_dict['POS'], df_dict['ST']) |
parameters = {
# Add entry for each state variable to check; number is tolerance
"alpha": 0.0,
"b": 0.0,
"d1c": 0.0,
"d1t": 0.0,
"d2": 0.0,
"fb1": 0.0,
"fb2": 0.0,
"fb3": 0.0,
"nstatev": 0,
"phi0_12": 0.0,
} | parameters = {'alpha': 0.0, 'b': 0.0, 'd1c': 0.0, 'd1t': 0.0, 'd2': 0.0, 'fb1': 0.0, 'fb2': 0.0, 'fb3': 0.0, 'nstatev': 0, 'phi0_12': 0.0} |
class Stack:
def __init__(self):
self.queue = []
def enqueue(self, element):
self.queue
# [3,2,1]
def dequeue(self):
queue_helper = []
while len(self.queue) != 1:
x = self.queue.pop()
queue_helper.append(x)
temp = self.queue.pop()
while queue_helper:
x = queue_helper.pop()
self.queue.append(x)
return temp
stack = Stack()
stack.enqueue(1)
stack.enqueue(2)
stack.enqueue(3)
print(stack.dequeue())
| class Stack:
def __init__(self):
self.queue = []
def enqueue(self, element):
self.queue
def dequeue(self):
queue_helper = []
while len(self.queue) != 1:
x = self.queue.pop()
queue_helper.append(x)
temp = self.queue.pop()
while queue_helper:
x = queue_helper.pop()
self.queue.append(x)
return temp
stack = stack()
stack.enqueue(1)
stack.enqueue(2)
stack.enqueue(3)
print(stack.dequeue()) |
class SRTError(Exception):
def __init__(self, msg):
self.msg = msg
def __str__(self):
return self.msg
class SRTLoginError(SRTError):
def __init__(self, msg="Login failed, please check ID/PW"):
super().__init__(msg)
class SRTResponseError(SRTError):
def __init__(self, msg):
super().__init__(msg)
class SRTDuplicateError(SRTResponseError):
def __init__(self, msg):
super().__init__(msg)
class SRTNotLoggedInError(SRTError):
def __init__(self):
super().__init__("Not logged in")
| class Srterror(Exception):
def __init__(self, msg):
self.msg = msg
def __str__(self):
return self.msg
class Srtloginerror(SRTError):
def __init__(self, msg='Login failed, please check ID/PW'):
super().__init__(msg)
class Srtresponseerror(SRTError):
def __init__(self, msg):
super().__init__(msg)
class Srtduplicateerror(SRTResponseError):
def __init__(self, msg):
super().__init__(msg)
class Srtnotloggedinerror(SRTError):
def __init__(self):
super().__init__('Not logged in') |
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
#
version_info = (0, 15, 0)
__version__ = '%s.%s.%s' % (version_info[0], version_info[1], version_info[2])
EXTENSION_VERSION = '^0.15.0'
| version_info = (0, 15, 0)
__version__ = '%s.%s.%s' % (version_info[0], version_info[1], version_info[2])
extension_version = '^0.15.0' |
#!/usr/bin/env python
log_dir = os.environ['LOG_DIR']
admin_server_listen_address = os.environ['ADMIN_SERVER_LISTEN_ADDRESS']
admin_server_listen_port = os.environ['ADMIN_SERVER_LISTEN_PORT']
admin_username = os.environ['ADMIN_USERNAME']
admin_password = os.environ['ADMIN_PASSWORD']
managed_server_name = os.environ['MANAGED_SERVER_NAME']
######################################################################
def set_server_access_log_config(_log_dir, _server_name):
cd('/Servers/' + _server_name + '/WebServer/' + _server_name + '/WebServerLog/' + _server_name)
cmo.setLoggingEnabled(True)
cmo.setFileName(_log_dir + '/' + _server_name + '/' +
'access.' + _server_name + '.%%yyyy%%%%MM%%%%dd%%_%%HH%%%%mm%%%%ss%%.log')
# cmo.setFileName('/dev/null')
cmo.setRotationType('byTime')
cmo.setRotationTime('00:00')
cmo.setFileTimeSpan(24)
cmo.setNumberOfFilesLimited(True)
cmo.setFileCount(30)
cmo.setRotateLogOnStartup(False)
cmo.setLogFileFormat('common')
# cmo.setLogFileFormat('extended')
cmo.setELFFields('date time cs-method cs-uri sc-status')
cmo.setBufferSizeKB(0)
cmo.setLogTimeInGMT(False)
######################################################################
admin_server_url = 't3://' + admin_server_listen_address + ':' + admin_server_listen_port
connect(admin_username, admin_password, admin_server_url)
edit()
startEdit()
domain_version = cmo.getDomainVersion()
set_server_access_log_config(log_dir, managed_server_name)
save()
activate()
exit()
| log_dir = os.environ['LOG_DIR']
admin_server_listen_address = os.environ['ADMIN_SERVER_LISTEN_ADDRESS']
admin_server_listen_port = os.environ['ADMIN_SERVER_LISTEN_PORT']
admin_username = os.environ['ADMIN_USERNAME']
admin_password = os.environ['ADMIN_PASSWORD']
managed_server_name = os.environ['MANAGED_SERVER_NAME']
def set_server_access_log_config(_log_dir, _server_name):
cd('/Servers/' + _server_name + '/WebServer/' + _server_name + '/WebServerLog/' + _server_name)
cmo.setLoggingEnabled(True)
cmo.setFileName(_log_dir + '/' + _server_name + '/' + 'access.' + _server_name + '.%%yyyy%%%%MM%%%%dd%%_%%HH%%%%mm%%%%ss%%.log')
cmo.setRotationType('byTime')
cmo.setRotationTime('00:00')
cmo.setFileTimeSpan(24)
cmo.setNumberOfFilesLimited(True)
cmo.setFileCount(30)
cmo.setRotateLogOnStartup(False)
cmo.setLogFileFormat('common')
cmo.setELFFields('date time cs-method cs-uri sc-status')
cmo.setBufferSizeKB(0)
cmo.setLogTimeInGMT(False)
admin_server_url = 't3://' + admin_server_listen_address + ':' + admin_server_listen_port
connect(admin_username, admin_password, admin_server_url)
edit()
start_edit()
domain_version = cmo.getDomainVersion()
set_server_access_log_config(log_dir, managed_server_name)
save()
activate()
exit() |
# -*- coding: utf-8 -*-
def env_comment(env,comment=''):
if env.get('fwuser_info') and not env['fwuser_info'].get('lock'):
env['fwuser_info']['comment'] = comment
env['fwuser_info']['lock'] = True | def env_comment(env, comment=''):
if env.get('fwuser_info') and (not env['fwuser_info'].get('lock')):
env['fwuser_info']['comment'] = comment
env['fwuser_info']['lock'] = True |
balance = 320000
annualInterestRate = 0.2
monthlyInterestRate = (annualInterestRate) / 12
epsilon = 0.01
lowerBound = balance / 12
upperBound = (balance * (1 + monthlyInterestRate)**12) / 12
ans = (upperBound + lowerBound)/2.0
newBalance = balance
while abs(0 - newBalance) >= epsilon:
newBalance = balance
for i in range(0, 12):
newBalance = round(((newBalance - ans) * (1 + monthlyInterestRate)), 2)
if newBalance >= 0:
lowerBound = ans
else:
upperBound = ans
ans = (upperBound + lowerBound)/2.0
print("Lowest Payment: " + str(round(ans, 2)))
| balance = 320000
annual_interest_rate = 0.2
monthly_interest_rate = annualInterestRate / 12
epsilon = 0.01
lower_bound = balance / 12
upper_bound = balance * (1 + monthlyInterestRate) ** 12 / 12
ans = (upperBound + lowerBound) / 2.0
new_balance = balance
while abs(0 - newBalance) >= epsilon:
new_balance = balance
for i in range(0, 12):
new_balance = round((newBalance - ans) * (1 + monthlyInterestRate), 2)
if newBalance >= 0:
lower_bound = ans
else:
upper_bound = ans
ans = (upperBound + lowerBound) / 2.0
print('Lowest Payment: ' + str(round(ans, 2))) |
# DO NOT LOAD THIS FILE. Targets from this file should be considered private
# and not used outside of the @envoy//bazel package.
load(":envoy_select.bzl", "envoy_select_google_grpc", "envoy_select_hot_restart")
# Compute the final copts based on various options.
def envoy_copts(repository, test = False):
posix_options = [
"-Wall",
"-Wextra",
"-Werror",
"-Wnon-virtual-dtor",
"-Woverloaded-virtual",
"-Wold-style-cast",
"-Wvla",
"-std=c++14",
]
# Windows options for cleanest service compilation;
# General MSVC C++ options
# Streamline windows.h behavior for Win8+ API (for ntohll, see;
# https://msdn.microsoft.com/en-us/library/windows/desktop/aa383745(v=vs.85).aspx )
# Minimize Win32 API, dropping GUI-oriented features
msvc_options = [
"-WX",
"-Zc:__cplusplus",
"-std:c++14",
"-DWIN32",
"-D_WIN32_WINNT=0x0602",
"-DNTDDI_VERSION=0x06020000",
"-DWIN32_LEAN_AND_MEAN",
"-DNOUSER",
"-DNOMCX",
"-DNOIME",
]
return select({
repository + "//bazel:windows_x86_64": msvc_options,
"//conditions:default": posix_options,
}) + select({
# Bazel adds an implicit -DNDEBUG for opt.
repository + "//bazel:opt_build": [] if test else ["-ggdb3"],
repository + "//bazel:fastbuild_build": [],
repository + "//bazel:dbg_build": ["-ggdb3"],
repository + "//bazel:windows_opt_build": [],
repository + "//bazel:windows_fastbuild_build": [],
repository + "//bazel:windows_dbg_build": [],
}) + select({
repository + "//bazel:clang_build": ["-fno-limit-debug-info", "-Wgnu-conditional-omitted-operand"],
repository + "//bazel:gcc_build": ["-Wno-maybe-uninitialized"],
"//conditions:default": [],
}) + select({
repository + "//bazel:disable_tcmalloc": ["-DABSL_MALLOC_HOOK_MMAP_DISABLE"],
"//conditions:default": ["-DTCMALLOC"],
}) + select({
repository + "//bazel:debug_tcmalloc": ["-DENVOY_MEMORY_DEBUG_ENABLED=1"],
"//conditions:default": [],
}) + select({
repository + "//bazel:disable_signal_trace": [],
"//conditions:default": ["-DENVOY_HANDLE_SIGNALS"],
}) + select({
repository + "//bazel:disable_object_dump_on_signal_trace": [],
"//conditions:default": ["-DENVOY_OBJECT_TRACE_ON_DUMP"],
}) + select({
repository + "//bazel:disable_deprecated_features": ["-DENVOY_DISABLE_DEPRECATED_FEATURES"],
"//conditions:default": [],
}) + select({
repository + "//bazel:enable_log_debug_assert_in_release": ["-DENVOY_LOG_DEBUG_ASSERT_IN_RELEASE"],
"//conditions:default": [],
}) + select({
# APPLE_USE_RFC_3542 is needed to support IPV6_PKTINFO in MAC OS.
repository + "//bazel:apple": ["-D__APPLE_USE_RFC_3542"],
"//conditions:default": [],
}) + envoy_select_hot_restart(["-DENVOY_HOT_RESTART"], repository) + \
_envoy_select_perf_annotation(["-DENVOY_PERF_ANNOTATION"]) + \
envoy_select_google_grpc(["-DENVOY_GOOGLE_GRPC"], repository) + \
_envoy_select_path_normalization_by_default(["-DENVOY_NORMALIZE_PATH_BY_DEFAULT"], repository)
# References to Envoy external dependencies should be wrapped with this function.
def envoy_external_dep_path(dep):
return "//external:%s" % dep
def envoy_linkstatic():
return select({
"@envoy//bazel:dynamic_link_tests": 0,
"//conditions:default": 1,
})
def envoy_select_force_libcpp(if_libcpp, default = None):
return select({
"@envoy//bazel:force_libcpp": if_libcpp,
"@envoy//bazel:apple": [],
"@envoy//bazel:windows_x86_64": [],
"//conditions:default": default or [],
})
def envoy_stdlib_deps():
return select({
"@envoy//bazel:asan_build": ["@envoy//bazel:dynamic_stdlib"],
"@envoy//bazel:tsan_build": ["@envoy//bazel:dynamic_stdlib"],
"//conditions:default": ["@envoy//bazel:static_stdlib"],
})
# Dependencies on tcmalloc_and_profiler should be wrapped with this function.
def tcmalloc_external_dep(repository):
return select({
repository + "//bazel:disable_tcmalloc": None,
"//conditions:default": envoy_external_dep_path("gperftools"),
})
# Select the given values if default path normalization is on in the current build.
def _envoy_select_path_normalization_by_default(xs, repository = ""):
return select({
repository + "//bazel:enable_path_normalization_by_default": xs,
"//conditions:default": [],
})
def _envoy_select_perf_annotation(xs):
return select({
"@envoy//bazel:enable_perf_annotation": xs,
"//conditions:default": [],
})
| load(':envoy_select.bzl', 'envoy_select_google_grpc', 'envoy_select_hot_restart')
def envoy_copts(repository, test=False):
posix_options = ['-Wall', '-Wextra', '-Werror', '-Wnon-virtual-dtor', '-Woverloaded-virtual', '-Wold-style-cast', '-Wvla', '-std=c++14']
msvc_options = ['-WX', '-Zc:__cplusplus', '-std:c++14', '-DWIN32', '-D_WIN32_WINNT=0x0602', '-DNTDDI_VERSION=0x06020000', '-DWIN32_LEAN_AND_MEAN', '-DNOUSER', '-DNOMCX', '-DNOIME']
return select({repository + '//bazel:windows_x86_64': msvc_options, '//conditions:default': posix_options}) + select({repository + '//bazel:opt_build': [] if test else ['-ggdb3'], repository + '//bazel:fastbuild_build': [], repository + '//bazel:dbg_build': ['-ggdb3'], repository + '//bazel:windows_opt_build': [], repository + '//bazel:windows_fastbuild_build': [], repository + '//bazel:windows_dbg_build': []}) + select({repository + '//bazel:clang_build': ['-fno-limit-debug-info', '-Wgnu-conditional-omitted-operand'], repository + '//bazel:gcc_build': ['-Wno-maybe-uninitialized'], '//conditions:default': []}) + select({repository + '//bazel:disable_tcmalloc': ['-DABSL_MALLOC_HOOK_MMAP_DISABLE'], '//conditions:default': ['-DTCMALLOC']}) + select({repository + '//bazel:debug_tcmalloc': ['-DENVOY_MEMORY_DEBUG_ENABLED=1'], '//conditions:default': []}) + select({repository + '//bazel:disable_signal_trace': [], '//conditions:default': ['-DENVOY_HANDLE_SIGNALS']}) + select({repository + '//bazel:disable_object_dump_on_signal_trace': [], '//conditions:default': ['-DENVOY_OBJECT_TRACE_ON_DUMP']}) + select({repository + '//bazel:disable_deprecated_features': ['-DENVOY_DISABLE_DEPRECATED_FEATURES'], '//conditions:default': []}) + select({repository + '//bazel:enable_log_debug_assert_in_release': ['-DENVOY_LOG_DEBUG_ASSERT_IN_RELEASE'], '//conditions:default': []}) + select({repository + '//bazel:apple': ['-D__APPLE_USE_RFC_3542'], '//conditions:default': []}) + envoy_select_hot_restart(['-DENVOY_HOT_RESTART'], repository) + _envoy_select_perf_annotation(['-DENVOY_PERF_ANNOTATION']) + envoy_select_google_grpc(['-DENVOY_GOOGLE_GRPC'], repository) + _envoy_select_path_normalization_by_default(['-DENVOY_NORMALIZE_PATH_BY_DEFAULT'], repository)
def envoy_external_dep_path(dep):
return '//external:%s' % dep
def envoy_linkstatic():
return select({'@envoy//bazel:dynamic_link_tests': 0, '//conditions:default': 1})
def envoy_select_force_libcpp(if_libcpp, default=None):
return select({'@envoy//bazel:force_libcpp': if_libcpp, '@envoy//bazel:apple': [], '@envoy//bazel:windows_x86_64': [], '//conditions:default': default or []})
def envoy_stdlib_deps():
return select({'@envoy//bazel:asan_build': ['@envoy//bazel:dynamic_stdlib'], '@envoy//bazel:tsan_build': ['@envoy//bazel:dynamic_stdlib'], '//conditions:default': ['@envoy//bazel:static_stdlib']})
def tcmalloc_external_dep(repository):
return select({repository + '//bazel:disable_tcmalloc': None, '//conditions:default': envoy_external_dep_path('gperftools')})
def _envoy_select_path_normalization_by_default(xs, repository=''):
return select({repository + '//bazel:enable_path_normalization_by_default': xs, '//conditions:default': []})
def _envoy_select_perf_annotation(xs):
return select({'@envoy//bazel:enable_perf_annotation': xs, '//conditions:default': []}) |
#!/usr/bin/env python
# encoding: utf-8
def run(whatweb, pluginname):
whatweb.recog_from_header(pluginname, "django")
| def run(whatweb, pluginname):
whatweb.recog_from_header(pluginname, 'django') |
class Solution:
def checkString(self, s: str) -> bool:
a_indices = [i for i, x in enumerate(s) if x=='a']
try:
if a_indices[-1] > s.index('b'):
return False
except:
pass
return True
| class Solution:
def check_string(self, s: str) -> bool:
a_indices = [i for (i, x) in enumerate(s) if x == 'a']
try:
if a_indices[-1] > s.index('b'):
return False
except:
pass
return True |
# [Job Adv] (Lv.30) Way of the Bandit
darkMarble = 4031013
job = "Night Lord"
sm.setSpeakerID(1052001)
if sm.hasItem(darkMarble, 30):
sm.sendNext("I am impressed, you surpassed the test. Only few are talented enough.\r\n"
"You have proven yourself to be worthy, I shall mold your body into a #b"+ job +"#k.")
else:
sm.sendSayOkay("You have not retrieved the #t"+ darkMarble+"#s yet, I will be waiting.")
sm.dispose()
sm.consumeItem(darkMarble, 30)
sm.completeQuestNoRewards(parentID)
sm.jobAdvance(420) # Bandit
sm.sendNext("You are now a #b"+ job +"#k.")
sm.dispose()
| dark_marble = 4031013
job = 'Night Lord'
sm.setSpeakerID(1052001)
if sm.hasItem(darkMarble, 30):
sm.sendNext('I am impressed, you surpassed the test. Only few are talented enough.\r\nYou have proven yourself to be worthy, I shall mold your body into a #b' + job + '#k.')
else:
sm.sendSayOkay('You have not retrieved the #t' + darkMarble + '#s yet, I will be waiting.')
sm.dispose()
sm.consumeItem(darkMarble, 30)
sm.completeQuestNoRewards(parentID)
sm.jobAdvance(420)
sm.sendNext('You are now a #b' + job + '#k.')
sm.dispose() |
INDEX_HEADER_SIZE = 16
INDEX_RECORD_SIZE = 41
META_HEADER_SIZE = 32
kMinMetadataRead = 1024
kChunkSize = 256 * 1024
kMaxElementsSize = 64 * 1024
kAlignSize = 4096 | index_header_size = 16
index_record_size = 41
meta_header_size = 32
k_min_metadata_read = 1024
k_chunk_size = 256 * 1024
k_max_elements_size = 64 * 1024
k_align_size = 4096 |
#!/usr/bin python
dec1 = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
enc1 = "EICTDGYIYZKTHNSIRFXYCPFUEOCKRNEICTDGYIYZKTHNSIRFXYCPFUEOCKRNEI"
dec2 = "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"
enc2 = "FJDUEHZJZALUIOTJSGYZDQGVFPDLSOFJDUEHZJZALUIOTJSG"
with open("krypton7", 'r') as handle:
flag = handle.read()
#key1 = "".join([chr(ord(dec1[i]) ^ ord(enc1[i])) for i in range(len(dec1))])
key1 = [ord(dec1[i]) - ord(enc1[i]) % 26 for i in range(len(dec1))]
#decrypted = "".join([chr(ord(flag[i]) ^ ord(key[i])) for i in range(len(flag))])
decrypted = "".join([chr(((ord(flag[i]) - ord('A') + key1[i]) % 26) + ord('A')) for i in range(len(flag))])
print(decrypted) | dec1 = 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'
enc1 = 'EICTDGYIYZKTHNSIRFXYCPFUEOCKRNEICTDGYIYZKTHNSIRFXYCPFUEOCKRNEI'
dec2 = 'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB'
enc2 = 'FJDUEHZJZALUIOTJSGYZDQGVFPDLSOFJDUEHZJZALUIOTJSG'
with open('krypton7', 'r') as handle:
flag = handle.read()
key1 = [ord(dec1[i]) - ord(enc1[i]) % 26 for i in range(len(dec1))]
decrypted = ''.join([chr((ord(flag[i]) - ord('A') + key1[i]) % 26 + ord('A')) for i in range(len(flag))])
print(decrypted) |
# -*- coding: utf-8 -*-
class IRI:
MAINNET_COORDINATOR = ''
| class Iri:
mainnet_coordinator = '' |
MAX_FACTOR = 20 # avoid weirdness with python's arbitary integer precision
MAX_WAIT = 60 * 60 # 1 hour
class Backoff():
def __init__(self, initial=None, base=2, exp=2, max=MAX_WAIT, attempts=None):
self._attempts = attempts
self._initial = initial
self._start = base
self._max = max
self._exp = exp
self._counter = 0
def reset(self):
self._counter = 0
def peek(self):
exp = self._counter - 1
if self._counter == 1 and self._initial is not None:
return self._initial
elif self._initial is not None:
exp -= 1
exp = min(exp, MAX_FACTOR)
computed = self._start * pow(self._exp, exp)
if self._max:
computed = min(self._max, computed)
return computed
def backoff(self, error):
if self._attempts and self._counter >= self._attempts:
raise error
self._counter += 1
return self.peek()
| max_factor = 20
max_wait = 60 * 60
class Backoff:
def __init__(self, initial=None, base=2, exp=2, max=MAX_WAIT, attempts=None):
self._attempts = attempts
self._initial = initial
self._start = base
self._max = max
self._exp = exp
self._counter = 0
def reset(self):
self._counter = 0
def peek(self):
exp = self._counter - 1
if self._counter == 1 and self._initial is not None:
return self._initial
elif self._initial is not None:
exp -= 1
exp = min(exp, MAX_FACTOR)
computed = self._start * pow(self._exp, exp)
if self._max:
computed = min(self._max, computed)
return computed
def backoff(self, error):
if self._attempts and self._counter >= self._attempts:
raise error
self._counter += 1
return self.peek() |
def main():
decimal = str(input())
number = float(decimal)
last = int(decimal[-1])
if last == 7:
number += 0.02
elif last % 2 == 1:
number -= 0.09
elif last > 7:
number -= 4
elif last < 4:
number += 6.78
print(f"{number:.2f}")
if __name__ == "__main__":
main()
| def main():
decimal = str(input())
number = float(decimal)
last = int(decimal[-1])
if last == 7:
number += 0.02
elif last % 2 == 1:
number -= 0.09
elif last > 7:
number -= 4
elif last < 4:
number += 6.78
print(f'{number:.2f}')
if __name__ == '__main__':
main() |
print("Hi, I'm a module!")
raise Exception(
"This module-level exception should also not occur during freeze"
)
| print("Hi, I'm a module!")
raise exception('This module-level exception should also not occur during freeze') |
GENCONF_DIR = 'genconf'
CONFIG_PATH = GENCONF_DIR + '/config.yaml'
SSH_KEY_PATH = GENCONF_DIR + '/ssh_key'
IP_DETECT_PATH = GENCONF_DIR + '/ip-detect'
CLUSTER_PACKAGES_PATH = GENCONF_DIR + '/cluster_packages.json'
SERVE_DIR = GENCONF_DIR + '/serve'
STATE_DIR = GENCONF_DIR + '/state'
BOOTSTRAP_DIR = SERVE_DIR + '/bootstrap'
PACKAGE_LIST_DIR = SERVE_DIR + '/package_lists'
ARTIFACT_DIR = 'artifacts'
CHECK_RUNNER_CMD = '/opt/mesosphere/bin/dcos-diagnostics check'
| genconf_dir = 'genconf'
config_path = GENCONF_DIR + '/config.yaml'
ssh_key_path = GENCONF_DIR + '/ssh_key'
ip_detect_path = GENCONF_DIR + '/ip-detect'
cluster_packages_path = GENCONF_DIR + '/cluster_packages.json'
serve_dir = GENCONF_DIR + '/serve'
state_dir = GENCONF_DIR + '/state'
bootstrap_dir = SERVE_DIR + '/bootstrap'
package_list_dir = SERVE_DIR + '/package_lists'
artifact_dir = 'artifacts'
check_runner_cmd = '/opt/mesosphere/bin/dcos-diagnostics check' |
class Solution:
def isStrobogrammatic(self, num: str) -> bool:
rotated = ['0', '1', 'x', 'x', 'x',
'x', '9', 'x', '8', '6']
l = 0
r = len(num) - 1
while l <= r:
if num[l] != rotated[ord(num[r]) - ord('0')]:
return False
l += 1
r -= 1
return True
| class Solution:
def is_strobogrammatic(self, num: str) -> bool:
rotated = ['0', '1', 'x', 'x', 'x', 'x', '9', 'x', '8', '6']
l = 0
r = len(num) - 1
while l <= r:
if num[l] != rotated[ord(num[r]) - ord('0')]:
return False
l += 1
r -= 1
return True |
# coding: utf-8
COLORS = {
'green': '\033[22;32m',
'boldblue': '\033[01;34m',
'purple': '\033[22;35m',
'red': '\033[22;31m',
'boldred': '\033[01;31m',
'normal': '\033[0;0m'
}
class Logger:
def __init__(self):
self.verbose = False
@staticmethod
def _print_msg(msg: str, color: str=None):
if color is None or color not in COLORS:
print(msg)
else:
print('{colorcode}{msg}\033[0;0m'.format(colorcode=COLORS[color], msg=msg))
def debug(self, msg: str):
if self.verbose:
msg = '[DD] {}'.format(msg)
self._print_msg(msg, 'normal')
def info(self, msg: str):
msg = '[II] {}'.format(msg)
self._print_msg(msg, 'green')
def warning(self, msg: str):
msg = '[WW] {}'.format(msg)
self._print_msg(msg, 'red')
def error(self, msg: str, exitcode: int=255):
msg = '[EE] {}'.format(msg)
self._print_msg(msg, 'boldred')
exit(exitcode)
@staticmethod
def ask(msg: str):
msg = '[??] {}'.format(msg)
question = '{colorcode}{msg} : \033[0;0m'.format(colorcode=COLORS['boldblue'], msg=msg)
answer = input(question)
return answer.strip()
def ask_yesno(self, msg: str, default: str=None):
valid_answers = {
'y': True, 'yes': True,
'n': False, 'no': False
}
if (default is None) or (default.lower() not in valid_answers):
default = ''
else:
default = default.lower()
question = '{} (y/n)'.replace(default, default.upper()).format(msg)
answer = self.ask(question).lower()
if answer == '':
answer = default
while answer not in valid_answers:
answer = self.ask(question).lower()
return valid_answers[answer]
logger = Logger()
| colors = {'green': '\x1b[22;32m', 'boldblue': '\x1b[01;34m', 'purple': '\x1b[22;35m', 'red': '\x1b[22;31m', 'boldred': '\x1b[01;31m', 'normal': '\x1b[0;0m'}
class Logger:
def __init__(self):
self.verbose = False
@staticmethod
def _print_msg(msg: str, color: str=None):
if color is None or color not in COLORS:
print(msg)
else:
print('{colorcode}{msg}\x1b[0;0m'.format(colorcode=COLORS[color], msg=msg))
def debug(self, msg: str):
if self.verbose:
msg = '[DD] {}'.format(msg)
self._print_msg(msg, 'normal')
def info(self, msg: str):
msg = '[II] {}'.format(msg)
self._print_msg(msg, 'green')
def warning(self, msg: str):
msg = '[WW] {}'.format(msg)
self._print_msg(msg, 'red')
def error(self, msg: str, exitcode: int=255):
msg = '[EE] {}'.format(msg)
self._print_msg(msg, 'boldred')
exit(exitcode)
@staticmethod
def ask(msg: str):
msg = '[??] {}'.format(msg)
question = '{colorcode}{msg} : \x1b[0;0m'.format(colorcode=COLORS['boldblue'], msg=msg)
answer = input(question)
return answer.strip()
def ask_yesno(self, msg: str, default: str=None):
valid_answers = {'y': True, 'yes': True, 'n': False, 'no': False}
if default is None or default.lower() not in valid_answers:
default = ''
else:
default = default.lower()
question = '{} (y/n)'.replace(default, default.upper()).format(msg)
answer = self.ask(question).lower()
if answer == '':
answer = default
while answer not in valid_answers:
answer = self.ask(question).lower()
return valid_answers[answer]
logger = logger() |
#
# PySNMP MIB module INTELLANDESKSERVERMANAGER-LOCALRESPONSEAMAPPER-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/INTELLANDESKSERVERMANAGER-LOCALRESPONSEAMAPPER-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 19:44:05 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
SingleValueConstraint, ConstraintsUnion, ValueSizeConstraint, ValueRangeConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ConstraintsUnion", "ValueSizeConstraint", "ValueRangeConstraint", "ConstraintsIntersection")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
iso, IpAddress, Unsigned32, MibScalar, MibTable, MibTableRow, MibTableColumn, Counter32, ObjectIdentity, MibIdentifier, Gauge32, Integer32, NotificationType, ModuleIdentity, enterprises, TimeTicks, Bits, Counter64 = mibBuilder.importSymbols("SNMPv2-SMI", "iso", "IpAddress", "Unsigned32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter32", "ObjectIdentity", "MibIdentifier", "Gauge32", "Integer32", "NotificationType", "ModuleIdentity", "enterprises", "TimeTicks", "Bits", "Counter64")
DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention")
class DmiInteger(Integer32):
pass
class DmiDisplaystring(DisplayString):
pass
class DmiDateX(OctetString):
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(28, 28)
fixedLength = 28
class DmiComponentIndex(Integer32):
pass
intel = MibIdentifier((1, 3, 6, 1, 4, 1, 343))
products = MibIdentifier((1, 3, 6, 1, 4, 1, 343, 2))
server_products = MibIdentifier((1, 3, 6, 1, 4, 1, 343, 2, 6)).setLabel("server-products")
dmtfGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 343, 2, 6, 7))
tNameTable = MibTable((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 5), )
if mibBuilder.loadTexts: tNameTable.setStatus('mandatory')
eNameTable = MibTableRow((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 5, 1), ).setIndexNames((0, "INTELLANDESKSERVERMANAGER-LOCALRESPONSEAMAPPER-MIB", "DmiComponentIndex"), (0, "INTELLANDESKSERVERMANAGER-LOCALRESPONSEAMAPPER-MIB", "a2MifId"))
if mibBuilder.loadTexts: eNameTable.setStatus('mandatory')
a2MifId = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 5, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 99))).clone(namedValues=NamedValues(("vUnknown", 0), ("vBaseboard", 1), ("vAdaptecScsi", 2), ("vMylexRaid", 3), ("vNic", 4), ("vUps", 5), ("vSymbiosSdms", 6), ("vAmiRaid", 7), ("vMylexGamRaid", 8), ("vAdaptecCioScsi", 9), ("vSymbiosScsi", 10), ("vIntelNic", 11), ("vTestmif", 99)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: a2MifId.setStatus('mandatory')
a2ComponentName = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 5, 1, 2), DmiDisplaystring()).setMaxAccess("readonly")
if mibBuilder.loadTexts: a2ComponentName.setStatus('mandatory')
tActionsTable = MibTable((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 6), )
if mibBuilder.loadTexts: tActionsTable.setStatus('mandatory')
eActionsTable = MibTableRow((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 6, 1), ).setIndexNames((0, "INTELLANDESKSERVERMANAGER-LOCALRESPONSEAMAPPER-MIB", "DmiComponentIndex"), (0, "INTELLANDESKSERVERMANAGER-LOCALRESPONSEAMAPPER-MIB", "a4RelatedMif"), (0, "INTELLANDESKSERVERMANAGER-LOCALRESPONSEAMAPPER-MIB", "a4Group"), (0, "INTELLANDESKSERVERMANAGER-LOCALRESPONSEAMAPPER-MIB", "a4Instance"), (0, "INTELLANDESKSERVERMANAGER-LOCALRESPONSEAMAPPER-MIB", "a4Attribute"), (0, "INTELLANDESKSERVERMANAGER-LOCALRESPONSEAMAPPER-MIB", "a4Value"), (0, "INTELLANDESKSERVERMANAGER-LOCALRESPONSEAMAPPER-MIB", "a4Severity"))
if mibBuilder.loadTexts: eActionsTable.setStatus('mandatory')
a4RelatedMif = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 6, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 99))).clone(namedValues=NamedValues(("vUnknown", 0), ("vBaseboard", 1), ("vAdaptecScsi", 2), ("vMylexRaid", 3), ("vNic", 4), ("vUps", 5), ("vSymbiosSdms", 6), ("vAmiRaid", 7), ("vMylexGamRaid", 8), ("vAdaptecCioScsi", 9), ("vSymbiosScsi", 10), ("vIntelNic", 11), ("vTestmif", 99)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: a4RelatedMif.setStatus('mandatory')
a4Group = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 6, 1, 2), DmiInteger()).setMaxAccess("readonly")
if mibBuilder.loadTexts: a4Group.setStatus('mandatory')
a4Instance = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 6, 1, 3), DmiInteger()).setMaxAccess("readonly")
if mibBuilder.loadTexts: a4Instance.setStatus('mandatory')
a4Attribute = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 6, 1, 4), DmiInteger()).setMaxAccess("readonly")
if mibBuilder.loadTexts: a4Attribute.setStatus('mandatory')
a4Value = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 6, 1, 5), DmiInteger()).setMaxAccess("readonly")
if mibBuilder.loadTexts: a4Value.setStatus('mandatory')
a4Severity = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 6, 1, 6), DmiInteger()).setMaxAccess("readonly")
if mibBuilder.loadTexts: a4Severity.setStatus('mandatory')
a4BeepSpeaker = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 6, 1, 7), DmiInteger()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: a4BeepSpeaker.setStatus('mandatory')
a4DisplayAlertMessageOnConsole = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 6, 1, 8), DmiInteger()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: a4DisplayAlertMessageOnConsole.setStatus('mandatory')
a4LogToDisk = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 6, 1, 9), DmiInteger()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: a4LogToDisk.setStatus('mandatory')
a4WriteToLcd = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 6, 1, 10), DmiInteger()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: a4WriteToLcd.setStatus('mandatory')
a4ShutdownTheOs = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 6, 1, 11), DmiInteger()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: a4ShutdownTheOs.setStatus('mandatory')
a4ShutdownAndPowerOffTheSystem = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 6, 1, 12), DmiInteger()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: a4ShutdownAndPowerOffTheSystem.setStatus('mandatory')
a4ShutdownAndResetTheSystem = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 6, 1, 13), DmiInteger()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: a4ShutdownAndResetTheSystem.setStatus('mandatory')
a4ImmediatePowerOff = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 6, 1, 14), DmiInteger()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: a4ImmediatePowerOff.setStatus('mandatory')
a4ImmediateReset = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 6, 1, 15), DmiInteger()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: a4ImmediateReset.setStatus('mandatory')
a4BroadcastMessageOnNetwork = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 6, 1, 16), DmiInteger()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: a4BroadcastMessageOnNetwork.setStatus('mandatory')
a4AmsAlertName = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 6, 1, 17), DmiDisplaystring()).setMaxAccess("readonly")
if mibBuilder.loadTexts: a4AmsAlertName.setStatus('mandatory')
a4Enabled = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 6, 1, 30), DmiInteger()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: a4Enabled.setStatus('mandatory')
tActionsTableForStandardIndications = MibTable((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 7), )
if mibBuilder.loadTexts: tActionsTableForStandardIndications.setStatus('mandatory')
eActionsTableForStandardIndications = MibTableRow((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 7, 1), ).setIndexNames((0, "INTELLANDESKSERVERMANAGER-LOCALRESPONSEAMAPPER-MIB", "DmiComponentIndex"), (0, "INTELLANDESKSERVERMANAGER-LOCALRESPONSEAMAPPER-MIB", "a10RelatedMif"), (0, "INTELLANDESKSERVERMANAGER-LOCALRESPONSEAMAPPER-MIB", "a10EventGenerationGroup"), (0, "INTELLANDESKSERVERMANAGER-LOCALRESPONSEAMAPPER-MIB", "a10EventType"), (0, "INTELLANDESKSERVERMANAGER-LOCALRESPONSEAMAPPER-MIB", "a10Instance"), (0, "INTELLANDESKSERVERMANAGER-LOCALRESPONSEAMAPPER-MIB", "a10Reserved"), (0, "INTELLANDESKSERVERMANAGER-LOCALRESPONSEAMAPPER-MIB", "a10Severity"), (0, "INTELLANDESKSERVERMANAGER-LOCALRESPONSEAMAPPER-MIB", "a10EventSystem"), (0, "INTELLANDESKSERVERMANAGER-LOCALRESPONSEAMAPPER-MIB", "a10EventSub-system"))
if mibBuilder.loadTexts: eActionsTableForStandardIndications.setStatus('mandatory')
a10RelatedMif = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 7, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 99))).clone(namedValues=NamedValues(("vUnknown", 0), ("vBaseboard", 1), ("vAdaptecScsi", 2), ("vMylexRaid", 3), ("vNic", 4), ("vUps", 5), ("vSymbiosSdms", 6), ("vAmiRaid", 7), ("vMylexGamRaid", 8), ("vAdaptecCioScsi", 9), ("vSymbiosScsi", 10), ("vIntelNic", 11), ("vTestmif", 99)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: a10RelatedMif.setStatus('mandatory')
a10EventGenerationGroup = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 7, 1, 2), DmiInteger()).setMaxAccess("readonly")
if mibBuilder.loadTexts: a10EventGenerationGroup.setStatus('mandatory')
a10EventType = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 7, 1, 3), DmiInteger()).setMaxAccess("readonly")
if mibBuilder.loadTexts: a10EventType.setStatus('mandatory')
a10Instance = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 7, 1, 4), DmiInteger()).setMaxAccess("readonly")
if mibBuilder.loadTexts: a10Instance.setStatus('mandatory')
a10Reserved = MibScalar((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 7, 1, 5), DmiInteger()).setMaxAccess("readonly")
if mibBuilder.loadTexts: a10Reserved.setStatus('mandatory')
a10Severity = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 7, 1, 6), DmiInteger()).setMaxAccess("readonly")
if mibBuilder.loadTexts: a10Severity.setStatus('mandatory')
a10BeepSpeaker = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 7, 1, 7), DmiInteger()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: a10BeepSpeaker.setStatus('mandatory')
a10DisplayAlertMessageOnConsole = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 7, 1, 8), DmiInteger()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: a10DisplayAlertMessageOnConsole.setStatus('mandatory')
a10LogToDisk = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 7, 1, 9), DmiInteger()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: a10LogToDisk.setStatus('mandatory')
a10WriteToLcd = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 7, 1, 10), DmiInteger()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: a10WriteToLcd.setStatus('mandatory')
a10ShutdownTheOs = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 7, 1, 11), DmiInteger()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: a10ShutdownTheOs.setStatus('mandatory')
a10ShutdownAndPowerOffTheSystem = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 7, 1, 12), DmiInteger()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: a10ShutdownAndPowerOffTheSystem.setStatus('mandatory')
a10ShutdownAndResetTheSystem = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 7, 1, 13), DmiInteger()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: a10ShutdownAndResetTheSystem.setStatus('mandatory')
a10ImmediatePowerOff = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 7, 1, 14), DmiInteger()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: a10ImmediatePowerOff.setStatus('mandatory')
a10ImmediateReset = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 7, 1, 15), DmiInteger()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: a10ImmediateReset.setStatus('mandatory')
a10BroadcastMessageOnNetwork = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 7, 1, 16), DmiInteger()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: a10BroadcastMessageOnNetwork.setStatus('mandatory')
a10AmsAlertName = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 7, 1, 17), DmiDisplaystring()).setMaxAccess("readonly")
if mibBuilder.loadTexts: a10AmsAlertName.setStatus('mandatory')
a10ImmediateNmi = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 7, 1, 18), DmiInteger()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: a10ImmediateNmi.setStatus('mandatory')
a10Page = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 7, 1, 19), DmiInteger()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: a10Page.setStatus('mandatory')
a10Email = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 7, 1, 20), DmiInteger()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: a10Email.setStatus('mandatory')
a10Enabled = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 7, 1, 30), DmiInteger()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: a10Enabled.setStatus('mandatory')
a10EventSystem = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 7, 1, 31), DmiInteger()).setMaxAccess("readonly")
if mibBuilder.loadTexts: a10EventSystem.setStatus('mandatory')
a10EventSub_system = MibScalar((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 7, 1, 32), DmiInteger()).setLabel("a10EventSub-system").setMaxAccess("readonly")
if mibBuilder.loadTexts: a10EventSub_system.setStatus('mandatory')
mibBuilder.exportSymbols("INTELLANDESKSERVERMANAGER-LOCALRESPONSEAMAPPER-MIB", products=products, a10DisplayAlertMessageOnConsole=a10DisplayAlertMessageOnConsole, a10ShutdownTheOs=a10ShutdownTheOs, DmiInteger=DmiInteger, a10BeepSpeaker=a10BeepSpeaker, eActionsTableForStandardIndications=eActionsTableForStandardIndications, tActionsTable=tActionsTable, a4Group=a4Group, intel=intel, a10ShutdownAndResetTheSystem=a10ShutdownAndResetTheSystem, dmtfGroups=dmtfGroups, DmiDisplaystring=DmiDisplaystring, server_products=server_products, tNameTable=tNameTable, a4ImmediatePowerOff=a4ImmediatePowerOff, a4BroadcastMessageOnNetwork=a4BroadcastMessageOnNetwork, a10BroadcastMessageOnNetwork=a10BroadcastMessageOnNetwork, a10WriteToLcd=a10WriteToLcd, a4ImmediateReset=a4ImmediateReset, a10AmsAlertName=a10AmsAlertName, a10Severity=a10Severity, a4Attribute=a4Attribute, a4DisplayAlertMessageOnConsole=a4DisplayAlertMessageOnConsole, a4AmsAlertName=a4AmsAlertName, a10EventGenerationGroup=a10EventGenerationGroup, a10Reserved=a10Reserved, a10ImmediateNmi=a10ImmediateNmi, a4Severity=a4Severity, a4LogToDisk=a4LogToDisk, a4Value=a4Value, a4RelatedMif=a4RelatedMif, a4ShutdownTheOs=a4ShutdownTheOs, a4ShutdownAndResetTheSystem=a4ShutdownAndResetTheSystem, a4Instance=a4Instance, a10RelatedMif=a10RelatedMif, a10Email=a10Email, tActionsTableForStandardIndications=tActionsTableForStandardIndications, a10ImmediateReset=a10ImmediateReset, DmiComponentIndex=DmiComponentIndex, a2ComponentName=a2ComponentName, a10LogToDisk=a10LogToDisk, a10Enabled=a10Enabled, a10EventType=a10EventType, a10Instance=a10Instance, a10EventSystem=a10EventSystem, a2MifId=a2MifId, eActionsTable=eActionsTable, a4WriteToLcd=a4WriteToLcd, a10EventSub_system=a10EventSub_system, a4Enabled=a4Enabled, a10ImmediatePowerOff=a10ImmediatePowerOff, a4ShutdownAndPowerOffTheSystem=a4ShutdownAndPowerOffTheSystem, eNameTable=eNameTable, a10Page=a10Page, a4BeepSpeaker=a4BeepSpeaker, DmiDateX=DmiDateX, a10ShutdownAndPowerOffTheSystem=a10ShutdownAndPowerOffTheSystem)
| (object_identifier, integer, octet_string) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'Integer', 'OctetString')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(single_value_constraint, constraints_union, value_size_constraint, value_range_constraint, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'SingleValueConstraint', 'ConstraintsUnion', 'ValueSizeConstraint', 'ValueRangeConstraint', 'ConstraintsIntersection')
(module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup')
(iso, ip_address, unsigned32, mib_scalar, mib_table, mib_table_row, mib_table_column, counter32, object_identity, mib_identifier, gauge32, integer32, notification_type, module_identity, enterprises, time_ticks, bits, counter64) = mibBuilder.importSymbols('SNMPv2-SMI', 'iso', 'IpAddress', 'Unsigned32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Counter32', 'ObjectIdentity', 'MibIdentifier', 'Gauge32', 'Integer32', 'NotificationType', 'ModuleIdentity', 'enterprises', 'TimeTicks', 'Bits', 'Counter64')
(display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention')
class Dmiinteger(Integer32):
pass
class Dmidisplaystring(DisplayString):
pass
class Dmidatex(OctetString):
subtype_spec = OctetString.subtypeSpec + value_size_constraint(28, 28)
fixed_length = 28
class Dmicomponentindex(Integer32):
pass
intel = mib_identifier((1, 3, 6, 1, 4, 1, 343))
products = mib_identifier((1, 3, 6, 1, 4, 1, 343, 2))
server_products = mib_identifier((1, 3, 6, 1, 4, 1, 343, 2, 6)).setLabel('server-products')
dmtf_groups = mib_identifier((1, 3, 6, 1, 4, 1, 343, 2, 6, 7))
t_name_table = mib_table((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 5))
if mibBuilder.loadTexts:
tNameTable.setStatus('mandatory')
e_name_table = mib_table_row((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 5, 1)).setIndexNames((0, 'INTELLANDESKSERVERMANAGER-LOCALRESPONSEAMAPPER-MIB', 'DmiComponentIndex'), (0, 'INTELLANDESKSERVERMANAGER-LOCALRESPONSEAMAPPER-MIB', 'a2MifId'))
if mibBuilder.loadTexts:
eNameTable.setStatus('mandatory')
a2_mif_id = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 5, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 99))).clone(namedValues=named_values(('vUnknown', 0), ('vBaseboard', 1), ('vAdaptecScsi', 2), ('vMylexRaid', 3), ('vNic', 4), ('vUps', 5), ('vSymbiosSdms', 6), ('vAmiRaid', 7), ('vMylexGamRaid', 8), ('vAdaptecCioScsi', 9), ('vSymbiosScsi', 10), ('vIntelNic', 11), ('vTestmif', 99)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
a2MifId.setStatus('mandatory')
a2_component_name = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 5, 1, 2), dmi_displaystring()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
a2ComponentName.setStatus('mandatory')
t_actions_table = mib_table((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 6))
if mibBuilder.loadTexts:
tActionsTable.setStatus('mandatory')
e_actions_table = mib_table_row((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 6, 1)).setIndexNames((0, 'INTELLANDESKSERVERMANAGER-LOCALRESPONSEAMAPPER-MIB', 'DmiComponentIndex'), (0, 'INTELLANDESKSERVERMANAGER-LOCALRESPONSEAMAPPER-MIB', 'a4RelatedMif'), (0, 'INTELLANDESKSERVERMANAGER-LOCALRESPONSEAMAPPER-MIB', 'a4Group'), (0, 'INTELLANDESKSERVERMANAGER-LOCALRESPONSEAMAPPER-MIB', 'a4Instance'), (0, 'INTELLANDESKSERVERMANAGER-LOCALRESPONSEAMAPPER-MIB', 'a4Attribute'), (0, 'INTELLANDESKSERVERMANAGER-LOCALRESPONSEAMAPPER-MIB', 'a4Value'), (0, 'INTELLANDESKSERVERMANAGER-LOCALRESPONSEAMAPPER-MIB', 'a4Severity'))
if mibBuilder.loadTexts:
eActionsTable.setStatus('mandatory')
a4_related_mif = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 6, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 99))).clone(namedValues=named_values(('vUnknown', 0), ('vBaseboard', 1), ('vAdaptecScsi', 2), ('vMylexRaid', 3), ('vNic', 4), ('vUps', 5), ('vSymbiosSdms', 6), ('vAmiRaid', 7), ('vMylexGamRaid', 8), ('vAdaptecCioScsi', 9), ('vSymbiosScsi', 10), ('vIntelNic', 11), ('vTestmif', 99)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
a4RelatedMif.setStatus('mandatory')
a4_group = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 6, 1, 2), dmi_integer()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
a4Group.setStatus('mandatory')
a4_instance = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 6, 1, 3), dmi_integer()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
a4Instance.setStatus('mandatory')
a4_attribute = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 6, 1, 4), dmi_integer()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
a4Attribute.setStatus('mandatory')
a4_value = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 6, 1, 5), dmi_integer()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
a4Value.setStatus('mandatory')
a4_severity = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 6, 1, 6), dmi_integer()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
a4Severity.setStatus('mandatory')
a4_beep_speaker = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 6, 1, 7), dmi_integer()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
a4BeepSpeaker.setStatus('mandatory')
a4_display_alert_message_on_console = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 6, 1, 8), dmi_integer()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
a4DisplayAlertMessageOnConsole.setStatus('mandatory')
a4_log_to_disk = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 6, 1, 9), dmi_integer()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
a4LogToDisk.setStatus('mandatory')
a4_write_to_lcd = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 6, 1, 10), dmi_integer()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
a4WriteToLcd.setStatus('mandatory')
a4_shutdown_the_os = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 6, 1, 11), dmi_integer()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
a4ShutdownTheOs.setStatus('mandatory')
a4_shutdown_and_power_off_the_system = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 6, 1, 12), dmi_integer()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
a4ShutdownAndPowerOffTheSystem.setStatus('mandatory')
a4_shutdown_and_reset_the_system = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 6, 1, 13), dmi_integer()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
a4ShutdownAndResetTheSystem.setStatus('mandatory')
a4_immediate_power_off = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 6, 1, 14), dmi_integer()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
a4ImmediatePowerOff.setStatus('mandatory')
a4_immediate_reset = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 6, 1, 15), dmi_integer()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
a4ImmediateReset.setStatus('mandatory')
a4_broadcast_message_on_network = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 6, 1, 16), dmi_integer()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
a4BroadcastMessageOnNetwork.setStatus('mandatory')
a4_ams_alert_name = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 6, 1, 17), dmi_displaystring()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
a4AmsAlertName.setStatus('mandatory')
a4_enabled = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 6, 1, 30), dmi_integer()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
a4Enabled.setStatus('mandatory')
t_actions_table_for_standard_indications = mib_table((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 7))
if mibBuilder.loadTexts:
tActionsTableForStandardIndications.setStatus('mandatory')
e_actions_table_for_standard_indications = mib_table_row((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 7, 1)).setIndexNames((0, 'INTELLANDESKSERVERMANAGER-LOCALRESPONSEAMAPPER-MIB', 'DmiComponentIndex'), (0, 'INTELLANDESKSERVERMANAGER-LOCALRESPONSEAMAPPER-MIB', 'a10RelatedMif'), (0, 'INTELLANDESKSERVERMANAGER-LOCALRESPONSEAMAPPER-MIB', 'a10EventGenerationGroup'), (0, 'INTELLANDESKSERVERMANAGER-LOCALRESPONSEAMAPPER-MIB', 'a10EventType'), (0, 'INTELLANDESKSERVERMANAGER-LOCALRESPONSEAMAPPER-MIB', 'a10Instance'), (0, 'INTELLANDESKSERVERMANAGER-LOCALRESPONSEAMAPPER-MIB', 'a10Reserved'), (0, 'INTELLANDESKSERVERMANAGER-LOCALRESPONSEAMAPPER-MIB', 'a10Severity'), (0, 'INTELLANDESKSERVERMANAGER-LOCALRESPONSEAMAPPER-MIB', 'a10EventSystem'), (0, 'INTELLANDESKSERVERMANAGER-LOCALRESPONSEAMAPPER-MIB', 'a10EventSub-system'))
if mibBuilder.loadTexts:
eActionsTableForStandardIndications.setStatus('mandatory')
a10_related_mif = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 7, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 99))).clone(namedValues=named_values(('vUnknown', 0), ('vBaseboard', 1), ('vAdaptecScsi', 2), ('vMylexRaid', 3), ('vNic', 4), ('vUps', 5), ('vSymbiosSdms', 6), ('vAmiRaid', 7), ('vMylexGamRaid', 8), ('vAdaptecCioScsi', 9), ('vSymbiosScsi', 10), ('vIntelNic', 11), ('vTestmif', 99)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
a10RelatedMif.setStatus('mandatory')
a10_event_generation_group = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 7, 1, 2), dmi_integer()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
a10EventGenerationGroup.setStatus('mandatory')
a10_event_type = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 7, 1, 3), dmi_integer()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
a10EventType.setStatus('mandatory')
a10_instance = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 7, 1, 4), dmi_integer()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
a10Instance.setStatus('mandatory')
a10_reserved = mib_scalar((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 7, 1, 5), dmi_integer()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
a10Reserved.setStatus('mandatory')
a10_severity = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 7, 1, 6), dmi_integer()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
a10Severity.setStatus('mandatory')
a10_beep_speaker = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 7, 1, 7), dmi_integer()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
a10BeepSpeaker.setStatus('mandatory')
a10_display_alert_message_on_console = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 7, 1, 8), dmi_integer()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
a10DisplayAlertMessageOnConsole.setStatus('mandatory')
a10_log_to_disk = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 7, 1, 9), dmi_integer()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
a10LogToDisk.setStatus('mandatory')
a10_write_to_lcd = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 7, 1, 10), dmi_integer()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
a10WriteToLcd.setStatus('mandatory')
a10_shutdown_the_os = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 7, 1, 11), dmi_integer()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
a10ShutdownTheOs.setStatus('mandatory')
a10_shutdown_and_power_off_the_system = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 7, 1, 12), dmi_integer()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
a10ShutdownAndPowerOffTheSystem.setStatus('mandatory')
a10_shutdown_and_reset_the_system = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 7, 1, 13), dmi_integer()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
a10ShutdownAndResetTheSystem.setStatus('mandatory')
a10_immediate_power_off = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 7, 1, 14), dmi_integer()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
a10ImmediatePowerOff.setStatus('mandatory')
a10_immediate_reset = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 7, 1, 15), dmi_integer()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
a10ImmediateReset.setStatus('mandatory')
a10_broadcast_message_on_network = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 7, 1, 16), dmi_integer()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
a10BroadcastMessageOnNetwork.setStatus('mandatory')
a10_ams_alert_name = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 7, 1, 17), dmi_displaystring()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
a10AmsAlertName.setStatus('mandatory')
a10_immediate_nmi = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 7, 1, 18), dmi_integer()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
a10ImmediateNmi.setStatus('mandatory')
a10_page = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 7, 1, 19), dmi_integer()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
a10Page.setStatus('mandatory')
a10_email = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 7, 1, 20), dmi_integer()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
a10Email.setStatus('mandatory')
a10_enabled = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 7, 1, 30), dmi_integer()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
a10Enabled.setStatus('mandatory')
a10_event_system = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 7, 1, 31), dmi_integer()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
a10EventSystem.setStatus('mandatory')
a10_event_sub_system = mib_scalar((1, 3, 6, 1, 4, 1, 343, 2, 6, 7, 7, 1, 32), dmi_integer()).setLabel('a10EventSub-system').setMaxAccess('readonly')
if mibBuilder.loadTexts:
a10EventSub_system.setStatus('mandatory')
mibBuilder.exportSymbols('INTELLANDESKSERVERMANAGER-LOCALRESPONSEAMAPPER-MIB', products=products, a10DisplayAlertMessageOnConsole=a10DisplayAlertMessageOnConsole, a10ShutdownTheOs=a10ShutdownTheOs, DmiInteger=DmiInteger, a10BeepSpeaker=a10BeepSpeaker, eActionsTableForStandardIndications=eActionsTableForStandardIndications, tActionsTable=tActionsTable, a4Group=a4Group, intel=intel, a10ShutdownAndResetTheSystem=a10ShutdownAndResetTheSystem, dmtfGroups=dmtfGroups, DmiDisplaystring=DmiDisplaystring, server_products=server_products, tNameTable=tNameTable, a4ImmediatePowerOff=a4ImmediatePowerOff, a4BroadcastMessageOnNetwork=a4BroadcastMessageOnNetwork, a10BroadcastMessageOnNetwork=a10BroadcastMessageOnNetwork, a10WriteToLcd=a10WriteToLcd, a4ImmediateReset=a4ImmediateReset, a10AmsAlertName=a10AmsAlertName, a10Severity=a10Severity, a4Attribute=a4Attribute, a4DisplayAlertMessageOnConsole=a4DisplayAlertMessageOnConsole, a4AmsAlertName=a4AmsAlertName, a10EventGenerationGroup=a10EventGenerationGroup, a10Reserved=a10Reserved, a10ImmediateNmi=a10ImmediateNmi, a4Severity=a4Severity, a4LogToDisk=a4LogToDisk, a4Value=a4Value, a4RelatedMif=a4RelatedMif, a4ShutdownTheOs=a4ShutdownTheOs, a4ShutdownAndResetTheSystem=a4ShutdownAndResetTheSystem, a4Instance=a4Instance, a10RelatedMif=a10RelatedMif, a10Email=a10Email, tActionsTableForStandardIndications=tActionsTableForStandardIndications, a10ImmediateReset=a10ImmediateReset, DmiComponentIndex=DmiComponentIndex, a2ComponentName=a2ComponentName, a10LogToDisk=a10LogToDisk, a10Enabled=a10Enabled, a10EventType=a10EventType, a10Instance=a10Instance, a10EventSystem=a10EventSystem, a2MifId=a2MifId, eActionsTable=eActionsTable, a4WriteToLcd=a4WriteToLcd, a10EventSub_system=a10EventSub_system, a4Enabled=a4Enabled, a10ImmediatePowerOff=a10ImmediatePowerOff, a4ShutdownAndPowerOffTheSystem=a4ShutdownAndPowerOffTheSystem, eNameTable=eNameTable, a10Page=a10Page, a4BeepSpeaker=a4BeepSpeaker, DmiDateX=DmiDateX, a10ShutdownAndPowerOffTheSystem=a10ShutdownAndPowerOffTheSystem) |
class Solution:
def repeatedNTimes(self, A: List[int]) -> int:
counter = 0
N = len(A) / 2
for a in A:
a_count = A.count(a)
if a_count == N:
return a
counter += a_count
if counter == N:
return A[0]
else:
A.remove(a) | class Solution:
def repeated_n_times(self, A: List[int]) -> int:
counter = 0
n = len(A) / 2
for a in A:
a_count = A.count(a)
if a_count == N:
return a
counter += a_count
if counter == N:
return A[0]
else:
A.remove(a) |
def extraerVector(matrizPesos, i, dimVect):
vectTemp = []
for j in range(dimVect - 1):
vectTemp.append(matrizPesos[i][j])
return vectTemp | def extraer_vector(matrizPesos, i, dimVect):
vect_temp = []
for j in range(dimVect - 1):
vectTemp.append(matrizPesos[i][j])
return vectTemp |
async def handler(event):
# flush history data
await event.kv.flush()
# string: bit 0
v = await event.kv.setbit('string', 0, 1)
if v != 0:
return {'status': 503, 'body': 'test1 fail!'}
# string: bit 1
v = await event.kv.setbit('string', 0, 1)
if v != 1:
return {'status': 503, 'body': 'test2 fail!'}
await event.kv.setbit('string', 7, 1)
await event.kv.setbit('string', 16, 1)
await event.kv.setbit('string', 23, 1)
# string: bit 100000010000000010000001
v = await event.kv.getbit('string', 16)
if v != 1:
return {'status': 503, 'body': 'test3 fail!'}
# byte: [1, 1]
# bit: [8, 15]
v = await event.kv.bitcount('string', 1, 1)
if v != 0:
return {'status': 503, 'body': 'test4 fail!'}
# byte: [2, 2]
# bit: [16, 23]
v = await event.kv.bitcount('string', 2, 2)
if v != 2:
return {'status': 503, 'body': 'test5 fail!'}
# byte: [0, 2]
# bit: [0, 23]
v = await event.kv.bitcount('string', 0, 2)
if v != 4:
return {'status': 503, 'body': 'test6 fail!'}
return {'status': 200, 'body': b'well done!'}
| async def handler(event):
await event.kv.flush()
v = await event.kv.setbit('string', 0, 1)
if v != 0:
return {'status': 503, 'body': 'test1 fail!'}
v = await event.kv.setbit('string', 0, 1)
if v != 1:
return {'status': 503, 'body': 'test2 fail!'}
await event.kv.setbit('string', 7, 1)
await event.kv.setbit('string', 16, 1)
await event.kv.setbit('string', 23, 1)
v = await event.kv.getbit('string', 16)
if v != 1:
return {'status': 503, 'body': 'test3 fail!'}
v = await event.kv.bitcount('string', 1, 1)
if v != 0:
return {'status': 503, 'body': 'test4 fail!'}
v = await event.kv.bitcount('string', 2, 2)
if v != 2:
return {'status': 503, 'body': 'test5 fail!'}
v = await event.kv.bitcount('string', 0, 2)
if v != 4:
return {'status': 503, 'body': 'test6 fail!'}
return {'status': 200, 'body': b'well done!'} |
'''
Copyright 2013 CyberPoint International, LLC.
All rights reserved. Use and disclosure prohibited
except as permitted in writing by CyberPoint.
libpgm exception handler
Charlie Cabot
Sept 27 2013
'''
class libpgmError(Exception):
pass
class bntextError(libpgmError):
pass
| """
Copyright 2013 CyberPoint International, LLC.
All rights reserved. Use and disclosure prohibited
except as permitted in writing by CyberPoint.
libpgm exception handler
Charlie Cabot
Sept 27 2013
"""
class Libpgmerror(Exception):
pass
class Bntexterror(libpgmError):
pass |
class CachedLoader(object):
items = {}
@classmethod
def load_compose_definition(cls, loader: callable):
return cls.cached('compose', loader)
@classmethod
def cached(cls, name: str, loader: callable):
if name not in cls.items:
cls.items[name] = loader()
return cls.items[name]
@classmethod
def clear(cls):
cls.items = {}
| class Cachedloader(object):
items = {}
@classmethod
def load_compose_definition(cls, loader: callable):
return cls.cached('compose', loader)
@classmethod
def cached(cls, name: str, loader: callable):
if name not in cls.items:
cls.items[name] = loader()
return cls.items[name]
@classmethod
def clear(cls):
cls.items = {} |
print("Welcome to Byeonghoon's Age Calculator. This program provide your or someone's age at the specific date you are enquiring.")
current_day = int(input("Please input the DAY you want to enquire (DD):\n"))
while current_day < 1 or current_day > 31:
print("!", current_day, "is not existing date. Please check your date again.")
current_day = int(input("Please input again for the DAY you want to enquire:\n"))
print(f"Date: {current_day}. Confirmed.")
current_month = int(input("Please input the MONTH you want to enquire (MM):\n"))
while current_month < 1 or current_month > 12:
print("!", current_month, "is not existing month. Please check your month again.")
current_month = int(
input("Please input again for the MONTH you want to enquire (MM):\n")
)
while ((current_day == 31) and (current_month in (2, 4, 6, 9, 11))) or (
(current_day == 30) and (current_month == 2)
):
print(
"! The date "
f"{current_day} in the month {current_month} is not exist. Please try again."
)
current_day = int(input("Please input the DAY you want to enquire (DD):\n"))
while current_day < 1 or current_day > 31:
print("!", current_day, "is not existing date. Please check your date again.")
current_day = int(
input("Please input again for the DAY you want to enquire (DD):\n")
)
print(f"Date: {current_day}. Confirmed.")
current_month = int(input("Please input the MONTH you want to enquire (MM):\n"))
while (current_month < 1) or (current_month > 12):
print(
f"! {current_month} is not existing month. Please check your month again."
)
current_month = int(
input("Please input again for the MONTH you want to enquire (MM):\n")
)
print(f"Date: {current_day}\nMonth: {current_month}. Confirmed.")
current_year = int(input("Please input the YEAR you want to enquire: \n"))
while current_year < 0 or current_year > 9999:
print("! Please input valid year. (from 0 ~ 9999)!")
current_year = int(input("Please input the YEAR you want to enquire: \n"))
while (
(current_day == 29)
and (current_month == 2)
and (
((current_year % 4) == (1 or 2 or 3))
or ((current_year % 4) and (current_year % 100) == 0)
or (((current_year % 4) and (current_year % 100) and (current_year % 400)) > 0)
)
):
print(f"! {current_year} does not have 29th day in February.")
current_year = int(input("Please input the YEAR you want to enquire again: \n"))
print(f"Year: {current_year}. Confirmed.")
print(f"Enquiring Date is: {current_day}. {current_month}. {current_year}.")
birth_day = int(input("Please input your or someone's birth DAY (DD):\n"))
while birth_day < 1 or birth_day > 31:
print(
"!",
birth_day,
"is not existing date. Please check your or someone's date again.",
)
birth_day = int(input("Please input your or someone's birth DAY again:\n"))
print(f"Date of birth: {birth_day}. Confirmed.")
birth_month = int(input("Please input your or someone's birth MONTH (MM):\n"))
while birth_month < 1 or birth_month > 12:
print(
"!",
birth_month,
"is not existing month. Please check your or someone's month again.",
)
birth_month = int(input("Please input your or someone's birth MONTH again (MM):\n"))
while ((birth_day == 31) and (birth_month in (2, 4, 6, 9, 11))) or (
(birth_day == 30) and (birth_month == 2)
):
print(
"! The date "
f"{birth_day} in the month {birth_month} is not exist. Please try again."
)
birth_day = int(input("Please input your or someone's birth DAY (DD):\n"))
while birth_day < 1 or birth_day > 31:
print(
"!",
birth_day,
"is not existing date. Please check your or someone's date again.",
)
birth_day = int(input("Please input your or someone's birth DAY again (DD):\n"))
print(f"Date: {birth_day}. Confirmed.")
birth_month = int(input("Please input your or someone's birth MONTH (MM)\n"))
while (birth_month < 1) or (birth_month > 12):
print(
f"! {birth_month} is not existing month. Please check your or someone's month again."
)
birth_month = int(
input("Please input your or someone's birth MONTH again (MM)\n")
)
print(f"Date: {birth_day}\nMonth: {birth_month}. Confirmed.")
birth_year = int(input("Please input your or someone's birth YEAR: \n"))
while birth_year < 0 or birth_year > 9999:
print("! Please input valid year. (from 0 ~ 9999")
birth_year = int(input("Please input your or someone's birth YEAR agian:\n"))
while (
(birth_day == 29)
and (birth_month == 2)
and (
((birth_year % 4) == (1 or 2 or 3))
or ((birth_year % 4) and (birth_year % 100) == 0)
or (((birth_year % 4) and (birth_year % 100) and (birth_year % 400)) > 0)
)
):
print(f"! {birth_year} does not have 29th day in February.")
birth_year = int(input("Please input your or someone's birth YEAR again: \n"))
print(f"Year: {birth_year}. Confirmed.")
print(f"Birth Date is: {birth_day}. {birth_month}. {birth_year}.")
result = (
int(current_year)
- int(birth_year)
- 1
+ int(
(
current_month > birth_month
or ((current_month >= birth_month) and (current_day >= birth_day))
)
and current_year >= birth_year
)
)
if result < 0:
print("Sorry, we can not provide the age before you or someone born")
else:
print("Your or someone's age at the day you enquired was:", result, "years old")
if (
(birth_year == current_year)
and (birth_month == current_month)
and (birth_day == current_day)
):
print("It is the day you or someone borned !")
| print("Welcome to Byeonghoon's Age Calculator. This program provide your or someone's age at the specific date you are enquiring.")
current_day = int(input('Please input the DAY you want to enquire (DD):\n'))
while current_day < 1 or current_day > 31:
print('!', current_day, 'is not existing date. Please check your date again.')
current_day = int(input('Please input again for the DAY you want to enquire:\n'))
print(f'Date: {current_day}. Confirmed.')
current_month = int(input('Please input the MONTH you want to enquire (MM):\n'))
while current_month < 1 or current_month > 12:
print('!', current_month, 'is not existing month. Please check your month again.')
current_month = int(input('Please input again for the MONTH you want to enquire (MM):\n'))
while current_day == 31 and current_month in (2, 4, 6, 9, 11) or (current_day == 30 and current_month == 2):
print(f'! The date {current_day} in the month {current_month} is not exist. Please try again.')
current_day = int(input('Please input the DAY you want to enquire (DD):\n'))
while current_day < 1 or current_day > 31:
print('!', current_day, 'is not existing date. Please check your date again.')
current_day = int(input('Please input again for the DAY you want to enquire (DD):\n'))
print(f'Date: {current_day}. Confirmed.')
current_month = int(input('Please input the MONTH you want to enquire (MM):\n'))
while current_month < 1 or current_month > 12:
print(f'! {current_month} is not existing month. Please check your month again.')
current_month = int(input('Please input again for the MONTH you want to enquire (MM):\n'))
print(f'Date: {current_day}\nMonth: {current_month}. Confirmed.')
current_year = int(input('Please input the YEAR you want to enquire: \n'))
while current_year < 0 or current_year > 9999:
print('! Please input valid year. (from 0 ~ 9999)!')
current_year = int(input('Please input the YEAR you want to enquire: \n'))
while current_day == 29 and current_month == 2 and (current_year % 4 == (1 or 2 or 3) or (current_year % 4 and current_year % 100 == 0) or (current_year % 4 and current_year % 100 and current_year % 400) > 0):
print(f'! {current_year} does not have 29th day in February.')
current_year = int(input('Please input the YEAR you want to enquire again: \n'))
print(f'Year: {current_year}. Confirmed.')
print(f'Enquiring Date is: {current_day}. {current_month}. {current_year}.')
birth_day = int(input("Please input your or someone's birth DAY (DD):\n"))
while birth_day < 1 or birth_day > 31:
print('!', birth_day, "is not existing date. Please check your or someone's date again.")
birth_day = int(input("Please input your or someone's birth DAY again:\n"))
print(f'Date of birth: {birth_day}. Confirmed.')
birth_month = int(input("Please input your or someone's birth MONTH (MM):\n"))
while birth_month < 1 or birth_month > 12:
print('!', birth_month, "is not existing month. Please check your or someone's month again.")
birth_month = int(input("Please input your or someone's birth MONTH again (MM):\n"))
while birth_day == 31 and birth_month in (2, 4, 6, 9, 11) or (birth_day == 30 and birth_month == 2):
print(f'! The date {birth_day} in the month {birth_month} is not exist. Please try again.')
birth_day = int(input("Please input your or someone's birth DAY (DD):\n"))
while birth_day < 1 or birth_day > 31:
print('!', birth_day, "is not existing date. Please check your or someone's date again.")
birth_day = int(input("Please input your or someone's birth DAY again (DD):\n"))
print(f'Date: {birth_day}. Confirmed.')
birth_month = int(input("Please input your or someone's birth MONTH (MM)\n"))
while birth_month < 1 or birth_month > 12:
print(f"! {birth_month} is not existing month. Please check your or someone's month again.")
birth_month = int(input("Please input your or someone's birth MONTH again (MM)\n"))
print(f'Date: {birth_day}\nMonth: {birth_month}. Confirmed.')
birth_year = int(input("Please input your or someone's birth YEAR: \n"))
while birth_year < 0 or birth_year > 9999:
print('! Please input valid year. (from 0 ~ 9999')
birth_year = int(input("Please input your or someone's birth YEAR agian:\n"))
while birth_day == 29 and birth_month == 2 and (birth_year % 4 == (1 or 2 or 3) or (birth_year % 4 and birth_year % 100 == 0) or (birth_year % 4 and birth_year % 100 and birth_year % 400) > 0):
print(f'! {birth_year} does not have 29th day in February.')
birth_year = int(input("Please input your or someone's birth YEAR again: \n"))
print(f'Year: {birth_year}. Confirmed.')
print(f'Birth Date is: {birth_day}. {birth_month}. {birth_year}.')
result = int(current_year) - int(birth_year) - 1 + int((current_month > birth_month or (current_month >= birth_month and current_day >= birth_day)) and current_year >= birth_year)
if result < 0:
print('Sorry, we can not provide the age before you or someone born')
else:
print("Your or someone's age at the day you enquired was:", result, 'years old')
if birth_year == current_year and birth_month == current_month and (birth_day == current_day):
print('It is the day you or someone borned !') |
class AuthSession(object):
def __init__(self, session):
self._session = session
def __enter__(self):
return self._session
def __exit__(self, *args):
self._session.close() | class Authsession(object):
def __init__(self, session):
self._session = session
def __enter__(self):
return self._session
def __exit__(self, *args):
self._session.close() |
# Given the array candies and the integer extraCandies, where candies[i] represents the number of candies that the
# ith kid has.
#
# For each kid check if there is a way to distribute extraCandies among the kids such that he or she can have the
# greatest number of candies among them. Notice that multiple kids can have the greatest number of candies.
#
# Input: candies = [2,3,5,1,3], extraCandies = 3
# Output: [true,true,true,false,true]
#
# 2 <= candies.length <= 100
# 1 <= candies[i] <= 100
# 1 <= extraCandies <= 50
#
# Source: https://leetcode.com/problems/kids-with-the-greatest-number-of-candies
class Solution:
def kidsWithCandies(self, candies, extraCandies):
highest = max(candies)
output_list = []
for i in candies:
total = i + extraCandies
if total >= highest:
output_list.append(True)
else:
output_list.append(False)
return output_list
s = Solution()
candies = [4, 2, 1, 1, 2]
output = s.kidsWithCandies(candies, 1)
print(f"{candies}\n{output}")
| class Solution:
def kids_with_candies(self, candies, extraCandies):
highest = max(candies)
output_list = []
for i in candies:
total = i + extraCandies
if total >= highest:
output_list.append(True)
else:
output_list.append(False)
return output_list
s = solution()
candies = [4, 2, 1, 1, 2]
output = s.kidsWithCandies(candies, 1)
print(f'{candies}\n{output}') |
_base_ = './cascade_rcnn_s50_fpn_syncbn-backbone+head_mstrain-range_1x_coco.py'
model = dict(
backbone=dict(
stem_channels=128,
depth=101,
init_cfg=dict(type='Pretrained',
checkpoint='open-mmlab://resnest101')))
| _base_ = './cascade_rcnn_s50_fpn_syncbn-backbone+head_mstrain-range_1x_coco.py'
model = dict(backbone=dict(stem_channels=128, depth=101, init_cfg=dict(type='Pretrained', checkpoint='open-mmlab://resnest101'))) |
description = 'setup for the poller'
group = 'special'
sysconfig = dict(cache = 'mephisto17.office.frm2')
devices = dict(
Poller = device('nicos.services.poller.Poller',
alwayspoll = ['tube_environ', 'pressure'],
blacklist = ['tas']
),
)
| description = 'setup for the poller'
group = 'special'
sysconfig = dict(cache='mephisto17.office.frm2')
devices = dict(Poller=device('nicos.services.poller.Poller', alwayspoll=['tube_environ', 'pressure'], blacklist=['tas'])) |
# Asking Question
print ("How old are you?"),
age = input()
print ("How tall are you?")
height = input()
print ("How much do you weigh?")
weight = input()
print ("So You are %r years old, %r tall and %r heavy."%(age, height , weight)
)
| (print('How old are you?'),)
age = input()
print('How tall are you?')
height = input()
print('How much do you weigh?')
weight = input()
print('So You are %r years old, %r tall and %r heavy.' % (age, height, weight)) |
__copyright__ = 'Copyright (C) 2019, Nokia'
class TestPythonpath2(object):
ROBOT_LIBRARY_SCOPE = "GLOBAL"
def __init__(self):
self.name = 'iina'
self.age = 10
def get_name2(self):
return self.name
| __copyright__ = 'Copyright (C) 2019, Nokia'
class Testpythonpath2(object):
robot_library_scope = 'GLOBAL'
def __init__(self):
self.name = 'iina'
self.age = 10
def get_name2(self):
return self.name |
# 1. Escreva uma funcao que recebe como entrada as dimensoes M e N e o elemento E de preenchimento
# e retorna uma lista de listas que corresponde a uma matriz MxN contendo o elemento e em todas
# as posicoes. Exemplo:
# >>> cria_matriz(2, 3, 0)
# [[0, 0, 0], [0, 0, 0]]
def f_preencheMatriz(m, n, el):
matrizPreenchida = []
for lin in range(m):
matrizPreenchida.append([])
for col in range(n):
matrizPreenchida[lin].append(el)
#fim for
#fim for
return matrizPreenchida
#fim funcao
def main():
m, n, el, matriz = 0, 0, 0, []
m = int(input("Informe a qtd de linhas da matriz: "))
n = int(input("Informe a qtd de colunas da matriz: "))
el = int(input("Informe o elemento a ser preenchido nas posicoes da matriz: "))
matriz = f_preencheMatriz(m, n, el)
print(matriz)
#fim main
if __name__ == '__main__':
main()
#fim if
| def f_preenche_matriz(m, n, el):
matriz_preenchida = []
for lin in range(m):
matrizPreenchida.append([])
for col in range(n):
matrizPreenchida[lin].append(el)
return matrizPreenchida
def main():
(m, n, el, matriz) = (0, 0, 0, [])
m = int(input('Informe a qtd de linhas da matriz: '))
n = int(input('Informe a qtd de colunas da matriz: '))
el = int(input('Informe o elemento a ser preenchido nas posicoes da matriz: '))
matriz = f_preenche_matriz(m, n, el)
print(matriz)
if __name__ == '__main__':
main() |
'''
Python program to compute and print sum of two given integers (more than or equal to zero).
If given integers or the sum have more than 80 digits, print "overflow".
'''
print ("Input first integer:")
x = int (input())
print ("Input second integer:")
y = int (input())
if x >= 10 ** 80 or y >= 10 ** 80 or x + y >= 10 ** 80:
print ("Overflow!")
else :
print ("Sum of the two integers: ", x + y) | """
Python program to compute and print sum of two given integers (more than or equal to zero).
If given integers or the sum have more than 80 digits, print "overflow".
"""
print('Input first integer:')
x = int(input())
print('Input second integer:')
y = int(input())
if x >= 10 ** 80 or y >= 10 ** 80 or x + y >= 10 ** 80:
print('Overflow!')
else:
print('Sum of the two integers: ', x + y) |
### Caesar Cipher - Solution
def caesarCipher(s, rot_count):
for ch in range(len(s)):
if s[ch].isalpha():
first_letter = 'A' if s[ch].isupper() else 'a'
s[ch] = chr(ord(first_letter) + ((ord(s[ch]) - ord(first_letter) + rot_count) % 26))
print(*s, sep='')
n = int(input())
s = list(input()[:n])
rot_count = int(input())
caesarCipher(s, rot_count) | def caesar_cipher(s, rot_count):
for ch in range(len(s)):
if s[ch].isalpha():
first_letter = 'A' if s[ch].isupper() else 'a'
s[ch] = chr(ord(first_letter) + (ord(s[ch]) - ord(first_letter) + rot_count) % 26)
print(*s, sep='')
n = int(input())
s = list(input()[:n])
rot_count = int(input())
caesar_cipher(s, rot_count) |
# atributos publicos, privados y protegidos
class MiClase:
def __init__(self):
self.atributo_publico = "valor publico"
self._atributo_protegido = "valor protegido"
self.__atributo_privado = "valor privado"
objeto1 = MiClase()
# acceso a los atributos publicos
print(objeto1.atributo_publico)
# modificando atributos publicos
objeto1.atributo_publico = "otro valor"
print(objeto1.atributo_publico)
# acceso a los atributos protegidos
print(objeto1._atributo_protegido)
# modificando atributo protegido
objeto1._atributo_protegido = "otro nuevo valor"
print(objeto1._atributo_protegido)
# acceso a atributo privado
try:
print(objeto1.__atributo_privado)
except AttributeError:
print("No se puede acceder al atributo privado")
# python convierte el atributo privado a: objeto._clase__atributo_privado
print(objeto1._MiClase__atributo_privado)
objeto1._MiClase__atributo_privado = "Nuevo valor privado"
print(objeto1._MiClase__atributo_privado) | class Miclase:
def __init__(self):
self.atributo_publico = 'valor publico'
self._atributo_protegido = 'valor protegido'
self.__atributo_privado = 'valor privado'
objeto1 = mi_clase()
print(objeto1.atributo_publico)
objeto1.atributo_publico = 'otro valor'
print(objeto1.atributo_publico)
print(objeto1._atributo_protegido)
objeto1._atributo_protegido = 'otro nuevo valor'
print(objeto1._atributo_protegido)
try:
print(objeto1.__atributo_privado)
except AttributeError:
print('No se puede acceder al atributo privado')
print(objeto1._MiClase__atributo_privado)
objeto1._MiClase__atributo_privado = 'Nuevo valor privado'
print(objeto1._MiClase__atributo_privado) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.