content stringlengths 7 1.05M | fixed_cases stringlengths 1 1.28M |
|---|---|
class NoSessionError(Exception):
"""Raised when a model from :mod:`.models` wants to ``create``/``update``
but it doesn't have an :class:`atomx.Atomx` session yet.
"""
pass
class InvalidCredentials(Exception):
"""Raised when trying to login with the wrong e-mail or password."""
pass
class APIError(Exception):
"""Raised when the atomx api returns an error that is not caught otherwise."""
pass
class MissingArgumentError(Exception):
"""Raised when argument is missing."""
pass
class ModelNotFoundError(Exception):
"""Raised when trying to (re-)load a model that is not in the api."""
pass
class NoPandasInstalledError(Exception):
"""Raised when trying to access ``report.pandas`` without :mod:`pandas` installed."""
pass
| class Nosessionerror(Exception):
"""Raised when a model from :mod:`.models` wants to ``create``/``update``
but it doesn't have an :class:`atomx.Atomx` session yet.
"""
pass
class Invalidcredentials(Exception):
"""Raised when trying to login with the wrong e-mail or password."""
pass
class Apierror(Exception):
"""Raised when the atomx api returns an error that is not caught otherwise."""
pass
class Missingargumenterror(Exception):
"""Raised when argument is missing."""
pass
class Modelnotfounderror(Exception):
"""Raised when trying to (re-)load a model that is not in the api."""
pass
class Nopandasinstallederror(Exception):
"""Raised when trying to access ``report.pandas`` without :mod:`pandas` installed."""
pass |
class Solution:
def dfs(self,row_cnt:int, col_cnt:int, i:int, j:int, solve_dict:dict):
if (i, j) in solve_dict:
return solve_dict[(i,j)]
right_cnt = 0
down_cnt = 0
#right
if i + 1 < row_cnt:
if (i + 1, j) in solve_dict:
right_cnt = solve_dict[(i + 1, j)]
else:
right_cnt = self.dfs(row_cnt, col_cnt,i + 1, j,solve_dict)
#left
if j + 1 < col_cnt:
if (i, j + 1) in solve_dict:
down_cnt = solve_dict[(i, j + 1)]
else:
down_cnt = self.dfs(row_cnt, col_cnt, i, j + 1, solve_dict)
res = right_cnt + down_cnt
solve_dict[(i, j)] = res
return res
def uniquePaths(self, m: int, n: int):
if not n or not m:
return 0
if n == 1:
return 1
if m == 1:
return 1
res = None
res = self.dfs(m, n, 0, 0, {(m - 1, n - 1):1})
return res
sl = Solution()
res = sl.uniquePaths(3, 2)
print(res)
sl = Solution()
res = sl.uniquePaths(7,3)
print(res) | class Solution:
def dfs(self, row_cnt: int, col_cnt: int, i: int, j: int, solve_dict: dict):
if (i, j) in solve_dict:
return solve_dict[i, j]
right_cnt = 0
down_cnt = 0
if i + 1 < row_cnt:
if (i + 1, j) in solve_dict:
right_cnt = solve_dict[i + 1, j]
else:
right_cnt = self.dfs(row_cnt, col_cnt, i + 1, j, solve_dict)
if j + 1 < col_cnt:
if (i, j + 1) in solve_dict:
down_cnt = solve_dict[i, j + 1]
else:
down_cnt = self.dfs(row_cnt, col_cnt, i, j + 1, solve_dict)
res = right_cnt + down_cnt
solve_dict[i, j] = res
return res
def unique_paths(self, m: int, n: int):
if not n or not m:
return 0
if n == 1:
return 1
if m == 1:
return 1
res = None
res = self.dfs(m, n, 0, 0, {(m - 1, n - 1): 1})
return res
sl = solution()
res = sl.uniquePaths(3, 2)
print(res)
sl = solution()
res = sl.uniquePaths(7, 3)
print(res) |
'''
Kept for python2.7 compatibility.
'''
__all__ = []
| """
Kept for python2.7 compatibility.
"""
__all__ = [] |
"""
stringjumble.py
Author: johari
Credit: megsnyder, https://www.geeksforgeeks.org/reverse-string-python-5-different-ways/https://www.geeksforgeeks.org/reverse-string-python-5-different-ways/
https://stackoverflow.com/questions/529424/traverse-a-list-in-reverse-order-in-python
https://stackoverflow.com/questions/4481724/convert-a-list-of-characters-into-a-string
noah
Assignment:
The purpose of this challenge is to gain proficiency with
manipulating lists.
Write and submit a Python program that accepts a string from
the user and prints it back in three different ways:
* With all letters in reverse.
* With words in reverse order, but letters within each word in
the correct order.
* With all words in correct order, but letters reversed within
the words.
Output of your program should look like this:
Please enter a string of text (the bigger the better): There are a few techniques or tricks that you may find handy
You entered "There are a few techniques or tricks that you may find handy". Now jumble it:
ydnah dnif yam uoy taht skcirt ro seuqinhcet wef a era erehT
handy find may you that tricks or techniques few a are There
erehT era a wef seuqinhcet ro skcirt taht uoy yam dnif ydnah
"""
st= input("Please enter a string of text (the bigger the better): ")
print('You entered "' + st + '". Now jumble it: ')
def reverse(st):
str = ""
for i in st:
str = i + str
return str
t = (reverse(st))
tt=list(t)
jj=len(tt)
print(str(t))
l= list(st)
j=len(l)
k=0
m=0
'''
for f in st:
if f == " ":
w = [j-k:j-j:1])
print(w)
m+=len(w)
k+=1
'''
for i in reversed(l):
if i == " ":
r=(l[j-k:j-m:1])
c = ""
for i in r:
c += i
m+=len(r)
print(c, end = ' ')
k+=1
d=((l[:j-m]))
c = ''.join(d)
print(c)
kk=0
mm=0
for ii in reversed(tt):
if ii == " ":
rr=(tt[jj-kk:jj-mm:1])
cc = ""
for ii in rr:
cc += ii
print((cc), end = ' ' )
mm+=len(rr)
kk+=1
dd=((tt[:jj-mm]))
cc = ''.join(dd)
print(cc)
| """
stringjumble.py
Author: johari
Credit: megsnyder, https://www.geeksforgeeks.org/reverse-string-python-5-different-ways/https://www.geeksforgeeks.org/reverse-string-python-5-different-ways/
https://stackoverflow.com/questions/529424/traverse-a-list-in-reverse-order-in-python
https://stackoverflow.com/questions/4481724/convert-a-list-of-characters-into-a-string
noah
Assignment:
The purpose of this challenge is to gain proficiency with
manipulating lists.
Write and submit a Python program that accepts a string from
the user and prints it back in three different ways:
* With all letters in reverse.
* With words in reverse order, but letters within each word in
the correct order.
* With all words in correct order, but letters reversed within
the words.
Output of your program should look like this:
Please enter a string of text (the bigger the better): There are a few techniques or tricks that you may find handy
You entered "There are a few techniques or tricks that you may find handy". Now jumble it:
ydnah dnif yam uoy taht skcirt ro seuqinhcet wef a era erehT
handy find may you that tricks or techniques few a are There
erehT era a wef seuqinhcet ro skcirt taht uoy yam dnif ydnah
"""
st = input('Please enter a string of text (the bigger the better): ')
print('You entered "' + st + '". Now jumble it: ')
def reverse(st):
str = ''
for i in st:
str = i + str
return str
t = reverse(st)
tt = list(t)
jj = len(tt)
print(str(t))
l = list(st)
j = len(l)
k = 0
m = 0
'\nfor f in st:\n if f == " ":\n w = [j-k:j-j:1])\n print(w)\n m+=len(w)\n k+=1\n'
for i in reversed(l):
if i == ' ':
r = l[j - k:j - m:1]
c = ''
for i in r:
c += i
m += len(r)
print(c, end=' ')
k += 1
d = l[:j - m]
c = ''.join(d)
print(c)
kk = 0
mm = 0
for ii in reversed(tt):
if ii == ' ':
rr = tt[jj - kk:jj - mm:1]
cc = ''
for ii in rr:
cc += ii
print(cc, end=' ')
mm += len(rr)
kk += 1
dd = tt[:jj - mm]
cc = ''.join(dd)
print(cc) |
STATE_NOT_STARTED = "NOT_STARTED"
STATE_COIN_FLIPPED = "COIN_FLIPPED"
STATE_DRAFT_COMPLETE = "COMPLETE"
STATE_BANNING = "BANNING"
STATE_PICKING = "PICKING"
USER_READABLE_STATE_MAP = {
STATE_NOT_STARTED: "Not started",
STATE_BANNING: "{} Ban",
STATE_PICKING: "{} Pick",
STATE_DRAFT_COMPLETE: "Draft complete"
}
NEXT_STATE = {
STATE_BANNING: STATE_PICKING,
STATE_PICKING: STATE_DRAFT_COMPLETE
}
class Draft:
def __init__(self, room_id, player_one, player_two, map_pool, draft_type):
self.room_id = room_id
self.banned_maps = []
self.picked_maps = []
self.player_one = player_one
self.player_two = player_two
self.map_pool = map_pool
self.current_player = None
self.state = STATE_NOT_STARTED
self.start_player = None
self.coin_flip_winner = None
self.first_spy = None
self.draft_type = draft_type
def flip_coin(self, winner):
self.coin_flip_winner = winner
self.state = STATE_COIN_FLIPPED
def coin_flip_loser(self):
if self.coin_flip_winner == self.player_one:
return self.player_two
return self.player_one
def set_start_player(self, player_no):
if player_no == 1:
self.start_player = self.player_one
else:
self.start_player = self.player_two
def _swap_player(self):
if self.current_player == self.player_one:
self.current_player = self.player_two
else:
self.current_player = self.player_one
def _banning_complete(self):
return len(self.banned_maps) < self.draft_type.nr_bans * 2
def _picking_complete(self):
return len(self.picked_maps) < self.draft_type.nr_picks * 2
def _advance_state(self):
if not(self.state == STATE_BANNING and self._banning_complete()
or self.state == STATE_PICKING and self._picking_complete()):
self.state = NEXT_STATE[self.state]
def mark_map(self, map, is_pick):
if map is None:
self.banned_maps.append("Nothing")
elif self.state.startswith("BAN"):
self.banned_maps.append(map.name)
self.map_pool.remove(map)
else:
map_name = map.map_mode_name(is_pick)
self.picked_maps.append(map_name)
for x in [x for x in self.map_pool if x.family == map.family]:
self.map_pool.remove(x)
self._advance_state()
self._swap_player()
def start_draft(self):
self.current_player = self.start_player
self.state = STATE_BANNING
def user_readable_state(self):
if self.state == STATE_BANNING:
return USER_READABLE_STATE_MAP[self.state].format(self.ordinal((len(self.banned_maps)+1)))
elif self.state == STATE_PICKING:
return USER_READABLE_STATE_MAP[self.state].format(self.ordinal((len(self.picked_maps)+1)))
else:
return USER_READABLE_STATE_MAP[self.state]
def serializable_bans(self):
bans = []
curr = self.start_player
for x in self.banned_maps:
bans.append({
'picker': curr,
'map': x
})
if curr == self.player_one:
curr = self.player_two
else:
curr = self.player_one
return bans
def serializable_picks(self):
picks = []
curr = self.start_player
for x in self.picked_maps:
picks.append({
'picker': curr,
'map': x
})
if curr == self.player_one:
curr = self.player_two
else:
curr = self.player_one
return picks
def draft_complete(self):
return self.state == STATE_DRAFT_COMPLETE
ordinal = lambda self, n: "%d%s" % (n, "tsnrhtdd"[(n / 10 % 10 != 1)*(n % 10 < 4)*n % 10 :: 4])
| state_not_started = 'NOT_STARTED'
state_coin_flipped = 'COIN_FLIPPED'
state_draft_complete = 'COMPLETE'
state_banning = 'BANNING'
state_picking = 'PICKING'
user_readable_state_map = {STATE_NOT_STARTED: 'Not started', STATE_BANNING: '{} Ban', STATE_PICKING: '{} Pick', STATE_DRAFT_COMPLETE: 'Draft complete'}
next_state = {STATE_BANNING: STATE_PICKING, STATE_PICKING: STATE_DRAFT_COMPLETE}
class Draft:
def __init__(self, room_id, player_one, player_two, map_pool, draft_type):
self.room_id = room_id
self.banned_maps = []
self.picked_maps = []
self.player_one = player_one
self.player_two = player_two
self.map_pool = map_pool
self.current_player = None
self.state = STATE_NOT_STARTED
self.start_player = None
self.coin_flip_winner = None
self.first_spy = None
self.draft_type = draft_type
def flip_coin(self, winner):
self.coin_flip_winner = winner
self.state = STATE_COIN_FLIPPED
def coin_flip_loser(self):
if self.coin_flip_winner == self.player_one:
return self.player_two
return self.player_one
def set_start_player(self, player_no):
if player_no == 1:
self.start_player = self.player_one
else:
self.start_player = self.player_two
def _swap_player(self):
if self.current_player == self.player_one:
self.current_player = self.player_two
else:
self.current_player = self.player_one
def _banning_complete(self):
return len(self.banned_maps) < self.draft_type.nr_bans * 2
def _picking_complete(self):
return len(self.picked_maps) < self.draft_type.nr_picks * 2
def _advance_state(self):
if not (self.state == STATE_BANNING and self._banning_complete() or (self.state == STATE_PICKING and self._picking_complete())):
self.state = NEXT_STATE[self.state]
def mark_map(self, map, is_pick):
if map is None:
self.banned_maps.append('Nothing')
elif self.state.startswith('BAN'):
self.banned_maps.append(map.name)
self.map_pool.remove(map)
else:
map_name = map.map_mode_name(is_pick)
self.picked_maps.append(map_name)
for x in [x for x in self.map_pool if x.family == map.family]:
self.map_pool.remove(x)
self._advance_state()
self._swap_player()
def start_draft(self):
self.current_player = self.start_player
self.state = STATE_BANNING
def user_readable_state(self):
if self.state == STATE_BANNING:
return USER_READABLE_STATE_MAP[self.state].format(self.ordinal(len(self.banned_maps) + 1))
elif self.state == STATE_PICKING:
return USER_READABLE_STATE_MAP[self.state].format(self.ordinal(len(self.picked_maps) + 1))
else:
return USER_READABLE_STATE_MAP[self.state]
def serializable_bans(self):
bans = []
curr = self.start_player
for x in self.banned_maps:
bans.append({'picker': curr, 'map': x})
if curr == self.player_one:
curr = self.player_two
else:
curr = self.player_one
return bans
def serializable_picks(self):
picks = []
curr = self.start_player
for x in self.picked_maps:
picks.append({'picker': curr, 'map': x})
if curr == self.player_one:
curr = self.player_two
else:
curr = self.player_one
return picks
def draft_complete(self):
return self.state == STATE_DRAFT_COMPLETE
ordinal = lambda self, n: '%d%s' % (n, 'tsnrhtdd'[(n / 10 % 10 != 1) * (n % 10 < 4) * n % 10::4]) |
class SearchProvider:
def search(self) -> list:
""" Searches a remote data source """
return []
| class Searchprovider:
def search(self) -> list:
""" Searches a remote data source """
return [] |
#!/usr/bin/env python3
try: # try the following code
print(a) # won't work since we have not defined a
except: # if there is ANY error
print('a is not defined!') # print this
try:
print(a)
except NameError: # if the error is SPECIFICALLY NameError
print('a is still not defined!') # print this
except: # if error is anything else
print('Something else went wrong.')
print(a) # because we didn't use 'try' this will crash our code | try:
print(a)
except:
print('a is not defined!')
try:
print(a)
except NameError:
print('a is still not defined!')
except:
print('Something else went wrong.')
print(a) |
n, k = map(int, input().split())
coin = sorted([int(input()) for _ in range(n)])
lst = [[0]*(k+1)]*n+[[1]*(k+1)]
lst[0] = [1 if j%coin[0]==0 else 0 for j in range(0,k+1)]
for i in range(0, len(coin)):
lst[i] = [sum([lst[i-1][j - (k * coin[i])] for k in range((j//coin[i])+1)]) for j in range(k+1)]
print(lst[n-1][k]) | (n, k) = map(int, input().split())
coin = sorted([int(input()) for _ in range(n)])
lst = [[0] * (k + 1)] * n + [[1] * (k + 1)]
lst[0] = [1 if j % coin[0] == 0 else 0 for j in range(0, k + 1)]
for i in range(0, len(coin)):
lst[i] = [sum([lst[i - 1][j - k * coin[i]] for k in range(j // coin[i] + 1)]) for j in range(k + 1)]
print(lst[n - 1][k]) |
"""Top-level package for oda-ops."""
__author__ = """Volodymyr Savchenko"""
__email__ = 'Volodymyr.Savchenko@unige.ch'
__version__ = '0.1.0'
| """Top-level package for oda-ops."""
__author__ = 'Volodymyr Savchenko'
__email__ = 'Volodymyr.Savchenko@unige.ch'
__version__ = '0.1.0' |
class Singleton(type):
_instances = {}
def __call__(cls, *args, **kwargs):
class_name = cls.__name__
if class_name not in cls._instances:
cls._instances[class_name] = super(Singleton, cls).__call__(*args, **kwargs)
return cls._instances[class_name]
| class Singleton(type):
_instances = {}
def __call__(cls, *args, **kwargs):
class_name = cls.__name__
if class_name not in cls._instances:
cls._instances[class_name] = super(Singleton, cls).__call__(*args, **kwargs)
return cls._instances[class_name] |
{
"targets": [
{
"target_name": "samplerproxy",
"sources": [ "src/node_sampler_proxy.cpp" ],
"include_dirs": [
# Path to hopper root
],
"libraries": [
# Path to hopper framework library
# Path to hopper histogram library
],
"cflags" : [ "-std=c++11", "-stdlib=libc++" ],
"conditions": [
[ 'OS!="win"', {
"cflags+": [ "-std=c++11" ],
"cflags_c+": [ "-std=c++11" ],
"cflags_cc+": [ "-std=c++11" ],
}],
[ 'OS=="mac"', {
"xcode_settings": {
"OTHER_CPLUSPLUSFLAGS" : [ "-std=c++11", "-stdlib=libc++" ],
"OTHER_LDFLAGS": [ "-stdlib=libc++" ],
"MACOSX_DEPLOYMENT_TARGET": "10.7"
},
}],
],
}
]
}
| {'targets': [{'target_name': 'samplerproxy', 'sources': ['src/node_sampler_proxy.cpp'], 'include_dirs': [], 'libraries': [], 'cflags': ['-std=c++11', '-stdlib=libc++'], 'conditions': [['OS!="win"', {'cflags+': ['-std=c++11'], 'cflags_c+': ['-std=c++11'], 'cflags_cc+': ['-std=c++11']}], ['OS=="mac"', {'xcode_settings': {'OTHER_CPLUSPLUSFLAGS': ['-std=c++11', '-stdlib=libc++'], 'OTHER_LDFLAGS': ['-stdlib=libc++'], 'MACOSX_DEPLOYMENT_TARGET': '10.7'}}]]}]} |
class Solution:
def judgeCircle(self, moves: str) -> bool:
M = {
'U': (0, -1),
'D': (0, 1),
'R': (1, 0),
'L': (-1, 0)
}
x, y = 0, 0
for move in moves:
dx, dy = M[move]
x += dx
y += dy
return x == 0 and y == 0
| class Solution:
def judge_circle(self, moves: str) -> bool:
m = {'U': (0, -1), 'D': (0, 1), 'R': (1, 0), 'L': (-1, 0)}
(x, y) = (0, 0)
for move in moves:
(dx, dy) = M[move]
x += dx
y += dy
return x == 0 and y == 0 |
class Animal(object):
def run(self):
print('Animal is running...')
class Dog(Animal):
def run(self):
print('Dog is running...')
class Cat(Animal):
pass
dog = Dog()
dog.run()
cat = Cat()
cat.run() | class Animal(object):
def run(self):
print('Animal is running...')
class Dog(Animal):
def run(self):
print('Dog is running...')
class Cat(Animal):
pass
dog = dog()
dog.run()
cat = cat()
cat.run() |
__author__ = "Piotr Gawlowicz, Anatolij Zubow"
__copyright__ = "Copyright (c) 2015, Technische Universitat Berlin"
__version__ = "0.1.0"
__email__ = "{gawlowicz, zubow}@tkn.tu-berlin.de"
class NetDevice(object):
'''
Base Class for all Network Devices, i.e. wired/wireless
This basic functionality should be available on any device.
'''
''' Device control '''
def is_up(self):
'''
Check state of net device
'''
raise NotImplementedError
def set_up(self):
'''
Set-up net device, i.e. if-up
'''
raise NotImplementedError
def set_down(self):
'''
Set-down net device, i.e. if-down
'''
raise NotImplementedError
def set_hw_address(self, addr):
'''
Set device hardware address, i.e. MAC address
'''
raise NotImplementedError
def get_hw_address(self):
'''
Get device hardware address, i.e. MAC address
'''
raise NotImplementedError
def get_info(self, iface=None):
"""
Get generic information about this device - technology dependent
"""
raise NotImplementedError
def set_parameters(self, param_key_values):
"""
Generic function to set parameter on device.
"""
raise NotImplementedError
def get_parameters(self, param_key_list):
"""
Generic function to get parameter on device.
"""
raise NotImplementedError
'''
Configuration (add/del) of interfaces on that device. Note a network device can have
multiple interfaces, e.g. WiFi phy0 -> wlan0, mon0, ...
'''
def get_interfaces(self):
'''
Returns list of network interfaces of that device
'''
raise NotImplementedError
def get_interface_info(self, iface):
'''
Returns info about particular network interface
'''
raise NotImplementedError
def add_interface(self, iface, mode, **kwargs):
'''
Create wireless interface with name iface and mode
'''
raise NotImplementedError
def del_interface(self, iface):
'''
Delete interface by name
'''
raise NotImplementedError
def set_interface_up(self, iface):
'''
Set interface UP
'''
raise NotImplementedError
def set_interface_down(self, iface):
'''
Set interface DOWN
'''
raise NotImplementedError
def is_interface_up(self, iface):
'''
Check if interface is up
'''
raise NotImplementedError
''' Functionality on interface level '''
def get_link_info(self, iface):
'''
Get link info of interface
'''
raise NotImplementedError
def is_connected(self, iface):
'''
Check if interface is in connected state
'''
raise NotImplementedError
def connect(self, iface, **kwargs):
'''
Connects a given interface to some network
e.g. in WiFi network identified by SSID.
'''
raise NotImplementedError
def disconnect(self, iface):
'''
Disconnect interface from network
'''
raise NotImplementedError
''' DEBUG '''
def debug(self, out):
'''
For debug purposes
'''
raise NotImplementedError
| __author__ = 'Piotr Gawlowicz, Anatolij Zubow'
__copyright__ = 'Copyright (c) 2015, Technische Universitat Berlin'
__version__ = '0.1.0'
__email__ = '{gawlowicz, zubow}@tkn.tu-berlin.de'
class Netdevice(object):
"""
Base Class for all Network Devices, i.e. wired/wireless
This basic functionality should be available on any device.
"""
' Device control '
def is_up(self):
"""
Check state of net device
"""
raise NotImplementedError
def set_up(self):
"""
Set-up net device, i.e. if-up
"""
raise NotImplementedError
def set_down(self):
"""
Set-down net device, i.e. if-down
"""
raise NotImplementedError
def set_hw_address(self, addr):
"""
Set device hardware address, i.e. MAC address
"""
raise NotImplementedError
def get_hw_address(self):
"""
Get device hardware address, i.e. MAC address
"""
raise NotImplementedError
def get_info(self, iface=None):
"""
Get generic information about this device - technology dependent
"""
raise NotImplementedError
def set_parameters(self, param_key_values):
"""
Generic function to set parameter on device.
"""
raise NotImplementedError
def get_parameters(self, param_key_list):
"""
Generic function to get parameter on device.
"""
raise NotImplementedError
'\n Configuration (add/del) of interfaces on that device. Note a network device can have\n multiple interfaces, e.g. WiFi phy0 -> wlan0, mon0, ...\n '
def get_interfaces(self):
"""
Returns list of network interfaces of that device
"""
raise NotImplementedError
def get_interface_info(self, iface):
"""
Returns info about particular network interface
"""
raise NotImplementedError
def add_interface(self, iface, mode, **kwargs):
"""
Create wireless interface with name iface and mode
"""
raise NotImplementedError
def del_interface(self, iface):
"""
Delete interface by name
"""
raise NotImplementedError
def set_interface_up(self, iface):
"""
Set interface UP
"""
raise NotImplementedError
def set_interface_down(self, iface):
"""
Set interface DOWN
"""
raise NotImplementedError
def is_interface_up(self, iface):
"""
Check if interface is up
"""
raise NotImplementedError
' Functionality on interface level '
def get_link_info(self, iface):
"""
Get link info of interface
"""
raise NotImplementedError
def is_connected(self, iface):
"""
Check if interface is in connected state
"""
raise NotImplementedError
def connect(self, iface, **kwargs):
"""
Connects a given interface to some network
e.g. in WiFi network identified by SSID.
"""
raise NotImplementedError
def disconnect(self, iface):
"""
Disconnect interface from network
"""
raise NotImplementedError
' DEBUG '
def debug(self, out):
"""
For debug purposes
"""
raise NotImplementedError |
x=9
y=3
#Im only gonna comment here but i'll separate all the operater by new lines
#Same progression as the slides
print(x+y)
print(x-y)
print(x*y)
print(x/y)
print(x%y)
print(x**y)
x=9.919555555
print(x//y)
x=9
x+=3
print(x)
x=9
x-=3
print(x)
x*=3
print(x)
x/=3
print(x)
x ** 3
print(x)
x=9
x=3
print(x==y)
print(x!=y)
print(x>y)
print(x<y)
print(x>=y)
print(x<=y) | x = 9
y = 3
print(x + y)
print(x - y)
print(x * y)
print(x / y)
print(x % y)
print(x ** y)
x = 9.919555555
print(x // y)
x = 9
x += 3
print(x)
x = 9
x -= 3
print(x)
x *= 3
print(x)
x /= 3
print(x)
x ** 3
print(x)
x = 9
x = 3
print(x == y)
print(x != y)
print(x > y)
print(x < y)
print(x >= y)
print(x <= y) |
# Configuration
# Flask
DEBUG = True
UPLOAD_FOLDER = "/tmp/uploads"
MAX_CONTENT_LENGTH = 16 * 1024 * 1024 # 16MB
ALLOWED_EXTENSIONS = set(['txt', 'pdf', 'png', 'jpg', 'jpeg', 'gif'])
# Flask-SQLAlchemy
SQLALCHEMY_DATABASE_URI = "sqlite:////tmp/db.sqlite"
| debug = True
upload_folder = '/tmp/uploads'
max_content_length = 16 * 1024 * 1024
allowed_extensions = set(['txt', 'pdf', 'png', 'jpg', 'jpeg', 'gif'])
sqlalchemy_database_uri = 'sqlite:////tmp/db.sqlite' |
# Created by MechAviv
# Quest ID :: 34925
# Not coded yet
sm.setSpeakerID(3001508)
sm.setSpeakerType(3)
sm.flipDialogue()
sm.setBoxChat()
sm.boxChatPlayerAsSpeaker()
sm.setBoxOverrideSpeaker()
sm.flipBoxChat()
sm.flipBoxChatPlayerAsSpeaker()
sm.setColor(1)
sm.sendNext("#face0#We've got to find it. Looks like we've got no choice but to form a recovery team.")
sm.setSpeakerID(3001508)
sm.setSpeakerType(3)
sm.flipDialogue()
sm.setBoxChat()
sm.boxChatPlayerAsSpeaker()
sm.setBoxOverrideSpeaker()
sm.flipBoxChat()
sm.flipBoxChatPlayerAsSpeaker()
sm.setColor(1)
sm.sendSay("#face0#Let's say... Ferret, Salvo, and-")
sm.setSpeakerID(3001510)
sm.setSpeakerType(3)
sm.flipDialogue()
sm.setBoxChat()
sm.boxChatPlayerAsSpeaker()
sm.setBoxOverrideSpeaker()
sm.flipBoxChat()
sm.flipBoxChatPlayerAsSpeaker()
sm.setColor(1)
sm.sendSay("#face3#Ah! I don't want to go with him!")
# Unhandled Message [47] Packet: 2F 01 00 00 00 40 9C 00 00 00 00 00 00 28 00 00 00 00 00 00 80 05 BB 46 E6 17 02 0C 00 75 73 65 72 5F 6C 76 75 70 3D 31 39
sm.setSpeakerID(3001508)
sm.setSpeakerType(3)
sm.flipDialogue()
sm.setBoxChat()
sm.boxChatPlayerAsSpeaker()
sm.setBoxOverrideSpeaker()
sm.flipBoxChat()
sm.flipBoxChatPlayerAsSpeaker()
sm.setColor(1)
sm.sendSay("#face0#Ark, would you join the team too?")
sm.setSpeakerID(3001500)
sm.setSpeakerType(3)
sm.flipDialogue()
sm.setBoxChat()
sm.boxChatPlayerAsSpeaker()
sm.setBoxOverrideSpeaker()
sm.flipBoxChat()
sm.flipBoxChatPlayerAsSpeaker()
sm.setColor(1)
sm.sendSay("#face0#(Seeing more of this place might help me recover more of my memory.)")
sm.setSpeakerID(3001500)
sm.setSpeakerType(3)
sm.flipDialogue()
sm.setBoxChat()
sm.boxChatPlayerAsSpeaker()
sm.setBoxOverrideSpeaker()
sm.flipBoxChat()
sm.flipBoxChatPlayerAsSpeaker()
sm.setColor(1)
sm.sendSay("#face0#Yeah, I'll help.")
sm.setSpeakerID(3001508)
sm.setSpeakerType(3)
sm.flipDialogue()
sm.setBoxChat()
sm.boxChatPlayerAsSpeaker()
sm.setBoxOverrideSpeaker()
sm.flipBoxChat()
sm.flipBoxChatPlayerAsSpeaker()
sm.setColor(1)
sm.sendSay("#face0#Okay, then we should head back to the refuge and get ready. And Ferret, see if you can figure out what's wrong with the signal detector.")
sm.startQuest(34925)
# Update Quest Record EX | Quest ID: [34995] | Data: 00=h1;10=h0;01=h1;11=h0;02=h1;12=h0;13=h0;04=h0;23=h0;14=h0;05=h0;24=h0;15=h0;06=h0;16=h0;07=h0;17=h0;09=h0
# Unhandled Message [47] Packet: 2F 02 00 00 00 40 9C 00 00 00 00 00 00 28 00 00 00 00 00 00 80 05 BB 46 E6 17 02 0C 00 75 73 65 72 5F 6C 76 75 70 3D 31 39 B0 83 08 00 00 00 00 00 2E 02 00 00 00 00 00 80 05 BB 46 E6 17 02 00 00
sm.warp(402000600, 3)
| sm.setSpeakerID(3001508)
sm.setSpeakerType(3)
sm.flipDialogue()
sm.setBoxChat()
sm.boxChatPlayerAsSpeaker()
sm.setBoxOverrideSpeaker()
sm.flipBoxChat()
sm.flipBoxChatPlayerAsSpeaker()
sm.setColor(1)
sm.sendNext("#face0#We've got to find it. Looks like we've got no choice but to form a recovery team.")
sm.setSpeakerID(3001508)
sm.setSpeakerType(3)
sm.flipDialogue()
sm.setBoxChat()
sm.boxChatPlayerAsSpeaker()
sm.setBoxOverrideSpeaker()
sm.flipBoxChat()
sm.flipBoxChatPlayerAsSpeaker()
sm.setColor(1)
sm.sendSay("#face0#Let's say... Ferret, Salvo, and-")
sm.setSpeakerID(3001510)
sm.setSpeakerType(3)
sm.flipDialogue()
sm.setBoxChat()
sm.boxChatPlayerAsSpeaker()
sm.setBoxOverrideSpeaker()
sm.flipBoxChat()
sm.flipBoxChatPlayerAsSpeaker()
sm.setColor(1)
sm.sendSay("#face3#Ah! I don't want to go with him!")
sm.setSpeakerID(3001508)
sm.setSpeakerType(3)
sm.flipDialogue()
sm.setBoxChat()
sm.boxChatPlayerAsSpeaker()
sm.setBoxOverrideSpeaker()
sm.flipBoxChat()
sm.flipBoxChatPlayerAsSpeaker()
sm.setColor(1)
sm.sendSay('#face0#Ark, would you join the team too?')
sm.setSpeakerID(3001500)
sm.setSpeakerType(3)
sm.flipDialogue()
sm.setBoxChat()
sm.boxChatPlayerAsSpeaker()
sm.setBoxOverrideSpeaker()
sm.flipBoxChat()
sm.flipBoxChatPlayerAsSpeaker()
sm.setColor(1)
sm.sendSay('#face0#(Seeing more of this place might help me recover more of my memory.)')
sm.setSpeakerID(3001500)
sm.setSpeakerType(3)
sm.flipDialogue()
sm.setBoxChat()
sm.boxChatPlayerAsSpeaker()
sm.setBoxOverrideSpeaker()
sm.flipBoxChat()
sm.flipBoxChatPlayerAsSpeaker()
sm.setColor(1)
sm.sendSay("#face0#Yeah, I'll help.")
sm.setSpeakerID(3001508)
sm.setSpeakerType(3)
sm.flipDialogue()
sm.setBoxChat()
sm.boxChatPlayerAsSpeaker()
sm.setBoxOverrideSpeaker()
sm.flipBoxChat()
sm.flipBoxChatPlayerAsSpeaker()
sm.setColor(1)
sm.sendSay("#face0#Okay, then we should head back to the refuge and get ready. And Ferret, see if you can figure out what's wrong with the signal detector.")
sm.startQuest(34925)
sm.warp(402000600, 3) |
class user:
"""
Class that generates new instances of user identify for creating an account in the app
"""
listUser = []
def __init__(self, firstName, lastName, userName, passWord):
self.fname = firstName
self.lname = lastName
self.uname = userName
self.pword = passWord
def saveUser(self):
'''
saveUser method saves user objects into userList
'''
User.listUser.append(self)
@classmethod
def displayUser(cls):
'''
method that returns the user list
'''
return cls.listUser
@classmethod
def findByUserName(cls, uname):
'''
Method that takes in a username and returns a user that matches that username.
Args:
number: userName to search for
Returns :
Identity of person that matches the userName.
'''
for user in cls.listUser:
if user.uname == uname:
return user
@classmethod
def findUserUname(cls, uname):
'''
Method that takes in a number and returns a user that matches that username.
'''
for user in cls.listUser:
if user.uname == uname:
return user.uname
@classmethod
def checkUname(cls, uname):
'''
Method that takes in a username and returns a boolean.
'''
for user in cls.listUser:
if user.uname == uname:
return True
return False
@classmethod
def findUserPword(cls,pword):
'''
Method that takes in a password and returns a user that matches that password.
Args:
password: password to search for
Returns :
user that matches the password.
'''
for user in cls.listUser:
if user.pword == pword:
return user.pword
@classmethod
def checkPWord(cls, pword):
'''
Method that takes in a password and returns a boolean.
'''
for user in cls.listUser:
if user.pword == pword:
return True
return False
| class User:
"""
Class that generates new instances of user identify for creating an account in the app
"""
list_user = []
def __init__(self, firstName, lastName, userName, passWord):
self.fname = firstName
self.lname = lastName
self.uname = userName
self.pword = passWord
def save_user(self):
"""
saveUser method saves user objects into userList
"""
User.listUser.append(self)
@classmethod
def display_user(cls):
"""
method that returns the user list
"""
return cls.listUser
@classmethod
def find_by_user_name(cls, uname):
"""
Method that takes in a username and returns a user that matches that username.
Args:
number: userName to search for
Returns :
Identity of person that matches the userName.
"""
for user in cls.listUser:
if user.uname == uname:
return user
@classmethod
def find_user_uname(cls, uname):
"""
Method that takes in a number and returns a user that matches that username.
"""
for user in cls.listUser:
if user.uname == uname:
return user.uname
@classmethod
def check_uname(cls, uname):
"""
Method that takes in a username and returns a boolean.
"""
for user in cls.listUser:
if user.uname == uname:
return True
return False
@classmethod
def find_user_pword(cls, pword):
"""
Method that takes in a password and returns a user that matches that password.
Args:
password: password to search for
Returns :
user that matches the password.
"""
for user in cls.listUser:
if user.pword == pword:
return user.pword
@classmethod
def check_p_word(cls, pword):
"""
Method that takes in a password and returns a boolean.
"""
for user in cls.listUser:
if user.pword == pword:
return True
return False |
# https: // leetcode.com/problems/middle-of-the-linked-list/description/
#
# algorithms
# Easy (69.1%)
# Total Accepted: 6.1k
# Total Submissions: 8.8k
# beats 9.07% of python submissions
# Definition for singly-linked list.
# class ListNode(object):
# def __init__(self, x):
# self.val = x
# self.next = None
class Solution(object):
def middleNode(self, head):
"""
:type head: ListNode
:rtype: ListNode
"""
if not head.next:
return head
tail = head.next
while tail:
head = head.next
if not tail.next or not tail.next.next:
break
tail = tail.next.next
return head
| class Solution(object):
def middle_node(self, head):
"""
:type head: ListNode
:rtype: ListNode
"""
if not head.next:
return head
tail = head.next
while tail:
head = head.next
if not tail.next or not tail.next.next:
break
tail = tail.next.next
return head |
n = int(input())
a = [int(input()) for _ in range(n)]
pushed = [False] * n
cnt = 0
index = 0
while not (pushed[index]):
cnt += 1
pushed[index] = True
if index == 1:
cnt -= 1
print(cnt)
exit()
index = a[index] - 1
print(-1)
| n = int(input())
a = [int(input()) for _ in range(n)]
pushed = [False] * n
cnt = 0
index = 0
while not pushed[index]:
cnt += 1
pushed[index] = True
if index == 1:
cnt -= 1
print(cnt)
exit()
index = a[index] - 1
print(-1) |
single_port_ram = """module SinglePortRam #
(
parameter DATA_WIDTH = 8,
parameter ADDR_WIDTH = 4,
parameter RAM_DEPTH = 1 << ADDR_WIDTH
)
(
input clk,
input rst,
input [ADDR_WIDTH-1:0] ram_addr,
input [DATA_WIDTH-1:0] ram_d,
input ram_we,
output [DATA_WIDTH-1:0] ram_q
);
reg [DATA_WIDTH-1:0] mem [0:RAM_DEPTH-1];
reg [ADDR_WIDTH-1:0] read_addr;
assign ram_q = mem[read_addr];
always @ (posedge clk) begin
if (ram_we)
mem[ram_addr] <= ram_d;
read_addr <= ram_addr;
end
endmodule
"""
bidirectional_single_port_ram = """module BidirectionalSinglePortRam #
(
parameter DATA_WIDTH = 8,
parameter ADDR_WIDTH = 4,
parameter RAM_LENGTH = 16,
parameter RAM_DEPTH = 1 << (ADDR_WIDTH-1)
)
(
input clk,
input rst,
input [ADDR_WIDTH-1:0] ram_addr,
input [DATA_WIDTH-1:0] ram_d,
input ram_we,
output [DATA_WIDTH-1:0] ram_q,
output [ADDR_WIDTH-1:0] ram_len
);
reg [DATA_WIDTH-1:0] mem [0:RAM_DEPTH-1];
reg [ADDR_WIDTH-1:0] read_addr;
/*
integer i;
initial begin
for (i = 0; i < RAM_DEPTH; i = i + 1)
mem[i] = 0;
end
*/
function [ADDR_WIDTH-1:0] address (
input [ADDR_WIDTH-1:0] in_addr
);
begin
if (in_addr[ADDR_WIDTH-1] == 1'b1) begin
address = RAM_LENGTH + in_addr;
end else begin
address = in_addr;
end
end
endfunction // address
wire [ADDR_WIDTH-1:0] a;
assign a = address(ram_addr);
assign ram_q = mem[read_addr];
assign ram_len = RAM_LENGTH;
always @ (posedge clk) begin
if (ram_we)
mem[a] <= ram_d;
read_addr <= a;
end
endmodule
"""
fifo = """module FIFO #
(
parameter integer DATA_WIDTH = 32,
parameter integer ADDR_WIDTH = 2,
parameter integer LENGTH = 4
)
(
input clk,
input rst,
input [DATA_WIDTH - 1 : 0] din,
input write,
output full,
output [DATA_WIDTH - 1 : 0] dout,
input read,
output empty,
output will_full,
output will_empty
);
reg [ADDR_WIDTH - 1 : 0] head;
reg [ADDR_WIDTH - 1 : 0] tail;
reg [ADDR_WIDTH : 0] count;
wire we;
assign we = write && !full;
reg [DATA_WIDTH - 1 : 0] mem [0 : LENGTH - 1];
initial begin : initialize_mem
integer i;
for (i = 0; i < LENGTH; i = i + 1) begin
mem[i] = 0;
end
end
always @(posedge clk) begin
if (we) mem[head] <= din;
end
assign dout = mem[tail];
assign full = count >= LENGTH;
assign empty = count == 0;
assign will_full = write && !read && count == LENGTH-1;
assign will_empty = read && !write && count == 1;
always @(posedge clk) begin
if (rst == 1) begin
head <= 0;
tail <= 0;
count <= 0;
end else begin
if (write && read) begin
if (count == LENGTH) begin
count <= count - 1;
tail <= (tail == (LENGTH - 1)) ? 0 : tail + 1;
end else if (count == 0) begin
count <= count + 1;
head <= (head == (LENGTH - 1)) ? 0 : head + 1;
end else begin
count <= count;
head <= (head == (LENGTH - 1)) ? 0 : head + 1;
tail <= (tail == (LENGTH - 1)) ? 0 : tail + 1;
end
end else if (write) begin
if (count < LENGTH) begin
count <= count + 1;
head <= (head == (LENGTH - 1)) ? 0 : head + 1;
end
end else if (read) begin
if (count > 0) begin
count <= count - 1;
tail <= (tail == (LENGTH - 1)) ? 0 : tail + 1;
end
end
end
end
endmodule
"""
| single_port_ram = 'module SinglePortRam #\n(\n parameter DATA_WIDTH = 8,\n parameter ADDR_WIDTH = 4,\n parameter RAM_DEPTH = 1 << ADDR_WIDTH\n)\n(\n input clk,\n input rst,\n input [ADDR_WIDTH-1:0] ram_addr,\n input [DATA_WIDTH-1:0] ram_d,\n input ram_we,\n output [DATA_WIDTH-1:0] ram_q\n);\n\n reg [DATA_WIDTH-1:0] mem [0:RAM_DEPTH-1];\n reg [ADDR_WIDTH-1:0] read_addr;\n\n assign ram_q = mem[read_addr];\n always @ (posedge clk) begin\n if (ram_we)\n mem[ram_addr] <= ram_d;\n read_addr <= ram_addr;\n end\nendmodule\n'
bidirectional_single_port_ram = "module BidirectionalSinglePortRam #\n(\n parameter DATA_WIDTH = 8,\n parameter ADDR_WIDTH = 4,\n parameter RAM_LENGTH = 16,\n parameter RAM_DEPTH = 1 << (ADDR_WIDTH-1)\n)\n(\n input clk,\n input rst,\n input [ADDR_WIDTH-1:0] ram_addr,\n input [DATA_WIDTH-1:0] ram_d,\n input ram_we,\n output [DATA_WIDTH-1:0] ram_q,\n output [ADDR_WIDTH-1:0] ram_len\n);\n reg [DATA_WIDTH-1:0] mem [0:RAM_DEPTH-1];\n reg [ADDR_WIDTH-1:0] read_addr;\n\n /*\n integer i;\n initial begin\n for (i = 0; i < RAM_DEPTH; i = i + 1)\n mem[i] = 0;\n end\n */\n function [ADDR_WIDTH-1:0] address (\n input [ADDR_WIDTH-1:0] in_addr\n );\n begin\n if (in_addr[ADDR_WIDTH-1] == 1'b1) begin\n address = RAM_LENGTH + in_addr;\n end else begin\n address = in_addr;\n end\n end\n endfunction // address\n wire [ADDR_WIDTH-1:0] a;\n assign a = address(ram_addr);\n assign ram_q = mem[read_addr];\n assign ram_len = RAM_LENGTH;\n always @ (posedge clk) begin\n if (ram_we)\n mem[a] <= ram_d;\n read_addr <= a;\n end\nendmodule\n"
fifo = 'module FIFO #\n(\n parameter integer DATA_WIDTH = 32,\n parameter integer ADDR_WIDTH = 2,\n parameter integer LENGTH = 4\n)\n(\n input clk,\n input rst,\n input [DATA_WIDTH - 1 : 0] din,\n input write,\n output full,\n output [DATA_WIDTH - 1 : 0] dout,\n input read,\n output empty,\n output will_full,\n output will_empty\n);\n\nreg [ADDR_WIDTH - 1 : 0] head;\nreg [ADDR_WIDTH - 1 : 0] tail;\nreg [ADDR_WIDTH : 0] count;\nwire we;\nassign we = write && !full;\n\nreg [DATA_WIDTH - 1 : 0] mem [0 : LENGTH - 1];\ninitial begin : initialize_mem\n integer i;\n for (i = 0; i < LENGTH; i = i + 1) begin\n mem[i] = 0;\n end\nend\n\nalways @(posedge clk) begin\n if (we) mem[head] <= din;\nend\nassign dout = mem[tail];\n\nassign full = count >= LENGTH;\nassign empty = count == 0;\nassign will_full = write && !read && count == LENGTH-1;\nassign will_empty = read && !write && count == 1;\n\nalways @(posedge clk) begin\n if (rst == 1) begin\n head <= 0;\n tail <= 0;\n count <= 0;\n end else begin\n if (write && read) begin\n if (count == LENGTH) begin\n count <= count - 1;\n tail <= (tail == (LENGTH - 1)) ? 0 : tail + 1;\n end else if (count == 0) begin\n count <= count + 1;\n head <= (head == (LENGTH - 1)) ? 0 : head + 1;\n end else begin\n count <= count;\n head <= (head == (LENGTH - 1)) ? 0 : head + 1;\n tail <= (tail == (LENGTH - 1)) ? 0 : tail + 1;\n end\n end else if (write) begin\n if (count < LENGTH) begin\n count <= count + 1;\n head <= (head == (LENGTH - 1)) ? 0 : head + 1;\n end\n end else if (read) begin\n if (count > 0) begin\n count <= count - 1;\n tail <= (tail == (LENGTH - 1)) ? 0 : tail + 1;\n end\n end\n end\nend\nendmodule\n' |
# Source: https://leetcode.com/problems/add-digits/description/
# Author: Paulo Lemus
# Date : 2017-11-16
# Info : #258, Easy, 92 ms, 92.50%
# Given a non-negative integer num, repeatedly add all its digits until the result has only one digit.
#
# For example:
#
# Given num = 38, the process is like: 3 + 8 = 11, 1 + 1 = 2. Since 2 has only one digit, return it.
#
# Follow up:
# Could you do it without any loop/recursion in O(1) runtime?
#
# Credits:
# Special thanks to @jianchao.li.fighter for adding this problem and creating all test cases.
# 96 ms, 75%
class Solution:
def addDigits(self, num):
"""
:type num: int
:rtype: int
"""
while num > 9:
num = sum(map(int, str(num)))
return num
# 92 ms, 92.50%
class Solution2:
def addDigits(self, num):
"""
:type num: int
:rtype: int
"""
while num > 9:
num = num // 10 + num % 10
return num
| class Solution:
def add_digits(self, num):
"""
:type num: int
:rtype: int
"""
while num > 9:
num = sum(map(int, str(num)))
return num
class Solution2:
def add_digits(self, num):
"""
:type num: int
:rtype: int
"""
while num > 9:
num = num // 10 + num % 10
return num |
# -*- coding: utf-8 -*-
"""Top-level package for Twith Chat File Reader."""
__author__ = """Yann-Sebastien Tremblay-Johnston"""
__email__ = 'yanns.tremblay@gmail.com'
__version__ = '0.1.0'
| """Top-level package for Twith Chat File Reader."""
__author__ = 'Yann-Sebastien Tremblay-Johnston'
__email__ = 'yanns.tremblay@gmail.com'
__version__ = '0.1.0' |
def neural_control (output):
lat_stick = (output[0] - output[1]) * 21.5
pull = (output[2] - output[3]) * 25
control = [1.0, pull, lat_stick, 0.0]
return control | def neural_control(output):
lat_stick = (output[0] - output[1]) * 21.5
pull = (output[2] - output[3]) * 25
control = [1.0, pull, lat_stick, 0.0]
return control |
a = input("Geef een waarde (geen 0) ")
try:
a = int(a)
b = 100 / a
print(b)
except:
print("Ik zei nog zo: geen 0")
finally:
print("Bedankt voor het meedoen")
| a = input('Geef een waarde (geen 0) ')
try:
a = int(a)
b = 100 / a
print(b)
except:
print('Ik zei nog zo: geen 0')
finally:
print('Bedankt voor het meedoen') |
title = """
__ \ ___| |
| | | | __ \ _` | _ \ _ \ __ \ | __| _` | \ \ \ / | _ \ __|
| | | | | | ( | __/ ( | | | | | ( | \ \ \ / | __/ |
____/ \__,_| _| _| \__, | \___| \___/ _| _| \____| _| \__,_| \_/\_/ _| \___| _|
|___/ """
gameover = """
___| _ \
| _` | __ `__ \ _ \ | | \ \ / _ \ __|
| | ( | | | | __/ | | \ \ / __/ |
\____| \__,_| _| _| _| \___| \___/ \_/ \___| _|
""" | title = '\n __ \\ ___| | \n | | | | __ \\ _` | _ \\ _ \\ __ \\ | __| _` | \\ \\ \\ / | _ \\ __| \n | | | | | | ( | __/ ( | | | | | ( | \\ \\ \\ / | __/ | \n ____/ \\__,_| _| _| \\__, | \\___| \\___/ _| _| \\____| _| \\__,_| \\_/\\_/ _| \\___| _| \n |___/ '
gameover = '\n ___| _ \\ \n | _` | __ `__ \\ _ \\ | | \\ \\ / _ \\ __| \n | | ( | | | | __/ | | \\ \\ / __/ | \n \\____| \\__,_| _| _| _| \\___| \\___/ \\_/ \\___| _| \n' |
#
# @lc app=leetcode id=43 lang=python
#
# [43] Multiply Strings
#
# https://leetcode.com/problems/multiply-strings/description/
#
# algorithms
# Medium (29.99%)
# Total Accepted: 185.2K
# Total Submissions: 617.4K
# Testcase Example: '"2"\n"3"'
#
# Given two non-negative integers num1 and num2 represented as strings, return
# the product of num1 and num2, also represented as a string.
#
# Example 1:
#
#
# Input: num1 = "2", num2 = "3"
# Output: "6"
#
# Example 2:
#
#
# Input: num1 = "123", num2 = "456"
# Output: "56088"
#
#
# Note:
#
#
# The length of both num1 and num2 is < 110.
# Both num1 and num2 contain only digits 0-9.
# Both num1 and num2 do not contain any leading zero, except the number 0
# itself.
# You must not use any built-in BigInteger library or convert the inputs to
# integer directly.
#
#
#
'''
class Solution(object):
def multiply(self, num1, num2):
"""
:type num1: str
:type num2: str
:rtype: str
"""
num1 = num1[::-1] # Calculate the result from the rear.
num2 = num2[::-1]
if num1 == '0' or num2 == '0':
return '0'
if len(num1) < len(num2):
row_len = len(num1) + 1
row_num = num1
col_len = len(num2) + 1
col_num =num2
else:
row_len = len(num2) + 1
row_num = num2
col_len = len(num1) + 1
col_num = num1
num_mat = []
for row in range(row_len):
num_mat.append([0]*col_len)
adv = 0
# store the multiply results between each nums in a matrix.
tmp_ad = []
for row in range(row_len):
if row == row_len - 1:
break
for col in range(col_len):
if col == col_len - 1:
num_mat[row][col] = adv # store the adv at the last column.
adv = 0
break
mul_res = int(row_num[row]) * int(col_num[col]) + adv
adv = mul_res / 10
num_mat[row][col] = mul_res % 10
tmp_ad.append(adv)
res = ''
for col in range(0, col_len):
row = 0
col1 = col
tmp_res = 0
while row<row_len and col1>=0:
tmp_res += num_mat[row][col1]
row += 1
col1 -= 1
tmp_res = tmp_res + adv
res = str(tmp_res%10) + res
adv = tmp_res / 10
row = 1
while row < row_len:
col = col_len - 1
row1 = row
tmp_res = 0
while row1<row_len and col>0:
tmp_res += num_mat[row1][col]
row1 += 1
col -= 1
tmp_res = tmp_res + adv
res = str(tmp_res%10) + res
adv = tmp_res / 10
row += 1
while res[0] == '0':
res = res[1:]
if adv != 0:
res = str(adv) + res
return res
'''
class Solution(object):
def multiply(self, num1, num2):
"""
:type num1: str
:type num2: str
:rtype: str
"""
num1 = num1[::-1] # Calculate the result from the rear.
num2 = num2[::-1]
product = [0] * (len(num1)+len(num2))
pos = 1
for n1 in num1:
tmp_pos = pos
for n2 in num2:
product[tmp_pos-1] += int(n1)*int(n2)
product[tmp_pos] += product[tmp_pos-1] / 10
product[tmp_pos-1] %= 10
tmp_pos += 1
pos += 1
product = product[::-1]
while product[0]==0 and len(product)!=1:
product = product[1:]
product = [str(x) for x in product]
return ''.join(product)
| '''
class Solution(object):
def multiply(self, num1, num2):
"""
:type num1: str
:type num2: str
:rtype: str
"""
num1 = num1[::-1] # Calculate the result from the rear.
num2 = num2[::-1]
if num1 == '0' or num2 == '0':
return '0'
if len(num1) < len(num2):
row_len = len(num1) + 1
row_num = num1
col_len = len(num2) + 1
col_num =num2
else:
row_len = len(num2) + 1
row_num = num2
col_len = len(num1) + 1
col_num = num1
num_mat = []
for row in range(row_len):
num_mat.append([0]*col_len)
adv = 0
# store the multiply results between each nums in a matrix.
tmp_ad = []
for row in range(row_len):
if row == row_len - 1:
break
for col in range(col_len):
if col == col_len - 1:
num_mat[row][col] = adv # store the adv at the last column.
adv = 0
break
mul_res = int(row_num[row]) * int(col_num[col]) + adv
adv = mul_res / 10
num_mat[row][col] = mul_res % 10
tmp_ad.append(adv)
res = ''
for col in range(0, col_len):
row = 0
col1 = col
tmp_res = 0
while row<row_len and col1>=0:
tmp_res += num_mat[row][col1]
row += 1
col1 -= 1
tmp_res = tmp_res + adv
res = str(tmp_res%10) + res
adv = tmp_res / 10
row = 1
while row < row_len:
col = col_len - 1
row1 = row
tmp_res = 0
while row1<row_len and col>0:
tmp_res += num_mat[row1][col]
row1 += 1
col -= 1
tmp_res = tmp_res + adv
res = str(tmp_res%10) + res
adv = tmp_res / 10
row += 1
while res[0] == '0':
res = res[1:]
if adv != 0:
res = str(adv) + res
return res
'''
class Solution(object):
def multiply(self, num1, num2):
"""
:type num1: str
:type num2: str
:rtype: str
"""
num1 = num1[::-1]
num2 = num2[::-1]
product = [0] * (len(num1) + len(num2))
pos = 1
for n1 in num1:
tmp_pos = pos
for n2 in num2:
product[tmp_pos - 1] += int(n1) * int(n2)
product[tmp_pos] += product[tmp_pos - 1] / 10
product[tmp_pos - 1] %= 10
tmp_pos += 1
pos += 1
product = product[::-1]
while product[0] == 0 and len(product) != 1:
product = product[1:]
product = [str(x) for x in product]
return ''.join(product) |
#https://www.acmicpc.net/problem/2475
n = map(int, input().split())
sum = 0
for i in n:
sum += (i**2)
print(sum%10) | n = map(int, input().split())
sum = 0
for i in n:
sum += i ** 2
print(sum % 10) |
__author__ = 'mcxiaoke'
class Bird(object):
feather=True
class Chicken(Bird):
fly=False
def __init__(self,age):
self.age=age
ck=Chicken(2)
print(Bird.__dict__)
print(Chicken.__dict__)
print(ck.__dict__)
| __author__ = 'mcxiaoke'
class Bird(object):
feather = True
class Chicken(Bird):
fly = False
def __init__(self, age):
self.age = age
ck = chicken(2)
print(Bird.__dict__)
print(Chicken.__dict__)
print(ck.__dict__) |
t=int(input())
l=list(map(int,input().split()))
l=sorted(l)
ans=0
c=0
for i in l:
if i>=c:
ans+=1
c+=i
print(ans) | t = int(input())
l = list(map(int, input().split()))
l = sorted(l)
ans = 0
c = 0
for i in l:
if i >= c:
ans += 1
c += i
print(ans) |
names = ["shiva", "sai", "azim", "mathews", "philips", "samule"]
items = [name.capitalize() for name in names]
print(items)
items = [len(name) for name in names]
print(items)
def get_list_comprehensions(lambda_expression, value):
return [lambda_expression(x) for x in range(value)]
data = get_list_comprehensions(lambda x: x*2, 12)
print(data)
data = get_list_comprehensions(lambda x: x**2, 12)
print(data)
| names = ['shiva', 'sai', 'azim', 'mathews', 'philips', 'samule']
items = [name.capitalize() for name in names]
print(items)
items = [len(name) for name in names]
print(items)
def get_list_comprehensions(lambda_expression, value):
return [lambda_expression(x) for x in range(value)]
data = get_list_comprehensions(lambda x: x * 2, 12)
print(data)
data = get_list_comprehensions(lambda x: x ** 2, 12)
print(data) |
TILESIZE = 29
PLAYER_LAYER = 4
ENEMY_LAYER = 3
BLOCK_LAYER = 2
GROUND_LAYER = 1
PLAYER_SPEED = 3
player_speed = 0
WHITE = (255, 255, 255)
BLUE = (0, 0, 255)
RED = (255, 0, 0)
BLACK = (0, 0, 0)
tilemap = [
'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB',
'B....................................................................B',
'B....................................................................B',
'B....................................................................B',
'B....................................................................B',
'B....................................................................B',
'B....................................................................B',
'B.................................................................E..B',
'B...........P........................................................B',
'B....................................................................B',
'B....................................................................B',
'B....................................................................B',
'B....................................................................B',
'B....................................................................B',
'B....................................................................B',
'B....................................................................B',
'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB'
]
| tilesize = 29
player_layer = 4
enemy_layer = 3
block_layer = 2
ground_layer = 1
player_speed = 3
player_speed = 0
white = (255, 255, 255)
blue = (0, 0, 255)
red = (255, 0, 0)
black = (0, 0, 0)
tilemap = ['BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB', 'B....................................................................B', 'B....................................................................B', 'B....................................................................B', 'B....................................................................B', 'B....................................................................B', 'B....................................................................B', 'B.................................................................E..B', 'B...........P........................................................B', 'B....................................................................B', 'B....................................................................B', 'B....................................................................B', 'B....................................................................B', 'B....................................................................B', 'B....................................................................B', 'B....................................................................B', 'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB'] |
"""
Cryptocurrency network definitions
"""
class Network:
"""
Represents a cryptocurrency network (e.g. Bitcoin Mainnet)
"""
def __init__(self, description, version_priv, version_pub, pub_key_hash,
wif):
self.description = description
self.version_priv = version_priv
self.version_pub = version_pub
self.pub_key_hash = pub_key_hash
self.wif = wif
@classmethod
def get_supported_networks(cls):
"""
Returns the list of supported networks
:return: list of supported networks
"""
return cls.__NETWORK_LIST
@classmethod
def set_supported_networks(cls, network_list):
"""
Sets up the list of supported networks
:param network_list: New list of supported networks
"""
cls.__NETWORK_LIST = network_list
def __eq__(self, other):
return self.description == other.description and \
self.version_priv == other.version_priv and \
self.version_pub == other.version_pub and \
self.pub_key_hash == other.pub_key_hash and \
self.wif == other.wif
def __str__(self):
return self.description
BITCOIN_MAINNET = Network(description="Bitcoin Mainnet",
version_priv=0x0488ADE4,
version_pub=0x0488B21E,
pub_key_hash=b"\x00",
wif=b"\x80")
BITCOIN_TESTNET = Network(description="Bitcoin Testnet",
version_priv=0x04358394,
version_pub=0x043587CF,
pub_key_hash=b"\x6F",
wif=b"\xEF")
# supported networks
Network.set_supported_networks([BITCOIN_MAINNET, BITCOIN_TESTNET])
| """
Cryptocurrency network definitions
"""
class Network:
"""
Represents a cryptocurrency network (e.g. Bitcoin Mainnet)
"""
def __init__(self, description, version_priv, version_pub, pub_key_hash, wif):
self.description = description
self.version_priv = version_priv
self.version_pub = version_pub
self.pub_key_hash = pub_key_hash
self.wif = wif
@classmethod
def get_supported_networks(cls):
"""
Returns the list of supported networks
:return: list of supported networks
"""
return cls.__NETWORK_LIST
@classmethod
def set_supported_networks(cls, network_list):
"""
Sets up the list of supported networks
:param network_list: New list of supported networks
"""
cls.__NETWORK_LIST = network_list
def __eq__(self, other):
return self.description == other.description and self.version_priv == other.version_priv and (self.version_pub == other.version_pub) and (self.pub_key_hash == other.pub_key_hash) and (self.wif == other.wif)
def __str__(self):
return self.description
bitcoin_mainnet = network(description='Bitcoin Mainnet', version_priv=76066276, version_pub=76067358, pub_key_hash=b'\x00', wif=b'\x80')
bitcoin_testnet = network(description='Bitcoin Testnet', version_priv=70615956, version_pub=70617039, pub_key_hash=b'o', wif=b'\xef')
Network.set_supported_networks([BITCOIN_MAINNET, BITCOIN_TESTNET]) |
class VentilationTrapInstanceError(Exception):
"""Raised when a Ventilation Trap parameter is not int or float"""
pass
class TrapezeBuildGeometryError(Exception):
"""raised when the parameter have not good type"""
pass
| class Ventilationtrapinstanceerror(Exception):
"""Raised when a Ventilation Trap parameter is not int or float"""
pass
class Trapezebuildgeometryerror(Exception):
"""raised when the parameter have not good type"""
pass |
def moveDisk(poles, disk, pole):
# move disk to pole
if(disk == 0):
# base case of recursive algorithm
return 0, poles
# find the pole the disk is currently on
diskIsOn = 0
if disk in poles[1]:
diskIsOn = 1
if disk in poles[2]:
diskIsOn = 2
# make list of all disks that need to be moved
# this could be disks that are on top of the disk, or
# are smaller and on the pole we are moving to
disksToMove = []
for d in poles[diskIsOn] + poles[pole]:
if(d<disk):
disksToMove.insert(0,d)
disksToMove.sort(reverse=True)
# we want to move the other disks to the
# remaining pole (not pole and not diskIsOn)
remainingPole = 0
if(diskIsOn!=1 and pole!=1):
remainingPole = 1
if(diskIsOn!=2 and pole!=2):
remainingPole = 2
moves = 0
while(len(disksToMove) > 0):
# while there are still disks to move
newMoves, poles = moveDisk(poles, disksToMove[0], remainingPole)
moves+=newMoves
disksToMove.pop(0)
# now we can move the disk we wanted to in the beginning
poles[diskIsOn].remove(disk)
poles[pole].insert(0, disk)
moves += 1
print(poles)
return moves, poles
def h(poles):
moves = 0
for disk in range(largestDisk, 0, -1):
# move each disk from largest to smallest onto the final pole
# first find the pole the disk is on
diskIsOn = 0
if disk in poles[1]:
diskIsOn = 1
if disk in poles[2]:
diskIsOn = 2
if(diskIsOn==0 or diskIsOn==1):
# the disk is not on the correct pole
# we must first find which disks we need to move
disksToMove = []
for d in poles[diskIsOn]+poles[2]:
if(d<disk):
disksToMove.insert(0,d)
disksToMove.sort(reverse=True)
# we will move these extra disks to the remaining pole
remainingPole = 0 if diskIsOn==1 else 1
while(len(disksToMove)>0):
# while there are still disks to move
newMoves, poles = moveDisk(poles, disksToMove[0], remainingPole)
moves+=newMoves
disksToMove.pop(0)
# the smaller tower has been moved so we can move
# the disk we are currently working on
poles[diskIsOn].remove(disk)
poles[2].insert(0, disk)
moves +=1
print(poles)
return moves
largestDisk = 3
n = [[1,2,3],[],[]]
print(h(n)) | def move_disk(poles, disk, pole):
if disk == 0:
return (0, poles)
disk_is_on = 0
if disk in poles[1]:
disk_is_on = 1
if disk in poles[2]:
disk_is_on = 2
disks_to_move = []
for d in poles[diskIsOn] + poles[pole]:
if d < disk:
disksToMove.insert(0, d)
disksToMove.sort(reverse=True)
remaining_pole = 0
if diskIsOn != 1 and pole != 1:
remaining_pole = 1
if diskIsOn != 2 and pole != 2:
remaining_pole = 2
moves = 0
while len(disksToMove) > 0:
(new_moves, poles) = move_disk(poles, disksToMove[0], remainingPole)
moves += newMoves
disksToMove.pop(0)
poles[diskIsOn].remove(disk)
poles[pole].insert(0, disk)
moves += 1
print(poles)
return (moves, poles)
def h(poles):
moves = 0
for disk in range(largestDisk, 0, -1):
disk_is_on = 0
if disk in poles[1]:
disk_is_on = 1
if disk in poles[2]:
disk_is_on = 2
if diskIsOn == 0 or diskIsOn == 1:
disks_to_move = []
for d in poles[diskIsOn] + poles[2]:
if d < disk:
disksToMove.insert(0, d)
disksToMove.sort(reverse=True)
remaining_pole = 0 if diskIsOn == 1 else 1
while len(disksToMove) > 0:
(new_moves, poles) = move_disk(poles, disksToMove[0], remainingPole)
moves += newMoves
disksToMove.pop(0)
poles[diskIsOn].remove(disk)
poles[2].insert(0, disk)
moves += 1
print(poles)
return moves
largest_disk = 3
n = [[1, 2, 3], [], []]
print(h(n)) |
TOKEN_URL = 'https://discordapp.com/api/oauth2/token'
GROUP_DM_URL = 'https://discordapp.com/api/users/@me/channels'
RPC_TOKEN_URL_FRAGMENT = '/rpc'
RPC_HOSTNAME = 'ws://127.0.0.1:'
RPC_QUERYSTRING = '?v=1&encoding=json&client_id='
CLIENT_ID = ''
CLIENT_SECRET = ''
REDIRECT_URI = ''
RPC_ORIGIN = ''
BOT_TOKEN = ''
| token_url = 'https://discordapp.com/api/oauth2/token'
group_dm_url = 'https://discordapp.com/api/users/@me/channels'
rpc_token_url_fragment = '/rpc'
rpc_hostname = 'ws://127.0.0.1:'
rpc_querystring = '?v=1&encoding=json&client_id='
client_id = ''
client_secret = ''
redirect_uri = ''
rpc_origin = ''
bot_token = '' |
## Automatically adapted for numpy Apr 14, 2006 by convertcode.py
ARCSECTORAD = float('4.8481368110953599358991410235794797595635330237270e-6')
RADTOARCSEC = float('206264.80624709635515647335733077861319665970087963')
SECTORAD = float('7.2722052166430399038487115353692196393452995355905e-5')
RADTOSEC = float('13750.987083139757010431557155385240879777313391975')
RADTODEG = float('57.295779513082320876798154814105170332405472466564')
DEGTORAD = float('1.7453292519943295769236907684886127134428718885417e-2')
RADTOHRS = float('3.8197186342054880584532103209403446888270314977710')
HRSTORAD = float('2.6179938779914943653855361527329190701643078328126e-1')
PI = float('3.1415926535897932384626433832795028841971693993751')
TWOPI = float('6.2831853071795864769252867665590057683943387987502')
PIBYTWO = float('1.5707963267948966192313216916397514420985846996876')
SECPERDAY = float('86400.0')
SECPERJULYR = float('31557600.0')
KMPERPC = float('3.0856776e13')
KMPERKPC = float('3.0856776e16')
Tsun = float('4.925490947e-6') # sec
Msun = float('1.9891e30') # kg
Mjup = float('1.8987e27') # kg
Rsun = float('6.9551e8') # m
Rearth = float('6.378e6') # m
SOL = float('299792458.0') # m/s
MSUN = float('1.989e+30') # kg
G = float('6.673e-11') # m^3/s^2/kg
C = SOL
| arcsectorad = float('4.8481368110953599358991410235794797595635330237270e-6')
radtoarcsec = float('206264.80624709635515647335733077861319665970087963')
sectorad = float('7.2722052166430399038487115353692196393452995355905e-5')
radtosec = float('13750.987083139757010431557155385240879777313391975')
radtodeg = float('57.295779513082320876798154814105170332405472466564')
degtorad = float('1.7453292519943295769236907684886127134428718885417e-2')
radtohrs = float('3.8197186342054880584532103209403446888270314977710')
hrstorad = float('2.6179938779914943653855361527329190701643078328126e-1')
pi = float('3.1415926535897932384626433832795028841971693993751')
twopi = float('6.2831853071795864769252867665590057683943387987502')
pibytwo = float('1.5707963267948966192313216916397514420985846996876')
secperday = float('86400.0')
secperjulyr = float('31557600.0')
kmperpc = float('3.0856776e13')
kmperkpc = float('3.0856776e16')
tsun = float('4.925490947e-6')
msun = float('1.9891e30')
mjup = float('1.8987e27')
rsun = float('6.9551e8')
rearth = float('6.378e6')
sol = float('299792458.0')
msun = float('1.989e+30')
g = float('6.673e-11')
c = SOL |
CONTENT_TYPE_CHOICES = (
('Company', 'Company'),
('Job', 'Job'),
('Topic', 'Topic'),
) | content_type_choices = (('Company', 'Company'), ('Job', 'Job'), ('Topic', 'Topic')) |
class AnimalNode:
def __init__(self, question, yes_child, no_child):
self.question = question
self.yes_child = yes_child
self.no_child = no_child
def name(self):
"""
Return the animal's name with an appropriate "a" or "an" in front.
This only works for leaf nodes.
"""
if self.question.lower()[0] in "aeiou":
return f"an {self.question}"
return f"a {self.question}"
class App:
def __init__(self):
""" Initialize the tree."""
dog_node = AnimalNode("dog", None, None)
fish_node = AnimalNode("fish", None, None)
self.root = AnimalNode("Is it a mammal? ", dog_node, fish_node)
def play_game(self):
""" Play the animal game."""
while True:
# Play one round.
self.play_round()
# See if we should continue.
response = input("\nPlay again? ").lower()
if (len(response) == 0) or (response[0] != "y"):
return
def play_round(self):
""" Play lone round of the animal game."""
node = self.root
while True:
# See if this is an internal or leaf node.
if node.yes_child == None:
# It's a leaf node.
self.process_leaf_node(node)
return
# It's an internal node.
# Ask the node's question and move to the appropriate child node.
response = input(node.question + " ").lower()
if response[0] == "y":
node = node.yes_child
else:
node = node.no_child
def process_leaf_node(self, leaf):
""" Process a leaf node."""
# Guess the animal.
prompt = f"Is your animal {leaf.name()}? "
response = input(prompt).lower()
if response[0] == "y":
# We got it right. Gloat and exit.
print("\n*** Victory is mine! ***")
return
else:
# We got it wrong. Ask the user for the new animal.
new_animal = input("What is your animal? ").lower()
new_node = AnimalNode(new_animal, None, None)
# Ask the user for a new question.
prompt = \
f"What question could I ask to differentiate between " + \
f"{leaf.name()} and {new_node.name()}? "
new_question = input(prompt)
# See if the question's answer is true for the new animal.
prompt = f"Is the answer to this question true for {new_node.name()}? "
response = input(prompt).lower()
# Update the knowledge tree.
old_node = AnimalNode(leaf.question, None, None)
leaf.question = new_question
if response[0] == "y":
leaf.yes_child = new_node
leaf.no_child = old_node
else:
leaf.yes_child = old_node
leaf.no_child = new_node
if __name__ == '__main__':
app = App()
app.play_game()
# app.root.destroy()
| class Animalnode:
def __init__(self, question, yes_child, no_child):
self.question = question
self.yes_child = yes_child
self.no_child = no_child
def name(self):
"""
Return the animal's name with an appropriate "a" or "an" in front.
This only works for leaf nodes.
"""
if self.question.lower()[0] in 'aeiou':
return f'an {self.question}'
return f'a {self.question}'
class App:
def __init__(self):
""" Initialize the tree."""
dog_node = animal_node('dog', None, None)
fish_node = animal_node('fish', None, None)
self.root = animal_node('Is it a mammal? ', dog_node, fish_node)
def play_game(self):
""" Play the animal game."""
while True:
self.play_round()
response = input('\nPlay again? ').lower()
if len(response) == 0 or response[0] != 'y':
return
def play_round(self):
""" Play lone round of the animal game."""
node = self.root
while True:
if node.yes_child == None:
self.process_leaf_node(node)
return
response = input(node.question + ' ').lower()
if response[0] == 'y':
node = node.yes_child
else:
node = node.no_child
def process_leaf_node(self, leaf):
""" Process a leaf node."""
prompt = f'Is your animal {leaf.name()}? '
response = input(prompt).lower()
if response[0] == 'y':
print('\n*** Victory is mine! ***')
return
else:
new_animal = input('What is your animal? ').lower()
new_node = animal_node(new_animal, None, None)
prompt = f'What question could I ask to differentiate between ' + f'{leaf.name()} and {new_node.name()}? '
new_question = input(prompt)
prompt = f'Is the answer to this question true for {new_node.name()}? '
response = input(prompt).lower()
old_node = animal_node(leaf.question, None, None)
leaf.question = new_question
if response[0] == 'y':
leaf.yes_child = new_node
leaf.no_child = old_node
else:
leaf.yes_child = old_node
leaf.no_child = new_node
if __name__ == '__main__':
app = app()
app.play_game() |
class Solution(object):
def angleClock(self, hour, minutes):
"""
:type hour: int
:type minutes: int
:rtype: float
"""
m = minutes * (360/60)
if hour == 12:
h = minutes * (360.0/12/60)
else:
h = hour * (360/12) + minutes * (360.0/12/60)
res = abs(m-h)
return 360 - res if res > 180 else res
hour = 12
minutes = 30
res = Solution().angleClock(hour, minutes)
print(res) | class Solution(object):
def angle_clock(self, hour, minutes):
"""
:type hour: int
:type minutes: int
:rtype: float
"""
m = minutes * (360 / 60)
if hour == 12:
h = minutes * (360.0 / 12 / 60)
else:
h = hour * (360 / 12) + minutes * (360.0 / 12 / 60)
res = abs(m - h)
return 360 - res if res > 180 else res
hour = 12
minutes = 30
res = solution().angleClock(hour, minutes)
print(res) |
"""
Figure parameters class
"""
class FigureParameters:
"""
Class contains figure and text sizes
"""
def __init__(self):
self.scale = 1.25*1080/8
self.figure_size_x = int(1920/self.scale)
self.figure_size_y = int(1080/self.scale)
self.text_size = int(2.9*1080/self.scale)
self.text_size_minor_yaxis = 8
# Colormap/
self.color_map = "inferno" # 'hot_r' # 'afmhot_r' #colormap for plotting
| """
Figure parameters class
"""
class Figureparameters:
"""
Class contains figure and text sizes
"""
def __init__(self):
self.scale = 1.25 * 1080 / 8
self.figure_size_x = int(1920 / self.scale)
self.figure_size_y = int(1080 / self.scale)
self.text_size = int(2.9 * 1080 / self.scale)
self.text_size_minor_yaxis = 8
self.color_map = 'inferno' |
class Solution:
def summaryRanges(self, nums):
summary = []
i = 0
for j in range(len(nums)):
if j + 1 < len(nums) and nums[j + 1] == nums[j] + 1:
continue
if i == j:
summary.append(str(nums[i]))
else:
summary.append(str(nums[i]) + '->' + str(nums[j]))
i = j + 1
return summary
if __name__ == "__main__":
solution = Solution()
print(solution.summaryRanges([0, 1, 2, 4, 5, 7]))
print(solution.summaryRanges([0, 2, 3, 4, 6, 8, 9]))
| class Solution:
def summary_ranges(self, nums):
summary = []
i = 0
for j in range(len(nums)):
if j + 1 < len(nums) and nums[j + 1] == nums[j] + 1:
continue
if i == j:
summary.append(str(nums[i]))
else:
summary.append(str(nums[i]) + '->' + str(nums[j]))
i = j + 1
return summary
if __name__ == '__main__':
solution = solution()
print(solution.summaryRanges([0, 1, 2, 4, 5, 7]))
print(solution.summaryRanges([0, 2, 3, 4, 6, 8, 9])) |
# import copy
class Solution:
def numIslands(self, grid: List[List[str]]) -> int:
if not grid:
return 0
# copyGrid = copy.deepcopy(grid)
copyGrid = grid
m = len(grid)
n = len(grid[0])
res = 0
for i in range(m):
for j in range(n):
if copyGrid[i][j] == "1":
res += 1
self.checkIsland(copyGrid, i, j, m-1, n-1)
return res
def checkIsland(self, copyGrid, i, j, m, n):
if copyGrid[i][j] == "0":
return
else:
copyGrid[i][j] = "0"
# check top
self.checkIsland(copyGrid, max(0, i-1), j, m, n)
#check bottom
self.checkIsland(copyGrid, min(m, i+1), j, m, n)
#check left
self.checkIsland(copyGrid, i, max(0, j-1), m, n)
#check right
self.checkIsland(copyGrid, i ,min(n, j+1), m , n)
return
| class Solution:
def num_islands(self, grid: List[List[str]]) -> int:
if not grid:
return 0
copy_grid = grid
m = len(grid)
n = len(grid[0])
res = 0
for i in range(m):
for j in range(n):
if copyGrid[i][j] == '1':
res += 1
self.checkIsland(copyGrid, i, j, m - 1, n - 1)
return res
def check_island(self, copyGrid, i, j, m, n):
if copyGrid[i][j] == '0':
return
else:
copyGrid[i][j] = '0'
self.checkIsland(copyGrid, max(0, i - 1), j, m, n)
self.checkIsland(copyGrid, min(m, i + 1), j, m, n)
self.checkIsland(copyGrid, i, max(0, j - 1), m, n)
self.checkIsland(copyGrid, i, min(n, j + 1), m, n)
return |
BAD_CREDENTIALS = "Unauthorized: The credentials were provided incorrectly or did not match any existing,\
active credentials."
PAYMENT_REQUIRED = "Payment Required: There is no active subscription\
for the account associated with the credentials submitted with the request."
FORBIDDEN = "Because the international service is currently in a limited release phase, only approved accounts" \
" may access the service."
REQUEST_ENTITY_TOO_LARGE = "Request Entity Too Large: The request body has exceeded the maximum size."
BAD_REQUEST = "Bad Request (Malformed Payload): A GET request lacked a street field or the request body of a\
POST request contained malformed JSON."
UNPROCESSABLE_ENTITY = "GET request lacked required fields."
TOO_MANY_REQUESTS = "When using public \"website key\" authentication, \
we restrict the number of requests coming from a given source over too short of a time."
INTERNAL_SERVER_ERROR = "Internal Server Error."
SERVICE_UNAVAILABLE = "Service Unavailable. Try again later."
GATEWAY_TIMEOUT = "The upstream data provider did not respond in a timely fashion and the request failed. " \
"A serious, yet rare occurrence indeed."
| bad_credentials = 'Unauthorized: The credentials were provided incorrectly or did not match any existing, active credentials.'
payment_required = 'Payment Required: There is no active subscription for the account associated with the credentials submitted with the request.'
forbidden = 'Because the international service is currently in a limited release phase, only approved accounts may access the service.'
request_entity_too_large = 'Request Entity Too Large: The request body has exceeded the maximum size.'
bad_request = 'Bad Request (Malformed Payload): A GET request lacked a street field or the request body of a POST request contained malformed JSON.'
unprocessable_entity = 'GET request lacked required fields.'
too_many_requests = 'When using public "website key" authentication, we restrict the number of requests coming from a given source over too short of a time.'
internal_server_error = 'Internal Server Error.'
service_unavailable = 'Service Unavailable. Try again later.'
gateway_timeout = 'The upstream data provider did not respond in a timely fashion and the request failed. A serious, yet rare occurrence indeed.' |
#!/usr/bin/env python3
# coding: utf-8
def foreachcsv(filename, callback):
with open(filename, 'rb') as f:
while True:
line = f.readline().strip()
if not line:
break
callback(line)
def fdata2list(filename):
with open(filename, 'r') as f:
data = [line.strip() for line in f.readlines()]
return data
| def foreachcsv(filename, callback):
with open(filename, 'rb') as f:
while True:
line = f.readline().strip()
if not line:
break
callback(line)
def fdata2list(filename):
with open(filename, 'r') as f:
data = [line.strip() for line in f.readlines()]
return data |
class Person:
def __init__(self, name):
self.name = name
def display1(self):
print('End of the Statement')
class Student(Person):
def __init__(self, name, usn, branch):
super().__init__(name)
self.name = name
self.usn = usn
self.branch = branch
def display2(self):
print(f'name: {self.name}')
print(f'usn: {self.usn}')
print(f'branch: {self.branch}')
self.display1()
aswin = Student('Ashwin', 31, 'SE')
aswin.display2()
| class Person:
def __init__(self, name):
self.name = name
def display1(self):
print('End of the Statement')
class Student(Person):
def __init__(self, name, usn, branch):
super().__init__(name)
self.name = name
self.usn = usn
self.branch = branch
def display2(self):
print(f'name: {self.name}')
print(f'usn: {self.usn}')
print(f'branch: {self.branch}')
self.display1()
aswin = student('Ashwin', 31, 'SE')
aswin.display2() |
#
# @lc app=leetcode id=61 lang=python3
#
# [61] Rotate List
#
# @lc code=start
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, x):
# self.val = x
# self.next = None
class Solution:
def rotateRight(self, head: ListNode, k: int) -> ListNode:
curr = head
length = 0
while curr: # get the length of the input ListNode head
length += 1
curr = curr.next
if length == 0:
return None
k = k % length # get the real rotation k places
if k == 0: # no rotation required
return head
left = l = head
for _ in range(length - k - 1):
l = l.next
right = r = l.next
for _ in range(k - 1):
r = r.next
r.next = left
l.next = None
return right
# @lc code=end
# Accepted
# 231/231 cases passed(40 ms)
# Your runtime beats 86.85 % of python3 submissions
# Your memory usage beats 6.45 % of python3 submissions(13.7 MB)
| class Solution:
def rotate_right(self, head: ListNode, k: int) -> ListNode:
curr = head
length = 0
while curr:
length += 1
curr = curr.next
if length == 0:
return None
k = k % length
if k == 0:
return head
left = l = head
for _ in range(length - k - 1):
l = l.next
right = r = l.next
for _ in range(k - 1):
r = r.next
r.next = left
l.next = None
return right |
# https://programmers.co.kr/learn/courses/30/lessons/42584
def solution(prices):
answer = []
length = len(prices)
for i in range(length):
now_value = prices[i]
for j in range(i+1, length):
if prices[j] < now_value or j == length -1:
answer.append(j-i)
break
answer.append(0)
return answer | def solution(prices):
answer = []
length = len(prices)
for i in range(length):
now_value = prices[i]
for j in range(i + 1, length):
if prices[j] < now_value or j == length - 1:
answer.append(j - i)
break
answer.append(0)
return answer |
###############################################################################
# Done: READ the code below. TRACE (by hand) the execution of the code,
# predicting what will get printed. Then run the code
# and compare your prediction to what actually was printed.
# Then mark this _TODO_ as DONE and commit-and-push your work.
#
###############################################################################
def main():
hello("Snow White")
goodbye("Bashful")
hello("Grumpy")
hello("Sleepy")
hello_and_goodbye("Magic Mirror", "Cruel Queen")
def hello(friend):
print("Hello,", friend, "- how are things?")
def goodbye(friend):
print("Goodbye,", friend, '- see you later!')
print(' Ciao!')
print(' Bai bai!')
def hello_and_goodbye(person1, person2):
hello(person1)
goodbye(person2)
main()
# hello snow white how are things?
# goodbye bashful see you later!
# Ciao
# Bai Bai
# hello grumpy how are things?
# hello sleepy how are things?
# hello magic mirror how are things?
# goodbye cruel queen see you later?
# Ciao
# Bai Bai
| def main():
hello('Snow White')
goodbye('Bashful')
hello('Grumpy')
hello('Sleepy')
hello_and_goodbye('Magic Mirror', 'Cruel Queen')
def hello(friend):
print('Hello,', friend, '- how are things?')
def goodbye(friend):
print('Goodbye,', friend, '- see you later!')
print(' Ciao!')
print(' Bai bai!')
def hello_and_goodbye(person1, person2):
hello(person1)
goodbye(person2)
main() |
i = 0
while True:
open(f'{i}', 'w')
i += 1
| i = 0
while True:
open(f'{i}', 'w')
i += 1 |
"""
Terminal client for telegram
"""
__version__ = "0.17.0"
| """
Terminal client for telegram
"""
__version__ = '0.17.0' |
# Example: Fetch a single transcription on a recording
my_transcription = api.get_transcription('recordingId', 'transcriptionId')
print(my_transcription)
## {
## 'chargeableDuration': 11,
## 'id' : '{transcriptionId}',
## 'state' : 'completed',
## 'text' : 'Hey there, I was calling to talk about plans for this saturday. ',
## 'textSize' : 63,
## 'textUrl' : 'https://api.catapult.inetwork.com/.../media/{transcriptionId}',
## 'time' : '2014-12-23T23:08:59Z'
## }
| my_transcription = api.get_transcription('recordingId', 'transcriptionId')
print(my_transcription) |
class Solution:
def singleNumber(self, nums: List[int]) -> int:
nums.sort()
i=0
while i <len(nums):
if ((i<len(nums)-2) and nums[i]==nums[i+1] ):
i+=2
else:
return nums[i]
break | class Solution:
def single_number(self, nums: List[int]) -> int:
nums.sort()
i = 0
while i < len(nums):
if i < len(nums) - 2 and nums[i] == nums[i + 1]:
i += 2
else:
return nums[i]
break |
# -*- encoding: utf-8 -*-
{
'name': 'El Salvador - Reportes y funcionalidad extra',
'version': '1.0',
'category': 'Localization',
'description': """ Reportes requeridos y otra funcionalidad extra para llevar un contabilidad en El Salvador. """,
'author': 'Aquih, S.A.',
'website': 'http://aquih.com/',
'depends': ['l10n_sv'],
'data': [
'views/account_view.xml',
'views/reporte_ventas.xml',
'views/reporte_compras.xml',
'views/reporte_mayor.xml',
'views/reporte_kardex.xml',
'views/report.xml',
# 'security/ir.model.access.csv',
],
'demo': [],
'installable': True,
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
| {'name': 'El Salvador - Reportes y funcionalidad extra', 'version': '1.0', 'category': 'Localization', 'description': ' Reportes requeridos y otra funcionalidad extra para llevar un contabilidad en El Salvador. ', 'author': 'Aquih, S.A.', 'website': 'http://aquih.com/', 'depends': ['l10n_sv'], 'data': ['views/account_view.xml', 'views/reporte_ventas.xml', 'views/reporte_compras.xml', 'views/reporte_mayor.xml', 'views/reporte_kardex.xml', 'views/report.xml'], 'demo': [], 'installable': True} |
"""Common environment variables unique to the discussion plugin."""
def plugin_settings(settings):
"""Settings for the discussions plugin. """
# .. toggle_name: ALLOW_HIDING_DISCUSSION_TAB
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: If True, it adds an option to show/hide the discussions tab.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2015-06-15
# .. toggle_tickets: https://github.com/edx/edx-platform/pull/8474
settings.FEATURES['ALLOW_HIDING_DISCUSSION_TAB'] = False
settings.DISCUSSION_SETTINGS = {
'MAX_COMMENT_DEPTH': 2,
'COURSE_PUBLISH_TASK_DELAY': 30,
}
| """Common environment variables unique to the discussion plugin."""
def plugin_settings(settings):
"""Settings for the discussions plugin. """
settings.FEATURES['ALLOW_HIDING_DISCUSSION_TAB'] = False
settings.DISCUSSION_SETTINGS = {'MAX_COMMENT_DEPTH': 2, 'COURSE_PUBLISH_TASK_DELAY': 30} |
class Solution:
def minPathSum(self, grid: List[List[int]]) -> int:
m = len(grid[0])
n = len(grid)
if m == 0 or n == 0:
return 0
for i in range(m):
if i != 0:
grid[0][i] += grid[0][i-1]
for j in range(n):
if j != 0:
grid[j][0] += grid[j-1][0]
if n == 1:
return grid[0][-1]
if m == 1:
return grid[-1][0]
for i in range(1, n):
for j in range(1, m):
grid[i][j] += min(grid[i-1][j], grid[i][j-1])
return grid[i][j] | class Solution:
def min_path_sum(self, grid: List[List[int]]) -> int:
m = len(grid[0])
n = len(grid)
if m == 0 or n == 0:
return 0
for i in range(m):
if i != 0:
grid[0][i] += grid[0][i - 1]
for j in range(n):
if j != 0:
grid[j][0] += grid[j - 1][0]
if n == 1:
return grid[0][-1]
if m == 1:
return grid[-1][0]
for i in range(1, n):
for j in range(1, m):
grid[i][j] += min(grid[i - 1][j], grid[i][j - 1])
return grid[i][j] |
print("Keep Talking And Nobody Explodes - Kronorox Solvers")
print("On the Subject of Passwords")
print("Version 1.01")
print(" ")
print("Remember to rack through the first six(using the arrows), then move to the second set of letters, and so on")
#Loading the file, opening it, then adding it to the list, then closing
def loadwords():
words = open("passwordslist.txt", "r")#open the file, read only access
wordlist = []#our shiny new empty list to fill
for line in words: #only letters 1-5 to stop "\n" being added
wordlist.append(str(line[0:5]))
words.close()#close the file, we weren't born in a barn!
return(wordlist)
def lettercheck(letters):#This checks the input to make sure it wasn't put in wrong
if len(letters) != 6:#the input has to be six long
return False
for i in letters.lower():#the input has to be a letter(we lower case it briefly)
if i not in ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]:
return False
else: return True
#with our checker ready, lets input the words!
#Inputting the letters available
def letter_one(columns):#making the first list of letters
letterlist_one = input("Input first letters: ")
if letterlist_one == "admin":#some debugging to skip to the solver
return solver(["sccccc","tccccc","uccccc","dccccc","yccccc"],loadwords())
if lettercheck(letterlist_one) == True: #if the format is correct
print("Okay!")#if they get it right, tell them
columns.append(letterlist_one.upper())#add it to the list of columns
letter_two(columns)#move to the next set of letters
else:
print("You made a mistake!")#they made a fucky wucky
letter_one(columns)#do it again, but right this time
def letter_two(columns):
letterlist_two = input("Input second letters:")
if lettercheck(letterlist_two) == True:
print("Okay!")
columns.append(letterlist_two.upper())
letter_three(columns)
else:
print("You made a mistake!")
letter_two(columns)
def letter_three(columns):
letterlist_three = input("Input third letters: ")
if lettercheck(letterlist_three) == True:
print("Okay!")
columns.append(letterlist_three.upper())
letter_four(columns)
else:
print("You made a mistake!")
letter_three(columns)
def letter_four(columns):
letterlist_four = input("Input fourth letters:")
if lettercheck(letterlist_four) == True:
print("Okay!")
columns.append(letterlist_four.upper())
letter_five(columns)
else:
print("You made a mistake!")
letter_four(columns)
def letter_five(columns):
letterlist_five = input("Input fifth letters: ")
if lettercheck(letterlist_five) == True:
print("Okay!")
columns.append(letterlist_five.upper())
print("Solving...")
solver(columns,loadwords())
else:
print("You made a mistake!")
letter_five(columns)
#okay good you've inputted your letters and they're correct! time to check em!
def solver(columns,wordlist):#import the inputted words, and the list of words
newwordlist = [] #make a new wordlist we'll use to alter(to stop list editing failures, lazy af)
for word in range(0, len(wordlist) ):#for every word in the word list
newwordlist.append(wordlist[word])#add that word to our new word list, this is a bad way of doing this
#print the table of the letters youve added
for column in range (0, len(columns)):#for every column in the list of inputted columns
for row in range (0,len(columns[column])):#and for every row in the list of inputted columns
print(str(columns[column][row] + " "), end="")#print each letter, then add a space, don't add a new line
print("")#print the new line once the row is printed
#time to check the inputs!
for word in range(0, len(wordlist)):#for every word in the wordlist
for letter in range(0, len(wordlist[word]) ):#and for every letter in every word in the wordlist
if wordlist[word][letter] not in columns[letter]:#check if the letter is in that column
try:#just in case the word has already been taken out of our list
newwordlist.remove(wordlist[word])#remove the word it can't be from our new list
except:"Word already removed!"
try:
print("The answer is: " + str(newwordlist[0].upper()) )#print our new word list!
except: print("I can't find the word, are you sure you inputted right?!")
def play():#play script to launch the commands
columns=[]
letter_one([])
play()
| print('Keep Talking And Nobody Explodes - Kronorox Solvers')
print('On the Subject of Passwords')
print('Version 1.01')
print(' ')
print('Remember to rack through the first six(using the arrows), then move to the second set of letters, and so on')
def loadwords():
words = open('passwordslist.txt', 'r')
wordlist = []
for line in words:
wordlist.append(str(line[0:5]))
words.close()
return wordlist
def lettercheck(letters):
if len(letters) != 6:
return False
for i in letters.lower():
if i not in ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']:
return False
else:
return True
def letter_one(columns):
letterlist_one = input('Input first letters: ')
if letterlist_one == 'admin':
return solver(['sccccc', 'tccccc', 'uccccc', 'dccccc', 'yccccc'], loadwords())
if lettercheck(letterlist_one) == True:
print('Okay!')
columns.append(letterlist_one.upper())
letter_two(columns)
else:
print('You made a mistake!')
letter_one(columns)
def letter_two(columns):
letterlist_two = input('Input second letters:')
if lettercheck(letterlist_two) == True:
print('Okay!')
columns.append(letterlist_two.upper())
letter_three(columns)
else:
print('You made a mistake!')
letter_two(columns)
def letter_three(columns):
letterlist_three = input('Input third letters: ')
if lettercheck(letterlist_three) == True:
print('Okay!')
columns.append(letterlist_three.upper())
letter_four(columns)
else:
print('You made a mistake!')
letter_three(columns)
def letter_four(columns):
letterlist_four = input('Input fourth letters:')
if lettercheck(letterlist_four) == True:
print('Okay!')
columns.append(letterlist_four.upper())
letter_five(columns)
else:
print('You made a mistake!')
letter_four(columns)
def letter_five(columns):
letterlist_five = input('Input fifth letters: ')
if lettercheck(letterlist_five) == True:
print('Okay!')
columns.append(letterlist_five.upper())
print('Solving...')
solver(columns, loadwords())
else:
print('You made a mistake!')
letter_five(columns)
def solver(columns, wordlist):
newwordlist = []
for word in range(0, len(wordlist)):
newwordlist.append(wordlist[word])
for column in range(0, len(columns)):
for row in range(0, len(columns[column])):
print(str(columns[column][row] + ' '), end='')
print('')
for word in range(0, len(wordlist)):
for letter in range(0, len(wordlist[word])):
if wordlist[word][letter] not in columns[letter]:
try:
newwordlist.remove(wordlist[word])
except:
'Word already removed!'
try:
print('The answer is: ' + str(newwordlist[0].upper()))
except:
print("I can't find the word, are you sure you inputted right?!")
def play():
columns = []
letter_one([])
play() |
class BeaxyIOError(IOError):
def __init__(self, msg, response, result, *args, **kwargs):
self.response = response
self.result = result
super(BeaxyIOError, self).__init__(msg, *args, **kwargs)
| class Beaxyioerror(IOError):
def __init__(self, msg, response, result, *args, **kwargs):
self.response = response
self.result = result
super(BeaxyIOError, self).__init__(msg, *args, **kwargs) |
class Solution(object):
def lengthOfLongestSubstring(self, s):
if not s:
return 0
start, end = 0, 0
seen = set()
ans = 0
while end < len(s):
if s[end] not in seen:
seen.add(s[end])
ans = max(ans, (end-start)+1)
end += 1
else:
while s[end] in seen:
seen.remove(s[start])
start += 1
return ans
abc = Solution()
print (abc.lengthOfLongestSubstring(" "))
| class Solution(object):
def length_of_longest_substring(self, s):
if not s:
return 0
(start, end) = (0, 0)
seen = set()
ans = 0
while end < len(s):
if s[end] not in seen:
seen.add(s[end])
ans = max(ans, end - start + 1)
end += 1
else:
while s[end] in seen:
seen.remove(s[start])
start += 1
return ans
abc = solution()
print(abc.lengthOfLongestSubstring(' ')) |
# generated from genmsg/cmake/pkg-genmsg.context.in
messages_str = "/home/mayur/ros jade files/catkin_ws/src/Udacity-SDC-Radar-Driver-Micro-Challenge/ros/src/sensing/drivers/can/packages/kvaser/msg/CANESR.msg"
services_str = ""
pkg_name = "kvaser"
dependencies_str = "std_msgs;visualization_msgs"
langs = "gencpp;geneus;genlisp;gennodejs;genpy"
dep_include_paths_str = "kvaser;/home/mayur/ros jade files/catkin_ws/src/Udacity-SDC-Radar-Driver-Micro-Challenge/ros/src/sensing/drivers/can/packages/kvaser/msg;std_msgs;/opt/ros/kinetic/share/std_msgs/cmake/../msg;visualization_msgs;/opt/ros/kinetic/share/visualization_msgs/cmake/../msg;geometry_msgs;/opt/ros/kinetic/share/geometry_msgs/cmake/../msg"
PYTHON_EXECUTABLE = "/usr/bin/python"
package_has_static_sources = '' == 'TRUE'
genmsg_check_deps_script = "/opt/ros/kinetic/share/genmsg/cmake/../../../lib/genmsg/genmsg_check_deps.py"
| messages_str = '/home/mayur/ros jade files/catkin_ws/src/Udacity-SDC-Radar-Driver-Micro-Challenge/ros/src/sensing/drivers/can/packages/kvaser/msg/CANESR.msg'
services_str = ''
pkg_name = 'kvaser'
dependencies_str = 'std_msgs;visualization_msgs'
langs = 'gencpp;geneus;genlisp;gennodejs;genpy'
dep_include_paths_str = 'kvaser;/home/mayur/ros jade files/catkin_ws/src/Udacity-SDC-Radar-Driver-Micro-Challenge/ros/src/sensing/drivers/can/packages/kvaser/msg;std_msgs;/opt/ros/kinetic/share/std_msgs/cmake/../msg;visualization_msgs;/opt/ros/kinetic/share/visualization_msgs/cmake/../msg;geometry_msgs;/opt/ros/kinetic/share/geometry_msgs/cmake/../msg'
python_executable = '/usr/bin/python'
package_has_static_sources = '' == 'TRUE'
genmsg_check_deps_script = '/opt/ros/kinetic/share/genmsg/cmake/../../../lib/genmsg/genmsg_check_deps.py' |
file = open("input", "r")
good_passwords = 0
for line in file.readlines():
poss, char, word = line.strip().split()
pos_one, pos_two = poss.split("-")
char = char[0]
if (word[int(pos_one) - 1] == char) != (word[int(pos_two) - 1] == char):
good_passwords += 1
print(good_passwords)
| file = open('input', 'r')
good_passwords = 0
for line in file.readlines():
(poss, char, word) = line.strip().split()
(pos_one, pos_two) = poss.split('-')
char = char[0]
if (word[int(pos_one) - 1] == char) != (word[int(pos_two) - 1] == char):
good_passwords += 1
print(good_passwords) |
# Hotel Receptionist (1061100) | Sleepywood Hotel
array = [# Name, MesoCost, Map ID
["Regular", 499, 105000011],
["VIP", 999, 105000012]
]
sm.sendNext("Welcome. We're the Sleepywood Hotel. "
"Our hotel works hard to serve you the best at all times. "
"If you are tired and worn out from hunting, how about a relaxing stay at our hotel?")
selection = sm.sendNext("We offer two kinds of rooms for our service. "
"Please choose the one of your liking.\r\n#b"
"#L0#"+ array[0][0] +" sauna (" + str(array[0][1]) + " mesos)#l\r\n"
"#L1#"+ array[1][0] +" sauna (" + str(array[1][1]) + " mesos)#l")
if selection == 0:
response = sm.sendAskYesNo("You have chosen the regular sauna. \r\n"
"Your HP and MP will recover fast and you can even purchase some items there. "
"Are you sure you want to go in?")
elif selection == 1:
response = sm.sendAskYesNo("You've chosen the VIP sauna. \r\n"
"Your HP and MP will recover even faster than that of the regular sauna and you can even find a special item in there. "
"Are you sure you want to go in?")
if sm.getMesos() < array[selection][1]:
sm.sendSayOkay("I'm sorry. It looks like you don't have enough mesos. It will cost you at least " + str(array[selection][1]) + " mesos to stay at our "+ array[selection][0] +" sauna.")
else:
sm.warp(array[selection][2], 0)
sm.deductMesos(array[selection][1])
| array = [['Regular', 499, 105000011], ['VIP', 999, 105000012]]
sm.sendNext("Welcome. We're the Sleepywood Hotel. Our hotel works hard to serve you the best at all times. If you are tired and worn out from hunting, how about a relaxing stay at our hotel?")
selection = sm.sendNext('We offer two kinds of rooms for our service. Please choose the one of your liking.\r\n#b#L0#' + array[0][0] + ' sauna (' + str(array[0][1]) + ' mesos)#l\r\n#L1#' + array[1][0] + ' sauna (' + str(array[1][1]) + ' mesos)#l')
if selection == 0:
response = sm.sendAskYesNo('You have chosen the regular sauna. \r\nYour HP and MP will recover fast and you can even purchase some items there. Are you sure you want to go in?')
elif selection == 1:
response = sm.sendAskYesNo("You've chosen the VIP sauna. \r\nYour HP and MP will recover even faster than that of the regular sauna and you can even find a special item in there. Are you sure you want to go in?")
if sm.getMesos() < array[selection][1]:
sm.sendSayOkay("I'm sorry. It looks like you don't have enough mesos. It will cost you at least " + str(array[selection][1]) + ' mesos to stay at our ' + array[selection][0] + ' sauna.')
else:
sm.warp(array[selection][2], 0)
sm.deductMesos(array[selection][1]) |
### Merge Sort
def merge_sort(A):
"""
Given a list A, sort it using merge sort.
First divide the list into two halves, then resursively sort each half.
Return the sorted list.
If the list has length less than 2, return the list since it's already sorted.
"""
n = len(A)
if n < 2:
return A
mid = n // 2 #floor division
left = merge_sort(A[:mid])
right = merge_sort(A[mid:])
return merge(left, right)
def merge(left, right):
"""
Given two sorted lists, merge them into one sorted list.
Save the sorted list into the result list.
left: left sorted sublist
right: right sorted sublist
i and j are variables to be used later.
i: index of the left sublist
j: index of the right sublist
"""
result = []
i = j = 0
while i < len(left) and j < len(right):
if left[i] <= right[j]:
result.append(left[i])
i += 1
else:
result.append(right[j])
j += 1
result += left[i:]
result += right[j:]
return result
sorted = merge_sort([3,2,1,4,5,6,10,9,8,7])
print(sorted) | def merge_sort(A):
"""
Given a list A, sort it using merge sort.
First divide the list into two halves, then resursively sort each half.
Return the sorted list.
If the list has length less than 2, return the list since it's already sorted.
"""
n = len(A)
if n < 2:
return A
mid = n // 2
left = merge_sort(A[:mid])
right = merge_sort(A[mid:])
return merge(left, right)
def merge(left, right):
"""
Given two sorted lists, merge them into one sorted list.
Save the sorted list into the result list.
left: left sorted sublist
right: right sorted sublist
i and j are variables to be used later.
i: index of the left sublist
j: index of the right sublist
"""
result = []
i = j = 0
while i < len(left) and j < len(right):
if left[i] <= right[j]:
result.append(left[i])
i += 1
else:
result.append(right[j])
j += 1
result += left[i:]
result += right[j:]
return result
sorted = merge_sort([3, 2, 1, 4, 5, 6, 10, 9, 8, 7])
print(sorted) |
def init_parse(init):
dicinit = {}
init = open('%s'%init,'r')
lines = init.readlines()
lines = [x.strip( ) for x in lines]
for line in lines:
if line.startswith('#'):
pass
else:
try:
dicinit[line.split(' ')[0]] = line.split(' ')[2]
except IndexError:
break
init.close()
return dicinit
| def init_parse(init):
dicinit = {}
init = open('%s' % init, 'r')
lines = init.readlines()
lines = [x.strip() for x in lines]
for line in lines:
if line.startswith('#'):
pass
else:
try:
dicinit[line.split(' ')[0]] = line.split(' ')[2]
except IndexError:
break
init.close()
return dicinit |
"""
This is where we should implement any and all job function for the
redis queue. The rq library requires special namespacing in order to work,
so these functions must reside in a separate file.
"""
| """
This is where we should implement any and all job function for the
redis queue. The rq library requires special namespacing in order to work,
so these functions must reside in a separate file.
""" |
"""
A decorator that makes a class a singleton
"""
# pylint: disable=too-few-public-methods
class Singleton:
"""
A singleton class
"""
instances = {}
def __new__(cls, clz=None):
"""
Returns a new instance ONLY if one does not already exist
"""
if clz is None:
if cls.__name__ not in Singleton.instances:
Singleton.instances[cls.__name__] = object.__new__(cls)
return Singleton.instances[cls.__name__]
Singleton.instances[clz.__name__] = clz()
Singleton.first = clz
return type(clz.__name__, (Singleton,), dict(clz.__dict__))
| """
A decorator that makes a class a singleton
"""
class Singleton:
"""
A singleton class
"""
instances = {}
def __new__(cls, clz=None):
"""
Returns a new instance ONLY if one does not already exist
"""
if clz is None:
if cls.__name__ not in Singleton.instances:
Singleton.instances[cls.__name__] = object.__new__(cls)
return Singleton.instances[cls.__name__]
Singleton.instances[clz.__name__] = clz()
Singleton.first = clz
return type(clz.__name__, (Singleton,), dict(clz.__dict__)) |
try:
print("Enter the 20 input Number to get summary")
num=[]
for i in range(0, 20):
temp = int(input())
num.append(temp)
print(f"List with Number's : {num}\nlength :{len(num)}")
count_p=0
count_n=0
count_odd=0
count_even=0
count_zero=0
for i in num:
if i>0:
count_p+=1
if i<0:
count_n+=1
if i==0:
count_zero+=1
if i%2==0:
count_even+=1
if i%2!=0:
count_odd+=1
print(f"Summary About List of 20 Number Entered\nnumber of positive numbers :{count_p}\nnumber of negative numbers :{count_n}\n"
f"number of odd numbers :{count_odd}\nnumber of even numbers :{count_even}\nnumber of Zero's :{count_zero}")
except Exception as E:
print(E) | try:
print('Enter the 20 input Number to get summary')
num = []
for i in range(0, 20):
temp = int(input())
num.append(temp)
print(f"List with Number's : {num}\nlength :{len(num)}")
count_p = 0
count_n = 0
count_odd = 0
count_even = 0
count_zero = 0
for i in num:
if i > 0:
count_p += 1
if i < 0:
count_n += 1
if i == 0:
count_zero += 1
if i % 2 == 0:
count_even += 1
if i % 2 != 0:
count_odd += 1
print(f"Summary About List of 20 Number Entered\nnumber of positive numbers :{count_p}\nnumber of negative numbers :{count_n}\nnumber of odd numbers :{count_odd}\nnumber of even numbers :{count_even}\nnumber of Zero's :{count_zero}")
except Exception as E:
print(E) |
class Solution:
def solve(self, strs):
return sorted(strs, reverse = True)
| class Solution:
def solve(self, strs):
return sorted(strs, reverse=True) |
"""
You can uncomment on the setting parameters below
==================================
"""
"""
This parameter is used to determine the specific user to executes the kolla ansible command
"""
# USER_EXEC_KOLLA_COMMAND = "root"
"""
This parameter is used to determine the location of the hosts file
"""
# CONFIG_DIR_HOST = "/etc/hosts"
"""
This parameter is used to determine the storage location for the multinode and globals.yaml files
"""
# CONFIG_DIR_MULTINODE = "/home/kolla/multinode"
# CONFIG_DIR_GLOBAL_YML = "/etc/kolla/globals.yml"
ALLOWED_HOSTS = ['*']
| """
You can uncomment on the setting parameters below
==================================
"""
'\nThis parameter is used to determine the specific user to executes the kolla ansible command\n'
'\nThis parameter is used to determine the location of the hosts file\n'
'\nThis parameter is used to determine the storage location for the multinode and globals.yaml files\n'
allowed_hosts = ['*'] |
before_array_dict = [
{"theRealCat": "unavailable",
"code": "callback-http-failure-status",
"nestedDeeply": {
"stillNesting": {
"yetStillNesting": {
"wowSuchNest": True
}
}
},
"details": [{"nextId": "ued-abc123",
"name": "callnextId",
"superValue": "c-abc123"},
{"nextId": "ued-abc123",
"name": "callbackStatusCode",
"superValue": "404"},
{"nextId": "ued-abc123",
"name": "totalDuration",
"superValue": "55"},
{"nextId": "ued-abc123",
"name": "responseDuration",
"superValue": "0"},
{"nextId": "ued-abc123",
"name": "requestDuration",
"superValue": "0"},
{"nextId": "ued-abc123",
"name": "callbackUrl",
"superValue": "http://google.com"},
{"nextId": "ued-abc123",
"name": "callbackMethod",
"superValue": "POST"},
{"nextId": "ued-abc123",
"name": "callbackEvent",
"superValue": "hangup"}],
"nextId": "ue-abc123",
"message": "The callback returned an HTTP failure status",
"time": "2017-02-28T15:40:35Z"},
{"theRealCat": "unavailable",
"code": "callback-http-failure-status",
"newErrorMessage": [
[
"a", "b", "c"
],
[
"a", "b", "c"
]
],
"errorMessagesABC123": [
{
"valueLesser": [
{
"smallEnabled": True,
"bigDisabled": [
"abc",
"123",
"xyz"
]
},
{
"smallEnabled": True,
"bigDisabled": [
"abc",
"123",
"xyz"
]
},
{
"smallEnabled": True,
"bigDisabled": [
"abc",
"123",
"xyz"
]
},
{
"smallEzzznabled": True,
"bigDisabled": [
"abc",
"123",
"xyz"
]
}
]
},
{
"valueLesser": [
{
"smallEnabled": True,
"bigDisabled": [
"abc",
"123",
"xyz"
]
},
{
"smallEnabled": True,
"bigDisabled": [
"abc",
"123",
"xyz"
]
},
{
"smallEnabled": True,
"bigDisabled": [
"abc",
"123",
"xyz"
]
},
{
"smallEnabled": True,
"bigDisabled": [
"abc",
"123",
"xyz"
]
}
]
},
{
"valueLesser": [
{
"smallEnabled": True,
"bigDisabled": [
"abc",
"123",
"xyz"
]
},
{
"smallEnabled": True,
"bigDisabled": [
"abc",
"123",
"xyz"
]
},
{
"smallEnabled": True,
"bigDisabled": [
"abc",
"123",
"xyz"
]
},
{
"smallEnabled": True,
"bigDisabled": [
"abc",
"123",
"xyz"
]
}
]
},
{
"valueLesser": [
{
"smallEnabled": True,
"bigDisabled": [
"abc",
"123",
"xyz"
]
},
{
"smallEnabled": True,
"bigDisabled": [
"abc",
"123",
"xyz"
]
},
{
"smallEnabled": True,
"bigDisabled": [
"abc",
"123",
"xyz"
]
},
{
"smallEnabled": True,
"bigDisabled": [
"abc",
"123",
"xyz"
]
}
]
}
],
"details": [{"nextId": "ued-abc123",
"name": "callnextId",
"superValue": "c-abc123"},
{"nextId": "ued-abc123",
"name": "callbackStatusCode",
"superValue": "404"},
{"nextId": "ued-abc123",
"name": "totalDuration",
"superValue": "7195"},
{"nextId": "ued-abc123",
"name": "responseDuration",
"superValue": "0"},
{"nextId": "ued-abc123",
"name": "requestDuration",
"superValue": "0"},
{"nextId": "ued-abc123",
"name": "callbackUrl",
"superValue": "http://google.com"},
{"nextId": "ued-abc123",
"name": "callbackMethod",
"superValue": "POST"},
{"nextId": "ued-abc123",
"name": "callbackEvent",
"superValue": "incomingcall"}],
"nextId": "ue-abc123",
"message": "The callback returned an HTTP failure status",
"time": "2017-02-28T15:40:03Z"},
{"theRealCat": "unavailable",
"code": "callback-http-failure-status",
"details": [{"nextId": "ued-abc123",
"name": "messagenextId",
"superValue": "m-abc123"},
{"nextId": "ued-abc123",
"name": "totalDuration",
"superValue": "37"},
{"nextId": "ued-abc123",
"name": "responseDuration",
"superValue": "0"},
{"nextId": "ued-abc123",
"name": "callbackStatusCode",
"superValue": "405"},
{"nextId": "ued-abc123",
"name": "requestDuration",
"superValue": "0"},
{"nextId": "ued-abc123",
"name": "callbackUrl",
"superValue": "http://google.com"},
{"nextId": "ued-abc123",
"name": "callbackMethod",
"superValue": "POST"},
{"nextId": "ued-abc123",
"name": "callbackEvent",
"superValue": "sms"}],
"nextId": "ue-abc123",
"message": "The callback returned an HTTP failure status",
"time": "2017-02-27T16:45:54Z"},
{"theRealCat": "unavailable",
"code": "callback-http-failure-status",
"details": [{"nextId": "ued-abc123",
"name": "totalDuration",
"superValue": "20"},
{"nextId": "ued-abc123",
"name": "responseDuration",
"superValue": "0"},
{"nextId": "ued-abc123",
"name": "requestDuration",
"superValue": "0"},
{"nextId": "ued-abc123",
"name": "callbackUrl",
"superValue": "http://google.com"},
{"nextId": "ued-abc123",
"name": "messagenextId",
"superValue": "m-abc123"},
{"nextId": "ued-abc123",
"name": "callbackStatusCode",
"superValue": "405"},
{"nextId": "ued-abc123",
"name": "callbackMethod",
"superValue": "POST"},
{"nextId": "ued-abc123",
"name": "callbackEvent",
"superValue": "sms"}],
"nextId": "ue-abc123",
"message": "The callback returned an HTTP failure status",
"time": "2017-02-27T16:45:50Z"}]
after_array_dict = [{'code': 'callback-http-failure-status',
'details': [{'name': 'callnextId',
'next_id': 'ued-abc123',
'super_value': 'c-abc123'},
{'name': 'callbackStatusCode',
'next_id': 'ued-abc123',
'super_value': '404'},
{'name': 'totalDuration',
'next_id': 'ued-abc123',
'super_value': '55'},
{'name': 'responseDuration',
'next_id': 'ued-abc123',
'super_value': '0'},
{'name': 'requestDuration',
'next_id': 'ued-abc123',
'super_value': '0'},
{'name': 'callbackUrl',
'next_id': 'ued-abc123',
'super_value': 'http://google.com'},
{'name': 'callbackMethod',
'next_id': 'ued-abc123',
'super_value': 'POST'},
{'name': 'callbackEvent',
'next_id': 'ued-abc123',
'super_value': 'hangup'}],
'message': 'The callback returned an HTTP failure status',
'nested_deeply': {'still_nesting': {'yet_still_nesting': {'wow_such_nest': True}}},
'next_id': 'ue-abc123',
'the_real_cat': 'unavailable',
'time': '2017-02-28T15:40:35Z'},
{'code': 'callback-http-failure-status',
'details': [{'name': 'callnextId',
'next_id': 'ued-abc123',
'super_value': 'c-abc123'},
{'name': 'callbackStatusCode',
'next_id': 'ued-abc123',
'super_value': '404'},
{'name': 'totalDuration',
'next_id': 'ued-abc123',
'super_value': '7195'},
{'name': 'responseDuration',
'next_id': 'ued-abc123',
'super_value': '0'},
{'name': 'requestDuration',
'next_id': 'ued-abc123',
'super_value': '0'},
{'name': 'callbackUrl',
'next_id': 'ued-abc123',
'super_value': 'http://google.com'},
{'name': 'callbackMethod',
'next_id': 'ued-abc123',
'super_value': 'POST'},
{'name': 'callbackEvent',
'next_id': 'ued-abc123',
'super_value': 'incomingcall'}],
'error_messages_abc123': [{'value_lesser': [{'big_disabled': ['abc',
'123',
'xyz'],
'small_enabled': True},
{'big_disabled': ['abc',
'123',
'xyz'],
'small_enabled': True},
{'big_disabled': ['abc',
'123',
'xyz'],
'small_enabled': True},
{'big_disabled': ['abc',
'123',
'xyz'],
'small_ezzznabled': True}]},
{'value_lesser': [{'big_disabled': ['abc',
'123',
'xyz'],
'small_enabled': True},
{'big_disabled': ['abc',
'123',
'xyz'],
'small_enabled': True},
{'big_disabled': ['abc',
'123',
'xyz'],
'small_enabled': True},
{'big_disabled': ['abc',
'123',
'xyz'],
'small_enabled': True}]},
{'value_lesser': [{'big_disabled': ['abc',
'123',
'xyz'],
'small_enabled': True},
{'big_disabled': ['abc',
'123',
'xyz'],
'small_enabled': True},
{'big_disabled': ['abc',
'123',
'xyz'],
'small_enabled': True},
{'big_disabled': ['abc',
'123',
'xyz'],
'small_enabled': True}]},
{'value_lesser': [{'big_disabled': ['abc',
'123',
'xyz'],
'small_enabled': True},
{'big_disabled': ['abc',
'123',
'xyz'],
'small_enabled': True},
{'big_disabled': ['abc',
'123',
'xyz'],
'small_enabled': True},
{'big_disabled': ['abc',
'123',
'xyz'],
'small_enabled': True}]}],
'message': 'The callback returned an HTTP failure status',
'new_error_message': [['a', 'b', 'c'], ['a', 'b', 'c']],
'next_id': 'ue-abc123',
'the_real_cat': 'unavailable',
'time': '2017-02-28T15:40:03Z'},
{'code': 'callback-http-failure-status',
'details': [{'name': 'messagenextId',
'next_id': 'ued-abc123',
'super_value': 'm-abc123'},
{'name': 'totalDuration',
'next_id': 'ued-abc123',
'super_value': '37'},
{'name': 'responseDuration',
'next_id': 'ued-abc123',
'super_value': '0'},
{'name': 'callbackStatusCode',
'next_id': 'ued-abc123',
'super_value': '405'},
{'name': 'requestDuration',
'next_id': 'ued-abc123',
'super_value': '0'},
{'name': 'callbackUrl',
'next_id': 'ued-abc123',
'super_value': 'http://google.com'},
{'name': 'callbackMethod',
'next_id': 'ued-abc123',
'super_value': 'POST'},
{'name': 'callbackEvent',
'next_id': 'ued-abc123',
'super_value': 'sms'}],
'message': 'The callback returned an HTTP failure status',
'next_id': 'ue-abc123',
'the_real_cat': 'unavailable',
'time': '2017-02-27T16:45:54Z'},
{'code': 'callback-http-failure-status',
'details': [{'name': 'totalDuration',
'next_id': 'ued-abc123',
'super_value': '20'},
{'name': 'responseDuration',
'next_id': 'ued-abc123',
'super_value': '0'},
{'name': 'requestDuration',
'next_id': 'ued-abc123',
'super_value': '0'},
{'name': 'callbackUrl',
'next_id': 'ued-abc123',
'super_value': 'http://google.com'},
{'name': 'messagenextId',
'next_id': 'ued-abc123',
'super_value': 'm-abc123'},
{'name': 'callbackStatusCode',
'next_id': 'ued-abc123',
'super_value': '405'},
{'name': 'callbackMethod',
'next_id': 'ued-abc123',
'super_value': 'POST'},
{'name': 'callbackEvent',
'next_id': 'ued-abc123',
'super_value': 'sms'}],
'message': 'The callback returned an HTTP failure status',
'next_id': 'ue-abc123',
'the_real_cat': 'unavailable',
'time': '2017-02-27T16:45:50Z'}]
{'created_time': '2014-04-14T19:16:07Z',
'id': 'n-dsd3wg3o4ng33icuooksngi',
'name': 'Jailbreak Phone',
'national_number': '(502) 286-6496',
'number': '+15022866496',
'number_state': 'released',
'price': '0.35'}
| before_array_dict = [{'theRealCat': 'unavailable', 'code': 'callback-http-failure-status', 'nestedDeeply': {'stillNesting': {'yetStillNesting': {'wowSuchNest': True}}}, 'details': [{'nextId': 'ued-abc123', 'name': 'callnextId', 'superValue': 'c-abc123'}, {'nextId': 'ued-abc123', 'name': 'callbackStatusCode', 'superValue': '404'}, {'nextId': 'ued-abc123', 'name': 'totalDuration', 'superValue': '55'}, {'nextId': 'ued-abc123', 'name': 'responseDuration', 'superValue': '0'}, {'nextId': 'ued-abc123', 'name': 'requestDuration', 'superValue': '0'}, {'nextId': 'ued-abc123', 'name': 'callbackUrl', 'superValue': 'http://google.com'}, {'nextId': 'ued-abc123', 'name': 'callbackMethod', 'superValue': 'POST'}, {'nextId': 'ued-abc123', 'name': 'callbackEvent', 'superValue': 'hangup'}], 'nextId': 'ue-abc123', 'message': 'The callback returned an HTTP failure status', 'time': '2017-02-28T15:40:35Z'}, {'theRealCat': 'unavailable', 'code': 'callback-http-failure-status', 'newErrorMessage': [['a', 'b', 'c'], ['a', 'b', 'c']], 'errorMessagesABC123': [{'valueLesser': [{'smallEnabled': True, 'bigDisabled': ['abc', '123', 'xyz']}, {'smallEnabled': True, 'bigDisabled': ['abc', '123', 'xyz']}, {'smallEnabled': True, 'bigDisabled': ['abc', '123', 'xyz']}, {'smallEzzznabled': True, 'bigDisabled': ['abc', '123', 'xyz']}]}, {'valueLesser': [{'smallEnabled': True, 'bigDisabled': ['abc', '123', 'xyz']}, {'smallEnabled': True, 'bigDisabled': ['abc', '123', 'xyz']}, {'smallEnabled': True, 'bigDisabled': ['abc', '123', 'xyz']}, {'smallEnabled': True, 'bigDisabled': ['abc', '123', 'xyz']}]}, {'valueLesser': [{'smallEnabled': True, 'bigDisabled': ['abc', '123', 'xyz']}, {'smallEnabled': True, 'bigDisabled': ['abc', '123', 'xyz']}, {'smallEnabled': True, 'bigDisabled': ['abc', '123', 'xyz']}, {'smallEnabled': True, 'bigDisabled': ['abc', '123', 'xyz']}]}, {'valueLesser': [{'smallEnabled': True, 'bigDisabled': ['abc', '123', 'xyz']}, {'smallEnabled': True, 'bigDisabled': ['abc', '123', 'xyz']}, {'smallEnabled': True, 'bigDisabled': ['abc', '123', 'xyz']}, {'smallEnabled': True, 'bigDisabled': ['abc', '123', 'xyz']}]}], 'details': [{'nextId': 'ued-abc123', 'name': 'callnextId', 'superValue': 'c-abc123'}, {'nextId': 'ued-abc123', 'name': 'callbackStatusCode', 'superValue': '404'}, {'nextId': 'ued-abc123', 'name': 'totalDuration', 'superValue': '7195'}, {'nextId': 'ued-abc123', 'name': 'responseDuration', 'superValue': '0'}, {'nextId': 'ued-abc123', 'name': 'requestDuration', 'superValue': '0'}, {'nextId': 'ued-abc123', 'name': 'callbackUrl', 'superValue': 'http://google.com'}, {'nextId': 'ued-abc123', 'name': 'callbackMethod', 'superValue': 'POST'}, {'nextId': 'ued-abc123', 'name': 'callbackEvent', 'superValue': 'incomingcall'}], 'nextId': 'ue-abc123', 'message': 'The callback returned an HTTP failure status', 'time': '2017-02-28T15:40:03Z'}, {'theRealCat': 'unavailable', 'code': 'callback-http-failure-status', 'details': [{'nextId': 'ued-abc123', 'name': 'messagenextId', 'superValue': 'm-abc123'}, {'nextId': 'ued-abc123', 'name': 'totalDuration', 'superValue': '37'}, {'nextId': 'ued-abc123', 'name': 'responseDuration', 'superValue': '0'}, {'nextId': 'ued-abc123', 'name': 'callbackStatusCode', 'superValue': '405'}, {'nextId': 'ued-abc123', 'name': 'requestDuration', 'superValue': '0'}, {'nextId': 'ued-abc123', 'name': 'callbackUrl', 'superValue': 'http://google.com'}, {'nextId': 'ued-abc123', 'name': 'callbackMethod', 'superValue': 'POST'}, {'nextId': 'ued-abc123', 'name': 'callbackEvent', 'superValue': 'sms'}], 'nextId': 'ue-abc123', 'message': 'The callback returned an HTTP failure status', 'time': '2017-02-27T16:45:54Z'}, {'theRealCat': 'unavailable', 'code': 'callback-http-failure-status', 'details': [{'nextId': 'ued-abc123', 'name': 'totalDuration', 'superValue': '20'}, {'nextId': 'ued-abc123', 'name': 'responseDuration', 'superValue': '0'}, {'nextId': 'ued-abc123', 'name': 'requestDuration', 'superValue': '0'}, {'nextId': 'ued-abc123', 'name': 'callbackUrl', 'superValue': 'http://google.com'}, {'nextId': 'ued-abc123', 'name': 'messagenextId', 'superValue': 'm-abc123'}, {'nextId': 'ued-abc123', 'name': 'callbackStatusCode', 'superValue': '405'}, {'nextId': 'ued-abc123', 'name': 'callbackMethod', 'superValue': 'POST'}, {'nextId': 'ued-abc123', 'name': 'callbackEvent', 'superValue': 'sms'}], 'nextId': 'ue-abc123', 'message': 'The callback returned an HTTP failure status', 'time': '2017-02-27T16:45:50Z'}]
after_array_dict = [{'code': 'callback-http-failure-status', 'details': [{'name': 'callnextId', 'next_id': 'ued-abc123', 'super_value': 'c-abc123'}, {'name': 'callbackStatusCode', 'next_id': 'ued-abc123', 'super_value': '404'}, {'name': 'totalDuration', 'next_id': 'ued-abc123', 'super_value': '55'}, {'name': 'responseDuration', 'next_id': 'ued-abc123', 'super_value': '0'}, {'name': 'requestDuration', 'next_id': 'ued-abc123', 'super_value': '0'}, {'name': 'callbackUrl', 'next_id': 'ued-abc123', 'super_value': 'http://google.com'}, {'name': 'callbackMethod', 'next_id': 'ued-abc123', 'super_value': 'POST'}, {'name': 'callbackEvent', 'next_id': 'ued-abc123', 'super_value': 'hangup'}], 'message': 'The callback returned an HTTP failure status', 'nested_deeply': {'still_nesting': {'yet_still_nesting': {'wow_such_nest': True}}}, 'next_id': 'ue-abc123', 'the_real_cat': 'unavailable', 'time': '2017-02-28T15:40:35Z'}, {'code': 'callback-http-failure-status', 'details': [{'name': 'callnextId', 'next_id': 'ued-abc123', 'super_value': 'c-abc123'}, {'name': 'callbackStatusCode', 'next_id': 'ued-abc123', 'super_value': '404'}, {'name': 'totalDuration', 'next_id': 'ued-abc123', 'super_value': '7195'}, {'name': 'responseDuration', 'next_id': 'ued-abc123', 'super_value': '0'}, {'name': 'requestDuration', 'next_id': 'ued-abc123', 'super_value': '0'}, {'name': 'callbackUrl', 'next_id': 'ued-abc123', 'super_value': 'http://google.com'}, {'name': 'callbackMethod', 'next_id': 'ued-abc123', 'super_value': 'POST'}, {'name': 'callbackEvent', 'next_id': 'ued-abc123', 'super_value': 'incomingcall'}], 'error_messages_abc123': [{'value_lesser': [{'big_disabled': ['abc', '123', 'xyz'], 'small_enabled': True}, {'big_disabled': ['abc', '123', 'xyz'], 'small_enabled': True}, {'big_disabled': ['abc', '123', 'xyz'], 'small_enabled': True}, {'big_disabled': ['abc', '123', 'xyz'], 'small_ezzznabled': True}]}, {'value_lesser': [{'big_disabled': ['abc', '123', 'xyz'], 'small_enabled': True}, {'big_disabled': ['abc', '123', 'xyz'], 'small_enabled': True}, {'big_disabled': ['abc', '123', 'xyz'], 'small_enabled': True}, {'big_disabled': ['abc', '123', 'xyz'], 'small_enabled': True}]}, {'value_lesser': [{'big_disabled': ['abc', '123', 'xyz'], 'small_enabled': True}, {'big_disabled': ['abc', '123', 'xyz'], 'small_enabled': True}, {'big_disabled': ['abc', '123', 'xyz'], 'small_enabled': True}, {'big_disabled': ['abc', '123', 'xyz'], 'small_enabled': True}]}, {'value_lesser': [{'big_disabled': ['abc', '123', 'xyz'], 'small_enabled': True}, {'big_disabled': ['abc', '123', 'xyz'], 'small_enabled': True}, {'big_disabled': ['abc', '123', 'xyz'], 'small_enabled': True}, {'big_disabled': ['abc', '123', 'xyz'], 'small_enabled': True}]}], 'message': 'The callback returned an HTTP failure status', 'new_error_message': [['a', 'b', 'c'], ['a', 'b', 'c']], 'next_id': 'ue-abc123', 'the_real_cat': 'unavailable', 'time': '2017-02-28T15:40:03Z'}, {'code': 'callback-http-failure-status', 'details': [{'name': 'messagenextId', 'next_id': 'ued-abc123', 'super_value': 'm-abc123'}, {'name': 'totalDuration', 'next_id': 'ued-abc123', 'super_value': '37'}, {'name': 'responseDuration', 'next_id': 'ued-abc123', 'super_value': '0'}, {'name': 'callbackStatusCode', 'next_id': 'ued-abc123', 'super_value': '405'}, {'name': 'requestDuration', 'next_id': 'ued-abc123', 'super_value': '0'}, {'name': 'callbackUrl', 'next_id': 'ued-abc123', 'super_value': 'http://google.com'}, {'name': 'callbackMethod', 'next_id': 'ued-abc123', 'super_value': 'POST'}, {'name': 'callbackEvent', 'next_id': 'ued-abc123', 'super_value': 'sms'}], 'message': 'The callback returned an HTTP failure status', 'next_id': 'ue-abc123', 'the_real_cat': 'unavailable', 'time': '2017-02-27T16:45:54Z'}, {'code': 'callback-http-failure-status', 'details': [{'name': 'totalDuration', 'next_id': 'ued-abc123', 'super_value': '20'}, {'name': 'responseDuration', 'next_id': 'ued-abc123', 'super_value': '0'}, {'name': 'requestDuration', 'next_id': 'ued-abc123', 'super_value': '0'}, {'name': 'callbackUrl', 'next_id': 'ued-abc123', 'super_value': 'http://google.com'}, {'name': 'messagenextId', 'next_id': 'ued-abc123', 'super_value': 'm-abc123'}, {'name': 'callbackStatusCode', 'next_id': 'ued-abc123', 'super_value': '405'}, {'name': 'callbackMethod', 'next_id': 'ued-abc123', 'super_value': 'POST'}, {'name': 'callbackEvent', 'next_id': 'ued-abc123', 'super_value': 'sms'}], 'message': 'The callback returned an HTTP failure status', 'next_id': 'ue-abc123', 'the_real_cat': 'unavailable', 'time': '2017-02-27T16:45:50Z'}]
{'created_time': '2014-04-14T19:16:07Z', 'id': 'n-dsd3wg3o4ng33icuooksngi', 'name': 'Jailbreak Phone', 'national_number': '(502) 286-6496', 'number': '+15022866496', 'number_state': 'released', 'price': '0.35'} |
class Solution:
def findTheWinner(self, n: int, k: int) -> int:
# edge cases
if n == 1: return 1
if k == 1: return n
# general cases
circle = [i for i in range(1,n+1)]
start = 0
while len(circle) > 1:
start = (start + k -1) % len(circle)
#print(start)
del circle[start]
return circle[0]
| class Solution:
def find_the_winner(self, n: int, k: int) -> int:
if n == 1:
return 1
if k == 1:
return n
circle = [i for i in range(1, n + 1)]
start = 0
while len(circle) > 1:
start = (start + k - 1) % len(circle)
del circle[start]
return circle[0] |
def list_of_multiples (num, length):
return [i*num for i in range(1,length+1)]
#Problem statement: Create a function that takes two numbers as arguments (num, length) and returns a list of multiples of num up to length.
#Problem Link: https://edabit.com/challenge/BuwHwPvt92yw574zB
| def list_of_multiples(num, length):
return [i * num for i in range(1, length + 1)] |
__author__ = 'wangjian'
| __author__ = 'wangjian' |
#CB 03/03/2019
#GMIT Data Analytics Programming & Scripting Module 2019
#Problem Sets
#Problem Set 1
#Setting up a user-defined variable 'i', and asking the user to enter a positive integer as 'i'
i = int(input("Please enter a positive integer: "))
#Setting up the 'total' variable, which will track the output value in the while-loop
total = 0
#Setting up the while loop that will accumulate the 'total' to be output
while i>0:
total = total + i
i = i - 1
#print the final output for the user to see
print (total) | i = int(input('Please enter a positive integer: '))
total = 0
while i > 0:
total = total + i
i = i - 1
print(total) |
class NumArray:
def __init__(self, nums: 'List[int]'):
self.sums = [0]
for num in nums:
self.sums.append(self.sums[-1] + num)
def sumRange(self, i: int, j: int) -> int:
return self.sums[j + 1] - self.sums[i]
if __name__ == '__main__':
num_array = NumArray([-2, 0, 3, -5, 2, -1])
print(num_array.sumRange(0, 2))
print(num_array.sumRange(2, 5))
print(num_array.sumRange(0, 5))
| class Numarray:
def __init__(self, nums: 'List[int]'):
self.sums = [0]
for num in nums:
self.sums.append(self.sums[-1] + num)
def sum_range(self, i: int, j: int) -> int:
return self.sums[j + 1] - self.sums[i]
if __name__ == '__main__':
num_array = num_array([-2, 0, 3, -5, 2, -1])
print(num_array.sumRange(0, 2))
print(num_array.sumRange(2, 5))
print(num_array.sumRange(0, 5)) |
# Requires mock server set up on localhost:3000
# Try out Mockoon for this: https://github.com/mockoon/mockoon
# They even provide sample responses for each API: https://github.com/mockoon/mock-samples
SPOTIFY_WEB_API = "http://localhost:3000/v1"
SPOTIFY_AUTH_API = "http://localhost:3000/v1/auth"
GROUPS_TABLE = "SmoothieGroupsDev" | spotify_web_api = 'http://localhost:3000/v1'
spotify_auth_api = 'http://localhost:3000/v1/auth'
groups_table = 'SmoothieGroupsDev' |
def cartpole_analytical_derivatives(model, data, x, u=None):
if u is None:
u = model.unone
# Getting the state and control variables
y, th, ydot, thdot = x[0].item(), x[1].item(), x[2].item(), x[3].item()
f = u[0].item()
# Shortname for system parameters
m1, m2, l, g = model.m1, model.m2, model.l, model.g
s, c = np.sin(th), np.cos(th)
m = m1 + m2
mu = m1 + m2 * s**2
w = model.costWeights
# derivative of xddot by x, theta, xdot, thetadot
# derivative of thddot by x, theta, xdot, thetadot
data.Fx[:, :] = np.array(
[[0.0, (m2 * g * c * c - m2 * g * s * s - m2 * l * c * thdot) / mu, 0.0, -m2 * l * s / mu],
[
0.0, ((-s * f / l) + (m * g * c / l) - (m2 * c * c * thdot**2) + (m2 * s * s * thdot**2)) / mu, 0.0,
-2 * m2 * c * s * thdot
]])
# derivative of xddot and thddot by f
data.Fu[:] = np.array([1 / mu, c / (l * mu)])
# first derivative of data.cost by x, theta, xdot, thetadot
data.Lx[:] = np.array([y * w[2]**2, s * ((w[0]**2 - w[1]**2) * c + w[1]**2), ydot * w[3]**2, thdot * w[4]**2])
# first derivative of data.cost by f
data.Lu[:] = np.array([f * w[5]**2])
# second derivative of data.cost by x, theta, xdot, thetadot
data.Lxx[:] = np.array([w[2]**2, w[0]**2 * (c**2 - s**2) + w[1]**2 * (s**2 - c**2 + c), w[3]**2, w[4]**2])
# second derivative of data.cost by f
data.Luu[:] = np.array([w[5]**2])
| def cartpole_analytical_derivatives(model, data, x, u=None):
if u is None:
u = model.unone
(y, th, ydot, thdot) = (x[0].item(), x[1].item(), x[2].item(), x[3].item())
f = u[0].item()
(m1, m2, l, g) = (model.m1, model.m2, model.l, model.g)
(s, c) = (np.sin(th), np.cos(th))
m = m1 + m2
mu = m1 + m2 * s ** 2
w = model.costWeights
data.Fx[:, :] = np.array([[0.0, (m2 * g * c * c - m2 * g * s * s - m2 * l * c * thdot) / mu, 0.0, -m2 * l * s / mu], [0.0, (-s * f / l + m * g * c / l - m2 * c * c * thdot ** 2 + m2 * s * s * thdot ** 2) / mu, 0.0, -2 * m2 * c * s * thdot]])
data.Fu[:] = np.array([1 / mu, c / (l * mu)])
data.Lx[:] = np.array([y * w[2] ** 2, s * ((w[0] ** 2 - w[1] ** 2) * c + w[1] ** 2), ydot * w[3] ** 2, thdot * w[4] ** 2])
data.Lu[:] = np.array([f * w[5] ** 2])
data.Lxx[:] = np.array([w[2] ** 2, w[0] ** 2 * (c ** 2 - s ** 2) + w[1] ** 2 * (s ** 2 - c ** 2 + c), w[3] ** 2, w[4] ** 2])
data.Luu[:] = np.array([w[5] ** 2]) |
plays = ['Hamlet', 'Macbeth', 'King Lear']
plays.insert(1, 'Julius Caesar')
print(plays)
plays.insert(0, 'Romeo & Juliet')
print(plays)
plays.insert(10, "A Midsummer Night's Dreams")
print(plays) | plays = ['Hamlet', 'Macbeth', 'King Lear']
plays.insert(1, 'Julius Caesar')
print(plays)
plays.insert(0, 'Romeo & Juliet')
print(plays)
plays.insert(10, "A Midsummer Night's Dreams")
print(plays) |
"""
Problem 1
COORDINATE MATH: Fill in the Line class methods to accept coordinates as a pair of tuples and return the slope and distance of the line.
EXAMPLE OUTPUT
coordinate1 = (3,2)
coordinate2 = (8,10)
li = Line(coordinate1,coordinate2)
"""
class Line:
def __init__(self,coor1,coor2):
self.coor1 = coor1
self.coor2 = coor2
def distance(self):
return "Lenght of a line defined by {} and {} is {}.".format(self.coor1, self.coor2, ((self.coor2[0] - self.coor1[0])**2 + (self.coor2[1] - self.coor1[1])**2)**(1/2))
def slope(self):
return "Slope of a line defined by {} and {} is {}.".format(self.coor1, self.coor2, (self.coor2[1]-self.coor1[1])/(self.coor2[0]-self.coor1[0]))
coordinate1 = (3,2)
coordinate2 = (8,10)
li = Line(coordinate1, coordinate2)
li.distance()
li.slope()
| """
Problem 1
COORDINATE MATH: Fill in the Line class methods to accept coordinates as a pair of tuples and return the slope and distance of the line.
EXAMPLE OUTPUT
coordinate1 = (3,2)
coordinate2 = (8,10)
li = Line(coordinate1,coordinate2)
"""
class Line:
def __init__(self, coor1, coor2):
self.coor1 = coor1
self.coor2 = coor2
def distance(self):
return 'Lenght of a line defined by {} and {} is {}.'.format(self.coor1, self.coor2, ((self.coor2[0] - self.coor1[0]) ** 2 + (self.coor2[1] - self.coor1[1]) ** 2) ** (1 / 2))
def slope(self):
return 'Slope of a line defined by {} and {} is {}.'.format(self.coor1, self.coor2, (self.coor2[1] - self.coor1[1]) / (self.coor2[0] - self.coor1[0]))
coordinate1 = (3, 2)
coordinate2 = (8, 10)
li = line(coordinate1, coordinate2)
li.distance()
li.slope() |
se_colors = {
'TV Application Layer': '#D9D9D9',
'Second Screen Framework': '#B67272',
'Audio Mining': '#F23A3A',
'Content Optimisation': '#00B0F0',
'HbbTV Application Toolkit': '#FF91C4',
'Open City Database': '#61DDFF',
'POIProxy': '#C8F763',
'App Generator': '#1EC499',
'Fusion Engine': '#ECA2F5',
'OpenDataSoft': '#366092',
'Recommendation as a Service': '#FFC600',
'Context Aware Recommendation': '#037DA0',
'Leaderboard': '#FF8181',
'Reality Mixer - Camera Artifact Rendering': '#008A5F',
'Reality Mixer - Reflection Mapping': '#FFD92E',
'Augmented Reality - Marker Tracking': '#CCCCCC',
'Augmented Reality - Fast Feature Tracking': '#BEABD4',
'Game Synchronization': '#67B7D6',
'Geospatial - POI Interface': '#DBF5DA',
'Geospatial - POI Matchmaking': '#C4EAF5',
'Visual Agent Design': '#FFBB00',
'Networked Virtual Character': '#89B34B',
'Content Enrichment': '#F0C3A3',
'Social Network': '#FF33E7',
'Content Sharing': '#FFE0BF',
'POI Storage': '#91CCFF',
'3D-Map Tiles': '#FFAB52'
}
def select_bgcolor(se_name):
if se_name not in se_colors:
return "#FFFFFF"
return se_colors[se_name]
| se_colors = {'TV Application Layer': '#D9D9D9', 'Second Screen Framework': '#B67272', 'Audio Mining': '#F23A3A', 'Content Optimisation': '#00B0F0', 'HbbTV Application Toolkit': '#FF91C4', 'Open City Database': '#61DDFF', 'POIProxy': '#C8F763', 'App Generator': '#1EC499', 'Fusion Engine': '#ECA2F5', 'OpenDataSoft': '#366092', 'Recommendation as a Service': '#FFC600', 'Context Aware Recommendation': '#037DA0', 'Leaderboard': '#FF8181', 'Reality Mixer - Camera Artifact Rendering': '#008A5F', 'Reality Mixer - Reflection Mapping': '#FFD92E', 'Augmented Reality - Marker Tracking': '#CCCCCC', 'Augmented Reality - Fast Feature Tracking': '#BEABD4', 'Game Synchronization': '#67B7D6', 'Geospatial - POI Interface': '#DBF5DA', 'Geospatial - POI Matchmaking': '#C4EAF5', 'Visual Agent Design': '#FFBB00', 'Networked Virtual Character': '#89B34B', 'Content Enrichment': '#F0C3A3', 'Social Network': '#FF33E7', 'Content Sharing': '#FFE0BF', 'POI Storage': '#91CCFF', '3D-Map Tiles': '#FFAB52'}
def select_bgcolor(se_name):
if se_name not in se_colors:
return '#FFFFFF'
return se_colors[se_name] |
class HashTable:
def __init__(self):
self.table = [[] for x in range(13)]
def hash(self, key):
chrcodes = sum([ord(x) for x in key])
return chrcodes % 13
def insert(self, key, data):
# try to get existing key
print(self.hash(key))
for item in self.table[self.hash(key)]:
if item[0] == key:
item[1] == data
return
self.table[self.hash(key)].append((key, data))
def remove(self, key):
data = self.get(key)
if data:
self.table[self.hash(key)].remove((key, data))
def get(self, key):
for item in self.table[self.hash(key)]:
if item[0] == key:
return item[1]
return None | class Hashtable:
def __init__(self):
self.table = [[] for x in range(13)]
def hash(self, key):
chrcodes = sum([ord(x) for x in key])
return chrcodes % 13
def insert(self, key, data):
print(self.hash(key))
for item in self.table[self.hash(key)]:
if item[0] == key:
item[1] == data
return
self.table[self.hash(key)].append((key, data))
def remove(self, key):
data = self.get(key)
if data:
self.table[self.hash(key)].remove((key, data))
def get(self, key):
for item in self.table[self.hash(key)]:
if item[0] == key:
return item[1]
return None |
# Get the plain text matrix (1 * 3 from a 3 letter word)
def get_plain_text_matrix(plain_text):
return [(ord(plain_text[i]) - 65) for i in range(3)]
# Get the key matrix (3 * 3 mtx from a 9 letter word)
def get_key_matrix(key):
mtx = [[0] * 3 for _ in range(3)]
counter = 0
for i in range(3):
for j in range(3):
mtx[i][j] = ord(key[counter]) - 65
counter += 1
return mtx
# Get the cipher text matrix (1 * 3 mtx, since 1*3 x 3*3 = 1*3)
def get_cipher_text_matrix(p_mtx, k_mtx):
mtx = [0 for _ in range(3)]
for i in range(3):
for j in range(3):
mtx[i] += ((p_mtx[j] * k_mtx[i][j]))
mtx[i] %= 26
return mtx
# Encryption Algorithm
def encrypt(plain_text, key):
plain_text_mtx = get_plain_text_matrix(plain_text)
key_mtx = get_key_matrix(key)
cipher_text_mtx = get_cipher_text_matrix(plain_text_mtx, key_mtx)
return ''.join(chr(cipher_text_mtx[i] + 65) for i in range(3))
# Driver Code
if __name__ == "__main__":
# plain_text : 3 characters
# key : 9 characters
plain_text, key = "TSC", "developer"
encrypted_text = encrypt(plain_text, key)
print(f'The Encrypted Text is : {encrypted_text}')
| def get_plain_text_matrix(plain_text):
return [ord(plain_text[i]) - 65 for i in range(3)]
def get_key_matrix(key):
mtx = [[0] * 3 for _ in range(3)]
counter = 0
for i in range(3):
for j in range(3):
mtx[i][j] = ord(key[counter]) - 65
counter += 1
return mtx
def get_cipher_text_matrix(p_mtx, k_mtx):
mtx = [0 for _ in range(3)]
for i in range(3):
for j in range(3):
mtx[i] += p_mtx[j] * k_mtx[i][j]
mtx[i] %= 26
return mtx
def encrypt(plain_text, key):
plain_text_mtx = get_plain_text_matrix(plain_text)
key_mtx = get_key_matrix(key)
cipher_text_mtx = get_cipher_text_matrix(plain_text_mtx, key_mtx)
return ''.join((chr(cipher_text_mtx[i] + 65) for i in range(3)))
if __name__ == '__main__':
(plain_text, key) = ('TSC', 'developer')
encrypted_text = encrypt(plain_text, key)
print(f'The Encrypted Text is : {encrypted_text}') |
class ShaderNodeBsdfTransparent:
pass
| class Shadernodebsdftransparent:
pass |
'''
Copyright [2017] [taurus.ai]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
'''
'''
first demo for new wingchun strategy system.
you may run this program by:
wingchun strategy -n my_test -p basic_usage.py
'''
def req_pos(context):
print('req_pos:{}'.format(context.req_pos(source=SOURCE.CTP)))
def initialize(context):
'''
# you may init your own parameters in context
context.msg = 'first time try'
context.a = 123
'''
print('--- running ' + context.get_name() + '---')
# add CTP market data
context.add_md(source=SOURCE.CTP)
# add ctp trade engine
context.add_td(source=SOURCE.CTP)
context.register_bar(source=SOURCE.CTP, min_interval=1, start_time='21:30:00',
end_time='23:30:00') # register bar market data
context.subscribe(tickers=['rb1910'], source=SOURCE.CTP)
context.insert_func_after_c(1, req_pos)
def on_tick(context, market_data, source, rcv_time):
print('[ON_TICK] InstrumentID {} price {} BP1 {} AP1 {}'.format(market_data.InstrumentID, market_data.LastPrice,
market_data.BidPrice1, market_data.AskPrice1))
if context.order_id:
return
price = market_data.BidPrice1
print('[ON_TICK]--------------------- insert order PRICE {} ---------------------------'.format(price))
context.order_id = context.insert_limit_order(source=SOURCE.CTP, ticker=market_data.InstrumentID,
price=price,
exchange_id=EXCHANGE.SHFE, volume=1, direction=DIRECTION.Buy,
offset=OFFSET.Open)
context.insert_func_after_c(20, cancel)
def cancel(context):
if not context.order_id:
return
rid = context.cancel_order(source=SOURCE.CTP, order_id=context.order_id)
print('[CANCEL] ORDER_ID {} -> RID {}'.format(context.order_id, rid))
def on_bar(context, bars, min_interval, source, rcv_time):
print('[ON_BAR]: source {} rcv_time {}'.format(source, rcv_time))
for ticker, bar in bars.items():
print('[ON_BAR] ticker {} o {} h {} l {} c {}'.format(ticker, bar.Open, bar.High, bar.Low, bar.Close))
def on_error(context, error_id, error_msg, request_id, source, rcv_time):
print('[ON_ERROR]: ERROR_ID {} ERROR_MSG {} REQUEST_ID {} RCV_TIME {} NANO {}'.format(error_id, error_msg,
request_id, rcv_time,
context.strategy_util.get_nano()))
def on_rtn_order(context, rtn_order, order_id, source, rcv_time):
print('[ON_RTN_ORDER]:(order_id){}, (OrderStatus){}, (OrderRef){}, (InstrumentID){}'.format(order_id,
rtn_order.OrderStatus,
rtn_order.OrderRef,
rtn_order.InstrumentID))
if order_id == context.order_id and rtn_order.OrderStatus == ORDER_STATUS.Canceled:
print('[ON_RTN_ORDER]:-----------------------------------order cancelled------------------------------')
context.order_id = None
def on_rtn_trade(context, rtn_trade, order_id, source, rcv_time):
print('[ON_RTN_TRADE]:ORDER_ID {} ORDER_REF{} TICKER {} VOLUME {}'.format(order_id, rtn_trade.OrderRef,
rtn_trade.InstrumentID, rtn_trade.Volume))
if order_id == context.order_id:
context.order_id = None
print('[ON_RTN_TRADE]===========================================order traded, finish!========================')
context.stop()
def on_switch_day(context, rcv_time):
print('[ON_SWITCH_DAY] RCV_TIME {}'.format(rcv_time))
def on_pos(context, pos_handler, request_id, source, rcv_time):
if request_id != -1:
print('[ON_POS] REQUEST_ID {} SOURCE {} RCV_TIME {}'.format(request_id, source, rcv_time))
context.set_pos(pos_handler, SOURCE.CTP)
for ticker in pos_handler.get_tickers():
print('[ON_POS] TICKER {} NET_TOT {} NET_YD {}'.format(ticker, pos_handler.get_net_tot(ticker),
pos_handler.get_net_yd(ticker)))
print('[ON_POS] TICKER {} LONG_TOT {} LONG_YD {}'.format(ticker, pos_handler.get_long_tot(ticker),
pos_handler.get_long_yd(ticker)))
print('[ON_POS]TICKER {} SHORT_TOT {} SHORT_YD {}'.format(ticker, pos_handler.get_short_tot(ticker),
pos_handler.get_short_yd(ticker)))
| """
Copyright [2017] [taurus.ai]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
'\nfirst demo for new wingchun strategy system.\nyou may run this program by:\nwingchun strategy -n my_test -p basic_usage.py\n'
def req_pos(context):
print('req_pos:{}'.format(context.req_pos(source=SOURCE.CTP)))
def initialize(context):
"""
# you may init your own parameters in context
context.msg = 'first time try'
context.a = 123
"""
print('--- running ' + context.get_name() + '---')
context.add_md(source=SOURCE.CTP)
context.add_td(source=SOURCE.CTP)
context.register_bar(source=SOURCE.CTP, min_interval=1, start_time='21:30:00', end_time='23:30:00')
context.subscribe(tickers=['rb1910'], source=SOURCE.CTP)
context.insert_func_after_c(1, req_pos)
def on_tick(context, market_data, source, rcv_time):
print('[ON_TICK] InstrumentID {} price {} BP1 {} AP1 {}'.format(market_data.InstrumentID, market_data.LastPrice, market_data.BidPrice1, market_data.AskPrice1))
if context.order_id:
return
price = market_data.BidPrice1
print('[ON_TICK]--------------------- insert order PRICE {} ---------------------------'.format(price))
context.order_id = context.insert_limit_order(source=SOURCE.CTP, ticker=market_data.InstrumentID, price=price, exchange_id=EXCHANGE.SHFE, volume=1, direction=DIRECTION.Buy, offset=OFFSET.Open)
context.insert_func_after_c(20, cancel)
def cancel(context):
if not context.order_id:
return
rid = context.cancel_order(source=SOURCE.CTP, order_id=context.order_id)
print('[CANCEL] ORDER_ID {} -> RID {}'.format(context.order_id, rid))
def on_bar(context, bars, min_interval, source, rcv_time):
print('[ON_BAR]: source {} rcv_time {}'.format(source, rcv_time))
for (ticker, bar) in bars.items():
print('[ON_BAR] ticker {} o {} h {} l {} c {}'.format(ticker, bar.Open, bar.High, bar.Low, bar.Close))
def on_error(context, error_id, error_msg, request_id, source, rcv_time):
print('[ON_ERROR]: ERROR_ID {} ERROR_MSG {} REQUEST_ID {} RCV_TIME {} NANO {}'.format(error_id, error_msg, request_id, rcv_time, context.strategy_util.get_nano()))
def on_rtn_order(context, rtn_order, order_id, source, rcv_time):
print('[ON_RTN_ORDER]:(order_id){}, (OrderStatus){}, (OrderRef){}, (InstrumentID){}'.format(order_id, rtn_order.OrderStatus, rtn_order.OrderRef, rtn_order.InstrumentID))
if order_id == context.order_id and rtn_order.OrderStatus == ORDER_STATUS.Canceled:
print('[ON_RTN_ORDER]:-----------------------------------order cancelled------------------------------')
context.order_id = None
def on_rtn_trade(context, rtn_trade, order_id, source, rcv_time):
print('[ON_RTN_TRADE]:ORDER_ID {} ORDER_REF{} TICKER {} VOLUME {}'.format(order_id, rtn_trade.OrderRef, rtn_trade.InstrumentID, rtn_trade.Volume))
if order_id == context.order_id:
context.order_id = None
print('[ON_RTN_TRADE]===========================================order traded, finish!========================')
context.stop()
def on_switch_day(context, rcv_time):
print('[ON_SWITCH_DAY] RCV_TIME {}'.format(rcv_time))
def on_pos(context, pos_handler, request_id, source, rcv_time):
if request_id != -1:
print('[ON_POS] REQUEST_ID {} SOURCE {} RCV_TIME {}'.format(request_id, source, rcv_time))
context.set_pos(pos_handler, SOURCE.CTP)
for ticker in pos_handler.get_tickers():
print('[ON_POS] TICKER {} NET_TOT {} NET_YD {}'.format(ticker, pos_handler.get_net_tot(ticker), pos_handler.get_net_yd(ticker)))
print('[ON_POS] TICKER {} LONG_TOT {} LONG_YD {}'.format(ticker, pos_handler.get_long_tot(ticker), pos_handler.get_long_yd(ticker)))
print('[ON_POS]TICKER {} SHORT_TOT {} SHORT_YD {}'.format(ticker, pos_handler.get_short_tot(ticker), pos_handler.get_short_yd(ticker))) |
# auto parse
def auto_json_to_graph_experiment(json_dict):
process_original_json(json_dict)
# tags
normal_merge(json_dict, "Tag", "Chemical", "pk", "tags")
normal_merge(json_dict, "Tag", "Mixture", "pk", "tags")
normal_merge(json_dict, "Tag", "Experiment", "pk", "tags")
# get property
merge_prop_dict(json_dict, "PropertyName",
"Property", "pk", "title", "value")
merge_prop_dict(json_dict, "PropertyName",
"PropertyChem", "pk", "title", "value")
merge_prop_dict(json_dict, "PropertyName",
"PropertyMixture", "pk", "title", "value")
# append properties
append_properties(json_dict, "PropertyChem",
"Chemical", "level", "pk", "property")
append_properties(json_dict, "PropertyMixture",
"Mixture", "level", "pk", "property")
# Mixture
normal_merge(json_dict, "Chemical", "MixtureComponent", "pk", "chemical")
# appnd series data
append_properties(json_dict, "Property", "Step", "level", "pk", "property")
append_properties(json_dict, "MixtureComponent",
"Mixture", "level", "pk", "chemicals")
# sort chemicals in a Mixture
param_sort(json_dict, "Mixture", "chemicals")
# step info
normal_merge(json_dict, "Chemical", "Step", "pk", "chemical")
normal_merge(json_dict, "Mixture", "Step", "pk", "Mixture")
normal_merge(json_dict, "MutualKey", "Step", "pk", "mutual_key")
normal_merge(json_dict, "Project", "Experiment", "pk", "project")
# experiment
append_properties(json_dict, "Step", "Experiment", "level", "pk", "step")
param_sort(json_dict, "Experiment", "step")
return json_dict
# ---------- util funcs------------
def process_original_json(json_dict):
"""
preprocess original json data generated by django
"""
for target_key in json_dict.keys():
target_dict_list = json_dict[target_key]
for target_dict in target_dict_list:
# delete unnecessary keys
if "model" in target_dict.keys():
target_dict.pop("model")
# extract fields
FIELDS = "fields"
if FIELDS in target_dict.keys():
for k, v in target_dict[FIELDS].items():
target_dict[k] = v
target_dict.pop(FIELDS)
# ------------merging functions-------------
# get property name
# merge property data
def merge_prop_dict(json_dict, son_name, parent_name, son_key, parent_key, prop_title):
if parent_name not in json_dict:
return
if son_name not in json_dict:
return
son_list = json_dict[son_name]
parent_list = json_dict[parent_name]
for parent_record in parent_list:
# print(parent_record,parent_key)
# if parent_key not in parent_record:
# continue
query_id = parent_record[parent_key]
count = 0
for son_record in son_list:
# print(son_record,son_key)
if son_record[son_key] == query_id:
query_value = son_record[parent_key]
parent_record[f"{query_value}"] = parent_record[prop_title]
parent_record.pop(prop_title)
parent_record.pop(parent_key)
count += 1
if count == 0:
print("not found!")
# append property data
def append_properties(json_dict, son_name, parent_name, son_key, parent_key, prop_title):
if parent_name not in json_dict:
return
if son_name not in json_dict:
return
son_list = json_dict[son_name]
parent_list = json_dict[parent_name]
for son_record in son_list:
if son_key not in son_record:
continue
query_id = son_record[son_key]
flg = False
for parent_record in parent_list:
checksum = parent_record[parent_key] == query_id
if checksum:
if prop_title not in parent_record:
parent_record[prop_title] = []
parent_record[prop_title].append(son_record)
flg = True
break
if not flg:
print("not found!")
# normal merge
def normal_merge(json_dict, son_name, parent_name, son_key, parent_key):
if parent_name not in json_dict:
return
if son_name not in json_dict:
return
son_list = json_dict[son_name]
parent_list = json_dict[parent_name]
for parent_record in parent_list:
if parent_key not in parent_record.keys():
continue
query_id = parent_record[parent_key]
count = 0
nested_prop_list = []
for son_record in son_list:
# foreign key
if type(query_id) is not list:
if son_record[son_key] == query_id:
parent_record[parent_key] = son_record
count += 1
# many to many
else:
for nested_query_id in query_id:
if son_record[son_key] == nested_query_id:
nested_prop_list.append(son_record)
count += 1
parent_record[parent_key] = str(nested_prop_list)
def param_sort(json_dict, prop_name, target_name):
if prop_name not in json_dict:
return
target_list = json_dict[prop_name]
for target_dict in target_list:
if target_name in target_dict.keys():
arr = target_dict[target_name]
arr = sorted(arr, key=lambda x: (x["order"], x['pk']))
target_dict[target_name] = arr # [::-1]
| def auto_json_to_graph_experiment(json_dict):
process_original_json(json_dict)
normal_merge(json_dict, 'Tag', 'Chemical', 'pk', 'tags')
normal_merge(json_dict, 'Tag', 'Mixture', 'pk', 'tags')
normal_merge(json_dict, 'Tag', 'Experiment', 'pk', 'tags')
merge_prop_dict(json_dict, 'PropertyName', 'Property', 'pk', 'title', 'value')
merge_prop_dict(json_dict, 'PropertyName', 'PropertyChem', 'pk', 'title', 'value')
merge_prop_dict(json_dict, 'PropertyName', 'PropertyMixture', 'pk', 'title', 'value')
append_properties(json_dict, 'PropertyChem', 'Chemical', 'level', 'pk', 'property')
append_properties(json_dict, 'PropertyMixture', 'Mixture', 'level', 'pk', 'property')
normal_merge(json_dict, 'Chemical', 'MixtureComponent', 'pk', 'chemical')
append_properties(json_dict, 'Property', 'Step', 'level', 'pk', 'property')
append_properties(json_dict, 'MixtureComponent', 'Mixture', 'level', 'pk', 'chemicals')
param_sort(json_dict, 'Mixture', 'chemicals')
normal_merge(json_dict, 'Chemical', 'Step', 'pk', 'chemical')
normal_merge(json_dict, 'Mixture', 'Step', 'pk', 'Mixture')
normal_merge(json_dict, 'MutualKey', 'Step', 'pk', 'mutual_key')
normal_merge(json_dict, 'Project', 'Experiment', 'pk', 'project')
append_properties(json_dict, 'Step', 'Experiment', 'level', 'pk', 'step')
param_sort(json_dict, 'Experiment', 'step')
return json_dict
def process_original_json(json_dict):
"""
preprocess original json data generated by django
"""
for target_key in json_dict.keys():
target_dict_list = json_dict[target_key]
for target_dict in target_dict_list:
if 'model' in target_dict.keys():
target_dict.pop('model')
fields = 'fields'
if FIELDS in target_dict.keys():
for (k, v) in target_dict[FIELDS].items():
target_dict[k] = v
target_dict.pop(FIELDS)
def merge_prop_dict(json_dict, son_name, parent_name, son_key, parent_key, prop_title):
if parent_name not in json_dict:
return
if son_name not in json_dict:
return
son_list = json_dict[son_name]
parent_list = json_dict[parent_name]
for parent_record in parent_list:
query_id = parent_record[parent_key]
count = 0
for son_record in son_list:
if son_record[son_key] == query_id:
query_value = son_record[parent_key]
parent_record[f'{query_value}'] = parent_record[prop_title]
parent_record.pop(prop_title)
parent_record.pop(parent_key)
count += 1
if count == 0:
print('not found!')
def append_properties(json_dict, son_name, parent_name, son_key, parent_key, prop_title):
if parent_name not in json_dict:
return
if son_name not in json_dict:
return
son_list = json_dict[son_name]
parent_list = json_dict[parent_name]
for son_record in son_list:
if son_key not in son_record:
continue
query_id = son_record[son_key]
flg = False
for parent_record in parent_list:
checksum = parent_record[parent_key] == query_id
if checksum:
if prop_title not in parent_record:
parent_record[prop_title] = []
parent_record[prop_title].append(son_record)
flg = True
break
if not flg:
print('not found!')
def normal_merge(json_dict, son_name, parent_name, son_key, parent_key):
if parent_name not in json_dict:
return
if son_name not in json_dict:
return
son_list = json_dict[son_name]
parent_list = json_dict[parent_name]
for parent_record in parent_list:
if parent_key not in parent_record.keys():
continue
query_id = parent_record[parent_key]
count = 0
nested_prop_list = []
for son_record in son_list:
if type(query_id) is not list:
if son_record[son_key] == query_id:
parent_record[parent_key] = son_record
count += 1
else:
for nested_query_id in query_id:
if son_record[son_key] == nested_query_id:
nested_prop_list.append(son_record)
count += 1
parent_record[parent_key] = str(nested_prop_list)
def param_sort(json_dict, prop_name, target_name):
if prop_name not in json_dict:
return
target_list = json_dict[prop_name]
for target_dict in target_list:
if target_name in target_dict.keys():
arr = target_dict[target_name]
arr = sorted(arr, key=lambda x: (x['order'], x['pk']))
target_dict[target_name] = arr |
class Employee():
def __init__(self, name, salary):
self.name = name
self.salary = salary
self.is_db_connected = False
def __enter__(self):
print("entered")
self.is_db_connected = True
# must return self because in the with employee as e: e becomes the value returned from __enter__
return self
def __exit__(self, type, value, traceback):
print("exited")
self.is_db_connected = False
def get_salary(self):
if(self.is_db_connected):
print(self.salary)
else:
print("db is not connected")
employee = Employee("can", 1000)
employee.get_salary()
with employee as e:
e.get_salary()
| class Employee:
def __init__(self, name, salary):
self.name = name
self.salary = salary
self.is_db_connected = False
def __enter__(self):
print('entered')
self.is_db_connected = True
return self
def __exit__(self, type, value, traceback):
print('exited')
self.is_db_connected = False
def get_salary(self):
if self.is_db_connected:
print(self.salary)
else:
print('db is not connected')
employee = employee('can', 1000)
employee.get_salary()
with employee as e:
e.get_salary() |
##x = input()
##if str(x)[::-1] == str(x):
## print("yes")
##else:
## print("no")
x = input()
x.replace(" ", "")
l = 0
r = len(x) - 1
output = 'yes'
while l < r:
if x[l] != x[r]:
output = 'no'
break
else:
l += 1
r -= 1
print(output)
| x = input()
x.replace(' ', '')
l = 0
r = len(x) - 1
output = 'yes'
while l < r:
if x[l] != x[r]:
output = 'no'
break
else:
l += 1
r -= 1
print(output) |
string1 = input("")
string2 = input("")
lenStrings = len(string1)
arr = [[0]*(lenStrings+1) for n in range(lenStrings+1)]
for i in range(1,lenStrings+1):
for j in range(1,lenStrings+1):
match = arr[i-1][j-1]
if string1[i-1] == string2[j-1]:
match += 1
arr[i][j] = max(arr[i][j-1],arr[i-1][j],match)
print(arr[lenStrings][lenStrings]) | string1 = input('')
string2 = input('')
len_strings = len(string1)
arr = [[0] * (lenStrings + 1) for n in range(lenStrings + 1)]
for i in range(1, lenStrings + 1):
for j in range(1, lenStrings + 1):
match = arr[i - 1][j - 1]
if string1[i - 1] == string2[j - 1]:
match += 1
arr[i][j] = max(arr[i][j - 1], arr[i - 1][j], match)
print(arr[lenStrings][lenStrings]) |
class Solution:
def findMaxAverage(self, nums, k: int) -> float:
# Avoid computations by working with a window of 1. We find the
# average of k-1 elements and add/remove values from the ends.
limit = k-1
start, max_avg = sum(nums[:limit]) / k, -(10 << 30)
for i in range(limit, len(nums)):
final_value = nums[i] / k
candidate = start + final_value
if candidate > max_avg:
max_avg = candidate
# remove first term of sum and add final
start += (final_value - nums[i - limit] / k)
return max_avg
| class Solution:
def find_max_average(self, nums, k: int) -> float:
limit = k - 1
(start, max_avg) = (sum(nums[:limit]) / k, -(10 << 30))
for i in range(limit, len(nums)):
final_value = nums[i] / k
candidate = start + final_value
if candidate > max_avg:
max_avg = candidate
start += final_value - nums[i - limit] / k
return max_avg |
EE_BASE = "https://elections.democracyclub.org.uk/"
"""
Every Election settings
Set CHECK to True to check Every Election to see if there is
an election happening before serving a poling station result
Set CHECK to False to return the value of HAS_ELECTION instead
This is mostly useful in development when we want
to see results even if there is no election happening
"""
EVERY_ELECTION = {"CHECK": True, "HAS_ELECTION": True}
ELECTION_BLACKLIST = [
"local.epping-forest.moreton-and-fyfield.by.2018-05-03" # uncontested
]
| ee_base = 'https://elections.democracyclub.org.uk/'
'\nEvery Election settings\n\nSet CHECK to True to check Every Election to see if there is\nan election happening before serving a poling station result\n\nSet CHECK to False to return the value of HAS_ELECTION instead\n\nThis is mostly useful in development when we want\nto see results even if there is no election happening\n'
every_election = {'CHECK': True, 'HAS_ELECTION': True}
election_blacklist = ['local.epping-forest.moreton-and-fyfield.by.2018-05-03'] |
# Section 5.15 snippets
# Finding the Minimum and Maximum Values Using a Key Function
'Red' < 'orange'
ord('R')
ord('o')
colors = ['Red', 'orange', 'Yellow', 'green', 'Blue']
min(colors, key=lambda s: s.lower())
max(colors, key=lambda s: s.lower())
# Iterating Backwards Through a Sequence
numbers = [10, 3, 7, 1, 9, 4, 2, 8, 5, 6]
reversed_numbers = [item ** 2 for item in reversed(numbers)]
reversed_numbers
# Combining Iterables into Tuples of Corresponding Elements
names = ['Bob', 'Sue', 'Amanda']
grade_point_averages = [3.5, 4.0, 3.75]
for name, gpa in zip(names, grade_point_averages):
print(f'Name={name}; GPA={gpa}')
##########################################################################
# (C) Copyright 2019 by Deitel & Associates, Inc. and #
# Pearson Education, Inc. All Rights Reserved. #
# #
# DISCLAIMER: The authors and publisher of this book have used their #
# best efforts in preparing the book. These efforts include the #
# development, research, and testing of the theories and programs #
# to determine their effectiveness. The authors and publisher make #
# no warranty of any kind, expressed or implied, with regard to these #
# programs or to the documentation contained in these books. The authors #
# and publisher shall not be liable in any event for incidental or #
# consequential damages in connection with, or arising out of, the #
# furnishing, performance, or use of these programs. #
##########################################################################
| 'Red' < 'orange'
ord('R')
ord('o')
colors = ['Red', 'orange', 'Yellow', 'green', 'Blue']
min(colors, key=lambda s: s.lower())
max(colors, key=lambda s: s.lower())
numbers = [10, 3, 7, 1, 9, 4, 2, 8, 5, 6]
reversed_numbers = [item ** 2 for item in reversed(numbers)]
reversed_numbers
names = ['Bob', 'Sue', 'Amanda']
grade_point_averages = [3.5, 4.0, 3.75]
for (name, gpa) in zip(names, grade_point_averages):
print(f'Name={name}; GPA={gpa}') |
#!/usr/bin/python
def Fibonaci_iter(n):
if (n == 0):
return 0
elif (n == 1):
return 1
elif (n > 1):
fn = 0
fn1 = 1
fn2 = 1
while n > 2:
fn = fn1 + fn2
fn1 = fn2
fn2 = fn
n = n - 1
return fn
print(Fibonaci_iter(5)) | def fibonaci_iter(n):
if n == 0:
return 0
elif n == 1:
return 1
elif n > 1:
fn = 0
fn1 = 1
fn2 = 1
while n > 2:
fn = fn1 + fn2
fn1 = fn2
fn2 = fn
n = n - 1
return fn
print(fibonaci_iter(5)) |
# Copyright 2021 The Perkeepy Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
class CamliSig:
@staticmethod
def from_armored_gpg_signature(armored_gpg_signature: str) -> str:
# Cleanup before looking for indexes
armored_gpg_signature = armored_gpg_signature.strip()
# Look for start and end indexes
start_index: int = armored_gpg_signature.index("\n\n")
end_index: int = armored_gpg_signature.index("\n-----")
# Isolate the sig
signature: str = armored_gpg_signature[start_index:end_index]
# Remove newlines
signature = signature.replace("\n", "")
return signature
@staticmethod
def to_armored_gpg_signature(camli_sig: str) -> str:
armored_gpg_signature: str = "-----BEGIN PGP SIGNATURE-----\n\n"
# Extract the CRC
last_equal_index: int = camli_sig.rindex("=")
crc: str = camli_sig[last_equal_index:]
camli_sig = camli_sig[:last_equal_index]
chunks: list[str] = []
while camli_sig:
chunks.append(camli_sig[:64])
camli_sig = camli_sig[64:]
chunks.append(crc)
armored_gpg_signature += "\n".join(chunks)
armored_gpg_signature += "\n"
armored_gpg_signature += "-----END PGP SIGNATURE-----\n"
return armored_gpg_signature
| class Camlisig:
@staticmethod
def from_armored_gpg_signature(armored_gpg_signature: str) -> str:
armored_gpg_signature = armored_gpg_signature.strip()
start_index: int = armored_gpg_signature.index('\n\n')
end_index: int = armored_gpg_signature.index('\n-----')
signature: str = armored_gpg_signature[start_index:end_index]
signature = signature.replace('\n', '')
return signature
@staticmethod
def to_armored_gpg_signature(camli_sig: str) -> str:
armored_gpg_signature: str = '-----BEGIN PGP SIGNATURE-----\n\n'
last_equal_index: int = camli_sig.rindex('=')
crc: str = camli_sig[last_equal_index:]
camli_sig = camli_sig[:last_equal_index]
chunks: list[str] = []
while camli_sig:
chunks.append(camli_sig[:64])
camli_sig = camli_sig[64:]
chunks.append(crc)
armored_gpg_signature += '\n'.join(chunks)
armored_gpg_signature += '\n'
armored_gpg_signature += '-----END PGP SIGNATURE-----\n'
return armored_gpg_signature |
#
# PySNMP MIB module TIMETRA-TC-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/TIMETRA-TC-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 17:01:12 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ConstraintsIntersection, SingleValueConstraint, ConstraintsUnion, ValueRangeConstraint, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "SingleValueConstraint", "ConstraintsUnion", "ValueRangeConstraint", "ValueSizeConstraint")
NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance")
ObjectIdentity, IpAddress, Gauge32, iso, ModuleIdentity, Counter32, MibIdentifier, MibScalar, MibTable, MibTableRow, MibTableColumn, NotificationType, Bits, Integer32, Unsigned32, TimeTicks, Counter64 = mibBuilder.importSymbols("SNMPv2-SMI", "ObjectIdentity", "IpAddress", "Gauge32", "iso", "ModuleIdentity", "Counter32", "MibIdentifier", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "NotificationType", "Bits", "Integer32", "Unsigned32", "TimeTicks", "Counter64")
TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString")
timetraModules, = mibBuilder.importSymbols("TIMETRA-GLOBAL-MIB", "timetraModules")
timetraTCMIBModule = ModuleIdentity((1, 3, 6, 1, 4, 1, 6527, 1, 1, 2))
timetraTCMIBModule.setRevisions(('1911-02-01 00:00', '1909-02-28 00:00', '1908-07-01 00:00', '1908-01-01 00:00', '1907-01-01 00:00', '1906-03-23 00:00', '1905-08-31 00:00', '1905-01-24 00:00', '1904-01-15 00:00', '1903-08-15 00:00', '1903-01-20 00:00', '1901-05-29 00:00',))
if mibBuilder.loadTexts: timetraTCMIBModule.setLastUpdated('201102010000Z')
if mibBuilder.loadTexts: timetraTCMIBModule.setOrganization('Alcatel-Lucent')
class InterfaceIndex(TextualConvention, Integer32):
status = 'current'
displayHint = 'd'
class TmnxPortID(TextualConvention, Unsigned32):
status = 'current'
class TmnxEncapVal(TextualConvention, Unsigned32):
status = 'current'
class QTag(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(1, 4094)
class QTagOrZero(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(0, 4094)
class QTagFullRange(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(0, 4095)
class QTagFullRangeOrNone(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-1, -1), ValueRangeConstraint(0, 4095), )
class TmnxStrSapId(DisplayString):
status = 'current'
subtypeSpec = DisplayString.subtypeSpec + ValueSizeConstraint(0, 32)
class IpAddressPrefixLength(TextualConvention, Integer32):
reference = ''
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(0, 32)
class TmnxActionType(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("doAction", 1), ("notApplicable", 2))
class TmnxAdminState(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3))
namedValues = NamedValues(("noop", 1), ("inService", 2), ("outOfService", 3))
class TmnxOperState(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))
namedValues = NamedValues(("unknown", 1), ("inService", 2), ("outOfService", 3), ("transition", 4))
class TmnxStatus(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("create", 1), ("delete", 2))
class TmnxEnabledDisabled(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("enabled", 1), ("disabled", 2))
class TmnxEnabledDisabledOrInherit(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3))
namedValues = NamedValues(("enabled", 1), ("disabled", 2), ("inherit", 3))
class TNamedItem(DisplayString):
status = 'current'
subtypeSpec = DisplayString.subtypeSpec + ValueSizeConstraint(1, 32)
class TNamedItemOrEmpty(DisplayString):
status = 'current'
subtypeSpec = DisplayString.subtypeSpec + ConstraintsUnion(ValueSizeConstraint(0, 0), ValueSizeConstraint(1, 32), )
class TLNamedItem(DisplayString):
status = 'current'
subtypeSpec = DisplayString.subtypeSpec + ValueSizeConstraint(1, 64)
class TLNamedItemOrEmpty(DisplayString):
status = 'current'
subtypeSpec = DisplayString.subtypeSpec + ConstraintsUnion(ValueSizeConstraint(0, 0), ValueSizeConstraint(1, 64), )
class TItemDescription(DisplayString):
status = 'current'
subtypeSpec = DisplayString.subtypeSpec + ValueSizeConstraint(0, 80)
class TItemLongDescription(DisplayString):
status = 'current'
subtypeSpec = DisplayString.subtypeSpec + ValueSizeConstraint(0, 160)
class TmnxVRtrID(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(1, 10240)
class TmnxVRtrIDOrZero(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(0, 10240)
class TmnxBgpAutonomousSystem(TextualConvention, Integer32):
reference = 'BGP4-MIB.bgpPeerRemoteAs'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(0, 65535)
class TmnxBgpLocalPreference(TextualConvention, Unsigned32):
reference = 'RFC 1771 section 4.3 Path Attributes e)'
status = 'current'
class TmnxBgpPreference(TextualConvention, Unsigned32):
reference = 'RFC 1771 section 4.3 Path Attributes e)'
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(0, 255)
class TmnxCustId(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(1, 2147483647), )
class BgpPeeringStatus(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12))
namedValues = NamedValues(("notApplicable", 0), ("installed", 1), ("notInstalled", 2), ("noEnhancedSubmgt", 3), ("wrongAntiSpoof", 4), ("parentItfDown", 5), ("hostInactive", 6), ("noDualHomingSupport", 7), ("invalidRadiusAttr", 8), ("noDynamicPeerGroup", 9), ("duplicatePeer", 10), ("maxPeersReached", 11), ("genError", 12))
class TmnxServId(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(1, 2147483647), ValueRangeConstraint(2147483648, 2147483648), ValueRangeConstraint(2147483649, 2147483649), ValueRangeConstraint(2147483650, 2147483650), )
class ServiceAdminStatus(TextualConvention, Integer32):
reference = ''
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("up", 1), ("down", 2))
class ServiceOperStatus(TextualConvention, Integer32):
reference = ''
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("up", 1), ("down", 2))
class TPolicyID(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 65535), ValueRangeConstraint(65536, 65536), ValueRangeConstraint(65537, 65537), )
class TTmplPolicyID(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(1, 65535)
class TSapIngressPolicyID(TPolicyID):
status = 'current'
class TSapEgressPolicyID(TPolicyID):
status = 'current'
subtypeSpec = TPolicyID.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(1, 65535), ValueRangeConstraint(65536, 65536), ValueRangeConstraint(65537, 65537), )
class TSdpIngressPolicyID(TPolicyID):
status = 'current'
class TSdpEgressPolicyID(TPolicyID):
status = 'current'
class TQosQGrpInstanceIDorZero(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(1, 65535), )
class TmnxBsxTransitIpPolicyId(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(1, 65535)
class TmnxBsxTransitIpPolicyIdOrZero(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(1, 65535), )
class TmnxBsxTransPrefPolicyId(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(1, 65535)
class TmnxBsxTransPrefPolicyIdOrZero(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(1, 65535), )
class TmnxBsxAarpId(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(1, 65535)
class TmnxBsxAarpIdOrZero(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(1, 65535), )
class TmnxBsxAarpServiceRefType(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))
namedValues = NamedValues(("none", 0), ("dualHomed", 1), ("shuntSubscriberSide", 2), ("shuntNetworkSide", 3))
class TSapEgrEncapGrpQosPolicyIdOrZero(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(1, 65535), )
class TSapEgrEncapGroupType(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1))
namedValues = NamedValues(("isid", 1))
class TSapEgrEncapGroupActionType(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("create", 1), ("destroy", 2))
class TPerPacketOffset(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(-32, 31)
class TPerPacketOffsetOvr(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-128, -128), ValueRangeConstraint(-32, 31), )
class TIngressHsmdaPerPacketOffset(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(-32, 31)
class TEgressQPerPacketOffset(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(-64, 32)
class TIngHsmdaPerPacketOffsetOvr(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-128, -128), ValueRangeConstraint(-32, 31), )
class TEgressHsmdaPerPacketOffset(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(-32, 31)
class THsmdaCounterIdOrZero(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(1, 8), )
class THsmdaCounterIdOrZeroOrAll(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-1, -1), ValueRangeConstraint(0, 0), ValueRangeConstraint(1, 8), )
class TEgrHsmdaPerPacketOffsetOvr(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-128, -128), ValueRangeConstraint(-32, 31), )
class TIngressHsmdaCounterId(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(1, 8)
class TIngressHsmdaCounterIdOrZero(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(1, 8), )
class TEgressHsmdaCounterId(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(1, 8)
class TEgressHsmdaCounterIdOrZero(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(1, 8), )
class TEgrRateModType(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3))
namedValues = NamedValues(("none", 1), ("aggRateLimit", 2), ("namedScheduler", 3))
class TPolicyStatementNameOrEmpty(TNamedItemOrEmpty):
status = 'current'
class TmnxVcType(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 9, 10, 11, 17, 18, 19, 20, 21, 23, 25, 4096))
namedValues = NamedValues(("frDlciMartini", 1), ("atmSdu", 2), ("atmCell", 3), ("ethernetVlan", 4), ("ethernet", 5), ("atmVccCell", 9), ("atmVpcCell", 10), ("ipipe", 11), ("satopE1", 17), ("satopT1", 18), ("satopE3", 19), ("satopT3", 20), ("cesopsn", 21), ("cesopsnCas", 23), ("frDlci", 25), ("mirrorDest", 4096))
class TmnxVcId(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(1, 4294967295)
class TmnxVcIdOrNone(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(1, 4294967295), )
class Dot1PPriority(TextualConvention, Integer32):
reference = ''
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-1, -1), ValueRangeConstraint(0, 7), )
class Dot1PPriorityMask(TextualConvention, Integer32):
reference = ''
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(0, 7)
class ServiceAccessPoint(TextualConvention, Integer32):
reference = 'assigned numbers: http://www.iana.org/assignments/ieee-802-numbers'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-1, -1), ValueRangeConstraint(0, 255), )
class TLspExpValue(TextualConvention, Integer32):
reference = ''
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-1, -1), ValueRangeConstraint(0, 7), )
class TIpProtocol(TextualConvention, Integer32):
reference = 'http://www.iana.org/assignments/protocol-numbers'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-2, -2), ValueRangeConstraint(-1, -1), ValueRangeConstraint(0, 255), )
class TIpOption(TextualConvention, Integer32):
reference = 'http://www.iana.org/assignments/ip-parameters'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(0, 255)
class TTcpUdpPort(TextualConvention, Integer32):
reference = 'http://www.iana.org/assignments/port-numbers'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(1, 65535), )
class TOperator(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4))
namedValues = NamedValues(("none", 0), ("eq", 1), ("range", 2), ("lt", 3), ("gt", 4))
class TTcpUdpPortOperator(TOperator):
status = 'current'
class TFrameType(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 5))
namedValues = NamedValues(("e802dot3", 0), ("e802dot2LLC", 1), ("e802dot2SNAP", 2), ("ethernetII", 3), ("atm", 5))
class TQueueId(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(1, 32), )
class TQueueIdOrAll(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-1, -1), ValueRangeConstraint(0, 0), ValueRangeConstraint(1, 32), )
class TIngressQueueId(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(1, 32), )
class TIngressMeterId(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(1, 32), )
class TSapIngressMeterId(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(1, 32), )
class TNetworkIngressMeterId(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(1, 16), )
class TEgressQueueId(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(1, 8), )
class TIngressHsmdaQueueId(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(1, 8), )
class TEgressHsmdaQueueId(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(1, 8), )
class THsmdaSchedulerPolicyGroupId(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(1, 2), )
class THsmdaPolicyIncludeQueues(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("q1to2", 1), ("q1to3", 2))
class THsmdaPolicyScheduleClass(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(1, 3)
class TDSCPName(TNamedItem):
status = 'current'
class TDSCPNameOrEmpty(TNamedItemOrEmpty):
status = 'current'
class TDSCPValue(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(0, 63)
class TDSCPValueOrNone(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-1, -1), ValueRangeConstraint(0, 63), )
class TDSCPFilterActionValue(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-1, -1), ValueRangeConstraint(0, 255), )
class TFCName(TNamedItem):
status = 'current'
class TFCNameOrEmpty(TNamedItemOrEmpty):
status = 'current'
class TFCSet(TextualConvention, Bits):
status = 'current'
namedValues = NamedValues(("be", 0), ("l2", 1), ("af", 2), ("l1", 3), ("h2", 4), ("ef", 5), ("h1", 6), ("nc", 7))
class TFCType(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7))
namedValues = NamedValues(("be", 0), ("l2", 1), ("af", 2), ("l1", 3), ("h2", 4), ("ef", 5), ("h1", 6), ("nc", 7))
class TmnxTunnelType(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7))
namedValues = NamedValues(("sdp", 1), ("ldp", 2), ("rsvp", 3), ("gre", 4), ("bypass", 5), ("invalid", 6), ("bgp", 7))
class TmnxTunnelID(TextualConvention, Unsigned32):
status = 'current'
class TmnxBgpRouteTarget(TextualConvention, OctetString):
status = 'current'
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(1, 32)
class TmnxVPNRouteDistinguisher(TextualConvention, OctetString):
status = 'current'
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(8, 8)
fixedLength = 8
class SdpBindId(TextualConvention, OctetString):
status = 'current'
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(8, 8)
fixedLength = 8
class TmnxVRtrMplsLspID(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(0, 65535)
class TPortSchedulerPIR(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-1, -1), ValueRangeConstraint(1, 100000000), )
class TPortSchedulerPIRRate(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-1, -1), ValueRangeConstraint(1, 400000000), )
class TPortSchedulerCIR(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-1, -1), ValueRangeConstraint(0, 400000000), )
class TWeight(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(0, 100)
class TNonZeroWeight(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(1, 100)
class TPolicerWeight(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(1, 100)
class THsmdaWeight(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(1, 100)
class THsmdaWrrWeight(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(1, 32)
class THsmdaWeightClass(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 4, 8))
namedValues = NamedValues(("class1", 1), ("class2", 2), ("class4", 4), ("class8", 8))
class THsmdaWeightOverride(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-2, -2), ValueRangeConstraint(1, 100), )
class THsmdaWrrWeightOverride(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-2, -2), ValueRangeConstraint(1, 32), )
class TCIRRate(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-1, -1), ValueRangeConstraint(0, 100000000), )
class THPolCIRRate(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-1, -1), ValueRangeConstraint(0, 20000000), )
class TRateType(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("kbps", 1), ("percent", 2))
class TBWRateType(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3))
namedValues = NamedValues(("kbps", 1), ("percentPortLimit", 2), ("percentLocalLimit", 3))
class TPolicerRateType(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("kbps", 1), ("percentLocalLimit", 2))
class TCIRRateOverride(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-2, -2), ValueRangeConstraint(-1, -1), ValueRangeConstraint(0, 100000000), )
class THPolCIRRateOverride(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-2, -2), ValueRangeConstraint(-1, -1), ValueRangeConstraint(0, 20000000), )
class TCIRPercentOverride(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-2, -2), ValueRangeConstraint(0, 10000), )
class THsmdaCIRKRate(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-1, -1), ValueRangeConstraint(0, 100000000), )
class THsmdaCIRKRateOverride(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-2, -2), ValueRangeConstraint(-1, -1), ValueRangeConstraint(0, 100000000), )
class THsmdaCIRMRate(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-1, -1), ValueRangeConstraint(0, 100000), )
class THsmdaCIRMRateOverride(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-2, -2), ValueRangeConstraint(-1, -1), ValueRangeConstraint(0, 100000), )
class TPIRRate(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-1, -1), ValueRangeConstraint(1, 100000000), )
class THPolVirtualSchePIRRate(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-1, -1), ValueRangeConstraint(1, 800000000), )
class THPolVirtualScheCIRRate(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-1, -1), ValueRangeConstraint(0, 800000000), )
class TAdvCfgRate(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(0, 100000000)
class TMaxDecRate(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(1, 100000000), )
class THPolPIRRate(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-1, -1), ValueRangeConstraint(1, 20000000), )
class TSecondaryShaper10GPIRRate(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-1, -1), ValueRangeConstraint(1, 10000), )
class TExpSecondaryShaperPIRRate(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-1, -1), ValueRangeConstraint(1, 10000000), )
class TExpSecondaryShaperClassRate(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-1, -1), ValueRangeConstraint(1, 10000000), )
class TPIRRateOverride(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-2, -2), ValueRangeConstraint(-1, -1), ValueRangeConstraint(1, 100000000), )
class THPolPIRRateOverride(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-2, -2), ValueRangeConstraint(-1, -1), ValueRangeConstraint(1, 20000000), )
class TPIRPercentOverride(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-2, -2), ValueRangeConstraint(1, 10000), )
class TPIRRateOrZero(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-1, -1), ValueRangeConstraint(0, 100000000), )
class THsmdaPIRKRate(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-1, -1), ValueRangeConstraint(1, 100000000), )
class THsmdaPIRKRateOverride(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-2, -2), ValueRangeConstraint(-1, -1), ValueRangeConstraint(1, 100000000), )
class THsmdaPIRMRate(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-1, -1), ValueRangeConstraint(1, 100000), )
class THsmdaPIRMRateOverride(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-2, -2), ValueRangeConstraint(-1, -1), ValueRangeConstraint(1, 100000), )
class TmnxDHCP6MsgType(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14))
namedValues = NamedValues(("dhcp6MsgTypeSolicit", 1), ("dhcp6MsgTypeAdvertise", 2), ("dhcp6MsgTypeRequest", 3), ("dhcp6MsgTypeConfirm", 4), ("dhcp6MsgTypeRenew", 5), ("dhcp6MsgTypeRebind", 6), ("dhcp6MsgTypeReply", 7), ("dhcp6MsgTypeRelease", 8), ("dhcp6MsgTypeDecline", 9), ("dhcp6MsgTypeReconfigure", 10), ("dhcp6MsgTypeInfoRequest", 11), ("dhcp6MsgTypeRelayForw", 12), ("dhcp6MsgTypeRelayReply", 13), ("dhcp6MsgTypeMaxValue", 14))
class TmnxOspfInstance(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(0, 31)
class TmnxBGPFamilyType(TextualConvention, Bits):
status = 'current'
namedValues = NamedValues(("ipv4Unicast", 0), ("ipv4Multicast", 1), ("ipv4UastMcast", 2), ("ipv4MplsLabel", 3), ("ipv4Vpn", 4), ("ipv6Unicast", 5), ("ipv6Multicast", 6), ("ipv6UcastMcast", 7), ("ipv6MplsLabel", 8), ("ipv6Vpn", 9), ("l2Vpn", 10), ("ipv4Mvpn", 11), ("msPw", 12), ("ipv4Flow", 13), ("mdtSafi", 14), ("routeTarget", 15), ("mcastVpnIpv4", 16))
class TmnxIgmpGroupFilterMode(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("include", 1), ("exclude", 2))
class TmnxIgmpGroupType(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("static", 1), ("dynamic", 2))
class TmnxIgmpVersion(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3))
namedValues = NamedValues(("version1", 1), ("version2", 2), ("version3", 3))
class TmnxMldGroupFilterMode(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("include", 1), ("exclude", 2))
class TmnxMldGroupType(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("static", 1), ("dynamic", 2))
class TmnxMldVersion(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("version1", 1), ("version2", 2))
class TmnxManagedRouteStatus(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10))
namedValues = NamedValues(("installed", 0), ("notYetInstalled", 1), ("wrongAntiSpoofType", 2), ("outOfMemory", 3), ("shadowed", 4), ("routeTableFull", 5), ("parentInterfaceDown", 6), ("hostInactive", 7), ("enhancedSubMgmtRequired", 8), ("deprecated1", 9), ("l2AwNotSupported", 10))
class TmnxAncpString(DisplayString):
status = 'current'
subtypeSpec = DisplayString.subtypeSpec + ValueSizeConstraint(1, 63)
class TmnxAncpStringOrZero(DisplayString):
status = 'current'
subtypeSpec = DisplayString.subtypeSpec + ValueSizeConstraint(0, 63)
class TmnxMulticastAddrFamily(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1))
namedValues = NamedValues(("ipv4Multicast", 0), ("ipv6Multicast", 1))
class TmnxAsciiSpecification(DisplayString):
status = 'current'
subtypeSpec = DisplayString.subtypeSpec + ValueSizeConstraint(0, 255)
class TmnxMacSpecification(DisplayString):
status = 'current'
subtypeSpec = DisplayString.subtypeSpec + ValueSizeConstraint(0, 17)
class TmnxBinarySpecification(DisplayString):
status = 'current'
subtypeSpec = DisplayString.subtypeSpec + ValueSizeConstraint(0, 255)
class TmnxDefSubIdSource(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3))
namedValues = NamedValues(("useSapId", 1), ("useString", 2), ("useAutoId", 3))
class TmnxSubIdentString(DisplayString):
status = 'current'
subtypeSpec = DisplayString.subtypeSpec + ValueSizeConstraint(1, 32)
class TmnxSubIdentStringOrEmpty(DisplayString):
status = 'current'
subtypeSpec = DisplayString.subtypeSpec + ValueSizeConstraint(0, 32)
class TmnxSubRadServAlgorithm(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3))
namedValues = NamedValues(("direct", 1), ("roundRobin", 2), ("hashBased", 3))
class TmnxSubRadiusAttrType(TextualConvention, Unsigned32):
reference = 'RFC 2865 Remote Authentication Dial In User Service (RADIUS) section 5. Attributes'
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(0, 255)
class TmnxSubRadiusVendorId(TextualConvention, Unsigned32):
reference = 'RFC 2865 Remote Authentication Dial In User Service (RADIUS) section 5.26. Vendor-Specific.'
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(0, 16777215)
class TmnxRadiusPendingReqLimit(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(1, 4096)
class TmnxRadiusServerOperState(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))
namedValues = NamedValues(("unknown", 1), ("inService", 2), ("outOfService", 3), ("transition", 4), ("overloaded", 5))
class TmnxSubProfileString(DisplayString):
status = 'current'
subtypeSpec = DisplayString.subtypeSpec + ValueSizeConstraint(1, 16)
class TmnxSubProfileStringOrEmpty(DisplayString):
status = 'current'
subtypeSpec = DisplayString.subtypeSpec + ValueSizeConstraint(0, 16)
class TmnxSlaProfileString(DisplayString):
status = 'current'
subtypeSpec = DisplayString.subtypeSpec + ValueSizeConstraint(1, 16)
class TmnxSlaProfileStringOrEmpty(DisplayString):
status = 'current'
subtypeSpec = DisplayString.subtypeSpec + ValueSizeConstraint(0, 16)
class TmnxAppProfileString(DisplayString):
status = 'current'
subtypeSpec = DisplayString.subtypeSpec + ValueSizeConstraint(1, 16)
class TmnxAppProfileStringOrEmpty(DisplayString):
status = 'current'
subtypeSpec = DisplayString.subtypeSpec + ValueSizeConstraint(0, 16)
class TmnxSubMgtIntDestIdOrEmpty(DisplayString):
status = 'current'
subtypeSpec = DisplayString.subtypeSpec + ValueSizeConstraint(0, 32)
class TmnxSubMgtIntDestId(TmnxSubMgtIntDestIdOrEmpty):
status = 'current'
subtypeSpec = TmnxSubMgtIntDestIdOrEmpty.subtypeSpec + ValueSizeConstraint(1, 32)
class TmnxDefInterDestIdSource(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3))
namedValues = NamedValues(("useString", 1), ("useTopQTag", 2), ("useVpi", 3))
class TmnxSubNasPortSuffixType(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2))
namedValues = NamedValues(("none", 0), ("circuitId", 1), ("remoteId", 2))
class TmnxSubNasPortPrefixType(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1))
namedValues = NamedValues(("none", 0), ("userString", 1))
class TmnxSubNasPortTypeType(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("standard", 1), ("config", 2))
class TmnxSubMgtOrgStrOrZero(DisplayString):
status = 'current'
subtypeSpec = DisplayString.subtypeSpec + ValueSizeConstraint(0, 32)
class TmnxSubMgtOrgString(TmnxSubMgtOrgStrOrZero):
status = 'current'
subtypeSpec = TmnxSubMgtOrgStrOrZero.subtypeSpec + ValueSizeConstraint(1, 32)
class TmnxFilterProfileStringOrEmpty(DisplayString):
status = 'current'
subtypeSpec = DisplayString.subtypeSpec + ValueSizeConstraint(0, 16)
class TmnxAccessLoopEncapDataLink(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1))
namedValues = NamedValues(("aal5", 0), ("ethernet", 1))
class TmnxAccessLoopEncaps1(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2))
namedValues = NamedValues(("notAvailable", 0), ("untaggedEthernet", 1), ("singleTaggedEthernet", 2))
class TmnxAccessLoopEncaps2(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8))
namedValues = NamedValues(("notAvailable", 0), ("pppoaLlc", 1), ("pppoaNull", 2), ("ipoaLlc", 3), ("ipoaNull", 4), ("ethernetOverAal5LlcFcs", 5), ("ethernetOverAal5LlcNoFcs", 6), ("ethernetOverAal5NullFcs", 7), ("ethernetOverAal5NullNoFcs", 8))
class TmnxSubAleOffsetMode(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1))
namedValues = NamedValues(("none", 0), ("auto", 1))
class TmnxSubAleOffset(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24))
namedValues = NamedValues(("none", 0), ("pppoaLlc", 1), ("pppoaNull", 2), ("pppoeoaLlc", 3), ("pppoeoaLlcFcs", 4), ("pppoeoaLlcTagged", 5), ("pppoeoaLlcTaggedFcs", 6), ("pppoeoaNull", 7), ("pppoeoaNullFcs", 8), ("pppoeoaNullTagged", 9), ("pppoeoaNullTaggedFcs", 10), ("ipoaLlc", 11), ("ipoaNull", 12), ("ipoeoaLlc", 13), ("ipoeoaLlcFcs", 14), ("ipoeoaLlcTagged", 15), ("ipoeoaLlcTaggedFcs", 16), ("ipoeoaNull", 17), ("ipoeoaNullFcs", 18), ("ipoeoaNullTagged", 19), ("ipoeoaNullTaggedFcs", 20), ("pppoe", 21), ("pppoeTagged", 22), ("ipoe", 23), ("ipoeTagged", 24))
class TmnxDhcpOptionType(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))
namedValues = NamedValues(("ipv4", 1), ("ascii", 2), ("hex", 3), ("ipv6", 4), ("domain", 5))
class TmnxPppoeUserName(DisplayString):
status = 'current'
subtypeSpec = DisplayString.subtypeSpec + ValueSizeConstraint(1, 128)
class TmnxPppoeUserNameOrEmpty(DisplayString):
status = 'current'
subtypeSpec = DisplayString.subtypeSpec + ValueSizeConstraint(0, 128)
class TCpmProtPolicyID(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(0, 255)
class TCpmProtPolicyIDOrDefault(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-1, -1), ValueRangeConstraint(1, 255), )
class TMlpppQoSProfileId(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(0, 65535)
class TMcFrQoSProfileId(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(0, 65535)
class TmnxPppoeSessionId(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(0, 65535)
class TmnxPppoePadoDelay(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(1, 30), )
class TmnxPppoeSessionInfoOrigin(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7))
namedValues = NamedValues(("none", 0), ("default", 1), ("radius", 2), ("localUserDb", 3), ("dhcp", 4), ("midSessionChange", 5), ("tags", 6), ("l2tp", 7))
class TmnxPppoeSessionType(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))
namedValues = NamedValues(("local", 1), ("localWholesale", 2), ("localRetail", 3), ("l2tp", 4))
class TmnxPppNcpProtocol(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("ipcp", 1), ("ipv6cp", 2))
class TmnxMlpppEpClass(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5))
namedValues = NamedValues(("null", 0), ("local", 1), ("ipv4Address", 2), ("macAddress", 3), ("magicNumber", 4), ("directoryNumber", 5))
class TNetworkPolicyID(TPolicyID):
status = 'current'
subtypeSpec = TPolicyID.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(1, 65535), ValueRangeConstraint(65536, 65536), ValueRangeConstraint(65537, 65537), )
class TItemScope(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("exclusive", 1), ("template", 2))
class TItemMatch(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3))
namedValues = NamedValues(("off", 1), ("false", 2), ("true", 3))
class TPriority(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("low", 1), ("high", 2))
class TPriorityOrDefault(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3))
namedValues = NamedValues(("low", 1), ("high", 2), ("default", 3))
class TProfileUseDEOrNone(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))
namedValues = NamedValues(("none", 0), ("in", 1), ("out", 2), ("de", 3))
class TPriorityOrUndefined(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2))
namedValues = NamedValues(("undefined", 0), ("low", 1), ("high", 2))
class TProfile(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("in", 1), ("out", 2))
class TProfileOrDei(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 13))
namedValues = NamedValues(("in", 1), ("out", 2), ("use-dei", 13))
class TDEProfile(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3))
namedValues = NamedValues(("in", 1), ("out", 2), ("de", 3))
class TDEProfileOrDei(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 13))
namedValues = NamedValues(("in", 1), ("out", 2), ("de", 3), ("use-dei", 13))
class TProfileOrNone(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2))
namedValues = NamedValues(("none", 0), ("in", 1), ("out", 2))
class TAdaptationRule(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3))
namedValues = NamedValues(("max", 1), ("min", 2), ("closest", 3))
class TAdaptationRuleOverride(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))
namedValues = NamedValues(("noOverride", 0), ("max", 1), ("min", 2), ("closest", 3))
class TRemarkType(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3))
namedValues = NamedValues(("none", 1), ("dscp", 2), ("precedence", 3))
class TPrecValue(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(0, 7)
class TPrecValueOrNone(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-1, -1), ValueRangeConstraint(0, 7), )
class TBurstSize(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-1, -1), ValueRangeConstraint(0, 131072), )
class TBurstSizeOverride(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-2, -2), ValueRangeConstraint(-1, -1), ValueRangeConstraint(0, 131072), )
class TBurstPercent(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(0, 100)
class TBurstHundredthsOfPercent(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(0, 10000)
class TBurstPercentOrDefault(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-1, -1), ValueRangeConstraint(0, 100), )
class TBurstPercentOrDefaultOverride(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-2, -2), ValueRangeConstraint(-1, -1), ValueRangeConstraint(0, 100), )
class TRatePercent(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(0, 100)
class TPIRRatePercent(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(1, 100)
class TLevel(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(1, 8)
class TLevelOrDefault(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(1, 8), )
class TQWeight(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(1, 100), )
class TMeterMode(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("priority", 1), ("profile", 2))
class TPlcyMode(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))
namedValues = NamedValues(("none", 0), ("roundRobin", 1), ("weightedRoundRobin", 2), ("weightedDeficitRoundRobin", 3))
class TPlcyQuanta(TextualConvention, Integer32):
status = 'current'
class TQueueMode(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("priority", 1), ("profile", 2))
class TEntryIndicator(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(0, 65535)
class TEntryId(TEntryIndicator):
status = 'current'
subtypeSpec = TEntryIndicator.subtypeSpec + ValueRangeConstraint(1, 65535)
class TMatchCriteria(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))
namedValues = NamedValues(("ip", 1), ("mac", 2), ("none", 3), ("dscp", 4), ("dot1p", 5), ("prec", 6))
class TmnxMdaQos(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))
namedValues = NamedValues(("unknown", 0), ("mda", 1), ("hsmda1", 2), ("hsmda2", 3))
class TAtmTdpDescrType(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))
namedValues = NamedValues(("clp0And1pcr", 0), ("clp0And1pcrPlusClp0And1scr", 1), ("clp0And1pcrPlusClp0scr", 2), ("clp0And1pcrPlusClp0scrTag", 3))
class TDEValue(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-1, -1), ValueRangeConstraint(0, 1), )
class TQGroupType(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1))
namedValues = NamedValues(("port", 0), ("vpls", 1))
class TQosOverrideType(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))
namedValues = NamedValues(("queue", 1), ("policer", 2), ("aggRateLimit", 3), ("arbiter", 4), ("scheduler", 5))
class TmnxIPsecTunnelTemplateId(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(1, 2048)
class TmnxIPsecTunnelTemplateIdOrZero(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(0, 2048)
class TmnxIpSecIsaOperFlags(TextualConvention, Bits):
status = 'current'
namedValues = NamedValues(("adminDown", 0), ("noActive", 1), ("noResources", 2))
class TmnxIkePolicyAuthMethod(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))
namedValues = NamedValues(("psk", 1), ("hybridX509XAuth", 2), ("plainX509XAuth", 3), ("plainPskXAuth", 4), ("cert", 5))
class TmnxIkePolicyOwnAuthMethod(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 5))
namedValues = NamedValues(("symmetric", 0), ("psk", 1), ("cert", 5))
class TmnxRsvpDSTEClassType(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(0, 7)
class TmnxAccPlcyQICounters(TextualConvention, Bits):
status = 'current'
namedValues = NamedValues(("hpo", 0), ("lpo", 1), ("ucp", 2), ("hoo", 3), ("loo", 4), ("uco", 5), ("apo", 6), ("aoo", 7), ("hpd", 8), ("lpd", 9), ("hod", 10), ("lod", 11), ("ipf", 12), ("opf", 13), ("iof", 14), ("oof", 15))
class TmnxAccPlcyQECounters(TextualConvention, Bits):
status = 'current'
namedValues = NamedValues(("ipf", 0), ("ipd", 1), ("opf", 2), ("opd", 3), ("iof", 4), ("iod", 5), ("oof", 6), ("ood", 7))
class TmnxAccPlcyOICounters(TextualConvention, Bits):
status = 'current'
namedValues = NamedValues(("apo", 0), ("aoo", 1), ("hpd", 2), ("lpd", 3), ("hod", 4), ("lod", 5), ("ipf", 6), ("opf", 7), ("iof", 8), ("oof", 9))
class TmnxAccPlcyOECounters(TextualConvention, Bits):
status = 'current'
namedValues = NamedValues(("ipf", 0), ("ipd", 1), ("opf", 2), ("opd", 3), ("iof", 4), ("iod", 5), ("oof", 6), ("ood", 7))
class TmnxAccPlcyAACounters(TextualConvention, Bits):
status = 'current'
namedValues = NamedValues(("any", 0), ("sfa", 1), ("nfa", 2), ("sfd", 3), ("nfd", 4), ("saf", 5), ("naf", 6), ("spa", 7), ("npa", 8), ("sba", 9), ("nba", 10), ("spd", 11), ("npd", 12), ("sbd", 13), ("nbd", 14), ("sdf", 15), ("mdf", 16), ("ldf", 17), ("tfd", 18), ("tfc", 19), ("sbm", 20), ("spm", 21), ("smt", 22), ("nbm", 23), ("npm", 24), ("nmt", 25))
class TmnxVdoGrpIdIndex(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(1, 4)
class TmnxVdoGrpId(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(0, 4)
class TmnxVdoGrpIdOrInherit(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-1, -1), ValueRangeConstraint(0, 4), )
class TmnxVdoFccServerMode(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))
namedValues = NamedValues(("none", 0), ("burst", 1), ("dent", 2), ("hybrid", 3))
class TmnxVdoPortNumber(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(1024, 5999), ValueRangeConstraint(6251, 65535), )
class TmnxVdoIfName(TNamedItem):
status = 'current'
class TmnxTimeInSec(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(0, 86400)
class TmnxMobProfName(TNamedItem):
status = 'current'
class TmnxMobProfNameOrEmpty(TNamedItemOrEmpty):
status = 'current'
class TmnxMobProfIpTtl(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(1, 255)
class TmnxMobDiaTransTimer(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(1, 180)
class TmnxMobDiaRetryCount(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(0, 8)
class TmnxMobDiaPeerHost(DisplayString):
status = 'current'
subtypeSpec = DisplayString.subtypeSpec + ValueSizeConstraint(0, 80)
class TmnxMobGwId(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(1, 8)
class TmnxMobNode(DisplayString):
status = 'current'
subtypeSpec = DisplayString.subtypeSpec + ValueSizeConstraint(0, 30)
class TmnxMobBufferLimit(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(1000, 12000)
class TmnxMobQueueLimit(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(1000, 12000)
class TmnxMobRtrAdvtInterval(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(1, 60)
class TmnxMobRtrAdvtLifeTime(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(1, 24)
class TmnxMobAddrScheme(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("stateful", 1), ("stateless", 2))
class TmnxMobQciValue(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(1, 9)
class TmnxMobQciValueOrZero(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(0, 9)
class TmnxMobArpValue(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(1, 15)
class TmnxMobArpValueOrZero(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(0, 15)
class TmnxMobApn(DisplayString):
reference = '3GPP TS 23.003 Section 9.1'
status = 'current'
subtypeSpec = DisplayString.subtypeSpec + ValueSizeConstraint(1, 80)
class TmnxMobApnOrZero(DisplayString):
status = 'current'
subtypeSpec = DisplayString.subtypeSpec + ValueSizeConstraint(0, 80)
class TmnxMobImsi(TextualConvention, OctetString):
status = 'current'
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(8, 8)
fixedLength = 8
class TmnxMobMsisdn(DisplayString):
status = 'current'
subtypeSpec = DisplayString.subtypeSpec + ValueSizeConstraint(0, 15)
class TmnxMobImei(DisplayString):
status = 'current'
subtypeSpec = DisplayString.subtypeSpec + ConstraintsUnion(ValueSizeConstraint(0, 0), ValueSizeConstraint(16, 16), )
class TmnxMobNai(DisplayString):
status = 'current'
subtypeSpec = DisplayString.subtypeSpec + ValueSizeConstraint(0, 72)
class TmnxMobMcc(DisplayString):
status = 'current'
subtypeSpec = DisplayString.subtypeSpec + ValueSizeConstraint(3, 3)
fixedLength = 3
class TmnxMobMnc(DisplayString):
status = 'current'
subtypeSpec = DisplayString.subtypeSpec + ConstraintsUnion(ValueSizeConstraint(2, 2), ValueSizeConstraint(3, 3), )
class TmnxMobMccOrEmpty(DisplayString):
status = 'current'
subtypeSpec = DisplayString.subtypeSpec + ConstraintsUnion(ValueSizeConstraint(0, 0), ValueSizeConstraint(3, 3), )
class TmnxMobMncOrEmpty(DisplayString):
status = 'current'
subtypeSpec = DisplayString.subtypeSpec + ConstraintsUnion(ValueSizeConstraint(0, 0), ValueSizeConstraint(2, 2), ValueSizeConstraint(3, 3), )
class TmnxMobUeState(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))
namedValues = NamedValues(("idle", 1), ("active", 2), ("paging", 3), ("init", 4), ("suspend", 5), ("ddnDamp", 6))
class TmnxMobUeRat(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10))
namedValues = NamedValues(("utran", 1), ("geran", 2), ("wlan", 3), ("gan", 4), ("hspa", 5), ("eutran", 6), ("ehrpd", 7), ("hrpd", 8), ("oneXrtt", 9), ("umb", 10))
class TmnxMobUeSubType(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3))
namedValues = NamedValues(("homer", 1), ("roamer", 2), ("visitor", 3))
class TmnxMobPdnType(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3))
namedValues = NamedValues(("ipv4", 1), ("ipv6", 2), ("ipv4v6", 3))
class TmnxMobPgwSigProtocol(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("gtp", 1), ("pmip", 2))
class TmnxMobPdnSessionState(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13))
namedValues = NamedValues(("invalid", 0), ("init", 1), ("waitPcrfResponse", 2), ("waitPgwResponse", 3), ("waitEnodebUpdate", 4), ("connected", 5), ("ulDelPending", 6), ("dlDelPending", 7), ("idleMode", 8), ("pageMode", 9), ("dlHandover", 10), ("incomingHandover", 11), ("outgoingHandover", 12), ("stateMax", 13))
class TmnxMobPdnSessionEvent(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22))
namedValues = NamedValues(("sessionInvalid", 0), ("gtpCreateSessReq", 1), ("gtpUpdateBearerReq", 2), ("gtpDeleteSessReq", 3), ("gtpDeleteBearerResp", 4), ("gtpUpdateBearerResp", 5), ("gtpModifyActiveToIdle", 6), ("gtpResrcAllocCmd", 7), ("gtpModifyQosCmd", 8), ("gtpX1eNodeBTeidUpdate", 9), ("gtpX2SrcSgwDeleteSessReq", 10), ("gtpS1CreateIndirectTunnel", 11), ("dlPktRecvIndication", 12), ("dlPktNotificationAck", 13), ("dlPktNotificationFail", 14), ("pcrfSessEstResp", 15), ("pcrfSessTerminateRsp", 16), ("pcrfProvQosRules", 17), ("pmipSessResp", 18), ("pmipSessUpdate", 19), ("pmipSessDeleteRsp", 20), ("pmipSessDeleteReq", 21), ("eventMax", 22))
class TmnxMobBearerId(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(1, 15)
class TmnxMobBearerType(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("default", 1), ("dedicated", 2))
class TmnxMobQci(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(0, 9)
class TmnxMobArp(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(0, 15)
class TmnxMobSdf(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(0, 255)
class TmnxMobSdfFilter(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(0, 16)
class TmnxMobSdfFilterNum(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(0, 16)
class TmnxMobSdfRuleName(DisplayString):
status = 'current'
subtypeSpec = DisplayString.subtypeSpec + ValueSizeConstraint(1, 64)
class TmnxMobSdfFilterDirection(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))
namedValues = NamedValues(("preRel7", 0), ("downLink", 1), ("upLink", 2), ("biDir", 3))
class TmnxMobSdfFilterProtocol(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140))
namedValues = NamedValues(("any", -1), ("ipv6HopByOpOpt", 0), ("icmp", 1), ("igmp", 2), ("ggp", 3), ("ip", 4), ("st", 5), ("tcp", 6), ("cbt", 7), ("egp", 8), ("igp", 9), ("bbnRccMon", 10), ("nvp2", 11), ("pup", 12), ("argus", 13), ("emcon", 14), ("xnet", 15), ("chaos", 16), ("udp", 17), ("mux", 18), ("dcnMeas", 19), ("hmp", 20), ("prm", 21), ("xnsIdp", 22), ("trunk1", 23), ("trunk2", 24), ("leaf1", 25), ("leaf2", 26), ("rdp", 27), ("irdp", 28), ("isoTp4", 29), ("netblt", 30), ("mfeNsp", 31), ("meritInp", 32), ("dccp", 33), ("pc3", 34), ("idpr", 35), ("xtp", 36), ("ddp", 37), ("idprCmtp", 38), ("tpplusplus", 39), ("il", 40), ("ipv6", 41), ("sdrp", 42), ("ipv6Route", 43), ("ipv6Frag", 44), ("idrp", 45), ("rsvp", 46), ("gre", 47), ("dsr", 48), ("bna", 49), ("esp", 50), ("ah", 51), ("iNlsp", 52), ("swipe", 53), ("narp", 54), ("mobile", 55), ("tlsp", 56), ("skip", 57), ("ipv6Icmp", 58), ("ipv6NoNxt", 59), ("ipv6Opts", 60), ("anyHostIntl", 61), ("cftp", 62), ("anyLocalNet", 63), ("satExpak", 64), ("kryptolan", 65), ("rvd", 66), ("ippc", 67), ("anyDFS", 68), ("satMon", 69), ("visa", 70), ("ipcv", 71), ("cpnx", 72), ("cphb", 73), ("wsn", 74), ("pvp", 75), ("brSatMon", 76), ("sunNd", 77), ("wbMon", 78), ("wbExpak", 79), ("isoIp", 80), ("vmtp", 81), ("secureVmpt", 82), ("vines", 83), ("ttp", 84), ("nsfnetIgp", 85), ("dgp", 86), ("tcf", 87), ("eiGrp", 88), ("ospfIgp", 89), ("spriteRpc", 90), ("larp", 91), ("mtp", 92), ("ax25", 93), ("ipip", 94), ("micp", 95), ("sccSp", 96), ("etherIp", 97), ("encap", 98), ("anyPEC", 99), ("gmtp", 100), ("ifmp", 101), ("pnni", 102), ("pim", 103), ("aris", 104), ("scps", 105), ("qnx", 106), ("activeNet", 107), ("ipComp", 108), ("snp", 109), ("compaqPeer", 110), ("ipxInIp", 111), ("vrrp", 112), ("pgm", 113), ("any0hop", 114), ("l2tp", 115), ("ddx", 116), ("iatp", 117), ("stp", 118), ("srp", 119), ("uti", 120), ("smp", 121), ("sm", 122), ("ptp", 123), ("isis", 124), ("fire", 125), ("crtp", 126), ("crudp", 127), ("sscopmce", 128), ("iplt", 129), ("sps", 130), ("pipe", 131), ("sctp", 132), ("fc", 133), ("rsvpE2eIgnore", 134), ("mobHeader", 135), ("udpLite", 136), ("mplsInIp", 137), ("manet", 138), ("hip", 139), ("shim6", 140))
class TmnxMobPathMgmtState(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5))
namedValues = NamedValues(("disabled", 0), ("up", 1), ("reqTimeOut", 2), ("fault", 3), ("idle", 4), ("restart", 5))
class TmnxMobDiaPathMgmtState(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))
namedValues = NamedValues(("shutDown", 0), ("shuttingDown", 1), ("inactive", 2), ("active", 3))
class TmnxMobDiaDetailPathMgmtState(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9))
namedValues = NamedValues(("error", 0), ("idle", 1), ("closed", 2), ("localShutdown", 3), ("remoteClosing", 4), ("waitConnAck", 5), ("waitCea", 6), ("open", 7), ("openCoolingDown", 8), ("waitDns", 9))
class TmnxMobGwType(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3))
namedValues = NamedValues(("sgw", 1), ("pgw", 2), ("wlanGw", 3))
class TmnxMobChargingProfile(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(0, 255)
class TmnxMobChargingProfileOrInherit(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-1, -1), ValueRangeConstraint(0, 255), )
class TmnxMobAuthType(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("radius", 1), ("diameter", 2))
class TmnxMobAuthUserName(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3))
namedValues = NamedValues(("imsi", 1), ("msisdn", 2), ("pco", 3))
class TmnxMobProfGbrRate(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(0, 100000)
class TmnxMobProfMbrRate(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(0, 100000)
class TmnxMobPeerType(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3))
namedValues = NamedValues(("sgw", 1), ("pgw", 2), ("hsgw", 3))
class TmnxMobRfAcctLevel(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("pdnLevel", 1), ("qciLevel", 2))
class TmnxMobProfPolReportingLevel(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("servId", 1), ("ratingGrp", 2))
class TmnxMobProfPolChargingMethod(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))
namedValues = NamedValues(("profChargingMtd", 0), ("online", 1), ("offline", 2), ("both", 3))
class TmnxMobProfPolMeteringMethod(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3))
namedValues = NamedValues(("timeBased", 1), ("volBased", 2), ("both", 3))
class TmnxMobServerState(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2))
namedValues = NamedValues(("na", 0), ("up", 1), ("down", 2))
class TmnxMobChargingBearerType(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3))
namedValues = NamedValues(("home", 1), ("visiting", 2), ("roaming", 3))
class TmnxMobChargingLevel(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("pdn", 1), ("bearer", 2))
class TmnxMobIpCanType(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("epc3gpp", 1), ("gprs3gpp", 2))
class TmnxMobStaticPolPrecedence(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(1, 65536)
class TmnxMobStaticPolPrecedenceOrZero(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(0, 65535)
class TmnxMobDualStackPref(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3))
namedValues = NamedValues(("ipv4", 1), ("ipv6", 2), ("useCplane", 3))
class TmnxMobDfPeerId(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(1, 16)
class TmnxMobLiTarget(TextualConvention, OctetString):
status = 'current'
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(8, 8)
fixedLength = 8
class TmnxMobLiTargetType(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3))
namedValues = NamedValues(("imsi", 1), ("msisdn", 2), ("imei", 3))
class TmnxReasContextVal(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(0, 31)
class TmnxVdoStatInt(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("current", 1), ("interval", 2))
class TmnxVdoOutputFormat(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("udp", 1), ("rtp-udp", 2))
class TmnxVdoAnalyzerAlarm(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))
namedValues = NamedValues(("none", 0), ("tnc", 1), ("qos", 2), ("poa", 3))
class TmnxVdoAnalyzerAlarmStates(TextualConvention, OctetString):
status = 'current'
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(10, 10)
fixedLength = 10
class SvcISID(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-1, -1), ValueRangeConstraint(0, 16777215), )
class TIngPolicerId(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(1, 32)
class TIngPolicerIdOrNone(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(1, 32), )
class TEgrPolicerId(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(1, 8)
class TEgrPolicerIdOrNone(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(1, 8), )
class TFIRRate(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-1, -1), ValueRangeConstraint(1, 100000000), )
class TBurstSizeBytes(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-1, -1), ValueRangeConstraint(0, 134217728), )
class THSMDABurstSizeBytes(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-1, -1), ValueRangeConstraint(0, 2688000), )
class THSMDAQueueBurstLimit(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-1, -1), ValueRangeConstraint(1, 1000000), )
class TClassBurstLimit(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-1, -1), ValueRangeConstraint(1, 327680), )
class TPlcrBurstSizeBytes(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-1, -1), ValueRangeConstraint(0, 4194304), )
class TBurstSizeBytesOverride(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-2, -2), ValueRangeConstraint(-1, -1), ValueRangeConstraint(0, 134217728), )
class THSMDABurstSizeBytesOverride(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-2, -2), ValueRangeConstraint(-1, -1), ValueRangeConstraint(0, 2688000), )
class TPlcrBurstSizeBytesOverride(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-2, -2), ValueRangeConstraint(-1, -1), ValueRangeConstraint(0, 4194304), )
class TmnxBfdSessOperState(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))
namedValues = NamedValues(("unknown", 1), ("connected", 2), ("broken", 3), ("peerDetectsDown", 4), ("notConfigured", 5), ("noResources", 6))
class TmnxIngPolicerStatMode(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9))
namedValues = NamedValues(("noStats", 0), ("minimal", 1), ("offeredProfileNoCIR", 2), ("offeredTotalCIR", 3), ("offeredPrioNoCIR", 4), ("offeredProfileCIR", 5), ("offeredPrioCIR", 6), ("offeredLimitedProfileCIR", 7), ("offeredProfileCapCIR", 8), ("offeredLimitedCapCIR", 9))
class TmnxIngPolicerStatModeOverride(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9))
namedValues = NamedValues(("noOverride", -1), ("noStats", 0), ("minimal", 1), ("offeredProfileNoCIR", 2), ("offeredTotalCIR", 3), ("offeredPrioNoCIR", 4), ("offeredProfileCIR", 5), ("offeredPrioCIR", 6), ("offeredLimitedProfileCIR", 7), ("offeredProfileCapCIR", 8), ("offeredLimitedCapCIR", 9))
class TmnxEgrPolicerStatMode(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6))
namedValues = NamedValues(("noStats", 0), ("minimal", 1), ("offeredProfileNoCIR", 2), ("offeredTotalCIR", 3), ("offeredProfileCIR", 4), ("offeredLimitedCapCIR", 5), ("offeredProfileCapCIR", 6))
class TmnxEgrPolicerStatModeOverride(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(-1, 0, 1, 2, 3, 4, 5, 6))
namedValues = NamedValues(("noOverride", -1), ("noStats", 0), ("minimal", 1), ("offeredProfileNoCIR", 2), ("offeredTotalCIR", 3), ("offeredProfileCIR", 4), ("offeredLimitedCapCIR", 5), ("offeredProfileCapCIR", 6))
class TmnxTlsGroupId(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(1, 4094)
class TSubHostId(TextualConvention, Unsigned32):
status = 'current'
class TDirection(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2))
namedValues = NamedValues(("both", 0), ("ingress", 1), ("egress", 2))
class TBurstLimit(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-1, -1), ValueRangeConstraint(1, 14000000), )
class TMacFilterType(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3))
namedValues = NamedValues(("normal", 1), ("isid", 2), ("vid", 3))
class TmnxPwGlobalId(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(1, 4294967295)
class TmnxPwGlobalIdOrZero(TextualConvention, Unsigned32):
status = 'current'
class TmnxPwPathHopId(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(1, 16)
class TmnxPwPathHopIdOrZero(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(0, 16)
class TmnxSpokeSdpId(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(1, 4294967295)
class TmnxSpokeSdpIdOrZero(TextualConvention, Unsigned32):
status = 'current'
class TmnxMsPwPeSignaling(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("auto", 1), ("master", 2))
class TmnxLdpFECType(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 128, 129, 130))
namedValues = NamedValues(("addrWildcard", 1), ("addrPrefix", 2), ("addrHost", 3), ("vll", 128), ("vpws", 129), ("vpls", 130))
class TmnxSvcOperGrpCreationOrigin(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("manual", 1), ("mvrp", 2))
class TmnxOperGrpHoldUpTime(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(0, 3600)
class TmnxOperGrpHoldDownTime(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(0, 3600)
class TmnxSrrpPriorityStep(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(0, 10)
class TmnxAiiType(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("aiiType1", 1), ("aiiType2", 2))
class ServObjDesc(DisplayString):
status = 'current'
subtypeSpec = DisplayString.subtypeSpec + ValueSizeConstraint(0, 80)
class TMplsLspExpProfMapID(TPolicyID):
status = 'current'
subtypeSpec = TPolicyID.subtypeSpec + ValueRangeConstraint(1, 65535)
class TSysResource(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(-1, -1), ValueRangeConstraint(0, 11), )
class TmnxSpbFid(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(1, 4095)
class TmnxSpbFidOrZero(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(0, 4095)
class TmnxSpbBridgePriority(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(0, 15)
class TmnxSlopeMap(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))
namedValues = NamedValues(("none", 0), ("low", 1), ("high", 2), ("highLow", 3))
class TmnxCdrType(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3))
namedValues = NamedValues(("pgwCdr", 1), ("gCdr", 2), ("eGCdr", 3))
class TmnxThresholdGroupType(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7))
namedValues = NamedValues(("brMgmtLimit", 1), ("brMgmtCfSuccess", 2), ("brMgmtCfFailure", 3), ("brMgmtTraffic", 4), ("pathMgmt", 5), ("cpmSystem", 6), ("mgIsmSystem", 7))
class TmnxMobUeId(TextualConvention, OctetString):
status = 'current'
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(8, 8)
fixedLength = 8
class TmnxMobUeIdType(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2))
namedValues = NamedValues(("imsi", 0), ("imei", 1), ("msisdn", 2))
class TmnxMobImsiStr(DisplayString):
reference = '3GPP TS 23.003 Numbering, addressing and identification, section 2.2 Composition of IMSI.'
status = 'current'
subtypeSpec = DisplayString.subtypeSpec + ConstraintsUnion(ValueSizeConstraint(0, 0), ValueSizeConstraint(9, 15), )
class TmnxVpnIpBackupFamily(TextualConvention, Bits):
status = 'current'
namedValues = NamedValues(("ipv4", 0), ("ipv6", 1))
class TmnxTunnelGroupId(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(1, 16)
class TmnxTunnelGroupIdOrZero(TextualConvention, Unsigned32):
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(0, 16)
class TmnxMobRatingGrpState(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8))
namedValues = NamedValues(("allowFlow", 1), ("disallowFlow", 2), ("redWebPortal", 3), ("allowResRules", 4), ("iom1stPktTrigger", 5), ("dis1stPktTrigger", 6), ("creditsToppedUp", 7), ("waitForFpt", 8))
class TmnxMobPresenceState(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1))
namedValues = NamedValues(("absent", 0), ("present", 1))
class TmnxMobPdnGyChrgTriggerType(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29))
namedValues = NamedValues(("sgsnIpAddrRecvd", 0), ("qosRecvd", 1), ("locRecvd", 2), ("ratRecvd", 3), ("qosTrfClsRecvd", 4), ("qosRlbClsRecvd", 5), ("qosDlyClsRecvd", 6), ("qosPeakThrptRecvd", 7), ("qosPrcClsRecvd", 8), ("qosMeanTrptRecvd", 9), ("qosMxBtRtUplnkRecvd", 10), ("qosMxBtRtDllnkRecvd", 11), ("qosResBerRecvd", 12), ("qosSduErrRatRecvd", 13), ("qosTransDelayRecvd", 14), ("qosTrfHndPriRecvd", 15), ("qosGrtBtRtUplnkRecvd", 16), ("qosGrtBtRtDllnkRecvd", 17), ("locMccRecvd", 18), ("locMncRecvd", 19), ("locRacRecvd", 20), ("locLacRecvd", 21), ("locCellIdRecvd", 22), ("medCompRecvd", 23), ("partcNmbRecvd", 24), ("thrldPartcNmbRecvd", 25), ("usrPartcTypeRecvd", 26), ("servCondRecvd", 27), ("servNodeRecvd", 28), ("usrCsgInfoRecvd", 29))
class TmnxMobPdnRefPointType(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))
namedValues = NamedValues(("s5", 1), ("s8", 2), ("gn", 3), ("s2a", 4), ("gp", 5))
class TmnxQosBytesHex(TextualConvention, OctetString):
status = 'current'
displayHint = '2x '
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(0, 30)
class TSiteOperStatus(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3))
namedValues = NamedValues(("up", 1), ("down", 2), ("outOfResource", 3))
class TmnxSpbFdbLocale(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))
namedValues = NamedValues(("local", 1), ("sap", 2), ("sdp", 3), ("unknown", 4))
class TmnxSpbFdbState(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6))
namedValues = NamedValues(("ok", 0), ("addModPending", 1), ("delPending", 2), ("sysFdbLimit", 3), ("noFateShared", 4), ("svcFdbLimit", 5), ("noUcast", 6))
class TmnxMobServRefPointType(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 4))
namedValues = NamedValues(("s5", 1), ("s8", 2), ("s2a", 4))
class TmnxMobAccessType(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3))
namedValues = NamedValues(("eps", 1), ("gprs", 2), ("non3gpp", 3))
class TmnxMobUeStrPrefix(DisplayString):
status = 'current'
subtypeSpec = DisplayString.subtypeSpec + ValueSizeConstraint(4, 15)
class TmnxCdrDiagnosticAction(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("included", 1), ("excluded", 2))
class TmnxMplsTpGlobalID(TextualConvention, Unsigned32):
reference = "RFC 6370, 'MPLS Transport Profile (MPLS-TP) Identifiers', Section 3, 'Uniquely Identifying an Operator - the Global_ID'."
status = 'current'
class TmnxMplsTpNodeID(TextualConvention, Unsigned32):
reference = "RFC 6370, 'MPLS Transport Profile (MPLS-TP) Identifiers', Section 4, 'Node and Interface Identifiers'."
status = 'current'
class TmnxMplsTpTunnelType(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1))
namedValues = NamedValues(("mplsTpStatic", 1))
class TmnxVwmCardType(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44))
namedValues = NamedValues(("not-provisioned", 0), ("not-equipped", 1), ("sfc1A", 2), ("sfc1B", 3), ("sfc1C", 4), ("sfc1D", 5), ("sfc1E", 6), ("sfc1F", 7), ("sfc1G", 8), ("sfc1H", 9), ("sfc2AandB", 10), ("sfc2CandD", 11), ("sfc2EandF", 12), ("sfc2GandH", 13), ("sfc4A-D", 14), ("sfc4E-H", 15), ("sfc8", 16), ("sfd8A-R", 17), ("sfd8B-R", 18), ("sfd8C-R", 19), ("sfd8D-R", 20), ("sfd4A-R", 21), ("sfd4B-R", 22), ("sfd4C-R", 23), ("sfd4D-R", 24), ("sfd4E-R", 25), ("sfd4F-R", 26), ("sfd4G-R", 27), ("sfd4H-R", 28), ("sfd2A-R", 29), ("sfd2B-R", 30), ("sfd2C-R", 31), ("sfd2D-R", 32), ("sfd2E-R", 33), ("sfd2F-R", 34), ("sfd2G-R", 35), ("sfd2H-R", 36), ("sfd2I-R", 37), ("sfd2L-R", 38), ("sfd2M-R", 39), ("sfd2N-R", 40), ("sfd2O-R", 41), ("sfd2P-R", 42), ("sfd2Q-R", 43), ("sfd2R-R", 44))
mibBuilder.exportSymbols("TIMETRA-TC-MIB", QTagFullRange=QTagFullRange, TmnxVwmCardType=TmnxVwmCardType, TRatePercent=TRatePercent, TmnxReasContextVal=TmnxReasContextVal, TNamedItemOrEmpty=TNamedItemOrEmpty, TmnxIngPolicerStatModeOverride=TmnxIngPolicerStatModeOverride, TmnxMobDualStackPref=TmnxMobDualStackPref, TEgressQPerPacketOffset=TEgressQPerPacketOffset, TMatchCriteria=TMatchCriteria, TEgrRateModType=TEgrRateModType, TmnxSubRadiusAttrType=TmnxSubRadiusAttrType, TmnxOspfInstance=TmnxOspfInstance, TCpmProtPolicyIDOrDefault=TCpmProtPolicyIDOrDefault, TmnxSpbBridgePriority=TmnxSpbBridgePriority, TmnxMobProfMbrRate=TmnxMobProfMbrRate, TmnxAppProfileStringOrEmpty=TmnxAppProfileStringOrEmpty, TmnxMplsTpGlobalID=TmnxMplsTpGlobalID, TmnxMobQciValueOrZero=TmnxMobQciValueOrZero, TmnxIPsecTunnelTemplateId=TmnxIPsecTunnelTemplateId, TmnxVRtrIDOrZero=TmnxVRtrIDOrZero, THPolVirtualScheCIRRate=THPolVirtualScheCIRRate, TPIRRateOverride=TPIRRateOverride, TmnxMobProfName=TmnxMobProfName, TFCNameOrEmpty=TFCNameOrEmpty, TmnxMobPdnType=TmnxMobPdnType, TmnxOperState=TmnxOperState, TSapIngressMeterId=TSapIngressMeterId, TSiteOperStatus=TSiteOperStatus, TDSCPValueOrNone=TDSCPValueOrNone, TmnxMobPdnSessionState=TmnxMobPdnSessionState, TmnxVPNRouteDistinguisher=TmnxVPNRouteDistinguisher, TCIRRateOverride=TCIRRateOverride, TItemScope=TItemScope, TmnxMobAuthUserName=TmnxMobAuthUserName, TmnxVdoGrpIdIndex=TmnxVdoGrpIdIndex, TDSCPName=TDSCPName, TmnxCdrDiagnosticAction=TmnxCdrDiagnosticAction, TmnxSubMgtIntDestIdOrEmpty=TmnxSubMgtIntDestIdOrEmpty, TPolicerWeight=TPolicerWeight, TLNamedItem=TLNamedItem, TPIRPercentOverride=TPIRPercentOverride, TmnxVdoGrpId=TmnxVdoGrpId, TmnxSubNasPortTypeType=TmnxSubNasPortTypeType, TmnxMobMnc=TmnxMobMnc, TmnxPppoePadoDelay=TmnxPppoePadoDelay, TEgressHsmdaCounterId=TEgressHsmdaCounterId, TmnxSlopeMap=TmnxSlopeMap, ServObjDesc=ServObjDesc, TmnxIpSecIsaOperFlags=TmnxIpSecIsaOperFlags, TMaxDecRate=TMaxDecRate, TmnxMobBufferLimit=TmnxMobBufferLimit, TPolicerRateType=TPolicerRateType, TmnxAccessLoopEncapDataLink=TmnxAccessLoopEncapDataLink, TmnxSpbFid=TmnxSpbFid, TmnxBgpRouteTarget=TmnxBgpRouteTarget, TmnxAncpString=TmnxAncpString, TBurstHundredthsOfPercent=TBurstHundredthsOfPercent, TmnxMdaQos=TmnxMdaQos, TmnxMlpppEpClass=TmnxMlpppEpClass, QTagOrZero=QTagOrZero, TCpmProtPolicyID=TCpmProtPolicyID, TItemDescription=TItemDescription, TIngressHsmdaCounterId=TIngressHsmdaCounterId, TmnxSubMgtOrgStrOrZero=TmnxSubMgtOrgStrOrZero, TmnxTunnelGroupId=TmnxTunnelGroupId, TBurstSizeBytes=TBurstSizeBytes, TmnxAdminState=TmnxAdminState, TSapEgressPolicyID=TSapEgressPolicyID, TmnxEnabledDisabled=TmnxEnabledDisabled, TSapEgrEncapGroupType=TSapEgrEncapGroupType, TmnxIgmpVersion=TmnxIgmpVersion, TmnxMobPresenceState=TmnxMobPresenceState, TDSCPNameOrEmpty=TDSCPNameOrEmpty, TmnxVdoFccServerMode=TmnxVdoFccServerMode, TmnxMobPgwSigProtocol=TmnxMobPgwSigProtocol, TmnxPortID=TmnxPortID, TmnxSubRadServAlgorithm=TmnxSubRadServAlgorithm, TmnxSubProfileString=TmnxSubProfileString, TmnxSubMgtOrgString=TmnxSubMgtOrgString, TDSCPValue=TDSCPValue, TIngressQueueId=TIngressQueueId, TmnxIgmpGroupType=TmnxIgmpGroupType, TSubHostId=TSubHostId, TAdaptationRuleOverride=TAdaptationRuleOverride, TmnxSpbFdbState=TmnxSpbFdbState, TIngressHsmdaPerPacketOffset=TIngressHsmdaPerPacketOffset, TWeight=TWeight, TmnxTunnelID=TmnxTunnelID, TProfileOrNone=TProfileOrNone, TExpSecondaryShaperClassRate=TExpSecondaryShaperClassRate, TFCType=TFCType, TMcFrQoSProfileId=TMcFrQoSProfileId, TmnxPppoeSessionType=TmnxPppoeSessionType, THsmdaPIRMRateOverride=THsmdaPIRMRateOverride, TmnxMobSdf=TmnxMobSdf, TmnxSubNasPortSuffixType=TmnxSubNasPortSuffixType, TmnxMobProfPolReportingLevel=TmnxMobProfPolReportingLevel, PYSNMP_MODULE_ID=timetraTCMIBModule, TmnxMobStaticPolPrecedence=TmnxMobStaticPolPrecedence, TPerPacketOffset=TPerPacketOffset, TmnxCustId=TmnxCustId, TmnxMulticastAddrFamily=TmnxMulticastAddrFamily, TmnxRsvpDSTEClassType=TmnxRsvpDSTEClassType, TmnxFilterProfileStringOrEmpty=TmnxFilterProfileStringOrEmpty, TTcpUdpPort=TTcpUdpPort, TmnxSubProfileStringOrEmpty=TmnxSubProfileStringOrEmpty, TmnxSlaProfileString=TmnxSlaProfileString, TmnxMobProfPolMeteringMethod=TmnxMobProfPolMeteringMethod, TmnxMobSdfRuleName=TmnxMobSdfRuleName, TmnxEgrPolicerStatModeOverride=TmnxEgrPolicerStatModeOverride, TmnxSubIdentString=TmnxSubIdentString, TmnxPwPathHopId=TmnxPwPathHopId, TQWeight=TQWeight, TmnxLdpFECType=TmnxLdpFECType, THPolPIRRateOverride=THPolPIRRateOverride, TLspExpValue=TLspExpValue, TmnxMldVersion=TmnxMldVersion, TmnxMobRatingGrpState=TmnxMobRatingGrpState, TmnxMobDiaPathMgmtState=TmnxMobDiaPathMgmtState, TmnxMobSdfFilterDirection=TmnxMobSdfFilterDirection, TmnxPwPathHopIdOrZero=TmnxPwPathHopIdOrZero, TDSCPFilterActionValue=TDSCPFilterActionValue, TmnxMobServerState=TmnxMobServerState, TPIRRatePercent=TPIRRatePercent, TmnxPppoeSessionInfoOrigin=TmnxPppoeSessionInfoOrigin, TIngPolicerIdOrNone=TIngPolicerIdOrNone, TPrecValue=TPrecValue, TLevelOrDefault=TLevelOrDefault, TSecondaryShaper10GPIRRate=TSecondaryShaper10GPIRRate, SvcISID=SvcISID, TPerPacketOffsetOvr=TPerPacketOffsetOvr, TPIRRate=TPIRRate, TmnxAsciiSpecification=TmnxAsciiSpecification, TmnxManagedRouteStatus=TmnxManagedRouteStatus, InterfaceIndex=InterfaceIndex, TFIRRate=TFIRRate, TIngHsmdaPerPacketOffsetOvr=TIngHsmdaPerPacketOffsetOvr, TmnxMobUeIdType=TmnxMobUeIdType, TQueueIdOrAll=TQueueIdOrAll, TmnxMobQueueLimit=TmnxMobQueueLimit, TmnxBgpLocalPreference=TmnxBgpLocalPreference, TEgressQueueId=TEgressQueueId, TRemarkType=TRemarkType, TIpProtocol=TIpProtocol, TCIRRate=TCIRRate, TFCName=TFCName, TLNamedItemOrEmpty=TLNamedItemOrEmpty, TmnxBgpAutonomousSystem=TmnxBgpAutonomousSystem, TmnxMobAuthType=TmnxMobAuthType, TmnxTlsGroupId=TmnxTlsGroupId, TmnxMldGroupFilterMode=TmnxMldGroupFilterMode, TOperator=TOperator, TmnxPppoeSessionId=TmnxPppoeSessionId, TmnxMobAddrScheme=TmnxMobAddrScheme, TmnxMobServRefPointType=TmnxMobServRefPointType, TIpOption=TIpOption, TPriority=TPriority, THsmdaPIRKRate=THsmdaPIRKRate, TmnxMobPathMgmtState=TmnxMobPathMgmtState, TIngressMeterId=TIngressMeterId, TmnxAiiType=TmnxAiiType, TMplsLspExpProfMapID=TMplsLspExpProfMapID, TmnxMobPdnGyChrgTriggerType=TmnxMobPdnGyChrgTriggerType, TmnxMobGwType=TmnxMobGwType, TmnxVdoAnalyzerAlarmStates=TmnxVdoAnalyzerAlarmStates, TmnxPppoeUserNameOrEmpty=TmnxPppoeUserNameOrEmpty, TBurstPercentOrDefault=TBurstPercentOrDefault, THSMDABurstSizeBytesOverride=THSMDABurstSizeBytesOverride, TBurstPercent=TBurstPercent, TmnxMobDiaRetryCount=TmnxMobDiaRetryCount, TNonZeroWeight=TNonZeroWeight, TmnxMobDfPeerId=TmnxMobDfPeerId, TmnxStatus=TmnxStatus, TmnxMobApnOrZero=TmnxMobApnOrZero, TSdpEgressPolicyID=TSdpEgressPolicyID, TmnxMobRfAcctLevel=TmnxMobRfAcctLevel, TmnxMobDiaTransTimer=TmnxMobDiaTransTimer, TmnxMobChargingBearerType=TmnxMobChargingBearerType, timetraTCMIBModule=timetraTCMIBModule, THsmdaPIRKRateOverride=THsmdaPIRKRateOverride, TSapEgrEncapGroupActionType=TSapEgrEncapGroupActionType, TmnxSubNasPortPrefixType=TmnxSubNasPortPrefixType, TPlcrBurstSizeBytes=TPlcrBurstSizeBytes, TQosQGrpInstanceIDorZero=TQosQGrpInstanceIDorZero, TmnxPwGlobalIdOrZero=TmnxPwGlobalIdOrZero, TmnxThresholdGroupType=TmnxThresholdGroupType, TmnxMobProfNameOrEmpty=TmnxMobProfNameOrEmpty, TmnxVdoGrpIdOrInherit=TmnxVdoGrpIdOrInherit, TmnxMobApn=TmnxMobApn, TmnxMobDiaPeerHost=TmnxMobDiaPeerHost, TmnxMobPdnRefPointType=TmnxMobPdnRefPointType, TNetworkPolicyID=TNetworkPolicyID, TItemMatch=TItemMatch, TItemLongDescription=TItemLongDescription, QTagFullRangeOrNone=QTagFullRangeOrNone, TMlpppQoSProfileId=TMlpppQoSProfileId, TSdpIngressPolicyID=TSdpIngressPolicyID, TIngressHsmdaCounterIdOrZero=TIngressHsmdaCounterIdOrZero, TmnxVdoStatInt=TmnxVdoStatInt, THPolPIRRate=THPolPIRRate, TmnxMobArp=TmnxMobArp, TmnxActionType=TmnxActionType, TFrameType=TFrameType, TAdaptationRule=TAdaptationRule, SdpBindId=SdpBindId, TmnxMobNode=TmnxMobNode, TTcpUdpPortOperator=TTcpUdpPortOperator, TmnxMobMccOrEmpty=TmnxMobMccOrEmpty, TmnxSrrpPriorityStep=TmnxSrrpPriorityStep, TCIRPercentOverride=TCIRPercentOverride, TmnxMobImsi=TmnxMobImsi, THsmdaSchedulerPolicyGroupId=THsmdaSchedulerPolicyGroupId, TmnxMobArpValue=TmnxMobArpValue, TClassBurstLimit=TClassBurstLimit, TmnxAccPlcyQICounters=TmnxAccPlcyQICounters, TmnxMobSdfFilter=TmnxMobSdfFilter, TmnxMobImei=TmnxMobImei, TSysResource=TSysResource, TmnxBgpPreference=TmnxBgpPreference, TmnxMobQciValue=TmnxMobQciValue, TPlcyMode=TPlcyMode, THSMDAQueueBurstLimit=THSMDAQueueBurstLimit, TmnxVcId=TmnxVcId, TmnxMobStaticPolPrecedenceOrZero=TmnxMobStaticPolPrecedenceOrZero, TEgressHsmdaPerPacketOffset=TEgressHsmdaPerPacketOffset, TPortSchedulerPIR=TPortSchedulerPIR, THPolCIRRateOverride=THPolCIRRateOverride, TQueueMode=TQueueMode, TmnxMobUeState=TmnxMobUeState, TmnxOperGrpHoldUpTime=TmnxOperGrpHoldUpTime, TQueueId=TQueueId, TmnxMobSdfFilterNum=TmnxMobSdfFilterNum, TmnxMobPeerType=TmnxMobPeerType, TmnxServId=TmnxServId, TLevel=TLevel, TmnxMobArpValueOrZero=TmnxMobArpValueOrZero, TmnxEncapVal=TmnxEncapVal, TmnxVcIdOrNone=TmnxVcIdOrNone, TmnxQosBytesHex=TmnxQosBytesHex, TNamedItem=TNamedItem, TmnxBsxAarpIdOrZero=TmnxBsxAarpIdOrZero, TTmplPolicyID=TTmplPolicyID, TmnxAccPlcyAACounters=TmnxAccPlcyAACounters, TmnxMobUeRat=TmnxMobUeRat, THsmdaWeightClass=THsmdaWeightClass, TmnxVdoIfName=TmnxVdoIfName, TmnxMobRtrAdvtLifeTime=TmnxMobRtrAdvtLifeTime, TmnxSpbFidOrZero=TmnxSpbFidOrZero, TmnxVcType=TmnxVcType, TmnxEnabledDisabledOrInherit=TmnxEnabledDisabledOrInherit, TExpSecondaryShaperPIRRate=TExpSecondaryShaperPIRRate, TmnxAccessLoopEncaps2=TmnxAccessLoopEncaps2, TmnxTunnelGroupIdOrZero=TmnxTunnelGroupIdOrZero, THsmdaPolicyIncludeQueues=THsmdaPolicyIncludeQueues)
mibBuilder.exportSymbols("TIMETRA-TC-MIB", TPIRRateOrZero=TPIRRateOrZero, TmnxMacSpecification=TmnxMacSpecification, TQGroupType=TQGroupType, TmnxAccPlcyOICounters=TmnxAccPlcyOICounters, TFCSet=TFCSet, TMacFilterType=TMacFilterType, TDEValue=TDEValue, TmnxMobMncOrEmpty=TmnxMobMncOrEmpty, TmnxBsxTransitIpPolicyId=TmnxBsxTransitIpPolicyId, TPolicyID=TPolicyID, TmnxSubAleOffsetMode=TmnxSubAleOffsetMode, TEgressHsmdaQueueId=TEgressHsmdaQueueId, TEgrHsmdaPerPacketOffsetOvr=TEgrHsmdaPerPacketOffsetOvr, TmnxRadiusServerOperState=TmnxRadiusServerOperState, TmnxMobProfGbrRate=TmnxMobProfGbrRate, TmnxIkePolicyAuthMethod=TmnxIkePolicyAuthMethod, TBWRateType=TBWRateType, THsmdaPIRMRate=THsmdaPIRMRate, TmnxVRtrMplsLspID=TmnxVRtrMplsLspID, TmnxAncpStringOrZero=TmnxAncpStringOrZero, TBurstSizeOverride=TBurstSizeOverride, THsmdaWrrWeightOverride=THsmdaWrrWeightOverride, TmnxVRtrID=TmnxVRtrID, TmnxMobNai=TmnxMobNai, TmnxMsPwPeSignaling=TmnxMsPwPeSignaling, TmnxSubRadiusVendorId=TmnxSubRadiusVendorId, TmnxMobMcc=TmnxMobMcc, TPortSchedulerCIR=TPortSchedulerCIR, TAdvCfgRate=TAdvCfgRate, THsmdaCIRKRate=THsmdaCIRKRate, THsmdaCIRMRateOverride=THsmdaCIRMRateOverride, TSapIngressPolicyID=TSapIngressPolicyID, TIngressHsmdaQueueId=TIngressHsmdaQueueId, TProfileUseDEOrNone=TProfileUseDEOrNone, TIngPolicerId=TIngPolicerId, TNetworkIngressMeterId=TNetworkIngressMeterId, TmnxBsxAarpServiceRefType=TmnxBsxAarpServiceRefType, TmnxMobUeSubType=TmnxMobUeSubType, TBurstSizeBytesOverride=TBurstSizeBytesOverride, TmnxMobGwId=TmnxMobGwId, TmnxTunnelType=TmnxTunnelType, TBurstSize=TBurstSize, TPlcyQuanta=TPlcyQuanta, THsmdaCIRKRateOverride=THsmdaCIRKRateOverride, TmnxMobLiTargetType=TmnxMobLiTargetType, BgpPeeringStatus=BgpPeeringStatus, THsmdaPolicyScheduleClass=THsmdaPolicyScheduleClass, Dot1PPriority=Dot1PPriority, TmnxMobProfPolChargingMethod=TmnxMobProfPolChargingMethod, TmnxBsxTransitIpPolicyIdOrZero=TmnxBsxTransitIpPolicyIdOrZero, ServiceOperStatus=ServiceOperStatus, Dot1PPriorityMask=Dot1PPriorityMask, TmnxMobChargingLevel=TmnxMobChargingLevel, TmnxSubAleOffset=TmnxSubAleOffset, THsmdaWeightOverride=THsmdaWeightOverride, THSMDABurstSizeBytes=THSMDABurstSizeBytes, TEntryIndicator=TEntryIndicator, TmnxDefInterDestIdSource=TmnxDefInterDestIdSource, TmnxBsxTransPrefPolicyId=TmnxBsxTransPrefPolicyId, TmnxVdoOutputFormat=TmnxVdoOutputFormat, TDirection=TDirection, TEgressHsmdaCounterIdOrZero=TEgressHsmdaCounterIdOrZero, TmnxRadiusPendingReqLimit=TmnxRadiusPendingReqLimit, TAtmTdpDescrType=TAtmTdpDescrType, THsmdaCounterIdOrZero=THsmdaCounterIdOrZero, TmnxPppNcpProtocol=TmnxPppNcpProtocol, TmnxVdoPortNumber=TmnxVdoPortNumber, THsmdaWrrWeight=THsmdaWrrWeight, TmnxSpokeSdpId=TmnxSpokeSdpId, TBurstPercentOrDefaultOverride=TBurstPercentOrDefaultOverride, TmnxMobBearerType=TmnxMobBearerType, THsmdaWeight=THsmdaWeight, TmnxIgmpGroupFilterMode=TmnxIgmpGroupFilterMode, TmnxBGPFamilyType=TmnxBGPFamilyType, TQosOverrideType=TQosOverrideType, TPolicyStatementNameOrEmpty=TPolicyStatementNameOrEmpty, TEgrPolicerIdOrNone=TEgrPolicerIdOrNone, TmnxMldGroupType=TmnxMldGroupType, TPortSchedulerPIRRate=TPortSchedulerPIRRate, TmnxEgrPolicerStatMode=TmnxEgrPolicerStatMode, TmnxMplsTpNodeID=TmnxMplsTpNodeID, TmnxSlaProfileStringOrEmpty=TmnxSlaProfileStringOrEmpty, THsmdaCounterIdOrZeroOrAll=THsmdaCounterIdOrZeroOrAll, TmnxMobImsiStr=TmnxMobImsiStr, THsmdaCIRMRate=THsmdaCIRMRate, TmnxDefSubIdSource=TmnxDefSubIdSource, TDEProfile=TDEProfile, TEntryId=TEntryId, TmnxMobBearerId=TmnxMobBearerId, TmnxVdoAnalyzerAlarm=TmnxVdoAnalyzerAlarm, TmnxSubIdentStringOrEmpty=TmnxSubIdentStringOrEmpty, TmnxPppoeUserName=TmnxPppoeUserName, TProfile=TProfile, TmnxMobChargingProfile=TmnxMobChargingProfile, TmnxAccPlcyQECounters=TmnxAccPlcyQECounters, TmnxCdrType=TmnxCdrType, TmnxSvcOperGrpCreationOrigin=TmnxSvcOperGrpCreationOrigin, TmnxSpbFdbLocale=TmnxSpbFdbLocale, TRateType=TRateType, TPriorityOrDefault=TPriorityOrDefault, TmnxAccPlcyOECounters=TmnxAccPlcyOECounters, THPolCIRRate=THPolCIRRate, TmnxMobProfIpTtl=TmnxMobProfIpTtl, THPolVirtualSchePIRRate=THPolVirtualSchePIRRate, TmnxDHCP6MsgType=TmnxDHCP6MsgType, TmnxIPsecTunnelTemplateIdOrZero=TmnxIPsecTunnelTemplateIdOrZero, TmnxMobRtrAdvtInterval=TmnxMobRtrAdvtInterval, TmnxMobSdfFilterProtocol=TmnxMobSdfFilterProtocol, TDEProfileOrDei=TDEProfileOrDei, TmnxMobAccessType=TmnxMobAccessType, QTag=QTag, TmnxAccessLoopEncaps1=TmnxAccessLoopEncaps1, TmnxMplsTpTunnelType=TmnxMplsTpTunnelType, TmnxSpokeSdpIdOrZero=TmnxSpokeSdpIdOrZero, TSapEgrEncapGrpQosPolicyIdOrZero=TSapEgrEncapGrpQosPolicyIdOrZero, TmnxMobUeId=TmnxMobUeId, TmnxMobMsisdn=TmnxMobMsisdn, TmnxBfdSessOperState=TmnxBfdSessOperState, TBurstLimit=TBurstLimit, TmnxVpnIpBackupFamily=TmnxVpnIpBackupFamily, ServiceAccessPoint=ServiceAccessPoint, TmnxDhcpOptionType=TmnxDhcpOptionType, TEgrPolicerId=TEgrPolicerId, TmnxOperGrpHoldDownTime=TmnxOperGrpHoldDownTime, TmnxMobPdnSessionEvent=TmnxMobPdnSessionEvent, TmnxMobQci=TmnxMobQci, TmnxPwGlobalId=TmnxPwGlobalId, TMeterMode=TMeterMode, TmnxMobUeStrPrefix=TmnxMobUeStrPrefix, TmnxMobLiTarget=TmnxMobLiTarget, TmnxBinarySpecification=TmnxBinarySpecification, ServiceAdminStatus=ServiceAdminStatus, TPrecValueOrNone=TPrecValueOrNone, TmnxBsxAarpId=TmnxBsxAarpId, TmnxMobChargingProfileOrInherit=TmnxMobChargingProfileOrInherit, TPlcrBurstSizeBytesOverride=TPlcrBurstSizeBytesOverride, TmnxIkePolicyOwnAuthMethod=TmnxIkePolicyOwnAuthMethod, TmnxAppProfileString=TmnxAppProfileString, TmnxStrSapId=TmnxStrSapId, TmnxTimeInSec=TmnxTimeInSec, TmnxMobDiaDetailPathMgmtState=TmnxMobDiaDetailPathMgmtState, TmnxSubMgtIntDestId=TmnxSubMgtIntDestId, IpAddressPrefixLength=IpAddressPrefixLength, TmnxMobIpCanType=TmnxMobIpCanType, TProfileOrDei=TProfileOrDei, TPriorityOrUndefined=TPriorityOrUndefined, TmnxBsxTransPrefPolicyIdOrZero=TmnxBsxTransPrefPolicyIdOrZero, TmnxIngPolicerStatMode=TmnxIngPolicerStatMode)
| (integer, octet_string, object_identifier) = mibBuilder.importSymbols('ASN1', 'Integer', 'OctetString', 'ObjectIdentifier')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(constraints_intersection, single_value_constraint, constraints_union, value_range_constraint, value_size_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'SingleValueConstraint', 'ConstraintsUnion', 'ValueRangeConstraint', 'ValueSizeConstraint')
(notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance')
(object_identity, ip_address, gauge32, iso, module_identity, counter32, mib_identifier, mib_scalar, mib_table, mib_table_row, mib_table_column, notification_type, bits, integer32, unsigned32, time_ticks, counter64) = mibBuilder.importSymbols('SNMPv2-SMI', 'ObjectIdentity', 'IpAddress', 'Gauge32', 'iso', 'ModuleIdentity', 'Counter32', 'MibIdentifier', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'NotificationType', 'Bits', 'Integer32', 'Unsigned32', 'TimeTicks', 'Counter64')
(textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString')
(timetra_modules,) = mibBuilder.importSymbols('TIMETRA-GLOBAL-MIB', 'timetraModules')
timetra_tcmib_module = module_identity((1, 3, 6, 1, 4, 1, 6527, 1, 1, 2))
timetraTCMIBModule.setRevisions(('1911-02-01 00:00', '1909-02-28 00:00', '1908-07-01 00:00', '1908-01-01 00:00', '1907-01-01 00:00', '1906-03-23 00:00', '1905-08-31 00:00', '1905-01-24 00:00', '1904-01-15 00:00', '1903-08-15 00:00', '1903-01-20 00:00', '1901-05-29 00:00'))
if mibBuilder.loadTexts:
timetraTCMIBModule.setLastUpdated('201102010000Z')
if mibBuilder.loadTexts:
timetraTCMIBModule.setOrganization('Alcatel-Lucent')
class Interfaceindex(TextualConvention, Integer32):
status = 'current'
display_hint = 'd'
class Tmnxportid(TextualConvention, Unsigned32):
status = 'current'
class Tmnxencapval(TextualConvention, Unsigned32):
status = 'current'
class Qtag(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(1, 4094)
class Qtagorzero(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(0, 4094)
class Qtagfullrange(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(0, 4095)
class Qtagfullrangeornone(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-1, -1), value_range_constraint(0, 4095))
class Tmnxstrsapid(DisplayString):
status = 'current'
subtype_spec = DisplayString.subtypeSpec + value_size_constraint(0, 32)
class Ipaddressprefixlength(TextualConvention, Integer32):
reference = ''
status = 'current'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(0, 32)
class Tmnxactiontype(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2))
named_values = named_values(('doAction', 1), ('notApplicable', 2))
class Tmnxadminstate(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3))
named_values = named_values(('noop', 1), ('inService', 2), ('outOfService', 3))
class Tmnxoperstate(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4))
named_values = named_values(('unknown', 1), ('inService', 2), ('outOfService', 3), ('transition', 4))
class Tmnxstatus(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2))
named_values = named_values(('create', 1), ('delete', 2))
class Tmnxenableddisabled(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2))
named_values = named_values(('enabled', 1), ('disabled', 2))
class Tmnxenableddisabledorinherit(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3))
named_values = named_values(('enabled', 1), ('disabled', 2), ('inherit', 3))
class Tnameditem(DisplayString):
status = 'current'
subtype_spec = DisplayString.subtypeSpec + value_size_constraint(1, 32)
class Tnameditemorempty(DisplayString):
status = 'current'
subtype_spec = DisplayString.subtypeSpec + constraints_union(value_size_constraint(0, 0), value_size_constraint(1, 32))
class Tlnameditem(DisplayString):
status = 'current'
subtype_spec = DisplayString.subtypeSpec + value_size_constraint(1, 64)
class Tlnameditemorempty(DisplayString):
status = 'current'
subtype_spec = DisplayString.subtypeSpec + constraints_union(value_size_constraint(0, 0), value_size_constraint(1, 64))
class Titemdescription(DisplayString):
status = 'current'
subtype_spec = DisplayString.subtypeSpec + value_size_constraint(0, 80)
class Titemlongdescription(DisplayString):
status = 'current'
subtype_spec = DisplayString.subtypeSpec + value_size_constraint(0, 160)
class Tmnxvrtrid(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(1, 10240)
class Tmnxvrtridorzero(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(0, 10240)
class Tmnxbgpautonomoussystem(TextualConvention, Integer32):
reference = 'BGP4-MIB.bgpPeerRemoteAs'
status = 'current'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(0, 65535)
class Tmnxbgplocalpreference(TextualConvention, Unsigned32):
reference = 'RFC 1771 section 4.3 Path Attributes e)'
status = 'current'
class Tmnxbgppreference(TextualConvention, Unsigned32):
reference = 'RFC 1771 section 4.3 Path Attributes e)'
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(0, 255)
class Tmnxcustid(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + constraints_union(value_range_constraint(0, 0), value_range_constraint(1, 2147483647))
class Bgppeeringstatus(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12))
named_values = named_values(('notApplicable', 0), ('installed', 1), ('notInstalled', 2), ('noEnhancedSubmgt', 3), ('wrongAntiSpoof', 4), ('parentItfDown', 5), ('hostInactive', 6), ('noDualHomingSupport', 7), ('invalidRadiusAttr', 8), ('noDynamicPeerGroup', 9), ('duplicatePeer', 10), ('maxPeersReached', 11), ('genError', 12))
class Tmnxservid(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + constraints_union(value_range_constraint(0, 0), value_range_constraint(1, 2147483647), value_range_constraint(2147483648, 2147483648), value_range_constraint(2147483649, 2147483649), value_range_constraint(2147483650, 2147483650))
class Serviceadminstatus(TextualConvention, Integer32):
reference = ''
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2))
named_values = named_values(('up', 1), ('down', 2))
class Serviceoperstatus(TextualConvention, Integer32):
reference = ''
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2))
named_values = named_values(('up', 1), ('down', 2))
class Tpolicyid(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + constraints_union(value_range_constraint(0, 65535), value_range_constraint(65536, 65536), value_range_constraint(65537, 65537))
class Ttmplpolicyid(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(1, 65535)
class Tsapingresspolicyid(TPolicyID):
status = 'current'
class Tsapegresspolicyid(TPolicyID):
status = 'current'
subtype_spec = TPolicyID.subtypeSpec + constraints_union(value_range_constraint(1, 65535), value_range_constraint(65536, 65536), value_range_constraint(65537, 65537))
class Tsdpingresspolicyid(TPolicyID):
status = 'current'
class Tsdpegresspolicyid(TPolicyID):
status = 'current'
class Tqosqgrpinstanceidorzero(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + constraints_union(value_range_constraint(0, 0), value_range_constraint(1, 65535))
class Tmnxbsxtransitippolicyid(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(1, 65535)
class Tmnxbsxtransitippolicyidorzero(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + constraints_union(value_range_constraint(0, 0), value_range_constraint(1, 65535))
class Tmnxbsxtransprefpolicyid(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(1, 65535)
class Tmnxbsxtransprefpolicyidorzero(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + constraints_union(value_range_constraint(0, 0), value_range_constraint(1, 65535))
class Tmnxbsxaarpid(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(1, 65535)
class Tmnxbsxaarpidorzero(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + constraints_union(value_range_constraint(0, 0), value_range_constraint(1, 65535))
class Tmnxbsxaarpservicereftype(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3))
named_values = named_values(('none', 0), ('dualHomed', 1), ('shuntSubscriberSide', 2), ('shuntNetworkSide', 3))
class Tsapegrencapgrpqospolicyidorzero(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + constraints_union(value_range_constraint(0, 0), value_range_constraint(1, 65535))
class Tsapegrencapgrouptype(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1))
named_values = named_values(('isid', 1))
class Tsapegrencapgroupactiontype(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2))
named_values = named_values(('create', 1), ('destroy', 2))
class Tperpacketoffset(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(-32, 31)
class Tperpacketoffsetovr(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-128, -128), value_range_constraint(-32, 31))
class Tingresshsmdaperpacketoffset(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(-32, 31)
class Tegressqperpacketoffset(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(-64, 32)
class Tinghsmdaperpacketoffsetovr(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-128, -128), value_range_constraint(-32, 31))
class Tegresshsmdaperpacketoffset(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(-32, 31)
class Thsmdacounteridorzero(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + constraints_union(value_range_constraint(0, 0), value_range_constraint(1, 8))
class Thsmdacounteridorzeroorall(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-1, -1), value_range_constraint(0, 0), value_range_constraint(1, 8))
class Tegrhsmdaperpacketoffsetovr(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-128, -128), value_range_constraint(-32, 31))
class Tingresshsmdacounterid(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(1, 8)
class Tingresshsmdacounteridorzero(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + constraints_union(value_range_constraint(0, 0), value_range_constraint(1, 8))
class Tegresshsmdacounterid(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(1, 8)
class Tegresshsmdacounteridorzero(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + constraints_union(value_range_constraint(0, 0), value_range_constraint(1, 8))
class Tegrratemodtype(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3))
named_values = named_values(('none', 1), ('aggRateLimit', 2), ('namedScheduler', 3))
class Tpolicystatementnameorempty(TNamedItemOrEmpty):
status = 'current'
class Tmnxvctype(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5, 9, 10, 11, 17, 18, 19, 20, 21, 23, 25, 4096))
named_values = named_values(('frDlciMartini', 1), ('atmSdu', 2), ('atmCell', 3), ('ethernetVlan', 4), ('ethernet', 5), ('atmVccCell', 9), ('atmVpcCell', 10), ('ipipe', 11), ('satopE1', 17), ('satopT1', 18), ('satopE3', 19), ('satopT3', 20), ('cesopsn', 21), ('cesopsnCas', 23), ('frDlci', 25), ('mirrorDest', 4096))
class Tmnxvcid(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(1, 4294967295)
class Tmnxvcidornone(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + constraints_union(value_range_constraint(0, 0), value_range_constraint(1, 4294967295))
class Dot1Ppriority(TextualConvention, Integer32):
reference = ''
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-1, -1), value_range_constraint(0, 7))
class Dot1Pprioritymask(TextualConvention, Integer32):
reference = ''
status = 'current'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(0, 7)
class Serviceaccesspoint(TextualConvention, Integer32):
reference = 'assigned numbers: http://www.iana.org/assignments/ieee-802-numbers'
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-1, -1), value_range_constraint(0, 255))
class Tlspexpvalue(TextualConvention, Integer32):
reference = ''
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-1, -1), value_range_constraint(0, 7))
class Tipprotocol(TextualConvention, Integer32):
reference = 'http://www.iana.org/assignments/protocol-numbers'
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-2, -2), value_range_constraint(-1, -1), value_range_constraint(0, 255))
class Tipoption(TextualConvention, Integer32):
reference = 'http://www.iana.org/assignments/ip-parameters'
status = 'current'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(0, 255)
class Ttcpudpport(TextualConvention, Integer32):
reference = 'http://www.iana.org/assignments/port-numbers'
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(0, 0), value_range_constraint(1, 65535))
class Toperator(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3, 4))
named_values = named_values(('none', 0), ('eq', 1), ('range', 2), ('lt', 3), ('gt', 4))
class Ttcpudpportoperator(TOperator):
status = 'current'
class Tframetype(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3, 5))
named_values = named_values(('e802dot3', 0), ('e802dot2LLC', 1), ('e802dot2SNAP', 2), ('ethernetII', 3), ('atm', 5))
class Tqueueid(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(0, 0), value_range_constraint(1, 32))
class Tqueueidorall(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-1, -1), value_range_constraint(0, 0), value_range_constraint(1, 32))
class Tingressqueueid(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(0, 0), value_range_constraint(1, 32))
class Tingressmeterid(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(0, 0), value_range_constraint(1, 32))
class Tsapingressmeterid(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(0, 0), value_range_constraint(1, 32))
class Tnetworkingressmeterid(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(0, 0), value_range_constraint(1, 16))
class Tegressqueueid(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(0, 0), value_range_constraint(1, 8))
class Tingresshsmdaqueueid(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(0, 0), value_range_constraint(1, 8))
class Tegresshsmdaqueueid(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(0, 0), value_range_constraint(1, 8))
class Thsmdaschedulerpolicygroupid(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(0, 0), value_range_constraint(1, 2))
class Thsmdapolicyincludequeues(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2))
named_values = named_values(('q1to2', 1), ('q1to3', 2))
class Thsmdapolicyscheduleclass(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(1, 3)
class Tdscpname(TNamedItem):
status = 'current'
class Tdscpnameorempty(TNamedItemOrEmpty):
status = 'current'
class Tdscpvalue(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(0, 63)
class Tdscpvalueornone(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-1, -1), value_range_constraint(0, 63))
class Tdscpfilteractionvalue(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-1, -1), value_range_constraint(0, 255))
class Tfcname(TNamedItem):
status = 'current'
class Tfcnameorempty(TNamedItemOrEmpty):
status = 'current'
class Tfcset(TextualConvention, Bits):
status = 'current'
named_values = named_values(('be', 0), ('l2', 1), ('af', 2), ('l1', 3), ('h2', 4), ('ef', 5), ('h1', 6), ('nc', 7))
class Tfctype(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7))
named_values = named_values(('be', 0), ('l2', 1), ('af', 2), ('l1', 3), ('h2', 4), ('ef', 5), ('h1', 6), ('nc', 7))
class Tmnxtunneltype(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7))
named_values = named_values(('sdp', 1), ('ldp', 2), ('rsvp', 3), ('gre', 4), ('bypass', 5), ('invalid', 6), ('bgp', 7))
class Tmnxtunnelid(TextualConvention, Unsigned32):
status = 'current'
class Tmnxbgproutetarget(TextualConvention, OctetString):
status = 'current'
subtype_spec = OctetString.subtypeSpec + value_size_constraint(1, 32)
class Tmnxvpnroutedistinguisher(TextualConvention, OctetString):
status = 'current'
subtype_spec = OctetString.subtypeSpec + value_size_constraint(8, 8)
fixed_length = 8
class Sdpbindid(TextualConvention, OctetString):
status = 'current'
subtype_spec = OctetString.subtypeSpec + value_size_constraint(8, 8)
fixed_length = 8
class Tmnxvrtrmplslspid(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(0, 65535)
class Tportschedulerpir(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-1, -1), value_range_constraint(1, 100000000))
class Tportschedulerpirrate(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-1, -1), value_range_constraint(1, 400000000))
class Tportschedulercir(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-1, -1), value_range_constraint(0, 400000000))
class Tweight(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(0, 100)
class Tnonzeroweight(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(1, 100)
class Tpolicerweight(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(1, 100)
class Thsmdaweight(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(1, 100)
class Thsmdawrrweight(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(1, 32)
class Thsmdaweightclass(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 4, 8))
named_values = named_values(('class1', 1), ('class2', 2), ('class4', 4), ('class8', 8))
class Thsmdaweightoverride(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-2, -2), value_range_constraint(1, 100))
class Thsmdawrrweightoverride(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-2, -2), value_range_constraint(1, 32))
class Tcirrate(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-1, -1), value_range_constraint(0, 100000000))
class Thpolcirrate(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-1, -1), value_range_constraint(0, 20000000))
class Tratetype(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2))
named_values = named_values(('kbps', 1), ('percent', 2))
class Tbwratetype(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3))
named_values = named_values(('kbps', 1), ('percentPortLimit', 2), ('percentLocalLimit', 3))
class Tpolicerratetype(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2))
named_values = named_values(('kbps', 1), ('percentLocalLimit', 2))
class Tcirrateoverride(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-2, -2), value_range_constraint(-1, -1), value_range_constraint(0, 100000000))
class Thpolcirrateoverride(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-2, -2), value_range_constraint(-1, -1), value_range_constraint(0, 20000000))
class Tcirpercentoverride(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-2, -2), value_range_constraint(0, 10000))
class Thsmdacirkrate(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-1, -1), value_range_constraint(0, 100000000))
class Thsmdacirkrateoverride(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-2, -2), value_range_constraint(-1, -1), value_range_constraint(0, 100000000))
class Thsmdacirmrate(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-1, -1), value_range_constraint(0, 100000))
class Thsmdacirmrateoverride(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-2, -2), value_range_constraint(-1, -1), value_range_constraint(0, 100000))
class Tpirrate(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-1, -1), value_range_constraint(1, 100000000))
class Thpolvirtualschepirrate(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-1, -1), value_range_constraint(1, 800000000))
class Thpolvirtualschecirrate(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-1, -1), value_range_constraint(0, 800000000))
class Tadvcfgrate(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(0, 100000000)
class Tmaxdecrate(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(0, 0), value_range_constraint(1, 100000000))
class Thpolpirrate(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-1, -1), value_range_constraint(1, 20000000))
class Tsecondaryshaper10Gpirrate(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-1, -1), value_range_constraint(1, 10000))
class Texpsecondaryshaperpirrate(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-1, -1), value_range_constraint(1, 10000000))
class Texpsecondaryshaperclassrate(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-1, -1), value_range_constraint(1, 10000000))
class Tpirrateoverride(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-2, -2), value_range_constraint(-1, -1), value_range_constraint(1, 100000000))
class Thpolpirrateoverride(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-2, -2), value_range_constraint(-1, -1), value_range_constraint(1, 20000000))
class Tpirpercentoverride(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-2, -2), value_range_constraint(1, 10000))
class Tpirrateorzero(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-1, -1), value_range_constraint(0, 100000000))
class Thsmdapirkrate(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-1, -1), value_range_constraint(1, 100000000))
class Thsmdapirkrateoverride(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-2, -2), value_range_constraint(-1, -1), value_range_constraint(1, 100000000))
class Thsmdapirmrate(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-1, -1), value_range_constraint(1, 100000))
class Thsmdapirmrateoverride(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-2, -2), value_range_constraint(-1, -1), value_range_constraint(1, 100000))
class Tmnxdhcp6Msgtype(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14))
named_values = named_values(('dhcp6MsgTypeSolicit', 1), ('dhcp6MsgTypeAdvertise', 2), ('dhcp6MsgTypeRequest', 3), ('dhcp6MsgTypeConfirm', 4), ('dhcp6MsgTypeRenew', 5), ('dhcp6MsgTypeRebind', 6), ('dhcp6MsgTypeReply', 7), ('dhcp6MsgTypeRelease', 8), ('dhcp6MsgTypeDecline', 9), ('dhcp6MsgTypeReconfigure', 10), ('dhcp6MsgTypeInfoRequest', 11), ('dhcp6MsgTypeRelayForw', 12), ('dhcp6MsgTypeRelayReply', 13), ('dhcp6MsgTypeMaxValue', 14))
class Tmnxospfinstance(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(0, 31)
class Tmnxbgpfamilytype(TextualConvention, Bits):
status = 'current'
named_values = named_values(('ipv4Unicast', 0), ('ipv4Multicast', 1), ('ipv4UastMcast', 2), ('ipv4MplsLabel', 3), ('ipv4Vpn', 4), ('ipv6Unicast', 5), ('ipv6Multicast', 6), ('ipv6UcastMcast', 7), ('ipv6MplsLabel', 8), ('ipv6Vpn', 9), ('l2Vpn', 10), ('ipv4Mvpn', 11), ('msPw', 12), ('ipv4Flow', 13), ('mdtSafi', 14), ('routeTarget', 15), ('mcastVpnIpv4', 16))
class Tmnxigmpgroupfiltermode(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2))
named_values = named_values(('include', 1), ('exclude', 2))
class Tmnxigmpgrouptype(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2))
named_values = named_values(('static', 1), ('dynamic', 2))
class Tmnxigmpversion(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3))
named_values = named_values(('version1', 1), ('version2', 2), ('version3', 3))
class Tmnxmldgroupfiltermode(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2))
named_values = named_values(('include', 1), ('exclude', 2))
class Tmnxmldgrouptype(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2))
named_values = named_values(('static', 1), ('dynamic', 2))
class Tmnxmldversion(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2))
named_values = named_values(('version1', 1), ('version2', 2))
class Tmnxmanagedroutestatus(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10))
named_values = named_values(('installed', 0), ('notYetInstalled', 1), ('wrongAntiSpoofType', 2), ('outOfMemory', 3), ('shadowed', 4), ('routeTableFull', 5), ('parentInterfaceDown', 6), ('hostInactive', 7), ('enhancedSubMgmtRequired', 8), ('deprecated1', 9), ('l2AwNotSupported', 10))
class Tmnxancpstring(DisplayString):
status = 'current'
subtype_spec = DisplayString.subtypeSpec + value_size_constraint(1, 63)
class Tmnxancpstringorzero(DisplayString):
status = 'current'
subtype_spec = DisplayString.subtypeSpec + value_size_constraint(0, 63)
class Tmnxmulticastaddrfamily(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1))
named_values = named_values(('ipv4Multicast', 0), ('ipv6Multicast', 1))
class Tmnxasciispecification(DisplayString):
status = 'current'
subtype_spec = DisplayString.subtypeSpec + value_size_constraint(0, 255)
class Tmnxmacspecification(DisplayString):
status = 'current'
subtype_spec = DisplayString.subtypeSpec + value_size_constraint(0, 17)
class Tmnxbinaryspecification(DisplayString):
status = 'current'
subtype_spec = DisplayString.subtypeSpec + value_size_constraint(0, 255)
class Tmnxdefsubidsource(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3))
named_values = named_values(('useSapId', 1), ('useString', 2), ('useAutoId', 3))
class Tmnxsubidentstring(DisplayString):
status = 'current'
subtype_spec = DisplayString.subtypeSpec + value_size_constraint(1, 32)
class Tmnxsubidentstringorempty(DisplayString):
status = 'current'
subtype_spec = DisplayString.subtypeSpec + value_size_constraint(0, 32)
class Tmnxsubradservalgorithm(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3))
named_values = named_values(('direct', 1), ('roundRobin', 2), ('hashBased', 3))
class Tmnxsubradiusattrtype(TextualConvention, Unsigned32):
reference = 'RFC 2865 Remote Authentication Dial In User Service (RADIUS) section 5. Attributes'
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(0, 255)
class Tmnxsubradiusvendorid(TextualConvention, Unsigned32):
reference = 'RFC 2865 Remote Authentication Dial In User Service (RADIUS) section 5.26. Vendor-Specific.'
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(0, 16777215)
class Tmnxradiuspendingreqlimit(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(1, 4096)
class Tmnxradiusserveroperstate(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5))
named_values = named_values(('unknown', 1), ('inService', 2), ('outOfService', 3), ('transition', 4), ('overloaded', 5))
class Tmnxsubprofilestring(DisplayString):
status = 'current'
subtype_spec = DisplayString.subtypeSpec + value_size_constraint(1, 16)
class Tmnxsubprofilestringorempty(DisplayString):
status = 'current'
subtype_spec = DisplayString.subtypeSpec + value_size_constraint(0, 16)
class Tmnxslaprofilestring(DisplayString):
status = 'current'
subtype_spec = DisplayString.subtypeSpec + value_size_constraint(1, 16)
class Tmnxslaprofilestringorempty(DisplayString):
status = 'current'
subtype_spec = DisplayString.subtypeSpec + value_size_constraint(0, 16)
class Tmnxappprofilestring(DisplayString):
status = 'current'
subtype_spec = DisplayString.subtypeSpec + value_size_constraint(1, 16)
class Tmnxappprofilestringorempty(DisplayString):
status = 'current'
subtype_spec = DisplayString.subtypeSpec + value_size_constraint(0, 16)
class Tmnxsubmgtintdestidorempty(DisplayString):
status = 'current'
subtype_spec = DisplayString.subtypeSpec + value_size_constraint(0, 32)
class Tmnxsubmgtintdestid(TmnxSubMgtIntDestIdOrEmpty):
status = 'current'
subtype_spec = TmnxSubMgtIntDestIdOrEmpty.subtypeSpec + value_size_constraint(1, 32)
class Tmnxdefinterdestidsource(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3))
named_values = named_values(('useString', 1), ('useTopQTag', 2), ('useVpi', 3))
class Tmnxsubnasportsuffixtype(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2))
named_values = named_values(('none', 0), ('circuitId', 1), ('remoteId', 2))
class Tmnxsubnasportprefixtype(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1))
named_values = named_values(('none', 0), ('userString', 1))
class Tmnxsubnasporttypetype(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2))
named_values = named_values(('standard', 1), ('config', 2))
class Tmnxsubmgtorgstrorzero(DisplayString):
status = 'current'
subtype_spec = DisplayString.subtypeSpec + value_size_constraint(0, 32)
class Tmnxsubmgtorgstring(TmnxSubMgtOrgStrOrZero):
status = 'current'
subtype_spec = TmnxSubMgtOrgStrOrZero.subtypeSpec + value_size_constraint(1, 32)
class Tmnxfilterprofilestringorempty(DisplayString):
status = 'current'
subtype_spec = DisplayString.subtypeSpec + value_size_constraint(0, 16)
class Tmnxaccessloopencapdatalink(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1))
named_values = named_values(('aal5', 0), ('ethernet', 1))
class Tmnxaccessloopencaps1(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2))
named_values = named_values(('notAvailable', 0), ('untaggedEthernet', 1), ('singleTaggedEthernet', 2))
class Tmnxaccessloopencaps2(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7, 8))
named_values = named_values(('notAvailable', 0), ('pppoaLlc', 1), ('pppoaNull', 2), ('ipoaLlc', 3), ('ipoaNull', 4), ('ethernetOverAal5LlcFcs', 5), ('ethernetOverAal5LlcNoFcs', 6), ('ethernetOverAal5NullFcs', 7), ('ethernetOverAal5NullNoFcs', 8))
class Tmnxsubaleoffsetmode(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1))
named_values = named_values(('none', 0), ('auto', 1))
class Tmnxsubaleoffset(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24))
named_values = named_values(('none', 0), ('pppoaLlc', 1), ('pppoaNull', 2), ('pppoeoaLlc', 3), ('pppoeoaLlcFcs', 4), ('pppoeoaLlcTagged', 5), ('pppoeoaLlcTaggedFcs', 6), ('pppoeoaNull', 7), ('pppoeoaNullFcs', 8), ('pppoeoaNullTagged', 9), ('pppoeoaNullTaggedFcs', 10), ('ipoaLlc', 11), ('ipoaNull', 12), ('ipoeoaLlc', 13), ('ipoeoaLlcFcs', 14), ('ipoeoaLlcTagged', 15), ('ipoeoaLlcTaggedFcs', 16), ('ipoeoaNull', 17), ('ipoeoaNullFcs', 18), ('ipoeoaNullTagged', 19), ('ipoeoaNullTaggedFcs', 20), ('pppoe', 21), ('pppoeTagged', 22), ('ipoe', 23), ('ipoeTagged', 24))
class Tmnxdhcpoptiontype(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5))
named_values = named_values(('ipv4', 1), ('ascii', 2), ('hex', 3), ('ipv6', 4), ('domain', 5))
class Tmnxpppoeusername(DisplayString):
status = 'current'
subtype_spec = DisplayString.subtypeSpec + value_size_constraint(1, 128)
class Tmnxpppoeusernameorempty(DisplayString):
status = 'current'
subtype_spec = DisplayString.subtypeSpec + value_size_constraint(0, 128)
class Tcpmprotpolicyid(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(0, 255)
class Tcpmprotpolicyidordefault(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-1, -1), value_range_constraint(1, 255))
class Tmlpppqosprofileid(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(0, 65535)
class Tmcfrqosprofileid(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(0, 65535)
class Tmnxpppoesessionid(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(0, 65535)
class Tmnxpppoepadodelay(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + constraints_union(value_range_constraint(0, 0), value_range_constraint(1, 30))
class Tmnxpppoesessioninfoorigin(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7))
named_values = named_values(('none', 0), ('default', 1), ('radius', 2), ('localUserDb', 3), ('dhcp', 4), ('midSessionChange', 5), ('tags', 6), ('l2tp', 7))
class Tmnxpppoesessiontype(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4))
named_values = named_values(('local', 1), ('localWholesale', 2), ('localRetail', 3), ('l2tp', 4))
class Tmnxpppncpprotocol(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2))
named_values = named_values(('ipcp', 1), ('ipv6cp', 2))
class Tmnxmlpppepclass(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5))
named_values = named_values(('null', 0), ('local', 1), ('ipv4Address', 2), ('macAddress', 3), ('magicNumber', 4), ('directoryNumber', 5))
class Tnetworkpolicyid(TPolicyID):
status = 'current'
subtype_spec = TPolicyID.subtypeSpec + constraints_union(value_range_constraint(1, 65535), value_range_constraint(65536, 65536), value_range_constraint(65537, 65537))
class Titemscope(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2))
named_values = named_values(('exclusive', 1), ('template', 2))
class Titemmatch(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3))
named_values = named_values(('off', 1), ('false', 2), ('true', 3))
class Tpriority(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2))
named_values = named_values(('low', 1), ('high', 2))
class Tpriorityordefault(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3))
named_values = named_values(('low', 1), ('high', 2), ('default', 3))
class Tprofileusedeornone(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3))
named_values = named_values(('none', 0), ('in', 1), ('out', 2), ('de', 3))
class Tpriorityorundefined(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2))
named_values = named_values(('undefined', 0), ('low', 1), ('high', 2))
class Tprofile(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2))
named_values = named_values(('in', 1), ('out', 2))
class Tprofileordei(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 13))
named_values = named_values(('in', 1), ('out', 2), ('use-dei', 13))
class Tdeprofile(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3))
named_values = named_values(('in', 1), ('out', 2), ('de', 3))
class Tdeprofileordei(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 13))
named_values = named_values(('in', 1), ('out', 2), ('de', 3), ('use-dei', 13))
class Tprofileornone(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2))
named_values = named_values(('none', 0), ('in', 1), ('out', 2))
class Tadaptationrule(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3))
named_values = named_values(('max', 1), ('min', 2), ('closest', 3))
class Tadaptationruleoverride(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3))
named_values = named_values(('noOverride', 0), ('max', 1), ('min', 2), ('closest', 3))
class Tremarktype(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3))
named_values = named_values(('none', 1), ('dscp', 2), ('precedence', 3))
class Tprecvalue(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(0, 7)
class Tprecvalueornone(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-1, -1), value_range_constraint(0, 7))
class Tburstsize(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-1, -1), value_range_constraint(0, 131072))
class Tburstsizeoverride(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-2, -2), value_range_constraint(-1, -1), value_range_constraint(0, 131072))
class Tburstpercent(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(0, 100)
class Tbursthundredthsofpercent(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(0, 10000)
class Tburstpercentordefault(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-1, -1), value_range_constraint(0, 100))
class Tburstpercentordefaultoverride(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-2, -2), value_range_constraint(-1, -1), value_range_constraint(0, 100))
class Tratepercent(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(0, 100)
class Tpirratepercent(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(1, 100)
class Tlevel(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(1, 8)
class Tlevelordefault(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(0, 0), value_range_constraint(1, 8))
class Tqweight(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(0, 0), value_range_constraint(1, 100))
class Tmetermode(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2))
named_values = named_values(('priority', 1), ('profile', 2))
class Tplcymode(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3))
named_values = named_values(('none', 0), ('roundRobin', 1), ('weightedRoundRobin', 2), ('weightedDeficitRoundRobin', 3))
class Tplcyquanta(TextualConvention, Integer32):
status = 'current'
class Tqueuemode(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2))
named_values = named_values(('priority', 1), ('profile', 2))
class Tentryindicator(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(0, 65535)
class Tentryid(TEntryIndicator):
status = 'current'
subtype_spec = TEntryIndicator.subtypeSpec + value_range_constraint(1, 65535)
class Tmatchcriteria(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6))
named_values = named_values(('ip', 1), ('mac', 2), ('none', 3), ('dscp', 4), ('dot1p', 5), ('prec', 6))
class Tmnxmdaqos(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3))
named_values = named_values(('unknown', 0), ('mda', 1), ('hsmda1', 2), ('hsmda2', 3))
class Tatmtdpdescrtype(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3))
named_values = named_values(('clp0And1pcr', 0), ('clp0And1pcrPlusClp0And1scr', 1), ('clp0And1pcrPlusClp0scr', 2), ('clp0And1pcrPlusClp0scrTag', 3))
class Tdevalue(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-1, -1), value_range_constraint(0, 1))
class Tqgrouptype(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1))
named_values = named_values(('port', 0), ('vpls', 1))
class Tqosoverridetype(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5))
named_values = named_values(('queue', 1), ('policer', 2), ('aggRateLimit', 3), ('arbiter', 4), ('scheduler', 5))
class Tmnxipsectunneltemplateid(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(1, 2048)
class Tmnxipsectunneltemplateidorzero(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(0, 2048)
class Tmnxipsecisaoperflags(TextualConvention, Bits):
status = 'current'
named_values = named_values(('adminDown', 0), ('noActive', 1), ('noResources', 2))
class Tmnxikepolicyauthmethod(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5))
named_values = named_values(('psk', 1), ('hybridX509XAuth', 2), ('plainX509XAuth', 3), ('plainPskXAuth', 4), ('cert', 5))
class Tmnxikepolicyownauthmethod(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 5))
named_values = named_values(('symmetric', 0), ('psk', 1), ('cert', 5))
class Tmnxrsvpdsteclasstype(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(0, 7)
class Tmnxaccplcyqicounters(TextualConvention, Bits):
status = 'current'
named_values = named_values(('hpo', 0), ('lpo', 1), ('ucp', 2), ('hoo', 3), ('loo', 4), ('uco', 5), ('apo', 6), ('aoo', 7), ('hpd', 8), ('lpd', 9), ('hod', 10), ('lod', 11), ('ipf', 12), ('opf', 13), ('iof', 14), ('oof', 15))
class Tmnxaccplcyqecounters(TextualConvention, Bits):
status = 'current'
named_values = named_values(('ipf', 0), ('ipd', 1), ('opf', 2), ('opd', 3), ('iof', 4), ('iod', 5), ('oof', 6), ('ood', 7))
class Tmnxaccplcyoicounters(TextualConvention, Bits):
status = 'current'
named_values = named_values(('apo', 0), ('aoo', 1), ('hpd', 2), ('lpd', 3), ('hod', 4), ('lod', 5), ('ipf', 6), ('opf', 7), ('iof', 8), ('oof', 9))
class Tmnxaccplcyoecounters(TextualConvention, Bits):
status = 'current'
named_values = named_values(('ipf', 0), ('ipd', 1), ('opf', 2), ('opd', 3), ('iof', 4), ('iod', 5), ('oof', 6), ('ood', 7))
class Tmnxaccplcyaacounters(TextualConvention, Bits):
status = 'current'
named_values = named_values(('any', 0), ('sfa', 1), ('nfa', 2), ('sfd', 3), ('nfd', 4), ('saf', 5), ('naf', 6), ('spa', 7), ('npa', 8), ('sba', 9), ('nba', 10), ('spd', 11), ('npd', 12), ('sbd', 13), ('nbd', 14), ('sdf', 15), ('mdf', 16), ('ldf', 17), ('tfd', 18), ('tfc', 19), ('sbm', 20), ('spm', 21), ('smt', 22), ('nbm', 23), ('npm', 24), ('nmt', 25))
class Tmnxvdogrpidindex(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(1, 4)
class Tmnxvdogrpid(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(0, 4)
class Tmnxvdogrpidorinherit(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-1, -1), value_range_constraint(0, 4))
class Tmnxvdofccservermode(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3))
named_values = named_values(('none', 0), ('burst', 1), ('dent', 2), ('hybrid', 3))
class Tmnxvdoportnumber(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + constraints_union(value_range_constraint(1024, 5999), value_range_constraint(6251, 65535))
class Tmnxvdoifname(TNamedItem):
status = 'current'
class Tmnxtimeinsec(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(0, 86400)
class Tmnxmobprofname(TNamedItem):
status = 'current'
class Tmnxmobprofnameorempty(TNamedItemOrEmpty):
status = 'current'
class Tmnxmobprofipttl(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(1, 255)
class Tmnxmobdiatranstimer(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(1, 180)
class Tmnxmobdiaretrycount(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(0, 8)
class Tmnxmobdiapeerhost(DisplayString):
status = 'current'
subtype_spec = DisplayString.subtypeSpec + value_size_constraint(0, 80)
class Tmnxmobgwid(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(1, 8)
class Tmnxmobnode(DisplayString):
status = 'current'
subtype_spec = DisplayString.subtypeSpec + value_size_constraint(0, 30)
class Tmnxmobbufferlimit(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(1000, 12000)
class Tmnxmobqueuelimit(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(1000, 12000)
class Tmnxmobrtradvtinterval(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(1, 60)
class Tmnxmobrtradvtlifetime(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(1, 24)
class Tmnxmobaddrscheme(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2))
named_values = named_values(('stateful', 1), ('stateless', 2))
class Tmnxmobqcivalue(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(1, 9)
class Tmnxmobqcivalueorzero(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(0, 9)
class Tmnxmobarpvalue(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(1, 15)
class Tmnxmobarpvalueorzero(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(0, 15)
class Tmnxmobapn(DisplayString):
reference = '3GPP TS 23.003 Section 9.1'
status = 'current'
subtype_spec = DisplayString.subtypeSpec + value_size_constraint(1, 80)
class Tmnxmobapnorzero(DisplayString):
status = 'current'
subtype_spec = DisplayString.subtypeSpec + value_size_constraint(0, 80)
class Tmnxmobimsi(TextualConvention, OctetString):
status = 'current'
subtype_spec = OctetString.subtypeSpec + value_size_constraint(8, 8)
fixed_length = 8
class Tmnxmobmsisdn(DisplayString):
status = 'current'
subtype_spec = DisplayString.subtypeSpec + value_size_constraint(0, 15)
class Tmnxmobimei(DisplayString):
status = 'current'
subtype_spec = DisplayString.subtypeSpec + constraints_union(value_size_constraint(0, 0), value_size_constraint(16, 16))
class Tmnxmobnai(DisplayString):
status = 'current'
subtype_spec = DisplayString.subtypeSpec + value_size_constraint(0, 72)
class Tmnxmobmcc(DisplayString):
status = 'current'
subtype_spec = DisplayString.subtypeSpec + value_size_constraint(3, 3)
fixed_length = 3
class Tmnxmobmnc(DisplayString):
status = 'current'
subtype_spec = DisplayString.subtypeSpec + constraints_union(value_size_constraint(2, 2), value_size_constraint(3, 3))
class Tmnxmobmccorempty(DisplayString):
status = 'current'
subtype_spec = DisplayString.subtypeSpec + constraints_union(value_size_constraint(0, 0), value_size_constraint(3, 3))
class Tmnxmobmncorempty(DisplayString):
status = 'current'
subtype_spec = DisplayString.subtypeSpec + constraints_union(value_size_constraint(0, 0), value_size_constraint(2, 2), value_size_constraint(3, 3))
class Tmnxmobuestate(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6))
named_values = named_values(('idle', 1), ('active', 2), ('paging', 3), ('init', 4), ('suspend', 5), ('ddnDamp', 6))
class Tmnxmobuerat(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10))
named_values = named_values(('utran', 1), ('geran', 2), ('wlan', 3), ('gan', 4), ('hspa', 5), ('eutran', 6), ('ehrpd', 7), ('hrpd', 8), ('oneXrtt', 9), ('umb', 10))
class Tmnxmobuesubtype(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3))
named_values = named_values(('homer', 1), ('roamer', 2), ('visitor', 3))
class Tmnxmobpdntype(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3))
named_values = named_values(('ipv4', 1), ('ipv6', 2), ('ipv4v6', 3))
class Tmnxmobpgwsigprotocol(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2))
named_values = named_values(('gtp', 1), ('pmip', 2))
class Tmnxmobpdnsessionstate(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13))
named_values = named_values(('invalid', 0), ('init', 1), ('waitPcrfResponse', 2), ('waitPgwResponse', 3), ('waitEnodebUpdate', 4), ('connected', 5), ('ulDelPending', 6), ('dlDelPending', 7), ('idleMode', 8), ('pageMode', 9), ('dlHandover', 10), ('incomingHandover', 11), ('outgoingHandover', 12), ('stateMax', 13))
class Tmnxmobpdnsessionevent(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22))
named_values = named_values(('sessionInvalid', 0), ('gtpCreateSessReq', 1), ('gtpUpdateBearerReq', 2), ('gtpDeleteSessReq', 3), ('gtpDeleteBearerResp', 4), ('gtpUpdateBearerResp', 5), ('gtpModifyActiveToIdle', 6), ('gtpResrcAllocCmd', 7), ('gtpModifyQosCmd', 8), ('gtpX1eNodeBTeidUpdate', 9), ('gtpX2SrcSgwDeleteSessReq', 10), ('gtpS1CreateIndirectTunnel', 11), ('dlPktRecvIndication', 12), ('dlPktNotificationAck', 13), ('dlPktNotificationFail', 14), ('pcrfSessEstResp', 15), ('pcrfSessTerminateRsp', 16), ('pcrfProvQosRules', 17), ('pmipSessResp', 18), ('pmipSessUpdate', 19), ('pmipSessDeleteRsp', 20), ('pmipSessDeleteReq', 21), ('eventMax', 22))
class Tmnxmobbearerid(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(1, 15)
class Tmnxmobbearertype(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2))
named_values = named_values(('default', 1), ('dedicated', 2))
class Tmnxmobqci(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(0, 9)
class Tmnxmobarp(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(0, 15)
class Tmnxmobsdf(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(0, 255)
class Tmnxmobsdffilter(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(0, 16)
class Tmnxmobsdffilternum(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(0, 16)
class Tmnxmobsdfrulename(DisplayString):
status = 'current'
subtype_spec = DisplayString.subtypeSpec + value_size_constraint(1, 64)
class Tmnxmobsdffilterdirection(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3))
named_values = named_values(('preRel7', 0), ('downLink', 1), ('upLink', 2), ('biDir', 3))
class Tmnxmobsdffilterprotocol(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140))
named_values = named_values(('any', -1), ('ipv6HopByOpOpt', 0), ('icmp', 1), ('igmp', 2), ('ggp', 3), ('ip', 4), ('st', 5), ('tcp', 6), ('cbt', 7), ('egp', 8), ('igp', 9), ('bbnRccMon', 10), ('nvp2', 11), ('pup', 12), ('argus', 13), ('emcon', 14), ('xnet', 15), ('chaos', 16), ('udp', 17), ('mux', 18), ('dcnMeas', 19), ('hmp', 20), ('prm', 21), ('xnsIdp', 22), ('trunk1', 23), ('trunk2', 24), ('leaf1', 25), ('leaf2', 26), ('rdp', 27), ('irdp', 28), ('isoTp4', 29), ('netblt', 30), ('mfeNsp', 31), ('meritInp', 32), ('dccp', 33), ('pc3', 34), ('idpr', 35), ('xtp', 36), ('ddp', 37), ('idprCmtp', 38), ('tpplusplus', 39), ('il', 40), ('ipv6', 41), ('sdrp', 42), ('ipv6Route', 43), ('ipv6Frag', 44), ('idrp', 45), ('rsvp', 46), ('gre', 47), ('dsr', 48), ('bna', 49), ('esp', 50), ('ah', 51), ('iNlsp', 52), ('swipe', 53), ('narp', 54), ('mobile', 55), ('tlsp', 56), ('skip', 57), ('ipv6Icmp', 58), ('ipv6NoNxt', 59), ('ipv6Opts', 60), ('anyHostIntl', 61), ('cftp', 62), ('anyLocalNet', 63), ('satExpak', 64), ('kryptolan', 65), ('rvd', 66), ('ippc', 67), ('anyDFS', 68), ('satMon', 69), ('visa', 70), ('ipcv', 71), ('cpnx', 72), ('cphb', 73), ('wsn', 74), ('pvp', 75), ('brSatMon', 76), ('sunNd', 77), ('wbMon', 78), ('wbExpak', 79), ('isoIp', 80), ('vmtp', 81), ('secureVmpt', 82), ('vines', 83), ('ttp', 84), ('nsfnetIgp', 85), ('dgp', 86), ('tcf', 87), ('eiGrp', 88), ('ospfIgp', 89), ('spriteRpc', 90), ('larp', 91), ('mtp', 92), ('ax25', 93), ('ipip', 94), ('micp', 95), ('sccSp', 96), ('etherIp', 97), ('encap', 98), ('anyPEC', 99), ('gmtp', 100), ('ifmp', 101), ('pnni', 102), ('pim', 103), ('aris', 104), ('scps', 105), ('qnx', 106), ('activeNet', 107), ('ipComp', 108), ('snp', 109), ('compaqPeer', 110), ('ipxInIp', 111), ('vrrp', 112), ('pgm', 113), ('any0hop', 114), ('l2tp', 115), ('ddx', 116), ('iatp', 117), ('stp', 118), ('srp', 119), ('uti', 120), ('smp', 121), ('sm', 122), ('ptp', 123), ('isis', 124), ('fire', 125), ('crtp', 126), ('crudp', 127), ('sscopmce', 128), ('iplt', 129), ('sps', 130), ('pipe', 131), ('sctp', 132), ('fc', 133), ('rsvpE2eIgnore', 134), ('mobHeader', 135), ('udpLite', 136), ('mplsInIp', 137), ('manet', 138), ('hip', 139), ('shim6', 140))
class Tmnxmobpathmgmtstate(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5))
named_values = named_values(('disabled', 0), ('up', 1), ('reqTimeOut', 2), ('fault', 3), ('idle', 4), ('restart', 5))
class Tmnxmobdiapathmgmtstate(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3))
named_values = named_values(('shutDown', 0), ('shuttingDown', 1), ('inactive', 2), ('active', 3))
class Tmnxmobdiadetailpathmgmtstate(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9))
named_values = named_values(('error', 0), ('idle', 1), ('closed', 2), ('localShutdown', 3), ('remoteClosing', 4), ('waitConnAck', 5), ('waitCea', 6), ('open', 7), ('openCoolingDown', 8), ('waitDns', 9))
class Tmnxmobgwtype(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3))
named_values = named_values(('sgw', 1), ('pgw', 2), ('wlanGw', 3))
class Tmnxmobchargingprofile(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(0, 255)
class Tmnxmobchargingprofileorinherit(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-1, -1), value_range_constraint(0, 255))
class Tmnxmobauthtype(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2))
named_values = named_values(('radius', 1), ('diameter', 2))
class Tmnxmobauthusername(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3))
named_values = named_values(('imsi', 1), ('msisdn', 2), ('pco', 3))
class Tmnxmobprofgbrrate(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(0, 100000)
class Tmnxmobprofmbrrate(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(0, 100000)
class Tmnxmobpeertype(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3))
named_values = named_values(('sgw', 1), ('pgw', 2), ('hsgw', 3))
class Tmnxmobrfacctlevel(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2))
named_values = named_values(('pdnLevel', 1), ('qciLevel', 2))
class Tmnxmobprofpolreportinglevel(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2))
named_values = named_values(('servId', 1), ('ratingGrp', 2))
class Tmnxmobprofpolchargingmethod(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3))
named_values = named_values(('profChargingMtd', 0), ('online', 1), ('offline', 2), ('both', 3))
class Tmnxmobprofpolmeteringmethod(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3))
named_values = named_values(('timeBased', 1), ('volBased', 2), ('both', 3))
class Tmnxmobserverstate(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2))
named_values = named_values(('na', 0), ('up', 1), ('down', 2))
class Tmnxmobchargingbearertype(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3))
named_values = named_values(('home', 1), ('visiting', 2), ('roaming', 3))
class Tmnxmobcharginglevel(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2))
named_values = named_values(('pdn', 1), ('bearer', 2))
class Tmnxmobipcantype(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2))
named_values = named_values(('epc3gpp', 1), ('gprs3gpp', 2))
class Tmnxmobstaticpolprecedence(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(1, 65536)
class Tmnxmobstaticpolprecedenceorzero(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(0, 65535)
class Tmnxmobdualstackpref(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3))
named_values = named_values(('ipv4', 1), ('ipv6', 2), ('useCplane', 3))
class Tmnxmobdfpeerid(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(1, 16)
class Tmnxmoblitarget(TextualConvention, OctetString):
status = 'current'
subtype_spec = OctetString.subtypeSpec + value_size_constraint(8, 8)
fixed_length = 8
class Tmnxmoblitargettype(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3))
named_values = named_values(('imsi', 1), ('msisdn', 2), ('imei', 3))
class Tmnxreascontextval(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(0, 31)
class Tmnxvdostatint(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2))
named_values = named_values(('current', 1), ('interval', 2))
class Tmnxvdooutputformat(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2))
named_values = named_values(('udp', 1), ('rtp-udp', 2))
class Tmnxvdoanalyzeralarm(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3))
named_values = named_values(('none', 0), ('tnc', 1), ('qos', 2), ('poa', 3))
class Tmnxvdoanalyzeralarmstates(TextualConvention, OctetString):
status = 'current'
subtype_spec = OctetString.subtypeSpec + value_size_constraint(10, 10)
fixed_length = 10
class Svcisid(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-1, -1), value_range_constraint(0, 16777215))
class Tingpolicerid(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(1, 32)
class Tingpoliceridornone(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(0, 0), value_range_constraint(1, 32))
class Tegrpolicerid(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(1, 8)
class Tegrpoliceridornone(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(0, 0), value_range_constraint(1, 8))
class Tfirrate(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-1, -1), value_range_constraint(1, 100000000))
class Tburstsizebytes(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-1, -1), value_range_constraint(0, 134217728))
class Thsmdaburstsizebytes(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-1, -1), value_range_constraint(0, 2688000))
class Thsmdaqueueburstlimit(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-1, -1), value_range_constraint(1, 1000000))
class Tclassburstlimit(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-1, -1), value_range_constraint(1, 327680))
class Tplcrburstsizebytes(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-1, -1), value_range_constraint(0, 4194304))
class Tburstsizebytesoverride(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-2, -2), value_range_constraint(-1, -1), value_range_constraint(0, 134217728))
class Thsmdaburstsizebytesoverride(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-2, -2), value_range_constraint(-1, -1), value_range_constraint(0, 2688000))
class Tplcrburstsizebytesoverride(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-2, -2), value_range_constraint(-1, -1), value_range_constraint(0, 4194304))
class Tmnxbfdsessoperstate(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6))
named_values = named_values(('unknown', 1), ('connected', 2), ('broken', 3), ('peerDetectsDown', 4), ('notConfigured', 5), ('noResources', 6))
class Tmnxingpolicerstatmode(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9))
named_values = named_values(('noStats', 0), ('minimal', 1), ('offeredProfileNoCIR', 2), ('offeredTotalCIR', 3), ('offeredPrioNoCIR', 4), ('offeredProfileCIR', 5), ('offeredPrioCIR', 6), ('offeredLimitedProfileCIR', 7), ('offeredProfileCapCIR', 8), ('offeredLimitedCapCIR', 9))
class Tmnxingpolicerstatmodeoverride(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9))
named_values = named_values(('noOverride', -1), ('noStats', 0), ('minimal', 1), ('offeredProfileNoCIR', 2), ('offeredTotalCIR', 3), ('offeredPrioNoCIR', 4), ('offeredProfileCIR', 5), ('offeredPrioCIR', 6), ('offeredLimitedProfileCIR', 7), ('offeredProfileCapCIR', 8), ('offeredLimitedCapCIR', 9))
class Tmnxegrpolicerstatmode(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6))
named_values = named_values(('noStats', 0), ('minimal', 1), ('offeredProfileNoCIR', 2), ('offeredTotalCIR', 3), ('offeredProfileCIR', 4), ('offeredLimitedCapCIR', 5), ('offeredProfileCapCIR', 6))
class Tmnxegrpolicerstatmodeoverride(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(-1, 0, 1, 2, 3, 4, 5, 6))
named_values = named_values(('noOverride', -1), ('noStats', 0), ('minimal', 1), ('offeredProfileNoCIR', 2), ('offeredTotalCIR', 3), ('offeredProfileCIR', 4), ('offeredLimitedCapCIR', 5), ('offeredProfileCapCIR', 6))
class Tmnxtlsgroupid(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(1, 4094)
class Tsubhostid(TextualConvention, Unsigned32):
status = 'current'
class Tdirection(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2))
named_values = named_values(('both', 0), ('ingress', 1), ('egress', 2))
class Tburstlimit(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-1, -1), value_range_constraint(1, 14000000))
class Tmacfiltertype(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3))
named_values = named_values(('normal', 1), ('isid', 2), ('vid', 3))
class Tmnxpwglobalid(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(1, 4294967295)
class Tmnxpwglobalidorzero(TextualConvention, Unsigned32):
status = 'current'
class Tmnxpwpathhopid(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(1, 16)
class Tmnxpwpathhopidorzero(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(0, 16)
class Tmnxspokesdpid(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(1, 4294967295)
class Tmnxspokesdpidorzero(TextualConvention, Unsigned32):
status = 'current'
class Tmnxmspwpesignaling(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2))
named_values = named_values(('auto', 1), ('master', 2))
class Tmnxldpfectype(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 128, 129, 130))
named_values = named_values(('addrWildcard', 1), ('addrPrefix', 2), ('addrHost', 3), ('vll', 128), ('vpws', 129), ('vpls', 130))
class Tmnxsvcopergrpcreationorigin(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2))
named_values = named_values(('manual', 1), ('mvrp', 2))
class Tmnxopergrpholduptime(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(0, 3600)
class Tmnxopergrpholddowntime(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(0, 3600)
class Tmnxsrrpprioritystep(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(0, 10)
class Tmnxaiitype(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2))
named_values = named_values(('aiiType1', 1), ('aiiType2', 2))
class Servobjdesc(DisplayString):
status = 'current'
subtype_spec = DisplayString.subtypeSpec + value_size_constraint(0, 80)
class Tmplslspexpprofmapid(TPolicyID):
status = 'current'
subtype_spec = TPolicyID.subtypeSpec + value_range_constraint(1, 65535)
class Tsysresource(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(value_range_constraint(-1, -1), value_range_constraint(0, 11))
class Tmnxspbfid(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(1, 4095)
class Tmnxspbfidorzero(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(0, 4095)
class Tmnxspbbridgepriority(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(0, 15)
class Tmnxslopemap(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3))
named_values = named_values(('none', 0), ('low', 1), ('high', 2), ('highLow', 3))
class Tmnxcdrtype(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3))
named_values = named_values(('pgwCdr', 1), ('gCdr', 2), ('eGCdr', 3))
class Tmnxthresholdgrouptype(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7))
named_values = named_values(('brMgmtLimit', 1), ('brMgmtCfSuccess', 2), ('brMgmtCfFailure', 3), ('brMgmtTraffic', 4), ('pathMgmt', 5), ('cpmSystem', 6), ('mgIsmSystem', 7))
class Tmnxmobueid(TextualConvention, OctetString):
status = 'current'
subtype_spec = OctetString.subtypeSpec + value_size_constraint(8, 8)
fixed_length = 8
class Tmnxmobueidtype(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2))
named_values = named_values(('imsi', 0), ('imei', 1), ('msisdn', 2))
class Tmnxmobimsistr(DisplayString):
reference = '3GPP TS 23.003 Numbering, addressing and identification, section 2.2 Composition of IMSI.'
status = 'current'
subtype_spec = DisplayString.subtypeSpec + constraints_union(value_size_constraint(0, 0), value_size_constraint(9, 15))
class Tmnxvpnipbackupfamily(TextualConvention, Bits):
status = 'current'
named_values = named_values(('ipv4', 0), ('ipv6', 1))
class Tmnxtunnelgroupid(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(1, 16)
class Tmnxtunnelgroupidorzero(TextualConvention, Unsigned32):
status = 'current'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(0, 16)
class Tmnxmobratinggrpstate(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8))
named_values = named_values(('allowFlow', 1), ('disallowFlow', 2), ('redWebPortal', 3), ('allowResRules', 4), ('iom1stPktTrigger', 5), ('dis1stPktTrigger', 6), ('creditsToppedUp', 7), ('waitForFpt', 8))
class Tmnxmobpresencestate(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1))
named_values = named_values(('absent', 0), ('present', 1))
class Tmnxmobpdngychrgtriggertype(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29))
named_values = named_values(('sgsnIpAddrRecvd', 0), ('qosRecvd', 1), ('locRecvd', 2), ('ratRecvd', 3), ('qosTrfClsRecvd', 4), ('qosRlbClsRecvd', 5), ('qosDlyClsRecvd', 6), ('qosPeakThrptRecvd', 7), ('qosPrcClsRecvd', 8), ('qosMeanTrptRecvd', 9), ('qosMxBtRtUplnkRecvd', 10), ('qosMxBtRtDllnkRecvd', 11), ('qosResBerRecvd', 12), ('qosSduErrRatRecvd', 13), ('qosTransDelayRecvd', 14), ('qosTrfHndPriRecvd', 15), ('qosGrtBtRtUplnkRecvd', 16), ('qosGrtBtRtDllnkRecvd', 17), ('locMccRecvd', 18), ('locMncRecvd', 19), ('locRacRecvd', 20), ('locLacRecvd', 21), ('locCellIdRecvd', 22), ('medCompRecvd', 23), ('partcNmbRecvd', 24), ('thrldPartcNmbRecvd', 25), ('usrPartcTypeRecvd', 26), ('servCondRecvd', 27), ('servNodeRecvd', 28), ('usrCsgInfoRecvd', 29))
class Tmnxmobpdnrefpointtype(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5))
named_values = named_values(('s5', 1), ('s8', 2), ('gn', 3), ('s2a', 4), ('gp', 5))
class Tmnxqosbyteshex(TextualConvention, OctetString):
status = 'current'
display_hint = '2x '
subtype_spec = OctetString.subtypeSpec + value_size_constraint(0, 30)
class Tsiteoperstatus(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3))
named_values = named_values(('up', 1), ('down', 2), ('outOfResource', 3))
class Tmnxspbfdblocale(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4))
named_values = named_values(('local', 1), ('sap', 2), ('sdp', 3), ('unknown', 4))
class Tmnxspbfdbstate(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6))
named_values = named_values(('ok', 0), ('addModPending', 1), ('delPending', 2), ('sysFdbLimit', 3), ('noFateShared', 4), ('svcFdbLimit', 5), ('noUcast', 6))
class Tmnxmobservrefpointtype(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 4))
named_values = named_values(('s5', 1), ('s8', 2), ('s2a', 4))
class Tmnxmobaccesstype(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3))
named_values = named_values(('eps', 1), ('gprs', 2), ('non3gpp', 3))
class Tmnxmobuestrprefix(DisplayString):
status = 'current'
subtype_spec = DisplayString.subtypeSpec + value_size_constraint(4, 15)
class Tmnxcdrdiagnosticaction(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2))
named_values = named_values(('included', 1), ('excluded', 2))
class Tmnxmplstpglobalid(TextualConvention, Unsigned32):
reference = "RFC 6370, 'MPLS Transport Profile (MPLS-TP) Identifiers', Section 3, 'Uniquely Identifying an Operator - the Global_ID'."
status = 'current'
class Tmnxmplstpnodeid(TextualConvention, Unsigned32):
reference = "RFC 6370, 'MPLS Transport Profile (MPLS-TP) Identifiers', Section 4, 'Node and Interface Identifiers'."
status = 'current'
class Tmnxmplstptunneltype(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1))
named_values = named_values(('mplsTpStatic', 1))
class Tmnxvwmcardtype(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44))
named_values = named_values(('not-provisioned', 0), ('not-equipped', 1), ('sfc1A', 2), ('sfc1B', 3), ('sfc1C', 4), ('sfc1D', 5), ('sfc1E', 6), ('sfc1F', 7), ('sfc1G', 8), ('sfc1H', 9), ('sfc2AandB', 10), ('sfc2CandD', 11), ('sfc2EandF', 12), ('sfc2GandH', 13), ('sfc4A-D', 14), ('sfc4E-H', 15), ('sfc8', 16), ('sfd8A-R', 17), ('sfd8B-R', 18), ('sfd8C-R', 19), ('sfd8D-R', 20), ('sfd4A-R', 21), ('sfd4B-R', 22), ('sfd4C-R', 23), ('sfd4D-R', 24), ('sfd4E-R', 25), ('sfd4F-R', 26), ('sfd4G-R', 27), ('sfd4H-R', 28), ('sfd2A-R', 29), ('sfd2B-R', 30), ('sfd2C-R', 31), ('sfd2D-R', 32), ('sfd2E-R', 33), ('sfd2F-R', 34), ('sfd2G-R', 35), ('sfd2H-R', 36), ('sfd2I-R', 37), ('sfd2L-R', 38), ('sfd2M-R', 39), ('sfd2N-R', 40), ('sfd2O-R', 41), ('sfd2P-R', 42), ('sfd2Q-R', 43), ('sfd2R-R', 44))
mibBuilder.exportSymbols('TIMETRA-TC-MIB', QTagFullRange=QTagFullRange, TmnxVwmCardType=TmnxVwmCardType, TRatePercent=TRatePercent, TmnxReasContextVal=TmnxReasContextVal, TNamedItemOrEmpty=TNamedItemOrEmpty, TmnxIngPolicerStatModeOverride=TmnxIngPolicerStatModeOverride, TmnxMobDualStackPref=TmnxMobDualStackPref, TEgressQPerPacketOffset=TEgressQPerPacketOffset, TMatchCriteria=TMatchCriteria, TEgrRateModType=TEgrRateModType, TmnxSubRadiusAttrType=TmnxSubRadiusAttrType, TmnxOspfInstance=TmnxOspfInstance, TCpmProtPolicyIDOrDefault=TCpmProtPolicyIDOrDefault, TmnxSpbBridgePriority=TmnxSpbBridgePriority, TmnxMobProfMbrRate=TmnxMobProfMbrRate, TmnxAppProfileStringOrEmpty=TmnxAppProfileStringOrEmpty, TmnxMplsTpGlobalID=TmnxMplsTpGlobalID, TmnxMobQciValueOrZero=TmnxMobQciValueOrZero, TmnxIPsecTunnelTemplateId=TmnxIPsecTunnelTemplateId, TmnxVRtrIDOrZero=TmnxVRtrIDOrZero, THPolVirtualScheCIRRate=THPolVirtualScheCIRRate, TPIRRateOverride=TPIRRateOverride, TmnxMobProfName=TmnxMobProfName, TFCNameOrEmpty=TFCNameOrEmpty, TmnxMobPdnType=TmnxMobPdnType, TmnxOperState=TmnxOperState, TSapIngressMeterId=TSapIngressMeterId, TSiteOperStatus=TSiteOperStatus, TDSCPValueOrNone=TDSCPValueOrNone, TmnxMobPdnSessionState=TmnxMobPdnSessionState, TmnxVPNRouteDistinguisher=TmnxVPNRouteDistinguisher, TCIRRateOverride=TCIRRateOverride, TItemScope=TItemScope, TmnxMobAuthUserName=TmnxMobAuthUserName, TmnxVdoGrpIdIndex=TmnxVdoGrpIdIndex, TDSCPName=TDSCPName, TmnxCdrDiagnosticAction=TmnxCdrDiagnosticAction, TmnxSubMgtIntDestIdOrEmpty=TmnxSubMgtIntDestIdOrEmpty, TPolicerWeight=TPolicerWeight, TLNamedItem=TLNamedItem, TPIRPercentOverride=TPIRPercentOverride, TmnxVdoGrpId=TmnxVdoGrpId, TmnxSubNasPortTypeType=TmnxSubNasPortTypeType, TmnxMobMnc=TmnxMobMnc, TmnxPppoePadoDelay=TmnxPppoePadoDelay, TEgressHsmdaCounterId=TEgressHsmdaCounterId, TmnxSlopeMap=TmnxSlopeMap, ServObjDesc=ServObjDesc, TmnxIpSecIsaOperFlags=TmnxIpSecIsaOperFlags, TMaxDecRate=TMaxDecRate, TmnxMobBufferLimit=TmnxMobBufferLimit, TPolicerRateType=TPolicerRateType, TmnxAccessLoopEncapDataLink=TmnxAccessLoopEncapDataLink, TmnxSpbFid=TmnxSpbFid, TmnxBgpRouteTarget=TmnxBgpRouteTarget, TmnxAncpString=TmnxAncpString, TBurstHundredthsOfPercent=TBurstHundredthsOfPercent, TmnxMdaQos=TmnxMdaQos, TmnxMlpppEpClass=TmnxMlpppEpClass, QTagOrZero=QTagOrZero, TCpmProtPolicyID=TCpmProtPolicyID, TItemDescription=TItemDescription, TIngressHsmdaCounterId=TIngressHsmdaCounterId, TmnxSubMgtOrgStrOrZero=TmnxSubMgtOrgStrOrZero, TmnxTunnelGroupId=TmnxTunnelGroupId, TBurstSizeBytes=TBurstSizeBytes, TmnxAdminState=TmnxAdminState, TSapEgressPolicyID=TSapEgressPolicyID, TmnxEnabledDisabled=TmnxEnabledDisabled, TSapEgrEncapGroupType=TSapEgrEncapGroupType, TmnxIgmpVersion=TmnxIgmpVersion, TmnxMobPresenceState=TmnxMobPresenceState, TDSCPNameOrEmpty=TDSCPNameOrEmpty, TmnxVdoFccServerMode=TmnxVdoFccServerMode, TmnxMobPgwSigProtocol=TmnxMobPgwSigProtocol, TmnxPortID=TmnxPortID, TmnxSubRadServAlgorithm=TmnxSubRadServAlgorithm, TmnxSubProfileString=TmnxSubProfileString, TmnxSubMgtOrgString=TmnxSubMgtOrgString, TDSCPValue=TDSCPValue, TIngressQueueId=TIngressQueueId, TmnxIgmpGroupType=TmnxIgmpGroupType, TSubHostId=TSubHostId, TAdaptationRuleOverride=TAdaptationRuleOverride, TmnxSpbFdbState=TmnxSpbFdbState, TIngressHsmdaPerPacketOffset=TIngressHsmdaPerPacketOffset, TWeight=TWeight, TmnxTunnelID=TmnxTunnelID, TProfileOrNone=TProfileOrNone, TExpSecondaryShaperClassRate=TExpSecondaryShaperClassRate, TFCType=TFCType, TMcFrQoSProfileId=TMcFrQoSProfileId, TmnxPppoeSessionType=TmnxPppoeSessionType, THsmdaPIRMRateOverride=THsmdaPIRMRateOverride, TmnxMobSdf=TmnxMobSdf, TmnxSubNasPortSuffixType=TmnxSubNasPortSuffixType, TmnxMobProfPolReportingLevel=TmnxMobProfPolReportingLevel, PYSNMP_MODULE_ID=timetraTCMIBModule, TmnxMobStaticPolPrecedence=TmnxMobStaticPolPrecedence, TPerPacketOffset=TPerPacketOffset, TmnxCustId=TmnxCustId, TmnxMulticastAddrFamily=TmnxMulticastAddrFamily, TmnxRsvpDSTEClassType=TmnxRsvpDSTEClassType, TmnxFilterProfileStringOrEmpty=TmnxFilterProfileStringOrEmpty, TTcpUdpPort=TTcpUdpPort, TmnxSubProfileStringOrEmpty=TmnxSubProfileStringOrEmpty, TmnxSlaProfileString=TmnxSlaProfileString, TmnxMobProfPolMeteringMethod=TmnxMobProfPolMeteringMethod, TmnxMobSdfRuleName=TmnxMobSdfRuleName, TmnxEgrPolicerStatModeOverride=TmnxEgrPolicerStatModeOverride, TmnxSubIdentString=TmnxSubIdentString, TmnxPwPathHopId=TmnxPwPathHopId, TQWeight=TQWeight, TmnxLdpFECType=TmnxLdpFECType, THPolPIRRateOverride=THPolPIRRateOverride, TLspExpValue=TLspExpValue, TmnxMldVersion=TmnxMldVersion, TmnxMobRatingGrpState=TmnxMobRatingGrpState, TmnxMobDiaPathMgmtState=TmnxMobDiaPathMgmtState, TmnxMobSdfFilterDirection=TmnxMobSdfFilterDirection, TmnxPwPathHopIdOrZero=TmnxPwPathHopIdOrZero, TDSCPFilterActionValue=TDSCPFilterActionValue, TmnxMobServerState=TmnxMobServerState, TPIRRatePercent=TPIRRatePercent, TmnxPppoeSessionInfoOrigin=TmnxPppoeSessionInfoOrigin, TIngPolicerIdOrNone=TIngPolicerIdOrNone, TPrecValue=TPrecValue, TLevelOrDefault=TLevelOrDefault, TSecondaryShaper10GPIRRate=TSecondaryShaper10GPIRRate, SvcISID=SvcISID, TPerPacketOffsetOvr=TPerPacketOffsetOvr, TPIRRate=TPIRRate, TmnxAsciiSpecification=TmnxAsciiSpecification, TmnxManagedRouteStatus=TmnxManagedRouteStatus, InterfaceIndex=InterfaceIndex, TFIRRate=TFIRRate, TIngHsmdaPerPacketOffsetOvr=TIngHsmdaPerPacketOffsetOvr, TmnxMobUeIdType=TmnxMobUeIdType, TQueueIdOrAll=TQueueIdOrAll, TmnxMobQueueLimit=TmnxMobQueueLimit, TmnxBgpLocalPreference=TmnxBgpLocalPreference, TEgressQueueId=TEgressQueueId, TRemarkType=TRemarkType, TIpProtocol=TIpProtocol, TCIRRate=TCIRRate, TFCName=TFCName, TLNamedItemOrEmpty=TLNamedItemOrEmpty, TmnxBgpAutonomousSystem=TmnxBgpAutonomousSystem, TmnxMobAuthType=TmnxMobAuthType, TmnxTlsGroupId=TmnxTlsGroupId, TmnxMldGroupFilterMode=TmnxMldGroupFilterMode, TOperator=TOperator, TmnxPppoeSessionId=TmnxPppoeSessionId, TmnxMobAddrScheme=TmnxMobAddrScheme, TmnxMobServRefPointType=TmnxMobServRefPointType, TIpOption=TIpOption, TPriority=TPriority, THsmdaPIRKRate=THsmdaPIRKRate, TmnxMobPathMgmtState=TmnxMobPathMgmtState, TIngressMeterId=TIngressMeterId, TmnxAiiType=TmnxAiiType, TMplsLspExpProfMapID=TMplsLspExpProfMapID, TmnxMobPdnGyChrgTriggerType=TmnxMobPdnGyChrgTriggerType, TmnxMobGwType=TmnxMobGwType, TmnxVdoAnalyzerAlarmStates=TmnxVdoAnalyzerAlarmStates, TmnxPppoeUserNameOrEmpty=TmnxPppoeUserNameOrEmpty, TBurstPercentOrDefault=TBurstPercentOrDefault, THSMDABurstSizeBytesOverride=THSMDABurstSizeBytesOverride, TBurstPercent=TBurstPercent, TmnxMobDiaRetryCount=TmnxMobDiaRetryCount, TNonZeroWeight=TNonZeroWeight, TmnxMobDfPeerId=TmnxMobDfPeerId, TmnxStatus=TmnxStatus, TmnxMobApnOrZero=TmnxMobApnOrZero, TSdpEgressPolicyID=TSdpEgressPolicyID, TmnxMobRfAcctLevel=TmnxMobRfAcctLevel, TmnxMobDiaTransTimer=TmnxMobDiaTransTimer, TmnxMobChargingBearerType=TmnxMobChargingBearerType, timetraTCMIBModule=timetraTCMIBModule, THsmdaPIRKRateOverride=THsmdaPIRKRateOverride, TSapEgrEncapGroupActionType=TSapEgrEncapGroupActionType, TmnxSubNasPortPrefixType=TmnxSubNasPortPrefixType, TPlcrBurstSizeBytes=TPlcrBurstSizeBytes, TQosQGrpInstanceIDorZero=TQosQGrpInstanceIDorZero, TmnxPwGlobalIdOrZero=TmnxPwGlobalIdOrZero, TmnxThresholdGroupType=TmnxThresholdGroupType, TmnxMobProfNameOrEmpty=TmnxMobProfNameOrEmpty, TmnxVdoGrpIdOrInherit=TmnxVdoGrpIdOrInherit, TmnxMobApn=TmnxMobApn, TmnxMobDiaPeerHost=TmnxMobDiaPeerHost, TmnxMobPdnRefPointType=TmnxMobPdnRefPointType, TNetworkPolicyID=TNetworkPolicyID, TItemMatch=TItemMatch, TItemLongDescription=TItemLongDescription, QTagFullRangeOrNone=QTagFullRangeOrNone, TMlpppQoSProfileId=TMlpppQoSProfileId, TSdpIngressPolicyID=TSdpIngressPolicyID, TIngressHsmdaCounterIdOrZero=TIngressHsmdaCounterIdOrZero, TmnxVdoStatInt=TmnxVdoStatInt, THPolPIRRate=THPolPIRRate, TmnxMobArp=TmnxMobArp, TmnxActionType=TmnxActionType, TFrameType=TFrameType, TAdaptationRule=TAdaptationRule, SdpBindId=SdpBindId, TmnxMobNode=TmnxMobNode, TTcpUdpPortOperator=TTcpUdpPortOperator, TmnxMobMccOrEmpty=TmnxMobMccOrEmpty, TmnxSrrpPriorityStep=TmnxSrrpPriorityStep, TCIRPercentOverride=TCIRPercentOverride, TmnxMobImsi=TmnxMobImsi, THsmdaSchedulerPolicyGroupId=THsmdaSchedulerPolicyGroupId, TmnxMobArpValue=TmnxMobArpValue, TClassBurstLimit=TClassBurstLimit, TmnxAccPlcyQICounters=TmnxAccPlcyQICounters, TmnxMobSdfFilter=TmnxMobSdfFilter, TmnxMobImei=TmnxMobImei, TSysResource=TSysResource, TmnxBgpPreference=TmnxBgpPreference, TmnxMobQciValue=TmnxMobQciValue, TPlcyMode=TPlcyMode, THSMDAQueueBurstLimit=THSMDAQueueBurstLimit, TmnxVcId=TmnxVcId, TmnxMobStaticPolPrecedenceOrZero=TmnxMobStaticPolPrecedenceOrZero, TEgressHsmdaPerPacketOffset=TEgressHsmdaPerPacketOffset, TPortSchedulerPIR=TPortSchedulerPIR, THPolCIRRateOverride=THPolCIRRateOverride, TQueueMode=TQueueMode, TmnxMobUeState=TmnxMobUeState, TmnxOperGrpHoldUpTime=TmnxOperGrpHoldUpTime, TQueueId=TQueueId, TmnxMobSdfFilterNum=TmnxMobSdfFilterNum, TmnxMobPeerType=TmnxMobPeerType, TmnxServId=TmnxServId, TLevel=TLevel, TmnxMobArpValueOrZero=TmnxMobArpValueOrZero, TmnxEncapVal=TmnxEncapVal, TmnxVcIdOrNone=TmnxVcIdOrNone, TmnxQosBytesHex=TmnxQosBytesHex, TNamedItem=TNamedItem, TmnxBsxAarpIdOrZero=TmnxBsxAarpIdOrZero, TTmplPolicyID=TTmplPolicyID, TmnxAccPlcyAACounters=TmnxAccPlcyAACounters, TmnxMobUeRat=TmnxMobUeRat, THsmdaWeightClass=THsmdaWeightClass, TmnxVdoIfName=TmnxVdoIfName, TmnxMobRtrAdvtLifeTime=TmnxMobRtrAdvtLifeTime, TmnxSpbFidOrZero=TmnxSpbFidOrZero, TmnxVcType=TmnxVcType, TmnxEnabledDisabledOrInherit=TmnxEnabledDisabledOrInherit, TExpSecondaryShaperPIRRate=TExpSecondaryShaperPIRRate, TmnxAccessLoopEncaps2=TmnxAccessLoopEncaps2, TmnxTunnelGroupIdOrZero=TmnxTunnelGroupIdOrZero, THsmdaPolicyIncludeQueues=THsmdaPolicyIncludeQueues)
mibBuilder.exportSymbols('TIMETRA-TC-MIB', TPIRRateOrZero=TPIRRateOrZero, TmnxMacSpecification=TmnxMacSpecification, TQGroupType=TQGroupType, TmnxAccPlcyOICounters=TmnxAccPlcyOICounters, TFCSet=TFCSet, TMacFilterType=TMacFilterType, TDEValue=TDEValue, TmnxMobMncOrEmpty=TmnxMobMncOrEmpty, TmnxBsxTransitIpPolicyId=TmnxBsxTransitIpPolicyId, TPolicyID=TPolicyID, TmnxSubAleOffsetMode=TmnxSubAleOffsetMode, TEgressHsmdaQueueId=TEgressHsmdaQueueId, TEgrHsmdaPerPacketOffsetOvr=TEgrHsmdaPerPacketOffsetOvr, TmnxRadiusServerOperState=TmnxRadiusServerOperState, TmnxMobProfGbrRate=TmnxMobProfGbrRate, TmnxIkePolicyAuthMethod=TmnxIkePolicyAuthMethod, TBWRateType=TBWRateType, THsmdaPIRMRate=THsmdaPIRMRate, TmnxVRtrMplsLspID=TmnxVRtrMplsLspID, TmnxAncpStringOrZero=TmnxAncpStringOrZero, TBurstSizeOverride=TBurstSizeOverride, THsmdaWrrWeightOverride=THsmdaWrrWeightOverride, TmnxVRtrID=TmnxVRtrID, TmnxMobNai=TmnxMobNai, TmnxMsPwPeSignaling=TmnxMsPwPeSignaling, TmnxSubRadiusVendorId=TmnxSubRadiusVendorId, TmnxMobMcc=TmnxMobMcc, TPortSchedulerCIR=TPortSchedulerCIR, TAdvCfgRate=TAdvCfgRate, THsmdaCIRKRate=THsmdaCIRKRate, THsmdaCIRMRateOverride=THsmdaCIRMRateOverride, TSapIngressPolicyID=TSapIngressPolicyID, TIngressHsmdaQueueId=TIngressHsmdaQueueId, TProfileUseDEOrNone=TProfileUseDEOrNone, TIngPolicerId=TIngPolicerId, TNetworkIngressMeterId=TNetworkIngressMeterId, TmnxBsxAarpServiceRefType=TmnxBsxAarpServiceRefType, TmnxMobUeSubType=TmnxMobUeSubType, TBurstSizeBytesOverride=TBurstSizeBytesOverride, TmnxMobGwId=TmnxMobGwId, TmnxTunnelType=TmnxTunnelType, TBurstSize=TBurstSize, TPlcyQuanta=TPlcyQuanta, THsmdaCIRKRateOverride=THsmdaCIRKRateOverride, TmnxMobLiTargetType=TmnxMobLiTargetType, BgpPeeringStatus=BgpPeeringStatus, THsmdaPolicyScheduleClass=THsmdaPolicyScheduleClass, Dot1PPriority=Dot1PPriority, TmnxMobProfPolChargingMethod=TmnxMobProfPolChargingMethod, TmnxBsxTransitIpPolicyIdOrZero=TmnxBsxTransitIpPolicyIdOrZero, ServiceOperStatus=ServiceOperStatus, Dot1PPriorityMask=Dot1PPriorityMask, TmnxMobChargingLevel=TmnxMobChargingLevel, TmnxSubAleOffset=TmnxSubAleOffset, THsmdaWeightOverride=THsmdaWeightOverride, THSMDABurstSizeBytes=THSMDABurstSizeBytes, TEntryIndicator=TEntryIndicator, TmnxDefInterDestIdSource=TmnxDefInterDestIdSource, TmnxBsxTransPrefPolicyId=TmnxBsxTransPrefPolicyId, TmnxVdoOutputFormat=TmnxVdoOutputFormat, TDirection=TDirection, TEgressHsmdaCounterIdOrZero=TEgressHsmdaCounterIdOrZero, TmnxRadiusPendingReqLimit=TmnxRadiusPendingReqLimit, TAtmTdpDescrType=TAtmTdpDescrType, THsmdaCounterIdOrZero=THsmdaCounterIdOrZero, TmnxPppNcpProtocol=TmnxPppNcpProtocol, TmnxVdoPortNumber=TmnxVdoPortNumber, THsmdaWrrWeight=THsmdaWrrWeight, TmnxSpokeSdpId=TmnxSpokeSdpId, TBurstPercentOrDefaultOverride=TBurstPercentOrDefaultOverride, TmnxMobBearerType=TmnxMobBearerType, THsmdaWeight=THsmdaWeight, TmnxIgmpGroupFilterMode=TmnxIgmpGroupFilterMode, TmnxBGPFamilyType=TmnxBGPFamilyType, TQosOverrideType=TQosOverrideType, TPolicyStatementNameOrEmpty=TPolicyStatementNameOrEmpty, TEgrPolicerIdOrNone=TEgrPolicerIdOrNone, TmnxMldGroupType=TmnxMldGroupType, TPortSchedulerPIRRate=TPortSchedulerPIRRate, TmnxEgrPolicerStatMode=TmnxEgrPolicerStatMode, TmnxMplsTpNodeID=TmnxMplsTpNodeID, TmnxSlaProfileStringOrEmpty=TmnxSlaProfileStringOrEmpty, THsmdaCounterIdOrZeroOrAll=THsmdaCounterIdOrZeroOrAll, TmnxMobImsiStr=TmnxMobImsiStr, THsmdaCIRMRate=THsmdaCIRMRate, TmnxDefSubIdSource=TmnxDefSubIdSource, TDEProfile=TDEProfile, TEntryId=TEntryId, TmnxMobBearerId=TmnxMobBearerId, TmnxVdoAnalyzerAlarm=TmnxVdoAnalyzerAlarm, TmnxSubIdentStringOrEmpty=TmnxSubIdentStringOrEmpty, TmnxPppoeUserName=TmnxPppoeUserName, TProfile=TProfile, TmnxMobChargingProfile=TmnxMobChargingProfile, TmnxAccPlcyQECounters=TmnxAccPlcyQECounters, TmnxCdrType=TmnxCdrType, TmnxSvcOperGrpCreationOrigin=TmnxSvcOperGrpCreationOrigin, TmnxSpbFdbLocale=TmnxSpbFdbLocale, TRateType=TRateType, TPriorityOrDefault=TPriorityOrDefault, TmnxAccPlcyOECounters=TmnxAccPlcyOECounters, THPolCIRRate=THPolCIRRate, TmnxMobProfIpTtl=TmnxMobProfIpTtl, THPolVirtualSchePIRRate=THPolVirtualSchePIRRate, TmnxDHCP6MsgType=TmnxDHCP6MsgType, TmnxIPsecTunnelTemplateIdOrZero=TmnxIPsecTunnelTemplateIdOrZero, TmnxMobRtrAdvtInterval=TmnxMobRtrAdvtInterval, TmnxMobSdfFilterProtocol=TmnxMobSdfFilterProtocol, TDEProfileOrDei=TDEProfileOrDei, TmnxMobAccessType=TmnxMobAccessType, QTag=QTag, TmnxAccessLoopEncaps1=TmnxAccessLoopEncaps1, TmnxMplsTpTunnelType=TmnxMplsTpTunnelType, TmnxSpokeSdpIdOrZero=TmnxSpokeSdpIdOrZero, TSapEgrEncapGrpQosPolicyIdOrZero=TSapEgrEncapGrpQosPolicyIdOrZero, TmnxMobUeId=TmnxMobUeId, TmnxMobMsisdn=TmnxMobMsisdn, TmnxBfdSessOperState=TmnxBfdSessOperState, TBurstLimit=TBurstLimit, TmnxVpnIpBackupFamily=TmnxVpnIpBackupFamily, ServiceAccessPoint=ServiceAccessPoint, TmnxDhcpOptionType=TmnxDhcpOptionType, TEgrPolicerId=TEgrPolicerId, TmnxOperGrpHoldDownTime=TmnxOperGrpHoldDownTime, TmnxMobPdnSessionEvent=TmnxMobPdnSessionEvent, TmnxMobQci=TmnxMobQci, TmnxPwGlobalId=TmnxPwGlobalId, TMeterMode=TMeterMode, TmnxMobUeStrPrefix=TmnxMobUeStrPrefix, TmnxMobLiTarget=TmnxMobLiTarget, TmnxBinarySpecification=TmnxBinarySpecification, ServiceAdminStatus=ServiceAdminStatus, TPrecValueOrNone=TPrecValueOrNone, TmnxBsxAarpId=TmnxBsxAarpId, TmnxMobChargingProfileOrInherit=TmnxMobChargingProfileOrInherit, TPlcrBurstSizeBytesOverride=TPlcrBurstSizeBytesOverride, TmnxIkePolicyOwnAuthMethod=TmnxIkePolicyOwnAuthMethod, TmnxAppProfileString=TmnxAppProfileString, TmnxStrSapId=TmnxStrSapId, TmnxTimeInSec=TmnxTimeInSec, TmnxMobDiaDetailPathMgmtState=TmnxMobDiaDetailPathMgmtState, TmnxSubMgtIntDestId=TmnxSubMgtIntDestId, IpAddressPrefixLength=IpAddressPrefixLength, TmnxMobIpCanType=TmnxMobIpCanType, TProfileOrDei=TProfileOrDei, TPriorityOrUndefined=TPriorityOrUndefined, TmnxBsxTransPrefPolicyIdOrZero=TmnxBsxTransPrefPolicyIdOrZero, TmnxIngPolicerStatMode=TmnxIngPolicerStatMode) |
{
"cells": [
{
"cell_type": "code",
"execution_count": 108,
"id": "25569a41",
"metadata": {},
"outputs": [],
"source": [
"import os\n",
"import csv \n",
"from statistics import mean"
]
},
{
"cell_type": "code",
"execution_count": 109,
"id": "2cbb873b",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'Resources/budget_data.csv'"
]
},
"execution_count": 109,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"budget_data_path=os.path.join('Resources', 'budget_data.csv')\n",
"budget_data_path"
]
},
{
"cell_type": "code",
"execution_count": 110,
"id": "60b00411",
"metadata": {},
"outputs": [],
"source": [
"date=[]\n",
"profit=[]\n",
"profit_change=[]"
]
},
{
"cell_type": "code",
"execution_count": 111,
"id": "a6ad89db",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Financial Analysis\n",
"-------------------\n",
"Total month: 86\n",
"Total : 38382578\n",
"Average Change :-2315.12\n",
"Greatest Increase in Profits: Feb-2012,(1926159)\n",
"Greatest Decrease in Profit: Sep-2013,(-2196167)\n"
]
}
],
"source": [
"with open (budget_data_path) as bank_data_file:\n",
" \n",
" csvreader=csv.reader(bank_data_file, delimiter=',')\n",
" header=next(csvreader)\n",
" \n",
" \n",
" for row in csvreader:\n",
" \n",
"#Total_month\n",
" date.append(row[0])\n",
" \n",
"#total_revenue\n",
" profit.append(int(row[1]))\n",
"# avrage_change\n",
" for i in range(len(profit)-1):\n",
" profit_change.append(profit[i+1]-profit[i])\n",
"#greatest_increas \n",
" max_increa=max(profit_change)\n",
"#greates_decreas \n",
" max_decrease=min(profit_change)\n",
"#Avrage change\n",
" avrage_change=mean(profit_change)\n",
" \n",
"\n",
" print(\"Financial Analysis\")\n",
" print(\"-------------------\")\n",
" print(f\"Total month: {len(date)}\")\n",
" print(f\"Total : {sum(profit)}\")\n",
" print(f\"Average Change :{round(avrage_change,2)}\")\n",
" print(f\"Greatest Increase in Profits: {date[profit_change.index(max(profit_change))+1]},({max_increa})\")\n",
" print(f\"Greatest Decrease in Profit: {date[profit_change.index(min(profit_change))+1]},({max_decrease})\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "904c9239",
"metadata": {},
"outputs": [],
"source": [
"output = \"result.txt\"\n",
"with open(\"result\",\"w\") as new:\n",
" new.write(\"Financial Analysis\")\n",
" new.write(\"\\n\")\n",
" new.write(\"--------------------\")\n",
" new.write(\"\\n\")\n",
" new.write(f\"Total month: {len(date)}\")\n",
" new.write(\"\\n\")\n",
" new.write(f\"Total: ${sum(profit)}\")\n",
" new.write(\"\\n\")\n",
" new.write(f\"Average Change: {round(avrage_change,2)}\")\n",
" new.write(\"\\n\")\n",
" new.write(f\"Greatest Increase in Profits: {date[profit_change.index(max(profit_change))+1]},({max_increa})\")\n",
" new.write(\"\\n\")\n",
" new.write(f\"Greatest Decrease in Profits: {date[profit_change.index(min(profit_change))+1]},({max_decrease})\")"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.8"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
| {'cells': [{'cell_type': 'code', 'execution_count': 108, 'id': '25569a41', 'metadata': {}, 'outputs': [], 'source': ['import os\n', 'import csv \n', 'from statistics import mean']}, {'cell_type': 'code', 'execution_count': 109, 'id': '2cbb873b', 'metadata': {}, 'outputs': [{'data': {'text/plain': ["'Resources/budget_data.csv'"]}, 'execution_count': 109, 'metadata': {}, 'output_type': 'execute_result'}], 'source': ["budget_data_path=os.path.join('Resources', 'budget_data.csv')\n", 'budget_data_path']}, {'cell_type': 'code', 'execution_count': 110, 'id': '60b00411', 'metadata': {}, 'outputs': [], 'source': ['date=[]\n', 'profit=[]\n', 'profit_change=[]']}, {'cell_type': 'code', 'execution_count': 111, 'id': 'a6ad89db', 'metadata': {}, 'outputs': [{'name': 'stdout', 'output_type': 'stream', 'text': ['Financial Analysis\n', '-------------------\n', 'Total month: 86\n', 'Total : 38382578\n', 'Average Change :-2315.12\n', 'Greatest Increase in Profits: Feb-2012,(1926159)\n', 'Greatest Decrease in Profit: Sep-2013,(-2196167)\n']}], 'source': ['with open (budget_data_path) as bank_data_file:\n', ' \n', " csvreader=csv.reader(bank_data_file, delimiter=',')\n", ' header=next(csvreader)\n', ' \n', ' \n', ' for row in csvreader:\n', ' \n', '#Total_month\n', ' date.append(row[0])\n', ' \n', '#total_revenue\n', ' profit.append(int(row[1]))\n', '# avrage_change\n', ' for i in range(len(profit)-1):\n', ' profit_change.append(profit[i+1]-profit[i])\n', '#greatest_increas \n', ' max_increa=max(profit_change)\n', '#greates_decreas \n', ' max_decrease=min(profit_change)\n', '#Avrage change\n', ' avrage_change=mean(profit_change)\n', ' \n', '\n', ' print("Financial Analysis")\n', ' print("-------------------")\n', ' print(f"Total month: {len(date)}")\n', ' print(f"Total : {sum(profit)}")\n', ' print(f"Average Change :{round(avrage_change,2)}")\n', ' print(f"Greatest Increase in Profits: {date[profit_change.index(max(profit_change))+1]},({max_increa})")\n', ' print(f"Greatest Decrease in Profit: {date[profit_change.index(min(profit_change))+1]},({max_decrease})")']}, {'cell_type': 'code', 'execution_count': null, 'id': '904c9239', 'metadata': {}, 'outputs': [], 'source': ['output = "result.txt"\n', 'with open("result","w") as new:\n', ' new.write("Financial Analysis")\n', ' new.write("\\n")\n', ' new.write("--------------------")\n', ' new.write("\\n")\n', ' new.write(f"Total month: {len(date)}")\n', ' new.write("\\n")\n', ' new.write(f"Total: ${sum(profit)}")\n', ' new.write("\\n")\n', ' new.write(f"Average Change: {round(avrage_change,2)}")\n', ' new.write("\\n")\n', ' new.write(f"Greatest Increase in Profits: {date[profit_change.index(max(profit_change))+1]},({max_increa})")\n', ' new.write("\\n")\n', ' new.write(f"Greatest Decrease in Profits: {date[profit_change.index(min(profit_change))+1]},({max_decrease})")']}], 'metadata': {'kernelspec': {'display_name': 'Python 3', 'language': 'python', 'name': 'python3'}, 'language_info': {'codemirror_mode': {'name': 'ipython', 'version': 3}, 'file_extension': '.py', 'mimetype': 'text/x-python', 'name': 'python', 'nbconvert_exporter': 'python', 'pygments_lexer': 'ipython3', 'version': '3.8.8'}}, 'nbformat': 4, 'nbformat_minor': 5} |
#
# PySNMP MIB module CISCO-QLLC01-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-QLLC01-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 17:53:38 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueRangeConstraint, ConstraintsUnion, ConstraintsIntersection, SingleValueConstraint, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ConstraintsUnion", "ConstraintsIntersection", "SingleValueConstraint", "ValueSizeConstraint")
ciscoExperiment, = mibBuilder.importSymbols("CISCO-SMI", "ciscoExperiment")
NotificationGroup, ObjectGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ObjectGroup", "ModuleCompliance")
iso, ModuleIdentity, MibIdentifier, Counter32, Integer32, Bits, TimeTicks, Counter64, NotificationType, MibScalar, MibTable, MibTableRow, MibTableColumn, IpAddress, Gauge32, Unsigned32, ObjectIdentity = mibBuilder.importSymbols("SNMPv2-SMI", "iso", "ModuleIdentity", "MibIdentifier", "Counter32", "Integer32", "Bits", "TimeTicks", "Counter64", "NotificationType", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "IpAddress", "Gauge32", "Unsigned32", "ObjectIdentity")
DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention")
snaqllc01 = ModuleIdentity((1, 3, 6, 1, 4, 1, 9, 10, 6))
if mibBuilder.loadTexts: snaqllc01.setLastUpdated('9411090000Z')
if mibBuilder.loadTexts: snaqllc01.setOrganization('Cisco Systems, Inc.')
qllc = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 6, 1))
class IfIndexType(Integer32):
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(0, 2147483647)
class X121Address(OctetString):
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(0, 17)
qllcLSAdminTable = MibTable((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 1), )
if mibBuilder.loadTexts: qllcLSAdminTable.setStatus('current')
qllcLSAdminEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 1, 1), ).setIndexNames((0, "CISCO-QLLC01-MIB", "qllcLSAdminIfIndex"), (0, "CISCO-QLLC01-MIB", "qllcLSAdminLciVcIndex"))
if mibBuilder.loadTexts: qllcLSAdminEntry.setStatus('current')
qllcLSAdminIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 1, 1, 1), IfIndexType()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: qllcLSAdminIfIndex.setStatus('current')
qllcLSAdminLciVcIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 1, 1, 2), IfIndexType()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: qllcLSAdminLciVcIndex.setStatus('current')
qllcLSAdminCircuitType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("switchedVC", 1), ("permanentVC", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: qllcLSAdminCircuitType.setStatus('current')
qllcLSAdminRole = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("primary", 1), ("secondary", 2), ("peerToPeer", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: qllcLSAdminRole.setStatus('current')
qllcLSAdminX25Add = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 1, 1, 5), X121Address()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: qllcLSAdminX25Add.setStatus('current')
qllcLSAdminModulo = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("modulo8", 1), ("modulo128", 2))).clone('modulo8')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: qllcLSAdminModulo.setStatus('current')
qllcLSAdminLgX25 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 1, 1, 7), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: qllcLSAdminLgX25.setStatus('current')
qllcLSOperTable = MibTable((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 2), )
if mibBuilder.loadTexts: qllcLSOperTable.setStatus('current')
qllcLSOperEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 2, 1), ).setIndexNames((0, "CISCO-QLLC01-MIB", "qllcLSOperIfIndex"), (0, "CISCO-QLLC01-MIB", "qllcLSOperLciVcIndex"))
if mibBuilder.loadTexts: qllcLSOperEntry.setStatus('current')
qllcLSOperIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 2, 1, 1), IfIndexType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: qllcLSOperIfIndex.setStatus('current')
qllcLSOperLciVcIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 2, 1, 2), IfIndexType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: qllcLSOperLciVcIndex.setStatus('current')
qllcLSOperCircuitType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 2, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("switchedVC", 1), ("permanentVC", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: qllcLSOperCircuitType.setStatus('current')
qllcLSOperRole = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 2, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("primary", 1), ("secondary", 2), ("peerToPeer", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: qllcLSOperRole.setStatus('current')
qllcLSOperX25Add = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 2, 1, 5), X121Address()).setMaxAccess("readonly")
if mibBuilder.loadTexts: qllcLSOperX25Add.setStatus('current')
qllcLSOperModulo = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 2, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("modulo8", 1), ("modulo128", 2))).clone('modulo8')).setMaxAccess("readonly")
if mibBuilder.loadTexts: qllcLSOperModulo.setStatus('current')
qllcLSOperState = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 2, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("lsStateInop", 1), ("lsStateClosed", 2), ("lsStateOpening", 3), ("lsStateClosing", 4), ("lsStateRecovery", 5), ("lsStateOpened", 6)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: qllcLSOperState.setStatus('current')
qllcLSOperLgX25 = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 2, 1, 8), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: qllcLSOperLgX25.setStatus('current')
qllcLSStatsTable = MibTable((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 3), )
if mibBuilder.loadTexts: qllcLSStatsTable.setStatus('current')
qllcLSStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 3, 1), ).setIndexNames((0, "CISCO-QLLC01-MIB", "qllcLSStatsIfIndex"), (0, "CISCO-QLLC01-MIB", "qllcLSStatsLciVcIndex"))
if mibBuilder.loadTexts: qllcLSStatsEntry.setStatus('current')
qllcLSStatsIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 3, 1, 1), IfIndexType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: qllcLSStatsIfIndex.setStatus('current')
qllcLSStatsLciVcIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 3, 1, 2), IfIndexType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: qllcLSStatsLciVcIndex.setStatus('current')
qllcLSStatsXidIn = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 3, 1, 3), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: qllcLSStatsXidIn.setStatus('current')
qllcLSStatsXidOut = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 3, 1, 4), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: qllcLSStatsXidOut.setStatus('current')
qllcLSStatsTestIn = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 3, 1, 5), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: qllcLSStatsTestIn.setStatus('current')
qllcLSStatsTestOut = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 3, 1, 6), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: qllcLSStatsTestOut.setStatus('current')
qllcLSStatsQuenchOff = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 3, 1, 7), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: qllcLSStatsQuenchOff.setStatus('current')
qllcLSStatsQuenchOn = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 3, 1, 8), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: qllcLSStatsQuenchOn.setStatus('current')
qllcLSStatsInPaks = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 3, 1, 9), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: qllcLSStatsInPaks.setStatus('current')
qllcLSStatsOutPaks = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 3, 1, 10), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: qllcLSStatsOutPaks.setStatus('current')
qllcLSStatsInBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 3, 1, 11), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: qllcLSStatsInBytes.setStatus('current')
qllcLSStatsOutBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 3, 1, 12), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: qllcLSStatsOutBytes.setStatus('current')
qllcLSStatsNumRcvQsms = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 3, 1, 13), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: qllcLSStatsNumRcvQsms.setStatus('current')
qllcLSStatsNumSndQsms = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 3, 1, 14), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: qllcLSStatsNumSndQsms.setStatus('current')
qllcLSStatsNumRcvDiscs = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 3, 1, 15), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: qllcLSStatsNumRcvDiscs.setStatus('current')
qllcLSStatsNumSndDiscs = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 3, 1, 16), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: qllcLSStatsNumSndDiscs.setStatus('current')
qllcLSStatsNumRcvDms = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 3, 1, 17), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: qllcLSStatsNumRcvDms.setStatus('current')
qllcLSStatsNumSndDms = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 3, 1, 18), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: qllcLSStatsNumSndDms.setStatus('current')
qllcLSStatsNumRcvFrmrs = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 3, 1, 19), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: qllcLSStatsNumRcvFrmrs.setStatus('current')
qllcLSStatsNumSndFrmrs = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 3, 1, 20), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: qllcLSStatsNumSndFrmrs.setStatus('current')
qllcLSStatsNumDrops = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 3, 1, 21), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: qllcLSStatsNumDrops.setStatus('current')
qllcLSStatsNumErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 3, 1, 22), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: qllcLSStatsNumErrs.setStatus('current')
qllcMibConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 6, 2))
qllcMibCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 6, 2, 1))
qllcMibGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 6, 2, 2))
qllcMibCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 10, 6, 2, 1, 1)).setObjects(("CISCO-QLLC01-MIB", "qllcLSAdminGroup"), ("CISCO-QLLC01-MIB", "qllcLSOperGroup"), ("CISCO-QLLC01-MIB", "qllcLSStatsGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
qllcMibCompliance = qllcMibCompliance.setStatus('current')
qllcLSAdminGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 10, 6, 2, 2, 1)).setObjects(("CISCO-QLLC01-MIB", "qllcLSAdminIfIndex"), ("CISCO-QLLC01-MIB", "qllcLSAdminLciVcIndex"), ("CISCO-QLLC01-MIB", "qllcLSAdminRole"), ("CISCO-QLLC01-MIB", "qllcLSAdminCircuitType"), ("CISCO-QLLC01-MIB", "qllcLSAdminX25Add"), ("CISCO-QLLC01-MIB", "qllcLSAdminModulo"), ("CISCO-QLLC01-MIB", "qllcLSAdminLgX25"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
qllcLSAdminGroup = qllcLSAdminGroup.setStatus('current')
qllcLSOperGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 10, 6, 2, 2, 2)).setObjects(("CISCO-QLLC01-MIB", "qllcLSOperIfIndex"), ("CISCO-QLLC01-MIB", "qllcLSOperLciVcIndex"), ("CISCO-QLLC01-MIB", "qllcLSOperCircuitType"), ("CISCO-QLLC01-MIB", "qllcLSOperRole"), ("CISCO-QLLC01-MIB", "qllcLSOperX25Add"), ("CISCO-QLLC01-MIB", "qllcLSOperModulo"), ("CISCO-QLLC01-MIB", "qllcLSOperState"), ("CISCO-QLLC01-MIB", "qllcLSOperLgX25"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
qllcLSOperGroup = qllcLSOperGroup.setStatus('current')
qllcLSStatsGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 10, 6, 2, 2, 3)).setObjects(("CISCO-QLLC01-MIB", "qllcLSStatsIfIndex"), ("CISCO-QLLC01-MIB", "qllcLSStatsLciVcIndex"), ("CISCO-QLLC01-MIB", "qllcLSStatsXidIn"), ("CISCO-QLLC01-MIB", "qllcLSStatsXidOut"), ("CISCO-QLLC01-MIB", "qllcLSStatsTestIn"), ("CISCO-QLLC01-MIB", "qllcLSStatsTestOut"), ("CISCO-QLLC01-MIB", "qllcLSStatsQuenchOff"), ("CISCO-QLLC01-MIB", "qllcLSStatsQuenchOn"), ("CISCO-QLLC01-MIB", "qllcLSStatsInPaks"), ("CISCO-QLLC01-MIB", "qllcLSStatsOutPaks"), ("CISCO-QLLC01-MIB", "qllcLSStatsInBytes"), ("CISCO-QLLC01-MIB", "qllcLSStatsOutBytes"), ("CISCO-QLLC01-MIB", "qllcLSStatsNumRcvQsms"), ("CISCO-QLLC01-MIB", "qllcLSStatsNumSndQsms"), ("CISCO-QLLC01-MIB", "qllcLSStatsNumRcvDiscs"), ("CISCO-QLLC01-MIB", "qllcLSStatsNumSndDiscs"), ("CISCO-QLLC01-MIB", "qllcLSStatsNumRcvDms"), ("CISCO-QLLC01-MIB", "qllcLSStatsNumSndDms"), ("CISCO-QLLC01-MIB", "qllcLSStatsNumRcvFrmrs"), ("CISCO-QLLC01-MIB", "qllcLSStatsNumSndFrmrs"), ("CISCO-QLLC01-MIB", "qllcLSStatsNumDrops"), ("CISCO-QLLC01-MIB", "qllcLSStatsNumErrs"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
qllcLSStatsGroup = qllcLSStatsGroup.setStatus('current')
mibBuilder.exportSymbols("CISCO-QLLC01-MIB", qllcLSAdminModulo=qllcLSAdminModulo, qllcLSOperX25Add=qllcLSOperX25Add, qllcLSStatsQuenchOff=qllcLSStatsQuenchOff, qllcLSStatsNumRcvDiscs=qllcLSStatsNumRcvDiscs, qllcLSOperLgX25=qllcLSOperLgX25, qllcLSAdminX25Add=qllcLSAdminX25Add, qllcLSOperRole=qllcLSOperRole, qllcLSStatsEntry=qllcLSStatsEntry, qllcLSStatsNumSndQsms=qllcLSStatsNumSndQsms, qllcMibGroups=qllcMibGroups, qllcLSStatsGroup=qllcLSStatsGroup, qllcLSStatsTestOut=qllcLSStatsTestOut, qllcLSStatsIfIndex=qllcLSStatsIfIndex, qllcMibCompliances=qllcMibCompliances, qllcLSStatsNumErrs=qllcLSStatsNumErrs, qllcLSStatsNumDrops=qllcLSStatsNumDrops, qllcLSOperState=qllcLSOperState, qllcLSAdminIfIndex=qllcLSAdminIfIndex, qllcLSOperTable=qllcLSOperTable, qllcLSOperCircuitType=qllcLSOperCircuitType, qllcLSStatsLciVcIndex=qllcLSStatsLciVcIndex, PYSNMP_MODULE_ID=snaqllc01, qllcLSOperIfIndex=qllcLSOperIfIndex, X121Address=X121Address, qllcLSAdminRole=qllcLSAdminRole, qllcLSAdminLciVcIndex=qllcLSAdminLciVcIndex, qllcLSAdminTable=qllcLSAdminTable, qllcLSStatsInPaks=qllcLSStatsInPaks, qllcLSStatsOutPaks=qllcLSStatsOutPaks, qllcLSAdminLgX25=qllcLSAdminLgX25, IfIndexType=IfIndexType, qllcLSOperEntry=qllcLSOperEntry, qllcLSOperModulo=qllcLSOperModulo, qllc=qllc, qllcLSStatsQuenchOn=qllcLSStatsQuenchOn, qllcLSOperGroup=qllcLSOperGroup, qllcLSStatsTestIn=qllcLSStatsTestIn, qllcLSStatsNumRcvFrmrs=qllcLSStatsNumRcvFrmrs, qllcMibCompliance=qllcMibCompliance, qllcLSStatsNumRcvDms=qllcLSStatsNumRcvDms, qllcLSAdminCircuitType=qllcLSAdminCircuitType, snaqllc01=snaqllc01, qllcLSStatsTable=qllcLSStatsTable, qllcLSStatsNumSndDms=qllcLSStatsNumSndDms, qllcLSAdminGroup=qllcLSAdminGroup, qllcLSAdminEntry=qllcLSAdminEntry, qllcLSStatsXidIn=qllcLSStatsXidIn, qllcMibConformance=qllcMibConformance, qllcLSStatsXidOut=qllcLSStatsXidOut, qllcLSStatsOutBytes=qllcLSStatsOutBytes, qllcLSOperLciVcIndex=qllcLSOperLciVcIndex, qllcLSStatsInBytes=qllcLSStatsInBytes, qllcLSStatsNumSndDiscs=qllcLSStatsNumSndDiscs, qllcLSStatsNumSndFrmrs=qllcLSStatsNumSndFrmrs, qllcLSStatsNumRcvQsms=qllcLSStatsNumRcvQsms)
| (object_identifier, octet_string, integer) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'OctetString', 'Integer')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_range_constraint, constraints_union, constraints_intersection, single_value_constraint, value_size_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'ConstraintsUnion', 'ConstraintsIntersection', 'SingleValueConstraint', 'ValueSizeConstraint')
(cisco_experiment,) = mibBuilder.importSymbols('CISCO-SMI', 'ciscoExperiment')
(notification_group, object_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ObjectGroup', 'ModuleCompliance')
(iso, module_identity, mib_identifier, counter32, integer32, bits, time_ticks, counter64, notification_type, mib_scalar, mib_table, mib_table_row, mib_table_column, ip_address, gauge32, unsigned32, object_identity) = mibBuilder.importSymbols('SNMPv2-SMI', 'iso', 'ModuleIdentity', 'MibIdentifier', 'Counter32', 'Integer32', 'Bits', 'TimeTicks', 'Counter64', 'NotificationType', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'IpAddress', 'Gauge32', 'Unsigned32', 'ObjectIdentity')
(display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention')
snaqllc01 = module_identity((1, 3, 6, 1, 4, 1, 9, 10, 6))
if mibBuilder.loadTexts:
snaqllc01.setLastUpdated('9411090000Z')
if mibBuilder.loadTexts:
snaqllc01.setOrganization('Cisco Systems, Inc.')
qllc = mib_identifier((1, 3, 6, 1, 4, 1, 9, 10, 6, 1))
class Ifindextype(Integer32):
subtype_spec = Integer32.subtypeSpec + value_range_constraint(0, 2147483647)
class X121Address(OctetString):
subtype_spec = OctetString.subtypeSpec + value_size_constraint(0, 17)
qllc_ls_admin_table = mib_table((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 1))
if mibBuilder.loadTexts:
qllcLSAdminTable.setStatus('current')
qllc_ls_admin_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 1, 1)).setIndexNames((0, 'CISCO-QLLC01-MIB', 'qllcLSAdminIfIndex'), (0, 'CISCO-QLLC01-MIB', 'qllcLSAdminLciVcIndex'))
if mibBuilder.loadTexts:
qllcLSAdminEntry.setStatus('current')
qllc_ls_admin_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 1, 1, 1), if_index_type()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
qllcLSAdminIfIndex.setStatus('current')
qllc_ls_admin_lci_vc_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 1, 1, 2), if_index_type()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
qllcLSAdminLciVcIndex.setStatus('current')
qllc_ls_admin_circuit_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 1, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('switchedVC', 1), ('permanentVC', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
qllcLSAdminCircuitType.setStatus('current')
qllc_ls_admin_role = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 1, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('primary', 1), ('secondary', 2), ('peerToPeer', 3)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
qllcLSAdminRole.setStatus('current')
qllc_ls_admin_x25_add = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 1, 1, 5), x121_address()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
qllcLSAdminX25Add.setStatus('current')
qllc_ls_admin_modulo = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 1, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('modulo8', 1), ('modulo128', 2))).clone('modulo8')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
qllcLSAdminModulo.setStatus('current')
qllc_ls_admin_lg_x25 = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 1, 1, 7), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
qllcLSAdminLgX25.setStatus('current')
qllc_ls_oper_table = mib_table((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 2))
if mibBuilder.loadTexts:
qllcLSOperTable.setStatus('current')
qllc_ls_oper_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 2, 1)).setIndexNames((0, 'CISCO-QLLC01-MIB', 'qllcLSOperIfIndex'), (0, 'CISCO-QLLC01-MIB', 'qllcLSOperLciVcIndex'))
if mibBuilder.loadTexts:
qllcLSOperEntry.setStatus('current')
qllc_ls_oper_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 2, 1, 1), if_index_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
qllcLSOperIfIndex.setStatus('current')
qllc_ls_oper_lci_vc_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 2, 1, 2), if_index_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
qllcLSOperLciVcIndex.setStatus('current')
qllc_ls_oper_circuit_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 2, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('switchedVC', 1), ('permanentVC', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
qllcLSOperCircuitType.setStatus('current')
qllc_ls_oper_role = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 2, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('primary', 1), ('secondary', 2), ('peerToPeer', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
qllcLSOperRole.setStatus('current')
qllc_ls_oper_x25_add = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 2, 1, 5), x121_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
qllcLSOperX25Add.setStatus('current')
qllc_ls_oper_modulo = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 2, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('modulo8', 1), ('modulo128', 2))).clone('modulo8')).setMaxAccess('readonly')
if mibBuilder.loadTexts:
qllcLSOperModulo.setStatus('current')
qllc_ls_oper_state = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 2, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6))).clone(namedValues=named_values(('lsStateInop', 1), ('lsStateClosed', 2), ('lsStateOpening', 3), ('lsStateClosing', 4), ('lsStateRecovery', 5), ('lsStateOpened', 6)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
qllcLSOperState.setStatus('current')
qllc_ls_oper_lg_x25 = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 2, 1, 8), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
qllcLSOperLgX25.setStatus('current')
qllc_ls_stats_table = mib_table((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 3))
if mibBuilder.loadTexts:
qllcLSStatsTable.setStatus('current')
qllc_ls_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 3, 1)).setIndexNames((0, 'CISCO-QLLC01-MIB', 'qllcLSStatsIfIndex'), (0, 'CISCO-QLLC01-MIB', 'qllcLSStatsLciVcIndex'))
if mibBuilder.loadTexts:
qllcLSStatsEntry.setStatus('current')
qllc_ls_stats_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 3, 1, 1), if_index_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
qllcLSStatsIfIndex.setStatus('current')
qllc_ls_stats_lci_vc_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 3, 1, 2), if_index_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
qllcLSStatsLciVcIndex.setStatus('current')
qllc_ls_stats_xid_in = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 3, 1, 3), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
qllcLSStatsXidIn.setStatus('current')
qllc_ls_stats_xid_out = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 3, 1, 4), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
qllcLSStatsXidOut.setStatus('current')
qllc_ls_stats_test_in = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 3, 1, 5), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
qllcLSStatsTestIn.setStatus('current')
qllc_ls_stats_test_out = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 3, 1, 6), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
qllcLSStatsTestOut.setStatus('current')
qllc_ls_stats_quench_off = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 3, 1, 7), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
qllcLSStatsQuenchOff.setStatus('current')
qllc_ls_stats_quench_on = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 3, 1, 8), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
qllcLSStatsQuenchOn.setStatus('current')
qllc_ls_stats_in_paks = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 3, 1, 9), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
qllcLSStatsInPaks.setStatus('current')
qllc_ls_stats_out_paks = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 3, 1, 10), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
qllcLSStatsOutPaks.setStatus('current')
qllc_ls_stats_in_bytes = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 3, 1, 11), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
qllcLSStatsInBytes.setStatus('current')
qllc_ls_stats_out_bytes = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 3, 1, 12), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
qllcLSStatsOutBytes.setStatus('current')
qllc_ls_stats_num_rcv_qsms = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 3, 1, 13), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
qllcLSStatsNumRcvQsms.setStatus('current')
qllc_ls_stats_num_snd_qsms = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 3, 1, 14), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
qllcLSStatsNumSndQsms.setStatus('current')
qllc_ls_stats_num_rcv_discs = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 3, 1, 15), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
qllcLSStatsNumRcvDiscs.setStatus('current')
qllc_ls_stats_num_snd_discs = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 3, 1, 16), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
qllcLSStatsNumSndDiscs.setStatus('current')
qllc_ls_stats_num_rcv_dms = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 3, 1, 17), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
qllcLSStatsNumRcvDms.setStatus('current')
qllc_ls_stats_num_snd_dms = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 3, 1, 18), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
qllcLSStatsNumSndDms.setStatus('current')
qllc_ls_stats_num_rcv_frmrs = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 3, 1, 19), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
qllcLSStatsNumRcvFrmrs.setStatus('current')
qllc_ls_stats_num_snd_frmrs = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 3, 1, 20), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
qllcLSStatsNumSndFrmrs.setStatus('current')
qllc_ls_stats_num_drops = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 3, 1, 21), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
qllcLSStatsNumDrops.setStatus('current')
qllc_ls_stats_num_errs = mib_table_column((1, 3, 6, 1, 4, 1, 9, 10, 6, 1, 3, 1, 22), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
qllcLSStatsNumErrs.setStatus('current')
qllc_mib_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 9, 10, 6, 2))
qllc_mib_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 9, 10, 6, 2, 1))
qllc_mib_groups = mib_identifier((1, 3, 6, 1, 4, 1, 9, 10, 6, 2, 2))
qllc_mib_compliance = module_compliance((1, 3, 6, 1, 4, 1, 9, 10, 6, 2, 1, 1)).setObjects(('CISCO-QLLC01-MIB', 'qllcLSAdminGroup'), ('CISCO-QLLC01-MIB', 'qllcLSOperGroup'), ('CISCO-QLLC01-MIB', 'qllcLSStatsGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
qllc_mib_compliance = qllcMibCompliance.setStatus('current')
qllc_ls_admin_group = object_group((1, 3, 6, 1, 4, 1, 9, 10, 6, 2, 2, 1)).setObjects(('CISCO-QLLC01-MIB', 'qllcLSAdminIfIndex'), ('CISCO-QLLC01-MIB', 'qllcLSAdminLciVcIndex'), ('CISCO-QLLC01-MIB', 'qllcLSAdminRole'), ('CISCO-QLLC01-MIB', 'qllcLSAdminCircuitType'), ('CISCO-QLLC01-MIB', 'qllcLSAdminX25Add'), ('CISCO-QLLC01-MIB', 'qllcLSAdminModulo'), ('CISCO-QLLC01-MIB', 'qllcLSAdminLgX25'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
qllc_ls_admin_group = qllcLSAdminGroup.setStatus('current')
qllc_ls_oper_group = object_group((1, 3, 6, 1, 4, 1, 9, 10, 6, 2, 2, 2)).setObjects(('CISCO-QLLC01-MIB', 'qllcLSOperIfIndex'), ('CISCO-QLLC01-MIB', 'qllcLSOperLciVcIndex'), ('CISCO-QLLC01-MIB', 'qllcLSOperCircuitType'), ('CISCO-QLLC01-MIB', 'qllcLSOperRole'), ('CISCO-QLLC01-MIB', 'qllcLSOperX25Add'), ('CISCO-QLLC01-MIB', 'qllcLSOperModulo'), ('CISCO-QLLC01-MIB', 'qllcLSOperState'), ('CISCO-QLLC01-MIB', 'qllcLSOperLgX25'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
qllc_ls_oper_group = qllcLSOperGroup.setStatus('current')
qllc_ls_stats_group = object_group((1, 3, 6, 1, 4, 1, 9, 10, 6, 2, 2, 3)).setObjects(('CISCO-QLLC01-MIB', 'qllcLSStatsIfIndex'), ('CISCO-QLLC01-MIB', 'qllcLSStatsLciVcIndex'), ('CISCO-QLLC01-MIB', 'qllcLSStatsXidIn'), ('CISCO-QLLC01-MIB', 'qllcLSStatsXidOut'), ('CISCO-QLLC01-MIB', 'qllcLSStatsTestIn'), ('CISCO-QLLC01-MIB', 'qllcLSStatsTestOut'), ('CISCO-QLLC01-MIB', 'qllcLSStatsQuenchOff'), ('CISCO-QLLC01-MIB', 'qllcLSStatsQuenchOn'), ('CISCO-QLLC01-MIB', 'qllcLSStatsInPaks'), ('CISCO-QLLC01-MIB', 'qllcLSStatsOutPaks'), ('CISCO-QLLC01-MIB', 'qllcLSStatsInBytes'), ('CISCO-QLLC01-MIB', 'qllcLSStatsOutBytes'), ('CISCO-QLLC01-MIB', 'qllcLSStatsNumRcvQsms'), ('CISCO-QLLC01-MIB', 'qllcLSStatsNumSndQsms'), ('CISCO-QLLC01-MIB', 'qllcLSStatsNumRcvDiscs'), ('CISCO-QLLC01-MIB', 'qllcLSStatsNumSndDiscs'), ('CISCO-QLLC01-MIB', 'qllcLSStatsNumRcvDms'), ('CISCO-QLLC01-MIB', 'qllcLSStatsNumSndDms'), ('CISCO-QLLC01-MIB', 'qllcLSStatsNumRcvFrmrs'), ('CISCO-QLLC01-MIB', 'qllcLSStatsNumSndFrmrs'), ('CISCO-QLLC01-MIB', 'qllcLSStatsNumDrops'), ('CISCO-QLLC01-MIB', 'qllcLSStatsNumErrs'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
qllc_ls_stats_group = qllcLSStatsGroup.setStatus('current')
mibBuilder.exportSymbols('CISCO-QLLC01-MIB', qllcLSAdminModulo=qllcLSAdminModulo, qllcLSOperX25Add=qllcLSOperX25Add, qllcLSStatsQuenchOff=qllcLSStatsQuenchOff, qllcLSStatsNumRcvDiscs=qllcLSStatsNumRcvDiscs, qllcLSOperLgX25=qllcLSOperLgX25, qllcLSAdminX25Add=qllcLSAdminX25Add, qllcLSOperRole=qllcLSOperRole, qllcLSStatsEntry=qllcLSStatsEntry, qllcLSStatsNumSndQsms=qllcLSStatsNumSndQsms, qllcMibGroups=qllcMibGroups, qllcLSStatsGroup=qllcLSStatsGroup, qllcLSStatsTestOut=qllcLSStatsTestOut, qllcLSStatsIfIndex=qllcLSStatsIfIndex, qllcMibCompliances=qllcMibCompliances, qllcLSStatsNumErrs=qllcLSStatsNumErrs, qllcLSStatsNumDrops=qllcLSStatsNumDrops, qllcLSOperState=qllcLSOperState, qllcLSAdminIfIndex=qllcLSAdminIfIndex, qllcLSOperTable=qllcLSOperTable, qllcLSOperCircuitType=qllcLSOperCircuitType, qllcLSStatsLciVcIndex=qllcLSStatsLciVcIndex, PYSNMP_MODULE_ID=snaqllc01, qllcLSOperIfIndex=qllcLSOperIfIndex, X121Address=X121Address, qllcLSAdminRole=qllcLSAdminRole, qllcLSAdminLciVcIndex=qllcLSAdminLciVcIndex, qllcLSAdminTable=qllcLSAdminTable, qllcLSStatsInPaks=qllcLSStatsInPaks, qllcLSStatsOutPaks=qllcLSStatsOutPaks, qllcLSAdminLgX25=qllcLSAdminLgX25, IfIndexType=IfIndexType, qllcLSOperEntry=qllcLSOperEntry, qllcLSOperModulo=qllcLSOperModulo, qllc=qllc, qllcLSStatsQuenchOn=qllcLSStatsQuenchOn, qllcLSOperGroup=qllcLSOperGroup, qllcLSStatsTestIn=qllcLSStatsTestIn, qllcLSStatsNumRcvFrmrs=qllcLSStatsNumRcvFrmrs, qllcMibCompliance=qllcMibCompliance, qllcLSStatsNumRcvDms=qllcLSStatsNumRcvDms, qllcLSAdminCircuitType=qllcLSAdminCircuitType, snaqllc01=snaqllc01, qllcLSStatsTable=qllcLSStatsTable, qllcLSStatsNumSndDms=qllcLSStatsNumSndDms, qllcLSAdminGroup=qllcLSAdminGroup, qllcLSAdminEntry=qllcLSAdminEntry, qllcLSStatsXidIn=qllcLSStatsXidIn, qllcMibConformance=qllcMibConformance, qllcLSStatsXidOut=qllcLSStatsXidOut, qllcLSStatsOutBytes=qllcLSStatsOutBytes, qllcLSOperLciVcIndex=qllcLSOperLciVcIndex, qllcLSStatsInBytes=qllcLSStatsInBytes, qllcLSStatsNumSndDiscs=qllcLSStatsNumSndDiscs, qllcLSStatsNumSndFrmrs=qllcLSStatsNumSndFrmrs, qllcLSStatsNumRcvQsms=qllcLSStatsNumRcvQsms) |
# Thrown by WikiData classes
class AppBaseException(Exception):
def __init__(self, message="", tag=None):
Exception.__init__(self, message)
self.tag = tag
def getTag(self):
return self.tag
class WikiDataException(AppBaseException): pass
class WikiWordNotFoundException(WikiDataException): pass
class WikiFileNotFoundException(WikiDataException): pass
class WikiDBExistsException(WikiDataException): pass
class NoPageAstException(AppBaseException): pass
# For non-Windows systems
try:
WindowsError
except NameError:
class WindowsError(Exception): pass
class DbAccessError(AppBaseException):
"""
Base classes for read or write errors when acessing database
where "database" also means wiki configuration and additional
files.
"""
def __init__(self, originalException):
AppBaseException.__init__(self, str(originalException))
self.originalException = originalException
def getOriginalException(self):
return self.originalException
class DbReadAccessError(DbAccessError):
"""
Impossible to read (and therefore also to write to) database
"""
pass
class DbWriteAccessError(DbAccessError):
"""
Impossible to write to database, reading may be possible
"""
pass
class RenameWikiWordException(AppBaseException):
"""
Raised on problems with renaming multiple wikiwords at once.
Constructed in
WikiDataManager.WikiDataManager.buildRenameSeqWithSubpages()
"""
# Problems:
# Multiple words should be renamed to same word
PRB_RENAME_TO_SAME = 1
# Word to rename to exist already
PRB_TO_ALREADY_EXISTS = 2
def __init__(self, affectedRenames):
"""
affectedRenames -- list of tuples (fromWikiWord, toWikiWord, problem)
where problem is one of the PRB_* constants of the class.
"""
self.affectedRenames = affectedRenames
def getAffectedRenames(self):
return self.affectedRenames
def getFlowText(self):
"""
Return affectedRenames as multiple-line human readable text
"""
# TODO Move definition outside (attn to i18n)
PROBLEM_HR_DICT = {
self.PRB_RENAME_TO_SAME: _(u"Multiple words rename to same word"),
self.PRB_TO_ALREADY_EXISTS: _(u"Word already exists")
}
result = []
for fromWikiWord, toWikiWord, problem in self.affectedRenames:
result.append(u"%s -> %s: %s" % (fromWikiWord, toWikiWord,
PROBLEM_HR_DICT[problem]))
return u"\n".join(result)
class InternalError(AppBaseException): pass
class ExportException(AppBaseException): pass
class ImportException(AppBaseException): pass
# See Serialization.py
class SerializationException(AppBaseException): pass
class VersioningException(AppBaseException): pass
# See WikiDataManager.py. Thrown if requested handler for db backend isn't
# available
class NoDbHandlerException(AppBaseException): pass
class WrongDbHandlerException(AppBaseException): pass
class DbHandlerNotAvailableException(AppBaseException): pass
class UnknownDbHandlerException(AppBaseException): pass
# See WikiDataManager.py. Thrown if requested handler for wiki language isn't
# available
class UnknownWikiLanguageException(AppBaseException): pass
class WrongWikiLanguageException(AppBaseException): pass
class MissingConfigurationFileException(AppBaseException): pass
class BadConfigurationFileException(AppBaseException): pass
class LockedWikiException(AppBaseException): pass
class NotCurrentThreadException(AppBaseException): pass
class UserAbortException(AppBaseException): pass
class DeadBlockPreventionTimeOutError(InternalError): pass
class BadFuncPageTagException(AppBaseException): pass
| class Appbaseexception(Exception):
def __init__(self, message='', tag=None):
Exception.__init__(self, message)
self.tag = tag
def get_tag(self):
return self.tag
class Wikidataexception(AppBaseException):
pass
class Wikiwordnotfoundexception(WikiDataException):
pass
class Wikifilenotfoundexception(WikiDataException):
pass
class Wikidbexistsexception(WikiDataException):
pass
class Nopageastexception(AppBaseException):
pass
try:
WindowsError
except NameError:
class Windowserror(Exception):
pass
class Dbaccesserror(AppBaseException):
"""
Base classes for read or write errors when acessing database
where "database" also means wiki configuration and additional
files.
"""
def __init__(self, originalException):
AppBaseException.__init__(self, str(originalException))
self.originalException = originalException
def get_original_exception(self):
return self.originalException
class Dbreadaccesserror(DbAccessError):
"""
Impossible to read (and therefore also to write to) database
"""
pass
class Dbwriteaccesserror(DbAccessError):
"""
Impossible to write to database, reading may be possible
"""
pass
class Renamewikiwordexception(AppBaseException):
"""
Raised on problems with renaming multiple wikiwords at once.
Constructed in
WikiDataManager.WikiDataManager.buildRenameSeqWithSubpages()
"""
prb_rename_to_same = 1
prb_to_already_exists = 2
def __init__(self, affectedRenames):
"""
affectedRenames -- list of tuples (fromWikiWord, toWikiWord, problem)
where problem is one of the PRB_* constants of the class.
"""
self.affectedRenames = affectedRenames
def get_affected_renames(self):
return self.affectedRenames
def get_flow_text(self):
"""
Return affectedRenames as multiple-line human readable text
"""
problem_hr_dict = {self.PRB_RENAME_TO_SAME: _(u'Multiple words rename to same word'), self.PRB_TO_ALREADY_EXISTS: _(u'Word already exists')}
result = []
for (from_wiki_word, to_wiki_word, problem) in self.affectedRenames:
result.append(u'%s -> %s: %s' % (fromWikiWord, toWikiWord, PROBLEM_HR_DICT[problem]))
return u'\n'.join(result)
class Internalerror(AppBaseException):
pass
class Exportexception(AppBaseException):
pass
class Importexception(AppBaseException):
pass
class Serializationexception(AppBaseException):
pass
class Versioningexception(AppBaseException):
pass
class Nodbhandlerexception(AppBaseException):
pass
class Wrongdbhandlerexception(AppBaseException):
pass
class Dbhandlernotavailableexception(AppBaseException):
pass
class Unknowndbhandlerexception(AppBaseException):
pass
class Unknownwikilanguageexception(AppBaseException):
pass
class Wrongwikilanguageexception(AppBaseException):
pass
class Missingconfigurationfileexception(AppBaseException):
pass
class Badconfigurationfileexception(AppBaseException):
pass
class Lockedwikiexception(AppBaseException):
pass
class Notcurrentthreadexception(AppBaseException):
pass
class Userabortexception(AppBaseException):
pass
class Deadblockpreventiontimeouterror(InternalError):
pass
class Badfuncpagetagexception(AppBaseException):
pass |
def capitalize(string):
new = ''
for i in range(0,len(string)):
if i == 0:
new += string[i].upper()
elif string[i - 1] == ' ':
new += string[i].upper()
else :
new += string[i]
return new | def capitalize(string):
new = ''
for i in range(0, len(string)):
if i == 0:
new += string[i].upper()
elif string[i - 1] == ' ':
new += string[i].upper()
else:
new += string[i]
return new |
numbers = (input("").split())
a=int(numbers[0])
b=int(numbers[1])
if a == b:
print(0)
else:
print(1) | numbers = input('').split()
a = int(numbers[0])
b = int(numbers[1])
if a == b:
print(0)
else:
print(1) |
@bot.command()
async def meme(ctx):
msg = await ctx.send("<a:loading:900379618924716052> Processing")
r = requests.get('https://meme-api.herokuapp.com/gimme')
x = r.text
y = json.loads(x)
title = y["title"]
url = y["url"]
author = y["author"]
embed = discord.Embed(title=f"{title}", color=0x01f960)
embed.set_image(url=url)
embed.set_footer(text=f"Provided by {author}")
await ctx.send(embed=embed)
await msg.delete()
| @bot.command()
async def meme(ctx):
msg = await ctx.send('<a:loading:900379618924716052> Processing')
r = requests.get('https://meme-api.herokuapp.com/gimme')
x = r.text
y = json.loads(x)
title = y['title']
url = y['url']
author = y['author']
embed = discord.Embed(title=f'{title}', color=129376)
embed.set_image(url=url)
embed.set_footer(text=f'Provided by {author}')
await ctx.send(embed=embed)
await msg.delete() |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.