content
stringlengths 7
1.05M
| fixed_cases
stringlengths 1
1.28M
|
---|---|
class Warrior:
attack = 5
health = 50
is_alive = True
class Knight(Warrior):
attack = 7
def fight(unit_1, unit_2):
print('fight')
flag = True
while unit_1.health > 0 and unit_2.health > 0:
if flag is True:
unit_2.health -= unit_1.attack
flag = False
else:
unit_1.health -= unit_2.attack
flag = True
if unit_1.health > 0:
print('unit1 win')
unit_2.is_alive = False
return True
elif unit_2.health > 0:
print('unit2 win')
unit_1.is_alive = False
return False
else:
print('error')
if __name__ == '__main__':
#These "asserts" using only for self-checking and not necessary for auto-testing
chuck = Warrior()
bruce = Warrior()
carl = Knight()
dave = Warrior()
mark = Warrior()
assert fight(chuck, bruce) == True
assert fight(dave, carl) == False
assert chuck.is_alive == True
assert bruce.is_alive == False
assert carl.is_alive == True
assert dave.is_alive == False
assert fight(carl, mark) == False
assert carl.is_alive == False
print("Coding complete? Let's try tests!")
|
class Warrior:
attack = 5
health = 50
is_alive = True
class Knight(Warrior):
attack = 7
def fight(unit_1, unit_2):
print('fight')
flag = True
while unit_1.health > 0 and unit_2.health > 0:
if flag is True:
unit_2.health -= unit_1.attack
flag = False
else:
unit_1.health -= unit_2.attack
flag = True
if unit_1.health > 0:
print('unit1 win')
unit_2.is_alive = False
return True
elif unit_2.health > 0:
print('unit2 win')
unit_1.is_alive = False
return False
else:
print('error')
if __name__ == '__main__':
chuck = warrior()
bruce = warrior()
carl = knight()
dave = warrior()
mark = warrior()
assert fight(chuck, bruce) == True
assert fight(dave, carl) == False
assert chuck.is_alive == True
assert bruce.is_alive == False
assert carl.is_alive == True
assert dave.is_alive == False
assert fight(carl, mark) == False
assert carl.is_alive == False
print("Coding complete? Let's try tests!")
|
x = [[3,4],
[1,2]]
y = [[6,9],
[5,8]]
xy = [[0,0],
[0,0]]
n=2
for i in range(n):
for j in range(n):
xy[i][j] = x[i][j] * y[i][j]
print(xy)
|
x = [[3, 4], [1, 2]]
y = [[6, 9], [5, 8]]
xy = [[0, 0], [0, 0]]
n = 2
for i in range(n):
for j in range(n):
xy[i][j] = x[i][j] * y[i][j]
print(xy)
|
def functions_in_class(theclass):
for funcname in dir(theclass):
if funcname.startswith('__'):
continue
yield getattr(theclass, funcname)
|
def functions_in_class(theclass):
for funcname in dir(theclass):
if funcname.startswith('__'):
continue
yield getattr(theclass, funcname)
|
# -*- coding: utf-8 -*-
"""Project metadata
Information describing the project.
"""
# The package name, which is also the "UNIX name" for the project.
package = 'copdai_core'
project = "COPDAI CORE"
project_no_spaces = project.replace(' ', '')
version = '0.1'
description = 'Collaborative Open Platform for Distributed Artificial Intelligence core package'
authors = ['RABBAH Mahmoud Almostafa']
authors_string = ', '.join(authors)
emails = ['[email protected]']
license = 'Apache License Version 2.0, January 2004'
copyright = '2017 ' + authors_string
url = 'http://www.copdai.org'
platforms = 'OS Independent'
keywords = 'Multi Agents System, COPDAI, Artificial Intelligent, Mobile Robot, Embedded system'
|
"""Project metadata
Information describing the project.
"""
package = 'copdai_core'
project = 'COPDAI CORE'
project_no_spaces = project.replace(' ', '')
version = '0.1'
description = 'Collaborative Open Platform for Distributed Artificial Intelligence core package'
authors = ['RABBAH Mahmoud Almostafa']
authors_string = ', '.join(authors)
emails = ['[email protected]']
license = 'Apache License Version 2.0, January 2004'
copyright = '2017 ' + authors_string
url = 'http://www.copdai.org'
platforms = 'OS Independent'
keywords = 'Multi Agents System, COPDAI, Artificial Intelligent, Mobile Robot, Embedded system'
|
"""
Your task is to implement
This function reads a sequence of words provided through command line terminated by the "stop" word
and prints them in reverse order.
Each word is separated by the "enter", see the main() below for how to read user input from command line
Note: this solution can be improved by (i) making sure that only 1 single words can be entered each time
(this implementation accepts any string, including spaces) and (ii) ensuring that the last word "stop"
is not printed....can you do it?
"""
if __name__ == '__main__':
pook = []
while True:
word = input()
if word == 'stop':
print(' '.join(pook[::-1]))
break
pook.append(word)
|
"""
Your task is to implement
This function reads a sequence of words provided through command line terminated by the "stop" word
and prints them in reverse order.
Each word is separated by the "enter", see the main() below for how to read user input from command line
Note: this solution can be improved by (i) making sure that only 1 single words can be entered each time
(this implementation accepts any string, including spaces) and (ii) ensuring that the last word "stop"
is not printed....can you do it?
"""
if __name__ == '__main__':
pook = []
while True:
word = input()
if word == 'stop':
print(' '.join(pook[::-1]))
break
pook.append(word)
|
#!/usr/bin/env python
class Config(object):
_cfg = {}
def safe_get(self, name):
self._cfg.get(name)
def append_config_values(self, opts):
pass
def __setattr__(self, name, value):
self._cfg[name] = value
def __getattr__(self, name):
return self._cfg.get(name)
def reset_all(self):
for key in self._cfg.keys():
del self._cfg[key]
|
class Config(object):
_cfg = {}
def safe_get(self, name):
self._cfg.get(name)
def append_config_values(self, opts):
pass
def __setattr__(self, name, value):
self._cfg[name] = value
def __getattr__(self, name):
return self._cfg.get(name)
def reset_all(self):
for key in self._cfg.keys():
del self._cfg[key]
|
# while loop is used to repeat a block of code until a condition is false
# this is useful for loops that don't know how many times they should run
# this while loop checks if you are hungry and if you are, it will print "Okay, here's a snack" until you are not hungry
hungry = input('Are you hungry? y/n ')
while hungry == 'y':
print("Okay here's a snack")
hungry = input('Are you still hungry? y/n ')
print("Okay, bye")
|
hungry = input('Are you hungry? y/n ')
while hungry == 'y':
print("Okay here's a snack")
hungry = input('Are you still hungry? y/n ')
print('Okay, bye')
|
# You are using Python
class Node() :
def __init__(self, value=None) :
self.data = value
self.next = None
class LinkedList() :
def __init__(self) :
self.head = None
self.tail = None
def insertElements(self, arr) :
"""
Recieves an array of integers and inserts them sequentially into the linked list.
"""
# Loop through each element and insert it into the end of the list
for num in arr :
temp_node = Node(num)
# If the linked list is empty, the current number becomes the head of the list
if self.head is None :
self.head = temp_node
self.tail = temp_node
else :
# Otherwise, we append the numebr to the end of the list
self.tail.next = temp_node
self.tail = temp_node
# Returns the head pointer to the list
return self.head
def printList(head) :
"""
When invoked, it prints the linked list in a single line.
"""
# Iterate through the list, printing all values
ptr = head
while ptr :
print(ptr.data, end=" ")
ptr = ptr.next
print()
def reverseList(head, k) :
"""
Provided with the head of a linked list, performs the k element reverse, and returns the new head of the modified list
"""
ptr = head
new_head = None
new_tail = None
num_reverse = (n % k) if (n%k) != 0 else k
while ptr :
left_portion_start = ptr
i = 1
while ptr.next and i < num_reverse :
ptr = ptr.next
i += 1
right_portion_start = ptr.next
ptr.next = None
if new_head is None :
new_head = left_portion_start
new_tail = ptr
else :
ptr.next = new_head
new_head = left_portion_start
ptr = right_portion_start
num_reverse = k
return new_head
# Recieve the values of n, k, and the array of numbers
input_array = list(map(int, input().strip().split()))
n, k, arr = input_array[0], input_array[1], input_array[2:]
linkedlist = LinkedList()
head = linkedlist.insertElements(arr)
new_head = reverseList(head, k)
printList(new_head)
|
class Node:
def __init__(self, value=None):
self.data = value
self.next = None
class Linkedlist:
def __init__(self):
self.head = None
self.tail = None
def insert_elements(self, arr):
"""
Recieves an array of integers and inserts them sequentially into the linked list.
"""
for num in arr:
temp_node = node(num)
if self.head is None:
self.head = temp_node
self.tail = temp_node
else:
self.tail.next = temp_node
self.tail = temp_node
return self.head
def print_list(head):
"""
When invoked, it prints the linked list in a single line.
"""
ptr = head
while ptr:
print(ptr.data, end=' ')
ptr = ptr.next
print()
def reverse_list(head, k):
"""
Provided with the head of a linked list, performs the k element reverse, and returns the new head of the modified list
"""
ptr = head
new_head = None
new_tail = None
num_reverse = n % k if n % k != 0 else k
while ptr:
left_portion_start = ptr
i = 1
while ptr.next and i < num_reverse:
ptr = ptr.next
i += 1
right_portion_start = ptr.next
ptr.next = None
if new_head is None:
new_head = left_portion_start
new_tail = ptr
else:
ptr.next = new_head
new_head = left_portion_start
ptr = right_portion_start
num_reverse = k
return new_head
input_array = list(map(int, input().strip().split()))
(n, k, arr) = (input_array[0], input_array[1], input_array[2:])
linkedlist = linked_list()
head = linkedlist.insertElements(arr)
new_head = reverse_list(head, k)
print_list(new_head)
|
#!/usr/bin/env python3
# Copyright 2009-2017 BHG http://bw.org/
x = '47'
y = int(x) # constructor q transforma a string em int conversao
z = float(x)
a = abs(x)
b = divmod(x, 3)
c = complex()
d = x+34j
print(f'x is {type(x)}')
print(f'x is {x}')
print(f'y is {type(y)}')
print(f'y is {y}')
|
x = '47'
y = int(x)
z = float(x)
a = abs(x)
b = divmod(x, 3)
c = complex()
d = x + 34j
print(f'x is {type(x)}')
print(f'x is {x}')
print(f'y is {type(y)}')
print(f'y is {y}')
|
def find_unique(array1): # Return the only element not duplicated
missing = 0
for number in array1:
print(missing, ' - ', number)
missing ^= number
print(missing, ' - ', number)
return missing
if __name__ == "__main__":
array = [1, 9, 1, 9, 5, 6, 7, 8, 7, 8, 6]
second_array = [1, 1, 2, 4, 5, 6, 5, 4, 6]
print(f'find_unique({array}) --> ', find_unique(array))
print()
print(f'find_unique({second_array}) --> ', find_unique(second_array))
|
def find_unique(array1):
missing = 0
for number in array1:
print(missing, ' - ', number)
missing ^= number
print(missing, ' - ', number)
return missing
if __name__ == '__main__':
array = [1, 9, 1, 9, 5, 6, 7, 8, 7, 8, 6]
second_array = [1, 1, 2, 4, 5, 6, 5, 4, 6]
print(f'find_unique({array}) --> ', find_unique(array))
print()
print(f'find_unique({second_array}) --> ', find_unique(second_array))
|
def get_final_position(data):
depths,hori_pos = [0],0
aim = 0
for i,e in enumerate(data):
if i == 0:
if e[0] == 'forward':
hori_pos += int(e[1])
elif e[0] == 'down':
aim += int(e[1])
elif e[0] == 'up':
aim -= int(e[1])
depths.append(aim*hori_pos)
else:
if e[0] == 'forward':
hori_pos += int(e[1])
depths.append(aim*int(e[1]) + depths[-1])
elif e[0] == 'down':
aim += int(e[1])
elif e[0] == 'up':
aim -= int(e[1])
results = hori_pos*depths[-1]
return depths,hori_pos,aim,results
def solution(data):
pass
def read_input(inputfile):
with open(inputfile, 'r') as f:
data = f.read().splitlines()
data = [x.split() for x in data]
return data
if __name__ == '__main__':
inputfile = 'input2.txt'
data = read_input(inputfile)
print(solution(data))
|
def get_final_position(data):
(depths, hori_pos) = ([0], 0)
aim = 0
for (i, e) in enumerate(data):
if i == 0:
if e[0] == 'forward':
hori_pos += int(e[1])
elif e[0] == 'down':
aim += int(e[1])
elif e[0] == 'up':
aim -= int(e[1])
depths.append(aim * hori_pos)
elif e[0] == 'forward':
hori_pos += int(e[1])
depths.append(aim * int(e[1]) + depths[-1])
elif e[0] == 'down':
aim += int(e[1])
elif e[0] == 'up':
aim -= int(e[1])
results = hori_pos * depths[-1]
return (depths, hori_pos, aim, results)
def solution(data):
pass
def read_input(inputfile):
with open(inputfile, 'r') as f:
data = f.read().splitlines()
data = [x.split() for x in data]
return data
if __name__ == '__main__':
inputfile = 'input2.txt'
data = read_input(inputfile)
print(solution(data))
|
class Libro:
def __init__(self, titulo, autor, cantidad_de_paginas, genero, sinopsis):
self.titulo = titulo
self.autor = autor
self.cantidad_de_paginas = cantidad_de_paginas
self.genero = genero
self.sinopsis = sinopsis
|
class Libro:
def __init__(self, titulo, autor, cantidad_de_paginas, genero, sinopsis):
self.titulo = titulo
self.autor = autor
self.cantidad_de_paginas = cantidad_de_paginas
self.genero = genero
self.sinopsis = sinopsis
|
l, x = map(int, input().split())
people = 0
not_allowed = 0
for _ in range(x):
descri, p = input().split()
p = int(p)
if descri == "enter":
if people + p > l:
not_allowed += 1
else:
people += p
elif descri == "leave":
people -= p
print(not_allowed)
|
(l, x) = map(int, input().split())
people = 0
not_allowed = 0
for _ in range(x):
(descri, p) = input().split()
p = int(p)
if descri == 'enter':
if people + p > l:
not_allowed += 1
else:
people += p
elif descri == 'leave':
people -= p
print(not_allowed)
|
month = int(input())
if month == 1:
month = 'January'
elif month == 2:
month = 'February'
elif month == 3:
month = 'March'
elif month == 4:
month = 'April'
elif month == 5:
month = 'May'
elif month == 6:
month = 'June'
elif month == 7:
month = 'July'
elif month == 8:
month = 'August'
elif month == 9:
month = 'September'
elif month == 10:
month = 'October'
elif month == 11:
month = 'November'
elif month == 12:
month = 'December'
print(month)
|
month = int(input())
if month == 1:
month = 'January'
elif month == 2:
month = 'February'
elif month == 3:
month = 'March'
elif month == 4:
month = 'April'
elif month == 5:
month = 'May'
elif month == 6:
month = 'June'
elif month == 7:
month = 'July'
elif month == 8:
month = 'August'
elif month == 9:
month = 'September'
elif month == 10:
month = 'October'
elif month == 11:
month = 'November'
elif month == 12:
month = 'December'
print(month)
|
# -*- coding: utf-8 -*-
class CommandError(Exception):
"""
Exception class indicating a problem while executing a console
scripts.
"""
pass
|
class Commanderror(Exception):
"""
Exception class indicating a problem while executing a console
scripts.
"""
pass
|
command_props = (
"command",
"invalidcommand",
"postcommand",
"tearoffcommand",
"validatecommand",
"xscrollcommand",
"yscrollcommand"
)
def handle(widget, config, **kwargs):
props = dict(kwargs.get("extra_config", {}))
builder = kwargs.get("builder")
# add the command name and value to command map for deferred
# connection to the actual methods
for prop in props:
builder._command_map.append((
prop,
props[prop],
kwargs.get("handle_method")
))
|
command_props = ('command', 'invalidcommand', 'postcommand', 'tearoffcommand', 'validatecommand', 'xscrollcommand', 'yscrollcommand')
def handle(widget, config, **kwargs):
props = dict(kwargs.get('extra_config', {}))
builder = kwargs.get('builder')
for prop in props:
builder._command_map.append((prop, props[prop], kwargs.get('handle_method')))
|
points = dict()
points.update(dict.fromkeys(('AEIOULNRST'), 1))
points.update(dict.fromkeys(('DG'), 2))
points.update(dict.fromkeys(('BCMP'), 3))
points.update(dict.fromkeys(('FHVWY'), 4))
points.update(dict.fromkeys(('K'), 5))
points.update(dict.fromkeys(('JX'), 8))
points.update(dict.fromkeys(('QZ'), 10))
def score(word):
return sum([points[i.upper()] for i in list(word) if i.isalpha()])
|
points = dict()
points.update(dict.fromkeys('AEIOULNRST', 1))
points.update(dict.fromkeys('DG', 2))
points.update(dict.fromkeys('BCMP', 3))
points.update(dict.fromkeys('FHVWY', 4))
points.update(dict.fromkeys('K', 5))
points.update(dict.fromkeys('JX', 8))
points.update(dict.fromkeys('QZ', 10))
def score(word):
return sum([points[i.upper()] for i in list(word) if i.isalpha()])
|
#!/usr/bin/env python3
#This program will write:
#Hello from Veronika Cabalova Joseph.
print("Hello from Veronika Cabalova Joseph.")
|
print('Hello from Veronika Cabalova Joseph.')
|
d = {'k1':'v1', 'k2':'v2'}; print(d)
e = d.copy(); print(e)
d['k1'] = 'v111'
print(d, e)
|
d = {'k1': 'v1', 'k2': 'v2'}
print(d)
e = d.copy()
print(e)
d['k1'] = 'v111'
print(d, e)
|
'''
@author: Pranshu Aggarwal
@problem: https://hack.codingblocks.com/app/practice/1/853/problem
'''
def delhi_odd_even(n):
even, odd = 0, 0
while n != 0:
rem = n % 10
if rem % 2 == 0: even += rem
else: odd += rem
n = int(n / 10)
return (even % 4 == 0 or odd % 3 == 0)
if __name__ == "__main__":
testcases = int(input().strip())
for testcase in range(testcases): print("Yes" if delhi_odd_even(int(input().strip())) else "No")
|
"""
@author: Pranshu Aggarwal
@problem: https://hack.codingblocks.com/app/practice/1/853/problem
"""
def delhi_odd_even(n):
(even, odd) = (0, 0)
while n != 0:
rem = n % 10
if rem % 2 == 0:
even += rem
else:
odd += rem
n = int(n / 10)
return even % 4 == 0 or odd % 3 == 0
if __name__ == '__main__':
testcases = int(input().strip())
for testcase in range(testcases):
print('Yes' if delhi_odd_even(int(input().strip())) else 'No')
|
"""
Functions:
get_tag
make_upstream_probe
make_downstream_probe
make_probes
"""
BEAD2TAG = {
"LUA-1" : "CTTTAATCTCAATCAATACAAATC",
"LUA-2" : "CTTTATCAATACATACTACAATCA",
"LUA-3" : "TACACTTTATCAAATCTTACAATC",
"LUA-4" : "TACATTACCAATAATCTTCAAATC",
"LUA-5" : "CAATTCAAATCACAATAATCAATC",
"LUA-6" : "TCAACAATCTTTTACAATCAAATC",
"LUA-7" : "CAATTCATTTACCAATTTACCAAT",
"LUA-8" : "AATCCTTTTACATTCATTACTTAC",
"LUA-9" : "TAATCTTCTATATCAACATCTTAC",
"LUA-10" : "ATCATACATACATACAAATCTACA",
"LUA-11" : "TACAAATCATCAATCACTTTAATC",
"LUA-12" : "TACACTTTCTTTCTTTCTTTCTTT",
"LUA-13" : "CAATAAACTATACTTCTTCACTAA",
"LUA-14" : "CTACTATACATCTTACTATACTTT",
"LUA-15" : "ATACTTCATTCATTCATCAATTCA",
"LUA-16" : "AATCAATCTTCATTCAAATCATCA",
"LUA-17" : "CTTTAATCCTTTATCACTTTATCA",
"LUA-18" : "TCAAAATCTCAAATACTCAAATCA",
"LUA-19" : "TCAATCAATTACTTACTCAAATAC",
"LUA-20" : "CTTTTACAATACTTCAATACAATC",
"LUA-21" : "AATCCTTTCTTTAATCTCAAATCA",
"LUA-22" : "AATCCTTTTTACTCAATTCAATCA",
"LUA-23" : "TTCAATCATTCAAATCTCAACTTT",
"LUA-24" : "TCAATTACCTTTTCAATACAATAC",
"LUA-25" : "CTTTTCAATTACTTCAAATCTTCA",
"LUA-26" : "TTACTCAAAATCTACACTTTTTCA",
"LUA-27" : "CTTTTCAAATCAATACTCAACTTT",
"LUA-28" : "CTACAAACAAACAAACATTATCAA",
"LUA-29" : "AATCTTACTACAAATCCTTTCTTT",
"LUA-30" : "TTACCTTTATACCTTTCTTTTTAC",
"LUA-31" : "TTCACTTTTCAATCAACTTTAATC",
"LUA-32" : "ATTATTCACTTCAAACTAATCTAC",
"LUA-33" : "TCAATTACTTCACTTTAATCCTTT",
"LUA-34" : "TCATTCATATACATACCAATTCAT",
"LUA-35" : "CAATTTCATCATTCATTCATTTCA",
"LUA-36" : "CAATTCATTTCATTCACAATCAAT",
"LUA-37" : "CTTTTCATCTTTTCATCTTTCAAT",
"LUA-38" : "TCAATCATTACACTTTTCAACAAT",
"LUA-39" : "TACACAATCTTTTCATTACATCAT",
"LUA-40" : "CTTTCTACATTATTCACAACATTA",
"LUA-41" : "TTACTACACAATATACTCATCAAT",
"LUA-42" : "CTATCTTCATATTTCACTATAAAC",
"LUA-43" : "CTTTCAATTACAATACTCATTACA",
"LUA-44" : "TCATTTACCAATCTTTCTTTATAC",
"LUA-45" : "TCATTTCACAATTCAATTACTCAA",
"LUA-46" : "TACATCAACAATTCATTCAATACA",
"LUA-47" : "CTTCTCATTAACTTACTTCATAAT",
"LUA-48" : "AAACAAACTTCACATCTCAATAAT",
"LUA-49" : "TCATCAATCTTTCAATTTACTTAC",
"LUA-50" : "CAATATACCAATATCATCATTTAC",
"LUA-51" : "TCATTTCAATCAATCATCAACAAT",
"LUA-52" : "TCAATCATCTTTATACTTCACAAT",
"LUA-53" : "TAATTATACATCTCATCTTCTACA",
"LUA-54" : "CTTTTTCAATCACTTTCAATTCAT",
"LUA-55" : "TATATACACTTCTCAATAACTAAC",
"LUA-56" : "CAATTTACTCATATACATCACTTT",
"LUA-57" : "CAATATCATCATCTTTATCATTAC",
"LUA-58" : "CTACTAATTCATTAACATTACTAC",
"LUA-59" : "TCATCAATCAATCTTTTTCACTTT",
"LUA-60" : "AATCTACAAATCCAATAATCTCAT",
"LUA-61" : "AATCTTACCAATTCATAATCTTCA",
"LUA-62" : "TCAATCATAATCTCATAATCCAAT",
"LUA-63" : "CTACTTCATATACTTTATACTACA",
"LUA-64" : "CTACATATTCAAATTACTACTTAC",
"LUA-65" : "CTTTTCATCAATAATCTTACCTTT",
"LUA-66" : "TAACATTACAACTATACTATCTAC",
"LUA-67" : "TCATTTACTCAACAATTACAAATC",
"LUA-68" : "TCATAATCTCAACAATCTTTCTTT",
"LUA-69" : "CTATAAACATATTACATTCACATC",
"LUA-70" : "ATACCAATAATCCAATTCATATCA",
"LUA-71" : "ATCATTACAATCCAATCAATTCAT",
"LUA-72" : "TCATTTACCTTTAATCCAATAATC",
"LUA-73" : "ATCAAATCTCATCAATTCAACAAT",
"LUA-74" : "TACACATCTTACAAACTAATTTCA",
"LUA-75" : "AATCATACCTTTCAATCTTTTACA",
"LUA-76" : "AATCTAACAAACTCATCTAAATAC",
"LUA-77" : "CAATTAACTACATACAATACATAC",
"LUA-78" : "CTATCTATCTAACTATCTATATCA",
"LUA-79" : "TTCATAACTACAATACATCATCAT",
"LUA-80" : "CTAACTAACAATAATCTAACTAAC",
"LUA-81" : "CTTTAATCTACACTTTCTAACAAT",
"LUA-82" : "TACATACACTAATAACATACTCAT",
"LUA-83" : "ATACAATCTAACTTCACTATTACA",
"LUA-84" : "TCAACTAACTAATCATCTATCAAT",
"LUA-85" : "ATACTACATCATAATCAAACATCA",
"LUA-86" : "CTAATTACTAACATCACTAACAAT",
"LUA-87" : "AAACTAACATCAATACTTACATCA",
"LUA-88" : "TTACTTCACTTTCTATTTACAATC",
"LUA-89" : "TATACTATCAACTCAACAACATAT",
"LUA-90" : "CTAAATACTTCACAATTCATCTAA",
"LUA-91" : "TTCATAACATCAATCATAACTTAC",
"LUA-92" : "CTATTACACTTTAAACATCAATAC",
"LUA-93" : "CTTTCTATTCATCTAAATACAAAC",
"LUA-94" : "CTTTCTATCTTTCTACTCAATAAT",
"LUA-95" : "TACACTTTAAACTTACTACACTAA",
"LUA-96" : "ATACTAACTCAACTAACTTTAAAC",
"LUA-97" : "AATCTCATAATCTACATACACTAT",
"LUA-98" : "AATCATACTCAACTAATCATTCAA",
"LUA-99" : "AATCTACACTAACAATTTCATAAC",
"LUA-100" : "CTATCTTTAAACTACAAATCTAAC",
}
def normalize_bead_name(bead):
if type(bead) is type(0):
assert bead >= 0 and bead <= 99
bead = "LUA-%d" % (bead+1)
ubead = bead.upper()
return ubead
def get_tag(bead):
# bead is either a number from 0-99, or a name LUA-<1-100>.
nbead = normalize_bead_name(bead)
assert nbead in BEAD2TAG
return BEAD2TAG[nbead]
def make_upstream_probe(gso_u, bead):
# 20nt Complement of the T7 universal primer site.
# 24nt barcode
# 20nt gene specific oligo (GSO).
cT7_site = "TAATACGACTCACTATAGGG"
barcode = get_tag(bead)
return cT7_site + barcode + gso_u
def make_downstream_probe(gso_d):
# 20nt gene specific oligo (GSO).
# 20nt T3 universal primer site.
T3_site = "TCCCTTTAGTGAGGGTTAAT"
return gso_d + T3_site
def make_probes(gso_u, gso_d, bead):
nbead = normalize_bead_name(bead)
probe_u = make_upstream_probe(gso_u, nbead)
probe_d = make_downstream_probe(gso_d)
assert len(probe_u) == 64
assert len(probe_d) == 40
return nbead, probe_u, probe_d
|
"""
Functions:
get_tag
make_upstream_probe
make_downstream_probe
make_probes
"""
bead2_tag = {'LUA-1': 'CTTTAATCTCAATCAATACAAATC', 'LUA-2': 'CTTTATCAATACATACTACAATCA', 'LUA-3': 'TACACTTTATCAAATCTTACAATC', 'LUA-4': 'TACATTACCAATAATCTTCAAATC', 'LUA-5': 'CAATTCAAATCACAATAATCAATC', 'LUA-6': 'TCAACAATCTTTTACAATCAAATC', 'LUA-7': 'CAATTCATTTACCAATTTACCAAT', 'LUA-8': 'AATCCTTTTACATTCATTACTTAC', 'LUA-9': 'TAATCTTCTATATCAACATCTTAC', 'LUA-10': 'ATCATACATACATACAAATCTACA', 'LUA-11': 'TACAAATCATCAATCACTTTAATC', 'LUA-12': 'TACACTTTCTTTCTTTCTTTCTTT', 'LUA-13': 'CAATAAACTATACTTCTTCACTAA', 'LUA-14': 'CTACTATACATCTTACTATACTTT', 'LUA-15': 'ATACTTCATTCATTCATCAATTCA', 'LUA-16': 'AATCAATCTTCATTCAAATCATCA', 'LUA-17': 'CTTTAATCCTTTATCACTTTATCA', 'LUA-18': 'TCAAAATCTCAAATACTCAAATCA', 'LUA-19': 'TCAATCAATTACTTACTCAAATAC', 'LUA-20': 'CTTTTACAATACTTCAATACAATC', 'LUA-21': 'AATCCTTTCTTTAATCTCAAATCA', 'LUA-22': 'AATCCTTTTTACTCAATTCAATCA', 'LUA-23': 'TTCAATCATTCAAATCTCAACTTT', 'LUA-24': 'TCAATTACCTTTTCAATACAATAC', 'LUA-25': 'CTTTTCAATTACTTCAAATCTTCA', 'LUA-26': 'TTACTCAAAATCTACACTTTTTCA', 'LUA-27': 'CTTTTCAAATCAATACTCAACTTT', 'LUA-28': 'CTACAAACAAACAAACATTATCAA', 'LUA-29': 'AATCTTACTACAAATCCTTTCTTT', 'LUA-30': 'TTACCTTTATACCTTTCTTTTTAC', 'LUA-31': 'TTCACTTTTCAATCAACTTTAATC', 'LUA-32': 'ATTATTCACTTCAAACTAATCTAC', 'LUA-33': 'TCAATTACTTCACTTTAATCCTTT', 'LUA-34': 'TCATTCATATACATACCAATTCAT', 'LUA-35': 'CAATTTCATCATTCATTCATTTCA', 'LUA-36': 'CAATTCATTTCATTCACAATCAAT', 'LUA-37': 'CTTTTCATCTTTTCATCTTTCAAT', 'LUA-38': 'TCAATCATTACACTTTTCAACAAT', 'LUA-39': 'TACACAATCTTTTCATTACATCAT', 'LUA-40': 'CTTTCTACATTATTCACAACATTA', 'LUA-41': 'TTACTACACAATATACTCATCAAT', 'LUA-42': 'CTATCTTCATATTTCACTATAAAC', 'LUA-43': 'CTTTCAATTACAATACTCATTACA', 'LUA-44': 'TCATTTACCAATCTTTCTTTATAC', 'LUA-45': 'TCATTTCACAATTCAATTACTCAA', 'LUA-46': 'TACATCAACAATTCATTCAATACA', 'LUA-47': 'CTTCTCATTAACTTACTTCATAAT', 'LUA-48': 'AAACAAACTTCACATCTCAATAAT', 'LUA-49': 'TCATCAATCTTTCAATTTACTTAC', 'LUA-50': 'CAATATACCAATATCATCATTTAC', 'LUA-51': 'TCATTTCAATCAATCATCAACAAT', 'LUA-52': 'TCAATCATCTTTATACTTCACAAT', 'LUA-53': 'TAATTATACATCTCATCTTCTACA', 'LUA-54': 'CTTTTTCAATCACTTTCAATTCAT', 'LUA-55': 'TATATACACTTCTCAATAACTAAC', 'LUA-56': 'CAATTTACTCATATACATCACTTT', 'LUA-57': 'CAATATCATCATCTTTATCATTAC', 'LUA-58': 'CTACTAATTCATTAACATTACTAC', 'LUA-59': 'TCATCAATCAATCTTTTTCACTTT', 'LUA-60': 'AATCTACAAATCCAATAATCTCAT', 'LUA-61': 'AATCTTACCAATTCATAATCTTCA', 'LUA-62': 'TCAATCATAATCTCATAATCCAAT', 'LUA-63': 'CTACTTCATATACTTTATACTACA', 'LUA-64': 'CTACATATTCAAATTACTACTTAC', 'LUA-65': 'CTTTTCATCAATAATCTTACCTTT', 'LUA-66': 'TAACATTACAACTATACTATCTAC', 'LUA-67': 'TCATTTACTCAACAATTACAAATC', 'LUA-68': 'TCATAATCTCAACAATCTTTCTTT', 'LUA-69': 'CTATAAACATATTACATTCACATC', 'LUA-70': 'ATACCAATAATCCAATTCATATCA', 'LUA-71': 'ATCATTACAATCCAATCAATTCAT', 'LUA-72': 'TCATTTACCTTTAATCCAATAATC', 'LUA-73': 'ATCAAATCTCATCAATTCAACAAT', 'LUA-74': 'TACACATCTTACAAACTAATTTCA', 'LUA-75': 'AATCATACCTTTCAATCTTTTACA', 'LUA-76': 'AATCTAACAAACTCATCTAAATAC', 'LUA-77': 'CAATTAACTACATACAATACATAC', 'LUA-78': 'CTATCTATCTAACTATCTATATCA', 'LUA-79': 'TTCATAACTACAATACATCATCAT', 'LUA-80': 'CTAACTAACAATAATCTAACTAAC', 'LUA-81': 'CTTTAATCTACACTTTCTAACAAT', 'LUA-82': 'TACATACACTAATAACATACTCAT', 'LUA-83': 'ATACAATCTAACTTCACTATTACA', 'LUA-84': 'TCAACTAACTAATCATCTATCAAT', 'LUA-85': 'ATACTACATCATAATCAAACATCA', 'LUA-86': 'CTAATTACTAACATCACTAACAAT', 'LUA-87': 'AAACTAACATCAATACTTACATCA', 'LUA-88': 'TTACTTCACTTTCTATTTACAATC', 'LUA-89': 'TATACTATCAACTCAACAACATAT', 'LUA-90': 'CTAAATACTTCACAATTCATCTAA', 'LUA-91': 'TTCATAACATCAATCATAACTTAC', 'LUA-92': 'CTATTACACTTTAAACATCAATAC', 'LUA-93': 'CTTTCTATTCATCTAAATACAAAC', 'LUA-94': 'CTTTCTATCTTTCTACTCAATAAT', 'LUA-95': 'TACACTTTAAACTTACTACACTAA', 'LUA-96': 'ATACTAACTCAACTAACTTTAAAC', 'LUA-97': 'AATCTCATAATCTACATACACTAT', 'LUA-98': 'AATCATACTCAACTAATCATTCAA', 'LUA-99': 'AATCTACACTAACAATTTCATAAC', 'LUA-100': 'CTATCTTTAAACTACAAATCTAAC'}
def normalize_bead_name(bead):
if type(bead) is type(0):
assert bead >= 0 and bead <= 99
bead = 'LUA-%d' % (bead + 1)
ubead = bead.upper()
return ubead
def get_tag(bead):
nbead = normalize_bead_name(bead)
assert nbead in BEAD2TAG
return BEAD2TAG[nbead]
def make_upstream_probe(gso_u, bead):
c_t7_site = 'TAATACGACTCACTATAGGG'
barcode = get_tag(bead)
return cT7_site + barcode + gso_u
def make_downstream_probe(gso_d):
t3_site = 'TCCCTTTAGTGAGGGTTAAT'
return gso_d + T3_site
def make_probes(gso_u, gso_d, bead):
nbead = normalize_bead_name(bead)
probe_u = make_upstream_probe(gso_u, nbead)
probe_d = make_downstream_probe(gso_d)
assert len(probe_u) == 64
assert len(probe_d) == 40
return (nbead, probe_u, probe_d)
|
def Introduction(example):
"""Make an entry into the dictionary. When this entry is called the dictionary will print
an explination of your puzzle. Make sure to include the call required to run your test."""
dictionary = {'example':'Text', 'first_test':'Simply import the test file with from tests import first_test'}
if example == "list":
print(" here are the puzzles you have now:" + ' ' + str(list(dictionary.keys())))
elif example == "help":
print("""First call Introduction(list) that will help you find the name of the challenge.\n
Once you have found the name just call Introduction(name) to get that challenges description.\n
The description should inform you of what test to import in order to complete the challenge.\n
Once that's done just upload your completion to github and link it in the discord.\n
""")
else:
print(dictionary[example])
|
def introduction(example):
"""Make an entry into the dictionary. When this entry is called the dictionary will print
an explination of your puzzle. Make sure to include the call required to run your test."""
dictionary = {'example': 'Text', 'first_test': 'Simply import the test file with from tests import first_test'}
if example == 'list':
print(' here are the puzzles you have now:' + ' ' + str(list(dictionary.keys())))
elif example == 'help':
print("First call Introduction(list) that will help you find the name of the challenge.\n\n Once you have found the name just call Introduction(name) to get that challenges description.\n\n The description should inform you of what test to import in order to complete the challenge.\n\n Once that's done just upload your completion to github and link it in the discord.\n\n ")
else:
print(dictionary[example])
|
s = input()
k = int(input())
def rec(k):
d= {}
start =0
res =''
for i in range(len(s)):
d[s[i]] = d.get(s[i],0)+1
while len(d)>k:
d[s[start]]-=1
if d[s[start]] ==0:
del d[s[start]]
start+=1
l = i - start+1
if l > len(res):
res = s[start:i+1]
return res
print(rec(k))
|
s = input()
k = int(input())
def rec(k):
d = {}
start = 0
res = ''
for i in range(len(s)):
d[s[i]] = d.get(s[i], 0) + 1
while len(d) > k:
d[s[start]] -= 1
if d[s[start]] == 0:
del d[s[start]]
start += 1
l = i - start + 1
if l > len(res):
res = s[start:i + 1]
return res
print(rec(k))
|
def create_position(db: Session, position_id: int, position = schemas.PositionCreate):
db_position = models.Person(name = position.name, age = position.age, gender = position.gender, condition = position.condition)
db.add(db_position)
db.commit()
db.refresh(db_position)
return db_position
|
def create_position(db: Session, position_id: int, position=schemas.PositionCreate):
db_position = models.Person(name=position.name, age=position.age, gender=position.gender, condition=position.condition)
db.add(db_position)
db.commit()
db.refresh(db_position)
return db_position
|
"""
This is a comment.
"""
assert_app_dependency(app, 'Foo', '1.0')
|
"""
This is a comment.
"""
assert_app_dependency(app, 'Foo', '1.0')
|
file = open("day1/day1_input.txt", "r")
fuel = 0
for mass in file:
fuel += (int) (int(mass) / 3) - 2
print(fuel)
file.close()
|
file = open('day1/day1_input.txt', 'r')
fuel = 0
for mass in file:
fuel += int(int(mass) / 3) - 2
print(fuel)
file.close()
|
#### create a hierarchy of mammals ####
class Mammal:
def __init__ (self, name):
self.name = name
def speak (self):
print('Hi! I am', self.name)
class LandMammal (Mammal):
def __init__ (self, name):
super().__init__(name)
def walk (self):
print('Look at me, me is walking')
class AquaMammal (Mammal):
def __init__ (self, name):
super().__init__(name)
def swim (self):
print('Look at me, me is swimming')
class Cow (LandMammal):
def __init__ (self, name):
super().__init__(name)
def graze (self):
print('Look at me, me is grazing')
class Horse (LandMammal):
def __init__ (self, name):
super().__init__(name)
def gallop (self):
print('Look at me, me is galloping')
class Dolphin (AquaMammal):
def __init__ (self, name):
super().__init__(name)
def playing (self):
print('Look at me, me is playing')
class Shark (AquaMammal):
def __init__ (self, name):
super().__init__(name)
def fishAreFriends (self):
print('Repeat after me: Fish are friends, not food')
class Locomokipkachelfantje (LandMammal, AquaMammal):
def __init__ (self, name):
super().__init__(name)
def fanting (self):
print('Look at me, me is fanting. Fant fant.')
mammals = [Cow('Marjo'), Horse('Henk'), Dolphin('Judy'), Shark('Marvin'), Locomokipkachelfantje('Henry')]
for mammal in mammals:
mammal.speak()
|
class Mammal:
def __init__(self, name):
self.name = name
def speak(self):
print('Hi! I am', self.name)
class Landmammal(Mammal):
def __init__(self, name):
super().__init__(name)
def walk(self):
print('Look at me, me is walking')
class Aquamammal(Mammal):
def __init__(self, name):
super().__init__(name)
def swim(self):
print('Look at me, me is swimming')
class Cow(LandMammal):
def __init__(self, name):
super().__init__(name)
def graze(self):
print('Look at me, me is grazing')
class Horse(LandMammal):
def __init__(self, name):
super().__init__(name)
def gallop(self):
print('Look at me, me is galloping')
class Dolphin(AquaMammal):
def __init__(self, name):
super().__init__(name)
def playing(self):
print('Look at me, me is playing')
class Shark(AquaMammal):
def __init__(self, name):
super().__init__(name)
def fish_are_friends(self):
print('Repeat after me: Fish are friends, not food')
class Locomokipkachelfantje(LandMammal, AquaMammal):
def __init__(self, name):
super().__init__(name)
def fanting(self):
print('Look at me, me is fanting. Fant fant.')
mammals = [cow('Marjo'), horse('Henk'), dolphin('Judy'), shark('Marvin'), locomokipkachelfantje('Henry')]
for mammal in mammals:
mammal.speak()
|
ANIME_FIELDS = (
'title { romaji english native }',
'description',
'averageScore',
'status',
'episodes',
'siteUrl',
'coverImage { large medium }',
'bannerImage',
'tags { name }'
'idMal',
'type',
'format',
'season',
'duration',
'chapters',
'volumes',
'isLicensed',
'source',
'updatedAt',
'genres',
'trending',
'isAdult',
'synonyms',
)
CHARACTER_FIELDS = (
'name { first middle last full native alternative }',
'id',
'image { large medium }',
'description',
'gender',
'dateOfBirth { year month day }',
'age',
'siteUrl',
'favourites',
)
USER_FIELDS = (
'id',
'name',
'about',
'avatar { medium large }',
'bannerImage',
'bans',
'siteUrl',
'isFollower',
'isFollowing',
'isBlocked',
'options { titleLanguage displayAdultContent airingNotifications profileColor notificationOptions { type enabled } }'
)
STUDIO_FIELDS = (
'id',
'name',
'siteUrl',
'isAnimationStudio',
'favourites'
)
STAFF_FIELDS = (
'id',
'name { first middle last full native alternative }',
'languageV2',
'image { medium large }',
'description',
'primaryOccupations',
'gender',
'dateOfBirth { year month day }',
'dateOfDeath { year month day }',
'homeTown',
'siteUrl',
'age',
)
SITE_STATISTICS_FIELDS = (
'users { nodes { date change count }}',
'anime { nodes { date change count }}',
'manga { nodes { date change count }}',
'characters { nodes { date change count }}',
'staff { nodes { date change count }}',
'studios { nodes { date change count }}',
'reviews { nodes { date change count }}'
)
THREAD_FIELDS = (
'id',
'title',
'body',
'userId',
'replyUserId',
'replyCommentId',
'replyCount',
'viewCount',
'isLocked',
'isSticky',
'isSubscribed',
'likeCount',
'isLiked',
'repliedAt',
'createdAt',
'updatedAt',
'siteUrl',
'categories { name id }'
'user {' + ' '.join(USER_FIELDS) + ' }',
'replyUser {' + ' '.join(USER_FIELDS) + ' }',
'likes {' + ' '.join(USER_FIELDS) + ' }',
)
COMMENT_FIELDS = (
'id',
'userId',
'threadId',
'comment',
'likeCount',
'isLiked',
'createdAt',
'updatedAt',
'siteUrl',
'user {' + ' '.join(USER_FIELDS) + ' }',
'thread {' + ' '.join(THREAD_FIELDS) + ' }',
'likes {' + ' '.join(USER_FIELDS) + ' }',
'childComments'
)
|
anime_fields = ('title { romaji english native }', 'description', 'averageScore', 'status', 'episodes', 'siteUrl', 'coverImage { large medium }', 'bannerImage', 'tags { name }idMal', 'type', 'format', 'season', 'duration', 'chapters', 'volumes', 'isLicensed', 'source', 'updatedAt', 'genres', 'trending', 'isAdult', 'synonyms')
character_fields = ('name { first middle last full native alternative }', 'id', 'image { large medium }', 'description', 'gender', 'dateOfBirth { year month day }', 'age', 'siteUrl', 'favourites')
user_fields = ('id', 'name', 'about', 'avatar { medium large }', 'bannerImage', 'bans', 'siteUrl', 'isFollower', 'isFollowing', 'isBlocked', 'options { titleLanguage displayAdultContent airingNotifications profileColor notificationOptions { type enabled } }')
studio_fields = ('id', 'name', 'siteUrl', 'isAnimationStudio', 'favourites')
staff_fields = ('id', 'name { first middle last full native alternative }', 'languageV2', 'image { medium large }', 'description', 'primaryOccupations', 'gender', 'dateOfBirth { year month day }', 'dateOfDeath { year month day }', 'homeTown', 'siteUrl', 'age')
site_statistics_fields = ('users { nodes { date change count }}', 'anime { nodes { date change count }}', 'manga { nodes { date change count }}', 'characters { nodes { date change count }}', 'staff { nodes { date change count }}', 'studios { nodes { date change count }}', 'reviews { nodes { date change count }}')
thread_fields = ('id', 'title', 'body', 'userId', 'replyUserId', 'replyCommentId', 'replyCount', 'viewCount', 'isLocked', 'isSticky', 'isSubscribed', 'likeCount', 'isLiked', 'repliedAt', 'createdAt', 'updatedAt', 'siteUrl', 'categories { name id }user {' + ' '.join(USER_FIELDS) + ' }', 'replyUser {' + ' '.join(USER_FIELDS) + ' }', 'likes {' + ' '.join(USER_FIELDS) + ' }')
comment_fields = ('id', 'userId', 'threadId', 'comment', 'likeCount', 'isLiked', 'createdAt', 'updatedAt', 'siteUrl', 'user {' + ' '.join(USER_FIELDS) + ' }', 'thread {' + ' '.join(THREAD_FIELDS) + ' }', 'likes {' + ' '.join(USER_FIELDS) + ' }', 'childComments')
|
""" Announce ET status changes. """
def consume(client, channel, frame):
who = frame.headers['who'] # "[email protected]"
# product = frame.headers['product'] # "RHEL-EXTRAS"
release = frame.headers['release'] # "Extras-RHEL-7.4"
errata_id = int(frame.headers['errata_id']) # 12345
errata_url = 'https://errata.devel.redhat.com/advisory/%d' % errata_id
# from_status = frame.headers['from'] # "NEW_FILES"
to_status = frame.headers['to'] # "QE"
mtmpl = '{who} changed {release} {errata_url} to {to_status} status'
message = mtmpl.format(who=who,
release=release,
errata_url=errata_url,
to_status=to_status)
client.msg(channel, message)
|
""" Announce ET status changes. """
def consume(client, channel, frame):
who = frame.headers['who']
release = frame.headers['release']
errata_id = int(frame.headers['errata_id'])
errata_url = 'https://errata.devel.redhat.com/advisory/%d' % errata_id
to_status = frame.headers['to']
mtmpl = '{who} changed {release} {errata_url} to {to_status} status'
message = mtmpl.format(who=who, release=release, errata_url=errata_url, to_status=to_status)
client.msg(channel, message)
|
AVATAR_AUTO_GENERATE_SIZES = 150
# Control the forms that django-allauth uses
ACCOUNT_FORMS = {
"login": "allauth.account.forms.LoginForm",
"add_email": "allauth.account.forms.AddEmailForm",
"change_password": "allauth.account.forms.ChangePasswordForm",
"set_password": "allauth.account.forms.SetPasswordForm",
"reset_password": "allauth.account.forms.ResetPasswordForm",
"reset_password_from_key": "allauth.account.forms.ResetPasswordKeyForm",
"disconnect": "allauth.socialaccount.forms.DisconnectForm",
# Use our custom signup form
"signup": "ool.users.forms.UserCreationFormX",
}
|
avatar_auto_generate_sizes = 150
account_forms = {'login': 'allauth.account.forms.LoginForm', 'add_email': 'allauth.account.forms.AddEmailForm', 'change_password': 'allauth.account.forms.ChangePasswordForm', 'set_password': 'allauth.account.forms.SetPasswordForm', 'reset_password': 'allauth.account.forms.ResetPasswordForm', 'reset_password_from_key': 'allauth.account.forms.ResetPasswordKeyForm', 'disconnect': 'allauth.socialaccount.forms.DisconnectForm', 'signup': 'ool.users.forms.UserCreationFormX'}
|
#Automate script for scan IP with nmap
value = input('Enter the file name: ')
file = open (value,"r")
content = file.readlines()
for line in content:
IP = line.split()
print(IP)
|
value = input('Enter the file name: ')
file = open(value, 'r')
content = file.readlines()
for line in content:
ip = line.split()
print(IP)
|
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
""" Created with Corsair vgit-latest
Control/status register map.
"""
class _RegData:
def __init__(self, rmap):
self._rmap = rmap
@property
def val(self):
"""Value of the register"""
rdata = self._rmap._if.read(self._rmap.DATA_ADDR)
return (rdata >> self._rmap.DATA_VAL_POS) & self._rmap.DATA_VAL_MSK
@val.setter
def val(self, val):
rdata = self._rmap._if.read(self._rmap.DATA_ADDR)
rdata = rdata & (~(self._rmap.DATA_VAL_MSK << self._rmap.DATA_VAL_POS))
rdata = rdata | (val << self._rmap.DATA_VAL_POS)
self._rmap._if.write(self._rmap.DATA_ADDR, rdata)
class _RegCtrl:
def __init__(self, rmap):
self._rmap = rmap
@property
def val(self):
"""Value of the register"""
rdata = self._rmap._if.read(self._rmap.CTRL_ADDR)
return (rdata >> self._rmap.CTRL_VAL_POS) & self._rmap.CTRL_VAL_MSK
@val.setter
def val(self, val):
rdata = self._rmap._if.read(self._rmap.CTRL_ADDR)
rdata = rdata & (~(self._rmap.CTRL_VAL_MSK << self._rmap.CTRL_VAL_POS))
rdata = rdata | (val << self._rmap.CTRL_VAL_POS)
self._rmap._if.write(self._rmap.CTRL_ADDR, rdata)
class _RegStatus:
def __init__(self, rmap):
self._rmap = rmap
@property
def val(self):
"""Value of the register"""
rdata = self._rmap._if.read(self._rmap.STATUS_ADDR)
return (rdata >> self._rmap.STATUS_VAL_POS) & self._rmap.STATUS_VAL_MSK
class _RegStart:
def __init__(self, rmap):
self._rmap = rmap
@property
def val(self):
"""Value of the register"""
return 0
@val.setter
def val(self, val):
rdata = self._rmap._if.read(self._rmap.START_ADDR)
rdata = rdata & (~(self._rmap.START_VAL_MSK << self._rmap.START_VAL_POS))
rdata = rdata | (val << self._rmap.START_VAL_POS)
self._rmap._if.write(self._rmap.START_ADDR, rdata)
class RegMap:
"""Control/Status register map"""
# DATA - Data register
DATA_ADDR = 0x0000
DATA_VAL_POS = 0
DATA_VAL_MSK = 0xffffffff
# CTRL - Control register
CTRL_ADDR = 0x0004
CTRL_VAL_POS = 0
CTRL_VAL_MSK = 0xffff
# STATUS - Status register
STATUS_ADDR = 0x0008
STATUS_VAL_POS = 0
STATUS_VAL_MSK = 0xff
# START - Start register
START_ADDR = 0x0100
START_VAL_POS = 0
START_VAL_MSK = 0x1
def __init__(self, interface):
self._if = interface
@property
def data(self):
"""Data register"""
return self._if.read(self.DATA_ADDR)
@data.setter
def data(self, val):
self._if.write(self.DATA_ADDR, val)
@property
def data_bf(self):
return _RegData(self)
@property
def ctrl(self):
"""Control register"""
return self._if.read(self.CTRL_ADDR)
@ctrl.setter
def ctrl(self, val):
self._if.write(self.CTRL_ADDR, val)
@property
def ctrl_bf(self):
return _RegCtrl(self)
@property
def status(self):
"""Status register"""
return self._if.read(self.STATUS_ADDR)
@property
def status_bf(self):
return _RegStatus(self)
@property
def start(self):
"""Start register"""
return 0
@start.setter
def start(self, val):
self._if.write(self.START_ADDR, val)
@property
def start_bf(self):
return _RegStart(self)
|
""" Created with Corsair vgit-latest
Control/status register map.
"""
class _Regdata:
def __init__(self, rmap):
self._rmap = rmap
@property
def val(self):
"""Value of the register"""
rdata = self._rmap._if.read(self._rmap.DATA_ADDR)
return rdata >> self._rmap.DATA_VAL_POS & self._rmap.DATA_VAL_MSK
@val.setter
def val(self, val):
rdata = self._rmap._if.read(self._rmap.DATA_ADDR)
rdata = rdata & ~(self._rmap.DATA_VAL_MSK << self._rmap.DATA_VAL_POS)
rdata = rdata | val << self._rmap.DATA_VAL_POS
self._rmap._if.write(self._rmap.DATA_ADDR, rdata)
class _Regctrl:
def __init__(self, rmap):
self._rmap = rmap
@property
def val(self):
"""Value of the register"""
rdata = self._rmap._if.read(self._rmap.CTRL_ADDR)
return rdata >> self._rmap.CTRL_VAL_POS & self._rmap.CTRL_VAL_MSK
@val.setter
def val(self, val):
rdata = self._rmap._if.read(self._rmap.CTRL_ADDR)
rdata = rdata & ~(self._rmap.CTRL_VAL_MSK << self._rmap.CTRL_VAL_POS)
rdata = rdata | val << self._rmap.CTRL_VAL_POS
self._rmap._if.write(self._rmap.CTRL_ADDR, rdata)
class _Regstatus:
def __init__(self, rmap):
self._rmap = rmap
@property
def val(self):
"""Value of the register"""
rdata = self._rmap._if.read(self._rmap.STATUS_ADDR)
return rdata >> self._rmap.STATUS_VAL_POS & self._rmap.STATUS_VAL_MSK
class _Regstart:
def __init__(self, rmap):
self._rmap = rmap
@property
def val(self):
"""Value of the register"""
return 0
@val.setter
def val(self, val):
rdata = self._rmap._if.read(self._rmap.START_ADDR)
rdata = rdata & ~(self._rmap.START_VAL_MSK << self._rmap.START_VAL_POS)
rdata = rdata | val << self._rmap.START_VAL_POS
self._rmap._if.write(self._rmap.START_ADDR, rdata)
class Regmap:
"""Control/Status register map"""
data_addr = 0
data_val_pos = 0
data_val_msk = 4294967295
ctrl_addr = 4
ctrl_val_pos = 0
ctrl_val_msk = 65535
status_addr = 8
status_val_pos = 0
status_val_msk = 255
start_addr = 256
start_val_pos = 0
start_val_msk = 1
def __init__(self, interface):
self._if = interface
@property
def data(self):
"""Data register"""
return self._if.read(self.DATA_ADDR)
@data.setter
def data(self, val):
self._if.write(self.DATA_ADDR, val)
@property
def data_bf(self):
return __reg_data(self)
@property
def ctrl(self):
"""Control register"""
return self._if.read(self.CTRL_ADDR)
@ctrl.setter
def ctrl(self, val):
self._if.write(self.CTRL_ADDR, val)
@property
def ctrl_bf(self):
return __reg_ctrl(self)
@property
def status(self):
"""Status register"""
return self._if.read(self.STATUS_ADDR)
@property
def status_bf(self):
return __reg_status(self)
@property
def start(self):
"""Start register"""
return 0
@start.setter
def start(self, val):
self._if.write(self.START_ADDR, val)
@property
def start_bf(self):
return __reg_start(self)
|
class WorkOrdersApi():
"""
Class is the interface for talking to the work orders
api in lightspeed.
"""
endpoint = "Workorder.json"
def __init__(self, client):
self.client = client
def get_workorders(self, params={}, limit=100, offset=0):
params["limit"] = limit
params["offset"] = offset
return self.client.get(self.endpoint, params)
def get_workorders_2(self, params={}, limit=100, offset=0):
workorders = []
r = self.get_workorders(params, limit, offset)
if r is None:
return []
wo = r.json()
if 'Workorder' not in wo:
return []
attrib = wo["@attributes"]
if int(attrib['count']) <= 100:
return wo["Workorder"]
workorders = wo['Workorder']
count = int(attrib['count'])
while offset <= count:
offset = offset + 100
r = self.get_workorders(params, limit, offset)
w = r.json()
if 'Workorder' in w:
workorders = workorders + w['Workorder']
return workorders
|
class Workordersapi:
"""
Class is the interface for talking to the work orders
api in lightspeed.
"""
endpoint = 'Workorder.json'
def __init__(self, client):
self.client = client
def get_workorders(self, params={}, limit=100, offset=0):
params['limit'] = limit
params['offset'] = offset
return self.client.get(self.endpoint, params)
def get_workorders_2(self, params={}, limit=100, offset=0):
workorders = []
r = self.get_workorders(params, limit, offset)
if r is None:
return []
wo = r.json()
if 'Workorder' not in wo:
return []
attrib = wo['@attributes']
if int(attrib['count']) <= 100:
return wo['Workorder']
workorders = wo['Workorder']
count = int(attrib['count'])
while offset <= count:
offset = offset + 100
r = self.get_workorders(params, limit, offset)
w = r.json()
if 'Workorder' in w:
workorders = workorders + w['Workorder']
return workorders
|
#
# PySNMP MIB module BROCADE-SPX-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/BROCADE-SPX-MIB
# Produced by pysmi-0.3.4 at Wed May 1 11:41:19 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ConstraintsIntersection, ValueRangeConstraint, ValueSizeConstraint, SingleValueConstraint, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ValueRangeConstraint", "ValueSizeConstraint", "SingleValueConstraint", "ConstraintsUnion")
DisplayString, = mibBuilder.importSymbols("FOUNDRY-SN-AGENT-MIB", "DisplayString")
snSwitch, = mibBuilder.importSymbols("FOUNDRY-SN-SWITCH-GROUP-MIB", "snSwitch")
InterfaceIndexOrZero, = mibBuilder.importSymbols("IF-MIB", "InterfaceIndexOrZero")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
ModuleIdentity, Counter64, Bits, TimeTicks, Integer32, iso, NotificationType, ObjectIdentity, Gauge32, IpAddress, Unsigned32, MibIdentifier, MibScalar, MibTable, MibTableRow, MibTableColumn, Counter32 = mibBuilder.importSymbols("SNMPv2-SMI", "ModuleIdentity", "Counter64", "Bits", "TimeTicks", "Integer32", "iso", "NotificationType", "ObjectIdentity", "Gauge32", "IpAddress", "Unsigned32", "MibIdentifier", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter32")
DisplayString, TextualConvention, MacAddress = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention", "MacAddress")
brcdSPXMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40))
brcdSPXMIB.setRevisions(('2015-05-12 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: brcdSPXMIB.setRevisionsDescriptions(('Initial version',))
if mibBuilder.loadTexts: brcdSPXMIB.setLastUpdated('201505120000Z')
if mibBuilder.loadTexts: brcdSPXMIB.setOrganization('Brocade Communications Systems, Inc')
if mibBuilder.loadTexts: brcdSPXMIB.setContactInfo('Technical Support Center 130 Holger Way, San Jose, CA 95134 Email: [email protected] Phone: 1-800-752-8061 URL: www.brocade.com')
if mibBuilder.loadTexts: brcdSPXMIB.setDescription(' Management Information for 802.1BR SPX system configuration and operational status. Supported Platforms: - supported on FastIron ICX7750/ICX7450 platforms. Copyright 1996-2015 Brocade Communications Systems, Inc. All rights reserved. This Brocade Communications Systems SNMP Management Information Base Specification embodies Brocade Communications Systems confidential and proprietary intellectual property. Brocade Communications Systems retains all title and ownership in the Specification, including any revisions. This Specification is supplied AS IS, and Brocade Communications Systems makes no warranty, either express or implied, as to the use, operation, condition, or performance of the specification, and any unintended consequence it may on the user environment.')
brcdSPXGlobalObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 1))
brcdSPXTableObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2))
brcdSPXGlobalConfigCBState = MibScalar((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("none", 0), ("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: brcdSPXGlobalConfigCBState.setStatus('current')
if mibBuilder.loadTexts: brcdSPXGlobalConfigCBState.setDescription('Configure CB (Control Bridge) state for 802.1BR feature on the global level. The set operation is allowed only on CB device. none: reserve state. enable: 802.1BR is enable on CB. disable: 802.1BR is disable on CB. The none state will be displayed if it is not a CB device')
brcdSPXGlobalConfigPEState = MibScalar((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("none", 0), ("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: brcdSPXGlobalConfigPEState.setStatus('current')
if mibBuilder.loadTexts: brcdSPXGlobalConfigPEState.setDescription('Configure PE (Port Extender) state for 802.1BR feature on the global level. The set operation is allowed only on PE standalone device. none: reserve state enable: 802.1BR is enabled on PE. disable: 802.1BR is disabled on PE. Note that enabling/disabling PE takes effect only after system is saved configure and reloaded. The none state will be displayed if it is not a PE device')
brcdSPXConfigUnitTable = MibTable((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 1), )
if mibBuilder.loadTexts: brcdSPXConfigUnitTable.setStatus('current')
if mibBuilder.loadTexts: brcdSPXConfigUnitTable.setDescription('802.1BR SPX configuration unit table.')
brcdSPXConfigUnitEntry = MibTableRow((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 1, 1), ).setIndexNames((0, "BROCADE-SPX-MIB", "brcdSPXConfigUnitIndex"))
if mibBuilder.loadTexts: brcdSPXConfigUnitEntry.setStatus('current')
if mibBuilder.loadTexts: brcdSPXConfigUnitEntry.setDescription('An entry in SPX configuration table.')
brcdSPXConfigUnitIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 1, 1, 1), Integer32())
if mibBuilder.loadTexts: brcdSPXConfigUnitIndex.setStatus('current')
if mibBuilder.loadTexts: brcdSPXConfigUnitIndex.setDescription('The SPX unit Id. CB unit ID is from 1 to 16. PE unit ID is from 17 to 56')
brcdSPXConfigUnitPEName = MibTableColumn((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 1, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: brcdSPXConfigUnitPEName.setStatus('current')
if mibBuilder.loadTexts: brcdSPXConfigUnitPEName.setDescription('A name description of PE unit.')
brcdSPXConfigUnitPESPXPort1 = MibTableColumn((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 1, 1, 3), InterfaceIndexOrZero()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: brcdSPXConfigUnitPESPXPort1.setStatus('current')
if mibBuilder.loadTexts: brcdSPXConfigUnitPESPXPort1.setDescription('A PE SPX port on PE unit. It returns 0 if SPX port does not exist. Note that the maximum PE SPX port on a PE unit is 2.')
brcdSPXConfigUnitPESPXPort2 = MibTableColumn((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 1, 1, 4), InterfaceIndexOrZero()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: brcdSPXConfigUnitPESPXPort2.setStatus('current')
if mibBuilder.loadTexts: brcdSPXConfigUnitPESPXPort2.setDescription('A PE SPX port on PE unit. It returns 0 if SPX port does not exist. Note that the maximum PE SPX port on a PE unit is 2.')
brcdSPXConfigUnitPESPXLag1 = MibTableColumn((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 1, 1, 5), OctetString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: brcdSPXConfigUnitPESPXLag1.setStatus('current')
if mibBuilder.loadTexts: brcdSPXConfigUnitPESPXLag1.setDescription('A list of interface indices which are the port membership of a SPX LAG group on PE. Each interface index is a 32-bit integer in big endian order. It returns NULL if PE SPX LAG does not exist. Note that the maximum PE SPX LAG on a PE unit is 2. Each SPX LAG group contains up to 16 ports.')
brcdSPXConfigUnitPESPXLag2 = MibTableColumn((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 1, 1, 6), OctetString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: brcdSPXConfigUnitPESPXLag2.setStatus('current')
if mibBuilder.loadTexts: brcdSPXConfigUnitPESPXLag2.setDescription('A list of interface indices which are the port membership of a SPX LAG group on PE. Each interface index is a 32-bit integer in big endian order. It returns NULL if PE SPX LAG does not exist. Note that the maximum PE SPX LAG on a PE unit is 2. Each SPX LAG group contains up to 16 ports.')
brcdSPXConfigUnitRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 1, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("valid", 2), ("delete", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: brcdSPXConfigUnitRowStatus.setStatus('current')
if mibBuilder.loadTexts: brcdSPXConfigUnitRowStatus.setDescription("This object is used to delete row in the table and control if they are used. The values that can be written are: delete(3)...deletes the row If the row exists, then a SET with value of create(4) returns error 'wrongValue'. Deleted rows go away immediately. The following values can be returned on reads: noSuchName...no such row other(1).....some other cases valid(2)....the row exists and is valid")
brcdSPXConfigUnitType = MibTableColumn((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 1, 1, 8), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: brcdSPXConfigUnitType.setStatus('current')
if mibBuilder.loadTexts: brcdSPXConfigUnitType.setDescription('A description of the configured/active system type for each unit.')
brcdSPXConfigUnitState = MibTableColumn((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 1, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("local", 1), ("remote", 2), ("reserved", 3), ("empty", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: brcdSPXConfigUnitState.setStatus('current')
if mibBuilder.loadTexts: brcdSPXConfigUnitState.setDescription('A state for each unit.')
brcdSPXOperUnitTable = MibTable((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 2), )
if mibBuilder.loadTexts: brcdSPXOperUnitTable.setStatus('current')
if mibBuilder.loadTexts: brcdSPXOperUnitTable.setDescription('802.1BR SPX operation unit table.')
brcdSPXOperUnitEntry = MibTableRow((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 2, 1), ).setIndexNames((0, "BROCADE-SPX-MIB", "brcdSPXOperUnitIndex"))
if mibBuilder.loadTexts: brcdSPXOperUnitEntry.setStatus('current')
if mibBuilder.loadTexts: brcdSPXOperUnitEntry.setDescription('An entry in SPX operation table.')
brcdSPXOperUnitIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 2, 1, 1), Integer32())
if mibBuilder.loadTexts: brcdSPXOperUnitIndex.setStatus('current')
if mibBuilder.loadTexts: brcdSPXOperUnitIndex.setDescription('The SPX unit Id. CB unit ID is from 1 to 16. PE unit ID is from 17 to 56')
brcdSPXOperUnitType = MibTableColumn((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 2, 1, 2), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: brcdSPXOperUnitType.setStatus('current')
if mibBuilder.loadTexts: brcdSPXOperUnitType.setDescription('A description of the configured/active system type for each unit.')
brcdSPXOperUnitRole = MibTableColumn((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 2, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("other", 1), ("active", 2), ("standby", 3), ("member", 4), ("standalone", 5), ("spx-pe", 6)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: brcdSPXOperUnitRole.setStatus('current')
if mibBuilder.loadTexts: brcdSPXOperUnitRole.setDescription('A role for each unit.')
brcdSPXOperUnitMac = MibTableColumn((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 2, 1, 4), MacAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: brcdSPXOperUnitMac.setStatus('current')
if mibBuilder.loadTexts: brcdSPXOperUnitMac.setDescription('A MAC address for each unit')
brcdSPXOperUnitPriority = MibTableColumn((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 2, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: brcdSPXOperUnitPriority.setStatus('current')
if mibBuilder.loadTexts: brcdSPXOperUnitPriority.setDescription("The priority in Active/backup election on CB units. PE unit doesn't have priority, and 0 as default value.")
brcdSPXOperUnitState = MibTableColumn((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 2, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("local", 1), ("remote", 2), ("reserved", 3), ("empty", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: brcdSPXOperUnitState.setStatus('current')
if mibBuilder.loadTexts: brcdSPXOperUnitState.setDescription('A state for each unit ')
brcdSPXOperUnitDescription = MibTableColumn((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 2, 1, 7), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 128))).setMaxAccess("readonly")
if mibBuilder.loadTexts: brcdSPXOperUnitDescription.setStatus('current')
if mibBuilder.loadTexts: brcdSPXOperUnitDescription.setDescription('Describes the CB stacking or PE joining state for each unit.')
brcdSPXOperUnitImgVer = MibTableColumn((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 2, 1, 8), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readonly")
if mibBuilder.loadTexts: brcdSPXOperUnitImgVer.setStatus('current')
if mibBuilder.loadTexts: brcdSPXOperUnitImgVer.setDescription('The version of the running software image for each unit')
brcdSPXOperUnitBuildlVer = MibTableColumn((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 2, 1, 9), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readonly")
if mibBuilder.loadTexts: brcdSPXOperUnitBuildlVer.setStatus('current')
if mibBuilder.loadTexts: brcdSPXOperUnitBuildlVer.setDescription('The version of the running software build for each unit')
brcdSPXCBSPXPortTable = MibTable((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 3), )
if mibBuilder.loadTexts: brcdSPXCBSPXPortTable.setStatus('current')
if mibBuilder.loadTexts: brcdSPXCBSPXPortTable.setDescription('SPX configuration CB SPX port table.')
brcdSPXCBSPXPortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 3, 1), ).setIndexNames((0, "BROCADE-SPX-MIB", "brcdSPXCBSPXPortPort"))
if mibBuilder.loadTexts: brcdSPXCBSPXPortEntry.setStatus('current')
if mibBuilder.loadTexts: brcdSPXCBSPXPortEntry.setDescription('An entry in the SPX configuration CB SPX port table.')
brcdSPXCBSPXPortPort = MibTableColumn((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 3, 1, 1), InterfaceIndexOrZero())
if mibBuilder.loadTexts: brcdSPXCBSPXPortPort.setStatus('current')
if mibBuilder.loadTexts: brcdSPXCBSPXPortPort.setDescription('The IfIndex for the configured CB SPX port. CB unit can have multiple SPX ports per unit. ')
brcdSPXCBSPXPortPEGroup = MibTableColumn((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 3, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: brcdSPXCBSPXPortPEGroup.setStatus('current')
if mibBuilder.loadTexts: brcdSPXCBSPXPortPEGroup.setDescription('The name of IfIndex for the configured CB SPX port. It is an optional field')
brcdSPXCBSPXPortRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 3, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("other", 1), ("valid", 2), ("delete", 3), ("create", 4)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: brcdSPXCBSPXPortRowStatus.setStatus('current')
if mibBuilder.loadTexts: brcdSPXCBSPXPortRowStatus.setDescription("This object is used to delete row in the table and control if they are used. The values that can be written are: delete(3)...deletes the row create(4)...creates a new row If the row exists, then a SET with value of create(4) returns error 'wrongValue'. Deleted rows go away immediately. The following values can be returned on reads: noSuchName...no such row other(1).....some other cases valid(2)....the row exists and is valid")
brcdSPXCBSPXLagTable = MibTable((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 4), )
if mibBuilder.loadTexts: brcdSPXCBSPXLagTable.setStatus('current')
if mibBuilder.loadTexts: brcdSPXCBSPXLagTable.setDescription('SPX configuration CB SPX LAG table.')
brcdSPXCBSPXLagEntry = MibTableRow((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 4, 1), ).setIndexNames((0, "BROCADE-SPX-MIB", "brcdSPXCBSPXLagPrimaryPort"))
if mibBuilder.loadTexts: brcdSPXCBSPXLagEntry.setStatus('current')
if mibBuilder.loadTexts: brcdSPXCBSPXLagEntry.setDescription('An entry in the SPX configuration CB SPX LAG table.')
brcdSPXCBSPXLagPrimaryPort = MibTableColumn((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 4, 1, 1), InterfaceIndexOrZero())
if mibBuilder.loadTexts: brcdSPXCBSPXLagPrimaryPort.setStatus('current')
if mibBuilder.loadTexts: brcdSPXCBSPXLagPrimaryPort.setDescription('The LAG primary port for the configured CB SPX LAG. This primary port is the smallest port in the CB SPX LAG group. CB unit can have multiple SPX LAGs per unit.')
brcdSPXCBSPXLagLagIflist = MibTableColumn((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 4, 1, 2), OctetString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: brcdSPXCBSPXLagLagIflist.setStatus('current')
if mibBuilder.loadTexts: brcdSPXCBSPXLagLagIflist.setDescription('A list of interface indices which are the port membership of a SPX Lag group on CB. Each interface index is a 32-bit integer in big endian order. It returns NULL if CB SPX Lag does not exist. Note that each CB SPX LAG group contains up to 16 ports.')
brcdSPXCBSPXLagPEGroup = MibTableColumn((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 4, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: brcdSPXCBSPXLagPEGroup.setStatus('current')
if mibBuilder.loadTexts: brcdSPXCBSPXLagPEGroup.setDescription('The name of SPX LAG for the configured CB SPX LAG. It is an optional field')
brcdSPXCBSPXLagRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 4, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("other", 1), ("valid", 2), ("delete", 3), ("create", 4)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: brcdSPXCBSPXLagRowStatus.setStatus('current')
if mibBuilder.loadTexts: brcdSPXCBSPXLagRowStatus.setDescription("This object is used to delete row in the table and control if they are used. The values that can be written are: delete(3)...deletes the row create(4)...creates a new row If the row exists, then a SET with value of create(4) returns error 'wrongValue'. Deleted rows go away immediately. The following values can be returned on reads: noSuchName...no such row other(1).....some other cases valid(2)....the row exists and is valid")
brcdSPXPEGroupTable = MibTable((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 5), )
if mibBuilder.loadTexts: brcdSPXPEGroupTable.setStatus('current')
if mibBuilder.loadTexts: brcdSPXPEGroupTable.setDescription('SPX CB SPX port and PE group table.')
brcdSPXPEGroupEntry = MibTableRow((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 5, 1), ).setIndexNames((0, "BROCADE-SPX-MIB", "brcdSPXPEGroupCBSPXPort"))
if mibBuilder.loadTexts: brcdSPXPEGroupEntry.setStatus('current')
if mibBuilder.loadTexts: brcdSPXPEGroupEntry.setDescription('An entry in the SPX PE group table.')
brcdSPXPEGroupCBSPXPort = MibTableColumn((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 5, 1, 1), InterfaceIndexOrZero())
if mibBuilder.loadTexts: brcdSPXPEGroupCBSPXPort.setStatus('current')
if mibBuilder.loadTexts: brcdSPXPEGroupCBSPXPort.setDescription('The IfIndex for the CB SPX port which is connected to a group of PE units')
brcdSPXPEGroupPEGroup = MibTableColumn((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 5, 1, 2), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: brcdSPXPEGroupPEGroup.setStatus('current')
if mibBuilder.loadTexts: brcdSPXPEGroupPEGroup.setDescription('The name of IfIndex for the configured CB SPX port. It is an optional field')
brcdSPXPEGroupPEIdList = MibTableColumn((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 5, 1, 3), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: brcdSPXPEGroupPEIdList.setStatus('current')
if mibBuilder.loadTexts: brcdSPXPEGroupPEIdList.setDescription('A list of PE unit ID indices which are attached to a CB SPX port.')
brcdSPXPEGroupCBSPXEndPort = MibTableColumn((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 5, 1, 4), InterfaceIndexOrZero()).setMaxAccess("readonly")
if mibBuilder.loadTexts: brcdSPXPEGroupCBSPXEndPort.setStatus('current')
if mibBuilder.loadTexts: brcdSPXPEGroupCBSPXEndPort.setDescription('The IfIndex for the CB SPX port which is connected to a group of PE units. This CB SPX port is at other end if it is a ring topology. It returns 0 if it is a chain topology and there is no the end port.')
mibBuilder.exportSymbols("BROCADE-SPX-MIB", brcdSPXCBSPXPortTable=brcdSPXCBSPXPortTable, brcdSPXCBSPXLagEntry=brcdSPXCBSPXLagEntry, brcdSPXCBSPXPortRowStatus=brcdSPXCBSPXPortRowStatus, brcdSPXOperUnitBuildlVer=brcdSPXOperUnitBuildlVer, brcdSPXPEGroupPEGroup=brcdSPXPEGroupPEGroup, brcdSPXConfigUnitPESPXLag2=brcdSPXConfigUnitPESPXLag2, brcdSPXConfigUnitEntry=brcdSPXConfigUnitEntry, brcdSPXCBSPXLagLagIflist=brcdSPXCBSPXLagLagIflist, brcdSPXConfigUnitPEName=brcdSPXConfigUnitPEName, brcdSPXOperUnitMac=brcdSPXOperUnitMac, brcdSPXPEGroupPEIdList=brcdSPXPEGroupPEIdList, brcdSPXOperUnitDescription=brcdSPXOperUnitDescription, brcdSPXCBSPXPortPEGroup=brcdSPXCBSPXPortPEGroup, brcdSPXGlobalObjects=brcdSPXGlobalObjects, brcdSPXCBSPXLagPrimaryPort=brcdSPXCBSPXLagPrimaryPort, brcdSPXOperUnitRole=brcdSPXOperUnitRole, brcdSPXPEGroupCBSPXPort=brcdSPXPEGroupCBSPXPort, brcdSPXOperUnitIndex=brcdSPXOperUnitIndex, brcdSPXCBSPXLagTable=brcdSPXCBSPXLagTable, brcdSPXConfigUnitType=brcdSPXConfigUnitType, brcdSPXConfigUnitRowStatus=brcdSPXConfigUnitRowStatus, brcdSPXCBSPXPortPort=brcdSPXCBSPXPortPort, brcdSPXTableObjects=brcdSPXTableObjects, brcdSPXCBSPXPortEntry=brcdSPXCBSPXPortEntry, brcdSPXCBSPXLagPEGroup=brcdSPXCBSPXLagPEGroup, brcdSPXOperUnitTable=brcdSPXOperUnitTable, brcdSPXOperUnitEntry=brcdSPXOperUnitEntry, brcdSPXConfigUnitState=brcdSPXConfigUnitState, brcdSPXOperUnitImgVer=brcdSPXOperUnitImgVer, brcdSPXConfigUnitPESPXLag1=brcdSPXConfigUnitPESPXLag1, brcdSPXConfigUnitTable=brcdSPXConfigUnitTable, brcdSPXGlobalConfigPEState=brcdSPXGlobalConfigPEState, brcdSPXPEGroupEntry=brcdSPXPEGroupEntry, brcdSPXPEGroupTable=brcdSPXPEGroupTable, brcdSPXOperUnitType=brcdSPXOperUnitType, brcdSPXPEGroupCBSPXEndPort=brcdSPXPEGroupCBSPXEndPort, PYSNMP_MODULE_ID=brcdSPXMIB, brcdSPXConfigUnitPESPXPort2=brcdSPXConfigUnitPESPXPort2, brcdSPXConfigUnitIndex=brcdSPXConfigUnitIndex, brcdSPXGlobalConfigCBState=brcdSPXGlobalConfigCBState, brcdSPXConfigUnitPESPXPort1=brcdSPXConfigUnitPESPXPort1, brcdSPXOperUnitState=brcdSPXOperUnitState, brcdSPXCBSPXLagRowStatus=brcdSPXCBSPXLagRowStatus, brcdSPXOperUnitPriority=brcdSPXOperUnitPriority, brcdSPXMIB=brcdSPXMIB)
|
(object_identifier, integer, octet_string) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'Integer', 'OctetString')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(constraints_intersection, value_range_constraint, value_size_constraint, single_value_constraint, constraints_union) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'ValueRangeConstraint', 'ValueSizeConstraint', 'SingleValueConstraint', 'ConstraintsUnion')
(display_string,) = mibBuilder.importSymbols('FOUNDRY-SN-AGENT-MIB', 'DisplayString')
(sn_switch,) = mibBuilder.importSymbols('FOUNDRY-SN-SWITCH-GROUP-MIB', 'snSwitch')
(interface_index_or_zero,) = mibBuilder.importSymbols('IF-MIB', 'InterfaceIndexOrZero')
(module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup')
(module_identity, counter64, bits, time_ticks, integer32, iso, notification_type, object_identity, gauge32, ip_address, unsigned32, mib_identifier, mib_scalar, mib_table, mib_table_row, mib_table_column, counter32) = mibBuilder.importSymbols('SNMPv2-SMI', 'ModuleIdentity', 'Counter64', 'Bits', 'TimeTicks', 'Integer32', 'iso', 'NotificationType', 'ObjectIdentity', 'Gauge32', 'IpAddress', 'Unsigned32', 'MibIdentifier', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Counter32')
(display_string, textual_convention, mac_address) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention', 'MacAddress')
brcd_spxmib = module_identity((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40))
brcdSPXMIB.setRevisions(('2015-05-12 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts:
brcdSPXMIB.setRevisionsDescriptions(('Initial version',))
if mibBuilder.loadTexts:
brcdSPXMIB.setLastUpdated('201505120000Z')
if mibBuilder.loadTexts:
brcdSPXMIB.setOrganization('Brocade Communications Systems, Inc')
if mibBuilder.loadTexts:
brcdSPXMIB.setContactInfo('Technical Support Center 130 Holger Way, San Jose, CA 95134 Email: [email protected] Phone: 1-800-752-8061 URL: www.brocade.com')
if mibBuilder.loadTexts:
brcdSPXMIB.setDescription(' Management Information for 802.1BR SPX system configuration and operational status. Supported Platforms: - supported on FastIron ICX7750/ICX7450 platforms. Copyright 1996-2015 Brocade Communications Systems, Inc. All rights reserved. This Brocade Communications Systems SNMP Management Information Base Specification embodies Brocade Communications Systems confidential and proprietary intellectual property. Brocade Communications Systems retains all title and ownership in the Specification, including any revisions. This Specification is supplied AS IS, and Brocade Communications Systems makes no warranty, either express or implied, as to the use, operation, condition, or performance of the specification, and any unintended consequence it may on the user environment.')
brcd_spx_global_objects = mib_identifier((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 1))
brcd_spx_table_objects = mib_identifier((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2))
brcd_spx_global_config_cb_state = mib_scalar((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('none', 0), ('enabled', 1), ('disabled', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
brcdSPXGlobalConfigCBState.setStatus('current')
if mibBuilder.loadTexts:
brcdSPXGlobalConfigCBState.setDescription('Configure CB (Control Bridge) state for 802.1BR feature on the global level. The set operation is allowed only on CB device. none: reserve state. enable: 802.1BR is enable on CB. disable: 802.1BR is disable on CB. The none state will be displayed if it is not a CB device')
brcd_spx_global_config_pe_state = mib_scalar((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('none', 0), ('enabled', 1), ('disabled', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
brcdSPXGlobalConfigPEState.setStatus('current')
if mibBuilder.loadTexts:
brcdSPXGlobalConfigPEState.setDescription('Configure PE (Port Extender) state for 802.1BR feature on the global level. The set operation is allowed only on PE standalone device. none: reserve state enable: 802.1BR is enabled on PE. disable: 802.1BR is disabled on PE. Note that enabling/disabling PE takes effect only after system is saved configure and reloaded. The none state will be displayed if it is not a PE device')
brcd_spx_config_unit_table = mib_table((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 1))
if mibBuilder.loadTexts:
brcdSPXConfigUnitTable.setStatus('current')
if mibBuilder.loadTexts:
brcdSPXConfigUnitTable.setDescription('802.1BR SPX configuration unit table.')
brcd_spx_config_unit_entry = mib_table_row((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 1, 1)).setIndexNames((0, 'BROCADE-SPX-MIB', 'brcdSPXConfigUnitIndex'))
if mibBuilder.loadTexts:
brcdSPXConfigUnitEntry.setStatus('current')
if mibBuilder.loadTexts:
brcdSPXConfigUnitEntry.setDescription('An entry in SPX configuration table.')
brcd_spx_config_unit_index = mib_table_column((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 1, 1, 1), integer32())
if mibBuilder.loadTexts:
brcdSPXConfigUnitIndex.setStatus('current')
if mibBuilder.loadTexts:
brcdSPXConfigUnitIndex.setDescription('The SPX unit Id. CB unit ID is from 1 to 16. PE unit ID is from 17 to 56')
brcd_spx_config_unit_pe_name = mib_table_column((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 1, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 64))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
brcdSPXConfigUnitPEName.setStatus('current')
if mibBuilder.loadTexts:
brcdSPXConfigUnitPEName.setDescription('A name description of PE unit.')
brcd_spx_config_unit_pespx_port1 = mib_table_column((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 1, 1, 3), interface_index_or_zero()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
brcdSPXConfigUnitPESPXPort1.setStatus('current')
if mibBuilder.loadTexts:
brcdSPXConfigUnitPESPXPort1.setDescription('A PE SPX port on PE unit. It returns 0 if SPX port does not exist. Note that the maximum PE SPX port on a PE unit is 2.')
brcd_spx_config_unit_pespx_port2 = mib_table_column((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 1, 1, 4), interface_index_or_zero()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
brcdSPXConfigUnitPESPXPort2.setStatus('current')
if mibBuilder.loadTexts:
brcdSPXConfigUnitPESPXPort2.setDescription('A PE SPX port on PE unit. It returns 0 if SPX port does not exist. Note that the maximum PE SPX port on a PE unit is 2.')
brcd_spx_config_unit_pespx_lag1 = mib_table_column((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 1, 1, 5), octet_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
brcdSPXConfigUnitPESPXLag1.setStatus('current')
if mibBuilder.loadTexts:
brcdSPXConfigUnitPESPXLag1.setDescription('A list of interface indices which are the port membership of a SPX LAG group on PE. Each interface index is a 32-bit integer in big endian order. It returns NULL if PE SPX LAG does not exist. Note that the maximum PE SPX LAG on a PE unit is 2. Each SPX LAG group contains up to 16 ports.')
brcd_spx_config_unit_pespx_lag2 = mib_table_column((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 1, 1, 6), octet_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
brcdSPXConfigUnitPESPXLag2.setStatus('current')
if mibBuilder.loadTexts:
brcdSPXConfigUnitPESPXLag2.setDescription('A list of interface indices which are the port membership of a SPX LAG group on PE. Each interface index is a 32-bit integer in big endian order. It returns NULL if PE SPX LAG does not exist. Note that the maximum PE SPX LAG on a PE unit is 2. Each SPX LAG group contains up to 16 ports.')
brcd_spx_config_unit_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 1, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('other', 1), ('valid', 2), ('delete', 3)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
brcdSPXConfigUnitRowStatus.setStatus('current')
if mibBuilder.loadTexts:
brcdSPXConfigUnitRowStatus.setDescription("This object is used to delete row in the table and control if they are used. The values that can be written are: delete(3)...deletes the row If the row exists, then a SET with value of create(4) returns error 'wrongValue'. Deleted rows go away immediately. The following values can be returned on reads: noSuchName...no such row other(1).....some other cases valid(2)....the row exists and is valid")
brcd_spx_config_unit_type = mib_table_column((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 1, 1, 8), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
brcdSPXConfigUnitType.setStatus('current')
if mibBuilder.loadTexts:
brcdSPXConfigUnitType.setDescription('A description of the configured/active system type for each unit.')
brcd_spx_config_unit_state = mib_table_column((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 1, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('local', 1), ('remote', 2), ('reserved', 3), ('empty', 4)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
brcdSPXConfigUnitState.setStatus('current')
if mibBuilder.loadTexts:
brcdSPXConfigUnitState.setDescription('A state for each unit.')
brcd_spx_oper_unit_table = mib_table((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 2))
if mibBuilder.loadTexts:
brcdSPXOperUnitTable.setStatus('current')
if mibBuilder.loadTexts:
brcdSPXOperUnitTable.setDescription('802.1BR SPX operation unit table.')
brcd_spx_oper_unit_entry = mib_table_row((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 2, 1)).setIndexNames((0, 'BROCADE-SPX-MIB', 'brcdSPXOperUnitIndex'))
if mibBuilder.loadTexts:
brcdSPXOperUnitEntry.setStatus('current')
if mibBuilder.loadTexts:
brcdSPXOperUnitEntry.setDescription('An entry in SPX operation table.')
brcd_spx_oper_unit_index = mib_table_column((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 2, 1, 1), integer32())
if mibBuilder.loadTexts:
brcdSPXOperUnitIndex.setStatus('current')
if mibBuilder.loadTexts:
brcdSPXOperUnitIndex.setDescription('The SPX unit Id. CB unit ID is from 1 to 16. PE unit ID is from 17 to 56')
brcd_spx_oper_unit_type = mib_table_column((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 2, 1, 2), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
brcdSPXOperUnitType.setStatus('current')
if mibBuilder.loadTexts:
brcdSPXOperUnitType.setDescription('A description of the configured/active system type for each unit.')
brcd_spx_oper_unit_role = mib_table_column((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 2, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6))).clone(namedValues=named_values(('other', 1), ('active', 2), ('standby', 3), ('member', 4), ('standalone', 5), ('spx-pe', 6)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
brcdSPXOperUnitRole.setStatus('current')
if mibBuilder.loadTexts:
brcdSPXOperUnitRole.setDescription('A role for each unit.')
brcd_spx_oper_unit_mac = mib_table_column((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 2, 1, 4), mac_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
brcdSPXOperUnitMac.setStatus('current')
if mibBuilder.loadTexts:
brcdSPXOperUnitMac.setDescription('A MAC address for each unit')
brcd_spx_oper_unit_priority = mib_table_column((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 2, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
brcdSPXOperUnitPriority.setStatus('current')
if mibBuilder.loadTexts:
brcdSPXOperUnitPriority.setDescription("The priority in Active/backup election on CB units. PE unit doesn't have priority, and 0 as default value.")
brcd_spx_oper_unit_state = mib_table_column((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 2, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('local', 1), ('remote', 2), ('reserved', 3), ('empty', 4)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
brcdSPXOperUnitState.setStatus('current')
if mibBuilder.loadTexts:
brcdSPXOperUnitState.setDescription('A state for each unit ')
brcd_spx_oper_unit_description = mib_table_column((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 2, 1, 7), display_string().subtype(subtypeSpec=value_size_constraint(0, 128))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
brcdSPXOperUnitDescription.setStatus('current')
if mibBuilder.loadTexts:
brcdSPXOperUnitDescription.setDescription('Describes the CB stacking or PE joining state for each unit.')
brcd_spx_oper_unit_img_ver = mib_table_column((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 2, 1, 8), display_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
brcdSPXOperUnitImgVer.setStatus('current')
if mibBuilder.loadTexts:
brcdSPXOperUnitImgVer.setDescription('The version of the running software image for each unit')
brcd_spx_oper_unit_buildl_ver = mib_table_column((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 2, 1, 9), display_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
brcdSPXOperUnitBuildlVer.setStatus('current')
if mibBuilder.loadTexts:
brcdSPXOperUnitBuildlVer.setDescription('The version of the running software build for each unit')
brcd_spxcbspx_port_table = mib_table((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 3))
if mibBuilder.loadTexts:
brcdSPXCBSPXPortTable.setStatus('current')
if mibBuilder.loadTexts:
brcdSPXCBSPXPortTable.setDescription('SPX configuration CB SPX port table.')
brcd_spxcbspx_port_entry = mib_table_row((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 3, 1)).setIndexNames((0, 'BROCADE-SPX-MIB', 'brcdSPXCBSPXPortPort'))
if mibBuilder.loadTexts:
brcdSPXCBSPXPortEntry.setStatus('current')
if mibBuilder.loadTexts:
brcdSPXCBSPXPortEntry.setDescription('An entry in the SPX configuration CB SPX port table.')
brcd_spxcbspx_port_port = mib_table_column((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 3, 1, 1), interface_index_or_zero())
if mibBuilder.loadTexts:
brcdSPXCBSPXPortPort.setStatus('current')
if mibBuilder.loadTexts:
brcdSPXCBSPXPortPort.setDescription('The IfIndex for the configured CB SPX port. CB unit can have multiple SPX ports per unit. ')
brcd_spxcbspx_port_pe_group = mib_table_column((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 3, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
brcdSPXCBSPXPortPEGroup.setStatus('current')
if mibBuilder.loadTexts:
brcdSPXCBSPXPortPEGroup.setDescription('The name of IfIndex for the configured CB SPX port. It is an optional field')
brcd_spxcbspx_port_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 3, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('other', 1), ('valid', 2), ('delete', 3), ('create', 4)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
brcdSPXCBSPXPortRowStatus.setStatus('current')
if mibBuilder.loadTexts:
brcdSPXCBSPXPortRowStatus.setDescription("This object is used to delete row in the table and control if they are used. The values that can be written are: delete(3)...deletes the row create(4)...creates a new row If the row exists, then a SET with value of create(4) returns error 'wrongValue'. Deleted rows go away immediately. The following values can be returned on reads: noSuchName...no such row other(1).....some other cases valid(2)....the row exists and is valid")
brcd_spxcbspx_lag_table = mib_table((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 4))
if mibBuilder.loadTexts:
brcdSPXCBSPXLagTable.setStatus('current')
if mibBuilder.loadTexts:
brcdSPXCBSPXLagTable.setDescription('SPX configuration CB SPX LAG table.')
brcd_spxcbspx_lag_entry = mib_table_row((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 4, 1)).setIndexNames((0, 'BROCADE-SPX-MIB', 'brcdSPXCBSPXLagPrimaryPort'))
if mibBuilder.loadTexts:
brcdSPXCBSPXLagEntry.setStatus('current')
if mibBuilder.loadTexts:
brcdSPXCBSPXLagEntry.setDescription('An entry in the SPX configuration CB SPX LAG table.')
brcd_spxcbspx_lag_primary_port = mib_table_column((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 4, 1, 1), interface_index_or_zero())
if mibBuilder.loadTexts:
brcdSPXCBSPXLagPrimaryPort.setStatus('current')
if mibBuilder.loadTexts:
brcdSPXCBSPXLagPrimaryPort.setDescription('The LAG primary port for the configured CB SPX LAG. This primary port is the smallest port in the CB SPX LAG group. CB unit can have multiple SPX LAGs per unit.')
brcd_spxcbspx_lag_lag_iflist = mib_table_column((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 4, 1, 2), octet_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
brcdSPXCBSPXLagLagIflist.setStatus('current')
if mibBuilder.loadTexts:
brcdSPXCBSPXLagLagIflist.setDescription('A list of interface indices which are the port membership of a SPX Lag group on CB. Each interface index is a 32-bit integer in big endian order. It returns NULL if CB SPX Lag does not exist. Note that each CB SPX LAG group contains up to 16 ports.')
brcd_spxcbspx_lag_pe_group = mib_table_column((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 4, 1, 3), display_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
brcdSPXCBSPXLagPEGroup.setStatus('current')
if mibBuilder.loadTexts:
brcdSPXCBSPXLagPEGroup.setDescription('The name of SPX LAG for the configured CB SPX LAG. It is an optional field')
brcd_spxcbspx_lag_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 4, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('other', 1), ('valid', 2), ('delete', 3), ('create', 4)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
brcdSPXCBSPXLagRowStatus.setStatus('current')
if mibBuilder.loadTexts:
brcdSPXCBSPXLagRowStatus.setDescription("This object is used to delete row in the table and control if they are used. The values that can be written are: delete(3)...deletes the row create(4)...creates a new row If the row exists, then a SET with value of create(4) returns error 'wrongValue'. Deleted rows go away immediately. The following values can be returned on reads: noSuchName...no such row other(1).....some other cases valid(2)....the row exists and is valid")
brcd_spxpe_group_table = mib_table((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 5))
if mibBuilder.loadTexts:
brcdSPXPEGroupTable.setStatus('current')
if mibBuilder.loadTexts:
brcdSPXPEGroupTable.setDescription('SPX CB SPX port and PE group table.')
brcd_spxpe_group_entry = mib_table_row((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 5, 1)).setIndexNames((0, 'BROCADE-SPX-MIB', 'brcdSPXPEGroupCBSPXPort'))
if mibBuilder.loadTexts:
brcdSPXPEGroupEntry.setStatus('current')
if mibBuilder.loadTexts:
brcdSPXPEGroupEntry.setDescription('An entry in the SPX PE group table.')
brcd_spxpe_group_cbspx_port = mib_table_column((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 5, 1, 1), interface_index_or_zero())
if mibBuilder.loadTexts:
brcdSPXPEGroupCBSPXPort.setStatus('current')
if mibBuilder.loadTexts:
brcdSPXPEGroupCBSPXPort.setDescription('The IfIndex for the CB SPX port which is connected to a group of PE units')
brcd_spxpe_group_pe_group = mib_table_column((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 5, 1, 2), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
brcdSPXPEGroupPEGroup.setStatus('current')
if mibBuilder.loadTexts:
brcdSPXPEGroupPEGroup.setDescription('The name of IfIndex for the configured CB SPX port. It is an optional field')
brcd_spxpe_group_pe_id_list = mib_table_column((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 5, 1, 3), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
brcdSPXPEGroupPEIdList.setStatus('current')
if mibBuilder.loadTexts:
brcdSPXPEGroupPEIdList.setDescription('A list of PE unit ID indices which are attached to a CB SPX port.')
brcd_spxpe_group_cbspx_end_port = mib_table_column((1, 3, 6, 1, 4, 1, 1991, 1, 1, 3, 40, 2, 5, 1, 4), interface_index_or_zero()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
brcdSPXPEGroupCBSPXEndPort.setStatus('current')
if mibBuilder.loadTexts:
brcdSPXPEGroupCBSPXEndPort.setDescription('The IfIndex for the CB SPX port which is connected to a group of PE units. This CB SPX port is at other end if it is a ring topology. It returns 0 if it is a chain topology and there is no the end port.')
mibBuilder.exportSymbols('BROCADE-SPX-MIB', brcdSPXCBSPXPortTable=brcdSPXCBSPXPortTable, brcdSPXCBSPXLagEntry=brcdSPXCBSPXLagEntry, brcdSPXCBSPXPortRowStatus=brcdSPXCBSPXPortRowStatus, brcdSPXOperUnitBuildlVer=brcdSPXOperUnitBuildlVer, brcdSPXPEGroupPEGroup=brcdSPXPEGroupPEGroup, brcdSPXConfigUnitPESPXLag2=brcdSPXConfigUnitPESPXLag2, brcdSPXConfigUnitEntry=brcdSPXConfigUnitEntry, brcdSPXCBSPXLagLagIflist=brcdSPXCBSPXLagLagIflist, brcdSPXConfigUnitPEName=brcdSPXConfigUnitPEName, brcdSPXOperUnitMac=brcdSPXOperUnitMac, brcdSPXPEGroupPEIdList=brcdSPXPEGroupPEIdList, brcdSPXOperUnitDescription=brcdSPXOperUnitDescription, brcdSPXCBSPXPortPEGroup=brcdSPXCBSPXPortPEGroup, brcdSPXGlobalObjects=brcdSPXGlobalObjects, brcdSPXCBSPXLagPrimaryPort=brcdSPXCBSPXLagPrimaryPort, brcdSPXOperUnitRole=brcdSPXOperUnitRole, brcdSPXPEGroupCBSPXPort=brcdSPXPEGroupCBSPXPort, brcdSPXOperUnitIndex=brcdSPXOperUnitIndex, brcdSPXCBSPXLagTable=brcdSPXCBSPXLagTable, brcdSPXConfigUnitType=brcdSPXConfigUnitType, brcdSPXConfigUnitRowStatus=brcdSPXConfigUnitRowStatus, brcdSPXCBSPXPortPort=brcdSPXCBSPXPortPort, brcdSPXTableObjects=brcdSPXTableObjects, brcdSPXCBSPXPortEntry=brcdSPXCBSPXPortEntry, brcdSPXCBSPXLagPEGroup=brcdSPXCBSPXLagPEGroup, brcdSPXOperUnitTable=brcdSPXOperUnitTable, brcdSPXOperUnitEntry=brcdSPXOperUnitEntry, brcdSPXConfigUnitState=brcdSPXConfigUnitState, brcdSPXOperUnitImgVer=brcdSPXOperUnitImgVer, brcdSPXConfigUnitPESPXLag1=brcdSPXConfigUnitPESPXLag1, brcdSPXConfigUnitTable=brcdSPXConfigUnitTable, brcdSPXGlobalConfigPEState=brcdSPXGlobalConfigPEState, brcdSPXPEGroupEntry=brcdSPXPEGroupEntry, brcdSPXPEGroupTable=brcdSPXPEGroupTable, brcdSPXOperUnitType=brcdSPXOperUnitType, brcdSPXPEGroupCBSPXEndPort=brcdSPXPEGroupCBSPXEndPort, PYSNMP_MODULE_ID=brcdSPXMIB, brcdSPXConfigUnitPESPXPort2=brcdSPXConfigUnitPESPXPort2, brcdSPXConfigUnitIndex=brcdSPXConfigUnitIndex, brcdSPXGlobalConfigCBState=brcdSPXGlobalConfigCBState, brcdSPXConfigUnitPESPXPort1=brcdSPXConfigUnitPESPXPort1, brcdSPXOperUnitState=brcdSPXOperUnitState, brcdSPXCBSPXLagRowStatus=brcdSPXCBSPXLagRowStatus, brcdSPXOperUnitPriority=brcdSPXOperUnitPriority, brcdSPXMIB=brcdSPXMIB)
|
TEMPLATES = []
PLATFORMS = {}
MIDDLEWARES = []
|
templates = []
platforms = {}
middlewares = []
|
class Pilha:
pilha = list()
def __init__(self, elemento=None):
if elemento:
self.inserir(elemento)
def inserir(self, elemento):
self.pilha.insert(0, elemento)
def remover(self):
elemento = self.pilha.pop(-1)
return elemento
def tamanho(self):
contador = 0
for elemento in self.pilha:
contador += 1
return contador
def vazia(self):
return self.tamanho() == 0
def topo(self):
return self.pilha[-1]
|
class Pilha:
pilha = list()
def __init__(self, elemento=None):
if elemento:
self.inserir(elemento)
def inserir(self, elemento):
self.pilha.insert(0, elemento)
def remover(self):
elemento = self.pilha.pop(-1)
return elemento
def tamanho(self):
contador = 0
for elemento in self.pilha:
contador += 1
return contador
def vazia(self):
return self.tamanho() == 0
def topo(self):
return self.pilha[-1]
|
def resolve_refs(node, resolver):
if isinstance(node, list):
for v in node:
resolve_refs(v, resolver)
return
if not isinstance(node, dict):
return
ref_url = node.get('$ref', None)
if ref_url is not None:
node.clear()
_, fragment = resolver.resolve(ref_url)
resolve_refs(fragment, resolver)
node.update(fragment)
return
for v in node.values():
resolve_refs(v, resolver)
|
def resolve_refs(node, resolver):
if isinstance(node, list):
for v in node:
resolve_refs(v, resolver)
return
if not isinstance(node, dict):
return
ref_url = node.get('$ref', None)
if ref_url is not None:
node.clear()
(_, fragment) = resolver.resolve(ref_url)
resolve_refs(fragment, resolver)
node.update(fragment)
return
for v in node.values():
resolve_refs(v, resolver)
|
def first_word(str):
"""
returns the first word in a given text.
"""
text=str.split()
return text[0]
if __name__ == '__main__':
print("Example:")
print(first_word("Hello world"))
|
def first_word(str):
"""
returns the first word in a given text.
"""
text = str.split()
return text[0]
if __name__ == '__main__':
print('Example:')
print(first_word('Hello world'))
|
print ("Decidere il tipo di triangolo")
a= float(input("inserisci lato 1: "))
b= float (input ("Inserisci lato 2: "))
c= float (input ("Inserisci lat 3: "))
print ("Lato 1: ", a)
print ("Lato 2: ", b)
print ("Lato 3: ", c)
if a==b and b==c:
print ("Triangolo equilatero")
elif a==b or b==c or a==c:
print ("Trinagolo isoscele")
else:
print ("Triangolo scaleno")
|
print('Decidere il tipo di triangolo')
a = float(input('inserisci lato 1: '))
b = float(input('Inserisci lato 2: '))
c = float(input('Inserisci lat 3: '))
print('Lato 1: ', a)
print('Lato 2: ', b)
print('Lato 3: ', c)
if a == b and b == c:
print('Triangolo equilatero')
elif a == b or b == c or a == c:
print('Trinagolo isoscele')
else:
print('Triangolo scaleno')
|
AchievementTitles = ('It\'s fun with friends',
'Mr Popular',
'Famous Toon',
'Trolley Time!',
'VP',
'VP',
'VP',
'VP')
AchievementDesc = ('You made a Friend!',
'You made 10 Friends!',
'You made 50 Friends!',
'You rode the Trolley!',
'You defeated the VP!',
'You defeated the VP with 1 laff!',
'You soloed the VP!',
'You soloed the VP with 1 laff!')
#(model, node, color, scale)
AchievementImages = (('phase_3.5/models/gui/friendslist_gui', '**/FriendsBox_Rollover', (1, 1, 1, 1), 1),
('phase_3.5/models/gui/friendslist_gui', '**/FriendsBox_Rollover', (1, 1, 1, 1), 1),
('phase_3.5/models/gui/friendslist_gui', '**/FriendsBox_Rollover', (1, 1, 1, 1), 1),
('phase_3.5/models/gui/stickerbook_gui', '**/trolley', (1, 1, 1, 1), 0.3),
('phase_3.5/models/gui/stickerbook_gui', '**/BossHead3Icon', (1, 1, 1, 1), 0.3),
('phase_3.5/models/gui/stickerbook_gui', '**/BossHead3Icon', (1, 1, 1, 1), 0.3),
('phase_3.5/models/gui/stickerbook_gui', '**/BossHead3Icon', (1, 1, 1, 1), 0.3),
('phase_3.5/models/gui/stickerbook_gui', '**/BossHead3Icon', (1, 1, 1, 1), 0.3))
|
achievement_titles = ("It's fun with friends", 'Mr Popular', 'Famous Toon', 'Trolley Time!', 'VP', 'VP', 'VP', 'VP')
achievement_desc = ('You made a Friend!', 'You made 10 Friends!', 'You made 50 Friends!', 'You rode the Trolley!', 'You defeated the VP!', 'You defeated the VP with 1 laff!', 'You soloed the VP!', 'You soloed the VP with 1 laff!')
achievement_images = (('phase_3.5/models/gui/friendslist_gui', '**/FriendsBox_Rollover', (1, 1, 1, 1), 1), ('phase_3.5/models/gui/friendslist_gui', '**/FriendsBox_Rollover', (1, 1, 1, 1), 1), ('phase_3.5/models/gui/friendslist_gui', '**/FriendsBox_Rollover', (1, 1, 1, 1), 1), ('phase_3.5/models/gui/stickerbook_gui', '**/trolley', (1, 1, 1, 1), 0.3), ('phase_3.5/models/gui/stickerbook_gui', '**/BossHead3Icon', (1, 1, 1, 1), 0.3), ('phase_3.5/models/gui/stickerbook_gui', '**/BossHead3Icon', (1, 1, 1, 1), 0.3), ('phase_3.5/models/gui/stickerbook_gui', '**/BossHead3Icon', (1, 1, 1, 1), 0.3), ('phase_3.5/models/gui/stickerbook_gui', '**/BossHead3Icon', (1, 1, 1, 1), 0.3))
|
a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
b = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
c = []
for x in b:
if x in a and x not in c:
c.append(x)
print(c)
|
a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
b = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
c = []
for x in b:
if x in a and x not in c:
c.append(x)
print(c)
|
class Owners:
def __init__(self, github, cloud_storage):
self.github = github
self.cloud_storage = cloud_storage
def list_all(self):
return self.cloud_storage.list_all_owners()
def sync(self):
all_users = self.github.fetch_users()
self.cloud_storage.store_owners_lists(list(all_users.keys()))
self.cloud_storage.store_ssh_keys(all_users)
|
class Owners:
def __init__(self, github, cloud_storage):
self.github = github
self.cloud_storage = cloud_storage
def list_all(self):
return self.cloud_storage.list_all_owners()
def sync(self):
all_users = self.github.fetch_users()
self.cloud_storage.store_owners_lists(list(all_users.keys()))
self.cloud_storage.store_ssh_keys(all_users)
|
def merge_sort(l):
if len(l) == 1:
return l
# left = merge_sort(l[:l // 2])
# right = merge_sort(l[l // 2:])
left = merge_sort(l[:len(l)//2])
right = merge_sort(l[len(l)//2:])
return merge(left, right)
def merge(left, right):
result = []
i = j = 0
while i <= len(left)-1 and j <= len(right)-1:
if left[i] < right[j]: # TypeError: '<' not supported between instances of 'int' and 'list'--
# be careful about the extend and append
result.append(left[i])
i += 1
else:
result.append(right[j])
j += 1
if i <= len(left)-1:
result.extend(left[i:])
else:
result.extend(right[j:])
return result
if __name__ == '__main__':
l = [4,1,1,1,1,5,6,2,3,4,5,1,4,7,98,0]
print('Before: ',l)
print('After: ', merge_sort(l))
|
def merge_sort(l):
if len(l) == 1:
return l
left = merge_sort(l[:len(l) // 2])
right = merge_sort(l[len(l) // 2:])
return merge(left, right)
def merge(left, right):
result = []
i = j = 0
while i <= len(left) - 1 and j <= len(right) - 1:
if left[i] < right[j]:
result.append(left[i])
i += 1
else:
result.append(right[j])
j += 1
if i <= len(left) - 1:
result.extend(left[i:])
else:
result.extend(right[j:])
return result
if __name__ == '__main__':
l = [4, 1, 1, 1, 1, 5, 6, 2, 3, 4, 5, 1, 4, 7, 98, 0]
print('Before: ', l)
print('After: ', merge_sort(l))
|
source = open('Second_train.txt','r')
state = 0
output = open('SecondData.txt','w')
for line in source:
if line[0] == '%':
state = 1
elif state == 1:
line = line.replace('<SEP>',',')
output.write(line)
state = 0
|
source = open('Second_train.txt', 'r')
state = 0
output = open('SecondData.txt', 'w')
for line in source:
if line[0] == '%':
state = 1
elif state == 1:
line = line.replace('<SEP>', ',')
output.write(line)
state = 0
|
################################################################################
# Author: BigBangEpoch <[email protected]>
# Date : 2018-12-24
# Copyright (c) 2018-2019 BigBangEpoch All rights reserved.
################################################################################
def de_normalize(feat_data, norm_params, norm_type='mean_var'):
"""
de-normalize data with normalization parameters using norm_type defined method
:param feat_data: data to de-normalize
:param norm_params: a numpy array of shape (4, N), indicating min, max, mean and variance for N dimensions
:param norm_type: str type, 'min_max' or 'mean_var'
:return:
numpy array, sharing same shape with input data
"""
assert feat_data.shape[1] == norm_params.shape[1]
assert norm_type in ['min_max', 'mean_var']
if norm_type == 'min_max':
min_val, min_target = norm_params[0], 0.01
max_val, max_target = norm_params[1], 0.99
return (max_val - min_val + 0.001) * (feat_data - min_target) / (max_target - min_target) + min_val
else:
mean_val = norm_params[2]
variance = norm_params[3]
return feat_data * variance + mean_val
|
def de_normalize(feat_data, norm_params, norm_type='mean_var'):
"""
de-normalize data with normalization parameters using norm_type defined method
:param feat_data: data to de-normalize
:param norm_params: a numpy array of shape (4, N), indicating min, max, mean and variance for N dimensions
:param norm_type: str type, 'min_max' or 'mean_var'
:return:
numpy array, sharing same shape with input data
"""
assert feat_data.shape[1] == norm_params.shape[1]
assert norm_type in ['min_max', 'mean_var']
if norm_type == 'min_max':
(min_val, min_target) = (norm_params[0], 0.01)
(max_val, max_target) = (norm_params[1], 0.99)
return (max_val - min_val + 0.001) * (feat_data - min_target) / (max_target - min_target) + min_val
else:
mean_val = norm_params[2]
variance = norm_params[3]
return feat_data * variance + mean_val
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
*****************************************
Author: zhlinh
Email: [email protected]
Version: 0.0.1
Created Time: 2016-03-26
Last_modify: 2016-03-26
******************************************
'''
'''
Note: This is an extension of House Robber.
After robbing those houses on that street,
the thief has found himself a new place for his thievery
so that he will not get too much attention.
This time, all houses at this place are arranged in a circle.
That means the first house is the neighbor of the last one.
Meanwhile, the security system for these houses remain
the same as for those in the previous street.
Given a list of non-negative integers representing the amount
of money of each house, determine the maximum amount of money
you can rob tonight without alerting the police.
Credits:
Special thanks to @Freezen for adding this problem and creating all test cases.
'''
class Solution(object):
def rob(self, nums):
"""
:type nums: List[int]
:rtype: int
"""
n = len(nums)
if n == 1:
return nums[0]
aInclude, aExclude, bInclude, bExclude = 0, 0, 0, 0
for i in range(n):
if i > 0:
tmp = aInclude
aInclude = aExclude + nums[i]
aExclude = max(aExclude, tmp)
if i < n - 1:
tmp = bInclude
bInclude = bExclude + nums[i]
bExclude = max(bExclude, tmp)
return max(aInclude, aExclude, bInclude, bExclude)
|
"""
*****************************************
Author: zhlinh
Email: [email protected]
Version: 0.0.1
Created Time: 2016-03-26
Last_modify: 2016-03-26
******************************************
"""
'\nNote: This is an extension of House Robber.\n\nAfter robbing those houses on that street,\nthe thief has found himself a new place for his thievery\nso that he will not get too much attention.\nThis time, all houses at this place are arranged in a circle.\nThat means the first house is the neighbor of the last one.\nMeanwhile, the security system for these houses remain\nthe same as for those in the previous street.\n\nGiven a list of non-negative integers representing the amount\nof money of each house, determine the maximum amount of money\nyou can rob tonight without alerting the police.\n\nCredits:\nSpecial thanks to @Freezen for adding this problem and creating all test cases.\n'
class Solution(object):
def rob(self, nums):
"""
:type nums: List[int]
:rtype: int
"""
n = len(nums)
if n == 1:
return nums[0]
(a_include, a_exclude, b_include, b_exclude) = (0, 0, 0, 0)
for i in range(n):
if i > 0:
tmp = aInclude
a_include = aExclude + nums[i]
a_exclude = max(aExclude, tmp)
if i < n - 1:
tmp = bInclude
b_include = bExclude + nums[i]
b_exclude = max(bExclude, tmp)
return max(aInclude, aExclude, bInclude, bExclude)
|
# Its job is to identify which forms are good prompts for the key form, so given a level and a form,
# we can pick a good prompt.
MATCHING_FORMS = {
("A1", "INDICATIVO_PASSATO_PROSSIMO"): ["'INDICATIVO_PRESENTE'"],
("A2", "INDICATIVO_PASSATO_PROSSIMO"): ["'INDICATIVO_PRESENTE'"],
("B1", "INDICATIVO_PASSATO_PROSSIMO"): ["'INDICATIVO_PRESENTE'"],
("B2", "INDICATIVO_PASSATO_PROSSIMO"): ["'INDICATIVO_PRESENTE'"],
("A1", "INDICATIVO_IMPERFETTO"): ["'INDICATIVO_PRESENTE'"] + ["'INDICATIVO_PASSATO_PROSSIMO'"],
("A2", "INDICATIVO_IMPERFETTO"): ["'INDICATIVO_PRESENTE'"] + ["'INDICATIVO_PASSATO_PROSSIMO'"],
("B1", "INDICATIVO_IMPERFETTO"): ["'INDICATIVO_PRESENTE'"] + ["'INDICATIVO_PASSATO_PROSSIMO'"],
("B2", "INDICATIVO_IMPERFETTO"): ["'INDICATIVO_PRESENTE'"] + ["'INDICATIVO_PASSATO_PROSSIMO'"],
("A1", "CONDIZIONALE_PRESENTE"): ["'INDICATIVO_PRESENTE'"],
("A2", "CONDIZIONALE_PRESENTE"): ["'INDICATIVO_PRESENTE'"],
("B1", "CONDIZIONALE_PRESENTE"): ["'INDICATIVO_PRESENTE'"],
("B2", "CONDIZIONALE_PRESENTE"): ["'INDICATIVO_PRESENTE'"],
("A1", "INDICATIVO_FUTURO_SEMPLICE"): ["'INDICATIVO_PRESENTE'"],
("A2", "INDICATIVO_FUTURO_SEMPLICE"): ["'INDICATIVO_PRESENTE'"],
("B1", "INDICATIVO_FUTURO_SEMPLICE"): ["'INDICATIVO_PRESENTE'"],
("B2", "INDICATIVO_FUTURO_SEMPLICE"): ["'INDICATIVO_PRESENTE'"],
("A1", "CONGIUNTIVO_PRESENTE"): ["'INDICATIVO_PRESENTE'"],
("A2", "CONGIUNTIVO_PRESENTE"): ["'INDICATIVO_PRESENTE'"],
("B1", "CONGIUNTIVO_PRESENTE"): ["'INDICATIVO_PRESENTE'"],
("B2", "CONGIUNTIVO_PRESENTE"): ["'INDICATIVO_PRESENTE'"],
("A1", "INDICATIVO_TRAPASSATO_PROSSIMO"): ["'INDICATIVO_PRESENTE'"] + ["'INDICATIVO_IMPERFETTO'"],
("A2", "INDICATIVO_TRAPASSATO_PROSSIMO"): ["'INDICATIVO_PRESENTE'"] + ["'INDICATIVO_IMPERFETTO'"],
("B1", "INDICATIVO_TRAPASSATO_PROSSIMO"): ["'INDICATIVO_PRESENTE'"] + ["'INDICATIVO_IMPERFETTO'"],
("B2", "INDICATIVO_TRAPASSATO_PROSSIMO"): ["'INDICATIVO_PRESENTE'"] + ["'INDICATIVO_IMPERFETTO'"],
("A1", "CONGIUNTIVO_IMPERFETTO"): ["'CONGIUNTIVO_PRESENTE'"],
("A2", "CONGIUNTIVO_IMPERFETTO"): ["'CONGIUNTIVO_PRESENTE'"],
("B1", "CONGIUNTIVO_IMPERFETTO"): ["'CONGIUNTIVO_PRESENTE'"],
("B2", "CONGIUNTIVO_IMPERFETTO"): ["'CONGIUNTIVO_PRESENTE'"],
("A1", "CONGIUNTIVO_PASSATO"): ["'CONGIUNTIVO_PRESENTE'"],
("A2", "CONGIUNTIVO_PASSATO"): ["'CONGIUNTIVO_PRESENTE'"],
("B1", "CONGIUNTIVO_PASSATO"): ["'CONGIUNTIVO_PRESENTE'"],
("B2", "CONGIUNTIVO_PASSATO"): ["'CONGIUNTIVO_PRESENTE'"],
("A1", "CONGIUNTIVO_TRAPASSATO"): ["'CONGIUNTIVO_PRESENTE'"],
("A2", "CONGIUNTIVO_TRAPASSATO"): ["'CONGIUNTIVO_PRESENTE'"],
("B1", "CONGIUNTIVO_TRAPASSATO"): ["'CONGIUNTIVO_PRESENTE'"],
("B2", "CONGIUNTIVO_TRAPASSATO"): ["'CONGIUNTIVO_PRESENTE'"],
("A1", "CONDIZIONALE_PASSATO"): ["'CONDIZIONALE_PRESENTE'"],
("A2", "CONDIZIONALE_PASSATO"): ["'CONDIZIONALE_PRESENTE'"],
("B1", "CONDIZIONALE_PASSATO"): ["'CONDIZIONALE_PRESENTE'"],
("B2", "CONDIZIONALE_PASSATO"): ["'CONDIZIONALE_PRESENTE'"],
("A1", "INDICATIVO_PASSATO_REMOTO"): ["'INDICATIVO_PRESENTE'"] + ["'INDICATIVO_PASSATO_REMOTO'"],
("A2", "INDICATIVO_PASSATO_REMOTO"): ["'INDICATIVO_PRESENTE'"] + ["'INDICATIVO_PASSATO_REMOTO'"],
("B1", "INDICATIVO_PASSATO_REMOTO"): ["'INDICATIVO_PRESENTE'"] + ["'INDICATIVO_PASSATO_REMOTO'"],
("B2", "INDICATIVO_PASSATO_REMOTO"): ["'INDICATIVO_PRESENTE'"] + ["'INDICATIVO_PASSATO_REMOTO'"],
("A1", "INDICATIVO_TRAPASSATO_REMOTO"): ["'INDICATIVO_PRESENTE'"] + ["'INDICATIVO_PASSATO_REMOTO'"],
("A2", "INDICATIVO_TRAPASSATO_REMOTO"): ["'INDICATIVO_PRESENTE'"] + ["'INDICATIVO_PASSATO_REMOTO'"],
("B1", "INDICATIVO_TRAPASSATO_REMOTO"): ["'INDICATIVO_PRESENTE'"] + ["'INDICATIVO_PASSATO_REMOTO'"],
("B2", "INDICATIVO_TRAPASSATO_REMOTO"): ["'INDICATIVO_PRESENTE'"] + ["'INDICATIVO_PASSATO_REMOTO'"],
("A1", "INDICATIVO_FUTURO_ANTERIORE"): ["'INDICATIVO_FUTURO_SEMPLICE'"],
("A2", "INDICATIVO_FUTURO_ANTERIORE"): ["'INDICATIVO_FUTURO_SEMPLICE'"],
("B1", "INDICATIVO_FUTURO_ANTERIORE"): ["'INDICATIVO_FUTURO_SEMPLICE'"],
("B2", "INDICATIVO_FUTURO_ANTERIORE"): ["'INDICATIVO_FUTURO_SEMPLICE'"],
}
|
matching_forms = {('A1', 'INDICATIVO_PASSATO_PROSSIMO'): ["'INDICATIVO_PRESENTE'"], ('A2', 'INDICATIVO_PASSATO_PROSSIMO'): ["'INDICATIVO_PRESENTE'"], ('B1', 'INDICATIVO_PASSATO_PROSSIMO'): ["'INDICATIVO_PRESENTE'"], ('B2', 'INDICATIVO_PASSATO_PROSSIMO'): ["'INDICATIVO_PRESENTE'"], ('A1', 'INDICATIVO_IMPERFETTO'): ["'INDICATIVO_PRESENTE'"] + ["'INDICATIVO_PASSATO_PROSSIMO'"], ('A2', 'INDICATIVO_IMPERFETTO'): ["'INDICATIVO_PRESENTE'"] + ["'INDICATIVO_PASSATO_PROSSIMO'"], ('B1', 'INDICATIVO_IMPERFETTO'): ["'INDICATIVO_PRESENTE'"] + ["'INDICATIVO_PASSATO_PROSSIMO'"], ('B2', 'INDICATIVO_IMPERFETTO'): ["'INDICATIVO_PRESENTE'"] + ["'INDICATIVO_PASSATO_PROSSIMO'"], ('A1', 'CONDIZIONALE_PRESENTE'): ["'INDICATIVO_PRESENTE'"], ('A2', 'CONDIZIONALE_PRESENTE'): ["'INDICATIVO_PRESENTE'"], ('B1', 'CONDIZIONALE_PRESENTE'): ["'INDICATIVO_PRESENTE'"], ('B2', 'CONDIZIONALE_PRESENTE'): ["'INDICATIVO_PRESENTE'"], ('A1', 'INDICATIVO_FUTURO_SEMPLICE'): ["'INDICATIVO_PRESENTE'"], ('A2', 'INDICATIVO_FUTURO_SEMPLICE'): ["'INDICATIVO_PRESENTE'"], ('B1', 'INDICATIVO_FUTURO_SEMPLICE'): ["'INDICATIVO_PRESENTE'"], ('B2', 'INDICATIVO_FUTURO_SEMPLICE'): ["'INDICATIVO_PRESENTE'"], ('A1', 'CONGIUNTIVO_PRESENTE'): ["'INDICATIVO_PRESENTE'"], ('A2', 'CONGIUNTIVO_PRESENTE'): ["'INDICATIVO_PRESENTE'"], ('B1', 'CONGIUNTIVO_PRESENTE'): ["'INDICATIVO_PRESENTE'"], ('B2', 'CONGIUNTIVO_PRESENTE'): ["'INDICATIVO_PRESENTE'"], ('A1', 'INDICATIVO_TRAPASSATO_PROSSIMO'): ["'INDICATIVO_PRESENTE'"] + ["'INDICATIVO_IMPERFETTO'"], ('A2', 'INDICATIVO_TRAPASSATO_PROSSIMO'): ["'INDICATIVO_PRESENTE'"] + ["'INDICATIVO_IMPERFETTO'"], ('B1', 'INDICATIVO_TRAPASSATO_PROSSIMO'): ["'INDICATIVO_PRESENTE'"] + ["'INDICATIVO_IMPERFETTO'"], ('B2', 'INDICATIVO_TRAPASSATO_PROSSIMO'): ["'INDICATIVO_PRESENTE'"] + ["'INDICATIVO_IMPERFETTO'"], ('A1', 'CONGIUNTIVO_IMPERFETTO'): ["'CONGIUNTIVO_PRESENTE'"], ('A2', 'CONGIUNTIVO_IMPERFETTO'): ["'CONGIUNTIVO_PRESENTE'"], ('B1', 'CONGIUNTIVO_IMPERFETTO'): ["'CONGIUNTIVO_PRESENTE'"], ('B2', 'CONGIUNTIVO_IMPERFETTO'): ["'CONGIUNTIVO_PRESENTE'"], ('A1', 'CONGIUNTIVO_PASSATO'): ["'CONGIUNTIVO_PRESENTE'"], ('A2', 'CONGIUNTIVO_PASSATO'): ["'CONGIUNTIVO_PRESENTE'"], ('B1', 'CONGIUNTIVO_PASSATO'): ["'CONGIUNTIVO_PRESENTE'"], ('B2', 'CONGIUNTIVO_PASSATO'): ["'CONGIUNTIVO_PRESENTE'"], ('A1', 'CONGIUNTIVO_TRAPASSATO'): ["'CONGIUNTIVO_PRESENTE'"], ('A2', 'CONGIUNTIVO_TRAPASSATO'): ["'CONGIUNTIVO_PRESENTE'"], ('B1', 'CONGIUNTIVO_TRAPASSATO'): ["'CONGIUNTIVO_PRESENTE'"], ('B2', 'CONGIUNTIVO_TRAPASSATO'): ["'CONGIUNTIVO_PRESENTE'"], ('A1', 'CONDIZIONALE_PASSATO'): ["'CONDIZIONALE_PRESENTE'"], ('A2', 'CONDIZIONALE_PASSATO'): ["'CONDIZIONALE_PRESENTE'"], ('B1', 'CONDIZIONALE_PASSATO'): ["'CONDIZIONALE_PRESENTE'"], ('B2', 'CONDIZIONALE_PASSATO'): ["'CONDIZIONALE_PRESENTE'"], ('A1', 'INDICATIVO_PASSATO_REMOTO'): ["'INDICATIVO_PRESENTE'"] + ["'INDICATIVO_PASSATO_REMOTO'"], ('A2', 'INDICATIVO_PASSATO_REMOTO'): ["'INDICATIVO_PRESENTE'"] + ["'INDICATIVO_PASSATO_REMOTO'"], ('B1', 'INDICATIVO_PASSATO_REMOTO'): ["'INDICATIVO_PRESENTE'"] + ["'INDICATIVO_PASSATO_REMOTO'"], ('B2', 'INDICATIVO_PASSATO_REMOTO'): ["'INDICATIVO_PRESENTE'"] + ["'INDICATIVO_PASSATO_REMOTO'"], ('A1', 'INDICATIVO_TRAPASSATO_REMOTO'): ["'INDICATIVO_PRESENTE'"] + ["'INDICATIVO_PASSATO_REMOTO'"], ('A2', 'INDICATIVO_TRAPASSATO_REMOTO'): ["'INDICATIVO_PRESENTE'"] + ["'INDICATIVO_PASSATO_REMOTO'"], ('B1', 'INDICATIVO_TRAPASSATO_REMOTO'): ["'INDICATIVO_PRESENTE'"] + ["'INDICATIVO_PASSATO_REMOTO'"], ('B2', 'INDICATIVO_TRAPASSATO_REMOTO'): ["'INDICATIVO_PRESENTE'"] + ["'INDICATIVO_PASSATO_REMOTO'"], ('A1', 'INDICATIVO_FUTURO_ANTERIORE'): ["'INDICATIVO_FUTURO_SEMPLICE'"], ('A2', 'INDICATIVO_FUTURO_ANTERIORE'): ["'INDICATIVO_FUTURO_SEMPLICE'"], ('B1', 'INDICATIVO_FUTURO_ANTERIORE'): ["'INDICATIVO_FUTURO_SEMPLICE'"], ('B2', 'INDICATIVO_FUTURO_ANTERIORE'): ["'INDICATIVO_FUTURO_SEMPLICE'"]}
|
#!/usr/bin/env python
# @Time : 6/10/18 1:41 PM
# @Author : Huaizheng Zhang
# @Site : zhanghuaizheng.info
# @File : base.py
class BaseDetector(object):
'''
This class is a base class of object detection
'''
def __init__(self):
'''
Init object detector
:arg
:return
'''
pass
def load_paprameters(self):
'''
To load pre-trained parameters
:return:
'''
pass
def output_features(self):
'''
Recive a layer name, then return the features from this layer
:return:
'''
pass
def detect(self):
'''
output class id; class; confidence bounding box;
:return:
'''
pass
|
class Basedetector(object):
"""
This class is a base class of object detection
"""
def __init__(self):
"""
Init object detector
:arg
:return
"""
pass
def load_paprameters(self):
"""
To load pre-trained parameters
:return:
"""
pass
def output_features(self):
"""
Recive a layer name, then return the features from this layer
:return:
"""
pass
def detect(self):
"""
output class id; class; confidence bounding box;
:return:
"""
pass
|
class Player(object):
pass
class Game(object):
pass
|
class Player(object):
pass
class Game(object):
pass
|
# coding=utf-8
"""
create on : 2019/04/19
project name : AtCoder
file name : 10_ABC086C
Problem : https://atcoder.jp/contests/abs/tasks/arc089_a
"""
def main():
n = int(input())
last_time = 0
last_x = last_y = 0
flag = True
for _ in range(n):
t, x, y = [int(txy) for txy in input().split(" ")]
dt = t - last_time
dx = abs(x - last_x)
dy = abs(y - last_y)
d_dist = dx + dy
if (dt - d_dist) >= 0 and (dt - d_dist) % 2 == 0:
pass
else:
flag = False
if flag:
print("Yes")
else:
print("No")
if __name__ == "__main__":
main()
|
"""
create on : 2019/04/19
project name : AtCoder
file name : 10_ABC086C
Problem : https://atcoder.jp/contests/abs/tasks/arc089_a
"""
def main():
n = int(input())
last_time = 0
last_x = last_y = 0
flag = True
for _ in range(n):
(t, x, y) = [int(txy) for txy in input().split(' ')]
dt = t - last_time
dx = abs(x - last_x)
dy = abs(y - last_y)
d_dist = dx + dy
if dt - d_dist >= 0 and (dt - d_dist) % 2 == 0:
pass
else:
flag = False
if flag:
print('Yes')
else:
print('No')
if __name__ == '__main__':
main()
|
"""
Test `servifier` package.
Author: Nikolay Lysenko
"""
|
"""
Test `servifier` package.
Author: Nikolay Lysenko
"""
|
def createLineSpeed():
x1 = []
y1 = []
x2 = []
y2 = []
print("Enter the beginning and ending of two line (0-1) (xb1,yb1,xe1,ye1,xb2,yb2,xe2,ye2)")
Bp = input("Enter line position :").split(",")
x1.append((Bp[0]))
y1.append((Bp[1]))
x1.append((Bp[2]))
y1.append((Bp[3]))
x2.append((Bp[4]))
y2.append((Bp[5]))
x2.append((Bp[6]))
y2.append((Bp[7]))
return x1,y1,x2,y2
|
def create_line_speed():
x1 = []
y1 = []
x2 = []
y2 = []
print('Enter the beginning and ending of two line (0-1) (xb1,yb1,xe1,ye1,xb2,yb2,xe2,ye2)')
bp = input('Enter line position :').split(',')
x1.append(Bp[0])
y1.append(Bp[1])
x1.append(Bp[2])
y1.append(Bp[3])
x2.append(Bp[4])
y2.append(Bp[5])
x2.append(Bp[6])
y2.append(Bp[7])
return (x1, y1, x2, y2)
|
""" Daubechies 20 wavelet """
class Daubechies20:
"""
Properties
----------
asymmetric, orthogonal, bi-orthogonal
All values are from http://wavelets.pybytes.com/wavelet/db20/
"""
__name__ = "Daubechies Wavelet 20"
__motherWaveletLength__ = 40 # length of the mother wavelet
__transformWaveletLength__ = 2 # minimum wavelength of input signal
# decomposition filter
# low-pass
decompositionLowFilter = [
-2.998836489615753e-10,
4.05612705554717e-09,
-1.814843248297622e-08,
2.0143220235374613e-10,
2.633924226266962e-07,
-6.847079596993149e-07,
-1.0119940100181473e-06,
7.241248287663791e-06,
-4.376143862182197e-06,
-3.710586183390615e-05,
6.774280828373048e-05,
0.00010153288973669777,
-0.0003851047486990061,
-5.349759844340453e-05,
0.0013925596193045254,
-0.0008315621728772474,
-0.003581494259744107,
0.00442054238676635,
0.0067216273018096935,
-0.013810526137727442,
-0.008789324924555765,
0.03229429953011916,
0.0058746818113949465,
-0.061722899624668884,
0.005632246857685454,
0.10229171917513397,
-0.024716827337521424,
-0.1554587507060453,
0.039850246458519104,
0.22829105082013823,
-0.016727088308801888,
-0.3267868004335376,
-0.13921208801128787,
0.36150229873889705,
0.6104932389378558,
0.4726961853103315,
0.21994211355113222,
0.06342378045900529,
0.010549394624937735,
0.0007799536136659112
]
# high-pass
decompositionHighFilter = [
-0.0007799536136659112,
0.010549394624937735,
-0.06342378045900529,
0.21994211355113222,
-0.4726961853103315,
0.6104932389378558,
-0.36150229873889705,
-0.13921208801128787,
0.3267868004335376,
-0.016727088308801888,
-0.22829105082013823,
0.039850246458519104,
0.1554587507060453,
-0.024716827337521424,
-0.10229171917513397,
0.005632246857685454,
0.061722899624668884,
0.0058746818113949465,
-0.03229429953011916,
-0.008789324924555765,
0.013810526137727442,
0.0067216273018096935,
-0.00442054238676635,
-0.003581494259744107,
0.0008315621728772474,
0.0013925596193045254,
5.349759844340453e-05,
-0.0003851047486990061,
-0.00010153288973669777,
6.774280828373048e-05,
3.710586183390615e-05,
-4.376143862182197e-06,
-7.241248287663791e-06,
-1.0119940100181473e-06,
6.847079596993149e-07,
2.633924226266962e-07,
-2.0143220235374613e-10,
-1.814843248297622e-08,
-4.05612705554717e-09,
-2.998836489615753e-10
]
# reconstruction filters
# low pass
reconstructionLowFilter = [
0.0007799536136659112,
0.010549394624937735,
0.06342378045900529,
0.21994211355113222,
0.4726961853103315,
0.6104932389378558,
0.36150229873889705,
-0.13921208801128787,
-0.3267868004335376,
-0.016727088308801888,
0.22829105082013823,
0.039850246458519104,
-0.1554587507060453,
-0.024716827337521424,
0.10229171917513397,
0.005632246857685454,
-0.061722899624668884,
0.0058746818113949465,
0.03229429953011916,
-0.008789324924555765,
-0.013810526137727442,
0.0067216273018096935,
0.00442054238676635,
-0.003581494259744107,
-0.0008315621728772474,
0.0013925596193045254,
-5.349759844340453e-05,
-0.0003851047486990061,
0.00010153288973669777,
6.774280828373048e-05,
-3.710586183390615e-05,
-4.376143862182197e-06,
7.241248287663791e-06,
-1.0119940100181473e-06,
-6.847079596993149e-07,
2.633924226266962e-07,
2.0143220235374613e-10,
-1.814843248297622e-08,
4.05612705554717e-09,
-2.998836489615753e-10
]
# high-pass
reconstructionHighFilter = [
-2.998836489615753e-10,
-4.05612705554717e-09,
-1.814843248297622e-08,
-2.0143220235374613e-10,
2.633924226266962e-07,
6.847079596993149e-07,
-1.0119940100181473e-06,
-7.241248287663791e-06,
-4.376143862182197e-06,
3.710586183390615e-05,
6.774280828373048e-05,
-0.00010153288973669777,
-0.0003851047486990061,
5.349759844340453e-05,
0.0013925596193045254,
0.0008315621728772474,
-0.003581494259744107,
-0.00442054238676635,
0.0067216273018096935,
0.013810526137727442,
-0.008789324924555765,
-0.03229429953011916,
0.0058746818113949465,
0.061722899624668884,
0.005632246857685454,
-0.10229171917513397,
-0.024716827337521424,
0.1554587507060453,
0.039850246458519104,
-0.22829105082013823,
-0.016727088308801888,
0.3267868004335376,
-0.13921208801128787,
-0.36150229873889705,
0.6104932389378558,
-0.4726961853103315,
0.21994211355113222,
-0.06342378045900529,
0.010549394624937735,
-0.0007799536136659112
]
|
""" Daubechies 20 wavelet """
class Daubechies20:
"""
Properties
----------
asymmetric, orthogonal, bi-orthogonal
All values are from http://wavelets.pybytes.com/wavelet/db20/
"""
__name__ = 'Daubechies Wavelet 20'
__mother_wavelet_length__ = 40
__transform_wavelet_length__ = 2
decomposition_low_filter = [-2.998836489615753e-10, 4.05612705554717e-09, -1.814843248297622e-08, 2.0143220235374613e-10, 2.633924226266962e-07, -6.847079596993149e-07, -1.0119940100181473e-06, 7.241248287663791e-06, -4.376143862182197e-06, -3.710586183390615e-05, 6.774280828373048e-05, 0.00010153288973669777, -0.0003851047486990061, -5.349759844340453e-05, 0.0013925596193045254, -0.0008315621728772474, -0.003581494259744107, 0.00442054238676635, 0.0067216273018096935, -0.013810526137727442, -0.008789324924555765, 0.03229429953011916, 0.0058746818113949465, -0.061722899624668884, 0.005632246857685454, 0.10229171917513397, -0.024716827337521424, -0.1554587507060453, 0.039850246458519104, 0.22829105082013823, -0.016727088308801888, -0.3267868004335376, -0.13921208801128787, 0.36150229873889705, 0.6104932389378558, 0.4726961853103315, 0.21994211355113222, 0.06342378045900529, 0.010549394624937735, 0.0007799536136659112]
decomposition_high_filter = [-0.0007799536136659112, 0.010549394624937735, -0.06342378045900529, 0.21994211355113222, -0.4726961853103315, 0.6104932389378558, -0.36150229873889705, -0.13921208801128787, 0.3267868004335376, -0.016727088308801888, -0.22829105082013823, 0.039850246458519104, 0.1554587507060453, -0.024716827337521424, -0.10229171917513397, 0.005632246857685454, 0.061722899624668884, 0.0058746818113949465, -0.03229429953011916, -0.008789324924555765, 0.013810526137727442, 0.0067216273018096935, -0.00442054238676635, -0.003581494259744107, 0.0008315621728772474, 0.0013925596193045254, 5.349759844340453e-05, -0.0003851047486990061, -0.00010153288973669777, 6.774280828373048e-05, 3.710586183390615e-05, -4.376143862182197e-06, -7.241248287663791e-06, -1.0119940100181473e-06, 6.847079596993149e-07, 2.633924226266962e-07, -2.0143220235374613e-10, -1.814843248297622e-08, -4.05612705554717e-09, -2.998836489615753e-10]
reconstruction_low_filter = [0.0007799536136659112, 0.010549394624937735, 0.06342378045900529, 0.21994211355113222, 0.4726961853103315, 0.6104932389378558, 0.36150229873889705, -0.13921208801128787, -0.3267868004335376, -0.016727088308801888, 0.22829105082013823, 0.039850246458519104, -0.1554587507060453, -0.024716827337521424, 0.10229171917513397, 0.005632246857685454, -0.061722899624668884, 0.0058746818113949465, 0.03229429953011916, -0.008789324924555765, -0.013810526137727442, 0.0067216273018096935, 0.00442054238676635, -0.003581494259744107, -0.0008315621728772474, 0.0013925596193045254, -5.349759844340453e-05, -0.0003851047486990061, 0.00010153288973669777, 6.774280828373048e-05, -3.710586183390615e-05, -4.376143862182197e-06, 7.241248287663791e-06, -1.0119940100181473e-06, -6.847079596993149e-07, 2.633924226266962e-07, 2.0143220235374613e-10, -1.814843248297622e-08, 4.05612705554717e-09, -2.998836489615753e-10]
reconstruction_high_filter = [-2.998836489615753e-10, -4.05612705554717e-09, -1.814843248297622e-08, -2.0143220235374613e-10, 2.633924226266962e-07, 6.847079596993149e-07, -1.0119940100181473e-06, -7.241248287663791e-06, -4.376143862182197e-06, 3.710586183390615e-05, 6.774280828373048e-05, -0.00010153288973669777, -0.0003851047486990061, 5.349759844340453e-05, 0.0013925596193045254, 0.0008315621728772474, -0.003581494259744107, -0.00442054238676635, 0.0067216273018096935, 0.013810526137727442, -0.008789324924555765, -0.03229429953011916, 0.0058746818113949465, 0.061722899624668884, 0.005632246857685454, -0.10229171917513397, -0.024716827337521424, 0.1554587507060453, 0.039850246458519104, -0.22829105082013823, -0.016727088308801888, 0.3267868004335376, -0.13921208801128787, -0.36150229873889705, 0.6104932389378558, -0.4726961853103315, 0.21994211355113222, -0.06342378045900529, 0.010549394624937735, -0.0007799536136659112]
|
# coding=utf-8
NETS = ['default']
POOL = 'default'
IMAGE = None
CPUMODEL = 'host-model'
NUMCPUS = 2
CPUHOTPLUG = False
MEMORY = 512
MEMORYHOTPLUG = False
DISKINTERFACE = 'virtio'
DISKTHIN = True
DISKSIZE = 10
DISKS = [{'size': DISKSIZE}]
GUESTID = 'guestrhel764'
VNC = False
CLOUDINIT = True
RESERVEIP = False
RESERVEDNS = False
RESERVEHOST = False
NESTED = True
START = True
AUTOSTART = False
TUNNEL = False
IMAGES = {'arch': 'https://linuximages.de/openstack/arch/arch-openstack-LATEST-image-bootstrap.qcow2',
'centos6': 'https://cloud.centos.org/centos/6/images/CentOS-6-x86_64-GenericCloud.qcow2',
'centos7': 'https://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud.qcow2',
'cirros': 'http://download.cirros-cloud.net/0.4.0/cirros-0.4.0-x86_64-disk.img',
'coreos': 'https://stable.release.core-os.net/amd64-usr/current/coreos_production_qemu_image.img.bz2',
'debian8': 'https://cdimage.debian.org/cdimage/openstack/archive/8.11.0/'
'debian-8.11.0-openstack-amd64.qcow2',
'debian9': 'https://cdimage.debian.org/cdimage/openstack/current-9/debian-9-openstack-amd64.qcow2',
'debian10': 'https://cdimage.debian.org/cdimage/openstack/current-10/debian-10-openstack-amd64.qcow2',
'fedora28': 'https://download.fedoraproject.org/pub/fedora/linux/releases/28/Cloud/x86_64/images/'
'Fedora-Cloud-Base-28-1.1.x86_64.qcow2',
'fedora29': 'https://download.fedoraproject.org/pub/fedora/linux/releases/29/Cloud/x86_64/images/'
'Fedora-Cloud-Base-29-1.2.x86_64.qcow2',
'fedora30': 'https://download.fedoraproject.org/pub/fedora/linux/releases/30/Cloud/x86_64/images/'
'Fedora-Cloud-Base-30-1.2.x86_64.qcow2',
'fcos': 'https://builds.coreos.fedoraproject.org/streams/testing.json',
'fedora31': 'https://download.fedoraproject.org/pub/fedora/linux/releases/31/Cloud/x86_64/images/'
'Fedora-Cloud-Base-31-1.9.x86_64.qcow2',
'gentoo': 'https://gentoo.osuosl.org/experimental/amd64/openstack/gentoo-openstack-amd64-default-20180621.'
'qcow2',
'opensuse': 'http://download.opensuse.org/pub/opensuse/repositories/Cloud:/Images:/Leap_42.3/images/'
'openSUSE-Leap-42.3-OpenStack.x86_64.qcow2',
'rhcos41': 'https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.1',
'rhcos42': 'https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.2',
'rhcos43': 'https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.3',
'rhcoslatest': 'https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.3',
'rhel7': 'https://access.redhat.com/downloads/content/69/ver=/rhel---7',
'rhel8': 'https://access.redhat.com/downloads/content/479/ver=/rhel---8',
'ubuntu1804': 'https://cloud-images.ubuntu.com/bionic/current/bionic-server-cloudimg-amd64.img',
'ubuntu1810': 'https://cloud-images.ubuntu.com/releases/cosmic/release-20190628/'
'ubuntu-18.10-server-cloudimg-amd64.img',
'ubuntu1904': 'https://cloud-images.ubuntu.com/releases/disco/release/ubuntu-19.04-server-cloudimg-amd64.img',
'ubuntu1910': 'https://cloud-images.ubuntu.com/releases/eoan/release/ubuntu-19.10-server-cloudimg-amd64.img'}
IMAGESCOMMANDS = {'debian8': 'echo datasource_list: [NoCloud, ConfigDrive, Openstack, Ec2] > /etc/cloud/cloud.cfg.d/'
'90_dpkg.cfg'}
REPORT = False
REPORTALL = False
REPORTURL = "http://127.0.0.1:9000"
REPORTDIR = "/tmp/static/reports"
INSECURE = False
KEYS = []
CMDS = []
SCRIPTS = []
FILES = []
DNS = None
DOMAIN = None
ISO = None
GATEWAY = None
NETMASKS = []
SHAREDKEY = False
ENABLEROOT = False
PLANVIEW = False
PRIVATEKEY = False
TAGS = []
RHNREGISTER = False
RHNUSER = None
RHNPASSWORD = None
RHNAK = None
RHNORG = None
RHNPOOL = None
FLAVOR = None
KEEP_NETWORKS = False
DNSCLIENT = None
STORE_METADATA = False
NOTIFY = False
NOTIFYTOKEN = None
NOTIFYCMD = "cat /var/log/cloud-init.log"
SHAREDFOLDERS = []
KERNEL = None
INITRD = None
CMDLINE = None
PLACEMENT = []
YAMLINVENTORY = False
WEBSOCKIFYCERT = """-----BEGIN PRIVATE KEY-----
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC5gvbJA3nzoIEF
5R+G3Vy1XwzKoGX7uoRPstBSgEQ967n7Y3WC3JT0r7Uq8Wyudm/8sEhK6PNFkarV
zsRZrszUF/qvLzIAg8wc7c2q3jlD1nYG8U6ngnSgcJxJdGKdYDraXwCPAbNjRd+8
KimOxGolOb57iWoZTwprNJ0B9gmfIo2i+f/rLlBJtOtITPypkt0GyRQaTD3zMEMd
azJcy3wCj1RfZ97oG9C2h6rcA0P+NEUqwwnKL/dIaJl+SJRp9GXrrVhIx+rN+lnN
dT6BzLEBGZ2IXG0Y6YxRDdMGMgVl2m78uMi0wxnOkAu7vg6jppqInNLakOexR0R4
qp7W+OCnAgMBAAECggEAKc5CsSAQbn/AM8Tjqu/dwZ3O8ybcdLMeuBsy6TSwrEeg
HO/X/oqZIt8p86h+dn6IVCih0gfXMtlV52L2SsOiszVIMAxxtz38VJSeoZ/8xbXh
2USuFf/HKpTWE5Of2ZljCe0Y4iFe/MM1XWEfBmZrCUKPE6Xu/A8c6PXtYBDDMFIl
puX8CtUDyvY3+mcprFM2z7bDLlwxAdBgfKAR84F3RazRB3KlgaqCR+KVrhVnFkBZ
ApWnkwGjxj8NrKj9JArGLwiTKeQg7w1jJGdPQwCDi14XZYFHsPEllQ3hBIJzOmAS
vHkr6DdyT6L25UY6mYfjyJy2ZIqvUObCTkTgJJ4pyQKBgQDpb3qiPpEpHipod2w+
vLmcGGnYX8K1ikplvUT1bPeRXZyzWEC3CHpK+8lktVNU3MRklyNaQJIR6P5iyP/c
C46IyPHszYnHFHGwx+hG2Ibqd1RcfjOTz04Y4WxJB5APTB24aWTy09T5k48X+iu9
Ifeqxd9cdmKiLf6CDRxvUE4r1QKBgQDLcZNRY08fpc/mAV/4H3toOkiCwng10KZ0
BZs2aM8i6CGbs7KAWy9Cm18sDW5Ffhy9oh7XnmVkaaULmrwdCrIGFLsR282c4izx
3HHhfHOl6xri2xq8XwjMruzjELiIw2A8iZZssQxzV/sRHXjf9VMdcYGXlK3HrZOw
ZIg7qxjEiwKBgQDEtIzZVPHLfUDtIN0VDME3eRcQHrmbcrn4e4I1cao4U3Ltacu2
sK0krIFrnKRo2VOhE/7VWZ38+6IJKij4isCEIRhDnHuiR2b6OapQsLsXrpBnFG1v
+3tq2eH+tCG/0jslH6LSQJCx8pbc9JGQ4aOqwuzSJGw/D5TskBHK9xe4NQKBgQCQ
FYUffDUaleWS4WBlq25MWBLowPBANODehOXzd/FTqJG841zFeU8UXlPeMDjr8LBM
QdiUHvNyVTv15wXZj6ybj+0ZbdHGjY0FUno5F1oUpVjqWAEsbiYeSLku67W17qFm
3o7xtca6nhILghMMkoPl83CzuTIGnFFf+SNfFwM4lwKBgFs5cPPw51YYwYDhhCqE
EewsK2jgc1ZqIbrGA5CbtfMIc5rhTuuJ9aWfpfF/kgUp9ruVklMrEcdTtUWn/EDA
erBsSfYdgXubBAajSxm3wFHk6bgGvKGT48++DnJWL+SFbmNhh5x9xRtMHR17K1nq
KpxLjDMW1gGkb22ggyP5MnJz
-----END PRIVATE KEY-----
-----BEGIN CERTIFICATE-----
MIIDIDCCAggCCQC/KT3ImT8lHTANBgkqhkiG9w0BAQsFADBSMQswCQYDVQQGEwJF
UzEPMA0GA1UECAwGTWFkcmlkMQ8wDQYDVQQHDAZNYWRyaWQxEjAQBgNVBAoMCUth
cm1hbGFiczENMAsGA1UEAwwEa2NsaTAeFw0xOTA5MzAxMzM2MTBaFw0yOTA5Mjcx
MzM2MTBaMFIxCzAJBgNVBAYTAkVTMQ8wDQYDVQQIDAZNYWRyaWQxDzANBgNVBAcM
Bk1hZHJpZDESMBAGA1UECgwJS2FybWFsYWJzMQ0wCwYDVQQDDARrY2xpMIIBIjAN
BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuYL2yQN586CBBeUfht1ctV8MyqBl
+7qET7LQUoBEPeu5+2N1gtyU9K+1KvFsrnZv/LBISujzRZGq1c7EWa7M1Bf6ry8y
AIPMHO3Nqt45Q9Z2BvFOp4J0oHCcSXRinWA62l8AjwGzY0XfvCopjsRqJTm+e4lq
GU8KazSdAfYJnyKNovn/6y5QSbTrSEz8qZLdBskUGkw98zBDHWsyXMt8Ao9UX2fe
6BvQtoeq3AND/jRFKsMJyi/3SGiZfkiUafRl661YSMfqzfpZzXU+gcyxARmdiFxt
GOmMUQ3TBjIFZdpu/LjItMMZzpALu74Oo6aaiJzS2pDnsUdEeKqe1vjgpwIDAQAB
MA0GCSqGSIb3DQEBCwUAA4IBAQAs7eRc4sJ2qYPY/M8+Lb2lMh+qo6FAi34kJYbv
xhnq61/dnBCPmk8JzOwBoPVREDBGmXktOwZb88t8agT/k+OKCCh8OOVa5+FafJ5j
kShh+IkztEZr+rE6gnxdcvSzUhbfet97nPo/n5ZqtoqdSm7ajnI2iiTI+AXOJAeN
0Y29Dubv9f0Vg4c0H1+qZl0uzLk3mooxyRD4qkhgtQJ8kElRCIjmceBkk+wKOnt/
oEO8BRcXIiXiQqW9KnF99fXOiQ/cKYh3kWBBPnuEOhC77Ke5aMlqMNOPULf3PMix
2bqeJlbpLt7PkZBSawXeu6sAhRsqlpEmiPGn8ujH/oKwIAgm
-----END CERTIFICATE-----"""
|
nets = ['default']
pool = 'default'
image = None
cpumodel = 'host-model'
numcpus = 2
cpuhotplug = False
memory = 512
memoryhotplug = False
diskinterface = 'virtio'
diskthin = True
disksize = 10
disks = [{'size': DISKSIZE}]
guestid = 'guestrhel764'
vnc = False
cloudinit = True
reserveip = False
reservedns = False
reservehost = False
nested = True
start = True
autostart = False
tunnel = False
images = {'arch': 'https://linuximages.de/openstack/arch/arch-openstack-LATEST-image-bootstrap.qcow2', 'centos6': 'https://cloud.centos.org/centos/6/images/CentOS-6-x86_64-GenericCloud.qcow2', 'centos7': 'https://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud.qcow2', 'cirros': 'http://download.cirros-cloud.net/0.4.0/cirros-0.4.0-x86_64-disk.img', 'coreos': 'https://stable.release.core-os.net/amd64-usr/current/coreos_production_qemu_image.img.bz2', 'debian8': 'https://cdimage.debian.org/cdimage/openstack/archive/8.11.0/debian-8.11.0-openstack-amd64.qcow2', 'debian9': 'https://cdimage.debian.org/cdimage/openstack/current-9/debian-9-openstack-amd64.qcow2', 'debian10': 'https://cdimage.debian.org/cdimage/openstack/current-10/debian-10-openstack-amd64.qcow2', 'fedora28': 'https://download.fedoraproject.org/pub/fedora/linux/releases/28/Cloud/x86_64/images/Fedora-Cloud-Base-28-1.1.x86_64.qcow2', 'fedora29': 'https://download.fedoraproject.org/pub/fedora/linux/releases/29/Cloud/x86_64/images/Fedora-Cloud-Base-29-1.2.x86_64.qcow2', 'fedora30': 'https://download.fedoraproject.org/pub/fedora/linux/releases/30/Cloud/x86_64/images/Fedora-Cloud-Base-30-1.2.x86_64.qcow2', 'fcos': 'https://builds.coreos.fedoraproject.org/streams/testing.json', 'fedora31': 'https://download.fedoraproject.org/pub/fedora/linux/releases/31/Cloud/x86_64/images/Fedora-Cloud-Base-31-1.9.x86_64.qcow2', 'gentoo': 'https://gentoo.osuosl.org/experimental/amd64/openstack/gentoo-openstack-amd64-default-20180621.qcow2', 'opensuse': 'http://download.opensuse.org/pub/opensuse/repositories/Cloud:/Images:/Leap_42.3/images/openSUSE-Leap-42.3-OpenStack.x86_64.qcow2', 'rhcos41': 'https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.1', 'rhcos42': 'https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.2', 'rhcos43': 'https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.3', 'rhcoslatest': 'https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.3', 'rhel7': 'https://access.redhat.com/downloads/content/69/ver=/rhel---7', 'rhel8': 'https://access.redhat.com/downloads/content/479/ver=/rhel---8', 'ubuntu1804': 'https://cloud-images.ubuntu.com/bionic/current/bionic-server-cloudimg-amd64.img', 'ubuntu1810': 'https://cloud-images.ubuntu.com/releases/cosmic/release-20190628/ubuntu-18.10-server-cloudimg-amd64.img', 'ubuntu1904': 'https://cloud-images.ubuntu.com/releases/disco/release/ubuntu-19.04-server-cloudimg-amd64.img', 'ubuntu1910': 'https://cloud-images.ubuntu.com/releases/eoan/release/ubuntu-19.10-server-cloudimg-amd64.img'}
imagescommands = {'debian8': 'echo datasource_list: [NoCloud, ConfigDrive, Openstack, Ec2] > /etc/cloud/cloud.cfg.d/90_dpkg.cfg'}
report = False
reportall = False
reporturl = 'http://127.0.0.1:9000'
reportdir = '/tmp/static/reports'
insecure = False
keys = []
cmds = []
scripts = []
files = []
dns = None
domain = None
iso = None
gateway = None
netmasks = []
sharedkey = False
enableroot = False
planview = False
privatekey = False
tags = []
rhnregister = False
rhnuser = None
rhnpassword = None
rhnak = None
rhnorg = None
rhnpool = None
flavor = None
keep_networks = False
dnsclient = None
store_metadata = False
notify = False
notifytoken = None
notifycmd = 'cat /var/log/cloud-init.log'
sharedfolders = []
kernel = None
initrd = None
cmdline = None
placement = []
yamlinventory = False
websockifycert = '-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC5gvbJA3nzoIEF\n5R+G3Vy1XwzKoGX7uoRPstBSgEQ967n7Y3WC3JT0r7Uq8Wyudm/8sEhK6PNFkarV\nzsRZrszUF/qvLzIAg8wc7c2q3jlD1nYG8U6ngnSgcJxJdGKdYDraXwCPAbNjRd+8\nKimOxGolOb57iWoZTwprNJ0B9gmfIo2i+f/rLlBJtOtITPypkt0GyRQaTD3zMEMd\nazJcy3wCj1RfZ97oG9C2h6rcA0P+NEUqwwnKL/dIaJl+SJRp9GXrrVhIx+rN+lnN\ndT6BzLEBGZ2IXG0Y6YxRDdMGMgVl2m78uMi0wxnOkAu7vg6jppqInNLakOexR0R4\nqp7W+OCnAgMBAAECggEAKc5CsSAQbn/AM8Tjqu/dwZ3O8ybcdLMeuBsy6TSwrEeg\nHO/X/oqZIt8p86h+dn6IVCih0gfXMtlV52L2SsOiszVIMAxxtz38VJSeoZ/8xbXh\n2USuFf/HKpTWE5Of2ZljCe0Y4iFe/MM1XWEfBmZrCUKPE6Xu/A8c6PXtYBDDMFIl\npuX8CtUDyvY3+mcprFM2z7bDLlwxAdBgfKAR84F3RazRB3KlgaqCR+KVrhVnFkBZ\nApWnkwGjxj8NrKj9JArGLwiTKeQg7w1jJGdPQwCDi14XZYFHsPEllQ3hBIJzOmAS\nvHkr6DdyT6L25UY6mYfjyJy2ZIqvUObCTkTgJJ4pyQKBgQDpb3qiPpEpHipod2w+\nvLmcGGnYX8K1ikplvUT1bPeRXZyzWEC3CHpK+8lktVNU3MRklyNaQJIR6P5iyP/c\nC46IyPHszYnHFHGwx+hG2Ibqd1RcfjOTz04Y4WxJB5APTB24aWTy09T5k48X+iu9\nIfeqxd9cdmKiLf6CDRxvUE4r1QKBgQDLcZNRY08fpc/mAV/4H3toOkiCwng10KZ0\nBZs2aM8i6CGbs7KAWy9Cm18sDW5Ffhy9oh7XnmVkaaULmrwdCrIGFLsR282c4izx\n3HHhfHOl6xri2xq8XwjMruzjELiIw2A8iZZssQxzV/sRHXjf9VMdcYGXlK3HrZOw\nZIg7qxjEiwKBgQDEtIzZVPHLfUDtIN0VDME3eRcQHrmbcrn4e4I1cao4U3Ltacu2\nsK0krIFrnKRo2VOhE/7VWZ38+6IJKij4isCEIRhDnHuiR2b6OapQsLsXrpBnFG1v\n+3tq2eH+tCG/0jslH6LSQJCx8pbc9JGQ4aOqwuzSJGw/D5TskBHK9xe4NQKBgQCQ\nFYUffDUaleWS4WBlq25MWBLowPBANODehOXzd/FTqJG841zFeU8UXlPeMDjr8LBM\nQdiUHvNyVTv15wXZj6ybj+0ZbdHGjY0FUno5F1oUpVjqWAEsbiYeSLku67W17qFm\n3o7xtca6nhILghMMkoPl83CzuTIGnFFf+SNfFwM4lwKBgFs5cPPw51YYwYDhhCqE\nEewsK2jgc1ZqIbrGA5CbtfMIc5rhTuuJ9aWfpfF/kgUp9ruVklMrEcdTtUWn/EDA\nerBsSfYdgXubBAajSxm3wFHk6bgGvKGT48++DnJWL+SFbmNhh5x9xRtMHR17K1nq\nKpxLjDMW1gGkb22ggyP5MnJz\n-----END PRIVATE KEY-----\n-----BEGIN CERTIFICATE-----\nMIIDIDCCAggCCQC/KT3ImT8lHTANBgkqhkiG9w0BAQsFADBSMQswCQYDVQQGEwJF\nUzEPMA0GA1UECAwGTWFkcmlkMQ8wDQYDVQQHDAZNYWRyaWQxEjAQBgNVBAoMCUth\ncm1hbGFiczENMAsGA1UEAwwEa2NsaTAeFw0xOTA5MzAxMzM2MTBaFw0yOTA5Mjcx\nMzM2MTBaMFIxCzAJBgNVBAYTAkVTMQ8wDQYDVQQIDAZNYWRyaWQxDzANBgNVBAcM\nBk1hZHJpZDESMBAGA1UECgwJS2FybWFsYWJzMQ0wCwYDVQQDDARrY2xpMIIBIjAN\nBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuYL2yQN586CBBeUfht1ctV8MyqBl\n+7qET7LQUoBEPeu5+2N1gtyU9K+1KvFsrnZv/LBISujzRZGq1c7EWa7M1Bf6ry8y\nAIPMHO3Nqt45Q9Z2BvFOp4J0oHCcSXRinWA62l8AjwGzY0XfvCopjsRqJTm+e4lq\nGU8KazSdAfYJnyKNovn/6y5QSbTrSEz8qZLdBskUGkw98zBDHWsyXMt8Ao9UX2fe\n6BvQtoeq3AND/jRFKsMJyi/3SGiZfkiUafRl661YSMfqzfpZzXU+gcyxARmdiFxt\nGOmMUQ3TBjIFZdpu/LjItMMZzpALu74Oo6aaiJzS2pDnsUdEeKqe1vjgpwIDAQAB\nMA0GCSqGSIb3DQEBCwUAA4IBAQAs7eRc4sJ2qYPY/M8+Lb2lMh+qo6FAi34kJYbv\nxhnq61/dnBCPmk8JzOwBoPVREDBGmXktOwZb88t8agT/k+OKCCh8OOVa5+FafJ5j\nkShh+IkztEZr+rE6gnxdcvSzUhbfet97nPo/n5ZqtoqdSm7ajnI2iiTI+AXOJAeN\n0Y29Dubv9f0Vg4c0H1+qZl0uzLk3mooxyRD4qkhgtQJ8kElRCIjmceBkk+wKOnt/\noEO8BRcXIiXiQqW9KnF99fXOiQ/cKYh3kWBBPnuEOhC77Ke5aMlqMNOPULf3PMix\n2bqeJlbpLt7PkZBSawXeu6sAhRsqlpEmiPGn8ujH/oKwIAgm\n-----END CERTIFICATE-----'
|
class BrokenDB(Exception):
def __init__(self, expected_hash: bytes, actual_hash: bytes, hash_algorithm: str):
self.expected_hash = expected_hash
self.actual_hash = actual_hash
self.hash_algorithm = hash_algorithm
class WrongMaster(Exception):
pass
|
class Brokendb(Exception):
def __init__(self, expected_hash: bytes, actual_hash: bytes, hash_algorithm: str):
self.expected_hash = expected_hash
self.actual_hash = actual_hash
self.hash_algorithm = hash_algorithm
class Wrongmaster(Exception):
pass
|
class BaseEnv(dataclass):
state: any
observation_spec: dict[str, Modality]
action_spec: dict[str, Modality]
last_observation: dict[str, NestedTensor]
last_action: dict[str, NestedTensor]
def step(self, obs, *args, **kwargs):
raise NotImplementedError('subclasses should implement this method')
|
class Baseenv(dataclass):
state: any
observation_spec: dict[str, Modality]
action_spec: dict[str, Modality]
last_observation: dict[str, NestedTensor]
last_action: dict[str, NestedTensor]
def step(self, obs, *args, **kwargs):
raise not_implemented_error('subclasses should implement this method')
|
def warn_the_sheep(queue):
if queue[-1]=="wolf":
return 'Pls go away and stop eating my sheep'
else:
return "Oi! Sheep number "+str(len(queue)-queue.index("wolf")-1)+"! You are about to be eaten by a wolf!"
|
def warn_the_sheep(queue):
if queue[-1] == 'wolf':
return 'Pls go away and stop eating my sheep'
else:
return 'Oi! Sheep number ' + str(len(queue) - queue.index('wolf') - 1) + '! You are about to be eaten by a wolf!'
|
'''input
1
1
1
5
3
1
2
2
'''
# -*- coding: utf-8 -*-
# AtCoder Beginner Contest
if __name__ == '__main__':
n = int(input())
print(n)
# See:
# https://www.slideshare.net/chokudai/abc021
for _ in range(n):
print(1)
|
"""input
1
1
1
5
3
1
2
2
"""
if __name__ == '__main__':
n = int(input())
print(n)
for _ in range(n):
print(1)
|
class MinStack:
def __init__(self):
self.L = []
self.min_stack = []
def push(self, val: int) -> None:
self.L.append(val)
if not self.min_stack:
self.min_stack.append(val)
else:
if val <= self.min_stack[-1]:
self.min_stack.append(val)
def pop(self) -> None:
if self.L:
temp = self.L.pop()
if self.min_stack:
if self.min_stack[-1] == temp:
self.min_stack.pop()
return temp
def top(self) -> int:
if self.L:
return self.L[-1]
def getMin(self) -> int:
if self.min_stack:
temp = self.min_stack[-1]
if self.L:
if temp in self.L:
return temp
# Your MinStack object will be instantiated and called as such:
# obj = MinStack()
# obj.push(val)
# obj.pop()
# param_3 = obj.top()
# param_4 = obj.getMin()
|
class Minstack:
def __init__(self):
self.L = []
self.min_stack = []
def push(self, val: int) -> None:
self.L.append(val)
if not self.min_stack:
self.min_stack.append(val)
elif val <= self.min_stack[-1]:
self.min_stack.append(val)
def pop(self) -> None:
if self.L:
temp = self.L.pop()
if self.min_stack:
if self.min_stack[-1] == temp:
self.min_stack.pop()
return temp
def top(self) -> int:
if self.L:
return self.L[-1]
def get_min(self) -> int:
if self.min_stack:
temp = self.min_stack[-1]
if self.L:
if temp in self.L:
return temp
|
print ('Qual a sua data de nascimento?')
dia = input ('Dia: ')
mes = input ('Mes: ')
ano = input ('Ano: ')
print ('Voce nasceu no dia ' + dia + ' de ' + mes + ' de ' + ano)
|
print('Qual a sua data de nascimento?')
dia = input('Dia: ')
mes = input('Mes: ')
ano = input('Ano: ')
print('Voce nasceu no dia ' + dia + ' de ' + mes + ' de ' + ano)
|
class KeplerIOError(Exception):
"""A base exception for any IO error that might occur."""
def __init__(self, message):
"""Initializes a new KeplerIOError"""
super().__init__(message)
class MAST_IDNotFound(KeplerIOError):
"""The searched ID could not be found on MAST."""
def __init__(self, kepler_id):
super().__init__(f'Could not find lightcurve data for {kepler_id}.')
class MAST_ServerError(KeplerIOError):
"""Raised when the MAST server replies with a 500 error code"""
def __init__(self, url, error):
if error == 503:
message = (
f'Requesting {url} from MAST resulted in 503 Error. '
'Please wait for service to resume or contact MAST '
'support for more information.'
)
elif error == 504:
message = (
f'Connection to MAST resulted in 504 Gateway Timeout error. '
'Please check connection if you\'re using a proxy or some '
'other form of indirect connection to MAST.'
)
else:
message = (
f'MAST Service error {error} while requesting {url}. Please '
'wait and try again.'
)
super().__init__(message)
|
class Keplerioerror(Exception):
"""A base exception for any IO error that might occur."""
def __init__(self, message):
"""Initializes a new KeplerIOError"""
super().__init__(message)
class Mast_Idnotfound(KeplerIOError):
"""The searched ID could not be found on MAST."""
def __init__(self, kepler_id):
super().__init__(f'Could not find lightcurve data for {kepler_id}.')
class Mast_Servererror(KeplerIOError):
"""Raised when the MAST server replies with a 500 error code"""
def __init__(self, url, error):
if error == 503:
message = f'Requesting {url} from MAST resulted in 503 Error. Please wait for service to resume or contact MAST support for more information.'
elif error == 504:
message = f"Connection to MAST resulted in 504 Gateway Timeout error. Please check connection if you're using a proxy or some other form of indirect connection to MAST."
else:
message = f'MAST Service error {error} while requesting {url}. Please wait and try again.'
super().__init__(message)
|
class Solution:
def searchMatrix(self, matrix, target):
"""
:type matrix: List[List[int]]
:type target: int
:rtype: bool
"""
if not matrix:
return False
if not matrix[0]:
return False
left = up = 0
right = len(matrix[0])-1
down = len(matrix)-1
for i in range(len(matrix[0])):
if matrix[0][i] > target:
right = i-1
break
for j in range(len(matrix)):
if matrix[j][0] > target:
down = j-1
break
for x in range(down+1):
for y in range(right+1):
if matrix[x][y] == target:
return True
if matrix[x][y] > target:
break
return False
# Two Pointers
class Solution:
def searchMatrix(self, matrix, target):
"""
:type matrix: List[List[int]]
:type target: int
:rtype: bool
"""
if not matrix:
return False
if not matrix[0]:
return False
i = 0
j = len(matrix[0])-1
while i < len(matrix) and j >= 0:
if matrix[i][j] == target:
return True
elif matrix[i][j] > target:
j -= 1
else:
i += 1
return False
|
class Solution:
def search_matrix(self, matrix, target):
"""
:type matrix: List[List[int]]
:type target: int
:rtype: bool
"""
if not matrix:
return False
if not matrix[0]:
return False
left = up = 0
right = len(matrix[0]) - 1
down = len(matrix) - 1
for i in range(len(matrix[0])):
if matrix[0][i] > target:
right = i - 1
break
for j in range(len(matrix)):
if matrix[j][0] > target:
down = j - 1
break
for x in range(down + 1):
for y in range(right + 1):
if matrix[x][y] == target:
return True
if matrix[x][y] > target:
break
return False
class Solution:
def search_matrix(self, matrix, target):
"""
:type matrix: List[List[int]]
:type target: int
:rtype: bool
"""
if not matrix:
return False
if not matrix[0]:
return False
i = 0
j = len(matrix[0]) - 1
while i < len(matrix) and j >= 0:
if matrix[i][j] == target:
return True
elif matrix[i][j] > target:
j -= 1
else:
i += 1
return False
|
def sum(a,b):
return a + b
def salario_descontado_imposto(salario,imposto=27.):
return salario - (salario * imposto * 0.01)
c = sum(1,3)
print(c)
salario_real = salario_descontado_imposto(5000)
print(salario_real)
|
def sum(a, b):
return a + b
def salario_descontado_imposto(salario, imposto=27.0):
return salario - salario * imposto * 0.01
c = sum(1, 3)
print(c)
salario_real = salario_descontado_imposto(5000)
print(salario_real)
|
x = 50
while 50 <= x <= 100:
print (x)
x = x + 1
|
x = 50
while 50 <= x <= 100:
print(x)
x = x + 1
|
# Copyright (c) 2020 Geoffrey Huntley <[email protected]>. All rights reserved.
# SPDX-License-Identifier: Proprietary
# Sample Test passing with nose and pytest
def test_pass():
assert True, "dummy sample test"
|
def test_pass():
assert True, 'dummy sample test'
|
class InputReader:
"""Handles reading the input"""
def __init__(self, mode, filename):
self.filename = filename
self.mode = mode
def get_next_word(self) -> str:
"""
Returns one word at a time from the input document
:return: The next word
"""
# The sub functions must be generators!!
if self.mode == 'txt':
return self.__get_txt_input()
else:
raise Exception("Unrecognized Mode")
def __get_txt_input(self) -> str:
"""
Reading a line each time from a txt file
"""
with open(self.filename, 'r') as f:
for line in f:
yield line.strip()
|
class Inputreader:
"""Handles reading the input"""
def __init__(self, mode, filename):
self.filename = filename
self.mode = mode
def get_next_word(self) -> str:
"""
Returns one word at a time from the input document
:return: The next word
"""
if self.mode == 'txt':
return self.__get_txt_input()
else:
raise exception('Unrecognized Mode')
def __get_txt_input(self) -> str:
"""
Reading a line each time from a txt file
"""
with open(self.filename, 'r') as f:
for line in f:
yield line.strip()
|
"""
Create a function that reverses a string.
For example string 'Hi My name is Faisal' should be 'lasiaF si eman yM iH'
"""
# Function Definition
# First attempt to reverse a string.
def reverse_string(string_input):
split_string = list(string_input)
reversed_string = []
for i in reversed(range(len(split_string))):
reversed_string.append(split_string[i])
print(reversed_string)
# Reverse a string using Andrei's solution to reverse a string exercise.
def reverse_string_2(string_input):
# Check the input for errors, What if the string is a number or undefined?
if type(string_input) != str or len(string_input) < 2:
return 'Please enter valid input!'
backwards = []
total_items = len(string_input) - 1
for i in range(total_items, -1, -1):
backwards.append(string_input[i])
print(backwards)
return ''.join(backwards)
# Reverse string function using inbuilt functions and in a more pythony way.
def reverse_string_3(string_input):
return ''.join(reversed(list(string_input)))
# Declarations
to_reverse = 'hello'
# reverse_string(to_reverse)
# string = reverse_string_2(to_reverse)
string = reverse_string_3(to_reverse)
print(string)
|
"""
Create a function that reverses a string.
For example string 'Hi My name is Faisal' should be 'lasiaF si eman yM iH'
"""
def reverse_string(string_input):
split_string = list(string_input)
reversed_string = []
for i in reversed(range(len(split_string))):
reversed_string.append(split_string[i])
print(reversed_string)
def reverse_string_2(string_input):
if type(string_input) != str or len(string_input) < 2:
return 'Please enter valid input!'
backwards = []
total_items = len(string_input) - 1
for i in range(total_items, -1, -1):
backwards.append(string_input[i])
print(backwards)
return ''.join(backwards)
def reverse_string_3(string_input):
return ''.join(reversed(list(string_input)))
to_reverse = 'hello'
string = reverse_string_3(to_reverse)
print(string)
|
#The Course:PROG8420
#Assignment No:2
#Create date:2020/09/25
#Name: Fei Yun
location1=input('put the txt file with .py same folder and input file name: ')
def wordCount(location):
file=open(location,"r")
wordcount={}
#split word and lower all words
Text=file.read().lower().split()
#clean -,.\n special characaters
for char in '-.,\n':
Text=[item.replace(char,'') for item in Text]
#count word
for word in Text:
#creat word if not exist
if word not in wordcount:
wordcount[word]=1
else:
#count +1 if exist
wordcount[word]+=1
#sort word as alpha order
for k in sorted(wordcount):
print("%s : %d" %(k,wordcount[k]))
file.close()
wordCount(location1)
|
location1 = input('put the txt file with .py same folder and input file name: ')
def word_count(location):
file = open(location, 'r')
wordcount = {}
text = file.read().lower().split()
for char in '-.,\n':
text = [item.replace(char, '') for item in Text]
for word in Text:
if word not in wordcount:
wordcount[word] = 1
else:
wordcount[word] += 1
for k in sorted(wordcount):
print('%s : %d' % (k, wordcount[k]))
file.close()
word_count(location1)
|
players = ['charles', 'martina', 'michael', 'florence', 'eli']
print (players)
print (players[0:3])
print (players[1:4])
print (players[:4])
print (players[2:])
print ('\nHere are the first three players on my team:')
for player in players[:3]:
print (player.title())
|
players = ['charles', 'martina', 'michael', 'florence', 'eli']
print(players)
print(players[0:3])
print(players[1:4])
print(players[:4])
print(players[2:])
print('\nHere are the first three players on my team:')
for player in players[:3]:
print(player.title())
|
# close func
def CloseFunc():
print("CloseFunc")
return False
# an option
def Option1():
print("Option1")
return True
# dictionary with all options_dict
# your key : ("option name", function to call for that option),
options_dict = {
0 : ("Close called", CloseFunc),
1 : ("Option1 function called", Option1),
}
# ask for option function
def AskForOption():
#print each option you have with the coresponded key
for key in options_dict.keys():
print("%s - %s" % (str(key), options_dict[key][0]))
print("")
option = input("Enter your option:") # ask for the option
if not option in options_dict: # check if the key exists in your option dict
print("Invalid input")
return True
return options_dict[option][1]() # call the function by the key entered and return the value
if __name__ == "__main__":
# ask for an option until AskForOption will be false
while AskForOption():
pass
|
def close_func():
print('CloseFunc')
return False
def option1():
print('Option1')
return True
options_dict = {0: ('Close called', CloseFunc), 1: ('Option1 function called', Option1)}
def ask_for_option():
for key in options_dict.keys():
print('%s - %s' % (str(key), options_dict[key][0]))
print('')
option = input('Enter your option:')
if not option in options_dict:
print('Invalid input')
return True
return options_dict[option][1]()
if __name__ == '__main__':
while ask_for_option():
pass
|
# Strings
# split -> returns a list based on the delimiter
# Sample String
string_01 = "The quick brown fox jumps over the lazy dog."
string_02 = "10/10/2019 01:02:35 CST|10.10.21.23|HTTP 200|Duration:5s|Timeout:30s"
# Using split
word_list = string_01.split()
# Type & Print
print(" Type ".center(44, "-"))
print(type(word_list))
print(word_list)
# Determine length
word_count = len(word_list)
print(" list item count (i.e length)".center(44, "-"))
print(word_count)
# ------------------------------------------------------
# Using split
#word_list2 = string_02.split("|")
word_list2 = string_02.split("|",1) # Impact of 2nd argument
# Type & Print
print(" Type ".center(44, "-"))
print(type(word_list2))
print(word_list2)
# Determine length
word_count2 = len(word_list2)
print(" list item count (i.e length)".center(44, "-"))
print(word_count2)
|
string_01 = 'The quick brown fox jumps over the lazy dog.'
string_02 = '10/10/2019 01:02:35 CST|10.10.21.23|HTTP 200|Duration:5s|Timeout:30s'
word_list = string_01.split()
print(' Type '.center(44, '-'))
print(type(word_list))
print(word_list)
word_count = len(word_list)
print(' list item count (i.e length)'.center(44, '-'))
print(word_count)
word_list2 = string_02.split('|', 1)
print(' Type '.center(44, '-'))
print(type(word_list2))
print(word_list2)
word_count2 = len(word_list2)
print(' list item count (i.e length)'.center(44, '-'))
print(word_count2)
|
magic_create_key = "TheQuickBrownFox"
class Board:
class Builder:
def __init__(self, board, player):
if len(board) == 0:
raise InvalidBoardException("Board is empty")
self.board = board
self.player = player
self.min_array_size = 5 # Min board size is 3
if self.player == 1:
self.start_char = "A"
self.end_char = "B"
else:
self.start_char = "a"
self.end_char = "b"
@staticmethod
def empty(player):
return Board.Builder([[]], player)
def load_from_file(self, file_name):
"""
:param file_name: The file where the board will be derived from
:return: None, but the resulting array board will be stored in self.board
"""
board_file = open(file_name, "r")
# Get rows and columns from text file
rows = 0
cols = 0
for line in board_file:
if rows == 0:
cols = len(line)
rows += 1
# Checks if line lengths are consistent
current_row = 0
for line in board_file:
if len(line) != cols and current_row != rows:
board_file.close()
raise InvalidBoardException("Inconsistent line lengths")
current_row += 1
board_file.seek(0) # Return to the start of the text file
cols = int(cols / 2)
# Makes array
if rows >= self.min_array_size and cols >= self.min_array_size:
file_array = self.build_empty_board(rows, cols)
else:
board_file.close()
raise InvalidBoardException("Board too small")
# Fills the array
previous_element = ""
for r in range(len(file_array)):
for c in range(len(file_array[0])):
# Checks consistency of inner walls
if not (r == 0 and c == 0):
previous_element = next_array_element
next_array_element = board_file.read(2)
if not (r == 0 and c == 0):
if c % 2 == 1:
if previous_element[1] != next_array_element[1]:
board_file.close()
raise InvalidBoardException("Invalid inner walls")
if next_array_element[0] == "+":
file_array[r][c] = "?"
elif next_array_element[0] == "/" or next_array_element[0] == "\\":
file_array[r][c] = "?"
elif next_array_element[0] == "|":
file_array[r][c] = "#"
elif next_array_element[0] == "-":
if next_array_element[1] == next_array_element[0]:
file_array[r][c] = "#"
else:
board_file.close()
raise InvalidBoardException("Invalid inner walls")
elif next_array_element[0] == " ":
if next_array_element[1] == next_array_element[0]:
file_array[r][c] = " "
else:
board_file.close()
raise InvalidBoardException("Invalid inner walls")
elif next_array_element[0] == self.start_char:
file_array[r][c] = self.start_char
elif next_array_element[0] == self.end_char:
file_array[r][c] = self.end_char
self.board = file_array
board_file.close()
def save_to_file(self, file_name):
"""
:param file_name: The file where the board will be written onto
:return: None, but the resulting text board will be written in the file given
"""
new_file = open(file_name, "w")
for r in range(len(self.board)):
current_line = ""
for c in range(len(self.board[0])):
# Corners
if r == 0 and c == 0:
current_line += "/-"
elif r == 0 and c == len(self.board[0]) - 1:
current_line += "\\"
elif r == len(self.board) - 1 and c == 0:
current_line += "\\-"
elif r == len(self.board) - 1 and c == len(self.board[0]) - 1:
current_line += "/"
# Regular elements
elif self.board[r][c] == "#":
if r % 2 == 0:
current_line += "--"
else:
if c == len(self.board[0]) - 1:
current_line += "|"
else:
current_line += "| "
elif self.board[r][c] == " ":
current_line += " "
elif self.board[r][c] == "?":
if c == len(self.board[0]) - 1:
current_line += "+"
elif self.board[r][c + 1] == " ":
current_line += "+ "
elif self.board[r][c + 1] == "#":
current_line += "+-"
elif self.board[r][c] == self.start_char:
current_line += (self.start_char + " ")
elif self.board[r][c] == self.end_char:
current_line += (self.end_char + " ")
new_file.write(current_line + "\n")
new_file.close()
def clear(self):
self.board = Board.Builder.empty(self.player).board
return self
def append_row(self, cols):
row = []
for c in range(cols):
row.append(" ")
self.board.append(row)
return self
def set(self, x, y, what):
self.board[y][x] = what
return self
def width(self):
return len(self.board[0])
def height(self):
return len(self.board)
@staticmethod
def build_empty_board(rows, cols):
"""
:param rows: The # of rows (int) for the array
:param cols: The # of columns (int) for the array
:return: A new empty array with the given rows and columns
"""
new_board = []
for r in range(rows):
row = []
for c in range(cols):
row.append(" ")
new_board.append(row)
return new_board
def fill_borders(self):
""" Fills outer walls with #?#?#? pattern and fills corners with ?"""
for r in range(len(self.board)):
# Fills outer columns with ?#?#?# pattern
if r % 2 == 0:
self.board[r][0] = "?"
self.board[r][len(self.board[0]) - 1] = "?"
else:
self.board[r][0] = "#"
self.board[r][len(self.board[0]) - 1] = "#"
for c in range(len(self.board[0])):
# Fills outers rows with ?#?#?# pattern
if c % 2 == 0:
self.board[0][c] = "?"
self.board[len(self.board) - 1][c] = "?"
else:
self.board[0][c] = "#"
self.board[len(self.board) - 1][c] = "#"
for r in range(len(self.board)):
for c in range(len(self.board[0])):
if r % 2 == 0 and c % 2 == 0:
self.board[r][c] = "?"
def validate(self):
"""
:return: None if no exceptions are raised, exceptions make sure the board fit all needed criteria
"""
if self.width() < self.min_array_size or self.height() < self.min_array_size:
# Board too small
raise InvalidBoardException("Board too small")
for r in range(len(self.board)):
# Checking if outer wall columns follow ?#?#?# pattern
if r % 2 == 0:
if not (self.board[r][0] == "?" and self.board[r][len(self.board[0]) - 1] == "?"):
raise InvalidBoardException("Invalid outer columns")
else:
if not (self.board[r][0] == "#" and self.board[r][len(self.board[0]) - 1] == "#"):
raise InvalidBoardException("Invalid outer columns")
for c in range(len(self.board[0])):
# Checking if outer wall rows follow ?#?#?# pattern
if c % 2 == 0:
if not (self.board[0][c] == "?" and self.board[len(self.board) - 1][c] == "?"):
raise InvalidBoardException("Invalid outer rows")
else:
if not (self.board[0][c] == "#" and self.board[len(self.board) - 1][c] == "#"):
raise InvalidBoardException("Invalid outer rows")
for r in range(len(self.board)):
for c in range(len(self.board[0])):
tile = self.board[r][c]
if tile == "#" and (r + c) % 2 == 0:
# Wall is not placed on edge
raise InvalidBoardException("Invalid wall placement")
if tile == "?" and not (r % 2 == 0 or c % 2 == 0):
# Corner is not placed on corner
raise InvalidBoardException("Invalid corner placement")
def build(self):
"""
:return: A new Board object using the map created by the Builder
"""
self.validate()
return Board(magic_create_key, self.board, self.player)
def __init__(self, magic, board, player):
"""
:param magic: A key that prevents a Board object to be created without the Builder
:param board: The 2D board array to be built and edited
"""
if magic != magic_create_key:
raise Exception("Can't create directly")
self.board = board
self.player = player
if self.player == 1:
self.start_char = "A"
self.end_char = "B"
else:
self.start_char = "a"
self.end_char = "b"
def set(self, x, y, what):
"""
:param x: The x index of the array (different from cols)
:param y: The y index of the array (different from rows)
:param what: The string value to be written
"""
self.board[y][x] = what
def get(self, x, y):
return self.board[y][x]
def get_start_pos(self):
for r in range(len(self.board)):
for c in range(len(self.board[0])):
if self.board[r][c] == self.start_char:
return {'x': c, 'y': r}
def get_end_pos(self):
for r in range(len(self.board)):
for c in range(len(self.board[0])):
if self.board[r][c] == self.end_char:
return {'x': c, 'y': r}
def width(self):
return len(self.board[0])
def height(self):
return len(self.board)
def print(self):
""" Prints the board, row by row
:return: The array output of the print, to test the value of in board_test
"""
output = []
for r in range(len(self.board)):
print(self.board[r])
output.append(self.board[r])
return output
def get_num_walls(self, i=None):
if i is None:
i = self.board
if self.player == 1:
wall = "-"
else:
wall = "|"
count = 0
for r in range(len(i)):
for c in range(len(i[0])):
if i[r][c] == wall:
count += 1
return count
def get_changes(self, old_board):
old_walls = self.get_num_walls(old_board)
new_walls = self.get_num_walls()
num_changes = (new_walls-old_walls)
for r in range(len(self.board)):
for c in range(len(self.board[0])):
if self.board[r][c] != old_board[r][c]:
num_changes += 1
return int(num_changes/2)
class InvalidBoardException(Exception):
def __init__(self, why):
self.why = why
|
magic_create_key = 'TheQuickBrownFox'
class Board:
class Builder:
def __init__(self, board, player):
if len(board) == 0:
raise invalid_board_exception('Board is empty')
self.board = board
self.player = player
self.min_array_size = 5
if self.player == 1:
self.start_char = 'A'
self.end_char = 'B'
else:
self.start_char = 'a'
self.end_char = 'b'
@staticmethod
def empty(player):
return Board.Builder([[]], player)
def load_from_file(self, file_name):
"""
:param file_name: The file where the board will be derived from
:return: None, but the resulting array board will be stored in self.board
"""
board_file = open(file_name, 'r')
rows = 0
cols = 0
for line in board_file:
if rows == 0:
cols = len(line)
rows += 1
current_row = 0
for line in board_file:
if len(line) != cols and current_row != rows:
board_file.close()
raise invalid_board_exception('Inconsistent line lengths')
current_row += 1
board_file.seek(0)
cols = int(cols / 2)
if rows >= self.min_array_size and cols >= self.min_array_size:
file_array = self.build_empty_board(rows, cols)
else:
board_file.close()
raise invalid_board_exception('Board too small')
previous_element = ''
for r in range(len(file_array)):
for c in range(len(file_array[0])):
if not (r == 0 and c == 0):
previous_element = next_array_element
next_array_element = board_file.read(2)
if not (r == 0 and c == 0):
if c % 2 == 1:
if previous_element[1] != next_array_element[1]:
board_file.close()
raise invalid_board_exception('Invalid inner walls')
if next_array_element[0] == '+':
file_array[r][c] = '?'
elif next_array_element[0] == '/' or next_array_element[0] == '\\':
file_array[r][c] = '?'
elif next_array_element[0] == '|':
file_array[r][c] = '#'
elif next_array_element[0] == '-':
if next_array_element[1] == next_array_element[0]:
file_array[r][c] = '#'
else:
board_file.close()
raise invalid_board_exception('Invalid inner walls')
elif next_array_element[0] == ' ':
if next_array_element[1] == next_array_element[0]:
file_array[r][c] = ' '
else:
board_file.close()
raise invalid_board_exception('Invalid inner walls')
elif next_array_element[0] == self.start_char:
file_array[r][c] = self.start_char
elif next_array_element[0] == self.end_char:
file_array[r][c] = self.end_char
self.board = file_array
board_file.close()
def save_to_file(self, file_name):
"""
:param file_name: The file where the board will be written onto
:return: None, but the resulting text board will be written in the file given
"""
new_file = open(file_name, 'w')
for r in range(len(self.board)):
current_line = ''
for c in range(len(self.board[0])):
if r == 0 and c == 0:
current_line += '/-'
elif r == 0 and c == len(self.board[0]) - 1:
current_line += '\\'
elif r == len(self.board) - 1 and c == 0:
current_line += '\\-'
elif r == len(self.board) - 1 and c == len(self.board[0]) - 1:
current_line += '/'
elif self.board[r][c] == '#':
if r % 2 == 0:
current_line += '--'
elif c == len(self.board[0]) - 1:
current_line += '|'
else:
current_line += '| '
elif self.board[r][c] == ' ':
current_line += ' '
elif self.board[r][c] == '?':
if c == len(self.board[0]) - 1:
current_line += '+'
elif self.board[r][c + 1] == ' ':
current_line += '+ '
elif self.board[r][c + 1] == '#':
current_line += '+-'
elif self.board[r][c] == self.start_char:
current_line += self.start_char + ' '
elif self.board[r][c] == self.end_char:
current_line += self.end_char + ' '
new_file.write(current_line + '\n')
new_file.close()
def clear(self):
self.board = Board.Builder.empty(self.player).board
return self
def append_row(self, cols):
row = []
for c in range(cols):
row.append(' ')
self.board.append(row)
return self
def set(self, x, y, what):
self.board[y][x] = what
return self
def width(self):
return len(self.board[0])
def height(self):
return len(self.board)
@staticmethod
def build_empty_board(rows, cols):
"""
:param rows: The # of rows (int) for the array
:param cols: The # of columns (int) for the array
:return: A new empty array with the given rows and columns
"""
new_board = []
for r in range(rows):
row = []
for c in range(cols):
row.append(' ')
new_board.append(row)
return new_board
def fill_borders(self):
""" Fills outer walls with #?#?#? pattern and fills corners with ?"""
for r in range(len(self.board)):
if r % 2 == 0:
self.board[r][0] = '?'
self.board[r][len(self.board[0]) - 1] = '?'
else:
self.board[r][0] = '#'
self.board[r][len(self.board[0]) - 1] = '#'
for c in range(len(self.board[0])):
if c % 2 == 0:
self.board[0][c] = '?'
self.board[len(self.board) - 1][c] = '?'
else:
self.board[0][c] = '#'
self.board[len(self.board) - 1][c] = '#'
for r in range(len(self.board)):
for c in range(len(self.board[0])):
if r % 2 == 0 and c % 2 == 0:
self.board[r][c] = '?'
def validate(self):
"""
:return: None if no exceptions are raised, exceptions make sure the board fit all needed criteria
"""
if self.width() < self.min_array_size or self.height() < self.min_array_size:
raise invalid_board_exception('Board too small')
for r in range(len(self.board)):
if r % 2 == 0:
if not (self.board[r][0] == '?' and self.board[r][len(self.board[0]) - 1] == '?'):
raise invalid_board_exception('Invalid outer columns')
elif not (self.board[r][0] == '#' and self.board[r][len(self.board[0]) - 1] == '#'):
raise invalid_board_exception('Invalid outer columns')
for c in range(len(self.board[0])):
if c % 2 == 0:
if not (self.board[0][c] == '?' and self.board[len(self.board) - 1][c] == '?'):
raise invalid_board_exception('Invalid outer rows')
elif not (self.board[0][c] == '#' and self.board[len(self.board) - 1][c] == '#'):
raise invalid_board_exception('Invalid outer rows')
for r in range(len(self.board)):
for c in range(len(self.board[0])):
tile = self.board[r][c]
if tile == '#' and (r + c) % 2 == 0:
raise invalid_board_exception('Invalid wall placement')
if tile == '?' and (not (r % 2 == 0 or c % 2 == 0)):
raise invalid_board_exception('Invalid corner placement')
def build(self):
"""
:return: A new Board object using the map created by the Builder
"""
self.validate()
return board(magic_create_key, self.board, self.player)
def __init__(self, magic, board, player):
"""
:param magic: A key that prevents a Board object to be created without the Builder
:param board: The 2D board array to be built and edited
"""
if magic != magic_create_key:
raise exception("Can't create directly")
self.board = board
self.player = player
if self.player == 1:
self.start_char = 'A'
self.end_char = 'B'
else:
self.start_char = 'a'
self.end_char = 'b'
def set(self, x, y, what):
"""
:param x: The x index of the array (different from cols)
:param y: The y index of the array (different from rows)
:param what: The string value to be written
"""
self.board[y][x] = what
def get(self, x, y):
return self.board[y][x]
def get_start_pos(self):
for r in range(len(self.board)):
for c in range(len(self.board[0])):
if self.board[r][c] == self.start_char:
return {'x': c, 'y': r}
def get_end_pos(self):
for r in range(len(self.board)):
for c in range(len(self.board[0])):
if self.board[r][c] == self.end_char:
return {'x': c, 'y': r}
def width(self):
return len(self.board[0])
def height(self):
return len(self.board)
def print(self):
""" Prints the board, row by row
:return: The array output of the print, to test the value of in board_test
"""
output = []
for r in range(len(self.board)):
print(self.board[r])
output.append(self.board[r])
return output
def get_num_walls(self, i=None):
if i is None:
i = self.board
if self.player == 1:
wall = '-'
else:
wall = '|'
count = 0
for r in range(len(i)):
for c in range(len(i[0])):
if i[r][c] == wall:
count += 1
return count
def get_changes(self, old_board):
old_walls = self.get_num_walls(old_board)
new_walls = self.get_num_walls()
num_changes = new_walls - old_walls
for r in range(len(self.board)):
for c in range(len(self.board[0])):
if self.board[r][c] != old_board[r][c]:
num_changes += 1
return int(num_changes / 2)
class Invalidboardexception(Exception):
def __init__(self, why):
self.why = why
|
"""
Author: CaptCorpMURICA
Project: 100DaysPython
File: module1_day13_continueBreak.py
Creation Date: 6/2/2019, 8:55 AM
Description: Learn about continue/break operations in python.
"""
# Print only consonants from a given text.
motivation = "Over? Did you say 'over'? Nothing is over until we decide it is! Was it over when the Germans bombed " \
"Pearl Harbor? Hell no! And it ain't over now. 'Cause when the goin' gets tough...the tough get goin'! " \
"Who's with me? Let's go!"
output = ""
for letter in motivation:
if letter.lower() in 'bcdfghjklmnpqrstvwxyz':
output += letter
print(output)
# However, this example can also be completed by using a continue action. If the condition is met, then the continue
# advances the program to the next stage.
motivation = "Over? Did you say 'over'? Nothing is over until we decide it is! Was it over when the Germans bombed " \
"Pearl Harbor? Hell no! And it ain't over now. 'Cause when the goin' gets tough...the tough get goin'! " \
"Who's with me? Let's go!"
output = ""
for letter in motivation:
if letter.lower() not in 'bcdfghjklmnpqrstvwxyz':
continue
else:
output += letter
print(output)
# Conversely, the break action halts the program when the condition is met. For instance, what if we wanted to display
# all of the letters until the first instance of a non-letter? A `break` can be used to end the loop once the condition
# is met. _Type and execute:_
motivation = "Over? Did you say 'over'? Nothing is over until we decide it is! Was it over when the Germans bombed " \
"Pearl Harbor? Hell no! And it ain't over now. 'Cause when the goin' gets tough...the tough get goin'! " \
"Who's with me? Let's go!"
output = ""
for letter in motivation:
if letter.lower() not in 'abcdefghijklmnopqrstuvwxyz':
output += letter
else:
break
print(output)
|
"""
Author: CaptCorpMURICA
Project: 100DaysPython
File: module1_day13_continueBreak.py
Creation Date: 6/2/2019, 8:55 AM
Description: Learn about continue/break operations in python.
"""
motivation = "Over? Did you say 'over'? Nothing is over until we decide it is! Was it over when the Germans bombed Pearl Harbor? Hell no! And it ain't over now. 'Cause when the goin' gets tough...the tough get goin'! Who's with me? Let's go!"
output = ''
for letter in motivation:
if letter.lower() in 'bcdfghjklmnpqrstvwxyz':
output += letter
print(output)
motivation = "Over? Did you say 'over'? Nothing is over until we decide it is! Was it over when the Germans bombed Pearl Harbor? Hell no! And it ain't over now. 'Cause when the goin' gets tough...the tough get goin'! Who's with me? Let's go!"
output = ''
for letter in motivation:
if letter.lower() not in 'bcdfghjklmnpqrstvwxyz':
continue
else:
output += letter
print(output)
motivation = "Over? Did you say 'over'? Nothing is over until we decide it is! Was it over when the Germans bombed Pearl Harbor? Hell no! And it ain't over now. 'Cause when the goin' gets tough...the tough get goin'! Who's with me? Let's go!"
output = ''
for letter in motivation:
if letter.lower() not in 'abcdefghijklmnopqrstuvwxyz':
output += letter
else:
break
print(output)
|
def find_unique_and_common(line_1, line_2):
print("\n".join(map(str, set(line_1) & set(line_2))))
line_1_count, line_2_count = map(int, input().split())
line_1 = [int(input()) for _ in range(line_1_count)]
line_2 = [int(input()) for _ in range(line_2_count)]
find_unique_and_common(line_1, line_2)
|
def find_unique_and_common(line_1, line_2):
print('\n'.join(map(str, set(line_1) & set(line_2))))
(line_1_count, line_2_count) = map(int, input().split())
line_1 = [int(input()) for _ in range(line_1_count)]
line_2 = [int(input()) for _ in range(line_2_count)]
find_unique_and_common(line_1, line_2)
|
protos = {
0:"HOPOPT",
1:"ICMP",
2:"IGMP",
3:"GGP",
4:"IPv4",
5:"ST",
6:"TCP",
7:"CBT",
8:"EGP",
9:"IGP",
10:"BBN-RCC-MON",
11:"NVP-II",
12:"PUP",
13:"ARGUS",
14:"EMCON",
15:"XNET",
16:"CHAOS",
17:"UDP",
18:"MUX",
19:"DCN-MEAS",
20:"HMP",
21:"PRM",
22:"XNS-IDP",
23:"TRUNK-1",
24:"TRUNK-2",
25:"LEAF-1",
26:"LEAF-2",
27:"RDP",
28:"IRTP",
29:"ISO-TP4",
30:"NETBLT",
31:"MFE-NSP",
32:"MERIT-INP",
33:"DCCP",
34:"3PC",
35:"IDPR",
36:"XTP",
37:"DDP",
38:"IDPR-CMTP",
39:"TP++",
40:"IL",
41:"IPv6",
42:"SDRP",
43:"IPv6-Route",
44:"IPv6-Frag",
45:"IDRP",
46:"RSVP",
47:"GRE",
48:"DSR",
49:"BNA",
50:"ESP",
51:"AH",
52:"I-NLSP",
53:"SWIPE",
54:"NARP",
55:"MOBILE",
56:"TLSP",
57:"SKIP",
58:"IPv6-ICMP",
59:"IPv6-NoNxt",
60:"IPv6-Opts",
61:"Host-interal",
62:"CFTP",
63:"Local Network",
64:"SAT-EXPAK",
65:"KRYPTOLAN",
66:"RVD",
67:"IPPC",
68:"Dist-FS",
69:"SAT-MON",
70:"VISA",
71:"IPCV",
72:"CPNX",
73:"CPHB",
74:"WSN",
75:"PVP",
76:"BR-SAT-MON",
77:"SUN-ND",
78:"WB-MON",
79:"WB-EXPAK",
80:"ISO-IP",
81:"VMTP",
82:"SECURE-VMTP",
83:"VINES",
84:"TTP",
84:"IPTM",
85:"NSFNET-IGP",
86:"DGP",
87:"TCF",
88:"EIGRP",
89:"OSPFIGP",
90:"Sprite-RPC",
91:"LARP",
92:"MTP",
93:"AX.25",
94:"IPIP",
95:"MICP",
96:"SCC-SP",
97:"ETHERIP",
98:"ENCAP",
99:"Encryption",
100:"GMTP",
101:"IFMP",
102:"PNNI",
103:"PIM",
104:"ARIS",
105:"SCPS",
106:"QNX",
107:"A/N",
108:"IPComp",
109:"SNP",
110:"Compaq-Peer",
111:"IPX-in-IP",
112:"VRRP",
113:"PGM",
114:"0-hop",
115:"L2TP",
116:"DDX",
117:"IATP",
118:"STP",
119:"SRP",
120:"UTI",
121:"SMP",
122:"SM",
123:"PTP",
124:"ISIS over IPv4",
125:"FIRE",
126:"CRTP",
127:"CRUDP",
128:"SSCOPMCE",
129:"IPLT",
130:"SPS",
131:"PIPE",
132:"SCTP",
133:"FC",
134:"RSVP-E2E-IGNORE",
135:"Mobility Header",
136:"UDPLite",
137:"MPLS-in-IP",
138:"manet",
139:"HIP",
140:"Shim6",
141:"WESP",
142:"ROHC",
143:"Unassigned",
144:"Unassigned",
145:"Unassigned",
146:"Unassigned",
147:"Unassigned",
148:"Unassigned",
149:"Unassigned",
150:"Unassigned",
151:"Unassigned",
152:"Unassigned",
153:"Unassigned",
154:"Unassigned",
155:"Unassigned",
156:"Unassigned",
157:"Unassigned",
158:"Unassigned",
159:"Unassigned",
160:"Unassigned",
161:"Unassigned",
162:"Unassigned",
163:"Unassigned",
164:"Unassigned",
165:"Unassigned",
166:"Unassigned",
167:"Unassigned",
168:"Unassigned",
169:"Unassigned",
170:"Unassigned",
171:"Unassigned",
172:"Unassigned",
173:"Unassigned",
174:"Unassigned",
175:"Unassigned",
176:"Unassigned",
177:"Unassigned",
178:"Unassigned",
179:"Unassigned",
180:"Unassigned",
181:"Unassigned",
182:"Unassigned",
183:"Unassigned",
184:"Unassigned",
185:"Unassigned",
186:"Unassigned",
187:"Unassigned",
188:"Unassigned",
189:"Unassigned",
190:"Unassigned",
191:"Unassigned",
192:"Unassigned",
193:"Unassigned",
194:"Unassigned",
195:"Unassigned",
196:"Unassigned",
197:"Unassigned",
198:"Unassigned",
199:"Unassigned",
200:"Unassigned",
201:"Unassigned",
202:"Unassigned",
203:"Unassigned",
204:"Unassigned",
205:"Unassigned",
206:"Unassigned",
207:"Unassigned",
208:"Unassigned",
209:"Unassigned",
210:"Unassigned",
211:"Unassigned",
212:"Unassigned",
213:"Unassigned",
214:"Unassigned",
215:"Unassigned",
216:"Unassigned",
217:"Unassigned",
218:"Unassigned",
219:"Unassigned",
220:"Unassigned",
221:"Unassigned",
222:"Unassigned",
223:"Unassigned",
224:"Unassigned",
225:"Unassigned",
226:"Unassigned",
227:"Unassigned",
228:"Unassigned",
229:"Unassigned",
230:"Unassigned",
231:"Unassigned",
232:"Unassigned",
233:"Unassigned",
234:"Unassigned",
235:"Unassigned",
236:"Unassigned",
237:"Unassigned",
238:"Unassigned",
239:"Unassigned",
240:"Unassigned",
241:"Unassigned",
242:"Unassigned",
243:"Unassigned",
244:"Unassigned",
245:"Unassigned",
246:"Unassigned",
247:"Unassigned",
248:"Unassigned",
249:"Unassigned",
250:"Unassigned",
251:"Unassigned",
252:"Unassigned",
253:"Experimental",
254:"Experimental",
255:"Reserved",
}
|
protos = {0: 'HOPOPT', 1: 'ICMP', 2: 'IGMP', 3: 'GGP', 4: 'IPv4', 5: 'ST', 6: 'TCP', 7: 'CBT', 8: 'EGP', 9: 'IGP', 10: 'BBN-RCC-MON', 11: 'NVP-II', 12: 'PUP', 13: 'ARGUS', 14: 'EMCON', 15: 'XNET', 16: 'CHAOS', 17: 'UDP', 18: 'MUX', 19: 'DCN-MEAS', 20: 'HMP', 21: 'PRM', 22: 'XNS-IDP', 23: 'TRUNK-1', 24: 'TRUNK-2', 25: 'LEAF-1', 26: 'LEAF-2', 27: 'RDP', 28: 'IRTP', 29: 'ISO-TP4', 30: 'NETBLT', 31: 'MFE-NSP', 32: 'MERIT-INP', 33: 'DCCP', 34: '3PC', 35: 'IDPR', 36: 'XTP', 37: 'DDP', 38: 'IDPR-CMTP', 39: 'TP++', 40: 'IL', 41: 'IPv6', 42: 'SDRP', 43: 'IPv6-Route', 44: 'IPv6-Frag', 45: 'IDRP', 46: 'RSVP', 47: 'GRE', 48: 'DSR', 49: 'BNA', 50: 'ESP', 51: 'AH', 52: 'I-NLSP', 53: 'SWIPE', 54: 'NARP', 55: 'MOBILE', 56: 'TLSP', 57: 'SKIP', 58: 'IPv6-ICMP', 59: 'IPv6-NoNxt', 60: 'IPv6-Opts', 61: 'Host-interal', 62: 'CFTP', 63: 'Local Network', 64: 'SAT-EXPAK', 65: 'KRYPTOLAN', 66: 'RVD', 67: 'IPPC', 68: 'Dist-FS', 69: 'SAT-MON', 70: 'VISA', 71: 'IPCV', 72: 'CPNX', 73: 'CPHB', 74: 'WSN', 75: 'PVP', 76: 'BR-SAT-MON', 77: 'SUN-ND', 78: 'WB-MON', 79: 'WB-EXPAK', 80: 'ISO-IP', 81: 'VMTP', 82: 'SECURE-VMTP', 83: 'VINES', 84: 'TTP', 84: 'IPTM', 85: 'NSFNET-IGP', 86: 'DGP', 87: 'TCF', 88: 'EIGRP', 89: 'OSPFIGP', 90: 'Sprite-RPC', 91: 'LARP', 92: 'MTP', 93: 'AX.25', 94: 'IPIP', 95: 'MICP', 96: 'SCC-SP', 97: 'ETHERIP', 98: 'ENCAP', 99: 'Encryption', 100: 'GMTP', 101: 'IFMP', 102: 'PNNI', 103: 'PIM', 104: 'ARIS', 105: 'SCPS', 106: 'QNX', 107: 'A/N', 108: 'IPComp', 109: 'SNP', 110: 'Compaq-Peer', 111: 'IPX-in-IP', 112: 'VRRP', 113: 'PGM', 114: '0-hop', 115: 'L2TP', 116: 'DDX', 117: 'IATP', 118: 'STP', 119: 'SRP', 120: 'UTI', 121: 'SMP', 122: 'SM', 123: 'PTP', 124: 'ISIS over IPv4', 125: 'FIRE', 126: 'CRTP', 127: 'CRUDP', 128: 'SSCOPMCE', 129: 'IPLT', 130: 'SPS', 131: 'PIPE', 132: 'SCTP', 133: 'FC', 134: 'RSVP-E2E-IGNORE', 135: 'Mobility Header', 136: 'UDPLite', 137: 'MPLS-in-IP', 138: 'manet', 139: 'HIP', 140: 'Shim6', 141: 'WESP', 142: 'ROHC', 143: 'Unassigned', 144: 'Unassigned', 145: 'Unassigned', 146: 'Unassigned', 147: 'Unassigned', 148: 'Unassigned', 149: 'Unassigned', 150: 'Unassigned', 151: 'Unassigned', 152: 'Unassigned', 153: 'Unassigned', 154: 'Unassigned', 155: 'Unassigned', 156: 'Unassigned', 157: 'Unassigned', 158: 'Unassigned', 159: 'Unassigned', 160: 'Unassigned', 161: 'Unassigned', 162: 'Unassigned', 163: 'Unassigned', 164: 'Unassigned', 165: 'Unassigned', 166: 'Unassigned', 167: 'Unassigned', 168: 'Unassigned', 169: 'Unassigned', 170: 'Unassigned', 171: 'Unassigned', 172: 'Unassigned', 173: 'Unassigned', 174: 'Unassigned', 175: 'Unassigned', 176: 'Unassigned', 177: 'Unassigned', 178: 'Unassigned', 179: 'Unassigned', 180: 'Unassigned', 181: 'Unassigned', 182: 'Unassigned', 183: 'Unassigned', 184: 'Unassigned', 185: 'Unassigned', 186: 'Unassigned', 187: 'Unassigned', 188: 'Unassigned', 189: 'Unassigned', 190: 'Unassigned', 191: 'Unassigned', 192: 'Unassigned', 193: 'Unassigned', 194: 'Unassigned', 195: 'Unassigned', 196: 'Unassigned', 197: 'Unassigned', 198: 'Unassigned', 199: 'Unassigned', 200: 'Unassigned', 201: 'Unassigned', 202: 'Unassigned', 203: 'Unassigned', 204: 'Unassigned', 205: 'Unassigned', 206: 'Unassigned', 207: 'Unassigned', 208: 'Unassigned', 209: 'Unassigned', 210: 'Unassigned', 211: 'Unassigned', 212: 'Unassigned', 213: 'Unassigned', 214: 'Unassigned', 215: 'Unassigned', 216: 'Unassigned', 217: 'Unassigned', 218: 'Unassigned', 219: 'Unassigned', 220: 'Unassigned', 221: 'Unassigned', 222: 'Unassigned', 223: 'Unassigned', 224: 'Unassigned', 225: 'Unassigned', 226: 'Unassigned', 227: 'Unassigned', 228: 'Unassigned', 229: 'Unassigned', 230: 'Unassigned', 231: 'Unassigned', 232: 'Unassigned', 233: 'Unassigned', 234: 'Unassigned', 235: 'Unassigned', 236: 'Unassigned', 237: 'Unassigned', 238: 'Unassigned', 239: 'Unassigned', 240: 'Unassigned', 241: 'Unassigned', 242: 'Unassigned', 243: 'Unassigned', 244: 'Unassigned', 245: 'Unassigned', 246: 'Unassigned', 247: 'Unassigned', 248: 'Unassigned', 249: 'Unassigned', 250: 'Unassigned', 251: 'Unassigned', 252: 'Unassigned', 253: 'Experimental', 254: 'Experimental', 255: 'Reserved'}
|
print("-"*30)
nome = input("Nome do Jogador: ").strip()
gols = input("NUmero de gols: ").strip()
def ficha(nome,gols):
if gols.isnumeric():
if nome == '':
return f'O jogador <desconhecido> fez {gols} gols(s) no campeaonato'
else:
return f'O jogador {nome} fez {gols} gol(s) no campeonato'
else:
if nome == '':
return f'O jogador <desconhecido> fez 0 gol(s) no campeaonato'
else:
return f'O jogador {nome} fez 0 gol(s) no campeonato'
print(ficha(nome,gols))
|
print('-' * 30)
nome = input('Nome do Jogador: ').strip()
gols = input('NUmero de gols: ').strip()
def ficha(nome, gols):
if gols.isnumeric():
if nome == '':
return f'O jogador <desconhecido> fez {gols} gols(s) no campeaonato'
else:
return f'O jogador {nome} fez {gols} gol(s) no campeonato'
elif nome == '':
return f'O jogador <desconhecido> fez 0 gol(s) no campeaonato'
else:
return f'O jogador {nome} fez 0 gol(s) no campeonato'
print(ficha(nome, gols))
|
def change(fname, round):
with open ("renamed_{}".format(fname), "w+") as new:
with open(fname, "r") as old:
for file in old:
id = old.split("_")[0]
|
def change(fname, round):
with open('renamed_{}'.format(fname), 'w+') as new:
with open(fname, 'r') as old:
for file in old:
id = old.split('_')[0]
|
#Nilo soluction
arquivo = open('mobydick.txt', 'r')
texto = arquivo.readlines()[:]
tam = len(texto)
dicionario = dict()
lista = list()
clinha = 1
coluna = 1
for linha in texto:
linha = linha.strip().lower()
palavras = linha.split()
for p in palavras:
if p == '':
coluna += 1
if p in dicionario:
dicionario[p].append((clinha, coluna))
else:
dicionario[p] = [clinha, coluna]
coluna += len(p)+1
clinha += 1
coluna = 1
for k, v in dicionario.items():
print(f'{k} = {v}')
arquivo.close()
|
arquivo = open('mobydick.txt', 'r')
texto = arquivo.readlines()[:]
tam = len(texto)
dicionario = dict()
lista = list()
clinha = 1
coluna = 1
for linha in texto:
linha = linha.strip().lower()
palavras = linha.split()
for p in palavras:
if p == '':
coluna += 1
if p in dicionario:
dicionario[p].append((clinha, coluna))
else:
dicionario[p] = [clinha, coluna]
coluna += len(p) + 1
clinha += 1
coluna = 1
for (k, v) in dicionario.items():
print(f'{k} = {v}')
arquivo.close()
|
#Write a program that accepts as input a sequence of integers (one by
#one) and then incrementally builds, and displays, a Binary Search Tree
#(BST). There is no need to balance the BST.
class Node:
def __init__(self, number = None):
self.number = number
self.left = None
self.right = None
def new_node(self, number):
if(self.number is None):
self.number = number
else:
if(number > self.number):
if(self.right is None):
self.right = Node(number) #Creates the right side as a new node if doesn't already exist
else:
self.right.new_node(number)
elif(number < self.number):
if(self.left is None):
self.left = Node(number) #Creates the left side as a new node if doesn't already exist
else:
self.left.new_node(number)
class Tree:
def __init__(self):
self.root = None
def print_tree(self, currentNode):
if(currentNode is not None):
if(currentNode.left is not None):
self.print_tree(currentNode.left)
print(currentNode.number)
if(currentNode.right is not None):
self.print_tree(currentNode.right)
else:
print("An error has occured")
def new_node(self, number):
#This is needed to use the node's functions without making it a subclass
if(self.root is None):
self.root = Node(number) #Creates new node for root
else:
self.root.new_node(number)
seq = [10, 5, 1, 7, 40, 50]
bst = Tree()
for i in seq:
bst.new_node(i) #Builds binary search tree
bst.print_tree(bst.root)
|
class Node:
def __init__(self, number=None):
self.number = number
self.left = None
self.right = None
def new_node(self, number):
if self.number is None:
self.number = number
elif number > self.number:
if self.right is None:
self.right = node(number)
else:
self.right.new_node(number)
elif number < self.number:
if self.left is None:
self.left = node(number)
else:
self.left.new_node(number)
class Tree:
def __init__(self):
self.root = None
def print_tree(self, currentNode):
if currentNode is not None:
if currentNode.left is not None:
self.print_tree(currentNode.left)
print(currentNode.number)
if currentNode.right is not None:
self.print_tree(currentNode.right)
else:
print('An error has occured')
def new_node(self, number):
if self.root is None:
self.root = node(number)
else:
self.root.new_node(number)
seq = [10, 5, 1, 7, 40, 50]
bst = tree()
for i in seq:
bst.new_node(i)
bst.print_tree(bst.root)
|
def catAndMouse(x, y, z):
if abs(x - z) == abs(y - z):
return "Mouse C"
if abs(x - z) > abs(y - z):
return "Cat B"
return "Cat A"
|
def cat_and_mouse(x, y, z):
if abs(x - z) == abs(y - z):
return 'Mouse C'
if abs(x - z) > abs(y - z):
return 'Cat B'
return 'Cat A'
|
def unboundedKnapsack(maxWeight, numberItems, value, weight):
totValue = [0]*(maxWeight+1)
for i in range(maxWeight + 1):
for j in range(numberItems):
if (weight[j] <= i):
totValue[i] = max(
totValue[i], totValue[i - weight[j]] + value[j])
# print(i,totValue[i])
return totValue[maxWeight]
maxWeight = 10
value = [9, 14, 16, 30]
weight = [2, 3, 4, 6]
numberItems = len(value)
print(unboundedKnapsack(maxWeight, numberItems, value, weight))
|
def unbounded_knapsack(maxWeight, numberItems, value, weight):
tot_value = [0] * (maxWeight + 1)
for i in range(maxWeight + 1):
for j in range(numberItems):
if weight[j] <= i:
totValue[i] = max(totValue[i], totValue[i - weight[j]] + value[j])
return totValue[maxWeight]
max_weight = 10
value = [9, 14, 16, 30]
weight = [2, 3, 4, 6]
number_items = len(value)
print(unbounded_knapsack(maxWeight, numberItems, value, weight))
|
class OtypeFeature(object):
def __init__(self, api, metaData, data):
self.api = api
self.meta = metaData
self.data = data[0]
self.maxSlot = data[1]
self.maxNode = data[2]
self.slotType = data[3]
self.all = None
def items(self):
slotType = self.slotType
maxSlot = self.maxSlot
data = self.data
for n in range(1, maxSlot + 1):
yield (n, slotType)
maxNode = self.maxNode
shift = maxSlot + 1
for n in range(maxSlot + 1, maxNode + 1):
yield (n, data[n - shift])
def v(self, n):
if n == 0:
return None
if n < self.maxSlot + 1:
return self.slotType
m = n - self.maxSlot
if m <= len(self.data):
return self.data[m - 1]
return None
def s(self, val):
# NB: the support attribute has been added by precomputing __levels__
if val in self.support:
(b, e) = self.support[val]
return range(b, e + 1)
else:
return ()
def sInterval(self, val):
# NB: the support attribute has been added by precomputing __levels__
if val in self.support:
return self.support[val]
else:
return ()
|
class Otypefeature(object):
def __init__(self, api, metaData, data):
self.api = api
self.meta = metaData
self.data = data[0]
self.maxSlot = data[1]
self.maxNode = data[2]
self.slotType = data[3]
self.all = None
def items(self):
slot_type = self.slotType
max_slot = self.maxSlot
data = self.data
for n in range(1, maxSlot + 1):
yield (n, slotType)
max_node = self.maxNode
shift = maxSlot + 1
for n in range(maxSlot + 1, maxNode + 1):
yield (n, data[n - shift])
def v(self, n):
if n == 0:
return None
if n < self.maxSlot + 1:
return self.slotType
m = n - self.maxSlot
if m <= len(self.data):
return self.data[m - 1]
return None
def s(self, val):
if val in self.support:
(b, e) = self.support[val]
return range(b, e + 1)
else:
return ()
def s_interval(self, val):
if val in self.support:
return self.support[val]
else:
return ()
|
"""
2520 is the smallest number that can be divided by each of
the numbers from 1 to 10 without any remainder.
What is the smallest positive number that is evenly divisible
by all of the numbers from 1 to 20?
"""
def Euler005(n):
"""Solution of fifth Euler problem."""
found = True
number = 0
while found:
i = 1
number += n
while number % i == 0 and i <= n:
if i == n:
found = False
i += 1
return number
|
"""
2520 is the smallest number that can be divided by each of
the numbers from 1 to 10 without any remainder.
What is the smallest positive number that is evenly divisible
by all of the numbers from 1 to 20?
"""
def euler005(n):
"""Solution of fifth Euler problem."""
found = True
number = 0
while found:
i = 1
number += n
while number % i == 0 and i <= n:
if i == n:
found = False
i += 1
return number
|
class NoDict(dict):
def __getitem__(self, item):
return None
class ParamDefault:
"""
This is the base class for Parameter Defaults.
Credit to khazhyk (github) for this idea.
"""
async def default(self, ctx):
raise NotImplementedError("Must be subclassed.")
class EmptyFlags(ParamDefault):
async def default(self, ctx):
return NoDict()
|
class Nodict(dict):
def __getitem__(self, item):
return None
class Paramdefault:
"""
This is the base class for Parameter Defaults.
Credit to khazhyk (github) for this idea.
"""
async def default(self, ctx):
raise not_implemented_error('Must be subclassed.')
class Emptyflags(ParamDefault):
async def default(self, ctx):
return no_dict()
|
l1 = [1] # 0 [<bool|int>]
l2 = [''] # 0 [<bool|str>]
l3 = l1 or l2
l3.append(True)
l3 # 0 [<bool|int|str>]
|
l1 = [1]
l2 = ['']
l3 = l1 or l2
l3.append(True)
l3
|
class ModelAccessException(Exception):
"""Raise when user has no access to the model"""
class ModelNotExistException(Exception):
"""Raise when model is None"""
class AuthenticationFailedException(Exception):
"""Raise when authentication failed."""
|
class Modelaccessexception(Exception):
"""Raise when user has no access to the model"""
class Modelnotexistexception(Exception):
"""Raise when model is None"""
class Authenticationfailedexception(Exception):
"""Raise when authentication failed."""
|
#
# PySNMP MIB module S412-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///home/tin/Dev/mibs.snmplabs.com/asn1/S412-MIB
# Produced by pysmi-0.3.4 at Fri Jan 31 21:33:01 2020
# On host bier platform Linux version 5.4.0-3-amd64 by user tin
# Using Python version 3.7.6 (default, Jan 19 2020, 22:34:52)
#
ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueRangeConstraint, ConstraintsUnion, ValueSizeConstraint, ConstraintsIntersection, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ConstraintsUnion", "ValueSizeConstraint", "ConstraintsIntersection", "SingleValueConstraint")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
Gauge32, NotificationType, iso, Unsigned32, TimeTicks, mgmt, internet, IpAddress, Counter32, MibIdentifier, Counter64, enterprises, ModuleIdentity, NotificationType, MibScalar, MibTable, MibTableRow, MibTableColumn, private, Bits, ObjectIdentity, Integer32 = mibBuilder.importSymbols("SNMPv2-SMI", "Gauge32", "NotificationType", "iso", "Unsigned32", "TimeTicks", "mgmt", "internet", "IpAddress", "Counter32", "MibIdentifier", "Counter64", "enterprises", "ModuleIdentity", "NotificationType", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "private", "Bits", "ObjectIdentity", "Integer32")
DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention")
asentria = MibIdentifier((1, 3, 6, 1, 4, 1, 3052))
s412 = MibIdentifier((1, 3, 6, 1, 4, 1, 3052, 41))
device = MibIdentifier((1, 3, 6, 1, 4, 1, 3052, 41, 1))
contacts = MibIdentifier((1, 3, 6, 1, 4, 1, 3052, 41, 2))
relays = MibIdentifier((1, 3, 6, 1, 4, 1, 3052, 41, 3))
tempsensor = MibIdentifier((1, 3, 6, 1, 4, 1, 3052, 41, 4))
humiditysensor = MibIdentifier((1, 3, 6, 1, 4, 1, 3052, 41, 5))
passthrough = MibIdentifier((1, 3, 6, 1, 4, 1, 3052, 41, 6))
ftp = MibIdentifier((1, 3, 6, 1, 4, 1, 3052, 41, 7))
analog = MibIdentifier((1, 3, 6, 1, 4, 1, 3052, 41, 8))
eventSensorStatus = MibIdentifier((1, 3, 6, 1, 4, 1, 3052, 41, 10))
eventSensorConfig = MibIdentifier((1, 3, 6, 1, 4, 1, 3052, 41, 11))
techsupport = MibIdentifier((1, 3, 6, 1, 4, 1, 3052, 41, 99))
mibend = MibIdentifier((1, 3, 6, 1, 4, 1, 3052, 41, 100))
contact1 = MibIdentifier((1, 3, 6, 1, 4, 1, 3052, 41, 2, 1))
contact2 = MibIdentifier((1, 3, 6, 1, 4, 1, 3052, 41, 2, 2))
contact3 = MibIdentifier((1, 3, 6, 1, 4, 1, 3052, 41, 2, 3))
contact4 = MibIdentifier((1, 3, 6, 1, 4, 1, 3052, 41, 2, 4))
contact5 = MibIdentifier((1, 3, 6, 1, 4, 1, 3052, 41, 2, 5))
contact6 = MibIdentifier((1, 3, 6, 1, 4, 1, 3052, 41, 2, 6))
relay1 = MibIdentifier((1, 3, 6, 1, 4, 1, 3052, 41, 3, 1))
relay2 = MibIdentifier((1, 3, 6, 1, 4, 1, 3052, 41, 3, 2))
analog1 = MibIdentifier((1, 3, 6, 1, 4, 1, 3052, 41, 8, 1))
analog2 = MibIdentifier((1, 3, 6, 1, 4, 1, 3052, 41, 8, 2))
serialNumber = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 1, 1), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: serialNumber.setStatus('mandatory')
firmwareVersion = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 1, 2), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: firmwareVersion.setStatus('mandatory')
siteID = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 1, 3), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: siteID.setStatus('mandatory')
snmpManager = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 1, 4), IpAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: snmpManager.setStatus('deprecated')
forceTraps = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 1, 6), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: forceTraps.setStatus('mandatory')
thisTrapText = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 1, 7), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: thisTrapText.setStatus('mandatory')
alarmStatus = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 1, 8), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: alarmStatus.setStatus('mandatory')
snmpManager1 = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 1, 9), IpAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: snmpManager1.setStatus('mandatory')
snmpManager2 = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 1, 10), IpAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: snmpManager2.setStatus('mandatory')
snmpManager3 = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 1, 11), IpAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: snmpManager3.setStatus('mandatory')
snmpManager4 = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 1, 12), IpAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: snmpManager4.setStatus('mandatory')
statusRepeatHours = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 1, 13), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: statusRepeatHours.setStatus('mandatory')
serialTimeout = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 1, 14), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: serialTimeout.setStatus('mandatory')
powerupTrapsend = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 1, 15), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: powerupTrapsend.setStatus('mandatory')
netlossTrapsend = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 1, 16), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: netlossTrapsend.setStatus('mandatory')
buildID = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 1, 17), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: buildID.setStatus('mandatory')
contact1Name = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 1, 1), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: contact1Name.setStatus('mandatory')
contact1State = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: contact1State.setStatus('mandatory')
contact1AlarmEnable = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 1, 3), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: contact1AlarmEnable.setStatus('mandatory')
contact1ActiveDirection = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 1, 4), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: contact1ActiveDirection.setStatus('mandatory')
contact1Threshold = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 1, 5), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: contact1Threshold.setStatus('mandatory')
contact1ReturnNormalTrap = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 1, 6), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: contact1ReturnNormalTrap.setStatus('mandatory')
contact1TrapRepeat = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 1, 7), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: contact1TrapRepeat.setStatus('mandatory')
contact1Severity = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 1, 8), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: contact1Severity.setStatus('mandatory')
contact2Name = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 2, 1), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: contact2Name.setStatus('mandatory')
contact2State = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 2, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: contact2State.setStatus('mandatory')
contact2AlarmEnable = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 2, 3), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: contact2AlarmEnable.setStatus('mandatory')
contact2ActiveDirection = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 2, 4), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: contact2ActiveDirection.setStatus('mandatory')
contact2Threshold = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 2, 5), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: contact2Threshold.setStatus('mandatory')
contact2ReturnNormalTrap = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 2, 6), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: contact2ReturnNormalTrap.setStatus('mandatory')
contact2TrapRepeat = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 2, 7), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: contact2TrapRepeat.setStatus('mandatory')
contact2Severity = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 2, 8), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: contact2Severity.setStatus('mandatory')
contact3Name = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 3, 1), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: contact3Name.setStatus('mandatory')
contact3State = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 3, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: contact3State.setStatus('mandatory')
contact3AlarmEnable = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 3, 3), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: contact3AlarmEnable.setStatus('mandatory')
contact3ActiveDirection = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 3, 4), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: contact3ActiveDirection.setStatus('mandatory')
contact3Threshold = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 3, 5), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: contact3Threshold.setStatus('mandatory')
contact3ReturnNormalTrap = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 3, 6), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: contact3ReturnNormalTrap.setStatus('mandatory')
contact3TrapRepeat = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 3, 7), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: contact3TrapRepeat.setStatus('mandatory')
contact3Severity = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 3, 8), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: contact3Severity.setStatus('mandatory')
contact4Name = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 4, 1), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: contact4Name.setStatus('mandatory')
contact4State = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 4, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: contact4State.setStatus('mandatory')
contact4AlarmEnable = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 4, 3), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: contact4AlarmEnable.setStatus('mandatory')
contact4ActiveDirection = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 4, 4), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: contact4ActiveDirection.setStatus('mandatory')
contact4Threshold = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 4, 5), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: contact4Threshold.setStatus('mandatory')
contact4ReturnNormalTrap = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 4, 6), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: contact4ReturnNormalTrap.setStatus('mandatory')
contact4TrapRepeat = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 4, 7), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: contact4TrapRepeat.setStatus('mandatory')
contact4Severity = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 4, 8), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: contact4Severity.setStatus('mandatory')
contact5Name = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 5, 1), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: contact5Name.setStatus('mandatory')
contact5State = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 5, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: contact5State.setStatus('mandatory')
contact5AlarmEnable = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 5, 3), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: contact5AlarmEnable.setStatus('mandatory')
contact5ActiveDirection = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 5, 4), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: contact5ActiveDirection.setStatus('mandatory')
contact5Threshold = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 5, 5), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: contact5Threshold.setStatus('mandatory')
contact5ReturnNormalTrap = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 5, 6), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: contact5ReturnNormalTrap.setStatus('mandatory')
contact5TrapRepeat = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 5, 7), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: contact5TrapRepeat.setStatus('mandatory')
contact5Severity = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 5, 8), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: contact5Severity.setStatus('mandatory')
contact6Name = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 6, 1), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: contact6Name.setStatus('mandatory')
contact6State = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 6, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: contact6State.setStatus('mandatory')
contact6AlarmEnable = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 6, 3), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: contact6AlarmEnable.setStatus('mandatory')
contact6ActiveDirection = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 6, 4), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: contact6ActiveDirection.setStatus('mandatory')
contact6Threshold = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 6, 5), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: contact6Threshold.setStatus('mandatory')
contact6ReturnNormalTrap = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 6, 6), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: contact6ReturnNormalTrap.setStatus('mandatory')
contact6TrapRepeat = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 6, 7), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: contact6TrapRepeat.setStatus('mandatory')
contact6Severity = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 6, 8), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: contact6Severity.setStatus('mandatory')
relay1Name = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 3, 1, 1), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: relay1Name.setStatus('mandatory')
relay1CurrentState = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 3, 1, 2), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: relay1CurrentState.setStatus('mandatory')
relay1PowerupState = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 3, 1, 3), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: relay1PowerupState.setStatus('mandatory')
relay2Name = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 3, 2, 1), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: relay2Name.setStatus('mandatory')
relay2CurrentState = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 3, 2, 2), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: relay2CurrentState.setStatus('mandatory')
relay2PowerupState = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 3, 2, 3), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: relay2PowerupState.setStatus('mandatory')
tempValue = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 4, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: tempValue.setStatus('mandatory')
tempAlarmEnable = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 4, 2), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: tempAlarmEnable.setStatus('mandatory')
tempHighLevel = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 4, 3), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: tempHighLevel.setStatus('mandatory')
tempVeryHighLevel = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 4, 4), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: tempVeryHighLevel.setStatus('mandatory')
tempLowLevel = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 4, 5), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: tempLowLevel.setStatus('mandatory')
tempVeryLowLevel = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 4, 6), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: tempVeryLowLevel.setStatus('mandatory')
tempAlarmThreshold = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 4, 7), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: tempAlarmThreshold.setStatus('mandatory')
tempReturnNormalTrap = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 4, 8), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: tempReturnNormalTrap.setStatus('mandatory')
tempTrapRepeat = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 4, 9), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: tempTrapRepeat.setStatus('mandatory')
tempMode = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 4, 10), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: tempMode.setStatus('mandatory')
tempHighSeverity = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 4, 11), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: tempHighSeverity.setStatus('mandatory')
tempVeryHighSeverity = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 4, 12), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: tempVeryHighSeverity.setStatus('mandatory')
tempLowSeverity = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 4, 13), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: tempLowSeverity.setStatus('mandatory')
tempVeryLowSeverity = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 4, 14), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: tempVeryLowSeverity.setStatus('mandatory')
tempName = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 4, 15), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: tempName.setStatus('mandatory')
humidityValue = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 5, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: humidityValue.setStatus('mandatory')
humidityAlarmEnable = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 5, 2), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: humidityAlarmEnable.setStatus('mandatory')
humidityHighLevel = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 5, 3), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: humidityHighLevel.setStatus('mandatory')
humidityVeryHighLevel = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 5, 4), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: humidityVeryHighLevel.setStatus('mandatory')
humidityLowLevel = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 5, 5), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: humidityLowLevel.setStatus('mandatory')
humidityVeryLowLevel = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 5, 6), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: humidityVeryLowLevel.setStatus('mandatory')
humidityAlarmThreshold = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 5, 7), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: humidityAlarmThreshold.setStatus('mandatory')
humidityReturnNormalTrap = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 5, 8), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: humidityReturnNormalTrap.setStatus('mandatory')
humidityTrapRepeat = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 5, 9), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: humidityTrapRepeat.setStatus('mandatory')
humidityHighSeverity = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 5, 10), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: humidityHighSeverity.setStatus('mandatory')
humidityVeryHighSeverity = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 5, 11), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: humidityVeryHighSeverity.setStatus('mandatory')
humidityLowSeverity = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 5, 12), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: humidityLowSeverity.setStatus('mandatory')
humidityVeryLowSeverity = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 5, 13), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: humidityVeryLowSeverity.setStatus('mandatory')
humidityName = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 5, 14), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: humidityName.setStatus('mandatory')
ptNeedPassword = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 6, 1), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ptNeedPassword.setStatus('mandatory')
ptSayLoginText = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 6, 2), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ptSayLoginText.setStatus('mandatory')
ptLoginText = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 6, 3), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ptLoginText.setStatus('mandatory')
ptSaySiteID = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 6, 4), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ptSaySiteID.setStatus('mandatory')
ptUsername = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 6, 5), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ptUsername.setStatus('mandatory')
ptPassword = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 6, 6), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ptPassword.setStatus('mandatory')
ptTimeout = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 6, 7), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ptTimeout.setStatus('mandatory')
ptEscChar = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 6, 8), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ptEscChar.setStatus('mandatory')
ptLfstripToPort = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 6, 9), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ptLfstripToPort.setStatus('mandatory')
ptLfstripFromPort = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 6, 10), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ptLfstripFromPort.setStatus('mandatory')
ptSerialBaudrate = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 6, 11), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ptSerialBaudrate.setStatus('mandatory')
ptSerialWordlength = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 6, 12), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ptSerialWordlength.setStatus('mandatory')
ptSerialParity = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 6, 13), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ptSerialParity.setStatus('mandatory')
ptTCPPortnumber = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 6, 14), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ptTCPPortnumber.setStatus('mandatory')
ftpUsername = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 7, 1), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ftpUsername.setStatus('mandatory')
ftpPassword = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 7, 2), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ftpPassword.setStatus('mandatory')
analog1Value = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: analog1Value.setStatus('mandatory')
analog1AlarmEnable = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 1, 2), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: analog1AlarmEnable.setStatus('mandatory')
analog1HighLevel = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 1, 3), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: analog1HighLevel.setStatus('mandatory')
analog1VeryHighLevel = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 1, 4), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: analog1VeryHighLevel.setStatus('mandatory')
analog1LowLevel = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 1, 5), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: analog1LowLevel.setStatus('mandatory')
analog1VeryLowLevel = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 1, 6), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: analog1VeryLowLevel.setStatus('mandatory')
analog1AlarmThreshold = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 1, 7), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: analog1AlarmThreshold.setStatus('mandatory')
analog1ReturnNormalTrap = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 1, 8), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: analog1ReturnNormalTrap.setStatus('mandatory')
analog1TrapRepeat = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 1, 9), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: analog1TrapRepeat.setStatus('mandatory')
analog1HighSeverity = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 1, 10), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: analog1HighSeverity.setStatus('mandatory')
analog1VeryHighSeverity = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 1, 11), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: analog1VeryHighSeverity.setStatus('mandatory')
analog1LowSeverity = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 1, 12), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: analog1LowSeverity.setStatus('mandatory')
analog1VeryLowSeverity = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 1, 13), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: analog1VeryLowSeverity.setStatus('mandatory')
analog1Name = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 1, 14), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: analog1Name.setStatus('mandatory')
analog2Value = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 2, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: analog2Value.setStatus('mandatory')
analog2AlarmEnable = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 2, 2), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: analog2AlarmEnable.setStatus('mandatory')
analog2HighLevel = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 2, 3), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: analog2HighLevel.setStatus('mandatory')
analog2VeryHighLevel = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 2, 4), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: analog2VeryHighLevel.setStatus('mandatory')
analog2LowLevel = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 2, 5), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: analog2LowLevel.setStatus('mandatory')
analog2VeryLowLevel = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 2, 6), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: analog2VeryLowLevel.setStatus('mandatory')
analog2AlarmThreshold = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 2, 7), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: analog2AlarmThreshold.setStatus('mandatory')
analog2ReturnNormalTrap = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 2, 8), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: analog2ReturnNormalTrap.setStatus('mandatory')
analog2TrapRepeat = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 2, 9), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: analog2TrapRepeat.setStatus('mandatory')
analog2HighSeverity = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 2, 10), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: analog2HighSeverity.setStatus('mandatory')
analog2VeryHighSeverity = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 2, 11), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: analog2VeryHighSeverity.setStatus('mandatory')
analog2LowSeverity = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 2, 12), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: analog2LowSeverity.setStatus('mandatory')
analog2VeryLowSeverity = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 2, 13), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: analog2VeryLowSeverity.setStatus('mandatory')
analog2Name = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 2, 14), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: analog2Name.setStatus('mandatory')
esPointTable = MibTable((1, 3, 6, 1, 4, 1, 3052, 41, 10, 1), )
if mibBuilder.loadTexts: esPointTable.setStatus('mandatory')
esPointEntry = MibTableRow((1, 3, 6, 1, 4, 1, 3052, 41, 10, 1, 1), ).setIndexNames((0, "S412-MIB", "esIndexES"), (0, "S412-MIB", "esIndexPC"), (0, "S412-MIB", "esIndexPoint"))
if mibBuilder.loadTexts: esPointEntry.setStatus('mandatory')
esIndexES = MibTableColumn((1, 3, 6, 1, 4, 1, 3052, 41, 10, 1, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: esIndexES.setStatus('mandatory')
esIndexPC = MibTableColumn((1, 3, 6, 1, 4, 1, 3052, 41, 10, 1, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: esIndexPC.setStatus('mandatory')
esIndexPoint = MibTableColumn((1, 3, 6, 1, 4, 1, 3052, 41, 10, 1, 1, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: esIndexPoint.setStatus('mandatory')
esPointName = MibTableColumn((1, 3, 6, 1, 4, 1, 3052, 41, 10, 1, 1, 4), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: esPointName.setStatus('mandatory')
esPointInEventState = MibTableColumn((1, 3, 6, 1, 4, 1, 3052, 41, 10, 1, 1, 5), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: esPointInEventState.setStatus('mandatory')
esPointValueInt = MibTableColumn((1, 3, 6, 1, 4, 1, 3052, 41, 10, 1, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-32768, 32767))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: esPointValueInt.setStatus('mandatory')
esPointValueStr = MibTableColumn((1, 3, 6, 1, 4, 1, 3052, 41, 10, 1, 1, 7), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: esPointValueStr.setStatus('mandatory')
esNumberEventSensors = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 11, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: esNumberEventSensors.setStatus('mandatory')
esTable = MibTable((1, 3, 6, 1, 4, 1, 3052, 41, 11, 2), )
if mibBuilder.loadTexts: esTable.setStatus('mandatory')
esEntry = MibTableRow((1, 3, 6, 1, 4, 1, 3052, 41, 11, 2, 1), ).setIndexNames((0, "S412-MIB", "esIndex"))
if mibBuilder.loadTexts: esEntry.setStatus('mandatory')
esIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 3052, 41, 11, 2, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: esIndex.setStatus('mandatory')
esID = MibTableColumn((1, 3, 6, 1, 4, 1, 3052, 41, 11, 2, 1, 2), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: esID.setStatus('mandatory')
esNumberTempSensors = MibTableColumn((1, 3, 6, 1, 4, 1, 3052, 41, 11, 2, 1, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: esNumberTempSensors.setStatus('mandatory')
esTempReportingMode = MibTableColumn((1, 3, 6, 1, 4, 1, 3052, 41, 11, 2, 1, 4), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: esTempReportingMode.setStatus('mandatory')
esNumberCCs = MibTableColumn((1, 3, 6, 1, 4, 1, 3052, 41, 11, 2, 1, 5), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: esNumberCCs.setStatus('mandatory')
esCCReportingMode = MibTableColumn((1, 3, 6, 1, 4, 1, 3052, 41, 11, 2, 1, 6), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: esCCReportingMode.setStatus('mandatory')
esNumberHumidSensors = MibTableColumn((1, 3, 6, 1, 4, 1, 3052, 41, 11, 2, 1, 7), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: esNumberHumidSensors.setStatus('mandatory')
esHumidReportingMode = MibTableColumn((1, 3, 6, 1, 4, 1, 3052, 41, 11, 2, 1, 8), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: esHumidReportingMode.setStatus('mandatory')
esNumberAnalog = MibTableColumn((1, 3, 6, 1, 4, 1, 3052, 41, 11, 2, 1, 13), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: esNumberAnalog.setStatus('mandatory')
esAnalogReportingMode = MibTableColumn((1, 3, 6, 1, 4, 1, 3052, 41, 11, 2, 1, 14), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: esAnalogReportingMode.setStatus('mandatory')
esNumberRelayOutputs = MibTableColumn((1, 3, 6, 1, 4, 1, 3052, 41, 11, 2, 1, 15), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: esNumberRelayOutputs.setStatus('mandatory')
esRelayReportingMode = MibTableColumn((1, 3, 6, 1, 4, 1, 3052, 41, 11, 2, 1, 16), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: esRelayReportingMode.setStatus('mandatory')
techsupportIPAddress = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 99, 1), IpAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: techsupportIPAddress.setStatus('mandatory')
techsupportNetMask = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 99, 2), IpAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: techsupportNetMask.setStatus('mandatory')
techsupportRouter = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 99, 3), IpAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: techsupportRouter.setStatus('mandatory')
techsupportRestart = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 99, 4), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: techsupportRestart.setStatus('mandatory')
techsupportVersionNumber = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 99, 5), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: techsupportVersionNumber.setStatus('mandatory')
mibendObject = MibScalar((1, 3, 6, 1, 4, 1, 3052, 41, 100, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mibendObject.setStatus('mandatory')
contact1ActiveTrap = NotificationType((1, 3, 6, 1, 4, 1, 3052, 41) + (0,20001)).setObjects(("S412-MIB", "thisTrapText"), ("S412-MIB", "siteID"), ("S412-MIB", "contact1Name"), ("S412-MIB", "contact1State"))
contact2ActiveTrap = NotificationType((1, 3, 6, 1, 4, 1, 3052, 41) + (0,20002)).setObjects(("S412-MIB", "thisTrapText"), ("S412-MIB", "siteID"), ("S412-MIB", "contact2Name"), ("S412-MIB", "contact2State"))
contact3ActiveTrap = NotificationType((1, 3, 6, 1, 4, 1, 3052, 41) + (0,20003)).setObjects(("S412-MIB", "thisTrapText"), ("S412-MIB", "siteID"), ("S412-MIB", "contact3Name"), ("S412-MIB", "contact3State"))
contact4ActiveTrap = NotificationType((1, 3, 6, 1, 4, 1, 3052, 41) + (0,20004)).setObjects(("S412-MIB", "thisTrapText"), ("S412-MIB", "siteID"), ("S412-MIB", "contact4Name"), ("S412-MIB", "contact4State"))
contact5ActiveTrap = NotificationType((1, 3, 6, 1, 4, 1, 3052, 41) + (0,20005)).setObjects(("S412-MIB", "thisTrapText"), ("S412-MIB", "siteID"), ("S412-MIB", "contact5Name"), ("S412-MIB", "contact5State"))
contact6ActiveTrap = NotificationType((1, 3, 6, 1, 4, 1, 3052, 41) + (0,20006)).setObjects(("S412-MIB", "thisTrapText"), ("S412-MIB", "siteID"), ("S412-MIB", "contact6Name"), ("S412-MIB", "contact6State"))
tempHighTrap = NotificationType((1, 3, 6, 1, 4, 1, 3052, 41) + (0,20010)).setObjects(("S412-MIB", "thisTrapText"), ("S412-MIB", "siteID"), ("S412-MIB", "tempValue"))
tempVeryHighTrap = NotificationType((1, 3, 6, 1, 4, 1, 3052, 41) + (0,20011)).setObjects(("S412-MIB", "thisTrapText"), ("S412-MIB", "siteID"), ("S412-MIB", "tempValue"))
tempLowTrap = NotificationType((1, 3, 6, 1, 4, 1, 3052, 41) + (0,20012)).setObjects(("S412-MIB", "thisTrapText"), ("S412-MIB", "siteID"), ("S412-MIB", "tempValue"))
tempVeryLowTrap = NotificationType((1, 3, 6, 1, 4, 1, 3052, 41) + (0,20013)).setObjects(("S412-MIB", "thisTrapText"), ("S412-MIB", "siteID"), ("S412-MIB", "tempValue"))
humidityHighTrap = NotificationType((1, 3, 6, 1, 4, 1, 3052, 41) + (0,20020)).setObjects(("S412-MIB", "thisTrapText"), ("S412-MIB", "siteID"), ("S412-MIB", "humidityValue"))
humidityVeryHighTrap = NotificationType((1, 3, 6, 1, 4, 1, 3052, 41) + (0,20021)).setObjects(("S412-MIB", "thisTrapText"), ("S412-MIB", "siteID"), ("S412-MIB", "humidityValue"))
humidityLowTrap = NotificationType((1, 3, 6, 1, 4, 1, 3052, 41) + (0,20022)).setObjects(("S412-MIB", "thisTrapText"), ("S412-MIB", "siteID"), ("S412-MIB", "humidityValue"))
humidityVeryLowTrap = NotificationType((1, 3, 6, 1, 4, 1, 3052, 41) + (0,20023)).setObjects(("S412-MIB", "thisTrapText"), ("S412-MIB", "siteID"), ("S412-MIB", "humidityValue"))
analog1HighTrap = NotificationType((1, 3, 6, 1, 4, 1, 3052, 41) + (0,20030)).setObjects(("S412-MIB", "thisTrapText"), ("S412-MIB", "siteID"), ("S412-MIB", "analog1Name"), ("S412-MIB", "analog1Value"))
analog1VeryHighTrap = NotificationType((1, 3, 6, 1, 4, 1, 3052, 41) + (0,20031)).setObjects(("S412-MIB", "thisTrapText"), ("S412-MIB", "siteID"), ("S412-MIB", "analog1Name"), ("S412-MIB", "analog1Value"))
analog1LowTrap = NotificationType((1, 3, 6, 1, 4, 1, 3052, 41) + (0,20032)).setObjects(("S412-MIB", "thisTrapText"), ("S412-MIB", "siteID"), ("S412-MIB", "analog1Name"), ("S412-MIB", "analog1Value"))
analog1VeryLowTrap = NotificationType((1, 3, 6, 1, 4, 1, 3052, 41) + (0,20033)).setObjects(("S412-MIB", "thisTrapText"), ("S412-MIB", "siteID"), ("S412-MIB", "analog1Name"), ("S412-MIB", "analog1Value"))
analog2HighTrap = NotificationType((1, 3, 6, 1, 4, 1, 3052, 41) + (0,20040)).setObjects(("S412-MIB", "thisTrapText"), ("S412-MIB", "siteID"), ("S412-MIB", "analog2Name"), ("S412-MIB", "analog2Value"))
analog2VeryHighTrap = NotificationType((1, 3, 6, 1, 4, 1, 3052, 41) + (0,20041)).setObjects(("S412-MIB", "thisTrapText"), ("S412-MIB", "siteID"), ("S412-MIB", "analog2Name"), ("S412-MIB", "analog2Value"))
analog2LowTrap = NotificationType((1, 3, 6, 1, 4, 1, 3052, 41) + (0,20042)).setObjects(("S412-MIB", "thisTrapText"), ("S412-MIB", "siteID"), ("S412-MIB", "analog2Name"), ("S412-MIB", "analog2Value"))
analog2VeryLowTrap = NotificationType((1, 3, 6, 1, 4, 1, 3052, 41) + (0,20043)).setObjects(("S412-MIB", "thisTrapText"), ("S412-MIB", "siteID"), ("S412-MIB", "analog2Name"), ("S412-MIB", "analog2Value"))
contactESActiveTrap = NotificationType((1, 3, 6, 1, 4, 1, 3052, 41) + (0,20101)).setObjects(("S412-MIB", "thisTrapText"), ("S412-MIB", "siteID"), ("S412-MIB", "esPointName"), ("S412-MIB", "esPointValueInt"), ("S412-MIB", "esIndexES"), ("S412-MIB", "esIndexPoint"))
tempESHighTrap = NotificationType((1, 3, 6, 1, 4, 1, 3052, 41) + (0,20110)).setObjects(("S412-MIB", "thisTrapText"), ("S412-MIB", "siteID"), ("S412-MIB", "esPointName"), ("S412-MIB", "esPointValueInt"), ("S412-MIB", "esIndexES"), ("S412-MIB", "esIndexPoint"))
tempESVeryHighTrap = NotificationType((1, 3, 6, 1, 4, 1, 3052, 41) + (0,20111)).setObjects(("S412-MIB", "thisTrapText"), ("S412-MIB", "siteID"), ("S412-MIB", "esPointName"), ("S412-MIB", "esPointValueInt"), ("S412-MIB", "esIndexES"), ("S412-MIB", "esIndexPoint"))
tempESLowTrap = NotificationType((1, 3, 6, 1, 4, 1, 3052, 41) + (0,20112)).setObjects(("S412-MIB", "thisTrapText"), ("S412-MIB", "siteID"), ("S412-MIB", "esPointName"), ("S412-MIB", "esPointValueInt"), ("S412-MIB", "esIndexES"), ("S412-MIB", "esIndexPoint"))
tempESVeryLowTrap = NotificationType((1, 3, 6, 1, 4, 1, 3052, 41) + (0,20113)).setObjects(("S412-MIB", "thisTrapText"), ("S412-MIB", "siteID"), ("S412-MIB", "esPointName"), ("S412-MIB", "esPointValueInt"), ("S412-MIB", "esIndexES"), ("S412-MIB", "esIndexPoint"))
humidityESHighTrap = NotificationType((1, 3, 6, 1, 4, 1, 3052, 41) + (0,20120)).setObjects(("S412-MIB", "thisTrapText"), ("S412-MIB", "siteID"), ("S412-MIB", "esPointName"), ("S412-MIB", "esPointValueInt"), ("S412-MIB", "esIndexES"), ("S412-MIB", "esIndexPoint"))
humidityESVeryHighTrap = NotificationType((1, 3, 6, 1, 4, 1, 3052, 41) + (0,20121)).setObjects(("S412-MIB", "thisTrapText"), ("S412-MIB", "siteID"), ("S412-MIB", "esPointName"), ("S412-MIB", "esPointValueInt"), ("S412-MIB", "esIndexES"), ("S412-MIB", "esIndexPoint"))
humidityESLowTrap = NotificationType((1, 3, 6, 1, 4, 1, 3052, 41) + (0,20122)).setObjects(("S412-MIB", "thisTrapText"), ("S412-MIB", "siteID"), ("S412-MIB", "esPointName"), ("S412-MIB", "esPointValueInt"), ("S412-MIB", "esIndexES"), ("S412-MIB", "esIndexPoint"))
humidityESVeryLowTrap = NotificationType((1, 3, 6, 1, 4, 1, 3052, 41) + (0,20123)).setObjects(("S412-MIB", "thisTrapText"), ("S412-MIB", "siteID"), ("S412-MIB", "esPointName"), ("S412-MIB", "esPointValueInt"), ("S412-MIB", "esIndexES"), ("S412-MIB", "esIndexPoint"))
voltageESHighTrap = NotificationType((1, 3, 6, 1, 4, 1, 3052, 41) + (0,20130)).setObjects(("S412-MIB", "thisTrapText"), ("S412-MIB", "siteID"), ("S412-MIB", "esPointName"), ("S412-MIB", "esPointValueInt"), ("S412-MIB", "esIndexES"), ("S412-MIB", "esIndexPoint"))
voltageESVeryHighTrap = NotificationType((1, 3, 6, 1, 4, 1, 3052, 41) + (0,20131)).setObjects(("S412-MIB", "thisTrapText"), ("S412-MIB", "siteID"), ("S412-MIB", "esPointName"), ("S412-MIB", "esPointValueInt"), ("S412-MIB", "esIndexES"), ("S412-MIB", "esIndexPoint"))
voltageESLowTrap = NotificationType((1, 3, 6, 1, 4, 1, 3052, 41) + (0,20132)).setObjects(("S412-MIB", "thisTrapText"), ("S412-MIB", "siteID"), ("S412-MIB", "esPointName"), ("S412-MIB", "esPointValueInt"), ("S412-MIB", "esIndexES"), ("S412-MIB", "esIndexPoint"))
voltageESVeryLowTrap = NotificationType((1, 3, 6, 1, 4, 1, 3052, 41) + (0,20133)).setObjects(("S412-MIB", "thisTrapText"), ("S412-MIB", "siteID"), ("S412-MIB", "esPointName"), ("S412-MIB", "esPointValueInt"), ("S412-MIB", "esIndexES"), ("S412-MIB", "esIndexPoint"))
contact1NormalTrap = NotificationType((1, 3, 6, 1, 4, 1, 3052, 41) + (0,21001)).setObjects(("S412-MIB", "thisTrapText"), ("S412-MIB", "siteID"), ("S412-MIB", "contact1Name"), ("S412-MIB", "contact1State"))
contact2NormalTrap = NotificationType((1, 3, 6, 1, 4, 1, 3052, 41) + (0,21002)).setObjects(("S412-MIB", "thisTrapText"), ("S412-MIB", "siteID"), ("S412-MIB", "contact2Name"), ("S412-MIB", "contact2State"))
contact3NormalTrap = NotificationType((1, 3, 6, 1, 4, 1, 3052, 41) + (0,21003)).setObjects(("S412-MIB", "thisTrapText"), ("S412-MIB", "siteID"), ("S412-MIB", "contact3Name"), ("S412-MIB", "contact3State"))
contact4NormalTrap = NotificationType((1, 3, 6, 1, 4, 1, 3052, 41) + (0,21004)).setObjects(("S412-MIB", "thisTrapText"), ("S412-MIB", "siteID"), ("S412-MIB", "contact4Name"), ("S412-MIB", "contact4State"))
contact5NormalTrap = NotificationType((1, 3, 6, 1, 4, 1, 3052, 41) + (0,21005)).setObjects(("S412-MIB", "thisTrapText"), ("S412-MIB", "siteID"), ("S412-MIB", "contact5Name"), ("S412-MIB", "contact5State"))
contact6NormalTrap = NotificationType((1, 3, 6, 1, 4, 1, 3052, 41) + (0,21006)).setObjects(("S412-MIB", "thisTrapText"), ("S412-MIB", "siteID"), ("S412-MIB", "contact6Name"), ("S412-MIB", "contact6State"))
tempNormalTrap = NotificationType((1, 3, 6, 1, 4, 1, 3052, 41) + (0,21010)).setObjects(("S412-MIB", "thisTrapText"), ("S412-MIB", "siteID"), ("S412-MIB", "tempValue"))
humidityNormalTrap = NotificationType((1, 3, 6, 1, 4, 1, 3052, 41) + (0,21020)).setObjects(("S412-MIB", "thisTrapText"), ("S412-MIB", "siteID"), ("S412-MIB", "humidityValue"))
analog1NormalTrap = NotificationType((1, 3, 6, 1, 4, 1, 3052, 41) + (0,21030)).setObjects(("S412-MIB", "thisTrapText"), ("S412-MIB", "siteID"), ("S412-MIB", "analog1Name"), ("S412-MIB", "analog1Value"))
analog2NormalTrap = NotificationType((1, 3, 6, 1, 4, 1, 3052, 41) + (0,21040)).setObjects(("S412-MIB", "thisTrapText"), ("S412-MIB", "siteID"), ("S412-MIB", "analog2Name"), ("S412-MIB", "analog2Value"))
contactESNormalTrap = NotificationType((1, 3, 6, 1, 4, 1, 3052, 41) + (0,21101)).setObjects(("S412-MIB", "thisTrapText"), ("S412-MIB", "siteID"), ("S412-MIB", "esPointName"), ("S412-MIB", "esPointValueInt"), ("S412-MIB", "esIndexES"), ("S412-MIB", "esIndexPoint"))
tempESNormalTrap = NotificationType((1, 3, 6, 1, 4, 1, 3052, 41) + (0,21110)).setObjects(("S412-MIB", "thisTrapText"), ("S412-MIB", "siteID"), ("S412-MIB", "esPointName"), ("S412-MIB", "esPointValueInt"), ("S412-MIB", "esIndexES"), ("S412-MIB", "esIndexPoint"))
humidityESNormalTrap = NotificationType((1, 3, 6, 1, 4, 1, 3052, 41) + (0,21120)).setObjects(("S412-MIB", "thisTrapText"), ("S412-MIB", "siteID"), ("S412-MIB", "esPointName"), ("S412-MIB", "esPointValueInt"), ("S412-MIB", "esIndexES"), ("S412-MIB", "esIndexPoint"))
voltageESNormalTrap = NotificationType((1, 3, 6, 1, 4, 1, 3052, 41) + (0,21130)).setObjects(("S412-MIB", "thisTrapText"), ("S412-MIB", "siteID"), ("S412-MIB", "esPointName"), ("S412-MIB", "esPointValueInt"), ("S412-MIB", "esIndexES"), ("S412-MIB", "esIndexPoint"))
testTrap = NotificationType((1, 3, 6, 1, 4, 1, 3052, 41) + (0,22000)).setObjects(("S412-MIB", "thisTrapText"), ("S412-MIB", "siteID"))
mibBuilder.exportSymbols("S412-MIB", analog2HighSeverity=analog2HighSeverity, contact6TrapRepeat=contact6TrapRepeat, tempValue=tempValue, ptUsername=ptUsername, contact1ActiveDirection=contact1ActiveDirection, ptEscChar=ptEscChar, relay1PowerupState=relay1PowerupState, contact3ActiveDirection=contact3ActiveDirection, esID=esID, contact4NormalTrap=contact4NormalTrap, contact3AlarmEnable=contact3AlarmEnable, contact4AlarmEnable=contact4AlarmEnable, contact1=contact1, contact4Severity=contact4Severity, relay2PowerupState=relay2PowerupState, tempReturnNormalTrap=tempReturnNormalTrap, analog1VeryHighLevel=analog1VeryHighLevel, analog1TrapRepeat=analog1TrapRepeat, analog1VeryLowLevel=analog1VeryLowLevel, contact4Name=contact4Name, contact3ActiveTrap=contact3ActiveTrap, contact4ActiveDirection=contact4ActiveDirection, ptTCPPortnumber=ptTCPPortnumber, humidityName=humidityName, ptSerialParity=ptSerialParity, ptLfstripToPort=ptLfstripToPort, contact3TrapRepeat=contact3TrapRepeat, humidityReturnNormalTrap=humidityReturnNormalTrap, voltageESVeryLowTrap=voltageESVeryLowTrap, statusRepeatHours=statusRepeatHours, analog2VeryLowLevel=analog2VeryLowLevel, analog1VeryLowTrap=analog1VeryLowTrap, humidityVeryHighSeverity=humidityVeryHighSeverity, tempESLowTrap=tempESLowTrap, contact5ActiveTrap=contact5ActiveTrap, esHumidReportingMode=esHumidReportingMode, humidityNormalTrap=humidityNormalTrap, contact5=contact5, contact1TrapRepeat=contact1TrapRepeat, tempTrapRepeat=tempTrapRepeat, firmwareVersion=firmwareVersion, analog1VeryHighSeverity=analog1VeryHighSeverity, contact3=contact3, tempAlarmEnable=tempAlarmEnable, tempLowSeverity=tempLowSeverity, humidityTrapRepeat=humidityTrapRepeat, contact2ActiveTrap=contact2ActiveTrap, contacts=contacts, forceTraps=forceTraps, analog1Value=analog1Value, tempESVeryLowTrap=tempESVeryLowTrap, contact1Severity=contact1Severity, analog1LowLevel=analog1LowLevel, esNumberHumidSensors=esNumberHumidSensors, tempLowTrap=tempLowTrap, analog1ReturnNormalTrap=analog1ReturnNormalTrap, analog2LowTrap=analog2LowTrap, contact1AlarmEnable=contact1AlarmEnable, contact3State=contact3State, humidityHighLevel=humidityHighLevel, tempVeryLowTrap=tempVeryLowTrap, esNumberEventSensors=esNumberEventSensors, tempHighLevel=tempHighLevel, esTempReportingMode=esTempReportingMode, analog1LowSeverity=analog1LowSeverity, contact2=contact2, esAnalogReportingMode=esAnalogReportingMode, relay2=relay2, relay2CurrentState=relay2CurrentState, relay1CurrentState=relay1CurrentState, ptSayLoginText=ptSayLoginText, voltageESNormalTrap=voltageESNormalTrap, contact5ActiveDirection=contact5ActiveDirection, analog2VeryHighLevel=analog2VeryHighLevel, netlossTrapsend=netlossTrapsend, analog2Name=analog2Name, humidityValue=humidityValue, contact3Severity=contact3Severity, esPointValueInt=esPointValueInt, techsupportIPAddress=techsupportIPAddress, humidityVeryLowSeverity=humidityVeryLowSeverity, humidityVeryHighTrap=humidityVeryHighTrap, contact2State=contact2State, contact4Threshold=contact4Threshold, contact5NormalTrap=contact5NormalTrap, mibend=mibend, ptNeedPassword=ptNeedPassword, contact6Name=contact6Name, s412=s412, analog2TrapRepeat=analog2TrapRepeat, esNumberTempSensors=esNumberTempSensors, ftp=ftp, siteID=siteID, voltageESVeryHighTrap=voltageESVeryHighTrap, humidityLowLevel=humidityLowLevel, contact4State=contact4State, humidityESVeryLowTrap=humidityESVeryLowTrap, esIndexPC=esIndexPC, serialTimeout=serialTimeout, tempESNormalTrap=tempESNormalTrap, tempVeryLowSeverity=tempVeryLowSeverity, ptSaySiteID=ptSaySiteID, contact3Name=contact3Name, tempESHighTrap=tempESHighTrap, tempMode=tempMode, analog1Name=analog1Name, analog1NormalTrap=analog1NormalTrap, analog=analog, techsupportRouter=techsupportRouter, snmpManager2=snmpManager2, contact5ReturnNormalTrap=contact5ReturnNormalTrap, contact1ReturnNormalTrap=contact1ReturnNormalTrap, snmpManager4=snmpManager4, tempVeryHighSeverity=tempVeryHighSeverity, contact4ActiveTrap=contact4ActiveTrap, humidityLowTrap=humidityLowTrap, eventSensorConfig=eventSensorConfig, esEntry=esEntry, serialNumber=serialNumber, humidityVeryHighLevel=humidityVeryHighLevel, relay1Name=relay1Name, relays=relays, eventSensorStatus=eventSensorStatus, analog2Value=analog2Value, analog1AlarmThreshold=analog1AlarmThreshold, tempHighSeverity=tempHighSeverity, contact1NormalTrap=contact1NormalTrap, esIndexPoint=esIndexPoint, contact5Threshold=contact5Threshold, analog1HighLevel=analog1HighLevel, analog1VeryLowSeverity=analog1VeryLowSeverity, analog1HighTrap=analog1HighTrap, contact4ReturnNormalTrap=contact4ReturnNormalTrap, humidityESNormalTrap=humidityESNormalTrap, voltageESLowTrap=voltageESLowTrap, esTable=esTable, contact1Name=contact1Name, esPointTable=esPointTable, techsupportRestart=techsupportRestart, humidityESVeryHighTrap=humidityESVeryHighTrap, contact2AlarmEnable=contact2AlarmEnable, humidityAlarmThreshold=humidityAlarmThreshold, ptPassword=ptPassword, ftpPassword=ftpPassword, contact5TrapRepeat=contact5TrapRepeat, ftpUsername=ftpUsername, analog2ReturnNormalTrap=analog2ReturnNormalTrap, analog2AlarmEnable=analog2AlarmEnable, techsupportNetMask=techsupportNetMask, contact3ReturnNormalTrap=contact3ReturnNormalTrap, humidityHighSeverity=humidityHighSeverity, tempVeryHighLevel=tempVeryHighLevel, contact2ActiveDirection=contact2ActiveDirection, tempVeryHighTrap=tempVeryHighTrap, esIndex=esIndex, analog1HighSeverity=analog1HighSeverity, analog2VeryLowTrap=analog2VeryLowTrap, humidityHighTrap=humidityHighTrap, contact2Severity=contact2Severity, tempLowLevel=tempLowLevel, analog2HighLevel=analog2HighLevel, humidityAlarmEnable=humidityAlarmEnable, esPointInEventState=esPointInEventState, analog1LowTrap=analog1LowTrap, humidityESHighTrap=humidityESHighTrap, testTrap=testTrap, contact5Severity=contact5Severity, contact2Name=contact2Name, alarmStatus=alarmStatus, humidityVeryLowLevel=humidityVeryLowLevel, humidityLowSeverity=humidityLowSeverity, analog2AlarmThreshold=analog2AlarmThreshold, snmpManager3=snmpManager3, esRelayReportingMode=esRelayReportingMode, snmpManager=snmpManager, contact5AlarmEnable=contact5AlarmEnable, humidityVeryLowTrap=humidityVeryLowTrap, contact5Name=contact5Name, contactESActiveTrap=contactESActiveTrap, tempESVeryHighTrap=tempESVeryHighTrap, contact6Threshold=contact6Threshold, humiditysensor=humiditysensor, contact2NormalTrap=contact2NormalTrap, analog1AlarmEnable=analog1AlarmEnable, esNumberAnalog=esNumberAnalog, thisTrapText=thisTrapText, contact6=contact6, esPointName=esPointName, tempNormalTrap=tempNormalTrap, ptLoginText=ptLoginText, analog2HighTrap=analog2HighTrap, ptSerialWordlength=ptSerialWordlength, contact6Severity=contact6Severity, contactESNormalTrap=contactESNormalTrap, contact3Threshold=contact3Threshold, powerupTrapsend=powerupTrapsend, contact6ActiveTrap=contact6ActiveTrap, contact1ActiveTrap=contact1ActiveTrap, contact3NormalTrap=contact3NormalTrap, esNumberCCs=esNumberCCs, contact4TrapRepeat=contact4TrapRepeat, analog2NormalTrap=analog2NormalTrap, humidityESLowTrap=humidityESLowTrap, tempVeryLowLevel=tempVeryLowLevel, contact5State=contact5State, passthrough=passthrough, ptSerialBaudrate=ptSerialBaudrate, contact6State=contact6State, analog1VeryHighTrap=analog1VeryHighTrap, tempAlarmThreshold=tempAlarmThreshold, tempHighTrap=tempHighTrap, analog2LowSeverity=analog2LowSeverity, relay2Name=relay2Name, device=device, analog1=analog1, contact6AlarmEnable=contact6AlarmEnable, contact6ActiveDirection=contact6ActiveDirection, relay1=relay1, ptLfstripFromPort=ptLfstripFromPort, contact6NormalTrap=contact6NormalTrap, contact4=contact4, contact2TrapRepeat=contact2TrapRepeat, contact1State=contact1State, voltageESHighTrap=voltageESHighTrap, buildID=buildID, contact6ReturnNormalTrap=contact6ReturnNormalTrap, analog2LowLevel=analog2LowLevel, snmpManager1=snmpManager1, contact1Threshold=contact1Threshold, techsupport=techsupport, tempName=tempName, esIndexES=esIndexES, analog2VeryLowSeverity=analog2VeryLowSeverity, mibendObject=mibendObject, analog2VeryHighTrap=analog2VeryHighTrap, ptTimeout=ptTimeout, esPointValueStr=esPointValueStr, contact2Threshold=contact2Threshold, esPointEntry=esPointEntry, techsupportVersionNumber=techsupportVersionNumber, analog2VeryHighSeverity=analog2VeryHighSeverity, esNumberRelayOutputs=esNumberRelayOutputs, contact2ReturnNormalTrap=contact2ReturnNormalTrap, esCCReportingMode=esCCReportingMode, asentria=asentria, tempsensor=tempsensor, analog2=analog2)
|
(object_identifier, octet_string, integer) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'OctetString', 'Integer')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_range_constraint, constraints_union, value_size_constraint, constraints_intersection, single_value_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'ConstraintsUnion', 'ValueSizeConstraint', 'ConstraintsIntersection', 'SingleValueConstraint')
(module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup')
(gauge32, notification_type, iso, unsigned32, time_ticks, mgmt, internet, ip_address, counter32, mib_identifier, counter64, enterprises, module_identity, notification_type, mib_scalar, mib_table, mib_table_row, mib_table_column, private, bits, object_identity, integer32) = mibBuilder.importSymbols('SNMPv2-SMI', 'Gauge32', 'NotificationType', 'iso', 'Unsigned32', 'TimeTicks', 'mgmt', 'internet', 'IpAddress', 'Counter32', 'MibIdentifier', 'Counter64', 'enterprises', 'ModuleIdentity', 'NotificationType', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'private', 'Bits', 'ObjectIdentity', 'Integer32')
(display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention')
asentria = mib_identifier((1, 3, 6, 1, 4, 1, 3052))
s412 = mib_identifier((1, 3, 6, 1, 4, 1, 3052, 41))
device = mib_identifier((1, 3, 6, 1, 4, 1, 3052, 41, 1))
contacts = mib_identifier((1, 3, 6, 1, 4, 1, 3052, 41, 2))
relays = mib_identifier((1, 3, 6, 1, 4, 1, 3052, 41, 3))
tempsensor = mib_identifier((1, 3, 6, 1, 4, 1, 3052, 41, 4))
humiditysensor = mib_identifier((1, 3, 6, 1, 4, 1, 3052, 41, 5))
passthrough = mib_identifier((1, 3, 6, 1, 4, 1, 3052, 41, 6))
ftp = mib_identifier((1, 3, 6, 1, 4, 1, 3052, 41, 7))
analog = mib_identifier((1, 3, 6, 1, 4, 1, 3052, 41, 8))
event_sensor_status = mib_identifier((1, 3, 6, 1, 4, 1, 3052, 41, 10))
event_sensor_config = mib_identifier((1, 3, 6, 1, 4, 1, 3052, 41, 11))
techsupport = mib_identifier((1, 3, 6, 1, 4, 1, 3052, 41, 99))
mibend = mib_identifier((1, 3, 6, 1, 4, 1, 3052, 41, 100))
contact1 = mib_identifier((1, 3, 6, 1, 4, 1, 3052, 41, 2, 1))
contact2 = mib_identifier((1, 3, 6, 1, 4, 1, 3052, 41, 2, 2))
contact3 = mib_identifier((1, 3, 6, 1, 4, 1, 3052, 41, 2, 3))
contact4 = mib_identifier((1, 3, 6, 1, 4, 1, 3052, 41, 2, 4))
contact5 = mib_identifier((1, 3, 6, 1, 4, 1, 3052, 41, 2, 5))
contact6 = mib_identifier((1, 3, 6, 1, 4, 1, 3052, 41, 2, 6))
relay1 = mib_identifier((1, 3, 6, 1, 4, 1, 3052, 41, 3, 1))
relay2 = mib_identifier((1, 3, 6, 1, 4, 1, 3052, 41, 3, 2))
analog1 = mib_identifier((1, 3, 6, 1, 4, 1, 3052, 41, 8, 1))
analog2 = mib_identifier((1, 3, 6, 1, 4, 1, 3052, 41, 8, 2))
serial_number = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 1, 1), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
serialNumber.setStatus('mandatory')
firmware_version = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 1, 2), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
firmwareVersion.setStatus('mandatory')
site_id = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 1, 3), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
siteID.setStatus('mandatory')
snmp_manager = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 1, 4), ip_address()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
snmpManager.setStatus('deprecated')
force_traps = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 1, 6), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
forceTraps.setStatus('mandatory')
this_trap_text = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 1, 7), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
thisTrapText.setStatus('mandatory')
alarm_status = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 1, 8), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alarmStatus.setStatus('mandatory')
snmp_manager1 = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 1, 9), ip_address()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
snmpManager1.setStatus('mandatory')
snmp_manager2 = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 1, 10), ip_address()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
snmpManager2.setStatus('mandatory')
snmp_manager3 = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 1, 11), ip_address()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
snmpManager3.setStatus('mandatory')
snmp_manager4 = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 1, 12), ip_address()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
snmpManager4.setStatus('mandatory')
status_repeat_hours = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 1, 13), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
statusRepeatHours.setStatus('mandatory')
serial_timeout = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 1, 14), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
serialTimeout.setStatus('mandatory')
powerup_trapsend = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 1, 15), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
powerupTrapsend.setStatus('mandatory')
netloss_trapsend = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 1, 16), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
netlossTrapsend.setStatus('mandatory')
build_id = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 1, 17), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
buildID.setStatus('mandatory')
contact1_name = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 1, 1), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
contact1Name.setStatus('mandatory')
contact1_state = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 1, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
contact1State.setStatus('mandatory')
contact1_alarm_enable = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 1, 3), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
contact1AlarmEnable.setStatus('mandatory')
contact1_active_direction = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 1, 4), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
contact1ActiveDirection.setStatus('mandatory')
contact1_threshold = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 1, 5), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
contact1Threshold.setStatus('mandatory')
contact1_return_normal_trap = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 1, 6), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
contact1ReturnNormalTrap.setStatus('mandatory')
contact1_trap_repeat = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 1, 7), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
contact1TrapRepeat.setStatus('mandatory')
contact1_severity = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 1, 8), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
contact1Severity.setStatus('mandatory')
contact2_name = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 2, 1), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
contact2Name.setStatus('mandatory')
contact2_state = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 2, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
contact2State.setStatus('mandatory')
contact2_alarm_enable = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 2, 3), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
contact2AlarmEnable.setStatus('mandatory')
contact2_active_direction = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 2, 4), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
contact2ActiveDirection.setStatus('mandatory')
contact2_threshold = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 2, 5), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
contact2Threshold.setStatus('mandatory')
contact2_return_normal_trap = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 2, 6), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
contact2ReturnNormalTrap.setStatus('mandatory')
contact2_trap_repeat = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 2, 7), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
contact2TrapRepeat.setStatus('mandatory')
contact2_severity = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 2, 8), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
contact2Severity.setStatus('mandatory')
contact3_name = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 3, 1), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
contact3Name.setStatus('mandatory')
contact3_state = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 3, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
contact3State.setStatus('mandatory')
contact3_alarm_enable = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 3, 3), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
contact3AlarmEnable.setStatus('mandatory')
contact3_active_direction = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 3, 4), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
contact3ActiveDirection.setStatus('mandatory')
contact3_threshold = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 3, 5), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
contact3Threshold.setStatus('mandatory')
contact3_return_normal_trap = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 3, 6), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
contact3ReturnNormalTrap.setStatus('mandatory')
contact3_trap_repeat = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 3, 7), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
contact3TrapRepeat.setStatus('mandatory')
contact3_severity = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 3, 8), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
contact3Severity.setStatus('mandatory')
contact4_name = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 4, 1), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
contact4Name.setStatus('mandatory')
contact4_state = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 4, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
contact4State.setStatus('mandatory')
contact4_alarm_enable = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 4, 3), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
contact4AlarmEnable.setStatus('mandatory')
contact4_active_direction = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 4, 4), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
contact4ActiveDirection.setStatus('mandatory')
contact4_threshold = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 4, 5), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
contact4Threshold.setStatus('mandatory')
contact4_return_normal_trap = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 4, 6), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
contact4ReturnNormalTrap.setStatus('mandatory')
contact4_trap_repeat = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 4, 7), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
contact4TrapRepeat.setStatus('mandatory')
contact4_severity = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 4, 8), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
contact4Severity.setStatus('mandatory')
contact5_name = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 5, 1), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
contact5Name.setStatus('mandatory')
contact5_state = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 5, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
contact5State.setStatus('mandatory')
contact5_alarm_enable = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 5, 3), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
contact5AlarmEnable.setStatus('mandatory')
contact5_active_direction = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 5, 4), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
contact5ActiveDirection.setStatus('mandatory')
contact5_threshold = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 5, 5), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
contact5Threshold.setStatus('mandatory')
contact5_return_normal_trap = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 5, 6), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
contact5ReturnNormalTrap.setStatus('mandatory')
contact5_trap_repeat = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 5, 7), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
contact5TrapRepeat.setStatus('mandatory')
contact5_severity = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 5, 8), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
contact5Severity.setStatus('mandatory')
contact6_name = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 6, 1), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
contact6Name.setStatus('mandatory')
contact6_state = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 6, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
contact6State.setStatus('mandatory')
contact6_alarm_enable = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 6, 3), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
contact6AlarmEnable.setStatus('mandatory')
contact6_active_direction = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 6, 4), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
contact6ActiveDirection.setStatus('mandatory')
contact6_threshold = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 6, 5), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
contact6Threshold.setStatus('mandatory')
contact6_return_normal_trap = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 6, 6), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
contact6ReturnNormalTrap.setStatus('mandatory')
contact6_trap_repeat = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 6, 7), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
contact6TrapRepeat.setStatus('mandatory')
contact6_severity = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 2, 6, 8), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
contact6Severity.setStatus('mandatory')
relay1_name = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 3, 1, 1), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
relay1Name.setStatus('mandatory')
relay1_current_state = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 3, 1, 2), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
relay1CurrentState.setStatus('mandatory')
relay1_powerup_state = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 3, 1, 3), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
relay1PowerupState.setStatus('mandatory')
relay2_name = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 3, 2, 1), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
relay2Name.setStatus('mandatory')
relay2_current_state = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 3, 2, 2), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
relay2CurrentState.setStatus('mandatory')
relay2_powerup_state = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 3, 2, 3), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
relay2PowerupState.setStatus('mandatory')
temp_value = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 4, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
tempValue.setStatus('mandatory')
temp_alarm_enable = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 4, 2), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
tempAlarmEnable.setStatus('mandatory')
temp_high_level = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 4, 3), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
tempHighLevel.setStatus('mandatory')
temp_very_high_level = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 4, 4), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
tempVeryHighLevel.setStatus('mandatory')
temp_low_level = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 4, 5), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
tempLowLevel.setStatus('mandatory')
temp_very_low_level = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 4, 6), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
tempVeryLowLevel.setStatus('mandatory')
temp_alarm_threshold = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 4, 7), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
tempAlarmThreshold.setStatus('mandatory')
temp_return_normal_trap = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 4, 8), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
tempReturnNormalTrap.setStatus('mandatory')
temp_trap_repeat = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 4, 9), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
tempTrapRepeat.setStatus('mandatory')
temp_mode = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 4, 10), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
tempMode.setStatus('mandatory')
temp_high_severity = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 4, 11), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
tempHighSeverity.setStatus('mandatory')
temp_very_high_severity = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 4, 12), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
tempVeryHighSeverity.setStatus('mandatory')
temp_low_severity = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 4, 13), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
tempLowSeverity.setStatus('mandatory')
temp_very_low_severity = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 4, 14), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
tempVeryLowSeverity.setStatus('mandatory')
temp_name = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 4, 15), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
tempName.setStatus('mandatory')
humidity_value = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 5, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
humidityValue.setStatus('mandatory')
humidity_alarm_enable = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 5, 2), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
humidityAlarmEnable.setStatus('mandatory')
humidity_high_level = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 5, 3), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
humidityHighLevel.setStatus('mandatory')
humidity_very_high_level = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 5, 4), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
humidityVeryHighLevel.setStatus('mandatory')
humidity_low_level = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 5, 5), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
humidityLowLevel.setStatus('mandatory')
humidity_very_low_level = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 5, 6), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
humidityVeryLowLevel.setStatus('mandatory')
humidity_alarm_threshold = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 5, 7), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
humidityAlarmThreshold.setStatus('mandatory')
humidity_return_normal_trap = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 5, 8), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
humidityReturnNormalTrap.setStatus('mandatory')
humidity_trap_repeat = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 5, 9), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
humidityTrapRepeat.setStatus('mandatory')
humidity_high_severity = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 5, 10), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
humidityHighSeverity.setStatus('mandatory')
humidity_very_high_severity = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 5, 11), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
humidityVeryHighSeverity.setStatus('mandatory')
humidity_low_severity = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 5, 12), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
humidityLowSeverity.setStatus('mandatory')
humidity_very_low_severity = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 5, 13), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
humidityVeryLowSeverity.setStatus('mandatory')
humidity_name = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 5, 14), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
humidityName.setStatus('mandatory')
pt_need_password = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 6, 1), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ptNeedPassword.setStatus('mandatory')
pt_say_login_text = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 6, 2), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ptSayLoginText.setStatus('mandatory')
pt_login_text = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 6, 3), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ptLoginText.setStatus('mandatory')
pt_say_site_id = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 6, 4), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ptSaySiteID.setStatus('mandatory')
pt_username = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 6, 5), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ptUsername.setStatus('mandatory')
pt_password = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 6, 6), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ptPassword.setStatus('mandatory')
pt_timeout = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 6, 7), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ptTimeout.setStatus('mandatory')
pt_esc_char = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 6, 8), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ptEscChar.setStatus('mandatory')
pt_lfstrip_to_port = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 6, 9), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ptLfstripToPort.setStatus('mandatory')
pt_lfstrip_from_port = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 6, 10), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ptLfstripFromPort.setStatus('mandatory')
pt_serial_baudrate = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 6, 11), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ptSerialBaudrate.setStatus('mandatory')
pt_serial_wordlength = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 6, 12), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ptSerialWordlength.setStatus('mandatory')
pt_serial_parity = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 6, 13), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ptSerialParity.setStatus('mandatory')
pt_tcp_portnumber = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 6, 14), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ptTCPPortnumber.setStatus('mandatory')
ftp_username = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 7, 1), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ftpUsername.setStatus('mandatory')
ftp_password = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 7, 2), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ftpPassword.setStatus('mandatory')
analog1_value = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
analog1Value.setStatus('mandatory')
analog1_alarm_enable = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 1, 2), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
analog1AlarmEnable.setStatus('mandatory')
analog1_high_level = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 1, 3), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
analog1HighLevel.setStatus('mandatory')
analog1_very_high_level = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 1, 4), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
analog1VeryHighLevel.setStatus('mandatory')
analog1_low_level = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 1, 5), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
analog1LowLevel.setStatus('mandatory')
analog1_very_low_level = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 1, 6), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
analog1VeryLowLevel.setStatus('mandatory')
analog1_alarm_threshold = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 1, 7), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
analog1AlarmThreshold.setStatus('mandatory')
analog1_return_normal_trap = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 1, 8), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
analog1ReturnNormalTrap.setStatus('mandatory')
analog1_trap_repeat = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 1, 9), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
analog1TrapRepeat.setStatus('mandatory')
analog1_high_severity = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 1, 10), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
analog1HighSeverity.setStatus('mandatory')
analog1_very_high_severity = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 1, 11), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
analog1VeryHighSeverity.setStatus('mandatory')
analog1_low_severity = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 1, 12), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
analog1LowSeverity.setStatus('mandatory')
analog1_very_low_severity = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 1, 13), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
analog1VeryLowSeverity.setStatus('mandatory')
analog1_name = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 1, 14), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
analog1Name.setStatus('mandatory')
analog2_value = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 2, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
analog2Value.setStatus('mandatory')
analog2_alarm_enable = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 2, 2), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
analog2AlarmEnable.setStatus('mandatory')
analog2_high_level = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 2, 3), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
analog2HighLevel.setStatus('mandatory')
analog2_very_high_level = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 2, 4), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
analog2VeryHighLevel.setStatus('mandatory')
analog2_low_level = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 2, 5), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
analog2LowLevel.setStatus('mandatory')
analog2_very_low_level = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 2, 6), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
analog2VeryLowLevel.setStatus('mandatory')
analog2_alarm_threshold = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 2, 7), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
analog2AlarmThreshold.setStatus('mandatory')
analog2_return_normal_trap = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 2, 8), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
analog2ReturnNormalTrap.setStatus('mandatory')
analog2_trap_repeat = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 2, 9), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
analog2TrapRepeat.setStatus('mandatory')
analog2_high_severity = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 2, 10), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
analog2HighSeverity.setStatus('mandatory')
analog2_very_high_severity = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 2, 11), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
analog2VeryHighSeverity.setStatus('mandatory')
analog2_low_severity = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 2, 12), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
analog2LowSeverity.setStatus('mandatory')
analog2_very_low_severity = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 2, 13), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
analog2VeryLowSeverity.setStatus('mandatory')
analog2_name = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 8, 2, 14), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
analog2Name.setStatus('mandatory')
es_point_table = mib_table((1, 3, 6, 1, 4, 1, 3052, 41, 10, 1))
if mibBuilder.loadTexts:
esPointTable.setStatus('mandatory')
es_point_entry = mib_table_row((1, 3, 6, 1, 4, 1, 3052, 41, 10, 1, 1)).setIndexNames((0, 'S412-MIB', 'esIndexES'), (0, 'S412-MIB', 'esIndexPC'), (0, 'S412-MIB', 'esIndexPoint'))
if mibBuilder.loadTexts:
esPointEntry.setStatus('mandatory')
es_index_es = mib_table_column((1, 3, 6, 1, 4, 1, 3052, 41, 10, 1, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
esIndexES.setStatus('mandatory')
es_index_pc = mib_table_column((1, 3, 6, 1, 4, 1, 3052, 41, 10, 1, 1, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
esIndexPC.setStatus('mandatory')
es_index_point = mib_table_column((1, 3, 6, 1, 4, 1, 3052, 41, 10, 1, 1, 3), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
esIndexPoint.setStatus('mandatory')
es_point_name = mib_table_column((1, 3, 6, 1, 4, 1, 3052, 41, 10, 1, 1, 4), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
esPointName.setStatus('mandatory')
es_point_in_event_state = mib_table_column((1, 3, 6, 1, 4, 1, 3052, 41, 10, 1, 1, 5), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
esPointInEventState.setStatus('mandatory')
es_point_value_int = mib_table_column((1, 3, 6, 1, 4, 1, 3052, 41, 10, 1, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(-32768, 32767))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
esPointValueInt.setStatus('mandatory')
es_point_value_str = mib_table_column((1, 3, 6, 1, 4, 1, 3052, 41, 10, 1, 1, 7), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
esPointValueStr.setStatus('mandatory')
es_number_event_sensors = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 11, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
esNumberEventSensors.setStatus('mandatory')
es_table = mib_table((1, 3, 6, 1, 4, 1, 3052, 41, 11, 2))
if mibBuilder.loadTexts:
esTable.setStatus('mandatory')
es_entry = mib_table_row((1, 3, 6, 1, 4, 1, 3052, 41, 11, 2, 1)).setIndexNames((0, 'S412-MIB', 'esIndex'))
if mibBuilder.loadTexts:
esEntry.setStatus('mandatory')
es_index = mib_table_column((1, 3, 6, 1, 4, 1, 3052, 41, 11, 2, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
esIndex.setStatus('mandatory')
es_id = mib_table_column((1, 3, 6, 1, 4, 1, 3052, 41, 11, 2, 1, 2), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
esID.setStatus('mandatory')
es_number_temp_sensors = mib_table_column((1, 3, 6, 1, 4, 1, 3052, 41, 11, 2, 1, 3), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
esNumberTempSensors.setStatus('mandatory')
es_temp_reporting_mode = mib_table_column((1, 3, 6, 1, 4, 1, 3052, 41, 11, 2, 1, 4), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
esTempReportingMode.setStatus('mandatory')
es_number_c_cs = mib_table_column((1, 3, 6, 1, 4, 1, 3052, 41, 11, 2, 1, 5), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
esNumberCCs.setStatus('mandatory')
es_cc_reporting_mode = mib_table_column((1, 3, 6, 1, 4, 1, 3052, 41, 11, 2, 1, 6), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
esCCReportingMode.setStatus('mandatory')
es_number_humid_sensors = mib_table_column((1, 3, 6, 1, 4, 1, 3052, 41, 11, 2, 1, 7), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
esNumberHumidSensors.setStatus('mandatory')
es_humid_reporting_mode = mib_table_column((1, 3, 6, 1, 4, 1, 3052, 41, 11, 2, 1, 8), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
esHumidReportingMode.setStatus('mandatory')
es_number_analog = mib_table_column((1, 3, 6, 1, 4, 1, 3052, 41, 11, 2, 1, 13), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
esNumberAnalog.setStatus('mandatory')
es_analog_reporting_mode = mib_table_column((1, 3, 6, 1, 4, 1, 3052, 41, 11, 2, 1, 14), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
esAnalogReportingMode.setStatus('mandatory')
es_number_relay_outputs = mib_table_column((1, 3, 6, 1, 4, 1, 3052, 41, 11, 2, 1, 15), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
esNumberRelayOutputs.setStatus('mandatory')
es_relay_reporting_mode = mib_table_column((1, 3, 6, 1, 4, 1, 3052, 41, 11, 2, 1, 16), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
esRelayReportingMode.setStatus('mandatory')
techsupport_ip_address = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 99, 1), ip_address()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
techsupportIPAddress.setStatus('mandatory')
techsupport_net_mask = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 99, 2), ip_address()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
techsupportNetMask.setStatus('mandatory')
techsupport_router = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 99, 3), ip_address()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
techsupportRouter.setStatus('mandatory')
techsupport_restart = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 99, 4), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
techsupportRestart.setStatus('mandatory')
techsupport_version_number = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 99, 5), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
techsupportVersionNumber.setStatus('mandatory')
mibend_object = mib_scalar((1, 3, 6, 1, 4, 1, 3052, 41, 100, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
mibendObject.setStatus('mandatory')
contact1_active_trap = notification_type((1, 3, 6, 1, 4, 1, 3052, 41) + (0, 20001)).setObjects(('S412-MIB', 'thisTrapText'), ('S412-MIB', 'siteID'), ('S412-MIB', 'contact1Name'), ('S412-MIB', 'contact1State'))
contact2_active_trap = notification_type((1, 3, 6, 1, 4, 1, 3052, 41) + (0, 20002)).setObjects(('S412-MIB', 'thisTrapText'), ('S412-MIB', 'siteID'), ('S412-MIB', 'contact2Name'), ('S412-MIB', 'contact2State'))
contact3_active_trap = notification_type((1, 3, 6, 1, 4, 1, 3052, 41) + (0, 20003)).setObjects(('S412-MIB', 'thisTrapText'), ('S412-MIB', 'siteID'), ('S412-MIB', 'contact3Name'), ('S412-MIB', 'contact3State'))
contact4_active_trap = notification_type((1, 3, 6, 1, 4, 1, 3052, 41) + (0, 20004)).setObjects(('S412-MIB', 'thisTrapText'), ('S412-MIB', 'siteID'), ('S412-MIB', 'contact4Name'), ('S412-MIB', 'contact4State'))
contact5_active_trap = notification_type((1, 3, 6, 1, 4, 1, 3052, 41) + (0, 20005)).setObjects(('S412-MIB', 'thisTrapText'), ('S412-MIB', 'siteID'), ('S412-MIB', 'contact5Name'), ('S412-MIB', 'contact5State'))
contact6_active_trap = notification_type((1, 3, 6, 1, 4, 1, 3052, 41) + (0, 20006)).setObjects(('S412-MIB', 'thisTrapText'), ('S412-MIB', 'siteID'), ('S412-MIB', 'contact6Name'), ('S412-MIB', 'contact6State'))
temp_high_trap = notification_type((1, 3, 6, 1, 4, 1, 3052, 41) + (0, 20010)).setObjects(('S412-MIB', 'thisTrapText'), ('S412-MIB', 'siteID'), ('S412-MIB', 'tempValue'))
temp_very_high_trap = notification_type((1, 3, 6, 1, 4, 1, 3052, 41) + (0, 20011)).setObjects(('S412-MIB', 'thisTrapText'), ('S412-MIB', 'siteID'), ('S412-MIB', 'tempValue'))
temp_low_trap = notification_type((1, 3, 6, 1, 4, 1, 3052, 41) + (0, 20012)).setObjects(('S412-MIB', 'thisTrapText'), ('S412-MIB', 'siteID'), ('S412-MIB', 'tempValue'))
temp_very_low_trap = notification_type((1, 3, 6, 1, 4, 1, 3052, 41) + (0, 20013)).setObjects(('S412-MIB', 'thisTrapText'), ('S412-MIB', 'siteID'), ('S412-MIB', 'tempValue'))
humidity_high_trap = notification_type((1, 3, 6, 1, 4, 1, 3052, 41) + (0, 20020)).setObjects(('S412-MIB', 'thisTrapText'), ('S412-MIB', 'siteID'), ('S412-MIB', 'humidityValue'))
humidity_very_high_trap = notification_type((1, 3, 6, 1, 4, 1, 3052, 41) + (0, 20021)).setObjects(('S412-MIB', 'thisTrapText'), ('S412-MIB', 'siteID'), ('S412-MIB', 'humidityValue'))
humidity_low_trap = notification_type((1, 3, 6, 1, 4, 1, 3052, 41) + (0, 20022)).setObjects(('S412-MIB', 'thisTrapText'), ('S412-MIB', 'siteID'), ('S412-MIB', 'humidityValue'))
humidity_very_low_trap = notification_type((1, 3, 6, 1, 4, 1, 3052, 41) + (0, 20023)).setObjects(('S412-MIB', 'thisTrapText'), ('S412-MIB', 'siteID'), ('S412-MIB', 'humidityValue'))
analog1_high_trap = notification_type((1, 3, 6, 1, 4, 1, 3052, 41) + (0, 20030)).setObjects(('S412-MIB', 'thisTrapText'), ('S412-MIB', 'siteID'), ('S412-MIB', 'analog1Name'), ('S412-MIB', 'analog1Value'))
analog1_very_high_trap = notification_type((1, 3, 6, 1, 4, 1, 3052, 41) + (0, 20031)).setObjects(('S412-MIB', 'thisTrapText'), ('S412-MIB', 'siteID'), ('S412-MIB', 'analog1Name'), ('S412-MIB', 'analog1Value'))
analog1_low_trap = notification_type((1, 3, 6, 1, 4, 1, 3052, 41) + (0, 20032)).setObjects(('S412-MIB', 'thisTrapText'), ('S412-MIB', 'siteID'), ('S412-MIB', 'analog1Name'), ('S412-MIB', 'analog1Value'))
analog1_very_low_trap = notification_type((1, 3, 6, 1, 4, 1, 3052, 41) + (0, 20033)).setObjects(('S412-MIB', 'thisTrapText'), ('S412-MIB', 'siteID'), ('S412-MIB', 'analog1Name'), ('S412-MIB', 'analog1Value'))
analog2_high_trap = notification_type((1, 3, 6, 1, 4, 1, 3052, 41) + (0, 20040)).setObjects(('S412-MIB', 'thisTrapText'), ('S412-MIB', 'siteID'), ('S412-MIB', 'analog2Name'), ('S412-MIB', 'analog2Value'))
analog2_very_high_trap = notification_type((1, 3, 6, 1, 4, 1, 3052, 41) + (0, 20041)).setObjects(('S412-MIB', 'thisTrapText'), ('S412-MIB', 'siteID'), ('S412-MIB', 'analog2Name'), ('S412-MIB', 'analog2Value'))
analog2_low_trap = notification_type((1, 3, 6, 1, 4, 1, 3052, 41) + (0, 20042)).setObjects(('S412-MIB', 'thisTrapText'), ('S412-MIB', 'siteID'), ('S412-MIB', 'analog2Name'), ('S412-MIB', 'analog2Value'))
analog2_very_low_trap = notification_type((1, 3, 6, 1, 4, 1, 3052, 41) + (0, 20043)).setObjects(('S412-MIB', 'thisTrapText'), ('S412-MIB', 'siteID'), ('S412-MIB', 'analog2Name'), ('S412-MIB', 'analog2Value'))
contact_es_active_trap = notification_type((1, 3, 6, 1, 4, 1, 3052, 41) + (0, 20101)).setObjects(('S412-MIB', 'thisTrapText'), ('S412-MIB', 'siteID'), ('S412-MIB', 'esPointName'), ('S412-MIB', 'esPointValueInt'), ('S412-MIB', 'esIndexES'), ('S412-MIB', 'esIndexPoint'))
temp_es_high_trap = notification_type((1, 3, 6, 1, 4, 1, 3052, 41) + (0, 20110)).setObjects(('S412-MIB', 'thisTrapText'), ('S412-MIB', 'siteID'), ('S412-MIB', 'esPointName'), ('S412-MIB', 'esPointValueInt'), ('S412-MIB', 'esIndexES'), ('S412-MIB', 'esIndexPoint'))
temp_es_very_high_trap = notification_type((1, 3, 6, 1, 4, 1, 3052, 41) + (0, 20111)).setObjects(('S412-MIB', 'thisTrapText'), ('S412-MIB', 'siteID'), ('S412-MIB', 'esPointName'), ('S412-MIB', 'esPointValueInt'), ('S412-MIB', 'esIndexES'), ('S412-MIB', 'esIndexPoint'))
temp_es_low_trap = notification_type((1, 3, 6, 1, 4, 1, 3052, 41) + (0, 20112)).setObjects(('S412-MIB', 'thisTrapText'), ('S412-MIB', 'siteID'), ('S412-MIB', 'esPointName'), ('S412-MIB', 'esPointValueInt'), ('S412-MIB', 'esIndexES'), ('S412-MIB', 'esIndexPoint'))
temp_es_very_low_trap = notification_type((1, 3, 6, 1, 4, 1, 3052, 41) + (0, 20113)).setObjects(('S412-MIB', 'thisTrapText'), ('S412-MIB', 'siteID'), ('S412-MIB', 'esPointName'), ('S412-MIB', 'esPointValueInt'), ('S412-MIB', 'esIndexES'), ('S412-MIB', 'esIndexPoint'))
humidity_es_high_trap = notification_type((1, 3, 6, 1, 4, 1, 3052, 41) + (0, 20120)).setObjects(('S412-MIB', 'thisTrapText'), ('S412-MIB', 'siteID'), ('S412-MIB', 'esPointName'), ('S412-MIB', 'esPointValueInt'), ('S412-MIB', 'esIndexES'), ('S412-MIB', 'esIndexPoint'))
humidity_es_very_high_trap = notification_type((1, 3, 6, 1, 4, 1, 3052, 41) + (0, 20121)).setObjects(('S412-MIB', 'thisTrapText'), ('S412-MIB', 'siteID'), ('S412-MIB', 'esPointName'), ('S412-MIB', 'esPointValueInt'), ('S412-MIB', 'esIndexES'), ('S412-MIB', 'esIndexPoint'))
humidity_es_low_trap = notification_type((1, 3, 6, 1, 4, 1, 3052, 41) + (0, 20122)).setObjects(('S412-MIB', 'thisTrapText'), ('S412-MIB', 'siteID'), ('S412-MIB', 'esPointName'), ('S412-MIB', 'esPointValueInt'), ('S412-MIB', 'esIndexES'), ('S412-MIB', 'esIndexPoint'))
humidity_es_very_low_trap = notification_type((1, 3, 6, 1, 4, 1, 3052, 41) + (0, 20123)).setObjects(('S412-MIB', 'thisTrapText'), ('S412-MIB', 'siteID'), ('S412-MIB', 'esPointName'), ('S412-MIB', 'esPointValueInt'), ('S412-MIB', 'esIndexES'), ('S412-MIB', 'esIndexPoint'))
voltage_es_high_trap = notification_type((1, 3, 6, 1, 4, 1, 3052, 41) + (0, 20130)).setObjects(('S412-MIB', 'thisTrapText'), ('S412-MIB', 'siteID'), ('S412-MIB', 'esPointName'), ('S412-MIB', 'esPointValueInt'), ('S412-MIB', 'esIndexES'), ('S412-MIB', 'esIndexPoint'))
voltage_es_very_high_trap = notification_type((1, 3, 6, 1, 4, 1, 3052, 41) + (0, 20131)).setObjects(('S412-MIB', 'thisTrapText'), ('S412-MIB', 'siteID'), ('S412-MIB', 'esPointName'), ('S412-MIB', 'esPointValueInt'), ('S412-MIB', 'esIndexES'), ('S412-MIB', 'esIndexPoint'))
voltage_es_low_trap = notification_type((1, 3, 6, 1, 4, 1, 3052, 41) + (0, 20132)).setObjects(('S412-MIB', 'thisTrapText'), ('S412-MIB', 'siteID'), ('S412-MIB', 'esPointName'), ('S412-MIB', 'esPointValueInt'), ('S412-MIB', 'esIndexES'), ('S412-MIB', 'esIndexPoint'))
voltage_es_very_low_trap = notification_type((1, 3, 6, 1, 4, 1, 3052, 41) + (0, 20133)).setObjects(('S412-MIB', 'thisTrapText'), ('S412-MIB', 'siteID'), ('S412-MIB', 'esPointName'), ('S412-MIB', 'esPointValueInt'), ('S412-MIB', 'esIndexES'), ('S412-MIB', 'esIndexPoint'))
contact1_normal_trap = notification_type((1, 3, 6, 1, 4, 1, 3052, 41) + (0, 21001)).setObjects(('S412-MIB', 'thisTrapText'), ('S412-MIB', 'siteID'), ('S412-MIB', 'contact1Name'), ('S412-MIB', 'contact1State'))
contact2_normal_trap = notification_type((1, 3, 6, 1, 4, 1, 3052, 41) + (0, 21002)).setObjects(('S412-MIB', 'thisTrapText'), ('S412-MIB', 'siteID'), ('S412-MIB', 'contact2Name'), ('S412-MIB', 'contact2State'))
contact3_normal_trap = notification_type((1, 3, 6, 1, 4, 1, 3052, 41) + (0, 21003)).setObjects(('S412-MIB', 'thisTrapText'), ('S412-MIB', 'siteID'), ('S412-MIB', 'contact3Name'), ('S412-MIB', 'contact3State'))
contact4_normal_trap = notification_type((1, 3, 6, 1, 4, 1, 3052, 41) + (0, 21004)).setObjects(('S412-MIB', 'thisTrapText'), ('S412-MIB', 'siteID'), ('S412-MIB', 'contact4Name'), ('S412-MIB', 'contact4State'))
contact5_normal_trap = notification_type((1, 3, 6, 1, 4, 1, 3052, 41) + (0, 21005)).setObjects(('S412-MIB', 'thisTrapText'), ('S412-MIB', 'siteID'), ('S412-MIB', 'contact5Name'), ('S412-MIB', 'contact5State'))
contact6_normal_trap = notification_type((1, 3, 6, 1, 4, 1, 3052, 41) + (0, 21006)).setObjects(('S412-MIB', 'thisTrapText'), ('S412-MIB', 'siteID'), ('S412-MIB', 'contact6Name'), ('S412-MIB', 'contact6State'))
temp_normal_trap = notification_type((1, 3, 6, 1, 4, 1, 3052, 41) + (0, 21010)).setObjects(('S412-MIB', 'thisTrapText'), ('S412-MIB', 'siteID'), ('S412-MIB', 'tempValue'))
humidity_normal_trap = notification_type((1, 3, 6, 1, 4, 1, 3052, 41) + (0, 21020)).setObjects(('S412-MIB', 'thisTrapText'), ('S412-MIB', 'siteID'), ('S412-MIB', 'humidityValue'))
analog1_normal_trap = notification_type((1, 3, 6, 1, 4, 1, 3052, 41) + (0, 21030)).setObjects(('S412-MIB', 'thisTrapText'), ('S412-MIB', 'siteID'), ('S412-MIB', 'analog1Name'), ('S412-MIB', 'analog1Value'))
analog2_normal_trap = notification_type((1, 3, 6, 1, 4, 1, 3052, 41) + (0, 21040)).setObjects(('S412-MIB', 'thisTrapText'), ('S412-MIB', 'siteID'), ('S412-MIB', 'analog2Name'), ('S412-MIB', 'analog2Value'))
contact_es_normal_trap = notification_type((1, 3, 6, 1, 4, 1, 3052, 41) + (0, 21101)).setObjects(('S412-MIB', 'thisTrapText'), ('S412-MIB', 'siteID'), ('S412-MIB', 'esPointName'), ('S412-MIB', 'esPointValueInt'), ('S412-MIB', 'esIndexES'), ('S412-MIB', 'esIndexPoint'))
temp_es_normal_trap = notification_type((1, 3, 6, 1, 4, 1, 3052, 41) + (0, 21110)).setObjects(('S412-MIB', 'thisTrapText'), ('S412-MIB', 'siteID'), ('S412-MIB', 'esPointName'), ('S412-MIB', 'esPointValueInt'), ('S412-MIB', 'esIndexES'), ('S412-MIB', 'esIndexPoint'))
humidity_es_normal_trap = notification_type((1, 3, 6, 1, 4, 1, 3052, 41) + (0, 21120)).setObjects(('S412-MIB', 'thisTrapText'), ('S412-MIB', 'siteID'), ('S412-MIB', 'esPointName'), ('S412-MIB', 'esPointValueInt'), ('S412-MIB', 'esIndexES'), ('S412-MIB', 'esIndexPoint'))
voltage_es_normal_trap = notification_type((1, 3, 6, 1, 4, 1, 3052, 41) + (0, 21130)).setObjects(('S412-MIB', 'thisTrapText'), ('S412-MIB', 'siteID'), ('S412-MIB', 'esPointName'), ('S412-MIB', 'esPointValueInt'), ('S412-MIB', 'esIndexES'), ('S412-MIB', 'esIndexPoint'))
test_trap = notification_type((1, 3, 6, 1, 4, 1, 3052, 41) + (0, 22000)).setObjects(('S412-MIB', 'thisTrapText'), ('S412-MIB', 'siteID'))
mibBuilder.exportSymbols('S412-MIB', analog2HighSeverity=analog2HighSeverity, contact6TrapRepeat=contact6TrapRepeat, tempValue=tempValue, ptUsername=ptUsername, contact1ActiveDirection=contact1ActiveDirection, ptEscChar=ptEscChar, relay1PowerupState=relay1PowerupState, contact3ActiveDirection=contact3ActiveDirection, esID=esID, contact4NormalTrap=contact4NormalTrap, contact3AlarmEnable=contact3AlarmEnable, contact4AlarmEnable=contact4AlarmEnable, contact1=contact1, contact4Severity=contact4Severity, relay2PowerupState=relay2PowerupState, tempReturnNormalTrap=tempReturnNormalTrap, analog1VeryHighLevel=analog1VeryHighLevel, analog1TrapRepeat=analog1TrapRepeat, analog1VeryLowLevel=analog1VeryLowLevel, contact4Name=contact4Name, contact3ActiveTrap=contact3ActiveTrap, contact4ActiveDirection=contact4ActiveDirection, ptTCPPortnumber=ptTCPPortnumber, humidityName=humidityName, ptSerialParity=ptSerialParity, ptLfstripToPort=ptLfstripToPort, contact3TrapRepeat=contact3TrapRepeat, humidityReturnNormalTrap=humidityReturnNormalTrap, voltageESVeryLowTrap=voltageESVeryLowTrap, statusRepeatHours=statusRepeatHours, analog2VeryLowLevel=analog2VeryLowLevel, analog1VeryLowTrap=analog1VeryLowTrap, humidityVeryHighSeverity=humidityVeryHighSeverity, tempESLowTrap=tempESLowTrap, contact5ActiveTrap=contact5ActiveTrap, esHumidReportingMode=esHumidReportingMode, humidityNormalTrap=humidityNormalTrap, contact5=contact5, contact1TrapRepeat=contact1TrapRepeat, tempTrapRepeat=tempTrapRepeat, firmwareVersion=firmwareVersion, analog1VeryHighSeverity=analog1VeryHighSeverity, contact3=contact3, tempAlarmEnable=tempAlarmEnable, tempLowSeverity=tempLowSeverity, humidityTrapRepeat=humidityTrapRepeat, contact2ActiveTrap=contact2ActiveTrap, contacts=contacts, forceTraps=forceTraps, analog1Value=analog1Value, tempESVeryLowTrap=tempESVeryLowTrap, contact1Severity=contact1Severity, analog1LowLevel=analog1LowLevel, esNumberHumidSensors=esNumberHumidSensors, tempLowTrap=tempLowTrap, analog1ReturnNormalTrap=analog1ReturnNormalTrap, analog2LowTrap=analog2LowTrap, contact1AlarmEnable=contact1AlarmEnable, contact3State=contact3State, humidityHighLevel=humidityHighLevel, tempVeryLowTrap=tempVeryLowTrap, esNumberEventSensors=esNumberEventSensors, tempHighLevel=tempHighLevel, esTempReportingMode=esTempReportingMode, analog1LowSeverity=analog1LowSeverity, contact2=contact2, esAnalogReportingMode=esAnalogReportingMode, relay2=relay2, relay2CurrentState=relay2CurrentState, relay1CurrentState=relay1CurrentState, ptSayLoginText=ptSayLoginText, voltageESNormalTrap=voltageESNormalTrap, contact5ActiveDirection=contact5ActiveDirection, analog2VeryHighLevel=analog2VeryHighLevel, netlossTrapsend=netlossTrapsend, analog2Name=analog2Name, humidityValue=humidityValue, contact3Severity=contact3Severity, esPointValueInt=esPointValueInt, techsupportIPAddress=techsupportIPAddress, humidityVeryLowSeverity=humidityVeryLowSeverity, humidityVeryHighTrap=humidityVeryHighTrap, contact2State=contact2State, contact4Threshold=contact4Threshold, contact5NormalTrap=contact5NormalTrap, mibend=mibend, ptNeedPassword=ptNeedPassword, contact6Name=contact6Name, s412=s412, analog2TrapRepeat=analog2TrapRepeat, esNumberTempSensors=esNumberTempSensors, ftp=ftp, siteID=siteID, voltageESVeryHighTrap=voltageESVeryHighTrap, humidityLowLevel=humidityLowLevel, contact4State=contact4State, humidityESVeryLowTrap=humidityESVeryLowTrap, esIndexPC=esIndexPC, serialTimeout=serialTimeout, tempESNormalTrap=tempESNormalTrap, tempVeryLowSeverity=tempVeryLowSeverity, ptSaySiteID=ptSaySiteID, contact3Name=contact3Name, tempESHighTrap=tempESHighTrap, tempMode=tempMode, analog1Name=analog1Name, analog1NormalTrap=analog1NormalTrap, analog=analog, techsupportRouter=techsupportRouter, snmpManager2=snmpManager2, contact5ReturnNormalTrap=contact5ReturnNormalTrap, contact1ReturnNormalTrap=contact1ReturnNormalTrap, snmpManager4=snmpManager4, tempVeryHighSeverity=tempVeryHighSeverity, contact4ActiveTrap=contact4ActiveTrap, humidityLowTrap=humidityLowTrap, eventSensorConfig=eventSensorConfig, esEntry=esEntry, serialNumber=serialNumber, humidityVeryHighLevel=humidityVeryHighLevel, relay1Name=relay1Name, relays=relays, eventSensorStatus=eventSensorStatus, analog2Value=analog2Value, analog1AlarmThreshold=analog1AlarmThreshold, tempHighSeverity=tempHighSeverity, contact1NormalTrap=contact1NormalTrap, esIndexPoint=esIndexPoint, contact5Threshold=contact5Threshold, analog1HighLevel=analog1HighLevel, analog1VeryLowSeverity=analog1VeryLowSeverity, analog1HighTrap=analog1HighTrap, contact4ReturnNormalTrap=contact4ReturnNormalTrap, humidityESNormalTrap=humidityESNormalTrap, voltageESLowTrap=voltageESLowTrap, esTable=esTable, contact1Name=contact1Name, esPointTable=esPointTable, techsupportRestart=techsupportRestart, humidityESVeryHighTrap=humidityESVeryHighTrap, contact2AlarmEnable=contact2AlarmEnable, humidityAlarmThreshold=humidityAlarmThreshold, ptPassword=ptPassword, ftpPassword=ftpPassword, contact5TrapRepeat=contact5TrapRepeat, ftpUsername=ftpUsername, analog2ReturnNormalTrap=analog2ReturnNormalTrap, analog2AlarmEnable=analog2AlarmEnable, techsupportNetMask=techsupportNetMask, contact3ReturnNormalTrap=contact3ReturnNormalTrap, humidityHighSeverity=humidityHighSeverity, tempVeryHighLevel=tempVeryHighLevel, contact2ActiveDirection=contact2ActiveDirection, tempVeryHighTrap=tempVeryHighTrap, esIndex=esIndex, analog1HighSeverity=analog1HighSeverity, analog2VeryLowTrap=analog2VeryLowTrap, humidityHighTrap=humidityHighTrap, contact2Severity=contact2Severity, tempLowLevel=tempLowLevel, analog2HighLevel=analog2HighLevel, humidityAlarmEnable=humidityAlarmEnable, esPointInEventState=esPointInEventState, analog1LowTrap=analog1LowTrap, humidityESHighTrap=humidityESHighTrap, testTrap=testTrap, contact5Severity=contact5Severity, contact2Name=contact2Name, alarmStatus=alarmStatus, humidityVeryLowLevel=humidityVeryLowLevel, humidityLowSeverity=humidityLowSeverity, analog2AlarmThreshold=analog2AlarmThreshold, snmpManager3=snmpManager3, esRelayReportingMode=esRelayReportingMode, snmpManager=snmpManager, contact5AlarmEnable=contact5AlarmEnable, humidityVeryLowTrap=humidityVeryLowTrap, contact5Name=contact5Name, contactESActiveTrap=contactESActiveTrap, tempESVeryHighTrap=tempESVeryHighTrap, contact6Threshold=contact6Threshold, humiditysensor=humiditysensor, contact2NormalTrap=contact2NormalTrap, analog1AlarmEnable=analog1AlarmEnable, esNumberAnalog=esNumberAnalog, thisTrapText=thisTrapText, contact6=contact6, esPointName=esPointName, tempNormalTrap=tempNormalTrap, ptLoginText=ptLoginText, analog2HighTrap=analog2HighTrap, ptSerialWordlength=ptSerialWordlength, contact6Severity=contact6Severity, contactESNormalTrap=contactESNormalTrap, contact3Threshold=contact3Threshold, powerupTrapsend=powerupTrapsend, contact6ActiveTrap=contact6ActiveTrap, contact1ActiveTrap=contact1ActiveTrap, contact3NormalTrap=contact3NormalTrap, esNumberCCs=esNumberCCs, contact4TrapRepeat=contact4TrapRepeat, analog2NormalTrap=analog2NormalTrap, humidityESLowTrap=humidityESLowTrap, tempVeryLowLevel=tempVeryLowLevel, contact5State=contact5State, passthrough=passthrough, ptSerialBaudrate=ptSerialBaudrate, contact6State=contact6State, analog1VeryHighTrap=analog1VeryHighTrap, tempAlarmThreshold=tempAlarmThreshold, tempHighTrap=tempHighTrap, analog2LowSeverity=analog2LowSeverity, relay2Name=relay2Name, device=device, analog1=analog1, contact6AlarmEnable=contact6AlarmEnable, contact6ActiveDirection=contact6ActiveDirection, relay1=relay1, ptLfstripFromPort=ptLfstripFromPort, contact6NormalTrap=contact6NormalTrap, contact4=contact4, contact2TrapRepeat=contact2TrapRepeat, contact1State=contact1State, voltageESHighTrap=voltageESHighTrap, buildID=buildID, contact6ReturnNormalTrap=contact6ReturnNormalTrap, analog2LowLevel=analog2LowLevel, snmpManager1=snmpManager1, contact1Threshold=contact1Threshold, techsupport=techsupport, tempName=tempName, esIndexES=esIndexES, analog2VeryLowSeverity=analog2VeryLowSeverity, mibendObject=mibendObject, analog2VeryHighTrap=analog2VeryHighTrap, ptTimeout=ptTimeout, esPointValueStr=esPointValueStr, contact2Threshold=contact2Threshold, esPointEntry=esPointEntry, techsupportVersionNumber=techsupportVersionNumber, analog2VeryHighSeverity=analog2VeryHighSeverity, esNumberRelayOutputs=esNumberRelayOutputs, contact2ReturnNormalTrap=contact2ReturnNormalTrap, esCCReportingMode=esCCReportingMode, asentria=asentria, tempsensor=tempsensor, analog2=analog2)
|
ajedrez=[[0,1,0,1,0,1,0,1],[1,0,1,0,1,0,1,0],[0,1,0,1,0,1,0,1],[1,0,1,0,1,0,1,0],[0,1,0,1,0,1,0,1],[1,0,1,0,1,0,1,0],[0,1,0,1,0,1,0,1],[1,0,1,0,1,0,1,0]]
print(ajedrez[0][7])
c=0
for x in range(0,8):
for y in range(0,8):
if(ajedrez[x][y]==1):
c+=1
print(c)
|
ajedrez = [[0, 1, 0, 1, 0, 1, 0, 1], [1, 0, 1, 0, 1, 0, 1, 0], [0, 1, 0, 1, 0, 1, 0, 1], [1, 0, 1, 0, 1, 0, 1, 0], [0, 1, 0, 1, 0, 1, 0, 1], [1, 0, 1, 0, 1, 0, 1, 0], [0, 1, 0, 1, 0, 1, 0, 1], [1, 0, 1, 0, 1, 0, 1, 0]]
print(ajedrez[0][7])
c = 0
for x in range(0, 8):
for y in range(0, 8):
if ajedrez[x][y] == 1:
c += 1
print(c)
|
def avoidObstacles(inputArray):
'''
You are given an array of integers representing coordinates of obstacles
situated on a straight line.
Assume that you are jumping from the point with coordinate 0 to the right.
You are allowed only to make jumps of the same length represented by some integer.
Find the minimal length of the jump enough to avoid all the obstacles.
'''
maxValue = max(inputArray)
mySet = set(inputArray)
i = 2
while i <= maxValue:
current = 0
collision = False
while not collision:
if current in mySet:
collision = True
if current > maxValue:
return i
current += i
i += 1
return maxValue + 1
print(avoidObstacles([5, 3, 6, 7, 9]))
|
def avoid_obstacles(inputArray):
"""
You are given an array of integers representing coordinates of obstacles
situated on a straight line.
Assume that you are jumping from the point with coordinate 0 to the right.
You are allowed only to make jumps of the same length represented by some integer.
Find the minimal length of the jump enough to avoid all the obstacles.
"""
max_value = max(inputArray)
my_set = set(inputArray)
i = 2
while i <= maxValue:
current = 0
collision = False
while not collision:
if current in mySet:
collision = True
if current > maxValue:
return i
current += i
i += 1
return maxValue + 1
print(avoid_obstacles([5, 3, 6, 7, 9]))
|
N = int(input())
S = str(input())
for i,c in enumerate(S):
if c == '1':
if i % 2 == 0:
print('Takahashi')
else:
print('Aoki')
break
|
n = int(input())
s = str(input())
for (i, c) in enumerate(S):
if c == '1':
if i % 2 == 0:
print('Takahashi')
else:
print('Aoki')
break
|
name = "EikoNet"
__version__ = "1.0"
__description__ = "EikoNet: A deep neural networking approach for seismic ray tracing"
__license__ = "GPL v3.0"
__author__ = "Jonathan Smith, Kamyar Azizzadenesheli, Zachary E. Ross"
__email__ = "[email protected]"
|
name = 'EikoNet'
__version__ = '1.0'
__description__ = 'EikoNet: A deep neural networking approach for seismic ray tracing'
__license__ = 'GPL v3.0'
__author__ = 'Jonathan Smith, Kamyar Azizzadenesheli, Zachary E. Ross'
__email__ = '[email protected]'
|
companies = {}
while True:
command = input()
if command == "End":
break
spl_command = command.split(" -> ")
name = spl_command[0]
id = spl_command[1]
if name not in companies:
companies[name] = []
companies[name].append(id)
else:
if id in companies[name]:
continue
else:
companies[name].append(id)
sort_companies = dict(sorted(companies.items(), key=lambda x: x[0]))
for k, v in sort_companies.items():
print(k)
for i in v:
print(f"-- {i}")
#
# d = {}
#
# command = input()
# while command != "End":
# text = command.split(" -> ")
#
# company_name = text[0]
# id = text[1]
#
# if company_name not in d:
# d[company_name] = [id]
#
# else:
# if id in d[company_name]:
# command = input()
# continue
# else:
# d[company_name] += [id]
#
# command = input()
# sorted_dict = dict(sorted(d.items(), key=lambda x: x[0]))
# for (key, value) in sorted_dict.items():
# print(key)
# for i in value:
# print(f"-- {i}")
#
|
companies = {}
while True:
command = input()
if command == 'End':
break
spl_command = command.split(' -> ')
name = spl_command[0]
id = spl_command[1]
if name not in companies:
companies[name] = []
companies[name].append(id)
elif id in companies[name]:
continue
else:
companies[name].append(id)
sort_companies = dict(sorted(companies.items(), key=lambda x: x[0]))
for (k, v) in sort_companies.items():
print(k)
for i in v:
print(f'-- {i}')
|
# set declaration
myfruits = {"Apple", "Banana", "Grapes", "Litchi", "Mango"}
mynums = {1, 2, 3, 4, 5}
# Set printing before removing
print("Before pop() method...")
print("fruits: ", myfruits)
print("numbers: ", mynums)
# Elements getting popped from the set
elerem = myfruits.pop()
print(elerem, "is removed from fruits")
elerem = myfruits.pop()
print(elerem, "is removed from fruits")
elerem = myfruits.pop()
print(elerem, "is removed from fruits")
elerem = mynums.pop()
print(elerem, "is removed from numbers")
elerem = mynums.pop()
print(elerem, "is removed from numbers")
elerem = mynums.pop()
print(elerem, "is removed from numbers")
print("After pop() method...")
print("fruits: ", myfruits)
print("numbers: ", mynums)
|
myfruits = {'Apple', 'Banana', 'Grapes', 'Litchi', 'Mango'}
mynums = {1, 2, 3, 4, 5}
print('Before pop() method...')
print('fruits: ', myfruits)
print('numbers: ', mynums)
elerem = myfruits.pop()
print(elerem, 'is removed from fruits')
elerem = myfruits.pop()
print(elerem, 'is removed from fruits')
elerem = myfruits.pop()
print(elerem, 'is removed from fruits')
elerem = mynums.pop()
print(elerem, 'is removed from numbers')
elerem = mynums.pop()
print(elerem, 'is removed from numbers')
elerem = mynums.pop()
print(elerem, 'is removed from numbers')
print('After pop() method...')
print('fruits: ', myfruits)
print('numbers: ', mynums)
|
#
# PySNMP MIB module PDN-VLAN-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/PDN-VLAN-MIB
# Produced by pysmi-0.3.4 at Wed May 1 14:39:52 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")
SingleValueConstraint, ValueRangeConstraint, ConstraintsIntersection, ValueSizeConstraint, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ValueRangeConstraint", "ConstraintsIntersection", "ValueSizeConstraint", "ConstraintsUnion")
pdn_common, = mibBuilder.importSymbols("PDN-HEADER-MIB", "pdn-common")
VlanIndex, = mibBuilder.importSymbols("Q-BRIDGE-MIB", "VlanIndex")
ObjectGroup, NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "ObjectGroup", "NotificationGroup", "ModuleCompliance")
Bits, ObjectIdentity, ModuleIdentity, MibScalar, MibTable, MibTableRow, MibTableColumn, Unsigned32, Gauge32, IpAddress, MibIdentifier, NotificationType, Integer32, Counter32, TimeTicks, Counter64, iso = mibBuilder.importSymbols("SNMPv2-SMI", "Bits", "ObjectIdentity", "ModuleIdentity", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Unsigned32", "Gauge32", "IpAddress", "MibIdentifier", "NotificationType", "Integer32", "Counter32", "TimeTicks", "Counter64", "iso")
TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString")
pdnVlanMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 46))
pdnVlanMIB.setRevisions(('2003-11-12 00:00', '2003-04-24 00:00', '2003-04-11 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: pdnVlanMIB.setRevisionsDescriptions(('Added a second VlanId for in-band mgmt', 'Changed the compliance/conformance section to be consistent with standard MIBs.', 'Initial release.',))
if mibBuilder.loadTexts: pdnVlanMIB.setLastUpdated('200311120000Z')
if mibBuilder.loadTexts: pdnVlanMIB.setOrganization('Paradyne Networks MIB Working Group Other information about group editing the MIB')
if mibBuilder.loadTexts: pdnVlanMIB.setContactInfo('Paradyne Networks, Inc. 8545 126th Avenue North Largo, FL 33733 www.paradyne.com General Comments to: [email protected] Editors Clay Sikes, Jesus A. Pinto')
if mibBuilder.loadTexts: pdnVlanMIB.setDescription('This MIB module contains objects pertaining to VLANs.')
pdnVlanNotifications = MibIdentifier((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 46, 0))
pdnVlanObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 46, 1))
pdnVlanAFNs = MibIdentifier((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 46, 2))
pdnVlanConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 46, 3))
pdnVlanReservedBlockStart = MibScalar((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 46, 1, 1), VlanIndex()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: pdnVlanReservedBlockStart.setStatus('current')
if mibBuilder.loadTexts: pdnVlanReservedBlockStart.setDescription('This object defines the starting VLAN for a sequential block of VLANS that are to be reserved for internal use. The actual size of the block reserved is not specified as it could be implementation specific. The size of the actual block being reserved should be clearly specified in the SNMP Operational Specification for the particular implementaion.')
pdnVlanInbandMgmtVlanId = MibScalar((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 46, 1, 2), VlanIndex()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: pdnVlanInbandMgmtVlanId.setStatus('current')
if mibBuilder.loadTexts: pdnVlanInbandMgmtVlanId.setDescription('The VLAN ID assigned to the In-Band Management Channel.')
pdnVlanInbandMgmtVlanId2 = MibScalar((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 46, 1, 3), VlanIndex()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: pdnVlanInbandMgmtVlanId2.setStatus('current')
if mibBuilder.loadTexts: pdnVlanInbandMgmtVlanId2.setDescription('The VLAN ID assigned to the second In-Band Management Channel. If the agent does not support a second In-Band Management Channel, it should return NO-SUCH-NAME for the object. *** A VALUE OF 0 IS NOT PERMITTED TO BE RETURNED *** ')
pdnVlanCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 46, 3, 1))
pdnVlanGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 46, 3, 2))
pdnVlanMIBCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 46, 3, 1, 1)).setObjects(("PDN-VLAN-MIB", "pdnVlanReservedBlockGroup"), ("PDN-VLAN-MIB", "pdnVlanInbandMgmtVlanGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
pdnVlanMIBCompliance = pdnVlanMIBCompliance.setStatus('current')
if mibBuilder.loadTexts: pdnVlanMIBCompliance.setDescription('The compliance statement for the pdnVlan entities which implement the pdnVlanMIB.')
pdnVlanObjGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 46, 3, 2, 1))
pdnVlanAfnGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 46, 3, 2, 2))
pdnVlanNtfyGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 46, 3, 2, 3))
pdnVlanReservedBlockGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 46, 3, 2, 1, 1)).setObjects(("PDN-VLAN-MIB", "pdnVlanReservedBlockStart"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
pdnVlanReservedBlockGroup = pdnVlanReservedBlockGroup.setStatus('current')
if mibBuilder.loadTexts: pdnVlanReservedBlockGroup.setDescription('Objects grouped for reserving a block of sequential VLANs.')
pdnVlanInbandMgmtVlanGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 46, 3, 2, 1, 2)).setObjects(("PDN-VLAN-MIB", "pdnVlanInbandMgmtVlanId"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
pdnVlanInbandMgmtVlanGroup = pdnVlanInbandMgmtVlanGroup.setStatus('current')
if mibBuilder.loadTexts: pdnVlanInbandMgmtVlanGroup.setDescription('Objects grouped relating to the In-Band Managment VLAN.')
pdnVlanInbandMgmtVlan2Group = ObjectGroup((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 46, 3, 2, 1, 3)).setObjects(("PDN-VLAN-MIB", "pdnVlanInbandMgmtVlanId"), ("PDN-VLAN-MIB", "pdnVlanInbandMgmtVlanId2"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
pdnVlanInbandMgmtVlan2Group = pdnVlanInbandMgmtVlan2Group.setStatus('current')
if mibBuilder.loadTexts: pdnVlanInbandMgmtVlan2Group.setDescription('Multiples objects grouped relating to the In-Band Managment VLAN.')
mibBuilder.exportSymbols("PDN-VLAN-MIB", pdnVlanObjects=pdnVlanObjects, PYSNMP_MODULE_ID=pdnVlanMIB, pdnVlanMIB=pdnVlanMIB, pdnVlanAFNs=pdnVlanAFNs, pdnVlanReservedBlockStart=pdnVlanReservedBlockStart, pdnVlanMIBCompliance=pdnVlanMIBCompliance, pdnVlanObjGroups=pdnVlanObjGroups, pdnVlanAfnGroups=pdnVlanAfnGroups, pdnVlanInbandMgmtVlanGroup=pdnVlanInbandMgmtVlanGroup, pdnVlanGroups=pdnVlanGroups, pdnVlanConformance=pdnVlanConformance, pdnVlanInbandMgmtVlanId=pdnVlanInbandMgmtVlanId, pdnVlanInbandMgmtVlanId2=pdnVlanInbandMgmtVlanId2, pdnVlanCompliances=pdnVlanCompliances, pdnVlanNotifications=pdnVlanNotifications, pdnVlanNtfyGroups=pdnVlanNtfyGroups, pdnVlanReservedBlockGroup=pdnVlanReservedBlockGroup, pdnVlanInbandMgmtVlan2Group=pdnVlanInbandMgmtVlan2Group)
|
(integer, octet_string, object_identifier) = mibBuilder.importSymbols('ASN1', 'Integer', 'OctetString', 'ObjectIdentifier')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(single_value_constraint, value_range_constraint, constraints_intersection, value_size_constraint, constraints_union) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'SingleValueConstraint', 'ValueRangeConstraint', 'ConstraintsIntersection', 'ValueSizeConstraint', 'ConstraintsUnion')
(pdn_common,) = mibBuilder.importSymbols('PDN-HEADER-MIB', 'pdn-common')
(vlan_index,) = mibBuilder.importSymbols('Q-BRIDGE-MIB', 'VlanIndex')
(object_group, notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'ObjectGroup', 'NotificationGroup', 'ModuleCompliance')
(bits, object_identity, module_identity, mib_scalar, mib_table, mib_table_row, mib_table_column, unsigned32, gauge32, ip_address, mib_identifier, notification_type, integer32, counter32, time_ticks, counter64, iso) = mibBuilder.importSymbols('SNMPv2-SMI', 'Bits', 'ObjectIdentity', 'ModuleIdentity', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Unsigned32', 'Gauge32', 'IpAddress', 'MibIdentifier', 'NotificationType', 'Integer32', 'Counter32', 'TimeTicks', 'Counter64', 'iso')
(textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString')
pdn_vlan_mib = module_identity((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 46))
pdnVlanMIB.setRevisions(('2003-11-12 00:00', '2003-04-24 00:00', '2003-04-11 00:00'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts:
pdnVlanMIB.setRevisionsDescriptions(('Added a second VlanId for in-band mgmt', 'Changed the compliance/conformance section to be consistent with standard MIBs.', 'Initial release.'))
if mibBuilder.loadTexts:
pdnVlanMIB.setLastUpdated('200311120000Z')
if mibBuilder.loadTexts:
pdnVlanMIB.setOrganization('Paradyne Networks MIB Working Group Other information about group editing the MIB')
if mibBuilder.loadTexts:
pdnVlanMIB.setContactInfo('Paradyne Networks, Inc. 8545 126th Avenue North Largo, FL 33733 www.paradyne.com General Comments to: [email protected] Editors Clay Sikes, Jesus A. Pinto')
if mibBuilder.loadTexts:
pdnVlanMIB.setDescription('This MIB module contains objects pertaining to VLANs.')
pdn_vlan_notifications = mib_identifier((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 46, 0))
pdn_vlan_objects = mib_identifier((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 46, 1))
pdn_vlan_af_ns = mib_identifier((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 46, 2))
pdn_vlan_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 46, 3))
pdn_vlan_reserved_block_start = mib_scalar((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 46, 1, 1), vlan_index()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
pdnVlanReservedBlockStart.setStatus('current')
if mibBuilder.loadTexts:
pdnVlanReservedBlockStart.setDescription('This object defines the starting VLAN for a sequential block of VLANS that are to be reserved for internal use. The actual size of the block reserved is not specified as it could be implementation specific. The size of the actual block being reserved should be clearly specified in the SNMP Operational Specification for the particular implementaion.')
pdn_vlan_inband_mgmt_vlan_id = mib_scalar((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 46, 1, 2), vlan_index()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
pdnVlanInbandMgmtVlanId.setStatus('current')
if mibBuilder.loadTexts:
pdnVlanInbandMgmtVlanId.setDescription('The VLAN ID assigned to the In-Band Management Channel.')
pdn_vlan_inband_mgmt_vlan_id2 = mib_scalar((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 46, 1, 3), vlan_index()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
pdnVlanInbandMgmtVlanId2.setStatus('current')
if mibBuilder.loadTexts:
pdnVlanInbandMgmtVlanId2.setDescription('The VLAN ID assigned to the second In-Band Management Channel. If the agent does not support a second In-Band Management Channel, it should return NO-SUCH-NAME for the object. *** A VALUE OF 0 IS NOT PERMITTED TO BE RETURNED *** ')
pdn_vlan_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 46, 3, 1))
pdn_vlan_groups = mib_identifier((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 46, 3, 2))
pdn_vlan_mib_compliance = module_compliance((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 46, 3, 1, 1)).setObjects(('PDN-VLAN-MIB', 'pdnVlanReservedBlockGroup'), ('PDN-VLAN-MIB', 'pdnVlanInbandMgmtVlanGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
pdn_vlan_mib_compliance = pdnVlanMIBCompliance.setStatus('current')
if mibBuilder.loadTexts:
pdnVlanMIBCompliance.setDescription('The compliance statement for the pdnVlan entities which implement the pdnVlanMIB.')
pdn_vlan_obj_groups = mib_identifier((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 46, 3, 2, 1))
pdn_vlan_afn_groups = mib_identifier((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 46, 3, 2, 2))
pdn_vlan_ntfy_groups = mib_identifier((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 46, 3, 2, 3))
pdn_vlan_reserved_block_group = object_group((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 46, 3, 2, 1, 1)).setObjects(('PDN-VLAN-MIB', 'pdnVlanReservedBlockStart'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
pdn_vlan_reserved_block_group = pdnVlanReservedBlockGroup.setStatus('current')
if mibBuilder.loadTexts:
pdnVlanReservedBlockGroup.setDescription('Objects grouped for reserving a block of sequential VLANs.')
pdn_vlan_inband_mgmt_vlan_group = object_group((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 46, 3, 2, 1, 2)).setObjects(('PDN-VLAN-MIB', 'pdnVlanInbandMgmtVlanId'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
pdn_vlan_inband_mgmt_vlan_group = pdnVlanInbandMgmtVlanGroup.setStatus('current')
if mibBuilder.loadTexts:
pdnVlanInbandMgmtVlanGroup.setDescription('Objects grouped relating to the In-Band Managment VLAN.')
pdn_vlan_inband_mgmt_vlan2_group = object_group((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 46, 3, 2, 1, 3)).setObjects(('PDN-VLAN-MIB', 'pdnVlanInbandMgmtVlanId'), ('PDN-VLAN-MIB', 'pdnVlanInbandMgmtVlanId2'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
pdn_vlan_inband_mgmt_vlan2_group = pdnVlanInbandMgmtVlan2Group.setStatus('current')
if mibBuilder.loadTexts:
pdnVlanInbandMgmtVlan2Group.setDescription('Multiples objects grouped relating to the In-Band Managment VLAN.')
mibBuilder.exportSymbols('PDN-VLAN-MIB', pdnVlanObjects=pdnVlanObjects, PYSNMP_MODULE_ID=pdnVlanMIB, pdnVlanMIB=pdnVlanMIB, pdnVlanAFNs=pdnVlanAFNs, pdnVlanReservedBlockStart=pdnVlanReservedBlockStart, pdnVlanMIBCompliance=pdnVlanMIBCompliance, pdnVlanObjGroups=pdnVlanObjGroups, pdnVlanAfnGroups=pdnVlanAfnGroups, pdnVlanInbandMgmtVlanGroup=pdnVlanInbandMgmtVlanGroup, pdnVlanGroups=pdnVlanGroups, pdnVlanConformance=pdnVlanConformance, pdnVlanInbandMgmtVlanId=pdnVlanInbandMgmtVlanId, pdnVlanInbandMgmtVlanId2=pdnVlanInbandMgmtVlanId2, pdnVlanCompliances=pdnVlanCompliances, pdnVlanNotifications=pdnVlanNotifications, pdnVlanNtfyGroups=pdnVlanNtfyGroups, pdnVlanReservedBlockGroup=pdnVlanReservedBlockGroup, pdnVlanInbandMgmtVlan2Group=pdnVlanInbandMgmtVlan2Group)
|
students = []
second_grades = []
for _ in range(int(input())):
name = input()
score = float(input())
student = []
student.append(name)
student.append(score)
students.append(student)
my_min = float('Inf')
for student in students:
if student[1] <= my_min:
my_min = student[1]
for student in students:
if student[1] == my_min:
students.remove(student)
my_min = float('Inf')
for student in students:
if student[1] <= my_min:
my_min = student[1]
for student in students:
if student[1] == my_min:
second_grades.append(student[0])
second_grades.sort()
for el in second_grades:
print(el)
# print(students)
|
students = []
second_grades = []
for _ in range(int(input())):
name = input()
score = float(input())
student = []
student.append(name)
student.append(score)
students.append(student)
my_min = float('Inf')
for student in students:
if student[1] <= my_min:
my_min = student[1]
for student in students:
if student[1] == my_min:
students.remove(student)
my_min = float('Inf')
for student in students:
if student[1] <= my_min:
my_min = student[1]
for student in students:
if student[1] == my_min:
second_grades.append(student[0])
second_grades.sort()
for el in second_grades:
print(el)
|
# Write a function that takes an integer as an input and returns the sum of all numbers from the input down to 0.
def sum_to_zero(n):
# print base case
if n == 0:
return n
# if we are not at the base case - if n is not yet zero, then
print("This is a recursive function with input {0}".format(n))
# call the fnction recursively and remove one number from the stack to reach the base case
return n + sum_to_zero(n - 1)
# call the function with an input
print(sum_to_zero(10))
|
def sum_to_zero(n):
if n == 0:
return n
print('This is a recursive function with input {0}'.format(n))
return n + sum_to_zero(n - 1)
print(sum_to_zero(10))
|
input = "((((()(()(((((((()))(((()((((()())(())()(((()((((((()((()(()(((()(()((())))()((()()())))))))))()((((((())((()))(((((()(((((((((()()))((()(())()((())((()(()))((()))()))()(((((()(((()()))()())((()((((())()())()((((())()(()(()(((()(())(()(())(((((((())()()(((())(()(()(()(())))(()((((())((()))(((()(()()(((((()()(()(((()(((((())()))()((()(()))()((()((((())((((())(()(((())()()(()()()()()(())((((())((())(()()))()((((())))((((()())()((((())((()())((())(())(((((()((((()(((()((((())(()(((()()))()))((((((()((())()())))(((()(()))(()()(()(((()(()))((()()()())((()()()(((())())()())())())((()))(()(()))(((((()(()(())((()(())(())()((((()())()))((((())(())((())())((((()(((())(())((()()((((()((((((()(())()()(()(()()((((()))(())()())()))(())))(())))())()()(())(()))()((()(()(())()()))(()())))))(()))(()()))(())(((((()(()(()()((())()())))))((())())((())(()(())((()))(())(((()((((((((()()()(()))()()(((()))()((()()(())(())())()(()(())))(((((()(())(())(()))))())()))(()))()(()(((((((()((((())))())())())())()((((((((((((((()()((((((()()()())())()())())())(())(())))())((()())((()(()))))))()))))))))))))))))())((())((())()()))))))(((()((()(()()))((())(()()))()()())))(())))))))(()(((())))())()())))()()(())()))()(()))())((()()))))(()))))()))(()()(())))))))()(((()))))()(()))(())())))))()))((()))((()))())(())))))))))((((())()))()))()))())(())()()(())))())))(()())()))((()()(())))(())((((((()(())((()(((()(()()(())))()))))))()))()(()((()))()(()))(()(((())((((())())(())(()))))))))())))))))())())))))())))))()()(((())()(()))))))))())))))(())()()()))()))()))(()(())()()())())))))))())()(()(()))))()()()))))())(()))))()()))))()())))))(((())()()))(()))))))))))()()))))()()()))))(()())())()()())()(()))))()(()))(())))))))(((((())(())())()()))()()))(())))))()(()))))(())(()()))()())()))()))()))()))))())()()))())())))(()))(()))))))())()(((())()))))))))()))()())))())))())))()))))))))))()()))(()()))))))(())()(()))))())(()))))(()))))(()())))))())())()()))))())()))))))))(()))))()))))))()(()())))))))()))())))())))())))())))))))())(()()))))))(()())())))()())()))))))))))))))())))()(())))()))())()()(())(()()))(())))())()())(()(()(()))))())))))))))))())(()))()))()))))(())()())()())))))))))))()()))))))))))))())())))))(()())))))))))))())(())))()))))))))())())(()))()))(())))()))()()(())()))))))()((((())()))())())))))()))()))))((()())()))))())))(())))))))))))))))))()))))()()())()))()()))))())()))((()())))())))(()))(()())))))))()))()))))(())))))))(())))))())()()(()))())()))()()))))())()()))))())()))())))))))(()))))()())()))))))))(()))())))(()))()))))(())()))())())(())())())))))))((((())))))()))()))()())()(())))()))()))()())(()())()()(()())()))))())())))))(()))()))))())(()()(())))))(())()()((())())))))(())(())))))))())))))))))()(())))))))()())())())()(()))))))))(()))))))))())()()))()(()))))))()))))))())))))))(())))()()(())()())))))(((())))()((())()))())))(()()))())(())())))()(((()())))))()(()()())))()()(()()(()()))())()(()()()))())()()))()())(()))))())))))())))(())()()))))(()))))(())(()))(())))))()()))()))))())()))()()(())())))((()))())()))))))()()))))((()(()))))()()))))))())))))())(()((()())))))))))))()())())))()))(()))))))(()))(())()())))(()))))))))())()()()()))))(()())))))))((())))()))(()))(())(())()())()))))))))(())))())))(()))()()))(()()))(()))())))()(())))())((()((()(())))((())))()))))((((())())()())))(())))()))))))())(()()((())))())()(()())))))(()())()))())))))))((())())))))))(()(()))())()()(()()(((()(((()())))))()))))))()(())(()()((()()(())()()))())()())()))()())())())))))))(((())))))))()()))))))(((())()))(()()))(()()))))(()(()()((((())()())((()()))))(()(())))))()((()()()())()()((()((()()))(()))(((()()()))(((())))()(((())()))))))((()(())())))(()())(((((()(()))(()((()))(()())()))))(()(()))()(()))(())(((())(()()))))()()))(((()))))(()()()()))())))((()()()(())()))()))))()()))()))))))((((((()()()))))())((()()(((()))))(()(())(()()())())())))()(((()()))(())((())))(()))(()()()())((())())())(()))))()))()((()(())()(()()(())(()))(())()))(())(()))))(())(())())(()()(()((()()((())))((()))()((())))(((()()()()((((()))(()()))()()()(((())((())())(()()(()()()))()((())(())()))())(((()()(())))()((()()())()())(()(())())(((())(())())((())(())()(((()()))(())))((())(()())())(())((()()()((((((())))((()(((((())()))()))(())(()()))()))(())()()))(())((()()())()()(()))())()((())))()((()()())((((()())((())())())((()((()))()))((())((()()(()((()()(((())(()()))))((()((())()(((())(()((())())((())(()((((((())())()(()())()(())(((())((((((()(())(()((()()()((()()(()()()())))()()(((((()()))()((((((()))()(()(()(()(((()())((()))())()((()))(())))()))()()))())()()))())((((())(()(()))(((((((())(((()(((((()(((()()((((())(((())())))(()()()(()(()))()))((((((()))((()(((()(())((()((((()((((((())(((((())))(((()(()))))(((()(((())()((())(()((()))(((()()(((())((((()(()(((((()))(((()(((((((()(()()()(()(()(()()())(())(((((()(())())()())(()(()(()))()(()()()())(()()(()((()))()((())())()(()))((())(()))()(()))()(((()(()(()((((((()()()()())()(((((()()(((()()()((()(((((()))((((((((()()()(((((()))))))(()()()(())(()))(()()))))(())()))(((((()(((((()()(()(()())(((()))((((()((()(()(()((()(()((())))()(((()((()))((()))(((((((((()((()((()(())))()((((()((()()))((())(((()(((((()()(()(()()((()(()()()(((((((())())()())))))((((()()(()))()))(()((())()(()(((((((((()()(((()(()())(()((()())((())())((((()(((()(((()((((()((()((((()(()((((((())((((((((((((()()(()()((((((((((((((()((()()))()((((((((((((())((((()(()())((()(()(()))()(((((()()(((()()))()())(())((()(((((()((())(((((()((()(((((()))()()((((())()((((())(((((((((()(())(()(())))())(()((())(((())(())(())())(()(()(())()()((()((())()(((()(((((()(())))()(((()((())))((()()()(((()(((()((()(()(())(()((()())(()(()(((()(((((((((())(()((((()()))(()((((()()()()(((()((((((((()(()()((((((()(()()(()((()((((((((((()()(((((((()())(())))(((()()))(((((()((()()())(()()((((())((()((((()))))(())((()(()()(((()(()(((()((((()(((((()))())())(()((())()))(((()())((())((())((((()((()((((((())(()((((()()))((((((())()(()))((()(((())((((((((((()()(((((()(((((()((()()()((((())))(()))()((()(())()()((()((((((((((()((())(())(((((()(()(()()))((((()((((()()((()(((()(((((((((()(()((()((()))((((((()(((())()()((()(((((((()())))()()(()((()((()()(((()(()()()()((((()((())((((()(((((((((()(((()()(((()(()(((()(((()((())()(()((()(()(()(()))()(((()))(()((((()((())((((())((((((())(()))(()((((())((()(()((((((((()()((((((()(()(()()()(())((()((()()(((()(((((((()()((()(((((((()))(((((()(((()(()()()(()(((()((()()((())(()(((((((((()(()((()((((((()()((())()))(((((()((())()())()(((((((((((()))((((()()()()())(()()(()(()()))()))(()))(()(((()()))())(()(()))()()((())(()())()())()(()))()))(()()(()((((((())((()(((((((((((()(())()((()(()((()((()(()((()((((((((((()()())((())()(())))((())()())()(((((()(()())((((()((()(())(()))(((())()((()))(((((())(()))()()(()))(((())((((()((((()(())))(((((((()))))())()())(())((())()(()()((()(()))()(()()(()()((()())((())((()()))((((()))()()))(()()(())()()(((((()(())((()((((()))()))(()())())(((()()(()()))(())))))(()))((())(((((()((((()))()((((()))()((())(((())))(((()())))((()(()()(("
floor = 0
for char in input:
if(char == "("):
floor+=1
else:
floor-=1
print(floor)
|
input = '((((()(()(((((((()))(((()((((()())(())()(((()((((((()((()(()(((()(()((())))()((()()())))))))))()((((((())((()))(((((()(((((((((()()))((()(())()((())((()(()))((()))()))()(((((()(((()()))()())((()((((())()())()((((())()(()(()(((()(())(()(())(((((((())()()(((())(()(()(()(())))(()((((())((()))(((()(()()(((((()()(()(((()(((((())()))()((()(()))()((()((((())((((())(()(((())()()(()()()()()(())((((())((())(()()))()((((())))((((()())()((((())((()())((())(())(((((()((((()(((()((((())(()(((()()))()))((((((()((())()())))(((()(()))(()()(()(((()(()))((()()()())((()()()(((())())()())())())((()))(()(()))(((((()(()(())((()(())(())()((((()())()))((((())(())((())())((((()(((())(())((()()((((()((((((()(())()()(()(()()((((()))(())()())()))(())))(())))())()()(())(()))()((()(()(())()()))(()())))))(()))(()()))(())(((((()(()(()()((())()())))))((())())((())(()(())((()))(())(((()((((((((()()()(()))()()(((()))()((()()(())(())())()(()(())))(((((()(())(())(()))))())()))(()))()(()(((((((()((((())))())())())())()((((((((((((((()()((((((()()()())())()())())())(())(())))())((()())((()(()))))))()))))))))))))))))())((())((())()()))))))(((()((()(()()))((())(()()))()()())))(())))))))(()(((())))())()())))()()(())()))()(()))())((()()))))(()))))()))(()()(())))))))()(((()))))()(()))(())())))))()))((()))((()))())(())))))))))((((())()))()))()))())(())()()(())))())))(()())()))((()()(())))(())((((((()(())((()(((()(()()(())))()))))))()))()(()((()))()(()))(()(((())((((())())(())(()))))))))())))))))())())))))())))))()()(((())()(()))))))))())))))(())()()()))()))()))(()(())()()())())))))))())()(()(()))))()()()))))())(()))))()()))))()())))))(((())()()))(()))))))))))()()))))()()()))))(()())())()()())()(()))))()(()))(())))))))(((((())(())())()()))()()))(())))))()(()))))(())(()()))()())()))()))()))()))))())()()))())())))(()))(()))))))())()(((())()))))))))()))()())))())))())))()))))))))))()()))(()()))))))(())()(()))))())(()))))(()))))(()())))))())())()()))))())()))))))))(()))))()))))))()(()())))))))()))())))())))())))())))))))())(()()))))))(()())())))()())()))))))))))))))())))()(())))()))())()()(())(()()))(())))())()())(()(()(()))))())))))))))))())(()))()))()))))(())()())()())))))))))))()()))))))))))))())())))))(()())))))))))))())(())))()))))))))())())(()))()))(())))()))()()(())()))))))()((((())()))())())))))()))()))))((()())()))))())))(())))))))))))))))))()))))()()())()))()()))))())()))((()())))())))(()))(()())))))))()))()))))(())))))))(())))))())()()(()))())()))()()))))())()()))))())()))())))))))(()))))()())()))))))))(()))())))(()))()))))(())()))())())(())())())))))))((((())))))()))()))()())()(())))()))()))()())(()())()()(()())()))))())())))))(()))()))))())(()()(())))))(())()()((())())))))(())(())))))))())))))))))()(())))))))()())())())()(()))))))))(()))))))))())()()))()(()))))))()))))))())))))))(())))()()(())()())))))(((())))()((())()))())))(()()))())(())())))()(((()())))))()(()()())))()()(()()(()()))())()(()()()))())()()))()())(()))))())))))())))(())()()))))(()))))(())(()))(())))))()()))()))))())()))()()(())())))((()))())()))))))()()))))((()(()))))()()))))))())))))())(()((()())))))))))))()())())))()))(()))))))(()))(())()())))(()))))))))())()()()()))))(()())))))))((())))()))(()))(())(())()())()))))))))(())))())))(()))()()))(()()))(()))())))()(())))())((()((()(())))((())))()))))((((())())()())))(())))()))))))())(()()((())))())()(()())))))(()())()))())))))))((())())))))))(()(()))())()()(()()(((()(((()())))))()))))))()(())(()()((()()(())()()))())()())()))()())())())))))))(((())))))))()()))))))(((())()))(()()))(()()))))(()(()()((((())()())((()()))))(()(())))))()((()()()())()()((()((()()))(()))(((()()()))(((())))()(((())()))))))((()(())())))(()())(((((()(()))(()((()))(()())()))))(()(()))()(()))(())(((())(()()))))()()))(((()))))(()()()()))())))((()()()(())()))()))))()()))()))))))((((((()()()))))())((()()(((()))))(()(())(()()())())())))()(((()()))(())((())))(()))(()()()())((())())())(()))))()))()((()(())()(()()(())(()))(())()))(())(()))))(())(())())(()()(()((()()((())))((()))()((())))(((()()()()((((()))(()()))()()()(((())((())())(()()(()()()))()((())(())()))())(((()()(())))()((()()())()())(()(())())(((())(())())((())(())()(((()()))(())))((())(()())())(())((()()()((((((())))((()(((((())()))()))(())(()()))()))(())()()))(())((()()())()()(()))())()((())))()((()()())((((()())((())())())((()((()))()))((())((()()(()((()()(((())(()()))))((()((())()(((())(()((())())((())(()((((((())())()(()())()(())(((())((((((()(())(()((()()()((()()(()()()())))()()(((((()()))()((((((()))()(()(()(()(((()())((()))())()((()))(())))()))()()))())()()))())((((())(()(()))(((((((())(((()(((((()(((()()((((())(((())())))(()()()(()(()))()))((((((()))((()(((()(())((()((((()((((((())(((((())))(((()(()))))(((()(((())()((())(()((()))(((()()(((())((((()(()(((((()))(((()(((((((()(()()()(()(()(()()())(())(((((()(())())()())(()(()(()))()(()()()())(()()(()((()))()((())())()(()))((())(()))()(()))()(((()(()(()((((((()()()()())()(((((()()(((()()()((()(((((()))((((((((()()()(((((()))))))(()()()(())(()))(()()))))(())()))(((((()(((((()()(()(()())(((()))((((()((()(()(()((()(()((())))()(((()((()))((()))(((((((((()((()((()(())))()((((()((()()))((())(((()(((((()()(()(()()((()(()()()(((((((())())()())))))((((()()(()))()))(()((())()(()(((((((((()()(((()(()())(()((()())((())())((((()(((()(((()((((()((()((((()(()((((((())((((((((((((()()(()()((((((((((((((()((()()))()((((((((((((())((((()(()())((()(()(()))()(((((()()(((()()))()())(())((()(((((()((())(((((()((()(((((()))()()((((())()((((())(((((((((()(())(()(())))())(()((())(((())(())(())())(()(()(())()()((()((())()(((()(((((()(())))()(((()((())))((()()()(((()(((()((()(()(())(()((()())(()(()(((()(((((((((())(()((((()()))(()((((()()()()(((()((((((((()(()()((((((()(()()(()((()((((((((((()()(((((((()())(())))(((()()))(((((()((()()())(()()((((())((()((((()))))(())((()(()()(((()(()(((()((((()(((((()))())())(()((())()))(((()())((())((())((((()((()((((((())(()((((()()))((((((())()(()))((()(((())((((((((((()()(((((()(((((()((()()()((((())))(()))()((()(())()()((()((((((((((()((())(())(((((()(()(()()))((((()((((()()((()(((()(((((((((()(()((()((()))((((((()(((())()()((()(((((((()())))()()(()((()((()()(((()(()()()()((((()((())((((()(((((((((()(((()()(((()(()(((()(((()((())()(()((()(()(()(()))()(((()))(()((((()((())((((())((((((())(()))(()((((())((()(()((((((((()()((((((()(()(()()()(())((()((()()(((()(((((((()()((()(((((((()))(((((()(((()(()()()(()(((()((()()((())(()(((((((((()(()((()((((((()()((())()))(((((()((())()())()(((((((((((()))((((()()()()())(()()(()(()()))()))(()))(()(((()()))())(()(()))()()((())(()())()())()(()))()))(()()(()((((((())((()(((((((((((()(())()((()(()((()((()(()((()((((((((((()()())((())()(())))((())()())()(((((()(()())((((()((()(())(()))(((())()((()))(((((())(()))()()(()))(((())((((()((((()(())))(((((((()))))())()())(())((())()(()()((()(()))()(()()(()()((()())((())((()()))((((()))()()))(()()(())()()(((((()(())((()((((()))()))(()())())(((()()(()()))(())))))(()))((())(((((()((((()))()((((()))()((())(((())))(((()())))((()(()()(('
floor = 0
for char in input:
if char == '(':
floor += 1
else:
floor -= 1
print(floor)
|
"""Top-level package for Takes."""
__author__ = """Chris Lawlor"""
__email__ = "[email protected]"
__version__ = "0.2.0"
|
"""Top-level package for Takes."""
__author__ = 'Chris Lawlor'
__email__ = '[email protected]'
__version__ = '0.2.0'
|
menu = ix.application.get_main_menu()
menu.add_command("Layout>")
menu.add_show_callback("Layout>", "./_show.py")
menu.add_command("Layout>Presets>")
menu.add_show_callback("Layout>", "./presets_show.py")
menu.add_command("Layout>Presets>separator")
menu.add_command("Layout>Presets>Store...", "./presets_store.py")
menu.add_command("Layout>Presets>Manage...", "./presets_manage.py")
menu.add_command("Layout>separator")
item = menu.add_command("Layout>Freeze", "./freeze.py")
item.set_checkable(True)
menu.add_command("Layout>separator")
menu.add_command("Layout>Shelf Toolbar>Show/Hide", "./shelf_toolbar_show_hide.py")
menu.add_command("Layout>Shelf Toolbar>Reset To Default", "./shelf_toolbar_reset_to_default.py")
menu.add_command("Layout>separator")
menu.add_command("Layout>Clear All Viewports", "./clear_all_viewports.py")
|
menu = ix.application.get_main_menu()
menu.add_command('Layout>')
menu.add_show_callback('Layout>', './_show.py')
menu.add_command('Layout>Presets>')
menu.add_show_callback('Layout>', './presets_show.py')
menu.add_command('Layout>Presets>separator')
menu.add_command('Layout>Presets>Store...', './presets_store.py')
menu.add_command('Layout>Presets>Manage...', './presets_manage.py')
menu.add_command('Layout>separator')
item = menu.add_command('Layout>Freeze', './freeze.py')
item.set_checkable(True)
menu.add_command('Layout>separator')
menu.add_command('Layout>Shelf Toolbar>Show/Hide', './shelf_toolbar_show_hide.py')
menu.add_command('Layout>Shelf Toolbar>Reset To Default', './shelf_toolbar_reset_to_default.py')
menu.add_command('Layout>separator')
menu.add_command('Layout>Clear All Viewports', './clear_all_viewports.py')
|
#!/usr/bin/env python
FIRST_VALUE = 20151125
INPUT_COLUMN = 3083
INPUT_ROW = 2978
MAGIC_MULTIPLIER = 252533
MAGIC_MOD = 33554393
def sequence_number(row, column):
return sum(range(row + column - 1)) + column
def next_code(code):
return (code * MAGIC_MULTIPLIER) % MAGIC_MOD
if __name__ == '__main__':
code_sequence_number = sequence_number(INPUT_ROW, INPUT_COLUMN)
current_code = FIRST_VALUE
for i in range(code_sequence_number - 1):
current_code = next_code(current_code)
print(current_code)
|
first_value = 20151125
input_column = 3083
input_row = 2978
magic_multiplier = 252533
magic_mod = 33554393
def sequence_number(row, column):
return sum(range(row + column - 1)) + column
def next_code(code):
return code * MAGIC_MULTIPLIER % MAGIC_MOD
if __name__ == '__main__':
code_sequence_number = sequence_number(INPUT_ROW, INPUT_COLUMN)
current_code = FIRST_VALUE
for i in range(code_sequence_number - 1):
current_code = next_code(current_code)
print(current_code)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.