content stringlengths 7 1.05M |
|---|
def if_pycaffe(if_true, if_false = []):
return select({
"@caffe_tools//:caffe_python_layer": if_true,
"//conditions:default": if_false
})
def caffe_pkg(label):
return select({
"//conditions:default": ["@caffe//" + label],
"@caffe_tools//:use_caffe_rcnn": ["@caffe_rcnn//" + label],
"@caffe_tools//:use_caffe_ssd": ["@caffe_ssd//" + label],
})
|
frase = "Nos estamos procurando o rubi na floresta"
rubi = frase[24:29]
print (rubi) |
def spiralTraverse(array):
num_elements = len(array) * len(array[0])
n = len(array)
m = len(array[0])
it = 0
result = []
while num_elements > 0:
# Up side
for j in range(it, m - it):
result.append(array[it][j])
num_elements -= 1
if num_elements == 0:
break
if num_elements == 0:
continue
# Right side
for i in range(it + 1, n - it):
result.append(array[i][m - 1 - it])
num_elements -= 1
if num_elements == 0:
break
if num_elements == 0:
continue
# Bottom side
for j in reversed(range(it, m - 1 - it)):
result.append(array[n - it - 1][j])
num_elements -= 1
if num_elements == 0:
break
if num_elements == 0:
continue
# Left side
for i in reversed(range(it + 1, n - it - 1)):
result.append(array[i][it])
num_elements -= 1
if num_elements == 0:
break
it += 1
return result
|
"""
This is the base class for any AI component. All AIs inherit from this module, and
implement the getMove() function, which takes a Grid object as a parameter and
returns a move.
"""
class BaseAI:
def getMove(self,grid):
pass |
"""
The Ceasar cipher is one of the simplest and one of the earliest known ciphers.
It is a type of substitution cipher that 'shifts' a letter by a fixed amount in the alphabet.
For example with a shift = 3:
a -> d
b -> e
.
.
.
z -> c
Programmed by Aladdin Persson <aladdin.persson at hotmail dot com>
* 2019-11-07 Initial programming
"""
# This alphabet is of 27 letters since I included a space, but normally it is of 26 letters.
# If you wish to include more letters you need to expand the alphabet used. For example you cannot use '!', '@' now.
alphabet = "abcdefghijklmnopqrstuvwxyz "
letter_to_index = dict(zip(alphabet, range(len(alphabet))))
index_to_letter = dict(zip(range(len(alphabet)), alphabet))
def encrypt(message, shift=3):
cipher = ""
for letter in message:
number = (letter_to_index[letter] + shift) % len(letter_to_index)
letter = index_to_letter[number]
cipher += letter
return cipher
def decrypt(cipher, shift=3):
decrypted = ""
for letter in cipher:
number = (letter_to_index[letter] - shift) % len(letter_to_index)
letter = index_to_letter[number]
decrypted += letter
return decrypted
# def main():
# message = 'attackatnoon'
# cipher = encrypt(message, shift=3)
# decrypted = decrypt(cipher, shift=3)
#
# print('Original message: ' + message)
# print('Encrypted message: ' + cipher)
# print('Decrypted message: ' + decrypted)
#
# main()
|
class PantryModel:
def get_ingredients(self, user_id):
"""Get all ingredients from in pantry and return a list of instances
of the ingredient class.
"""
pass
|
#
# @lc app=leetcode id=2 lang=python3
#
# [2] Add Two Numbers
#
# @lc code=start
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
class Solution:
def addTwoNumbers(self, l1: ListNode, l2: ListNode) -> ListNode:
"""
time: O(len(n)) n : max(len(l1), len(l2))
space: O(len(n))
"""
total = cur = ListNode(0)
carry = 0
while l1 or l2 or carry:
sum_digit = carry
if l1:
sum_digit += l1.val
l1 = l1.next
if l2:
sum_digit += l2.val
l2 = l2.next
cur.next = ListNode(sum_digit % 10)
carry = sum_digit // 10
cur = cur.next
return total.next
# @lc code=end
|
{
PDBConst.Name: "paymentmode",
PDBConst.Columns: [
{
PDBConst.Name: "ID",
PDBConst.Attributes: ["tinyint", "not null", "primary key"]
},
{
PDBConst.Name: "Name",
PDBConst.Attributes: ["varchar(128)", "not null"]
},
{
PDBConst.Name: "SID",
PDBConst.Attributes: ["varchar(128)", "not null"]
}],
PDBConst.Initials: [
{"Name": "'Credit Card'", "ID": "1", "SID": "'sidTablePaymentMode1'"},
{"Name": "'Cash'", "ID": "2", "SID": "'sidTablePaymentMode2'"},
{"Name": "'Alipay'", "ID": "3", "SID": "'sidTablePaymentMode3'"},
{"Name": "'WeChat Wallet'", "ID": "4", "SID": "'sidTablePaymentMode4'"},
{"Name": "'Other'", "ID": "100", "SID": "'sidOther'"}
]
}
|
class Graph(object):
def __init__(self, graph_dict=None):
if graph_dict == None:
graph_dict = {}
self.__graph_dict = graph_dict
|
def add_reporter_email_recipients(client=None,
project_key=None,
scenario_id=None,
recipients=[]):
"""Append additional recipients to a scenario email reporter.
"""
prj = client.get_project(project_key)
scn_settings = prj.get_scenario(scenario_id).get_settings()
reporters = scn_settings.raw_reporters
if not reporters:
print("No reporter found, will do nohting.")
else:
for rep in reporters:
messaging = rep["messaging"]
if messaging["type"] == "mail-scenario":
if messaging["configuration"]["recipient"]:
sep = ', '
else:
sep = ''
messaging["configuration"]["recipient"] += (sep + ', '.join(recipients))
scn_settings.save()
|
main = {
'General': {
'Prop': {
'Labels': 'rw',
'AlarmStatus': 'r-'
}
}
}
cfgm = {
'General': {
'Prop': {
'Blacklist': 'rw'
}
}
}
fm = {
'Status': {
'Prop': {
'AlarmStatus': 'r-'
},
'Cmd': (
'Acknowledge',
)
},
'Configuration': {
'Prop': {
'AlarmConfiguration': 'rw'
}
},
'DuplicatedMac': {
'Prop': {
'DuplicatedMacAccessList': 'r-'
},
'Cmd': (
'FlushMacAccessDuplicatedList',
)
}
}
status = {
'DynamicList': {
'Prop': {
'DynamicList': 'r-'
},
'Cmd': (
'FlushMacAccessDynamicList',
'DeleteMacAccessDynamicListEntry'
)
},
'UNIBlacklist': {
'Prop': {
'Blacklist': 'r-',
'BNGlist': 'r-'
},
'Cmd': (
'DeleteMacAccessBNGlistEntry',
)
}
}
|
temp = input("Co chcesz sprawdzić? \n1 - Palindrom \n2 - Anagram \n\n")
while (temp != "1") and (temp != "2"):
temp = input("------\nCo chcesz sprawdzić? \n1 - Palindrom \n2 - Anagram \n\n")
if temp == "1":
word = input("Podaj słowo: ")
if word == word[::-1]:
print("Słowo jest palindromem.")
else:
print("Słowo nie jest palindromem.")
if temp == "2":
word1 = input("Podaj pierwsze słowo: ")
word2 = input("Podaj drugie słowo: ")
if word1 == word2:
print("Słowa są takie same.")
exit
elif (word1 == None) or (word1 == "") or (word2 == None) or (word2 == ""):
print("Nie podano poprawnych słów.")
exit
if len(word1) != len(word2):
print("Słowa nie sa tej samej długości. Anagramy tego wymagają.")
else:
word1 = sorted(word1)
word2 = sorted(word2)
if word1 != word2:
print("Slowa nie sa anagramami.")
else:
print("Slowa sa anagramami.") |
tiles = [
# Riker's Island - https://www.openstreetmap.org/relation/3955540
(10, 301, 384, 'Rikers Island'),
# SF County Jail - https://www.openstreetmap.org/way/103383866
(14, 2621, 6332, 'SF County Jail')
]
for z, x, y, name in tiles:
assert_has_feature(
z, x, y, 'pois',
{ 'kind': 'prison',
'name': name })
# Rikers Island also should have a landuse polygon
assert_has_feature(
10, 301, 384, 'landuse',
{ 'kind': 'prison' })
|
def median(x):
sorted_x = sorted(x)
midpoint = len(x) // 2
if len(x) % 2:
return sorted_x[midpoint]
else:
return (sorted_x[midpoint]+sorted_x[midpoint-1])/2
assert median([1]) == 1
assert median([1, 2]) == 1.5
assert median([1, 2, 3]) == 2
assert median([3,1,2]) == 2
assert median([3,1,4,2]) == 2.5
n = 9 #int(input())
arr = [3,7,8,5,12,14,21,13,18] #[int(v) for v in input().split()]
q2 = median(arr)
q1 = median([xi for xi in arr if xi < q2])
q3 = median([xi for xi in arr if xi > q2])
print(int(q1))
print(int(q2))
print(int(q3))
|
'''19 cows, 14 apples, 2 tables, a pig and an onion'''
def count_things(words):
vowels = ('a', 'e', 'o', 'i', 'u')
words_set = set(words)
res = [[i,words.count(i)] for i in words_set]
res.sort(key = lambda x: -x[1])
result = []
for i in res:
if i[1] > 1:
i[0] = str(i[0]) + 's'
result.append(' '.join([str(i[1]),i[0]]))
else:
if i[0][0] in vowels:
i[0] = 'an ' + i[0]
else:
i[0] = 'a ' + i[0]
result.append(i[0])
if len(words_set) > 1:
return ', '.join(result[:-1]) + ' and ' + result[-1]
return result[0]
# при сортировке элементы с одинаковым количеством постоянно меняют последовательность ( т.к. для формирования количества использую set, нужно переписать код,
# что бы последовательность ввода и вывода не изменялась?)
print(count_things(['pig', 'cow', 'apple', 'cow']))
print(count_things (['pig'] + ['onion'] + ['apple']*14 + ['cow']*19 + ['table']*2))
|
#!/usr/bin/python3
#https://codeforces.com/contest/1426/problem/F
def f(s):
_,a,ab,abc = 1,0,0,0
for c in s:
if c=='a':
a += _
elif c=='b':
ab += a
elif c=='c':
abc += ab
else:
abc *= 3
abc += ab
ab *= 3
ab += a
a *= 3
a += _
_ *= 3
return abc%1000000007
_ = input()
s = input()
print(f(s))
|
quantidade = 0
soma = 0
while True:
n = int(input('Digite um número inteiro (digite "999" para parar): '))
if n == 999:
break
quantidade += 1
soma += n
print(f'A soma dos {quantidade} números digitados é {soma}')
|
DEBUG = True
INSTAGRAM_CLIENT_ID = ''
INSTAGRAM_CLIENT_SECRET = ''
INSTAGRAM_CALLBACK = 'http://cameo.gala-isen.fr/api/instagram/hub'
MONGODB_NAME = 'cameo'
MONGODB_HOST = 'localhost'
MONGODB_PORT = 27017
REDIS_HOST = 'localhost'
REDIS_PORT = 6379 |
npratio = 4
MAX_SENTENCE = 30
MAX_ALL = 50
MAX_SENT_LENGTH=30
MAX_SENTS=50 |
"""
Module: 'upip_utarfile' on esp32 1.13.0-103
"""
# MCU: (sysname='esp32', nodename='esp32', release='1.13.0', version='v1.13-103-gb137d064e on 2020-10-09', machine='ESP32 module (spiram) with ESP32')
# Stubber: 1.3.4
DIRTYPE = 'dir'
class FileSection:
''
def read():
pass
def readinto():
pass
def skip():
pass
REGTYPE = 'file'
TAR_HEADER = None
class TarFile:
''
def extractfile():
pass
def next():
pass
class TarInfo:
''
def roundup():
pass
uctypes = None
|
class Solution:
"""
@param scores: two dimensional array
@param K: a integer
@return: return a integer
"""
def FindTheRank(self, scores, K):
# write your code here
tuple_scores = []
for idx, score in enumerate(scores):
tuple_scores.append([score, idx])
sorted_scores = sorted(tuple_scores, key=lambda x: sum(x[0]))
return sorted_scores[::-1][K - 1][1]
|
# -*- coding: utf-8 -*-
"""
Common use sicd_elements methods.
"""
def _get_center_frequency(RadarCollection, ImageFormation):
"""
Helper method.
Parameters
----------
RadarCollection : sarpy.io.complex.sicd_elements.RadarCollection.RadarCollectionType
ImageFormation : sarpy.io.complex.sicd_elements.ImageFormation.ImageFormationType
Returns
-------
None|float
The center processed frequency, in the event that RadarCollection.RefFreqIndex is `None` or `0`.
"""
if RadarCollection is None or RadarCollection.RefFreqIndex is None or RadarCollection.RefFreqIndex == 0:
return None
if ImageFormation is None or ImageFormation.TxFrequencyProc is None or \
ImageFormation.TxFrequencyProc.MinProc is None or ImageFormation.TxFrequencyProc.MaxProc is None:
return None
return 0.5 * (ImageFormation.TxFrequencyProc.MinProc + ImageFormation.TxFrequencyProc.MaxProc)
|
# Solution to day 1 of AOC 2015, Not Quite Lisp.
# https://adventofcode.com/2015/day/1
f = open('input.txt')
whole_text = f.read()
f.close()
floor = 0
steps = 0
basement_found = False
for each_char in whole_text:
if not basement_found:
steps += 1
if each_char == '(':
floor += 1
elif each_char == ')':
floor -= 1
if floor == -1:
basement_found = True
print('Part 1:', floor)
print('Part 2:', steps)
|
# coding=utf-8
# Author: Jianghan LI
# Question: 056.Merge_Intervals
# Date: 2017-04-04 10:43 - 10:51
# Complexity: O(NLogN)
# Definition for an interval.
# class Interval(object):
# def __init__(self, s=0, e=0):
# self.start = s
# self.end = e
class Solution(object):
def merge(self, intervals):
"""
:type intervals: List[Interval]
:rtype: List[Interval]
"""
res = []
for i in sorted(intervals, key=lambda i: i.start):
if len(res) == 0 or res[-1].end < i.start:
res.append(i)
else:
res[-1].end = max(res[-1].end, i.end)
return res
|
String1="Hello World!"
String2="AbCD123!"
"""
This shows the method startswith() and endswith() working.
"""
print(String1.endswith('World!'))
print(String1.startswith('Hell'))
print(String2.endswith('12'))
print(String2.endswith('3'))
print(String1.startswith('Hello '))
print(String2.startswith('A'))
print(String1.endswith('!')) |
'''
Задача 5
Роберт успешно справился с вылазкой в тыл врага и раздобыл одну полоску из тетради в клетку длинной N клеток. Кроме этого, в руки Роберта попал лист изменений этой полоски. Враг выбирал две позиции i и j и записывал между ними новое сообщение. При этом, если новое сообщение накладывалось на старое, то старое являлось навсегда утерянным. Напишите программу, которая определит, сколько финальных не утерянных сообщений осталось на ленте.
Входные данные
Первая строка содержит длину клетчатой полоски N (1 \leqslant N \leqslant 10^9)N(1⩽N⩽10
9
). Вторая строка содержит количество пар в листе изменений M (0 \leqslant M \leqslant 1000)M(0⩽M⩽1000). Следующие M строк содержат пары чисел i и j, задающих номера клеток начала и конца сообщения (1 \leqslant i \leqslant j \leqslant N)(1⩽i⩽j⩽N).
Результат работы
Выведите единственное число – количество не утерянных сообщений на ленте.
Примеры
Входные данные
10
3
8 10
2 9
1 3
Результат работы
1
'''
# n = 10
# changes = [[8, 10], [2, 9], [1, 3]]
n = int(input())
ch = int(input())
changes = []
for _ in range(ch):
changes.append(input().split(' '))
s = ['old' for i in range(n)]
for change in changes:
start, end = map(lambda x: int(x), change)
# s = s[0:start-1] + s[end:] # 8-10 заменяем
# s = s[0:start] + s[end-1:] # вставляем между 8-10
for i in range(start, end-1):
s[i] = 'new'
print(s.count('old'))
|
"""
有一个1GB大小的文件,文件里的每一行是一个词,每个词的大小不超过16B,内存大小限制是1MB,要求返回频数最高的100个词.
"""
"""
解决思路:
(1) 遍历文件,对遍历到的每一个词执行如下的Hash操作:hash(x) % 2000,将结果为i的词存放到文件ai中,通过这个分解步骤,可以使
每个子文件的大小约为400KB左右,如果这个操作后某个文件的大小超过了1MB了,那么可以采用相同的方法对这个文件继续分解,
直到文件的大小小于1MB为止.
(2) 统计出每个文件中出现频率最高的100个词,最简单的方法为使用字典实现,具体实现方法为:遍历文件中的所有词,对于遍历到的词,
如果字典中不存在,那么把这个词存入字典中去,如果这个词在字典中已经存在,那么把这个词对应的值+1.遍历完后可以非常容易地
找出出现频率最高的100个词.
(3) 第(2)步中找出了每个文件中出现频率最高的100个词,这一步可以通过维护一个小顶堆来找出所有词中出现频率最高的100个词,
具体方法为:遍历第一个文件,把第一个文件中出现频率最高的100个词组成一个小顶堆.(如果第一个文件中词的个数小于100,那么可以继续
遍历第2个文件,直到构件刚好有100个结点的小顶堆为止).继续遍历,如果遍历到的词的出现次数大于堆顶上词的出现次数,那么可以用新遍历
到的词替换堆顶的词,然后重新调整这个堆为小顶堆.当遍历完所有文件后,这个小顶堆中的词就是出现频率最高的100个词.当然,这一步也可以
采用类似于归并排序的方法把所有的文件中出现频率最高的100个词排序,最终得到出现频率最高的100个词.
""" |
ask = "time is time versus time"
count = 0
for t in ask:
if t == "t":
count += 1
print(count)
number = list(range(5, 20, 2))
print(number) |
class CSVEmployeeRepository:
def __init__(self, csv_intepreter):
self._anagraphic = csv_intepreter.employees()
def birthdayFor(self, month, day):
return self._anagraphic.bornOn(Birthday(month, day))
class Anagraphic:
def __init__(self, employees):
self._employees = employees
def bornOn(self, birthday):
return self._employees.get(birthday)
class Birthday:
def __init__(self, month, day):
self._month = month
self._day = day
def __key(self):
return (self._month, self._day)
def __eq__(self, other):
return self.__key() == other.__key()
def __hash__(self):
return hash(self.__key()) |
PACKAGE_NAME = 'cdeid'
SPACY_PRETRAINED_MODEL_LG = 'en_core_web_lg'
# SPACY_PRETRAINED_MODEL_SM = 'en_core_web_sm'
PROGRESS_STATUS = {
1: 'prepare data sets',
2: 'train spacy on balanced sets',
3: 'train stanza on balanced sets',
4: 'train flair on balanced sets',
5: 'train spacy on imbalanced sets',
6: 'train stanza on imbalanced sets',
7: 'train flair on imbalanced sets',
8: 'ensemble models',
9: 'previous training process completed.'
}
TAG_BEGIN = 'TAGTAGBEGIN'
TAG_END = 'TAGTAGEND'
BIO_SCHEME_1 = 'BIO1'
BIO_SCHEME_2 = 'BIO2'
tag_1 = '<span class="selWords">'
tag_2 = '<span class='
tag_3 = 'tag">'
tag_4 = '</span></span>' |
def handle(event, context):
file = open("dynamicdns/scripts/dynamic-dns-client", "r")
content = file.read()
file.close()
headers = {
"Content-Type": "text/plain"
}
body = content
response = {
"statusCode": 200,
"headers": headers,
"body": body
}
return response
|
# Time: O(n)
# Space: O(h)
# Given a binary tree, you need to compute the length of the diameter of the tree.
# The diameter of a binary tree is the length of the longest path between
# any two nodes in a tree. This path may or may not pass through the root.
#
# Example:
# Given a binary tree
# 1
# / \
# 2 3
# / \
# 4 5
# Return 3, which is the length of the path [4,2,1,3] or [5,2,1,3].
#
# Note: The length of path between two nodes is represented by the number of edges between them.
# Definition for a binary tree node.
class TreeNode(object):
def __init__(self, val=0, left=None, right=None):
self.val = val
self.left = left
self.right = right
class Solution(object):
def diameterOfBinaryTree(self, root): # USE THIS
"""
:type root: TreeNode
:rtype: int
"""
def dfs(root):
if not root:
return 0, 0
left_d, left = dfs(root.left)
right_d, right = dfs(root.right)
return max(left_d, right_d, left+right), 1+max(left, right)
return dfs(root)[0]
def diameterOfBinaryTree2(self, root):
def depth(root, diameter):
if not root: return 0, diameter
left, diameter = depth(root.left, diameter)
right, diameter = depth(root.right, diameter)
return 1 + max(left, right), max(diameter, left + right)
return depth(root, 0)[1]
# leverage the classical way to calculate tree depth
class Solution2(object):
def diameterOfBinaryTree(self, root):
self.ans = 1
def depth(node):
if not node: return 0
L = depth(node.left)
R = depth(node.right)
self.ans = max(self.ans, L+R)
return max(L, R) + 1
depth(root)
return self.ans
class Solution3(object):
def diameterOfBinaryTree(self, root):
def iter_dfs(node):
result = 0
max_depth = [0]
stk = [(1, [node, max_depth])]
while stk:
step, params = stk.pop()
if step == 1:
node, ret = params
if not node:
continue
ret1, ret2 = [0], [0]
stk.append((2, [node, ret1, ret2, ret]))
stk.append((1, [node.right, ret2]))
stk.append((1, [node.left, ret1]))
elif step == 2:
node, ret1, ret2, ret = params
result = max(result, ret1[0]+ret2[0])
ret[0] = 1+max(ret1[0], ret2[0])
return result
return iter_dfs(root)
|
class Bird():
def __init__(self) :
self.wings = True
self.fur = True
self.fly = True
def isFly(self) :
return self.fly
Parrot = Bird()
if Parrot.isFly() == "fly" :
print("Parrot must be can fly")
else :
print("Why Parrot can't fly ?")
###### Inheritance #####
class Penguin(Bird) :
def __init__(self) :
self.fly = False
Penguin = Penguin()
if Penguin.isFly() == True :
print("No way, penguin can't fly")
else :
print("Penguin is swimming")
###################### |
class MapMatcher:
def __init__(self, rn, routing_weight='length'):
self.rn = rn
self.routing_weight = routing_weight
def match(self, traj):
pass
def match_to_path(self, traj):
pass
|
#-*- coding: utf-8 -*-
# ------ wuage.com testing team ---------
# __author__ : weijx.cpp@gmail.com
def split(word):
return [char for char in word]
def test_crypt2():
letter :str = u"a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z"
let = letter.split("," ,maxsplit=26)
# let = ["X", "Y"]
# print(let.index('Y'))
#print(let)
cypterdata :str = "yriry gjb cnffjbeq ebggra"
#cypterdata :str = "yriry"
cypterwords = cypterdata.split(" ")
for i in range(1,26):
print("++++++++++++++++++++++")
for word in cypterwords:
#print(word)
letters = split(word)
plain_w = ""
for alf in letters:
cpyterindex = let.index(alf)
p_index = (cpyterindex + i) % 26
plain_w = plain_w + let[p_index]
print(plain_w)
if __name__ == '__main__':
letter :str = u"a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z"
let = letter.split("," ,maxsplit=26)
print(let[2:])
# print(let.index('c'))
# test_crypt2() |
def minion_game(string):
# your code goes here
#string = string.lower()
vowel = ['A','E','I','O','U']
kev = 0
stu = 0
n = len(string)
x = n
for i in range(n) :
if string[i] in vowel :
kev += x
else :
stu += x
x -= 1
if kev > stu :
print("Kevin",str(kev))
elif kev < stu :
print("Stuart",str(stu))
else :
print("Draw")
if __name__ == '__main__':
s = input()
minion_game(s)
|
"""
Entendendo Interadores e Iteraveis
#Interador
- Um objeto que poder ser iterado
- Um objeto que retorna um dado, sendo um elemento por vez quando uma função next() é chamada;
#Interaveis
- Um objeto que irá retorna um interator quando inter() for chamada.
""" |
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
# pylint: disable=too-many-lines
# pylint: disable=unused-argument
def maintenance_public_configuration_list(client):
return client.list()
def maintenance_public_configuration_show(client,
resource_name):
return client.get(resource_name=resource_name)
def maintenance_applyupdate_list(client):
return client.list()
def maintenance_applyupdate_show(client,
resource_group_name,
provider_name,
resource_type,
resource_name,
apply_update_name):
return client.get(resource_group_name=resource_group_name,
provider_name=provider_name,
resource_type=resource_type,
resource_name=resource_name,
apply_update_name=apply_update_name)
def maintenance_applyupdate_create(client,
resource_group_name,
provider_name,
resource_type,
resource_name):
return client.create_or_update(resource_group_name=resource_group_name,
provider_name=provider_name,
resource_type=resource_type,
resource_name=resource_name)
def maintenance_applyupdate_update(client,
resource_group_name,
provider_name,
resource_type,
resource_name):
return client.create_or_update(resource_group_name=resource_group_name,
provider_name=provider_name,
resource_type=resource_type,
resource_name=resource_name)
def maintenance_applyupdate_create_or_update_parent(client,
resource_group_name,
provider_name,
resource_parent_type,
resource_parent_name,
resource_type,
resource_name):
return client.create_or_update_parent(resource_group_name=resource_group_name,
provider_name=provider_name,
resource_parent_type=resource_parent_type,
resource_parent_name=resource_parent_name,
resource_type=resource_type,
resource_name=resource_name)
def maintenance_applyupdate_show_parent(client,
resource_group_name,
resource_parent_type,
resource_parent_name,
provider_name,
resource_type,
resource_name,
apply_update_name):
return client.get_parent(resource_group_name=resource_group_name,
resource_parent_type=resource_parent_type,
resource_parent_name=resource_parent_name,
provider_name=provider_name,
resource_type=resource_type,
resource_name=resource_name,
apply_update_name=apply_update_name)
def maintenance_assignment_list(client,
resource_group_name,
provider_name,
resource_type,
resource_name):
return client.list(resource_group_name=resource_group_name,
provider_name=provider_name,
resource_type=resource_type,
resource_name=resource_name)
def maintenance_assignment_show(client,
resource_group_name,
provider_name,
resource_type,
resource_name,
configuration_assignment_name):
return client.get(resource_group_name=resource_group_name,
provider_name=provider_name,
resource_type=resource_type,
resource_name=resource_name,
configuration_assignment_name=configuration_assignment_name)
def maintenance_assignment_create(client,
resource_group_name,
provider_name,
resource_type,
resource_name,
configuration_assignment_name,
location=None,
maintenance_configuration_id=None,
resource_id=None):
configuration_assignment = {}
if location is not None:
configuration_assignment['location'] = location
if maintenance_configuration_id is not None:
configuration_assignment['maintenance_configuration_id'] = maintenance_configuration_id
if resource_id is not None:
configuration_assignment['resource_id'] = resource_id
return client.create_or_update(resource_group_name=resource_group_name,
provider_name=provider_name,
resource_type=resource_type,
resource_name=resource_name,
configuration_assignment_name=configuration_assignment_name,
configuration_assignment=configuration_assignment)
def maintenance_assignment_update(instance,
resource_group_name,
provider_name,
resource_type,
resource_name,
configuration_assignment_name,
location=None,
maintenance_configuration_id=None,
resource_id=None):
if location is not None:
instance.location = location
if maintenance_configuration_id is not None:
instance.maintenance_configuration_id = maintenance_configuration_id
if resource_id is not None:
instance.resource_id = resource_id
return instance
def maintenance_assignment_delete(client,
resource_group_name,
provider_name,
resource_type,
resource_name,
configuration_assignment_name):
return client.delete(resource_group_name=resource_group_name,
provider_name=provider_name,
resource_type=resource_type,
resource_name=resource_name,
configuration_assignment_name=configuration_assignment_name)
def maintenance_assignment_create_or_update_parent(client,
resource_group_name,
provider_name,
resource_parent_type,
resource_parent_name,
resource_type,
resource_name,
configuration_assignment_name,
location=None,
maintenance_configuration_id=None,
resource_id=None):
configuration_assignment = {}
if location is not None:
configuration_assignment['location'] = location
if maintenance_configuration_id is not None:
configuration_assignment['maintenance_configuration_id'] = maintenance_configuration_id
if resource_id is not None:
configuration_assignment['resource_id'] = resource_id
return client.create_or_update_parent(resource_group_name=resource_group_name,
provider_name=provider_name,
resource_parent_type=resource_parent_type,
resource_parent_name=resource_parent_name,
resource_type=resource_type,
resource_name=resource_name,
configuration_assignment_name=configuration_assignment_name,
configuration_assignment=configuration_assignment)
def maintenance_assignment_delete_parent(client,
resource_group_name,
provider_name,
resource_parent_type,
resource_parent_name,
resource_type,
resource_name,
configuration_assignment_name):
return client.delete_parent(resource_group_name=resource_group_name,
provider_name=provider_name,
resource_parent_type=resource_parent_type,
resource_parent_name=resource_parent_name,
resource_type=resource_type,
resource_name=resource_name,
configuration_assignment_name=configuration_assignment_name)
def maintenance_assignment_list_parent(client,
resource_group_name,
provider_name,
resource_parent_type,
resource_parent_name,
resource_type,
resource_name):
return client.list_parent(resource_group_name=resource_group_name,
provider_name=provider_name,
resource_parent_type=resource_parent_type,
resource_parent_name=resource_parent_name,
resource_type=resource_type,
resource_name=resource_name)
def maintenance_assignment_show_parent(client,
resource_group_name,
provider_name,
resource_parent_type,
resource_parent_name,
resource_type,
resource_name,
configuration_assignment_name):
return client.get_parent(resource_group_name=resource_group_name,
provider_name=provider_name,
resource_parent_type=resource_parent_type,
resource_parent_name=resource_parent_name,
resource_type=resource_type,
resource_name=resource_name,
configuration_assignment_name=configuration_assignment_name)
def maintenance_configuration_list(client):
return client.list()
def maintenance_configuration_show(client,
resource_group_name,
resource_name):
return client.get(resource_group_name=resource_group_name,
resource_name=resource_name)
def maintenance_configuration_create(client,
resource_group_name,
resource_name,
location=None,
tags=None,
namespace=None,
extension_properties=None,
maintenance_scope=None,
visibility=None,
start_date_time=None,
expiration_date_time=None,
duration=None,
time_zone=None,
recur_every=None,
reboot_setting=None,
windows_parameters=None,
linux_parameters=None,
pre_tasks=None,
post_tasks=None):
configuration = {}
if location is not None:
configuration['location'] = location
if tags is not None:
configuration['tags'] = tags
if namespace is not None:
configuration['namespace'] = namespace
if extension_properties is not None:
configuration['extension_properties'] = extension_properties
if maintenance_scope is not None:
configuration['maintenance_scope'] = maintenance_scope
if visibility is not None:
configuration['visibility'] = visibility
if start_date_time is not None:
configuration['start_date_time'] = start_date_time
if expiration_date_time is not None:
configuration['expiration_date_time'] = expiration_date_time
if duration is not None:
configuration['duration'] = duration
if time_zone is not None:
configuration['time_zone'] = time_zone
if recur_every is not None:
configuration['recur_every'] = recur_every
configuration['install_patches'] = {}
if reboot_setting is not None:
configuration['install_patches']['reboot_setting'] = reboot_setting
else:
configuration['install_patches']['reboot_setting'] = "IfRequired"
if windows_parameters is not None:
configuration['install_patches']['windows_parameters'] = windows_parameters
if linux_parameters is not None:
configuration['install_patches']['linux_parameters'] = linux_parameters
if pre_tasks is not None:
configuration['install_patches']['pre_tasks'] = pre_tasks
if post_tasks is not None:
configuration['install_patches']['post_tasks'] = post_tasks
if len(configuration['install_patches']) == 0:
del configuration['install_patches']
return client.create_or_update(resource_group_name=resource_group_name,
resource_name=resource_name,
configuration=configuration)
def maintenance_configuration_update(client,
resource_group_name,
resource_name,
location=None,
tags=None,
namespace=None,
extension_properties=None,
maintenance_scope=None,
visibility=None,
start_date_time=None,
expiration_date_time=None,
duration=None,
time_zone=None,
recur_every=None,
reboot_setting=None,
windows_parameters=None,
linux_parameters=None,
pre_tasks=None,
post_tasks=None):
configuration = {}
if location is not None:
configuration['location'] = location
if tags is not None:
configuration['tags'] = tags
if namespace is not None:
configuration['namespace'] = namespace
if extension_properties is not None:
configuration['extension_properties'] = extension_properties
if maintenance_scope is not None:
configuration['maintenance_scope'] = maintenance_scope
if visibility is not None:
configuration['visibility'] = visibility
if start_date_time is not None:
configuration['start_date_time'] = start_date_time
if expiration_date_time is not None:
configuration['expiration_date_time'] = expiration_date_time
if duration is not None:
configuration['duration'] = duration
if time_zone is not None:
configuration['time_zone'] = time_zone
if recur_every is not None:
configuration['recur_every'] = recur_every
configuration['install_patches'] = {}
if reboot_setting is not None:
configuration['install_patches']['reboot_setting'] = reboot_setting
else:
configuration['install_patches']['reboot_setting'] = "IfRequired"
if windows_parameters is not None:
configuration['install_patches']['windows_parameters'] = windows_parameters
if linux_parameters is not None:
configuration['install_patches']['linux_parameters'] = linux_parameters
if pre_tasks is not None:
configuration['install_patches']['pre_tasks'] = pre_tasks
if post_tasks is not None:
configuration['install_patches']['post_tasks'] = post_tasks
if len(configuration['install_patches']) == 0:
del configuration['install_patches']
return client.update(resource_group_name=resource_group_name,
resource_name=resource_name,
configuration=configuration)
def maintenance_configuration_delete(client,
resource_group_name,
resource_name):
return client.delete(resource_group_name=resource_group_name,
resource_name=resource_name)
def maintenance_update_list(client,
resource_group_name,
provider_name,
resource_type,
resource_name):
return client.list(resource_group_name=resource_group_name,
provider_name=provider_name,
resource_type=resource_type,
resource_name=resource_name)
def maintenance_update_list_parent(client,
resource_group_name,
provider_name,
resource_parent_type,
resource_parent_name,
resource_type,
resource_name):
return client.list_parent(resource_group_name=resource_group_name,
provider_name=provider_name,
resource_parent_type=resource_parent_type,
resource_parent_name=resource_parent_name,
resource_type=resource_type,
resource_name=resource_name)
|
def day5(fileName, part):
niceCount = 0
with open(fileName) as infile:
for line in infile:
vowels = sum(line.count(vowel) for vowel in "aeiou")
if vowels < 3:
continue
foundDouble = any(line[i] == line[i+1] for i in range(len(line) - 1))
if not foundDouble:
continue
foundBadString = any(badString in line for badString in ["ab", "cd", "pq", "xy"])
if foundBadString:
continue
niceCount += 1
print(niceCount)
def day5b(fileName, part):
niceCount = 0
with open(fileName) as infile:
for line in infile:
repeatLetter = any(line[i] == line[i+2] for i in range(len(line) - 2))
if not repeatLetter:
continue
repeatPair = any(line[i:i+2] in line[i+2:] for i in range(len(line) - 4))
if not repeatPair:
continue
niceCount += 1
print(niceCount)
if __name__ == "__main__":
day5("5test.txt", 1)
day5("5.txt", 1)
day5b("5btest.txt", 0)
day5b("5.txt", 0)
|
class Solution:
def subsets(self, nums: List[int]) -> List[List[int]]:
nums.sort()
res = []
self.bt(nums, 0, [], res)
return res
def bt(self, nums, idx, tempList, res):
res.append(tempList)
for i in range(idx, len(nums)):
self.bt(nums, i+1, tempList+[nums[i]], res) |
'''
环形链表
给定一个链表,判断链表中是否有环。
如果链表中有某个节点,可以通过连续跟踪 next 指针再次到达,则链表中存在环。 为了表示给定链表中的环,我们使用整数 pos 来表示链表尾连接到链表中的位置(索引从 0 开始)。 如果 pos 是 -1,则在该链表中没有环。注意:pos 不作为参数进行传递,仅仅是为了标识链表的实际情况。
如果链表中存在环,则返回 true 。 否则,返回 false 。
'''
# Definition for singly-linked list.
class ListNode:
def __init__(self, x):
self.val = x
self.next = None
'''
思路1,遍历链表,遍历过的节点放入set中,如果遍历过程中发现节点在set中存在,有环;如果完成后未发现set中有重复遍历的节点,则没有环。
时间复杂度:O(n),遍历1次
空间复杂度:O(n)
思路2,修改链表
提示中说明:-10^5 <= Node.val <= 10^5,可以将遍历过的节点值+10^7,如果遍历过程中没有遇到>10^6的值,说明没有环。
时间复杂度:O(n),如果有要求可以遍历第2次将值恢复
空间复杂度:O(1)
思路3,双指针
设置2个指针,一个快指针fast,一个慢指针slow,fast前进2步,slow前进一步。
- 如果fast指针往前能走到尽头,说明链表没有环,返回false
- 如果fast指针能追上slow指针,说明链表中有环,返回true
时间复杂度:O(n)
空间复杂度:O(1)
'''
class Solution:
def hasCycle(self, head: ListNode) -> bool:
fast, slow = head, head
while fast and fast.next:
fast = fast.next.next
slow = slow.next
if fast == slow:
return True
return False
|
''' Exception module '''
class CallGitServerException(Exception):
''' Base Exception for filtering Call Git Server Exceptions '''
STATUS_CODE = 127
class DuplicateRemote(CallGitServerException):
''' Exception throwed when there arent any match with the username '''
STATUS_CODE = 128
def __init__(self, name, branchRef, elementType):
if 'Tag' in elementType:
message = f'{elementType}: {name} on \"{branchRef}\" Already exist.'
else:
message = f'{elementType}: {name} Already exist.'
super().__init__( self, message ) |
# This file contains the information for creating a socket for EACH
# of the clients, it also contains the CLient class itself that is managed from the
# server file (see server.py)
class Command:
"""
Stores information about the every single command of the client.
"""
def __init__(self, command, result):
self.__command = command
self.__result = result
def get_command(self):
return self.__command
def get_result(self):
return self.__result
class ClientConfiguration:
"""
Stores all the configuration for a simple client, for example the port
or the ip address.
"""
def __init__(self, conn, addr):
"""
The constructor method for the ClientConfiguration class.
Parameters
----------
conn:
The connexion of the client
addr: tuple
A tuple (address) (<ip>, <port>)
"""
self.conn = conn
self.addr = addr
def __repr__(self):
"""
Returns a simple representation of the configuration.
Returns
-------
msg: str
[<addr>]
"""
return f"[{self.addr}]"
class Client:
"""
Handles an specific client for the server.
"""
def __init__(self, client_id, conf):
"""
The constructor method for the Client class.
Parameters
----------
client_id: int
A numeric value for make each of the client.
conf: ClientConfiguration
The instance that stores the configuration of the specific client.
"""
self.client_id = client_id
self.conf = conf
self.commands = []
def send(self, msg, dcf):
"""
Sends an specific message to the client itself using a general server
Parameters
----------
msg: str
The message itself
dcf: str
The decode format for sending the message
"""
try:
self.conf.conn.send(msg.encode(dcf))
except Exception as e:
print(f"{self.conf.__repr__()} E: {e}")
def recv(self, bites, dcf):
"""
Receives a message from the server to then return it.
Parameters
----------
bites: int
The maximum nº of bytes that the client can receive
dcf: str
The decode format of the bites.
Returns
-------
msg: str
The message
"""
try:
msg = self.conf.conn.recv(bites).decode(dcf)
return msg
except Exception as e:
print(f"{self.conf.__repr__()}: {e}")
def close(self):
"""
Is used to close all the client
connections with the server.
"""
self.conf.conn.close()
|
def test(tested_mod, Assert):
test_cases = [
# (expected, input)
([4], [4]),
([9,6], [6,9]),
([4,3,2,1], [4,3,2,1]),
([4,3,2,1], [1,2,3,4]),
([9,5,2,1], [1,5,2,9])
]
return Assert.all(tested_mod.sortierte_zettel, test_cases)
|
P, Q = map(float, input().split())
p, q = P / 100, Q / 100
a = p * q
b = (1 - p) * (1 - q)
print(a / (a + b) * 100)
|
# https://leetcode.com/problems/merge-sorted-array/
class Solution:
# Input:
# [1, 2, 2, 3, 5, 6], m = 3
# [2, 5, 6], n = 3
# [2, 0]
# [1]
# [1, 2, 0]
# [4]
def merge(self, nums1: List[int], m: int, nums2: List[int], n: int) -> None:
"""
Do not return anything, modify nums1 in-place instead.
"""
if not nums1 or not nums2:
return
# Note: m and n are `number of steps`, not indices,
# that is why > is used instead of >=
while n > 0 and m > 0:
if nums1[m-1] <= nums2[n-1]:
nums1[m+n-1] = nums2[n-1]
n -= 1
else:
nums1[m+n-1] = nums1[m-1]
m -= 1
if n > 0:
nums1[:n] = nums2[:n]
|
##Patterns: E0116
while True:
try:
pass
finally:
##Err: E0116
continue
while True:
try:
pass
finally:
break
while True:
try:
pass
except Exception:
pass
else:
continue
|
class ESError(Exception):
pass
class ESRegistryError(ESError):
pass
|
# Exercício 01
# Faça um programa que leia 5 números inteiros e os coloque em uma lista.
# Após, pergunte ao usuário uma posição na lista e apresente o valor que
# está nessa posição. Faça o tratamento de erro para a leitura dos números
# e também para a posição na lista.
lista = []
for i in range(0,5):
try:
lista.append(int(input('Informe um número: ')))
except Exception as erro:
print(f'Informação inválida!!! Erro: {erro.__class__}')
try:
pos = int(input('Que posição deseja visitar?: '))
print(f'Posição solicitada: {lista[pos]}')
except:
print('Posição inválida')
|
def mobilenet_conv_block(x, kernel_size, output_channels):
"""
Depthwise Conv -> Batch Norm -> ReLU -> Pointwise Conv -> Batch Norm -> ReLU
"""
# assumes BHWC format
input_channel_dim = x.get_shape().as_list()[-1]
W = tf.Variable(tf.truncated_normal((kernel_size, kernel_size, input_channel_dim, 1)))
# depthwise conv
x = tf.nn.depthwise_conv2d(x, W, (1, 2, 2, 1), padding='SAME')
x = tf.layers.batch_normalization(x)
x = tf.nn.relu(x)
# pointwise conv
x = tf.layers.conv2d(x, output_channels, (1, 1), padding='SAME')
x = tf.layers.batch_normalization(x)
return tf.nn.relu(x) |
class Solution:
def maxProfit(self, prices):
"""
:type prices: List[int]
:rtype: int
"""
maxprofit = 0
if (len(prices) == 0):
return 0
left = 0
right = left + 1
while (right < len(prices)):
diff = prices[right] - prices[left]
if (diff <= 0):
left = right
right += 1
else:
profit = diff
if (profit > maxprofit):
maxprofit = profit
right += 1
return maxprofit
print (Solution().maxProfit([7, 1, 2, 5, 3, 6, 4]))
|
movies = ['The Matrix', 'Fast & Furious',
'Frozen',
'The life of Pi']
for movie in movies: print(movie)
print('We\'re done here!')
|
# this code is not correct
class Node:
def __init__(self, data, next=None):
self.data=data
self.next = next
def printList(head):
print(head.data)
if head.next == None:
return
return printList(head.next)
def reverseList(head):
if head.next == None:
return head
nextnext = head.next.next
head.next = nextnext
head = head.next
return reverseList(head)
head = Node(3)
n2 = Node(2)
head.next = n2
n3 = Node(1)
n2.next = n3
printList(head)
printList(reverseList(head))
|
def rule(event):
return event.get("action") == "Blocked"
def title(event):
return "Access denied to domain " + event.get("domain", "<UNKNOWN_DOMAIN>")
|
def static_vars(**kwargs):
"""
Decorates a function with the given attributes
Parameters
----------
**kwargs
a list of attributes and their initial value
"""
def decorate(func):
for k in kwargs:
setattr(func, k, kwargs[k])
return func
return decorate
|
# Config for OpenMX_viewer
# For Gui
fontFamilies=["Segoe UI", "Yu Gothic UI"]
# font sizes are in unit of pixel
fontSize_normal=16
fontSize_large=24
ContentsMargins=[5,5,5,5]
tickLength=-30
sigma_max=5
Eh=27.2114 # (eV)
# Pen for vLine and hLine
pen1=(0, 255, 0)
pen2=(255, 0, 0)
pen3=(255, 255, 0)
gridAlpha=50 # 100 =max
plot3D_minWidth=400
plot3D_minHeight=400
|
# Also used on the Yamaha Reface CS?
def compute_checksum(data):
"""Compute checksum from a list of byte values.
This is appended to the data of the sysex message.
"""
return (128 - (sum(data) & 0x7F)) & 0x7F
|
viagem = int(input('Quantos KMs está a sua viagem: '))
if viagem <= 200:
print(f'O custo da sua viagem será {viagem * 0.5}R$')
else:
print(f'O custo da sua viajem será {viagem * 0.45}') |
#!/usr/bin/python3
"""
Module Docstring
"""
__author__ = "Dinesh Tumu"
__version__ = "0.1.0"
__license__ = "MIT"
# imports
# init variables
def main():
""" Main entry point of the app """
# Open a file for writing and create it if it doesn't exist
f = open("textfile.txt","w+")
# Open the file for appending text to the end
# f = open("textfile.txt","a+")
# write some lines of data to the file
for i in range(10):
f.write("This is line %d\r\n" % (i+1))
# close the file when done
f.close()
# Open the file back up and read the contents
f = open("textfile.txt","r")
if f.mode == 'r': # check to make sure that the file was opened
# use the read() function to read the entire file
# contents = f.read()
# print (contents)
fl = f.readlines() # readlines reads the individual lines into a list
for x in fl:
print (x)
if __name__ == "__main__":
""" This is executed when run from the command line """
main() |
destinations = input()
while True:
input_command = input()
if input_command == "Travel":
break
arg = input_command.split(":")
command = arg[0]
if command == "Add Stop":
index = int(arg[1])
string = arg[2]
if 0 <= index < len(destinations):
destinations = destinations[:index] + string + destinations[index:]
print(destinations)
elif command == "Remove Stop":
start_index = int(arg[1])
end_index = int(arg[2])
if 0 <= start_index < len(destinations) and 0 < end_index < len(destinations):
destinations = destinations[:start_index] + destinations[end_index + 1:]
print(destinations)
elif command == "Switch":
old_string = arg[1]
new_string = arg[2]
destinations = destinations.replace(old_string, new_string)
print(destinations)
print(f"Ready for world tour! Planned stops: {destinations}")
|
def html_tag():
# write body of decorator
pass
@html_tag('p')
def foobar():
return 'foobar'
if __name__ == "__main__":
assert foobar() == '<p>foobar</p>'
|
def max_power(s: str) -> int:
max_ = 1
curr = 1
for i in range(1, len(s)):
if s[i] == s[i - 1]:
curr += 1
else:
if curr > max_:
max_ = curr
curr = 1
return max(max_, curr)
if __name__ == '__main__':
max_power("ccbccbb") |
distancia = float(input('Entre com a distancia da sua viagem, em Km: '))
if distancia > 200:
print('O valor da sua passagem é R${:.2f}!'.format(distancia*0.45))
else:
print('O valor da sua passagem é R${:.2f}!'.format(distancia*0.5))
|
class TestThruster:
def test_get(self, log_in, test_client):
response = test_client.get('/thruster')
data = response.get_json()[0]
assert response.status_code == 200
assert 1 == data['id']
assert 'T10' == data['name']
assert 10 == data['thrust_power']
|
data = {
"last-modified-date": {
"value": 1523547463983
},
"name": {
"created-date": {
"value": 1523547463758
},
"last-modified-date": {
"value": 1523547463983
},
"given-names": {
"value": "Cecilia"
},
"family-name": {
"value": "Payne"
},
"credit-name": None,
"source": None,
"visibility": "PUBLIC",
"path": "0000-0001-8868-9743"
},
"other-names": {
"last-modified-date": None,
"other-name": [],
"path": "/0000-0001-8868-9743/other-names"
},
"biography": None,
"path": "/0000-0001-8868-9743/personal-details"
} |
a = int(input())
t = input()
b = int(input())
if t == '*':
print(a*b)
elif t == '+':
print(a+b)
|
a1 = int(input('Digite o primeiro termo: '))
razão = int(input('Digite a razão: '))
for c in range(1, 11):
print(f'a{c} = {a1}', end=' | ')
a1 += razão
|
tablero_inicial = '♜\t♞\t♝\t♛\t♚\t♝\t♞\t♜\n♟\t♟\t♟\t♟\t♟\t♟\t♟\t♟\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n♙\t♙\t♙\t♙\t♙\t♙\t♙\t♙\n♖\t♘\t♗\t♕\t♔\t♗\t♘\t♖'
a = open ("./aje.txt","w", encoding="utf-8")
a.write(tablero_inicial)
a.close
tablero = []
def movimiento(fichero):
for i in tablero_inicial.split("\n"):
tablero.append(i.split("\t"))
fichero = open ("./aje.txt","w", encoding="utf-8")
for i in tablero_inicial:
fichero.write("/t".join(i) + "/n")
fichero.close()
mov = 0
while True :
continuar = input("¿Desea hacer otro movimiento?, si o no: ")
if continuar != "si":
break
else:
fila_inicial = int(input("Introduzca la fila de la ficha que desea mover: "))
columna_inicial = int(input("Introduzca la columna de la ficha que desea mover: "))
fila_final = int(input("Introduzca la fila a la que desea mover la ficha: "))
columna_final = int(input("Introduzca la columna a la que desea mover la ficha: "))
tablero[fila_final -1][columna_final - 1] = tablero [fila_inicial-1][columna_inicial-1]
tablero [fila_inicial-1][columna_inicial-1] = " "
fichero = open ("./aje.txt","w", encoding="utf-8")
fichero.write ("Movimiento" + str(mov) + "/n")
fichero.close()
return
movimiento("aje.txt")
n = int(input("Qué tablero desea comprobar?"))
def tablero (fichero, n):
fichero = open ("./aje.txt","r", encoding="utf-8")
tableros = fichero.read().split("/n")
for i in tableros [n*9:n*9+8]:
print (i)
return
tablero ("aje.txt",n) |
print("----\n")
f = float(input("digite a temperatura em fahrenheit"))
c = (f - 32) * 5 / 9
print("a temperatura é de ", c, "graus celcius")
print("----\n")
|
meta_file = '/mnt/fs4/chengxuz/Dataset/yfcc/meta.txt'
meta_file_dst = '/mnt/fs4/chengxuz/Dataset/yfcc/meta_short.txt'
with open(meta_file, 'r') as fin:
all_jpgs = fin.readlines()
all_jpgs = [_jpg[len('/mnt/fs4/Dataset/YFCC/images/'):] for _jpg in all_jpgs]
with open(meta_file_dst, 'w') as fout:
fout.writelines(all_jpgs)
|
'''
Write a program to calculate calories for the fruit shop. The program must accept only one order
per time, and the program must run until the user enters 5 to finish the program. The detail of the menu
is as follows.
1 Apple 100 Cal
2 Papaya 120 Cal
3 Banana 200 Cal
4 Orange 60 Cal
5 Exit
When the customer presses 5 to finish the program, the program will show “Bye Bye” message and the
total calories of overall fruits.
'''
MENU = {'1': ('Apple', 100),
'2': ('Papaya', 120),
'3': ('Banana', 200),
'4': ('Orange', 60)}
cart = []
while True:
i = input()
if i == '5':
break
cart.append(MENU[i])
total = 0
for name, cal in cart:
print(f'You choose {name}')
total += cal
print('Bye Bye')
print(f'Total Calories: {total}')
|
def longToSizeString(longVal):
if longVal >= 1073741824 :
return str(round(longVal/1073741824,2))+"GB"
elif longVal >= 1048576:
return str(round(longVal/1048576,2)) + "MB"
elif longVal >= 1024:
return str(round(longVal/1024,2))+"KB"
else:
return str(longVal)+"B" |
"""
More info is available here:
https://forums.codemasters.com/topic/54423-f1%C2%AE-2020-udp-specification/
"""
PACKET_MAPPER = {
'PacketCarTelemetryData_V1': 'telemetry',
'PacketLapData_V1': 'lap',
'PacketMotionData_V1': 'motion',
'PacketSessionData_V1': 'session',
'PacketCarStatusData_V1': 'status',
'PacketCarSetupData_V1': 'setup',
'PacketParticipantsData_V1': 'participants',
}
TYRE_COMPOUND = {
16: 'C5', # super soft
17: 'C4',
18: 'C3',
19: 'C2',
20: 'C1', # hard
7: 'intermediates',
8: 'wet',
# F1 Classic
9: 'dry',
10: 'wet',
# F2
11: 'super soft',
12: 'soft',
13: 'medium',
14: 'hard',
15: 'wet',
}
WEATHER = {
0: 'clear',
1: 'light_cloud',
2: 'overcast',
3: 'light_rain',
4: 'heavy_rain',
5: 'storm',
}
DRIVER_STATUS = {
0: 'in_garage',
1: 'flying_lap',
2: 'in_lap',
3: 'out_lap',
4: 'on_track',
}
SESSION_TYPE = {
0: 'unknown',
1: 'practice_1',
2: 'practice_2',
3: 'practice_3',
4: 'short_practice',
5: 'qualifying_1',
6: 'qualifying_2',
7: 'qualifying_3',
8: 'short_qualifying',
9: 'osq',
10: 'race',
11: 'race_2',
12: 'time_trial',
}
|
input = '361527'
input = int(input)
def walk():
number = 1
sign = 1
while True:
for _ in range(number):
yield sign, 0
for _ in range(number):
yield 0, sign
number += 1
sign = -sign
def calc_position(index):
pos = (0, 0)
for i, (dx, dy) in enumerate(walk()):
pos = (pos[0] + dx, pos[1] + dy)
if i + 2 == index:
return pos
pos = calc_position(input)
distance = abs(pos[0]) + abs(pos[1])
print(distance)
values = [1]
indexes = {(0, 0): 0}
pos = (0, 0)
for i, (dx, dy) in enumerate(walk()):
pos = (pos[0] + dx, pos[1] + dy)
i = i + 1
indexes[pos] = i
i1 = indexes.get((pos[0] - 1, pos[1] - 1))
i2 = indexes.get((pos[0] - 1, pos[1] + 1))
i3 = indexes.get((pos[0] - 1, pos[1]))
i4 = indexes.get((pos[0] + 1, pos[1] - 1))
i5 = indexes.get((pos[0] + 1, pos[1] + 1))
i6 = indexes.get((pos[0] + 1, pos[1]))
i7 = indexes.get((pos[0], pos[1] + 1))
i8 = indexes.get((pos[0], pos[1] - 1))
value = 0
value += values[i1] if i1 is not None else 0
value += values[i2] if i2 is not None else 0
value += values[i3] if i3 is not None else 0
value += values[i4] if i4 is not None else 0
value += values[i5] if i5 is not None else 0
value += values[i6] if i6 is not None else 0
value += values[i7] if i7 is not None else 0
value += values[i8] if i8 is not None else 0
if value > input:
print(value)
break
values.append(value)
|
class Solution:
def __init__(self, radius: float, x_center: float, y_center: float):
self.radius = radius
self.x_center = x_center
self.y_center = y_center
def randPoint(self) -> List[float]:
length = sqrt(random.uniform(0, 1)) * self.radius
degree = random.uniform(0, 1) * 2 * math.pi
x = self.x_center + length * math.cos(degree)
y = self.y_center + length * math.sin(degree)
return [x, y]
|
# https://www.geeksforgeeks.org/minimum-of-two-numbers-in-python
"""
Given a list, write a Python code to find the Minimum of these two numbers.
"""
NUMBERS = ( 1, 2, 3, 4, 5, 6, 7, 8 )
if __name__ == "__main__":
# The min() method
print(min(NUMBERS))
|
class MediaState(Enum, IComparable, IFormattable, IConvertible):
"""
Specifies the states that can be applied to a System.Windows.Controls.MediaElement for the System.Windows.Controls.MediaElement.LoadedBehavior and System.Windows.Controls.MediaElement.UnloadedBehavior properties.
enum MediaState,values: Close (2),Manual (0),Pause (3),Play (1),Stop (4)
"""
def __eq__(self, *args):
""" x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """
pass
def __format__(self, *args):
""" __format__(formattable: IFormattable,format: str) -> str """
pass
def __ge__(self, *args):
pass
def __gt__(self, *args):
pass
def __init__(self, *args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __le__(self, *args):
pass
def __lt__(self, *args):
pass
def __ne__(self, *args):
pass
def __reduce_ex__(self, *args):
pass
def __str__(self, *args):
pass
Close = None
Manual = None
Pause = None
Play = None
Stop = None
value__ = None
|
# Copyright 2017 Janos Czentye
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""
Contains classes relevant to element management.
"""
class AbstractElementManager(object):
"""
Abstract class for element management components (EM).
.. warning::
Not implemented yet!
"""
def __init__ (self):
"""
Init.
:return: None
"""
pass
class ClickManager(AbstractElementManager):
"""
Manager class for specific VNF management based on Clicky.
.. warning::
Not implemented yet!
"""
def __init__ (self):
"""
Init.
:return: None
"""
super(ClickManager, self).__init__()
|
{
'ACHIEVEMENT_PAGES': {
0: {
'name': '页面一',
'background': 'main_back.png',
'pos': ((0, 0), (0, 0), (1, 0), (1, 0))
},
1: {
'name': '页面二',
'background': 'frame_back.png',
'pos': ((0, 0), (0, 0), (1, 0), (1, 0))
},
2: {
'name': '页面三',
'background': 'default.png',
'pos': ((0, 0), (0, 0), (1, 0), (1, 0))
}
},
'ACHIEVEMENT_ITEMS': {
0: {
'name': 'wxh天下第一',
'icon': 'default.png',
'text': 'wxh天下第一的描述',
'cond': 'wxh天下第一的条件描述',
'page': 0,
'pos': ((0.4, 0), (0.4, 0), (0.06, 0), (0.06, 0))
},
1: {
'name': 'wxh当然天下第一',
'icon': 'default.png',
'text': 'wxh当然天下第一的描述',
'cond': 'wxh当然天下第一的条件描述',
# 定义成就图标的坐标
'page': 0,
'pos': ((0.6, 0), (0.5, 0), (0.06, 0), (0.06, 0))
},
2: {
'name': 'wxh乃天下第一',
'icon': 'default.png',
'text': 'wxh乃天下第一的描述',
'cond': 'wxh乃天下第一的条件描述',
# 定义成就图标的坐标
'page': 1,
'pos': ((0.4, 0), (0.4, 0), (0.06, 0), (0.06, 0))
},
3: {
'name': 'wxh是为天下第一',
'icon': 'default.png',
'text': 'wxh是为天下第一的描述',
'cond': 'wxh是为天下第一的条件描述',
# 定义成就图标的坐标
'page': 1,
'pos': ((0.4, 0), (0.4, 0), (0.06, 0), (0.06, 0))
}
}
}
|
class BasisFunctionLike(object):
@classmethod
def derivatives_factory(cls, coef, *args, **kwargs):
raise NotImplementedError
@classmethod
def functions_factory(cls, coef, *args, **kwargs):
raise NotImplementedError
|
"""
Exceptions
Errors detected during execution are called exceptions.
Examples:
ZeroDivisionError
This error is raised when the second argument of a division or modulo operation is zero.
#>>> a = '1'
#>>> b = '0'
#>>> print int(a) / int(b)
#>>> ZeroDivisionError: integer division or modulo by zero
ValueError
This error is raised when a built-in operation or function receives an argument that has the right type but an inappropriate value.
#>>> a = '1'
#>>> b = '#'
#>>> print int(a) / int(b)
#>>> ValueError: invalid literal for int() with base 10: '#'
To learn more about different built-in exceptions click here.
Handling Exceptions
The statements try and except can be used to handle selected exceptions. A try statement may have more than one except clause to specify handlers for different exceptions.
#Code
try:
print 1/0
except ZeroDivisionError as e:
print "Error Code:",e
Output
Error Code: integer division or modulo by zero
Task
You are given two values
and .
Perform integer division and print
.
Input Format
The first line contains
, the number of test cases.
The next lines each contain the space separated values of and
.
Constraints
Output Format
Print the value of
.
In the case of ZeroDivisionError or ValueError, print the error code.
Sample Input
3
1 0
2 $
3 1
Sample Output
Error Code: integer division or modulo by zero
Error Code: invalid literal for int() with base 10: '$'
3
Note:
For integer division in Python 3 use //.
"""
for i in range(int(input())):
try:
a,b=map(int,input().split())
print(a//b)
except Exception as e:
print("Error Code:",e)
|
def crop(image, height, width):
'''
Function to crop images
Parameters:
image, a 3d array of the image (can be obtained using plt.imread(image))
height, integer, the desired height of the cropped image
width, integer, the desired width of the cropped image
Returns:
cropped_image, a 3d array with dimensions height x width x 3
Example:
crop(image, 10, 15) returns an array with shape (10, 15, 3)
'''
pass
|
entries = [
{
'env-title': 'atari-alien',
'env-variant': 'Human start',
'score': 128.30,
},
{
'env-title': 'atari-amidar',
'env-variant': 'Human start',
'score': 11.80,
},
{
'env-title': 'atari-assault',
'env-variant': 'Human start',
'score': 166.90,
},
{
'env-title': 'atari-asterix',
'env-variant': 'Human start',
'score': 164.50,
},
{
'env-title': 'atari-asteroids',
'env-variant': 'Human start',
'score': 871.30,
},
{
'env-title': 'atari-atlantis',
'env-variant': 'Human start',
'score': 13463.00,
},
{
'env-title': 'atari-bank-heist',
'env-variant': 'Human start',
'score': 21.70,
},
{
'env-title': 'atari-battle-zone',
'env-variant': 'Human start',
'score': 3560.00,
},
{
'env-title': 'atari-beam-rider',
'env-variant': 'Human start',
'score': 254.60,
},
{
'env-title': 'atari-bowling',
'env-variant': 'Human start',
'score': 35.20,
},
{
'env-title': 'atari-boxing',
'env-variant': 'Human start',
'score': -1.50,
},
{
'env-title': 'atari-breakout',
'env-variant': 'Human start',
'score': 1.60,
},
{
'env-title': 'atari-centipede',
'env-variant': 'Human start',
'score': 1925.50,
},
{
'env-title': 'atari-chopper-command',
'env-variant': 'Human start',
'score': 644.00,
},
{
'env-title': 'atari-crazy-climber',
'env-variant': 'Human start',
'score': 9337.00,
},
{
'env-title': 'atari-demon-attack',
'env-variant': 'Human start',
'score': 208.30,
},
{
'env-title': 'atari-double-dunk',
'env-variant': 'Human start',
'score': -16.00,
},
{
'env-title': 'atari-enduro',
'env-variant': 'Human start',
'score': -81.80,
},
{
'env-title': 'atari-fishing-derby',
'env-variant': 'Human start',
'score': -77.10,
},
{
'env-title': 'atari-freeway',
'env-variant': 'Human start',
'score': 0.10,
},
{
'env-title': 'atari-frostbite',
'env-variant': 'Human start',
'score': 66.40,
},
{
'env-title': 'atari-gopher',
'env-variant': 'Human start',
'score': 250.00,
},
{
'env-title': 'atari-gravitar',
'env-variant': 'Human start',
'score': 245.50,
},
{
'env-title': 'atari-hero',
'env-variant': 'Human start',
'score': 1580.30,
},
{
'env-title': 'atari-ice-hockey',
'env-variant': 'Human start',
'score': -9.70,
},
{
'env-title': 'atari-jamesbond',
'env-variant': 'Human start',
'score': 33.50,
},
{
'env-title': 'atari-kangaroo',
'env-variant': 'Human start',
'score': 100.00,
},
{
'env-title': 'atari-krull',
'env-variant': 'Human start',
'score': 1151.90,
},
{
'env-title': 'atari-kung-fu-master',
'env-variant': 'Human start',
'score': 304.00,
},
{
'env-title': 'atari-montezuma-revenge',
'env-variant': 'Human start',
'score': 25.00,
},
{
'env-title': 'atari-ms-pacman',
'env-variant': 'Human start',
'score': 197.80,
},
{
'env-title': 'atari-name-this-game',
'env-variant': 'Human start',
'score': 1747.80,
},
{
'env-title': 'atari-pong',
'env-variant': 'Human start',
'score': -18.00,
},
{
'env-title': 'atari-private-eye',
'env-variant': 'Human start',
'score': 662.80,
},
{
'env-title': 'atari-qbert',
'env-variant': 'Human start',
'score': 183.00,
},
{
'env-title': 'atari-riverraid',
'env-variant': 'Human start',
'score': 588.30,
},
{
'env-title': 'atari-road-runner',
'env-variant': 'Human start',
'score': 200.00,
},
{
'env-title': 'atari-robotank',
'env-variant': 'Human start',
'score': 2.40,
},
{
'env-title': 'atari-seaquest',
'env-variant': 'Human start',
'score': 215.50,
},
{
'env-title': 'atari-space-invaders',
'env-variant': 'Human start',
'score': 182.60,
},
{
'env-title': 'atari-star-gunner',
'env-variant': 'Human start',
'score': 697.00,
},
{
'env-title': 'atari-tennis',
'env-variant': 'Human start',
'score': -21.40,
},
{
'env-title': 'atari-time-pilot',
'env-variant': 'Human start',
'score': 3273.00,
},
{
'env-title': 'atari-tutankham',
'env-variant': 'Human start',
'score': 12.70,
},
{
'env-title': 'atari-up-n-down',
'env-variant': 'Human start',
'score': 707.20,
},
{
'env-title': 'atari-venture',
'env-variant': 'Human start',
'score': 18.00,
},
{
'env-title': 'atari-video-pinball',
'env-variant': 'Human start',
'score': 20452.0,
},
{
'env-title': 'atari-wizard-of-wor',
'env-variant': 'Human start',
'score': 804.00,
},
{
'env-title': 'atari-zaxxon',
'env-variant': 'Human start',
'score': 475.00,
},
]
|
n1 = float(input('Minha primeira nota é?'))
n2 = float(input('Minha segunda nota é?'))
ma = (n1 + n2) / 2
print('Minha média entre {:.1f} e {:.1f}, é de: {:.1f}.'.format(n1, n2, ma))
|
class BoxField:
BOXES = 'bbox'
KEYPOINTS = 'keypoints'
LABELS = 'label'
MASKS = 'masks'
NUM_BOXES = 'num_boxes'
SCORES = 'scores'
WEIGHTS = 'weights'
class DatasetField:
IMAGES = 'images'
IMAGES_INFO = 'images_information'
IMAGES_PMASK = 'images_padding_mask'
|
#
# PySNMP MIB module HH3C-WAPI-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HH3C-WAPI-MIB
# Produced by pysmi-0.3.4 at Wed May 1 13:30:34 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ConstraintsIntersection, ValueSizeConstraint, ConstraintsUnion, ValueRangeConstraint, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ValueSizeConstraint", "ConstraintsUnion", "ValueRangeConstraint", "SingleValueConstraint")
hh3cCommon, = mibBuilder.importSymbols("HH3C-OID-MIB", "hh3cCommon")
ifDescr, ifIndex = mibBuilder.importSymbols("IF-MIB", "ifDescr", "ifIndex")
InetAddressType, InetAddress = mibBuilder.importSymbols("INET-ADDRESS-MIB", "InetAddressType", "InetAddress")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
Integer32, MibIdentifier, ModuleIdentity, ObjectIdentity, IpAddress, Unsigned32, TimeTicks, Counter32, MibScalar, MibTable, MibTableRow, MibTableColumn, NotificationType, iso, Bits, Gauge32, Counter64 = mibBuilder.importSymbols("SNMPv2-SMI", "Integer32", "MibIdentifier", "ModuleIdentity", "ObjectIdentity", "IpAddress", "Unsigned32", "TimeTicks", "Counter32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "NotificationType", "iso", "Bits", "Gauge32", "Counter64")
TextualConvention, MacAddress, DisplayString, TruthValue = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "MacAddress", "DisplayString", "TruthValue")
hh3cwapiMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 25506, 2, 77))
if mibBuilder.loadTexts: hh3cwapiMIB.setLastUpdated('201012011757Z')
if mibBuilder.loadTexts: hh3cwapiMIB.setOrganization('Hangzhou H3C Tech. Co., Ltd.')
if mibBuilder.loadTexts: hh3cwapiMIB.setContactInfo('Platform Team Hangzhou H3C Tech. Co., Ltd. Hai-Dian District Beijing P.R. China http://www.h3c.com Zip:100085 ')
if mibBuilder.loadTexts: hh3cwapiMIB.setDescription('HH3C-WAPI-MIB is an extension of MIB in WAPI protocol. This MIB contains objects to manage configuration and monitor running state for WAPI feature.')
hh3cwapiMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 25506, 2, 77, 1))
hh3cwapiMIBStatsObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 25506, 2, 77, 2))
hh3cwapiMIBTableObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3))
hh3cwapiTrap = MibIdentifier((1, 3, 6, 1, 4, 1, 25506, 2, 77, 4))
hh3cwapiModeEnabled = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 77, 1, 1), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cwapiModeEnabled.setStatus('current')
if mibBuilder.loadTexts: hh3cwapiModeEnabled.setDescription('When this object is set to TRUE, it shall indicate that WAPI is enabled. Otherwise, it shall indicate that WAPI is disabled.')
hh3cwapiASIPAddressType = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 77, 1, 2), InetAddressType().clone('ipv4')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cwapiASIPAddressType.setStatus('current')
if mibBuilder.loadTexts: hh3cwapiASIPAddressType.setDescription('This object is used to set global IP addresses type (IPv4 or IPv6) of AS.')
hh3cwapiASIPAddress = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 77, 1, 3), InetAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cwapiASIPAddress.setStatus('current')
if mibBuilder.loadTexts: hh3cwapiASIPAddress.setDescription('This object is used to set the global IP address of AS.')
hh3cwapiCertificateInstalled = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 77, 1, 4), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cwapiCertificateInstalled.setStatus('current')
if mibBuilder.loadTexts: hh3cwapiCertificateInstalled.setDescription("This object indicates whether the entity has installed certificate. When the value is TURE, it shall indicate that the entity has installed certificate. Otherwise, it shall indicate that the entity hasn't installed certificate.")
hh3cwapiStatsWAISignatureErrors = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 77, 2, 1), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cwapiStatsWAISignatureErrors.setStatus('current')
if mibBuilder.loadTexts: hh3cwapiStatsWAISignatureErrors.setDescription('This counter increases when the received packet of WAI signature is wrong.')
hh3cwapiStatsWAIHMACErrors = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 77, 2, 2), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cwapiStatsWAIHMACErrors.setStatus('current')
if mibBuilder.loadTexts: hh3cwapiStatsWAIHMACErrors.setDescription('This counter increases when the received packet of WAI message authentication key checking error occurs.')
hh3cwapiStatsWAIAuthRsltFailures = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 77, 2, 3), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cwapiStatsWAIAuthRsltFailures.setStatus('current')
if mibBuilder.loadTexts: hh3cwapiStatsWAIAuthRsltFailures.setDescription('This counter increases when the WAI authentication result is unsuccessful.')
hh3cwapiStatsWAIDiscardCounters = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 77, 2, 4), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cwapiStatsWAIDiscardCounters.setStatus('current')
if mibBuilder.loadTexts: hh3cwapiStatsWAIDiscardCounters.setDescription('This counter increases when the received packet of WAI are discarded.')
hh3cwapiStatsWAITimeoutCounters = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 77, 2, 5), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cwapiStatsWAITimeoutCounters.setStatus('current')
if mibBuilder.loadTexts: hh3cwapiStatsWAITimeoutCounters.setDescription('This counter increases when the packet of WAI overtime are detected.')
hh3cwapiStatsWAIFormatErrors = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 77, 2, 6), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cwapiStatsWAIFormatErrors.setStatus('current')
if mibBuilder.loadTexts: hh3cwapiStatsWAIFormatErrors.setDescription('This counter increases when the WAI packet of WAI format error is detected.')
hh3cwapiStatsWAICtfHskFailures = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 77, 2, 7), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cwapiStatsWAICtfHskFailures.setStatus('current')
if mibBuilder.loadTexts: hh3cwapiStatsWAICtfHskFailures.setDescription('This counter increases when the WAI certificate authenticates unsuccessfully.')
hh3cwapiStatsWAIUniHskFailures = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 77, 2, 8), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cwapiStatsWAIUniHskFailures.setStatus('current')
if mibBuilder.loadTexts: hh3cwapiStatsWAIUniHskFailures.setDescription('This counter increases when the WAI unicast cipher key negotiates unsuccessfully.')
hh3cwapiStatsWAIMulHskFailures = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 77, 2, 9), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cwapiStatsWAIMulHskFailures.setStatus('current')
if mibBuilder.loadTexts: hh3cwapiStatsWAIMulHskFailures.setDescription('This counter increases when the WAI multicast cipher key announces unsuccessfully.')
hh3cwapiConfigTable = MibTable((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 1), )
if mibBuilder.loadTexts: hh3cwapiConfigTable.setStatus('current')
if mibBuilder.loadTexts: hh3cwapiConfigTable.setDescription('The table containing WAPI configuration objects.')
hh3cwapiConfigEntry = MibTableRow((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"))
if mibBuilder.loadTexts: hh3cwapiConfigEntry.setStatus('current')
if mibBuilder.loadTexts: hh3cwapiConfigEntry.setDescription('An entry in the hh3cwapiConfigTable.')
hh3cwapiConfigASIPAddressType = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 1, 1, 1), InetAddressType()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cwapiConfigASIPAddressType.setStatus('current')
if mibBuilder.loadTexts: hh3cwapiConfigASIPAddressType.setDescription('This object is used to set IP addresses type of AS.')
hh3cwapiConfigASIPAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 1, 1, 2), InetAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cwapiConfigASIPAddress.setStatus('current')
if mibBuilder.loadTexts: hh3cwapiConfigASIPAddress.setDescription('This object is used to set the IP address of AS.')
hh3cwapiConfigAuthMethod = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("certificate", 1), ("psk", 2), ("certificatePsk", 3))).clone('certificate')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cwapiConfigAuthMethod.setStatus('current')
if mibBuilder.loadTexts: hh3cwapiConfigAuthMethod.setDescription('This object selects a mechanism for WAPI authentication method. The default is certificate.')
hh3cwapiConfigAuthMode = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("standard", 1), ("radiusExtension", 2))).clone('standard')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cwapiConfigAuthMode.setStatus('current')
if mibBuilder.loadTexts: hh3cwapiConfigAuthMode.setDescription('This object selects a mechanism for WAPI authentication mode. When the value is standard, it shall indicate that the entity acts accord with the official definition. Otherwise, it shall indicate that the entity finishs authentication by means of RADIUS. The default is standard.')
hh3cwapiConfigISPDomain = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 1, 1, 5), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 24))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cwapiConfigISPDomain.setStatus('current')
if mibBuilder.loadTexts: hh3cwapiConfigISPDomain.setDescription('The ISP domain name.')
hh3cwapiConfigCertificateDomain = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 1, 1, 6), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 15))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cwapiConfigCertificateDomain.setStatus('current')
if mibBuilder.loadTexts: hh3cwapiConfigCertificateDomain.setDescription('The PKI domain name.')
hh3cwapiConfigASName = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 1, 1, 7), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 15))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cwapiConfigASName.setStatus('current')
if mibBuilder.loadTexts: hh3cwapiConfigASName.setDescription('The name of AS.')
hh3cwapiConfigBKRekeyEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 1, 1, 8), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cwapiConfigBKRekeyEnabled.setStatus('current')
if mibBuilder.loadTexts: hh3cwapiConfigBKRekeyEnabled.setDescription('This object indicates whether the BK rekey function is supported. When the value is TURE, it shall indicate that the BK rekey function is supported. Otherwise, it shall indicate that the BK rekey function is not supported.')
hh3cwapiConfigExtTable = MibTable((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 2), )
if mibBuilder.loadTexts: hh3cwapiConfigExtTable.setStatus('current')
if mibBuilder.loadTexts: hh3cwapiConfigExtTable.setDescription('The table containing WAPI configuration objects for SSID.')
hh3cwapiConfigExtEntry = MibTableRow((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 2, 1), ).setIndexNames((0, "HH3C-WAPI-MIB", "hh3cwapiConfigServicePolicyID"))
if mibBuilder.loadTexts: hh3cwapiConfigExtEntry.setStatus('current')
if mibBuilder.loadTexts: hh3cwapiConfigExtEntry.setDescription('An extend entry in the hh3cwapiConfigExtTable.')
hh3cwapiConfigServicePolicyID = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 2, 1, 1), Integer32())
if mibBuilder.loadTexts: hh3cwapiConfigServicePolicyID.setStatus('current')
if mibBuilder.loadTexts: hh3cwapiConfigServicePolicyID.setDescription('Represents the ID of each service policy.')
hh3cwapiConfigUnicastCipherEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 2, 1, 2), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cwapiConfigUnicastCipherEnabled.setStatus('current')
if mibBuilder.loadTexts: hh3cwapiConfigUnicastCipherEnabled.setDescription('This object enables or disables the unicast cipher.')
hh3cwapiConfigUnicastCipherSize = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 2, 1, 3), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 4294967295))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cwapiConfigUnicastCipherSize.setStatus('current')
if mibBuilder.loadTexts: hh3cwapiConfigUnicastCipherSize.setDescription('This object indicates the length in bits of the unicast cipher key. This should be 256 for SMS4, first 128 bits for encrypting, last 128 bits for integrity checking.')
hh3cwapiConfigAuthenticationSuiteEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 2, 1, 4), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cwapiConfigAuthenticationSuiteEnabled.setStatus('current')
if mibBuilder.loadTexts: hh3cwapiConfigAuthenticationSuiteEnabled.setDescription('This variable indicates the corresponding AKM suite is enabled or disabled.')
hh3cwapiConfigAuthenticationSuite = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 2, 1, 5), OctetString().subtype(subtypeSpec=ValueSizeConstraint(4, 4)).setFixedLength(4)).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cwapiConfigAuthenticationSuite.setStatus('current')
if mibBuilder.loadTexts: hh3cwapiConfigAuthenticationSuite.setDescription('The selector of an AKM suite. It consists of an OUI (the first 3 octets) and a cipher suite identifier (the last octet).')
hh3cwapiCfgExtASIPAddressType = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 2, 1, 6), InetAddressType()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cwapiCfgExtASIPAddressType.setStatus('current')
if mibBuilder.loadTexts: hh3cwapiCfgExtASIPAddressType.setDescription('This object is used to set IP addresses type of AS.')
hh3cwapiCfgExtASIPAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 2, 1, 7), InetAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cwapiCfgExtASIPAddress.setStatus('current')
if mibBuilder.loadTexts: hh3cwapiCfgExtASIPAddress.setDescription('This object is used to set the IP address of AS.')
hh3cwapiCfgExtASName = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 2, 1, 8), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 15))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cwapiCfgExtASName.setStatus('current')
if mibBuilder.loadTexts: hh3cwapiCfgExtASName.setDescription('This object is used to set the name of AS.')
hh3cwapiCfgExtCertDomain = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 2, 1, 9), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 15))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cwapiCfgExtCertDomain.setStatus('current')
if mibBuilder.loadTexts: hh3cwapiCfgExtCertDomain.setDescription('This object is used to set the PKI domain name.')
hh3cwapiCfgExtCertInstalled = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 2, 77, 3, 2, 1, 10), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cwapiCfgExtCertInstalled.setStatus('current')
if mibBuilder.loadTexts: hh3cwapiCfgExtCertInstalled.setDescription("This object indicates whether the entity has installed certificate. When the value is TURE, it shall indicate that the SSID has installed certificate. Otherwise, it shall indicate that the SSID hasn't installed certificate.")
hh3cwapiTrapPrefix = MibIdentifier((1, 3, 6, 1, 4, 1, 25506, 2, 77, 4, 0))
hh3cwapiUserwithInvalidCertificate = NotificationType((1, 3, 6, 1, 4, 1, 25506, 2, 77, 4, 0, 1)).setObjects(("IF-MIB", "ifIndex"), ("IF-MIB", "ifDescr"), ("HH3C-WAPI-MIB", "hh3cwapiTrapInfoMacAddr"), ("HH3C-WAPI-MIB", "hh3cwapiTrapInfoAPId"), ("HH3C-WAPI-MIB", "hh3cwapiTrapInfoRadioId"), ("HH3C-WAPI-MIB", "hh3cwapiTrapInfoBSSId"))
if mibBuilder.loadTexts: hh3cwapiUserwithInvalidCertificate.setStatus('current')
if mibBuilder.loadTexts: hh3cwapiUserwithInvalidCertificate.setDescription('This trap is sent when a user intrudes upon network with invalid certificate.')
hh3cwapiStationReplayAttack = NotificationType((1, 3, 6, 1, 4, 1, 25506, 2, 77, 4, 0, 2)).setObjects(("IF-MIB", "ifIndex"), ("IF-MIB", "ifDescr"), ("HH3C-WAPI-MIB", "hh3cwapiTrapInfoMacAddr"), ("HH3C-WAPI-MIB", "hh3cwapiTrapInfoAPId"), ("HH3C-WAPI-MIB", "hh3cwapiTrapInfoRadioId"), ("HH3C-WAPI-MIB", "hh3cwapiTrapInfoBSSId"))
if mibBuilder.loadTexts: hh3cwapiStationReplayAttack.setStatus('current')
if mibBuilder.loadTexts: hh3cwapiStationReplayAttack.setDescription('This trap is sent when an attacker records and replays network transactions.')
hh3cwapiTamperAttack = NotificationType((1, 3, 6, 1, 4, 1, 25506, 2, 77, 4, 0, 3)).setObjects(("IF-MIB", "ifIndex"), ("IF-MIB", "ifDescr"), ("HH3C-WAPI-MIB", "hh3cwapiTrapInfoMacAddr"), ("HH3C-WAPI-MIB", "hh3cwapiTrapInfoAPId"), ("HH3C-WAPI-MIB", "hh3cwapiTrapInfoRadioId"), ("HH3C-WAPI-MIB", "hh3cwapiTrapInfoBSSId"))
if mibBuilder.loadTexts: hh3cwapiTamperAttack.setStatus('current')
if mibBuilder.loadTexts: hh3cwapiTamperAttack.setDescription('This trap is sent when an attacker monitors network traffic and maliciously changes data in transit(for example, an attacker may modify the contents of a WAI message).')
hh3cwapiLowSafeLevelAttack = NotificationType((1, 3, 6, 1, 4, 1, 25506, 2, 77, 4, 0, 4)).setObjects(("IF-MIB", "ifIndex"), ("IF-MIB", "ifDescr"), ("HH3C-WAPI-MIB", "hh3cwapiTrapInfoMacAddr"), ("HH3C-WAPI-MIB", "hh3cwapiTrapInfoAPId"), ("HH3C-WAPI-MIB", "hh3cwapiTrapInfoRadioId"), ("HH3C-WAPI-MIB", "hh3cwapiTrapInfoBSSId"))
if mibBuilder.loadTexts: hh3cwapiLowSafeLevelAttack.setStatus('current')
if mibBuilder.loadTexts: hh3cwapiLowSafeLevelAttack.setDescription('This trap is sent when a station associates AP(Access Point), creates packet of Unicast Key Negotiation Response with wrong WIE(WAPI Information Element) of ASUE(Authentication Supplicant Entity).')
hh3cwapiAddressRedirectionAttack = NotificationType((1, 3, 6, 1, 4, 1, 25506, 2, 77, 4, 0, 5)).setObjects(("IF-MIB", "ifIndex"), ("IF-MIB", "ifDescr"), ("HH3C-WAPI-MIB", "hh3cwapiTrapInfoMacAddr"), ("HH3C-WAPI-MIB", "hh3cwapiTrapInfoAPId"), ("HH3C-WAPI-MIB", "hh3cwapiTrapInfoRadioId"), ("HH3C-WAPI-MIB", "hh3cwapiTrapInfoBSSId"))
if mibBuilder.loadTexts: hh3cwapiAddressRedirectionAttack.setStatus('current')
if mibBuilder.loadTexts: hh3cwapiAddressRedirectionAttack.setDescription('This trap is sent when an attacker maliciously changes destination MAC address of WPI(WLAN Privacy Infrastructure) frame.')
hh3cwapiTrapInfo = MibIdentifier((1, 3, 6, 1, 4, 1, 25506, 2, 77, 4, 1))
hh3cwapiTrapInfoMacAddr = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 77, 4, 1, 1), MacAddress()).setMaxAccess("accessiblefornotify")
if mibBuilder.loadTexts: hh3cwapiTrapInfoMacAddr.setStatus('current')
if mibBuilder.loadTexts: hh3cwapiTrapInfoMacAddr.setDescription('The MAC address of the WAPI user.')
hh3cwapiTrapInfoAPId = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 77, 4, 1, 2), Integer32()).setMaxAccess("accessiblefornotify")
if mibBuilder.loadTexts: hh3cwapiTrapInfoAPId.setStatus('current')
if mibBuilder.loadTexts: hh3cwapiTrapInfoAPId.setDescription('To uniquely identify each AP.')
hh3cwapiTrapInfoRadioId = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 77, 4, 1, 3), Integer32()).setMaxAccess("accessiblefornotify")
if mibBuilder.loadTexts: hh3cwapiTrapInfoRadioId.setStatus('current')
if mibBuilder.loadTexts: hh3cwapiTrapInfoRadioId.setDescription('Represents each radio.')
hh3cwapiTrapInfoBSSId = MibScalar((1, 3, 6, 1, 4, 1, 25506, 2, 77, 4, 1, 4), MacAddress()).setMaxAccess("accessiblefornotify")
if mibBuilder.loadTexts: hh3cwapiTrapInfoBSSId.setStatus('current')
if mibBuilder.loadTexts: hh3cwapiTrapInfoBSSId.setDescription('As MAC Address format, it is to identify BSS.')
mibBuilder.exportSymbols("HH3C-WAPI-MIB", hh3cwapiConfigAuthMode=hh3cwapiConfigAuthMode, hh3cwapiMIBStatsObjects=hh3cwapiMIBStatsObjects, hh3cwapiTrapPrefix=hh3cwapiTrapPrefix, hh3cwapiTrapInfoMacAddr=hh3cwapiTrapInfoMacAddr, hh3cwapiStatsWAIMulHskFailures=hh3cwapiStatsWAIMulHskFailures, hh3cwapiTrapInfoBSSId=hh3cwapiTrapInfoBSSId, hh3cwapiConfigASName=hh3cwapiConfigASName, hh3cwapiModeEnabled=hh3cwapiModeEnabled, hh3cwapiConfigExtEntry=hh3cwapiConfigExtEntry, hh3cwapiTrap=hh3cwapiTrap, hh3cwapiMIB=hh3cwapiMIB, hh3cwapiConfigServicePolicyID=hh3cwapiConfigServicePolicyID, hh3cwapiUserwithInvalidCertificate=hh3cwapiUserwithInvalidCertificate, hh3cwapiAddressRedirectionAttack=hh3cwapiAddressRedirectionAttack, hh3cwapiStationReplayAttack=hh3cwapiStationReplayAttack, hh3cwapiTrapInfoAPId=hh3cwapiTrapInfoAPId, hh3cwapiConfigExtTable=hh3cwapiConfigExtTable, hh3cwapiTamperAttack=hh3cwapiTamperAttack, hh3cwapiASIPAddressType=hh3cwapiASIPAddressType, hh3cwapiCfgExtASName=hh3cwapiCfgExtASName, PYSNMP_MODULE_ID=hh3cwapiMIB, hh3cwapiTrapInfo=hh3cwapiTrapInfo, hh3cwapiMIBObjects=hh3cwapiMIBObjects, hh3cwapiASIPAddress=hh3cwapiASIPAddress, hh3cwapiStatsWAICtfHskFailures=hh3cwapiStatsWAICtfHskFailures, hh3cwapiCfgExtCertInstalled=hh3cwapiCfgExtCertInstalled, hh3cwapiStatsWAIHMACErrors=hh3cwapiStatsWAIHMACErrors, hh3cwapiTrapInfoRadioId=hh3cwapiTrapInfoRadioId, hh3cwapiStatsWAIUniHskFailures=hh3cwapiStatsWAIUniHskFailures, hh3cwapiConfigUnicastCipherSize=hh3cwapiConfigUnicastCipherSize, hh3cwapiCfgExtCertDomain=hh3cwapiCfgExtCertDomain, hh3cwapiStatsWAISignatureErrors=hh3cwapiStatsWAISignatureErrors, hh3cwapiConfigASIPAddressType=hh3cwapiConfigASIPAddressType, hh3cwapiConfigUnicastCipherEnabled=hh3cwapiConfigUnicastCipherEnabled, hh3cwapiConfigAuthenticationSuite=hh3cwapiConfigAuthenticationSuite, hh3cwapiLowSafeLevelAttack=hh3cwapiLowSafeLevelAttack, hh3cwapiStatsWAIAuthRsltFailures=hh3cwapiStatsWAIAuthRsltFailures, hh3cwapiConfigTable=hh3cwapiConfigTable, hh3cwapiCfgExtASIPAddress=hh3cwapiCfgExtASIPAddress, hh3cwapiConfigBKRekeyEnabled=hh3cwapiConfigBKRekeyEnabled, hh3cwapiCfgExtASIPAddressType=hh3cwapiCfgExtASIPAddressType, hh3cwapiMIBTableObjects=hh3cwapiMIBTableObjects, hh3cwapiConfigCertificateDomain=hh3cwapiConfigCertificateDomain, hh3cwapiConfigASIPAddress=hh3cwapiConfigASIPAddress, hh3cwapiConfigEntry=hh3cwapiConfigEntry, hh3cwapiConfigAuthenticationSuiteEnabled=hh3cwapiConfigAuthenticationSuiteEnabled, hh3cwapiConfigISPDomain=hh3cwapiConfigISPDomain, hh3cwapiStatsWAITimeoutCounters=hh3cwapiStatsWAITimeoutCounters, hh3cwapiStatsWAIFormatErrors=hh3cwapiStatsWAIFormatErrors, hh3cwapiStatsWAIDiscardCounters=hh3cwapiStatsWAIDiscardCounters, hh3cwapiCertificateInstalled=hh3cwapiCertificateInstalled, hh3cwapiConfigAuthMethod=hh3cwapiConfigAuthMethod)
|
class Solution:
def longestPalindromeSubseq(self, s: str) -> int:
n = len(s)
dp = [[0 for _ in range(n+1) ] for _ in range(n+1)]
for i in range(1,n+1):
for j in range(1,n+1):
if( s[i-1] == s[n-j]):
dp[i][j] = 1+dp[i-1][j-1]
else:
dp[i][j] = max(dp[i-1][j],dp[i][j-1])
return dp[n][n]
|
class JsutCounter:
__secretCount = 0
def count(self):
self.__secretCount += 1
print(self.__secretCount)
counter = JustCounter()
counter.count()
counter.count()
# print(counter.__secretCount)
print(counter._JustCounter.__secretCount)
#public:normal variables
#private:__
#protected:_
|
class Solution:
def max_dp(self, nums2: List[int]) -> int:
dp=[0,0,nums2[0]]
for num in nums2[1:]:
dp.append(num+max(dp[-2], dp[-3]))
return max(dp[-1], dp[-2])
def rob(self, nums: List[int]) -> int:
if len(nums)<=3:
return max(nums)
elif len(nums)==4:
return max(nums[0]+nums[2], nums[1]+nums[-1])
else:
dp=[0,0,0]
cand1 = nums[0]+self.max_dp(nums[2:-1])
cand2 = nums[-1]+self.max_dp(nums[1:-2])
cand3 = self.max_dp(nums[1:-1])
return max(cand1, cand2, cand3)
# [1,2,1,0]
# [2,7,9,3,1] |
#-*- coding:utf-8 -*-
def display(name,age):
print (name,age)
|
n = int(input("Digite o valor de n: "))
i=0
count = 0
while count<n:
if (i % 2) != 0:
print (i)
count = count + 1
i = i + 1 |
# pylint: disable=missing-class-docstring
"""Exception classes for Eddington."""
class EddingtonException(Exception): # noqa: D101
pass
# Interval Errors
class IntervalError(EddingtonException): # noqa: D101
pass
class IntervalIntersectionError(IntervalError): # noqa: D101
def __init__(self, *intervals): # noqa: D107
super().__init__(f"The intervals {intervals} do not intersect")
# Fitting Function Errors
class FittingFunctionLoadError(EddingtonException): # noqa: D101
pass
class FittingFunctionSaveError(EddingtonException): # noqa: D101
pass
class FittingFunctionRuntimeError(EddingtonException): # noqa: D101
pass
# Fitting Data Errors
class FittingDataError(EddingtonException): # noqa: D101
pass
class FittingDataColumnsLengthError(FittingDataError): # noqa: D101
msg = "All columns in FittingData should have the same length"
def __init__(self) -> None: # noqa: D107
super().__init__(self.msg)
class FittingDataInvalidFile(FittingDataError): # noqa: D101
pass
class FittingDataColumnIndexError(FittingDataError): # noqa: D101
def __init__(self, index: int, max_index: int) -> None: # noqa: D107
super().__init__(
f"No column number {index} in data. "
f"index should be between 1 and {max_index}"
)
class FittingDataColumnExistenceError(FittingDataError): # noqa: D101
def __init__(self, column: str) -> None: # noqa: D107
super().__init__(f'Could not find column "{column}" in data')
class FittingDataRecordIndexError(FittingDataError): # noqa: D101
def __init__(self, index: int, number_of_records: int) -> None: # noqa: D107
super().__init__(
f"Could not find record with index {index} in data. "
f"Index should be between 1 and {number_of_records}."
)
class FittingDataRecordsSelectionError(FittingDataError): # noqa: D101
pass
class FittingDataSetError(FittingDataError): # noqa: D101
pass
# Fitting Errors
class FittingError(EddingtonException): # noqa: D101
pass
# Plot Errors
class PlottingError(EddingtonException): # noqa: D101
pass
# CLI Errors
class EddingtonCLIError(EddingtonException): # noqa: D101
pass
|
#
# PySNMP MIB module WWP-LEOS-BENCHMARK-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/WWP-LEOS-BENCHMARK-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 21:30:56 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
OctetString, Integer, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "OctetString", "Integer", "ObjectIdentifier")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueSizeConstraint, SingleValueConstraint, ValueRangeConstraint, ConstraintsIntersection, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "SingleValueConstraint", "ValueRangeConstraint", "ConstraintsIntersection", "ConstraintsUnion")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
Counter32, Unsigned32, iso, ModuleIdentity, Bits, NotificationType, IpAddress, Gauge32, Integer32, ObjectIdentity, MibScalar, MibTable, MibTableRow, MibTableColumn, MibIdentifier, Counter64, TimeTicks = mibBuilder.importSymbols("SNMPv2-SMI", "Counter32", "Unsigned32", "iso", "ModuleIdentity", "Bits", "NotificationType", "IpAddress", "Gauge32", "Integer32", "ObjectIdentity", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "MibIdentifier", "Counter64", "TimeTicks")
DisplayString, MacAddress, TextualConvention, TruthValue = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "MacAddress", "TextualConvention", "TruthValue")
wwpModulesLeos, = mibBuilder.importSymbols("WWP-SMI", "wwpModulesLeos")
wwpLeosBenchmarkMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43))
wwpLeosBenchmarkMIB.setRevisions(('2012-02-13 08:00', '2012-02-03 08:00', '2010-12-14 08:00', '2010-11-25 08:00', '2010-11-15 08:00',))
if mibBuilder.loadTexts: wwpLeosBenchmarkMIB.setLastUpdated('201202130800Z')
if mibBuilder.loadTexts: wwpLeosBenchmarkMIB.setOrganization('Ciena, Inc')
class BenchmarkLatencyPdvTestState(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9))
namedValues = NamedValues(("idle", 1), ("sendingTraffic", 2), ("waitingForTimestampData", 3), ("waitingForResidualPackets", 4), ("processingResults", 5), ("stoppedByIntervalTimer", 6), ("stoppedByDurationTimer", 7), ("stoppedByUser", 8), ("done", 9))
wwpLeosBenchmarkMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1))
wwpLeosBenchmarkModule = MibIdentifier((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 1))
wwpLeosBenchmarkReflectorModule = MibIdentifier((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 2))
wwpLeosBenchmarkGeneratorModule = MibIdentifier((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 3))
wwpLeosBenchmarkFpgaStats = MibIdentifier((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 4))
wwpLeosBenchmarkPortStats = MibIdentifier((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5))
wwpLeosBenchmarkProfileObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6))
wwpLeosBenchmarkRole = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("none", 1), ("reflector", 2), ("generator", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wwpLeosBenchmarkRole.setStatus('current')
wwpLeosBenchmarkPort = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 64))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wwpLeosBenchmarkPort.setStatus('current')
wwpLeosBenchmarkMode = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("none", 1), ("inService", 2), ("outOfService", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wwpLeosBenchmarkMode.setStatus('current')
wwpLeosBenchmarkEnable = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 1, 4), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wwpLeosBenchmarkEnable.setStatus('current')
wwpLeosBenchmarkOperEnable = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 1, 5), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkOperEnable.setStatus('current')
wwpLeosBenchmarkLocalFpgaMac = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 1, 6), MacAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkLocalFpgaMac.setStatus('current')
wwpLeosBenchmarkReflectorEnable = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 2, 1), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wwpLeosBenchmarkReflectorEnable.setStatus('current')
wwpLeosBenchmarkReflectorVid = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 2, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1, 4095))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wwpLeosBenchmarkReflectorVid.setStatus('current')
wwpLeosBenchmarkReflectorVendorType = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 2, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("other", 1), ("ciena", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wwpLeosBenchmarkReflectorVendorType.setStatus('current')
wwpLeosBenchmarkGeneratorEnable = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 3, 1), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wwpLeosBenchmarkGeneratorEnable.setStatus('current')
wwpLeosBenchmarkGeneratorprofileUnderTest = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 3, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 16))).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkGeneratorprofileUnderTest.setStatus('current')
wwpLeosBenchmarkGeneratorThroughputTestState = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 3, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8))).clone(namedValues=NamedValues(("idle", 1), ("running", 2), ("waitingForResidualPackets", 3), ("processingResults", 4), ("stoppedByIntervalTimer", 5), ("stoppedByDurationTimer", 6), ("stoppedByUser", 7), ("done", 8)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkGeneratorThroughputTestState.setStatus('current')
wwpLeosBenchmarkGeneratorFramelossTestState = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 3, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11))).clone(namedValues=NamedValues(("idle", 1), ("runningFirstTest", 2), ("waitingForResidualFirstPackets", 3), ("processingFirstResults", 4), ("runningSecondTest", 5), ("waitingForResidualSecondPackets", 6), ("processingSecondResults", 7), ("stoppedByIntervalTimer", 8), ("stoppedByDurationTimer", 9), ("stoppedByUser", 10), ("done", 11)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkGeneratorFramelossTestState.setStatus('current')
wwpLeosBenchmarkGeneratorLatencyTestState = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 3, 5), BenchmarkLatencyPdvTestState()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkGeneratorLatencyTestState.setStatus('current')
wwpLeosBenchmarkGeneratorPdvTestState = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 3, 6), BenchmarkLatencyPdvTestState()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkGeneratorPdvTestState.setStatus('current')
wwpLeosBenchmarkGeneratorRfc2544State = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 3, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("idle", 1), ("running", 2), ("stoppedByIntervalTimer", 3), ("stoppedByDurationTimer", 4), ("stoppedByUser", 5), ("done", 6)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkGeneratorRfc2544State.setStatus('current')
wwpLeosBenchmarkGeneratorCurrentPktSize = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 3, 8), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkGeneratorCurrentPktSize.setStatus('current')
wwpLeosBenchmarkGeneratorCurrentRate = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 3, 9), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkGeneratorCurrentRate.setStatus('current')
wwpLeosBenchmarkGeneratorSamplesCompleted = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 3, 10), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkGeneratorSamplesCompleted.setStatus('current')
wwpLeosBenchmarkGeneratorCurrentIteration = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 3, 11), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkGeneratorCurrentIteration.setStatus('current')
wwpLeosBenchmarkGeneratorTotalIterations = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 3, 12), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkGeneratorTotalIterations.setStatus('current')
wwpLeosBenchmarkProfileTable = MibTable((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1), )
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileTable.setStatus('current')
wwpLeosBenchmarkProfileEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1), ).setIndexNames((0, "WWP-LEOS-BENCHMARK-MIB", "wwpLeosBenchmarkProfileEntryId"))
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntry.setStatus('current')
wwpLeosBenchmarkProfileEntryId = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 24))).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryId.setStatus('current')
wwpLeosBenchmarkProfileEntryName = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 16))).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryName.setStatus('current')
wwpLeosBenchmarkProfileEntryEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 3), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryEnabled.setStatus('current')
wwpLeosBenchmarkProfileEntryStarted = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 4), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryStarted.setStatus('current')
wwpLeosBenchmarkProfileEntryInterval = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("t15min", 1), ("t1hr", 2), ("t6hr", 3), ("tCompletion", 4)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryInterval.setStatus('current')
wwpLeosBenchmarkProfileEntryDuration = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("t15min", 1), ("t1hr", 2), ("t6hr", 3), ("t24hr", 4), ("tIndefinite", 5), ("tOnce", 6)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryDuration.setStatus('current')
wwpLeosBenchmarkProfileEntryThroughputTest = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 7), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryThroughputTest.setStatus('current')
wwpLeosBenchmarkProfileEntryFramelossTest = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 8), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryFramelossTest.setStatus('current')
wwpLeosBenchmarkProfileEntryLatencyTest = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 9), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryLatencyTest.setStatus('current')
wwpLeosBenchmarkProfileEntryPdvTest = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 10), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryPdvTest.setStatus('current')
wwpLeosBenchmarkProfileEntryRfc2544Suite = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 11), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryRfc2544Suite.setStatus('current')
wwpLeosBenchmarkProfileEntryDstmac = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 12), MacAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryDstmac.setStatus('current')
wwpLeosBenchmarkProfileEntryEncapType = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("untagged", 1), ("dot1q", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryEncapType.setStatus('current')
wwpLeosBenchmarkProfileEntryVid = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 14), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4095))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryVid.setStatus('current')
wwpLeosBenchmarkProfileEntryPcp = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 15), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 7))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryPcp.setStatus('current')
wwpLeosBenchmarkProfileEntryCfi = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 16), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 1))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryCfi.setStatus('current')
wwpLeosBenchmarkProfileEntryTpid = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 17), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryTpid.setStatus('current')
wwpLeosBenchmarkProfileEntryPduType = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 18), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("ethernet", 1), ("ip", 2), ("udpecho", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryPduType.setStatus('current')
wwpLeosBenchmarkProfileEntrySrcIpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 19), IpAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntrySrcIpAddr.setStatus('current')
wwpLeosBenchmarkProfileEntryDstIpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 20), IpAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryDstIpAddr.setStatus('current')
wwpLeosBenchmarkProfileEntryDscp = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 21), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 63))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryDscp.setStatus('current')
wwpLeosBenchmarkProfileEntryCustomPayload = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 22), OctetString().subtype(subtypeSpec=ValueSizeConstraint(256, 256)).setFixedLength(256)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryCustomPayload.setStatus('current')
wwpLeosBenchmarkProfileEntryBandwidth = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 23), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 1000))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryBandwidth.setStatus('current')
wwpLeosBenchmarkProfileEntryVidValidation = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 24), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryVidValidation.setStatus('current')
wwpLeosBenchmarkProfileEntryMaxSearches = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 25), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 16))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryMaxSearches.setStatus('current')
wwpLeosBenchmarkProfileEntryMaxSamples = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 26), Integer32().subtype(subtypeSpec=ValueRangeConstraint(2, 20))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryMaxSamples.setStatus('current')
wwpLeosBenchmarkProfileEntrySamplingInterval = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 27), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 600))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntrySamplingInterval.setStatus('current')
wwpLeosBenchmarkProfileEntryFrameLossStartBw = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 1, 1, 28), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("profileBandwidth", 1), ("maximumThroughput", 2), ("maximumLineRate", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileEntryFrameLossStartBw.setStatus('current')
wwpLeosBenchmarkProfileThroughputStatisticsTable = MibTable((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 2), )
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileThroughputStatisticsTable.setStatus('current')
wwpLeosBenchmarkProfileThroughputStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 2, 1), ).setIndexNames((0, "WWP-LEOS-BENCHMARK-MIB", "wwpLeosBenchmarkProfileThroughputStatsProfileId"), (0, "WWP-LEOS-BENCHMARK-MIB", "wwpLeosBenchmarkProfileThroughputStatsFrameSizeIndex"))
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileThroughputStatsEntry.setStatus('current')
wwpLeosBenchmarkProfileThroughputStatsProfileId = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 20))).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileThroughputStatsProfileId.setStatus('current')
wwpLeosBenchmarkProfileThroughputStatsFrameSizeIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 2, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 9))).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileThroughputStatsFrameSizeIndex.setStatus('current')
wwpLeosBenchmarkProfileThroughputStatsFrameSize = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 2, 1, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileThroughputStatsFrameSize.setStatus('current')
wwpLeosBenchmarkProfileThroughputStatsMin = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 2, 1, 4), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileThroughputStatsMin.setStatus('current')
wwpLeosBenchmarkProfileThroughputStatsMax = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 2, 1, 5), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileThroughputStatsMax.setStatus('current')
wwpLeosBenchmarkProfileThroughputStatsAvg = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 2, 1, 6), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileThroughputStatsAvg.setStatus('current')
wwpLeosBenchmarkProfileThroughputStatsIterations = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 2, 1, 7), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileThroughputStatsIterations.setStatus('current')
wwpLeosBenchmarkProfileThroughputStatsActiveVid = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 2, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4095))).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileThroughputStatsActiveVid.setStatus('current')
wwpLeosBenchmarkProfileThroughputStatsActiveDstMac = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 2, 1, 9), MacAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileThroughputStatsActiveDstMac.setStatus('current')
wwpLeosBenchmarkProfileFramelossStatisticsTable = MibTable((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 3), )
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileFramelossStatisticsTable.setStatus('current')
wwpLeosBenchmarkProfileFramelossStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 3, 1), ).setIndexNames((0, "WWP-LEOS-BENCHMARK-MIB", "wwpLeosBenchmarkProfileFramelossStatsProfileId"), (0, "WWP-LEOS-BENCHMARK-MIB", "wwpLeosBenchmarkProfileFramelossStatsFrameSizeIndex"), (0, "WWP-LEOS-BENCHMARK-MIB", "wwpLeosBenchmarkProfileFramelossStatsRateIndex"))
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileFramelossStatsEntry.setStatus('current')
wwpLeosBenchmarkProfileFramelossStatsProfileId = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 3, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 20))).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileFramelossStatsProfileId.setStatus('current')
wwpLeosBenchmarkProfileFramelossStatsFrameSizeIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 3, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 9))).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileFramelossStatsFrameSizeIndex.setStatus('current')
wwpLeosBenchmarkProfileFramelossStatsRateIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 3, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 9))).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileFramelossStatsRateIndex.setStatus('current')
wwpLeosBenchmarkProfileFramelossStatsFrameSize = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 3, 1, 4), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileFramelossStatsFrameSize.setStatus('current')
wwpLeosBenchmarkProfileFramelossStatsRate = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 3, 1, 5), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileFramelossStatsRate.setStatus('current')
wwpLeosBenchmarkProfileFramelossStatsFirst = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 3, 1, 6), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileFramelossStatsFirst.setStatus('current')
wwpLeosBenchmarkProfileFramelossStatsSecond = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 3, 1, 7), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileFramelossStatsSecond.setStatus('current')
wwpLeosBenchmarkProfileFramelossStatsActiveVid = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 3, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4095))).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileFramelossStatsActiveVid.setStatus('current')
wwpLeosBenchmarkProfileFramelossStatsActiveDstMac = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 3, 1, 9), MacAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileFramelossStatsActiveDstMac.setStatus('current')
wwpLeosBenchmarkProfileLatencyStatisticsTable = MibTable((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 4), )
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileLatencyStatisticsTable.setStatus('current')
wwpLeosBenchmarkProfileLatencyStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 4, 1), ).setIndexNames((0, "WWP-LEOS-BENCHMARK-MIB", "wwpLeosBenchmarkProfileLatencyStatsProfileId"), (0, "WWP-LEOS-BENCHMARK-MIB", "wwpLeosBenchmarkProfileLatencyStatsFrameSizeIndex"))
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileLatencyStatsEntry.setStatus('current')
wwpLeosBenchmarkProfileLatencyStatsProfileId = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 4, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 20))).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileLatencyStatsProfileId.setStatus('current')
wwpLeosBenchmarkProfileLatencyStatsFrameSizeIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 4, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 9))).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileLatencyStatsFrameSizeIndex.setStatus('current')
wwpLeosBenchmarkProfileLatencyStatsFrameSize = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 4, 1, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileLatencyStatsFrameSize.setStatus('current')
wwpLeosBenchmarkProfileLatencyStatsMin = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 4, 1, 4), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileLatencyStatsMin.setStatus('current')
wwpLeosBenchmarkProfileLatencyStatsMax = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 4, 1, 5), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileLatencyStatsMax.setStatus('current')
wwpLeosBenchmarkProfileLatencyStatsAvg = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 4, 1, 6), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileLatencyStatsAvg.setStatus('current')
wwpLeosBenchmarkProfileLatencyStatsSamples = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 4, 1, 7), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileLatencyStatsSamples.setStatus('current')
wwpLeosBenchmarkProfileLatencyStatsActiveVid = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 4, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4095))).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileLatencyStatsActiveVid.setStatus('current')
wwpLeosBenchmarkProfileLatencyStatsActiveDstMac = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 4, 1, 9), MacAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileLatencyStatsActiveDstMac.setStatus('current')
wwpLeosBenchmarkProfilePdvStatisticsTable = MibTable((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 5), )
if mibBuilder.loadTexts: wwpLeosBenchmarkProfilePdvStatisticsTable.setStatus('current')
wwpLeosBenchmarkProfilePdvStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 5, 1), ).setIndexNames((0, "WWP-LEOS-BENCHMARK-MIB", "wwpLeosBenchmarkProfilePdvStatsProfileId"), (0, "WWP-LEOS-BENCHMARK-MIB", "wwpLeosBenchmarkProfilePdvStatsFrameSizeIndex"))
if mibBuilder.loadTexts: wwpLeosBenchmarkProfilePdvStatsEntry.setStatus('current')
wwpLeosBenchmarkProfilePdvStatsProfileId = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 5, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 20))).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfilePdvStatsProfileId.setStatus('current')
wwpLeosBenchmarkProfilePdvStatsFrameSizeIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 5, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 9))).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfilePdvStatsFrameSizeIndex.setStatus('current')
wwpLeosBenchmarkProfilePdvStatsFrameSize = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 5, 1, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfilePdvStatsFrameSize.setStatus('current')
wwpLeosBenchmarkProfilePdvStatsAvg = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 5, 1, 4), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfilePdvStatsAvg.setStatus('current')
wwpLeosBenchmarkProfilePdvStatsSamples = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 5, 1, 5), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfilePdvStatsSamples.setStatus('current')
wwpLeosBenchmarkProfilePdvStatsActiveVid = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 5, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4095))).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfilePdvStatsActiveVid.setStatus('current')
wwpLeosBenchmarkProfilePdvStatsActiveDstMac = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 5, 1, 7), MacAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfilePdvStatsActiveDstMac.setStatus('current')
wwpLeosBenchmarkProfileFrameSizeTable = MibTable((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 6), )
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileFrameSizeTable.setStatus('current')
wwpLeosBenchmarkProfileFrameSizeEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 6, 1), ).setIndexNames((0, "WWP-LEOS-BENCHMARK-MIB", "wwpLeosBenchmarkProfileFrameSizeProfileId"), (0, "WWP-LEOS-BENCHMARK-MIB", "wwpLeosBenchmarkProfileFrameSizeIndex"))
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileFrameSizeEntry.setStatus('current')
wwpLeosBenchmarkProfileFrameSizeProfileId = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 6, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 20))).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileFrameSizeProfileId.setStatus('current')
wwpLeosBenchmarkProfileFrameSizeIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 6, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 9))).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileFrameSizeIndex.setStatus('current')
wwpLeosBenchmarkProfileFrameSize = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 6, 6, 1, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkProfileFrameSize.setStatus('current')
wwpLeosBenchmarkFpgaStatsRxPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 4, 1), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkFpgaStatsRxPkts.setStatus('current')
wwpLeosBenchmarkFpgaStatsCrcPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 4, 2), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkFpgaStatsCrcPkts.setStatus('current')
wwpLeosBenchmarkFpgaStatsUdpChecksumPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 4, 3), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkFpgaStatsUdpChecksumPkts.setStatus('current')
wwpLeosBenchmarkFpgaStatsDiscardPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 4, 4), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkFpgaStatsDiscardPkts.setStatus('current')
wwpLeosBenchmarkFpgaStatsDuplicatePkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 4, 5), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkFpgaStatsDuplicatePkts.setStatus('current')
wwpLeosBenchmarkFpgaStatsOOSeqPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 4, 6), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkFpgaStatsOOSeqPkts.setStatus('deprecated')
wwpLeosBenchmarkFpgaStatsTxPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 4, 7), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkFpgaStatsTxPkts.setStatus('current')
wwpLeosBenchmarkFpgaStatsOOOPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 4, 8), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkFpgaStatsOOOPkts.setStatus('current')
wwpLeosBenchmarkFpgaStatsDiscSeqNumPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 4, 9), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkFpgaStatsDiscSeqNumPkts.setStatus('current')
wwpLeosBenchmarkPortStatsTxBytes = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 1), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsTxBytes.setStatus('current')
wwpLeosBenchmarkPortStatsTxPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 2), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsTxPkts.setStatus('current')
wwpLeosBenchmarkPortStatsCrcErrorPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 3), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsCrcErrorPkts.setStatus('current')
wwpLeosBenchmarkPortStatsUcastPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 4), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsUcastPkts.setStatus('current')
wwpLeosBenchmarkPortStatsMcastPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 5), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsMcastPkts.setStatus('current')
wwpLeosBenchmarkPortStatsBcastPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 6), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsBcastPkts.setStatus('current')
wwpLeosBenchmarkPortStatsUndersizePkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 7), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsUndersizePkts.setStatus('current')
wwpLeosBenchmarkPortStatsOversizePkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 8), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsOversizePkts.setStatus('current')
wwpLeosBenchmarkPortStatsFragmentsPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 9), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsFragmentsPkts.setStatus('current')
wwpLeosBenchmarkPortStatsJabbersPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 10), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsJabbersPkts.setStatus('current')
wwpLeosBenchmarkPortStatsTxPausePkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 11), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsTxPausePkts.setStatus('current')
wwpLeosBenchmarkPortStatsTxDropPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 12), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsTxDropPkts.setStatus('current')
wwpLeosBenchmarkPortStatsTxDiscardPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 13), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsTxDiscardPkts.setStatus('current')
wwpLeosBenchmarkPortStatsTxLOutRangePkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 14), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsTxLOutRangePkts.setStatus('current')
wwpLeosBenchmarkPortStatsTx64OctsPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 15), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsTx64OctsPkts.setStatus('current')
wwpLeosBenchmarkPortStatsTx65To127Pkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 16), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsTx65To127Pkts.setStatus('current')
wwpLeosBenchmarkPortStatsTx128To255Pkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 17), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsTx128To255Pkts.setStatus('current')
wwpLeosBenchmarkPortStatsTx256To511Pkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 18), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsTx256To511Pkts.setStatus('current')
wwpLeosBenchmarkPortStatsTx512To1023Pkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 19), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsTx512To1023Pkts.setStatus('current')
wwpLeosBenchmarkPortStatsTx1024To1518Pkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 20), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsTx1024To1518Pkts.setStatus('current')
wwpLeosBenchmarkPortStatsTx1519To2047Pkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 21), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsTx1519To2047Pkts.setStatus('current')
wwpLeosBenchmarkPortStatsTx2048To4095Pkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 22), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsTx2048To4095Pkts.setStatus('current')
wwpLeosBenchmarkPortStatsTx4096To9216Pkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 23), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsTx4096To9216Pkts.setStatus('current')
wwpLeosBenchmarkPortStatsRxBytes = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 24), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRxBytes.setStatus('current')
wwpLeosBenchmarkPortStatsRxPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 25), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRxPkts.setStatus('current')
wwpLeosBenchmarkPortStatsRxExDeferPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 26), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRxExDeferPkts.setStatus('current')
wwpLeosBenchmarkPortStatsRxDeferPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 27), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRxDeferPkts.setStatus('current')
wwpLeosBenchmarkPortStatsRxGiantPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 28), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRxGiantPkts.setStatus('current')
wwpLeosBenchmarkPortStatsRxUnderRunPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 29), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRxUnderRunPkts.setStatus('current')
wwpLeosBenchmarkPortStatsRxCrcErrorPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 30), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRxCrcErrorPkts.setStatus('current')
wwpLeosBenchmarkPortStatsRxLCheckErrorPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 31), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRxLCheckErrorPkts.setStatus('current')
wwpLeosBenchmarkPortStatsRxLOutRangePkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 32), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRxLOutRangePkts.setStatus('current')
wwpLeosBenchmarkPortStatsRxPausePkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 33), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRxPausePkts.setStatus('current')
wwpLeosBenchmarkPortStatsRxUcastPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 34), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRxUcastPkts.setStatus('current')
wwpLeosBenchmarkPortStatsRxMcastPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 35), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRxMcastPkts.setStatus('current')
wwpLeosBenchmarkPortStatsRxBcastPkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 36), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRxBcastPkts.setStatus('current')
wwpLeosBenchmarkPortStatsRx64Pkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 37), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRx64Pkts.setStatus('current')
wwpLeosBenchmarkPortStatsRx65To127Pkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 38), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRx65To127Pkts.setStatus('current')
wwpLeosBenchmarkPortStatsRx128To255Pkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 39), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRx128To255Pkts.setStatus('current')
wwpLeosBenchmarkPortStatsRx256To511Pkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 40), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRx256To511Pkts.setStatus('current')
wwpLeosBenchmarkPortStatsRx512To1023Pkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 41), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRx512To1023Pkts.setStatus('current')
wwpLeosBenchmarkPortStatsRx1024To1518Pkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 42), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRx1024To1518Pkts.setStatus('current')
wwpLeosBenchmarkPortStatsRx1519To2047Pkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 43), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRx1519To2047Pkts.setStatus('current')
wwpLeosBenchmarkPortStatsRx2048To4095Pkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 44), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRx2048To4095Pkts.setStatus('current')
wwpLeosBenchmarkPortStatsRx4096To9216Pkts = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 43, 1, 5, 45), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeosBenchmarkPortStatsRx4096To9216Pkts.setStatus('current')
mibBuilder.exportSymbols("WWP-LEOS-BENCHMARK-MIB", wwpLeosBenchmarkProfileLatencyStatsAvg=wwpLeosBenchmarkProfileLatencyStatsAvg, wwpLeosBenchmarkProfileEntryBandwidth=wwpLeosBenchmarkProfileEntryBandwidth, wwpLeosBenchmarkPortStatsRx128To255Pkts=wwpLeosBenchmarkPortStatsRx128To255Pkts, wwpLeosBenchmarkProfileFrameSizeProfileId=wwpLeosBenchmarkProfileFrameSizeProfileId, wwpLeosBenchmarkFpgaStatsDiscSeqNumPkts=wwpLeosBenchmarkFpgaStatsDiscSeqNumPkts, wwpLeosBenchmarkPortStatsTx65To127Pkts=wwpLeosBenchmarkPortStatsTx65To127Pkts, wwpLeosBenchmarkProfileLatencyStatsActiveVid=wwpLeosBenchmarkProfileLatencyStatsActiveVid, wwpLeosBenchmarkProfileFramelossStatsProfileId=wwpLeosBenchmarkProfileFramelossStatsProfileId, wwpLeosBenchmarkProfileLatencyStatsProfileId=wwpLeosBenchmarkProfileLatencyStatsProfileId, wwpLeosBenchmarkGeneratorCurrentRate=wwpLeosBenchmarkGeneratorCurrentRate, wwpLeosBenchmarkPort=wwpLeosBenchmarkPort, wwpLeosBenchmarkProfileLatencyStatisticsTable=wwpLeosBenchmarkProfileLatencyStatisticsTable, wwpLeosBenchmarkProfileEntryMaxSamples=wwpLeosBenchmarkProfileEntryMaxSamples, wwpLeosBenchmarkProfileThroughputStatisticsTable=wwpLeosBenchmarkProfileThroughputStatisticsTable, wwpLeosBenchmarkPortStatsTx512To1023Pkts=wwpLeosBenchmarkPortStatsTx512To1023Pkts, wwpLeosBenchmarkProfileEntrySamplingInterval=wwpLeosBenchmarkProfileEntrySamplingInterval, wwpLeosBenchmarkPortStatsTx1024To1518Pkts=wwpLeosBenchmarkPortStatsTx1024To1518Pkts, wwpLeosBenchmarkPortStatsRx1519To2047Pkts=wwpLeosBenchmarkPortStatsRx1519To2047Pkts, wwpLeosBenchmarkProfileThroughputStatsMin=wwpLeosBenchmarkProfileThroughputStatsMin, wwpLeosBenchmarkProfileEntryThroughputTest=wwpLeosBenchmarkProfileEntryThroughputTest, wwpLeosBenchmarkPortStatsTx2048To4095Pkts=wwpLeosBenchmarkPortStatsTx2048To4095Pkts, wwpLeosBenchmarkReflectorVendorType=wwpLeosBenchmarkReflectorVendorType, wwpLeosBenchmarkProfileEntryPdvTest=wwpLeosBenchmarkProfileEntryPdvTest, wwpLeosBenchmarkPortStatsRx256To511Pkts=wwpLeosBenchmarkPortStatsRx256To511Pkts, wwpLeosBenchmarkProfileEntrySrcIpAddr=wwpLeosBenchmarkProfileEntrySrcIpAddr, wwpLeosBenchmarkPortStatsRx2048To4095Pkts=wwpLeosBenchmarkPortStatsRx2048To4095Pkts, wwpLeosBenchmarkProfileEntryMaxSearches=wwpLeosBenchmarkProfileEntryMaxSearches, wwpLeosBenchmarkMode=wwpLeosBenchmarkMode, wwpLeosBenchmarkProfileEntryFramelossTest=wwpLeosBenchmarkProfileEntryFramelossTest, wwpLeosBenchmarkProfileObjects=wwpLeosBenchmarkProfileObjects, wwpLeosBenchmarkPortStatsRxBcastPkts=wwpLeosBenchmarkPortStatsRxBcastPkts, wwpLeosBenchmarkPortStatsUcastPkts=wwpLeosBenchmarkPortStatsUcastPkts, wwpLeosBenchmarkProfileEntryCfi=wwpLeosBenchmarkProfileEntryCfi, wwpLeosBenchmarkProfilePdvStatisticsTable=wwpLeosBenchmarkProfilePdvStatisticsTable, wwpLeosBenchmarkPortStatsRxGiantPkts=wwpLeosBenchmarkPortStatsRxGiantPkts, wwpLeosBenchmarkProfileLatencyStatsMin=wwpLeosBenchmarkProfileLatencyStatsMin, wwpLeosBenchmarkFpgaStatsTxPkts=wwpLeosBenchmarkFpgaStatsTxPkts, wwpLeosBenchmarkFpgaStatsCrcPkts=wwpLeosBenchmarkFpgaStatsCrcPkts, wwpLeosBenchmarkPortStatsBcastPkts=wwpLeosBenchmarkPortStatsBcastPkts, wwpLeosBenchmarkPortStats=wwpLeosBenchmarkPortStats, wwpLeosBenchmarkProfileEntryCustomPayload=wwpLeosBenchmarkProfileEntryCustomPayload, wwpLeosBenchmarkPortStatsCrcErrorPkts=wwpLeosBenchmarkPortStatsCrcErrorPkts, wwpLeosBenchmarkProfileThroughputStatsFrameSizeIndex=wwpLeosBenchmarkProfileThroughputStatsFrameSizeIndex, wwpLeosBenchmarkGeneratorCurrentIteration=wwpLeosBenchmarkGeneratorCurrentIteration, wwpLeosBenchmarkProfileFramelossStatsRateIndex=wwpLeosBenchmarkProfileFramelossStatsRateIndex, wwpLeosBenchmarkProfileFramelossStatsActiveVid=wwpLeosBenchmarkProfileFramelossStatsActiveVid, wwpLeosBenchmarkProfileEntryStarted=wwpLeosBenchmarkProfileEntryStarted, wwpLeosBenchmarkMIBObjects=wwpLeosBenchmarkMIBObjects, wwpLeosBenchmarkProfileFrameSizeTable=wwpLeosBenchmarkProfileFrameSizeTable, wwpLeosBenchmarkPortStatsRx64Pkts=wwpLeosBenchmarkPortStatsRx64Pkts, wwpLeosBenchmarkProfileThroughputStatsProfileId=wwpLeosBenchmarkProfileThroughputStatsProfileId, wwpLeosBenchmarkPortStatsJabbersPkts=wwpLeosBenchmarkPortStatsJabbersPkts, wwpLeosBenchmarkPortStatsRx4096To9216Pkts=wwpLeosBenchmarkPortStatsRx4096To9216Pkts, wwpLeosBenchmarkProfileEntryTpid=wwpLeosBenchmarkProfileEntryTpid, wwpLeosBenchmarkProfileLatencyStatsActiveDstMac=wwpLeosBenchmarkProfileLatencyStatsActiveDstMac, wwpLeosBenchmarkFpgaStatsDiscardPkts=wwpLeosBenchmarkFpgaStatsDiscardPkts, wwpLeosBenchmarkPortStatsTx64OctsPkts=wwpLeosBenchmarkPortStatsTx64OctsPkts, wwpLeosBenchmarkGeneratorFramelossTestState=wwpLeosBenchmarkGeneratorFramelossTestState, wwpLeosBenchmarkPortStatsTx128To255Pkts=wwpLeosBenchmarkPortStatsTx128To255Pkts, wwpLeosBenchmarkProfileLatencyStatsFrameSize=wwpLeosBenchmarkProfileLatencyStatsFrameSize, wwpLeosBenchmarkPortStatsTxDiscardPkts=wwpLeosBenchmarkPortStatsTxDiscardPkts, wwpLeosBenchmarkProfileFrameSizeEntry=wwpLeosBenchmarkProfileFrameSizeEntry, wwpLeosBenchmarkGeneratorEnable=wwpLeosBenchmarkGeneratorEnable, wwpLeosBenchmarkOperEnable=wwpLeosBenchmarkOperEnable, wwpLeosBenchmarkProfileFrameSizeIndex=wwpLeosBenchmarkProfileFrameSizeIndex, wwpLeosBenchmarkPortStatsRxUnderRunPkts=wwpLeosBenchmarkPortStatsRxUnderRunPkts, wwpLeosBenchmarkPortStatsTx1519To2047Pkts=wwpLeosBenchmarkPortStatsTx1519To2047Pkts, wwpLeosBenchmarkProfilePdvStatsFrameSize=wwpLeosBenchmarkProfilePdvStatsFrameSize, BenchmarkLatencyPdvTestState=BenchmarkLatencyPdvTestState, wwpLeosBenchmarkProfileLatencyStatsMax=wwpLeosBenchmarkProfileLatencyStatsMax, wwpLeosBenchmarkProfileEntryInterval=wwpLeosBenchmarkProfileEntryInterval, wwpLeosBenchmarkProfileEntryEncapType=wwpLeosBenchmarkProfileEntryEncapType, wwpLeosBenchmarkPortStatsRxLCheckErrorPkts=wwpLeosBenchmarkPortStatsRxLCheckErrorPkts, wwpLeosBenchmarkProfileEntryDuration=wwpLeosBenchmarkProfileEntryDuration, wwpLeosBenchmarkProfileLatencyStatsFrameSizeIndex=wwpLeosBenchmarkProfileLatencyStatsFrameSizeIndex, wwpLeosBenchmarkPortStatsRxPausePkts=wwpLeosBenchmarkPortStatsRxPausePkts, wwpLeosBenchmarkProfileEntryDscp=wwpLeosBenchmarkProfileEntryDscp, wwpLeosBenchmarkGeneratorTotalIterations=wwpLeosBenchmarkGeneratorTotalIterations, wwpLeosBenchmarkProfileLatencyStatsEntry=wwpLeosBenchmarkProfileLatencyStatsEntry, wwpLeosBenchmarkGeneratorModule=wwpLeosBenchmarkGeneratorModule, wwpLeosBenchmarkReflectorModule=wwpLeosBenchmarkReflectorModule, wwpLeosBenchmarkProfileEntryId=wwpLeosBenchmarkProfileEntryId, wwpLeosBenchmarkGeneratorCurrentPktSize=wwpLeosBenchmarkGeneratorCurrentPktSize, wwpLeosBenchmarkMIB=wwpLeosBenchmarkMIB, wwpLeosBenchmarkPortStatsTxDropPkts=wwpLeosBenchmarkPortStatsTxDropPkts, wwpLeosBenchmarkPortStatsRxUcastPkts=wwpLeosBenchmarkPortStatsRxUcastPkts, wwpLeosBenchmarkGeneratorLatencyTestState=wwpLeosBenchmarkGeneratorLatencyTestState, wwpLeosBenchmarkProfilePdvStatsActiveVid=wwpLeosBenchmarkProfilePdvStatsActiveVid, wwpLeosBenchmarkPortStatsRxMcastPkts=wwpLeosBenchmarkPortStatsRxMcastPkts, wwpLeosBenchmarkProfileEntryLatencyTest=wwpLeosBenchmarkProfileEntryLatencyTest, wwpLeosBenchmarkProfileFramelossStatsRate=wwpLeosBenchmarkProfileFramelossStatsRate, wwpLeosBenchmarkFpgaStatsDuplicatePkts=wwpLeosBenchmarkFpgaStatsDuplicatePkts, wwpLeosBenchmarkProfileFramelossStatsSecond=wwpLeosBenchmarkProfileFramelossStatsSecond, wwpLeosBenchmarkRole=wwpLeosBenchmarkRole, wwpLeosBenchmarkProfileFramelossStatsFirst=wwpLeosBenchmarkProfileFramelossStatsFirst, wwpLeosBenchmarkProfileEntryVid=wwpLeosBenchmarkProfileEntryVid, wwpLeosBenchmarkProfileFramelossStatisticsTable=wwpLeosBenchmarkProfileFramelossStatisticsTable, wwpLeosBenchmarkPortStatsRxPkts=wwpLeosBenchmarkPortStatsRxPkts, wwpLeosBenchmarkPortStatsFragmentsPkts=wwpLeosBenchmarkPortStatsFragmentsPkts, wwpLeosBenchmarkReflectorEnable=wwpLeosBenchmarkReflectorEnable, wwpLeosBenchmarkPortStatsTxPausePkts=wwpLeosBenchmarkPortStatsTxPausePkts, wwpLeosBenchmarkFpgaStats=wwpLeosBenchmarkFpgaStats, wwpLeosBenchmarkGeneratorRfc2544State=wwpLeosBenchmarkGeneratorRfc2544State, wwpLeosBenchmarkPortStatsTxLOutRangePkts=wwpLeosBenchmarkPortStatsTxLOutRangePkts, wwpLeosBenchmarkPortStatsRxDeferPkts=wwpLeosBenchmarkPortStatsRxDeferPkts, wwpLeosBenchmarkModule=wwpLeosBenchmarkModule, wwpLeosBenchmarkPortStatsRxExDeferPkts=wwpLeosBenchmarkPortStatsRxExDeferPkts, wwpLeosBenchmarkPortStatsRx512To1023Pkts=wwpLeosBenchmarkPortStatsRx512To1023Pkts, wwpLeosBenchmarkProfileTable=wwpLeosBenchmarkProfileTable, wwpLeosBenchmarkProfileEntryEnabled=wwpLeosBenchmarkProfileEntryEnabled, wwpLeosBenchmarkProfileEntryDstmac=wwpLeosBenchmarkProfileEntryDstmac, wwpLeosBenchmarkProfileEntryVidValidation=wwpLeosBenchmarkProfileEntryVidValidation, wwpLeosBenchmarkProfileThroughputStatsAvg=wwpLeosBenchmarkProfileThroughputStatsAvg, wwpLeosBenchmarkEnable=wwpLeosBenchmarkEnable, wwpLeosBenchmarkProfilePdvStatsEntry=wwpLeosBenchmarkProfilePdvStatsEntry, wwpLeosBenchmarkPortStatsUndersizePkts=wwpLeosBenchmarkPortStatsUndersizePkts, wwpLeosBenchmarkProfileEntryPduType=wwpLeosBenchmarkProfileEntryPduType, wwpLeosBenchmarkPortStatsTx4096To9216Pkts=wwpLeosBenchmarkPortStatsTx4096To9216Pkts, wwpLeosBenchmarkProfileThroughputStatsFrameSize=wwpLeosBenchmarkProfileThroughputStatsFrameSize, wwpLeosBenchmarkLocalFpgaMac=wwpLeosBenchmarkLocalFpgaMac, wwpLeosBenchmarkProfileEntryPcp=wwpLeosBenchmarkProfileEntryPcp, wwpLeosBenchmarkFpgaStatsUdpChecksumPkts=wwpLeosBenchmarkFpgaStatsUdpChecksumPkts, wwpLeosBenchmarkPortStatsRxLOutRangePkts=wwpLeosBenchmarkPortStatsRxLOutRangePkts, wwpLeosBenchmarkPortStatsOversizePkts=wwpLeosBenchmarkPortStatsOversizePkts, wwpLeosBenchmarkProfilePdvStatsSamples=wwpLeosBenchmarkProfilePdvStatsSamples, wwpLeosBenchmarkProfileFramelossStatsEntry=wwpLeosBenchmarkProfileFramelossStatsEntry, wwpLeosBenchmarkPortStatsRxBytes=wwpLeosBenchmarkPortStatsRxBytes, wwpLeosBenchmarkGeneratorPdvTestState=wwpLeosBenchmarkGeneratorPdvTestState, wwpLeosBenchmarkGeneratorSamplesCompleted=wwpLeosBenchmarkGeneratorSamplesCompleted, wwpLeosBenchmarkProfileFramelossStatsFrameSize=wwpLeosBenchmarkProfileFramelossStatsFrameSize, wwpLeosBenchmarkGeneratorprofileUnderTest=wwpLeosBenchmarkGeneratorprofileUnderTest, wwpLeosBenchmarkProfileThroughputStatsIterations=wwpLeosBenchmarkProfileThroughputStatsIterations, wwpLeosBenchmarkFpgaStatsOOSeqPkts=wwpLeosBenchmarkFpgaStatsOOSeqPkts, wwpLeosBenchmarkFpgaStatsOOOPkts=wwpLeosBenchmarkFpgaStatsOOOPkts, wwpLeosBenchmarkProfileThroughputStatsEntry=wwpLeosBenchmarkProfileThroughputStatsEntry, wwpLeosBenchmarkFpgaStatsRxPkts=wwpLeosBenchmarkFpgaStatsRxPkts, wwpLeosBenchmarkGeneratorThroughputTestState=wwpLeosBenchmarkGeneratorThroughputTestState, wwpLeosBenchmarkProfileEntryDstIpAddr=wwpLeosBenchmarkProfileEntryDstIpAddr, wwpLeosBenchmarkProfileThroughputStatsActiveVid=wwpLeosBenchmarkProfileThroughputStatsActiveVid, wwpLeosBenchmarkPortStatsRxCrcErrorPkts=wwpLeosBenchmarkPortStatsRxCrcErrorPkts, wwpLeosBenchmarkPortStatsRx65To127Pkts=wwpLeosBenchmarkPortStatsRx65To127Pkts, wwpLeosBenchmarkProfileThroughputStatsMax=wwpLeosBenchmarkProfileThroughputStatsMax, wwpLeosBenchmarkProfileEntry=wwpLeosBenchmarkProfileEntry, wwpLeosBenchmarkProfileEntryFrameLossStartBw=wwpLeosBenchmarkProfileEntryFrameLossStartBw, wwpLeosBenchmarkProfilePdvStatsFrameSizeIndex=wwpLeosBenchmarkProfilePdvStatsFrameSizeIndex, wwpLeosBenchmarkProfileThroughputStatsActiveDstMac=wwpLeosBenchmarkProfileThroughputStatsActiveDstMac, wwpLeosBenchmarkProfilePdvStatsAvg=wwpLeosBenchmarkProfilePdvStatsAvg, PYSNMP_MODULE_ID=wwpLeosBenchmarkMIB, wwpLeosBenchmarkPortStatsRx1024To1518Pkts=wwpLeosBenchmarkPortStatsRx1024To1518Pkts, wwpLeosBenchmarkProfilePdvStatsActiveDstMac=wwpLeosBenchmarkProfilePdvStatsActiveDstMac, wwpLeosBenchmarkProfilePdvStatsProfileId=wwpLeosBenchmarkProfilePdvStatsProfileId, wwpLeosBenchmarkProfileFramelossStatsActiveDstMac=wwpLeosBenchmarkProfileFramelossStatsActiveDstMac, wwpLeosBenchmarkProfileEntryRfc2544Suite=wwpLeosBenchmarkProfileEntryRfc2544Suite, wwpLeosBenchmarkReflectorVid=wwpLeosBenchmarkReflectorVid, wwpLeosBenchmarkProfileLatencyStatsSamples=wwpLeosBenchmarkProfileLatencyStatsSamples, wwpLeosBenchmarkProfileEntryName=wwpLeosBenchmarkProfileEntryName, wwpLeosBenchmarkPortStatsTxBytes=wwpLeosBenchmarkPortStatsTxBytes, wwpLeosBenchmarkProfileFrameSize=wwpLeosBenchmarkProfileFrameSize, wwpLeosBenchmarkProfileFramelossStatsFrameSizeIndex=wwpLeosBenchmarkProfileFramelossStatsFrameSizeIndex, wwpLeosBenchmarkPortStatsMcastPkts=wwpLeosBenchmarkPortStatsMcastPkts, wwpLeosBenchmarkPortStatsTxPkts=wwpLeosBenchmarkPortStatsTxPkts, wwpLeosBenchmarkPortStatsTx256To511Pkts=wwpLeosBenchmarkPortStatsTx256To511Pkts)
|
# -*- coding: UTF-8 -*-
# Copyright 2013-2017 Luc Saffre
# License: BSD (see file COPYING for details)
"""
Plugins
=======
.. autosummary::
:toctree:
cosi
contacts
b2c
Not used
========
.. autosummary::
:toctree:
orders
delivery
"""
|
"""
SE - number
SE - symbols
SE - (SE SE SE ...)
EXAMPLES:
1 -> 1
ahoj -> ahoj
(a ahoj) -> ( -> a -> ahoj -> )
((ahoj a) (a) a) -> ( -> ( -> ahoj -> a -> ) -> ( -> ) -> )
"""
STR_SURROUND = ["\"", "'"]
ESCAPE_CHAR = "\\"
def lexer(value):
"""Yield token"""
buffer = list()
last = ''
state = 'normal'
line = 1
for ch in value:
if ch == '\n':
line += 1
# comment
if ch == ';':
state = 'comment'
if state == 'comment':
if ch == '\n':
state = 'normal'
continue
# string
if ch in STR_SURROUND and last != ESCAPE_CHAR:
if state == 'normal':
state = 'string'
elif state == 'string':
state = 'normal'
if state == 'string':
buffer.append(ch)
continue
if ch == '`' and not buffer:
yield (ch, line)
# normal
if ch == '(':
yield (ch, line)
elif ch in (' ', '\n', ')'):
if buffer:
yield (''.join(buffer), line)
buffer = list()
if ch == ')':
yield (ch, line)
elif ch != '`':
buffer.append(ch)
last = ch
if buffer:
yield (''.join(buffer), line)
|
"""
Word Search
Given an m x n grid of characters board and a string word,
return true if word exists in the grid.
The word can be constructed from letters of sequentially adjacent cells,
where adjacent cells are horizontally or vertically neighboring.
The same letter cell may not be used more than once.
Example 1:
Input: board = [["A","B","C","E"],["S","F","C","S"],["A","D","E","E"]], word = "ABCCED"
Output: true
Example 2:
Input: board = [["A","B","C","E"],["S","F","C","S"],["A","D","E","E"]], word = "SEE"
Output: true
Example 3:
Input: board = [["A","B","C","E"],["S","F","C","S"],["A","D","E","E"]], word = "ABCB"
Output: false
Constraints:
m == board.length
n = board[i].length
1 <= m, n <= 6
1 <= word.length <= 15
board and word consists of only lowercase and uppercase English letters.
Follow up: Could you use search pruning to make your
solution faster with a larger board?
"""
"""
Complexity Analysis
Time Complexity: O(n*3^L) where N is the number of cells in the board
and L is the length of the word to be matched.
- For the backtracking function, initially we could have at most 4 directions
to explore, but further the choices are reduced into 3 (since we won't go back
to where we come from). As a result, the execution trace after the first step
could be visualized as a 3-ary tree, each of the branches represent a potential
exploration in the corresponding direction. Therefore, in the worst case, the total
number of invocation would be the number of nodes in a full 3-nary tree, which is about 3^L
- We iterate through the board for backtracking, i.e. there could be N times
invocation for the backtracking function in the worst case.
- As a result, overall the time complexity of the algorithm would be O(N⋅3^L).
Space Complexity: O(L) where L is the length of the word to be matched.
The main consumption of the memory lies in the recursion call of the backtracking
function. The maximum length of the call stack would be the length of the word.
Therefore, the space complexity of the algorithm is O(L).
"""
class Solution:
def exist(self, board, word):
if not board:
return False
for i in range(len(board)):
for j in range(len(board[0])):
if self.dfs(board, i, j, word):
return True
return False
# check whether can find word, start at (i,j) position
def dfs(self, board, i, j, word):
if len(word) == 0: # all the characters are checked
return True
if i < 0 or i >= len(board) or j < 0 or j >= len(board[0]) or word[0] != board[i][j]:
return False
tmp = board[i][j] # first character is found, check the remaining part
board[i][j] = "#" # avoid visit agian
# check whether can find "word" along one direction
res = self.dfs(board, i+1, j, word[1:]) or self.dfs(board, i-1, j, word[1:]) \
or self.dfs(board, i, j+1, word[1:]) or self.dfs(board, i, j-1, word[1:])
board[i][j] = tmp
return res
|
#
# PySNMP MIB module CISCOSB-CDP-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCOSB-CDP-MIB
# Produced by pysmi-0.3.4 at Wed May 1 12:22:03 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ConstraintsUnion, ValueRangeConstraint, SingleValueConstraint, ValueSizeConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "ValueRangeConstraint", "SingleValueConstraint", "ValueSizeConstraint", "ConstraintsIntersection")
cdpCacheDeviceIndex, cdpCacheEntry, cdpCacheIfIndex = mibBuilder.importSymbols("CISCO-CDP-MIB", "cdpCacheDeviceIndex", "cdpCacheEntry", "cdpCacheIfIndex")
rndErrorDesc, rndErrorSeverity = mibBuilder.importSymbols("CISCOSB-DEVICEPARAMS-MIB", "rndErrorDesc", "rndErrorSeverity")
rndNotifications, switch001 = mibBuilder.importSymbols("CISCOSB-MIB", "rndNotifications", "switch001")
InterfaceIndex, InterfaceIndexOrZero = mibBuilder.importSymbols("IF-MIB", "InterfaceIndex", "InterfaceIndexOrZero")
InetAddress, InetAddressType = mibBuilder.importSymbols("INET-ADDRESS-MIB", "InetAddress", "InetAddressType")
VlanId, PortList = mibBuilder.importSymbols("Q-BRIDGE-MIB", "VlanId", "PortList")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
MibScalar, MibTable, MibTableRow, MibTableColumn, ModuleIdentity, TimeTicks, Integer32, Counter64, ObjectIdentity, MibIdentifier, Gauge32, Counter32, NotificationType, iso, Bits, IpAddress, Unsigned32 = mibBuilder.importSymbols("SNMPv2-SMI", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "ModuleIdentity", "TimeTicks", "Integer32", "Counter64", "ObjectIdentity", "MibIdentifier", "Gauge32", "Counter32", "NotificationType", "iso", "Bits", "IpAddress", "Unsigned32")
TruthValue, DisplayString, TextualConvention, MacAddress = mibBuilder.importSymbols("SNMPv2-TC", "TruthValue", "DisplayString", "TextualConvention", "MacAddress")
rlCdp = ModuleIdentity((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137))
rlCdp.setRevisions(('2008-09-14 00:00', '2010-08-11 00:00', '2010-10-25 00:00', '2010-11-10 00:00', '2010-11-14 00:00', '2011-01-09 00:00', '2011-02-15 00:00', '2012-02-14 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: rlCdp.setRevisionsDescriptions(('Initial revision.', 'Added rlCdpLogMismatchVoiceVlanEnable, rlCdpLogMismatchNativeVlanEnable', 'Added rlCdpSecondaryCacheTable. Added maxNeighborsExceededInSecondaryCache. Renamed maxNeighborsExceeded to maxNeighborsExceededInMainCache.', 'Added rlCdpGlobalLogMismatchDuplexEnable. Added rlCdpGlobalLogMismatchVoiceVlanEnable. Added rlCdpGlobalLogMismatchNativeVlanEnable.', 'Added rlCdpTlvTable. Added rlCdpAdvertiseApplianceTlv.', 'Added rlCdpValidateMandatoryTlvs.', 'Added rlCdpLogMismatchDuplexTrap. Added rlCdpLogMismatchVoiceVlanTrap. Added rlCdpLogMismatchNativeVlanTrap.', 'Added rlCdpTlvSysName to rlCdpTlvTable.',))
if mibBuilder.loadTexts: rlCdp.setLastUpdated('201102150000Z')
if mibBuilder.loadTexts: rlCdp.setOrganization('Cisco Systems, Inc.')
if mibBuilder.loadTexts: rlCdp.setContactInfo('Postal: 170 West Tasman Drive San Jose , CA 95134-1706 USA Website: Cisco Small Business Support Community <http://www.cisco.com/go/smallbizsupport>')
if mibBuilder.loadTexts: rlCdp.setDescription('The private MIB module definition for CDP protocol.')
class RlCdpVersionTypes(TextualConvention, Integer32):
description = 'version-v1 - cdp version 1 version-v2 - cdp version 2 '
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("version-v1", 1), ("version-v2", 2))
class RlCdpCounterTypes(TextualConvention, Integer32):
description = ' v1OutputPackets counter specifies the number of sent CDP packets with version 1 v2OutputPackets counter specifies the number of sent CDP packets with version 2 v1InputPackets counter specifies the number of received CDP packets with version 1 v2InputPackets counter specifies the number of received CDP packets with version 2 totalInputPackets counter specifies the total number of received CDP packets totalOutputPackets counter specifies the total number of sent CDP packets illegalChksum counter specifies the number of received CDP packets with illegal checksum. errorPackets counter specifies the number of received CDP packets with other error (duplicated TLVs, illegal TLVs, etc.) maxNeighborsExceededInMainCache counter specifies the number of times a CDP neighbor could not be stored in the main cache. maxNeighborsExceededInSecondaryCache specifies counter the number of times a CDP neighbor could not be stored in the secondary cache. '
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10))
namedValues = NamedValues(("totalInputPackets", 1), ("v1InputPackets", 2), ("v2InputPackets", 3), ("totalOutputPackets", 4), ("v1OutputPackets", 5), ("v2OutputPackets", 6), ("illegalChksum", 7), ("errorPackets", 8), ("maxNeighborsExceededInMainCache", 9), ("maxNeighborsExceededInSecondaryCache", 10))
class RlCdpPduActionTypes(TextualConvention, Integer32):
description = 'filtering - CDP packets would filtered (dropped). bridging - CDP packets bridged as regular data packets '
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3))
namedValues = NamedValues(("filtering", 1), ("bridging", 2), ("flooding", 3))
rlCdpVersionAdvertised = MibScalar((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 1), RlCdpVersionTypes()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rlCdpVersionAdvertised.setStatus('current')
if mibBuilder.loadTexts: rlCdpVersionAdvertised.setDescription('Specifies the verison of sent CDP packets')
rlCdpSourceInterface = MibScalar((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 2), InterfaceIndexOrZero()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rlCdpSourceInterface.setStatus('current')
if mibBuilder.loadTexts: rlCdpSourceInterface.setDescription('Specifices the CDP source-interface, which the IP address advertised into TLV is accoding to this source-interface instead of the outgoing interface. value of 0 indicates no source interface. value must belong to an ethernet port/lag ')
rlCdpLogMismatchDuplexEnable = MibScalar((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 3), PortList()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rlCdpLogMismatchDuplexEnable.setStatus('current')
if mibBuilder.loadTexts: rlCdpLogMismatchDuplexEnable.setDescription('Enable logging messages when detecting mishmatch between advertised and received duplex mode. To enable loging on specific interface set the corresponing bit.')
rlCdpCountersTable = MibTable((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 4), )
if mibBuilder.loadTexts: rlCdpCountersTable.setStatus('current')
if mibBuilder.loadTexts: rlCdpCountersTable.setDescription('This table contains all CDP counters values, indexed by counter name')
rlCdpCountersEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 4, 1), ).setIndexNames((0, "CISCOSB-CDP-MIB", "rlCdpCountersName"))
if mibBuilder.loadTexts: rlCdpCountersEntry.setStatus('current')
if mibBuilder.loadTexts: rlCdpCountersEntry.setDescription('The row definition for this table.')
rlCdpCountersName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 4, 1, 1), RlCdpCounterTypes())
if mibBuilder.loadTexts: rlCdpCountersName.setStatus('current')
if mibBuilder.loadTexts: rlCdpCountersName.setDescription('counter name used as key for counters table ')
rlCdpCountersValue = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 4, 1, 2), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rlCdpCountersValue.setStatus('current')
if mibBuilder.loadTexts: rlCdpCountersValue.setDescription('the value of the counter name specisifed by rlCdpCountersName, unsuppo will have no entry in the tab.')
rlCdpCountersClear = MibScalar((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 5), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rlCdpCountersClear.setStatus('current')
if mibBuilder.loadTexts: rlCdpCountersClear.setDescription('By setting the MIB to True, all error and traffic counters are set to zero.')
rlCdpCacheClear = MibScalar((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 6), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rlCdpCacheClear.setStatus('current')
if mibBuilder.loadTexts: rlCdpCacheClear.setDescription('By setting the MIB to True, all entries from the cdp cache table is deleted.')
rlCdpVoiceVlanId = MibScalar((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4094))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rlCdpVoiceVlanId.setStatus('obsolete')
if mibBuilder.loadTexts: rlCdpVoiceVlanId.setDescription('voice vlan Id, used as the Appliance Vlan-Id TLV')
rlCdpCacheTable = MibTable((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 8), )
if mibBuilder.loadTexts: rlCdpCacheTable.setStatus('current')
if mibBuilder.loadTexts: rlCdpCacheTable.setDescription('The (conceptual) table contains externtion for the cdpCache table. indexed by cdpCacheEntry.')
rlCdpCacheEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 8, 1), )
cdpCacheEntry.registerAugmentions(("CISCOSB-CDP-MIB", "rlCdpCacheEntry"))
rlCdpCacheEntry.setIndexNames(*cdpCacheEntry.getIndexNames())
if mibBuilder.loadTexts: rlCdpCacheEntry.setStatus('current')
if mibBuilder.loadTexts: rlCdpCacheEntry.setDescription('The row definition for this table.')
rlCdpCacheVersionExt = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 8, 1, 1), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rlCdpCacheVersionExt.setStatus('current')
if mibBuilder.loadTexts: rlCdpCacheVersionExt.setDescription('This field contains the extention of the cdpCacheVersion field in the cdpCache table. In case the neighbour advertised the SW TLV as a string with length larger than 160, this field contains the chacters from place 160 and on. Zero-length strings indicates no Version field (TLV) was reported in the most recent CDP message, or it was smaller than 160 chars ')
rlCdpCacheTimeToLive = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 8, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rlCdpCacheTimeToLive.setStatus('current')
if mibBuilder.loadTexts: rlCdpCacheTimeToLive.setDescription('This field indicates the time remains in seconds till the entry should be expried. ')
rlCdpCacheCdpVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 8, 1, 3), RlCdpVersionTypes()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rlCdpCacheCdpVersion.setStatus('current')
if mibBuilder.loadTexts: rlCdpCacheCdpVersion.setDescription('This field indicates the cdp version that was reported in the most recent CDP message.')
rlCdpPduAction = MibScalar((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 9), RlCdpPduActionTypes().clone('bridging')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rlCdpPduAction.setStatus('current')
if mibBuilder.loadTexts: rlCdpPduAction.setDescription('Defines CDP packets handling when CDP is globally disabled.')
rlCdpLogMismatchVoiceVlanEnable = MibScalar((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 10), PortList()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rlCdpLogMismatchVoiceVlanEnable.setStatus('current')
if mibBuilder.loadTexts: rlCdpLogMismatchVoiceVlanEnable.setDescription('Enable logging messages when detecting mishmatch between advertised and received voice VLAN. To enable logging on specific interface set the corresponing bit.')
rlCdpLogMismatchNativeVlanEnable = MibScalar((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 11), PortList()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rlCdpLogMismatchNativeVlanEnable.setStatus('current')
if mibBuilder.loadTexts: rlCdpLogMismatchNativeVlanEnable.setDescription('Enable logging messages when detecting mishmatch between advertised and received native VLAN. To enable loging on specific interface set the corresponing bit.')
rlCdpSecondaryCacheTable = MibTable((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 12), )
if mibBuilder.loadTexts: rlCdpSecondaryCacheTable.setStatus('current')
if mibBuilder.loadTexts: rlCdpSecondaryCacheTable.setDescription('The (conceptual) table contains partial information from cdpCache table. indexed by rlCdpSecondaryCacheEntry.')
rlCdpSecondaryCacheEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 12, 1), ).setIndexNames((0, "CISCO-CDP-MIB", "cdpCacheIfIndex"), (0, "CISCO-CDP-MIB", "cdpCacheDeviceIndex"))
if mibBuilder.loadTexts: rlCdpSecondaryCacheEntry.setStatus('current')
if mibBuilder.loadTexts: rlCdpSecondaryCacheEntry.setDescription('An entry (conceptual row) in the rlCdpSecondaryCacheTable, containing partial information received via CDP on one interface from one device. Entries appear when a CDP advertisement is received from a neighbor device. Entries disappear when CDP is disabled on the interface, globally or when the secondary cache is cleared')
rlCdpSecondaryCacheMacAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 12, 1, 3), MacAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rlCdpSecondaryCacheMacAddress.setStatus('current')
if mibBuilder.loadTexts: rlCdpSecondaryCacheMacAddress.setDescription('The MAC address of the neighbor.')
rlCdpSecondaryCachePlatform = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 12, 1, 4), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rlCdpSecondaryCachePlatform.setStatus('current')
if mibBuilder.loadTexts: rlCdpSecondaryCachePlatform.setDescription("The Device's Hardware Platform prefix, as reported in the most recent CDP message. The zero-length string indicates that no Platform field (TLV) was reported in the most recent CDP message.")
rlCdpSecondaryCacheCapabilities = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 12, 1, 5), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 4))).setMaxAccess("readonly")
if mibBuilder.loadTexts: rlCdpSecondaryCacheCapabilities.setStatus('current')
if mibBuilder.loadTexts: rlCdpSecondaryCacheCapabilities.setDescription("The Device's Functional Capabilities as reported in the most recent CDP message.")
rlCdpSecondaryCacheVoiceVlanID = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 12, 1, 6), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 4095))).setMaxAccess("readonly")
if mibBuilder.loadTexts: rlCdpSecondaryCacheVoiceVlanID.setStatus('current')
if mibBuilder.loadTexts: rlCdpSecondaryCacheVoiceVlanID.setDescription("The remote device's VoIP VLAN ID, as reported in the most recent CDP message. This object is not instantiated if no Appliance VLAN-ID field (TLV) was reported in the most recently received CDP message.")
rlCdpSecondaryCacheTimeToLive = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 12, 1, 7), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rlCdpSecondaryCacheTimeToLive.setStatus('current')
if mibBuilder.loadTexts: rlCdpSecondaryCacheTimeToLive.setDescription('This field indicates the number of seconds till the entry is expried. ')
rlCdpGlobalLogMismatchDuplexEnable = MibScalar((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 13), TruthValue().clone('true')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rlCdpGlobalLogMismatchDuplexEnable.setStatus('current')
if mibBuilder.loadTexts: rlCdpGlobalLogMismatchDuplexEnable.setDescription('Globally enable/disable logging messages when detecting mishmatch between advertised and received duplex mode.')
rlCdpGlobalLogMismatchVoiceVlanEnable = MibScalar((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 14), TruthValue().clone('true')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rlCdpGlobalLogMismatchVoiceVlanEnable.setStatus('current')
if mibBuilder.loadTexts: rlCdpGlobalLogMismatchVoiceVlanEnable.setDescription('Globally enable/disable logging messages when detecting mishmatch between advertised and received voice VLAN.')
rlCdpGlobalLogMismatchNativeVlanEnable = MibScalar((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 15), TruthValue().clone('true')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rlCdpGlobalLogMismatchNativeVlanEnable.setStatus('current')
if mibBuilder.loadTexts: rlCdpGlobalLogMismatchNativeVlanEnable.setDescription('Globally enable/disable logging messages when detecting mishmatch between advertised and received native VLAN.')
rlCdpTlvTable = MibTable((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16), )
if mibBuilder.loadTexts: rlCdpTlvTable.setStatus('current')
if mibBuilder.loadTexts: rlCdpTlvTable.setDescription('The (conceptual) table contains the local advertised information. indexed by rlCdpTlvEntry.')
rlCdpTlvEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1), ).setIndexNames((0, "CISCOSB-CDP-MIB", "rlCdpTlvIfIndex"))
if mibBuilder.loadTexts: rlCdpTlvEntry.setStatus('current')
if mibBuilder.loadTexts: rlCdpTlvEntry.setDescription('An entry (conceptual row) in the rlCdpTlvTable, containing local information advertised by CDP on one interface. Entries are available only when CDP is globally enabled, for interfaces on which CDP is enabled and the interface state is UP.')
rlCdpTlvIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647)))
if mibBuilder.loadTexts: rlCdpTlvIfIndex.setStatus('current')
if mibBuilder.loadTexts: rlCdpTlvIfIndex.setDescription('The ifIndex value of the local interface. A value of zero is used to access TLVs which do not changed between interfaces.')
rlCdpTlvDeviceIdFormat = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("serialNumber", 1), ("macAddress", 2), ("other", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: rlCdpTlvDeviceIdFormat.setStatus('current')
if mibBuilder.loadTexts: rlCdpTlvDeviceIdFormat.setDescription('An indication of the format of Device-Id contained in the corresponding instance of rlCdpTlvDeviceId. serialNumber(1) indicates that the value of rlCdpTlvDeviceId object is in the form of an ASCII string contain the device serial number. macAddress(2) indicates that the value of rlCdpTlvDeviceId object is in the form of Layer 2 MAC address. other(3) indicates that the value of rlCdpTlvDeviceId object is in the form of a platform specific ASCII string contain info that identifies the device. For example: ASCII string contains serialNumber appended/prepened with system name.')
rlCdpTlvDeviceId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 3), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rlCdpTlvDeviceId.setStatus('current')
if mibBuilder.loadTexts: rlCdpTlvDeviceId.setDescription('The Device-ID string as will be advertised in subsequent CDP messages.')
rlCdpTlvAddress1Type = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 4), InetAddressType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rlCdpTlvAddress1Type.setStatus('current')
if mibBuilder.loadTexts: rlCdpTlvAddress1Type.setDescription('The Inet address type of rlCdpTlvAddress1')
rlCdpTlvAddress1 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 5), InetAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rlCdpTlvAddress1.setStatus('current')
if mibBuilder.loadTexts: rlCdpTlvAddress1.setDescription("The (first) network-layer address of the device as will be advertised in the Address TLV of subsequent CDP messages. For example, if the corresponding instance of rlCdpTlvAddress1Type had the value 'ipv4(1)', then this object would be an IPv4-address.")
rlCdpTlvAddress2Type = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 6), InetAddressType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rlCdpTlvAddress2Type.setStatus('current')
if mibBuilder.loadTexts: rlCdpTlvAddress2Type.setDescription('The Inet address type of rlCdpTlvAddress2')
rlCdpTlvAddress2 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 7), InetAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rlCdpTlvAddress2.setStatus('current')
if mibBuilder.loadTexts: rlCdpTlvAddress2.setDescription("The (first) network-layer address of the device as will be advertised in the Address TLV of subsequent CDP messages. For example, if the corresponding instance of rlCdpTlvAddress2Type had the value 'ipv6(2)', then this object would be an IPv6-address.")
rlCdpTlvAddress3Type = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 8), InetAddressType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rlCdpTlvAddress3Type.setStatus('current')
if mibBuilder.loadTexts: rlCdpTlvAddress3Type.setDescription('The Inet address type of rlCdpTlvAddress3')
rlCdpTlvAddress3 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 9), InetAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rlCdpTlvAddress3.setStatus('current')
if mibBuilder.loadTexts: rlCdpTlvAddress3.setDescription("The (first) network-layer address of the device as will be advertised in the Address TLV of subsequent CDP messages. For example, if the corresponding instance of rlCdpTlvAddress3Type had the value 'ipv6(2)', then this object would be an IPv6-address.")
rlCdpTlvPortId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 10), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rlCdpTlvPortId.setStatus('current')
if mibBuilder.loadTexts: rlCdpTlvPortId.setDescription("The Port-ID string as will be advertised in subsequent CDP messages from this interface. This will typically be the value of the ifName object (e.g., 'Ethernet0').")
rlCdpTlvCapabilities = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 11), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 4))).setMaxAccess("readonly")
if mibBuilder.loadTexts: rlCdpTlvCapabilities.setReference('Cisco Discovery Protocol Specification, 10/19/94.')
if mibBuilder.loadTexts: rlCdpTlvCapabilities.setStatus('current')
if mibBuilder.loadTexts: rlCdpTlvCapabilities.setDescription("The Device's Functional Capabilities as will be advertised in subsequent CDP messages. For latest set of specific values, see the latest version of the CDP specification.")
rlCdpTlvVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 12), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rlCdpTlvVersion.setStatus('current')
if mibBuilder.loadTexts: rlCdpTlvVersion.setDescription('The Version string as will be advertised in subsequent CDP messages.')
rlCdpTlvPlatform = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 13), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rlCdpTlvPlatform.setStatus('current')
if mibBuilder.loadTexts: rlCdpTlvPlatform.setDescription("The Device's Hardware Platform as will be advertised in subsequent CDP messages.")
rlCdpTlvNativeVLAN = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 14), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 4095))).setMaxAccess("readonly")
if mibBuilder.loadTexts: rlCdpTlvNativeVLAN.setStatus('current')
if mibBuilder.loadTexts: rlCdpTlvNativeVLAN.setDescription("The local device's interface's native VLAN, as will be advertised in subsequent CDP messages.")
rlCdpTlvDuplex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 15), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("unknown", 1), ("halfduplex", 2), ("fullduplex", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: rlCdpTlvDuplex.setStatus('current')
if mibBuilder.loadTexts: rlCdpTlvDuplex.setDescription("The local device's interface's duplex mode, as will be advertised in subsequent CDP messages.")
rlCdpTlvApplianceID = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 16), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: rlCdpTlvApplianceID.setStatus('current')
if mibBuilder.loadTexts: rlCdpTlvApplianceID.setDescription("The local device's Appliance ID, as will be advertised in subsequent CDP messages. A value of zero denotes no Appliance VLAN-ID TLV will be advertised in subsequent CDP messages.")
rlCdpTlvApplianceVlanID = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 17), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 4095))).setMaxAccess("readonly")
if mibBuilder.loadTexts: rlCdpTlvApplianceVlanID.setStatus('current')
if mibBuilder.loadTexts: rlCdpTlvApplianceVlanID.setDescription("The local device's VoIP VLAN ID, as will be advertised in subsequent CDP messages. A value of zero denotes no Appliance VLAN-ID TLV will be advertised in subsequent CDP messages.")
rlCdpTlvExtendedTrust = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 18), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("untrusted", 0), ("trusted", 1)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: rlCdpTlvExtendedTrust.setStatus('current')
if mibBuilder.loadTexts: rlCdpTlvExtendedTrust.setDescription("The local device's interface's extended trust mode, as will be advertised in subsequent CDP messages. A value of zero indicates the absence of extended trust.")
rlCdpTlvCosForUntrustedPorts = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 19), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: rlCdpTlvCosForUntrustedPorts.setStatus('current')
if mibBuilder.loadTexts: rlCdpTlvCosForUntrustedPorts.setDescription('The COS value with which all packets received on an untrusted port should be marked by a simple switching device which cannot itself classify individual packets. This TLV only has any meaning if corresponding instance of rlCdpTlvExtendedTrust indicates the absence of extended trust.')
rlCdpTlvPowerAvailableRequestId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 20), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: rlCdpTlvPowerAvailableRequestId.setStatus('current')
if mibBuilder.loadTexts: rlCdpTlvPowerAvailableRequestId.setDescription('The Power Available TLV Request-ID field echoes the Request-ID field last received in a Power Requested TLV. It is 0 if no Power Requested TLV has been received since the interface last transitioned to ifOperState == Up.')
rlCdpTlvPowerAvailablePowerManagementId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 21), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: rlCdpTlvPowerAvailablePowerManagementId.setStatus('current')
if mibBuilder.loadTexts: rlCdpTlvPowerAvailablePowerManagementId.setDescription('The Power Available TLV Power-Management-ID field.')
rlCdpTlvPowerAvailable = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 22), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rlCdpTlvPowerAvailable.setStatus('current')
if mibBuilder.loadTexts: rlCdpTlvPowerAvailable.setDescription('The Power Available TLV Available-Power field indicates the number of milliwatts of power available to powered devices at the time this object is instatiated.')
rlCdpTlvPowerAvailableManagementPowerLevel = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 23), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rlCdpTlvPowerAvailableManagementPowerLevel.setStatus('current')
if mibBuilder.loadTexts: rlCdpTlvPowerAvailableManagementPowerLevel.setDescription("The Power Available TLV Management-Power-Level field indicates the number of milliwatts representing the supplier's request to the powered device for its Power Consumption TLV. A value of 0xFFFFFFFF indicates the local device has no preference.")
rlCdpTlvSysName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 16, 1, 24), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rlCdpTlvSysName.setStatus('current')
if mibBuilder.loadTexts: rlCdpTlvSysName.setDescription('The sysName MIB as will be advertised in subsequent CDP messages.')
rlCdpAdvertiseApplianceTlv = MibScalar((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 17), TruthValue().clone('true')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rlCdpAdvertiseApplianceTlv.setStatus('current')
if mibBuilder.loadTexts: rlCdpAdvertiseApplianceTlv.setDescription('By setting the MIB to True Appliance VLAN-ID TLV may be advertised. A value of False will prevent this TLV from being advertised.')
rlCdpValidateMandatoryTlvs = MibScalar((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 18), TruthValue().clone('false')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rlCdpValidateMandatoryTlvs.setStatus('current')
if mibBuilder.loadTexts: rlCdpValidateMandatoryTlvs.setDescription('By setting the MIB to true all mandatory TLVs 0x0001-0x0006 will be validated. Incoming CDP frames without any of the TLVs will be dropped. A value of false indicates that only the Device ID TLV (0x0001) is mandatory. Frames containing Device ID TLV will be processed, regardless of whether other TLVs are present or not.')
rlCdpInterfaceCountersTable = MibTable((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 19), )
if mibBuilder.loadTexts: rlCdpInterfaceCountersTable.setStatus('current')
if mibBuilder.loadTexts: rlCdpInterfaceCountersTable.setDescription('This table contains all CDP counters values, indexed by interface id.')
rlCdpInterfaceCountersEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 19, 1), ).setIndexNames((0, "CISCOSB-CDP-MIB", "rlCdpInterfaceId"))
if mibBuilder.loadTexts: rlCdpInterfaceCountersEntry.setStatus('current')
if mibBuilder.loadTexts: rlCdpInterfaceCountersEntry.setDescription('The row definition for this table.')
rlCdpInterfaceId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 19, 1, 1), InterfaceIndex())
if mibBuilder.loadTexts: rlCdpInterfaceId.setStatus('current')
if mibBuilder.loadTexts: rlCdpInterfaceId.setDescription('Interface id, used as index for interface counters table.')
rlCdpInterfaceTotalInputPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 19, 1, 2), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rlCdpInterfaceTotalInputPackets.setStatus('current')
if mibBuilder.loadTexts: rlCdpInterfaceTotalInputPackets.setDescription('Num of received packets on rlCdpInterfaceId')
rlCdpInterfaceV1InputPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 19, 1, 3), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rlCdpInterfaceV1InputPackets.setStatus('current')
if mibBuilder.loadTexts: rlCdpInterfaceV1InputPackets.setDescription('Num of v1 received packets on rlCdpInterfaceId')
rlCdpInterfaceV2InputPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 19, 1, 4), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rlCdpInterfaceV2InputPackets.setStatus('current')
if mibBuilder.loadTexts: rlCdpInterfaceV2InputPackets.setDescription('Num of v2 received packets on rlCdpInterfaceId')
rlCdpInterfaceTotalOutputPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 19, 1, 5), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rlCdpInterfaceTotalOutputPackets.setStatus('current')
if mibBuilder.loadTexts: rlCdpInterfaceTotalOutputPackets.setDescription('Num of sent packets from rlCdpInterfaceId')
rlCdpInterfaceV1OutputPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 19, 1, 6), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rlCdpInterfaceV1OutputPackets.setStatus('current')
if mibBuilder.loadTexts: rlCdpInterfaceV1OutputPackets.setDescription('Num of v1 sent packets from rlCdpInterfaceId')
rlCdpInterfaceV2OutputPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 19, 1, 7), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rlCdpInterfaceV2OutputPackets.setStatus('current')
if mibBuilder.loadTexts: rlCdpInterfaceV2OutputPackets.setDescription('Num of v2 sent packets from rlCdpInterfaceId')
rlCdpInterfaceIllegalChksum = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 19, 1, 8), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rlCdpInterfaceIllegalChksum.setStatus('current')
if mibBuilder.loadTexts: rlCdpInterfaceIllegalChksum.setDescription('Num of received packets with illegal CDP checksum.')
rlCdpInterfaceErrorPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 19, 1, 9), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rlCdpInterfaceErrorPackets.setStatus('current')
if mibBuilder.loadTexts: rlCdpInterfaceErrorPackets.setDescription('specifies the number of received CDP packets with other error (duplicated TLVs, illegal TLVs, etc.) ')
rlCdpInterfaceMaxNeighborsExceededInMainCache = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 19, 1, 10), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rlCdpInterfaceMaxNeighborsExceededInMainCache.setStatus('current')
if mibBuilder.loadTexts: rlCdpInterfaceMaxNeighborsExceededInMainCache.setDescription('specifies the number of times a CDP neighbor could not be stored in the main cache. ')
rlCdpInterfaceMaxNeighborsExceededInSecondaryCache = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 19, 1, 11), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rlCdpInterfaceMaxNeighborsExceededInSecondaryCache.setStatus('current')
if mibBuilder.loadTexts: rlCdpInterfaceMaxNeighborsExceededInSecondaryCache.setDescription(' specifies the number of times a CDP neighbor could not be stored in the secondary cache.')
rlCdpInterfaceCountersClear = MibScalar((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 137, 20), InterfaceIndexOrZero()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rlCdpInterfaceCountersClear.setStatus('current')
if mibBuilder.loadTexts: rlCdpInterfaceCountersClear.setDescription('By setting the scalar to a interface id , all error and traffic counters of this interface are set to zero. To clear the counters for ALL interfaces set the scalar to 0x0FFFFFFF')
rlCdpLogMismatchDuplexTrap = NotificationType((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 0, 224)).setObjects(("CISCOSB-DEVICEPARAMS-MIB", "rndErrorDesc"), ("CISCOSB-DEVICEPARAMS-MIB", "rndErrorSeverity"))
if mibBuilder.loadTexts: rlCdpLogMismatchDuplexTrap.setStatus('current')
if mibBuilder.loadTexts: rlCdpLogMismatchDuplexTrap.setDescription('Warning trap indicating that duplex mismatch has been detected by CDP')
rlCdpLogMismatchVoiceVlanTrap = NotificationType((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 0, 225)).setObjects(("CISCOSB-DEVICEPARAMS-MIB", "rndErrorDesc"), ("CISCOSB-DEVICEPARAMS-MIB", "rndErrorSeverity"))
if mibBuilder.loadTexts: rlCdpLogMismatchVoiceVlanTrap.setStatus('current')
if mibBuilder.loadTexts: rlCdpLogMismatchVoiceVlanTrap.setDescription('Warning trap indicating that voice vlan mismatch has been detected by CDP')
rlCdpLogMismatchNativeVlanTrap = NotificationType((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 0, 226)).setObjects(("CISCOSB-DEVICEPARAMS-MIB", "rndErrorDesc"), ("CISCOSB-DEVICEPARAMS-MIB", "rndErrorSeverity"))
if mibBuilder.loadTexts: rlCdpLogMismatchNativeVlanTrap.setStatus('current')
if mibBuilder.loadTexts: rlCdpLogMismatchNativeVlanTrap.setDescription('Warning trap indicating that native vlan mismatch has been detected by CDP')
mibBuilder.exportSymbols("CISCOSB-CDP-MIB", rlCdpInterfaceTotalInputPackets=rlCdpInterfaceTotalInputPackets, rlCdpTlvCosForUntrustedPorts=rlCdpTlvCosForUntrustedPorts, rlCdpTlvAddress3Type=rlCdpTlvAddress3Type, rlCdpAdvertiseApplianceTlv=rlCdpAdvertiseApplianceTlv, rlCdpCountersName=rlCdpCountersName, rlCdpSecondaryCachePlatform=rlCdpSecondaryCachePlatform, rlCdpCacheEntry=rlCdpCacheEntry, rlCdpTlvPowerAvailable=rlCdpTlvPowerAvailable, rlCdpInterfaceV2OutputPackets=rlCdpInterfaceV2OutputPackets, rlCdpInterfaceMaxNeighborsExceededInSecondaryCache=rlCdpInterfaceMaxNeighborsExceededInSecondaryCache, rlCdpLogMismatchVoiceVlanTrap=rlCdpLogMismatchVoiceVlanTrap, rlCdpSourceInterface=rlCdpSourceInterface, PYSNMP_MODULE_ID=rlCdp, rlCdpLogMismatchNativeVlanEnable=rlCdpLogMismatchNativeVlanEnable, rlCdpTlvTable=rlCdpTlvTable, rlCdpTlvNativeVLAN=rlCdpTlvNativeVLAN, rlCdpSecondaryCacheMacAddress=rlCdpSecondaryCacheMacAddress, rlCdpInterfaceV1OutputPackets=rlCdpInterfaceV1OutputPackets, rlCdpTlvAddress3=rlCdpTlvAddress3, rlCdpCountersClear=rlCdpCountersClear, rlCdpGlobalLogMismatchVoiceVlanEnable=rlCdpGlobalLogMismatchVoiceVlanEnable, rlCdpCountersTable=rlCdpCountersTable, rlCdpTlvAddress2Type=rlCdpTlvAddress2Type, rlCdpVersionAdvertised=rlCdpVersionAdvertised, rlCdpTlvSysName=rlCdpTlvSysName, rlCdpTlvDuplex=rlCdpTlvDuplex, rlCdpInterfaceErrorPackets=rlCdpInterfaceErrorPackets, rlCdpTlvAddress2=rlCdpTlvAddress2, rlCdpGlobalLogMismatchNativeVlanEnable=rlCdpGlobalLogMismatchNativeVlanEnable, rlCdpLogMismatchDuplexTrap=rlCdpLogMismatchDuplexTrap, rlCdpCacheVersionExt=rlCdpCacheVersionExt, rlCdpTlvApplianceID=rlCdpTlvApplianceID, RlCdpCounterTypes=RlCdpCounterTypes, rlCdpInterfaceCountersTable=rlCdpInterfaceCountersTable, rlCdpValidateMandatoryTlvs=rlCdpValidateMandatoryTlvs, rlCdpCacheClear=rlCdpCacheClear, rlCdpTlvExtendedTrust=rlCdpTlvExtendedTrust, rlCdpInterfaceV1InputPackets=rlCdpInterfaceV1InputPackets, rlCdpTlvPowerAvailableRequestId=rlCdpTlvPowerAvailableRequestId, rlCdpCacheTimeToLive=rlCdpCacheTimeToLive, rlCdpTlvEntry=rlCdpTlvEntry, rlCdpInterfaceMaxNeighborsExceededInMainCache=rlCdpInterfaceMaxNeighborsExceededInMainCache, rlCdpTlvAddress1=rlCdpTlvAddress1, RlCdpPduActionTypes=RlCdpPduActionTypes, rlCdpTlvDeviceId=rlCdpTlvDeviceId, rlCdpSecondaryCacheCapabilities=rlCdpSecondaryCacheCapabilities, rlCdpCountersValue=rlCdpCountersValue, rlCdpTlvVersion=rlCdpTlvVersion, rlCdpSecondaryCacheEntry=rlCdpSecondaryCacheEntry, rlCdpSecondaryCacheTimeToLive=rlCdpSecondaryCacheTimeToLive, rlCdpCountersEntry=rlCdpCountersEntry, rlCdpCacheCdpVersion=rlCdpCacheCdpVersion, rlCdpInterfaceCountersClear=rlCdpInterfaceCountersClear, rlCdpPduAction=rlCdpPduAction, rlCdpTlvPowerAvailablePowerManagementId=rlCdpTlvPowerAvailablePowerManagementId, rlCdpTlvPowerAvailableManagementPowerLevel=rlCdpTlvPowerAvailableManagementPowerLevel, rlCdpSecondaryCacheTable=rlCdpSecondaryCacheTable, rlCdpLogMismatchDuplexEnable=rlCdpLogMismatchDuplexEnable, rlCdp=rlCdp, rlCdpInterfaceCountersEntry=rlCdpInterfaceCountersEntry, rlCdpLogMismatchVoiceVlanEnable=rlCdpLogMismatchVoiceVlanEnable, rlCdpTlvPlatform=rlCdpTlvPlatform, rlCdpTlvIfIndex=rlCdpTlvIfIndex, rlCdpLogMismatchNativeVlanTrap=rlCdpLogMismatchNativeVlanTrap, rlCdpInterfaceV2InputPackets=rlCdpInterfaceV2InputPackets, rlCdpTlvDeviceIdFormat=rlCdpTlvDeviceIdFormat, rlCdpCacheTable=rlCdpCacheTable, rlCdpTlvCapabilities=rlCdpTlvCapabilities, RlCdpVersionTypes=RlCdpVersionTypes, rlCdpTlvApplianceVlanID=rlCdpTlvApplianceVlanID, rlCdpTlvAddress1Type=rlCdpTlvAddress1Type, rlCdpInterfaceId=rlCdpInterfaceId, rlCdpInterfaceTotalOutputPackets=rlCdpInterfaceTotalOutputPackets, rlCdpGlobalLogMismatchDuplexEnable=rlCdpGlobalLogMismatchDuplexEnable, rlCdpSecondaryCacheVoiceVlanID=rlCdpSecondaryCacheVoiceVlanID, rlCdpTlvPortId=rlCdpTlvPortId, rlCdpVoiceVlanId=rlCdpVoiceVlanId, rlCdpInterfaceIllegalChksum=rlCdpInterfaceIllegalChksum)
|
unique_symbols= { 1:'I', 5:'V', 10:'X', 50:'L', 100:'C', 500:'D', 1000:'M' }
def calculateRoman(algarism, place):
if algarism==0: return ''
elif place>=4: return algarism * unique_symbols[1000]
elif algarism>5:
if algarism==9: return unique_symbols[10**(place-1)]+unique_symbols[10**place]
else: return unique_symbols[5*10**(place-1)] + (algarism-5) * unique_symbols[10**(place-1)]
elif algarism<5:
if algarism==4: return unique_symbols[10**(place-1)] + unique_symbols[5*10**(place-1)]
else: return algarism * unique_symbols[10**(place-1)]
else: return unique_symbols[5*10**(place-1)]
def converter(integer):
place=0
roman=''
while integer!=0:
rest= integer%10
integer//=10
place+=1
roman= calculateRoman(rest, place) + roman
return roman
if __name__ == "__main__":
while True:
try:
integer = input('Insert an Integer: ')
if integer.isdecimal(): integer= int(integer)
else:
print('Insert a valid Integer')
continue
if integer<1 or integer>10000: raise
roman=converter(integer)
print("{} converts into {}".format(integer, roman))
break
except: print("Integer is too high") |
class Solution:
"""
@param grid: a list of lists of integers
@return: An integer, minimizes the sum of all numbers along its path
"""
"""
f[]
"""
def minPathSum(self, grid):
# write your code here
if grid is None or not grid:return 0
m = len(grid)
n = len(grid[0])
f = [[0] * n for _ in range(m)]
f[0][0] = grid[0][0]
for i in range(1, m):
f[i][0] = f[i - 1][0] + grid[i][0]
for j in range(1, n):
f[0][j] = f[0][j - 1] + grid[0][j]
f[i][j] = min(f[i - 1][j], f[i][j - 1])+grid[i][j]
return f[m - 1][n - 1]
s=Solution()
print(s.minPathSum( [[1,3,1],[1,5,1],[4,2,1]])) |
class MapAsObject:
def __init__(self, wrapped):
self.wrapped = wrapped
def __getattr__(self, key):
try:
return self.wrapped[key]
except KeyError:
raise AttributeError("%r object has no attribute %r" %
(self.__class__.__name__, key))
def get(self, *args, **kwargs):
return self.wrapped.get(*args, **kwargs)
def __str__(self):
return str(self.wrapped)
def as_object(wrapped_map):
return MapAsObject(wrapped_map)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.