content stringlengths 7 1.05M | fixed_cases stringlengths 1 1.28M |
|---|---|
#!/usr/bin/env python
def start():
print("Hello, world.")
if __name__ == '__main__':
start()
| def start():
print('Hello, world.')
if __name__ == '__main__':
start() |
numbers = [3, 6, 2, 8, 4, 10]
max = numbers[0]
for number in numbers:
if number > max:
max = number
print(max) | numbers = [3, 6, 2, 8, 4, 10]
max = numbers[0]
for number in numbers:
if number > max:
max = number
print(max) |
class StateMachineException(Exception):
def __init__(self, message_format, **kwargs):
if kwargs:
self.message = message_format.format(**kwargs)
else:
self.message = message_format
self.__dict__.update(**kwargs)
def __str__(self):
return self.message
class IncorrectInitialState(StateMachineException):
pass
class StateChangedElsewhere(StateMachineException):
pass
class MultipleMachineAncestors(StateMachineException):
pass
class IncorrectSummary(StateMachineException):
pass
class InheritedFromState(StateMachineException):
pass
class CannotInferOutputState(StateMachineException):
pass
class DuplicateStateNames(StateMachineException):
pass
class DuplicateOutputStates(StateMachineException):
pass
class UnknownOutputState(StateMachineException):
pass
class ReturnedInvalidState(StateMachineException):
pass
class GetStateDidNotReturnState(StateMachineException):
pass
class DjangoStateAttrNameWarning(Warning):
pass
| class Statemachineexception(Exception):
def __init__(self, message_format, **kwargs):
if kwargs:
self.message = message_format.format(**kwargs)
else:
self.message = message_format
self.__dict__.update(**kwargs)
def __str__(self):
return self.message
class Incorrectinitialstate(StateMachineException):
pass
class Statechangedelsewhere(StateMachineException):
pass
class Multiplemachineancestors(StateMachineException):
pass
class Incorrectsummary(StateMachineException):
pass
class Inheritedfromstate(StateMachineException):
pass
class Cannotinferoutputstate(StateMachineException):
pass
class Duplicatestatenames(StateMachineException):
pass
class Duplicateoutputstates(StateMachineException):
pass
class Unknownoutputstate(StateMachineException):
pass
class Returnedinvalidstate(StateMachineException):
pass
class Getstatedidnotreturnstate(StateMachineException):
pass
class Djangostateattrnamewarning(Warning):
pass |
#!/usr/bin/python3
# -*- coding: utf-8 -*-
class DataSet:
def __init__(self,
src_channels_url: str,
injection_file_name: str,
out_file_name: str,
out_file_encoding: str,
out_file_first_line: str,
out_file_format: str,
filter_file_name: str,
clean_filter: bool) -> None:
self._src_channels_url: str = src_channels_url
self._injection_file_name: str = injection_file_name
self._out_file_name: str = out_file_name
self._out_file_encoding: str = out_file_encoding
self._out_file_first_line: str = out_file_first_line
self._out_file_format: str = out_file_format
self._filter_file_name: str = filter_file_name
self._clean_filter: bool = clean_filter
@property
def src_channels_url(self) -> str:
return self._src_channels_url
@property
def injection_file_name(self) -> str:
return self._injection_file_name
@property
def out_file_name(self) -> str:
return self._out_file_name
@property
def out_file_encoding(self) -> str:
return self._out_file_encoding
@property
def out_file_first_line(self) -> str:
return self._out_file_first_line
@property
def out_file_format(self) -> str:
return self._out_file_format
@property
def filter_file_name(self) -> str:
return self._filter_file_name
@property
def clean_filter(self) -> bool:
return self._clean_filter
| class Dataset:
def __init__(self, src_channels_url: str, injection_file_name: str, out_file_name: str, out_file_encoding: str, out_file_first_line: str, out_file_format: str, filter_file_name: str, clean_filter: bool) -> None:
self._src_channels_url: str = src_channels_url
self._injection_file_name: str = injection_file_name
self._out_file_name: str = out_file_name
self._out_file_encoding: str = out_file_encoding
self._out_file_first_line: str = out_file_first_line
self._out_file_format: str = out_file_format
self._filter_file_name: str = filter_file_name
self._clean_filter: bool = clean_filter
@property
def src_channels_url(self) -> str:
return self._src_channels_url
@property
def injection_file_name(self) -> str:
return self._injection_file_name
@property
def out_file_name(self) -> str:
return self._out_file_name
@property
def out_file_encoding(self) -> str:
return self._out_file_encoding
@property
def out_file_first_line(self) -> str:
return self._out_file_first_line
@property
def out_file_format(self) -> str:
return self._out_file_format
@property
def filter_file_name(self) -> str:
return self._filter_file_name
@property
def clean_filter(self) -> bool:
return self._clean_filter |
sys_word = {}
for x in range(0,325):
sys_word[x] = 0
file = open("UAD-0015.txt", "r+")
words = file.read().split()
file.close()
for word in words:
sys_word[int(word)] += 1
for x in range(0,325):
sys_word[x] = sys_word[x]/int(325)
file_ = open("a_1.txt", "w")
for x in range(0,325):
if x is 324:
file_.write(str(sys_word[x]) + "\n")
else:
file_.write(str(sys_word[x]) + ",")
file_.close()
print(sys_word)
| sys_word = {}
for x in range(0, 325):
sys_word[x] = 0
file = open('UAD-0015.txt', 'r+')
words = file.read().split()
file.close()
for word in words:
sys_word[int(word)] += 1
for x in range(0, 325):
sys_word[x] = sys_word[x] / int(325)
file_ = open('a_1.txt', 'w')
for x in range(0, 325):
if x is 324:
file_.write(str(sys_word[x]) + '\n')
else:
file_.write(str(sys_word[x]) + ',')
file_.close()
print(sys_word) |
#Soumya Pal
#Assignment 2 part 4
info = {
"name": "Shomo Pal",
"favorite_color": "Blue",
"favorite_number": 10,
"favorite_movies": ["Inception","The Shashank Redemption","One Piece (Anime not movie)"],
"favorite_songs" : [{'artist': 'Metallica', 'title': 'Nothing Else Matters'},
{'artist': 'Nirvana', 'title': 'Come as you are'}]
}
print(info["name"])
print(info["favorite_color"])
print(info["favorite_number"])
print("Movies:")
for movie_title in info["favorite_movies"]:
print("\t"+ movie_title)
print("Songs:")
for song_info in info["favorite_songs"]:
print(f"\t{song_info['artist']}: {song_info['title']}") | info = {'name': 'Shomo Pal', 'favorite_color': 'Blue', 'favorite_number': 10, 'favorite_movies': ['Inception', 'The Shashank Redemption', 'One Piece (Anime not movie)'], 'favorite_songs': [{'artist': 'Metallica', 'title': 'Nothing Else Matters'}, {'artist': 'Nirvana', 'title': 'Come as you are'}]}
print(info['name'])
print(info['favorite_color'])
print(info['favorite_number'])
print('Movies:')
for movie_title in info['favorite_movies']:
print('\t' + movie_title)
print('Songs:')
for song_info in info['favorite_songs']:
print(f"\t{song_info['artist']}: {song_info['title']}") |
class Solution:
# @param {integer[][]} grid
# @return {integer}
def minPathSum(self, grid):
n = len(grid);
m = len(grid[0]);
p = [([0] * m) for i in range(n)]
p[0][0] = grid[0][0];
for k in range (1, n):
p[k][0] = p[k-1][0]+grid[k][0];
for k in range (1, m):
p[0][k] = p[0][k-1]+grid[0][k];
for i in range (1, n):
for j in range (1, m):
p[i][j] = min(p[i-1][j], p[i][j-1]) + grid[i][j];
return p[n-1][m-1];
| class Solution:
def min_path_sum(self, grid):
n = len(grid)
m = len(grid[0])
p = [[0] * m for i in range(n)]
p[0][0] = grid[0][0]
for k in range(1, n):
p[k][0] = p[k - 1][0] + grid[k][0]
for k in range(1, m):
p[0][k] = p[0][k - 1] + grid[0][k]
for i in range(1, n):
for j in range(1, m):
p[i][j] = min(p[i - 1][j], p[i][j - 1]) + grid[i][j]
return p[n - 1][m - 1] |
# Cidades: Crie um dicionario chamado cities. Use os nomes de tres cidades como chaves em seu dicionario. Crie um dicionario com informacoes sobre cada cidade e inclua o pais em que a cidade esta localizada, a populacao aproximada e um fato sobre essa cidade. As chaves do dicionario de cada cidade devem ser algo como coutry, population e fact. Apresente o nome de cada cidade e todas as informacoes que voce armazenou sobre ela.
cities = {
'maputo': {
'coutry': 'mozambique',
'population': '12.488.246',
'fact': 'corupt coutry'
},
'sao paulo': {
'coutry': 'brazil',
'population': '145.264.218',
'fact': 'beautiful people'
},
'lisbon': {
'coutry': 'portugal',
'population': '10.264.254',
'fact': 'racist'
}
}
for key, value in cities.items():
print(f"{key} city:".title())
for k, v in value.items():
print(f"{k} => {v}".title())
print("=="*10)
| cities = {'maputo': {'coutry': 'mozambique', 'population': '12.488.246', 'fact': 'corupt coutry'}, 'sao paulo': {'coutry': 'brazil', 'population': '145.264.218', 'fact': 'beautiful people'}, 'lisbon': {'coutry': 'portugal', 'population': '10.264.254', 'fact': 'racist'}}
for (key, value) in cities.items():
print(f'{key} city:'.title())
for (k, v) in value.items():
print(f'{k} => {v}'.title())
print('==' * 10) |
feedback_poly = {
2: [1],
3: [2],
4: [3],
5: [3],
6: [5],
7: [6],
8: [6, 5, 4],
9: [5],
10: [7],
11: [9],
12: [11, 10, 4],
13: [12, 11, 8],
14: [13, 12, 2],
15: [14],
16: [14, 13, 11],
17: [14],
18: [11],
19: [18, 17, 14],
20: [17],
21: [19],
22: [21],
23: [18],
24: [23, 22, 17]
}
def one_hot_encode(n):
coeffs = []
coeffs.append(1)
for i in range(1, n):
if i in feedback_poly[n]:
coeffs.append(1)
else:
coeffs.append(0)
return coeffs
| feedback_poly = {2: [1], 3: [2], 4: [3], 5: [3], 6: [5], 7: [6], 8: [6, 5, 4], 9: [5], 10: [7], 11: [9], 12: [11, 10, 4], 13: [12, 11, 8], 14: [13, 12, 2], 15: [14], 16: [14, 13, 11], 17: [14], 18: [11], 19: [18, 17, 14], 20: [17], 21: [19], 22: [21], 23: [18], 24: [23, 22, 17]}
def one_hot_encode(n):
coeffs = []
coeffs.append(1)
for i in range(1, n):
if i in feedback_poly[n]:
coeffs.append(1)
else:
coeffs.append(0)
return coeffs |
# Generated by h2py from /usr/include/sys/event.h
EVFILT_READ = (-1)
EVFILT_WRITE = (-2)
EVFILT_AIO = (-3)
EVFILT_VNODE = (-4)
EVFILT_PROC = (-5)
EVFILT_SIGNAL = (-6)
EVFILT_SYSCOUNT = 6
EV_ADD = 0x0001
EV_DELETE = 0x0002
EV_ENABLE = 0x0004
EV_DISABLE = 0x0008
EV_ONESHOT = 0x0010
EV_CLEAR = 0x0020
EV_SYSFLAGS = 0xF000
EV_FLAG1 = 0x2000
EV_EOF = 0x8000
EV_ERROR = 0x4000
NOTE_DELETE = 0x0001
NOTE_WRITE = 0x0002
NOTE_EXTEND = 0x0004
NOTE_ATTRIB = 0x0008
NOTE_LINK = 0x0010
NOTE_RENAME = 0x0020
NOTE_EXIT = 0x80000000
NOTE_FORK = 0x40000000
NOTE_EXEC = 0x20000000
NOTE_PCTRLMASK = 0xf0000000
NOTE_PDATAMASK = 0x000fffff
NOTE_TRACK = 0x00000001
NOTE_TRACKERR = 0x00000002
NOTE_CHILD = 0x00000004
| evfilt_read = -1
evfilt_write = -2
evfilt_aio = -3
evfilt_vnode = -4
evfilt_proc = -5
evfilt_signal = -6
evfilt_syscount = 6
ev_add = 1
ev_delete = 2
ev_enable = 4
ev_disable = 8
ev_oneshot = 16
ev_clear = 32
ev_sysflags = 61440
ev_flag1 = 8192
ev_eof = 32768
ev_error = 16384
note_delete = 1
note_write = 2
note_extend = 4
note_attrib = 8
note_link = 16
note_rename = 32
note_exit = 2147483648
note_fork = 1073741824
note_exec = 536870912
note_pctrlmask = 4026531840
note_pdatamask = 1048575
note_track = 1
note_trackerr = 2
note_child = 4 |
a = 1
b = 2
c = 3
print(a)
print(b)
print(c)
| a = 1
b = 2
c = 3
print(a)
print(b)
print(c) |
default_prefix = "DWB"
known_chains = {
"BEX": {
"chain_id": "38f14b346eb697ba04ae0f5adcfaa0a437ed3711197704aa256a14cb9b4a8f26",
"prefix": "DWB",
"dpay_symbol": "BEX",
"bbd_symbol": "BBD",
"vests_symbol": "VESTS",
},
"BET": {
"chain_id":
"9afbce9f2416520733bacb370315d32b6b2c43d6097576df1c1222859d91eecc",
"prefix":
"DWT",
"dpay_symbol":
"BET",
"bbd_symbol":
"TBD",
"vests_symbol":
"VESTS",
},
}
| default_prefix = 'DWB'
known_chains = {'BEX': {'chain_id': '38f14b346eb697ba04ae0f5adcfaa0a437ed3711197704aa256a14cb9b4a8f26', 'prefix': 'DWB', 'dpay_symbol': 'BEX', 'bbd_symbol': 'BBD', 'vests_symbol': 'VESTS'}, 'BET': {'chain_id': '9afbce9f2416520733bacb370315d32b6b2c43d6097576df1c1222859d91eecc', 'prefix': 'DWT', 'dpay_symbol': 'BET', 'bbd_symbol': 'TBD', 'vests_symbol': 'VESTS'}} |
# RemoveDuplicatesfromSortedArray.py
# weird accepted answer that doesn't actually remove anything.
class Solution:
def removeDuplicates(self, nums: List[int]) -> int:
if (len(nums)==0):
return 0
i=0
j=0
while j < len(nums):
# print(nums, i , j)
if (nums[j]!=nums[i]):
i+=1
nums[i]=nums[j]
j+=1
# print(nums, i+1)
return i+1 | class Solution:
def remove_duplicates(self, nums: List[int]) -> int:
if len(nums) == 0:
return 0
i = 0
j = 0
while j < len(nums):
if nums[j] != nums[i]:
i += 1
nums[i] = nums[j]
j += 1
return i + 1 |
# Values obtained from running against the Fuss & Navarro 2009 reference implementation
vals = [(0.3325402105490861,
0.18224585277734096,
2.0210322268188046,
0.37178992456396914,
0.7513994191503139,
1.6883221884854474,
1.0,
0.082198565245068272),
(-0.13074510229340497,
0.44696631528174735,
2.4890334572448456,
0.3816245478330931,
0.9498762676625047,
1.0790903665954314,
0.1,
0.41591722288506577),
(0.6056010862462016,
0.16871208306308166,
1.5524386791394562,
0.1286318302691049,
0.19969302867825994,
0.3836652143729468,
1e-07,
0.62063048896871487),
(0.3895703269526853,
0.3435094918413777,
2.1750677359226023,
0.25344975464683345,
0.5512703840098271,
3.688305473258689,
0.01,
0.0090709779903460266),
(0.42003699302964476,
0.10014569263424461,
2.3012075231555444,
0.0019673685361806803,
0.004527323276278492,
3.009144940928847,
0.0001,
0.0001884560320134888),
(-0.5255928511420052,
0.41071488550017876,
2.2389065101119003,
0.2301372155046244,
0.515255710012329,
0.5621315133209579,
1e-05,
1.8640810217155657),
(0.008338807811151538,
0.30523807964872274,
2.4560203575759623,
0.032544407891560656,
0.07992972830692877,
3.802538736807515,
1e-05,
0.0030406047220150243),
(-0.709463423093855,
0.07788052784603428,
2.0241086070651075,
0.1491208977241244,
0.3018368925766758,
1.213966089059249,
1.0,
0.082017502354950353),
(0.460913299169564,
0.2168584116589385,
2.298380160881188,
0.4461371311255309,
1.0253927312113693,
0.25156507383357796,
0.0001,
1.0372891338943479e-05),
(-0.6117806447011472,
0.49463268264815274,
1.9686542627132415,
0.25832570907838626,
0.5085540083455858,
1.94831451612509,
0.001,
0.097069006460126561),
(0.32861624103817627,
0.12335537773273014,
2.002692863678406,
0.47249065415592595,
0.9462536612328146,
2.796439295540539,
0.001,
0.018459337529972406),
(0.021183546657572494,
0.47799029047254493,
2.3569808966748047,
0.4855005752397232,
1.1443155811646561,
2.610216277868382,
0.1,
0.082974887901830302),
(0.7175299762398688,
0.3566056886339434,
2.220795104898356,
0.45773365470000554,
1.0165326597050066,
2.1966769477884225,
1e-07,
0.030138660738276948),
(-0.7178918281791459,
0.057776773410309845,
1.9358335812071767,
0.10703342161705387,
0.20719889187779905,
1.9963028315012206,
0.01,
0.015193622821588188),
(0.38713456753496744,
0.07157449665799648,
2.2096131432869957,
0.017240717413939843,
0.038095315797538463,
3.426246718806154,
1e-07,
0.00089937286951603833),
(0.7331877690347837,
0.46552429958519015,
1.8562721149635684,
0.34330970798729826,
0.6372762377331072,
1.6101500341565407,
1.0,
0.071864719581762077),
(-0.006430595681853335,
0.1207541730285373,
1.6676102104060564,
0.2604537143639433,
0.4343352734114944,
0.7713437644783603,
1.0,
0.26065820692218827),
(-0.5187897244595112,
0.21532637320553233,
2.481938472673327,
0.18482168074390404,
0.4587160400224425,
1.0697490678038166,
1e-09,
0.23165988979463398),
(-0.24925121543920914,
0.05753410930092823,
2.1709492103847565,
0.477487812061141,
1.036601788562479,
2.211403925199262,
1e-08,
0.084455290527924637),
(-0.5719411096293123,
0.28837526790403306,
2.1929805341020145,
0.2243768947148022,
0.49205416241181843,
1.0791694385505024,
1e-10,
0.27868915917309367)]
| vals = [(0.3325402105490861, 0.18224585277734096, 2.0210322268188046, 0.37178992456396914, 0.7513994191503139, 1.6883221884854474, 1.0, 0.08219856524506827), (-0.13074510229340497, 0.44696631528174735, 2.4890334572448456, 0.3816245478330931, 0.9498762676625047, 1.0790903665954314, 0.1, 0.4159172228850658), (0.6056010862462016, 0.16871208306308166, 1.5524386791394562, 0.1286318302691049, 0.19969302867825994, 0.3836652143729468, 1e-07, 0.6206304889687149), (0.3895703269526853, 0.3435094918413777, 2.1750677359226023, 0.25344975464683345, 0.5512703840098271, 3.688305473258689, 0.01, 0.009070977990346027), (0.42003699302964476, 0.10014569263424461, 2.3012075231555444, 0.0019673685361806803, 0.004527323276278492, 3.009144940928847, 0.0001, 0.0001884560320134888), (-0.5255928511420052, 0.41071488550017876, 2.2389065101119003, 0.2301372155046244, 0.515255710012329, 0.5621315133209579, 1e-05, 1.8640810217155657), (0.008338807811151538, 0.30523807964872274, 2.4560203575759623, 0.032544407891560656, 0.07992972830692877, 3.802538736807515, 1e-05, 0.0030406047220150243), (-0.709463423093855, 0.07788052784603428, 2.0241086070651075, 0.1491208977241244, 0.3018368925766758, 1.213966089059249, 1.0, 0.08201750235495035), (0.460913299169564, 0.2168584116589385, 2.298380160881188, 0.4461371311255309, 1.0253927312113693, 0.25156507383357796, 0.0001, 1.0372891338943479e-05), (-0.6117806447011472, 0.49463268264815274, 1.9686542627132415, 0.25832570907838626, 0.5085540083455858, 1.94831451612509, 0.001, 0.09706900646012656), (0.32861624103817627, 0.12335537773273014, 2.002692863678406, 0.47249065415592595, 0.9462536612328146, 2.796439295540539, 0.001, 0.018459337529972406), (0.021183546657572494, 0.47799029047254493, 2.3569808966748047, 0.4855005752397232, 1.1443155811646561, 2.610216277868382, 0.1, 0.0829748879018303), (0.7175299762398688, 0.3566056886339434, 2.220795104898356, 0.45773365470000554, 1.0165326597050066, 2.1966769477884225, 1e-07, 0.030138660738276948), (-0.7178918281791459, 0.057776773410309845, 1.9358335812071767, 0.10703342161705387, 0.20719889187779905, 1.9963028315012206, 0.01, 0.015193622821588188), (0.38713456753496744, 0.07157449665799648, 2.2096131432869957, 0.017240717413939843, 0.038095315797538463, 3.426246718806154, 1e-07, 0.0008993728695160383), (0.7331877690347837, 0.46552429958519015, 1.8562721149635684, 0.34330970798729826, 0.6372762377331072, 1.6101500341565407, 1.0, 0.07186471958176208), (-0.006430595681853335, 0.1207541730285373, 1.6676102104060564, 0.2604537143639433, 0.4343352734114944, 0.7713437644783603, 1.0, 0.2606582069221883), (-0.5187897244595112, 0.21532637320553233, 2.481938472673327, 0.18482168074390404, 0.4587160400224425, 1.0697490678038166, 1e-09, 0.23165988979463398), (-0.24925121543920914, 0.05753410930092823, 2.1709492103847565, 0.477487812061141, 1.036601788562479, 2.211403925199262, 1e-08, 0.08445529052792464), (-0.5719411096293123, 0.28837526790403306, 2.1929805341020145, 0.2243768947148022, 0.49205416241181843, 1.0791694385505024, 1e-10, 0.27868915917309367)] |
class HourRange():
def __init__(self, start: int, end: int):
if start == end:
raise ValueError("Start and end may not be equal.")
if start < 0 or 23 < start:
raise ValueError("Invalid start value: " + str(start))
if end < 0 or 23 < end:
raise ValueError("Invalid end value: " + str(end))
if start < end:
self._offset = 0
self._start = start
self._end = end
else:
self._offset = 24 - start
self._start = 0
self._end = end + self._offset
assert self._end < 24
def is_in(self, hour: int) -> bool:
if hour < 0 or 23 < hour:
raise ValueError("Invalid value for hour: " + str(hour))
h = (hour + self._offset) % 24
assert 0 <= h and h < 24
return self._start <= h and h <= self._end
| class Hourrange:
def __init__(self, start: int, end: int):
if start == end:
raise value_error('Start and end may not be equal.')
if start < 0 or 23 < start:
raise value_error('Invalid start value: ' + str(start))
if end < 0 or 23 < end:
raise value_error('Invalid end value: ' + str(end))
if start < end:
self._offset = 0
self._start = start
self._end = end
else:
self._offset = 24 - start
self._start = 0
self._end = end + self._offset
assert self._end < 24
def is_in(self, hour: int) -> bool:
if hour < 0 or 23 < hour:
raise value_error('Invalid value for hour: ' + str(hour))
h = (hour + self._offset) % 24
assert 0 <= h and h < 24
return self._start <= h and h <= self._end |
class TreeNode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution:
def dfs(self, root:TreeNode, sum:int, cur_sum:int):
if not root.left and not root.right:
if cur_sum + root.val == sum:
return True
else:
return False
if root.left:
if self.dfs(root.left, sum, cur_sum + root.val):
return True
if root.right:
if self.dfs(root.right, sum, cur_sum + root.val):
return True
return False
def hasPathSum(self, root: TreeNode, sum: int) -> bool:
if not root:
return False
res = self.dfs(root, sum, 0)
return res
| class Treenode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution:
def dfs(self, root: TreeNode, sum: int, cur_sum: int):
if not root.left and (not root.right):
if cur_sum + root.val == sum:
return True
else:
return False
if root.left:
if self.dfs(root.left, sum, cur_sum + root.val):
return True
if root.right:
if self.dfs(root.right, sum, cur_sum + root.val):
return True
return False
def has_path_sum(self, root: TreeNode, sum: int) -> bool:
if not root:
return False
res = self.dfs(root, sum, 0)
return res |
def moeda(p = 0, moeda = 'R$'):
return (f'{moeda}{p:.2f}'.replace('.',','))
def metade(p = 0, formato=False):
res = p/2
return res if formato is False else moeda(res)
def dobro(p = 0, formato=False):
res = p*2
return res if formato is False else moeda(res)
def aumentar(p = 0, taxa = 0, formato=False):
res = p * (1+taxa/100)
return res if formato is False else moeda(res)
def diminuir(p = 0, taxa = 0, formato=False):
res = p - (p * taxa/100)
return res if formato is False else moeda(res) | def moeda(p=0, moeda='R$'):
return f'{moeda}{p:.2f}'.replace('.', ',')
def metade(p=0, formato=False):
res = p / 2
return res if formato is False else moeda(res)
def dobro(p=0, formato=False):
res = p * 2
return res if formato is False else moeda(res)
def aumentar(p=0, taxa=0, formato=False):
res = p * (1 + taxa / 100)
return res if formato is False else moeda(res)
def diminuir(p=0, taxa=0, formato=False):
res = p - p * taxa / 100
return res if formato is False else moeda(res) |
class BookReader:
country = 'South Korea'
print(BookReader.country )
BookReader.country = 'USA'
print(BookReader.country )
| class Bookreader:
country = 'South Korea'
print(BookReader.country)
BookReader.country = 'USA'
print(BookReader.country) |
# DESCRIPTION
# Given a string containing only three types of characters: '(', ')' and '*',
# write a function to check whether this string is valid.
# We define the validity of a string by these rules:
# Any left parenthesis '(' must have a corresponding right parenthesis ')'.
# Any right parenthesis ')' must have a corresponding left parenthesis '('.
# Left parenthesis '(' must go before the corresponding right parenthesis ')'.
# '*' could be treated as a single right parenthesis ')'
# or a single left parenthesis '(' or an empty string.
# An empty string is also valid.
# EXAMPLE 1:
# Input: "()"
# Output: True
# EXAMPLE 2:
# Input: "(*))"
# Output: True
class Solution:
def checkValidString(self, s: str) -> bool:
'''
Time: O(N), where N is the length of the string
Space: O(1), constant space no aux space used
'''
# Greedy Algorithm
# increments at '(' dec for ')'
cmin = 0
# incs '(' and '*' decs for ')'
cmax = 0
for i in s:
if i == '(':
cmax += 1
cmin += 1
if i == ')':
cmax -= 1
# not including itself find the max between cmin-1 and 0
# this makes sure cmin is not negative
cmin = max(cmin - 1, 0)
if i == '*':
cmax += 1
cmin = max(cmin - 1, 0)
if cmax < 0:
return False
return cmin == 0
| class Solution:
def check_valid_string(self, s: str) -> bool:
"""
Time: O(N), where N is the length of the string
Space: O(1), constant space no aux space used
"""
cmin = 0
cmax = 0
for i in s:
if i == '(':
cmax += 1
cmin += 1
if i == ')':
cmax -= 1
cmin = max(cmin - 1, 0)
if i == '*':
cmax += 1
cmin = max(cmin - 1, 0)
if cmax < 0:
return False
return cmin == 0 |
lines = open('dayfivedata.txt').read().split('\n')
ids = []
for line in lines:
top = 0; bottom = 127
for _ in range(7):
if 'F' in line[_]:
bottom = (top+bottom)//2
else:
top = (top+bottom)//2 + 1
left = 0; right = 7
for _ in range(7, 10):
if 'L' in line[_]:
right = (right+left)//2
else:
left = (right+left)//2 + 1
ids.append(top*8 + left)
ids.sort()
for _ in range(len(ids) - 1):
if ids[_] + 2 == ids[_+1]:
your_id = ids[_] + 1
break
print(your_id) | lines = open('dayfivedata.txt').read().split('\n')
ids = []
for line in lines:
top = 0
bottom = 127
for _ in range(7):
if 'F' in line[_]:
bottom = (top + bottom) // 2
else:
top = (top + bottom) // 2 + 1
left = 0
right = 7
for _ in range(7, 10):
if 'L' in line[_]:
right = (right + left) // 2
else:
left = (right + left) // 2 + 1
ids.append(top * 8 + left)
ids.sort()
for _ in range(len(ids) - 1):
if ids[_] + 2 == ids[_ + 1]:
your_id = ids[_] + 1
break
print(your_id) |
n=int(input())
ans=[]
used=[False for i in range(n)]
d=[i+1 for i in range(n)]
a=list(map(int,input().split()))
p=0
f=False
while True:
for i in range(n-1):
if f:
i=n-2-i
if a[i]>i+1 and a[i+1]<i+2 and not used[i]:
ans.append(i+1)
used[i]=True
a[i],a[i+1]=a[i+1],a[i]
if len(ans)==p:
print(-1)
break
p=len(ans)
if len(ans)==n-1:
for i in range(n):
if a[i]!=d[i]:
print(-1)
break
else:
print(*ans,sep='\n')
break
f = not f
| n = int(input())
ans = []
used = [False for i in range(n)]
d = [i + 1 for i in range(n)]
a = list(map(int, input().split()))
p = 0
f = False
while True:
for i in range(n - 1):
if f:
i = n - 2 - i
if a[i] > i + 1 and a[i + 1] < i + 2 and (not used[i]):
ans.append(i + 1)
used[i] = True
(a[i], a[i + 1]) = (a[i + 1], a[i])
if len(ans) == p:
print(-1)
break
p = len(ans)
if len(ans) == n - 1:
for i in range(n):
if a[i] != d[i]:
print(-1)
break
else:
print(*ans, sep='\n')
break
f = not f |
# position, name, age, level, salary
se1 = ["Software Engineer", "Max", 20, "Junior", 5000]
se2 = ["Software Engineer", "Lisa", 25, "Senior", 7000]
# class
class SoftwareEngineer:
# class attributes
alias = "Keyboard Magician"
def __init__(self, name, age, level, salary):
# instance attributes
self.name = name
self.age = age
self.level = level
self.salary = salary
# instance
se1 = SoftwareEngineer("Max", 20, "Junior", 5000)
print(se1.name, se1.age)
se2 = SoftwareEngineer("Lisa", 25, "Senior", 7000)
print(se2.alias)
print(se1.alias)
print(SoftwareEngineer.alias)
SoftwareEngineer.alias = "Something Else"
print(se2.alias)
print(se1.alias)
print(SoftwareEngineer.alias)
# Recap
# create a class (blueprint)
# create a instance (object)
# instance attributes: defined in __init__(self) method
# class attribute
| se1 = ['Software Engineer', 'Max', 20, 'Junior', 5000]
se2 = ['Software Engineer', 'Lisa', 25, 'Senior', 7000]
class Softwareengineer:
alias = 'Keyboard Magician'
def __init__(self, name, age, level, salary):
self.name = name
self.age = age
self.level = level
self.salary = salary
se1 = software_engineer('Max', 20, 'Junior', 5000)
print(se1.name, se1.age)
se2 = software_engineer('Lisa', 25, 'Senior', 7000)
print(se2.alias)
print(se1.alias)
print(SoftwareEngineer.alias)
SoftwareEngineer.alias = 'Something Else'
print(se2.alias)
print(se1.alias)
print(SoftwareEngineer.alias) |
class Usuario:
def __init__(self):
self.usuario=""
self.ingresos=0
def intro(self):
self.usuario=input("Ingrese el nombre del usuario:")
self.ingresos=float(input("Cantidad ingresos anual:"))
def visualizar(self):
print("Nombre:",self.usuario)
print("Ingresos:",self.ingresos)
def fiscalidad(self):
if self.ingresos>3000:
print("Debe pagar impuestos")
else:
print("No paga impuestos")
# bloque principal
usuario=Usuario()
usuario.intro()
usuario.visualizar()
usuario.fiscalidad() | class Usuario:
def __init__(self):
self.usuario = ''
self.ingresos = 0
def intro(self):
self.usuario = input('Ingrese el nombre del usuario:')
self.ingresos = float(input('Cantidad ingresos anual:'))
def visualizar(self):
print('Nombre:', self.usuario)
print('Ingresos:', self.ingresos)
def fiscalidad(self):
if self.ingresos > 3000:
print('Debe pagar impuestos')
else:
print('No paga impuestos')
usuario = usuario()
usuario.intro()
usuario.visualizar()
usuario.fiscalidad() |
a=3
b=6
a,b=b,a
print('After Swapping values of A and B are',a,b)
| a = 3
b = 6
(a, b) = (b, a)
print('After Swapping values of A and B are', a, b) |
class Solution:
def maximalSquare(self, matrix: List[List[str]]) -> int:
if not matrix:
return 0
lines = len(matrix)
lists = len(matrix[0])
mat = [[0] * lists for _ in range(lines)]
for i in range(lists):
mat[0][i] = int(matrix[0][i])
for i in range(lines):
mat[i][0] = int(matrix[i][0])
for i in range(1, lines):
for j in range(1, lists):
mat[i][j] = int(matrix[i][j])
if mat[i][j] is not 0:
mat[i][j] = (min(mat[i - 1][j - 1], mat[i][j - 1], mat[i - 1][j]) + 1)
result = 0
for i in mat:
for j in i:
if result < j:
result = j
return result ** 2 | class Solution:
def maximal_square(self, matrix: List[List[str]]) -> int:
if not matrix:
return 0
lines = len(matrix)
lists = len(matrix[0])
mat = [[0] * lists for _ in range(lines)]
for i in range(lists):
mat[0][i] = int(matrix[0][i])
for i in range(lines):
mat[i][0] = int(matrix[i][0])
for i in range(1, lines):
for j in range(1, lists):
mat[i][j] = int(matrix[i][j])
if mat[i][j] is not 0:
mat[i][j] = min(mat[i - 1][j - 1], mat[i][j - 1], mat[i - 1][j]) + 1
result = 0
for i in mat:
for j in i:
if result < j:
result = j
return result ** 2 |
class Solution:
def singleNumber(self, nums: List[int]) -> int:
d = {}
for num in nums:
if num not in d:
d[num] = 1
else:
d[num] = d[num] + 1
for k,v in d.items():
if v == 1:
return k
| class Solution:
def single_number(self, nums: List[int]) -> int:
d = {}
for num in nums:
if num not in d:
d[num] = 1
else:
d[num] = d[num] + 1
for (k, v) in d.items():
if v == 1:
return k |
# https://leetcode.com/problems/find-the-difference/
class Solution:
def findTheDifference(self, s: str, t: str) -> str:
s = sorted(s)
t = sorted(t)
count = 0
for i in range(len(s)):
if s[i] != t[i] :
count = 1
print(t[i])
return t[i]
if count == 0:
return t[-1]
| class Solution:
def find_the_difference(self, s: str, t: str) -> str:
s = sorted(s)
t = sorted(t)
count = 0
for i in range(len(s)):
if s[i] != t[i]:
count = 1
print(t[i])
return t[i]
if count == 0:
return t[-1] |
for i in range(1,5):
for j in range(1,5):
print(j,end=" ")
print( )
| for i in range(1, 5):
for j in range(1, 5):
print(j, end=' ')
print() |
def round_off(ls2): # Function for the algorithm to obtain the desired output
final_grade = []
for value in ls2: # iterating in the list to read every student's marks
reminder = value % 5 # calculating remainder
if value < 38:
final_grade.append(value)
elif reminder >= 3: # If remainder is greater than equal to 3 it will get round off
# like 73 has remainder 3 hence it will get rounded off to 75
value += 5-reminder # the desired value will be get Ex 73 remainder 3 value = 73+(5-3)=75
final_grade.append(value)
else:
final_grade.append(value) # Grade that are not likely to round off will be stored as it is
return final_grade # returns a list of the final upgrade grade
while True:
# A while loop to for a valid
# input from a user
number_students = int(input("Enter number of students(1 to 60): "))
if number_students > 60 or number_students < 1:
print("Please Enter number (1 to 60) ")
else:
break
ls = [] # empty list to store marks
while number_students > 0:
# Taking input n times form
# the user where n is number
# of students
number = int(input("Enter marks (0 to 100): "))
if number > 100 or number < 0: # if a number is out of range
print("Please enter marks (0 to 100)")
continue
ls.append(number) # storing the marks in empty list
number_students -= 1
grades = round_off(ls) # Calling the function
for mark in grades: # with for loop printing marks of each student
print(mark)
| def round_off(ls2):
final_grade = []
for value in ls2:
reminder = value % 5
if value < 38:
final_grade.append(value)
elif reminder >= 3:
value += 5 - reminder
final_grade.append(value)
else:
final_grade.append(value)
return final_grade
while True:
number_students = int(input('Enter number of students(1 to 60): '))
if number_students > 60 or number_students < 1:
print('Please Enter number (1 to 60) ')
else:
break
ls = []
while number_students > 0:
number = int(input('Enter marks (0 to 100): '))
if number > 100 or number < 0:
print('Please enter marks (0 to 100)')
continue
ls.append(number)
number_students -= 1
grades = round_off(ls)
for mark in grades:
print(mark) |
n,m = map(int,input().split())
rows = [input() for _ in range(n)]
k = int(input())
for row in sorted(rows, key=lambda row: int(row.split()[k])):
print(row)
| (n, m) = map(int, input().split())
rows = [input() for _ in range(n)]
k = int(input())
for row in sorted(rows, key=lambda row: int(row.split()[k])):
print(row) |
def func_header(funcname):
print('\t.global %s' % funcname)
print('\t.type %s, %%function' % funcname)
print('%s:' % funcname)
def push_stack(reg):
print('\tstr %s, [sp, -0x10]!' % reg)
def pop_stack(reg):
print('\tldr %s, [sp], 0x10' % reg)
def store_stack(value, offset):
print('\tmov x8, %d' % value)
print('\tstr x8, [fp, %s]' % str(hex(offset)))
def binary_oprand(oprand, offdst, offsrc1, offsrc2):
print('\tldr x8, [fp, %s]' % str(hex(offsrc1)))
print('\tldr x9, [fp, %s]' % str(hex(offsrc2)))
print('\t%s x8, x8, x9' % oprand)
print('\tstr x8, [fp, %s]' % str(hex(offdst)))
def copy_stack(offdst, offsrc):
print('\tldr x8, [fp, %s]' % str(hex(offsrc)))
print('\tstr x8, [fp, %s]' % str(hex(offdst)))
def comparison(oprand, offdst, offsrc1, offsrc2):
print('\tldr x8, [fp, %s]' % str(hex(offsrc1)))
print('\tldr x9, [fp, %s]' % str(hex(offsrc2)))
print('\tcmp x8, x9')
print('\tcset x8, %s' % oprand)
print('\tstr x8, [fp, %s]' % str(hex(offdst)))
def unary_oprand(oprand, offdst, offsrc):
print('\tldr x8, [fp, %s]' % str(hex(offsrc)))
print('\t%s x8, x8' % oprand)
print('\tstr x8, [fp, %s]' % str(hex(offdst)))
def jmp(label):
print('\tb %s' % label)
def ret(funcname):
print('\tb %s_ret' % funcname)
def br(offset, label1, label2):
print('\tldr x8, [fp, %s]' % str(hex(offset)))
print('\tcbnz x8, %s' % label1)
print('\tb %s' % label2)
def printint(offset):
print('\tadr x0, fmtld')
print('\tldr x1, [fp, %s]' % str(hex(offset)))
print('\tbl printf')
def printbool(offset):
print('\tldr x1, [fp, %s]' % str(hex(offset)))
print('\tbl printbool')
def printstr(label):
print('\tadr x0, %s' % label)
print('\tbl printf')
def printfooter():
print('''
.global printbool
printbool:
cbz x1, printboolfalse
adr x0, strtrue
b printboolendif
printboolfalse:
adr x0, strfalse
printboolendif:
bl printf
ret lr
.data
fmtld: .string "%ld"
strtrue: .string "true"
strfalse: .string "false"
strspace: .string " "
strnewline: .string "\\n"''')
| def func_header(funcname):
print('\t.global %s' % funcname)
print('\t.type %s, %%function' % funcname)
print('%s:' % funcname)
def push_stack(reg):
print('\tstr %s, [sp, -0x10]!' % reg)
def pop_stack(reg):
print('\tldr %s, [sp], 0x10' % reg)
def store_stack(value, offset):
print('\tmov x8, %d' % value)
print('\tstr x8, [fp, %s]' % str(hex(offset)))
def binary_oprand(oprand, offdst, offsrc1, offsrc2):
print('\tldr x8, [fp, %s]' % str(hex(offsrc1)))
print('\tldr x9, [fp, %s]' % str(hex(offsrc2)))
print('\t%s x8, x8, x9' % oprand)
print('\tstr x8, [fp, %s]' % str(hex(offdst)))
def copy_stack(offdst, offsrc):
print('\tldr x8, [fp, %s]' % str(hex(offsrc)))
print('\tstr x8, [fp, %s]' % str(hex(offdst)))
def comparison(oprand, offdst, offsrc1, offsrc2):
print('\tldr x8, [fp, %s]' % str(hex(offsrc1)))
print('\tldr x9, [fp, %s]' % str(hex(offsrc2)))
print('\tcmp x8, x9')
print('\tcset x8, %s' % oprand)
print('\tstr x8, [fp, %s]' % str(hex(offdst)))
def unary_oprand(oprand, offdst, offsrc):
print('\tldr x8, [fp, %s]' % str(hex(offsrc)))
print('\t%s x8, x8' % oprand)
print('\tstr x8, [fp, %s]' % str(hex(offdst)))
def jmp(label):
print('\tb %s' % label)
def ret(funcname):
print('\tb %s_ret' % funcname)
def br(offset, label1, label2):
print('\tldr x8, [fp, %s]' % str(hex(offset)))
print('\tcbnz x8, %s' % label1)
print('\tb %s' % label2)
def printint(offset):
print('\tadr x0, fmtld')
print('\tldr x1, [fp, %s]' % str(hex(offset)))
print('\tbl printf')
def printbool(offset):
print('\tldr x1, [fp, %s]' % str(hex(offset)))
print('\tbl printbool')
def printstr(label):
print('\tadr x0, %s' % label)
print('\tbl printf')
def printfooter():
print('\n .global printbool\nprintbool:\n cbz x1, printboolfalse\n adr\t x0, strtrue\n b printboolendif\n printboolfalse:\n adr\t x0, strfalse\n printboolendif:\n bl\t printf\n ret\t lr\n\n .data\nfmtld: .string "%ld"\nstrtrue: .string "true"\nstrfalse: .string "false"\nstrspace: .string " "\nstrnewline: .string "\\n"') |
(10 and 2)[::-5]
(10 and 2)[5]
(10 and 2)(5)
(10 and 2).foo
-(10 and 2)
+(10 and 2)
~(10 and 2)
5 ** (10 and 2)
(10 and 2) ** 5
5 * (10 and 2)
(10 and 2) * 5
5 / (10 and 2)
(10 and 2) / 5
5 // (10 and 2)
(10 and 2) // 5
5 + (10 and 2)
(10 and 2) + 5
(10 and 2) - 5
5 - (10 and 2)
5 >> (10 and 2)
(10 and 2) << 5
5 & (10 and 2)
(10 and 2) & 5
5 ^ (10 and 2)
(10 and 2) ^ 5
5 | (10 and 2)
(10 and 2) | 5
() in (10 and 2)
(10 and 2) in ()
5 is (10 and 2)
(10 and 2) is 5
5 < (10 and 2)
(10 and 2) < 5
not (10 and 2)
5 and 10 and 2
10 and 2 and 5
5 or 10 and 2
10 and 2 or 5
10 and 2 if 10 and 2 else 10 and 2
| (10 and 2)[::-5]
(10 and 2)[5]
(10 and 2)(5)
(10 and 2).foo
-(10 and 2)
+(10 and 2)
~(10 and 2)
5 ** (10 and 2)
(10 and 2) ** 5
5 * (10 and 2)
(10 and 2) * 5
5 / (10 and 2)
(10 and 2) / 5
5 // (10 and 2)
(10 and 2) // 5
5 + (10 and 2)
(10 and 2) + 5
(10 and 2) - 5
5 - (10 and 2)
5 >> (10 and 2)
(10 and 2) << 5
5 & (10 and 2)
(10 and 2) & 5
5 ^ (10 and 2)
(10 and 2) ^ 5
5 | (10 and 2)
(10 and 2) | 5
() in (10 and 2)
(10 and 2) in ()
5 is (10 and 2)
(10 and 2) is 5
5 < (10 and 2)
(10 and 2) < 5
not (10 and 2)
5 and 10 and 2
10 and 2 and 5
5 or (10 and 2)
10 and 2 or 5
10 and 2 if 10 and 2 else 10 and 2 |
inputA = 277
inputB = 349
score = 0
queueA = []
queueB = []
i = 0
while len(queueA) < (5*(10**6)):
inputA = (inputA*16807)%2147483647
if inputA%4 == 0: queueA.append(inputA)
while len(queueB) < (5*(10**6)):
inputB = (inputB*48271)%2147483647
if inputB%8 == 0: queueB.append(inputB)
for i in range(0,(5*(10**6))):
if (queueA[i] & 0b1111111111111111) == (queueB[i] & 0b1111111111111111): score+=1
print(score) | input_a = 277
input_b = 349
score = 0
queue_a = []
queue_b = []
i = 0
while len(queueA) < 5 * 10 ** 6:
input_a = inputA * 16807 % 2147483647
if inputA % 4 == 0:
queueA.append(inputA)
while len(queueB) < 5 * 10 ** 6:
input_b = inputB * 48271 % 2147483647
if inputB % 8 == 0:
queueB.append(inputB)
for i in range(0, 5 * 10 ** 6):
if queueA[i] & 65535 == queueB[i] & 65535:
score += 1
print(score) |
# Created by MechAviv
# [Magic Library Checker] | [1032220]
# Ellinia : Magic Library
if "1" not in sm.getQuestEx(25566, "c3"):
sm.setQuestEx(25566, "c3", "1")
sm.chatScript("You search the Magic Library.") | if '1' not in sm.getQuestEx(25566, 'c3'):
sm.setQuestEx(25566, 'c3', '1')
sm.chatScript('You search the Magic Library.') |
class Comparable:
def __init__(self, value):
self.value = value
def __eq__(self, other):
other_value = other.value if isinstance(other, Comparable) else other
return self.value == other_value
def __ne__(self, other):
other_value = other.value if isinstance(other, Comparable) else other
return self.value != other_value
def __gt__(self, other):
other_value = other.value if isinstance(other, Comparable) else other
return self.value > other_value
def __lt__(self, other):
other_value = other.value if isinstance(other, Comparable) else other
return self.value < other_value
def __ge__(self, other):
other_value = other.value if isinstance(other, Comparable) else other
return self.value >= other_value
def __le__(self, other):
other_value = other.value if isinstance(other, Comparable) else other
return self.value <= other_value
def read_file(s):
with open(s, "r") as f:
content = f.read()
return content
def write_file(s, name):
with open(name, "w") as f:
f.write(s)
| class Comparable:
def __init__(self, value):
self.value = value
def __eq__(self, other):
other_value = other.value if isinstance(other, Comparable) else other
return self.value == other_value
def __ne__(self, other):
other_value = other.value if isinstance(other, Comparable) else other
return self.value != other_value
def __gt__(self, other):
other_value = other.value if isinstance(other, Comparable) else other
return self.value > other_value
def __lt__(self, other):
other_value = other.value if isinstance(other, Comparable) else other
return self.value < other_value
def __ge__(self, other):
other_value = other.value if isinstance(other, Comparable) else other
return self.value >= other_value
def __le__(self, other):
other_value = other.value if isinstance(other, Comparable) else other
return self.value <= other_value
def read_file(s):
with open(s, 'r') as f:
content = f.read()
return content
def write_file(s, name):
with open(name, 'w') as f:
f.write(s) |
def DecodeToFile(osufile, newfilename, SVLines: list):
with open(newfilename, "w+") as f:
old = open(osufile, "r")
old = old.readlines()
old_TotimingPoints = old[:old.index("[TimingPoints]\n") + 1]
old_afterTimingPoints = old[old.index("[TimingPoints]\n") + 1:]
all_file = old_TotimingPoints + [i.encode() for i in SVLines] + old_afterTimingPoints
for k in all_file:
f.write(k)
def Noteoffset(osufile, start, end, return_only_LN=False):
with open(osufile, 'r') as f:
f = f.readlines()
offseto = []
notecount = []
for i in range(f.index("[HitObjects]\n")+1, len(f) - 1):
if start < int(f[i].split(",")[2]) <= end:
if int(f[i].split(",")[2]) in offseto:
notecount[-1] += 1
continue
if return_only_LN:
splited = f[i].split(",")
release = int(splited[-1].split(":")[0])
if release == 0:
continue
else:
offseto.append([int(splited[2]), release])
else:
offseto.append(int(f[i].split(",")[2]))
notecount.append(1)
return offseto, notecount
| def decode_to_file(osufile, newfilename, SVLines: list):
with open(newfilename, 'w+') as f:
old = open(osufile, 'r')
old = old.readlines()
old__totiming_points = old[:old.index('[TimingPoints]\n') + 1]
old_after_timing_points = old[old.index('[TimingPoints]\n') + 1:]
all_file = old_TotimingPoints + [i.encode() for i in SVLines] + old_afterTimingPoints
for k in all_file:
f.write(k)
def noteoffset(osufile, start, end, return_only_LN=False):
with open(osufile, 'r') as f:
f = f.readlines()
offseto = []
notecount = []
for i in range(f.index('[HitObjects]\n') + 1, len(f) - 1):
if start < int(f[i].split(',')[2]) <= end:
if int(f[i].split(',')[2]) in offseto:
notecount[-1] += 1
continue
if return_only_LN:
splited = f[i].split(',')
release = int(splited[-1].split(':')[0])
if release == 0:
continue
else:
offseto.append([int(splited[2]), release])
else:
offseto.append(int(f[i].split(',')[2]))
notecount.append(1)
return (offseto, notecount) |
#Program for a Function that takes a list of words and returns the length of the longest one.
def longest_word(list): #define a function which takes list as a parameter
longest=0
for words in list: #loop for each word in list
if len(words)>longest: #compare length iteratively
longest=len(words)
lword=words
return lword #return longest word
w=['Entertainment','entire','Elephant','inconsequential']
print("Longest word is",longest_word(w), "with", len(longest_word(w)), "letters.")
| def longest_word(list):
longest = 0
for words in list:
if len(words) > longest:
longest = len(words)
lword = words
return lword
w = ['Entertainment', 'entire', 'Elephant', 'inconsequential']
print('Longest word is', longest_word(w), 'with', len(longest_word(w)), 'letters.') |
def print_a_string():
my_string = "hello world"
print(my_string)
def print_a_number():
my_number = 9
print(my_number)
# my logic starts here
if __name__ == "__main__":
print_a_string()
print_a_number()
print("all done...bye-bye") | def print_a_string():
my_string = 'hello world'
print(my_string)
def print_a_number():
my_number = 9
print(my_number)
if __name__ == '__main__':
print_a_string()
print_a_number()
print('all done...bye-bye') |
def hms2dec(h,m,s):
return 15*(h + (m/60) + (s/3600))
def dms2dec(d,m,s):
if d>=0:
return (d + (m/60) + (s/3600))
return (d - (m/60) - (s/3600))
if __name__ == '__main__':
print(hms2dec(23, 12, 6))
print(dms2dec(22, 57, 18))
print(dms2dec(-66, 5, 5.1)) | def hms2dec(h, m, s):
return 15 * (h + m / 60 + s / 3600)
def dms2dec(d, m, s):
if d >= 0:
return d + m / 60 + s / 3600
return d - m / 60 - s / 3600
if __name__ == '__main__':
print(hms2dec(23, 12, 6))
print(dms2dec(22, 57, 18))
print(dms2dec(-66, 5, 5.1)) |
no_list = [22,68,90,78,90,88]
def average(x):
#complete the function's body to return the average
length=len(no_list)
return sum(no_list)/length
print(average(no_list))
| no_list = [22, 68, 90, 78, 90, 88]
def average(x):
length = len(no_list)
return sum(no_list) / length
print(average(no_list)) |
__lname__ = "yass"
__uname__ = "YASS"
__acronym__ = "Yet Another Subdomainer Software"
__version__ = "0.8.0"
__author__ = "Francesco Marano (@mrnfrancesco)"
__author_email__ = "francesco.mrn24@gmail.com"
__source_url__ = "https://github.com/mrnfrancesco/yass"
| __lname__ = 'yass'
__uname__ = 'YASS'
__acronym__ = 'Yet Another Subdomainer Software'
__version__ = '0.8.0'
__author__ = 'Francesco Marano (@mrnfrancesco)'
__author_email__ = 'francesco.mrn24@gmail.com'
__source_url__ = 'https://github.com/mrnfrancesco/yass' |
end = 1000
total = 0
for x in range(1,end):
if x % 15 == 0:
total = total + x
print(x)
elif x % 5 == 0:
total = total + x
print(x)
elif x % 3 == 0:
total = total + x
print(x)
print(f"total = {total}") | end = 1000
total = 0
for x in range(1, end):
if x % 15 == 0:
total = total + x
print(x)
elif x % 5 == 0:
total = total + x
print(x)
elif x % 3 == 0:
total = total + x
print(x)
print(f'total = {total}') |
# Section 3-16
# Question: How do we find the sum of the digits of a positive integer using recursion?
# Step 1: The recursive case
# Add the current digit to a total
# Step 2: The Base Condition
# If there are no more digits, return the total
# Step 3: The unintended cases
# If the input is not a positive integer, throw an exception
# perform sum function recursively
test = 349587
expected = 3 + 4 + 9 + 5 + 8 + 7
def sum_digits(number):
assert number >= 0 and int(number) == number, 'Input must be a nonnegative integer.' # Step 3: the unintended cases
return 0 if number == 0 else (number % 10) + sum_digits(int(number / 10)) # Step 1 and 2
# Show the output
outcome = sum_digits(test)
print('Expected: ', expected)
print('Outcome: ', outcome)
assert outcome == expected, 'outcome does not match expected value. Check logic and try again.'
| test = 349587
expected = 3 + 4 + 9 + 5 + 8 + 7
def sum_digits(number):
assert number >= 0 and int(number) == number, 'Input must be a nonnegative integer.'
return 0 if number == 0 else number % 10 + sum_digits(int(number / 10))
outcome = sum_digits(test)
print('Expected: ', expected)
print('Outcome: ', outcome)
assert outcome == expected, 'outcome does not match expected value. Check logic and try again.' |
def binarySearch(arr, l, r, x):
while l <= r:
mid = l + (r - l) / 2;
# Check if x is present at mid
if arr[mid] == x:
return mid
# If x is greater, ignore left half
elif arr[mid] < x:
l = mid + 1
# If x is smaller, ignore right half
else:
r = mid - 1
# If we reach here, then the element
# was not present
return -1
| def binary_search(arr, l, r, x):
while l <= r:
mid = l + (r - l) / 2
if arr[mid] == x:
return mid
elif arr[mid] < x:
l = mid + 1
else:
r = mid - 1
return -1 |
# Segment tree
class SegmentTree:
def __init__(self, data):
size = len(data)
t = 1
while t < size:
t <<= 1
offset = t - 1
index = [0] * (t * 2 - 1)
index[offset:offset + size] = range(size)
for i in range(offset - 1, -1, -1):
x = index[i * 2 + 1]
y = index[i * 2 + 2]
if data[x] <= data[y]:
index[i] = x
else:
index[i] = y
self._data = data
self._index = index
self._offset = offset
def query(self, start, stop):
data = self._data
index = self._index
result = start
l = start + self._offset
r = stop + self._offset
while l < r:
if l & 1 == 0:
i = index[l]
x = data[i]
y = data[result]
if x < y or (x == y and i < result):
result = i
if r & 1 == 0:
i = index[r - 1]
x = data[i]
y = data[result]
if x < y or (x == y and i < result):
result = i
l = l // 2
r = (r - 1) // 2
return result
N, K, D = map(int, input().split())
A = list(map(int, input().split()))
if 1 + (K - 1) * D > N:
print(-1)
exit()
st = SegmentTree(A)
result = []
i = 0
for k in range(K - 1, -1, -1):
i = st.query(i, N - k * D)
result.append(A[i])
i += D
print(*result)
| class Segmenttree:
def __init__(self, data):
size = len(data)
t = 1
while t < size:
t <<= 1
offset = t - 1
index = [0] * (t * 2 - 1)
index[offset:offset + size] = range(size)
for i in range(offset - 1, -1, -1):
x = index[i * 2 + 1]
y = index[i * 2 + 2]
if data[x] <= data[y]:
index[i] = x
else:
index[i] = y
self._data = data
self._index = index
self._offset = offset
def query(self, start, stop):
data = self._data
index = self._index
result = start
l = start + self._offset
r = stop + self._offset
while l < r:
if l & 1 == 0:
i = index[l]
x = data[i]
y = data[result]
if x < y or (x == y and i < result):
result = i
if r & 1 == 0:
i = index[r - 1]
x = data[i]
y = data[result]
if x < y or (x == y and i < result):
result = i
l = l // 2
r = (r - 1) // 2
return result
(n, k, d) = map(int, input().split())
a = list(map(int, input().split()))
if 1 + (K - 1) * D > N:
print(-1)
exit()
st = segment_tree(A)
result = []
i = 0
for k in range(K - 1, -1, -1):
i = st.query(i, N - k * D)
result.append(A[i])
i += D
print(*result) |
'''import math #as m also can be written
a=math.pi #a=m.pi
print(a)
'''
'''
from math import pi #import only pi from math
b=2*pi
print(b)
'''
'''
from math import * #import everything from math
b=2*pi
print(b)
'''
'''
food = 'spam'
if food == 'spam':
print('Ummmm, my favourite!')
print('I feel like saying it 100 times...')
print(100*(food+'!'))
'''
'''
food = 'spam'
if food == 'spam':
print('Ummmm, my favourite!')
else:
print('No!')
'''
'''
import random
a=random.randint(0,45)
str=''
if(a>43):
str='larger'
elif(a>35 and a<=43):
str = 'medium'
elif(a>25 and a<=35):
str='small'
else:
str='not eligible'
print('the value is {} and is {}'.format(a,str))
'''
'''
#for loop
for friend in ['Margot','Kathryn','Prisila']:
invitation = "Hi " + friend + ". Please come to my party on Saturday!"
print(invitation)
'''
'''
name = 'harrison'
guess = input("So I'm thinking of person's name. Try to guess it: ")
pos = 0
while guess!=name and pos<len(name):
print("Nope, that's not it! Hint: letter ",end='')
print(pos+1,'is',name[pos]+".",end='')
guess = input("Guess again: ")
pos = pos + 1
if pos==len(name) and name!=guess:
print("Too bad, you couldn't get it. The name was", name + ".")
else:
print("\nGreat, you got it in ",pos + 1,"guesses!")
'''
'''
for i in [12,16,17,24,29,30]:
if i%2 ==1: #if number is odd
pass #will do nothing
print('this is pass block')
print(i)
print('done')
'''
| """import math #as m also can be written
a=math.pi #a=m.pi
print(a)
"""
'\nfrom math import pi #import only pi from math\nb=2*pi\nprint(b)\n'
'\nfrom math import * #import everything from math\nb=2*pi\nprint(b)\n'
"\nfood = 'spam'\nif food == 'spam':\n print('Ummmm, my favourite!')\nprint('I feel like saying it 100 times...')\nprint(100*(food+'!')) \n"
"\nfood = 'spam'\nif food == 'spam':\n print('Ummmm, my favourite!')\nelse:\n print('No!')\n"
"\nimport random\na=random.randint(0,45)\nstr=''\nif(a>43):\n str='larger'\nelif(a>35 and a<=43):\n str = 'medium'\nelif(a>25 and a<=35):\n str='small'\nelse:\n str='not eligible'\n \nprint('the value is {} and is {}'.format(a,str))\n"
'\n#for loop\n\nfor friend in [\'Margot\',\'Kathryn\',\'Prisila\']:\n invitation = "Hi " + friend + ". Please come to my party on Saturday!"\n print(invitation)\n'
'\nname = \'harrison\'\nguess = input("So I\'m thinking of person\'s name. Try to guess it: ")\npos = 0\nwhile guess!=name and pos<len(name):\n print("Nope, that\'s not it! Hint: letter ",end=\'\')\n print(pos+1,\'is\',name[pos]+".",end=\'\')\n guess = input("Guess again: ")\n pos = pos + 1\nif pos==len(name) and name!=guess:\n print("Too bad, you couldn\'t get it. The name was", name + ".")\nelse:\n print("\nGreat, you got it in ",pos + 1,"guesses!")\n'
"\nfor i in [12,16,17,24,29,30]:\n if i%2 ==1: #if number is odd\n pass #will do nothing\n print('this is pass block') \n print(i)\nprint('done')\n" |
def test_post_order(client, order_payload):
res = client.post("/order", json = order_payload)
assert res.status_code == 200
def test_post_game(client, game_payload):
res = client.post("/order", json = game_payload)
assert res.status_code == 200
def test_get_order(client):
res1 = client.get("/order")
assert res1.json()["mode"] == 0
assert res1.json()["toppings"] == ["onions", "spice"]
res2 = client.get("/order")
assert res2.json()["mode"] == 1
res3 = client.get("/order")
assert res3.json() == {}
| def test_post_order(client, order_payload):
res = client.post('/order', json=order_payload)
assert res.status_code == 200
def test_post_game(client, game_payload):
res = client.post('/order', json=game_payload)
assert res.status_code == 200
def test_get_order(client):
res1 = client.get('/order')
assert res1.json()['mode'] == 0
assert res1.json()['toppings'] == ['onions', 'spice']
res2 = client.get('/order')
assert res2.json()['mode'] == 1
res3 = client.get('/order')
assert res3.json() == {} |
class Solution:
def angleClock(self, hour: int, minutes: int) -> float:
hour_deg = (hour*30)%360 + (0.5)*minutes
minute_deg = ((minutes/5)*30)%360
if(abs(hour_deg-minute_deg)>180):
return 360 - abs(hour_deg-minute_deg)
else:
return abs(hour_deg-minute_deg)
| class Solution:
def angle_clock(self, hour: int, minutes: int) -> float:
hour_deg = hour * 30 % 360 + 0.5 * minutes
minute_deg = minutes / 5 * 30 % 360
if abs(hour_deg - minute_deg) > 180:
return 360 - abs(hour_deg - minute_deg)
else:
return abs(hour_deg - minute_deg) |
class Solution:
def findDuplicate(self, nums: list[int]) -> int:
nums.sort()
for i in range(1, len(nums)):
if nums[i] == nums[i - 1]:
return nums[i]
class Solution:
def findDuplicate(self, nums: list[int]) -> int:
# 'low' and 'high' represent the range of values of the target
low = 1
high = len(nums) - 1
while low <= high:
cur = (low + high) // 2
count = 0
# Count how many numbers are less than or equal to 'cur'
count = sum(num <= cur for num in nums)
if count > cur:
duplicate = cur
high = cur - 1
else:
low = cur + 1
return duplicate
| class Solution:
def find_duplicate(self, nums: list[int]) -> int:
nums.sort()
for i in range(1, len(nums)):
if nums[i] == nums[i - 1]:
return nums[i]
class Solution:
def find_duplicate(self, nums: list[int]) -> int:
low = 1
high = len(nums) - 1
while low <= high:
cur = (low + high) // 2
count = 0
count = sum((num <= cur for num in nums))
if count > cur:
duplicate = cur
high = cur - 1
else:
low = cur + 1
return duplicate |
num = int(input(''))
hours = int(input(''))
value = float(input(''))
print('NUMBER = {:0}\nSALARY = U$ {:.2f}'.format(num, (hours * value))) | num = int(input(''))
hours = int(input(''))
value = float(input(''))
print('NUMBER = {:0}\nSALARY = U$ {:.2f}'.format(num, hours * value)) |
class Solution(object):
def combinationSum2(self, candidates, target):
ret = []
self.dfs(sorted(candidates), target, 0, [], ret)
return ret
def dfs(self, nums, target, idx, path, ret):
if target <= 0:
if target == 0:
ret.append(path)
return
for i in range(idx, len(nums)):
if i > idx and nums[i] == nums[i-1]:
continue
self.dfs(nums, target-nums[i], i+1, path+[nums[i]], ret) | class Solution(object):
def combination_sum2(self, candidates, target):
ret = []
self.dfs(sorted(candidates), target, 0, [], ret)
return ret
def dfs(self, nums, target, idx, path, ret):
if target <= 0:
if target == 0:
ret.append(path)
return
for i in range(idx, len(nums)):
if i > idx and nums[i] == nums[i - 1]:
continue
self.dfs(nums, target - nums[i], i + 1, path + [nums[i]], ret) |
#!/usr/bin/env python
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Jiao Lin
# California Institute of Technology
# (C) 2007 All Rights Reserved
#
# {LicenseText}
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
class DispersionOnGrid:
def __init__(
self, axes,
polarization_npyarr, energy_npyarr):
self.axes = axes
self.polarization_npyarr = polarization_npyarr
self.energy_npyarr = energy_npyarr
return
pass # end of AbstractDispersion
# version
__id__ = "$Id$"
# End of file
| class Dispersionongrid:
def __init__(self, axes, polarization_npyarr, energy_npyarr):
self.axes = axes
self.polarization_npyarr = polarization_npyarr
self.energy_npyarr = energy_npyarr
return
pass
__id__ = '$Id$' |
str1 = "Udacity"
# LENGTH
print(len(str1)) # 7
# CHANGE CASE
# The `lower()` and `upper` method returns the string in lower case and upper case respectively
print(str1.lower()) # udacity
print(str1.upper()) # UDACITY
# SLICING
# string_var[lower_index : upper_index]
# Note that the upper_index is not inclusive.
print(str1[1:6]) # dacit
print(str1[:6]) # Udacit. A blank index means "all from that end"
print(str1[1:]) # dacity
# A negative index means start slicing from the end-of-string
print(str1[-6:-1]) # dacit
# STRIP
# `strip()` removes any whitespace from the beginning or the end
str2 = " Udacity "
print(str2.strip()) # Udacity
# REPLACE/SUBSTITUTE A CHARACTER IN THE STRING
# The replace() method replaces all occurances a character in a string with another character. The input arguments are case-sensitive
print(str1.replace('y', "B")) #UdacitB
# SPLIT INTO SUB-STRINGS
# The split() method splits a string into substrings based on the separator that we specify as argument
str3 = "Welcome, Constance!"
print(str3.split(",")) # ['Welcome', ' Constance!']
# CONCATENATION
print(str3 + " " + str1) # Welcome, Constance! Udacity
marks = 100
# print(str3 + " You have scored a perfect " + marks) # TypeError: can only concatenate str (not "int") to str
print(str3 + " You have scored a perfect " + format(marks)) # format() method converts the argument as a formatted string
# SORT A STRING
# We can use sorted() method that sort any instance of *iterable*. The characters are compared based on their ascii value
print(sorted(str3)) # [' ', '!', ',', 'C', 'W', 'a', 'c', 'c', 'e', 'e', 'e', 'l', 'm', 'n', 'n', 'o', 'o', 's', 't']
| str1 = 'Udacity'
print(len(str1))
print(str1.lower())
print(str1.upper())
print(str1[1:6])
print(str1[:6])
print(str1[1:])
print(str1[-6:-1])
str2 = ' Udacity '
print(str2.strip())
print(str1.replace('y', 'B'))
str3 = 'Welcome, Constance!'
print(str3.split(','))
print(str3 + ' ' + str1)
marks = 100
print(str3 + ' You have scored a perfect ' + format(marks))
print(sorted(str3)) |
class Line:
def __init__(self,p1,p2):
if (p1[0] > p2[0]):
self.p1 = p2
self.p2 = p1
elif (p1[0] == p2[0] and p1[1] > p2[1]):
self.p1 = p2
self.p2 = p1
else:
self.p1 = p1
self.p2 = p2
print(self.p1)
print(self.p2)
print(self.p2[0]-self.p1[0] )
self.m = None
if (self.p1[0] == self.p2[0]):
self.m = None
else:
self.m = (self.p2[1]-self.p1[1])/(self.p2[0]-self.p1[0])
if (self.m == 1):
self.incremento = 1
if (self.m == -1):
self.incremento = -1
if(self.m == 0):
self.incremento = 0
if (self.m is None):
self.incremento = 1
#print("Pendiente: " + str(self.m) + " Incremento: " + str(self.incremento))
# y = mx - b
#ps = self.calc_points_i()
#print(ps)
#print("-----------------------------------------------------------------------")
def calc_points_i(self):
points = []
points.append(self.p1)
if (self.m is not None):
y = self.p1[1]
for i in range(self.p1[0]+1,self.p2[0]):
y += self.incremento
points.append((i,y))
else:
y = self.p1[1]
for i in range(self.p1[1]+1,self.p2[1]):
y += self.incremento
points.append((self.p1[0],y))
points.append(self.p2)
return (points)
def calc_points(self):
points = []
points.append(self.p1)
points.append(self.p2)
if (self.p1[0] == self.p2[0]):
if (self.p1[1] > self.p2[1]):
begin = self.p2[1]+1
end = self.p1[1]
else:
begin = self.p1[1]+1
end = self.p2[1]
for i in range(begin,end):
points.append((self.p1[0],i))
elif (self.p1[1] == self.p2[1]):
if (self.p1[0] > self.p2[0]):
begin = self.p2[0]+1
end = self.p1[0]
else:
begin = self.p1[0]+1
end = self.p2[0]
for i in range(begin,end):
points.append((i,self.p1[1]))
else:
return []
return (points)
| class Line:
def __init__(self, p1, p2):
if p1[0] > p2[0]:
self.p1 = p2
self.p2 = p1
elif p1[0] == p2[0] and p1[1] > p2[1]:
self.p1 = p2
self.p2 = p1
else:
self.p1 = p1
self.p2 = p2
print(self.p1)
print(self.p2)
print(self.p2[0] - self.p1[0])
self.m = None
if self.p1[0] == self.p2[0]:
self.m = None
else:
self.m = (self.p2[1] - self.p1[1]) / (self.p2[0] - self.p1[0])
if self.m == 1:
self.incremento = 1
if self.m == -1:
self.incremento = -1
if self.m == 0:
self.incremento = 0
if self.m is None:
self.incremento = 1
def calc_points_i(self):
points = []
points.append(self.p1)
if self.m is not None:
y = self.p1[1]
for i in range(self.p1[0] + 1, self.p2[0]):
y += self.incremento
points.append((i, y))
else:
y = self.p1[1]
for i in range(self.p1[1] + 1, self.p2[1]):
y += self.incremento
points.append((self.p1[0], y))
points.append(self.p2)
return points
def calc_points(self):
points = []
points.append(self.p1)
points.append(self.p2)
if self.p1[0] == self.p2[0]:
if self.p1[1] > self.p2[1]:
begin = self.p2[1] + 1
end = self.p1[1]
else:
begin = self.p1[1] + 1
end = self.p2[1]
for i in range(begin, end):
points.append((self.p1[0], i))
elif self.p1[1] == self.p2[1]:
if self.p1[0] > self.p2[0]:
begin = self.p2[0] + 1
end = self.p1[0]
else:
begin = self.p1[0] + 1
end = self.p2[0]
for i in range(begin, end):
points.append((i, self.p1[1]))
else:
return []
return points |
class Node:
pass
class SystemNode(Node):
def __init__(self, equations):
self.equations = equations
class EquationNode(Node):
def __init__(self, differential, expression):
self.differential = differential
self.expression = expression
class DifferentialNode(Node):
def __init__(self, function, parameter):
self.function = function
self.parameter = parameter
class ExpressionNode(Node):
pass
class ParenthesisNode(ExpressionNode):
def __init__(self, expression):
self.expression = expression
class BinaryNode(ExpressionNode):
def __init__(self, left_expression, right_expression):
self.left_expression = left_expression
self.right_expression = right_expression
class PlusNode(BinaryNode):
pass
class MinusNode(BinaryNode):
pass
class FractionNode(BinaryNode):
pass
class StarNode(BinaryNode):
pass
class AtomicNode(ExpressionNode):
def __init__(self, value):
self.value = value
class SymbolNode(AtomicNode):
def __init__(self, value, isGlobal=False):
self.value = value
self.isGlobal = isGlobal
class NumberNode(AtomicNode):
pass
class IdentifierNode(ExpressionNode):
def __init__(self, symbol, subgroup=None, isGlobal=False):
self.symbol = symbol
self.subgroup = subgroup
self.isGlobal = isGlobal
class UnaryNode(ExpressionNode):
pass
class NegNode(UnaryNode):
def __init__(self, expression):
self.expression = expression
class GlobalNode(ExpressionNode):
def __init__(self, value):
self.value = value | class Node:
pass
class Systemnode(Node):
def __init__(self, equations):
self.equations = equations
class Equationnode(Node):
def __init__(self, differential, expression):
self.differential = differential
self.expression = expression
class Differentialnode(Node):
def __init__(self, function, parameter):
self.function = function
self.parameter = parameter
class Expressionnode(Node):
pass
class Parenthesisnode(ExpressionNode):
def __init__(self, expression):
self.expression = expression
class Binarynode(ExpressionNode):
def __init__(self, left_expression, right_expression):
self.left_expression = left_expression
self.right_expression = right_expression
class Plusnode(BinaryNode):
pass
class Minusnode(BinaryNode):
pass
class Fractionnode(BinaryNode):
pass
class Starnode(BinaryNode):
pass
class Atomicnode(ExpressionNode):
def __init__(self, value):
self.value = value
class Symbolnode(AtomicNode):
def __init__(self, value, isGlobal=False):
self.value = value
self.isGlobal = isGlobal
class Numbernode(AtomicNode):
pass
class Identifiernode(ExpressionNode):
def __init__(self, symbol, subgroup=None, isGlobal=False):
self.symbol = symbol
self.subgroup = subgroup
self.isGlobal = isGlobal
class Unarynode(ExpressionNode):
pass
class Negnode(UnaryNode):
def __init__(self, expression):
self.expression = expression
class Globalnode(ExpressionNode):
def __init__(self, value):
self.value = value |
frase = str(input('Digite uma frase: '))
cont = 1
for c in frase:
if cont % 2 == 0:
print(c.upper(), end='')
else:
print(c.lower(), end='')
cont += 1
| frase = str(input('Digite uma frase: '))
cont = 1
for c in frase:
if cont % 2 == 0:
print(c.upper(), end='')
else:
print(c.lower(), end='')
cont += 1 |
# https://stackoverflow.com/questions/13979714/heap-sort-how-to-sort
swaps = 0
def heapify(arr, n, i):
global swaps
count = 0
largest = i
l = 2 * i + 1
r = 2 * i + 2
if l < n and arr[i] < arr[l]:
largest = l
if r < n and arr[largest] < arr[r]:
largest = r
if largest != i:
count += 1
arr[i],arr[largest] = arr[largest],arr[i]
swaps += 1
count += heapify(arr, n, largest)
return count
def heapSort(arr):
global swaps
n = len(arr)
count = 0
for i in range(n, -1, -1):
heapify(arr, n, i)
count += heapify(arr, i, 0)
for i in range(n-1, 0, -1):
arr[i], arr[0] = arr[0], arr[i]
swaps += 1
count += heapify(arr, i, 0)
return "HEAP SORT:\nComparisons: " + str(count) + "\nSwaps: " + str(swaps) | swaps = 0
def heapify(arr, n, i):
global swaps
count = 0
largest = i
l = 2 * i + 1
r = 2 * i + 2
if l < n and arr[i] < arr[l]:
largest = l
if r < n and arr[largest] < arr[r]:
largest = r
if largest != i:
count += 1
(arr[i], arr[largest]) = (arr[largest], arr[i])
swaps += 1
count += heapify(arr, n, largest)
return count
def heap_sort(arr):
global swaps
n = len(arr)
count = 0
for i in range(n, -1, -1):
heapify(arr, n, i)
count += heapify(arr, i, 0)
for i in range(n - 1, 0, -1):
(arr[i], arr[0]) = (arr[0], arr[i])
swaps += 1
count += heapify(arr, i, 0)
return 'HEAP SORT:\nComparisons: ' + str(count) + '\nSwaps: ' + str(swaps) |
class Solution:
def solve(self, words):
groups = defaultdict(list)
for word in words:
for key in groups:
if len(word)==len(key) and any(all(word[j]==key[j-i] for j in range(i,len(word))) and all(word[j]==key[len(word)-i+j] for j in range(i)) for i in range(len(word))):
groups[key].append(word)
break
else:
groups[word].append(word)
return len(groups)
| class Solution:
def solve(self, words):
groups = defaultdict(list)
for word in words:
for key in groups:
if len(word) == len(key) and any((all((word[j] == key[j - i] for j in range(i, len(word)))) and all((word[j] == key[len(word) - i + j] for j in range(i))) for i in range(len(word)))):
groups[key].append(word)
break
else:
groups[word].append(word)
return len(groups) |
def findDecision(obj): #obj[0]: Passanger, obj[1]: Weather, obj[2]: Time, obj[3]: Coupon, obj[4]: Coupon_validity, obj[5]: Gender, obj[6]: Age, obj[7]: Maritalstatus, obj[8]: Children, obj[9]: Education, obj[10]: Occupation, obj[11]: Income, obj[12]: Bar, obj[13]: Coffeehouse, obj[14]: Restaurantlessthan20, obj[15]: Restaurant20to50, obj[16]: Direction_same, obj[17]: Distance
# {"feature": "Coupon", "instances": 85, "metric_value": 0.874, "depth": 1}
if obj[3]<=3:
# {"feature": "Occupation", "instances": 58, "metric_value": 0.7355, "depth": 2}
if obj[10]<=20:
# {"feature": "Coffeehouse", "instances": 56, "metric_value": 0.6769, "depth": 3}
if obj[13]>0.0:
# {"feature": "Time", "instances": 45, "metric_value": 0.7642, "depth": 4}
if obj[2]<=3:
# {"feature": "Bar", "instances": 39, "metric_value": 0.8213, "depth": 5}
if obj[12]<=3.0:
# {"feature": "Distance", "instances": 38, "metric_value": 0.7897, "depth": 6}
if obj[17]>1:
# {"feature": "Restaurantlessthan20", "instances": 24, "metric_value": 0.9183, "depth": 7}
if obj[14]<=2.0:
# {"feature": "Age", "instances": 15, "metric_value": 0.9968, "depth": 8}
if obj[6]<=4:
# {"feature": "Restaurant20to50", "instances": 13, "metric_value": 0.9612, "depth": 9}
if obj[15]>-1.0:
# {"feature": "Weather", "instances": 11, "metric_value": 0.994, "depth": 10}
if obj[1]<=1:
# {"feature": "Passanger", "instances": 10, "metric_value": 1.0, "depth": 11}
if obj[0]<=1:
# {"feature": "Maritalstatus", "instances": 6, "metric_value": 0.9183, "depth": 12}
if obj[7]>0:
# {"feature": "Direction_same", "instances": 5, "metric_value": 0.7219, "depth": 13}
if obj[16]<=0:
return 'False'
elif obj[16]>0:
return 'True'
else: return 'True'
elif obj[7]<=0:
return 'True'
else: return 'True'
elif obj[0]>1:
# {"feature": "Coupon_validity", "instances": 4, "metric_value": 0.8113, "depth": 12}
if obj[4]>0:
return 'True'
elif obj[4]<=0:
return 'False'
else: return 'False'
else: return 'True'
elif obj[1]>1:
return 'True'
else: return 'True'
elif obj[15]<=-1.0:
return 'True'
else: return 'True'
elif obj[6]>4:
return 'False'
else: return 'False'
elif obj[14]>2.0:
# {"feature": "Income", "instances": 9, "metric_value": 0.5033, "depth": 8}
if obj[11]<=6:
return 'True'
elif obj[11]>6:
# {"feature": "Passanger", "instances": 3, "metric_value": 0.9183, "depth": 9}
if obj[0]<=1:
return 'True'
elif obj[0]>1:
return 'False'
else: return 'False'
else: return 'True'
else: return 'True'
elif obj[17]<=1:
# {"feature": "Education", "instances": 14, "metric_value": 0.3712, "depth": 7}
if obj[9]<=2:
return 'True'
elif obj[9]>2:
# {"feature": "Age", "instances": 4, "metric_value": 0.8113, "depth": 8}
if obj[6]>1:
return 'True'
elif obj[6]<=1:
return 'False'
else: return 'False'
else: return 'True'
else: return 'True'
elif obj[12]>3.0:
return 'False'
else: return 'False'
elif obj[2]>3:
return 'True'
else: return 'True'
elif obj[13]<=0.0:
return 'True'
else: return 'True'
elif obj[10]>20:
return 'False'
else: return 'False'
elif obj[3]>3:
# {"feature": "Coffeehouse", "instances": 27, "metric_value": 0.999, "depth": 2}
if obj[13]>0.0:
# {"feature": "Bar", "instances": 19, "metric_value": 0.9495, "depth": 3}
if obj[12]>0.0:
# {"feature": "Income", "instances": 14, "metric_value": 1.0, "depth": 4}
if obj[11]<=4:
# {"feature": "Education", "instances": 11, "metric_value": 0.9457, "depth": 5}
if obj[9]<=2:
# {"feature": "Distance", "instances": 7, "metric_value": 0.9852, "depth": 6}
if obj[17]<=1:
return 'True'
elif obj[17]>1:
return 'False'
else: return 'False'
elif obj[9]>2:
return 'False'
else: return 'False'
elif obj[11]>4:
return 'True'
else: return 'True'
elif obj[12]<=0.0:
return 'True'
else: return 'True'
elif obj[13]<=0.0:
# {"feature": "Passanger", "instances": 8, "metric_value": 0.8113, "depth": 3}
if obj[0]>1:
# {"feature": "Education", "instances": 4, "metric_value": 1.0, "depth": 4}
if obj[9]>0:
return 'True'
elif obj[9]<=0:
return 'False'
else: return 'False'
elif obj[0]<=1:
return 'False'
else: return 'False'
else: return 'False'
else: return 'True'
| def find_decision(obj):
if obj[3] <= 3:
if obj[10] <= 20:
if obj[13] > 0.0:
if obj[2] <= 3:
if obj[12] <= 3.0:
if obj[17] > 1:
if obj[14] <= 2.0:
if obj[6] <= 4:
if obj[15] > -1.0:
if obj[1] <= 1:
if obj[0] <= 1:
if obj[7] > 0:
if obj[16] <= 0:
return 'False'
elif obj[16] > 0:
return 'True'
else:
return 'True'
elif obj[7] <= 0:
return 'True'
else:
return 'True'
elif obj[0] > 1:
if obj[4] > 0:
return 'True'
elif obj[4] <= 0:
return 'False'
else:
return 'False'
else:
return 'True'
elif obj[1] > 1:
return 'True'
else:
return 'True'
elif obj[15] <= -1.0:
return 'True'
else:
return 'True'
elif obj[6] > 4:
return 'False'
else:
return 'False'
elif obj[14] > 2.0:
if obj[11] <= 6:
return 'True'
elif obj[11] > 6:
if obj[0] <= 1:
return 'True'
elif obj[0] > 1:
return 'False'
else:
return 'False'
else:
return 'True'
else:
return 'True'
elif obj[17] <= 1:
if obj[9] <= 2:
return 'True'
elif obj[9] > 2:
if obj[6] > 1:
return 'True'
elif obj[6] <= 1:
return 'False'
else:
return 'False'
else:
return 'True'
else:
return 'True'
elif obj[12] > 3.0:
return 'False'
else:
return 'False'
elif obj[2] > 3:
return 'True'
else:
return 'True'
elif obj[13] <= 0.0:
return 'True'
else:
return 'True'
elif obj[10] > 20:
return 'False'
else:
return 'False'
elif obj[3] > 3:
if obj[13] > 0.0:
if obj[12] > 0.0:
if obj[11] <= 4:
if obj[9] <= 2:
if obj[17] <= 1:
return 'True'
elif obj[17] > 1:
return 'False'
else:
return 'False'
elif obj[9] > 2:
return 'False'
else:
return 'False'
elif obj[11] > 4:
return 'True'
else:
return 'True'
elif obj[12] <= 0.0:
return 'True'
else:
return 'True'
elif obj[13] <= 0.0:
if obj[0] > 1:
if obj[9] > 0:
return 'True'
elif obj[9] <= 0:
return 'False'
else:
return 'False'
elif obj[0] <= 1:
return 'False'
else:
return 'False'
else:
return 'False'
else:
return 'True' |
#-- gestures supported by Otto
#-- OttDIY Python Project, 2020
OTTOHAPPY = const(0)
OTTOSUPERHAPPY = const(1)
OTTOSAD = const(2)
OTTOSLEEPING = const(3)
OTTOFART = const(4)
OTTOCONFUSED = const(5)
OTTOLOVE = const(6)
OTTOANGRY = const(7)
OTTOFRETFUL = const(8)
OTTOMAGIC = const(9)
OTTOWAVE = const(10)
OTTOVICTORY = const(11)
OTTOFAIL = const(12)
| ottohappy = const(0)
ottosuperhappy = const(1)
ottosad = const(2)
ottosleeping = const(3)
ottofart = const(4)
ottoconfused = const(5)
ottolove = const(6)
ottoangry = const(7)
ottofretful = const(8)
ottomagic = const(9)
ottowave = const(10)
ottovictory = const(11)
ottofail = const(12) |
products = {}
command = input()
while command != "statistics":
command = command.split(": ")
key = command[0]
value = int(command[1])
if key not in products:
products[key] = 0
products[key] += value
command = input()
print("Products in stock:")
for k, v in products.items():
print(f"- {k}: {v}")
print(f"Total Products: {len(products)}")
print(f"Total Quantity: {sum(products.values())}") | products = {}
command = input()
while command != 'statistics':
command = command.split(': ')
key = command[0]
value = int(command[1])
if key not in products:
products[key] = 0
products[key] += value
command = input()
print('Products in stock:')
for (k, v) in products.items():
print(f'- {k}: {v}')
print(f'Total Products: {len(products)}')
print(f'Total Quantity: {sum(products.values())}') |
# Simple function to add values
def aFunction():
a = 1
b = 2
c = a + b
print(c)
return c
# simple loop to count up in a range
def aLoop():
count = 0
# for each item in the range
for item in range(0, 100):
print(count)
count = count + 1
return count
# pass in a value below to aFunc, will fail if not an integer
def aFunc_1(my_num):
result = aFunc_2(my_num)
print(result)
return result
# aFunc_2 will add 1 to var and then return the value of var to aFunc_1
def aFunc_2(var):
var += 1
return var
# If statement in a function. If a_lang is (==) a specific value then it prints a statement
def anIf(a_lang):
if a_lang == "Python":
result = 'cool'
print(result)
elif a_lang == "JAVA":
result = 'not as cool as Python'
print(result)
else:
result = 'You should have picked Python'
print(result)
return result
my_num: int = 10
language = "Python"
if __name__ == "__main__":
# aFunction()
aLoop()
# aFunc_1(my_num)
# anIf(language)
| def a_function():
a = 1
b = 2
c = a + b
print(c)
return c
def a_loop():
count = 0
for item in range(0, 100):
print(count)
count = count + 1
return count
def a_func_1(my_num):
result = a_func_2(my_num)
print(result)
return result
def a_func_2(var):
var += 1
return var
def an_if(a_lang):
if a_lang == 'Python':
result = 'cool'
print(result)
elif a_lang == 'JAVA':
result = 'not as cool as Python'
print(result)
else:
result = 'You should have picked Python'
print(result)
return result
my_num: int = 10
language = 'Python'
if __name__ == '__main__':
a_loop() |
#!/usr/bin/python
# 1. Retourner VRAI si N est parfait, faux sinon
# 2. Afficher la liste des nombres parfait compris entre 1 et 10 000
def est_parfait(n):
somme = 0
for i in range(1, n):
if n % i == 0:
somme += i
if somme == n:
return True
else:
return False
for i in range(10000):
if est_parfait(i):
print(i)
| def est_parfait(n):
somme = 0
for i in range(1, n):
if n % i == 0:
somme += i
if somme == n:
return True
else:
return False
for i in range(10000):
if est_parfait(i):
print(i) |
class Credentials(object):
@staticmethod
def refresh(request, **kwargs):
pass
@property
def token(self):
return "PASSWORD"
def default(scopes: list, **kwargs):
return Credentials(), "myproject"
class Request(object):
pass
| class Credentials(object):
@staticmethod
def refresh(request, **kwargs):
pass
@property
def token(self):
return 'PASSWORD'
def default(scopes: list, **kwargs):
return (credentials(), 'myproject')
class Request(object):
pass |
xCoordinate = [1,2,3,4,5,6,7,8,9,10]
xCdt = [1,2,3,4,5,6,7,8,9,10]
def setup():
size(500,500)
smooth()
noStroke()
for i in range(len(xCoordinate)):
xCoordinate[i] = 35*i + 90
for j in range(len(xCdt)):
xCdt[j] = 35*j + 90
def draw():
background(50)
for j in range(len(xCdt)):
fill(200,40)
ellipse( xCdt[j], 340, 150-j*15, 150-j*15)
fill(0)
ellipse(xCdt[j], 340, 3, 3)
for i in range(len(xCoordinate)):
fill(200,40)
ellipse(xCoordinate[i], 250, 15*i, 15*i)
fill(0)
ellipse(xCoordinate[i], 250, 3, 3)
| x_coordinate = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
x_cdt = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
def setup():
size(500, 500)
smooth()
no_stroke()
for i in range(len(xCoordinate)):
xCoordinate[i] = 35 * i + 90
for j in range(len(xCdt)):
xCdt[j] = 35 * j + 90
def draw():
background(50)
for j in range(len(xCdt)):
fill(200, 40)
ellipse(xCdt[j], 340, 150 - j * 15, 150 - j * 15)
fill(0)
ellipse(xCdt[j], 340, 3, 3)
for i in range(len(xCoordinate)):
fill(200, 40)
ellipse(xCoordinate[i], 250, 15 * i, 15 * i)
fill(0)
ellipse(xCoordinate[i], 250, 3, 3) |
#TeamLeague
class Team:
def __init__(self, owner, value, id1, name):
self.owner = owner
self.value = value
self.id1 = id1
self.name = name
class League:
def __init__(self, team_list, league):
self.league = league
self.team_list = team_list
def find_minimum_team_by_Id(self):
minim = 999999
obj = None
for each in self.team_list:
if each.id1 < minim:
minim = each.id1
obj = each
return obj
def sort_by_team_Id(self):
l = []
for each in self.team_list:
l.append(each.id1)
return sorted(l) if len(l)!=0 else None
n = int(input())
l = []
for i in range(n):
own = input()
value = float(input())
id = int(input())
name = input()
l.append(Team(own,value,id,name))
obj = League(l,"league")
x = obj.find_minimum_team_by_Id()
y = obj.sort_by_team_Id()
if x == None:
print("No Data Found")
else:
print(x.owner)
print(x.value)
print(x.id1)
print(x.name)
if y == None:
print("No Data Found")
else:
for i in y:
print(i)
| class Team:
def __init__(self, owner, value, id1, name):
self.owner = owner
self.value = value
self.id1 = id1
self.name = name
class League:
def __init__(self, team_list, league):
self.league = league
self.team_list = team_list
def find_minimum_team_by__id(self):
minim = 999999
obj = None
for each in self.team_list:
if each.id1 < minim:
minim = each.id1
obj = each
return obj
def sort_by_team__id(self):
l = []
for each in self.team_list:
l.append(each.id1)
return sorted(l) if len(l) != 0 else None
n = int(input())
l = []
for i in range(n):
own = input()
value = float(input())
id = int(input())
name = input()
l.append(team(own, value, id, name))
obj = league(l, 'league')
x = obj.find_minimum_team_by_Id()
y = obj.sort_by_team_Id()
if x == None:
print('No Data Found')
else:
print(x.owner)
print(x.value)
print(x.id1)
print(x.name)
if y == None:
print('No Data Found')
else:
for i in y:
print(i) |
## Solution Challenge 10
def data_url(country):
'''
Function to build url for data retrieval
'''
BASE_URL = "http://berkeleyearth.lbl.gov/auto/Regional/TAVG/Text/"
SUFFIX_URL = "-TAVG-Trend.txt"
return(BASE_URL + country + SUFFIX_URL) | def data_url(country):
"""
Function to build url for data retrieval
"""
base_url = 'http://berkeleyearth.lbl.gov/auto/Regional/TAVG/Text/'
suffix_url = '-TAVG-Trend.txt'
return BASE_URL + country + SUFFIX_URL |
#
# PySNMP MIB module RFC1382-MIB (http://pysnmp.sf.net)
# ASN.1 source http://mibs.snmplabs.com:80/asn1/RFC1382-MIB
# Produced by pysmi-0.0.7 at Sun Feb 14 00:26:33 2016
# On host bldfarm platform Linux version 4.1.13-100.fc21.x86_64 by user goose
# Using Python version 3.5.0 (default, Jan 5 2016, 17:11:52)
#
( OctetString, ObjectIdentifier, Integer, ) = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer")
( NamedValues, ) = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
( ConstraintsUnion, ValueSizeConstraint, SingleValueConstraint, ValueRangeConstraint, ConstraintsIntersection, ) = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "ValueSizeConstraint", "SingleValueConstraint", "ValueRangeConstraint", "ConstraintsIntersection")
( PositiveInteger, ) = mibBuilder.importSymbols("RFC1253-MIB", "PositiveInteger")
( EntryStatus, ) = mibBuilder.importSymbols("RFC1271-MIB", "EntryStatus")
( IfIndexType, ) = mibBuilder.importSymbols("RFC1381-MIB", "IfIndexType")
( ModuleCompliance, NotificationGroup, ) = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
( IpAddress, iso, ObjectIdentity, MibIdentifier, NotificationType, MibScalar, MibTable, MibTableRow, MibTableColumn, ModuleIdentity, Counter32, NotificationType, transmission, Bits, TimeTicks, Integer32, Gauge32, Counter64, Unsigned32, ) = mibBuilder.importSymbols("SNMPv2-SMI", "IpAddress", "iso", "ObjectIdentity", "MibIdentifier", "NotificationType", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "ModuleIdentity", "Counter32", "NotificationType", "transmission", "Bits", "TimeTicks", "Integer32", "Gauge32", "Counter64", "Unsigned32")
( TextualConvention, DisplayString, ) = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString")
x25 = MibIdentifier((1, 3, 6, 1, 2, 1, 10, 5))
class X121Address(OctetString):
subtypeSpec = OctetString.subtypeSpec+ValueSizeConstraint(0,17)
x25AdmnTable = MibTable((1, 3, 6, 1, 2, 1, 10, 5, 1), )
if mibBuilder.loadTexts: x25AdmnTable.setDescription('This table contains the administratively\n set configuration parameters for an X.25\n Packet Level Entity (PLE).\n\n Most of the objects in this table have\n corresponding objects in the x25OperTable.\n This table contains the values as last set\n by the administrator. The x25OperTable\n contains the values actually in use by an\n X.25 PLE.\n\n Changing an administrative value may or may\n not change a current operating value. The\n operating value may not change until the\n interface is restarted. Some\n implementations may change the values\n immediately upon changing the administrative\n table. All implementations are required to\n load the values from the administrative\n table when initializing a PLE.')
x25AdmnEntry = MibTableRow((1, 3, 6, 1, 2, 1, 10, 5, 1, 1), ).setIndexNames((0, "RFC1382-MIB", "x25AdmnIndex"))
if mibBuilder.loadTexts: x25AdmnEntry.setDescription('Entries of x25AdmnTable.')
x25AdmnIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 1), IfIndexType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25AdmnIndex.setDescription('The ifIndex value for the X.25 Interface.')
x25AdmnInterfaceMode = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3,))).clone(namedValues=NamedValues(("dte", 1), ("dce", 2), ("dxe", 3),))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25AdmnInterfaceMode.setDescription('Identifies DCE/DTE mode in which the\n interface operates. A value of dxe\n indicates the mode will be determined by XID\n negotiation.')
x25AdmnMaxActiveCircuits = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,4096))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25AdmnMaxActiveCircuits.setDescription('The maximum number of circuits this PLE can\n support; including PVCs.')
x25AdmnPacketSequencing = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2,))).clone(namedValues=NamedValues(("modulo8", 1), ("modulo128", 2),))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25AdmnPacketSequencing.setDescription('The modulus of the packet sequence number\n space.')
x25AdmnRestartTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 5), PositiveInteger()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25AdmnRestartTimer.setDescription('The T20 restart timer in milliseconds.')
x25AdmnCallTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 6), PositiveInteger()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25AdmnCallTimer.setDescription('The T21 Call timer in milliseconds.')
x25AdmnResetTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 7), PositiveInteger()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25AdmnResetTimer.setDescription('The T22 Reset timer in milliseconds.')
x25AdmnClearTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 8), PositiveInteger()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25AdmnClearTimer.setDescription('The T23 Clear timer in milliseconds.')
x25AdmnWindowTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 9), PositiveInteger()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25AdmnWindowTimer.setDescription('The T24 window status transmission timer in\n milliseconds. A value of 2147483647\n indicates no window timer in use.')
x25AdmnDataRxmtTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 10), PositiveInteger()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25AdmnDataRxmtTimer.setDescription('The T25 data retransmission timer in\n\n\n milliseconds. A value of 2147483647\n indicates no data retransmission timer in\n use.')
x25AdmnInterruptTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 11), PositiveInteger()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25AdmnInterruptTimer.setDescription('The T26 interrupt timer in milliseconds. A\n value of 2147483647 indicates no interrupt\n timer in use.')
x25AdmnRejectTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 12), PositiveInteger()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25AdmnRejectTimer.setDescription('The T27 Reject retransmission timer in\n milliseconds. A value of 2147483647\n indicates no reject timer in use.')
x25AdmnRegistrationRequestTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 13), PositiveInteger()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25AdmnRegistrationRequestTimer.setDescription('The T28 registration timer in milliseconds.\n A value of 2147483647 indicates no\n registration timer in use.')
x25AdmnMinimumRecallTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 14), PositiveInteger()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25AdmnMinimumRecallTimer.setDescription('Minimum time interval between unsuccessful\n call attempts in milliseconds.')
x25AdmnRestartCount = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 15), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25AdmnRestartCount.setDescription('The R20 restart retransmission count.')
x25AdmnResetCount = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 16), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25AdmnResetCount.setDescription('The r22 Reset retransmission count.')
x25AdmnClearCount = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 17), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25AdmnClearCount.setDescription('The r23 Clear retransmission count.')
x25AdmnDataRxmtCount = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 18), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25AdmnDataRxmtCount.setDescription('The R25 Data retransmission count. This\n value is irrelevant if the\n x25AdmnDataRxmtTimer indicates no timer in\n use.')
x25AdmnRejectCount = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 19), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25AdmnRejectCount.setDescription('The R27 reject retransmission count. This\n value is irrelevant if the\n x25AdmnRejectTimer indicates no timer in\n use.')
x25AdmnRegistrationRequestCount = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 20), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25AdmnRegistrationRequestCount.setDescription('The R28 Registration retransmission Count.\n This value is irrelevant if the\n x25AdmnRegistrationRequestTimer indicates no\n timer in use.')
x25AdmnNumberPVCs = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 21), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,4096))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25AdmnNumberPVCs.setDescription('The number of PVC configured for this PLE.\n The PVCs use channel numbers from 1 to this\n number.')
x25AdmnDefCallParamId = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 22), ObjectIdentifier()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25AdmnDefCallParamId.setDescription('This identifies the instance of the\n x25CallParmIndex for the entry in the\n x25CallParmTable which contains the default\n call parameters for this PLE.')
x25AdmnLocalAddress = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 23), X121Address()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25AdmnLocalAddress.setDescription('The local address for this PLE subnetwork.\n A zero length address maybe returned by PLEs\n that only support PVCs.')
x25AdmnProtocolVersionSupported = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 24), ObjectIdentifier()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25AdmnProtocolVersionSupported.setDescription('Identifies the version of the X.25 protocol\n this interface should support. Object\n identifiers for common versions are defined\n below in the x25ProtocolVersion subtree.')
x25OperTable = MibTable((1, 3, 6, 1, 2, 1, 10, 5, 2), )
if mibBuilder.loadTexts: x25OperTable.setDescription('The operation parameters in use by the X.25\n PLE.')
x25OperEntry = MibTableRow((1, 3, 6, 1, 2, 1, 10, 5, 2, 1), ).setIndexNames((0, "RFC1382-MIB", "x25OperIndex"))
if mibBuilder.loadTexts: x25OperEntry.setDescription('Entries of x25OperTable.')
x25OperIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 1), IfIndexType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25OperIndex.setDescription('The ifIndex value for the X.25 interface.')
x25OperInterfaceMode = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3,))).clone(namedValues=NamedValues(("dte", 1), ("dce", 2), ("dxe", 3),))).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25OperInterfaceMode.setDescription('Identifies DCE/DTE mode in which the\n interface operates. A value of dxe\n indicates the role will be determined by XID\n negotiation at the Link Layer and that\n negotiation has not yet taken place.')
x25OperMaxActiveCircuits = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,4096))).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25OperMaxActiveCircuits.setDescription('Maximum number of circuits this PLE can\n support.')
x25OperPacketSequencing = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2,))).clone(namedValues=NamedValues(("modulo8", 1), ("modulo128", 2),))).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25OperPacketSequencing.setDescription('The modulus of the packet sequence number\n space.')
x25OperRestartTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 5), PositiveInteger()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25OperRestartTimer.setDescription('The T20 restart timer in milliseconds.')
x25OperCallTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 6), PositiveInteger()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25OperCallTimer.setDescription('The T21 Call timer in milliseconds.')
x25OperResetTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 7), PositiveInteger()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25OperResetTimer.setDescription('The T22 Reset timer in milliseconds.')
x25OperClearTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 8), PositiveInteger()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25OperClearTimer.setDescription('The T23 Clear timer in milliseconds.')
x25OperWindowTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 9), PositiveInteger()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25OperWindowTimer.setDescription('The T24 window status transmission timer\n\n\n milliseconds. A value of 2147483647\n indicates no window timer in use.')
x25OperDataRxmtTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 10), PositiveInteger()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25OperDataRxmtTimer.setDescription('The T25 Data Retransmission timer in\n milliseconds. A value of 2147483647\n indicates no data retransmission timer in\n use.')
x25OperInterruptTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 11), PositiveInteger()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25OperInterruptTimer.setDescription('The T26 Interrupt timer in milliseconds. A\n value of 2147483647 indicates interrupts are\n not being used.')
x25OperRejectTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 12), PositiveInteger()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25OperRejectTimer.setDescription('The T27 Reject retransmission timer in\n milliseconds. A value of 2147483647\n indicates no reject timer in use.')
x25OperRegistrationRequestTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 13), PositiveInteger()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25OperRegistrationRequestTimer.setDescription('The T28 registration timer in milliseconds.\n A value of 2147483647 indicates no\n registration timer in use.')
x25OperMinimumRecallTimer = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 14), PositiveInteger()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25OperMinimumRecallTimer.setDescription('Minimum time interval between unsuccessful\n call attempts in milliseconds.')
x25OperRestartCount = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 15), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25OperRestartCount.setDescription('The R20 restart retransmission count.')
x25OperResetCount = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 16), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25OperResetCount.setDescription('The r22 Reset retransmission count.')
x25OperClearCount = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 17), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25OperClearCount.setDescription('The r23 Clear retransmission count.')
x25OperDataRxmtCount = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 18), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25OperDataRxmtCount.setDescription('The R25 Data retransmission count. This\n value is undefined if the\n x25OperDataRxmtTimer indicates no timer in\n use.')
x25OperRejectCount = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 19), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25OperRejectCount.setDescription('The R27 reject retransmission count. This\n value is undefined if the x25OperRejectTimer\n indicates no timer in use.')
x25OperRegistrationRequestCount = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 20), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25OperRegistrationRequestCount.setDescription('The R28 Registration retransmission Count.\n This value is undefined if the\n x25OperREgistrationRequestTimer indicates no\n timer in use.')
x25OperNumberPVCs = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 21), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,4096))).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25OperNumberPVCs.setDescription('The number of PVC configured for this PLE.\n The PVCs use channel numbers from 1 to this\n number.')
x25OperDefCallParamId = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 22), ObjectIdentifier()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25OperDefCallParamId.setDescription('This identifies the instance of the\n x25CallParmIndex for the entry in the\n x25CallParmTable that contains the default\n call parameters for this PLE.')
x25OperLocalAddress = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 23), X121Address()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25OperLocalAddress.setDescription('The local address for this PLE subnetwork.\n A zero length address maybe returned by PLEs\n that only support PVCs.')
x25OperDataLinkId = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 24), ObjectIdentifier()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25OperDataLinkId.setDescription('This identifies the instance of the index\n object in the first table of the most device\n specific MIB for the interface used by this\n PLE.')
x25OperProtocolVersionSupported = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 25), ObjectIdentifier()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25OperProtocolVersionSupported.setDescription('Identifies the version of the X.25 protocol\n this interface supports. Object identifiers\n for common versions are defined below in the\n x25ProtocolVersion subtree.')
x25StatTable = MibTable((1, 3, 6, 1, 2, 1, 10, 5, 3), )
if mibBuilder.loadTexts: x25StatTable.setDescription('Statistics information about this X.25\n PLE.')
x25StatEntry = MibTableRow((1, 3, 6, 1, 2, 1, 10, 5, 3, 1), ).setIndexNames((0, "RFC1382-MIB", "x25StatIndex"))
if mibBuilder.loadTexts: x25StatEntry.setDescription('Entries of the x25StatTable.')
x25StatIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 1), IfIndexType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25StatIndex.setDescription('The ifIndex value for the X.25 interface.')
x25StatInCalls = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 2), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25StatInCalls.setDescription('The number of incoming calls received.')
x25StatInCallRefusals = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 3), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25StatInCallRefusals.setDescription('The number of incoming calls refused. This\n includes calls refused by the PLE and by\n higher layers. This also includes calls\n cleared because of restricted fast select.')
x25StatInProviderInitiatedClears = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 4), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25StatInProviderInitiatedClears.setDescription('The number of clear requests with a cause\n code other than DTE initiated.')
x25StatInRemotelyInitiatedResets = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 5), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25StatInRemotelyInitiatedResets.setDescription('The number of reset requests received with\n\n\n cause code DTE initiated.')
x25StatInProviderInitiatedResets = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 6), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25StatInProviderInitiatedResets.setDescription('The number of reset requests received with\n cause code other than DTE initiated.')
x25StatInRestarts = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 7), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25StatInRestarts.setDescription('The number of remotely initiated (including\n provider initiated) restarts experienced by\n the PLE excluding the restart associated\n with bringing up the PLE interface. This\n only counts restarts received when the PLE\n already has an established connection with\n the remove PLE.')
x25StatInDataPackets = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 8), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25StatInDataPackets.setDescription('The number of data packets received.')
x25StatInAccusedOfProtocolErrors = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 9), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25StatInAccusedOfProtocolErrors.setDescription('The number of packets received containing a\n procedure error cause code. These include\n clear, reset, restart, or diagnostic\n packets.')
x25StatInInterrupts = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 10), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25StatInInterrupts.setDescription('The number of interrupt packets received by\n the PLE or over the PVC/VC.')
x25StatOutCallAttempts = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 11), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25StatOutCallAttempts.setDescription('The number of calls attempted.')
x25StatOutCallFailures = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 12), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25StatOutCallFailures.setDescription('The number of call attempts which failed.\n This includes calls that were cleared\n because of restrictive fast select.')
x25StatOutInterrupts = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 13), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25StatOutInterrupts.setDescription('The number of interrupt packets send by the\n PLE or over the PVC/VC.')
x25StatOutDataPackets = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 14), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25StatOutDataPackets.setDescription('The number of data packets sent by this\n PLE.')
x25StatOutgoingCircuits = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 15), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25StatOutgoingCircuits.setDescription('The number of active outgoing circuits.\n This includes call requests sent but not yet\n confirmed. This does not count PVCs.')
x25StatIncomingCircuits = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 16), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25StatIncomingCircuits.setDescription('The number of active Incoming Circuits.\n This includes call indications received but\n not yet acknowledged. This does not count\n PVCs.')
x25StatTwowayCircuits = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 17), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25StatTwowayCircuits.setDescription('The number of active two-way Circuits.\n This includes call requests sent but not yet\n confirmed. This does not count PVCs.')
x25StatRestartTimeouts = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 18), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25StatRestartTimeouts.setDescription('The number of times the T20 restart timer\n expired.')
x25StatCallTimeouts = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 19), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25StatCallTimeouts.setDescription('The number of times the T21 call timer\n expired.')
x25StatResetTimeouts = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 20), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25StatResetTimeouts.setDescription('The number of times the T22 reset timer\n expired.')
x25StatClearTimeouts = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 21), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25StatClearTimeouts.setDescription('The number of times the T23 clear timer\n expired.')
x25StatDataRxmtTimeouts = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 22), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25StatDataRxmtTimeouts.setDescription('The number of times the T25 data timer\n expired.')
x25StatInterruptTimeouts = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 23), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25StatInterruptTimeouts.setDescription('The number of times the T26 interrupt timer\n expired.')
x25StatRetryCountExceededs = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 24), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25StatRetryCountExceededs.setDescription('The number of times a retry counter was\n exhausted.')
x25StatClearCountExceededs = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 25), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25StatClearCountExceededs.setDescription('The number of times the R23 clear count was\n exceeded.')
x25ChannelTable = MibTable((1, 3, 6, 1, 2, 1, 10, 5, 4), )
if mibBuilder.loadTexts: x25ChannelTable.setDescription('These objects contain information about the\n channel number configuration in an X.25 PLE.\n These values are the configured values.\n changes in these values after the interfaces\n has started may not be reflected in the\n operating PLE.')
x25ChannelEntry = MibTableRow((1, 3, 6, 1, 2, 1, 10, 5, 4, 1), ).setIndexNames((0, "RFC1382-MIB", "x25ChannelIndex"))
if mibBuilder.loadTexts: x25ChannelEntry.setDescription('Entries of x25ChannelTable.')
x25ChannelIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 4, 1, 1), IfIndexType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25ChannelIndex.setDescription('The ifIndex value for the X.25 Interface.')
x25ChannelLIC = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 4, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,4095))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25ChannelLIC.setDescription('Lowest Incoming channel.')
x25ChannelHIC = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 4, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,4095))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25ChannelHIC.setDescription('Highest Incoming channel. A value of zero\n indicates no channels in this range.')
x25ChannelLTC = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 4, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,4095))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25ChannelLTC.setDescription('Lowest Two-way channel.')
x25ChannelHTC = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 4, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,4095))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25ChannelHTC.setDescription('Highest Two-way channel. A value of zero\n indicates no channels in this range.')
x25ChannelLOC = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 4, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,4095))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25ChannelLOC.setDescription('Lowest outgoing channel.')
x25ChannelHOC = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 4, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,4095))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25ChannelHOC.setDescription('Highest outgoing channel. A value of zero\n\n\n indicates no channels in this range.')
x25CircuitTable = MibTable((1, 3, 6, 1, 2, 1, 10, 5, 5), )
if mibBuilder.loadTexts: x25CircuitTable.setDescription('These objects contain general information\n about a specific circuit of an X.25 PLE.')
x25CircuitEntry = MibTableRow((1, 3, 6, 1, 2, 1, 10, 5, 5, 1), ).setIndexNames((0, "RFC1382-MIB", "x25CircuitIndex"), (0, "RFC1382-MIB", "x25CircuitChannel"))
if mibBuilder.loadTexts: x25CircuitEntry.setDescription('Entries of x25CircuitTable.')
x25CircuitIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 1), IfIndexType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25CircuitIndex.setDescription('The ifIndex value for the X.25 Interface.')
x25CircuitChannel = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,4095))).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25CircuitChannel.setDescription('The channel number for this circuit.')
x25CircuitStatus = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10,))).clone(namedValues=NamedValues(("invalid", 1), ("closed", 2), ("calling", 3), ("open", 4), ("clearing", 5), ("pvc", 6), ("pvcResetting", 7), ("startClear", 8), ("startPvcResetting", 9), ("other", 10),))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CircuitStatus.setDescription("This object reports the current status of\n the circuit.\n\n An existing instance of this object can only\n be set to startClear, startPvcResetting, or\n invalid. An instance with the value calling\n or open can only be set to startClear and\n that action will start clearing the circuit.\n An instance with the value PVC can only be\n set to startPvcResetting or invalid and that\n action resets the PVC or deletes the circuit\n respectively. The values startClear or\n startPvcResetting will never be returned by\n an agent. An attempt to set the status of\n an existing instance to a value other than\n one of these values will result in an error.\n\n A non-existing instance can be set to PVC to\n create a PVC if the implementation supports\n dynamic creation of PVCs. Some\n implementations may only allow creation and\n deletion of PVCs if the interface is down.\n Since the instance identifier will supply\n the PLE index and the channel number,\n setting this object alone supplies\n sufficient information to create the\n instance. All the DEFVAL clauses for the\n other objects of this table are appropriate\n for creating a PVC; PLEs creating entries\n for placed or accepted calls will use values\n appropriate for the call rather than the\n value of the DEFVAL clause. Two managers\n trying to create the same PVC can determine\n from the return code which manager succeeded\n and which failed (the failing manager fails\n because it can not set a value of PVC for an\n existing object).\n\n\n An entry in the closed or invalid state may\n be deleted or reused at the agent's\n convence. If the entry is kept in the\n closed state, the values of the parameters\n associated with the entry must be correct.\n Closed implies the values in the circuit\n table are correct.\n\n The value of invalid indicates the other\n values in the table are invalid. Many\n agents may never return a value of invalid\n because they dynamically allocate and free\n unused table entries. An agent for a\n statically configured systems can return\n invalid to indicate the entry has not yet\n been used so the counters contain no\n information.")
x25CircuitEstablishTime = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 4), TimeTicks()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25CircuitEstablishTime.setDescription('The value of sysUpTime when the channel was\n associated with this circuit. For outgoing\n SVCs, this is the time the first call packet\n was sent. For incoming SVCs, this is the\n time the call indication was received. For\n PVCs this is the time the PVC was able to\n pass data to a higher layer entity without\n loss of data.')
x25CircuitDirection = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3,))).clone(namedValues=NamedValues(("incoming", 1), ("outgoing", 2), ("pvc", 3),)).clone('pvc')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CircuitDirection.setDescription('The direction of the call that established\n this circuit.')
x25CircuitInOctets = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 6), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25CircuitInOctets.setDescription('The number of octets of user data delivered\n to upper layer.')
x25CircuitInPdus = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 7), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25CircuitInPdus.setDescription('The number of PDUs received for this\n circuit.')
x25CircuitInRemotelyInitiatedResets = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 8), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25CircuitInRemotelyInitiatedResets.setDescription('The number of Resets received for this\n circuit with cause code of DTE initiated.')
x25CircuitInProviderInitiatedResets = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 9), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25CircuitInProviderInitiatedResets.setDescription('The number of Resets received for this\n circuit with cause code other than DTE\n initiated.')
x25CircuitInInterrupts = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 10), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25CircuitInInterrupts.setDescription('The number of interrupt packets received\n for this circuit.')
x25CircuitOutOctets = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 11), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25CircuitOutOctets.setDescription('The number of octets of user data sent for\n this circuit.')
x25CircuitOutPdus = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 12), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25CircuitOutPdus.setDescription('The number of PDUs sent for this circuit.')
x25CircuitOutInterrupts = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 13), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25CircuitOutInterrupts.setDescription('The number of interrupt packets sent on\n this circuit.')
x25CircuitDataRetransmissionTimeouts = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 14), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25CircuitDataRetransmissionTimeouts.setDescription('The number of times the T25 data\n retransmission timer expired for this\n circuit.')
x25CircuitResetTimeouts = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 15), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25CircuitResetTimeouts.setDescription('The number of times the T22 reset timer\n expired for this circuit.')
x25CircuitInterruptTimeouts = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 16), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25CircuitInterruptTimeouts.setDescription('The number of times the T26 Interrupt timer\n expired for this circuit.')
x25CircuitCallParamId = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 17), ObjectIdentifier()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CircuitCallParamId.setDescription('This identifies the instance of the\n x25CallParmIndex for the entry in the\n x25CallParmTable which contains the call\n parameters in use with this circuit. The\n entry referenced must contain the values\n that are currently in use by the circuit\n rather than proposed values. A value of\n NULL indicates the circuit is a PVC or is\n using all the default parameters.')
x25CircuitCalledDteAddress = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 18), X121Address().clone(hexValue="")).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CircuitCalledDteAddress.setDescription('For incoming calls, this is the called\n address from the call indication packet.\n For outgoing calls, this is the called\n\n\n address from the call confirmation packet.\n This will be zero length for PVCs.')
x25CircuitCallingDteAddress = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 19), X121Address().clone(hexValue="")).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CircuitCallingDteAddress.setDescription('For incoming calls, this is the calling\n address from the call indication packet.\n For outgoing calls, this is the calling\n address from the call confirmation packet.\n This will be zero length for PVCs.')
x25CircuitOriginallyCalledAddress = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 20), X121Address().clone(hexValue="")).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CircuitOriginallyCalledAddress.setDescription('For incoming calls, this is the address in\n the call Redirection or Call Deflection\n Notification facility if the call was\n deflected or redirected, otherwise it will\n be called address from the call indication\n packet. For outgoing calls, this is the\n address from the call request packet. This\n will be zero length for PVCs.')
x25CircuitDescr = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 21), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,255)).clone(hexValue="")).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CircuitDescr.setDescription("A descriptive string associated with this\n circuit. This provides a place for the\n agent to supply any descriptive information\n it knows about the use or owner of the\n circuit. The agent may return the process\n identifier and user name for the process\n\n\n using the circuit. Alternative the agent\n may return the name of the configuration\n entry that caused a bridge to establish the\n circuit. A zero length value indicates the\n agent doesn't have any additional\n information.")
x25ClearedCircuitEntriesRequested = MibScalar((1, 3, 6, 1, 2, 1, 10, 5, 6), PositiveInteger()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25ClearedCircuitEntriesRequested.setDescription('The requested number of entries for the\n agent to keep in the x25ClearedCircuit\n table.')
x25ClearedCircuitEntriesGranted = MibScalar((1, 3, 6, 1, 2, 1, 10, 5, 7), PositiveInteger()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25ClearedCircuitEntriesGranted.setDescription('The actual number of entries the agent will\n keep in the x25ClearedCircuit Table.')
x25ClearedCircuitTable = MibTable((1, 3, 6, 1, 2, 1, 10, 5, 8), )
if mibBuilder.loadTexts: x25ClearedCircuitTable.setDescription('A table of entries about closed circuits.\n Entries must be made in this table whenever\n circuits are closed and the close request or\n close indication packet contains a clearing\n cause other than DTE Originated or a\n Diagnostic code field other than Higher\n Layer Initiated disconnection-normal. An\n agent may optionally make entries for normal\n closes (to record closing facilities or\n\n\n other information).\n\n Agents will delete the oldest entry in the\n table when adding a new entry would exceed\n agent resources. Agents are required to\n keep the last entry put in the table and may\n keep more entries. The object\n x25OperClearEntriesGranted returns the\n maximum number of entries kept in the\n table.')
x25ClearedCircuitEntry = MibTableRow((1, 3, 6, 1, 2, 1, 10, 5, 8, 1), ).setIndexNames((0, "RFC1382-MIB", "x25ClearedCircuitIndex"))
if mibBuilder.loadTexts: x25ClearedCircuitEntry.setDescription('Information about a cleared circuit.')
x25ClearedCircuitIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 8, 1, 1), PositiveInteger()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25ClearedCircuitIndex.setDescription('An index that uniquely distinguishes one\n entry in the clearedCircuitTable from\n another. This index will start at\n 2147483647 and will decrease by one for each\n new entry added to the table. Upon reaching\n one, the index will reset to 2147483647.\n Because the index starts at 2147483647 and\n decreases, a manager may do a getnext on\n entry zero and obtain the most recent entry.\n When the index has the value of 1, the next\n entry will delete all entries in the table\n and that entry will be numbered 2147483647.')
x25ClearedCircuitPleIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 8, 1, 2), IfIndexType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25ClearedCircuitPleIndex.setDescription('The value of ifIndex for the PLE which\n cleared the circuit that created the entry.')
x25ClearedCircuitTimeEstablished = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 8, 1, 3), TimeTicks()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25ClearedCircuitTimeEstablished.setDescription('The value of sysUpTime when the circuit was\n established. This will be the same value\n that was in the x25CircuitEstablishTime for\n the circuit.')
x25ClearedCircuitTimeCleared = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 8, 1, 4), TimeTicks()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25ClearedCircuitTimeCleared.setDescription('The value of sysUpTime when the circuit was\n cleared. For locally initiated clears, this\n\n\n will be the time when the clear confirmation\n was received. For remotely initiated\n clears, this will be the time when the clear\n indication was received.')
x25ClearedCircuitChannel = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 8, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,4095))).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25ClearedCircuitChannel.setDescription('The channel number for the circuit that was\n cleared.')
x25ClearedCircuitClearingCause = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 8, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25ClearedCircuitClearingCause.setDescription('The Clearing Cause from the clear request\n or clear indication packet that cleared the\n circuit.')
x25ClearedCircuitDiagnosticCode = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 8, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25ClearedCircuitDiagnosticCode.setDescription('The Diagnostic Code from the clear request\n or clear indication packet that cleared the\n circuit.')
x25ClearedCircuitInPdus = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 8, 1, 8), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25ClearedCircuitInPdus.setDescription('The number of PDUs received on the\n circuit.')
x25ClearedCircuitOutPdus = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 8, 1, 9), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25ClearedCircuitOutPdus.setDescription('The number of PDUs transmitted on the\n circuit.')
x25ClearedCircuitCalledAddress = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 8, 1, 10), X121Address()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25ClearedCircuitCalledAddress.setDescription('The called address from the cleared\n circuit.')
x25ClearedCircuitCallingAddress = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 8, 1, 11), X121Address()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25ClearedCircuitCallingAddress.setDescription('The calling address from the cleared\n circuit.')
x25ClearedCircuitClearFacilities = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 8, 1, 12), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0,109))).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25ClearedCircuitClearFacilities.setDescription('The facilities field from the clear request\n or clear indication packet that cleared the\n circuit. A size of zero indicates no\n facilities were present.')
x25CallParmTable = MibTable((1, 3, 6, 1, 2, 1, 10, 5, 9), )
if mibBuilder.loadTexts: x25CallParmTable.setDescription('These objects contain the parameters that\n can be varied between X.25 calls. The\n entries in this table are independent of the\n PLE. There exists only one of these tables\n for the entire system. The indexes for the\n entries are independent of any PLE or any\n circuit. Other tables reference entries in\n this table. Entries in this table can be\n used for default PLE parameters, for\n parameters to use to place/answer a call,\n for the parameters currently in use for a\n circuit, or parameters that were used by a\n circuit.\n\n The number of references to a given set of\n parameters can be found in the\n x25CallParmRefCount object sharing the same\n instance identifier with the parameters.\n The value of this reference count also\n affects the access of the objects in this\n table. An object in this table with the\n same instance identifier as the instance\n identifier of an x25CallParmRefCount must be\n consider associated with that reference\n count. An object with an associated\n reference count of zero can be written (if\n its ACCESS clause allows it). An object\n with an associated reference count greater\n than zero can not be written (regardless of\n the ACCESS clause). This ensures that a set\n of call parameters being referenced from\n another table can not be modified or changed\n in a ways inappropriate for continued use by\n that table.')
x25CallParmEntry = MibTableRow((1, 3, 6, 1, 2, 1, 10, 5, 9, 1), ).setIndexNames((0, "RFC1382-MIB", "x25CallParmIndex"))
if mibBuilder.loadTexts: x25CallParmEntry.setDescription('Entries of x25CallParmTable.')
x25CallParmIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 1), PositiveInteger()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25CallParmIndex.setDescription('A value that distinguishes this entry from\n another entry. Entries in this table are\n referenced from other objects which identify\n call parameters.\n\n It is impossible to know which other objects\n in the MIB reference entries in the table by\n looking at this table. Because of this,\n changes to parameters must be accomplished\n by creating a new entry in this table and\n then changing the referencing table to\n identify the new entry.\n\n Note that an agent will only use the values\n in this table when another table is changed\n to reference those values. The number of\n other tables that reference an index object\n in this table can be found in\n x25CallParmRefCount. The value of the\n reference count will affect the writability\n of the objects as explained above.\n\n Entries in this table which have a reference\n count of zero maybe deleted at the convence\n of the agent. Care should be taken by the\n agent to give the NMS sufficient time to\n create a reference to newly created entries.\n\n Should a Management Station not find a free\n index with which to create a new entry, it\n may feel free to delete entries with a\n\n\n reference count of zero. However in doing\n so the Management Station much realize it\n may impact other Management Stations.')
x25CallParmStatus = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 2), EntryStatus()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmStatus.setDescription('The status of this call parameter entry.\n See RFC 1271 for details of usage.')
x25CallParmRefCount = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 3), PositiveInteger()).setMaxAccess("readonly")
if mibBuilder.loadTexts: x25CallParmRefCount.setDescription('The number of references know by a\n management station to exist to this set of\n call parameters. This is the number of\n other objects that have returned a value of,\n and will return a value of, the index for\n this set of call parameters. Examples of\n such objects are the x25AdmnDefCallParamId,\n x25OperDataLinkId, or x25AdmnDefCallParamId\n objects defined above.')
x25CallParmInPacketSize = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,4096)).clone(128)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmInPacketSize.setDescription('The maximum receive packet size in octets\n for a circuit. A size of zero for a circuit\n means use the PLE default size. A size of\n zero for the PLE means use a default size of\n 128.')
x25CallParmOutPacketSize = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,4096)).clone(128)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmOutPacketSize.setDescription('The maximum transmit packet size in octets\n for a circuit. A size of zero for a circuit\n means use the PLE default size. A size of\n zero for the PLE default means use a default\n size of 128.')
x25CallParmInWindowSize = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,127)).clone(2)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmInWindowSize.setDescription('The receive window size for a circuit. A\n size of zero for a circuit means use the PLE\n default size. A size of zero for the PLE\n default means use 2.')
x25CallParmOutWindowSize = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,127)).clone(2)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmOutWindowSize.setDescription('The transmit window size for a circuit. A\n size of zero for a circuit means use the PLE\n default size. A size of zero for the PLE\n default means use 2.')
x25CallParmAcceptReverseCharging = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4,))).clone(namedValues=NamedValues(("default", 1), ("accept", 2), ("refuse", 3), ("neverAccept", 4),)).clone('refuse')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmAcceptReverseCharging.setDescription('An enumeration defining if the PLE will\n accept or refuse charges. A value of\n default for a circuit means use the PLE\n default value. A value of neverAccept is\n only used for the PLE default and indicates\n the PLE will never accept reverse charging.\n A value of default for a PLE default means\n refuse.')
x25CallParmProposeReverseCharging = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3,))).clone(namedValues=NamedValues(("default", 1), ("reverse", 2), ("local", 3),)).clone('local')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmProposeReverseCharging.setDescription('An enumeration defining if the PLE should\n propose reverse or local charging. The\n value of default for a circuit means use the\n PLE default. The value of default for the\n PLE default means use local.')
x25CallParmFastSelect = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6,))).clone(namedValues=NamedValues(("default", 1), ("notSpecified", 2), ("fastSelect", 3), ("restrictedFastResponse", 4), ("noFastSelect", 5), ("noRestrictedFastResponse", 6),)).clone('noFastSelect')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmFastSelect.setDescription('Expresses preference for use of fast select\n facility. The value of default for a\n circuit is the PLE default. A value of\n\n\n default for the PLE means noFastSelect. A\n value of noFastSelect or\n noRestrictedFastResponse indicates a circuit\n may not use fast select or restricted fast\n response.')
x25CallParmInThruPutClasSize = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,))).clone(namedValues=NamedValues(("tcReserved1", 1), ("tcReserved2", 2), ("tc75", 3), ("tc150", 4), ("tc300", 5), ("tc600", 6), ("tc1200", 7), ("tc2400", 8), ("tc4800", 9), ("tc9600", 10), ("tc19200", 11), ("tc48000", 12), ("tc64000", 13), ("tcReserved14", 14), ("tcReserved15", 15), ("tcReserved0", 16), ("tcNone", 17), ("tcDefault", 18),)).clone('tcNone')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmInThruPutClasSize.setDescription('The incoming throughput class to negotiate.\n A value of tcDefault for a circuit means use\n the PLE default. A value of tcDefault for\n the PLE default means tcNone. A value of\n tcNone means do not negotiate throughtput\n class.')
x25CallParmOutThruPutClasSize = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,))).clone(namedValues=NamedValues(("tcReserved1", 1), ("tcReserved2", 2), ("tc75", 3), ("tc150", 4), ("tc300", 5), ("tc600", 6), ("tc1200", 7), ("tc2400", 8), ("tc4800", 9), ("tc9600", 10), ("tc19200", 11), ("tc48000", 12), ("tc64000", 13), ("tcReserved14", 14), ("tcReserved15", 15), ("tcReserved0", 16), ("tcNone", 17), ("tcDefault", 18),)).clone('tcNone')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmOutThruPutClasSize.setDescription('The outgoing throughput class to negotiate.\n A value of tcDefault for a circuit means use\n the PLE default. A value of tcDefault for\n the PLE default means use tcNone. A value\n of tcNone means do not negotiate throughtput\n class.')
x25CallParmCug = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 13), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,4)).clone(hexValue="")).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmCug.setDescription('The Closed User Group to specify. This\n consists of two or four octets containing\n the characters 0 through 9. A zero length\n string indicates no facility requested. A\n string length of three containing the\n characters DEF for a circuit means use the\n PLE default, (the PLE default parameter may\n not reference an entry of DEF.)')
x25CallParmCugoa = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 14), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,4)).clone(hexValue="")).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmCugoa.setDescription('The Closed User Group with Outgoing Access\n to specify. This consists of two or four\n octets containing the characters 0 through\n 9. A string length of three containing the\n characters DEF for a circuit means use the\n PLE default (the PLE default parameters may\n not reference an entry of DEF). A zero\n length string indicates no facility\n requested.')
x25CallParmBcug = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 15), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,3)).clone(hexValue="")).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmBcug.setDescription('The Bilateral Closed User Group to specify.\n This consists of two octets containing the\n characters 0 through 9. A string length of\n three containing the characters DEF for a\n circuit means use the PLE default (the PLE\n default parameter may not reference an entry\n of DEF). A zero length string indicates no\n facility requested.')
x25CallParmNui = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 16), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0,108)).clone(hexValue="")).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmNui.setDescription('The Network User Identifier facility. This\n is binary value to be included immediately\n after the length field. The PLE will supply\n the length octet. A zero length string\n indicates no facility requested. This value\n is ignored for the PLE default parameters\n entry.')
x25CallParmChargingInfo = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 17), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4,))).clone(namedValues=NamedValues(("default", 1), ("noFacility", 2), ("noChargingInfo", 3), ("chargingInfo", 4),)).clone('noFacility')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmChargingInfo.setDescription('The charging Information facility. A value\n of default for a circuit means use the PLE\n default. The value of default for the\n default PLE parameters means use noFacility.\n The value of noFacility means do not include\n a facility.')
x25CallParmRpoa = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 18), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,108)).clone(hexValue="")).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmRpoa.setDescription('The RPOA facility. The octet string\n contains n * 4 sequences of the characters\n 0-9 to specify a facility with n entries.\n The octet string containing the 3 characters\n DEF for a circuit specifies use of the PLE\n default (the entry for the PLE default may\n not contain DEF). A zero length string\n indicates no facility requested.')
x25CallParmTrnstDly = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 19), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,65537)).clone(65536)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmTrnstDly.setDescription('The Transit Delay Selection and Indication\n value. A value of 65536 indicates no\n facility requested. A value of 65537 for a\n circuit means use the PLE default (the PLE\n\n\n default parameters entry may not use the\n value 65537). The value 65535 may only be\n used to indicate the value in use by a\n circuit.')
x25CallParmCallingExt = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 20), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,40)).clone(hexValue="")).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmCallingExt.setDescription('The Calling Extension facility. This\n contains one of the following:\n\n A sequence of hex digits with the value to\n be put in the facility. These digits will be\n converted to binary by the agent and put in\n the facility. These octets do not include\n the length octet.\n\n A value containing the three character DEF\n for a circuit means use the PLE default,\n (the entry for the PLE default parameters\n may not use the value DEF).\n\n A zero length string indicates no facility\n requested.')
x25CallParmCalledExt = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 21), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,40)).clone(hexValue="")).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmCalledExt.setDescription('The Called Extension facility. This\n contains one of the following:\n\n A sequence of hex digits with the value to\n be put in the facility. These digits will be\n converted to binary by the agent and put in\n the facility. These octets do not include\n\n\n the length octet.\n\n A value containing the three character DEF\n for a circuit means use the PLE default,\n (the entry for the PLE default parameters\n may not use the value DEF).\n\n A zero length string indicates no facility\n requested.')
x25CallParmInMinThuPutCls = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 22), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,17)).clone(17)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmInMinThuPutCls.setDescription('The minimum input throughput Class. A\n value of 16 for a circuit means use the PLE\n default (the PLE parameters entry may not\n use this value). A value of 17 indicates no\n facility requested.')
x25CallParmOutMinThuPutCls = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 23), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,17)).clone(17)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmOutMinThuPutCls.setDescription('The minimum output throughput Class. A\n value of 16 for a circuit means use the PLE\n default (the PLE parameters entry may not\n use this value). A value of 17 indicates no\n facility requested.')
x25CallParmEndTrnsDly = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 24), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0,6)).clone(hexValue="")).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmEndTrnsDly.setDescription('The End-to-End Transit Delay to negotiate.\n An octet string of length 2, 4, or 6\n\n\n contains the facility encoded as specified\n in ISO/IEC 8208 section 15.3.2.4. An octet\n string of length 3 containing the three\n character DEF for a circuit means use the\n PLE default (the entry for the PLE default\n can not contain the characters DEF). A zero\n length string indicates no facility\n requested.')
x25CallParmPriority = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 25), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0,6)).clone(hexValue="")).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmPriority.setDescription('The priority facility to negotiate. The\n octet string encoded as specified in ISO/IEC\n 8208 section 15.3.2.5. A zero length string\n indicates no facility requested. The entry\n for the PLE default parameters must be zero\n length.')
x25CallParmProtection = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 26), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0,108)).clone(hexValue="")).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmProtection.setDescription('A string contains the following:\n A hex string containing the value for the\n protection facility. This will be converted\n from hex to the octets actually in the\n packet by the agent. The agent will supply\n the length field and the length octet is not\n contained in this string.\n\n An string containing the 3 characters DEF\n for a circuit means use the PLE default (the\n entry for the PLE default parameters may not\n use the value DEF).\n\n A zero length string mean no facility\n requested.')
x25CallParmExptData = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 27), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3,))).clone(namedValues=NamedValues(("default", 1), ("noExpeditedData", 2), ("expeditedData", 3),)).clone('noExpeditedData')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmExptData.setDescription('The Expedited Data facility to negotiate.\n A value of default for a circuit means use\n the PLE default value. The entry for the\n PLE default parameters may not have the\n value default.')
x25CallParmUserData = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 28), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0,128)).clone(hexValue="")).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmUserData.setDescription('The call user data as placed in the packet.\n A zero length string indicates no call user\n data. If both the circuit call parameters\n and the PLE default have call user data\n defined, the data from the circuit call\n parameters will be used. If only the PLE\n has data defined, the PLE entry will be\n used. If neither the circuit call\n parameters or the PLE default entry has a\n value, no call user data will be sent.')
x25CallParmCallingNetworkFacilities = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 29), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0,108)).clone(hexValue="")).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmCallingNetworkFacilities.setDescription('The calling network facilities. The\n facilities are encoded here exactly as\n encoded in the call packet. These\n\n\n facilities do not include the marker\n facility code.\n\n A zero length string in the entry for the\n parameter to use when establishing a circuit\n means use the PLE default. A zero length\n string in the entry for PLE default\n parameters indicates no default facilities.')
x25CallParmCalledNetworkFacilities = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 30), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0,108)).clone(hexValue="")).setMaxAccess("readwrite")
if mibBuilder.loadTexts: x25CallParmCalledNetworkFacilities.setDescription('The called network facilities. The\n facilities are encoded here exactly as\n encoded in the call packet. These\n facilities do not include the marker\n facility code.\n\n A zero length string in the entry for the\n parameter to use when establishing a circuit\n means use the PLE default. A zero length\n string in the entry for PLE default\n parameters indicates no default facilities.')
x25Restart = NotificationType((1, 3, 6, 1, 2, 1, 10, 5) + (0,1)).setObjects(*(("RFC1382-MIB", "x25OperIndex"),))
if mibBuilder.loadTexts: x25Restart.setDescription('This trap means the X.25 PLE sent or\n received a restart packet. The restart that\n brings up the link should not send a\n x25Restart trap so the interface should send\n a linkUp trap. Sending this trap means the\n agent does not send a linkDown and linkUp\n trap.')
x25Reset = NotificationType((1, 3, 6, 1, 2, 1, 10, 5) + (0,2)).setObjects(*(("RFC1382-MIB", "x25CircuitIndex"), ("RFC1382-MIB", "x25CircuitChannel"),))
if mibBuilder.loadTexts: x25Reset.setDescription('If the PLE sends or receives a reset, the\n agent should send an x25Reset trap.')
x25ProtocolVersion = MibIdentifier((1, 3, 6, 1, 2, 1, 10, 5, 10))
x25protocolCcittV1976 = MibIdentifier((1, 3, 6, 1, 2, 1, 10, 5, 10, 1))
x25protocolCcittV1980 = MibIdentifier((1, 3, 6, 1, 2, 1, 10, 5, 10, 2))
x25protocolCcittV1984 = MibIdentifier((1, 3, 6, 1, 2, 1, 10, 5, 10, 3))
x25protocolCcittV1988 = MibIdentifier((1, 3, 6, 1, 2, 1, 10, 5, 10, 4))
x25protocolIso8208V1987 = MibIdentifier((1, 3, 6, 1, 2, 1, 10, 5, 10, 5))
x25protocolIso8208V1989 = MibIdentifier((1, 3, 6, 1, 2, 1, 10, 5, 10, 6))
mibBuilder.exportSymbols("RFC1382-MIB", x25CallParmAcceptReverseCharging=x25CallParmAcceptReverseCharging, x25StatRetryCountExceededs=x25StatRetryCountExceededs, x25StatEntry=x25StatEntry, x25StatOutInterrupts=x25StatOutInterrupts, x25StatInCalls=x25StatInCalls, x25StatInRestarts=x25StatInRestarts, x25ClearedCircuitIndex=x25ClearedCircuitIndex, x25CallParmFastSelect=x25CallParmFastSelect, x25CircuitOutOctets=x25CircuitOutOctets, x25AdmnRestartCount=x25AdmnRestartCount, x25OperRejectTimer=x25OperRejectTimer, x25ChannelLIC=x25ChannelLIC, x25ChannelTable=x25ChannelTable, x25AdmnPacketSequencing=x25AdmnPacketSequencing, x25StatIndex=x25StatIndex, x25OperLocalAddress=x25OperLocalAddress, x25AdmnMinimumRecallTimer=x25AdmnMinimumRecallTimer, x25ChannelHTC=x25ChannelHTC, x25StatOutCallFailures=x25StatOutCallFailures, x25Reset=x25Reset, x25StatResetTimeouts=x25StatResetTimeouts, x25CircuitEstablishTime=x25CircuitEstablishTime, x25CallParmInPacketSize=x25CallParmInPacketSize, x25protocolCcittV1976=x25protocolCcittV1976, x25=x25, x25OperDataLinkId=x25OperDataLinkId, x25StatCallTimeouts=x25StatCallTimeouts, x25OperClearCount=x25OperClearCount, x25ClearedCircuitInPdus=x25ClearedCircuitInPdus, x25OperDataRxmtTimer=x25OperDataRxmtTimer, X121Address=X121Address, x25OperResetTimer=x25OperResetTimer, x25StatDataRxmtTimeouts=x25StatDataRxmtTimeouts, x25CallParmCallingExt=x25CallParmCallingExt, x25CallParmCalledNetworkFacilities=x25CallParmCalledNetworkFacilities, x25ClearedCircuitCallingAddress=x25ClearedCircuitCallingAddress, x25AdmnLocalAddress=x25AdmnLocalAddress, x25AdmnMaxActiveCircuits=x25AdmnMaxActiveCircuits, x25CallParmOutMinThuPutCls=x25CallParmOutMinThuPutCls, x25CircuitOutPdus=x25CircuitOutPdus, x25ProtocolVersion=x25ProtocolVersion, x25CircuitOutInterrupts=x25CircuitOutInterrupts, x25CircuitCallParamId=x25CircuitCallParamId, x25OperPacketSequencing=x25OperPacketSequencing, x25AdmnDefCallParamId=x25AdmnDefCallParamId, x25CallParmRefCount=x25CallParmRefCount, x25AdmnResetTimer=x25AdmnResetTimer, x25AdmnRegistrationRequestCount=x25AdmnRegistrationRequestCount, x25CircuitInOctets=x25CircuitInOctets, x25CallParmOutPacketSize=x25CallParmOutPacketSize, x25ClearedCircuitClearingCause=x25ClearedCircuitClearingCause, x25AdmnInterfaceMode=x25AdmnInterfaceMode, x25CircuitInPdus=x25CircuitInPdus, x25CallParmOutThruPutClasSize=x25CallParmOutThruPutClasSize, x25CallParmProtection=x25CallParmProtection, x25OperCallTimer=x25OperCallTimer, x25AdmnRejectCount=x25AdmnRejectCount, x25OperNumberPVCs=x25OperNumberPVCs, x25CircuitOriginallyCalledAddress=x25CircuitOriginallyCalledAddress, x25ClearedCircuitTimeEstablished=x25ClearedCircuitTimeEstablished, x25AdmnIndex=x25AdmnIndex, x25OperTable=x25OperTable, x25CallParmStatus=x25CallParmStatus, x25AdmnClearTimer=x25AdmnClearTimer, x25CallParmCalledExt=x25CallParmCalledExt, x25CallParmEntry=x25CallParmEntry, x25CircuitChannel=x25CircuitChannel, x25StatOutDataPackets=x25StatOutDataPackets, x25OperInterfaceMode=x25OperInterfaceMode, x25AdmnResetCount=x25AdmnResetCount, x25StatOutgoingCircuits=x25StatOutgoingCircuits, x25CircuitCalledDteAddress=x25CircuitCalledDteAddress, x25AdmnCallTimer=x25AdmnCallTimer, x25ChannelHOC=x25ChannelHOC, x25CallParmExptData=x25CallParmExptData, x25CallParmProposeReverseCharging=x25CallParmProposeReverseCharging, x25CircuitDescr=x25CircuitDescr, x25CallParmInMinThuPutCls=x25CallParmInMinThuPutCls, x25ClearedCircuitClearFacilities=x25ClearedCircuitClearFacilities, x25CallParmTrnstDly=x25CallParmTrnstDly, x25CallParmNui=x25CallParmNui, x25StatInProviderInitiatedResets=x25StatInProviderInitiatedResets, x25CallParmChargingInfo=x25CallParmChargingInfo, x25StatRestartTimeouts=x25StatRestartTimeouts, x25protocolCcittV1984=x25protocolCcittV1984, x25protocolIso8208V1987=x25protocolIso8208V1987, x25CircuitIndex=x25CircuitIndex, x25OperRestartTimer=x25OperRestartTimer, x25ClearedCircuitPleIndex=x25ClearedCircuitPleIndex, x25OperInterruptTimer=x25OperInterruptTimer, x25CallParmCug=x25CallParmCug, x25StatTwowayCircuits=x25StatTwowayCircuits, x25AdmnWindowTimer=x25AdmnWindowTimer, x25ClearedCircuitCalledAddress=x25ClearedCircuitCalledAddress, x25ClearedCircuitTimeCleared=x25ClearedCircuitTimeCleared, x25CallParmPriority=x25CallParmPriority, x25OperRegistrationRequestTimer=x25OperRegistrationRequestTimer, x25AdmnClearCount=x25AdmnClearCount, x25protocolCcittV1980=x25protocolCcittV1980, x25protocolCcittV1988=x25protocolCcittV1988, x25ClearedCircuitEntriesGranted=x25ClearedCircuitEntriesGranted, x25CallParmInWindowSize=x25CallParmInWindowSize, x25ChannelLOC=x25ChannelLOC, x25CircuitDataRetransmissionTimeouts=x25CircuitDataRetransmissionTimeouts, x25OperClearTimer=x25OperClearTimer, x25StatOutCallAttempts=x25StatOutCallAttempts, x25CallParmRpoa=x25CallParmRpoa, x25CallParmInThruPutClasSize=x25CallParmInThruPutClasSize, x25ClearedCircuitEntriesRequested=x25ClearedCircuitEntriesRequested, x25StatInterruptTimeouts=x25StatInterruptTimeouts, x25OperIndex=x25OperIndex, x25CallParmUserData=x25CallParmUserData, x25AdmnRejectTimer=x25AdmnRejectTimer, x25ClearedCircuitEntry=x25ClearedCircuitEntry, x25ClearedCircuitTable=x25ClearedCircuitTable, x25protocolIso8208V1989=x25protocolIso8208V1989, x25StatClearCountExceededs=x25StatClearCountExceededs, x25OperMaxActiveCircuits=x25OperMaxActiveCircuits, x25StatInCallRefusals=x25StatInCallRefusals, x25CircuitInRemotelyInitiatedResets=x25CircuitInRemotelyInitiatedResets, x25OperRestartCount=x25OperRestartCount, x25OperProtocolVersionSupported=x25OperProtocolVersionSupported, x25CallParmOutWindowSize=x25CallParmOutWindowSize, x25OperRejectCount=x25OperRejectCount, x25StatIncomingCircuits=x25StatIncomingCircuits, x25ClearedCircuitChannel=x25ClearedCircuitChannel, x25StatInAccusedOfProtocolErrors=x25StatInAccusedOfProtocolErrors, x25CircuitInterruptTimeouts=x25CircuitInterruptTimeouts, x25AdmnNumberPVCs=x25AdmnNumberPVCs, x25OperDefCallParamId=x25OperDefCallParamId, x25AdmnInterruptTimer=x25AdmnInterruptTimer, x25CircuitInProviderInitiatedResets=x25CircuitInProviderInitiatedResets, x25StatInRemotelyInitiatedResets=x25StatInRemotelyInitiatedResets, x25OperResetCount=x25OperResetCount, x25ChannelIndex=x25ChannelIndex, x25ChannelLTC=x25ChannelLTC, x25CallParmTable=x25CallParmTable, x25CallParmCugoa=x25CallParmCugoa, x25AdmnDataRxmtTimer=x25AdmnDataRxmtTimer, x25ChannelEntry=x25ChannelEntry, x25ChannelHIC=x25ChannelHIC, x25CircuitInInterrupts=x25CircuitInInterrupts, x25StatInProviderInitiatedClears=x25StatInProviderInitiatedClears, x25AdmnTable=x25AdmnTable, x25AdmnDataRxmtCount=x25AdmnDataRxmtCount, x25AdmnEntry=x25AdmnEntry, x25ClearedCircuitDiagnosticCode=x25ClearedCircuitDiagnosticCode, x25CircuitResetTimeouts=x25CircuitResetTimeouts, x25Restart=x25Restart, x25CallParmEndTrnsDly=x25CallParmEndTrnsDly, x25CallParmIndex=x25CallParmIndex, x25OperMinimumRecallTimer=x25OperMinimumRecallTimer, x25OperWindowTimer=x25OperWindowTimer, x25AdmnRestartTimer=x25AdmnRestartTimer, x25OperEntry=x25OperEntry, x25CircuitCallingDteAddress=x25CircuitCallingDteAddress, x25CircuitDirection=x25CircuitDirection, x25ClearedCircuitOutPdus=x25ClearedCircuitOutPdus, x25CallParmBcug=x25CallParmBcug, x25StatInInterrupts=x25StatInInterrupts, x25AdmnRegistrationRequestTimer=x25AdmnRegistrationRequestTimer, x25StatTable=x25StatTable, x25AdmnProtocolVersionSupported=x25AdmnProtocolVersionSupported, x25OperRegistrationRequestCount=x25OperRegistrationRequestCount, x25CallParmCallingNetworkFacilities=x25CallParmCallingNetworkFacilities, x25OperDataRxmtCount=x25OperDataRxmtCount, x25CircuitStatus=x25CircuitStatus, x25CircuitTable=x25CircuitTable, x25CircuitEntry=x25CircuitEntry, x25StatInDataPackets=x25StatInDataPackets, x25StatClearTimeouts=x25StatClearTimeouts)
| (octet_string, object_identifier, integer) = mibBuilder.importSymbols('ASN1', 'OctetString', 'ObjectIdentifier', 'Integer')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(constraints_union, value_size_constraint, single_value_constraint, value_range_constraint, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsUnion', 'ValueSizeConstraint', 'SingleValueConstraint', 'ValueRangeConstraint', 'ConstraintsIntersection')
(positive_integer,) = mibBuilder.importSymbols('RFC1253-MIB', 'PositiveInteger')
(entry_status,) = mibBuilder.importSymbols('RFC1271-MIB', 'EntryStatus')
(if_index_type,) = mibBuilder.importSymbols('RFC1381-MIB', 'IfIndexType')
(module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup')
(ip_address, iso, object_identity, mib_identifier, notification_type, mib_scalar, mib_table, mib_table_row, mib_table_column, module_identity, counter32, notification_type, transmission, bits, time_ticks, integer32, gauge32, counter64, unsigned32) = mibBuilder.importSymbols('SNMPv2-SMI', 'IpAddress', 'iso', 'ObjectIdentity', 'MibIdentifier', 'NotificationType', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'ModuleIdentity', 'Counter32', 'NotificationType', 'transmission', 'Bits', 'TimeTicks', 'Integer32', 'Gauge32', 'Counter64', 'Unsigned32')
(textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString')
x25 = mib_identifier((1, 3, 6, 1, 2, 1, 10, 5))
class X121Address(OctetString):
subtype_spec = OctetString.subtypeSpec + value_size_constraint(0, 17)
x25_admn_table = mib_table((1, 3, 6, 1, 2, 1, 10, 5, 1))
if mibBuilder.loadTexts:
x25AdmnTable.setDescription('This table contains the administratively\n set configuration parameters for an X.25\n Packet Level Entity (PLE).\n\n Most of the objects in this table have\n corresponding objects in the x25OperTable.\n This table contains the values as last set\n by the administrator. The x25OperTable\n contains the values actually in use by an\n X.25 PLE.\n\n Changing an administrative value may or may\n not change a current operating value. The\n operating value may not change until the\n interface is restarted. Some\n implementations may change the values\n immediately upon changing the administrative\n table. All implementations are required to\n load the values from the administrative\n table when initializing a PLE.')
x25_admn_entry = mib_table_row((1, 3, 6, 1, 2, 1, 10, 5, 1, 1)).setIndexNames((0, 'RFC1382-MIB', 'x25AdmnIndex'))
if mibBuilder.loadTexts:
x25AdmnEntry.setDescription('Entries of x25AdmnTable.')
x25_admn_index = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 1), if_index_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25AdmnIndex.setDescription('The ifIndex value for the X.25 Interface.')
x25_admn_interface_mode = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('dte', 1), ('dce', 2), ('dxe', 3)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25AdmnInterfaceMode.setDescription('Identifies DCE/DTE mode in which the\n interface operates. A value of dxe\n indicates the mode will be determined by XID\n negotiation.')
x25_admn_max_active_circuits = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 4096))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25AdmnMaxActiveCircuits.setDescription('The maximum number of circuits this PLE can\n support; including PVCs.')
x25_admn_packet_sequencing = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('modulo8', 1), ('modulo128', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25AdmnPacketSequencing.setDescription('The modulus of the packet sequence number\n space.')
x25_admn_restart_timer = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 5), positive_integer()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25AdmnRestartTimer.setDescription('The T20 restart timer in milliseconds.')
x25_admn_call_timer = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 6), positive_integer()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25AdmnCallTimer.setDescription('The T21 Call timer in milliseconds.')
x25_admn_reset_timer = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 7), positive_integer()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25AdmnResetTimer.setDescription('The T22 Reset timer in milliseconds.')
x25_admn_clear_timer = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 8), positive_integer()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25AdmnClearTimer.setDescription('The T23 Clear timer in milliseconds.')
x25_admn_window_timer = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 9), positive_integer()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25AdmnWindowTimer.setDescription('The T24 window status transmission timer in\n milliseconds. A value of 2147483647\n indicates no window timer in use.')
x25_admn_data_rxmt_timer = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 10), positive_integer()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25AdmnDataRxmtTimer.setDescription('The T25 data retransmission timer in\n\n\n milliseconds. A value of 2147483647\n indicates no data retransmission timer in\n use.')
x25_admn_interrupt_timer = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 11), positive_integer()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25AdmnInterruptTimer.setDescription('The T26 interrupt timer in milliseconds. A\n value of 2147483647 indicates no interrupt\n timer in use.')
x25_admn_reject_timer = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 12), positive_integer()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25AdmnRejectTimer.setDescription('The T27 Reject retransmission timer in\n milliseconds. A value of 2147483647\n indicates no reject timer in use.')
x25_admn_registration_request_timer = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 13), positive_integer()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25AdmnRegistrationRequestTimer.setDescription('The T28 registration timer in milliseconds.\n A value of 2147483647 indicates no\n registration timer in use.')
x25_admn_minimum_recall_timer = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 14), positive_integer()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25AdmnMinimumRecallTimer.setDescription('Minimum time interval between unsuccessful\n call attempts in milliseconds.')
x25_admn_restart_count = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 15), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25AdmnRestartCount.setDescription('The R20 restart retransmission count.')
x25_admn_reset_count = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 16), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25AdmnResetCount.setDescription('The r22 Reset retransmission count.')
x25_admn_clear_count = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 17), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25AdmnClearCount.setDescription('The r23 Clear retransmission count.')
x25_admn_data_rxmt_count = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 18), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25AdmnDataRxmtCount.setDescription('The R25 Data retransmission count. This\n value is irrelevant if the\n x25AdmnDataRxmtTimer indicates no timer in\n use.')
x25_admn_reject_count = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 19), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25AdmnRejectCount.setDescription('The R27 reject retransmission count. This\n value is irrelevant if the\n x25AdmnRejectTimer indicates no timer in\n use.')
x25_admn_registration_request_count = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 20), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25AdmnRegistrationRequestCount.setDescription('The R28 Registration retransmission Count.\n This value is irrelevant if the\n x25AdmnRegistrationRequestTimer indicates no\n timer in use.')
x25_admn_number_pv_cs = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 21), integer32().subtype(subtypeSpec=value_range_constraint(0, 4096))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25AdmnNumberPVCs.setDescription('The number of PVC configured for this PLE.\n The PVCs use channel numbers from 1 to this\n number.')
x25_admn_def_call_param_id = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 22), object_identifier()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25AdmnDefCallParamId.setDescription('This identifies the instance of the\n x25CallParmIndex for the entry in the\n x25CallParmTable which contains the default\n call parameters for this PLE.')
x25_admn_local_address = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 23), x121_address()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25AdmnLocalAddress.setDescription('The local address for this PLE subnetwork.\n A zero length address maybe returned by PLEs\n that only support PVCs.')
x25_admn_protocol_version_supported = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 1, 1, 24), object_identifier()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25AdmnProtocolVersionSupported.setDescription('Identifies the version of the X.25 protocol\n this interface should support. Object\n identifiers for common versions are defined\n below in the x25ProtocolVersion subtree.')
x25_oper_table = mib_table((1, 3, 6, 1, 2, 1, 10, 5, 2))
if mibBuilder.loadTexts:
x25OperTable.setDescription('The operation parameters in use by the X.25\n PLE.')
x25_oper_entry = mib_table_row((1, 3, 6, 1, 2, 1, 10, 5, 2, 1)).setIndexNames((0, 'RFC1382-MIB', 'x25OperIndex'))
if mibBuilder.loadTexts:
x25OperEntry.setDescription('Entries of x25OperTable.')
x25_oper_index = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 1), if_index_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25OperIndex.setDescription('The ifIndex value for the X.25 interface.')
x25_oper_interface_mode = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('dte', 1), ('dce', 2), ('dxe', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25OperInterfaceMode.setDescription('Identifies DCE/DTE mode in which the\n interface operates. A value of dxe\n indicates the role will be determined by XID\n negotiation at the Link Layer and that\n negotiation has not yet taken place.')
x25_oper_max_active_circuits = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 4096))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25OperMaxActiveCircuits.setDescription('Maximum number of circuits this PLE can\n support.')
x25_oper_packet_sequencing = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('modulo8', 1), ('modulo128', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25OperPacketSequencing.setDescription('The modulus of the packet sequence number\n space.')
x25_oper_restart_timer = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 5), positive_integer()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25OperRestartTimer.setDescription('The T20 restart timer in milliseconds.')
x25_oper_call_timer = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 6), positive_integer()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25OperCallTimer.setDescription('The T21 Call timer in milliseconds.')
x25_oper_reset_timer = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 7), positive_integer()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25OperResetTimer.setDescription('The T22 Reset timer in milliseconds.')
x25_oper_clear_timer = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 8), positive_integer()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25OperClearTimer.setDescription('The T23 Clear timer in milliseconds.')
x25_oper_window_timer = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 9), positive_integer()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25OperWindowTimer.setDescription('The T24 window status transmission timer\n\n\n milliseconds. A value of 2147483647\n indicates no window timer in use.')
x25_oper_data_rxmt_timer = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 10), positive_integer()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25OperDataRxmtTimer.setDescription('The T25 Data Retransmission timer in\n milliseconds. A value of 2147483647\n indicates no data retransmission timer in\n use.')
x25_oper_interrupt_timer = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 11), positive_integer()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25OperInterruptTimer.setDescription('The T26 Interrupt timer in milliseconds. A\n value of 2147483647 indicates interrupts are\n not being used.')
x25_oper_reject_timer = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 12), positive_integer()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25OperRejectTimer.setDescription('The T27 Reject retransmission timer in\n milliseconds. A value of 2147483647\n indicates no reject timer in use.')
x25_oper_registration_request_timer = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 13), positive_integer()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25OperRegistrationRequestTimer.setDescription('The T28 registration timer in milliseconds.\n A value of 2147483647 indicates no\n registration timer in use.')
x25_oper_minimum_recall_timer = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 14), positive_integer()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25OperMinimumRecallTimer.setDescription('Minimum time interval between unsuccessful\n call attempts in milliseconds.')
x25_oper_restart_count = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 15), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25OperRestartCount.setDescription('The R20 restart retransmission count.')
x25_oper_reset_count = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 16), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25OperResetCount.setDescription('The r22 Reset retransmission count.')
x25_oper_clear_count = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 17), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25OperClearCount.setDescription('The r23 Clear retransmission count.')
x25_oper_data_rxmt_count = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 18), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25OperDataRxmtCount.setDescription('The R25 Data retransmission count. This\n value is undefined if the\n x25OperDataRxmtTimer indicates no timer in\n use.')
x25_oper_reject_count = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 19), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25OperRejectCount.setDescription('The R27 reject retransmission count. This\n value is undefined if the x25OperRejectTimer\n indicates no timer in use.')
x25_oper_registration_request_count = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 20), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25OperRegistrationRequestCount.setDescription('The R28 Registration retransmission Count.\n This value is undefined if the\n x25OperREgistrationRequestTimer indicates no\n timer in use.')
x25_oper_number_pv_cs = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 21), integer32().subtype(subtypeSpec=value_range_constraint(0, 4096))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25OperNumberPVCs.setDescription('The number of PVC configured for this PLE.\n The PVCs use channel numbers from 1 to this\n number.')
x25_oper_def_call_param_id = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 22), object_identifier()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25OperDefCallParamId.setDescription('This identifies the instance of the\n x25CallParmIndex for the entry in the\n x25CallParmTable that contains the default\n call parameters for this PLE.')
x25_oper_local_address = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 23), x121_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25OperLocalAddress.setDescription('The local address for this PLE subnetwork.\n A zero length address maybe returned by PLEs\n that only support PVCs.')
x25_oper_data_link_id = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 24), object_identifier()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25OperDataLinkId.setDescription('This identifies the instance of the index\n object in the first table of the most device\n specific MIB for the interface used by this\n PLE.')
x25_oper_protocol_version_supported = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 2, 1, 25), object_identifier()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25OperProtocolVersionSupported.setDescription('Identifies the version of the X.25 protocol\n this interface supports. Object identifiers\n for common versions are defined below in the\n x25ProtocolVersion subtree.')
x25_stat_table = mib_table((1, 3, 6, 1, 2, 1, 10, 5, 3))
if mibBuilder.loadTexts:
x25StatTable.setDescription('Statistics information about this X.25\n PLE.')
x25_stat_entry = mib_table_row((1, 3, 6, 1, 2, 1, 10, 5, 3, 1)).setIndexNames((0, 'RFC1382-MIB', 'x25StatIndex'))
if mibBuilder.loadTexts:
x25StatEntry.setDescription('Entries of the x25StatTable.')
x25_stat_index = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 1), if_index_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25StatIndex.setDescription('The ifIndex value for the X.25 interface.')
x25_stat_in_calls = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 2), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25StatInCalls.setDescription('The number of incoming calls received.')
x25_stat_in_call_refusals = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 3), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25StatInCallRefusals.setDescription('The number of incoming calls refused. This\n includes calls refused by the PLE and by\n higher layers. This also includes calls\n cleared because of restricted fast select.')
x25_stat_in_provider_initiated_clears = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 4), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25StatInProviderInitiatedClears.setDescription('The number of clear requests with a cause\n code other than DTE initiated.')
x25_stat_in_remotely_initiated_resets = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 5), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25StatInRemotelyInitiatedResets.setDescription('The number of reset requests received with\n\n\n cause code DTE initiated.')
x25_stat_in_provider_initiated_resets = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 6), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25StatInProviderInitiatedResets.setDescription('The number of reset requests received with\n cause code other than DTE initiated.')
x25_stat_in_restarts = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 7), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25StatInRestarts.setDescription('The number of remotely initiated (including\n provider initiated) restarts experienced by\n the PLE excluding the restart associated\n with bringing up the PLE interface. This\n only counts restarts received when the PLE\n already has an established connection with\n the remove PLE.')
x25_stat_in_data_packets = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 8), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25StatInDataPackets.setDescription('The number of data packets received.')
x25_stat_in_accused_of_protocol_errors = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 9), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25StatInAccusedOfProtocolErrors.setDescription('The number of packets received containing a\n procedure error cause code. These include\n clear, reset, restart, or diagnostic\n packets.')
x25_stat_in_interrupts = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 10), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25StatInInterrupts.setDescription('The number of interrupt packets received by\n the PLE or over the PVC/VC.')
x25_stat_out_call_attempts = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 11), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25StatOutCallAttempts.setDescription('The number of calls attempted.')
x25_stat_out_call_failures = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 12), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25StatOutCallFailures.setDescription('The number of call attempts which failed.\n This includes calls that were cleared\n because of restrictive fast select.')
x25_stat_out_interrupts = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 13), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25StatOutInterrupts.setDescription('The number of interrupt packets send by the\n PLE or over the PVC/VC.')
x25_stat_out_data_packets = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 14), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25StatOutDataPackets.setDescription('The number of data packets sent by this\n PLE.')
x25_stat_outgoing_circuits = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 15), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25StatOutgoingCircuits.setDescription('The number of active outgoing circuits.\n This includes call requests sent but not yet\n confirmed. This does not count PVCs.')
x25_stat_incoming_circuits = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 16), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25StatIncomingCircuits.setDescription('The number of active Incoming Circuits.\n This includes call indications received but\n not yet acknowledged. This does not count\n PVCs.')
x25_stat_twoway_circuits = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 17), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25StatTwowayCircuits.setDescription('The number of active two-way Circuits.\n This includes call requests sent but not yet\n confirmed. This does not count PVCs.')
x25_stat_restart_timeouts = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 18), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25StatRestartTimeouts.setDescription('The number of times the T20 restart timer\n expired.')
x25_stat_call_timeouts = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 19), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25StatCallTimeouts.setDescription('The number of times the T21 call timer\n expired.')
x25_stat_reset_timeouts = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 20), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25StatResetTimeouts.setDescription('The number of times the T22 reset timer\n expired.')
x25_stat_clear_timeouts = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 21), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25StatClearTimeouts.setDescription('The number of times the T23 clear timer\n expired.')
x25_stat_data_rxmt_timeouts = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 22), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25StatDataRxmtTimeouts.setDescription('The number of times the T25 data timer\n expired.')
x25_stat_interrupt_timeouts = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 23), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25StatInterruptTimeouts.setDescription('The number of times the T26 interrupt timer\n expired.')
x25_stat_retry_count_exceededs = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 24), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25StatRetryCountExceededs.setDescription('The number of times a retry counter was\n exhausted.')
x25_stat_clear_count_exceededs = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 3, 1, 25), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25StatClearCountExceededs.setDescription('The number of times the R23 clear count was\n exceeded.')
x25_channel_table = mib_table((1, 3, 6, 1, 2, 1, 10, 5, 4))
if mibBuilder.loadTexts:
x25ChannelTable.setDescription('These objects contain information about the\n channel number configuration in an X.25 PLE.\n These values are the configured values.\n changes in these values after the interfaces\n has started may not be reflected in the\n operating PLE.')
x25_channel_entry = mib_table_row((1, 3, 6, 1, 2, 1, 10, 5, 4, 1)).setIndexNames((0, 'RFC1382-MIB', 'x25ChannelIndex'))
if mibBuilder.loadTexts:
x25ChannelEntry.setDescription('Entries of x25ChannelTable.')
x25_channel_index = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 4, 1, 1), if_index_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25ChannelIndex.setDescription('The ifIndex value for the X.25 Interface.')
x25_channel_lic = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 4, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 4095))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25ChannelLIC.setDescription('Lowest Incoming channel.')
x25_channel_hic = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 4, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 4095))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25ChannelHIC.setDescription('Highest Incoming channel. A value of zero\n indicates no channels in this range.')
x25_channel_ltc = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 4, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 4095))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25ChannelLTC.setDescription('Lowest Two-way channel.')
x25_channel_htc = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 4, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(0, 4095))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25ChannelHTC.setDescription('Highest Two-way channel. A value of zero\n indicates no channels in this range.')
x25_channel_loc = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 4, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(0, 4095))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25ChannelLOC.setDescription('Lowest outgoing channel.')
x25_channel_hoc = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 4, 1, 7), integer32().subtype(subtypeSpec=value_range_constraint(0, 4095))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25ChannelHOC.setDescription('Highest outgoing channel. A value of zero\n\n\n indicates no channels in this range.')
x25_circuit_table = mib_table((1, 3, 6, 1, 2, 1, 10, 5, 5))
if mibBuilder.loadTexts:
x25CircuitTable.setDescription('These objects contain general information\n about a specific circuit of an X.25 PLE.')
x25_circuit_entry = mib_table_row((1, 3, 6, 1, 2, 1, 10, 5, 5, 1)).setIndexNames((0, 'RFC1382-MIB', 'x25CircuitIndex'), (0, 'RFC1382-MIB', 'x25CircuitChannel'))
if mibBuilder.loadTexts:
x25CircuitEntry.setDescription('Entries of x25CircuitTable.')
x25_circuit_index = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 1), if_index_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25CircuitIndex.setDescription('The ifIndex value for the X.25 Interface.')
x25_circuit_channel = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 4095))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25CircuitChannel.setDescription('The channel number for this circuit.')
x25_circuit_status = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10))).clone(namedValues=named_values(('invalid', 1), ('closed', 2), ('calling', 3), ('open', 4), ('clearing', 5), ('pvc', 6), ('pvcResetting', 7), ('startClear', 8), ('startPvcResetting', 9), ('other', 10)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25CircuitStatus.setDescription("This object reports the current status of\n the circuit.\n\n An existing instance of this object can only\n be set to startClear, startPvcResetting, or\n invalid. An instance with the value calling\n or open can only be set to startClear and\n that action will start clearing the circuit.\n An instance with the value PVC can only be\n set to startPvcResetting or invalid and that\n action resets the PVC or deletes the circuit\n respectively. The values startClear or\n startPvcResetting will never be returned by\n an agent. An attempt to set the status of\n an existing instance to a value other than\n one of these values will result in an error.\n\n A non-existing instance can be set to PVC to\n create a PVC if the implementation supports\n dynamic creation of PVCs. Some\n implementations may only allow creation and\n deletion of PVCs if the interface is down.\n Since the instance identifier will supply\n the PLE index and the channel number,\n setting this object alone supplies\n sufficient information to create the\n instance. All the DEFVAL clauses for the\n other objects of this table are appropriate\n for creating a PVC; PLEs creating entries\n for placed or accepted calls will use values\n appropriate for the call rather than the\n value of the DEFVAL clause. Two managers\n trying to create the same PVC can determine\n from the return code which manager succeeded\n and which failed (the failing manager fails\n because it can not set a value of PVC for an\n existing object).\n\n\n An entry in the closed or invalid state may\n be deleted or reused at the agent's\n convence. If the entry is kept in the\n closed state, the values of the parameters\n associated with the entry must be correct.\n Closed implies the values in the circuit\n table are correct.\n\n The value of invalid indicates the other\n values in the table are invalid. Many\n agents may never return a value of invalid\n because they dynamically allocate and free\n unused table entries. An agent for a\n statically configured systems can return\n invalid to indicate the entry has not yet\n been used so the counters contain no\n information.")
x25_circuit_establish_time = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 4), time_ticks()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25CircuitEstablishTime.setDescription('The value of sysUpTime when the channel was\n associated with this circuit. For outgoing\n SVCs, this is the time the first call packet\n was sent. For incoming SVCs, this is the\n time the call indication was received. For\n PVCs this is the time the PVC was able to\n pass data to a higher layer entity without\n loss of data.')
x25_circuit_direction = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('incoming', 1), ('outgoing', 2), ('pvc', 3))).clone('pvc')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25CircuitDirection.setDescription('The direction of the call that established\n this circuit.')
x25_circuit_in_octets = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 6), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25CircuitInOctets.setDescription('The number of octets of user data delivered\n to upper layer.')
x25_circuit_in_pdus = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 7), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25CircuitInPdus.setDescription('The number of PDUs received for this\n circuit.')
x25_circuit_in_remotely_initiated_resets = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 8), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25CircuitInRemotelyInitiatedResets.setDescription('The number of Resets received for this\n circuit with cause code of DTE initiated.')
x25_circuit_in_provider_initiated_resets = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 9), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25CircuitInProviderInitiatedResets.setDescription('The number of Resets received for this\n circuit with cause code other than DTE\n initiated.')
x25_circuit_in_interrupts = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 10), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25CircuitInInterrupts.setDescription('The number of interrupt packets received\n for this circuit.')
x25_circuit_out_octets = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 11), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25CircuitOutOctets.setDescription('The number of octets of user data sent for\n this circuit.')
x25_circuit_out_pdus = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 12), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25CircuitOutPdus.setDescription('The number of PDUs sent for this circuit.')
x25_circuit_out_interrupts = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 13), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25CircuitOutInterrupts.setDescription('The number of interrupt packets sent on\n this circuit.')
x25_circuit_data_retransmission_timeouts = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 14), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25CircuitDataRetransmissionTimeouts.setDescription('The number of times the T25 data\n retransmission timer expired for this\n circuit.')
x25_circuit_reset_timeouts = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 15), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25CircuitResetTimeouts.setDescription('The number of times the T22 reset timer\n expired for this circuit.')
x25_circuit_interrupt_timeouts = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 16), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25CircuitInterruptTimeouts.setDescription('The number of times the T26 Interrupt timer\n expired for this circuit.')
x25_circuit_call_param_id = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 17), object_identifier()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25CircuitCallParamId.setDescription('This identifies the instance of the\n x25CallParmIndex for the entry in the\n x25CallParmTable which contains the call\n parameters in use with this circuit. The\n entry referenced must contain the values\n that are currently in use by the circuit\n rather than proposed values. A value of\n NULL indicates the circuit is a PVC or is\n using all the default parameters.')
x25_circuit_called_dte_address = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 18), x121_address().clone(hexValue='')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25CircuitCalledDteAddress.setDescription('For incoming calls, this is the called\n address from the call indication packet.\n For outgoing calls, this is the called\n\n\n address from the call confirmation packet.\n This will be zero length for PVCs.')
x25_circuit_calling_dte_address = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 19), x121_address().clone(hexValue='')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25CircuitCallingDteAddress.setDescription('For incoming calls, this is the calling\n address from the call indication packet.\n For outgoing calls, this is the calling\n address from the call confirmation packet.\n This will be zero length for PVCs.')
x25_circuit_originally_called_address = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 20), x121_address().clone(hexValue='')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25CircuitOriginallyCalledAddress.setDescription('For incoming calls, this is the address in\n the call Redirection or Call Deflection\n Notification facility if the call was\n deflected or redirected, otherwise it will\n be called address from the call indication\n packet. For outgoing calls, this is the\n address from the call request packet. This\n will be zero length for PVCs.')
x25_circuit_descr = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 5, 1, 21), display_string().subtype(subtypeSpec=value_size_constraint(0, 255)).clone(hexValue='')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25CircuitDescr.setDescription("A descriptive string associated with this\n circuit. This provides a place for the\n agent to supply any descriptive information\n it knows about the use or owner of the\n circuit. The agent may return the process\n identifier and user name for the process\n\n\n using the circuit. Alternative the agent\n may return the name of the configuration\n entry that caused a bridge to establish the\n circuit. A zero length value indicates the\n agent doesn't have any additional\n information.")
x25_cleared_circuit_entries_requested = mib_scalar((1, 3, 6, 1, 2, 1, 10, 5, 6), positive_integer()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25ClearedCircuitEntriesRequested.setDescription('The requested number of entries for the\n agent to keep in the x25ClearedCircuit\n table.')
x25_cleared_circuit_entries_granted = mib_scalar((1, 3, 6, 1, 2, 1, 10, 5, 7), positive_integer()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25ClearedCircuitEntriesGranted.setDescription('The actual number of entries the agent will\n keep in the x25ClearedCircuit Table.')
x25_cleared_circuit_table = mib_table((1, 3, 6, 1, 2, 1, 10, 5, 8))
if mibBuilder.loadTexts:
x25ClearedCircuitTable.setDescription('A table of entries about closed circuits.\n Entries must be made in this table whenever\n circuits are closed and the close request or\n close indication packet contains a clearing\n cause other than DTE Originated or a\n Diagnostic code field other than Higher\n Layer Initiated disconnection-normal. An\n agent may optionally make entries for normal\n closes (to record closing facilities or\n\n\n other information).\n\n Agents will delete the oldest entry in the\n table when adding a new entry would exceed\n agent resources. Agents are required to\n keep the last entry put in the table and may\n keep more entries. The object\n x25OperClearEntriesGranted returns the\n maximum number of entries kept in the\n table.')
x25_cleared_circuit_entry = mib_table_row((1, 3, 6, 1, 2, 1, 10, 5, 8, 1)).setIndexNames((0, 'RFC1382-MIB', 'x25ClearedCircuitIndex'))
if mibBuilder.loadTexts:
x25ClearedCircuitEntry.setDescription('Information about a cleared circuit.')
x25_cleared_circuit_index = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 8, 1, 1), positive_integer()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25ClearedCircuitIndex.setDescription('An index that uniquely distinguishes one\n entry in the clearedCircuitTable from\n another. This index will start at\n 2147483647 and will decrease by one for each\n new entry added to the table. Upon reaching\n one, the index will reset to 2147483647.\n Because the index starts at 2147483647 and\n decreases, a manager may do a getnext on\n entry zero and obtain the most recent entry.\n When the index has the value of 1, the next\n entry will delete all entries in the table\n and that entry will be numbered 2147483647.')
x25_cleared_circuit_ple_index = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 8, 1, 2), if_index_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25ClearedCircuitPleIndex.setDescription('The value of ifIndex for the PLE which\n cleared the circuit that created the entry.')
x25_cleared_circuit_time_established = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 8, 1, 3), time_ticks()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25ClearedCircuitTimeEstablished.setDescription('The value of sysUpTime when the circuit was\n established. This will be the same value\n that was in the x25CircuitEstablishTime for\n the circuit.')
x25_cleared_circuit_time_cleared = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 8, 1, 4), time_ticks()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25ClearedCircuitTimeCleared.setDescription('The value of sysUpTime when the circuit was\n cleared. For locally initiated clears, this\n\n\n will be the time when the clear confirmation\n was received. For remotely initiated\n clears, this will be the time when the clear\n indication was received.')
x25_cleared_circuit_channel = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 8, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(0, 4095))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25ClearedCircuitChannel.setDescription('The channel number for the circuit that was\n cleared.')
x25_cleared_circuit_clearing_cause = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 8, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25ClearedCircuitClearingCause.setDescription('The Clearing Cause from the clear request\n or clear indication packet that cleared the\n circuit.')
x25_cleared_circuit_diagnostic_code = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 8, 1, 7), integer32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25ClearedCircuitDiagnosticCode.setDescription('The Diagnostic Code from the clear request\n or clear indication packet that cleared the\n circuit.')
x25_cleared_circuit_in_pdus = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 8, 1, 8), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25ClearedCircuitInPdus.setDescription('The number of PDUs received on the\n circuit.')
x25_cleared_circuit_out_pdus = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 8, 1, 9), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25ClearedCircuitOutPdus.setDescription('The number of PDUs transmitted on the\n circuit.')
x25_cleared_circuit_called_address = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 8, 1, 10), x121_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25ClearedCircuitCalledAddress.setDescription('The called address from the cleared\n circuit.')
x25_cleared_circuit_calling_address = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 8, 1, 11), x121_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25ClearedCircuitCallingAddress.setDescription('The calling address from the cleared\n circuit.')
x25_cleared_circuit_clear_facilities = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 8, 1, 12), octet_string().subtype(subtypeSpec=value_size_constraint(0, 109))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25ClearedCircuitClearFacilities.setDescription('The facilities field from the clear request\n or clear indication packet that cleared the\n circuit. A size of zero indicates no\n facilities were present.')
x25_call_parm_table = mib_table((1, 3, 6, 1, 2, 1, 10, 5, 9))
if mibBuilder.loadTexts:
x25CallParmTable.setDescription('These objects contain the parameters that\n can be varied between X.25 calls. The\n entries in this table are independent of the\n PLE. There exists only one of these tables\n for the entire system. The indexes for the\n entries are independent of any PLE or any\n circuit. Other tables reference entries in\n this table. Entries in this table can be\n used for default PLE parameters, for\n parameters to use to place/answer a call,\n for the parameters currently in use for a\n circuit, or parameters that were used by a\n circuit.\n\n The number of references to a given set of\n parameters can be found in the\n x25CallParmRefCount object sharing the same\n instance identifier with the parameters.\n The value of this reference count also\n affects the access of the objects in this\n table. An object in this table with the\n same instance identifier as the instance\n identifier of an x25CallParmRefCount must be\n consider associated with that reference\n count. An object with an associated\n reference count of zero can be written (if\n its ACCESS clause allows it). An object\n with an associated reference count greater\n than zero can not be written (regardless of\n the ACCESS clause). This ensures that a set\n of call parameters being referenced from\n another table can not be modified or changed\n in a ways inappropriate for continued use by\n that table.')
x25_call_parm_entry = mib_table_row((1, 3, 6, 1, 2, 1, 10, 5, 9, 1)).setIndexNames((0, 'RFC1382-MIB', 'x25CallParmIndex'))
if mibBuilder.loadTexts:
x25CallParmEntry.setDescription('Entries of x25CallParmTable.')
x25_call_parm_index = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 1), positive_integer()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25CallParmIndex.setDescription('A value that distinguishes this entry from\n another entry. Entries in this table are\n referenced from other objects which identify\n call parameters.\n\n It is impossible to know which other objects\n in the MIB reference entries in the table by\n looking at this table. Because of this,\n changes to parameters must be accomplished\n by creating a new entry in this table and\n then changing the referencing table to\n identify the new entry.\n\n Note that an agent will only use the values\n in this table when another table is changed\n to reference those values. The number of\n other tables that reference an index object\n in this table can be found in\n x25CallParmRefCount. The value of the\n reference count will affect the writability\n of the objects as explained above.\n\n Entries in this table which have a reference\n count of zero maybe deleted at the convence\n of the agent. Care should be taken by the\n agent to give the NMS sufficient time to\n create a reference to newly created entries.\n\n Should a Management Station not find a free\n index with which to create a new entry, it\n may feel free to delete entries with a\n\n\n reference count of zero. However in doing\n so the Management Station much realize it\n may impact other Management Stations.')
x25_call_parm_status = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 2), entry_status()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25CallParmStatus.setDescription('The status of this call parameter entry.\n See RFC 1271 for details of usage.')
x25_call_parm_ref_count = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 3), positive_integer()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
x25CallParmRefCount.setDescription('The number of references know by a\n management station to exist to this set of\n call parameters. This is the number of\n other objects that have returned a value of,\n and will return a value of, the index for\n this set of call parameters. Examples of\n such objects are the x25AdmnDefCallParamId,\n x25OperDataLinkId, or x25AdmnDefCallParamId\n objects defined above.')
x25_call_parm_in_packet_size = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 4096)).clone(128)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25CallParmInPacketSize.setDescription('The maximum receive packet size in octets\n for a circuit. A size of zero for a circuit\n means use the PLE default size. A size of\n zero for the PLE means use a default size of\n 128.')
x25_call_parm_out_packet_size = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(0, 4096)).clone(128)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25CallParmOutPacketSize.setDescription('The maximum transmit packet size in octets\n for a circuit. A size of zero for a circuit\n means use the PLE default size. A size of\n zero for the PLE default means use a default\n size of 128.')
x25_call_parm_in_window_size = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(0, 127)).clone(2)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25CallParmInWindowSize.setDescription('The receive window size for a circuit. A\n size of zero for a circuit means use the PLE\n default size. A size of zero for the PLE\n default means use 2.')
x25_call_parm_out_window_size = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 7), integer32().subtype(subtypeSpec=value_range_constraint(0, 127)).clone(2)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25CallParmOutWindowSize.setDescription('The transmit window size for a circuit. A\n size of zero for a circuit means use the PLE\n default size. A size of zero for the PLE\n default means use 2.')
x25_call_parm_accept_reverse_charging = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('default', 1), ('accept', 2), ('refuse', 3), ('neverAccept', 4))).clone('refuse')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25CallParmAcceptReverseCharging.setDescription('An enumeration defining if the PLE will\n accept or refuse charges. A value of\n default for a circuit means use the PLE\n default value. A value of neverAccept is\n only used for the PLE default and indicates\n the PLE will never accept reverse charging.\n A value of default for a PLE default means\n refuse.')
x25_call_parm_propose_reverse_charging = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('default', 1), ('reverse', 2), ('local', 3))).clone('local')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25CallParmProposeReverseCharging.setDescription('An enumeration defining if the PLE should\n propose reverse or local charging. The\n value of default for a circuit means use the\n PLE default. The value of default for the\n PLE default means use local.')
x25_call_parm_fast_select = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6))).clone(namedValues=named_values(('default', 1), ('notSpecified', 2), ('fastSelect', 3), ('restrictedFastResponse', 4), ('noFastSelect', 5), ('noRestrictedFastResponse', 6))).clone('noFastSelect')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25CallParmFastSelect.setDescription('Expresses preference for use of fast select\n facility. The value of default for a\n circuit is the PLE default. A value of\n\n\n default for the PLE means noFastSelect. A\n value of noFastSelect or\n noRestrictedFastResponse indicates a circuit\n may not use fast select or restricted fast\n response.')
x25_call_parm_in_thru_put_clas_size = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 11), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18))).clone(namedValues=named_values(('tcReserved1', 1), ('tcReserved2', 2), ('tc75', 3), ('tc150', 4), ('tc300', 5), ('tc600', 6), ('tc1200', 7), ('tc2400', 8), ('tc4800', 9), ('tc9600', 10), ('tc19200', 11), ('tc48000', 12), ('tc64000', 13), ('tcReserved14', 14), ('tcReserved15', 15), ('tcReserved0', 16), ('tcNone', 17), ('tcDefault', 18))).clone('tcNone')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25CallParmInThruPutClasSize.setDescription('The incoming throughput class to negotiate.\n A value of tcDefault for a circuit means use\n the PLE default. A value of tcDefault for\n the PLE default means tcNone. A value of\n tcNone means do not negotiate throughtput\n class.')
x25_call_parm_out_thru_put_clas_size = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 12), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18))).clone(namedValues=named_values(('tcReserved1', 1), ('tcReserved2', 2), ('tc75', 3), ('tc150', 4), ('tc300', 5), ('tc600', 6), ('tc1200', 7), ('tc2400', 8), ('tc4800', 9), ('tc9600', 10), ('tc19200', 11), ('tc48000', 12), ('tc64000', 13), ('tcReserved14', 14), ('tcReserved15', 15), ('tcReserved0', 16), ('tcNone', 17), ('tcDefault', 18))).clone('tcNone')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25CallParmOutThruPutClasSize.setDescription('The outgoing throughput class to negotiate.\n A value of tcDefault for a circuit means use\n the PLE default. A value of tcDefault for\n the PLE default means use tcNone. A value\n of tcNone means do not negotiate throughtput\n class.')
x25_call_parm_cug = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 13), display_string().subtype(subtypeSpec=value_size_constraint(0, 4)).clone(hexValue='')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25CallParmCug.setDescription('The Closed User Group to specify. This\n consists of two or four octets containing\n the characters 0 through 9. A zero length\n string indicates no facility requested. A\n string length of three containing the\n characters DEF for a circuit means use the\n PLE default, (the PLE default parameter may\n not reference an entry of DEF.)')
x25_call_parm_cugoa = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 14), display_string().subtype(subtypeSpec=value_size_constraint(0, 4)).clone(hexValue='')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25CallParmCugoa.setDescription('The Closed User Group with Outgoing Access\n to specify. This consists of two or four\n octets containing the characters 0 through\n 9. A string length of three containing the\n characters DEF for a circuit means use the\n PLE default (the PLE default parameters may\n not reference an entry of DEF). A zero\n length string indicates no facility\n requested.')
x25_call_parm_bcug = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 15), display_string().subtype(subtypeSpec=value_size_constraint(0, 3)).clone(hexValue='')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25CallParmBcug.setDescription('The Bilateral Closed User Group to specify.\n This consists of two octets containing the\n characters 0 through 9. A string length of\n three containing the characters DEF for a\n circuit means use the PLE default (the PLE\n default parameter may not reference an entry\n of DEF). A zero length string indicates no\n facility requested.')
x25_call_parm_nui = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 16), octet_string().subtype(subtypeSpec=value_size_constraint(0, 108)).clone(hexValue='')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25CallParmNui.setDescription('The Network User Identifier facility. This\n is binary value to be included immediately\n after the length field. The PLE will supply\n the length octet. A zero length string\n indicates no facility requested. This value\n is ignored for the PLE default parameters\n entry.')
x25_call_parm_charging_info = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 17), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('default', 1), ('noFacility', 2), ('noChargingInfo', 3), ('chargingInfo', 4))).clone('noFacility')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25CallParmChargingInfo.setDescription('The charging Information facility. A value\n of default for a circuit means use the PLE\n default. The value of default for the\n default PLE parameters means use noFacility.\n The value of noFacility means do not include\n a facility.')
x25_call_parm_rpoa = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 18), display_string().subtype(subtypeSpec=value_size_constraint(0, 108)).clone(hexValue='')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25CallParmRpoa.setDescription('The RPOA facility. The octet string\n contains n * 4 sequences of the characters\n 0-9 to specify a facility with n entries.\n The octet string containing the 3 characters\n DEF for a circuit specifies use of the PLE\n default (the entry for the PLE default may\n not contain DEF). A zero length string\n indicates no facility requested.')
x25_call_parm_trnst_dly = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 19), integer32().subtype(subtypeSpec=value_range_constraint(0, 65537)).clone(65536)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25CallParmTrnstDly.setDescription('The Transit Delay Selection and Indication\n value. A value of 65536 indicates no\n facility requested. A value of 65537 for a\n circuit means use the PLE default (the PLE\n\n\n default parameters entry may not use the\n value 65537). The value 65535 may only be\n used to indicate the value in use by a\n circuit.')
x25_call_parm_calling_ext = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 20), display_string().subtype(subtypeSpec=value_size_constraint(0, 40)).clone(hexValue='')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25CallParmCallingExt.setDescription('The Calling Extension facility. This\n contains one of the following:\n\n A sequence of hex digits with the value to\n be put in the facility. These digits will be\n converted to binary by the agent and put in\n the facility. These octets do not include\n the length octet.\n\n A value containing the three character DEF\n for a circuit means use the PLE default,\n (the entry for the PLE default parameters\n may not use the value DEF).\n\n A zero length string indicates no facility\n requested.')
x25_call_parm_called_ext = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 21), display_string().subtype(subtypeSpec=value_size_constraint(0, 40)).clone(hexValue='')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25CallParmCalledExt.setDescription('The Called Extension facility. This\n contains one of the following:\n\n A sequence of hex digits with the value to\n be put in the facility. These digits will be\n converted to binary by the agent and put in\n the facility. These octets do not include\n\n\n the length octet.\n\n A value containing the three character DEF\n for a circuit means use the PLE default,\n (the entry for the PLE default parameters\n may not use the value DEF).\n\n A zero length string indicates no facility\n requested.')
x25_call_parm_in_min_thu_put_cls = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 22), integer32().subtype(subtypeSpec=value_range_constraint(0, 17)).clone(17)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25CallParmInMinThuPutCls.setDescription('The minimum input throughput Class. A\n value of 16 for a circuit means use the PLE\n default (the PLE parameters entry may not\n use this value). A value of 17 indicates no\n facility requested.')
x25_call_parm_out_min_thu_put_cls = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 23), integer32().subtype(subtypeSpec=value_range_constraint(0, 17)).clone(17)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25CallParmOutMinThuPutCls.setDescription('The minimum output throughput Class. A\n value of 16 for a circuit means use the PLE\n default (the PLE parameters entry may not\n use this value). A value of 17 indicates no\n facility requested.')
x25_call_parm_end_trns_dly = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 24), octet_string().subtype(subtypeSpec=value_size_constraint(0, 6)).clone(hexValue='')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25CallParmEndTrnsDly.setDescription('The End-to-End Transit Delay to negotiate.\n An octet string of length 2, 4, or 6\n\n\n contains the facility encoded as specified\n in ISO/IEC 8208 section 15.3.2.4. An octet\n string of length 3 containing the three\n character DEF for a circuit means use the\n PLE default (the entry for the PLE default\n can not contain the characters DEF). A zero\n length string indicates no facility\n requested.')
x25_call_parm_priority = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 25), octet_string().subtype(subtypeSpec=value_size_constraint(0, 6)).clone(hexValue='')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25CallParmPriority.setDescription('The priority facility to negotiate. The\n octet string encoded as specified in ISO/IEC\n 8208 section 15.3.2.5. A zero length string\n indicates no facility requested. The entry\n for the PLE default parameters must be zero\n length.')
x25_call_parm_protection = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 26), display_string().subtype(subtypeSpec=value_size_constraint(0, 108)).clone(hexValue='')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25CallParmProtection.setDescription('A string contains the following:\n A hex string containing the value for the\n protection facility. This will be converted\n from hex to the octets actually in the\n packet by the agent. The agent will supply\n the length field and the length octet is not\n contained in this string.\n\n An string containing the 3 characters DEF\n for a circuit means use the PLE default (the\n entry for the PLE default parameters may not\n use the value DEF).\n\n A zero length string mean no facility\n requested.')
x25_call_parm_expt_data = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 27), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('default', 1), ('noExpeditedData', 2), ('expeditedData', 3))).clone('noExpeditedData')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25CallParmExptData.setDescription('The Expedited Data facility to negotiate.\n A value of default for a circuit means use\n the PLE default value. The entry for the\n PLE default parameters may not have the\n value default.')
x25_call_parm_user_data = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 28), octet_string().subtype(subtypeSpec=value_size_constraint(0, 128)).clone(hexValue='')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25CallParmUserData.setDescription('The call user data as placed in the packet.\n A zero length string indicates no call user\n data. If both the circuit call parameters\n and the PLE default have call user data\n defined, the data from the circuit call\n parameters will be used. If only the PLE\n has data defined, the PLE entry will be\n used. If neither the circuit call\n parameters or the PLE default entry has a\n value, no call user data will be sent.')
x25_call_parm_calling_network_facilities = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 29), octet_string().subtype(subtypeSpec=value_size_constraint(0, 108)).clone(hexValue='')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25CallParmCallingNetworkFacilities.setDescription('The calling network facilities. The\n facilities are encoded here exactly as\n encoded in the call packet. These\n\n\n facilities do not include the marker\n facility code.\n\n A zero length string in the entry for the\n parameter to use when establishing a circuit\n means use the PLE default. A zero length\n string in the entry for PLE default\n parameters indicates no default facilities.')
x25_call_parm_called_network_facilities = mib_table_column((1, 3, 6, 1, 2, 1, 10, 5, 9, 1, 30), octet_string().subtype(subtypeSpec=value_size_constraint(0, 108)).clone(hexValue='')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
x25CallParmCalledNetworkFacilities.setDescription('The called network facilities. The\n facilities are encoded here exactly as\n encoded in the call packet. These\n facilities do not include the marker\n facility code.\n\n A zero length string in the entry for the\n parameter to use when establishing a circuit\n means use the PLE default. A zero length\n string in the entry for PLE default\n parameters indicates no default facilities.')
x25_restart = notification_type((1, 3, 6, 1, 2, 1, 10, 5) + (0, 1)).setObjects(*(('RFC1382-MIB', 'x25OperIndex'),))
if mibBuilder.loadTexts:
x25Restart.setDescription('This trap means the X.25 PLE sent or\n received a restart packet. The restart that\n brings up the link should not send a\n x25Restart trap so the interface should send\n a linkUp trap. Sending this trap means the\n agent does not send a linkDown and linkUp\n trap.')
x25_reset = notification_type((1, 3, 6, 1, 2, 1, 10, 5) + (0, 2)).setObjects(*(('RFC1382-MIB', 'x25CircuitIndex'), ('RFC1382-MIB', 'x25CircuitChannel')))
if mibBuilder.loadTexts:
x25Reset.setDescription('If the PLE sends or receives a reset, the\n agent should send an x25Reset trap.')
x25_protocol_version = mib_identifier((1, 3, 6, 1, 2, 1, 10, 5, 10))
x25protocol_ccitt_v1976 = mib_identifier((1, 3, 6, 1, 2, 1, 10, 5, 10, 1))
x25protocol_ccitt_v1980 = mib_identifier((1, 3, 6, 1, 2, 1, 10, 5, 10, 2))
x25protocol_ccitt_v1984 = mib_identifier((1, 3, 6, 1, 2, 1, 10, 5, 10, 3))
x25protocol_ccitt_v1988 = mib_identifier((1, 3, 6, 1, 2, 1, 10, 5, 10, 4))
x25protocol_iso8208_v1987 = mib_identifier((1, 3, 6, 1, 2, 1, 10, 5, 10, 5))
x25protocol_iso8208_v1989 = mib_identifier((1, 3, 6, 1, 2, 1, 10, 5, 10, 6))
mibBuilder.exportSymbols('RFC1382-MIB', x25CallParmAcceptReverseCharging=x25CallParmAcceptReverseCharging, x25StatRetryCountExceededs=x25StatRetryCountExceededs, x25StatEntry=x25StatEntry, x25StatOutInterrupts=x25StatOutInterrupts, x25StatInCalls=x25StatInCalls, x25StatInRestarts=x25StatInRestarts, x25ClearedCircuitIndex=x25ClearedCircuitIndex, x25CallParmFastSelect=x25CallParmFastSelect, x25CircuitOutOctets=x25CircuitOutOctets, x25AdmnRestartCount=x25AdmnRestartCount, x25OperRejectTimer=x25OperRejectTimer, x25ChannelLIC=x25ChannelLIC, x25ChannelTable=x25ChannelTable, x25AdmnPacketSequencing=x25AdmnPacketSequencing, x25StatIndex=x25StatIndex, x25OperLocalAddress=x25OperLocalAddress, x25AdmnMinimumRecallTimer=x25AdmnMinimumRecallTimer, x25ChannelHTC=x25ChannelHTC, x25StatOutCallFailures=x25StatOutCallFailures, x25Reset=x25Reset, x25StatResetTimeouts=x25StatResetTimeouts, x25CircuitEstablishTime=x25CircuitEstablishTime, x25CallParmInPacketSize=x25CallParmInPacketSize, x25protocolCcittV1976=x25protocolCcittV1976, x25=x25, x25OperDataLinkId=x25OperDataLinkId, x25StatCallTimeouts=x25StatCallTimeouts, x25OperClearCount=x25OperClearCount, x25ClearedCircuitInPdus=x25ClearedCircuitInPdus, x25OperDataRxmtTimer=x25OperDataRxmtTimer, X121Address=X121Address, x25OperResetTimer=x25OperResetTimer, x25StatDataRxmtTimeouts=x25StatDataRxmtTimeouts, x25CallParmCallingExt=x25CallParmCallingExt, x25CallParmCalledNetworkFacilities=x25CallParmCalledNetworkFacilities, x25ClearedCircuitCallingAddress=x25ClearedCircuitCallingAddress, x25AdmnLocalAddress=x25AdmnLocalAddress, x25AdmnMaxActiveCircuits=x25AdmnMaxActiveCircuits, x25CallParmOutMinThuPutCls=x25CallParmOutMinThuPutCls, x25CircuitOutPdus=x25CircuitOutPdus, x25ProtocolVersion=x25ProtocolVersion, x25CircuitOutInterrupts=x25CircuitOutInterrupts, x25CircuitCallParamId=x25CircuitCallParamId, x25OperPacketSequencing=x25OperPacketSequencing, x25AdmnDefCallParamId=x25AdmnDefCallParamId, x25CallParmRefCount=x25CallParmRefCount, x25AdmnResetTimer=x25AdmnResetTimer, x25AdmnRegistrationRequestCount=x25AdmnRegistrationRequestCount, x25CircuitInOctets=x25CircuitInOctets, x25CallParmOutPacketSize=x25CallParmOutPacketSize, x25ClearedCircuitClearingCause=x25ClearedCircuitClearingCause, x25AdmnInterfaceMode=x25AdmnInterfaceMode, x25CircuitInPdus=x25CircuitInPdus, x25CallParmOutThruPutClasSize=x25CallParmOutThruPutClasSize, x25CallParmProtection=x25CallParmProtection, x25OperCallTimer=x25OperCallTimer, x25AdmnRejectCount=x25AdmnRejectCount, x25OperNumberPVCs=x25OperNumberPVCs, x25CircuitOriginallyCalledAddress=x25CircuitOriginallyCalledAddress, x25ClearedCircuitTimeEstablished=x25ClearedCircuitTimeEstablished, x25AdmnIndex=x25AdmnIndex, x25OperTable=x25OperTable, x25CallParmStatus=x25CallParmStatus, x25AdmnClearTimer=x25AdmnClearTimer, x25CallParmCalledExt=x25CallParmCalledExt, x25CallParmEntry=x25CallParmEntry, x25CircuitChannel=x25CircuitChannel, x25StatOutDataPackets=x25StatOutDataPackets, x25OperInterfaceMode=x25OperInterfaceMode, x25AdmnResetCount=x25AdmnResetCount, x25StatOutgoingCircuits=x25StatOutgoingCircuits, x25CircuitCalledDteAddress=x25CircuitCalledDteAddress, x25AdmnCallTimer=x25AdmnCallTimer, x25ChannelHOC=x25ChannelHOC, x25CallParmExptData=x25CallParmExptData, x25CallParmProposeReverseCharging=x25CallParmProposeReverseCharging, x25CircuitDescr=x25CircuitDescr, x25CallParmInMinThuPutCls=x25CallParmInMinThuPutCls, x25ClearedCircuitClearFacilities=x25ClearedCircuitClearFacilities, x25CallParmTrnstDly=x25CallParmTrnstDly, x25CallParmNui=x25CallParmNui, x25StatInProviderInitiatedResets=x25StatInProviderInitiatedResets, x25CallParmChargingInfo=x25CallParmChargingInfo, x25StatRestartTimeouts=x25StatRestartTimeouts, x25protocolCcittV1984=x25protocolCcittV1984, x25protocolIso8208V1987=x25protocolIso8208V1987, x25CircuitIndex=x25CircuitIndex, x25OperRestartTimer=x25OperRestartTimer, x25ClearedCircuitPleIndex=x25ClearedCircuitPleIndex, x25OperInterruptTimer=x25OperInterruptTimer, x25CallParmCug=x25CallParmCug, x25StatTwowayCircuits=x25StatTwowayCircuits, x25AdmnWindowTimer=x25AdmnWindowTimer, x25ClearedCircuitCalledAddress=x25ClearedCircuitCalledAddress, x25ClearedCircuitTimeCleared=x25ClearedCircuitTimeCleared, x25CallParmPriority=x25CallParmPriority, x25OperRegistrationRequestTimer=x25OperRegistrationRequestTimer, x25AdmnClearCount=x25AdmnClearCount, x25protocolCcittV1980=x25protocolCcittV1980, x25protocolCcittV1988=x25protocolCcittV1988, x25ClearedCircuitEntriesGranted=x25ClearedCircuitEntriesGranted, x25CallParmInWindowSize=x25CallParmInWindowSize, x25ChannelLOC=x25ChannelLOC, x25CircuitDataRetransmissionTimeouts=x25CircuitDataRetransmissionTimeouts, x25OperClearTimer=x25OperClearTimer, x25StatOutCallAttempts=x25StatOutCallAttempts, x25CallParmRpoa=x25CallParmRpoa, x25CallParmInThruPutClasSize=x25CallParmInThruPutClasSize, x25ClearedCircuitEntriesRequested=x25ClearedCircuitEntriesRequested, x25StatInterruptTimeouts=x25StatInterruptTimeouts, x25OperIndex=x25OperIndex, x25CallParmUserData=x25CallParmUserData, x25AdmnRejectTimer=x25AdmnRejectTimer, x25ClearedCircuitEntry=x25ClearedCircuitEntry, x25ClearedCircuitTable=x25ClearedCircuitTable, x25protocolIso8208V1989=x25protocolIso8208V1989, x25StatClearCountExceededs=x25StatClearCountExceededs, x25OperMaxActiveCircuits=x25OperMaxActiveCircuits, x25StatInCallRefusals=x25StatInCallRefusals, x25CircuitInRemotelyInitiatedResets=x25CircuitInRemotelyInitiatedResets, x25OperRestartCount=x25OperRestartCount, x25OperProtocolVersionSupported=x25OperProtocolVersionSupported, x25CallParmOutWindowSize=x25CallParmOutWindowSize, x25OperRejectCount=x25OperRejectCount, x25StatIncomingCircuits=x25StatIncomingCircuits, x25ClearedCircuitChannel=x25ClearedCircuitChannel, x25StatInAccusedOfProtocolErrors=x25StatInAccusedOfProtocolErrors, x25CircuitInterruptTimeouts=x25CircuitInterruptTimeouts, x25AdmnNumberPVCs=x25AdmnNumberPVCs, x25OperDefCallParamId=x25OperDefCallParamId, x25AdmnInterruptTimer=x25AdmnInterruptTimer, x25CircuitInProviderInitiatedResets=x25CircuitInProviderInitiatedResets, x25StatInRemotelyInitiatedResets=x25StatInRemotelyInitiatedResets, x25OperResetCount=x25OperResetCount, x25ChannelIndex=x25ChannelIndex, x25ChannelLTC=x25ChannelLTC, x25CallParmTable=x25CallParmTable, x25CallParmCugoa=x25CallParmCugoa, x25AdmnDataRxmtTimer=x25AdmnDataRxmtTimer, x25ChannelEntry=x25ChannelEntry, x25ChannelHIC=x25ChannelHIC, x25CircuitInInterrupts=x25CircuitInInterrupts, x25StatInProviderInitiatedClears=x25StatInProviderInitiatedClears, x25AdmnTable=x25AdmnTable, x25AdmnDataRxmtCount=x25AdmnDataRxmtCount, x25AdmnEntry=x25AdmnEntry, x25ClearedCircuitDiagnosticCode=x25ClearedCircuitDiagnosticCode, x25CircuitResetTimeouts=x25CircuitResetTimeouts, x25Restart=x25Restart, x25CallParmEndTrnsDly=x25CallParmEndTrnsDly, x25CallParmIndex=x25CallParmIndex, x25OperMinimumRecallTimer=x25OperMinimumRecallTimer, x25OperWindowTimer=x25OperWindowTimer, x25AdmnRestartTimer=x25AdmnRestartTimer, x25OperEntry=x25OperEntry, x25CircuitCallingDteAddress=x25CircuitCallingDteAddress, x25CircuitDirection=x25CircuitDirection, x25ClearedCircuitOutPdus=x25ClearedCircuitOutPdus, x25CallParmBcug=x25CallParmBcug, x25StatInInterrupts=x25StatInInterrupts, x25AdmnRegistrationRequestTimer=x25AdmnRegistrationRequestTimer, x25StatTable=x25StatTable, x25AdmnProtocolVersionSupported=x25AdmnProtocolVersionSupported, x25OperRegistrationRequestCount=x25OperRegistrationRequestCount, x25CallParmCallingNetworkFacilities=x25CallParmCallingNetworkFacilities, x25OperDataRxmtCount=x25OperDataRxmtCount, x25CircuitStatus=x25CircuitStatus, x25CircuitTable=x25CircuitTable, x25CircuitEntry=x25CircuitEntry, x25StatInDataPackets=x25StatInDataPackets, x25StatClearTimeouts=x25StatClearTimeouts) |
def main(filepath):
with open(filepath) as file:
rows = [int(x.strip()) for x in file.readlines()]
rows.append(0)
rows.sort()
rows.append(rows[-1]+3)
current_volts = 0
one_volts = 0
three_volts = 0
for i in range(len(rows)):
if rows[i] - current_volts == 0:
continue
if rows[i] - current_volts == 1:
current_volts = rows[i]
one_volts += 1
continue
if rows[i] - current_volts == 2:
current_volts = rows[i]
continue
if rows[i] - current_volts == 3:
current_volts = rows[i]
three_volts += 1
continue
print("Part a solution: "+ str(three_volts*one_volts))
rows.reverse()
memo = {}
memo[rows[0]] = 1
for i in range(1,len(rows)):
memo[rows[i]] = memo.get(rows[i] + 1, 0) + memo.get(rows[i] + 2, 0) + memo.get(rows[i] + 3, 0)
print("Part b solution: "+ str(memo[0]))
| def main(filepath):
with open(filepath) as file:
rows = [int(x.strip()) for x in file.readlines()]
rows.append(0)
rows.sort()
rows.append(rows[-1] + 3)
current_volts = 0
one_volts = 0
three_volts = 0
for i in range(len(rows)):
if rows[i] - current_volts == 0:
continue
if rows[i] - current_volts == 1:
current_volts = rows[i]
one_volts += 1
continue
if rows[i] - current_volts == 2:
current_volts = rows[i]
continue
if rows[i] - current_volts == 3:
current_volts = rows[i]
three_volts += 1
continue
print('Part a solution: ' + str(three_volts * one_volts))
rows.reverse()
memo = {}
memo[rows[0]] = 1
for i in range(1, len(rows)):
memo[rows[i]] = memo.get(rows[i] + 1, 0) + memo.get(rows[i] + 2, 0) + memo.get(rows[i] + 3, 0)
print('Part b solution: ' + str(memo[0])) |
def find_min_max(nums):
if nums[0]<nums[1]:
min = nums[0]
max = nums[1]
else:
min = nums[1]
max = nums[0]
for i in range(len(nums)-2):
if nums[i+2] < min:
min = nums[i+2]
elif nums[i+2] > max:
max = nums[i+2]
return (min, max)
def main():
print(find_min_max([3, 5, 1, 2, 4, 8]))
if __name__== "__main__":
main() | def find_min_max(nums):
if nums[0] < nums[1]:
min = nums[0]
max = nums[1]
else:
min = nums[1]
max = nums[0]
for i in range(len(nums) - 2):
if nums[i + 2] < min:
min = nums[i + 2]
elif nums[i + 2] > max:
max = nums[i + 2]
return (min, max)
def main():
print(find_min_max([3, 5, 1, 2, 4, 8]))
if __name__ == '__main__':
main() |
def daily_sleeping_hours(hours=7):
return hours
print(daily_sleeping_hours(10))
print(daily_sleeping_hours()) | def daily_sleeping_hours(hours=7):
return hours
print(daily_sleeping_hours(10))
print(daily_sleeping_hours()) |
x=1
grenais = 0
inter = 0
gremio = 0
empate = 0
while x == 1:
y = input().split()
a,b=y
a=int(a)
b=int(b)
grenais = grenais + 1
if a > b:
inter = inter + 1
if a < b:
gremio = gremio + 1
if a == b:
empate = empate + 1
while True:
x = int(input('Novo grenal (1-sim 2-nao)'))
if x == 2 or x == 1:
break
print('{} grenais'.format(grenais))
print('Inter:{}'.format(inter))
print('Gremio:{}'.format(gremio))
print('Empates:{}'.format(empate))
if inter > gremio:
print('Inter venceu mais')
if gremio > inter:
print('Gremio venceu mais')
if gremio == inter:
print('Nao houve vencedor')
| x = 1
grenais = 0
inter = 0
gremio = 0
empate = 0
while x == 1:
y = input().split()
(a, b) = y
a = int(a)
b = int(b)
grenais = grenais + 1
if a > b:
inter = inter + 1
if a < b:
gremio = gremio + 1
if a == b:
empate = empate + 1
while True:
x = int(input('Novo grenal (1-sim 2-nao)'))
if x == 2 or x == 1:
break
print('{} grenais'.format(grenais))
print('Inter:{}'.format(inter))
print('Gremio:{}'.format(gremio))
print('Empates:{}'.format(empate))
if inter > gremio:
print('Inter venceu mais')
if gremio > inter:
print('Gremio venceu mais')
if gremio == inter:
print('Nao houve vencedor') |
#
# PySNMP MIB module SNR-ERD-PRO-Mini (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/SNR-ERD-PRO-Mini
# Produced by pysmi-0.3.4 at Mon Apr 29 21:00:58 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueSizeConstraint, SingleValueConstraint, ConstraintsUnion, ValueRangeConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "SingleValueConstraint", "ConstraintsUnion", "ValueRangeConstraint", "ConstraintsIntersection")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
ModuleIdentity, NotificationType, MibScalar, MibTable, MibTableRow, MibTableColumn, Integer32, Bits, Unsigned32, MibIdentifier, ObjectIdentity, Counter32, iso, TimeTicks, Counter64, enterprises, IpAddress, Gauge32 = mibBuilder.importSymbols("SNMPv2-SMI", "ModuleIdentity", "NotificationType", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Integer32", "Bits", "Unsigned32", "MibIdentifier", "ObjectIdentity", "Counter32", "iso", "TimeTicks", "Counter64", "enterprises", "IpAddress", "Gauge32")
DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention")
snr = ModuleIdentity((1, 3, 6, 1, 4, 1, 40418))
snr.setRevisions(('2015-04-29 12:00',))
if mibBuilder.loadTexts: snr.setLastUpdated('201504291200Z')
if mibBuilder.loadTexts: snr.setOrganization('NAG ')
snr_erd = MibIdentifier((1, 3, 6, 1, 4, 1, 40418, 2)).setLabel("snr-erd")
snr_erd_pro_mini = MibIdentifier((1, 3, 6, 1, 4, 1, 40418, 2, 5)).setLabel("snr-erd-pro-mini")
measurements = MibIdentifier((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1))
sensesstate = MibIdentifier((1, 3, 6, 1, 4, 1, 40418, 2, 5, 2))
management = MibIdentifier((1, 3, 6, 1, 4, 1, 40418, 2, 5, 3))
counters = MibIdentifier((1, 3, 6, 1, 4, 1, 40418, 2, 5, 8))
options = MibIdentifier((1, 3, 6, 1, 4, 1, 40418, 2, 5, 10))
snrSensors = MibIdentifier((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1))
temperatureSensors = MibIdentifier((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 1))
powerSensors = MibIdentifier((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 2))
alarmSensCnts = MibIdentifier((1, 3, 6, 1, 4, 1, 40418, 2, 5, 8, 2))
erdproMiniTraps = MibIdentifier((1, 3, 6, 1, 4, 1, 40418, 2, 5, 0))
voltageSensor = MibScalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: voltageSensor.setStatus('current')
serialS1 = MibScalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 10), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: serialS1.setStatus('current')
serialS2 = MibScalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 11), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: serialS2.setStatus('current')
serialS3 = MibScalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 12), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: serialS3.setStatus('current')
serialS4 = MibScalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 13), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: serialS4.setStatus('current')
serialS5 = MibScalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 14), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: serialS5.setStatus('current')
serialS6 = MibScalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 15), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: serialS6.setStatus('current')
serialS7 = MibScalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 16), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: serialS7.setStatus('current')
serialS8 = MibScalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 17), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: serialS8.setStatus('current')
serialS9 = MibScalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 18), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: serialS9.setStatus('current')
serialS10 = MibScalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 19), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: serialS10.setStatus('current')
temperatureS1 = MibScalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: temperatureS1.setStatus('current')
temperatureS2 = MibScalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: temperatureS2.setStatus('current')
temperatureS3 = MibScalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 1, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: temperatureS3.setStatus('current')
temperatureS4 = MibScalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 1, 4), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: temperatureS4.setStatus('current')
temperatureS5 = MibScalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 1, 5), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: temperatureS5.setStatus('current')
temperatureS6 = MibScalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 1, 6), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: temperatureS6.setStatus('current')
temperatureS7 = MibScalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 1, 7), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: temperatureS7.setStatus('current')
temperatureS8 = MibScalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 1, 8), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: temperatureS8.setStatus('current')
temperatureS9 = MibScalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 1, 9), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: temperatureS9.setStatus('current')
temperatureS10 = MibScalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 1, 10), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: temperatureS10.setStatus('current')
voltageS1 = MibScalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 2, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: voltageS1.setStatus('current')
currentS1 = MibScalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 2, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: currentS1.setStatus('current')
voltageS2 = MibScalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 2, 4), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: voltageS2.setStatus('current')
currentS2 = MibScalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 2, 5), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: currentS2.setStatus('current')
voltageS3 = MibScalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 2, 7), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: voltageS3.setStatus('current')
currentS3 = MibScalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 2, 8), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: currentS3.setStatus('current')
voltageS4 = MibScalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 2, 10), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: voltageS4.setStatus('current')
currentS4 = MibScalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 2, 11), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: currentS4.setStatus('current')
voltageS5 = MibScalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 2, 13), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: voltageS5.setStatus('current')
currentS5 = MibScalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 2, 14), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: currentS5.setStatus('current')
voltageS6 = MibScalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 2, 16), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: voltageS6.setStatus('current')
currentS6 = MibScalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 2, 17), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: currentS6.setStatus('current')
voltageS7 = MibScalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 2, 19), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: voltageS7.setStatus('current')
currentS7 = MibScalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 2, 20), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: currentS7.setStatus('current')
voltageS8 = MibScalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 2, 22), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: voltageS8.setStatus('current')
currentS8 = MibScalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 2, 23), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: currentS8.setStatus('current')
voltageS9 = MibScalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 2, 25), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: voltageS9.setStatus('current')
currentS9 = MibScalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 2, 26), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: currentS9.setStatus('current')
voltageS10 = MibScalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 2, 28), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: voltageS10.setStatus('current')
currentS10 = MibScalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 2, 29), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: currentS10.setStatus('current')
alarmSensor1 = MibScalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 2, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 0))).clone(namedValues=NamedValues(("high", 1), ("low", 0)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: alarmSensor1.setStatus('current')
alarmSensor2 = MibScalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 2, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 0))).clone(namedValues=NamedValues(("high", 1), ("low", 0)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: alarmSensor2.setStatus('current')
uSensor = MibScalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 2, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 0))).clone(namedValues=NamedValues(("no", 1), ("yes", 0)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: uSensor.setStatus('current')
smart1State = MibScalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 3, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 0, 2))).clone(namedValues=NamedValues(("on", 1), ("off", 0), ("reset", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: smart1State.setStatus('current')
smart2State = MibScalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 3, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 0, 2))).clone(namedValues=NamedValues(("on", 1), ("off", 0), ("reset", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: smart2State.setStatus('current')
smart1ResetTime = MibScalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 3, 5), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: smart1ResetTime.setStatus('current')
smart2ResetTime = MibScalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 3, 6), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: smart2ResetTime.setStatus('current')
alarmSensor1cnt = MibScalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 8, 2, 1), Counter32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: alarmSensor1cnt.setStatus('current')
alarmSensor2cnt = MibScalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 8, 2, 2), Counter32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: alarmSensor2cnt.setStatus('current')
dataType = MibScalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 10, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("integer", 0), ("float", 1), ("ufloat", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: dataType.setStatus('current')
aSense1Alarm = NotificationType((1, 3, 6, 1, 4, 1, 40418, 2, 5, 0, 1))
if mibBuilder.loadTexts: aSense1Alarm.setStatus('current')
aSense1Release = NotificationType((1, 3, 6, 1, 4, 1, 40418, 2, 5, 0, 2))
if mibBuilder.loadTexts: aSense1Release.setStatus('current')
aSense2Alarm = NotificationType((1, 3, 6, 1, 4, 1, 40418, 2, 5, 0, 3))
if mibBuilder.loadTexts: aSense2Alarm.setStatus('current')
aSense2Release = NotificationType((1, 3, 6, 1, 4, 1, 40418, 2, 5, 0, 4))
if mibBuilder.loadTexts: aSense2Release.setStatus('current')
uSenseAlarm = NotificationType((1, 3, 6, 1, 4, 1, 40418, 2, 5, 0, 9))
if mibBuilder.loadTexts: uSenseAlarm.setStatus('current')
uSenseRelease = NotificationType((1, 3, 6, 1, 4, 1, 40418, 2, 5, 0, 10))
if mibBuilder.loadTexts: uSenseRelease.setStatus('current')
smart1ThermoOn = NotificationType((1, 3, 6, 1, 4, 1, 40418, 2, 5, 0, 13))
if mibBuilder.loadTexts: smart1ThermoOn.setStatus('current')
smart1ThermoOff = NotificationType((1, 3, 6, 1, 4, 1, 40418, 2, 5, 0, 14))
if mibBuilder.loadTexts: smart1ThermoOff.setStatus('current')
smart2ThermoOn = NotificationType((1, 3, 6, 1, 4, 1, 40418, 2, 5, 0, 15))
if mibBuilder.loadTexts: smart2ThermoOn.setStatus('current')
smart2ThermoOff = NotificationType((1, 3, 6, 1, 4, 1, 40418, 2, 5, 0, 16))
if mibBuilder.loadTexts: smart2ThermoOff.setStatus('current')
tempSensorAlarm = NotificationType((1, 3, 6, 1, 4, 1, 40418, 2, 5, 0, 29))
if mibBuilder.loadTexts: tempSensorAlarm.setStatus('current')
tempSensorRelease = NotificationType((1, 3, 6, 1, 4, 1, 40418, 2, 5, 0, 30))
if mibBuilder.loadTexts: tempSensorRelease.setStatus('current')
voltSensorAlarm = NotificationType((1, 3, 6, 1, 4, 1, 40418, 2, 5, 0, 31))
if mibBuilder.loadTexts: voltSensorAlarm.setStatus('current')
voltSensorRelease = NotificationType((1, 3, 6, 1, 4, 1, 40418, 2, 5, 0, 32))
if mibBuilder.loadTexts: voltSensorRelease.setStatus('current')
task1Done = NotificationType((1, 3, 6, 1, 4, 1, 40418, 2, 5, 0, 36))
if mibBuilder.loadTexts: task1Done.setStatus('current')
task2Done = NotificationType((1, 3, 6, 1, 4, 1, 40418, 2, 5, 0, 37))
if mibBuilder.loadTexts: task2Done.setStatus('current')
task3Done = NotificationType((1, 3, 6, 1, 4, 1, 40418, 2, 5, 0, 38))
if mibBuilder.loadTexts: task3Done.setStatus('current')
task4Done = NotificationType((1, 3, 6, 1, 4, 1, 40418, 2, 5, 0, 39))
if mibBuilder.loadTexts: task4Done.setStatus('current')
pingLost = NotificationType((1, 3, 6, 1, 4, 1, 40418, 2, 5, 0, 45))
if mibBuilder.loadTexts: pingLost.setStatus('current')
batteryChargeLow = NotificationType((1, 3, 6, 1, 4, 1, 40418, 2, 5, 0, 47))
if mibBuilder.loadTexts: batteryChargeLow.setStatus('current')
erdProMiniTrapGroup = NotificationGroup((1, 3, 6, 1, 4, 1, 40418, 2, 5, 99)).setObjects(("SNR-ERD-PRO-Mini", "aSense1Alarm"), ("SNR-ERD-PRO-Mini", "aSense1Release"), ("SNR-ERD-PRO-Mini", "aSense2Alarm"), ("SNR-ERD-PRO-Mini", "aSense2Release"), ("SNR-ERD-PRO-Mini", "uSenseAlarm"), ("SNR-ERD-PRO-Mini", "uSenseRelease"), ("SNR-ERD-PRO-Mini", "smart1ThermoOn"), ("SNR-ERD-PRO-Mini", "smart1ThermoOff"), ("SNR-ERD-PRO-Mini", "smart2ThermoOn"), ("SNR-ERD-PRO-Mini", "smart2ThermoOff"), ("SNR-ERD-PRO-Mini", "tempSensorAlarm"), ("SNR-ERD-PRO-Mini", "tempSensorRelease"), ("SNR-ERD-PRO-Mini", "voltSensorAlarm"), ("SNR-ERD-PRO-Mini", "voltSensorRelease"), ("SNR-ERD-PRO-Mini", "task1Done"), ("SNR-ERD-PRO-Mini", "task2Done"), ("SNR-ERD-PRO-Mini", "task3Done"), ("SNR-ERD-PRO-Mini", "task4Done"), ("SNR-ERD-PRO-Mini", "pingLost"), ("SNR-ERD-PRO-Mini", "batteryChargeLow"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
erdProMiniTrapGroup = erdProMiniTrapGroup.setStatus('current')
mibBuilder.exportSymbols("SNR-ERD-PRO-Mini", temperatureS2=temperatureS2, voltageS10=voltageS10, snr=snr, temperatureS8=temperatureS8, smart2ThermoOff=smart2ThermoOff, options=options, temperatureS6=temperatureS6, serialS5=serialS5, pingLost=pingLost, smart1ThermoOff=smart1ThermoOff, alarmSensor1=alarmSensor1, temperatureS9=temperatureS9, currentS2=currentS2, currentS6=currentS6, currentS9=currentS9, serialS6=serialS6, temperatureS4=temperatureS4, currentS10=currentS10, sensesstate=sensesstate, task2Done=task2Done, aSense1Alarm=aSense1Alarm, smart1ThermoOn=smart1ThermoOn, voltageS6=voltageS6, serialS1=serialS1, smart1ResetTime=smart1ResetTime, voltageS9=voltageS9, aSense2Release=aSense2Release, alarmSensor2cnt=alarmSensor2cnt, temperatureS1=temperatureS1, uSensor=uSensor, alarmSensor2=alarmSensor2, currentS3=currentS3, voltSensorRelease=voltSensorRelease, batteryChargeLow=batteryChargeLow, voltageS1=voltageS1, smart2State=smart2State, voltageSensor=voltageSensor, serialS2=serialS2, powerSensors=powerSensors, task1Done=task1Done, tempSensorRelease=tempSensorRelease, erdProMiniTrapGroup=erdProMiniTrapGroup, measurements=measurements, smart2ResetTime=smart2ResetTime, tempSensorAlarm=tempSensorAlarm, voltageS2=voltageS2, serialS8=serialS8, currentS1=currentS1, task4Done=task4Done, snrSensors=snrSensors, voltageS5=voltageS5, temperatureS3=temperatureS3, currentS8=currentS8, counters=counters, voltageS8=voltageS8, serialS10=serialS10, temperatureSensors=temperatureSensors, management=management, snr_erd_pro_mini=snr_erd_pro_mini, alarmSensor1cnt=alarmSensor1cnt, PYSNMP_MODULE_ID=snr, snr_erd=snr_erd, aSense2Alarm=aSense2Alarm, serialS4=serialS4, smart2ThermoOn=smart2ThermoOn, alarmSensCnts=alarmSensCnts, voltSensorAlarm=voltSensorAlarm, currentS7=currentS7, voltageS4=voltageS4, serialS3=serialS3, temperatureS7=temperatureS7, temperatureS10=temperatureS10, serialS7=serialS7, currentS5=currentS5, smart1State=smart1State, currentS4=currentS4, aSense1Release=aSense1Release, uSenseRelease=uSenseRelease, voltageS7=voltageS7, temperatureS5=temperatureS5, voltageS3=voltageS3, task3Done=task3Done, uSenseAlarm=uSenseAlarm, erdproMiniTraps=erdproMiniTraps, dataType=dataType, serialS9=serialS9)
| (object_identifier, integer, octet_string) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'Integer', 'OctetString')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_size_constraint, single_value_constraint, constraints_union, value_range_constraint, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueSizeConstraint', 'SingleValueConstraint', 'ConstraintsUnion', 'ValueRangeConstraint', 'ConstraintsIntersection')
(module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup')
(module_identity, notification_type, mib_scalar, mib_table, mib_table_row, mib_table_column, integer32, bits, unsigned32, mib_identifier, object_identity, counter32, iso, time_ticks, counter64, enterprises, ip_address, gauge32) = mibBuilder.importSymbols('SNMPv2-SMI', 'ModuleIdentity', 'NotificationType', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Integer32', 'Bits', 'Unsigned32', 'MibIdentifier', 'ObjectIdentity', 'Counter32', 'iso', 'TimeTicks', 'Counter64', 'enterprises', 'IpAddress', 'Gauge32')
(display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention')
snr = module_identity((1, 3, 6, 1, 4, 1, 40418))
snr.setRevisions(('2015-04-29 12:00',))
if mibBuilder.loadTexts:
snr.setLastUpdated('201504291200Z')
if mibBuilder.loadTexts:
snr.setOrganization('NAG ')
snr_erd = mib_identifier((1, 3, 6, 1, 4, 1, 40418, 2)).setLabel('snr-erd')
snr_erd_pro_mini = mib_identifier((1, 3, 6, 1, 4, 1, 40418, 2, 5)).setLabel('snr-erd-pro-mini')
measurements = mib_identifier((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1))
sensesstate = mib_identifier((1, 3, 6, 1, 4, 1, 40418, 2, 5, 2))
management = mib_identifier((1, 3, 6, 1, 4, 1, 40418, 2, 5, 3))
counters = mib_identifier((1, 3, 6, 1, 4, 1, 40418, 2, 5, 8))
options = mib_identifier((1, 3, 6, 1, 4, 1, 40418, 2, 5, 10))
snr_sensors = mib_identifier((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1))
temperature_sensors = mib_identifier((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 1))
power_sensors = mib_identifier((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 2))
alarm_sens_cnts = mib_identifier((1, 3, 6, 1, 4, 1, 40418, 2, 5, 8, 2))
erdpro_mini_traps = mib_identifier((1, 3, 6, 1, 4, 1, 40418, 2, 5, 0))
voltage_sensor = mib_scalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
voltageSensor.setStatus('current')
serial_s1 = mib_scalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 10), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
serialS1.setStatus('current')
serial_s2 = mib_scalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 11), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
serialS2.setStatus('current')
serial_s3 = mib_scalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 12), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
serialS3.setStatus('current')
serial_s4 = mib_scalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 13), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
serialS4.setStatus('current')
serial_s5 = mib_scalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 14), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
serialS5.setStatus('current')
serial_s6 = mib_scalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 15), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
serialS6.setStatus('current')
serial_s7 = mib_scalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 16), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
serialS7.setStatus('current')
serial_s8 = mib_scalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 17), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
serialS8.setStatus('current')
serial_s9 = mib_scalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 18), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
serialS9.setStatus('current')
serial_s10 = mib_scalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 19), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
serialS10.setStatus('current')
temperature_s1 = mib_scalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
temperatureS1.setStatus('current')
temperature_s2 = mib_scalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 1, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
temperatureS2.setStatus('current')
temperature_s3 = mib_scalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 1, 3), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
temperatureS3.setStatus('current')
temperature_s4 = mib_scalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 1, 4), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
temperatureS4.setStatus('current')
temperature_s5 = mib_scalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 1, 5), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
temperatureS5.setStatus('current')
temperature_s6 = mib_scalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 1, 6), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
temperatureS6.setStatus('current')
temperature_s7 = mib_scalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 1, 7), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
temperatureS7.setStatus('current')
temperature_s8 = mib_scalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 1, 8), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
temperatureS8.setStatus('current')
temperature_s9 = mib_scalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 1, 9), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
temperatureS9.setStatus('current')
temperature_s10 = mib_scalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 1, 10), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
temperatureS10.setStatus('current')
voltage_s1 = mib_scalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 2, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
voltageS1.setStatus('current')
current_s1 = mib_scalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 2, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
currentS1.setStatus('current')
voltage_s2 = mib_scalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 2, 4), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
voltageS2.setStatus('current')
current_s2 = mib_scalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 2, 5), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
currentS2.setStatus('current')
voltage_s3 = mib_scalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 2, 7), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
voltageS3.setStatus('current')
current_s3 = mib_scalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 2, 8), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
currentS3.setStatus('current')
voltage_s4 = mib_scalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 2, 10), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
voltageS4.setStatus('current')
current_s4 = mib_scalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 2, 11), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
currentS4.setStatus('current')
voltage_s5 = mib_scalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 2, 13), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
voltageS5.setStatus('current')
current_s5 = mib_scalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 2, 14), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
currentS5.setStatus('current')
voltage_s6 = mib_scalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 2, 16), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
voltageS6.setStatus('current')
current_s6 = mib_scalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 2, 17), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
currentS6.setStatus('current')
voltage_s7 = mib_scalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 2, 19), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
voltageS7.setStatus('current')
current_s7 = mib_scalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 2, 20), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
currentS7.setStatus('current')
voltage_s8 = mib_scalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 2, 22), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
voltageS8.setStatus('current')
current_s8 = mib_scalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 2, 23), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
currentS8.setStatus('current')
voltage_s9 = mib_scalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 2, 25), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
voltageS9.setStatus('current')
current_s9 = mib_scalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 2, 26), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
currentS9.setStatus('current')
voltage_s10 = mib_scalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 2, 28), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
voltageS10.setStatus('current')
current_s10 = mib_scalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 1, 1, 2, 29), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
currentS10.setStatus('current')
alarm_sensor1 = mib_scalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 2, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 0))).clone(namedValues=named_values(('high', 1), ('low', 0)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alarmSensor1.setStatus('current')
alarm_sensor2 = mib_scalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 2, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 0))).clone(namedValues=named_values(('high', 1), ('low', 0)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alarmSensor2.setStatus('current')
u_sensor = mib_scalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 2, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 0))).clone(namedValues=named_values(('no', 1), ('yes', 0)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
uSensor.setStatus('current')
smart1_state = mib_scalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 3, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 0, 2))).clone(namedValues=named_values(('on', 1), ('off', 0), ('reset', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
smart1State.setStatus('current')
smart2_state = mib_scalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 3, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 0, 2))).clone(namedValues=named_values(('on', 1), ('off', 0), ('reset', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
smart2State.setStatus('current')
smart1_reset_time = mib_scalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 3, 5), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
smart1ResetTime.setStatus('current')
smart2_reset_time = mib_scalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 3, 6), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
smart2ResetTime.setStatus('current')
alarm_sensor1cnt = mib_scalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 8, 2, 1), counter32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
alarmSensor1cnt.setStatus('current')
alarm_sensor2cnt = mib_scalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 8, 2, 2), counter32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
alarmSensor2cnt.setStatus('current')
data_type = mib_scalar((1, 3, 6, 1, 4, 1, 40418, 2, 5, 10, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('integer', 0), ('float', 1), ('ufloat', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
dataType.setStatus('current')
a_sense1_alarm = notification_type((1, 3, 6, 1, 4, 1, 40418, 2, 5, 0, 1))
if mibBuilder.loadTexts:
aSense1Alarm.setStatus('current')
a_sense1_release = notification_type((1, 3, 6, 1, 4, 1, 40418, 2, 5, 0, 2))
if mibBuilder.loadTexts:
aSense1Release.setStatus('current')
a_sense2_alarm = notification_type((1, 3, 6, 1, 4, 1, 40418, 2, 5, 0, 3))
if mibBuilder.loadTexts:
aSense2Alarm.setStatus('current')
a_sense2_release = notification_type((1, 3, 6, 1, 4, 1, 40418, 2, 5, 0, 4))
if mibBuilder.loadTexts:
aSense2Release.setStatus('current')
u_sense_alarm = notification_type((1, 3, 6, 1, 4, 1, 40418, 2, 5, 0, 9))
if mibBuilder.loadTexts:
uSenseAlarm.setStatus('current')
u_sense_release = notification_type((1, 3, 6, 1, 4, 1, 40418, 2, 5, 0, 10))
if mibBuilder.loadTexts:
uSenseRelease.setStatus('current')
smart1_thermo_on = notification_type((1, 3, 6, 1, 4, 1, 40418, 2, 5, 0, 13))
if mibBuilder.loadTexts:
smart1ThermoOn.setStatus('current')
smart1_thermo_off = notification_type((1, 3, 6, 1, 4, 1, 40418, 2, 5, 0, 14))
if mibBuilder.loadTexts:
smart1ThermoOff.setStatus('current')
smart2_thermo_on = notification_type((1, 3, 6, 1, 4, 1, 40418, 2, 5, 0, 15))
if mibBuilder.loadTexts:
smart2ThermoOn.setStatus('current')
smart2_thermo_off = notification_type((1, 3, 6, 1, 4, 1, 40418, 2, 5, 0, 16))
if mibBuilder.loadTexts:
smart2ThermoOff.setStatus('current')
temp_sensor_alarm = notification_type((1, 3, 6, 1, 4, 1, 40418, 2, 5, 0, 29))
if mibBuilder.loadTexts:
tempSensorAlarm.setStatus('current')
temp_sensor_release = notification_type((1, 3, 6, 1, 4, 1, 40418, 2, 5, 0, 30))
if mibBuilder.loadTexts:
tempSensorRelease.setStatus('current')
volt_sensor_alarm = notification_type((1, 3, 6, 1, 4, 1, 40418, 2, 5, 0, 31))
if mibBuilder.loadTexts:
voltSensorAlarm.setStatus('current')
volt_sensor_release = notification_type((1, 3, 6, 1, 4, 1, 40418, 2, 5, 0, 32))
if mibBuilder.loadTexts:
voltSensorRelease.setStatus('current')
task1_done = notification_type((1, 3, 6, 1, 4, 1, 40418, 2, 5, 0, 36))
if mibBuilder.loadTexts:
task1Done.setStatus('current')
task2_done = notification_type((1, 3, 6, 1, 4, 1, 40418, 2, 5, 0, 37))
if mibBuilder.loadTexts:
task2Done.setStatus('current')
task3_done = notification_type((1, 3, 6, 1, 4, 1, 40418, 2, 5, 0, 38))
if mibBuilder.loadTexts:
task3Done.setStatus('current')
task4_done = notification_type((1, 3, 6, 1, 4, 1, 40418, 2, 5, 0, 39))
if mibBuilder.loadTexts:
task4Done.setStatus('current')
ping_lost = notification_type((1, 3, 6, 1, 4, 1, 40418, 2, 5, 0, 45))
if mibBuilder.loadTexts:
pingLost.setStatus('current')
battery_charge_low = notification_type((1, 3, 6, 1, 4, 1, 40418, 2, 5, 0, 47))
if mibBuilder.loadTexts:
batteryChargeLow.setStatus('current')
erd_pro_mini_trap_group = notification_group((1, 3, 6, 1, 4, 1, 40418, 2, 5, 99)).setObjects(('SNR-ERD-PRO-Mini', 'aSense1Alarm'), ('SNR-ERD-PRO-Mini', 'aSense1Release'), ('SNR-ERD-PRO-Mini', 'aSense2Alarm'), ('SNR-ERD-PRO-Mini', 'aSense2Release'), ('SNR-ERD-PRO-Mini', 'uSenseAlarm'), ('SNR-ERD-PRO-Mini', 'uSenseRelease'), ('SNR-ERD-PRO-Mini', 'smart1ThermoOn'), ('SNR-ERD-PRO-Mini', 'smart1ThermoOff'), ('SNR-ERD-PRO-Mini', 'smart2ThermoOn'), ('SNR-ERD-PRO-Mini', 'smart2ThermoOff'), ('SNR-ERD-PRO-Mini', 'tempSensorAlarm'), ('SNR-ERD-PRO-Mini', 'tempSensorRelease'), ('SNR-ERD-PRO-Mini', 'voltSensorAlarm'), ('SNR-ERD-PRO-Mini', 'voltSensorRelease'), ('SNR-ERD-PRO-Mini', 'task1Done'), ('SNR-ERD-PRO-Mini', 'task2Done'), ('SNR-ERD-PRO-Mini', 'task3Done'), ('SNR-ERD-PRO-Mini', 'task4Done'), ('SNR-ERD-PRO-Mini', 'pingLost'), ('SNR-ERD-PRO-Mini', 'batteryChargeLow'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
erd_pro_mini_trap_group = erdProMiniTrapGroup.setStatus('current')
mibBuilder.exportSymbols('SNR-ERD-PRO-Mini', temperatureS2=temperatureS2, voltageS10=voltageS10, snr=snr, temperatureS8=temperatureS8, smart2ThermoOff=smart2ThermoOff, options=options, temperatureS6=temperatureS6, serialS5=serialS5, pingLost=pingLost, smart1ThermoOff=smart1ThermoOff, alarmSensor1=alarmSensor1, temperatureS9=temperatureS9, currentS2=currentS2, currentS6=currentS6, currentS9=currentS9, serialS6=serialS6, temperatureS4=temperatureS4, currentS10=currentS10, sensesstate=sensesstate, task2Done=task2Done, aSense1Alarm=aSense1Alarm, smart1ThermoOn=smart1ThermoOn, voltageS6=voltageS6, serialS1=serialS1, smart1ResetTime=smart1ResetTime, voltageS9=voltageS9, aSense2Release=aSense2Release, alarmSensor2cnt=alarmSensor2cnt, temperatureS1=temperatureS1, uSensor=uSensor, alarmSensor2=alarmSensor2, currentS3=currentS3, voltSensorRelease=voltSensorRelease, batteryChargeLow=batteryChargeLow, voltageS1=voltageS1, smart2State=smart2State, voltageSensor=voltageSensor, serialS2=serialS2, powerSensors=powerSensors, task1Done=task1Done, tempSensorRelease=tempSensorRelease, erdProMiniTrapGroup=erdProMiniTrapGroup, measurements=measurements, smart2ResetTime=smart2ResetTime, tempSensorAlarm=tempSensorAlarm, voltageS2=voltageS2, serialS8=serialS8, currentS1=currentS1, task4Done=task4Done, snrSensors=snrSensors, voltageS5=voltageS5, temperatureS3=temperatureS3, currentS8=currentS8, counters=counters, voltageS8=voltageS8, serialS10=serialS10, temperatureSensors=temperatureSensors, management=management, snr_erd_pro_mini=snr_erd_pro_mini, alarmSensor1cnt=alarmSensor1cnt, PYSNMP_MODULE_ID=snr, snr_erd=snr_erd, aSense2Alarm=aSense2Alarm, serialS4=serialS4, smart2ThermoOn=smart2ThermoOn, alarmSensCnts=alarmSensCnts, voltSensorAlarm=voltSensorAlarm, currentS7=currentS7, voltageS4=voltageS4, serialS3=serialS3, temperatureS7=temperatureS7, temperatureS10=temperatureS10, serialS7=serialS7, currentS5=currentS5, smart1State=smart1State, currentS4=currentS4, aSense1Release=aSense1Release, uSenseRelease=uSenseRelease, voltageS7=voltageS7, temperatureS5=temperatureS5, voltageS3=voltageS3, task3Done=task3Done, uSenseAlarm=uSenseAlarm, erdproMiniTraps=erdproMiniTraps, dataType=dataType, serialS9=serialS9) |
class ComputeRank(object):
def __init__(self, var_name):
self.var_name = var_name
def __call__(self, documents):
for i, document in enumerate(documents, 1):
document[self.var_name] = i
return documents
def test_rank():
plugin = ComputeRank("rank")
docs = [{}, {}]
result = plugin(docs)
doc1, doc2 = result
assert doc1["rank"] == 1
assert doc2["rank"] == 2 | class Computerank(object):
def __init__(self, var_name):
self.var_name = var_name
def __call__(self, documents):
for (i, document) in enumerate(documents, 1):
document[self.var_name] = i
return documents
def test_rank():
plugin = compute_rank('rank')
docs = [{}, {}]
result = plugin(docs)
(doc1, doc2) = result
assert doc1['rank'] == 1
assert doc2['rank'] == 2 |
'''
You are given an array of distinct integers arr and an array of integer arrays pieces, where the integers
in pieces are distinct. Your goal is to form arr by concatenating the arrays in pieces in any order.
However, you are not allowed to reorder the integers in each array pieces[i].
Return true if it is possible to form the array arr from pieces. Otherwise, return false.
Ex. Input - arr : [91,4,64,78], pieces : [[78],[4,64],[91]]
Output - true
Explanation - Concatenate [91] then [4,64] then [78]
Input - arr : [49,18,16], pieces : [[16,18,49]]
Output - false
Explanation - Even though the numbers match, we cannot reorder pieces[0].
Constraints -
1 <= pieces.length <= arr.length <= 100
sum(pieces[i].length) == arr.length
1 <= pieces[i].length <= arr.length
1 <= arr[i], pieces[i][j] <= 100
Solution Complexity -
Time : O(m + n); m = pieces.length, n = arr.length
Space : O(m)
'''
def canFormArray(arr, pieces):
indexing = {}
for i in pieces:
indexing[i[0]] = i
i = 0
while i < len(arr):
try:
tmp = indexing[arr[i]]
for ele in tmp:
if ele == arr[i]:
i += 1
else:
return False
except KeyError:
return False
return True
if __name__ == '__main__':
size = input().split()
arr = input().split()
pieces = []
for _ in range(int(size[1])):
pieces.append(input().split())
print(canFormArray(arr, pieces))
| """
You are given an array of distinct integers arr and an array of integer arrays pieces, where the integers
in pieces are distinct. Your goal is to form arr by concatenating the arrays in pieces in any order.
However, you are not allowed to reorder the integers in each array pieces[i].
Return true if it is possible to form the array arr from pieces. Otherwise, return false.
Ex. Input - arr : [91,4,64,78], pieces : [[78],[4,64],[91]]
Output - true
Explanation - Concatenate [91] then [4,64] then [78]
Input - arr : [49,18,16], pieces : [[16,18,49]]
Output - false
Explanation - Even though the numbers match, we cannot reorder pieces[0].
Constraints -
1 <= pieces.length <= arr.length <= 100
sum(pieces[i].length) == arr.length
1 <= pieces[i].length <= arr.length
1 <= arr[i], pieces[i][j] <= 100
Solution Complexity -
Time : O(m + n); m = pieces.length, n = arr.length
Space : O(m)
"""
def can_form_array(arr, pieces):
indexing = {}
for i in pieces:
indexing[i[0]] = i
i = 0
while i < len(arr):
try:
tmp = indexing[arr[i]]
for ele in tmp:
if ele == arr[i]:
i += 1
else:
return False
except KeyError:
return False
return True
if __name__ == '__main__':
size = input().split()
arr = input().split()
pieces = []
for _ in range(int(size[1])):
pieces.append(input().split())
print(can_form_array(arr, pieces)) |
ENTITY = "<<Entity>>"
REL = 'Rel/'
ATTR = 'Attr/'
SOME = 'SOME'
ALL = 'ALL'
GRAPH = 'GRAPH'
LIST = 'LIST'
TEXT = 'TEXT'
SHAPE = 'SHAPE'
SOME_LIMIT = 15
EXACT_MATCH = 'EXACT_MATCH'
REGEX_MATCH = 'REGEX_MATCH'
SYNONYM_MATCH = 'SYNONYM_MATCH' | entity = '<<Entity>>'
rel = 'Rel/'
attr = 'Attr/'
some = 'SOME'
all = 'ALL'
graph = 'GRAPH'
list = 'LIST'
text = 'TEXT'
shape = 'SHAPE'
some_limit = 15
exact_match = 'EXACT_MATCH'
regex_match = 'REGEX_MATCH'
synonym_match = 'SYNONYM_MATCH' |
def calculate(arr, index=0):
back = - 1 - index
if arr[index] != arr[back]:
return False
elif abs(back) == (index+1):
return True
return calculate(arr, index+1)
arr = [int(i) for i in input().split()]
print(calculate(arr))
| def calculate(arr, index=0):
back = -1 - index
if arr[index] != arr[back]:
return False
elif abs(back) == index + 1:
return True
return calculate(arr, index + 1)
arr = [int(i) for i in input().split()]
print(calculate(arr)) |
class IberException(Exception):
pass
class ResponseException(IberException):
def __init__(self, status_code):
super().__init__("Response error, code: {}".format(status_code))
class LoginException(IberException):
def __init__(self, username):
super().__init__(f'Unable to log in with user {username}')
class SessionException(IberException):
def __init__(self):
super().__init__('Session required, use login() method to obtain a session')
class NoResponseException(IberException):
pass
class SelectContractException(IberException):
pass
| class Iberexception(Exception):
pass
class Responseexception(IberException):
def __init__(self, status_code):
super().__init__('Response error, code: {}'.format(status_code))
class Loginexception(IberException):
def __init__(self, username):
super().__init__(f'Unable to log in with user {username}')
class Sessionexception(IberException):
def __init__(self):
super().__init__('Session required, use login() method to obtain a session')
class Noresponseexception(IberException):
pass
class Selectcontractexception(IberException):
pass |
v = 6.0 # velocity of seismic waves [km/s]
def earthquake_epicenter(x1, y1, t1, x2, y2, t2, x3, y3, t3):
x = 0
y = 0
# Your code goes here!
return x, y
| v = 6.0
def earthquake_epicenter(x1, y1, t1, x2, y2, t2, x3, y3, t3):
x = 0
y = 0
return (x, y) |
class Logi:
def __init__(self, email, password):
self.email = email
self.password = password
| class Logi:
def __init__(self, email, password):
self.email = email
self.password = password |
requestDict = {
'instances':
[
{
"Lat": 37.4434774, "Long": -122.1652269,
"Altitude": 21.0, "Date_": "7/4/17",
"Time_": "23:37:25", "dt_": "7/4/17 23:37"
#driving meet conjestion
},
{
"Lat": 37.429302, "Long": -122.16145,
"Altitude": 20.0, "Date_": "7/4/17",
"Time_": "09:37:25", "dt_": "7/4/17 09:37"
#driving meet conjestion
}
]
} | request_dict = {'instances': [{'Lat': 37.4434774, 'Long': -122.1652269, 'Altitude': 21.0, 'Date_': '7/4/17', 'Time_': '23:37:25', 'dt_': '7/4/17 23:37'}, {'Lat': 37.429302, 'Long': -122.16145, 'Altitude': 20.0, 'Date_': '7/4/17', 'Time_': '09:37:25', 'dt_': '7/4/17 09:37'}]} |
#!/usr/local/bin/python3
class Object(object):
def __init__(self, id):
self.id = id
self.children = []
self.parent = None
root = Object("COM")
objects = {"COM": root}
def get_object(id):
if id not in objects:
objects[id] = Object(id)
return objects[id]
with open("input.txt") as f:
for line in f.readlines():
parent, child = map(get_object, line.strip().split(")"))
parent.children.append(child)
child.parent = parent
def get_path(node):
path = []
while node:
path.insert(0, node)
node = node.parent
return path
you_path = get_path(objects["YOU"])
santa_path = get_path(objects["SAN"])
for common_ancestor_index in range(min(len(you_path), len(santa_path))):
you_node = you_path[common_ancestor_index]
santa_node = santa_path[common_ancestor_index]
if you_node != santa_node:
break
print("transfers: %d" % (len(you_path) + len(santa_path) - 2 * (common_ancestor_index + 1)))
| class Object(object):
def __init__(self, id):
self.id = id
self.children = []
self.parent = None
root = object('COM')
objects = {'COM': root}
def get_object(id):
if id not in objects:
objects[id] = object(id)
return objects[id]
with open('input.txt') as f:
for line in f.readlines():
(parent, child) = map(get_object, line.strip().split(')'))
parent.children.append(child)
child.parent = parent
def get_path(node):
path = []
while node:
path.insert(0, node)
node = node.parent
return path
you_path = get_path(objects['YOU'])
santa_path = get_path(objects['SAN'])
for common_ancestor_index in range(min(len(you_path), len(santa_path))):
you_node = you_path[common_ancestor_index]
santa_node = santa_path[common_ancestor_index]
if you_node != santa_node:
break
print('transfers: %d' % (len(you_path) + len(santa_path) - 2 * (common_ancestor_index + 1))) |
def fizzbuzz(num):
if (num >= 0 and num % 3 == 0 and num % 5 == 0):
return "Fizz Buzz"
if (num >= 0 and num % 3 == 0):
return "Fizz"
if (num >= 0 and num % 5 == 0):
return "Buzz"
if (num >= 0):
return ""
| def fizzbuzz(num):
if num >= 0 and num % 3 == 0 and (num % 5 == 0):
return 'Fizz Buzz'
if num >= 0 and num % 3 == 0:
return 'Fizz'
if num >= 0 and num % 5 == 0:
return 'Buzz'
if num >= 0:
return '' |
dataset_paths = {
'ffhq': '',
'celeba_test': '',
'cars_train': '',
'cars_test': '',
'church_train': '',
'church_test': '',
'horse_train': '',
'horse_test': '',
'afhq_wild_train': '',
'afhq_wild_test': '',
'font_train': '/mnt/data01/AWS_S3_CONTAINER/personnel-records/1956/seg/firm/stylegan2_crops/pr',
'font_test': '/mnt/data01/AWS_S3_CONTAINER/personnel-records/1956/seg/firm/stylegan2_crops_sample/pr',
'font_gs_train': '/mnt/data01/AWS_S3_CONTAINER/personnel-records/1956/seg/firm/stylegan2_crops_grayscale/pr',
'font_gs_test': '/mnt/data01/AWS_S3_CONTAINER/personnel-records/1956/seg/firm/stylegan2_crops_grayscale_sample/pr',
'font_train_modern': '/mnt/data02/Japan/font_gen/paired_training_data/pr/labeled_validated_rendered_chars',
'font_test_modern': '/mnt/data02/Japan/font_gen/paired_training_data/pr/rendered_chars_for_overfitting',
'font_train_historical': '/mnt/data02/Japan/font_gen/paired_training_data/pr/labeled_validated_char_crops',
'font_test_historical': '/mnt/data02/Japan/font_gen/paired_training_data/pr/char_crops_for_overfitting',
}
model_paths = {
'ir_se50': 'pretrained_models/model_ir_se50.pth',
'resnet34': '/mnt/workspace/pretrained_models/resnet34-333f7ec4.pth',
'stylegan_ffhq': 'pretrained_models/stylegan2-ffhq-config-f.pt',
'stylegan_cars': 'pretrained_models/stylegan2-car-config-f.pt',
'stylegan_church': 'pretrained_models/stylegan2-church-config-f.pt',
'stylegan_horse': 'pretrained_models/stylegan2-horse-config-f.pt',
'stylegan_ada_wild': 'pretrained_models/afhqwild.pt',
'stylegan_toonify': 'pretrained_models/ffhq_cartoon_blended.pt',
'shape_predictor': 'pretrained_models/shape_predictor_68_face_landmarks.dat',
'circular_face': 'pretrained_models/CurricularFace_Backbone.pth',
'mtcnn_pnet': 'pretrained_models/mtcnn/pnet.npy',
'mtcnn_rnet': 'pretrained_models/mtcnn/rnet.npy',
'mtcnn_onet': 'pretrained_models/mtcnn/onet.npy',
'moco': '/mnt/workspace/pretrained_models/moco_v2_800ep_pretrain.pt'
}
| dataset_paths = {'ffhq': '', 'celeba_test': '', 'cars_train': '', 'cars_test': '', 'church_train': '', 'church_test': '', 'horse_train': '', 'horse_test': '', 'afhq_wild_train': '', 'afhq_wild_test': '', 'font_train': '/mnt/data01/AWS_S3_CONTAINER/personnel-records/1956/seg/firm/stylegan2_crops/pr', 'font_test': '/mnt/data01/AWS_S3_CONTAINER/personnel-records/1956/seg/firm/stylegan2_crops_sample/pr', 'font_gs_train': '/mnt/data01/AWS_S3_CONTAINER/personnel-records/1956/seg/firm/stylegan2_crops_grayscale/pr', 'font_gs_test': '/mnt/data01/AWS_S3_CONTAINER/personnel-records/1956/seg/firm/stylegan2_crops_grayscale_sample/pr', 'font_train_modern': '/mnt/data02/Japan/font_gen/paired_training_data/pr/labeled_validated_rendered_chars', 'font_test_modern': '/mnt/data02/Japan/font_gen/paired_training_data/pr/rendered_chars_for_overfitting', 'font_train_historical': '/mnt/data02/Japan/font_gen/paired_training_data/pr/labeled_validated_char_crops', 'font_test_historical': '/mnt/data02/Japan/font_gen/paired_training_data/pr/char_crops_for_overfitting'}
model_paths = {'ir_se50': 'pretrained_models/model_ir_se50.pth', 'resnet34': '/mnt/workspace/pretrained_models/resnet34-333f7ec4.pth', 'stylegan_ffhq': 'pretrained_models/stylegan2-ffhq-config-f.pt', 'stylegan_cars': 'pretrained_models/stylegan2-car-config-f.pt', 'stylegan_church': 'pretrained_models/stylegan2-church-config-f.pt', 'stylegan_horse': 'pretrained_models/stylegan2-horse-config-f.pt', 'stylegan_ada_wild': 'pretrained_models/afhqwild.pt', 'stylegan_toonify': 'pretrained_models/ffhq_cartoon_blended.pt', 'shape_predictor': 'pretrained_models/shape_predictor_68_face_landmarks.dat', 'circular_face': 'pretrained_models/CurricularFace_Backbone.pth', 'mtcnn_pnet': 'pretrained_models/mtcnn/pnet.npy', 'mtcnn_rnet': 'pretrained_models/mtcnn/rnet.npy', 'mtcnn_onet': 'pretrained_models/mtcnn/onet.npy', 'moco': '/mnt/workspace/pretrained_models/moco_v2_800ep_pretrain.pt'} |
def v(kod):
if (k == len(kod)):
print(' '.join(kod))
return
if (len(kod) != 0):
for i in range(int(kod[-1]) + 1, n + 1):
if (str(i) not in kod):
gg = kod.copy()
gg.append(str(i))
v(gg)
else:
for i in range(1, n + 1):
gg = kod.copy()
gg.append(str(i))
v(gg)
n, k = map(int, input().split())
v([])
| def v(kod):
if k == len(kod):
print(' '.join(kod))
return
if len(kod) != 0:
for i in range(int(kod[-1]) + 1, n + 1):
if str(i) not in kod:
gg = kod.copy()
gg.append(str(i))
v(gg)
else:
for i in range(1, n + 1):
gg = kod.copy()
gg.append(str(i))
v(gg)
(n, k) = map(int, input().split())
v([]) |
'''
(0-1 Knapsack) example
The example solves the 0/1 Knapsack Problem:
how we get the maximum value, given our knapsack just can hold a maximum weight of w,
while the value of the i-th item is a1[i], and the weight of the i-th item is a2[i]?
i = total item
w = total weigh of knapsack can carry
'''
# a1: item value
a1 = [100, 70, 50, 10]
# a2: item weight
a2 = [10, 4, 6, 12]
def knapsack01(items, weight):
if (w == 0) or (i < 0):
return 0
elif (a2[i] > w):
return knapsack01(i-1, w)
else:
return max(a1[i] + knapsack01(i-1, w-a2[i], knapsack01(i-1, w)))
if __name__ == "__main__":
i = 3
w = 12
print (knapsack01(items=i, weight=w)) | """
(0-1 Knapsack) example
The example solves the 0/1 Knapsack Problem:
how we get the maximum value, given our knapsack just can hold a maximum weight of w,
while the value of the i-th item is a1[i], and the weight of the i-th item is a2[i]?
i = total item
w = total weigh of knapsack can carry
"""
a1 = [100, 70, 50, 10]
a2 = [10, 4, 6, 12]
def knapsack01(items, weight):
if w == 0 or i < 0:
return 0
elif a2[i] > w:
return knapsack01(i - 1, w)
else:
return max(a1[i] + knapsack01(i - 1, w - a2[i], knapsack01(i - 1, w)))
if __name__ == '__main__':
i = 3
w = 12
print(knapsack01(items=i, weight=w)) |
administrator_user_id = 403569083402158090
reaction_message_ids = [832010993542365184, 573059396259807232]
current_year = 2021
| administrator_user_id = 403569083402158090
reaction_message_ids = [832010993542365184, 573059396259807232]
current_year = 2021 |
class NoneTypeFont(Exception):
pass
class PortraitBoolError(Exception):
pass
class NoneStringObject(Exception):
pass
class BMPvalidationError(Exception):
pass
| class Nonetypefont(Exception):
pass
class Portraitboolerror(Exception):
pass
class Nonestringobject(Exception):
pass
class Bmpvalidationerror(Exception):
pass |
default_values = {
'mode': 'train',
'net': 'resnet32_cifar',
'device': 'cuda:0',
'num_epochs': 300,
'activation_type': 'deepBspline_explicit_linear',
'spline_init': 'leaky_relu',
'spline_size': 51,
'spline_range': 4,
'save_memory': False,
'knot_threshold': 0.,
'num_hidden_layers': 2,
'num_hidden_neurons': 4,
'lipschitz': False,
'lmbda': 1e-4,
'optimizer': ['SGD', 'Adam'],
'lr': 1e-1,
'aux_lr': 1e-3,
'weight_decay': 5e-4,
'gamma': 0.1,
'milestones': [150, 225, 262],
'log_dir': './ckpt',
'model_name': 'deepspline',
'resume': False,
'resume_from_best': False,
'ckpt_filename': None,
'ckpt_nmax_files': 3, # max number of saved *_net_*.ckpt
# checkpoint files at a time. Set to -1 if not restricted. '
'log_step': None,
'valid_log_step': None,
'seed': (-1),
'test_as_valid': False,
'dataset_name': 'cifar10',
'data_dir': './data',
'batch_size': 128,
# Number of subprocesses to use for data loading.
'num_workers': 4,
'plot_imgs': False,
'save_imgs': False,
'verbose': False,
'additional_info': [],
'num_classes': None
}
# This tree defines the strcuture of self.params in the Project() class.
# if it is desired to keep an entry in the first level that is also a
# leaf of deeper levels of the structure, this entry should be added to
# the first level too (e.g. as done for 'log_dir')
structure = {
'log_dir': None,
'model_name': None,
'verbose': None,
'net': None,
'knot_threshold': None,
'dataset': {
'dataset_name': None,
'log_dir': None,
'model_name': None,
'plot_imgs': None,
'save_imgs': None,
},
'dataloader': {
'data_dir': None,
'batch_size': None,
'num_workers': None,
'test_as_valid': None,
'seed': None
},
'model': {
'activation_type': None,
'spline_init': None,
'spline_size': None,
'spline_range': None,
'save_memory': None,
'knot_threshold': None,
'num_hidden_layers': None,
'num_hidden_neurons': None,
'net': None,
'verbose': None
}
}
| default_values = {'mode': 'train', 'net': 'resnet32_cifar', 'device': 'cuda:0', 'num_epochs': 300, 'activation_type': 'deepBspline_explicit_linear', 'spline_init': 'leaky_relu', 'spline_size': 51, 'spline_range': 4, 'save_memory': False, 'knot_threshold': 0.0, 'num_hidden_layers': 2, 'num_hidden_neurons': 4, 'lipschitz': False, 'lmbda': 0.0001, 'optimizer': ['SGD', 'Adam'], 'lr': 0.1, 'aux_lr': 0.001, 'weight_decay': 0.0005, 'gamma': 0.1, 'milestones': [150, 225, 262], 'log_dir': './ckpt', 'model_name': 'deepspline', 'resume': False, 'resume_from_best': False, 'ckpt_filename': None, 'ckpt_nmax_files': 3, 'log_step': None, 'valid_log_step': None, 'seed': -1, 'test_as_valid': False, 'dataset_name': 'cifar10', 'data_dir': './data', 'batch_size': 128, 'num_workers': 4, 'plot_imgs': False, 'save_imgs': False, 'verbose': False, 'additional_info': [], 'num_classes': None}
structure = {'log_dir': None, 'model_name': None, 'verbose': None, 'net': None, 'knot_threshold': None, 'dataset': {'dataset_name': None, 'log_dir': None, 'model_name': None, 'plot_imgs': None, 'save_imgs': None}, 'dataloader': {'data_dir': None, 'batch_size': None, 'num_workers': None, 'test_as_valid': None, 'seed': None}, 'model': {'activation_type': None, 'spline_init': None, 'spline_size': None, 'spline_range': None, 'save_memory': None, 'knot_threshold': None, 'num_hidden_layers': None, 'num_hidden_neurons': None, 'net': None, 'verbose': None}} |
NONE = u'none'
OTHER = u'other'
PRIMARY = u'primary'
JUNIOR_SECONDARY = u'junior_secondary'
SECONDARY = u'secondary'
ASSOCIATES = u'associates'
BACHELORS = u'bachelors'
MASTERS = u'masters'
DOCTORATE = u'doctorate'
| none = u'none'
other = u'other'
primary = u'primary'
junior_secondary = u'junior_secondary'
secondary = u'secondary'
associates = u'associates'
bachelors = u'bachelors'
masters = u'masters'
doctorate = u'doctorate' |
class SteepshotBotError(Exception):
msg = {}
def get_msg(self, locale: str = 'en') -> str:
return self.msg.get(locale, self.msg.get('en', 'Some error occurred: ')) + str(self)
class SteepshotServerError(SteepshotBotError):
msg = {
'en': 'Some Steepshot error occurred: '
}
class SteemError(SteepshotBotError):
msg = {
'en': 'Some Steem error occurred: '
}
class PostNotFound(SteepshotBotError):
msg = {
'en': 'This post was not found: '
}
class VotedSimilarily(SteepshotBotError):
msg = {
'en': 'You have already voted in a similar way: '
}
| class Steepshotboterror(Exception):
msg = {}
def get_msg(self, locale: str='en') -> str:
return self.msg.get(locale, self.msg.get('en', 'Some error occurred: ')) + str(self)
class Steepshotservererror(SteepshotBotError):
msg = {'en': 'Some Steepshot error occurred: '}
class Steemerror(SteepshotBotError):
msg = {'en': 'Some Steem error occurred: '}
class Postnotfound(SteepshotBotError):
msg = {'en': 'This post was not found: '}
class Votedsimilarily(SteepshotBotError):
msg = {'en': 'You have already voted in a similar way: '} |
class Instrument:
insId: int
name: str
urlName: str
instrument: int
isin: str
ticker: str
yahoo: str
sectorId: int
marketId: int
branchId: int
countryId: int
listingDate: str
def __init__(self, insId, name, urlName, instrument, isin, ticker, yahoo, sectorId, marketId, branchId, countryId,
listingDate):
self.insId = insId
self.name = name
self.urlName = urlName
self.instrument = instrument
self.isin = isin
self.ticker = ticker
self.yahoo = yahoo
self.sectorId = sectorId
self.marketId = marketId
self.branchId = branchId
self.countryId = countryId
self.listingDate = listingDate
def __str__(self):
return '{}: {}'.format(self.insId, self.name)
def __repr__(self):
return '{}: {}'.format(self.insId, self.name)
| class Instrument:
ins_id: int
name: str
url_name: str
instrument: int
isin: str
ticker: str
yahoo: str
sector_id: int
market_id: int
branch_id: int
country_id: int
listing_date: str
def __init__(self, insId, name, urlName, instrument, isin, ticker, yahoo, sectorId, marketId, branchId, countryId, listingDate):
self.insId = insId
self.name = name
self.urlName = urlName
self.instrument = instrument
self.isin = isin
self.ticker = ticker
self.yahoo = yahoo
self.sectorId = sectorId
self.marketId = marketId
self.branchId = branchId
self.countryId = countryId
self.listingDate = listingDate
def __str__(self):
return '{}: {}'.format(self.insId, self.name)
def __repr__(self):
return '{}: {}'.format(self.insId, self.name) |
num = int(input("Enter a number: "))
iter_num = 0
pwr = 0
if num == 0:
root = 0
else:
root = 1
while root**pwr != num and root < num:
while pwr < 6:
iter_num += 1
if root**pwr == num:
print(root, "^", pwr, sep="")
break
pwr += 1
if root**pwr == num:
break
else:
pwr = 0
root += 1
if root**pwr != num:
print("Not found")
print("Iterations:", iter_num) | num = int(input('Enter a number: '))
iter_num = 0
pwr = 0
if num == 0:
root = 0
else:
root = 1
while root ** pwr != num and root < num:
while pwr < 6:
iter_num += 1
if root ** pwr == num:
print(root, '^', pwr, sep='')
break
pwr += 1
if root ** pwr == num:
break
else:
pwr = 0
root += 1
if root ** pwr != num:
print('Not found')
print('Iterations:', iter_num) |
expected_output = {
"route-information": {
"route-table": {
"active-route-count": "1250009",
"destination-count": "1250009",
"hidden-route-count": "0",
"holddown-route-count": "0",
"rt": {
"rt-announced-count": "1",
"rt-destination": "10.55.0.0",
"rt-entry": {
"active-tag": "*",
"age": {"#text": "4:32"},
"announce-bits": "2",
"announce-tasks": "0-KRT 1-BGP_RT_Background",
"as-path": "AS path:2 I",
"bgp-path-attributes": {
"attr-as-path-effective": {
"aspath-effective-string": "AS path:",
"attr-value": "2 I",
}
},
"bgp-rt-flag": "Accepted",
"gateway": "10.30.0.2",
"local-as": "1",
"local-preference": "100",
"nh": {
"nh-string": "Next hop",
"session": "0xf44",
"to": "10.30.0.2",
"via": "ge-0/0/2.0",
},
"nh-address": "0x17b226b4",
"nh-index": "605",
"nh-reference-count": "800002",
"nh-type": "Router",
"peer-as": "2",
"peer-id": "192.168.19.1",
"preference": "170",
"preference2": "101",
"protocol-name": "BGP",
"rt-entry-state": "Active Ext",
"task-name": "BGP_10.144.30.0.2",
"validation-state": "unverified",
},
"rt-entry-count": {"#text": "1"},
"rt-prefix-length": "32",
"tsi": {"#text": "KRT in-kernel 10.55.0.0/32 -> {10.30.0.2}"},
},
"table-name": "inet.0",
"total-route-count": "1250009",
}
}
}
| expected_output = {'route-information': {'route-table': {'active-route-count': '1250009', 'destination-count': '1250009', 'hidden-route-count': '0', 'holddown-route-count': '0', 'rt': {'rt-announced-count': '1', 'rt-destination': '10.55.0.0', 'rt-entry': {'active-tag': '*', 'age': {'#text': '4:32'}, 'announce-bits': '2', 'announce-tasks': '0-KRT 1-BGP_RT_Background', 'as-path': 'AS path:2 I', 'bgp-path-attributes': {'attr-as-path-effective': {'aspath-effective-string': 'AS path:', 'attr-value': '2 I'}}, 'bgp-rt-flag': 'Accepted', 'gateway': '10.30.0.2', 'local-as': '1', 'local-preference': '100', 'nh': {'nh-string': 'Next hop', 'session': '0xf44', 'to': '10.30.0.2', 'via': 'ge-0/0/2.0'}, 'nh-address': '0x17b226b4', 'nh-index': '605', 'nh-reference-count': '800002', 'nh-type': 'Router', 'peer-as': '2', 'peer-id': '192.168.19.1', 'preference': '170', 'preference2': '101', 'protocol-name': 'BGP', 'rt-entry-state': 'Active Ext', 'task-name': 'BGP_10.144.30.0.2', 'validation-state': 'unverified'}, 'rt-entry-count': {'#text': '1'}, 'rt-prefix-length': '32', 'tsi': {'#text': 'KRT in-kernel 10.55.0.0/32 -> {10.30.0.2}'}}, 'table-name': 'inet.0', 'total-route-count': '1250009'}}} |
SERVER_EMAIL = 'SERVER_EMAIL'
SERVER_PASSWORD = 'SERVER_PASSWORD'
WATCHED = {
'service': ['service'],
'process': ['process'],
}
NOTIFICATION_DETAILS = {
'service': [
{
'identifiers': ['identifiers'],
'to_emails': ['nimesh.aug11@gmail.com'],
'subject': 'subject',
'body': 'body'
},
],
'process': [
{
'identifiers': ['identifiers'],
'to_emails': ['nimesh.aug11@gmail.com'],
'subject': 'subject',
'body': 'body'
},
]
}
| server_email = 'SERVER_EMAIL'
server_password = 'SERVER_PASSWORD'
watched = {'service': ['service'], 'process': ['process']}
notification_details = {'service': [{'identifiers': ['identifiers'], 'to_emails': ['nimesh.aug11@gmail.com'], 'subject': 'subject', 'body': 'body'}], 'process': [{'identifiers': ['identifiers'], 'to_emails': ['nimesh.aug11@gmail.com'], 'subject': 'subject', 'body': 'body'}]} |
print("HelloWorld")
print(len("HelloWorld"))
a_string = "Hello"
b_string = "World"
print("a_string + b_string: ", a_string+b_string)
c_string = "abcdefghijklmnopqrstuvwxyz"
print("num of letters from a to z", len(c_string))
print(c_string[:3]) #abc
print(c_string[23:]) #xyz
#step count reverse
print(c_string[::-1])
#step count forward
print(c_string[::2])
print(c_string.upper())
print(c_string.split('l'))
#string formatting
userName = "San"
color = "blue"
print(f"{userName}'s fav color is {color}")
print("{}'s fav color is {}".format(userName, color)) | print('HelloWorld')
print(len('HelloWorld'))
a_string = 'Hello'
b_string = 'World'
print('a_string + b_string: ', a_string + b_string)
c_string = 'abcdefghijklmnopqrstuvwxyz'
print('num of letters from a to z', len(c_string))
print(c_string[:3])
print(c_string[23:])
print(c_string[::-1])
print(c_string[::2])
print(c_string.upper())
print(c_string.split('l'))
user_name = 'San'
color = 'blue'
print(f"{userName}'s fav color is {color}")
print("{}'s fav color is {}".format(userName, color)) |
def substituter(seq, substitutions):
for item in seq:
if item in substitutions:
yield substitutions[item]
else:
yield item
| def substituter(seq, substitutions):
for item in seq:
if item in substitutions:
yield substitutions[item]
else:
yield item |
a = input()
b = input()
ans = 0
while True:
s = a.find(b)
if s < 0:
break
ans += 1
a = a[s+len(b):]
print(ans)
| a = input()
b = input()
ans = 0
while True:
s = a.find(b)
if s < 0:
break
ans += 1
a = a[s + len(b):]
print(ans) |
# Lecture 5, Problem 9
def semordnilapWrapper(str1, str2):
# A single-length string cannot be semordnilap.
if len(str1) == 1 or len(str2) == 1:
return False
# Equal strings cannot be semordnilap.
if str1 == str2:
return False
return semordnilap(str1, str2)
def semordnilap(str1, str2):
'''
str1: a string
str2: a string
returns: True if str1 and str2 are semordnilap;
False otherwise.
'''
if len(str1) != len(str2):
return False
elif len(str1) == 0 or len(str2) == 0:
return True
elif len(str1) == 0 and len(str2) == 0:
return False
elif str1[0] != str2[-1]:
return False
return semordnilap(str1[1:], str2[:-1]) | def semordnilap_wrapper(str1, str2):
if len(str1) == 1 or len(str2) == 1:
return False
if str1 == str2:
return False
return semordnilap(str1, str2)
def semordnilap(str1, str2):
"""
str1: a string
str2: a string
returns: True if str1 and str2 are semordnilap;
False otherwise.
"""
if len(str1) != len(str2):
return False
elif len(str1) == 0 or len(str2) == 0:
return True
elif len(str1) == 0 and len(str2) == 0:
return False
elif str1[0] != str2[-1]:
return False
return semordnilap(str1[1:], str2[:-1]) |
#!/usr/bin/env python
# Monitoring the Mem usage of a Sonicwall
# Herward Cooper <coops@fawk.eu> - 2012
# Uses OID 1.3.6.1.4.1.8741.1.3.1.4.0
sonicwall_mem_default_values = (35, 40)
def inventory_sonicwall_mem(checkname, info):
inventory=[]
inventory.append( (None, None, "sonicwall_mem_default_values") )
return inventory
def check_sonicwall_mem(item, params, info):
warn, crit = params
state = int(info[0][0])
perfdata = [ ( "cpu", state, warn, crit ) ]
if state > crit:
return (2, "CRITICAL - Mem is %s percent" % state, perfdata)
elif state > warn:
return (1, "WARNING - Mem is %s percent" % state, perfdata)
else:
return (0, "OK - Mem is %s percent" % state, perfdata)
check_info["sonicwall_mem"] = (check_sonicwall_mem, "Sonicwall Mem", 1, inventory_sonicwall_mem)
snmp_info["sonicwall_mem"] = ( ".1.3.6.1.4.1.8741.1.3.1.4", [ "0" ] )
| sonicwall_mem_default_values = (35, 40)
def inventory_sonicwall_mem(checkname, info):
inventory = []
inventory.append((None, None, 'sonicwall_mem_default_values'))
return inventory
def check_sonicwall_mem(item, params, info):
(warn, crit) = params
state = int(info[0][0])
perfdata = [('cpu', state, warn, crit)]
if state > crit:
return (2, 'CRITICAL - Mem is %s percent' % state, perfdata)
elif state > warn:
return (1, 'WARNING - Mem is %s percent' % state, perfdata)
else:
return (0, 'OK - Mem is %s percent' % state, perfdata)
check_info['sonicwall_mem'] = (check_sonicwall_mem, 'Sonicwall Mem', 1, inventory_sonicwall_mem)
snmp_info['sonicwall_mem'] = ('.1.3.6.1.4.1.8741.1.3.1.4', ['0']) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.