content stringlengths 7 1.05M | fixed_cases stringlengths 1 1.28M |
|---|---|
ACTIVE_ALARMS_HEADER = 'ACTIVE ALARMS'
ACTIVE_PROFILES_HEADER = 'ACTIVE PROFILES'
AGENTS_HEADER = 'AGENTS'
DASHBOARD_HEADER = 'DASHBOARD'
LAST_INACTIVE_ALARMS = 'Last 20 Inactive Alarms'
NO_ACTIVE_ALARMS_MSG = 'No active alarms at this time.'
NO_PROFILES_CONFIGURED_MSG = 'No Profiles Configured'
SETUP_PROFILE_HEADER = 'Setup A Profile'
| active_alarms_header = 'ACTIVE ALARMS'
active_profiles_header = 'ACTIVE PROFILES'
agents_header = 'AGENTS'
dashboard_header = 'DASHBOARD'
last_inactive_alarms = 'Last 20 Inactive Alarms'
no_active_alarms_msg = 'No active alarms at this time.'
no_profiles_configured_msg = 'No Profiles Configured'
setup_profile_header = 'Setup A Profile' |
print('state dummy{')
parser = open('a_chains.p4').read()
for line in open('a_hdrlist.p4'):
line = line.strip()
if line == '':
continue
handle = line.split()[1].strip(';')
if handle in parser:
continue
print('\tpkt.extract(hdr.{});'.format(handle))
print('\ttransition accept;')
print('}')
| print('state dummy{')
parser = open('a_chains.p4').read()
for line in open('a_hdrlist.p4'):
line = line.strip()
if line == '':
continue
handle = line.split()[1].strip(';')
if handle in parser:
continue
print('\tpkt.extract(hdr.{});'.format(handle))
print('\ttransition accept;')
print('}') |
#defining a dictionary data structure
example_dict = { #key : value of element
"class" : "Astr 119",
"prof" : "Brant",
"awesomeness" : 10
}
print(type(example_dict)) #says "dict"
course = example_dict["class"] #to get a value via the key above
print(course)
example_dict["awesomeness"] += 1 #to change a value in key (increases)
print(example_dict)
for x in example_dict.keys():
print(x,example_dict[x]) #prints dictionary key and element value | example_dict = {'class': 'Astr 119', 'prof': 'Brant', 'awesomeness': 10}
print(type(example_dict))
course = example_dict['class']
print(course)
example_dict['awesomeness'] += 1
print(example_dict)
for x in example_dict.keys():
print(x, example_dict[x]) |
def lucky_sum(a, b, c):
retSum = 0
for i in [a, b, c]:
if i == 13:
break
retSum += i
return retSum
| def lucky_sum(a, b, c):
ret_sum = 0
for i in [a, b, c]:
if i == 13:
break
ret_sum += i
return retSum |
class Connect4Board():
def __init__(self):
self.grid = [[' '] * 7 for i in range(6)]
self.turn = True
self.winner = ''
self.legal_moves = [i for i in range(7)]
self.num_total_moves = 7
def is_game_over(self):
for i in range(6):
for j in range(7):
if (self.grid[i][j] != ' ' and (
# Check for a row win
(j < 4 and self.grid[i][j] == self.grid[i][j+1] and
self.grid[i][j] == self.grid[i][j+2] and
self.grid[i][j] == self.grid[i][j+3]) or
# Check for a column win
(i < 3 and self.grid[i][j] == self.grid[i+1][j] and
self.grid[i][j] == self.grid[i+2][j] and
self.grid[i][j] == self.grid[i+3][j]) or
# Check for a diagonal win
(i < 3 and j < 4 and
self.grid[i][j] == self.grid[i+1][j+1] and
self.grid[i][j] == self.grid[i+2][j+2] and
self.grid[i][j] == self.grid[i+3][j+3]))):
self.winner = '0-1' if self.turn else '1-0'
return True
# Check if the board is full
if all([i != ' ' for row in self.grid for i in row]):
self.winner = '1/2-1/2'
return True
def push(self, move):
row_idx = max([i for i in range(6) if self.grid[i][move] == ' '])
self.grid[row_idx][move] = 'X' if self.turn else 'O'
if row_idx == 0:
self.legal_moves.remove(move)
self.turn = False if self.turn else True
def __str__(self):
return '\n' + '\n'.join(
[' '.join(['_' if i == ' ' else i for i in row])
for row in self.grid]) + '\n'
| class Connect4Board:
def __init__(self):
self.grid = [[' '] * 7 for i in range(6)]
self.turn = True
self.winner = ''
self.legal_moves = [i for i in range(7)]
self.num_total_moves = 7
def is_game_over(self):
for i in range(6):
for j in range(7):
if self.grid[i][j] != ' ' and (j < 4 and self.grid[i][j] == self.grid[i][j + 1] and (self.grid[i][j] == self.grid[i][j + 2]) and (self.grid[i][j] == self.grid[i][j + 3]) or (i < 3 and self.grid[i][j] == self.grid[i + 1][j] and (self.grid[i][j] == self.grid[i + 2][j]) and (self.grid[i][j] == self.grid[i + 3][j])) or (i < 3 and j < 4 and (self.grid[i][j] == self.grid[i + 1][j + 1]) and (self.grid[i][j] == self.grid[i + 2][j + 2]) and (self.grid[i][j] == self.grid[i + 3][j + 3]))):
self.winner = '0-1' if self.turn else '1-0'
return True
if all([i != ' ' for row in self.grid for i in row]):
self.winner = '1/2-1/2'
return True
def push(self, move):
row_idx = max([i for i in range(6) if self.grid[i][move] == ' '])
self.grid[row_idx][move] = 'X' if self.turn else 'O'
if row_idx == 0:
self.legal_moves.remove(move)
self.turn = False if self.turn else True
def __str__(self):
return '\n' + '\n'.join([' '.join(['_' if i == ' ' else i for i in row]) for row in self.grid]) + '\n' |
# -*- coding: UTF-8 -*-
#thinkpad-is-saikou
#Copyright (c) 2016 Atnanasi
#Released under the MIT license
#https://github.com/Atnanasi/thinkpad-is-saikou/blob/master/LICENSE
def ThinkpadIs():
return "Saikou"
if __name__=="__main__":
print("Thinkpad is",ThinkpadIs())
| def thinkpad_is():
return 'Saikou'
if __name__ == '__main__':
print('Thinkpad is', thinkpad_is()) |
'''
Created on December 12, 2020
@author: rosed2@mskcc.org
''' | """
Created on December 12, 2020
@author: rosed2@mskcc.org
""" |
# Remove Duplicates from Sorted List II
# https://www.interviewbit.com/problems/remove-duplicates-from-sorted-list-ii/
#
# Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list.
#
# For example,
# Given 1->2->3->3->4->4->5, return 1->2->5.
# Given 1->1->1->2->3, return 2->3.
#
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Definition for singly-linked list.
class ListNode:
def __init__(self, x):
self.val = x
self.next = None
class Solution:
# @param A : head node of linked list
# @return the head node in the linked list
def deleteDuplicates(self, A):
first = ListNode(0)
first.next = A
tmp = first
while tmp.next and tmp.next.next:
start = end = tmp.next
while end.next and end.next.val == start.val:
end = end.next
if start != end:
tmp.next = end.next
else:
tmp = start
return first.next
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
if __name__ == "__main__":
head = ListNode(1)
node1 = ListNode(1)
node2 = ListNode(1)
node3 = ListNode(2)
node4 = ListNode(2)
node5 = ListNode(3)
head.next = node1
node1.next = node2
node2.next = node3
node3.next = node4
node4.next = node5
s = Solution()
head = s.deleteDuplicates(head)
| class Listnode:
def __init__(self, x):
self.val = x
self.next = None
class Solution:
def delete_duplicates(self, A):
first = list_node(0)
first.next = A
tmp = first
while tmp.next and tmp.next.next:
start = end = tmp.next
while end.next and end.next.val == start.val:
end = end.next
if start != end:
tmp.next = end.next
else:
tmp = start
return first.next
if __name__ == '__main__':
head = list_node(1)
node1 = list_node(1)
node2 = list_node(1)
node3 = list_node(2)
node4 = list_node(2)
node5 = list_node(3)
head.next = node1
node1.next = node2
node2.next = node3
node3.next = node4
node4.next = node5
s = solution()
head = s.deleteDuplicates(head) |
class Category:
def __init__(self, name):
self.name = name
self.ledger= list()
def deposit(self, amount, description= ""):
to_add= {}
to_add["amount"] = amount
to_add["description"] = description
self.ledger.append(to_add)
def withdraw (self, amount, description= ""):
apporved = self.check_funds(amount)
if apporved == True:
to_add= {}
to_add["amount"] = amount* -1
to_add["description"] = description
self.ledger.append(to_add)
return True
else:
return False
def get_balance(self):
self.current_balance = 0
for each in self.ledger:
dic = each
self.current_balance += dic["amount"]
return self.current_balance
def transfer(self, amount, where_to):
to_account= where_to.name
self.apporved = self.check_funds(amount)
if self.apporved == True:
description_to= "Transfer to {}".format(to_account)
self.withdraw(amount, description_to)
description_from= "Transfer from {}".format(self.name)
where_to.deposit(amount, description_from)
return True
else:
return False
def check_funds(self, amount):
self.funds = self.get_balance()
if self.funds < amount:
return False #Approved
else:
return True #NOT Approved
def __str__(self):
self.title = self.name.center(30, '*')
self.one_lista = list()
self.one_lista.append(self.title)
for each in self.ledger: #Printing:
dic = each
descriptions = "{:<23}".format(dic['description'])
amounts = "{:>7.2f}".format(dic['amount'])
self.one_lista.append("{:<.23}{:>.7}".format(descriptions, amounts))
self.total = "Total: "+ str(self.get_balance())
self.one_lista.append(self.total)
return "\n".join(self.one_lista)
def create_spend_chart(categories):
l_catergoties= categories
grafic = ["100|", " 90|"," 80|"," 70|"," 60|"," 50|"," 40|"," 30|"," 20|"," 10|", " 0|"]
for ctgy in l_catergoties:
total_cash = ctgy.get_balance()
for each in ctgy.ledger:
spent = 0
if each.get("amount") < 0:
if not "Transfer to" in each.get("description"):
spent += each.get("amount")
total_cash += abs(each.get("amount"))
else:
total_cash += abs(each.get("amount"))
else:
spent = spent
porcento= round((abs(spent)*100/total_cash)/10)
for no_o in range(0, 10-porcento):
grafic[no_o] += " "
for o in range(10-porcento, 10+1):
grafic[o] += " o "
width = len(grafic[0])-4
grafic.append(' '+('-'*width))
print('\n'.join(grafic))
| class Category:
def __init__(self, name):
self.name = name
self.ledger = list()
def deposit(self, amount, description=''):
to_add = {}
to_add['amount'] = amount
to_add['description'] = description
self.ledger.append(to_add)
def withdraw(self, amount, description=''):
apporved = self.check_funds(amount)
if apporved == True:
to_add = {}
to_add['amount'] = amount * -1
to_add['description'] = description
self.ledger.append(to_add)
return True
else:
return False
def get_balance(self):
self.current_balance = 0
for each in self.ledger:
dic = each
self.current_balance += dic['amount']
return self.current_balance
def transfer(self, amount, where_to):
to_account = where_to.name
self.apporved = self.check_funds(amount)
if self.apporved == True:
description_to = 'Transfer to {}'.format(to_account)
self.withdraw(amount, description_to)
description_from = 'Transfer from {}'.format(self.name)
where_to.deposit(amount, description_from)
return True
else:
return False
def check_funds(self, amount):
self.funds = self.get_balance()
if self.funds < amount:
return False
else:
return True
def __str__(self):
self.title = self.name.center(30, '*')
self.one_lista = list()
self.one_lista.append(self.title)
for each in self.ledger:
dic = each
descriptions = '{:<23}'.format(dic['description'])
amounts = '{:>7.2f}'.format(dic['amount'])
self.one_lista.append('{:<.23}{:>.7}'.format(descriptions, amounts))
self.total = 'Total: ' + str(self.get_balance())
self.one_lista.append(self.total)
return '\n'.join(self.one_lista)
def create_spend_chart(categories):
l_catergoties = categories
grafic = ['100|', ' 90|', ' 80|', ' 70|', ' 60|', ' 50|', ' 40|', ' 30|', ' 20|', ' 10|', ' 0|']
for ctgy in l_catergoties:
total_cash = ctgy.get_balance()
for each in ctgy.ledger:
spent = 0
if each.get('amount') < 0:
if not 'Transfer to' in each.get('description'):
spent += each.get('amount')
total_cash += abs(each.get('amount'))
else:
total_cash += abs(each.get('amount'))
else:
spent = spent
porcento = round(abs(spent) * 100 / total_cash / 10)
for no_o in range(0, 10 - porcento):
grafic[no_o] += ' '
for o in range(10 - porcento, 10 + 1):
grafic[o] += ' o '
width = len(grafic[0]) - 4
grafic.append(' ' + '-' * width)
print('\n'.join(grafic)) |
#The function mySum is supposed to return the sum of a list of numbers (and 0 if that list is empty), but it has one or more errors in it.
#Use this space to write test cases to determine what errors there are. You will be using this information to answer the next set of multiple choice questions.
assert mySum(0)
mlist=[1]
assert mySum(mlist) == 1
mlist=[1, 2]
assert mySum(mlist) == 3
#answer: A. an empty list, C. a list with more than one item
#test-4-2: Are there any other cases, that we can determine based on the current structure of the function, that also fail for the mySum function?
#B. No
#The class Student is supposed to accept two arguments in its constructor:
# A name string
# An optional integer representing the number of years the student has been at Michigan (default:1)
#Every student has three instance variables:
# self.name (set to the name provided)
# self.years_UM (set to the number of years the student has been at Michigan)
# self.knowledge (initialized to 0)
#There are three methods:
# .study() should increase self.knowledge by 1 and return None
# .getKnowledge() should return the value of self.knowledge
# .year_at_umich() should return the value of self.years_UM
#There are one or more errors in the class. Use this space to write test cases to determine what errors there are. You will be using this information to answer the next set of multiple choice questions.
#a1 = Student("Mauricio")
#print("Name: {}".format(a1.name))
#print("years_UM: {}".format(a1.years_UM))
#print("knowledge: {}".format(a1.knowledge))
#
#print(a1.study())
#print("knowledge: {}".format(a1.knowledge))
#print("getKnowledge: {}".format(a1.getKnowledge()))git
#print("year_at_umich: {}".format(a1.year_at_umich()))
#ANSWERS: C. the attributes/instance variables are not correctly assigned in the constructor D. the method study does not increase self.knowledge
#test-4-4: Are there any other cases, that we can determine based on the current structure of the class, that also fail for the Student class?
#A. Yes
# Correct! There is an issue with the getKnowledge method because it returns None when self.knowledge is 0, even though it returns the correct value when self.knowledge is non-zero. | assert my_sum(0)
mlist = [1]
assert my_sum(mlist) == 1
mlist = [1, 2]
assert my_sum(mlist) == 3 |
def calculate_score(word):
VOWELS = ['A', 'E', 'I', 'O', 'U']
vowels = consonants = 0
for ix, letter in enumerate(reversed(word)):
if letter in VOWELS:
vowels += ix + 1
else:
consonants += ix + 1
return vowels, consonants
def minion_game(word):
kevin, stuart = calculate_score(word)
if kevin < stuart:
print("Stuart %d" % stuart)
elif kevin > stuart:
print("Kevin %d" % kevin)
else:
print("Draw")
if __name__ == '__main__':
s = input()
minion_game(s)
| def calculate_score(word):
vowels = ['A', 'E', 'I', 'O', 'U']
vowels = consonants = 0
for (ix, letter) in enumerate(reversed(word)):
if letter in VOWELS:
vowels += ix + 1
else:
consonants += ix + 1
return (vowels, consonants)
def minion_game(word):
(kevin, stuart) = calculate_score(word)
if kevin < stuart:
print('Stuart %d' % stuart)
elif kevin > stuart:
print('Kevin %d' % kevin)
else:
print('Draw')
if __name__ == '__main__':
s = input()
minion_game(s) |
s = input().split()
d = {}
for i in s:
if i not in d:
d[i] = 0
d[i] += 1
for k, v in d.items():
print(k, v)
| s = input().split()
d = {}
for i in s:
if i not in d:
d[i] = 0
d[i] += 1
for (k, v) in d.items():
print(k, v) |
AES_128_ECB_test_vectors = (
{"key": "911500915E8514174402A13118EA362C",
"plain": "4163F3BEABA14D6C1E406BD5646CAC9A",
"cipher": "39610A1E8F66501D952C27AB52C4DC9A"},
{"key": "BCCF986A4D74B719EEB1D93CDABE96D5",
"plain": "A6325414DDE2E367AABA669766316976",
"cipher": "666C5668ECAAD6E66C7FB569E52AA928"},
{"key": "5AC9583DCAC4CB19A451820A909FAFEC",
"plain": "8C45132DFC87959BF89396844FA1A2F2",
"cipher": "0965016DBE90009C75B4D31C460AC94C"},
{"key": "3880E49151EE2E0BDCBA8C73E0FC84A0",
"plain": "FB7F2920028338CDD37CB0A440E6E337",
"cipher": "B1873D3B12FE1F83F7D7B03104D5F878"},
{"key": "7EC254E4A483777D23A5086858133D15",
"plain": "AD03D4516D30F30C15E5591E0ED6D324",
"cipher": "ED1DCBC75D76E2BD35666BC56939ADDD"}
)
| aes_128_ecb_test_vectors = ({'key': '911500915E8514174402A13118EA362C', 'plain': '4163F3BEABA14D6C1E406BD5646CAC9A', 'cipher': '39610A1E8F66501D952C27AB52C4DC9A'}, {'key': 'BCCF986A4D74B719EEB1D93CDABE96D5', 'plain': 'A6325414DDE2E367AABA669766316976', 'cipher': '666C5668ECAAD6E66C7FB569E52AA928'}, {'key': '5AC9583DCAC4CB19A451820A909FAFEC', 'plain': '8C45132DFC87959BF89396844FA1A2F2', 'cipher': '0965016DBE90009C75B4D31C460AC94C'}, {'key': '3880E49151EE2E0BDCBA8C73E0FC84A0', 'plain': 'FB7F2920028338CDD37CB0A440E6E337', 'cipher': 'B1873D3B12FE1F83F7D7B03104D5F878'}, {'key': '7EC254E4A483777D23A5086858133D15', 'plain': 'AD03D4516D30F30C15E5591E0ED6D324', 'cipher': 'ED1DCBC75D76E2BD35666BC56939ADDD'}) |
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
''' Very simple spatial image class
The image class maintains the association between a 3D (or greater)
array, and an affine transform that maps voxel coordinates to some real
world space. It also has a ``header`` - some standard set of meta-data
that is specific to the image format - and ``extra`` - a dictionary
container for any other metadata.
It has attributes::
extra
filename (read only)
and methods::
.get_data()
.get_affine()
.get_header()
.to_files() # writes image out to passed or
.get_raw_data()
.write_data(fileobj)
.write_raw_data(fileobj)
There are several ways of writing data.
=======================================
There is the usual way, which is the default::
img.write_data(data, fileobj)
and that is, to take the data array, ``data``, and cast it to the
datatype the header expects, setting any available header scaling
into the header to help the data match.
You can get the data out again with of::
img.get_data(fileobj)
Less commonly, you might want to fetch out the unscaled array via
the header::
unscaled_data = img.get_raw_data(fileobj)
then do something with it. Then put it back again::
img.write_raw_data(modifed_unscaled_data, fileobj)
Sometimes you might to avoid any loss of precision by making the
data type the same as the input::
hdr = img.get_header()
hdr.set_data_dtype(data.dtype)
img.write_data(data, fileobj)
'''
class SpatialImage(object):
_header_maker = dict
''' Template class for lightweight image '''
def __init__(self, data, affine, header=None, extra=None):
if extra is None:
extra = {}
self._data = data
self._affine = affine
self.extra = extra
self._set_header(header)
self._files = {}
def __str__(self):
shape = self.get_shape()
affine = self.get_affine()
return '\n'.join((
str(self.__class__),
'data shape %s' % (shape,),
'affine: ',
'%s' % affine,
'metadata:',
'%s' % self._header))
def get_data(self):
return self._data
def get_shape(self):
if self._data:
return self._data.shape
def get_data_dtype(self):
raise NotImplementedError
def set_data_dtype(self, dtype):
raise NotImplementedError
def get_affine(self):
return self._affine
def get_header(self):
return self._header
def _set_header(self, header=None):
if header is None:
self._header = self._header_maker()
return
# we need to replicate the endianness, for the case where we are
# creating an image from files, and we have not yet loaded the
# data. In that case we need to have the header maintain its
# endianness to get the correct interpretation of the data
self._header = self._header_maker(endianness=header.endianness)
for key, value in header.items():
if key in self._header:
self._header[key] = value
elif key not in self.extra:
self.extra[key] = value
@classmethod
def from_filespec(klass, filespec):
raise NotImplementedError
def from_files(klass, files):
raise NotImplementedError
def from_image(klass, img):
raise NotImplementedError
@staticmethod
def filespec_to_files(filespec):
raise NotImplementedError
def to_filespec(self, filespec):
raise NotImplementedError
def to_files(self, files=None):
raise NotImplementedError
| """ Very simple spatial image class
The image class maintains the association between a 3D (or greater)
array, and an affine transform that maps voxel coordinates to some real
world space. It also has a ``header`` - some standard set of meta-data
that is specific to the image format - and ``extra`` - a dictionary
container for any other metadata.
It has attributes::
extra
filename (read only)
and methods::
.get_data()
.get_affine()
.get_header()
.to_files() # writes image out to passed or
.get_raw_data()
.write_data(fileobj)
.write_raw_data(fileobj)
There are several ways of writing data.
=======================================
There is the usual way, which is the default::
img.write_data(data, fileobj)
and that is, to take the data array, ``data``, and cast it to the
datatype the header expects, setting any available header scaling
into the header to help the data match.
You can get the data out again with of::
img.get_data(fileobj)
Less commonly, you might want to fetch out the unscaled array via
the header::
unscaled_data = img.get_raw_data(fileobj)
then do something with it. Then put it back again::
img.write_raw_data(modifed_unscaled_data, fileobj)
Sometimes you might to avoid any loss of precision by making the
data type the same as the input::
hdr = img.get_header()
hdr.set_data_dtype(data.dtype)
img.write_data(data, fileobj)
"""
class Spatialimage(object):
_header_maker = dict
' Template class for lightweight image '
def __init__(self, data, affine, header=None, extra=None):
if extra is None:
extra = {}
self._data = data
self._affine = affine
self.extra = extra
self._set_header(header)
self._files = {}
def __str__(self):
shape = self.get_shape()
affine = self.get_affine()
return '\n'.join((str(self.__class__), 'data shape %s' % (shape,), 'affine: ', '%s' % affine, 'metadata:', '%s' % self._header))
def get_data(self):
return self._data
def get_shape(self):
if self._data:
return self._data.shape
def get_data_dtype(self):
raise NotImplementedError
def set_data_dtype(self, dtype):
raise NotImplementedError
def get_affine(self):
return self._affine
def get_header(self):
return self._header
def _set_header(self, header=None):
if header is None:
self._header = self._header_maker()
return
self._header = self._header_maker(endianness=header.endianness)
for (key, value) in header.items():
if key in self._header:
self._header[key] = value
elif key not in self.extra:
self.extra[key] = value
@classmethod
def from_filespec(klass, filespec):
raise NotImplementedError
def from_files(klass, files):
raise NotImplementedError
def from_image(klass, img):
raise NotImplementedError
@staticmethod
def filespec_to_files(filespec):
raise NotImplementedError
def to_filespec(self, filespec):
raise NotImplementedError
def to_files(self, files=None):
raise NotImplementedError |
# Update this text to match your story.
start = '''
You wake up one morning and find that you aren't in your bed; you aren't even in your room.
You're in the middle of a giant maze.
A sign is hanging from the ivy: "You have one hour. Don't touch the walls."
There is a hallway to your right and to your left.
'''
print(start)
print("Type 'left' to go left or 'right' to go right.") # Update to match your story.
user_input = input()
if user_input == "left":
print("You decide to go left and...") # Update to match your story.
# Continue code to finish story.
elif user_input == "right":
print("You choose to go right and ...") # Update to match your story.
# Continue code to finish story.
| start = '\nYou wake up one morning and find that you aren\'t in your bed; you aren\'t even in your room.\nYou\'re in the middle of a giant maze.\nA sign is hanging from the ivy: "You have one hour. Don\'t touch the walls."\nThere is a hallway to your right and to your left.\n'
print(start)
print("Type 'left' to go left or 'right' to go right.")
user_input = input()
if user_input == 'left':
print('You decide to go left and...')
elif user_input == 'right':
print('You choose to go right and ...') |
sol_space = {}
def foo(n, d):
'''Recursive function to find number of valid expression with given length and depth'''
global sol_space
if n ==0 and d == 0:
return 1
# invalid cases
if n < 2*d:
return 0
if n % 2 == 1:
return 0
if n == 0 or d == 0:
return 0
# Base cases
if n == 2*d :
return 1
if d == 1:
return 1
# Recursive cases
# Check the solution space first
if (n, d) in sol_space:
return sol_space[(n, d)]
sol = 0
# (d-1) case
sol += foo(n-2, d-1)
# U*V case : d.d, 2 d.d-1, ..., 2 d.1
for i in range(2, n, 2): # i = left block size from [2 to n-2]
for j in range(0, d): #
sol += foo(i, d)*foo(n-i, j)
#sol += foo(i-2, d-1)*foo(n-i-2, d-1)
# if (n, d) == (8, 2):
# print(" - ", (i, d), "*", (n-i, d))
#sol += 2*foo(i-2, d-1)*foo(n-i-2, d-1)
# Update the solution space
sol_space[(n, d)] = sol
return sol
while True:
try:
n, d = list(map(int, input().split()))
print(foo(n, d) if n % 2 == 0 else 0)
except EOFError:
break
| sol_space = {}
def foo(n, d):
"""Recursive function to find number of valid expression with given length and depth"""
global sol_space
if n == 0 and d == 0:
return 1
if n < 2 * d:
return 0
if n % 2 == 1:
return 0
if n == 0 or d == 0:
return 0
if n == 2 * d:
return 1
if d == 1:
return 1
if (n, d) in sol_space:
return sol_space[n, d]
sol = 0
sol += foo(n - 2, d - 1)
for i in range(2, n, 2):
for j in range(0, d):
sol += foo(i, d) * foo(n - i, j)
sol_space[n, d] = sol
return sol
while True:
try:
(n, d) = list(map(int, input().split()))
print(foo(n, d) if n % 2 == 0 else 0)
except EOFError:
break |
# See: https://www.codewars.com/kata/56a5d994ac971f1ac500003e
def longest_consec(s, k):
return max([''.join(i) for i in zip(*[s[i:] for i in range(k)])]+[''], key=len)
| def longest_consec(s, k):
return max([''.join(i) for i in zip(*[s[i:] for i in range(k)])] + [''], key=len) |
__version__ = "0.6.0"
__title__ = "pygbif"
__author__ = "Scott Chamberlain"
__license__ = "MIT"
| __version__ = '0.6.0'
__title__ = 'pygbif'
__author__ = 'Scott Chamberlain'
__license__ = 'MIT' |
print('Start')
done_flag = False
total = 0
while not done_flag:
num = int(input('Please input an integer: '))
if num > 0:
total = total + num
else:
done_flag = True
print('Total: ', total)
print('Stop')
| print('Start')
done_flag = False
total = 0
while not done_flag:
num = int(input('Please input an integer: '))
if num > 0:
total = total + num
else:
done_flag = True
print('Total: ', total)
print('Stop') |
'''
Given two strings, print the longest common subsequence
x = "abcdgh"
y = "aebdghr"
LCS = 5 ie. "abdgh"
'''
def print_lcs(x, y, n, m):
dp = [[0 for _ in range(m+1)] for _ in range(n+1)]
for i in range(1, n+1):
for j in range(1, m+1):
if x[i-1] == y[j-1]:
dp[i][j] = 1 + dp[i-1][j-1]
else:
dp[i][j] = max(dp[i][j-1], dp[i-1][j])
lcs = ""
while n != 0 and m != 0:
if x[n-1] == y[m-1]:
lcs = x[n-1] + lcs
n -= 1
m -= 1
else:
if dp[n-1][m] > dp[n][m-1]:
n -= 1
else:
m -= 1
return lcs
if __name__ == "__main__":
x, y = "abcdgh", "aebdghr"
n, m = len(x), len(y)
cache = [[-1 for _ in range(m+1)] for _ in range(n+1)]
print(print_lcs(x, y, n, m)) | """
Given two strings, print the longest common subsequence
x = "abcdgh"
y = "aebdghr"
LCS = 5 ie. "abdgh"
"""
def print_lcs(x, y, n, m):
dp = [[0 for _ in range(m + 1)] for _ in range(n + 1)]
for i in range(1, n + 1):
for j in range(1, m + 1):
if x[i - 1] == y[j - 1]:
dp[i][j] = 1 + dp[i - 1][j - 1]
else:
dp[i][j] = max(dp[i][j - 1], dp[i - 1][j])
lcs = ''
while n != 0 and m != 0:
if x[n - 1] == y[m - 1]:
lcs = x[n - 1] + lcs
n -= 1
m -= 1
elif dp[n - 1][m] > dp[n][m - 1]:
n -= 1
else:
m -= 1
return lcs
if __name__ == '__main__':
(x, y) = ('abcdgh', 'aebdghr')
(n, m) = (len(x), len(y))
cache = [[-1 for _ in range(m + 1)] for _ in range(n + 1)]
print(print_lcs(x, y, n, m)) |
# optimizer
optimizer = dict(type='AdamW', lr=1e-3, betas=(0.9, 0.999), weight_decay=0.05)
# learning policy
lr_config = dict(
policy='CosineAnnealing',
min_lr=0.,
warmup='linear',
warmup_iters=5,
warmup_ratio=1e-4, # cannot be 0
warmup_by_epoch=True)
# runtime settings
runner = dict(type='EpochBasedRunner', max_epochs=100)
| optimizer = dict(type='AdamW', lr=0.001, betas=(0.9, 0.999), weight_decay=0.05)
lr_config = dict(policy='CosineAnnealing', min_lr=0.0, warmup='linear', warmup_iters=5, warmup_ratio=0.0001, warmup_by_epoch=True)
runner = dict(type='EpochBasedRunner', max_epochs=100) |
#
# PySNMP MIB module SA-CM-MTA-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/SA-CM-MTA-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 20:51:39 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, SingleValueConstraint, ValueRangeConstraint, ValueSizeConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "SingleValueConstraint", "ValueRangeConstraint", "ValueSizeConstraint", "ConstraintsIntersection")
SnmpAdminString, = mibBuilder.importSymbols("SNMP-FRAMEWORK-MIB", "SnmpAdminString")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
NotificationType, Unsigned32, enterprises, IpAddress, MibIdentifier, iso, ObjectIdentity, TimeTicks, MibScalar, MibTable, MibTableRow, MibTableColumn, Gauge32, ModuleIdentity, Integer32, Counter32, Bits, Counter64 = mibBuilder.importSymbols("SNMPv2-SMI", "NotificationType", "Unsigned32", "enterprises", "IpAddress", "MibIdentifier", "iso", "ObjectIdentity", "TimeTicks", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Gauge32", "ModuleIdentity", "Integer32", "Counter32", "Bits", "Counter64")
TextualConvention, TruthValue, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "TruthValue", "DisplayString")
sa = MibIdentifier((1, 3, 6, 1, 4, 1, 1429))
saVoip = MibIdentifier((1, 3, 6, 1, 4, 1, 1429, 78))
saCmMta = ModuleIdentity((1, 3, 6, 1, 4, 1, 1429, 78, 1))
saCmMta.setRevisions(('2016-12-23 00:00',))
if mibBuilder.loadTexts: saCmMta.setLastUpdated('201612230000Z')
if mibBuilder.loadTexts: saCmMta.setOrganization('Cisco Systems, Inc.')
saCmMtaDevice = MibScalar((1, 3, 6, 1, 4, 1, 1429, 78, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disable", 0), ("enable", 1)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: saCmMtaDevice.setStatus('current')
saCmMtaIpFilters = MibScalar((1, 3, 6, 1, 4, 1, 1429, 78, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("perSpec", 0), ("openMta", 1)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: saCmMtaIpFilters.setStatus('current')
saCmMtaSidCount = MibScalar((1, 3, 6, 1, 4, 1, 1429, 78, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(4, 4), ValueRangeConstraint(16, 16), ))).setMaxAccess("readonly")
if mibBuilder.loadTexts: saCmMtaSidCount.setStatus('current')
saCmMtaProvisioningMode = MibScalar((1, 3, 6, 1, 4, 1, 1429, 78, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("packetCable", 0), ("oneConfigFile", 1), ("twoConfigFilesDHCP", 2), ("twoConfigFilesSNMP", 3), ("twoConfigFilesDHCPmacAddress", 4), ("twoConfigFilesMacAddressOnly", 5), ("webPage", 6)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: saCmMtaProvisioningMode.setStatus('current')
saCmMtaDhcpPktcOption = MibScalar((1, 3, 6, 1, 4, 1, 1429, 78, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("require122", 0), ("requireNone", 1), ("require177", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: saCmMtaDhcpPktcOption.setStatus('current')
saCmMtaRequireTod = MibScalar((1, 3, 6, 1, 4, 1, 1429, 78, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("false", 0), ("true", 1))).clone(1)).setMaxAccess("readonly")
if mibBuilder.loadTexts: saCmMtaRequireTod.setStatus('current')
saCmMtaDecryptMtaConfigFile = MibScalar((1, 3, 6, 1, 4, 1, 1429, 78, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("disable", 1), ("RSA-CM-cert", 2))).clone(1)).setMaxAccess("readonly")
if mibBuilder.loadTexts: saCmMtaDecryptMtaConfigFile.setStatus('current')
saCmMtaSwUpgradeControlTimer = MibScalar((1, 3, 6, 1, 4, 1, 1429, 78, 1, 14), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 7200))).setUnits('seconds').setMaxAccess("readwrite")
if mibBuilder.loadTexts: saCmMtaSwUpgradeControlTimer.setStatus('current')
saCmMtaDhcpOptionSixty = MibScalar((1, 3, 6, 1, 4, 1, 1429, 78, 1, 20), SnmpAdminString().clone('pktc1.0')).setMaxAccess("readonly")
if mibBuilder.loadTexts: saCmMtaDhcpOptionSixty.setStatus('current')
saCmMtaProvSnmpSetCommunityString = MibScalar((1, 3, 6, 1, 4, 1, 1429, 78, 1, 26), SnmpAdminString().clone('public')).setMaxAccess("readonly")
if mibBuilder.loadTexts: saCmMtaProvSnmpSetCommunityString.setStatus('current')
saCmMtaCliAccess = MibIdentifier((1, 3, 6, 1, 4, 1, 1429, 78, 1, 1001))
saCmMtaCliAccessPasswordType = MibScalar((1, 3, 6, 1, 4, 1, 1429, 78, 1, 1001, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("plain", 0), ("md5", 1), ("pod", 2))))
if mibBuilder.loadTexts: saCmMtaCliAccessPasswordType.setStatus('current')
mibBuilder.exportSymbols("SA-CM-MTA-MIB", PYSNMP_MODULE_ID=saCmMta, saCmMtaDhcpOptionSixty=saCmMtaDhcpOptionSixty, saCmMtaSwUpgradeControlTimer=saCmMtaSwUpgradeControlTimer, saCmMtaCliAccess=saCmMtaCliAccess, saCmMtaIpFilters=saCmMtaIpFilters, sa=sa, saVoip=saVoip, saCmMtaDevice=saCmMtaDevice, saCmMtaProvisioningMode=saCmMtaProvisioningMode, saCmMtaDecryptMtaConfigFile=saCmMtaDecryptMtaConfigFile, saCmMta=saCmMta, saCmMtaCliAccessPasswordType=saCmMtaCliAccessPasswordType, saCmMtaProvSnmpSetCommunityString=saCmMtaProvSnmpSetCommunityString, saCmMtaRequireTod=saCmMtaRequireTod, saCmMtaSidCount=saCmMtaSidCount, saCmMtaDhcpPktcOption=saCmMtaDhcpPktcOption)
| (octet_string, object_identifier, integer) = mibBuilder.importSymbols('ASN1', 'OctetString', 'ObjectIdentifier', 'Integer')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(constraints_union, single_value_constraint, value_range_constraint, value_size_constraint, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsUnion', 'SingleValueConstraint', 'ValueRangeConstraint', 'ValueSizeConstraint', 'ConstraintsIntersection')
(snmp_admin_string,) = mibBuilder.importSymbols('SNMP-FRAMEWORK-MIB', 'SnmpAdminString')
(module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup')
(notification_type, unsigned32, enterprises, ip_address, mib_identifier, iso, object_identity, time_ticks, mib_scalar, mib_table, mib_table_row, mib_table_column, gauge32, module_identity, integer32, counter32, bits, counter64) = mibBuilder.importSymbols('SNMPv2-SMI', 'NotificationType', 'Unsigned32', 'enterprises', 'IpAddress', 'MibIdentifier', 'iso', 'ObjectIdentity', 'TimeTicks', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Gauge32', 'ModuleIdentity', 'Integer32', 'Counter32', 'Bits', 'Counter64')
(textual_convention, truth_value, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'TruthValue', 'DisplayString')
sa = mib_identifier((1, 3, 6, 1, 4, 1, 1429))
sa_voip = mib_identifier((1, 3, 6, 1, 4, 1, 1429, 78))
sa_cm_mta = module_identity((1, 3, 6, 1, 4, 1, 1429, 78, 1))
saCmMta.setRevisions(('2016-12-23 00:00',))
if mibBuilder.loadTexts:
saCmMta.setLastUpdated('201612230000Z')
if mibBuilder.loadTexts:
saCmMta.setOrganization('Cisco Systems, Inc.')
sa_cm_mta_device = mib_scalar((1, 3, 6, 1, 4, 1, 1429, 78, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('disable', 0), ('enable', 1)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
saCmMtaDevice.setStatus('current')
sa_cm_mta_ip_filters = mib_scalar((1, 3, 6, 1, 4, 1, 1429, 78, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('perSpec', 0), ('openMta', 1)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
saCmMtaIpFilters.setStatus('current')
sa_cm_mta_sid_count = mib_scalar((1, 3, 6, 1, 4, 1, 1429, 78, 1, 5), integer32().subtype(subtypeSpec=constraints_union(value_range_constraint(4, 4), value_range_constraint(16, 16)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
saCmMtaSidCount.setStatus('current')
sa_cm_mta_provisioning_mode = mib_scalar((1, 3, 6, 1, 4, 1, 1429, 78, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6))).clone(namedValues=named_values(('packetCable', 0), ('oneConfigFile', 1), ('twoConfigFilesDHCP', 2), ('twoConfigFilesSNMP', 3), ('twoConfigFilesDHCPmacAddress', 4), ('twoConfigFilesMacAddressOnly', 5), ('webPage', 6)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
saCmMtaProvisioningMode.setStatus('current')
sa_cm_mta_dhcp_pktc_option = mib_scalar((1, 3, 6, 1, 4, 1, 1429, 78, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('require122', 0), ('requireNone', 1), ('require177', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
saCmMtaDhcpPktcOption.setStatus('current')
sa_cm_mta_require_tod = mib_scalar((1, 3, 6, 1, 4, 1, 1429, 78, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('false', 0), ('true', 1))).clone(1)).setMaxAccess('readonly')
if mibBuilder.loadTexts:
saCmMtaRequireTod.setStatus('current')
sa_cm_mta_decrypt_mta_config_file = mib_scalar((1, 3, 6, 1, 4, 1, 1429, 78, 1, 13), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('disable', 1), ('RSA-CM-cert', 2))).clone(1)).setMaxAccess('readonly')
if mibBuilder.loadTexts:
saCmMtaDecryptMtaConfigFile.setStatus('current')
sa_cm_mta_sw_upgrade_control_timer = mib_scalar((1, 3, 6, 1, 4, 1, 1429, 78, 1, 14), integer32().subtype(subtypeSpec=value_range_constraint(0, 7200))).setUnits('seconds').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
saCmMtaSwUpgradeControlTimer.setStatus('current')
sa_cm_mta_dhcp_option_sixty = mib_scalar((1, 3, 6, 1, 4, 1, 1429, 78, 1, 20), snmp_admin_string().clone('pktc1.0')).setMaxAccess('readonly')
if mibBuilder.loadTexts:
saCmMtaDhcpOptionSixty.setStatus('current')
sa_cm_mta_prov_snmp_set_community_string = mib_scalar((1, 3, 6, 1, 4, 1, 1429, 78, 1, 26), snmp_admin_string().clone('public')).setMaxAccess('readonly')
if mibBuilder.loadTexts:
saCmMtaProvSnmpSetCommunityString.setStatus('current')
sa_cm_mta_cli_access = mib_identifier((1, 3, 6, 1, 4, 1, 1429, 78, 1, 1001))
sa_cm_mta_cli_access_password_type = mib_scalar((1, 3, 6, 1, 4, 1, 1429, 78, 1, 1001, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('plain', 0), ('md5', 1), ('pod', 2))))
if mibBuilder.loadTexts:
saCmMtaCliAccessPasswordType.setStatus('current')
mibBuilder.exportSymbols('SA-CM-MTA-MIB', PYSNMP_MODULE_ID=saCmMta, saCmMtaDhcpOptionSixty=saCmMtaDhcpOptionSixty, saCmMtaSwUpgradeControlTimer=saCmMtaSwUpgradeControlTimer, saCmMtaCliAccess=saCmMtaCliAccess, saCmMtaIpFilters=saCmMtaIpFilters, sa=sa, saVoip=saVoip, saCmMtaDevice=saCmMtaDevice, saCmMtaProvisioningMode=saCmMtaProvisioningMode, saCmMtaDecryptMtaConfigFile=saCmMtaDecryptMtaConfigFile, saCmMta=saCmMta, saCmMtaCliAccessPasswordType=saCmMtaCliAccessPasswordType, saCmMtaProvSnmpSetCommunityString=saCmMtaProvSnmpSetCommunityString, saCmMtaRequireTod=saCmMtaRequireTod, saCmMtaSidCount=saCmMtaSidCount, saCmMtaDhcpPktcOption=saCmMtaDhcpPktcOption) |
t = int(input())
while t:
t -= 1
c, d = map(int, input().split())
if (26**c) * (10**d) == 1:
print(0)
else:
print((26**c) * (10**d)) | t = int(input())
while t:
t -= 1
(c, d) = map(int, input().split())
if 26 ** c * 10 ** d == 1:
print(0)
else:
print(26 ** c * 10 ** d) |
def make_shirt(size='large', words='I love the world'):
print("The T-shirt is " + size + " and the words '" + words + "' are on it.")
make_shirt()
make_shirt('middle')
make_shirt(words='I love you')
| def make_shirt(size='large', words='I love the world'):
print('The T-shirt is ' + size + " and the words '" + words + "' are on it.")
make_shirt()
make_shirt('middle')
make_shirt(words='I love you') |
class info:
def __init__(self, L, AE, r):
self.L = L
self.AE = AE
self.r = r
| class Info:
def __init__(self, L, AE, r):
self.L = L
self.AE = AE
self.r = r |
class Node:
def __init__(self, data):
self.data = data
self.next = None
class LinkedList:
def __init__(self):
self.head = None
self.last_node = None
def append(self, data):
if self.last_node is None:
self.head = Node(data)
self.last_node = self.head
else:
self.last_node.next = Node(data)
self.last_node = self.last_node.next
def get_node(self, index):
current = self.head
for i in range(index):
current = current.next
if current is None:
return None
return current
def has_cycle(llist):
slow = llist.head
fast = llist.head
while (fast != None and fast.next != None):
slow = slow.next
fast = fast.next.next
if slow == fast:
return True
return False
a_llist = LinkedList()
data_list = input('Please enter the elements in the linked list: ').split()
for data in data_list:
a_llist.append(int(data))
length = len(data_list)
if length != 0:
values = '0-' + str(length - 1)
last_ptr = input('Enter the index [' + values + '] of the node'
' to which you want the last node to point'
' (enter nothing to make it point to None): ').strip()
if last_ptr == '':
last_ptr = None
else:
last_ptr = a_llist.get_node(int(last_ptr))
a_llist.last_node.next = last_ptr
if has_cycle(a_llist):
print('The linked list has a cycle.')
else:
print('The linked list does not have a cycle.')
| class Node:
def __init__(self, data):
self.data = data
self.next = None
class Linkedlist:
def __init__(self):
self.head = None
self.last_node = None
def append(self, data):
if self.last_node is None:
self.head = node(data)
self.last_node = self.head
else:
self.last_node.next = node(data)
self.last_node = self.last_node.next
def get_node(self, index):
current = self.head
for i in range(index):
current = current.next
if current is None:
return None
return current
def has_cycle(llist):
slow = llist.head
fast = llist.head
while fast != None and fast.next != None:
slow = slow.next
fast = fast.next.next
if slow == fast:
return True
return False
a_llist = linked_list()
data_list = input('Please enter the elements in the linked list: ').split()
for data in data_list:
a_llist.append(int(data))
length = len(data_list)
if length != 0:
values = '0-' + str(length - 1)
last_ptr = input('Enter the index [' + values + '] of the node to which you want the last node to point (enter nothing to make it point to None): ').strip()
if last_ptr == '':
last_ptr = None
else:
last_ptr = a_llist.get_node(int(last_ptr))
a_llist.last_node.next = last_ptr
if has_cycle(a_llist):
print('The linked list has a cycle.')
else:
print('The linked list does not have a cycle.') |
def main(request, response):
try:
code = int(request.GET.first("code", None))
except:
code = None
if request.method == "OPTIONS":
if code:
response.status = code
response.headers.set("Access-Control-Max-Age", 1)
response.headers.set("Access-Control-Allow-Headers", "x-pass")
else:
response.status = 200
response.headers.set("Cache-Control", "no-store")
response.headers.set("Access-Control-Allow-Origin", request.headers.get("origin"))
| def main(request, response):
try:
code = int(request.GET.first('code', None))
except:
code = None
if request.method == 'OPTIONS':
if code:
response.status = code
response.headers.set('Access-Control-Max-Age', 1)
response.headers.set('Access-Control-Allow-Headers', 'x-pass')
else:
response.status = 200
response.headers.set('Cache-Control', 'no-store')
response.headers.set('Access-Control-Allow-Origin', request.headers.get('origin')) |
# ordem de precedencia
# 1 == ()
# 2 == **
# 3 == * , / , // , %
# 4 == + , -
n1 = int(input('Digite um numero: '))
n2 = int(input('Digite outro numero: '))
s = n1 + n2
m = n1 * n2
d = n1 / n2
di = n1 // n2
e = n1 ** n2
print('A soma e: {} o produto e: {} a divisao e: {:.3f}'.format(s, m, d), end=' ')
print('Divisao inteira: {} e potencia {}'.format(di, e))
| n1 = int(input('Digite um numero: '))
n2 = int(input('Digite outro numero: '))
s = n1 + n2
m = n1 * n2
d = n1 / n2
di = n1 // n2
e = n1 ** n2
print('A soma e: {} o produto e: {} a divisao e: {:.3f}'.format(s, m, d), end=' ')
print('Divisao inteira: {} e potencia {}'.format(di, e)) |
NB_KEYS = 42
REGION_ID_CODES = {"alphanum": 0x2a, "enter": 0x0b, "modifiers": 0x18, "numpad": 0x24}
def make_key_colors_packet(region, colors_map):
packet = []
region_hexcode = REGION_ID_CODES[region]
header = [0x0e, 0x00, region_hexcode, 0x00]
packet += header
k = 0
for keycode, rgb in colors_map.items():
key_fragment = rgb + [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00] + [keycode]
packet += key_fragment
k += 1
while k < NB_KEYS:
packet += ([0x00] * 12)
k += 1
packet += [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x39]
return packet
def make_refresh_packet():
packet = [0x09] + [0x00] * 63
return packet
| nb_keys = 42
region_id_codes = {'alphanum': 42, 'enter': 11, 'modifiers': 24, 'numpad': 36}
def make_key_colors_packet(region, colors_map):
packet = []
region_hexcode = REGION_ID_CODES[region]
header = [14, 0, region_hexcode, 0]
packet += header
k = 0
for (keycode, rgb) in colors_map.items():
key_fragment = rgb + [0, 0, 0, 0, 0, 0, 1, 0] + [keycode]
packet += key_fragment
k += 1
while k < NB_KEYS:
packet += [0] * 12
k += 1
packet += [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 57]
return packet
def make_refresh_packet():
packet = [9] + [0] * 63
return packet |
# Copyright (c) 2009 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'includes': [
'../../build/common.gypi',
],
'conditions': [
['OS=="win"', {
'targets': [
{
'target_name': 'cld',
'type': '<(library)',
'dependencies': [
'../../base/base.gyp:base',
],
'msvs_disabled_warnings': [4005, 4006, 4018, 4244, 4309, 4800],
'defines': [
'CLD_WINDOWS',
],
'sources': [
'bar/common/scopedlibrary.h',
'bar/common/scopedptr.h',
'bar/toolbar/cld/i18n/encodings/compact_lang_det/cldutil.cc',
'bar/toolbar/cld/i18n/encodings/compact_lang_det/cldutil.h',
'bar/toolbar/cld/i18n/encodings/compact_lang_det/cldutil_dbg.h',
'bar/toolbar/cld/i18n/encodings/compact_lang_det/cldutil_dbg_empty.cc',
'bar/toolbar/cld/i18n/encodings/compact_lang_det/compact_lang_det.cc',
'bar/toolbar/cld/i18n/encodings/compact_lang_det/compact_lang_det.h',
'bar/toolbar/cld/i18n/encodings/compact_lang_det/compact_lang_det_generated_cjkbis_0.cc',
'bar/toolbar/cld/i18n/encodings/compact_lang_det/compact_lang_det_generated_ctjkvz.cc',
'bar/toolbar/cld/i18n/encodings/compact_lang_det/compact_lang_det_generated_longwords8_0.cc',
'bar/toolbar/cld/i18n/encodings/compact_lang_det/compact_lang_det_generated_meanscore.h',
'bar/toolbar/cld/i18n/encodings/compact_lang_det/compact_lang_det_generated_quads_128.cc',
'bar/toolbar/cld/i18n/encodings/compact_lang_det/compact_lang_det_impl.cc',
'bar/toolbar/cld/i18n/encodings/compact_lang_det/compact_lang_det_impl.h',
'bar/toolbar/cld/i18n/encodings/compact_lang_det/ext_lang_enc.cc',
'bar/toolbar/cld/i18n/encodings/compact_lang_det/ext_lang_enc.h',
'bar/toolbar/cld/i18n/encodings/compact_lang_det/getonescriptspan.cc',
'bar/toolbar/cld/i18n/encodings/compact_lang_det/getonescriptspan.h',
'bar/toolbar/cld/i18n/encodings/compact_lang_det/letterscript_enum.cc',
'bar/toolbar/cld/i18n/encodings/compact_lang_det/letterscript_enum.h',
'bar/toolbar/cld/i18n/encodings/compact_lang_det/subsetsequence.cc',
'bar/toolbar/cld/i18n/encodings/compact_lang_det/subsetsequence.h',
'bar/toolbar/cld/i18n/encodings/compact_lang_det/tote.cc',
'bar/toolbar/cld/i18n/encodings/compact_lang_det/tote.h',
'bar/toolbar/cld/i18n/encodings/compact_lang_det/unittest_data.h',
'bar/toolbar/cld/i18n/encodings/compact_lang_det/utf8propjustletter.h',
'bar/toolbar/cld/i18n/encodings/compact_lang_det/utf8propletterscriptnum.h',
'bar/toolbar/cld/i18n/encodings/compact_lang_det/utf8scannotjustletterspecial.h',
'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_basictypes.h',
'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_commandlineflags.h',
'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_macros.h',
'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_google.h',
'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_htmlutils.h',
'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_htmlutils_windows.cc',
'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_logging.h',
'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_scoped_ptr.h',
'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_scopedptr.h',
'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_strtoint.h',
'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_unicodetext.cc',
'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_unicodetext.h',
'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_unilib.h',
'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_unilib_windows.cc',
'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_utf.h',
'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_utf8statetable.cc',
'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_utf8statetable.h',
'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_utf8utils.h',
'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_utf8utils_windows.cc',
'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/normalizedunicodetext.cc',
'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/normalizedunicodetext.h',
'bar/toolbar/cld/i18n/encodings/internal/encodings.cc',
'bar/toolbar/cld/i18n/encodings/proto/encodings.pb.h',
'bar/toolbar/cld/i18n/encodings/public/encodings.h',
'bar/toolbar/cld/i18n/languages/internal/languages.cc',
'bar/toolbar/cld/i18n/languages/proto/languages.pb.h',
'bar/toolbar/cld/i18n/languages/public/languages.h',
'base/casts.h',
'base/commandlineflags.h',
'base/stl_decl.h',
'base/global_strip_options.h',
'base/logging.h',
'base/macros.h',
'base/crash.h',
'base/dynamic_annotations.h',
'base/scoped_ptr.h',
'base/stl_decl_msvc.h',
'base/log_severity.h',
'base/strtoint.h',
'base/vlog_is_on.h',
'base/type_traits.h',
'base/template_util.h',
],
'direct_dependent_settings': {
'defines': [
'CLD_WINDOWS',
'COMPILER_MSVC',
],
},
},],
},
],
],
}
| {'includes': ['../../build/common.gypi'], 'conditions': [['OS=="win"', {'targets': [{'target_name': 'cld', 'type': '<(library)', 'dependencies': ['../../base/base.gyp:base'], 'msvs_disabled_warnings': [4005, 4006, 4018, 4244, 4309, 4800], 'defines': ['CLD_WINDOWS'], 'sources': ['bar/common/scopedlibrary.h', 'bar/common/scopedptr.h', 'bar/toolbar/cld/i18n/encodings/compact_lang_det/cldutil.cc', 'bar/toolbar/cld/i18n/encodings/compact_lang_det/cldutil.h', 'bar/toolbar/cld/i18n/encodings/compact_lang_det/cldutil_dbg.h', 'bar/toolbar/cld/i18n/encodings/compact_lang_det/cldutil_dbg_empty.cc', 'bar/toolbar/cld/i18n/encodings/compact_lang_det/compact_lang_det.cc', 'bar/toolbar/cld/i18n/encodings/compact_lang_det/compact_lang_det.h', 'bar/toolbar/cld/i18n/encodings/compact_lang_det/compact_lang_det_generated_cjkbis_0.cc', 'bar/toolbar/cld/i18n/encodings/compact_lang_det/compact_lang_det_generated_ctjkvz.cc', 'bar/toolbar/cld/i18n/encodings/compact_lang_det/compact_lang_det_generated_longwords8_0.cc', 'bar/toolbar/cld/i18n/encodings/compact_lang_det/compact_lang_det_generated_meanscore.h', 'bar/toolbar/cld/i18n/encodings/compact_lang_det/compact_lang_det_generated_quads_128.cc', 'bar/toolbar/cld/i18n/encodings/compact_lang_det/compact_lang_det_impl.cc', 'bar/toolbar/cld/i18n/encodings/compact_lang_det/compact_lang_det_impl.h', 'bar/toolbar/cld/i18n/encodings/compact_lang_det/ext_lang_enc.cc', 'bar/toolbar/cld/i18n/encodings/compact_lang_det/ext_lang_enc.h', 'bar/toolbar/cld/i18n/encodings/compact_lang_det/getonescriptspan.cc', 'bar/toolbar/cld/i18n/encodings/compact_lang_det/getonescriptspan.h', 'bar/toolbar/cld/i18n/encodings/compact_lang_det/letterscript_enum.cc', 'bar/toolbar/cld/i18n/encodings/compact_lang_det/letterscript_enum.h', 'bar/toolbar/cld/i18n/encodings/compact_lang_det/subsetsequence.cc', 'bar/toolbar/cld/i18n/encodings/compact_lang_det/subsetsequence.h', 'bar/toolbar/cld/i18n/encodings/compact_lang_det/tote.cc', 'bar/toolbar/cld/i18n/encodings/compact_lang_det/tote.h', 'bar/toolbar/cld/i18n/encodings/compact_lang_det/unittest_data.h', 'bar/toolbar/cld/i18n/encodings/compact_lang_det/utf8propjustletter.h', 'bar/toolbar/cld/i18n/encodings/compact_lang_det/utf8propletterscriptnum.h', 'bar/toolbar/cld/i18n/encodings/compact_lang_det/utf8scannotjustletterspecial.h', 'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_basictypes.h', 'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_commandlineflags.h', 'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_macros.h', 'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_google.h', 'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_htmlutils.h', 'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_htmlutils_windows.cc', 'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_logging.h', 'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_scoped_ptr.h', 'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_scopedptr.h', 'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_strtoint.h', 'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_unicodetext.cc', 'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_unicodetext.h', 'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_unilib.h', 'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_unilib_windows.cc', 'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_utf.h', 'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_utf8statetable.cc', 'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_utf8statetable.h', 'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_utf8utils.h', 'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_utf8utils_windows.cc', 'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/normalizedunicodetext.cc', 'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/normalizedunicodetext.h', 'bar/toolbar/cld/i18n/encodings/internal/encodings.cc', 'bar/toolbar/cld/i18n/encodings/proto/encodings.pb.h', 'bar/toolbar/cld/i18n/encodings/public/encodings.h', 'bar/toolbar/cld/i18n/languages/internal/languages.cc', 'bar/toolbar/cld/i18n/languages/proto/languages.pb.h', 'bar/toolbar/cld/i18n/languages/public/languages.h', 'base/casts.h', 'base/commandlineflags.h', 'base/stl_decl.h', 'base/global_strip_options.h', 'base/logging.h', 'base/macros.h', 'base/crash.h', 'base/dynamic_annotations.h', 'base/scoped_ptr.h', 'base/stl_decl_msvc.h', 'base/log_severity.h', 'base/strtoint.h', 'base/vlog_is_on.h', 'base/type_traits.h', 'base/template_util.h'], 'direct_dependent_settings': {'defines': ['CLD_WINDOWS', 'COMPILER_MSVC']}}]}]]} |
# Frequency Type
MONTHLY = 12
ANNUALLY = 1
FREQUENCY_TYPE = {
MONTHLY: 'Monthly',
ANNUALLY: 'Anually'
}
# Loan Type
CONVENTIONAL = 0
HARD_MONEY = 1
PRIVATE_MONEY = 2
OTHER = 3
LOAN_TYPE = {
CONVENTIONAL: 'Conventional',
HARD_MONEY: 'Hard Money',
PRIVATE_MONEY: 'Private Money',
OTHER: 'Other'
}
| monthly = 12
annually = 1
frequency_type = {MONTHLY: 'Monthly', ANNUALLY: 'Anually'}
conventional = 0
hard_money = 1
private_money = 2
other = 3
loan_type = {CONVENTIONAL: 'Conventional', HARD_MONEY: 'Hard Money', PRIVATE_MONEY: 'Private Money', OTHER: 'Other'} |
numbersArray = [12, 23, 5, 12, 92, 5,12, 5, 29, 92, 64,23]
numbersAmount = {}
def analizeArray():
for number in numbersArray:
addNumber(number)
def addNumber(newNumber):
if(newNumber in numbersAmount):
numbersAmount.update({newNumber: numbersAmount[newNumber]+1})
else:
numbersAmount.update({newNumber: 1})
def showDictionary():
print(numbersAmount)
print("Contador de numeros")
print("(Modifica la lista para ver los cambios)")
print("")
analizeArray()
showDictionary()
| numbers_array = [12, 23, 5, 12, 92, 5, 12, 5, 29, 92, 64, 23]
numbers_amount = {}
def analize_array():
for number in numbersArray:
add_number(number)
def add_number(newNumber):
if newNumber in numbersAmount:
numbersAmount.update({newNumber: numbersAmount[newNumber] + 1})
else:
numbersAmount.update({newNumber: 1})
def show_dictionary():
print(numbersAmount)
print('Contador de numeros')
print('(Modifica la lista para ver los cambios)')
print('')
analize_array()
show_dictionary() |
# Finicky Counter
# Demonstrates the break and continue statements
count = 0
while True:
count += 1
# end loop if count greater than 10
if count > 10:
break
# skip 5
if count == 5:
continue
print(count)
input("\n\nPress the enter key to exit.")
| count = 0
while True:
count += 1
if count > 10:
break
if count == 5:
continue
print(count)
input('\n\nPress the enter key to exit.') |
def add(num1, num2):
return num1 + num2
def subtract(num1, num2):
return num1 - num2
def multiply(num1, num2):
return num1 * num2
def divide(num1, num2):
return num1 / num2
select = int(input("Please select operation -\n"
"1. Add\n"
"2. Subtract\n"
"3. Multiply\n"
"4. Divide\n"))
number_1 = int(input("Enter first number: "))
number_2 = int(input("Enter second number: "))
if select == 1:
print(number_1, "+", number_2, "=",
add(number_1, number_2))
elif select == 2:
print(number_1, "-", number_2, "=",
subtract(number_1, number_2))
elif select == 3:
print(number_1, "*", number_2, "=",
multiply(number_1, number_2))
elif select == 4:
print(number_1, "/", number_2, "=",
divide(number_1, number_2))
else:
print("Invalid Selection!") | def add(num1, num2):
return num1 + num2
def subtract(num1, num2):
return num1 - num2
def multiply(num1, num2):
return num1 * num2
def divide(num1, num2):
return num1 / num2
select = int(input('Please select operation -\n1. Add\n2. Subtract\n3. Multiply\n4. Divide\n'))
number_1 = int(input('Enter first number: '))
number_2 = int(input('Enter second number: '))
if select == 1:
print(number_1, '+', number_2, '=', add(number_1, number_2))
elif select == 2:
print(number_1, '-', number_2, '=', subtract(number_1, number_2))
elif select == 3:
print(number_1, '*', number_2, '=', multiply(number_1, number_2))
elif select == 4:
print(number_1, '/', number_2, '=', divide(number_1, number_2))
else:
print('Invalid Selection!') |
pkgname = "gnu-getopt"
pkgver = "0.0.1"
pkgrel = 0
build_style = "makefile"
make_cmd = "gmake"
hostmakedepends = ["gmake"]
pkgdesc = "GNU getopt compatibility package for musl"
maintainer = "roastveg <louis@hamptonsoftworks.com>"
license = "BSD-4-Clause AND ISC"
url = "https://github.com/sabotage-linux/gnu-getopt"
source = f"https://github.com/sabotage-linux/{pkgname}/archive/refs/tags/v{pkgver}.tar.gz"
sha256 = "52eefa6973d05cab92cfc76ab83b3cde4654b91564e97983b26020792694cb5c"
# no check target
options = ["!lto", "!check"]
def do_install(self):
self.install_file("gnu_getopt.h", "usr/include")
self.install_lib("libgnu_getopt.a")
| pkgname = 'gnu-getopt'
pkgver = '0.0.1'
pkgrel = 0
build_style = 'makefile'
make_cmd = 'gmake'
hostmakedepends = ['gmake']
pkgdesc = 'GNU getopt compatibility package for musl'
maintainer = 'roastveg <louis@hamptonsoftworks.com>'
license = 'BSD-4-Clause AND ISC'
url = 'https://github.com/sabotage-linux/gnu-getopt'
source = f'https://github.com/sabotage-linux/{pkgname}/archive/refs/tags/v{pkgver}.tar.gz'
sha256 = '52eefa6973d05cab92cfc76ab83b3cde4654b91564e97983b26020792694cb5c'
options = ['!lto', '!check']
def do_install(self):
self.install_file('gnu_getopt.h', 'usr/include')
self.install_lib('libgnu_getopt.a') |
#
# PySNMP MIB module DNOS-LLPF-PRIVATE-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/DNOS-LLPF-PRIVATE-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 18:36:50 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueSizeConstraint, ConstraintsIntersection, ConstraintsUnion, SingleValueConstraint, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "ConstraintsIntersection", "ConstraintsUnion", "SingleValueConstraint", "ValueRangeConstraint")
dnOS, = mibBuilder.importSymbols("DELL-REF-MIB", "dnOS")
ifIndex, = mibBuilder.importSymbols("IF-MIB", "ifIndex")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
ModuleIdentity, ObjectIdentity, Gauge32, Counter64, MibIdentifier, iso, TimeTicks, Integer32, Unsigned32, Counter32, IpAddress, MibScalar, MibTable, MibTableRow, MibTableColumn, Bits, NotificationType = mibBuilder.importSymbols("SNMPv2-SMI", "ModuleIdentity", "ObjectIdentity", "Gauge32", "Counter64", "MibIdentifier", "iso", "TimeTicks", "Integer32", "Unsigned32", "Counter32", "IpAddress", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Bits", "NotificationType")
RowStatus, MacAddress, TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "RowStatus", "MacAddress", "TextualConvention", "DisplayString")
fastPathLlpf = ModuleIdentity((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 48))
fastPathLlpf.setRevisions(('2011-01-26 00:00', '2009-10-26 00:00',))
if mibBuilder.loadTexts: fastPathLlpf.setLastUpdated('201101260000Z')
if mibBuilder.loadTexts: fastPathLlpf.setOrganization('Dell, Inc.')
agentSwitchLlpfGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 48, 1))
agentSwitchLlpfPortConfigTable = MibTable((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 48, 1, 1), )
if mibBuilder.loadTexts: agentSwitchLlpfPortConfigTable.setStatus('current')
agentSwitchLlpfPortConfigEntry = MibTableRow((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 48, 1, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "DNOS-LLPF-PRIVATE-MIB", "agentSwitchLlpfProtocolType"))
if mibBuilder.loadTexts: agentSwitchLlpfPortConfigEntry.setStatus('current')
agentSwitchLlpfProtocolType = MibTableColumn((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 48, 1, 1, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 6)))
if mibBuilder.loadTexts: agentSwitchLlpfProtocolType.setStatus('current')
agentSwitchLlpfPortBlockMode = MibTableColumn((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 48, 1, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enable", 1), ("disable", 2))).clone('disable')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: agentSwitchLlpfPortBlockMode.setStatus('current')
mibBuilder.exportSymbols("DNOS-LLPF-PRIVATE-MIB", agentSwitchLlpfPortConfigTable=agentSwitchLlpfPortConfigTable, agentSwitchLlpfPortBlockMode=agentSwitchLlpfPortBlockMode, agentSwitchLlpfPortConfigEntry=agentSwitchLlpfPortConfigEntry, agentSwitchLlpfGroup=agentSwitchLlpfGroup, PYSNMP_MODULE_ID=fastPathLlpf, fastPathLlpf=fastPathLlpf, agentSwitchLlpfProtocolType=agentSwitchLlpfProtocolType)
| (integer, octet_string, object_identifier) = mibBuilder.importSymbols('ASN1', 'Integer', 'OctetString', 'ObjectIdentifier')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_size_constraint, constraints_intersection, constraints_union, single_value_constraint, value_range_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueSizeConstraint', 'ConstraintsIntersection', 'ConstraintsUnion', 'SingleValueConstraint', 'ValueRangeConstraint')
(dn_os,) = mibBuilder.importSymbols('DELL-REF-MIB', 'dnOS')
(if_index,) = mibBuilder.importSymbols('IF-MIB', 'ifIndex')
(module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup')
(module_identity, object_identity, gauge32, counter64, mib_identifier, iso, time_ticks, integer32, unsigned32, counter32, ip_address, mib_scalar, mib_table, mib_table_row, mib_table_column, bits, notification_type) = mibBuilder.importSymbols('SNMPv2-SMI', 'ModuleIdentity', 'ObjectIdentity', 'Gauge32', 'Counter64', 'MibIdentifier', 'iso', 'TimeTicks', 'Integer32', 'Unsigned32', 'Counter32', 'IpAddress', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Bits', 'NotificationType')
(row_status, mac_address, textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'RowStatus', 'MacAddress', 'TextualConvention', 'DisplayString')
fast_path_llpf = module_identity((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 48))
fastPathLlpf.setRevisions(('2011-01-26 00:00', '2009-10-26 00:00'))
if mibBuilder.loadTexts:
fastPathLlpf.setLastUpdated('201101260000Z')
if mibBuilder.loadTexts:
fastPathLlpf.setOrganization('Dell, Inc.')
agent_switch_llpf_group = mib_identifier((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 48, 1))
agent_switch_llpf_port_config_table = mib_table((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 48, 1, 1))
if mibBuilder.loadTexts:
agentSwitchLlpfPortConfigTable.setStatus('current')
agent_switch_llpf_port_config_entry = mib_table_row((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 48, 1, 1, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'), (0, 'DNOS-LLPF-PRIVATE-MIB', 'agentSwitchLlpfProtocolType'))
if mibBuilder.loadTexts:
agentSwitchLlpfPortConfigEntry.setStatus('current')
agent_switch_llpf_protocol_type = mib_table_column((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 48, 1, 1, 1, 1), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 6)))
if mibBuilder.loadTexts:
agentSwitchLlpfProtocolType.setStatus('current')
agent_switch_llpf_port_block_mode = mib_table_column((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 48, 1, 1, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enable', 1), ('disable', 2))).clone('disable')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
agentSwitchLlpfPortBlockMode.setStatus('current')
mibBuilder.exportSymbols('DNOS-LLPF-PRIVATE-MIB', agentSwitchLlpfPortConfigTable=agentSwitchLlpfPortConfigTable, agentSwitchLlpfPortBlockMode=agentSwitchLlpfPortBlockMode, agentSwitchLlpfPortConfigEntry=agentSwitchLlpfPortConfigEntry, agentSwitchLlpfGroup=agentSwitchLlpfGroup, PYSNMP_MODULE_ID=fastPathLlpf, fastPathLlpf=fastPathLlpf, agentSwitchLlpfProtocolType=agentSwitchLlpfProtocolType) |
class Models:
RANDOMFORESTCLASSIFIER = 'RandomForestClassifier'
LOGISTICREGRESSION = 'LogisticRegression'
MULTINOMIALNB = 'MultinomialNB'
MLPCLASSIFIER = 'MLPClassifier'
class Datasets:
ADULT = 'adult'
GERMANCREDIT = 'german_credit'
TWENTYNEWSGROUPS = '20_newsgroups'
BREASTCANCER = 'breast_cancer'
SYNTHETIC = 'synthetic'
COMPAS = 'compas'
COMMUNITY = 'community'
class Explainers:
LIMETABULAR = 'lime_tabular'
LIMETEXT = 'lime_text'
NUMPYTABULAR = 'numpy_tabular'
NUMPYENSEMBLE = 'numpy_ensemble'
NUMPYTEXT = 'numpy_text'
NUMPYROBUSTTABULAR= 'numpy_robust_tabular'
| class Models:
randomforestclassifier = 'RandomForestClassifier'
logisticregression = 'LogisticRegression'
multinomialnb = 'MultinomialNB'
mlpclassifier = 'MLPClassifier'
class Datasets:
adult = 'adult'
germancredit = 'german_credit'
twentynewsgroups = '20_newsgroups'
breastcancer = 'breast_cancer'
synthetic = 'synthetic'
compas = 'compas'
community = 'community'
class Explainers:
limetabular = 'lime_tabular'
limetext = 'lime_text'
numpytabular = 'numpy_tabular'
numpyensemble = 'numpy_ensemble'
numpytext = 'numpy_text'
numpyrobusttabular = 'numpy_robust_tabular' |
class TrainConfig:
def __init__(self):
self.task = 't5_finetune'
self.model_name = 't5-small'
self.outer_lr = 1e-5
self.epochs = 1
self.max_iter = 20000
self.debug = False
self.model_save_pt = 5000
self.write_loc = '..'
self.silent = False
| class Trainconfig:
def __init__(self):
self.task = 't5_finetune'
self.model_name = 't5-small'
self.outer_lr = 1e-05
self.epochs = 1
self.max_iter = 20000
self.debug = False
self.model_save_pt = 5000
self.write_loc = '..'
self.silent = False |
# coding: UTF-8
#A part of NonVisual Desktop Access (NVDA)
#Copyright (C) 2017 Takuya Nishimoto (NVDA Japanese Team)
SRC_FILE = "6ten kanji characters table-UTF8.txt"
with open(SRC_FILE, encoding='utf-8-sig') as f:
for s in f.readlines():
if s and s[0] != '#':
s = s.strip('"\n')
a = s.split("\t")
if len(a) == 2:
print(f"sign \\x{ord(a[0]):x} {a[1]:<20}\t# {a[0]}")
| src_file = '6ten kanji characters table-UTF8.txt'
with open(SRC_FILE, encoding='utf-8-sig') as f:
for s in f.readlines():
if s and s[0] != '#':
s = s.strip('"\n')
a = s.split('\t')
if len(a) == 2:
print(f'sign \\x{ord(a[0]):x} {a[1]:<20}\t# {a[0]}') |
_squares = tuple(x*x for x in range(10))
def _sum_squares_of_digits(n: int) -> int:
s = 0
while n > 0:
s += _squares[n % 10]
n //= 10
return s
def solve():
eighty_nine, limit = 0, 10000000
map_limit = (len(str(limit))) * 81
mapped = [0 for _ in range(map_limit)]
mapped[1], mapped[89] = 1, 89
for c in range(1, limit):
n = _sum_squares_of_digits(c)
if not mapped[n]:
loop = [n]
loop_not_found = True
while loop_not_found:
next_n = _sum_squares_of_digits(n)
if mapped[next_n] or next_n == 1 or next_n == 89:
for num in loop:
mapped[num] = mapped[next_n]
loop_not_found = False
loop.append(next_n)
n = next_n
if mapped[n] == 89:
eighty_nine += 1
print(eighty_nine)
if __name__ == '__main__':
solve()
| _squares = tuple((x * x for x in range(10)))
def _sum_squares_of_digits(n: int) -> int:
s = 0
while n > 0:
s += _squares[n % 10]
n //= 10
return s
def solve():
(eighty_nine, limit) = (0, 10000000)
map_limit = len(str(limit)) * 81
mapped = [0 for _ in range(map_limit)]
(mapped[1], mapped[89]) = (1, 89)
for c in range(1, limit):
n = _sum_squares_of_digits(c)
if not mapped[n]:
loop = [n]
loop_not_found = True
while loop_not_found:
next_n = _sum_squares_of_digits(n)
if mapped[next_n] or next_n == 1 or next_n == 89:
for num in loop:
mapped[num] = mapped[next_n]
loop_not_found = False
loop.append(next_n)
n = next_n
if mapped[n] == 89:
eighty_nine += 1
print(eighty_nine)
if __name__ == '__main__':
solve() |
# -*- coding: utf-8 -*-
MONTH_COLOR = "#c1c1c1"
DAY_COLOR = "#c6c6c6"
TARGET_COLOR = "#212121"
CALENDAR_PUZZLE_COLUMN = 7
class Block(object):
row = 1
col = 1
def __init__(self, row=None, col=None, entity=None, index=None):
if row:
self.row = int(row)
if col:
self.col = int(col)
self.entity = entity
self.index = index
def __repr__(self):
return "Block({}, {})".format(self.row, self.col)
__str__ = __repr__
def __eq__(self, other):
return self.row == other.row and self.col == other.col
def __hash__(self):
return int("{}{}".format(self.row, self.col))
class JAN(Block):
row = 1
col = 1
class FEB(Block):
row = 1
col = 2
class MAR(Block):
row = 1
col = 3
class APR(Block):
row = 1
col = 4
class MAY(Block):
row = 1
col = 5
class JUN(Block):
row = 1
col = 6
class JUL(Block):
row = 2
col = 1
class AUG(Block):
row = 2
col = 2
class SEP(Block):
row = 2
col = 3
class OCT(Block):
row = 2
col = 4
class NOV(Block):
row = 2
col = 5
class DEC(Block):
row = 2
col = 6
total_months = [JAN(), FEB(), MAR(), APR(), MAY(), JUN(), JUL(), AUG(), SEP(), OCT(), NOV(), DEC()]
total_days = [
Block(3 + (i // CALENDAR_PUZZLE_COLUMN), 1 + (i % CALENDAR_PUZZLE_COLUMN), index=i + 1) for i in range(31)
]
| month_color = '#c1c1c1'
day_color = '#c6c6c6'
target_color = '#212121'
calendar_puzzle_column = 7
class Block(object):
row = 1
col = 1
def __init__(self, row=None, col=None, entity=None, index=None):
if row:
self.row = int(row)
if col:
self.col = int(col)
self.entity = entity
self.index = index
def __repr__(self):
return 'Block({}, {})'.format(self.row, self.col)
__str__ = __repr__
def __eq__(self, other):
return self.row == other.row and self.col == other.col
def __hash__(self):
return int('{}{}'.format(self.row, self.col))
class Jan(Block):
row = 1
col = 1
class Feb(Block):
row = 1
col = 2
class Mar(Block):
row = 1
col = 3
class Apr(Block):
row = 1
col = 4
class May(Block):
row = 1
col = 5
class Jun(Block):
row = 1
col = 6
class Jul(Block):
row = 2
col = 1
class Aug(Block):
row = 2
col = 2
class Sep(Block):
row = 2
col = 3
class Oct(Block):
row = 2
col = 4
class Nov(Block):
row = 2
col = 5
class Dec(Block):
row = 2
col = 6
total_months = [jan(), feb(), mar(), apr(), may(), jun(), jul(), aug(), sep(), oct(), nov(), dec()]
total_days = [block(3 + i // CALENDAR_PUZZLE_COLUMN, 1 + i % CALENDAR_PUZZLE_COLUMN, index=i + 1) for i in range(31)] |
Memory = \
{
0: 0,
1: 0,
2: 0,
3: 0,
4: 0,
5: 0,
6: 0,
7: 0,
8: 0,
9: 0,
10: 0,
11: 0,
12: 0,
13: 0,
14: 0,
15: 0,
16: 0,
17: 0,
18: 0,
19: 0,
20: 0,
21: 0,
22: 0,
23: 0,
24: 0,
25: 0,
26: 0,
27: 0,
28: 0,
29: 0,
30: 0,
31: 0,
32: 0,
33: 0,
34: 0,
35: 0,
36: 0,
37: 0,
38: 0,
39: 0,
40: 0
} | memory = {0: 0, 1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0, 7: 0, 8: 0, 9: 0, 10: 0, 11: 0, 12: 0, 13: 0, 14: 0, 15: 0, 16: 0, 17: 0, 18: 0, 19: 0, 20: 0, 21: 0, 22: 0, 23: 0, 24: 0, 25: 0, 26: 0, 27: 0, 28: 0, 29: 0, 30: 0, 31: 0, 32: 0, 33: 0, 34: 0, 35: 0, 36: 0, 37: 0, 38: 0, 39: 0, 40: 0} |
BLACK = (0, 0, 0)
RED = (255, 0, 0)
GREEN = (0, 255, 0)
YELLOW = (255, 255, 0)
BLUE = (0, 0, 255)
MAGENTA = (255, 0, 255)
CYAN = (0, 255, 255)
WHITE = (255, 255, 255)
| black = (0, 0, 0)
red = (255, 0, 0)
green = (0, 255, 0)
yellow = (255, 255, 0)
blue = (0, 0, 255)
magenta = (255, 0, 255)
cyan = (0, 255, 255)
white = (255, 255, 255) |
class TestingContent:
introduction = (
"Arguably, understanding the current and future state of the COVID-19 "
"pandemic begins with testing. Without testing, we do not understand "
"which counties are managing the spread of this disease effectively "
"and which are simply under-reporting new cases and deaths. In "
"addition to identifying new cases, the percentage of tests that are "
"positive in a particular country helps to answer whether testing is "
"adequate in that country. Currently, the WHO suggests that a "
"percentage of tests that are positive in 10% or less of those who "
"are tested likely indicates that adequate testing is occurring."
)
testing_rate_data = (
"Below is a plot to visualize the percent of COVID-19 tests done in a "
"country that is positive. The desired target is a positive rate of "
"10% or less. Select any number of countries below to compare their "
"respective positive testing rates. Additionally, either the "
"cumulative or the daily (rolling 7 day average) positive testing "
"rates may be selected with the respective radio button choice."
)
testing_volume_data = (
"Below is a plot to visualize the number of daily COVID-19 tests done "
"in selected countries. Select any number of countries to assess "
"their respective daily tests performed. The raw number of daily "
"tests or tests per 1000 residents may be selected with the "
"respective radio button choice."
)
testing_content = TestingContent()
| class Testingcontent:
introduction = 'Arguably, understanding the current and future state of the COVID-19 pandemic begins with testing. Without testing, we do not understand which counties are managing the spread of this disease effectively and which are simply under-reporting new cases and deaths. In addition to identifying new cases, the percentage of tests that are positive in a particular country helps to answer whether testing is adequate in that country. Currently, the WHO suggests that a percentage of tests that are positive in 10% or less of those who are tested likely indicates that adequate testing is occurring.'
testing_rate_data = 'Below is a plot to visualize the percent of COVID-19 tests done in a country that is positive. The desired target is a positive rate of 10% or less. Select any number of countries below to compare their respective positive testing rates. Additionally, either the cumulative or the daily (rolling 7 day average) positive testing rates may be selected with the respective radio button choice.'
testing_volume_data = 'Below is a plot to visualize the number of daily COVID-19 tests done in selected countries. Select any number of countries to assess their respective daily tests performed. The raw number of daily tests or tests per 1000 residents may be selected with the respective radio button choice.'
testing_content = testing_content() |
input = open("input/input_14.txt").read().split("\n\n")
rules = {element.split(" -> ")[0]: element.split(" -> ")[1] for element in input[1].split("\n")}
str_new = input[0]
for i in range(10):
str_old = str_new
str_new = ""
for char in range(len(str_old)-1):
str_new += str_old[char]
if str_old[char:char+2] in rules.keys():
str_new += rules[str_old[char:char+2]]
str_new += str_old[-1]
occurrences = [str_new.count(a) for a in str_new]
occurrences.sort()
print(str(occurrences[-1]-occurrences[0])) | input = open('input/input_14.txt').read().split('\n\n')
rules = {element.split(' -> ')[0]: element.split(' -> ')[1] for element in input[1].split('\n')}
str_new = input[0]
for i in range(10):
str_old = str_new
str_new = ''
for char in range(len(str_old) - 1):
str_new += str_old[char]
if str_old[char:char + 2] in rules.keys():
str_new += rules[str_old[char:char + 2]]
str_new += str_old[-1]
occurrences = [str_new.count(a) for a in str_new]
occurrences.sort()
print(str(occurrences[-1] - occurrences[0])) |
a = 5
b = 10
def zmien(a,b):
c = a
a = b
b = c
print("a:",a)
print("b:",b)
print("a:",a)
print("b:",b)
zmien(a,b) | a = 5
b = 10
def zmien(a, b):
c = a
a = b
b = c
print('a:', a)
print('b:', b)
print('a:', a)
print('b:', b)
zmien(a, b) |
n, k = map(int, input().split())
n_lst = list(map(int, input().split()))
n_lst.sort(reverse=True)
print(sum(n_lst[:k]))
| (n, k) = map(int, input().split())
n_lst = list(map(int, input().split()))
n_lst.sort(reverse=True)
print(sum(n_lst[:k])) |
obj_map = [["glass", 0.015, [0, 0, 0], [0, 0, 0.05510244]], # 0.06
["donut", 0.01, [0, 0, 0], [0, 0, 0.01466367]],
["heart", 0.0006, [0.70738827, -0.70682518, 0], [0, 0, 0.8]],
["airplane", 1, [0, 0, 0], [0, 0, 2.58596408e-02]],
["alarmclock", 1, [0.70738827, -0.70682518, 0], [0, 0, 2.47049890e-02]],
["apple", 1, [0, 0, 0], [0, 0, 0.04999409]],
["banana", 1, [0, 0, 0], [0, 0, 0.02365614]],
["binoculars", 1, [0.70738827, -0.70682518, 0], [0, 0, 0.07999943]],
["body", 0.1, [0, 0, 0], [0, 0, 0.0145278]],
["bowl", 1, [0, 0, 0], [0, 0, 0.03995771]],
["camera", 1, [0, 0, 0], [0, 0, 0.03483407]],
["coffeemug", 1, [0, 0, 0], [0, 0, 0.05387171]],
["cubelarge", 1, [0, 0, 0], [0, 0, 0.06039196]],
["cubemedium", 1, [0, 0, 0], [0, 0, 0.04103902]],
["cubemiddle", 1, [0, 0, 0], [0, 0, 0.04103902]],
["cubesmall", 1, [0, 0, 0], [0, 0, 0.02072159]],
["cup", 1, [0, 0, 0], [0, 0, 0.05127277]],
["cylinderlarge", 1, [0, 0, 0], [0, 0, 0.06135697]],
["cylindermedium", 1, [0, 0, 0], [0, 0, 0.04103905]],
["cylindersmall", 1, [0, 0, 0], [0, 0, 0.02072279]],
["doorknob", 1, [0, 0, 0], [0, 0, 0.0379012]],
["duck", 1, [0, 0, 0], [0, 0, 0.04917608]],
["elephant", 1, [0, 0, 0], [0, 0, 0.05097572]],
["eyeglasses", 1, [0, 0, 0], [0, 0, 0.02300015]],
["flashlight", 1, [0, 0, 0], [0, 0, 0.07037258]],
["flute", 1, [0, 0, 0], [0, 0, 0.0092959]],
["fryingpan", 0.8, [0, 0, 0], [0, 0, 0.01514528]],
["gamecontroller", 1, [0, 0, 0], [0, 0, 0.02604568]],
["hammer", 1, [0, 0, 0], [0, 0, 0.01267463]],
["hand", 1, [0, 0, 0], [0, 0, 0.07001909]],
["headphones", 1, [0, 0, 0], [0, 0, 0.02992321]],
["knife", 1, [0, 0, 0], [0, 0, 0.00824503]],
["lightbulb", 1, [0, 0, 0], [0, 0, 0.03202522]],
["mouse", 1, [0, 0, 0], [0, 0, 0.0201307]],
["mug", 1, [0, 0, 0], [0, 0, 0.05387171]],
["phone", 1, [0, 0, 0], [0, 0, 0.02552063]],
["piggybank", 1, [0, 0, 0], [0, 0, 0.06923257]],
["pyramidlarge", 1, [0, 0, 0], [0, 0, 0.05123203]],
["pyramidmedium", 1, [0, 0, 0], [0, 0, 0.04103812]],
["pyramidsmall", 1, [0, 0, 0], [0, 0, 0.02072198]],
["rubberduck", 1, [0, 0, 0], [0, 0, 0.04917608]],
["scissors", 1, [0, 0, 0], [0, 0, 0.00802606]],
["spherelarge", 1, [0, 0, 0], [0, 0, 0.05382598]],
["spheremedium", 1, [0, 0, 0], [0, 0, 0.03729011]],
["spheresmall", 1, [0, 0, 0], [0, 0, 0.01897534]],
["stamp", 1, [0, 0, 0], [0, 0, 0.0379012]],
["stanfordbunny", 1, [0, 0, 0], [0, 0, 0.06453102]],
["stapler", 1, [0, 0, 0], [0, 0, 0.02116039]],
["table", 5, [0, 0, 0], [0, 0, 0.01403165]],
["teapot", 1, [0, 0, 0], [0, 0, 0.05761634]],
["toothbrush", 1, [0, 0, 0], [0, 0, 0.00701304]],
["toothpaste", 1, [0.50039816, -0.49999984, -0.49960184], [0, 0, 0.02]],
["toruslarge", 1, [0, 0, 0], [0, 0, 0.02080752]],
["torusmedium", 1, [0, 0, 0], [0, 0, 0.01394647]],
["torussmall", 1, [0, 0, 0], [0, 0, 0.00734874]],
["train", 1, [0, 0, 0], [0, 0, 0.04335064]],
["watch", 1, [0, 0, 0], [0, 0, 0.0424445]],
["waterbottle", 1, [0, 0, 0], [0, 0, 0.08697578]],
["wineglass", 1, [0, 0, 0], [0, 0, 0.0424445]],
["wristwatch", 1, [0, 0, 0], [0, 0, 0.06880109]]]
output_map = {}
for obj in obj_map:
output_map[obj[0]] = obj[2]
print(output_map) | obj_map = [['glass', 0.015, [0, 0, 0], [0, 0, 0.05510244]], ['donut', 0.01, [0, 0, 0], [0, 0, 0.01466367]], ['heart', 0.0006, [0.70738827, -0.70682518, 0], [0, 0, 0.8]], ['airplane', 1, [0, 0, 0], [0, 0, 0.0258596408]], ['alarmclock', 1, [0.70738827, -0.70682518, 0], [0, 0, 0.024704989]], ['apple', 1, [0, 0, 0], [0, 0, 0.04999409]], ['banana', 1, [0, 0, 0], [0, 0, 0.02365614]], ['binoculars', 1, [0.70738827, -0.70682518, 0], [0, 0, 0.07999943]], ['body', 0.1, [0, 0, 0], [0, 0, 0.0145278]], ['bowl', 1, [0, 0, 0], [0, 0, 0.03995771]], ['camera', 1, [0, 0, 0], [0, 0, 0.03483407]], ['coffeemug', 1, [0, 0, 0], [0, 0, 0.05387171]], ['cubelarge', 1, [0, 0, 0], [0, 0, 0.06039196]], ['cubemedium', 1, [0, 0, 0], [0, 0, 0.04103902]], ['cubemiddle', 1, [0, 0, 0], [0, 0, 0.04103902]], ['cubesmall', 1, [0, 0, 0], [0, 0, 0.02072159]], ['cup', 1, [0, 0, 0], [0, 0, 0.05127277]], ['cylinderlarge', 1, [0, 0, 0], [0, 0, 0.06135697]], ['cylindermedium', 1, [0, 0, 0], [0, 0, 0.04103905]], ['cylindersmall', 1, [0, 0, 0], [0, 0, 0.02072279]], ['doorknob', 1, [0, 0, 0], [0, 0, 0.0379012]], ['duck', 1, [0, 0, 0], [0, 0, 0.04917608]], ['elephant', 1, [0, 0, 0], [0, 0, 0.05097572]], ['eyeglasses', 1, [0, 0, 0], [0, 0, 0.02300015]], ['flashlight', 1, [0, 0, 0], [0, 0, 0.07037258]], ['flute', 1, [0, 0, 0], [0, 0, 0.0092959]], ['fryingpan', 0.8, [0, 0, 0], [0, 0, 0.01514528]], ['gamecontroller', 1, [0, 0, 0], [0, 0, 0.02604568]], ['hammer', 1, [0, 0, 0], [0, 0, 0.01267463]], ['hand', 1, [0, 0, 0], [0, 0, 0.07001909]], ['headphones', 1, [0, 0, 0], [0, 0, 0.02992321]], ['knife', 1, [0, 0, 0], [0, 0, 0.00824503]], ['lightbulb', 1, [0, 0, 0], [0, 0, 0.03202522]], ['mouse', 1, [0, 0, 0], [0, 0, 0.0201307]], ['mug', 1, [0, 0, 0], [0, 0, 0.05387171]], ['phone', 1, [0, 0, 0], [0, 0, 0.02552063]], ['piggybank', 1, [0, 0, 0], [0, 0, 0.06923257]], ['pyramidlarge', 1, [0, 0, 0], [0, 0, 0.05123203]], ['pyramidmedium', 1, [0, 0, 0], [0, 0, 0.04103812]], ['pyramidsmall', 1, [0, 0, 0], [0, 0, 0.02072198]], ['rubberduck', 1, [0, 0, 0], [0, 0, 0.04917608]], ['scissors', 1, [0, 0, 0], [0, 0, 0.00802606]], ['spherelarge', 1, [0, 0, 0], [0, 0, 0.05382598]], ['spheremedium', 1, [0, 0, 0], [0, 0, 0.03729011]], ['spheresmall', 1, [0, 0, 0], [0, 0, 0.01897534]], ['stamp', 1, [0, 0, 0], [0, 0, 0.0379012]], ['stanfordbunny', 1, [0, 0, 0], [0, 0, 0.06453102]], ['stapler', 1, [0, 0, 0], [0, 0, 0.02116039]], ['table', 5, [0, 0, 0], [0, 0, 0.01403165]], ['teapot', 1, [0, 0, 0], [0, 0, 0.05761634]], ['toothbrush', 1, [0, 0, 0], [0, 0, 0.00701304]], ['toothpaste', 1, [0.50039816, -0.49999984, -0.49960184], [0, 0, 0.02]], ['toruslarge', 1, [0, 0, 0], [0, 0, 0.02080752]], ['torusmedium', 1, [0, 0, 0], [0, 0, 0.01394647]], ['torussmall', 1, [0, 0, 0], [0, 0, 0.00734874]], ['train', 1, [0, 0, 0], [0, 0, 0.04335064]], ['watch', 1, [0, 0, 0], [0, 0, 0.0424445]], ['waterbottle', 1, [0, 0, 0], [0, 0, 0.08697578]], ['wineglass', 1, [0, 0, 0], [0, 0, 0.0424445]], ['wristwatch', 1, [0, 0, 0], [0, 0, 0.06880109]]]
output_map = {}
for obj in obj_map:
output_map[obj[0]] = obj[2]
print(output_map) |
def AddLinear2TreeBranch(G,v1,v2,l):
vert1 = v1
vert2 = v2
for i in range(l):
vnew = max(G.vertices()) + 1
G.add_edges([[vert1, vnew],[vert2,vnew]])
vert1 = vert2
vert2 = vnew
return G
def Pinwheel(n):
G = Graph()
G.add_edges([[0,1],[1,2],[2,0]])
G = AddLinear2TreeBranch(G,0,1,n)
G = AddLinear2TreeBranch(G,1,2,n)
G = AddLinear2TreeBranch(G,2,0,n)
return G
def APinwheel(n):
G = Graph()
G.add_edges([[0,1],[1,2],[2,0]])
G = AddLinear2TreeBranch(G,0,1,n)
G = AddLinear2TreeBranch(G,1,2,n)
G = AddLinear2TreeBranch(G,0,2,n)
return G
| def add_linear2_tree_branch(G, v1, v2, l):
vert1 = v1
vert2 = v2
for i in range(l):
vnew = max(G.vertices()) + 1
G.add_edges([[vert1, vnew], [vert2, vnew]])
vert1 = vert2
vert2 = vnew
return G
def pinwheel(n):
g = graph()
G.add_edges([[0, 1], [1, 2], [2, 0]])
g = add_linear2_tree_branch(G, 0, 1, n)
g = add_linear2_tree_branch(G, 1, 2, n)
g = add_linear2_tree_branch(G, 2, 0, n)
return G
def a_pinwheel(n):
g = graph()
G.add_edges([[0, 1], [1, 2], [2, 0]])
g = add_linear2_tree_branch(G, 0, 1, n)
g = add_linear2_tree_branch(G, 1, 2, n)
g = add_linear2_tree_branch(G, 0, 2, n)
return G |
####################
# POST /account/ #
####################
def test_create_account(flask_client):
shrek = {
"username": "Shrek",
"email": "ceo@swamp.com"
}
res = flask_client.post('/account/', json=shrek)
assert res.status_code == 200
created_user = res.get_json()
# Assert POST requests returns something in JSON
assert created_user is not None
# Assert that the id field is present
assert created_user.get('id') is not None
# Assert data didn't change
assert created_user.get('username') == shrek['username']
assert created_user.get('email') == shrek['email']
def test_create_account_rejects_urlencoded(flask_client):
res = flask_client.post(
'/account/',
data={"username": "Donkey", "email": "donkey@swamp.com"}
)
assert res.status_code == 400
err_data = res.get_json()
assert "error" in err_data
assert "json" in err_data['error'].lower()
assert "supported" in err_data['error'].lower()
def test_create_account_empty_body(flask_client):
res = flask_client.post('/account/')
assert res.status_code == 400
assert "error" in res.get_json()
def test_create_account_no_username(flask_client):
user_no_name = {
"email": "noname@swamp.com"
}
res = flask_client.post('/account/', json=user_no_name)
err_data = res.get_json()
assert res.status_code == 400
assert "error" in err_data
assert "username" in err_data['error']
assert "required" in err_data['error']
def test_create_account_no_email(flask_client):
user_no_email = {
"username": "no-email-man"
}
res = flask_client.post('/account/', json=user_no_email)
err_data = res.get_json()
assert res.status_code == 400
assert "error" in err_data
assert "email" in err_data['error']
assert "required" in err_data['error']
def test_create_account_existing_email(flask_client):
# Create first user with this email
donkey = {
"username": "Donkey",
"email": "donkey@swamp.com"
}
res = flask_client.post('/account/', json=donkey)
assert res.status_code == 200
# Try to create another user with this same email, but another name
donkey["username"] = 'Dankey'
res = flask_client.post('/account/', json=donkey)
assert res.status_code == 409
err_data = res.get_json()
assert "error" in err_data
assert "email" in err_data['error']
assert "exists" in err_data['error']
######################
# GET /account/ #
######################
def test_get_account(flask_client, user_account):
res = flask_client.get('/account/', headers=[user_account.auth_header])
assert res.status_code == 200
data = res.get_json()
assert data is not None
assert "error" not in data
assert data.get('id') == user_account.id
assert data.get('email') == user_account.email
assert data.get('username') == user_account.username
def test_get_nonexistent_account(flask_client):
res = flask_client.get('/account/', headers=[('Authorization', 'Bearer 1337322696969')])
assert res.status_code == 404
data = res.get_json()
assert "error" in data
assert "account" in data['error'].lower()
assert "not found" in data['error']
def test_get_account_no_auth(flask_client):
# Basically check that we didn't forget to add @auth_required
# Headers, error msg, etc. are covered by test_auth tests
res = flask_client.get('/account/')
assert res.status_code == 401
######################
# DELETE /account/ #
######################
def test_delete_account(flask_client, user_account):
res = flask_client.delete('/account/', headers=[user_account.auth_header])
assert res.status_code == 200
get_deleted_user_res = flask_client.get(f'/users/{user_account.id}')
assert get_deleted_user_res.status_code == 404
def test_repeated_delete_account(flask_client, user_account):
res = flask_client.delete('/account/', headers=[user_account.auth_header])
assert res.status_code == 200
del_again_res = flask_client.delete('/account/', headers=[user_account.auth_header])
assert del_again_res.status_code == 404
assert "error" in del_again_res.get_json()
assert "already deleted" in del_again_res.get_json()['error']
def test_delete_account_no_auth(flask_client):
res = flask_client.delete('/account/')
assert res.status_code == 401
| def test_create_account(flask_client):
shrek = {'username': 'Shrek', 'email': 'ceo@swamp.com'}
res = flask_client.post('/account/', json=shrek)
assert res.status_code == 200
created_user = res.get_json()
assert created_user is not None
assert created_user.get('id') is not None
assert created_user.get('username') == shrek['username']
assert created_user.get('email') == shrek['email']
def test_create_account_rejects_urlencoded(flask_client):
res = flask_client.post('/account/', data={'username': 'Donkey', 'email': 'donkey@swamp.com'})
assert res.status_code == 400
err_data = res.get_json()
assert 'error' in err_data
assert 'json' in err_data['error'].lower()
assert 'supported' in err_data['error'].lower()
def test_create_account_empty_body(flask_client):
res = flask_client.post('/account/')
assert res.status_code == 400
assert 'error' in res.get_json()
def test_create_account_no_username(flask_client):
user_no_name = {'email': 'noname@swamp.com'}
res = flask_client.post('/account/', json=user_no_name)
err_data = res.get_json()
assert res.status_code == 400
assert 'error' in err_data
assert 'username' in err_data['error']
assert 'required' in err_data['error']
def test_create_account_no_email(flask_client):
user_no_email = {'username': 'no-email-man'}
res = flask_client.post('/account/', json=user_no_email)
err_data = res.get_json()
assert res.status_code == 400
assert 'error' in err_data
assert 'email' in err_data['error']
assert 'required' in err_data['error']
def test_create_account_existing_email(flask_client):
donkey = {'username': 'Donkey', 'email': 'donkey@swamp.com'}
res = flask_client.post('/account/', json=donkey)
assert res.status_code == 200
donkey['username'] = 'Dankey'
res = flask_client.post('/account/', json=donkey)
assert res.status_code == 409
err_data = res.get_json()
assert 'error' in err_data
assert 'email' in err_data['error']
assert 'exists' in err_data['error']
def test_get_account(flask_client, user_account):
res = flask_client.get('/account/', headers=[user_account.auth_header])
assert res.status_code == 200
data = res.get_json()
assert data is not None
assert 'error' not in data
assert data.get('id') == user_account.id
assert data.get('email') == user_account.email
assert data.get('username') == user_account.username
def test_get_nonexistent_account(flask_client):
res = flask_client.get('/account/', headers=[('Authorization', 'Bearer 1337322696969')])
assert res.status_code == 404
data = res.get_json()
assert 'error' in data
assert 'account' in data['error'].lower()
assert 'not found' in data['error']
def test_get_account_no_auth(flask_client):
res = flask_client.get('/account/')
assert res.status_code == 401
def test_delete_account(flask_client, user_account):
res = flask_client.delete('/account/', headers=[user_account.auth_header])
assert res.status_code == 200
get_deleted_user_res = flask_client.get(f'/users/{user_account.id}')
assert get_deleted_user_res.status_code == 404
def test_repeated_delete_account(flask_client, user_account):
res = flask_client.delete('/account/', headers=[user_account.auth_header])
assert res.status_code == 200
del_again_res = flask_client.delete('/account/', headers=[user_account.auth_header])
assert del_again_res.status_code == 404
assert 'error' in del_again_res.get_json()
assert 'already deleted' in del_again_res.get_json()['error']
def test_delete_account_no_auth(flask_client):
res = flask_client.delete('/account/')
assert res.status_code == 401 |
def autonomous_setup():
pass
def autonomous_main():
print('Running auto main ...')
def teleop_setup():
pass
def teleop_main():
print('Running teleop main ...')
| def autonomous_setup():
pass
def autonomous_main():
print('Running auto main ...')
def teleop_setup():
pass
def teleop_main():
print('Running teleop main ...') |
expected_output = {
"active_translations": {"dynamic": 1, "extended": 1, "static": 0, "total": 1},
"cef_punted_pkts": 0,
"cef_translated_pkts": 4,
"dynamic_mappings": {
"inside_source": {
"id": {
3: {
"access_list": "99",
"interface": "Serial0/0",
"match": "access-list 99 interface Serial0/0",
"refcount": 1,
}
}
}
},
"expired_translations": 0,
"hits": 3,
"interfaces": {"inside": ["FastEthernet0/0"], "outside": ["Serial0/0"]},
"misses": 1,
"queued_pkts": 0,
}
| expected_output = {'active_translations': {'dynamic': 1, 'extended': 1, 'static': 0, 'total': 1}, 'cef_punted_pkts': 0, 'cef_translated_pkts': 4, 'dynamic_mappings': {'inside_source': {'id': {3: {'access_list': '99', 'interface': 'Serial0/0', 'match': 'access-list 99 interface Serial0/0', 'refcount': 1}}}}, 'expired_translations': 0, 'hits': 3, 'interfaces': {'inside': ['FastEthernet0/0'], 'outside': ['Serial0/0']}, 'misses': 1, 'queued_pkts': 0} |
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
load("@bazelrio//:deps_utils.bzl", "cc_library_shared")
def setup_ni_2022_2_3_dependencies():
maybe(
http_archive,
"__bazelrio_edu_wpi_first_ni-libraries_chipobject_linuxathena",
url = "https://frcmaven.wpi.edu/release/edu/wpi/first/ni-libraries/chipobject/2022.2.3/chipobject-2022.2.3-linuxathena.zip",
sha256 = "fdf47ae5ce052edd82ba2b6e007faabf9286f87b079e3789afc3235733d5475c",
build_file_content = cc_library_shared,
)
maybe(
http_archive,
"__bazelrio_edu_wpi_first_ni-libraries_visa_linuxathena",
url = "https://frcmaven.wpi.edu/release/edu/wpi/first/ni-libraries/visa/2022.2.3/visa-2022.2.3-linuxathena.zip",
sha256 = "014fff5a4684f3c443cbed8c52f19687733dd7053a98a1dad89941801e0b7930",
build_file_content = cc_library_shared,
)
maybe(
http_archive,
"__bazelrio_edu_wpi_first_ni-libraries_runtime_linuxathena",
url = "https://frcmaven.wpi.edu/release/edu/wpi/first/ni-libraries/runtime/2022.2.3/runtime-2022.2.3-linuxathena.zip",
sha256 = "186d1b41e96c5d761705221afe0b9f488d1ce86e8149a7b0afdc3abc93097266",
build_file_content = cc_library_shared,
)
maybe(
http_archive,
"__bazelrio_edu_wpi_first_ni-libraries_netcomm_linuxathena",
url = "https://frcmaven.wpi.edu/release/edu/wpi/first/ni-libraries/netcomm/2022.2.3/netcomm-2022.2.3-linuxathena.zip",
sha256 = "f56c2fc0943f27f174642664b37fb4529d6f2b6405fe41a639a4c9f31e175c73",
build_file_content = cc_library_shared,
)
| load('@bazel_tools//tools/build_defs/repo:http.bzl', 'http_archive')
load('@bazel_tools//tools/build_defs/repo:utils.bzl', 'maybe')
load('@bazelrio//:deps_utils.bzl', 'cc_library_shared')
def setup_ni_2022_2_3_dependencies():
maybe(http_archive, '__bazelrio_edu_wpi_first_ni-libraries_chipobject_linuxathena', url='https://frcmaven.wpi.edu/release/edu/wpi/first/ni-libraries/chipobject/2022.2.3/chipobject-2022.2.3-linuxathena.zip', sha256='fdf47ae5ce052edd82ba2b6e007faabf9286f87b079e3789afc3235733d5475c', build_file_content=cc_library_shared)
maybe(http_archive, '__bazelrio_edu_wpi_first_ni-libraries_visa_linuxathena', url='https://frcmaven.wpi.edu/release/edu/wpi/first/ni-libraries/visa/2022.2.3/visa-2022.2.3-linuxathena.zip', sha256='014fff5a4684f3c443cbed8c52f19687733dd7053a98a1dad89941801e0b7930', build_file_content=cc_library_shared)
maybe(http_archive, '__bazelrio_edu_wpi_first_ni-libraries_runtime_linuxathena', url='https://frcmaven.wpi.edu/release/edu/wpi/first/ni-libraries/runtime/2022.2.3/runtime-2022.2.3-linuxathena.zip', sha256='186d1b41e96c5d761705221afe0b9f488d1ce86e8149a7b0afdc3abc93097266', build_file_content=cc_library_shared)
maybe(http_archive, '__bazelrio_edu_wpi_first_ni-libraries_netcomm_linuxathena', url='https://frcmaven.wpi.edu/release/edu/wpi/first/ni-libraries/netcomm/2022.2.3/netcomm-2022.2.3-linuxathena.zip', sha256='f56c2fc0943f27f174642664b37fb4529d6f2b6405fe41a639a4c9f31e175c73', build_file_content=cc_library_shared) |
#
# @lc app=leetcode id=712 lang=python3
#
# [712] Minimum ASCII Delete Sum for Two Strings
#
# @lc code=start
class Solution:
def minimumDeleteSum(self, s1: str, s2: str) -> int:
m, n = len(s1), len(s2)
dp = [[0] * (n + 1) for _ in range(m + 1)]
for i in range(m - 1, -1, -1):
dp[i][n] = dp[i + 1][n] + ord(s1[i])
for j in range(n - 1, -1, -1):
dp[m][j] = dp[m][j + 1] + ord(s2[j])
for i in range(m - 1, -1, -1):
for j in range(n - 1, -1, -1):
if s1[i] == s2[j]:
dp[i][j] = dp[i + 1][j + 1]
else:
dp[i][j] = min(dp[i + 1][j] + ord(s1[i]), dp[i][j + 1] + ord(s2[j]))
return dp[0][0]
# @lc code=end
| class Solution:
def minimum_delete_sum(self, s1: str, s2: str) -> int:
(m, n) = (len(s1), len(s2))
dp = [[0] * (n + 1) for _ in range(m + 1)]
for i in range(m - 1, -1, -1):
dp[i][n] = dp[i + 1][n] + ord(s1[i])
for j in range(n - 1, -1, -1):
dp[m][j] = dp[m][j + 1] + ord(s2[j])
for i in range(m - 1, -1, -1):
for j in range(n - 1, -1, -1):
if s1[i] == s2[j]:
dp[i][j] = dp[i + 1][j + 1]
else:
dp[i][j] = min(dp[i + 1][j] + ord(s1[i]), dp[i][j + 1] + ord(s2[j]))
return dp[0][0] |
installed_apps = (
'core',
'resources',
'arenas',
'sciences',
'military',
'profiles',
'matches',
'combat',
)
| installed_apps = ('core', 'resources', 'arenas', 'sciences', 'military', 'profiles', 'matches', 'combat') |
cont = 0
param = 10
while True:
cont = 0
num = int(input('Quer ver a tabuada de qual valor? '))
if num < 0:
break
while cont < 10:
cont = cont + 1
tab = num * cont
print(f'{num} x {cont} = {tab}')
print('PROGRAMA ENCERRADO')
| cont = 0
param = 10
while True:
cont = 0
num = int(input('Quer ver a tabuada de qual valor? '))
if num < 0:
break
while cont < 10:
cont = cont + 1
tab = num * cont
print(f'{num} x {cont} = {tab}')
print('PROGRAMA ENCERRADO') |
pipe = make_pipeline(preprocessor, LinearRegression())
res = -cross_val_score(
pipe, with_age, with_age['Age'], n_jobs=1, cv=100,
scoring='neg_mean_absolute_error'
)
sns.distplot(res)
sns.distplot(with_age.Age)
print(f'{res.mean()} +/- {res.std()}')
| pipe = make_pipeline(preprocessor, linear_regression())
res = -cross_val_score(pipe, with_age, with_age['Age'], n_jobs=1, cv=100, scoring='neg_mean_absolute_error')
sns.distplot(res)
sns.distplot(with_age.Age)
print(f'{res.mean()} +/- {res.std()}') |
#Finding the percentage
if __name__ == '__main__':
n = int(raw_input())
student_marks = {}
for _ in range(n):
line = raw_input().split()
name, scores = line[0], line[1:]
scores = map(float, scores)
student_marks[name] = scores
query_name = raw_input()
scores=student_marks[query_name]
#scores=scores.split()
sum1=scores[0]+scores[1]+scores[2]
avg=round(sum1/3,2)
print("%.2f" % avg)
| if __name__ == '__main__':
n = int(raw_input())
student_marks = {}
for _ in range(n):
line = raw_input().split()
(name, scores) = (line[0], line[1:])
scores = map(float, scores)
student_marks[name] = scores
query_name = raw_input()
scores = student_marks[query_name]
sum1 = scores[0] + scores[1] + scores[2]
avg = round(sum1 / 3, 2)
print('%.2f' % avg) |
# Problem : https://codeforces.com/problemset/problem/855/B
n, p, q, r = map(int, input().split())
arr = [int(i) for i in input().split()]
Pmax = [-10**9] * n
Pmax[0] = p * arr[0]
for i in range(1, n):
Pmax[i] = max(Pmax[i-1], p * arr[i])
Smax = [-10**9] * n
Smax[n-1] = r * arr[n-1]
for i in range(n-2, -1, -1):
Smax[i] = max(Smax[i+1], r * arr[i])
ans = Pmax[0] + q * arr[0] + Smax[0]
for i in range(1, n):
ans = max(ans, Pmax[i] + q * arr[i] + Smax[i])
print(ans)
| (n, p, q, r) = map(int, input().split())
arr = [int(i) for i in input().split()]
pmax = [-10 ** 9] * n
Pmax[0] = p * arr[0]
for i in range(1, n):
Pmax[i] = max(Pmax[i - 1], p * arr[i])
smax = [-10 ** 9] * n
Smax[n - 1] = r * arr[n - 1]
for i in range(n - 2, -1, -1):
Smax[i] = max(Smax[i + 1], r * arr[i])
ans = Pmax[0] + q * arr[0] + Smax[0]
for i in range(1, n):
ans = max(ans, Pmax[i] + q * arr[i] + Smax[i])
print(ans) |
class WhatThePatchException(Exception):
pass
class HunkException(WhatThePatchException):
def __init__(self, msg, hunk=None):
self.hunk = hunk
if hunk is not None:
super(HunkException, self).__init__(
"{msg}, in hunk #{n}".format(msg=msg, n=hunk)
)
else:
super(HunkException, self).__init__(msg)
class ApplyException(WhatThePatchException):
pass
class SubprocessException(ApplyException):
def __init__(self, msg, code):
super(SubprocessException, self).__init__(msg)
self.code = code
class HunkApplyException(HunkException, ApplyException, ValueError):
pass
class ParseException(HunkException, ValueError):
pass
| class Whatthepatchexception(Exception):
pass
class Hunkexception(WhatThePatchException):
def __init__(self, msg, hunk=None):
self.hunk = hunk
if hunk is not None:
super(HunkException, self).__init__('{msg}, in hunk #{n}'.format(msg=msg, n=hunk))
else:
super(HunkException, self).__init__(msg)
class Applyexception(WhatThePatchException):
pass
class Subprocessexception(ApplyException):
def __init__(self, msg, code):
super(SubprocessException, self).__init__(msg)
self.code = code
class Hunkapplyexception(HunkException, ApplyException, ValueError):
pass
class Parseexception(HunkException, ValueError):
pass |
class Request:
pickup_deadline = 0
def __init__(self, request_id, start_lon, start_lat, end_lon, end_lat, start_node_id, end_node_id, release_time=None, delivery_deadline=None, pickup_deadline=None):
self.request_id = request_id
self.start_lon = start_lon
self.start_lat = start_lat
self.end_lon = end_lon
self.end_lat = end_lat
self.start_node_id = start_node_id
self.end_node_id = end_node_id
self.release_time = release_time
self.delivery_deadline = delivery_deadline
def config_pickup_deadline(self, t):
self.pickup_deadline = t
| class Request:
pickup_deadline = 0
def __init__(self, request_id, start_lon, start_lat, end_lon, end_lat, start_node_id, end_node_id, release_time=None, delivery_deadline=None, pickup_deadline=None):
self.request_id = request_id
self.start_lon = start_lon
self.start_lat = start_lat
self.end_lon = end_lon
self.end_lat = end_lat
self.start_node_id = start_node_id
self.end_node_id = end_node_id
self.release_time = release_time
self.delivery_deadline = delivery_deadline
def config_pickup_deadline(self, t):
self.pickup_deadline = t |
# AUTOGENERATED! DO NOT EDIT! File to edit: 00_core.ipynb (unless otherwise specified).
__all__ = ['do_something']
# Cell
def do_something():
print('brztt') | __all__ = ['do_something']
def do_something():
print('brztt') |
class C1:
def __init__(self, value):
self.value = value
def __bytes__(self):
return self.value
c1 = C1(b"class 1")
print(bytes(c1))
| class C1:
def __init__(self, value):
self.value = value
def __bytes__(self):
return self.value
c1 = c1(b'class 1')
print(bytes(c1)) |
###############################################################
############# FIND THE LAND LORDS ###############
###############################################################
#Residential props ['100','113','150','160','210','220','230','240','330']
#df_tcad['res'] = (df_tcad.res | df_tcad.land_use.isin(res_code))
#df_tcad = df_tcad.loc[df_tcad.res]
df_tcad.address.fillna('MISSING ADDRESS',inplace=True) #change to 0 for fuzz match
df_tcad.owner_add.fillna('NO ADDRESS FOUND',inplace=True) #change to 0 for fuzz match
#Determine landlord criteria
df_tcad['single_unit'] = np.where(df_tcad.units_x>1, False, True)
#See if mailing address and address match up is 75 too HIGH???
df_tcad['score'] = df_tcad.apply(lambda x: fuzz.partial_ratio(x.address,x.owner_add),axis=1)
df_tcad['add_match'] = np.where((df_tcad.score > 70), True, False)
#Multiple property owner
df_tcad['multi_own'] = df_tcad.duplicated(subset='py_owner_i') #multiple owner ids
df_tcad['multi_own1'] = df_tcad.duplicated(subset='prop_owner') #multiple owner names
#df_tcad['multi_own2'] = df_tcad.duplicated(subset='mail_add_2') #multiple owner_add subsets
df_tcad['multi_own3'] = df_tcad.duplicated(subset='owner_add') #multiple owner_add
#props with no address should be nan
df_tcad.address.replace('MISSING ADDRESS',np.nan,inplace=True)
df_tcad.owner_add.replace('NO ADDRESS FOUND',np.nan,inplace=True) #change to 0 for fuzz match
#If single unit addresses match zips match not a biz and not a multi owner
#maybe include hs figure out how to use to get corner cases?
df_ll = df_tcad.loc[df_tcad.res & (~((df_tcad.single_unit)&(df_tcad.add_match)&(~(df_tcad.multi_own|df_tcad.multi_own1|df_tcad.multi_own3))))]
#Drop non residential locations and city properties that slipped through the algorithm
df_ll = df_ll.loc[~(df_ll.address=='VARIOUS LOCATIONS')] #No idea what these are but they dont belong
df_ll = df_ll.loc[~(df_ll.address=='*VARIOUS LOCATIONS')] #No idea what these are but they dont belong
df_ll = df_ll.loc[~(df_ll.owner_add.str.contains('PO BOX 1088 ',na=False))] #City of Austin
df_ll = df_ll.loc[~(df_ll.owner_add.str.contains('PO BOX 1748 ',na=False))] #Travis County
df_ll = df_ll.loc[df_ll.address.str.len()>=5] #get rid of properties with bad addresses as they all have none type prop_owner (cant filter out weird bug?)
df_ll = df_ll.loc[~(df_ll.owner_add.str.contains('PO BOX 15426',na=False))] #State of Texas
df_ll = df_ll.loc[~(df_ll.owner_add.str.contains('PO BOX 17126',na=False))] #Land Fills why are these coded res?
df_ll = df_ll.loc[df_ll.land_use!=640] #schools
com_type = ['OFF/RETAIL (SFR)', 'COMMERCIAL SPACE CONDOS', 'SM OFFICE CONDO', 'LG OFFICE CONDO', 'OFFICE (SMALL)','SM STORE <10K SF', 'STRIP CTR <10000', 'WAREHOUSE <20000', "MF'D COMMCL BLDG", 'OFFICE LG >35000', 'MEDICAL OFF <10K','PARKING GARAGE']
df_ll = df_ll.loc[~(df_ll.type1.isin(com_type)&(~df_ll.land_use.isin(res_code)))] #office condos that are not mixed use
#Handle more missing
df_ll.X_x = df_ll.groupby(['st_name','st_number']).X_x.transform('ffill')
df_ll.X_x = df_ll.groupby(['st_name','st_number']).X_x.transform('bfill')
df_ll.Y_x = df_ll.groupby(['st_name','st_number']).Y_x.transform('ffill')
df_ll.Y_x = df_ll.groupby(['st_name','st_number']).Y_x.transform('bfill')
#Combine units with same prop owner and same address
#df_ll.units_x = df_ll.groupby(['address','prop_owner'])['units_x'].transform('sum')
#df_ll.drop_duplicates(['address','prop_owner'],inplace=True)
#Add in values from eviction data
#df_e = pd.read_csv('Evictions_filled_partial_9_26.csv')
#df_e['prop_id'] = df_e['Property ID']
#df_e = df_e.loc[df_e.prop_id.notnull()]
#df_eid = df_e[['prop_id','Lat','Long']]
#df_eid = df_eid.merge(df_tcad,on='prop_id',how='left')
#cols = df_tcad.columns.tolist()
#df_ll = df_eid.merge(df_ll,on=cols,how='outer').drop_duplicates('prop_id')
#df_ll.Y_x.fillna(df_ll.Lat,inplace=True)
#df_ll.X_x.fillna(df_ll.Long,inplace=True)
#df_e.loc[~df_e.prop_id.isin(df_ll.prop_id.values)]
#Fill in imputed values
df_ll.units_x.fillna(df_ll['unit_est'],inplace=True)
#Round it and correct
df_ll.units_x = round(df_ll.units_x)
df_ll.units_x = np.where(df_ll.units_x<1, 1, df_ll.units_x)
#Fill in with property unit estimations on ly where the low of the range estimate is higher then the imputated value
df_ll.units_x = np.where((df_ll.low>df_ll.units_x)&(df_ll.known==False),df_ll.low,df_ll.units_x)
#Get rid of estimates from type that are above 1k
df_ll.units_x = np.where((df_ll.units_x>1000),np.nan,df_ll.units_x)
#Export for dedupe and affiliation clustering
df_ll_dup = df_ll[['prop_owner','py_owner_i','address','owner_add','prop_id','DBA']]
df_ll_dup.to_csv('./land_lords.csv',index=False)
df_ll['land_lord_res'] = (((df_ll.units_x==1)&df_ll.add_match) | ((df_ll.hs=='T')&(df_ll.units_x==1)))
#df_ll.loc[(df_ll.hs=='T')&(df_ll.units_x>2)&(df_ll.known)][['prop_owner','owner_add','address','units_x','type1','low']]
#Export shape file and csv file for prelim check in qGIS
#coor_to_geometry(df_ll,col=['X_x_x','Y_x_x'],out='geometry')
#keep = ['prop_id', 'py_owner_i', 'prop_owner', 'DBA', 'address', 'owner_add','units_x','geometry']
#gdf_ll = geopandas.GeoDataFrame(df_ll,geometry='geometry')
#clean_up(gdf_ll,cols=keep,delete=False)
#gdf_ll.to_file("all_landlords.shp")
#pid= []
#cols = [ 'desc' ,'DBA' ,'address' ,'owner_add' ,'type1']
#for col in cols:
# pid.append(df_tcad.loc[df_tcad[col].str.contains('COMMERCIAL',na=False)].prop_id.tolist())
#
#pid = list(set(pid))
#
#df_tcad.loc[~df_tcad.prop_id.isin(pid)]
| df_tcad.address.fillna('MISSING ADDRESS', inplace=True)
df_tcad.owner_add.fillna('NO ADDRESS FOUND', inplace=True)
df_tcad['single_unit'] = np.where(df_tcad.units_x > 1, False, True)
df_tcad['score'] = df_tcad.apply(lambda x: fuzz.partial_ratio(x.address, x.owner_add), axis=1)
df_tcad['add_match'] = np.where(df_tcad.score > 70, True, False)
df_tcad['multi_own'] = df_tcad.duplicated(subset='py_owner_i')
df_tcad['multi_own1'] = df_tcad.duplicated(subset='prop_owner')
df_tcad['multi_own3'] = df_tcad.duplicated(subset='owner_add')
df_tcad.address.replace('MISSING ADDRESS', np.nan, inplace=True)
df_tcad.owner_add.replace('NO ADDRESS FOUND', np.nan, inplace=True)
df_ll = df_tcad.loc[df_tcad.res & ~(df_tcad.single_unit & df_tcad.add_match & ~(df_tcad.multi_own | df_tcad.multi_own1 | df_tcad.multi_own3))]
df_ll = df_ll.loc[~(df_ll.address == 'VARIOUS LOCATIONS')]
df_ll = df_ll.loc[~(df_ll.address == '*VARIOUS LOCATIONS')]
df_ll = df_ll.loc[~df_ll.owner_add.str.contains('PO BOX 1088 ', na=False)]
df_ll = df_ll.loc[~df_ll.owner_add.str.contains('PO BOX 1748 ', na=False)]
df_ll = df_ll.loc[df_ll.address.str.len() >= 5]
df_ll = df_ll.loc[~df_ll.owner_add.str.contains('PO BOX 15426', na=False)]
df_ll = df_ll.loc[~df_ll.owner_add.str.contains('PO BOX 17126', na=False)]
df_ll = df_ll.loc[df_ll.land_use != 640]
com_type = ['OFF/RETAIL (SFR)', 'COMMERCIAL SPACE CONDOS', 'SM OFFICE CONDO', 'LG OFFICE CONDO', 'OFFICE (SMALL)', 'SM STORE <10K SF', 'STRIP CTR <10000', 'WAREHOUSE <20000', "MF'D COMMCL BLDG", 'OFFICE LG >35000', 'MEDICAL OFF <10K', 'PARKING GARAGE']
df_ll = df_ll.loc[~(df_ll.type1.isin(com_type) & ~df_ll.land_use.isin(res_code))]
df_ll.X_x = df_ll.groupby(['st_name', 'st_number']).X_x.transform('ffill')
df_ll.X_x = df_ll.groupby(['st_name', 'st_number']).X_x.transform('bfill')
df_ll.Y_x = df_ll.groupby(['st_name', 'st_number']).Y_x.transform('ffill')
df_ll.Y_x = df_ll.groupby(['st_name', 'st_number']).Y_x.transform('bfill')
df_ll.units_x.fillna(df_ll['unit_est'], inplace=True)
df_ll.units_x = round(df_ll.units_x)
df_ll.units_x = np.where(df_ll.units_x < 1, 1, df_ll.units_x)
df_ll.units_x = np.where((df_ll.low > df_ll.units_x) & (df_ll.known == False), df_ll.low, df_ll.units_x)
df_ll.units_x = np.where(df_ll.units_x > 1000, np.nan, df_ll.units_x)
df_ll_dup = df_ll[['prop_owner', 'py_owner_i', 'address', 'owner_add', 'prop_id', 'DBA']]
df_ll_dup.to_csv('./land_lords.csv', index=False)
df_ll['land_lord_res'] = (df_ll.units_x == 1) & df_ll.add_match | (df_ll.hs == 'T') & (df_ll.units_x == 1) |
#
# @lc app=leetcode id=1143 lang=python3
#
# [1143] Longest Common Subsequence
#
# https://leetcode.com/problems/longest-common-subsequence/description/
#
# algorithms
# Medium (58.79%)
# Likes: 4759
# Dislikes: 56
# Total Accepted: 295.2K
# Total Submissions: 502K
# Testcase Example: '"abcde"\n"ace"'
#
# Given two strings text1 and text2, return the length of their longest common
# subsequence. If there is no common subsequence, return 0.
#
# A subsequence of a string is a new string generated from the original string
# with some characters (can be none) deleted without changing the relative
# order of the remaining characters.
#
#
# For example, "ace" is a subsequence of "abcde".
#
#
# A common subsequence of two strings is a subsequence that is common to both
# strings.
#
#
# Example 1:
#
#
# Input: text1 = "abcde", text2 = "ace"
# Output: 3
# Explanation: The longest common subsequence is "ace" and its length is 3.
#
#
# Example 2:
#
#
# Input: text1 = "abc", text2 = "abc"
# Output: 3
# Explanation: The longest common subsequence is "abc" and its length is 3.
#
#
# Example 3:
#
#
# Input: text1 = "abc", text2 = "def"
# Output: 0
# Explanation: There is no such common subsequence, so the result is 0.
#
#
#
# Constraints:
#
#
# 1 <= text1.length, text2.length <= 1000
# text1 and text2 consist of only lowercase English characters.
#
#
#
# @lc code=start
class Solution:
def longestCommonSubsequence(self, text1: str, text2: str) -> int:
m = len(text1)
n = len(text2)
dp = [[0] * (n+1) for _ in range(m+1)]
for i in range(1, m+1):
for j in range(1, n+1):
if text1[i-1] == text2[j-1]:
dp[i][j] = dp[i-1][j-1] + 1
else:
dp[i][j] = max(dp[i][j-1], dp[i-1][j])
return dp[-1][-1]
# def longestCommonSubsequence(self, text1: str, text2: str) -> int:
# m, n = len(text1), len(text2)
# dp = [[0] * n for _ in range(m)]
# for i in range(m):
# if text2[0] in text1[:i+1]:
# dp[i][0] = 1
# for i in range(n):
# if text1[0] in text2[:i+1]:
# dp[0][i] = 1
# for i in range(1, m):
# for j in range(1, n):
# if text1[i] == text2[j]:
# dp[i][j] = dp[i-1][j-1] + 1
# else:
# dp[i][j] = max(dp[i-1][j], dp[i][j-1])
# return dp[-1][-1]
# @lc code=end
| class Solution:
def longest_common_subsequence(self, text1: str, text2: str) -> int:
m = len(text1)
n = len(text2)
dp = [[0] * (n + 1) for _ in range(m + 1)]
for i in range(1, m + 1):
for j in range(1, n + 1):
if text1[i - 1] == text2[j - 1]:
dp[i][j] = dp[i - 1][j - 1] + 1
else:
dp[i][j] = max(dp[i][j - 1], dp[i - 1][j])
return dp[-1][-1] |
class Solution:
def closestDivisors(self, num: int) -> List[int]:
def largest(n):
res = [1, n]
for i in range(2, int(n**0.5)+1):
if n % i == 0:
res = [i, n//i]
return res
r1, r2 = largest(num+1)
r3, r4 = largest(num+2)
return [r1, r2] if abs(r1 - r2) < abs(r3- r4) else [r3,r4]
class Solution:
def closestDivisors(self, x):
for a in range(int((x + 2)**0.5), 0, -1):
if (x + 1) % a == 0:
return [a, (x + 1) // a]
if (x + 2) % a == 0:
return [a, (x + 2) // a]
class Solution:
def closestDivisors(self, x):
return next([a, y // a] for a in range(int((x + 2)**0.5), 0, -1) for y in [x + 1, x + 2] if not y % a) | class Solution:
def closest_divisors(self, num: int) -> List[int]:
def largest(n):
res = [1, n]
for i in range(2, int(n ** 0.5) + 1):
if n % i == 0:
res = [i, n // i]
return res
(r1, r2) = largest(num + 1)
(r3, r4) = largest(num + 2)
return [r1, r2] if abs(r1 - r2) < abs(r3 - r4) else [r3, r4]
class Solution:
def closest_divisors(self, x):
for a in range(int((x + 2) ** 0.5), 0, -1):
if (x + 1) % a == 0:
return [a, (x + 1) // a]
if (x + 2) % a == 0:
return [a, (x + 2) // a]
class Solution:
def closest_divisors(self, x):
return next(([a, y // a] for a in range(int((x + 2) ** 0.5), 0, -1) for y in [x + 1, x + 2] if not y % a)) |
def new(name):
print("Hi, " + name)
player = {
"name": "Cris",
"age": 40
}
| def new(name):
print('Hi, ' + name)
player = {'name': 'Cris', 'age': 40} |
LAST_SEEN = {
"Last 1 Hour": 1,
"Last 2 Hours": 2,
"Last 6 Hours": 6,
"Last 12 Hours": 12,
"Last 24 Hours": 24,
"Last 48 Hours": 48,
"Last 72 Hours": 72,
"Last 7 Days": 7,
"Last 14 Days": 14,
"Last 21 Days": 21,
"Last 30 Days": 30,
"Last 60 Days": 60,
"Last 90 Days": 90,
"Last Year": 365
}
| last_seen = {'Last 1 Hour': 1, 'Last 2 Hours': 2, 'Last 6 Hours': 6, 'Last 12 Hours': 12, 'Last 24 Hours': 24, 'Last 48 Hours': 48, 'Last 72 Hours': 72, 'Last 7 Days': 7, 'Last 14 Days': 14, 'Last 21 Days': 21, 'Last 30 Days': 30, 'Last 60 Days': 60, 'Last 90 Days': 90, 'Last Year': 365} |
#
# PySNMP MIB module TERADICI-PCOIPv2-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/TERADICI-PCOIPv2-MIB
# Produced by pysmi-0.3.4 at Wed May 1 15:15:50 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")
ConstraintsIntersection, SingleValueConstraint, ValueRangeConstraint, ValueSizeConstraint, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "SingleValueConstraint", "ValueRangeConstraint", "ValueSizeConstraint", "ConstraintsUnion")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
Counter64, iso, Unsigned32, ModuleIdentity, IpAddress, Integer32, enterprises, Gauge32, NotificationType, Bits, Counter32, MibIdentifier, TimeTicks, MibScalar, MibTable, MibTableRow, MibTableColumn, ObjectIdentity = mibBuilder.importSymbols("SNMPv2-SMI", "Counter64", "iso", "Unsigned32", "ModuleIdentity", "IpAddress", "Integer32", "enterprises", "Gauge32", "NotificationType", "Bits", "Counter32", "MibIdentifier", "TimeTicks", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "ObjectIdentity")
TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString")
teraMibModule = ModuleIdentity((1, 3, 6, 1, 4, 1, 25071))
teraMibModule.setRevisions(('2012-01-28 10:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: teraMibModule.setRevisionsDescriptions(('Version 2 of the PCoIP MIB.',))
if mibBuilder.loadTexts: teraMibModule.setLastUpdated('201201281000Z')
if mibBuilder.loadTexts: teraMibModule.setOrganization('Teradici Corporation')
if mibBuilder.loadTexts: teraMibModule.setContactInfo(' Chris Topp Postal: 101-4621 Canada Way Burnaby, BC V5G 4X8 Canada Tel: +1 604 451 5800 Fax: +1 604 451 5818 E-mail: ctopp@teradici.com')
if mibBuilder.loadTexts: teraMibModule.setDescription('MIB describing PC-over-IP (tm) statistics.')
teraProducts = MibIdentifier((1, 3, 6, 1, 4, 1, 25071, 1))
teraPcoipV2 = MibIdentifier((1, 3, 6, 1, 4, 1, 25071, 1, 2))
teraPcoipGenStats = MibIdentifier((1, 3, 6, 1, 4, 1, 25071, 1, 2, 1))
teraPcoipNetStats = MibIdentifier((1, 3, 6, 1, 4, 1, 25071, 1, 2, 2))
teraPcoipAudioStats = MibIdentifier((1, 3, 6, 1, 4, 1, 25071, 1, 2, 3))
teraPcoipImagingStats = MibIdentifier((1, 3, 6, 1, 4, 1, 25071, 1, 2, 4))
teraPcoipUSBStats = MibIdentifier((1, 3, 6, 1, 4, 1, 25071, 1, 2, 5))
teraPcoipGenDevices = MibIdentifier((1, 3, 6, 1, 4, 1, 25071, 1, 2, 6))
teraPcoipImagingDevices = MibIdentifier((1, 3, 6, 1, 4, 1, 25071, 1, 2, 7))
teraPcoipUSBDevices = MibIdentifier((1, 3, 6, 1, 4, 1, 25071, 1, 2, 8))
pcoipGenStatsTable = MibTable((1, 3, 6, 1, 4, 1, 25071, 1, 2, 1, 1), )
if mibBuilder.loadTexts: pcoipGenStatsTable.setStatus('current')
if mibBuilder.loadTexts: pcoipGenStatsTable.setDescription('The PCoIP General statistics table.')
pcoipGenStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 25071, 1, 2, 1, 1, 1), ).setIndexNames((0, "TERADICI-PCOIPv2-MIB", "pcoipGenStatsSessionNumber"))
if mibBuilder.loadTexts: pcoipGenStatsEntry.setStatus('current')
if mibBuilder.loadTexts: pcoipGenStatsEntry.setDescription('An entry in the PCoIP general statistics table.')
pcoipGenStatsSessionNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 1, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 1))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipGenStatsSessionNumber.setStatus('current')
if mibBuilder.loadTexts: pcoipGenStatsSessionNumber.setDescription('PCoIP session number used to link PCoIP statistics to session.')
pcoipGenStatsPacketsSent = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 1, 1, 1, 2), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipGenStatsPacketsSent.setStatus('current')
if mibBuilder.loadTexts: pcoipGenStatsPacketsSent.setDescription('Total number of packets that have been transmitted since the PCoIP session started.')
pcoipGenStatsBytesSent = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 1, 1, 1, 3), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipGenStatsBytesSent.setStatus('current')
if mibBuilder.loadTexts: pcoipGenStatsBytesSent.setDescription('Total number of bytes that have been transmitted since the PCoIP session started.')
pcoipGenStatsPacketsReceived = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 1, 1, 1, 4), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipGenStatsPacketsReceived.setStatus('current')
if mibBuilder.loadTexts: pcoipGenStatsPacketsReceived.setDescription('Total number of packets that have been received since the PCoIP session started.')
pcoipGenStatsBytesReceived = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 1, 1, 1, 5), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipGenStatsBytesReceived.setStatus('current')
if mibBuilder.loadTexts: pcoipGenStatsBytesReceived.setDescription('Total number of bytes that have been received since the PCoIP session started.')
pcoipGenStatsTxPacketsLost = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 1, 1, 1, 6), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipGenStatsTxPacketsLost.setStatus('current')
if mibBuilder.loadTexts: pcoipGenStatsTxPacketsLost.setDescription('Total number of transmit packets that have been lost since the PCoIP session started.')
pcoipGenStatsSessionDuration = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 1, 1, 1, 7), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipGenStatsSessionDuration.setStatus('current')
if mibBuilder.loadTexts: pcoipGenStatsSessionDuration.setDescription('An incrementing number that represents the total number of seconds the PCoIP session has been open.')
pcoipNetStatsTable = MibTable((1, 3, 6, 1, 4, 1, 25071, 1, 2, 2, 1), )
if mibBuilder.loadTexts: pcoipNetStatsTable.setStatus('current')
if mibBuilder.loadTexts: pcoipNetStatsTable.setDescription('The PCoIP Network statistics table.')
pcoipNetStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 25071, 1, 2, 2, 1, 1), ).setIndexNames((0, "TERADICI-PCOIPv2-MIB", "pcoipNetStatsSessionNumber"))
if mibBuilder.loadTexts: pcoipNetStatsEntry.setStatus('current')
if mibBuilder.loadTexts: pcoipNetStatsEntry.setDescription('An entry in the PCoIP network statistics table.')
pcoipNetStatsSessionNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 2, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 1))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipNetStatsSessionNumber.setStatus('current')
if mibBuilder.loadTexts: pcoipNetStatsSessionNumber.setDescription('PCoIP session number used to link statistics to session.')
pcoipNetStatsRoundTripLatencyMs = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 2, 1, 1, 2), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipNetStatsRoundTripLatencyMs.setStatus('current')
if mibBuilder.loadTexts: pcoipNetStatsRoundTripLatencyMs.setDescription('Round trip latency (in milliseconds) between server and client.')
pcoipNetStatsRXBWkbitPersec = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 2, 1, 1, 3), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipNetStatsRXBWkbitPersec.setStatus('current')
if mibBuilder.loadTexts: pcoipNetStatsRXBWkbitPersec.setDescription('Average number of kilobits per second that have been received by this device.')
pcoipNetStatsRXBWPeakkbitPersec = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 2, 1, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 1000))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipNetStatsRXBWPeakkbitPersec.setStatus('current')
if mibBuilder.loadTexts: pcoipNetStatsRXBWPeakkbitPersec.setDescription('Peak bandwidth for incoming PCoIP packets within a one second sampling period.')
pcoipNetStatsRXPacketLossPercent = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 2, 1, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipNetStatsRXPacketLossPercent.setStatus('current')
if mibBuilder.loadTexts: pcoipNetStatsRXPacketLossPercent.setDescription('Percentage of received packets lost during a one second sampling period.')
pcoipNetStatsTXBWkbitPersec = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 2, 1, 1, 6), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipNetStatsTXBWkbitPersec.setStatus('current')
if mibBuilder.loadTexts: pcoipNetStatsTXBWkbitPersec.setDescription('Average number of kilobits per second that have been transmitted by this device.')
pcoipNetStatsTXBWActiveLimitkbitPersec = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 2, 1, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 1000))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipNetStatsTXBWActiveLimitkbitPersec.setStatus('current')
if mibBuilder.loadTexts: pcoipNetStatsTXBWActiveLimitkbitPersec.setDescription('The current estimate of the available network bandwidth, updated every second.')
pcoipNetStatsTXBWLimitkbitPersec = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 2, 1, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 1000))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipNetStatsTXBWLimitkbitPersec.setStatus('current')
if mibBuilder.loadTexts: pcoipNetStatsTXBWLimitkbitPersec.setDescription('Transmit bandwidth limit for outgoing packets.')
pcoipNetStatsTXPacketLossPercent = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 2, 1, 1, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipNetStatsTXPacketLossPercent.setStatus('current')
if mibBuilder.loadTexts: pcoipNetStatsTXPacketLossPercent.setDescription('Percentage of transmitted packets lost during the one second sampling period.')
pcoipAudioStatsTable = MibTable((1, 3, 6, 1, 4, 1, 25071, 1, 2, 3, 1), )
if mibBuilder.loadTexts: pcoipAudioStatsTable.setStatus('current')
if mibBuilder.loadTexts: pcoipAudioStatsTable.setDescription('The PCoIP Audio statistics table.')
pcoipAudioStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 25071, 1, 2, 3, 1, 1), ).setIndexNames((0, "TERADICI-PCOIPv2-MIB", "pcoipAudioStatsSessionNumber"))
if mibBuilder.loadTexts: pcoipAudioStatsEntry.setStatus('current')
if mibBuilder.loadTexts: pcoipAudioStatsEntry.setDescription('An entry in the PCoIP audio statistics table.')
pcoipAudioStatsSessionNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 3, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 1))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipAudioStatsSessionNumber.setStatus('current')
if mibBuilder.loadTexts: pcoipAudioStatsSessionNumber.setDescription('PCoIP session number used to link statistics to session.')
pcoipAudioStatsBytesReceived = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 3, 1, 1, 2), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipAudioStatsBytesReceived.setStatus('current')
if mibBuilder.loadTexts: pcoipAudioStatsBytesReceived.setDescription('Total number of audio bytes that have been received since the PCoIP session started.')
pcoipAudioStatsBytesSent = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 3, 1, 1, 3), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipAudioStatsBytesSent.setStatus('current')
if mibBuilder.loadTexts: pcoipAudioStatsBytesSent.setDescription('Total number of audio bytes that have been sent since the PCoIP session started.')
pcoipAudioStatsRXBWkbitPersec = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 3, 1, 1, 4), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipAudioStatsRXBWkbitPersec.setStatus('current')
if mibBuilder.loadTexts: pcoipAudioStatsRXBWkbitPersec.setDescription('Average number of kilobits per second that have been received by the audio channel of this device.')
pcoipAudioStatsTXBWkbitPersec = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 3, 1, 1, 5), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipAudioStatsTXBWkbitPersec.setStatus('current')
if mibBuilder.loadTexts: pcoipAudioStatsTXBWkbitPersec.setDescription('Total number of audio kilobits that have been transmitted since the PCoIP session started.')
pcoipAudioStatsTXBWLimitkbitPersec = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 3, 1, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 1000))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipAudioStatsTXBWLimitkbitPersec.setStatus('current')
if mibBuilder.loadTexts: pcoipAudioStatsTXBWLimitkbitPersec.setDescription('Transmit bandwidth limit for outgoing audio packets.')
pcoipImagingStatsTable = MibTable((1, 3, 6, 1, 4, 1, 25071, 1, 2, 4, 1), )
if mibBuilder.loadTexts: pcoipImagingStatsTable.setStatus('current')
if mibBuilder.loadTexts: pcoipImagingStatsTable.setDescription('The PCoIP Imaging statistics table.')
pcoipImagingStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 25071, 1, 2, 4, 1, 1), ).setIndexNames((0, "TERADICI-PCOIPv2-MIB", "pcoipImagingStatsSessionNumber"))
if mibBuilder.loadTexts: pcoipImagingStatsEntry.setStatus('current')
if mibBuilder.loadTexts: pcoipImagingStatsEntry.setDescription('An entry in the PCoIP imaging statistics table.')
pcoipImagingStatsSessionNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 4, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 1))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipImagingStatsSessionNumber.setStatus('current')
if mibBuilder.loadTexts: pcoipImagingStatsSessionNumber.setDescription('PCoIP session number used to link statistics to session.')
pcoipImagingStatsBytesReceived = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 4, 1, 1, 2), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipImagingStatsBytesReceived.setStatus('current')
if mibBuilder.loadTexts: pcoipImagingStatsBytesReceived.setDescription('Total number of imaging bytes that have been received since the PCoIP session started.')
pcoipImagingStatsBytesSent = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 4, 1, 1, 3), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipImagingStatsBytesSent.setStatus('current')
if mibBuilder.loadTexts: pcoipImagingStatsBytesSent.setDescription('Total number of imaging bytes that have been sent since the PCoIP session started.')
pcoipImagingStatsRXBWkbitPersec = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 4, 1, 1, 4), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipImagingStatsRXBWkbitPersec.setStatus('current')
if mibBuilder.loadTexts: pcoipImagingStatsRXBWkbitPersec.setDescription('Average number of kilobits per second that have been received by the imaging channel of this device.')
pcoipImagingStatsTXBWkbitPersec = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 4, 1, 1, 5), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipImagingStatsTXBWkbitPersec.setStatus('current')
if mibBuilder.loadTexts: pcoipImagingStatsTXBWkbitPersec.setDescription('Average number of kilobits per second that have been received by the imaging channel of this device.')
pcoipImagingStatsEncodedFramesPersec = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 4, 1, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2400))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipImagingStatsEncodedFramesPersec.setStatus('current')
if mibBuilder.loadTexts: pcoipImagingStatsEncodedFramesPersec.setDescription('The number of imaging frames which were encoded over a one second sampling period.')
pcoipImagingStatsActiveMinimumQuality = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 4, 1, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipImagingStatsActiveMinimumQuality.setStatus('current')
if mibBuilder.loadTexts: pcoipImagingStatsActiveMinimumQuality.setDescription('The lowest encoded quality, updated every second.')
pcoipImagingStatsDecoderCapabilitykbitPersec = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 4, 1, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100000))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipImagingStatsDecoderCapabilitykbitPersec.setStatus('current')
if mibBuilder.loadTexts: pcoipImagingStatsDecoderCapabilitykbitPersec.setDescription('The current estimate of the decoder processing capability.')
pcoipImagingStatsPipelineProcRate = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 4, 1, 1, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 300))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipImagingStatsPipelineProcRate.setStatus('current')
if mibBuilder.loadTexts: pcoipImagingStatsPipelineProcRate.setDescription('The current pipeline processing rate.')
pcoipUSBStatsTable = MibTable((1, 3, 6, 1, 4, 1, 25071, 1, 2, 5, 1), )
if mibBuilder.loadTexts: pcoipUSBStatsTable.setStatus('current')
if mibBuilder.loadTexts: pcoipUSBStatsTable.setDescription('The PCoIP USB statistics table.')
pcoipUSBStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 25071, 1, 2, 5, 1, 1), ).setIndexNames((0, "TERADICI-PCOIPv2-MIB", "pcoipUSBStatsSessionNumber"))
if mibBuilder.loadTexts: pcoipUSBStatsEntry.setStatus('current')
if mibBuilder.loadTexts: pcoipUSBStatsEntry.setDescription('An entry in the PCoIP USB statistics table.')
pcoipUSBStatsSessionNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 5, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 1))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipUSBStatsSessionNumber.setStatus('current')
if mibBuilder.loadTexts: pcoipUSBStatsSessionNumber.setDescription('PCoIP session number used to link statistics to session.')
pcoipUSBStatsBytesReceived = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 5, 1, 1, 2), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipUSBStatsBytesReceived.setStatus('current')
if mibBuilder.loadTexts: pcoipUSBStatsBytesReceived.setDescription('Total number of USB bytes that have been received since the PCoIP session started.')
pcoipUSBStatsBytesSent = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 5, 1, 1, 3), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipUSBStatsBytesSent.setStatus('current')
if mibBuilder.loadTexts: pcoipUSBStatsBytesSent.setDescription('Total number of USB bytes that have been sent since the PCoIP session started.')
pcoipUSBStatsRXBWkbitPersec = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 5, 1, 1, 4), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipUSBStatsRXBWkbitPersec.setStatus('current')
if mibBuilder.loadTexts: pcoipUSBStatsRXBWkbitPersec.setDescription('Average number of kilobits per second that have been received by the USB channel of this device.')
pcoipUSBStatsTXBWkbitPersec = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 5, 1, 1, 5), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipUSBStatsTXBWkbitPersec.setStatus('current')
if mibBuilder.loadTexts: pcoipUSBStatsTXBWkbitPersec.setDescription('Average number of kilobits per second that have been received by the USB channel of this device.')
pcoipGenDevicesTable = MibTable((1, 3, 6, 1, 4, 1, 25071, 1, 2, 6, 1), )
if mibBuilder.loadTexts: pcoipGenDevicesTable.setStatus('current')
if mibBuilder.loadTexts: pcoipGenDevicesTable.setDescription('The PCoIP General Devices table.')
pcoipGenDevicesEntry = MibTableRow((1, 3, 6, 1, 4, 1, 25071, 1, 2, 6, 1, 1), ).setIndexNames((0, "TERADICI-PCOIPv2-MIB", "pcoipGenDevicesSessionNumber"))
if mibBuilder.loadTexts: pcoipGenDevicesEntry.setStatus('current')
if mibBuilder.loadTexts: pcoipGenDevicesEntry.setDescription('An entry in the PCoIP general devices table.')
pcoipGenDevicesSessionNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 6, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 1))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipGenDevicesSessionNumber.setStatus('current')
if mibBuilder.loadTexts: pcoipGenDevicesSessionNumber.setDescription('PCoIP session number used to link imaging devices to statistics.')
pcoipGenDevicesName = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 6, 1, 1, 2), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipGenDevicesName.setStatus('current')
if mibBuilder.loadTexts: pcoipGenDevicesName.setDescription('String containing the PCoIP device name.')
pcoipGenDevicesDescription = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 6, 1, 1, 3), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipGenDevicesDescription.setStatus('current')
if mibBuilder.loadTexts: pcoipGenDevicesDescription.setDescription('String describing the processor.')
pcoipGenDevicesGenericTag = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 6, 1, 1, 4), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipGenDevicesGenericTag.setStatus('current')
if mibBuilder.loadTexts: pcoipGenDevicesGenericTag.setDescription('String describing device generic tag. ')
pcoipGenDevicesPartNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 6, 1, 1, 5), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipGenDevicesPartNumber.setStatus('current')
if mibBuilder.loadTexts: pcoipGenDevicesPartNumber.setDescription('String describing the silicon part number of the device.')
pcoipGenDevicesFwPartNumber = MibScalar((1, 3, 6, 1, 4, 1, 25071, 1, 2, 6, 1, 1, 6), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipGenDevicesFwPartNumber.setStatus('current')
if mibBuilder.loadTexts: pcoipGenDevicesFwPartNumber.setDescription('String describing the product ID of the device.')
pcoipGenDevicesSerialNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 6, 1, 1, 7), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipGenDevicesSerialNumber.setStatus('current')
if mibBuilder.loadTexts: pcoipGenDevicesSerialNumber.setDescription('String describing device serial number.')
pcoipGenDevicesHardwareVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 6, 1, 1, 8), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipGenDevicesHardwareVersion.setStatus('current')
if mibBuilder.loadTexts: pcoipGenDevicesHardwareVersion.setDescription('String describing the silicon version.')
pcoipGenDevicesFirmwareVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 6, 1, 1, 9), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipGenDevicesFirmwareVersion.setStatus('current')
if mibBuilder.loadTexts: pcoipGenDevicesFirmwareVersion.setDescription('String describing the currently running firmware revision.')
pcoipGenDevicesUniqueID = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 6, 1, 1, 10), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipGenDevicesUniqueID.setStatus('current')
if mibBuilder.loadTexts: pcoipGenDevicesUniqueID.setDescription('String describing the device unique identifier.')
pcoipGenDevicesMAC = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 6, 1, 1, 11), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipGenDevicesMAC.setStatus('current')
if mibBuilder.loadTexts: pcoipGenDevicesMAC.setDescription('String describing the device MAC address.')
pcoipGenDevicesUptime = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 6, 1, 1, 12), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipGenDevicesUptime.setStatus('current')
if mibBuilder.loadTexts: pcoipGenDevicesUptime.setDescription('Integer containing the number of seconds since boot.')
pcoipImagingDevicesTable = MibTable((1, 3, 6, 1, 4, 1, 25071, 1, 2, 7, 1), )
if mibBuilder.loadTexts: pcoipImagingDevicesTable.setStatus('current')
if mibBuilder.loadTexts: pcoipImagingDevicesTable.setDescription('The PCoIP Imaging Devices table.')
pcoipImagingDevicesEntry = MibTableRow((1, 3, 6, 1, 4, 1, 25071, 1, 2, 7, 1, 1), ).setIndexNames((0, "TERADICI-PCOIPv2-MIB", "pcoipImagingDevicesIndex"))
if mibBuilder.loadTexts: pcoipImagingDevicesEntry.setStatus('current')
if mibBuilder.loadTexts: pcoipImagingDevicesEntry.setDescription('An entry in the PCoIP imaging devices table.')
pcoipImagingDevicesIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 7, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipImagingDevicesIndex.setStatus('current')
if mibBuilder.loadTexts: pcoipImagingDevicesIndex.setDescription('The auxiliary variable used for identifying instances of the columnar objects in the devices table.')
pcoipImagingDevicesSessionNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 7, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 1))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipImagingDevicesSessionNumber.setStatus('current')
if mibBuilder.loadTexts: pcoipImagingDevicesSessionNumber.setDescription('PCoIP session number used to link imaging devices to statistics.')
pcoipImagingDevicesDisplayWidth = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 7, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4096))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipImagingDevicesDisplayWidth.setStatus('current')
if mibBuilder.loadTexts: pcoipImagingDevicesDisplayWidth.setDescription('Display width in pixels.')
pcoipImagingDevicesDisplayHeight = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 7, 1, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4096))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipImagingDevicesDisplayHeight.setStatus('current')
if mibBuilder.loadTexts: pcoipImagingDevicesDisplayHeight.setDescription('Display height in lines.')
pcoipImagingDevicesDisplayRefreshRate = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 7, 1, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 600))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipImagingDevicesDisplayRefreshRate.setStatus('current')
if mibBuilder.loadTexts: pcoipImagingDevicesDisplayRefreshRate.setDescription('Display refresh rate in Hz.')
pcoipImagingDevicesDisplayChangeRate = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 7, 1, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 600))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipImagingDevicesDisplayChangeRate.setStatus('current')
if mibBuilder.loadTexts: pcoipImagingDevicesDisplayChangeRate.setDescription('Display input change rate in Hz over a 1 second sample.')
pcoipImagingDevicesDisplayProcessRate = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 7, 1, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 600))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipImagingDevicesDisplayProcessRate.setStatus('current')
if mibBuilder.loadTexts: pcoipImagingDevicesDisplayProcessRate.setDescription('Display process frame rate in Hz over a 1 second sample.')
pcoipImagingDevicesLimitReason = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 7, 1, 1, 8), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipImagingDevicesLimitReason.setStatus('current')
if mibBuilder.loadTexts: pcoipImagingDevicesLimitReason.setDescription('String describing the reason for limiting the frame rate of this display.')
pcoipImagingDevicesModel = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 7, 1, 1, 9), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipImagingDevicesModel.setStatus('current')
if mibBuilder.loadTexts: pcoipImagingDevicesModel.setDescription('String describing the display model name.')
pcoipImagingDevicesStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 7, 1, 1, 10), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipImagingDevicesStatus.setStatus('current')
if mibBuilder.loadTexts: pcoipImagingDevicesStatus.setDescription('String describing the display device status.')
pcoipImagingDevicesMode = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 7, 1, 1, 11), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipImagingDevicesMode.setStatus('current')
if mibBuilder.loadTexts: pcoipImagingDevicesMode.setDescription('String describing the display mode.')
pcoipImagingDevicesSerial = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 7, 1, 1, 12), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipImagingDevicesSerial.setStatus('current')
if mibBuilder.loadTexts: pcoipImagingDevicesSerial.setDescription('String describing the display serial number.')
pcoipImagingDevicesVID = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 7, 1, 1, 13), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipImagingDevicesVID.setStatus('current')
if mibBuilder.loadTexts: pcoipImagingDevicesVID.setDescription('String describing the display vendor ID.')
pcoipImagingDevicesPID = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 7, 1, 1, 14), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipImagingDevicesPID.setStatus('current')
if mibBuilder.loadTexts: pcoipImagingDevicesPID.setDescription('String describing the display product ID.')
pcoipImagingDevicesDate = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 7, 1, 1, 15), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipImagingDevicesDate.setStatus('current')
if mibBuilder.loadTexts: pcoipImagingDevicesDate.setDescription('String describing the display date of manufacture.')
pcoipUSBDevicesTable = MibTable((1, 3, 6, 1, 4, 1, 25071, 1, 2, 8, 1), )
if mibBuilder.loadTexts: pcoipUSBDevicesTable.setStatus('current')
if mibBuilder.loadTexts: pcoipUSBDevicesTable.setDescription('The PCoIP USB Devices table.')
pcoipUSBDevicesEntry = MibTableRow((1, 3, 6, 1, 4, 1, 25071, 1, 2, 8, 1, 1), ).setIndexNames((0, "TERADICI-PCOIPv2-MIB", "pcoipUSBDevicesIndex"))
if mibBuilder.loadTexts: pcoipUSBDevicesEntry.setStatus('current')
if mibBuilder.loadTexts: pcoipUSBDevicesEntry.setDescription('An entry in the PCoIP USB devices table.')
pcoipUSBDevicesIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 8, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 127))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipUSBDevicesIndex.setStatus('current')
if mibBuilder.loadTexts: pcoipUSBDevicesIndex.setDescription('The auxiliary variable used for identifying instances of the columnar objects in the devices table.')
pcoipUSBDevicesSessionNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 8, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 1))).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipUSBDevicesSessionNumber.setStatus('current')
if mibBuilder.loadTexts: pcoipUSBDevicesSessionNumber.setDescription('PCoIP session number used to link USB devices to statistics.')
pcoipUSBDevicesPort = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 8, 1, 1, 3), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipUSBDevicesPort.setStatus('current')
if mibBuilder.loadTexts: pcoipUSBDevicesPort.setDescription('USB device port: OHCI or EHCI.')
pcoipUSBDevicesModel = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 8, 1, 1, 4), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipUSBDevicesModel.setStatus('current')
if mibBuilder.loadTexts: pcoipUSBDevicesModel.setDescription('String describing the model name of the connected device.')
pcoipUSBDevicesStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 8, 1, 1, 5), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipUSBDevicesStatus.setStatus('current')
if mibBuilder.loadTexts: pcoipUSBDevicesStatus.setDescription('String describing the USB device status.')
pcoipUSBDevicesDeviceClass = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 8, 1, 1, 6), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipUSBDevicesDeviceClass.setStatus('current')
if mibBuilder.loadTexts: pcoipUSBDevicesDeviceClass.setDescription('String describing the USB device class.')
pcoipUSBDevicesSubClass = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 8, 1, 1, 7), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipUSBDevicesSubClass.setStatus('current')
if mibBuilder.loadTexts: pcoipUSBDevicesSubClass.setDescription('String describing the USB sub device class.')
pcoipUSBDevicesProtocol = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 8, 1, 1, 8), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipUSBDevicesProtocol.setStatus('current')
if mibBuilder.loadTexts: pcoipUSBDevicesProtocol.setDescription('String describing the USB protocol used.')
pcoipUSBDevicesSerial = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 8, 1, 1, 9), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipUSBDevicesSerial.setStatus('current')
if mibBuilder.loadTexts: pcoipUSBDevicesSerial.setDescription('String describing the USB device serial number.')
pcoipUSBDevicesVID = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 8, 1, 1, 10), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipUSBDevicesVID.setStatus('current')
if mibBuilder.loadTexts: pcoipUSBDevicesVID.setDescription('String describing the USB device vendor ID.')
pcoipUSBDevicesPID = MibTableColumn((1, 3, 6, 1, 4, 1, 25071, 1, 2, 8, 1, 1, 11), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pcoipUSBDevicesPID.setStatus('current')
if mibBuilder.loadTexts: pcoipUSBDevicesPID.setDescription('String describing the USB device product ID.')
mibBuilder.exportSymbols("TERADICI-PCOIPv2-MIB", pcoipImagingStatsActiveMinimumQuality=pcoipImagingStatsActiveMinimumQuality, pcoipGenStatsBytesReceived=pcoipGenStatsBytesReceived, pcoipUSBStatsTable=pcoipUSBStatsTable, pcoipGenDevicesSerialNumber=pcoipGenDevicesSerialNumber, pcoipNetStatsTXBWActiveLimitkbitPersec=pcoipNetStatsTXBWActiveLimitkbitPersec, pcoipNetStatsTXPacketLossPercent=pcoipNetStatsTXPacketLossPercent, pcoipImagingStatsPipelineProcRate=pcoipImagingStatsPipelineProcRate, pcoipUSBDevicesProtocol=pcoipUSBDevicesProtocol, pcoipNetStatsRXBWPeakkbitPersec=pcoipNetStatsRXBWPeakkbitPersec, pcoipImagingDevicesTable=pcoipImagingDevicesTable, teraPcoipUSBStats=teraPcoipUSBStats, pcoipAudioStatsTXBWLimitkbitPersec=pcoipAudioStatsTXBWLimitkbitPersec, pcoipAudioStatsTXBWkbitPersec=pcoipAudioStatsTXBWkbitPersec, pcoipNetStatsEntry=pcoipNetStatsEntry, pcoipGenStatsPacketsReceived=pcoipGenStatsPacketsReceived, pcoipUSBDevicesPort=pcoipUSBDevicesPort, pcoipGenStatsSessionNumber=pcoipGenStatsSessionNumber, pcoipImagingDevicesPID=pcoipImagingDevicesPID, pcoipNetStatsSessionNumber=pcoipNetStatsSessionNumber, pcoipGenDevicesGenericTag=pcoipGenDevicesGenericTag, teraPcoipUSBDevices=teraPcoipUSBDevices, teraPcoipAudioStats=teraPcoipAudioStats, pcoipAudioStatsEntry=pcoipAudioStatsEntry, pcoipImagingStatsRXBWkbitPersec=pcoipImagingStatsRXBWkbitPersec, pcoipGenStatsEntry=pcoipGenStatsEntry, pcoipUSBDevicesSubClass=pcoipUSBDevicesSubClass, pcoipImagingDevicesDisplayProcessRate=pcoipImagingDevicesDisplayProcessRate, pcoipGenDevicesHardwareVersion=pcoipGenDevicesHardwareVersion, pcoipGenDevicesMAC=pcoipGenDevicesMAC, pcoipUSBStatsBytesReceived=pcoipUSBStatsBytesReceived, pcoipImagingDevicesVID=pcoipImagingDevicesVID, teraPcoipImagingStats=teraPcoipImagingStats, pcoipAudioStatsBytesReceived=pcoipAudioStatsBytesReceived, teraPcoipGenStats=teraPcoipGenStats, pcoipImagingStatsDecoderCapabilitykbitPersec=pcoipImagingStatsDecoderCapabilitykbitPersec, pcoipUSBStatsBytesSent=pcoipUSBStatsBytesSent, pcoipUSBDevicesIndex=pcoipUSBDevicesIndex, pcoipImagingStatsTXBWkbitPersec=pcoipImagingStatsTXBWkbitPersec, pcoipImagingDevicesModel=pcoipImagingDevicesModel, pcoipImagingDevicesIndex=pcoipImagingDevicesIndex, pcoipUSBStatsEntry=pcoipUSBStatsEntry, pcoipUSBDevicesStatus=pcoipUSBDevicesStatus, pcoipImagingStatsBytesReceived=pcoipImagingStatsBytesReceived, pcoipGenStatsPacketsSent=pcoipGenStatsPacketsSent, pcoipUSBDevicesTable=pcoipUSBDevicesTable, pcoipGenStatsSessionDuration=pcoipGenStatsSessionDuration, pcoipGenDevicesUptime=pcoipGenDevicesUptime, pcoipNetStatsRoundTripLatencyMs=pcoipNetStatsRoundTripLatencyMs, pcoipImagingDevicesLimitReason=pcoipImagingDevicesLimitReason, pcoipUSBStatsTXBWkbitPersec=pcoipUSBStatsTXBWkbitPersec, pcoipImagingStatsSessionNumber=pcoipImagingStatsSessionNumber, pcoipNetStatsTXBWkbitPersec=pcoipNetStatsTXBWkbitPersec, pcoipAudioStatsRXBWkbitPersec=pcoipAudioStatsRXBWkbitPersec, pcoipUSBDevicesSerial=pcoipUSBDevicesSerial, pcoipImagingStatsTable=pcoipImagingStatsTable, pcoipGenDevicesEntry=pcoipGenDevicesEntry, pcoipNetStatsRXBWkbitPersec=pcoipNetStatsRXBWkbitPersec, pcoipGenDevicesName=pcoipGenDevicesName, pcoipGenDevicesFirmwareVersion=pcoipGenDevicesFirmwareVersion, pcoipGenDevicesSessionNumber=pcoipGenDevicesSessionNumber, pcoipGenDevicesFwPartNumber=pcoipGenDevicesFwPartNumber, teraMibModule=teraMibModule, pcoipGenDevicesUniqueID=pcoipGenDevicesUniqueID, pcoipUSBDevicesVID=pcoipUSBDevicesVID, pcoipAudioStatsTable=pcoipAudioStatsTable, pcoipUSBDevicesEntry=pcoipUSBDevicesEntry, pcoipGenStatsTxPacketsLost=pcoipGenStatsTxPacketsLost, pcoipGenDevicesPartNumber=pcoipGenDevicesPartNumber, pcoipImagingDevicesMode=pcoipImagingDevicesMode, teraProducts=teraProducts, teraPcoipImagingDevices=teraPcoipImagingDevices, pcoipImagingDevicesStatus=pcoipImagingDevicesStatus, pcoipImagingDevicesEntry=pcoipImagingDevicesEntry, pcoipImagingDevicesDate=pcoipImagingDevicesDate, pcoipAudioStatsBytesSent=pcoipAudioStatsBytesSent, pcoipGenStatsBytesSent=pcoipGenStatsBytesSent, pcoipImagingDevicesDisplayChangeRate=pcoipImagingDevicesDisplayChangeRate, pcoipNetStatsRXPacketLossPercent=pcoipNetStatsRXPacketLossPercent, pcoipUSBStatsSessionNumber=pcoipUSBStatsSessionNumber, teraPcoipGenDevices=teraPcoipGenDevices, pcoipNetStatsTXBWLimitkbitPersec=pcoipNetStatsTXBWLimitkbitPersec, pcoipImagingDevicesDisplayHeight=pcoipImagingDevicesDisplayHeight, pcoipGenStatsTable=pcoipGenStatsTable, pcoipImagingDevicesSessionNumber=pcoipImagingDevicesSessionNumber, pcoipNetStatsTable=pcoipNetStatsTable, PYSNMP_MODULE_ID=teraMibModule, pcoipImagingDevicesDisplayWidth=pcoipImagingDevicesDisplayWidth, pcoipGenDevicesTable=pcoipGenDevicesTable, pcoipImagingDevicesDisplayRefreshRate=pcoipImagingDevicesDisplayRefreshRate, pcoipUSBDevicesDeviceClass=pcoipUSBDevicesDeviceClass, teraPcoipV2=teraPcoipV2, pcoipUSBDevicesPID=pcoipUSBDevicesPID, pcoipImagingStatsBytesSent=pcoipImagingStatsBytesSent, pcoipAudioStatsSessionNumber=pcoipAudioStatsSessionNumber, pcoipUSBDevicesSessionNumber=pcoipUSBDevicesSessionNumber, pcoipImagingDevicesSerial=pcoipImagingDevicesSerial, pcoipImagingStatsEncodedFramesPersec=pcoipImagingStatsEncodedFramesPersec, pcoipImagingStatsEntry=pcoipImagingStatsEntry, pcoipUSBStatsRXBWkbitPersec=pcoipUSBStatsRXBWkbitPersec, pcoipGenDevicesDescription=pcoipGenDevicesDescription, teraPcoipNetStats=teraPcoipNetStats, pcoipUSBDevicesModel=pcoipUSBDevicesModel)
| (octet_string, object_identifier, integer) = mibBuilder.importSymbols('ASN1', 'OctetString', 'ObjectIdentifier', 'Integer')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(constraints_intersection, single_value_constraint, value_range_constraint, value_size_constraint, constraints_union) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'SingleValueConstraint', 'ValueRangeConstraint', 'ValueSizeConstraint', 'ConstraintsUnion')
(module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup')
(counter64, iso, unsigned32, module_identity, ip_address, integer32, enterprises, gauge32, notification_type, bits, counter32, mib_identifier, time_ticks, mib_scalar, mib_table, mib_table_row, mib_table_column, object_identity) = mibBuilder.importSymbols('SNMPv2-SMI', 'Counter64', 'iso', 'Unsigned32', 'ModuleIdentity', 'IpAddress', 'Integer32', 'enterprises', 'Gauge32', 'NotificationType', 'Bits', 'Counter32', 'MibIdentifier', 'TimeTicks', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'ObjectIdentity')
(textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString')
tera_mib_module = module_identity((1, 3, 6, 1, 4, 1, 25071))
teraMibModule.setRevisions(('2012-01-28 10:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts:
teraMibModule.setRevisionsDescriptions(('Version 2 of the PCoIP MIB.',))
if mibBuilder.loadTexts:
teraMibModule.setLastUpdated('201201281000Z')
if mibBuilder.loadTexts:
teraMibModule.setOrganization('Teradici Corporation')
if mibBuilder.loadTexts:
teraMibModule.setContactInfo(' Chris Topp Postal: 101-4621 Canada Way Burnaby, BC V5G 4X8 Canada Tel: +1 604 451 5800 Fax: +1 604 451 5818 E-mail: ctopp@teradici.com')
if mibBuilder.loadTexts:
teraMibModule.setDescription('MIB describing PC-over-IP (tm) statistics.')
tera_products = mib_identifier((1, 3, 6, 1, 4, 1, 25071, 1))
tera_pcoip_v2 = mib_identifier((1, 3, 6, 1, 4, 1, 25071, 1, 2))
tera_pcoip_gen_stats = mib_identifier((1, 3, 6, 1, 4, 1, 25071, 1, 2, 1))
tera_pcoip_net_stats = mib_identifier((1, 3, 6, 1, 4, 1, 25071, 1, 2, 2))
tera_pcoip_audio_stats = mib_identifier((1, 3, 6, 1, 4, 1, 25071, 1, 2, 3))
tera_pcoip_imaging_stats = mib_identifier((1, 3, 6, 1, 4, 1, 25071, 1, 2, 4))
tera_pcoip_usb_stats = mib_identifier((1, 3, 6, 1, 4, 1, 25071, 1, 2, 5))
tera_pcoip_gen_devices = mib_identifier((1, 3, 6, 1, 4, 1, 25071, 1, 2, 6))
tera_pcoip_imaging_devices = mib_identifier((1, 3, 6, 1, 4, 1, 25071, 1, 2, 7))
tera_pcoip_usb_devices = mib_identifier((1, 3, 6, 1, 4, 1, 25071, 1, 2, 8))
pcoip_gen_stats_table = mib_table((1, 3, 6, 1, 4, 1, 25071, 1, 2, 1, 1))
if mibBuilder.loadTexts:
pcoipGenStatsTable.setStatus('current')
if mibBuilder.loadTexts:
pcoipGenStatsTable.setDescription('The PCoIP General statistics table.')
pcoip_gen_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 25071, 1, 2, 1, 1, 1)).setIndexNames((0, 'TERADICI-PCOIPv2-MIB', 'pcoipGenStatsSessionNumber'))
if mibBuilder.loadTexts:
pcoipGenStatsEntry.setStatus('current')
if mibBuilder.loadTexts:
pcoipGenStatsEntry.setDescription('An entry in the PCoIP general statistics table.')
pcoip_gen_stats_session_number = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 1, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 1))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipGenStatsSessionNumber.setStatus('current')
if mibBuilder.loadTexts:
pcoipGenStatsSessionNumber.setDescription('PCoIP session number used to link PCoIP statistics to session.')
pcoip_gen_stats_packets_sent = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 1, 1, 1, 2), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipGenStatsPacketsSent.setStatus('current')
if mibBuilder.loadTexts:
pcoipGenStatsPacketsSent.setDescription('Total number of packets that have been transmitted since the PCoIP session started.')
pcoip_gen_stats_bytes_sent = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 1, 1, 1, 3), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipGenStatsBytesSent.setStatus('current')
if mibBuilder.loadTexts:
pcoipGenStatsBytesSent.setDescription('Total number of bytes that have been transmitted since the PCoIP session started.')
pcoip_gen_stats_packets_received = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 1, 1, 1, 4), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipGenStatsPacketsReceived.setStatus('current')
if mibBuilder.loadTexts:
pcoipGenStatsPacketsReceived.setDescription('Total number of packets that have been received since the PCoIP session started.')
pcoip_gen_stats_bytes_received = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 1, 1, 1, 5), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipGenStatsBytesReceived.setStatus('current')
if mibBuilder.loadTexts:
pcoipGenStatsBytesReceived.setDescription('Total number of bytes that have been received since the PCoIP session started.')
pcoip_gen_stats_tx_packets_lost = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 1, 1, 1, 6), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipGenStatsTxPacketsLost.setStatus('current')
if mibBuilder.loadTexts:
pcoipGenStatsTxPacketsLost.setDescription('Total number of transmit packets that have been lost since the PCoIP session started.')
pcoip_gen_stats_session_duration = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 1, 1, 1, 7), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipGenStatsSessionDuration.setStatus('current')
if mibBuilder.loadTexts:
pcoipGenStatsSessionDuration.setDescription('An incrementing number that represents the total number of seconds the PCoIP session has been open.')
pcoip_net_stats_table = mib_table((1, 3, 6, 1, 4, 1, 25071, 1, 2, 2, 1))
if mibBuilder.loadTexts:
pcoipNetStatsTable.setStatus('current')
if mibBuilder.loadTexts:
pcoipNetStatsTable.setDescription('The PCoIP Network statistics table.')
pcoip_net_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 25071, 1, 2, 2, 1, 1)).setIndexNames((0, 'TERADICI-PCOIPv2-MIB', 'pcoipNetStatsSessionNumber'))
if mibBuilder.loadTexts:
pcoipNetStatsEntry.setStatus('current')
if mibBuilder.loadTexts:
pcoipNetStatsEntry.setDescription('An entry in the PCoIP network statistics table.')
pcoip_net_stats_session_number = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 2, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 1))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipNetStatsSessionNumber.setStatus('current')
if mibBuilder.loadTexts:
pcoipNetStatsSessionNumber.setDescription('PCoIP session number used to link statistics to session.')
pcoip_net_stats_round_trip_latency_ms = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 2, 1, 1, 2), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipNetStatsRoundTripLatencyMs.setStatus('current')
if mibBuilder.loadTexts:
pcoipNetStatsRoundTripLatencyMs.setDescription('Round trip latency (in milliseconds) between server and client.')
pcoip_net_stats_rxb_wkbit_persec = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 2, 1, 1, 3), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipNetStatsRXBWkbitPersec.setStatus('current')
if mibBuilder.loadTexts:
pcoipNetStatsRXBWkbitPersec.setDescription('Average number of kilobits per second that have been received by this device.')
pcoip_net_stats_rxbw_peakkbit_persec = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 2, 1, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 1000))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipNetStatsRXBWPeakkbitPersec.setStatus('current')
if mibBuilder.loadTexts:
pcoipNetStatsRXBWPeakkbitPersec.setDescription('Peak bandwidth for incoming PCoIP packets within a one second sampling period.')
pcoip_net_stats_rx_packet_loss_percent = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 2, 1, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipNetStatsRXPacketLossPercent.setStatus('current')
if mibBuilder.loadTexts:
pcoipNetStatsRXPacketLossPercent.setDescription('Percentage of received packets lost during a one second sampling period.')
pcoip_net_stats_txb_wkbit_persec = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 2, 1, 1, 6), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipNetStatsTXBWkbitPersec.setStatus('current')
if mibBuilder.loadTexts:
pcoipNetStatsTXBWkbitPersec.setDescription('Average number of kilobits per second that have been transmitted by this device.')
pcoip_net_stats_txbw_active_limitkbit_persec = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 2, 1, 1, 7), integer32().subtype(subtypeSpec=value_range_constraint(0, 1000))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipNetStatsTXBWActiveLimitkbitPersec.setStatus('current')
if mibBuilder.loadTexts:
pcoipNetStatsTXBWActiveLimitkbitPersec.setDescription('The current estimate of the available network bandwidth, updated every second.')
pcoip_net_stats_txbw_limitkbit_persec = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 2, 1, 1, 8), integer32().subtype(subtypeSpec=value_range_constraint(0, 1000))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipNetStatsTXBWLimitkbitPersec.setStatus('current')
if mibBuilder.loadTexts:
pcoipNetStatsTXBWLimitkbitPersec.setDescription('Transmit bandwidth limit for outgoing packets.')
pcoip_net_stats_tx_packet_loss_percent = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 2, 1, 1, 9), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipNetStatsTXPacketLossPercent.setStatus('current')
if mibBuilder.loadTexts:
pcoipNetStatsTXPacketLossPercent.setDescription('Percentage of transmitted packets lost during the one second sampling period.')
pcoip_audio_stats_table = mib_table((1, 3, 6, 1, 4, 1, 25071, 1, 2, 3, 1))
if mibBuilder.loadTexts:
pcoipAudioStatsTable.setStatus('current')
if mibBuilder.loadTexts:
pcoipAudioStatsTable.setDescription('The PCoIP Audio statistics table.')
pcoip_audio_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 25071, 1, 2, 3, 1, 1)).setIndexNames((0, 'TERADICI-PCOIPv2-MIB', 'pcoipAudioStatsSessionNumber'))
if mibBuilder.loadTexts:
pcoipAudioStatsEntry.setStatus('current')
if mibBuilder.loadTexts:
pcoipAudioStatsEntry.setDescription('An entry in the PCoIP audio statistics table.')
pcoip_audio_stats_session_number = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 3, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 1))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipAudioStatsSessionNumber.setStatus('current')
if mibBuilder.loadTexts:
pcoipAudioStatsSessionNumber.setDescription('PCoIP session number used to link statistics to session.')
pcoip_audio_stats_bytes_received = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 3, 1, 1, 2), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipAudioStatsBytesReceived.setStatus('current')
if mibBuilder.loadTexts:
pcoipAudioStatsBytesReceived.setDescription('Total number of audio bytes that have been received since the PCoIP session started.')
pcoip_audio_stats_bytes_sent = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 3, 1, 1, 3), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipAudioStatsBytesSent.setStatus('current')
if mibBuilder.loadTexts:
pcoipAudioStatsBytesSent.setDescription('Total number of audio bytes that have been sent since the PCoIP session started.')
pcoip_audio_stats_rxb_wkbit_persec = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 3, 1, 1, 4), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipAudioStatsRXBWkbitPersec.setStatus('current')
if mibBuilder.loadTexts:
pcoipAudioStatsRXBWkbitPersec.setDescription('Average number of kilobits per second that have been received by the audio channel of this device.')
pcoip_audio_stats_txb_wkbit_persec = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 3, 1, 1, 5), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipAudioStatsTXBWkbitPersec.setStatus('current')
if mibBuilder.loadTexts:
pcoipAudioStatsTXBWkbitPersec.setDescription('Total number of audio kilobits that have been transmitted since the PCoIP session started.')
pcoip_audio_stats_txbw_limitkbit_persec = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 3, 1, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(0, 1000))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipAudioStatsTXBWLimitkbitPersec.setStatus('current')
if mibBuilder.loadTexts:
pcoipAudioStatsTXBWLimitkbitPersec.setDescription('Transmit bandwidth limit for outgoing audio packets.')
pcoip_imaging_stats_table = mib_table((1, 3, 6, 1, 4, 1, 25071, 1, 2, 4, 1))
if mibBuilder.loadTexts:
pcoipImagingStatsTable.setStatus('current')
if mibBuilder.loadTexts:
pcoipImagingStatsTable.setDescription('The PCoIP Imaging statistics table.')
pcoip_imaging_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 25071, 1, 2, 4, 1, 1)).setIndexNames((0, 'TERADICI-PCOIPv2-MIB', 'pcoipImagingStatsSessionNumber'))
if mibBuilder.loadTexts:
pcoipImagingStatsEntry.setStatus('current')
if mibBuilder.loadTexts:
pcoipImagingStatsEntry.setDescription('An entry in the PCoIP imaging statistics table.')
pcoip_imaging_stats_session_number = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 4, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 1))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipImagingStatsSessionNumber.setStatus('current')
if mibBuilder.loadTexts:
pcoipImagingStatsSessionNumber.setDescription('PCoIP session number used to link statistics to session.')
pcoip_imaging_stats_bytes_received = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 4, 1, 1, 2), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipImagingStatsBytesReceived.setStatus('current')
if mibBuilder.loadTexts:
pcoipImagingStatsBytesReceived.setDescription('Total number of imaging bytes that have been received since the PCoIP session started.')
pcoip_imaging_stats_bytes_sent = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 4, 1, 1, 3), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipImagingStatsBytesSent.setStatus('current')
if mibBuilder.loadTexts:
pcoipImagingStatsBytesSent.setDescription('Total number of imaging bytes that have been sent since the PCoIP session started.')
pcoip_imaging_stats_rxb_wkbit_persec = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 4, 1, 1, 4), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipImagingStatsRXBWkbitPersec.setStatus('current')
if mibBuilder.loadTexts:
pcoipImagingStatsRXBWkbitPersec.setDescription('Average number of kilobits per second that have been received by the imaging channel of this device.')
pcoip_imaging_stats_txb_wkbit_persec = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 4, 1, 1, 5), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipImagingStatsTXBWkbitPersec.setStatus('current')
if mibBuilder.loadTexts:
pcoipImagingStatsTXBWkbitPersec.setDescription('Average number of kilobits per second that have been received by the imaging channel of this device.')
pcoip_imaging_stats_encoded_frames_persec = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 4, 1, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(0, 2400))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipImagingStatsEncodedFramesPersec.setStatus('current')
if mibBuilder.loadTexts:
pcoipImagingStatsEncodedFramesPersec.setDescription('The number of imaging frames which were encoded over a one second sampling period.')
pcoip_imaging_stats_active_minimum_quality = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 4, 1, 1, 7), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipImagingStatsActiveMinimumQuality.setStatus('current')
if mibBuilder.loadTexts:
pcoipImagingStatsActiveMinimumQuality.setDescription('The lowest encoded quality, updated every second.')
pcoip_imaging_stats_decoder_capabilitykbit_persec = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 4, 1, 1, 8), integer32().subtype(subtypeSpec=value_range_constraint(0, 100000))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipImagingStatsDecoderCapabilitykbitPersec.setStatus('current')
if mibBuilder.loadTexts:
pcoipImagingStatsDecoderCapabilitykbitPersec.setDescription('The current estimate of the decoder processing capability.')
pcoip_imaging_stats_pipeline_proc_rate = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 4, 1, 1, 9), integer32().subtype(subtypeSpec=value_range_constraint(0, 300))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipImagingStatsPipelineProcRate.setStatus('current')
if mibBuilder.loadTexts:
pcoipImagingStatsPipelineProcRate.setDescription('The current pipeline processing rate.')
pcoip_usb_stats_table = mib_table((1, 3, 6, 1, 4, 1, 25071, 1, 2, 5, 1))
if mibBuilder.loadTexts:
pcoipUSBStatsTable.setStatus('current')
if mibBuilder.loadTexts:
pcoipUSBStatsTable.setDescription('The PCoIP USB statistics table.')
pcoip_usb_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 25071, 1, 2, 5, 1, 1)).setIndexNames((0, 'TERADICI-PCOIPv2-MIB', 'pcoipUSBStatsSessionNumber'))
if mibBuilder.loadTexts:
pcoipUSBStatsEntry.setStatus('current')
if mibBuilder.loadTexts:
pcoipUSBStatsEntry.setDescription('An entry in the PCoIP USB statistics table.')
pcoip_usb_stats_session_number = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 5, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 1))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipUSBStatsSessionNumber.setStatus('current')
if mibBuilder.loadTexts:
pcoipUSBStatsSessionNumber.setDescription('PCoIP session number used to link statistics to session.')
pcoip_usb_stats_bytes_received = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 5, 1, 1, 2), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipUSBStatsBytesReceived.setStatus('current')
if mibBuilder.loadTexts:
pcoipUSBStatsBytesReceived.setDescription('Total number of USB bytes that have been received since the PCoIP session started.')
pcoip_usb_stats_bytes_sent = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 5, 1, 1, 3), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipUSBStatsBytesSent.setStatus('current')
if mibBuilder.loadTexts:
pcoipUSBStatsBytesSent.setDescription('Total number of USB bytes that have been sent since the PCoIP session started.')
pcoip_usb_stats_rxb_wkbit_persec = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 5, 1, 1, 4), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipUSBStatsRXBWkbitPersec.setStatus('current')
if mibBuilder.loadTexts:
pcoipUSBStatsRXBWkbitPersec.setDescription('Average number of kilobits per second that have been received by the USB channel of this device.')
pcoip_usb_stats_txb_wkbit_persec = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 5, 1, 1, 5), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipUSBStatsTXBWkbitPersec.setStatus('current')
if mibBuilder.loadTexts:
pcoipUSBStatsTXBWkbitPersec.setDescription('Average number of kilobits per second that have been received by the USB channel of this device.')
pcoip_gen_devices_table = mib_table((1, 3, 6, 1, 4, 1, 25071, 1, 2, 6, 1))
if mibBuilder.loadTexts:
pcoipGenDevicesTable.setStatus('current')
if mibBuilder.loadTexts:
pcoipGenDevicesTable.setDescription('The PCoIP General Devices table.')
pcoip_gen_devices_entry = mib_table_row((1, 3, 6, 1, 4, 1, 25071, 1, 2, 6, 1, 1)).setIndexNames((0, 'TERADICI-PCOIPv2-MIB', 'pcoipGenDevicesSessionNumber'))
if mibBuilder.loadTexts:
pcoipGenDevicesEntry.setStatus('current')
if mibBuilder.loadTexts:
pcoipGenDevicesEntry.setDescription('An entry in the PCoIP general devices table.')
pcoip_gen_devices_session_number = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 6, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 1))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipGenDevicesSessionNumber.setStatus('current')
if mibBuilder.loadTexts:
pcoipGenDevicesSessionNumber.setDescription('PCoIP session number used to link imaging devices to statistics.')
pcoip_gen_devices_name = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 6, 1, 1, 2), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipGenDevicesName.setStatus('current')
if mibBuilder.loadTexts:
pcoipGenDevicesName.setDescription('String containing the PCoIP device name.')
pcoip_gen_devices_description = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 6, 1, 1, 3), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipGenDevicesDescription.setStatus('current')
if mibBuilder.loadTexts:
pcoipGenDevicesDescription.setDescription('String describing the processor.')
pcoip_gen_devices_generic_tag = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 6, 1, 1, 4), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipGenDevicesGenericTag.setStatus('current')
if mibBuilder.loadTexts:
pcoipGenDevicesGenericTag.setDescription('String describing device generic tag. ')
pcoip_gen_devices_part_number = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 6, 1, 1, 5), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipGenDevicesPartNumber.setStatus('current')
if mibBuilder.loadTexts:
pcoipGenDevicesPartNumber.setDescription('String describing the silicon part number of the device.')
pcoip_gen_devices_fw_part_number = mib_scalar((1, 3, 6, 1, 4, 1, 25071, 1, 2, 6, 1, 1, 6), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipGenDevicesFwPartNumber.setStatus('current')
if mibBuilder.loadTexts:
pcoipGenDevicesFwPartNumber.setDescription('String describing the product ID of the device.')
pcoip_gen_devices_serial_number = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 6, 1, 1, 7), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipGenDevicesSerialNumber.setStatus('current')
if mibBuilder.loadTexts:
pcoipGenDevicesSerialNumber.setDescription('String describing device serial number.')
pcoip_gen_devices_hardware_version = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 6, 1, 1, 8), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipGenDevicesHardwareVersion.setStatus('current')
if mibBuilder.loadTexts:
pcoipGenDevicesHardwareVersion.setDescription('String describing the silicon version.')
pcoip_gen_devices_firmware_version = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 6, 1, 1, 9), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipGenDevicesFirmwareVersion.setStatus('current')
if mibBuilder.loadTexts:
pcoipGenDevicesFirmwareVersion.setDescription('String describing the currently running firmware revision.')
pcoip_gen_devices_unique_id = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 6, 1, 1, 10), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipGenDevicesUniqueID.setStatus('current')
if mibBuilder.loadTexts:
pcoipGenDevicesUniqueID.setDescription('String describing the device unique identifier.')
pcoip_gen_devices_mac = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 6, 1, 1, 11), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipGenDevicesMAC.setStatus('current')
if mibBuilder.loadTexts:
pcoipGenDevicesMAC.setDescription('String describing the device MAC address.')
pcoip_gen_devices_uptime = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 6, 1, 1, 12), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipGenDevicesUptime.setStatus('current')
if mibBuilder.loadTexts:
pcoipGenDevicesUptime.setDescription('Integer containing the number of seconds since boot.')
pcoip_imaging_devices_table = mib_table((1, 3, 6, 1, 4, 1, 25071, 1, 2, 7, 1))
if mibBuilder.loadTexts:
pcoipImagingDevicesTable.setStatus('current')
if mibBuilder.loadTexts:
pcoipImagingDevicesTable.setDescription('The PCoIP Imaging Devices table.')
pcoip_imaging_devices_entry = mib_table_row((1, 3, 6, 1, 4, 1, 25071, 1, 2, 7, 1, 1)).setIndexNames((0, 'TERADICI-PCOIPv2-MIB', 'pcoipImagingDevicesIndex'))
if mibBuilder.loadTexts:
pcoipImagingDevicesEntry.setStatus('current')
if mibBuilder.loadTexts:
pcoipImagingDevicesEntry.setDescription('An entry in the PCoIP imaging devices table.')
pcoip_imaging_devices_index = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 7, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 4))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipImagingDevicesIndex.setStatus('current')
if mibBuilder.loadTexts:
pcoipImagingDevicesIndex.setDescription('The auxiliary variable used for identifying instances of the columnar objects in the devices table.')
pcoip_imaging_devices_session_number = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 7, 1, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 1))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipImagingDevicesSessionNumber.setStatus('current')
if mibBuilder.loadTexts:
pcoipImagingDevicesSessionNumber.setDescription('PCoIP session number used to link imaging devices to statistics.')
pcoip_imaging_devices_display_width = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 7, 1, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 4096))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipImagingDevicesDisplayWidth.setStatus('current')
if mibBuilder.loadTexts:
pcoipImagingDevicesDisplayWidth.setDescription('Display width in pixels.')
pcoip_imaging_devices_display_height = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 7, 1, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 4096))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipImagingDevicesDisplayHeight.setStatus('current')
if mibBuilder.loadTexts:
pcoipImagingDevicesDisplayHeight.setDescription('Display height in lines.')
pcoip_imaging_devices_display_refresh_rate = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 7, 1, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(0, 600))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipImagingDevicesDisplayRefreshRate.setStatus('current')
if mibBuilder.loadTexts:
pcoipImagingDevicesDisplayRefreshRate.setDescription('Display refresh rate in Hz.')
pcoip_imaging_devices_display_change_rate = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 7, 1, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(0, 600))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipImagingDevicesDisplayChangeRate.setStatus('current')
if mibBuilder.loadTexts:
pcoipImagingDevicesDisplayChangeRate.setDescription('Display input change rate in Hz over a 1 second sample.')
pcoip_imaging_devices_display_process_rate = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 7, 1, 1, 7), integer32().subtype(subtypeSpec=value_range_constraint(0, 600))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipImagingDevicesDisplayProcessRate.setStatus('current')
if mibBuilder.loadTexts:
pcoipImagingDevicesDisplayProcessRate.setDescription('Display process frame rate in Hz over a 1 second sample.')
pcoip_imaging_devices_limit_reason = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 7, 1, 1, 8), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipImagingDevicesLimitReason.setStatus('current')
if mibBuilder.loadTexts:
pcoipImagingDevicesLimitReason.setDescription('String describing the reason for limiting the frame rate of this display.')
pcoip_imaging_devices_model = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 7, 1, 1, 9), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipImagingDevicesModel.setStatus('current')
if mibBuilder.loadTexts:
pcoipImagingDevicesModel.setDescription('String describing the display model name.')
pcoip_imaging_devices_status = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 7, 1, 1, 10), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipImagingDevicesStatus.setStatus('current')
if mibBuilder.loadTexts:
pcoipImagingDevicesStatus.setDescription('String describing the display device status.')
pcoip_imaging_devices_mode = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 7, 1, 1, 11), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipImagingDevicesMode.setStatus('current')
if mibBuilder.loadTexts:
pcoipImagingDevicesMode.setDescription('String describing the display mode.')
pcoip_imaging_devices_serial = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 7, 1, 1, 12), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipImagingDevicesSerial.setStatus('current')
if mibBuilder.loadTexts:
pcoipImagingDevicesSerial.setDescription('String describing the display serial number.')
pcoip_imaging_devices_vid = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 7, 1, 1, 13), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipImagingDevicesVID.setStatus('current')
if mibBuilder.loadTexts:
pcoipImagingDevicesVID.setDescription('String describing the display vendor ID.')
pcoip_imaging_devices_pid = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 7, 1, 1, 14), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipImagingDevicesPID.setStatus('current')
if mibBuilder.loadTexts:
pcoipImagingDevicesPID.setDescription('String describing the display product ID.')
pcoip_imaging_devices_date = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 7, 1, 1, 15), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipImagingDevicesDate.setStatus('current')
if mibBuilder.loadTexts:
pcoipImagingDevicesDate.setDescription('String describing the display date of manufacture.')
pcoip_usb_devices_table = mib_table((1, 3, 6, 1, 4, 1, 25071, 1, 2, 8, 1))
if mibBuilder.loadTexts:
pcoipUSBDevicesTable.setStatus('current')
if mibBuilder.loadTexts:
pcoipUSBDevicesTable.setDescription('The PCoIP USB Devices table.')
pcoip_usb_devices_entry = mib_table_row((1, 3, 6, 1, 4, 1, 25071, 1, 2, 8, 1, 1)).setIndexNames((0, 'TERADICI-PCOIPv2-MIB', 'pcoipUSBDevicesIndex'))
if mibBuilder.loadTexts:
pcoipUSBDevicesEntry.setStatus('current')
if mibBuilder.loadTexts:
pcoipUSBDevicesEntry.setDescription('An entry in the PCoIP USB devices table.')
pcoip_usb_devices_index = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 8, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 127))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipUSBDevicesIndex.setStatus('current')
if mibBuilder.loadTexts:
pcoipUSBDevicesIndex.setDescription('The auxiliary variable used for identifying instances of the columnar objects in the devices table.')
pcoip_usb_devices_session_number = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 8, 1, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 1))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipUSBDevicesSessionNumber.setStatus('current')
if mibBuilder.loadTexts:
pcoipUSBDevicesSessionNumber.setDescription('PCoIP session number used to link USB devices to statistics.')
pcoip_usb_devices_port = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 8, 1, 1, 3), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipUSBDevicesPort.setStatus('current')
if mibBuilder.loadTexts:
pcoipUSBDevicesPort.setDescription('USB device port: OHCI or EHCI.')
pcoip_usb_devices_model = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 8, 1, 1, 4), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipUSBDevicesModel.setStatus('current')
if mibBuilder.loadTexts:
pcoipUSBDevicesModel.setDescription('String describing the model name of the connected device.')
pcoip_usb_devices_status = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 8, 1, 1, 5), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipUSBDevicesStatus.setStatus('current')
if mibBuilder.loadTexts:
pcoipUSBDevicesStatus.setDescription('String describing the USB device status.')
pcoip_usb_devices_device_class = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 8, 1, 1, 6), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipUSBDevicesDeviceClass.setStatus('current')
if mibBuilder.loadTexts:
pcoipUSBDevicesDeviceClass.setDescription('String describing the USB device class.')
pcoip_usb_devices_sub_class = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 8, 1, 1, 7), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipUSBDevicesSubClass.setStatus('current')
if mibBuilder.loadTexts:
pcoipUSBDevicesSubClass.setDescription('String describing the USB sub device class.')
pcoip_usb_devices_protocol = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 8, 1, 1, 8), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipUSBDevicesProtocol.setStatus('current')
if mibBuilder.loadTexts:
pcoipUSBDevicesProtocol.setDescription('String describing the USB protocol used.')
pcoip_usb_devices_serial = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 8, 1, 1, 9), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipUSBDevicesSerial.setStatus('current')
if mibBuilder.loadTexts:
pcoipUSBDevicesSerial.setDescription('String describing the USB device serial number.')
pcoip_usb_devices_vid = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 8, 1, 1, 10), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipUSBDevicesVID.setStatus('current')
if mibBuilder.loadTexts:
pcoipUSBDevicesVID.setDescription('String describing the USB device vendor ID.')
pcoip_usb_devices_pid = mib_table_column((1, 3, 6, 1, 4, 1, 25071, 1, 2, 8, 1, 1, 11), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pcoipUSBDevicesPID.setStatus('current')
if mibBuilder.loadTexts:
pcoipUSBDevicesPID.setDescription('String describing the USB device product ID.')
mibBuilder.exportSymbols('TERADICI-PCOIPv2-MIB', pcoipImagingStatsActiveMinimumQuality=pcoipImagingStatsActiveMinimumQuality, pcoipGenStatsBytesReceived=pcoipGenStatsBytesReceived, pcoipUSBStatsTable=pcoipUSBStatsTable, pcoipGenDevicesSerialNumber=pcoipGenDevicesSerialNumber, pcoipNetStatsTXBWActiveLimitkbitPersec=pcoipNetStatsTXBWActiveLimitkbitPersec, pcoipNetStatsTXPacketLossPercent=pcoipNetStatsTXPacketLossPercent, pcoipImagingStatsPipelineProcRate=pcoipImagingStatsPipelineProcRate, pcoipUSBDevicesProtocol=pcoipUSBDevicesProtocol, pcoipNetStatsRXBWPeakkbitPersec=pcoipNetStatsRXBWPeakkbitPersec, pcoipImagingDevicesTable=pcoipImagingDevicesTable, teraPcoipUSBStats=teraPcoipUSBStats, pcoipAudioStatsTXBWLimitkbitPersec=pcoipAudioStatsTXBWLimitkbitPersec, pcoipAudioStatsTXBWkbitPersec=pcoipAudioStatsTXBWkbitPersec, pcoipNetStatsEntry=pcoipNetStatsEntry, pcoipGenStatsPacketsReceived=pcoipGenStatsPacketsReceived, pcoipUSBDevicesPort=pcoipUSBDevicesPort, pcoipGenStatsSessionNumber=pcoipGenStatsSessionNumber, pcoipImagingDevicesPID=pcoipImagingDevicesPID, pcoipNetStatsSessionNumber=pcoipNetStatsSessionNumber, pcoipGenDevicesGenericTag=pcoipGenDevicesGenericTag, teraPcoipUSBDevices=teraPcoipUSBDevices, teraPcoipAudioStats=teraPcoipAudioStats, pcoipAudioStatsEntry=pcoipAudioStatsEntry, pcoipImagingStatsRXBWkbitPersec=pcoipImagingStatsRXBWkbitPersec, pcoipGenStatsEntry=pcoipGenStatsEntry, pcoipUSBDevicesSubClass=pcoipUSBDevicesSubClass, pcoipImagingDevicesDisplayProcessRate=pcoipImagingDevicesDisplayProcessRate, pcoipGenDevicesHardwareVersion=pcoipGenDevicesHardwareVersion, pcoipGenDevicesMAC=pcoipGenDevicesMAC, pcoipUSBStatsBytesReceived=pcoipUSBStatsBytesReceived, pcoipImagingDevicesVID=pcoipImagingDevicesVID, teraPcoipImagingStats=teraPcoipImagingStats, pcoipAudioStatsBytesReceived=pcoipAudioStatsBytesReceived, teraPcoipGenStats=teraPcoipGenStats, pcoipImagingStatsDecoderCapabilitykbitPersec=pcoipImagingStatsDecoderCapabilitykbitPersec, pcoipUSBStatsBytesSent=pcoipUSBStatsBytesSent, pcoipUSBDevicesIndex=pcoipUSBDevicesIndex, pcoipImagingStatsTXBWkbitPersec=pcoipImagingStatsTXBWkbitPersec, pcoipImagingDevicesModel=pcoipImagingDevicesModel, pcoipImagingDevicesIndex=pcoipImagingDevicesIndex, pcoipUSBStatsEntry=pcoipUSBStatsEntry, pcoipUSBDevicesStatus=pcoipUSBDevicesStatus, pcoipImagingStatsBytesReceived=pcoipImagingStatsBytesReceived, pcoipGenStatsPacketsSent=pcoipGenStatsPacketsSent, pcoipUSBDevicesTable=pcoipUSBDevicesTable, pcoipGenStatsSessionDuration=pcoipGenStatsSessionDuration, pcoipGenDevicesUptime=pcoipGenDevicesUptime, pcoipNetStatsRoundTripLatencyMs=pcoipNetStatsRoundTripLatencyMs, pcoipImagingDevicesLimitReason=pcoipImagingDevicesLimitReason, pcoipUSBStatsTXBWkbitPersec=pcoipUSBStatsTXBWkbitPersec, pcoipImagingStatsSessionNumber=pcoipImagingStatsSessionNumber, pcoipNetStatsTXBWkbitPersec=pcoipNetStatsTXBWkbitPersec, pcoipAudioStatsRXBWkbitPersec=pcoipAudioStatsRXBWkbitPersec, pcoipUSBDevicesSerial=pcoipUSBDevicesSerial, pcoipImagingStatsTable=pcoipImagingStatsTable, pcoipGenDevicesEntry=pcoipGenDevicesEntry, pcoipNetStatsRXBWkbitPersec=pcoipNetStatsRXBWkbitPersec, pcoipGenDevicesName=pcoipGenDevicesName, pcoipGenDevicesFirmwareVersion=pcoipGenDevicesFirmwareVersion, pcoipGenDevicesSessionNumber=pcoipGenDevicesSessionNumber, pcoipGenDevicesFwPartNumber=pcoipGenDevicesFwPartNumber, teraMibModule=teraMibModule, pcoipGenDevicesUniqueID=pcoipGenDevicesUniqueID, pcoipUSBDevicesVID=pcoipUSBDevicesVID, pcoipAudioStatsTable=pcoipAudioStatsTable, pcoipUSBDevicesEntry=pcoipUSBDevicesEntry, pcoipGenStatsTxPacketsLost=pcoipGenStatsTxPacketsLost, pcoipGenDevicesPartNumber=pcoipGenDevicesPartNumber, pcoipImagingDevicesMode=pcoipImagingDevicesMode, teraProducts=teraProducts, teraPcoipImagingDevices=teraPcoipImagingDevices, pcoipImagingDevicesStatus=pcoipImagingDevicesStatus, pcoipImagingDevicesEntry=pcoipImagingDevicesEntry, pcoipImagingDevicesDate=pcoipImagingDevicesDate, pcoipAudioStatsBytesSent=pcoipAudioStatsBytesSent, pcoipGenStatsBytesSent=pcoipGenStatsBytesSent, pcoipImagingDevicesDisplayChangeRate=pcoipImagingDevicesDisplayChangeRate, pcoipNetStatsRXPacketLossPercent=pcoipNetStatsRXPacketLossPercent, pcoipUSBStatsSessionNumber=pcoipUSBStatsSessionNumber, teraPcoipGenDevices=teraPcoipGenDevices, pcoipNetStatsTXBWLimitkbitPersec=pcoipNetStatsTXBWLimitkbitPersec, pcoipImagingDevicesDisplayHeight=pcoipImagingDevicesDisplayHeight, pcoipGenStatsTable=pcoipGenStatsTable, pcoipImagingDevicesSessionNumber=pcoipImagingDevicesSessionNumber, pcoipNetStatsTable=pcoipNetStatsTable, PYSNMP_MODULE_ID=teraMibModule, pcoipImagingDevicesDisplayWidth=pcoipImagingDevicesDisplayWidth, pcoipGenDevicesTable=pcoipGenDevicesTable, pcoipImagingDevicesDisplayRefreshRate=pcoipImagingDevicesDisplayRefreshRate, pcoipUSBDevicesDeviceClass=pcoipUSBDevicesDeviceClass, teraPcoipV2=teraPcoipV2, pcoipUSBDevicesPID=pcoipUSBDevicesPID, pcoipImagingStatsBytesSent=pcoipImagingStatsBytesSent, pcoipAudioStatsSessionNumber=pcoipAudioStatsSessionNumber, pcoipUSBDevicesSessionNumber=pcoipUSBDevicesSessionNumber, pcoipImagingDevicesSerial=pcoipImagingDevicesSerial, pcoipImagingStatsEncodedFramesPersec=pcoipImagingStatsEncodedFramesPersec, pcoipImagingStatsEntry=pcoipImagingStatsEntry, pcoipUSBStatsRXBWkbitPersec=pcoipUSBStatsRXBWkbitPersec, pcoipGenDevicesDescription=pcoipGenDevicesDescription, teraPcoipNetStats=teraPcoipNetStats, pcoipUSBDevicesModel=pcoipUSBDevicesModel) |
__version__ = "0.1.0"
__name__ = "python-gmail-export"
__description__ = "Python Gmail Export"
__url__ = "https://github.com/rjmoggach/python-gmail-export"
__author__ = "RJ Moggach"
__authoremail__ = "rjmoggach@gmail.com"
__license__ = "The MIT License (MIT)"
__copyright__ = "Copyright 2021 RJ Moggach" | __version__ = '0.1.0'
__name__ = 'python-gmail-export'
__description__ = 'Python Gmail Export'
__url__ = 'https://github.com/rjmoggach/python-gmail-export'
__author__ = 'RJ Moggach'
__authoremail__ = 'rjmoggach@gmail.com'
__license__ = 'The MIT License (MIT)'
__copyright__ = 'Copyright 2021 RJ Moggach' |
# todas as variaveis vao virar comida pois passa pela global
def comida():
global ovos
ovos = 'comida'
bacon()
def bacon():
ovos = 'bacon'
pimenta()
def pimenta():
print(ovos)
# Programa Principal
ovos = 12
comida()
print(ovos)
| def comida():
global ovos
ovos = 'comida'
bacon()
def bacon():
ovos = 'bacon'
pimenta()
def pimenta():
print(ovos)
ovos = 12
comida()
print(ovos) |
# Numbers
# Define two integers
x = 12
y = 8
# Define two variables that will hold the result of these equations
sum = x+y
difference = x-y
print(f"{x} plus {y} is {sum}.")
print(f"{x} minus {y} is {difference}.")
# There are other operators, such as "*" for multiplication,
# "/" for division, and "%" for modulus.
| x = 12
y = 8
sum = x + y
difference = x - y
print(f'{x} plus {y} is {sum}.')
print(f'{x} minus {y} is {difference}.') |
# Ejercicio 2.4.
nro_one = int(input("Ingrese primer nro: "))
nro_two = int(input("Ingrese segundo nro: "))
for i in range(nro_one, nro_two + 1):
if i % 2 == 0:
print(i)
| nro_one = int(input('Ingrese primer nro: '))
nro_two = int(input('Ingrese segundo nro: '))
for i in range(nro_one, nro_two + 1):
if i % 2 == 0:
print(i) |
n = int(input())
sequencia = [0]
if n > 1:
sequencia.append(1)
for i in range(2, n):
sequencia.append(sequencia[-1] + sequencia[-2])
print(' '.join(str(x) for x in sequencia))
| n = int(input())
sequencia = [0]
if n > 1:
sequencia.append(1)
for i in range(2, n):
sequencia.append(sequencia[-1] + sequencia[-2])
print(' '.join((str(x) for x in sequencia))) |
i = 0
def foo():
i = i + 1 # UnboundLocalError: local variable 'i' referenced before assignment
print(i)
foo() # i does not reference to global variable | i = 0
def foo():
i = i + 1
print(i)
foo() |
#!/usr/bin/env python3
# ~*~ coding: utf-8 ~*~
onetoten = range(1, 11)
for count in onetoten:
print(count)
## Shorter version:
#for count in range(1, 11):
# print(count)
| onetoten = range(1, 11)
for count in onetoten:
print(count) |
class Solution:
# @param A : integer
# @return a strings
def convertToTitle(self, A):
alphalist = ['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']
outputstring = ''
base = 26
while A != 0:
quo = A // base
rem = A % base
if rem == 0:
outputstring += 'Z'
A = quo - 1
else:
outputstring += alphalist[rem - 1]
A = quo
returnstring = outputstring[::-1]
return returnstring
A = 943566
# A = 28 * 26
s = Solution()
print(s.convertToTitle(A))
| class Solution:
def convert_to_title(self, A):
alphalist = ['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']
outputstring = ''
base = 26
while A != 0:
quo = A // base
rem = A % base
if rem == 0:
outputstring += 'Z'
a = quo - 1
else:
outputstring += alphalist[rem - 1]
a = quo
returnstring = outputstring[::-1]
return returnstring
a = 943566
s = solution()
print(s.convertToTitle(A)) |
#https://galaiko.rocks/posts/2018-07-08/
def f(num):
return 1 if int(num) <= 26 else 0
def count_possibilites(enc):
length = len(enc)
if length == 1:
return 1
elif length == 2:
return f(enc) + 1
else:
return f(enc[:1]) * count_possibilites(enc[1:]) + f(enc[:2]) * count_possibilites(enc[2:])
testCase = '221282229182918928192912195211191212192819813'
print(count_possibilites(testCase)) | def f(num):
return 1 if int(num) <= 26 else 0
def count_possibilites(enc):
length = len(enc)
if length == 1:
return 1
elif length == 2:
return f(enc) + 1
else:
return f(enc[:1]) * count_possibilites(enc[1:]) + f(enc[:2]) * count_possibilites(enc[2:])
test_case = '221282229182918928192912195211191212192819813'
print(count_possibilites(testCase)) |
#https://www.codewars.com/kata/convert-boolean-values-to-strings-yes-or-no
def bool_to_word(boolean):
return "Yes" if boolean == True else "No"
| def bool_to_word(boolean):
return 'Yes' if boolean == True else 'No' |
######################################################################
#
# Copyright (C) 2013
# Associated Universities, Inc. Washington DC, USA,
#
# This library is free software; you can redistribute it and/or modify it
# under the terms of the GNU Library General Public License as published by
# the Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.
#
# This library is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
# License for more details.
#
# You should have received a copy of the GNU Library General Public License
# along with this library; if not, write to the Free Software Foundation,
# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
#
# Correspondence concerning VLA Pipelines should be addressed as follows:
# Please register and submit helpdesk tickets via: https://help.nrao.edu
# Postal address:
# National Radio Astronomy Observatory
# VLA Pipeline Support Office
# PO Box O
# Socorro, NM, USA
#
######################################################################
# CALCULATE DATA WEIGHTS BASED ON ST. DEV. WITHIN EACH SPW
# use statwt
logprint ("Starting EVLA_pipe_statwt.py", logfileout='logs/statwt.log')
time_list=runtiming('checkflag', 'start')
QA2_statwt='Pass'
logprint ("Calculate data weights per spw using statwt", logfileout='logs/statwt.log')
# Run on all calibrators
default(statwt)
vis=ms_active
dorms=False
fitspw=''
fitcorr=''
combine=''
minsamp=2
field=''
spw=''
intent='*CALIBRATE*'
datacolumn='corrected'
statwt()
# Run on all targets
# set spw to exclude strong science spectral lines
# Calculate std excluding edges and middle of SPW
# spw_usechan = ''
# percents = np.array([0.1, 0.3, 0.7, 0.9])
# for idx, spw_num in enumerate(spws):
# perc_chans = np.round(channels[idx] * percents).astype(int)
# spw_usechan += str(idx) + ":{0}~{1};{2}~{3}".format(*perc_chans) + ","
# Here are the channels I would like to use for finding the stand. dev.
# This is now dependent on the instrument setup and should be removed for all
# other purposes?
hi_chans = "0:600~900;2800~3300"
rrl_chans = "10~25;100~110"
all_rrls = ""
for i in [1, 2, 4, 8, 9]:
all_rrls += "{0}:{1},".format(i, rrl_chans)
all_rrls = all_rrls[:-1]
oh_chans = "20~50;200~230"
all_ohs = ""
for i in [3, 5, 6, 7]:
all_ohs += "{0}:{1},".format(i, oh_chans)
all_ohs = all_ohs[:-1]
spw_usechan = "{0},{1},{2}".format(hi_chans, all_rrls, all_ohs)
default(statwt)
vis=ms_active
dorms=False
# fitspw=spw_usechan[:-1] # Use with the percentile finder above
fitspw=spw_usechan # Use with the user-defined channels
fitcorr=''
combine=''
minsamp=2
field=''
spw=''
intent='*TARGET*'
datacolumn='corrected'
statwt()
# Until we understand better the failure modes of this task, leave QA2
# score set to "Pass".
logprint ("QA2 score: "+QA2_statwt, logfileout='logs/statwt.log')
logprint ("Finished EVLA_pipe_statwt.py", logfileout='logs/statwt.log')
time_list=runtiming('targetflag', 'end')
pipeline_save()
######################################################################
| logprint('Starting EVLA_pipe_statwt.py', logfileout='logs/statwt.log')
time_list = runtiming('checkflag', 'start')
qa2_statwt = 'Pass'
logprint('Calculate data weights per spw using statwt', logfileout='logs/statwt.log')
default(statwt)
vis = ms_active
dorms = False
fitspw = ''
fitcorr = ''
combine = ''
minsamp = 2
field = ''
spw = ''
intent = '*CALIBRATE*'
datacolumn = 'corrected'
statwt()
hi_chans = '0:600~900;2800~3300'
rrl_chans = '10~25;100~110'
all_rrls = ''
for i in [1, 2, 4, 8, 9]:
all_rrls += '{0}:{1},'.format(i, rrl_chans)
all_rrls = all_rrls[:-1]
oh_chans = '20~50;200~230'
all_ohs = ''
for i in [3, 5, 6, 7]:
all_ohs += '{0}:{1},'.format(i, oh_chans)
all_ohs = all_ohs[:-1]
spw_usechan = '{0},{1},{2}'.format(hi_chans, all_rrls, all_ohs)
default(statwt)
vis = ms_active
dorms = False
fitspw = spw_usechan
fitcorr = ''
combine = ''
minsamp = 2
field = ''
spw = ''
intent = '*TARGET*'
datacolumn = 'corrected'
statwt()
logprint('QA2 score: ' + QA2_statwt, logfileout='logs/statwt.log')
logprint('Finished EVLA_pipe_statwt.py', logfileout='logs/statwt.log')
time_list = runtiming('targetflag', 'end')
pipeline_save() |
#!/usr/bin/env python3
def handler(event, context):
print("Hello World!")
print("=====Event=====")
print("{}".format(event))
print("=====Context=====")
print("{}".format(context))
| def handler(event, context):
print('Hello World!')
print('=====Event=====')
print('{}'.format(event))
print('=====Context=====')
print('{}'.format(context)) |
# Mackie CU pages
Pan = 0
Stereo = 1
Sends = 2
Effects = 3
Equalizer = 4
Free = 5
| pan = 0
stereo = 1
sends = 2
effects = 3
equalizer = 4
free = 5 |
WIDTH = 800
HEIGHT = 800
BLACK = (60, 60, 60)
WHITE = (255, 255, 255)
HIGHLIGHT = (200, 0, 0)
WINDOW_NAME = 'PyChess'
ROWS = 8
COLUMNS = 8
SQUARE_SIZE = int(WIDTH/ROWS)
| width = 800
height = 800
black = (60, 60, 60)
white = (255, 255, 255)
highlight = (200, 0, 0)
window_name = 'PyChess'
rows = 8
columns = 8
square_size = int(WIDTH / ROWS) |
n=int(input())
s=input()
a=s.split()
sett=set(a)
lis=list(sett)
x=[int(i) for i in lis]
x.remove(max(x))
print(max(x))
| n = int(input())
s = input()
a = s.split()
sett = set(a)
lis = list(sett)
x = [int(i) for i in lis]
x.remove(max(x))
print(max(x)) |
# -- Project information -----------------------------------------------------
project = "Sphinx Book Theme"
copyright = "2020, Executable Book Project"
author = "Executable Book Project"
master_doc = "index"
extensions = ["myst_parser"]
html_theme = "sphinx_book_theme"
html_theme_options = {
"home_page_in_toc": True,
}
| project = 'Sphinx Book Theme'
copyright = '2020, Executable Book Project'
author = 'Executable Book Project'
master_doc = 'index'
extensions = ['myst_parser']
html_theme = 'sphinx_book_theme'
html_theme_options = {'home_page_in_toc': True} |
#
# PySNMP MIB module FNET-OPTIVIEW-WAN-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/FNET-OPTIVIEW-WAN-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 19:00:31 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ConstraintsIntersection, SingleValueConstraint, ValueSizeConstraint, ConstraintsUnion, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "SingleValueConstraint", "ValueSizeConstraint", "ConstraintsUnion", "ValueRangeConstraint")
fnetOptiViewGeneric, = mibBuilder.importSymbols("FNET-GLOBAL-REG", "fnetOptiViewGeneric")
ovTrapDescription, ovTrapOffenderSubId, ovTrapSeverity, ovTrapAgentSysName, ovTrapOffenderName, ovTrapStatus, ovTrapOffenderNetAddr = mibBuilder.importSymbols("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapDescription", "ovTrapOffenderSubId", "ovTrapSeverity", "ovTrapAgentSysName", "ovTrapOffenderName", "ovTrapStatus", "ovTrapOffenderNetAddr")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
Integer32, MibIdentifier, Counter64, Bits, Counter32, Unsigned32, iso, MibScalar, MibTable, MibTableRow, MibTableColumn, ModuleIdentity, ObjectIdentity, TimeTicks, Gauge32, NotificationType, NotificationType, IpAddress = mibBuilder.importSymbols("SNMPv2-SMI", "Integer32", "MibIdentifier", "Counter64", "Bits", "Counter32", "Unsigned32", "iso", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "ModuleIdentity", "ObjectIdentity", "TimeTicks", "Gauge32", "NotificationType", "NotificationType", "IpAddress")
DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention")
probSonetLinkDown = NotificationType((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0,12000)).setObjects(("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapAgentSysName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapSeverity"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapStatus"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapDescription"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderNetAddr"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderSubId"))
probSonetErrors = NotificationType((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0,12001)).setObjects(("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapAgentSysName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapSeverity"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapStatus"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapDescription"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderNetAddr"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderSubId"))
probSonetAlarms = NotificationType((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0,12002)).setObjects(("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapAgentSysName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapSeverity"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapStatus"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapDescription"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderNetAddr"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderSubId"))
probAtmLinkDown = NotificationType((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0,12003)).setObjects(("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapAgentSysName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapSeverity"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapStatus"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapDescription"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderNetAddr"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderSubId"))
probAtmErrors = NotificationType((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0,12004)).setObjects(("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapAgentSysName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapSeverity"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapStatus"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapDescription"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderNetAddr"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderSubId"))
probPDUCRCErrors = NotificationType((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0,12005)).setObjects(("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapAgentSysName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapSeverity"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapStatus"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapDescription"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderNetAddr"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderSubId"))
probPosLinkDown = NotificationType((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0,12006)).setObjects(("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapAgentSysName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapSeverity"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapStatus"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapDescription"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderNetAddr"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderSubId"))
probPosErrorsDetected = NotificationType((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0,12007)).setObjects(("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapAgentSysName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapSeverity"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapStatus"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapDescription"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderNetAddr"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderSubId"))
probLinkUtilization = NotificationType((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0,12008)).setObjects(("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapAgentSysName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapSeverity"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapStatus"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapDescription"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderNetAddr"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderSubId"))
probDNSServerNoResp = NotificationType((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0,12009)).setObjects(("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapAgentSysName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapSeverity"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapStatus"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapDescription"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderNetAddr"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderSubId"))
probDNSServerNowUsing = NotificationType((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0,12010)).setObjects(("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapAgentSysName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapSeverity"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapStatus"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapDescription"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderNetAddr"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderSubId"))
probLostDHCPLease = NotificationType((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0,12011)).setObjects(("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapAgentSysName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapSeverity"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapStatus"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapDescription"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderNetAddr"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderSubId"))
probDefaultRouterNoResp = NotificationType((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0,12012)).setObjects(("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapAgentSysName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapSeverity"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapStatus"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapDescription"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderNetAddr"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderSubId"))
probDiscoveryFull = NotificationType((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0,12013)).setObjects(("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapAgentSysName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapSeverity"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapStatus"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapDescription"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderNetAddr"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderSubId"))
probClearCounts = NotificationType((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0,12014)).setObjects(("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapAgentSysName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapSeverity"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapStatus"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapDescription"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderNetAddr"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderSubId"))
probDS1LinkDown = NotificationType((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0,12015)).setObjects(("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapAgentSysName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapSeverity"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapStatus"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapDescription"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderNetAddr"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderSubId"))
probDS1Errors = NotificationType((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0,12016)).setObjects(("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapAgentSysName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapSeverity"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapStatus"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapDescription"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderNetAddr"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderSubId"))
probDS1Alarms = NotificationType((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0,12017)).setObjects(("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapAgentSysName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapSeverity"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapStatus"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapDescription"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderNetAddr"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderSubId"))
probDS3LinkDown = NotificationType((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0,12018)).setObjects(("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapAgentSysName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapSeverity"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapStatus"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapDescription"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderNetAddr"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderSubId"))
probDS3Errors = NotificationType((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0,12019)).setObjects(("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapAgentSysName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapSeverity"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapStatus"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapDescription"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderNetAddr"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderSubId"))
probDS3Alarms = NotificationType((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0,12020)).setObjects(("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapAgentSysName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapSeverity"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapStatus"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapDescription"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderNetAddr"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderSubId"))
probFrLmiLinkDown = NotificationType((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0,12021)).setObjects(("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapAgentSysName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapSeverity"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapStatus"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapDescription"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderNetAddr"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderSubId"))
probFrLmiErrors = NotificationType((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0,12022)).setObjects(("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapAgentSysName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapSeverity"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapStatus"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapDescription"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderNetAddr"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderSubId"))
probFrErrorsDetected = NotificationType((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0,12023)).setObjects(("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapAgentSysName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapSeverity"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapStatus"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapDescription"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderNetAddr"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderSubId"))
probVcDown = NotificationType((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0,12024)).setObjects(("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapAgentSysName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapSeverity"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapStatus"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapDescription"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderNetAddr"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderSubId"))
probInvalidDlci = NotificationType((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0,12025)).setObjects(("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapAgentSysName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapSeverity"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapStatus"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapDescription"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderNetAddr"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderSubId"))
probFrDEUnderCIRUtilization = NotificationType((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0,12026)).setObjects(("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapAgentSysName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapSeverity"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapStatus"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapDescription"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderNetAddr"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderSubId"))
probHdlcLinkDown = NotificationType((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0,12027)).setObjects(("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapAgentSysName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapSeverity"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapStatus"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapDescription"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderNetAddr"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderSubId"))
probHdlcErrorsDetected = NotificationType((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0,12028)).setObjects(("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapAgentSysName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapSeverity"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapStatus"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapDescription"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderNetAddr"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderSubId"))
probFrDteDceReversed = NotificationType((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0,12029)).setObjects(("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapAgentSysName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapSeverity"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapStatus"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapDescription"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderNetAddr"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderSubId"))
probKeyDevPingLatency = NotificationType((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0,12030)).setObjects(("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapAgentSysName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapSeverity"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapStatus"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapDescription"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderName"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderNetAddr"), ("FNET-OPTIVIEW-GENERIC-MIB", "ovTrapOffenderSubId"))
mibBuilder.exportSymbols("FNET-OPTIVIEW-WAN-MIB", probFrDteDceReversed=probFrDteDceReversed, probKeyDevPingLatency=probKeyDevPingLatency, probAtmLinkDown=probAtmLinkDown, probDefaultRouterNoResp=probDefaultRouterNoResp, probDS3LinkDown=probDS3LinkDown, probAtmErrors=probAtmErrors, probVcDown=probVcDown, probDNSServerNoResp=probDNSServerNoResp, probDS3Alarms=probDS3Alarms, probPDUCRCErrors=probPDUCRCErrors, probFrLmiErrors=probFrLmiErrors, probClearCounts=probClearCounts, probFrDEUnderCIRUtilization=probFrDEUnderCIRUtilization, probInvalidDlci=probInvalidDlci, probDS1Alarms=probDS1Alarms, probFrErrorsDetected=probFrErrorsDetected, probPosLinkDown=probPosLinkDown, probLinkUtilization=probLinkUtilization, probLostDHCPLease=probLostDHCPLease, probDS1Errors=probDS1Errors, probDiscoveryFull=probDiscoveryFull, probSonetLinkDown=probSonetLinkDown, probPosErrorsDetected=probPosErrorsDetected, probHdlcLinkDown=probHdlcLinkDown, probSonetErrors=probSonetErrors, probDNSServerNowUsing=probDNSServerNowUsing, probSonetAlarms=probSonetAlarms, probHdlcErrorsDetected=probHdlcErrorsDetected, probDS3Errors=probDS3Errors, probFrLmiLinkDown=probFrLmiLinkDown, probDS1LinkDown=probDS1LinkDown)
| (integer, octet_string, object_identifier) = mibBuilder.importSymbols('ASN1', 'Integer', 'OctetString', 'ObjectIdentifier')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(constraints_intersection, single_value_constraint, value_size_constraint, constraints_union, value_range_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'SingleValueConstraint', 'ValueSizeConstraint', 'ConstraintsUnion', 'ValueRangeConstraint')
(fnet_opti_view_generic,) = mibBuilder.importSymbols('FNET-GLOBAL-REG', 'fnetOptiViewGeneric')
(ov_trap_description, ov_trap_offender_sub_id, ov_trap_severity, ov_trap_agent_sys_name, ov_trap_offender_name, ov_trap_status, ov_trap_offender_net_addr) = mibBuilder.importSymbols('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapDescription', 'ovTrapOffenderSubId', 'ovTrapSeverity', 'ovTrapAgentSysName', 'ovTrapOffenderName', 'ovTrapStatus', 'ovTrapOffenderNetAddr')
(module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup')
(integer32, mib_identifier, counter64, bits, counter32, unsigned32, iso, mib_scalar, mib_table, mib_table_row, mib_table_column, module_identity, object_identity, time_ticks, gauge32, notification_type, notification_type, ip_address) = mibBuilder.importSymbols('SNMPv2-SMI', 'Integer32', 'MibIdentifier', 'Counter64', 'Bits', 'Counter32', 'Unsigned32', 'iso', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'ModuleIdentity', 'ObjectIdentity', 'TimeTicks', 'Gauge32', 'NotificationType', 'NotificationType', 'IpAddress')
(display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention')
prob_sonet_link_down = notification_type((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0, 12000)).setObjects(('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapAgentSysName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapSeverity'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapStatus'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapDescription'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderNetAddr'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderSubId'))
prob_sonet_errors = notification_type((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0, 12001)).setObjects(('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapAgentSysName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapSeverity'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapStatus'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapDescription'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderNetAddr'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderSubId'))
prob_sonet_alarms = notification_type((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0, 12002)).setObjects(('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapAgentSysName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapSeverity'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapStatus'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapDescription'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderNetAddr'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderSubId'))
prob_atm_link_down = notification_type((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0, 12003)).setObjects(('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapAgentSysName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapSeverity'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapStatus'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapDescription'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderNetAddr'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderSubId'))
prob_atm_errors = notification_type((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0, 12004)).setObjects(('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapAgentSysName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapSeverity'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapStatus'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapDescription'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderNetAddr'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderSubId'))
prob_pducrc_errors = notification_type((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0, 12005)).setObjects(('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapAgentSysName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapSeverity'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapStatus'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapDescription'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderNetAddr'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderSubId'))
prob_pos_link_down = notification_type((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0, 12006)).setObjects(('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapAgentSysName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapSeverity'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapStatus'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapDescription'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderNetAddr'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderSubId'))
prob_pos_errors_detected = notification_type((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0, 12007)).setObjects(('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapAgentSysName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapSeverity'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapStatus'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapDescription'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderNetAddr'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderSubId'))
prob_link_utilization = notification_type((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0, 12008)).setObjects(('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapAgentSysName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapSeverity'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapStatus'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapDescription'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderNetAddr'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderSubId'))
prob_dns_server_no_resp = notification_type((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0, 12009)).setObjects(('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapAgentSysName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapSeverity'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapStatus'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapDescription'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderNetAddr'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderSubId'))
prob_dns_server_now_using = notification_type((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0, 12010)).setObjects(('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapAgentSysName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapSeverity'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapStatus'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapDescription'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderNetAddr'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderSubId'))
prob_lost_dhcp_lease = notification_type((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0, 12011)).setObjects(('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapAgentSysName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapSeverity'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapStatus'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapDescription'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderNetAddr'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderSubId'))
prob_default_router_no_resp = notification_type((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0, 12012)).setObjects(('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapAgentSysName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapSeverity'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapStatus'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapDescription'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderNetAddr'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderSubId'))
prob_discovery_full = notification_type((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0, 12013)).setObjects(('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapAgentSysName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapSeverity'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapStatus'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapDescription'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderNetAddr'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderSubId'))
prob_clear_counts = notification_type((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0, 12014)).setObjects(('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapAgentSysName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapSeverity'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapStatus'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapDescription'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderNetAddr'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderSubId'))
prob_ds1_link_down = notification_type((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0, 12015)).setObjects(('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapAgentSysName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapSeverity'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapStatus'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapDescription'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderNetAddr'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderSubId'))
prob_ds1_errors = notification_type((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0, 12016)).setObjects(('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapAgentSysName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapSeverity'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapStatus'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapDescription'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderNetAddr'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderSubId'))
prob_ds1_alarms = notification_type((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0, 12017)).setObjects(('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapAgentSysName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapSeverity'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapStatus'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapDescription'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderNetAddr'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderSubId'))
prob_ds3_link_down = notification_type((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0, 12018)).setObjects(('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapAgentSysName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapSeverity'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapStatus'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapDescription'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderNetAddr'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderSubId'))
prob_ds3_errors = notification_type((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0, 12019)).setObjects(('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapAgentSysName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapSeverity'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapStatus'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapDescription'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderNetAddr'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderSubId'))
prob_ds3_alarms = notification_type((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0, 12020)).setObjects(('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapAgentSysName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapSeverity'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapStatus'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapDescription'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderNetAddr'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderSubId'))
prob_fr_lmi_link_down = notification_type((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0, 12021)).setObjects(('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapAgentSysName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapSeverity'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapStatus'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapDescription'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderNetAddr'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderSubId'))
prob_fr_lmi_errors = notification_type((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0, 12022)).setObjects(('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapAgentSysName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapSeverity'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapStatus'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapDescription'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderNetAddr'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderSubId'))
prob_fr_errors_detected = notification_type((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0, 12023)).setObjects(('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapAgentSysName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapSeverity'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapStatus'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapDescription'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderNetAddr'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderSubId'))
prob_vc_down = notification_type((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0, 12024)).setObjects(('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapAgentSysName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapSeverity'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapStatus'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapDescription'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderNetAddr'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderSubId'))
prob_invalid_dlci = notification_type((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0, 12025)).setObjects(('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapAgentSysName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapSeverity'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapStatus'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapDescription'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderNetAddr'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderSubId'))
prob_fr_de_under_cir_utilization = notification_type((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0, 12026)).setObjects(('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapAgentSysName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapSeverity'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapStatus'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapDescription'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderNetAddr'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderSubId'))
prob_hdlc_link_down = notification_type((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0, 12027)).setObjects(('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapAgentSysName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapSeverity'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapStatus'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapDescription'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderNetAddr'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderSubId'))
prob_hdlc_errors_detected = notification_type((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0, 12028)).setObjects(('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapAgentSysName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapSeverity'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapStatus'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapDescription'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderNetAddr'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderSubId'))
prob_fr_dte_dce_reversed = notification_type((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0, 12029)).setObjects(('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapAgentSysName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapSeverity'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapStatus'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapDescription'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderNetAddr'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderSubId'))
prob_key_dev_ping_latency = notification_type((1, 3, 6, 1, 4, 1, 1226, 2, 1) + (0, 12030)).setObjects(('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapAgentSysName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapSeverity'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapStatus'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapDescription'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderName'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderNetAddr'), ('FNET-OPTIVIEW-GENERIC-MIB', 'ovTrapOffenderSubId'))
mibBuilder.exportSymbols('FNET-OPTIVIEW-WAN-MIB', probFrDteDceReversed=probFrDteDceReversed, probKeyDevPingLatency=probKeyDevPingLatency, probAtmLinkDown=probAtmLinkDown, probDefaultRouterNoResp=probDefaultRouterNoResp, probDS3LinkDown=probDS3LinkDown, probAtmErrors=probAtmErrors, probVcDown=probVcDown, probDNSServerNoResp=probDNSServerNoResp, probDS3Alarms=probDS3Alarms, probPDUCRCErrors=probPDUCRCErrors, probFrLmiErrors=probFrLmiErrors, probClearCounts=probClearCounts, probFrDEUnderCIRUtilization=probFrDEUnderCIRUtilization, probInvalidDlci=probInvalidDlci, probDS1Alarms=probDS1Alarms, probFrErrorsDetected=probFrErrorsDetected, probPosLinkDown=probPosLinkDown, probLinkUtilization=probLinkUtilization, probLostDHCPLease=probLostDHCPLease, probDS1Errors=probDS1Errors, probDiscoveryFull=probDiscoveryFull, probSonetLinkDown=probSonetLinkDown, probPosErrorsDetected=probPosErrorsDetected, probHdlcLinkDown=probHdlcLinkDown, probSonetErrors=probSonetErrors, probDNSServerNowUsing=probDNSServerNowUsing, probSonetAlarms=probSonetAlarms, probHdlcErrorsDetected=probHdlcErrorsDetected, probDS3Errors=probDS3Errors, probFrLmiLinkDown=probFrLmiLinkDown, probDS1LinkDown=probDS1LinkDown) |
n = int (input('Cuantos numeros de fibonacii?'))
i = 0
a, b = 0, 1
while i < n :
print(a)
a, b = b, a+b
i = i + 1 | n = int(input('Cuantos numeros de fibonacii?'))
i = 0
(a, b) = (0, 1)
while i < n:
print(a)
(a, b) = (b, a + b)
i = i + 1 |
#!/usr/bin/env python3
############################################################################################
# #
# Program purpose: Prints letter 'U' to the console. #
# Program Author : Happi Yvan <ivensteinpoker@gmail.com> #
# Creation Date : January 27, 2019 #
# #
############################################################################################
def print_letter_U():
for x in range(6):
print('*', ' ' * 3, '*')
print(('*' * 5).center(7, ' '))
if __name__ == '__main__':
print_letter_U()
| def print_letter_u():
for x in range(6):
print('*', ' ' * 3, '*')
print(('*' * 5).center(7, ' '))
if __name__ == '__main__':
print_letter_u() |
def inc(x):
return x + 1
def catcher(event):
print(event.origin_state)
| def inc(x):
return x + 1
def catcher(event):
print(event.origin_state) |
with open("original.txt", 'a') as jabber:
for i in range(2, 13):
for j in range(1, 13):
print(f"{j:>2} times {i} is {i * j}", file=jabber)
print("=" * 40, file=jabber)
| with open('original.txt', 'a') as jabber:
for i in range(2, 13):
for j in range(1, 13):
print(f'{j:>2} times {i} is {i * j}', file=jabber)
print('=' * 40, file=jabber) |
def all_descendants(class_object, _memo=None):
if _memo is None:
_memo = {}
elif class_object in _memo:
return
yield class_object
for subclass in class_object.__subclasses__():
for descendant in all_descendants(subclass, _memo):
yield descendant
| def all_descendants(class_object, _memo=None):
if _memo is None:
_memo = {}
elif class_object in _memo:
return
yield class_object
for subclass in class_object.__subclasses__():
for descendant in all_descendants(subclass, _memo):
yield descendant |
# Write a program to take input marks of two subject and print aggregate.
S1=int(input("Enter 1st Marks:"))
S2=int(input("Enter 2nd Marks:"))
Total = S1 + S2;
Avg = Total/2;
print("Total marks = ", Total)
print("Average marks = ", Avg) | s1 = int(input('Enter 1st Marks:'))
s2 = int(input('Enter 2nd Marks:'))
total = S1 + S2
avg = Total / 2
print('Total marks = ', Total)
print('Average marks = ', Avg) |
# Take 2 of int, char or string, return the grater of 2
def greater(in_type, two_args):
if in_type == "int":
for i in range(len(two_args)):
two_args[i] = int(two_args[i])
elif in_type == "char":
for i in range(two_args):
two_args[i] = two_args[i][0]
two_args[i].title()
elif in_type == "string":
for i in range(two_args):
two_args[i].title()
else:
pass
result = two_args[0]
for i in range(two_args):
if two_args[i] >= result:
result = two_args[i]
result.title()
return(result)
input_type = input()
input_1 = input()
input_2 = input()
result = greater(input_type, [input_1, input_2])
print(result)
| def greater(in_type, two_args):
if in_type == 'int':
for i in range(len(two_args)):
two_args[i] = int(two_args[i])
elif in_type == 'char':
for i in range(two_args):
two_args[i] = two_args[i][0]
two_args[i].title()
elif in_type == 'string':
for i in range(two_args):
two_args[i].title()
else:
pass
result = two_args[0]
for i in range(two_args):
if two_args[i] >= result:
result = two_args[i]
result.title()
return result
input_type = input()
input_1 = input()
input_2 = input()
result = greater(input_type, [input_1, input_2])
print(result) |
class Result:
INDEX = 0
COLUMN = 1
DOCUMENT = 2
| class Result:
index = 0
column = 1
document = 2 |
def compute_acc(results):
labels = [pair[1] for pair in results]
predicts = [pair[2] for pair in results]
assert len(labels) == len(predicts)
acc = 0
for label, predict in zip(labels, predicts):
if label == predict:
acc += 1
return acc / len(labels) | def compute_acc(results):
labels = [pair[1] for pair in results]
predicts = [pair[2] for pair in results]
assert len(labels) == len(predicts)
acc = 0
for (label, predict) in zip(labels, predicts):
if label == predict:
acc += 1
return acc / len(labels) |
users = {
'juho': {
'name': 'Juho',
'username': 'juho',
'hashed_password': 'ei-selkokielinen-salasana',
'role': 'opettaja'
},
'olli': {
'name': 'Olli Opiskelija',
'username': 'olli',
'hashed_password': 'ei-selkokielinen-salasana',
'role': 'student'
}
}
| users = {'juho': {'name': 'Juho', 'username': 'juho', 'hashed_password': 'ei-selkokielinen-salasana', 'role': 'opettaja'}, 'olli': {'name': 'Olli Opiskelija', 'username': 'olli', 'hashed_password': 'ei-selkokielinen-salasana', 'role': 'student'}} |
# Remove Linear, annual, and semiannual trends
# Note: The keyword annual also removes semiannual trends
# To only remove semiannual but not annual trends,
# replace 'annual' with 'semiannual'
ap_tf_type = AutoList(['linear','annual'])
# Create Trend Filter to remove linear, annual, and semi-annual trend
fl_tf = skdiscovery.data_structure.series.filters.TrendFilter('TrendFilter', [ap_tf_type])
# Create stage container for the trend filter
sc_tf = StageContainer(fl_tf)
| ap_tf_type = auto_list(['linear', 'annual'])
fl_tf = skdiscovery.data_structure.series.filters.TrendFilter('TrendFilter', [ap_tf_type])
sc_tf = stage_container(fl_tf) |
class Solution:
def minCostClimbingStairs(self, cost: List[int]) -> int:
n = len(cost)
f = [None] * (n + 1)
f[0] = 0
f[1] = 0
for i in range(2, n + 1):
f[i] = min(f[i - 1] + cost[i - 1], f[i - 2] + cost[i - 2])
return f[n]
| class Solution:
def min_cost_climbing_stairs(self, cost: List[int]) -> int:
n = len(cost)
f = [None] * (n + 1)
f[0] = 0
f[1] = 0
for i in range(2, n + 1):
f[i] = min(f[i - 1] + cost[i - 1], f[i - 2] + cost[i - 2])
return f[n] |
distances_from_sofia = [
('Bansko', 97),
('Brussels', 1701),
('Alexandria', 1403),
('Nice', 1307),
('Szeged', 469),
('Dublin', 2479),
('Palermo', 987),
('Oslo', 2098),
('Moscow', 1779),
('Madrid', 2259),
('London', 2019)
]
# variable to store the filtered list of distance tuples:
selected_distances = []
# filter each distance tuple:
for item in distances_from_sofia:
# each item is a tuple, and we check its second value:
if(item[1] < 1500):
selected_distances.append(item)
# print the filtered list of distance tuples:
print("Distances bellow 1500 km from Sofia are:")
for item in selected_distances:
print("{} - {}".format(item[0], item[1]))
| distances_from_sofia = [('Bansko', 97), ('Brussels', 1701), ('Alexandria', 1403), ('Nice', 1307), ('Szeged', 469), ('Dublin', 2479), ('Palermo', 987), ('Oslo', 2098), ('Moscow', 1779), ('Madrid', 2259), ('London', 2019)]
selected_distances = []
for item in distances_from_sofia:
if item[1] < 1500:
selected_distances.append(item)
print('Distances bellow 1500 km from Sofia are:')
for item in selected_distances:
print('{} - {}'.format(item[0], item[1])) |
firstWord = input().lower()
secondWord = input().lower()
if firstWord == secondWord:
print("yes")
else:
print("no") | first_word = input().lower()
second_word = input().lower()
if firstWord == secondWord:
print('yes')
else:
print('no') |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.