content stringlengths 7 1.05M | fixed_cases stringlengths 1 1.28M |
|---|---|
#!/usr/bin/env python
with open('net.vh', 'w') as f:
num_col = 9
num_row = 12
f.write('module net(y, a);\n')
f.write(' output [{0}:0] y;\n'.format(num_row - 1))
f.write(' input [{0}:0] a;\n\n'.format(num_col * 4 + num_row - 1))
for i in range(1, num_col):
for j in range(0, num_row):
f.write(' wire n{0}{1};\n'.format(i, j))
f.write('\n')
for i in range(0, num_row):
if i % 2:
f.write(' NEURON0 nrn0{0}(\n'.format(i))
else:
f.write(' NEUROS0 nrs0{0}(\n'.format(i))
f.write(' .Y0(y[{0}]),\n'.format(i))
if i == 0:
for j in range(0, 2):
f.write(' .A{0}0(a[{0}]),\n'.format(j))
for j in range(0, 2):
f.write(' .A{0}0(n1{1}),\n'.format(j + 2, j))
f.write(' .A40(y[1]));\n')
elif i == num_row - 1:
f.write(' .A00(y[{0}]),\n'.format(num_row - 2))
for j in range(0, 2):
f.write(' .A{0}0(n1{1}),\n'.format(j + 1, num_row + j - 2))
f.write(' .A30(a[{0}]),\n'.format(num_col * 4 + num_row - 2))
f.write(' .A40(a[{0}]));\n'.format(num_col * 4 + num_row - 1))
else:
f.write(' .A00(y[{0}]),\n'.format(i - 1))
for j in range(0, 3):
f.write(' .A{0}0(n1{1}),\n'.format(j + 1, i + j - 1))
f.write(' .A40(y[{0}]));\n'.format(i + 1))
for i in range(0, num_col - 2):
for j in range(0, num_row):
if j % 2:
f.write(' NEURON0 nrn{0}{1}(\n'.format(i + 1, j))
else:
f.write(' NEUROS0 nrs{0}{1}(\n'.format(i + 1, j))
f.write(' .Y0(n{0}{1}),\n'.format(i + 1, j))
if j == 0:
for k in range(0, 2):
f.write(' .A{0}0(a[{1}]),\n'.format(k, i * 2 + k + 2))
for k in range(0, 2):
f.write(' .A{0}0(n{1}{2}),\n'.format(k + 2, i + 2, i + k))
f.write(' .A40(n{0}{1}));\n'.format(i + 1, 1))
elif j == num_row - 1:
f.write(' .A00(n{0}{1}),\n'.format(i + 1, num_row - 2))
for k in range(0, 2):
f.write(' .A{0}0(n{1}{2}),\n'.format(k + 1, i + 2, num_row + k - 2))
f.write(' .A30(a[{0}]),\n'.format(-i * 2 + num_col * 4 + num_row - 4))
f.write(' .A40(a[{0}]));\n'.format(-i * 2 + num_col * 4 + num_row - 3))
else:
f.write(' .A00(n{0}{1}),\n'.format(i + 1, j - 1))
for k in range(0, 3):
f.write(' .A{0}0(n{1}{2}),\n'.format(k + 1, i + 2, j + k - 1))
f.write(' .A40(n{0}{1}));\n'.format(i + 1, j + 1))
for i in range(0, num_row):
if i % 2:
f.write(' NEURON0 nrn{0}{1}(\n'.format(num_col - 1, i))
else:
f.write(' NEUROS0 nrs{0}{1}(\n'.format(num_col - 1, i))
f.write(' .Y0(n{0}{1}),\n'.format(num_col - 1, i))
for j in range(0, 4):
f.write(' .A{0}0(a[{1}]),\n'.format(j, i + j + num_col * 2 - 2))
f.write(' .A40(a[{0}]));\n'.format(i + num_col * 2 + 2))
f.write('endmodule\n\n')
| with open('net.vh', 'w') as f:
num_col = 9
num_row = 12
f.write('module net(y, a);\n')
f.write(' output [{0}:0] y;\n'.format(num_row - 1))
f.write(' input [{0}:0] a;\n\n'.format(num_col * 4 + num_row - 1))
for i in range(1, num_col):
for j in range(0, num_row):
f.write(' wire n{0}{1};\n'.format(i, j))
f.write('\n')
for i in range(0, num_row):
if i % 2:
f.write(' NEURON0 nrn0{0}(\n'.format(i))
else:
f.write(' NEUROS0 nrs0{0}(\n'.format(i))
f.write(' .Y0(y[{0}]),\n'.format(i))
if i == 0:
for j in range(0, 2):
f.write(' .A{0}0(a[{0}]),\n'.format(j))
for j in range(0, 2):
f.write(' .A{0}0(n1{1}),\n'.format(j + 2, j))
f.write(' .A40(y[1]));\n')
elif i == num_row - 1:
f.write(' .A00(y[{0}]),\n'.format(num_row - 2))
for j in range(0, 2):
f.write(' .A{0}0(n1{1}),\n'.format(j + 1, num_row + j - 2))
f.write(' .A30(a[{0}]),\n'.format(num_col * 4 + num_row - 2))
f.write(' .A40(a[{0}]));\n'.format(num_col * 4 + num_row - 1))
else:
f.write(' .A00(y[{0}]),\n'.format(i - 1))
for j in range(0, 3):
f.write(' .A{0}0(n1{1}),\n'.format(j + 1, i + j - 1))
f.write(' .A40(y[{0}]));\n'.format(i + 1))
for i in range(0, num_col - 2):
for j in range(0, num_row):
if j % 2:
f.write(' NEURON0 nrn{0}{1}(\n'.format(i + 1, j))
else:
f.write(' NEUROS0 nrs{0}{1}(\n'.format(i + 1, j))
f.write(' .Y0(n{0}{1}),\n'.format(i + 1, j))
if j == 0:
for k in range(0, 2):
f.write(' .A{0}0(a[{1}]),\n'.format(k, i * 2 + k + 2))
for k in range(0, 2):
f.write(' .A{0}0(n{1}{2}),\n'.format(k + 2, i + 2, i + k))
f.write(' .A40(n{0}{1}));\n'.format(i + 1, 1))
elif j == num_row - 1:
f.write(' .A00(n{0}{1}),\n'.format(i + 1, num_row - 2))
for k in range(0, 2):
f.write(' .A{0}0(n{1}{2}),\n'.format(k + 1, i + 2, num_row + k - 2))
f.write(' .A30(a[{0}]),\n'.format(-i * 2 + num_col * 4 + num_row - 4))
f.write(' .A40(a[{0}]));\n'.format(-i * 2 + num_col * 4 + num_row - 3))
else:
f.write(' .A00(n{0}{1}),\n'.format(i + 1, j - 1))
for k in range(0, 3):
f.write(' .A{0}0(n{1}{2}),\n'.format(k + 1, i + 2, j + k - 1))
f.write(' .A40(n{0}{1}));\n'.format(i + 1, j + 1))
for i in range(0, num_row):
if i % 2:
f.write(' NEURON0 nrn{0}{1}(\n'.format(num_col - 1, i))
else:
f.write(' NEUROS0 nrs{0}{1}(\n'.format(num_col - 1, i))
f.write(' .Y0(n{0}{1}),\n'.format(num_col - 1, i))
for j in range(0, 4):
f.write(' .A{0}0(a[{1}]),\n'.format(j, i + j + num_col * 2 - 2))
f.write(' .A40(a[{0}]));\n'.format(i + num_col * 2 + 2))
f.write('endmodule\n\n') |
# Copyright 2021 Edoardo Riggio
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
def bfs(graph):
"""Function that recreates the Breath First Search
algorithm, using a queue as its data structure.
In this algorithm, when a node is analyzed, it is
marked as visited and all of its children are
added to the queue (if they are not in it already).
The next node to be analyzed is given both by the
queue and the 'visited' array. If a node is
dequeued and it is not in the 'visited' array, then
it is analyzed.
Args:
graph (dict): a dictionary mapping the nodes of the graph
to their connections.
Returns:
array: the array of visited nodes in order of visiting
"""
visited = []
for key in graph.keys():
queue = [key]
head = 0
if key in visited:
continue
while head < len(queue):
if queue[head] in visited:
continue
for i in range(len(graph[queue[head]])):
if graph[queue[head]][i] not in queue:
queue.append(graph[queue[head]][i])
visited.append(queue[head])
head += 1
return visited
| def bfs(graph):
"""Function that recreates the Breath First Search
algorithm, using a queue as its data structure.
In this algorithm, when a node is analyzed, it is
marked as visited and all of its children are
added to the queue (if they are not in it already).
The next node to be analyzed is given both by the
queue and the 'visited' array. If a node is
dequeued and it is not in the 'visited' array, then
it is analyzed.
Args:
graph (dict): a dictionary mapping the nodes of the graph
to their connections.
Returns:
array: the array of visited nodes in order of visiting
"""
visited = []
for key in graph.keys():
queue = [key]
head = 0
if key in visited:
continue
while head < len(queue):
if queue[head] in visited:
continue
for i in range(len(graph[queue[head]])):
if graph[queue[head]][i] not in queue:
queue.append(graph[queue[head]][i])
visited.append(queue[head])
head += 1
return visited |
def digitDegree(n):
'''
Let's define digit degree of some positive integer as the number of times
we need to replace this number with the sum of its digits until we get
to a one digit number.
Given an integer, find its digit degree.
'''
count = 0
while n // 10 > 0:
n = sumDigits(n)
count += 1
return count
def sumDigits(n):
sum = 0
while n > 0:
sum += n % 10
n = n // 10
return sum
| def digit_degree(n):
"""
Let's define digit degree of some positive integer as the number of times
we need to replace this number with the sum of its digits until we get
to a one digit number.
Given an integer, find its digit degree.
"""
count = 0
while n // 10 > 0:
n = sum_digits(n)
count += 1
return count
def sum_digits(n):
sum = 0
while n > 0:
sum += n % 10
n = n // 10
return sum |
class Matrix:
def __init__(self, elements):
self.a11, self.a12, self.a21, self.a22 = elements
@property
def elements(self):
return [self.a11, self.a12, self.a21, self.a22]
def __add__(self, other):
elements = [x + y for x, y in zip(self.elements, other.elements)]
return Matrix(elements)
def __mul__(self, other):
if isinstance(other, Matrix):
a11 = self.a11 * other.a11 + self.a12 * other.a21
a12 = self.a11 * other.a12 + self.a12 * other.a22
a21 = self.a21 * other.a11 + self.a22 * other.a21
a22 = self.a21 * other.a12 + self.a22 * other.a22
elements = [a11, a12, a21, a22]
return Matrix(elements)
else:
elements = [other * x for x in self.elements]
return Matrix(elements)
def __rmul__(self, other):
elements = [other * x for x in self.elements]
return Matrix(elements)
def __str__(self):
return f"{self.a11} {self.a12}\n{self.a21} {self.a22}"
m1 = Matrix([100, 2, 3, 4])
m2 = Matrix([1, 0, 0, 1])
print(m2 * m1) | class Matrix:
def __init__(self, elements):
(self.a11, self.a12, self.a21, self.a22) = elements
@property
def elements(self):
return [self.a11, self.a12, self.a21, self.a22]
def __add__(self, other):
elements = [x + y for (x, y) in zip(self.elements, other.elements)]
return matrix(elements)
def __mul__(self, other):
if isinstance(other, Matrix):
a11 = self.a11 * other.a11 + self.a12 * other.a21
a12 = self.a11 * other.a12 + self.a12 * other.a22
a21 = self.a21 * other.a11 + self.a22 * other.a21
a22 = self.a21 * other.a12 + self.a22 * other.a22
elements = [a11, a12, a21, a22]
return matrix(elements)
else:
elements = [other * x for x in self.elements]
return matrix(elements)
def __rmul__(self, other):
elements = [other * x for x in self.elements]
return matrix(elements)
def __str__(self):
return f'{self.a11} {self.a12}\n{self.a21} {self.a22}'
m1 = matrix([100, 2, 3, 4])
m2 = matrix([1, 0, 0, 1])
print(m2 * m1) |
def getSubList():
l = [1, 4, 9, 10, 23]
l1 = l[0:3] # sublist from index 0 to 3
l2 = l[3:] # sublist from 3 uptil end
return [l1, l2]
[l1, l2] = getSubList()
print(l1)
print(l2) | def get_sub_list():
l = [1, 4, 9, 10, 23]
l1 = l[0:3]
l2 = l[3:]
return [l1, l2]
[l1, l2] = get_sub_list()
print(l1)
print(l2) |
#
# @lc app=leetcode id=120 lang=python3
#
# [120] Triangle
#
# @lc code=start
class Solution:
def minimumTotal(self, triangle: List[List[int]]) -> int:
if not triangle:
return
# O(n*n/2) space, top-down
res = [[0 for i in range(len(row))] for row in triangle]
res[0][0] = triangle[0][0]
for i in range(1, len(triangle)):
for j in range(len(triangle[i])):
if j == 0: # left side
res[i][j] = res[i - 1][j] + triangle[i][j]
elif j == len(triangle[i])-1: # right side
res[i][j] = res[i - 1][j - 1] + triangle[i][j]
else:
res[i][j] = min(res[i - 1][j - 1],
res[i - 1][j]) + triangle[i][j]
return min(res[-1])
# @lc code=end
# Accepted
# 43/43 cases passed(64 ms)
# Your runtime beats 93.67 % of python3 submissions
# Your memory usage beats 20 % of python3 submissions(13.8 MB)
| class Solution:
def minimum_total(self, triangle: List[List[int]]) -> int:
if not triangle:
return
res = [[0 for i in range(len(row))] for row in triangle]
res[0][0] = triangle[0][0]
for i in range(1, len(triangle)):
for j in range(len(triangle[i])):
if j == 0:
res[i][j] = res[i - 1][j] + triangle[i][j]
elif j == len(triangle[i]) - 1:
res[i][j] = res[i - 1][j - 1] + triangle[i][j]
else:
res[i][j] = min(res[i - 1][j - 1], res[i - 1][j]) + triangle[i][j]
return min(res[-1]) |
# -*- coding: UTF-8 -*-
"""
Meieraha 2: PyTest tests
As most of the complexity of the code is in Javascript, we do not have any real Python tests so far.
Copyright 2015, Konstantin Tretyakov
License: MIT
"""
| """
Meieraha 2: PyTest tests
As most of the complexity of the code is in Javascript, we do not have any real Python tests so far.
Copyright 2015, Konstantin Tretyakov
License: MIT
""" |
def test_search_shape(vidispine, cassette, item):
result = vidispine.search.shape()
assert 'id' in result['shape'][0]
assert result['shape'][0]['item'][0]['id'] == item
assert cassette.all_played
def test_search_shape_with_params(vidispine, cassette, item):
result = vidispine.search.shape(params={'content': 'metadata'})
assert 'id' in result['shape'][0]
assert result['shape'][0]['item'][0]['id'] == item
assert cassette.all_played
def test_search_shape_with_matrix_params(vidispine, cassette, item):
result = vidispine.search.shape(matrix_params={'number': 10, 'first': 1})
assert 'id' in result['shape'][0]
assert result['shape'][0]['item'][0]['id'] == item
assert cassette.all_played
def test_search_shape_with_params_and_matrix_params(vidispine, cassette, item):
result = vidispine.search.shape(
params={'content': 'metadata'}, matrix_params={'number': 10}
)
assert 'id' in result['shape'][0]
assert result['shape'][0]['item'][0]['id'] == item
assert cassette.all_played
| def test_search_shape(vidispine, cassette, item):
result = vidispine.search.shape()
assert 'id' in result['shape'][0]
assert result['shape'][0]['item'][0]['id'] == item
assert cassette.all_played
def test_search_shape_with_params(vidispine, cassette, item):
result = vidispine.search.shape(params={'content': 'metadata'})
assert 'id' in result['shape'][0]
assert result['shape'][0]['item'][0]['id'] == item
assert cassette.all_played
def test_search_shape_with_matrix_params(vidispine, cassette, item):
result = vidispine.search.shape(matrix_params={'number': 10, 'first': 1})
assert 'id' in result['shape'][0]
assert result['shape'][0]['item'][0]['id'] == item
assert cassette.all_played
def test_search_shape_with_params_and_matrix_params(vidispine, cassette, item):
result = vidispine.search.shape(params={'content': 'metadata'}, matrix_params={'number': 10})
assert 'id' in result['shape'][0]
assert result['shape'][0]['item'][0]['id'] == item
assert cassette.all_played |
# -*- coding:utf-8 -*-
# {crawler_name: crawler_module: class_name}
CRAWLERS = {
'test':'crawlers.test:class'
}
# [requirements]
# redis : host, port, db[default = 0], password[default None]
# mongodb: host, port, db, collection
# [type options]
# redis, mongodb
DATABASES = {
'database_name': {
'type': 'redis',
'host': 'localhost',
'port': 0,
},
}
# [type options]
# redis, file, mongodb
# [requirements]
# redis: database
# file: filename, fileformat
# mongodb: database
PIPELINES = {
'pipeline_name': {
'type': 'redis',
'database':'database_name',
},
}
# [type options]
# redis, queue
# [requirements]
# redis: database,key
# queue: None
SOURCES = {
'source_name': {
'type': 'redis',
'database': 'database_name',
'key': 'key_name'
}
} | crawlers = {'test': 'crawlers.test:class'}
databases = {'database_name': {'type': 'redis', 'host': 'localhost', 'port': 0}}
pipelines = {'pipeline_name': {'type': 'redis', 'database': 'database_name'}}
sources = {'source_name': {'type': 'redis', 'database': 'database_name', 'key': 'key_name'}} |
class Logger:
def __init__ (self) -> None:
self._verbose:int = 0
def set_log_level (self, verbose:int) -> None:
self._verbose:int = verbose
def error (self, t:str) -> None:
'''Errors are always printed'''
print(f'Error: {t}')
def warn (self, t:str) -> None:
'''Warnings are the minimum level of logging'''
if self._verbose >= 1:
print(f'Warn: {t}')
def info (self, t:str) -> None:
'''Info is the 2nd level of logging'''
if self._verbose >= 2:
print(f'Info: {t}')
def debug (self, t:str) -> None:
'''Debug is the most verbose level of logging'''
if self._verbose == 3:
print(f'Debug: {t}')
| class Logger:
def __init__(self) -> None:
self._verbose: int = 0
def set_log_level(self, verbose: int) -> None:
self._verbose: int = verbose
def error(self, t: str) -> None:
"""Errors are always printed"""
print(f'Error: {t}')
def warn(self, t: str) -> None:
"""Warnings are the minimum level of logging"""
if self._verbose >= 1:
print(f'Warn: {t}')
def info(self, t: str) -> None:
"""Info is the 2nd level of logging"""
if self._verbose >= 2:
print(f'Info: {t}')
def debug(self, t: str) -> None:
"""Debug is the most verbose level of logging"""
if self._verbose == 3:
print(f'Debug: {t}') |
def foo():
print(__file__ + ": parsed and executed.")
foo()
| def foo():
print(__file__ + ': parsed and executed.')
foo() |
for i in range(32, 128):
print(chr(i), end =' ')
if (i - 1) % 10 == 0:
print()
print() | for i in range(32, 128):
print(chr(i), end=' ')
if (i - 1) % 10 == 0:
print()
print() |
"""
SeparateChainingMap
Implement a Map with a hash table, using separate chaining.
"""
class SeparateChaining:
def __init__(self, length=10):
self.table = [[] for _ in range(length)]
self.size = 0
def __len__(self):
return self.size
def __setitem__(self, key, value):
print('inserting:', key, value)
index = self._hash(key)
for key_val in self.table[index]:
if key == key_val[0]:
key_val[1] = value
return
self.table[index].append([key, value])
self.size += 1
if self.size > len(self.table):
self._resize(2*len(self.table))
def __getitem__(self, key):
index = self._hash(key)
for k, v in self.table[index]:
if key == k:
return v
raise KeyError
def __delitem__(self, key):
index = self._hash(key)
for i in range(len(self.table[index])):
if key is self.table[index][i][0]:
self.table[index].pop(i)
self.size -= 1
return
raise KeyError
def __iter__(self):
for bucket in self.table:
for key, _ in bucket:
yield key
def __contains__(self, key):
index = self._hash(key)
for k, _ in self.table[index]:
if key == k:
return True
return False
def _hash(self, key):
return hash(key) % len(self.table)
def _resize(self, newsize):
print('resizing')
old_table = self.table
self.table = [[] for _ in range(newsize)]
for bucket in old_table:
for key_value in bucket:
#self[key] = value
index = self._hash(key_value[0])
self.table[index].append(key_value)
def print_map(map):
for key in map:
print(key, map[key])
if __name__ == '__main__':
sc = SeparateChaining(3)
print_map(sc)
print(17 in sc)
print('========')
sc[17] = 'john'
print_map(sc)
print(17 in sc)
print(sc[17])
print('========')
sc[42] = 'paul'
print_map(sc)
print(sc.table)
print('========')
sc[17] = 'george'
print_map(sc)
print(sc.table)
print('========')
del sc[17]
print(sc.table)
print_map(sc)
print('========')
sc[13] = 'ringo'
print_map(sc)
sc[25] = 'moe'
sc[26] = 'larry'
sc[27] = 'curly'
sc[28] = 'groucho'
print_map(sc)
print(sc.table)
| """
SeparateChainingMap
Implement a Map with a hash table, using separate chaining.
"""
class Separatechaining:
def __init__(self, length=10):
self.table = [[] for _ in range(length)]
self.size = 0
def __len__(self):
return self.size
def __setitem__(self, key, value):
print('inserting:', key, value)
index = self._hash(key)
for key_val in self.table[index]:
if key == key_val[0]:
key_val[1] = value
return
self.table[index].append([key, value])
self.size += 1
if self.size > len(self.table):
self._resize(2 * len(self.table))
def __getitem__(self, key):
index = self._hash(key)
for (k, v) in self.table[index]:
if key == k:
return v
raise KeyError
def __delitem__(self, key):
index = self._hash(key)
for i in range(len(self.table[index])):
if key is self.table[index][i][0]:
self.table[index].pop(i)
self.size -= 1
return
raise KeyError
def __iter__(self):
for bucket in self.table:
for (key, _) in bucket:
yield key
def __contains__(self, key):
index = self._hash(key)
for (k, _) in self.table[index]:
if key == k:
return True
return False
def _hash(self, key):
return hash(key) % len(self.table)
def _resize(self, newsize):
print('resizing')
old_table = self.table
self.table = [[] for _ in range(newsize)]
for bucket in old_table:
for key_value in bucket:
index = self._hash(key_value[0])
self.table[index].append(key_value)
def print_map(map):
for key in map:
print(key, map[key])
if __name__ == '__main__':
sc = separate_chaining(3)
print_map(sc)
print(17 in sc)
print('========')
sc[17] = 'john'
print_map(sc)
print(17 in sc)
print(sc[17])
print('========')
sc[42] = 'paul'
print_map(sc)
print(sc.table)
print('========')
sc[17] = 'george'
print_map(sc)
print(sc.table)
print('========')
del sc[17]
print(sc.table)
print_map(sc)
print('========')
sc[13] = 'ringo'
print_map(sc)
sc[25] = 'moe'
sc[26] = 'larry'
sc[27] = 'curly'
sc[28] = 'groucho'
print_map(sc)
print(sc.table) |
"""
Define a procedure, `deep_reverse`, that takes as input a list,
and returns a new list that is the deep reverse of the input list.
This means it reverses all the elements in the list,
and if any of those elements are lists themselves,
reverses all the elements in the inner list, all the way down.
>Note: The procedure must not change the input list itself.
Example
Input: `[1, 2, [3, 4, 5], 4, 5]`
Output: `[5, 4, [5, 4, 3], 2, 1]`
"""
def deep_reverse(arr):
output = []
for _ in list(reversed(arr)):
if type(_) == list:
output.append(deep_reverse(_))
elif type(_) != list:
output.append(_)
return output
# cleaner solution, feels more pythonic?
def _deep_reverse(arr):
if type(arr) is not list:
return arr
else:
results = []
arr = arr[::-1] # more pythonic way to reverse
for element in arr:
results.append(deep_reverse(element))
return results
def test_function(test_case):
arr = test_case[0]
solution = test_case[1]
output = deep_reverse(arr)
if output == solution:
return True
else:
return False
arr = [1, 2, 3, 4, 5]
solution = [5, 4, 3, 2, 1]
test_case = [arr, solution]
assert test_function(test_case) == True
arr = [1, 2, [3, 4, 5], 4, 5]
solution = [5, 4, [5, 4, 3], 2, 1]
test_case = [arr, solution]
assert test_function(test_case) == True
arr = [1, [2, 3, [4, [5, 6]]]]
solution = [[[[6, 5], 4], 3, 2], 1]
test_case = [arr, solution]
assert test_function(test_case) == True
arr = [1, [2, 3], 4, [5, 6]]
solution = [[6, 5], 4, [3, 2], 1]
test_case = [arr, solution]
assert test_function(test_case) == True
| """
Define a procedure, `deep_reverse`, that takes as input a list,
and returns a new list that is the deep reverse of the input list.
This means it reverses all the elements in the list,
and if any of those elements are lists themselves,
reverses all the elements in the inner list, all the way down.
>Note: The procedure must not change the input list itself.
Example
Input: `[1, 2, [3, 4, 5], 4, 5]`
Output: `[5, 4, [5, 4, 3], 2, 1]`
"""
def deep_reverse(arr):
output = []
for _ in list(reversed(arr)):
if type(_) == list:
output.append(deep_reverse(_))
elif type(_) != list:
output.append(_)
return output
def _deep_reverse(arr):
if type(arr) is not list:
return arr
else:
results = []
arr = arr[::-1]
for element in arr:
results.append(deep_reverse(element))
return results
def test_function(test_case):
arr = test_case[0]
solution = test_case[1]
output = deep_reverse(arr)
if output == solution:
return True
else:
return False
arr = [1, 2, 3, 4, 5]
solution = [5, 4, 3, 2, 1]
test_case = [arr, solution]
assert test_function(test_case) == True
arr = [1, 2, [3, 4, 5], 4, 5]
solution = [5, 4, [5, 4, 3], 2, 1]
test_case = [arr, solution]
assert test_function(test_case) == True
arr = [1, [2, 3, [4, [5, 6]]]]
solution = [[[[6, 5], 4], 3, 2], 1]
test_case = [arr, solution]
assert test_function(test_case) == True
arr = [1, [2, 3], 4, [5, 6]]
solution = [[6, 5], 4, [3, 2], 1]
test_case = [arr, solution]
assert test_function(test_case) == True |
def build_graph(projects, deps):
g = {}
for p in projects:
g[p] = (set(), set())
for d in deps:
g[d[0]][0].add(d[1])
g[d[1]][1].add(d[0])
return g
def build_order(projects, deps):
g = build_graph(projects, deps)
result = []
while g:
buff = []
for p in g:
if len(g[p][1]) == 0:
buff.append(p)
for p in buff:
for out in g[p][0]:
g[out][1].remove(p)
del g[p]
if len(buff) == 0:
return None # cycle detected
result.extend(buff)
return result
def build_order2(projects, deps):
g = build_graph(projects, deps)
result = []
for p in g:
visited = set()
if dsf(g, p, result, visited, p):
return None # detected cycle
return reversed(result)
def dsf(graph, n, path, visited, start):
for node in graph[n][0]:
if node not in visited:
if node == start:
return True
visited.add(node)
if dsf(graph, node, path, visited, start):
return True
if n not in path:
path.append(n)
return False
projects = ['a', 'b', 'c', 'd', 'e', 'f', 'g']
deps = [('a', 'd'), ('f', 'b'), ('b', 'd'), ('f', 'a'), ('d', 'c')]
deps2 = [('f', 'c'), ('f', 'b'), ('f', 'a'), ('b', 'a'), ('b', 'e'), ('d', 'g'), ('a', 'e')]
deps3 = [('a', 'b'), ('b', 'c'), ('c', 'd'), ('d', 'a')]
print(build_order(projects, deps))
print(build_order(projects, deps2))
print(build_order(projects, deps3))
print(build_order2(projects, deps))
print(build_order2(projects, deps2))
print(build_order2(projects, deps3))
| def build_graph(projects, deps):
g = {}
for p in projects:
g[p] = (set(), set())
for d in deps:
g[d[0]][0].add(d[1])
g[d[1]][1].add(d[0])
return g
def build_order(projects, deps):
g = build_graph(projects, deps)
result = []
while g:
buff = []
for p in g:
if len(g[p][1]) == 0:
buff.append(p)
for p in buff:
for out in g[p][0]:
g[out][1].remove(p)
del g[p]
if len(buff) == 0:
return None
result.extend(buff)
return result
def build_order2(projects, deps):
g = build_graph(projects, deps)
result = []
for p in g:
visited = set()
if dsf(g, p, result, visited, p):
return None
return reversed(result)
def dsf(graph, n, path, visited, start):
for node in graph[n][0]:
if node not in visited:
if node == start:
return True
visited.add(node)
if dsf(graph, node, path, visited, start):
return True
if n not in path:
path.append(n)
return False
projects = ['a', 'b', 'c', 'd', 'e', 'f', 'g']
deps = [('a', 'd'), ('f', 'b'), ('b', 'd'), ('f', 'a'), ('d', 'c')]
deps2 = [('f', 'c'), ('f', 'b'), ('f', 'a'), ('b', 'a'), ('b', 'e'), ('d', 'g'), ('a', 'e')]
deps3 = [('a', 'b'), ('b', 'c'), ('c', 'd'), ('d', 'a')]
print(build_order(projects, deps))
print(build_order(projects, deps2))
print(build_order(projects, deps3))
print(build_order2(projects, deps))
print(build_order2(projects, deps2))
print(build_order2(projects, deps3)) |
class Solution:
# @param {integer[]} nums
# @return {boolean}
def containsDuplicate(self, nums):
tb = set()
for n in nums:
if n in tb:
return True
tb.add(n)
return False
| class Solution:
def contains_duplicate(self, nums):
tb = set()
for n in nums:
if n in tb:
return True
tb.add(n)
return False |
#!/usr/bin/env python
# MIT License
#
# Copyright (c) 2019 iAchieved.it
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
ChessPieces = {
'BB':'Black Bishop',
'BK':'Black King',
'BN':'Black Knight',
'BP':'Black Pawn',
'BQ':'Black Queen',
'BR':'Black Rook',
'WB':'White Bishop',
'WK':'White King',
'WN':'White Knight',
'WP':'White Pawn',
'WQ':'White Queen',
'WR':'White Rook',
}
| chess_pieces = {'BB': 'Black Bishop', 'BK': 'Black King', 'BN': 'Black Knight', 'BP': 'Black Pawn', 'BQ': 'Black Queen', 'BR': 'Black Rook', 'WB': 'White Bishop', 'WK': 'White King', 'WN': 'White Knight', 'WP': 'White Pawn', 'WQ': 'White Queen', 'WR': 'White Rook'} |
html_tags = ['<!--...-->', '<!DOCTYPE>', '<a>', '<abbr>', '<acronym>', '<address>', '<applet>', '<area>', '<article>', '<aside>', '<audio>', '<b>', '<base>', '<basefont>', '<bdi>', '<bdo>', '<big>', '<blockquote>', '<body>', '<br>', '<button>', '<canvas>', '<caption>', '<center>', '<cite>', '<code>', '<col>', '<colgroup>', '<data>', '<datalist>', '<dd>', '<del>', '<details>', '<dfn>', '<dialog>', '<dir>', '<div>', '<dl>', '<dt>', '<em>', '<embed>', '<fieldset>', '<figcaption>', '<figure>', '<font>', '<footer>', '<form>', '<frame>', '<frameset>', '<h1> to <h6>', '<head>', '<header>', '<hr>', '<html>', '<i>', '<iframe>', '<img>', '<input>', '<ins>', '<kbd>', '<label>', '<legend>', '<li>', '<link>', '<main>', '<map>', '<mark>', '<meta>', '<meter>', '<nav>', '<noframes>', '<noscript>', '<object>', '<ol>', '<optgroup>', '<option>', '<output>', '<p>', '<param>', '<picture>', '<pre>', '<progress>', '<q>', '<rp>', '<rt>', '<ruby>', '<s>', '<samp>', '<script>', '<section>', '<select>', '<small>', '<source>', '<span>', '<strike>', '<strong>', '<style>', '<sub>', '<summary>', '<sup>', '<svg>', '<table>', '<tbody>', '<td>', '<template>', '<textarea>', '<tfoot>', '<th>', '<thead>', '<time>', '<title>', '<tr>', '<track>', '<tt>', '<u>', '<ul>', '<var>', '<video>', '<wbr>']
html_tags_stripped = ['!--...--', '!DOCTYPE', 'a', 'abbr', 'acronym', 'address', 'applet', 'area', 'article', 'aside', 'audio', 'b', 'base', 'basefont', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'frame', 'frameset', 'h1 to h6', 'head', 'header', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'meta', 'meter', 'nav', 'noframes', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'svg', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']
all_attributes_list = ['accept', 'accept-charset', 'accesskey', 'action', 'alt', 'async', 'autocomplete', 'autofocus', 'autoplay', 'charset', 'checked', 'cite', 'class', 'cols', 'colspan', 'contenteditable', 'controls', 'coords', 'data', 'data-*', 'datetime', 'default', 'defer', 'dir', 'dirname', 'disabled', 'download', 'draggable', 'enctype', 'for', 'form', 'formaction', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'http-equiv', 'id', 'ismap', 'kind', 'label', 'lang', 'list', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'multiple', 'muted', 'name', 'novalidate', 'onabort', 'onafterprint', 'onbeforeprint', 'onbeforeunload', 'onblur', 'oncanplay', 'oncanplaythrough', 'onchange', 'onclick', 'oncontextmenu', 'oncopy', 'oncuechange', 'oncut', 'ondblclick', 'ondrag', 'ondragend', 'ondragenter', 'ondragleave', 'ondragover', 'ondragstart', 'ondrop', 'ondurationchange', 'onemptied', 'onended', 'onerror', 'onfocus', 'onhashchange', 'oninput', 'oninvalid', 'onkeydown', 'onkeypress', 'onkeyup', 'onload', 'onloadeddata', 'onloadedmetadata', 'onloadstart', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onmousewheel', 'onoffline', 'ononline', 'onpagehide', 'onpageshow', 'onpaste', 'onpause', 'onplay', 'onplaying', 'onpopstate', 'onprogress', 'onratechange', 'onreset', 'onresize', 'onscroll', 'onsearch', 'onseeked', 'onseeking', 'onselect', 'onstalled', 'onstorage', 'onsubmit', 'onsuspend', 'ontimeupdate', 'ontoggle', 'onunload', 'onvolumechange', 'onwaiting', 'onwheel', 'open', 'optimum', 'pattern', 'placeholder', 'poster', 'preload', 'readonly', 'rel', 'required', 'reversed', 'rows', 'rowspan', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'spellcheck', 'src', 'srcdoc', 'srclang', 'srcset', 'start', 'step', 'style', 'tabindex', 'target', 'title', 'translate', 'type', 'usemap', 'value', 'width', 'wrap']
attributes = {'accept': ['<input />'], 'accept-charset': ['<form>'], 'accesskey': ['global attribute'], 'action': ['<form>'], 'alt': ['<area />', '<img />', '<input />'], 'async': ['<script>'], 'autocomplete': ['<form>', '<input />'], 'autofocus': ['<button>', '<input />', '<select>', '<textarea>'], 'autoplay': ['<audio>', '<video>'], 'charset': ['<meta />', '<script>'], 'checked': ['<input />'], 'cite': ['<blockquote>', '<del>', '<ins>', '<q>'], 'class': ['global attribute'], 'cols': ['<textarea>'], 'colspan': ['<td>', '<th>'], 'contenteditable': ['global attribute'], 'controls': ['<audio>', '<video>'], 'coords': ['<area />'], 'data': ['<object>'], 'data-*': ['global attribute'], 'datetime': ['<del>', '<ins>', '<time>'], 'default': ['<track />'], 'defer': ['<script>'], 'dir': ['global attribute'], 'dirname': ['<input />', '<textarea>'], 'disabled': ['<button>', '<fieldset>', '<input />', '<optgroup>', '<option>', '<select>', '<textarea>'], 'download': ['<a>', '<area />'], 'draggable': ['global attribute'], 'enctype': ['<form>'], 'for': ['<label>', '<output>'], 'form': ['<button>', '<fieldset>', '<input />', '<label>', '<meter>', '<object>', '<output>', '<select>', '<textarea>'], 'formaction': ['<button>', '<input />'], 'headers': ['<td>', '<th>'], 'height': ['<canvas>', '<embed />', '<iframe>', '<img />', '<input />', '<object>', '<video>'], 'hidden': ['global attribute'], 'high': ['<meter>'], 'href': ['<a>', '<area />', '<base />', '<link />'], 'hreflang': ['<a>', '<area />', '<link />'], 'http-equiv': ['<meta />'], 'id': ['global attribute'], 'ismap': ['<img />'], 'kind': ['<track />'], 'label': ['<track />', '<option>', '<optgroup>'], 'lang': ['global attribute'], 'list': ['<input />'], 'loop': ['<audio>', '<video>'], 'low': ['<meter>'], 'max': ['<input />', '<meter>', '<progress>'], 'maxlength': ['<input />', '<textarea>'], 'media': ['<a>', '<area />', '<link />', '<source />', '<style>'], 'method': ['<form>'], 'min': ['<input />', '<meter>'], 'multiple': ['<input />', '<select>'], 'muted': ['<video>', '<audio>'], 'name': ['<button>', '<fieldset>', '<form>', '<iframe>', '<input />', '<map>', '<meta />', '<object>', '<output>', '<param />', '<select>', '<textarea>'], 'novalidate': ['<form>'], 'onabort': ['<audio>', '<embed />', '<img />', '<object>', '<video>'], 'onafterprint': ['<body>'], 'onbeforeprint': ['<body>'], 'onbeforeunload': ['<body>'], 'onblur': ['All visible'], 'oncanplay': ['<audio>', '<embed />', '<object>', '<video>'], 'oncanplaythrough': ['<audio>', '<video>'], 'onchange': ['All visible'], 'onclick': ['All visible'], 'oncontextmenu': ['All visible'], 'oncopy': ['All visible'], 'oncuechange': ['<track />'], 'oncut': ['All visible'], 'ondblclick': ['All visible'], 'ondrag': ['All visible'], 'ondragend': ['All visible'], 'ondragenter': ['All visible'], 'ondragleave': ['All visible'], 'ondragover': ['All visible'], 'ondragstart': ['All visible'], 'ondrop': ['All visible'], 'ondurationchange': ['<audio>', '<video>'], 'onemptied': ['<audio>', '<video>'], 'onended': ['<audio>', '<video>'], 'onerror': ['<audio>', '<body>', '<embed />', '<img />', '<object>', '<script>', '<style>', '<video>'], 'onfocus': ['All visible'], 'onhashchange': ['<body>'], 'oninput': ['All visible'], 'oninvalid': ['All visible'], 'onkeydown': ['All visible'], 'onkeypress': ['All visible'], 'onkeyup': ['All visible'], 'onload': ['<body>', '<iframe>', '<img />', '<input />', '<link />', '<script>', '<style>'], 'onloadeddata': ['<audio>', '<video>'], 'onloadedmetadata': ['<audio>', '<video>'], 'onloadstart': ['<audio>', '<video>'], 'onmousedown': ['All visible'], 'onmousemove': ['All visible'], 'onmouseout': ['All visible'], 'onmouseover': ['All visible'], 'onmouseup': ['All visible'], 'onmousewheel': ['All visible'], 'onoffline': ['<body>'], 'ononline': ['<body>'], 'onpagehide': ['<body>'], 'onpageshow': ['<body>'], 'onpaste': ['All visible'], 'onpause': ['<audio>', '<video>'], 'onplay': ['<audio>', '<video>'], 'onplaying': ['<audio>', '<video>'], 'onpopstate': ['<body>'], 'onprogress': ['<audio>', '<video>'], 'onratechange': ['<audio>', '<video>'], 'onreset': ['<form>'], 'onresize': ['<body>'], 'onscroll': ['All visible'], 'onsearch': ['<input />'], 'onseeked': ['<audio>', '<video>'], 'onseeking': ['<audio>', '<video>'], 'onselect': ['All visible'], 'onstalled': ['<audio>', '<video>'], 'onstorage': ['<body>'], 'onsubmit': ['<form>'], 'onsuspend': ['<audio>', '<video>'], 'ontimeupdate': ['<audio>', '<video>'], 'ontoggle': ['<details>'], 'onunload': ['<body>'], 'onvolumechange': ['<audio>', '<video>'], 'onwaiting': ['<audio>', '<video>'], 'onwheel': ['All visible'], 'open': ['<details>'], 'optimum': ['<meter>'], 'pattern': ['<input />'], 'placeholder': ['<input />', '<textarea>'], 'poster': ['<video>'], 'preload': ['<audio>', '<video>'], 'readonly': ['<input />', '<textarea>'], 'rel': ['<a>', '<area />', '<form>', '<link />'], 'required': ['<input />', '<select>', '<textarea>'], 'reversed': ['<ol>'], 'rows': ['<textarea>'], 'rowspan': ['<td>', '<th>'], 'scope': ['<th>'], 'selected': ['<option>'], 'shape': ['<area />'], 'size': ['<input />', '<select>'], 'sizes': ['<img />', '<link />', '<source />'], 'span': ['<col />', '<colgroup>'], 'spellcheck': ['global attribute'], 'src': ['<audio>', '<embed />', '<iframe>', '<img />', '<input />', '<script>', '<source />', '<track />', '<video>'], 'srcdoc': ['<iframe>'], 'srclang': ['<track />'], 'srcset': ['<img />', '<source />'], 'start': ['<ol>'], 'step': ['<input />'], 'style': ['global attribute'], 'tabindex': ['global attribute'], 'target': ['<a>', '<area />', '<base />', '<form>'], 'title': ['global attribute'], 'translate': ['global attribute'], 'type': ['<a>', '<button>', '<embed />', '<input />', '<link />', '<menu>', '<object>', '<script>', '<source />', '<style>'], 'usemap': ['<img />', '<object>'], 'value': ['<button>', '<input />', '<li>', '<option>', '<meter>', '<progress>', '<param />'], 'width': ['<canvas>', '<embed />', '<iframe>', '<img />', '<input />', '<object>', '<video>'], 'wrap': ['<textarea>']}
html_tags_incl_attributes = {'<!--...-->': [], '<!DOCTYPE>': [], '<a>': ['download', 'href', 'hreflang', 'media', 'rel', 'target', 'type'], '<abbr>': [], '<acronym>': [], '<address>': [], '<applet>': [], '<article>': [], '<aside>': [], '<audio>': ['autoplay', 'controls', 'loop', 'muted', 'onabort', 'oncanplay', 'oncanplaythrough', 'ondurationchange', 'onemptied', 'onended', 'onerror', 'onloadeddata', 'onloadedmetadata', 'onloadstart', 'onpause', 'onplay', 'onplaying', 'onprogress', 'onratechange', 'onseeked', 'onseeking', 'onstalled', 'onsuspend', 'ontimeupdate', 'onvolumechange', 'onwaiting', 'preload', 'src'], '<b>': [], '<basefont>': [], '<bdi>': [], '<bdo>': [], '<big>': [], '<blockquote>': ['cite'], '<body>': ['onafterprint', 'onbeforeprint', 'onbeforeunload', 'onerror', 'onhashchange', 'onload', 'onoffline', 'ononline', 'onpagehide', 'onpageshow', 'onpopstate', 'onresize', 'onstorage', 'onunload'], '<button>': ['autofocus', 'disabled', 'form', 'formaction', 'name', 'type', 'value'], '<canvas>': ['height', 'width'], '<caption>': [], '<center>': [], '<cite>': [], '<code>': [], '<colgroup>': ['span'], '<data>': [], '<datalist>': [], '<dd>': [], '<del>': ['cite', 'datetime'], '<details>': ['ontoggle', 'open'], '<dfn>': [], '<dialog>': [], '<dir>': [], '<div>': [], '<dl>': [], '<dt>': [], '<em>': [], '<fieldset>': ['disabled', 'form', 'name'], '<figcaption>': [], '<figure>': [], '<font>': [], '<footer>': [], '<form>': ['accept-charset', 'action', 'autocomplete', 'enctype', 'method', 'name', 'novalidate', 'onreset', 'onsubmit', 'rel', 'target'], '<frame>': [], '<frameset>': [], '<h1> to <h6>': [], '<head>': [], '<header>': [], '<html>': [], '<i>': [], '<iframe>': ['height', 'name', 'onload', 'src', 'srcdoc', 'width'], '<ins>': ['cite', 'datetime'], '<kbd>': [], '<label>': ['for', 'form'], '<legend>': [], '<li>': ['value'], '<main>': [], '<map>': ['name'], '<mark>': [], '<meter>': ['form', 'high', 'low', 'max', 'min', 'optimum', 'value'], '<nav>': [], '<noframes>': [], '<noscript>': [], '<object>': ['data', 'form', 'height', 'name', 'onabort', 'oncanplay', 'onerror', 'type', 'usemap', 'width'], '<ol>': ['reversed', 'start'], '<optgroup>': ['disabled', 'label'], '<option>': ['disabled', 'label', 'selected', 'value'], '<output>': ['for', 'form', 'name'], '<p>': [], '<picture>': [], '<pre>': [], '<progress>': ['max', 'value'], '<q>': ['cite'], '<rp>': [], '<rt>': [], '<ruby>': [], '<s>': [], '<samp>': [], '<script>': ['async', 'charset', 'defer', 'onerror', 'onload', 'src', 'type'], '<section>': [], '<select>': ['autofocus', 'disabled', 'form', 'multiple', 'name', 'required', 'size'], '<small>': [], '<span>': [], '<strike>': [], '<strong>': [], '<style>': ['media', 'onerror', 'onload', 'type'], '<sub>': [], '<summary>': [], '<sup>': [], '<svg>': [], '<table>': [], '<tbody>': [], '<td>': ['colspan', 'headers', 'rowspan'], '<template>': [], '<textarea>': ['autofocus', 'cols', 'dirname', 'disabled', 'form', 'maxlength', 'name', 'placeholder', 'readonly', 'required', 'rows', 'wrap'], '<tfoot>': [], '<th>': ['colspan', 'headers', 'rowspan', 'scope'], '<thead>': [], '<time>': ['datetime'], '<title>': [], '<tr>': [], '<tt>': [], '<u>': [], '<ul>': [], '<var>': [], '<video>': ['autoplay', 'controls', 'height', 'loop', 'muted', 'onabort', 'oncanplay', 'oncanplaythrough', 'ondurationchange', 'onemptied', 'onended', 'onerror', 'onloadeddata', 'onloadedmetadata', 'onloadstart', 'onpause', 'onplay', 'onplaying', 'onprogress', 'onratechange', 'onseeked', 'onseeking', 'onstalled', 'onsuspend', 'ontimeupdate', 'onvolumechange', 'onwaiting', 'poster', 'preload', 'src', 'width'], '<area />': ['alt', 'coords', 'download', 'href', 'hreflang', 'media', 'rel', 'shape', 'target'], '<base />': ['href', 'target'], '<br />': [], '<col />': ['span'], '<embed />': ['height', 'onabort', 'oncanplay', 'onerror', 'src', 'type', 'width'], '<hr />': [], '<img />': ['alt', 'height', 'ismap', 'onabort', 'onerror', 'onload', 'sizes', 'src', 'srcset', 'usemap', 'width'], '<input />': ['accept', 'alt', 'autocomplete', 'autofocus', 'checked', 'dirname', 'disabled', 'form', 'formaction', 'height', 'list', 'max', 'maxlength', 'min', 'multiple', 'name', 'onload', 'onsearch', 'pattern', 'placeholder', 'readonly', 'required', 'size', 'src', 'step', 'type', 'value', 'width'], '<link />': ['href', 'hreflang', 'media', 'onload', 'rel', 'sizes', 'type'], '<meta />': ['charset', 'http-equiv', 'name'], '<param />': ['name', 'value'], '<source />': ['media', 'sizes', 'src', 'srcset', 'type'], '<track />': ['default', 'kind', 'label', 'oncuechange', 'src', 'srclang'], '<wbr />': []}
global_attributes = ['accesskey', 'class', 'contenteditable', 'data-*', 'dir', 'draggable', 'hidden', 'id', 'lang', 'onblur', 'onchange', 'onclick', 'oncontextmenu', 'oncopy', 'oncut', 'ondblclick', 'ondrag', 'ondragend', 'ondragenter', 'ondragleave', 'ondragover', 'ondragstart', 'ondrop', 'onfocus', 'oninput', 'oninvalid', 'onkeydown', 'onkeypress', 'onkeyup', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onmousewheel', 'onpaste', 'onscroll', 'onselect', 'onwheel', 'spellcheck', 'style', 'tabindex', 'title', 'translate']
self_closing_tags = ['<area />', '<base />', '<br />', '<col />', '<embed />', '<hr />', '<img />', '<input />', '<link />', '<meta />', '<param />', '<source />', '<track />', '<wbr />']
self_closer = [['<area />', '<area>'], ['<base />', '<base>'], ['<br />', '<br>'], ['<col />', '<col>'], ['<embed />', '<embed>'], ['<hr />', '<hr>'], ['<img />', '<img>'], ['<input />', '<input>'], ['<link />', '<link>'], ['<meta />', '<meta>'], ['<param />', '<param>'], ['<source />', '<source>'], ['<track />', '<track>'], ['<wbr />', '<wbr>']]
css_properties = ['align-content', 'align-items', 'align-self', 'animation', 'animation-delay', 'animation-direction', 'animation-duration', 'animation-fill-mode', 'animation-iteration-count', 'animation-name', '@keyframes', 'animation-play-state', 'animation-timing-function', 'backface-visibility', 'background', 'background-attachment', 'background-clip', 'background-color', 'background-image', 'background-origin', 'background-position', 'background-repeat', 'background-size', 'border', 'border-bottom', 'border-bottom-color', 'border-bottom-left-radius', 'border-bottom-right-radius', 'border-bottom-style', 'border-bottom-width', 'border-collapse', 'border-color', 'border-image', 'border-image-outset', 'border-image-repeat', 'border-image-slice', 'border-image-source', 'border-image-width', 'border-left', 'border-left-color', 'border-left-style', 'border-left-width', 'border-radius', 'border-right', 'border-right-color', 'border-right-style', 'border-right-width', 'border-spacing', 'border-style', 'border-top', 'border-top-color', 'border-top-left-radius', 'border-top-right-radius', 'border-top-style', 'border-top-width', 'border-width', 'bottom', 'box-shadow', 'box-sizing', 'caption-side', 'clear', 'clip', 'color', 'column-count', 'column-fill', 'column-gap', 'column-rule', 'column-rule-color', 'column-rule-style', 'column-rule-width', 'column-span', 'column-width', 'columns', 'column-width', 'column-count', 'content', 'counter-increment', 'counter-reset', 'cursor', 'direction', 'display', 'empty-cells', 'flex', 'flex-basis', 'flex-direction', 'flex-flow', 'flex-direction', 'flex-wrap', 'flex-grow', 'flex-shrink', 'flex-wrap', 'float', 'font', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'height', 'justify-content', 'left', 'letter-spacing', 'line-height', 'list-style', 'list-style-image', 'list-style-position', 'list-style-type', 'margin', 'margin-bottom', 'margin-left', 'margin-right', 'margin-top', 'max-height', 'max-width', 'min-height', 'min-width', 'opacity', 'order', 'outline', 'outline-color', 'outline-offset', 'outline-style', 'outline-width', 'overflow', 'overflow-x', 'overflow-y', 'padding', 'padding-bottom', 'padding-left', 'padding-right', 'padding-top', 'page-break-after', 'page-break-before', 'page-break-inside', 'perspective', 'perspective-origin', 'position', 'quotes', 'resize', 'right', 'tab-size', 'table-layout', 'text-align', 'text-align-last', 'text-align', 'justify', 'text-decoration', 'text-decoration-color', 'text-decoration-line', 'text-decoration-line', 'text-decoration-style', 'text-decoration-line', 'text-indent', 'text-justify', 'text-align', 'justify', 'text-overflow', 'text-shadow', 'text-transform', 'top', 'transform', 'transform-origin', 'transform-style', 'transition', 'transition-delay', 'transition-duration', 'transition-property', 'transition-timing-function', 'vertical-align', 'visibility', 'white-space', 'width', 'word-break', 'word-spacing', 'word-wrap', 'z-index', 'animation', 'animation-delay', 'animation-direction', 'animation-duration', 'animation-fill-mode', 'animation-iteration-count', 'animation-name', '@keyframes', 'animation-play-state', 'animation-timing-function', 'background', 'background-attachment', 'background-clip', 'background-color', 'background-image', 'background-origin', 'background-position', 'background-repeat', 'background-size', 'border', 'border-bottom', 'border-bottom-color', 'border-bottom-left-radius', 'border-bottom-right-radius', 'border-bottom-style', 'border-bottom-width', 'border-color', 'border-image', 'border-image-outset', 'border-image-repeat', 'border-image-slice', 'border-image-source', 'border-image-width', 'border-left', 'border-left-color', 'border-left-style', 'border-left-width', 'border-radius', 'border-right', 'border-right-color', 'border-right-style', 'border-right-width', 'border-style', 'border-top', 'border-top-color', 'border-top-left-radius', 'border-top-right-radius', 'border-top-style', 'border-top-width', 'border-width', 'color', 'opacity', 'height', 'max-height', 'max-width', 'min-height', 'min-width', 'width', 'content', 'quotes', 'counter-reset', 'counter-increment', 'align-content', 'align-items', 'align-self', 'flex', 'flex-basis', 'flex-direction', 'flex-flow', 'flex-direction', 'flex-wrap', 'flex-grow', 'flex-shrink', 'flex-wrap', 'justify-content', 'order', 'font', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'list-style', 'list-style-image', 'list-style-position', 'list-style-type', 'margin', 'margin-bottom', 'margin-left', 'margin-right', 'margin-top', 'column-count', 'column-fill', 'column-gap', 'column-rule', 'column-rule-color', 'column-rule-style', 'column-rule-width', 'column-span', 'column-width', 'columns', 'column-width', 'column-count', 'outline', 'outline-color', 'outline-offset', 'outline-style', 'outline-width', 'padding', 'padding-bottom', 'padding-left', 'padding-right', 'padding-top', 'page-break-after', 'page-break-before', 'page-break-inside', 'border-collapse', 'border-spacing', 'caption-side', 'empty-cells', 'table-layout', 'direction', 'tab-size', 'text-align', 'text-align-last', 'text-align', 'justify', 'text-decoration', 'text-decoration-color', 'text-decoration-line', 'text-decoration-line', 'text-decoration-style', 'text-decoration-line', 'text-indent', 'text-justify', 'text-align', 'justify', 'text-overflow', 'text-shadow', 'text-transform', 'line-height', 'vertical-align', 'letter-spacing', 'word-spacing', 'white-space', 'word-break', 'word-wrap', 'backface-visibility', 'perspective', 'perspective-origin', 'transform', 'transform-origin', 'transform-style', 'transition', 'transition-delay', 'transition-duration', 'transition-property', 'transition-timing-function', 'display', 'position', 'top', 'right', 'bottom', 'left', 'float', 'clear', 'z-index', 'overflow', 'overflow-x', 'overflow-y', 'resize', 'clip', 'visibility', 'cursor', 'box-shadow', 'box-sizing']
| html_tags = ['<!--...-->', '<!DOCTYPE>', '<a>', '<abbr>', '<acronym>', '<address>', '<applet>', '<area>', '<article>', '<aside>', '<audio>', '<b>', '<base>', '<basefont>', '<bdi>', '<bdo>', '<big>', '<blockquote>', '<body>', '<br>', '<button>', '<canvas>', '<caption>', '<center>', '<cite>', '<code>', '<col>', '<colgroup>', '<data>', '<datalist>', '<dd>', '<del>', '<details>', '<dfn>', '<dialog>', '<dir>', '<div>', '<dl>', '<dt>', '<em>', '<embed>', '<fieldset>', '<figcaption>', '<figure>', '<font>', '<footer>', '<form>', '<frame>', '<frameset>', '<h1> to <h6>', '<head>', '<header>', '<hr>', '<html>', '<i>', '<iframe>', '<img>', '<input>', '<ins>', '<kbd>', '<label>', '<legend>', '<li>', '<link>', '<main>', '<map>', '<mark>', '<meta>', '<meter>', '<nav>', '<noframes>', '<noscript>', '<object>', '<ol>', '<optgroup>', '<option>', '<output>', '<p>', '<param>', '<picture>', '<pre>', '<progress>', '<q>', '<rp>', '<rt>', '<ruby>', '<s>', '<samp>', '<script>', '<section>', '<select>', '<small>', '<source>', '<span>', '<strike>', '<strong>', '<style>', '<sub>', '<summary>', '<sup>', '<svg>', '<table>', '<tbody>', '<td>', '<template>', '<textarea>', '<tfoot>', '<th>', '<thead>', '<time>', '<title>', '<tr>', '<track>', '<tt>', '<u>', '<ul>', '<var>', '<video>', '<wbr>']
html_tags_stripped = ['!--...--', '!DOCTYPE', 'a', 'abbr', 'acronym', 'address', 'applet', 'area', 'article', 'aside', 'audio', 'b', 'base', 'basefont', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'frame', 'frameset', 'h1 to h6', 'head', 'header', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'meta', 'meter', 'nav', 'noframes', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'svg', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']
all_attributes_list = ['accept', 'accept-charset', 'accesskey', 'action', 'alt', 'async', 'autocomplete', 'autofocus', 'autoplay', 'charset', 'checked', 'cite', 'class', 'cols', 'colspan', 'contenteditable', 'controls', 'coords', 'data', 'data-*', 'datetime', 'default', 'defer', 'dir', 'dirname', 'disabled', 'download', 'draggable', 'enctype', 'for', 'form', 'formaction', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'http-equiv', 'id', 'ismap', 'kind', 'label', 'lang', 'list', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'multiple', 'muted', 'name', 'novalidate', 'onabort', 'onafterprint', 'onbeforeprint', 'onbeforeunload', 'onblur', 'oncanplay', 'oncanplaythrough', 'onchange', 'onclick', 'oncontextmenu', 'oncopy', 'oncuechange', 'oncut', 'ondblclick', 'ondrag', 'ondragend', 'ondragenter', 'ondragleave', 'ondragover', 'ondragstart', 'ondrop', 'ondurationchange', 'onemptied', 'onended', 'onerror', 'onfocus', 'onhashchange', 'oninput', 'oninvalid', 'onkeydown', 'onkeypress', 'onkeyup', 'onload', 'onloadeddata', 'onloadedmetadata', 'onloadstart', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onmousewheel', 'onoffline', 'ononline', 'onpagehide', 'onpageshow', 'onpaste', 'onpause', 'onplay', 'onplaying', 'onpopstate', 'onprogress', 'onratechange', 'onreset', 'onresize', 'onscroll', 'onsearch', 'onseeked', 'onseeking', 'onselect', 'onstalled', 'onstorage', 'onsubmit', 'onsuspend', 'ontimeupdate', 'ontoggle', 'onunload', 'onvolumechange', 'onwaiting', 'onwheel', 'open', 'optimum', 'pattern', 'placeholder', 'poster', 'preload', 'readonly', 'rel', 'required', 'reversed', 'rows', 'rowspan', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'spellcheck', 'src', 'srcdoc', 'srclang', 'srcset', 'start', 'step', 'style', 'tabindex', 'target', 'title', 'translate', 'type', 'usemap', 'value', 'width', 'wrap']
attributes = {'accept': ['<input />'], 'accept-charset': ['<form>'], 'accesskey': ['global attribute'], 'action': ['<form>'], 'alt': ['<area />', '<img />', '<input />'], 'async': ['<script>'], 'autocomplete': ['<form>', '<input />'], 'autofocus': ['<button>', '<input />', '<select>', '<textarea>'], 'autoplay': ['<audio>', '<video>'], 'charset': ['<meta />', '<script>'], 'checked': ['<input />'], 'cite': ['<blockquote>', '<del>', '<ins>', '<q>'], 'class': ['global attribute'], 'cols': ['<textarea>'], 'colspan': ['<td>', '<th>'], 'contenteditable': ['global attribute'], 'controls': ['<audio>', '<video>'], 'coords': ['<area />'], 'data': ['<object>'], 'data-*': ['global attribute'], 'datetime': ['<del>', '<ins>', '<time>'], 'default': ['<track />'], 'defer': ['<script>'], 'dir': ['global attribute'], 'dirname': ['<input />', '<textarea>'], 'disabled': ['<button>', '<fieldset>', '<input />', '<optgroup>', '<option>', '<select>', '<textarea>'], 'download': ['<a>', '<area />'], 'draggable': ['global attribute'], 'enctype': ['<form>'], 'for': ['<label>', '<output>'], 'form': ['<button>', '<fieldset>', '<input />', '<label>', '<meter>', '<object>', '<output>', '<select>', '<textarea>'], 'formaction': ['<button>', '<input />'], 'headers': ['<td>', '<th>'], 'height': ['<canvas>', '<embed />', '<iframe>', '<img />', '<input />', '<object>', '<video>'], 'hidden': ['global attribute'], 'high': ['<meter>'], 'href': ['<a>', '<area />', '<base />', '<link />'], 'hreflang': ['<a>', '<area />', '<link />'], 'http-equiv': ['<meta />'], 'id': ['global attribute'], 'ismap': ['<img />'], 'kind': ['<track />'], 'label': ['<track />', '<option>', '<optgroup>'], 'lang': ['global attribute'], 'list': ['<input />'], 'loop': ['<audio>', '<video>'], 'low': ['<meter>'], 'max': ['<input />', '<meter>', '<progress>'], 'maxlength': ['<input />', '<textarea>'], 'media': ['<a>', '<area />', '<link />', '<source />', '<style>'], 'method': ['<form>'], 'min': ['<input />', '<meter>'], 'multiple': ['<input />', '<select>'], 'muted': ['<video>', '<audio>'], 'name': ['<button>', '<fieldset>', '<form>', '<iframe>', '<input />', '<map>', '<meta />', '<object>', '<output>', '<param />', '<select>', '<textarea>'], 'novalidate': ['<form>'], 'onabort': ['<audio>', '<embed />', '<img />', '<object>', '<video>'], 'onafterprint': ['<body>'], 'onbeforeprint': ['<body>'], 'onbeforeunload': ['<body>'], 'onblur': ['All visible'], 'oncanplay': ['<audio>', '<embed />', '<object>', '<video>'], 'oncanplaythrough': ['<audio>', '<video>'], 'onchange': ['All visible'], 'onclick': ['All visible'], 'oncontextmenu': ['All visible'], 'oncopy': ['All visible'], 'oncuechange': ['<track />'], 'oncut': ['All visible'], 'ondblclick': ['All visible'], 'ondrag': ['All visible'], 'ondragend': ['All visible'], 'ondragenter': ['All visible'], 'ondragleave': ['All visible'], 'ondragover': ['All visible'], 'ondragstart': ['All visible'], 'ondrop': ['All visible'], 'ondurationchange': ['<audio>', '<video>'], 'onemptied': ['<audio>', '<video>'], 'onended': ['<audio>', '<video>'], 'onerror': ['<audio>', '<body>', '<embed />', '<img />', '<object>', '<script>', '<style>', '<video>'], 'onfocus': ['All visible'], 'onhashchange': ['<body>'], 'oninput': ['All visible'], 'oninvalid': ['All visible'], 'onkeydown': ['All visible'], 'onkeypress': ['All visible'], 'onkeyup': ['All visible'], 'onload': ['<body>', '<iframe>', '<img />', '<input />', '<link />', '<script>', '<style>'], 'onloadeddata': ['<audio>', '<video>'], 'onloadedmetadata': ['<audio>', '<video>'], 'onloadstart': ['<audio>', '<video>'], 'onmousedown': ['All visible'], 'onmousemove': ['All visible'], 'onmouseout': ['All visible'], 'onmouseover': ['All visible'], 'onmouseup': ['All visible'], 'onmousewheel': ['All visible'], 'onoffline': ['<body>'], 'ononline': ['<body>'], 'onpagehide': ['<body>'], 'onpageshow': ['<body>'], 'onpaste': ['All visible'], 'onpause': ['<audio>', '<video>'], 'onplay': ['<audio>', '<video>'], 'onplaying': ['<audio>', '<video>'], 'onpopstate': ['<body>'], 'onprogress': ['<audio>', '<video>'], 'onratechange': ['<audio>', '<video>'], 'onreset': ['<form>'], 'onresize': ['<body>'], 'onscroll': ['All visible'], 'onsearch': ['<input />'], 'onseeked': ['<audio>', '<video>'], 'onseeking': ['<audio>', '<video>'], 'onselect': ['All visible'], 'onstalled': ['<audio>', '<video>'], 'onstorage': ['<body>'], 'onsubmit': ['<form>'], 'onsuspend': ['<audio>', '<video>'], 'ontimeupdate': ['<audio>', '<video>'], 'ontoggle': ['<details>'], 'onunload': ['<body>'], 'onvolumechange': ['<audio>', '<video>'], 'onwaiting': ['<audio>', '<video>'], 'onwheel': ['All visible'], 'open': ['<details>'], 'optimum': ['<meter>'], 'pattern': ['<input />'], 'placeholder': ['<input />', '<textarea>'], 'poster': ['<video>'], 'preload': ['<audio>', '<video>'], 'readonly': ['<input />', '<textarea>'], 'rel': ['<a>', '<area />', '<form>', '<link />'], 'required': ['<input />', '<select>', '<textarea>'], 'reversed': ['<ol>'], 'rows': ['<textarea>'], 'rowspan': ['<td>', '<th>'], 'scope': ['<th>'], 'selected': ['<option>'], 'shape': ['<area />'], 'size': ['<input />', '<select>'], 'sizes': ['<img />', '<link />', '<source />'], 'span': ['<col />', '<colgroup>'], 'spellcheck': ['global attribute'], 'src': ['<audio>', '<embed />', '<iframe>', '<img />', '<input />', '<script>', '<source />', '<track />', '<video>'], 'srcdoc': ['<iframe>'], 'srclang': ['<track />'], 'srcset': ['<img />', '<source />'], 'start': ['<ol>'], 'step': ['<input />'], 'style': ['global attribute'], 'tabindex': ['global attribute'], 'target': ['<a>', '<area />', '<base />', '<form>'], 'title': ['global attribute'], 'translate': ['global attribute'], 'type': ['<a>', '<button>', '<embed />', '<input />', '<link />', '<menu>', '<object>', '<script>', '<source />', '<style>'], 'usemap': ['<img />', '<object>'], 'value': ['<button>', '<input />', '<li>', '<option>', '<meter>', '<progress>', '<param />'], 'width': ['<canvas>', '<embed />', '<iframe>', '<img />', '<input />', '<object>', '<video>'], 'wrap': ['<textarea>']}
html_tags_incl_attributes = {'<!--...-->': [], '<!DOCTYPE>': [], '<a>': ['download', 'href', 'hreflang', 'media', 'rel', 'target', 'type'], '<abbr>': [], '<acronym>': [], '<address>': [], '<applet>': [], '<article>': [], '<aside>': [], '<audio>': ['autoplay', 'controls', 'loop', 'muted', 'onabort', 'oncanplay', 'oncanplaythrough', 'ondurationchange', 'onemptied', 'onended', 'onerror', 'onloadeddata', 'onloadedmetadata', 'onloadstart', 'onpause', 'onplay', 'onplaying', 'onprogress', 'onratechange', 'onseeked', 'onseeking', 'onstalled', 'onsuspend', 'ontimeupdate', 'onvolumechange', 'onwaiting', 'preload', 'src'], '<b>': [], '<basefont>': [], '<bdi>': [], '<bdo>': [], '<big>': [], '<blockquote>': ['cite'], '<body>': ['onafterprint', 'onbeforeprint', 'onbeforeunload', 'onerror', 'onhashchange', 'onload', 'onoffline', 'ononline', 'onpagehide', 'onpageshow', 'onpopstate', 'onresize', 'onstorage', 'onunload'], '<button>': ['autofocus', 'disabled', 'form', 'formaction', 'name', 'type', 'value'], '<canvas>': ['height', 'width'], '<caption>': [], '<center>': [], '<cite>': [], '<code>': [], '<colgroup>': ['span'], '<data>': [], '<datalist>': [], '<dd>': [], '<del>': ['cite', 'datetime'], '<details>': ['ontoggle', 'open'], '<dfn>': [], '<dialog>': [], '<dir>': [], '<div>': [], '<dl>': [], '<dt>': [], '<em>': [], '<fieldset>': ['disabled', 'form', 'name'], '<figcaption>': [], '<figure>': [], '<font>': [], '<footer>': [], '<form>': ['accept-charset', 'action', 'autocomplete', 'enctype', 'method', 'name', 'novalidate', 'onreset', 'onsubmit', 'rel', 'target'], '<frame>': [], '<frameset>': [], '<h1> to <h6>': [], '<head>': [], '<header>': [], '<html>': [], '<i>': [], '<iframe>': ['height', 'name', 'onload', 'src', 'srcdoc', 'width'], '<ins>': ['cite', 'datetime'], '<kbd>': [], '<label>': ['for', 'form'], '<legend>': [], '<li>': ['value'], '<main>': [], '<map>': ['name'], '<mark>': [], '<meter>': ['form', 'high', 'low', 'max', 'min', 'optimum', 'value'], '<nav>': [], '<noframes>': [], '<noscript>': [], '<object>': ['data', 'form', 'height', 'name', 'onabort', 'oncanplay', 'onerror', 'type', 'usemap', 'width'], '<ol>': ['reversed', 'start'], '<optgroup>': ['disabled', 'label'], '<option>': ['disabled', 'label', 'selected', 'value'], '<output>': ['for', 'form', 'name'], '<p>': [], '<picture>': [], '<pre>': [], '<progress>': ['max', 'value'], '<q>': ['cite'], '<rp>': [], '<rt>': [], '<ruby>': [], '<s>': [], '<samp>': [], '<script>': ['async', 'charset', 'defer', 'onerror', 'onload', 'src', 'type'], '<section>': [], '<select>': ['autofocus', 'disabled', 'form', 'multiple', 'name', 'required', 'size'], '<small>': [], '<span>': [], '<strike>': [], '<strong>': [], '<style>': ['media', 'onerror', 'onload', 'type'], '<sub>': [], '<summary>': [], '<sup>': [], '<svg>': [], '<table>': [], '<tbody>': [], '<td>': ['colspan', 'headers', 'rowspan'], '<template>': [], '<textarea>': ['autofocus', 'cols', 'dirname', 'disabled', 'form', 'maxlength', 'name', 'placeholder', 'readonly', 'required', 'rows', 'wrap'], '<tfoot>': [], '<th>': ['colspan', 'headers', 'rowspan', 'scope'], '<thead>': [], '<time>': ['datetime'], '<title>': [], '<tr>': [], '<tt>': [], '<u>': [], '<ul>': [], '<var>': [], '<video>': ['autoplay', 'controls', 'height', 'loop', 'muted', 'onabort', 'oncanplay', 'oncanplaythrough', 'ondurationchange', 'onemptied', 'onended', 'onerror', 'onloadeddata', 'onloadedmetadata', 'onloadstart', 'onpause', 'onplay', 'onplaying', 'onprogress', 'onratechange', 'onseeked', 'onseeking', 'onstalled', 'onsuspend', 'ontimeupdate', 'onvolumechange', 'onwaiting', 'poster', 'preload', 'src', 'width'], '<area />': ['alt', 'coords', 'download', 'href', 'hreflang', 'media', 'rel', 'shape', 'target'], '<base />': ['href', 'target'], '<br />': [], '<col />': ['span'], '<embed />': ['height', 'onabort', 'oncanplay', 'onerror', 'src', 'type', 'width'], '<hr />': [], '<img />': ['alt', 'height', 'ismap', 'onabort', 'onerror', 'onload', 'sizes', 'src', 'srcset', 'usemap', 'width'], '<input />': ['accept', 'alt', 'autocomplete', 'autofocus', 'checked', 'dirname', 'disabled', 'form', 'formaction', 'height', 'list', 'max', 'maxlength', 'min', 'multiple', 'name', 'onload', 'onsearch', 'pattern', 'placeholder', 'readonly', 'required', 'size', 'src', 'step', 'type', 'value', 'width'], '<link />': ['href', 'hreflang', 'media', 'onload', 'rel', 'sizes', 'type'], '<meta />': ['charset', 'http-equiv', 'name'], '<param />': ['name', 'value'], '<source />': ['media', 'sizes', 'src', 'srcset', 'type'], '<track />': ['default', 'kind', 'label', 'oncuechange', 'src', 'srclang'], '<wbr />': []}
global_attributes = ['accesskey', 'class', 'contenteditable', 'data-*', 'dir', 'draggable', 'hidden', 'id', 'lang', 'onblur', 'onchange', 'onclick', 'oncontextmenu', 'oncopy', 'oncut', 'ondblclick', 'ondrag', 'ondragend', 'ondragenter', 'ondragleave', 'ondragover', 'ondragstart', 'ondrop', 'onfocus', 'oninput', 'oninvalid', 'onkeydown', 'onkeypress', 'onkeyup', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onmousewheel', 'onpaste', 'onscroll', 'onselect', 'onwheel', 'spellcheck', 'style', 'tabindex', 'title', 'translate']
self_closing_tags = ['<area />', '<base />', '<br />', '<col />', '<embed />', '<hr />', '<img />', '<input />', '<link />', '<meta />', '<param />', '<source />', '<track />', '<wbr />']
self_closer = [['<area />', '<area>'], ['<base />', '<base>'], ['<br />', '<br>'], ['<col />', '<col>'], ['<embed />', '<embed>'], ['<hr />', '<hr>'], ['<img />', '<img>'], ['<input />', '<input>'], ['<link />', '<link>'], ['<meta />', '<meta>'], ['<param />', '<param>'], ['<source />', '<source>'], ['<track />', '<track>'], ['<wbr />', '<wbr>']]
css_properties = ['align-content', 'align-items', 'align-self', 'animation', 'animation-delay', 'animation-direction', 'animation-duration', 'animation-fill-mode', 'animation-iteration-count', 'animation-name', '@keyframes', 'animation-play-state', 'animation-timing-function', 'backface-visibility', 'background', 'background-attachment', 'background-clip', 'background-color', 'background-image', 'background-origin', 'background-position', 'background-repeat', 'background-size', 'border', 'border-bottom', 'border-bottom-color', 'border-bottom-left-radius', 'border-bottom-right-radius', 'border-bottom-style', 'border-bottom-width', 'border-collapse', 'border-color', 'border-image', 'border-image-outset', 'border-image-repeat', 'border-image-slice', 'border-image-source', 'border-image-width', 'border-left', 'border-left-color', 'border-left-style', 'border-left-width', 'border-radius', 'border-right', 'border-right-color', 'border-right-style', 'border-right-width', 'border-spacing', 'border-style', 'border-top', 'border-top-color', 'border-top-left-radius', 'border-top-right-radius', 'border-top-style', 'border-top-width', 'border-width', 'bottom', 'box-shadow', 'box-sizing', 'caption-side', 'clear', 'clip', 'color', 'column-count', 'column-fill', 'column-gap', 'column-rule', 'column-rule-color', 'column-rule-style', 'column-rule-width', 'column-span', 'column-width', 'columns', 'column-width', 'column-count', 'content', 'counter-increment', 'counter-reset', 'cursor', 'direction', 'display', 'empty-cells', 'flex', 'flex-basis', 'flex-direction', 'flex-flow', 'flex-direction', 'flex-wrap', 'flex-grow', 'flex-shrink', 'flex-wrap', 'float', 'font', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'height', 'justify-content', 'left', 'letter-spacing', 'line-height', 'list-style', 'list-style-image', 'list-style-position', 'list-style-type', 'margin', 'margin-bottom', 'margin-left', 'margin-right', 'margin-top', 'max-height', 'max-width', 'min-height', 'min-width', 'opacity', 'order', 'outline', 'outline-color', 'outline-offset', 'outline-style', 'outline-width', 'overflow', 'overflow-x', 'overflow-y', 'padding', 'padding-bottom', 'padding-left', 'padding-right', 'padding-top', 'page-break-after', 'page-break-before', 'page-break-inside', 'perspective', 'perspective-origin', 'position', 'quotes', 'resize', 'right', 'tab-size', 'table-layout', 'text-align', 'text-align-last', 'text-align', 'justify', 'text-decoration', 'text-decoration-color', 'text-decoration-line', 'text-decoration-line', 'text-decoration-style', 'text-decoration-line', 'text-indent', 'text-justify', 'text-align', 'justify', 'text-overflow', 'text-shadow', 'text-transform', 'top', 'transform', 'transform-origin', 'transform-style', 'transition', 'transition-delay', 'transition-duration', 'transition-property', 'transition-timing-function', 'vertical-align', 'visibility', 'white-space', 'width', 'word-break', 'word-spacing', 'word-wrap', 'z-index', 'animation', 'animation-delay', 'animation-direction', 'animation-duration', 'animation-fill-mode', 'animation-iteration-count', 'animation-name', '@keyframes', 'animation-play-state', 'animation-timing-function', 'background', 'background-attachment', 'background-clip', 'background-color', 'background-image', 'background-origin', 'background-position', 'background-repeat', 'background-size', 'border', 'border-bottom', 'border-bottom-color', 'border-bottom-left-radius', 'border-bottom-right-radius', 'border-bottom-style', 'border-bottom-width', 'border-color', 'border-image', 'border-image-outset', 'border-image-repeat', 'border-image-slice', 'border-image-source', 'border-image-width', 'border-left', 'border-left-color', 'border-left-style', 'border-left-width', 'border-radius', 'border-right', 'border-right-color', 'border-right-style', 'border-right-width', 'border-style', 'border-top', 'border-top-color', 'border-top-left-radius', 'border-top-right-radius', 'border-top-style', 'border-top-width', 'border-width', 'color', 'opacity', 'height', 'max-height', 'max-width', 'min-height', 'min-width', 'width', 'content', 'quotes', 'counter-reset', 'counter-increment', 'align-content', 'align-items', 'align-self', 'flex', 'flex-basis', 'flex-direction', 'flex-flow', 'flex-direction', 'flex-wrap', 'flex-grow', 'flex-shrink', 'flex-wrap', 'justify-content', 'order', 'font', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'list-style', 'list-style-image', 'list-style-position', 'list-style-type', 'margin', 'margin-bottom', 'margin-left', 'margin-right', 'margin-top', 'column-count', 'column-fill', 'column-gap', 'column-rule', 'column-rule-color', 'column-rule-style', 'column-rule-width', 'column-span', 'column-width', 'columns', 'column-width', 'column-count', 'outline', 'outline-color', 'outline-offset', 'outline-style', 'outline-width', 'padding', 'padding-bottom', 'padding-left', 'padding-right', 'padding-top', 'page-break-after', 'page-break-before', 'page-break-inside', 'border-collapse', 'border-spacing', 'caption-side', 'empty-cells', 'table-layout', 'direction', 'tab-size', 'text-align', 'text-align-last', 'text-align', 'justify', 'text-decoration', 'text-decoration-color', 'text-decoration-line', 'text-decoration-line', 'text-decoration-style', 'text-decoration-line', 'text-indent', 'text-justify', 'text-align', 'justify', 'text-overflow', 'text-shadow', 'text-transform', 'line-height', 'vertical-align', 'letter-spacing', 'word-spacing', 'white-space', 'word-break', 'word-wrap', 'backface-visibility', 'perspective', 'perspective-origin', 'transform', 'transform-origin', 'transform-style', 'transition', 'transition-delay', 'transition-duration', 'transition-property', 'transition-timing-function', 'display', 'position', 'top', 'right', 'bottom', 'left', 'float', 'clear', 'z-index', 'overflow', 'overflow-x', 'overflow-y', 'resize', 'clip', 'visibility', 'cursor', 'box-shadow', 'box-sizing'] |
class cacheFilesManager:
configFile = False
cacheRootPath = ''
cacheFileExtension = '.dat'
resourcesRootPath = ''
def createCacheFiles (self, fileInfo):
raise NotImplementedError
def deleteCacheFiles (self, fileInfo):
raise NotImplementedError
def getCacheFile (self, fileUID, chunkNumber):
raise NotImplementedError
def setChunkContent (self, fileUID, chunkNumber, content):
raise NotImplementedError
def restoreFileFromCache (self, fileInfo):
raise NotImplementedError
def copyFileIntoChunks (self, cachedFileInfo):
raise NotImplementedError
def writeChunkContent (self, content, fileName):
raise NotImplementedError
| class Cachefilesmanager:
config_file = False
cache_root_path = ''
cache_file_extension = '.dat'
resources_root_path = ''
def create_cache_files(self, fileInfo):
raise NotImplementedError
def delete_cache_files(self, fileInfo):
raise NotImplementedError
def get_cache_file(self, fileUID, chunkNumber):
raise NotImplementedError
def set_chunk_content(self, fileUID, chunkNumber, content):
raise NotImplementedError
def restore_file_from_cache(self, fileInfo):
raise NotImplementedError
def copy_file_into_chunks(self, cachedFileInfo):
raise NotImplementedError
def write_chunk_content(self, content, fileName):
raise NotImplementedError |
# Python - 3.4.3
def circleArea(r):
return (type(r) in [int, float]) and (r > 0) and round(r * r * 3.141592653589793, 2)
| def circle_area(r):
return type(r) in [int, float] and r > 0 and round(r * r * 3.141592653589793, 2) |
response = 'yes','no'
print(response)
('yes', 'no')
if input('control!') == response:
print('DESIST!')
| response = ('yes', 'no')
print(response)
('yes', 'no')
if input('control!') == response:
print('DESIST!') |
# Description: Unpack into I(+) and I(-) for a specified Miller array.
# Source: NA
"""
Iobs = miller_arrays[${1:0}]
i_plus, i_minus = Iobs.hemispheres_acentrics()
ipd = i_plus.data()
ip=list(ipd)
imd = i_minus.data()
im = list(imd)
len(im)
Iobs.show_summary()
print(Iobs.info())
print(Iobs.observation_type())
"""
Iobs = miller_arrays[0]
i_plus, i_minus = Iobs.hemispheres_acentrics()
ipd = i_plus.data()
ip=list(ipd)
imd = i_minus.data()
im = list(imd)
len(im)
Iobs.show_summary()
print(Iobs.info())
print(Iobs.observation_type())
| """
Iobs = miller_arrays[${1:0}]
i_plus, i_minus = Iobs.hemispheres_acentrics()
ipd = i_plus.data()
ip=list(ipd)
imd = i_minus.data()
im = list(imd)
len(im)
Iobs.show_summary()
print(Iobs.info())
print(Iobs.observation_type())
"""
iobs = miller_arrays[0]
(i_plus, i_minus) = Iobs.hemispheres_acentrics()
ipd = i_plus.data()
ip = list(ipd)
imd = i_minus.data()
im = list(imd)
len(im)
Iobs.show_summary()
print(Iobs.info())
print(Iobs.observation_type()) |
def main():
char = ['zero','one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']
num = list(input())
sum =0
for i in range(0,len(num)): sum=sum+int(num[i])
sum = str(sum)
for i in range(0,len(sum)):
print(char[int(sum[i])],end='')
if i!= len(sum)-1:
print(' ',end='')
main() | def main():
char = ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']
num = list(input())
sum = 0
for i in range(0, len(num)):
sum = sum + int(num[i])
sum = str(sum)
for i in range(0, len(sum)):
print(char[int(sum[i])], end='')
if i != len(sum) - 1:
print(' ', end='')
main() |
# -*- coding: utf-8 -*-
nome = input()
salario = input()
vendas = input()
salario, vendas = float(salario), float(vendas)
print("TOTAL = R$ %.2f" % float(salario + (vendas*0.15)))
| nome = input()
salario = input()
vendas = input()
(salario, vendas) = (float(salario), float(vendas))
print('TOTAL = R$ %.2f' % float(salario + vendas * 0.15)) |
#coding=utf-8
def evaluate():
print('eval')
return 1
maxEvalScore = 0
a1, a2, a3, a, b = 1.0, 1.0, 1.0, 1.0, 1.0
for index, var in enumerate([a1, a2, a3, a, b]):
for k in range(10, 0, -1):
# m = var
var = k / 10
m = [a1, a2, a3, a, b][index]
[a1, a2, a3, a, b][index] = k / 10
print([a1, a2, a3, a, b])
evalScore = evaluate()
if maxEvalScore < evalScore:
maxEvalScore = evalScore
[a1, a2, a3, a, b][index] = m
initval = 1.0
# a[5] = [initval for i in range(5)]
a = [1.0, 1.0, 1.0, 1.0, 1.0]
for index in range(5):
for k in range(10, 0, -1):
var = k/10
m = a[index]
a[index] = k / 10
print(a)
evalScore = evaluate()
if maxEvalScore < evalScore:
maxEvalScore = evalScore
a[index] = m
| def evaluate():
print('eval')
return 1
max_eval_score = 0
(a1, a2, a3, a, b) = (1.0, 1.0, 1.0, 1.0, 1.0)
for (index, var) in enumerate([a1, a2, a3, a, b]):
for k in range(10, 0, -1):
var = k / 10
m = [a1, a2, a3, a, b][index]
[a1, a2, a3, a, b][index] = k / 10
print([a1, a2, a3, a, b])
eval_score = evaluate()
if maxEvalScore < evalScore:
max_eval_score = evalScore
[a1, a2, a3, a, b][index] = m
initval = 1.0
a = [1.0, 1.0, 1.0, 1.0, 1.0]
for index in range(5):
for k in range(10, 0, -1):
var = k / 10
m = a[index]
a[index] = k / 10
print(a)
eval_score = evaluate()
if maxEvalScore < evalScore:
max_eval_score = evalScore
a[index] = m |
playerage = 9
if playerage>10:
print("You are too old to play this game")
if playerage<8:
print("You are too young to play this game") | playerage = 9
if playerage > 10:
print('You are too old to play this game')
if playerage < 8:
print('You are too young to play this game') |
"""
The MIT License (MIT)
Copyright (c) 2017 Johan Kanflo (github.com/kanflo)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
"""
_SOF = 0x7e
_DLE = 0x7d
_XOR = 0x20
_EOF = 0x7f
# Errors returned by uframe_unescape(...)
E_LEN = 1 # Received frame is too short to be a uframe
E_FRM = 2 # Received data has no framing
E_CRC = 3 # CRC mismatch
def crc16_ccitt(crc, data):
"""
https://stackoverflow.com/a/30357446
"""
msb = crc >> 8
lsb = crc & 255
x = data ^ msb
x ^= (x >> 4)
msb = (lsb ^ (x >> 3) ^ (x << 4)) & 255
lsb = (x ^ (x << 5)) & 255
return (msb << 8) + lsb
class uFrame(object):
"""
Describes a class for simple serial protocols
"""
_valid = False
_crc = 0
_frame = None
_unpack_pos = 0
def __init__(self):
self._frame = bytearray()
self._frame.append(_SOF)
self._crc = 0
def pack8(self, byte, update_crc=True):
"""
Pack a byte into the frame, update CRC
"""
byte &= 0xff
if update_crc:
self._crc = crc16_ccitt(self._crc, byte)
if byte in [_SOF, _DLE, _EOF]:
self._frame.append(_DLE)
self._frame.append(byte ^ _XOR)
else:
self._frame.append(byte)
def pack_cstr(self, str):
for ch in str:
self.pack8(ord(ch))
self.pack8(0)
def pack16(self, halfword):
halfword &= 0xffff
h1 = (halfword >> 8) & 0xff
h2 = halfword & 0xff
self.pack8(h1)
self.pack8(h2)
def pack32(self, word):
word &= 0xffffffff
self.pack8((word >> 24) & 0xff)
self.pack8((word >> 16) & 0xff)
self.pack8((word >> 8) & 0xff)
self.pack8((word >> 0) & 0xff)
def end(self):
"""
End packing
"""
crc1 = (self._crc >> 8) & 0xff
crc2 = self._crc & 0xff
self.pack8(crc1, False)
self.pack8(crc2, False)
self._frame.append(_EOF)
self._valid = True
def get_frame(self):
"""
Return frame binary data
"""
return self._frame
def set_frame(self, escaped_frame):
"""
Set frame to given (escaped) frame, unescape, check crc and extract payload
Return -E_* if error or 0 if frame is valid.
"""
self._frame = escaped_frame
res = self._unescape()
if res == 0:
res = self._calc_crc()
return res
def frame_str(self):
"""
Return a string describing the data in the frame
"""
return ' '.join(format(x, '02x') for x in self._frame)
def _unescape(self):
"""
Unescape frame data (internal function)
"""
length = len(self._frame)
if length < 4:
return -E_LEN
if self._frame[0] != _SOF or self._frame[length - 1] != _EOF:
return -E_FRM
f = bytearray()
seen_dle = False
for b in self._frame:
if b == _DLE:
seen_dle = True
elif seen_dle:
f.append(b ^ _XOR)
seen_dle = False
else:
f.append(b)
self._frame = f[1:-1]
return 0
def _calc_crc(self):
"""
Check crc of frame data and chop crc off payload if valid (internal function)
"""
self._crc = 0
for b in self._frame[:-2]:
self._crc = crc16_ccitt(self._crc, b)
self._crc &= 0xffff
crc = (self._frame[-2] << 8) | self._frame[-1]
self._valid = crc == self._crc
if not self._valid:
return -E_CRC
else:
self._frame = self._frame[:-2] # Chop of crc
return 0
def unpack8(self):
b = self._frame[self._unpack_pos]
self._unpack_pos += 1
return b
def unpacks8(self):
"""
Unpack signed 8 bit
"""
b = self._frame[self._unpack_pos]
self._unpack_pos += 1
if b == 0:
return 0
return b - 256
def unpack16(self):
h = self.unpack8() << 8 | self.unpack8()
return h
def unpack32(self):
h = self.unpack8() << 24 | self.unpack8() << 16 | self.unpack8() << 8 | self.unpack8()
return h
def unpack_cstr(self):
string = ""
if self._unpack_pos < len(self._frame):
b = self._frame[self._unpack_pos]
self._unpack_pos += 1
while self._unpack_pos < len(self._frame) and b != 0:
string += '{:c}'.format(b)
b = self._frame[self._unpack_pos]
self._unpack_pos += 1
return string
def eof(self):
return self._unpack_pos >= len(self._frame)
| """
The MIT License (MIT)
Copyright (c) 2017 Johan Kanflo (github.com/kanflo)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
"""
_sof = 126
_dle = 125
_xor = 32
_eof = 127
e_len = 1
e_frm = 2
e_crc = 3
def crc16_ccitt(crc, data):
"""
https://stackoverflow.com/a/30357446
"""
msb = crc >> 8
lsb = crc & 255
x = data ^ msb
x ^= x >> 4
msb = (lsb ^ x >> 3 ^ x << 4) & 255
lsb = (x ^ x << 5) & 255
return (msb << 8) + lsb
class Uframe(object):
"""
Describes a class for simple serial protocols
"""
_valid = False
_crc = 0
_frame = None
_unpack_pos = 0
def __init__(self):
self._frame = bytearray()
self._frame.append(_SOF)
self._crc = 0
def pack8(self, byte, update_crc=True):
"""
Pack a byte into the frame, update CRC
"""
byte &= 255
if update_crc:
self._crc = crc16_ccitt(self._crc, byte)
if byte in [_SOF, _DLE, _EOF]:
self._frame.append(_DLE)
self._frame.append(byte ^ _XOR)
else:
self._frame.append(byte)
def pack_cstr(self, str):
for ch in str:
self.pack8(ord(ch))
self.pack8(0)
def pack16(self, halfword):
halfword &= 65535
h1 = halfword >> 8 & 255
h2 = halfword & 255
self.pack8(h1)
self.pack8(h2)
def pack32(self, word):
word &= 4294967295
self.pack8(word >> 24 & 255)
self.pack8(word >> 16 & 255)
self.pack8(word >> 8 & 255)
self.pack8(word >> 0 & 255)
def end(self):
"""
End packing
"""
crc1 = self._crc >> 8 & 255
crc2 = self._crc & 255
self.pack8(crc1, False)
self.pack8(crc2, False)
self._frame.append(_EOF)
self._valid = True
def get_frame(self):
"""
Return frame binary data
"""
return self._frame
def set_frame(self, escaped_frame):
"""
Set frame to given (escaped) frame, unescape, check crc and extract payload
Return -E_* if error or 0 if frame is valid.
"""
self._frame = escaped_frame
res = self._unescape()
if res == 0:
res = self._calc_crc()
return res
def frame_str(self):
"""
Return a string describing the data in the frame
"""
return ' '.join((format(x, '02x') for x in self._frame))
def _unescape(self):
"""
Unescape frame data (internal function)
"""
length = len(self._frame)
if length < 4:
return -E_LEN
if self._frame[0] != _SOF or self._frame[length - 1] != _EOF:
return -E_FRM
f = bytearray()
seen_dle = False
for b in self._frame:
if b == _DLE:
seen_dle = True
elif seen_dle:
f.append(b ^ _XOR)
seen_dle = False
else:
f.append(b)
self._frame = f[1:-1]
return 0
def _calc_crc(self):
"""
Check crc of frame data and chop crc off payload if valid (internal function)
"""
self._crc = 0
for b in self._frame[:-2]:
self._crc = crc16_ccitt(self._crc, b)
self._crc &= 65535
crc = self._frame[-2] << 8 | self._frame[-1]
self._valid = crc == self._crc
if not self._valid:
return -E_CRC
else:
self._frame = self._frame[:-2]
return 0
def unpack8(self):
b = self._frame[self._unpack_pos]
self._unpack_pos += 1
return b
def unpacks8(self):
"""
Unpack signed 8 bit
"""
b = self._frame[self._unpack_pos]
self._unpack_pos += 1
if b == 0:
return 0
return b - 256
def unpack16(self):
h = self.unpack8() << 8 | self.unpack8()
return h
def unpack32(self):
h = self.unpack8() << 24 | self.unpack8() << 16 | self.unpack8() << 8 | self.unpack8()
return h
def unpack_cstr(self):
string = ''
if self._unpack_pos < len(self._frame):
b = self._frame[self._unpack_pos]
self._unpack_pos += 1
while self._unpack_pos < len(self._frame) and b != 0:
string += '{:c}'.format(b)
b = self._frame[self._unpack_pos]
self._unpack_pos += 1
return string
def eof(self):
return self._unpack_pos >= len(self._frame) |
class Token:
def __init__(self, token_type, text_position, byte_position, value=None):
self.type = token_type
self.text_position = text_position
self.byte_position = byte_position
self.value = value
| class Token:
def __init__(self, token_type, text_position, byte_position, value=None):
self.type = token_type
self.text_position = text_position
self.byte_position = byte_position
self.value = value |
"""
You are given an array arr having n integers. You have to find the maximum sum of contiguous subarray among all the
possible subarrays.
This problem is commonly called as Maximum Subarray Problem. Solve this problem in O(n logn) time, using Divide and
Conquer approach.
"""
def maxCrossingSum(arr, start, mid, stop): # O(n)
max_left = arr[mid]
max_right = arr[mid + 1]
left_idx = mid - 1
right_idx = mid + 2
left_sum = max_left
right_sum = max_right
while left_idx >= start:
left_sum += arr[left_idx]
if left_sum > max_left:
max_left = left_sum
left_idx -= 1
while right_idx <= stop:
right_sum += arr[right_idx]
if right_sum > max_right:
max_right = right_sum
right_idx += 1
return max_left + max_right
def maxSubArrayRecurs(arr, start, stop): # T(n)
if start == stop:
return arr[start]
mid_idx = (start + stop) // 2
l = maxSubArrayRecurs(arr, start, mid_idx) # T(n/2)
r = maxSubArrayRecurs(arr, mid_idx + 1, stop) # T(n/2)
c = maxCrossingSum(arr, start, mid_idx, stop)
return max(l, r, c)
def maxSubArray(arr):
"""
param: An array `arr`
return: The maximum sum of the contiguous subarray.
No need to return the subarray itself.
T(n) = 2 * T(n/2) + O(n) = O(n log(n))
"""
return maxSubArrayRecurs(arr, 0, len(arr) - 1)
# Test your code
arr = [-2, 7, -6, 3, 1, -4, 5, 7]
print("Maximum Sum = ", maxSubArray(arr)) # Outputs 13
# Test your code
arr = [-2, 1, -3, 4, -1, 2, 1, -5, 4]
print("Maximum Sum = ", maxSubArray(arr)) # Outputs 6
# Test your code
arr = [-4, 14, -6, 7]
print("Maximum Sum = ", maxSubArray(arr)) # Outputs 15
# Test your code
arr = [-2, 1, -3, 5, 0, 3, 2, -5, 4]
print("Maximum Sum = ", maxSubArray(arr)) # Outputs 10
# Test your code
arr = [-2, -5, 6, -2, -3, 1, 5, -6]
print("Maximum Sum = ", maxSubArray(arr)) # Outputs 7
| """
You are given an array arr having n integers. You have to find the maximum sum of contiguous subarray among all the
possible subarrays.
This problem is commonly called as Maximum Subarray Problem. Solve this problem in O(n logn) time, using Divide and
Conquer approach.
"""
def max_crossing_sum(arr, start, mid, stop):
max_left = arr[mid]
max_right = arr[mid + 1]
left_idx = mid - 1
right_idx = mid + 2
left_sum = max_left
right_sum = max_right
while left_idx >= start:
left_sum += arr[left_idx]
if left_sum > max_left:
max_left = left_sum
left_idx -= 1
while right_idx <= stop:
right_sum += arr[right_idx]
if right_sum > max_right:
max_right = right_sum
right_idx += 1
return max_left + max_right
def max_sub_array_recurs(arr, start, stop):
if start == stop:
return arr[start]
mid_idx = (start + stop) // 2
l = max_sub_array_recurs(arr, start, mid_idx)
r = max_sub_array_recurs(arr, mid_idx + 1, stop)
c = max_crossing_sum(arr, start, mid_idx, stop)
return max(l, r, c)
def max_sub_array(arr):
"""
param: An array `arr`
return: The maximum sum of the contiguous subarray.
No need to return the subarray itself.
T(n) = 2 * T(n/2) + O(n) = O(n log(n))
"""
return max_sub_array_recurs(arr, 0, len(arr) - 1)
arr = [-2, 7, -6, 3, 1, -4, 5, 7]
print('Maximum Sum = ', max_sub_array(arr))
arr = [-2, 1, -3, 4, -1, 2, 1, -5, 4]
print('Maximum Sum = ', max_sub_array(arr))
arr = [-4, 14, -6, 7]
print('Maximum Sum = ', max_sub_array(arr))
arr = [-2, 1, -3, 5, 0, 3, 2, -5, 4]
print('Maximum Sum = ', max_sub_array(arr))
arr = [-2, -5, 6, -2, -3, 1, 5, -6]
print('Maximum Sum = ', max_sub_array(arr)) |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
__all__ = ["api_url"]
api_url = lambda e: "https://api.foursquare.com/v2/{0}".format(e)
| __all__ = ['api_url']
api_url = lambda e: 'https://api.foursquare.com/v2/{0}'.format(e) |
p_types = {
"AD": "North West",
"AC": "North East",
"BD": "South West",
"BC": "South East"
}
p_type_descr = {
"AD": "\nAssertive, Decisive, Flexible, Creative, Adventurous.",
"AC": "\nAssertive, Decisive, Structured, Detailed, Organized.",
"BD": "\nFriendly, Caring, Flexible, Creative, Adventurous.",
"BC": "\nFriendly, Caring, Structured, Detailed, Organized."
}
| p_types = {'AD': 'North West', 'AC': 'North East', 'BD': 'South West', 'BC': 'South East'}
p_type_descr = {'AD': '\nAssertive, Decisive, Flexible, Creative, Adventurous.', 'AC': '\nAssertive, Decisive, Structured, Detailed, Organized.', 'BD': '\nFriendly, Caring, Flexible, Creative, Adventurous.', 'BC': '\nFriendly, Caring, Structured, Detailed, Organized.'} |
#!/usr/bin/env python3
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
def _better_aspect(row1,row2,aspect):
if aspect[0] == '>':
return float(row1[aspect[1:]]) >= float(row2[aspect[1:]])
else:
return float(row1[aspect[1:]]) <= float(row2[aspect[1:]])
def paretoOptimize(data,aspects):
"""
Calculate the pareto frontier from data
@param data: The data to process as a list of dicts. All elements of the list need to have the columns refered to by the aspects.
@aspects: A list of strings that denote a sign (> or < for maximize or minimize) immediately followed by the dict key that this optimization should be applied for
@return: A list of dicts containing only those list entries from data that lie on the pareto frontier
@rtype: list(dict())
"""
if (len(aspects) < 2):
print("Need at least two fields to build paretofront!");
sys.exit(-1)
if any([x[0] not in ['>','<'] for x in aspects]):
print("Aspects must indicate minimization (<) or maximization (>) before name")
sys.exit(-2)
better = lambda row1,row2 : all([_better_aspect(row1,row2,aspect) for aspect in aspects])
pareto = list()
for r in data:
for d in data:
if d != r and better(d,r): break
else:
pareto.append(r)
return pareto
| def _better_aspect(row1, row2, aspect):
if aspect[0] == '>':
return float(row1[aspect[1:]]) >= float(row2[aspect[1:]])
else:
return float(row1[aspect[1:]]) <= float(row2[aspect[1:]])
def pareto_optimize(data, aspects):
"""
Calculate the pareto frontier from data
@param data: The data to process as a list of dicts. All elements of the list need to have the columns refered to by the aspects.
@aspects: A list of strings that denote a sign (> or < for maximize or minimize) immediately followed by the dict key that this optimization should be applied for
@return: A list of dicts containing only those list entries from data that lie on the pareto frontier
@rtype: list(dict())
"""
if len(aspects) < 2:
print('Need at least two fields to build paretofront!')
sys.exit(-1)
if any([x[0] not in ['>', '<'] for x in aspects]):
print('Aspects must indicate minimization (<) or maximization (>) before name')
sys.exit(-2)
better = lambda row1, row2: all([_better_aspect(row1, row2, aspect) for aspect in aspects])
pareto = list()
for r in data:
for d in data:
if d != r and better(d, r):
break
else:
pareto.append(r)
return pareto |
def waitToTomorrow():
"""Wait to tommorow 00:00 am"""
tomorrow = datetime.datetime.replace(datetime.datetime.now() + datetime.timedelta(days=1),
hour=0, minute=0, second=0)
delta = tomorrow - datetime.datetime.now()
time.sleep(delta.seconds)
| def wait_to_tomorrow():
"""Wait to tommorow 00:00 am"""
tomorrow = datetime.datetime.replace(datetime.datetime.now() + datetime.timedelta(days=1), hour=0, minute=0, second=0)
delta = tomorrow - datetime.datetime.now()
time.sleep(delta.seconds) |
class Solution:
def findTargetSumWays(self, nums: List[int], target: int) -> int:
"""
1 2 3 2
[1,1,1,1,1]
2 2 2 2
-1 + 1 + 1 + 1 + 1 = 3
+1 - 1 + 1 + 1 + 1 = 3
+1 + 1 - 1 + 1 + 1 = 3
+1 + 1 + 1 - 1 + 1 = 3
+1 + 1 + 1 - 1 + 1 = 3
+1 + 1 + 1 - 1 - 1 = 2
+1 + 1 + 1 + 1 - 1 = 3
+1 + 1 + 1 + 1 + 1 = 4
@lru_cache(maxsize=None)
sum_ways(i, target-nums[i])
sum_ways(i, target+nums[i])
sum_ways(i+1, target-nums[i+1])
sum_ways(i+1, target+nums[i+1])
sum_ways(n-1, target-nums[n-1])
sum_ways(n-1, target+nums[n-1])
O(N^2)
[1,1,1] -> 3
sum_ways(-1, 3)
sum_ways(0, 2)
sum_ways(1, 1)
sum_ways(2, 0)
sum_ways(3, -1)
sum_ways(3, 1)
sum_ways(2, 2)
sum_ways(1, 3)
sum_ways(0, 4)
"""
@lru_cache(maxsize=None)
def sum_ways(i, target):
if i >= len(nums):
return target == 0
return sum_ways(i+1, target-nums[i]) + sum_ways(i+1, target+nums[i])
if not nums:
return 0
return sum_ways(0, target) | class Solution:
def find_target_sum_ways(self, nums: List[int], target: int) -> int:
"""
1 2 3 2
[1,1,1,1,1]
2 2 2 2
-1 + 1 + 1 + 1 + 1 = 3
+1 - 1 + 1 + 1 + 1 = 3
+1 + 1 - 1 + 1 + 1 = 3
+1 + 1 + 1 - 1 + 1 = 3
+1 + 1 + 1 - 1 + 1 = 3
+1 + 1 + 1 - 1 - 1 = 2
+1 + 1 + 1 + 1 - 1 = 3
+1 + 1 + 1 + 1 + 1 = 4
@lru_cache(maxsize=None)
sum_ways(i, target-nums[i])
sum_ways(i, target+nums[i])
sum_ways(i+1, target-nums[i+1])
sum_ways(i+1, target+nums[i+1])
sum_ways(n-1, target-nums[n-1])
sum_ways(n-1, target+nums[n-1])
O(N^2)
[1,1,1] -> 3
sum_ways(-1, 3)
sum_ways(0, 2)
sum_ways(1, 1)
sum_ways(2, 0)
sum_ways(3, -1)
sum_ways(3, 1)
sum_ways(2, 2)
sum_ways(1, 3)
sum_ways(0, 4)
"""
@lru_cache(maxsize=None)
def sum_ways(i, target):
if i >= len(nums):
return target == 0
return sum_ways(i + 1, target - nums[i]) + sum_ways(i + 1, target + nums[i])
if not nums:
return 0
return sum_ways(0, target) |
#!/usr/bin/env python
# encoding: utf-8
"""
sqrt.py
Created by Shengwei on 2014-07-15.
"""
# https://oj.leetcode.com/problems/sqrtx/
# tags: easy / medium, numbers, search
"""
Implement int sqrt(int x).
Compute and return the square root of x.
"""
class Solution:
# @param x, an integer
# @return an integer
def sqrt(self, x):
if x < 0:
raise ValueError('x must be a positive value.')
if x == 0:
return 0
m = x / 2.0
# note: using `while abs(m * m - x) > 0.0001` is
# not good enough for very small and very large
# numbers, say 1e-10 and 1e50
while abs(m * m - x) / x > 0.0001:
m = (m + x / m) / 2
return int(m)
| """
sqrt.py
Created by Shengwei on 2014-07-15.
"""
'\nImplement int sqrt(int x).\n\nCompute and return the square root of x.\n'
class Solution:
def sqrt(self, x):
if x < 0:
raise value_error('x must be a positive value.')
if x == 0:
return 0
m = x / 2.0
while abs(m * m - x) / x > 0.0001:
m = (m + x / m) / 2
return int(m) |
class ExtrusionObject(RhinoObject):
# no doc
def DuplicateExtrusionGeometry(self):
""" DuplicateExtrusionGeometry(self: ExtrusionObject) -> Extrusion """
pass
ExtrusionGeometry = property(
lambda self: object(), lambda self, v: None, lambda self: None
)
"""Get: ExtrusionGeometry(self: ExtrusionObject) -> Extrusion
"""
| class Extrusionobject(RhinoObject):
def duplicate_extrusion_geometry(self):
""" DuplicateExtrusionGeometry(self: ExtrusionObject) -> Extrusion """
pass
extrusion_geometry = property(lambda self: object(), lambda self, v: None, lambda self: None)
'Get: ExtrusionGeometry(self: ExtrusionObject) -> Extrusion\n\n\n\n' |
"""
Given the root of a binary tree, return the postorder traversal of its nodes' values.
Example 1:
Input: root = [1,null,2,3]
Output: [3,2,1]
Example 2:
Input: root = []
Output: []
Example 3:
Input: root = [1]
Output: [1]
Constraints:
The number of the nodes in the tree is in the range [0, 100].
-100 <= Node.val <= 100
"""
# Definition for a binary tree node.
class TreeNode:
def __init__(self, val=0, left=None, right=None):
self.val = val
self.left = left
self.right = right
class Solution:
def postorderTraversal(self, root: Optional[TreeNode]) -> List[int]:
ans = []
self.traverse(root, ans)
return ans
def traverse(self, node, ans):
if node is not None:
self.traverse(node.left, ans)
self.traverse(node.right, ans)
ans.append(node.val)
| """
Given the root of a binary tree, return the postorder traversal of its nodes' values.
Example 1:
Input: root = [1,null,2,3]
Output: [3,2,1]
Example 2:
Input: root = []
Output: []
Example 3:
Input: root = [1]
Output: [1]
Constraints:
The number of the nodes in the tree is in the range [0, 100].
-100 <= Node.val <= 100
"""
class Treenode:
def __init__(self, val=0, left=None, right=None):
self.val = val
self.left = left
self.right = right
class Solution:
def postorder_traversal(self, root: Optional[TreeNode]) -> List[int]:
ans = []
self.traverse(root, ans)
return ans
def traverse(self, node, ans):
if node is not None:
self.traverse(node.left, ans)
self.traverse(node.right, ans)
ans.append(node.val) |
"""
The more input features the more parameter saving
4: 28 less params
64: 448 less params
"""; | """
The more input features the more parameter saving
4: 28 less params
64: 448 less params
""" |
class GeorgeStrategyLevel3:
def __init__(self, player_num):
self.player_index = player_num
self.name = 'delayed_flank'
self.delayed_count = 0
self.flank_count = 0
self.flank_turn = None
self.flank_started = False
self.turn_count = 1
self.movement = 1
self.flank_route_index = 0
self.behind_direction = {(3,0): (-1,0), (3,6): (1,0)}
self.flank_route = {(3,0): [(0,1), (0,1), (0,1), (0,1), (0,1), (0,1), (1,0), (0,0)], (3,6): [(0,-1), (0,-1), (0,-1), (0,-1), (0,-1), (0,-1), (-1,0), (0,0)]}
def decide_purchases(self, game_state):
myself = game_state['players'][self.player_index]
home_coords= game_state['players'][self.player_index]['home_coords']
units = myself['units']
scouts = [unit for unit in units if unit['type'] == 'Scout']
num_units = len(scouts)
attack_level = myself['technology']['attack']
game_turn = game_state['turn']
purchases = {'units': [], 'technology': []}
if myself['cp'] >= game_state['technology_data']['attack'][attack_level]:
purchases['technology'].append('attack')
myself['cp'] -= game_state['technology_data']['attack'][attack_level]
while myself['cp'] >= 6:
purchases['units'].append({'type': 'Scout', 'coords': home_coords})
myself['cp'] -= 6
return purchases
def decide_ship_movement(self, unit_index, hidden_game_state):
myself = hidden_game_state['players'][self.player_index]
home_coords= tuple(hidden_game_state['players'][self.player_index]['home_coords'])
units = myself['units']
scouts = [unit for unit in units if unit['type'] == 'Scout' and tuple(unit['coords']) != home_coords]
num_units = len(scouts)
game_turn = hidden_game_state['turn']
game_round = hidden_game_state['round']
if game_turn != self.turn_count or self.movement != game_round:
if self.flank_started and self.flank_route_index < 7:
self.flank_route_index +=1
self.turn_count = game_turn
self.movement = game_round
self.delayed_count = 0
if self.flank_started and num_units == 0:
self.flank_route_index = 0
self.flank_started= False
self.flank_count = 0
opponent_index = 1 - self.player_index
opponent = hidden_game_state['players'][opponent_index]
unit = myself['units'][unit_index]
#turn_created = unit['turn_created']
x_unit, y_unit = unit['coords']
x_opp, y_opp = opponent['home_coords']
# print(unit['type'], unit['coords'], home_coords, self.flank_count, len(scouts))
if unit['type'] == 'Scout' and self.delayed_count < 6 and tuple(unit['coords']) == home_coords:
self.delayed_count += 1
return (0,0)
elif self.delayed_count >= 6 or self.flank_started:
if tuple(unit['coords']) == home_coords:
if self.flank_started:
return (0,0)
self.flank_count += 1
return self.behind_direction[home_coords]
if self.flank_count >= 6:
self.flank_turn = game_turn
self.flank_started = True
return self.flank_route[home_coords][self.flank_route_index]
else:
return (0,0)
else:
return (0,0)
def decide_which_unit_to_attack(self, hidden_game_state_for_combat, combat_state, coords, attacker_index):
# attack opponent's first ship in combat order
combat_order = combat_state[coords]
player_indices = [unit['player'] for unit in combat_order]
opponent_index = 1 - self.player_index
for combat_index, unit in enumerate(combat_order):
if unit['player'] == opponent_index:
return combat_index
| class Georgestrategylevel3:
def __init__(self, player_num):
self.player_index = player_num
self.name = 'delayed_flank'
self.delayed_count = 0
self.flank_count = 0
self.flank_turn = None
self.flank_started = False
self.turn_count = 1
self.movement = 1
self.flank_route_index = 0
self.behind_direction = {(3, 0): (-1, 0), (3, 6): (1, 0)}
self.flank_route = {(3, 0): [(0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (1, 0), (0, 0)], (3, 6): [(0, -1), (0, -1), (0, -1), (0, -1), (0, -1), (0, -1), (-1, 0), (0, 0)]}
def decide_purchases(self, game_state):
myself = game_state['players'][self.player_index]
home_coords = game_state['players'][self.player_index]['home_coords']
units = myself['units']
scouts = [unit for unit in units if unit['type'] == 'Scout']
num_units = len(scouts)
attack_level = myself['technology']['attack']
game_turn = game_state['turn']
purchases = {'units': [], 'technology': []}
if myself['cp'] >= game_state['technology_data']['attack'][attack_level]:
purchases['technology'].append('attack')
myself['cp'] -= game_state['technology_data']['attack'][attack_level]
while myself['cp'] >= 6:
purchases['units'].append({'type': 'Scout', 'coords': home_coords})
myself['cp'] -= 6
return purchases
def decide_ship_movement(self, unit_index, hidden_game_state):
myself = hidden_game_state['players'][self.player_index]
home_coords = tuple(hidden_game_state['players'][self.player_index]['home_coords'])
units = myself['units']
scouts = [unit for unit in units if unit['type'] == 'Scout' and tuple(unit['coords']) != home_coords]
num_units = len(scouts)
game_turn = hidden_game_state['turn']
game_round = hidden_game_state['round']
if game_turn != self.turn_count or self.movement != game_round:
if self.flank_started and self.flank_route_index < 7:
self.flank_route_index += 1
self.turn_count = game_turn
self.movement = game_round
self.delayed_count = 0
if self.flank_started and num_units == 0:
self.flank_route_index = 0
self.flank_started = False
self.flank_count = 0
opponent_index = 1 - self.player_index
opponent = hidden_game_state['players'][opponent_index]
unit = myself['units'][unit_index]
(x_unit, y_unit) = unit['coords']
(x_opp, y_opp) = opponent['home_coords']
if unit['type'] == 'Scout' and self.delayed_count < 6 and (tuple(unit['coords']) == home_coords):
self.delayed_count += 1
return (0, 0)
elif self.delayed_count >= 6 or self.flank_started:
if tuple(unit['coords']) == home_coords:
if self.flank_started:
return (0, 0)
self.flank_count += 1
return self.behind_direction[home_coords]
if self.flank_count >= 6:
self.flank_turn = game_turn
self.flank_started = True
return self.flank_route[home_coords][self.flank_route_index]
else:
return (0, 0)
else:
return (0, 0)
def decide_which_unit_to_attack(self, hidden_game_state_for_combat, combat_state, coords, attacker_index):
combat_order = combat_state[coords]
player_indices = [unit['player'] for unit in combat_order]
opponent_index = 1 - self.player_index
for (combat_index, unit) in enumerate(combat_order):
if unit['player'] == opponent_index:
return combat_index |
mapping = {
"settings": {
"index": {
"max_result_window": 15000,
"number_of_replicas": 1,
"number_of_shards": 1,
"max_ngram_diff": 10
},
"analysis": {
"analyzer": {
"default": {
"type": "custom",
"tokenizer": "whitespace",
"filter": [
"english_stemmer",
"lowercase"
]
},
"autocomplete": {
"tokenizer": "autocomplete_index",
"filter": [
"lowercase"
]
},
"autocomplete_search": {
"tokenizer": "autosuggest_search",
"filter": [
"lowercase"
]
},
"partial_search": {
"tokenizer": "regular_partial_search",
"filter": ["lowercase"]
},
"symbols": {
"type": "custom",
"tokenizer": "whitespace",
"filter": [
"lowercase"
]
}
},
"filter": {
"english_stemmer": {
"type": "stemmer",
"language": "english"
}
},
"tokenizer": {
"autocomplete_index": {
"type": "edge_ngram",
"min_gram": "2",
"max_gram": "5"
},
"autosuggest_search": {
"type": "edge_ngram",
"min_gram": "2",
"max_gram": "5"
},
"regular_partial_search": {
"type": "ngram",
"min_gram": "2",
"max_gram": "5",
"token_chars": [
"letter",
"digit"
]
}
},
"char_filter": {
"replace_underscore": {
"type": "pattern_replace",
"pattern": "(_)",
"replacement": " "
}
}
}
},
"mappings": {
"properties": {
"sgdid": {
"type": "text",
"fielddata": True,
"analyzer": "symbols"
},
"name": {
"type": "text",
"fielddata": True,
"analyzer": "symbols"
},
"href": {
"type": "text",
"fielddata": True,
"analyzer": "symbols"
},
"category": {
"type": "text",
"fielddata": True,
"analyzer": "symbols"
},
"absolute_genetic_start": {
"type": "keyword"
},
"format_name": {
"type": "text",
"fielddata": True,
"analyzer": "symbols"
},
"dna_scores": {
"type": "keyword"
},
"protein_scores": {
"type": "keyword"
},
"snp_seqs": {
"type": "nested"
}
}
}
}
| mapping = {'settings': {'index': {'max_result_window': 15000, 'number_of_replicas': 1, 'number_of_shards': 1, 'max_ngram_diff': 10}, 'analysis': {'analyzer': {'default': {'type': 'custom', 'tokenizer': 'whitespace', 'filter': ['english_stemmer', 'lowercase']}, 'autocomplete': {'tokenizer': 'autocomplete_index', 'filter': ['lowercase']}, 'autocomplete_search': {'tokenizer': 'autosuggest_search', 'filter': ['lowercase']}, 'partial_search': {'tokenizer': 'regular_partial_search', 'filter': ['lowercase']}, 'symbols': {'type': 'custom', 'tokenizer': 'whitespace', 'filter': ['lowercase']}}, 'filter': {'english_stemmer': {'type': 'stemmer', 'language': 'english'}}, 'tokenizer': {'autocomplete_index': {'type': 'edge_ngram', 'min_gram': '2', 'max_gram': '5'}, 'autosuggest_search': {'type': 'edge_ngram', 'min_gram': '2', 'max_gram': '5'}, 'regular_partial_search': {'type': 'ngram', 'min_gram': '2', 'max_gram': '5', 'token_chars': ['letter', 'digit']}}, 'char_filter': {'replace_underscore': {'type': 'pattern_replace', 'pattern': '(_)', 'replacement': ' '}}}}, 'mappings': {'properties': {'sgdid': {'type': 'text', 'fielddata': True, 'analyzer': 'symbols'}, 'name': {'type': 'text', 'fielddata': True, 'analyzer': 'symbols'}, 'href': {'type': 'text', 'fielddata': True, 'analyzer': 'symbols'}, 'category': {'type': 'text', 'fielddata': True, 'analyzer': 'symbols'}, 'absolute_genetic_start': {'type': 'keyword'}, 'format_name': {'type': 'text', 'fielddata': True, 'analyzer': 'symbols'}, 'dna_scores': {'type': 'keyword'}, 'protein_scores': {'type': 'keyword'}, 'snp_seqs': {'type': 'nested'}}}} |
""" Make a list of the numbers from one to one million,
and then use a for loop to print the numbers """
million = list(range(1000001))
for number in million:
print(number) | """ Make a list of the numbers from one to one million,
and then use a for loop to print the numbers """
million = list(range(1000001))
for number in million:
print(number) |
# Inplace operator tests
# This originally from byterun was adapted from test_base.py
"""This program is self-checking!"""
x, y = 2, 3
x **= y
assert x == 8 and y == 3
x *= y
assert x == 24 and y == 3
x //= y
assert x == 8 and y == 3
x %= y
assert x == 2 and y == 3
x += y
assert x == 5 and y == 3
x -= y
assert x == 2 and y == 3
x <<= y
assert x == 16 and y == 3
x >>= y
assert x == 2 and y == 3
x = 0x8F
x &= 0xA5
assert x == 0x85
x |= 0x10
assert x == 0x95
x ^= 0x33
assert x == 0xA6
| """This program is self-checking!"""
(x, y) = (2, 3)
x **= y
assert x == 8 and y == 3
x *= y
assert x == 24 and y == 3
x //= y
assert x == 8 and y == 3
x %= y
assert x == 2 and y == 3
x += y
assert x == 5 and y == 3
x -= y
assert x == 2 and y == 3
x <<= y
assert x == 16 and y == 3
x >>= y
assert x == 2 and y == 3
x = 143
x &= 165
assert x == 133
x |= 16
assert x == 149
x ^= 51
assert x == 166 |
variable_list = [
{"value": {"value": "var1_new_val"}, "context": "DefaultProfile", "name": "var1"},
{"value": {"value": "var2_new_val"}, "context": "DefaultProfile", "name": "var2"},
]
| variable_list = [{'value': {'value': 'var1_new_val'}, 'context': 'DefaultProfile', 'name': 'var1'}, {'value': {'value': 'var2_new_val'}, 'context': 'DefaultProfile', 'name': 'var2'}] |
class Page:
def __init__(self, start: int, end: int, step: int):
self.last_start = start
self.start = start
self.end = end
self.step = step
def next(self):
self.start += self.step
if self.start < self.start + self.step > self.end:
self.start = self.end - self.step
old_start = self.last_start
self.last_start = self.start
return self.start, old_start
def last(self):
self.start -= self.step
if self.start < self.start + self.step < self.step:
self.start = 0
old_start = self.last_start
self.last_start = self.start
return self.start, old_start
| class Page:
def __init__(self, start: int, end: int, step: int):
self.last_start = start
self.start = start
self.end = end
self.step = step
def next(self):
self.start += self.step
if self.start < self.start + self.step > self.end:
self.start = self.end - self.step
old_start = self.last_start
self.last_start = self.start
return (self.start, old_start)
def last(self):
self.start -= self.step
if self.start < self.start + self.step < self.step:
self.start = 0
old_start = self.last_start
self.last_start = self.start
return (self.start, old_start) |
# SPDX-License-Identifier: MIT
# This module exists to solve circular dependencies between xbstrap.vcs_util
# and xbstrap.base; however, moving all exceptions here casues a new circular
# dependency: ExecutionFailureError needs Action.strings, defined in
# xbstrap.base, but xbstrap.base needs xbstrap.exceptions (this module).
# For this reason, further extraction has been halted, and the minimum (plus
# some more) was done to break the circular dependency.
# TODO(arsen): further disentangle exceptions from xbstrap.base
class GenericError(Exception):
pass
class RollingIdUnavailableError(Exception):
def __init__(self, name):
super().__init__("No rolling_id specified for source {}".format(name))
| class Genericerror(Exception):
pass
class Rollingidunavailableerror(Exception):
def __init__(self, name):
super().__init__('No rolling_id specified for source {}'.format(name)) |
class Node(object):
def __init__(self, val):
self.val = val
self.children = []
def f(root, deletions):
if not root:
return
q = [root]
ans = []
if root.val not in deletions:
ans.append(root.val)
while q:
node = q.pop()
children = node.children
if node.val in deletions:
for child in children:
if child.val not in deletions:
ans.append(child.val)
q.extend(children)
return ans
# a
# / / \ \
# b d c f
# / \ \
# h z i
node_a = Node('a')
node_b = Node('b')
node_c = Node('c')
node_d = Node('d')
node_e = Node('e')
node_f = Node('f')
node_h = Node('h')
node_z = Node('z')
node_i = Node('i')
node_b.children.append(node_h)
node_b.children.append(node_z)
node_b.children.append(node_i)
node_a.children.append(node_b)
node_a.children.append(node_d)
node_a.children.append(node_c)
node_a.children.append(node_f)
deletions_list = [['b', 'f'], ['a', 'b'], ['b', 'h']]
for deletions in deletions_list:
print(f(node_a, deletions)) | class Node(object):
def __init__(self, val):
self.val = val
self.children = []
def f(root, deletions):
if not root:
return
q = [root]
ans = []
if root.val not in deletions:
ans.append(root.val)
while q:
node = q.pop()
children = node.children
if node.val in deletions:
for child in children:
if child.val not in deletions:
ans.append(child.val)
q.extend(children)
return ans
node_a = node('a')
node_b = node('b')
node_c = node('c')
node_d = node('d')
node_e = node('e')
node_f = node('f')
node_h = node('h')
node_z = node('z')
node_i = node('i')
node_b.children.append(node_h)
node_b.children.append(node_z)
node_b.children.append(node_i)
node_a.children.append(node_b)
node_a.children.append(node_d)
node_a.children.append(node_c)
node_a.children.append(node_f)
deletions_list = [['b', 'f'], ['a', 'b'], ['b', 'h']]
for deletions in deletions_list:
print(f(node_a, deletions)) |
__docformat__ = 'epytext en'
__doc__='''
European river Information System messages
@see: NMEA strings at U{http://gpsd.berlios.de/NMEA.txt}
@see: Wikipedia at U{http://en.wikipedia.org/wiki/Automatic_Identification_System}
@license: Apache 2.0
@copyright: (C) 2006
'''
| __docformat__ = 'epytext en'
__doc__ = '\nEuropean river Information System messages\n\n@see: NMEA strings at U{http://gpsd.berlios.de/NMEA.txt}\n@see: Wikipedia at U{http://en.wikipedia.org/wiki/Automatic_Identification_System}\n\n@license: Apache 2.0\n@copyright: (C) 2006\n' |
def min_distance(polygon, point):
"""
Return the minimum distance between a point and a polygon edge
"""
dist = polygon.exterior.distance(point)
for interior in polygon.interiors:
dist = min(dist, interior.distance(point))
return dist | def min_distance(polygon, point):
"""
Return the minimum distance between a point and a polygon edge
"""
dist = polygon.exterior.distance(point)
for interior in polygon.interiors:
dist = min(dist, interior.distance(point))
return dist |
# https://leetcode.com/problems/longest-substring-without-repeating-characters/
#
# Given a string, find the length of the longest substring without repeating characters.
# For example, the longest substring without repeating letters for "abcabcbb" is "abc",
# which the length is 3. For "bbbbb" the longest substring is "b", with the length of 1.
class Solution(object):
def lengthOfLongestSubstring(self, s):
"""
:type s: str
:rtype: int
"""
longest = []
max_len = 0
i = 0
j = 0
while j < len(s):
if s[j] not in longest:
longest.append(s[j])
j = j + 1
else:
if max_len < len(longest):
max_len = len(longest)
idx = longest.index(s[j]) + 1
longest = longest[idx:]
longest.append(s[j])
i = i + idx
j = j + 1
continue
if max_len < len(longest):
max_len = len(longest)
return max_len
| class Solution(object):
def length_of_longest_substring(self, s):
"""
:type s: str
:rtype: int
"""
longest = []
max_len = 0
i = 0
j = 0
while j < len(s):
if s[j] not in longest:
longest.append(s[j])
j = j + 1
else:
if max_len < len(longest):
max_len = len(longest)
idx = longest.index(s[j]) + 1
longest = longest[idx:]
longest.append(s[j])
i = i + idx
j = j + 1
continue
if max_len < len(longest):
max_len = len(longest)
return max_len |
'''
Find the nth digit of the infinite integer sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ...
Note:
n is positive and will fit within the range of a 32-bit signed integer (n < 231).
Example 1:
Input:
3
Output:
3
Example 2:
Input:
11
Output:
0
Explanation:
The 11th digit of the sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ... is a 0, which is part of the number 10.
'''
class Solution(object):
def findNthDigit(self, n):
"""
:type n: int
:rtype: int
"""
'''
len(1): 0-9 = 10 * 1 = 10
len(2): 10-99 = 90 * 2 = 180
len(3): 100-999 = 900 * 3 = 2700
'''
if n < 10:
return n
n -= 10
w = 2
while n > 9 * 10 ** (w-1) * w:
n -= 9 * 10 ** (w-1) * w
w += 1
num = 10 ** (w-1) + n // w
step = n % w
return int(str(num)[step])
| """
Find the nth digit of the infinite integer sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ...
Note:
n is positive and will fit within the range of a 32-bit signed integer (n < 231).
Example 1:
Input:
3
Output:
3
Example 2:
Input:
11
Output:
0
Explanation:
The 11th digit of the sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ... is a 0, which is part of the number 10.
"""
class Solution(object):
def find_nth_digit(self, n):
"""
:type n: int
:rtype: int
"""
'\n len(1): 0-9 = 10 * 1 = 10\n len(2): 10-99 = 90 * 2 = 180\n len(3): 100-999 = 900 * 3 = 2700\n '
if n < 10:
return n
n -= 10
w = 2
while n > 9 * 10 ** (w - 1) * w:
n -= 9 * 10 ** (w - 1) * w
w += 1
num = 10 ** (w - 1) + n // w
step = n % w
return int(str(num)[step]) |
def merge_sorted(arr_1, arr_2):
merged_array = list()
ind_1, ind_2 = 0, 0
while ind_1 < len(arr_1) and ind_2 < len(arr_2):
if arr_1[ind_1] <= arr_2[ind_2]:
merged_array.append(arr_1[ind_1])
ind_1 += 1
else:
merged_array.append(arr_2[ind_2])
ind_2 += 1
while ind_1 < len(arr_1):
merged_array.append(arr_1[ind_1])
ind_1 += 1
while ind_2 < len(arr_2):
merged_array.append(arr_2[ind_2])
ind_2 += 1
return merged_array
def reverse(lst, i, j):
return list(reversed(lst[i:j+1]))
def custom_sort(lst):
# create segments of sorted sub-arrays
start, end = None, None
last_end = -1
sorted_segments = list()
for i in range(1, len(lst)):
if lst[i] < lst[i-1]:
if not start:
segment = lst[last_end+1: i-1]
if segment:
sorted_segments.append(segment)
start = i - 1
elif start:
end = i - 1
if end > start:
sorted_segments.append(reverse(lst, start, end))
last_end = end
start, end = None, None
if start:
end = len(lst) - 1
if end > start:
sorted_segments.append(reverse(lst, start, end))
else:
segment = lst[last_end+1:]
if segment:
sorted_segments.append(segment)
# merge the sorted sub-arrays
final_sorted = list()
for segment in sorted_segments:
final_sorted = merge_sorted(final_sorted, segment)
return final_sorted
# Tests
assert custom_sort([0, 6, 4, 2, 5, 3, 1]) == [
0, 1, 2, 3, 4, 5, 6]
assert custom_sort([0, 6, 4, 2, 5, 3, 1, 10, 9]) == [
0, 1, 2, 3, 4, 5, 6, 9, 10]
assert custom_sort([0, 6, 4, 2, 5, 3, 1, 2, 3]) == [
0, 1, 2, 2, 3, 3, 4, 5, 6]
assert custom_sort([0, 6, 4, 2, 5, 3, 1, 11]) == [
0, 1, 2, 3, 4, 5, 6, 11]
| def merge_sorted(arr_1, arr_2):
merged_array = list()
(ind_1, ind_2) = (0, 0)
while ind_1 < len(arr_1) and ind_2 < len(arr_2):
if arr_1[ind_1] <= arr_2[ind_2]:
merged_array.append(arr_1[ind_1])
ind_1 += 1
else:
merged_array.append(arr_2[ind_2])
ind_2 += 1
while ind_1 < len(arr_1):
merged_array.append(arr_1[ind_1])
ind_1 += 1
while ind_2 < len(arr_2):
merged_array.append(arr_2[ind_2])
ind_2 += 1
return merged_array
def reverse(lst, i, j):
return list(reversed(lst[i:j + 1]))
def custom_sort(lst):
(start, end) = (None, None)
last_end = -1
sorted_segments = list()
for i in range(1, len(lst)):
if lst[i] < lst[i - 1]:
if not start:
segment = lst[last_end + 1:i - 1]
if segment:
sorted_segments.append(segment)
start = i - 1
elif start:
end = i - 1
if end > start:
sorted_segments.append(reverse(lst, start, end))
last_end = end
(start, end) = (None, None)
if start:
end = len(lst) - 1
if end > start:
sorted_segments.append(reverse(lst, start, end))
else:
segment = lst[last_end + 1:]
if segment:
sorted_segments.append(segment)
final_sorted = list()
for segment in sorted_segments:
final_sorted = merge_sorted(final_sorted, segment)
return final_sorted
assert custom_sort([0, 6, 4, 2, 5, 3, 1]) == [0, 1, 2, 3, 4, 5, 6]
assert custom_sort([0, 6, 4, 2, 5, 3, 1, 10, 9]) == [0, 1, 2, 3, 4, 5, 6, 9, 10]
assert custom_sort([0, 6, 4, 2, 5, 3, 1, 2, 3]) == [0, 1, 2, 2, 3, 3, 4, 5, 6]
assert custom_sort([0, 6, 4, 2, 5, 3, 1, 11]) == [0, 1, 2, 3, 4, 5, 6, 11] |
#
# PySNMP MIB module APDD-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/APDD-MIB
# Produced by pysmi-0.3.4 at Wed May 1 11:23:10 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)
#
acmepacketMgmt, = mibBuilder.importSymbols("ACMEPACKET-SMI", "acmepacketMgmt")
ApTransportType, = mibBuilder.importSymbols("ACMEPACKET-TC", "ApTransportType")
OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ConstraintsUnion, SingleValueConstraint, ValueRangeConstraint, ConstraintsIntersection, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "SingleValueConstraint", "ValueRangeConstraint", "ConstraintsIntersection", "ValueSizeConstraint")
ObjectGroup, NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "ObjectGroup", "NotificationGroup", "ModuleCompliance")
Counter64, Unsigned32, Bits, NotificationType, iso, IpAddress, TimeTicks, ObjectIdentity, Gauge32, ModuleIdentity, MibIdentifier, Integer32, MibScalar, MibTable, MibTableRow, MibTableColumn, Counter32 = mibBuilder.importSymbols("SNMPv2-SMI", "Counter64", "Unsigned32", "Bits", "NotificationType", "iso", "IpAddress", "TimeTicks", "ObjectIdentity", "Gauge32", "ModuleIdentity", "MibIdentifier", "Integer32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter32")
TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString")
apDDModule = ModuleIdentity((1, 3, 6, 1, 4, 1, 9148, 3, 12))
if mibBuilder.loadTexts: apDDModule.setLastUpdated('201106080000Z')
if mibBuilder.loadTexts: apDDModule.setOrganization('Acme Packet, Inc')
if mibBuilder.loadTexts: apDDModule.setContactInfo(' Customer Service Postal: Acme Packet, Inc 100 Crosby Drive Bedford, MA 01730 US Tel: 1-781-328-4400 E-mail: support@acmepacket.com')
if mibBuilder.loadTexts: apDDModule.setDescription('The Policy Director MIB for Acme Packet.')
apDDMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1))
apDDMIBGeneralObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1))
apDDMIBTabularObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2))
apDDNotificationObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9148, 3, 12, 2))
apDDNotifObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9148, 3, 12, 2, 1))
apDDNotifPrefix = MibIdentifier((1, 3, 6, 1, 4, 1, 9148, 3, 12, 2, 2))
apDDNotifications = MibIdentifier((1, 3, 6, 1, 4, 1, 9148, 3, 12, 2, 2, 0))
apDDConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3))
apDDObjectGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 1))
apDDNotificationGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 2))
apDdInterfaceNumber = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdInterfaceNumber.setStatus('current')
if mibBuilder.loadTexts: apDdInterfaceNumber.setDescription('Number of the DD interfaces in the system.')
apDdCurrentTransRate = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 2), Gauge32()).setUnits('per10Seconds').setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdCurrentTransRate.setStatus('current')
if mibBuilder.loadTexts: apDdCurrentTransRate.setDescription('The number of transactions over a 10s period.')
apDdHighTransRate = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 3), Gauge32()).setUnits('per10Seconds').setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdHighTransRate.setStatus('current')
if mibBuilder.loadTexts: apDdHighTransRate.setDescription('Maximum value of apDdCurrentTransRate across all 10s periods.')
apDdLowTransRate = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 4), Gauge32()).setUnits('per10Seconds').setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdLowTransRate.setStatus('current')
if mibBuilder.loadTexts: apDdLowTransRate.setDescription('Mimimum value of apDdCurrentTransRate across all 10s periods.')
apDdAgentNumber = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 5), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentNumber.setStatus('current')
if mibBuilder.loadTexts: apDdAgentNumber.setDescription('Number of the DD Agents in the system.')
apDdSessionPeriodActive = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 6), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdSessionPeriodActive.setStatus('current')
if mibBuilder.loadTexts: apDdSessionPeriodActive.setDescription('Number of the DD session is Active in this period')
apDdSessionPeriodHigh = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 7), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdSessionPeriodHigh.setStatus('current')
if mibBuilder.loadTexts: apDdSessionPeriodHigh.setDescription('Highest number of the DD session in this period')
apDdSessionPeriodTotal = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 8), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdSessionPeriodTotal.setStatus('current')
if mibBuilder.loadTexts: apDdSessionPeriodTotal.setDescription('Total Number of the DD session in this period')
apDdSessionLifeTotal = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 9), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdSessionLifeTotal.setStatus('current')
if mibBuilder.loadTexts: apDdSessionLifeTotal.setDescription('Total Number of the DD session in life')
apDdSessionLifePerMax = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 10), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdSessionLifePerMax.setStatus('current')
if mibBuilder.loadTexts: apDdSessionLifePerMax.setDescription('PerMax number of the DD session in life')
apDdSessionLifeHigh = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 11), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdSessionLifeHigh.setStatus('current')
if mibBuilder.loadTexts: apDdSessionLifeHigh.setDescription('Highest number of the DD session in life')
apDdSessInitPeriodActive = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 12), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdSessInitPeriodActive.setStatus('current')
if mibBuilder.loadTexts: apDdSessInitPeriodActive.setDescription('Number of the DD session is Active in Initial state in this period')
apDdSessInitPeriodHigh = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 13), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdSessInitPeriodHigh.setStatus('current')
if mibBuilder.loadTexts: apDdSessInitPeriodHigh.setDescription('Highest number of the DD session in Initial state in this period')
apDdSessInitPeriodTotal = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 14), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdSessInitPeriodTotal.setStatus('current')
if mibBuilder.loadTexts: apDdSessInitPeriodTotal.setDescription('Total Number of the DD session in Initial state in this period')
apDdSessInitLifeTotal = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 15), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdSessInitLifeTotal.setStatus('current')
if mibBuilder.loadTexts: apDdSessInitLifeTotal.setDescription('Total Number of the DD session in Initial state in life')
apDdSessInitLifePerMax = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 16), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdSessInitLifePerMax.setStatus('current')
if mibBuilder.loadTexts: apDdSessInitLifePerMax.setDescription('PerMax number of the DD session in Initial state in life')
apDdSessInitLifeHigh = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 17), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdSessInitLifeHigh.setStatus('current')
if mibBuilder.loadTexts: apDdSessInitLifeHigh.setDescription('Highest number of the DD session in Initial state in life')
apDdSessEstablishedPeriodActive = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 18), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdSessEstablishedPeriodActive.setStatus('current')
if mibBuilder.loadTexts: apDdSessEstablishedPeriodActive.setDescription('Number of the DD session is Active in Established state in this period')
apDdSessEstablishedPeriodHigh = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 19), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdSessEstablishedPeriodHigh.setStatus('current')
if mibBuilder.loadTexts: apDdSessEstablishedPeriodHigh.setDescription('Highest number of the DD session in Established state in this period')
apDdSessEstablishedPeriodTotal = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 20), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdSessEstablishedPeriodTotal.setStatus('current')
if mibBuilder.loadTexts: apDdSessEstablishedPeriodTotal.setDescription('Total Number of the DD session in Established state in this period')
apDdSessEstablishedLifeTotal = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 21), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdSessEstablishedLifeTotal.setStatus('current')
if mibBuilder.loadTexts: apDdSessEstablishedLifeTotal.setDescription('Total Number of the DD session in Established state in life')
apDdSessEstablishedLifePerMax = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 22), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdSessEstablishedLifePerMax.setStatus('current')
if mibBuilder.loadTexts: apDdSessEstablishedLifePerMax.setDescription('PerMax number of the DD session in Established state in life')
apDdSessEstablishedLifeHigh = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 23), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdSessEstablishedLifeHigh.setStatus('current')
if mibBuilder.loadTexts: apDdSessEstablishedLifeHigh.setDescription('Highest number of the DD session in Established state in life')
apDdSessTerminatedPeriodActive = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 24), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdSessTerminatedPeriodActive.setStatus('current')
if mibBuilder.loadTexts: apDdSessTerminatedPeriodActive.setDescription('Number of the DD session is Active in Terminated state in this period')
apDdSessTerminatedPeriodHigh = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 25), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdSessTerminatedPeriodHigh.setStatus('current')
if mibBuilder.loadTexts: apDdSessTerminatedPeriodHigh.setDescription('Highest number of the DD session in Terminated state in this period')
apDdSessTerminatedPeriodTotal = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 26), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdSessTerminatedPeriodTotal.setStatus('current')
if mibBuilder.loadTexts: apDdSessTerminatedPeriodTotal.setDescription('Total Number of the DD session in Terminated state in this period')
apDdSessTerminatedLifeTotal = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 27), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdSessTerminatedLifeTotal.setStatus('current')
if mibBuilder.loadTexts: apDdSessTerminatedLifeTotal.setDescription('Total Number of the DD session in Terminated state in life')
apDdSessTerminatedLifePerMax = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 28), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdSessTerminatedLifePerMax.setStatus('current')
if mibBuilder.loadTexts: apDdSessTerminatedLifePerMax.setDescription('PerMax number of the DD session in Terminated state in life')
apDdSessTerminatedLifeHigh = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 29), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdSessTerminatedLifeHigh.setStatus('current')
if mibBuilder.loadTexts: apDdSessTerminatedLifeHigh.setDescription('Highest number of the DD session in Terminated state in life')
apDdSessTimeoutPeriodTotal = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 30), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdSessTimeoutPeriodTotal.setStatus('current')
if mibBuilder.loadTexts: apDdSessTimeoutPeriodTotal.setDescription('Total Number of the DD session in Timeout state in this period')
apDdSessTimeoutLifeTotal = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 31), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdSessTimeoutLifeTotal.setStatus('current')
if mibBuilder.loadTexts: apDdSessTimeoutLifeTotal.setDescription('Total Number of the DD session in Timeout state in life')
apDdSessTimeoutLifePerMax = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 32), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdSessTimeoutLifePerMax.setStatus('current')
if mibBuilder.loadTexts: apDdSessTimeoutLifePerMax.setDescription('PerMax number of the DD session in Timeout state in life')
apDdSessErrorsPeriodTotal = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 33), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdSessErrorsPeriodTotal.setStatus('current')
if mibBuilder.loadTexts: apDdSessErrorsPeriodTotal.setDescription('Total Number of the DD session in Errors state in this period')
apDdSessErrorsLifeTotal = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 34), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdSessErrorsLifeTotal.setStatus('current')
if mibBuilder.loadTexts: apDdSessErrorsLifeTotal.setDescription('Total Number of the DD session in Errors state in life')
apDdSessErrorsLifePerMax = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 35), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdSessErrorsLifePerMax.setStatus('current')
if mibBuilder.loadTexts: apDdSessErrorsLifePerMax.setDescription('PerMax number of the DD session in Errors state in life')
apDdSessMissPeriodTotal = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 36), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdSessMissPeriodTotal.setStatus('current')
if mibBuilder.loadTexts: apDdSessMissPeriodTotal.setDescription('Total Number of the DD session in Miss state in this period')
apDdSessMissLifeTotal = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 37), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdSessMissLifeTotal.setStatus('current')
if mibBuilder.loadTexts: apDdSessMissLifeTotal.setDescription('Total Number of the DD session in Miss state in life')
apDdSessMissLifePerMax = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 38), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdSessMissLifePerMax.setStatus('current')
if mibBuilder.loadTexts: apDdSessMissLifePerMax.setDescription('PerMax number of the DD session in Miss state in life')
apDdSubscriberPeriodActive = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 100), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdSubscriberPeriodActive.setStatus('current')
if mibBuilder.loadTexts: apDdSubscriberPeriodActive.setDescription('Number of the DD subscriber is Active in this period')
apDdSubscriberPeriodHigh = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 101), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdSubscriberPeriodHigh.setStatus('current')
if mibBuilder.loadTexts: apDdSubscriberPeriodHigh.setDescription('Highest number of the DD subscriber in this period')
apDdSubscriberPeriodTotal = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 102), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdSubscriberPeriodTotal.setStatus('current')
if mibBuilder.loadTexts: apDdSubscriberPeriodTotal.setDescription('Total Number of the DD subscriber in this period')
apDdSubscriberLifeTotal = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 103), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdSubscriberLifeTotal.setStatus('current')
if mibBuilder.loadTexts: apDdSubscriberLifeTotal.setDescription('Total Number of the DD subscriber in life')
apDdSubscriberLifePerMax = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 104), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdSubscriberLifePerMax.setStatus('current')
if mibBuilder.loadTexts: apDdSubscriberLifePerMax.setDescription('PerMax number of the DD subscriber in life')
apDdSubscriberLifeHigh = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 105), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdSubscriberLifeHigh.setStatus('current')
if mibBuilder.loadTexts: apDdSubscriberLifeHigh.setDescription('Highest number of the DD subscriber in life')
apDdSubscribePeriodActive = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 106), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdSubscribePeriodActive.setStatus('current')
if mibBuilder.loadTexts: apDdSubscribePeriodActive.setDescription('Number of the DD subscriber is Active in Initial state in this period')
apDdSubscribePeriodHigh = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 107), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdSubscribePeriodHigh.setStatus('current')
if mibBuilder.loadTexts: apDdSubscribePeriodHigh.setDescription('Highest number of the DD subscriber in Initial state in this period')
apDdSubscribePeriodTotal = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 108), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdSubscribePeriodTotal.setStatus('current')
if mibBuilder.loadTexts: apDdSubscribePeriodTotal.setDescription('Total Number of the DD subscriber in Initial state in this period')
apDdSubscribeLifeTotal = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 109), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdSubscribeLifeTotal.setStatus('current')
if mibBuilder.loadTexts: apDdSubscribeLifeTotal.setDescription('Total Number of the DD subscriber in Initial state in life')
apDdSubscribeLifePerMax = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 110), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdSubscribeLifePerMax.setStatus('current')
if mibBuilder.loadTexts: apDdSubscribeLifePerMax.setDescription('PerMax number of the DD subscriber in Initial state in life')
apDdSubscribeLifeHigh = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 111), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdSubscribeLifeHigh.setStatus('current')
if mibBuilder.loadTexts: apDdSubscribeLifeHigh.setDescription('Highest number of the DD subscriber in Initial state in life')
apDdUnsubscribePeriodActive = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 112), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdUnsubscribePeriodActive.setStatus('current')
if mibBuilder.loadTexts: apDdUnsubscribePeriodActive.setDescription('Number of the DD subscriber is Active in Established state in this period')
apDdUnsubscribePeriodHigh = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 113), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdUnsubscribePeriodHigh.setStatus('current')
if mibBuilder.loadTexts: apDdUnsubscribePeriodHigh.setDescription('Highest number of the DD subscriber in Established state in this period')
apDdUnsubscribePeriodTotal = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 114), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdUnsubscribePeriodTotal.setStatus('current')
if mibBuilder.loadTexts: apDdUnsubscribePeriodTotal.setDescription('Total Number of the DD subscriber in Established state in this period')
apDdUnsubscribeLifeTotal = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 115), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdUnsubscribeLifeTotal.setStatus('current')
if mibBuilder.loadTexts: apDdUnsubscribeLifeTotal.setDescription('Total Number of the DD subscriber in Established state in life')
apDdUnsubscribeLifePerMax = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 116), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdUnsubscribeLifePerMax.setStatus('current')
if mibBuilder.loadTexts: apDdUnsubscribeLifePerMax.setDescription('PerMax number of the DD subscriber in Established state in life')
apDdUnsubscribeLifeHigh = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 117), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdUnsubscribeLifeHigh.setStatus('current')
if mibBuilder.loadTexts: apDdUnsubscribeLifeHigh.setDescription('Highest number of the DD subscriber in Established state in life')
apDdPolicyHitPeriodActive = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 118), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdPolicyHitPeriodActive.setStatus('current')
if mibBuilder.loadTexts: apDdPolicyHitPeriodActive.setDescription('Number of the DD subscriber is Active in Terminated state in this period')
apDdPolicyHitPeriodHigh = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 119), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdPolicyHitPeriodHigh.setStatus('current')
if mibBuilder.loadTexts: apDdPolicyHitPeriodHigh.setDescription('Highest number of the DD subscriber in Terminated state in this period')
apDdPolicyHitPeriodTotal = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 120), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdPolicyHitPeriodTotal.setStatus('current')
if mibBuilder.loadTexts: apDdPolicyHitPeriodTotal.setDescription('Total Number of the DD subscriber in Terminated state in this period')
apDdPolicyHitLifeTotal = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 121), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdPolicyHitLifeTotal.setStatus('current')
if mibBuilder.loadTexts: apDdPolicyHitLifeTotal.setDescription('Total Number of the DD subscriber in Terminated state in life')
apDdPolicyHitLifePerMax = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 122), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdPolicyHitLifePerMax.setStatus('current')
if mibBuilder.loadTexts: apDdPolicyHitLifePerMax.setDescription('PerMax number of the DD subscriber in Terminated state in life')
apDdPolicyHitLifeHigh = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 123), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdPolicyHitLifeHigh.setStatus('current')
if mibBuilder.loadTexts: apDdPolicyHitLifeHigh.setDescription('Highest number of the DD subscriber in Terminated state in life')
apDdPolicyMissPeriodActive = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 124), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdPolicyMissPeriodActive.setStatus('current')
if mibBuilder.loadTexts: apDdPolicyMissPeriodActive.setDescription('Number of the DD subscriber is Active in Timeout state in this period')
apDdPolicyMissPeriodHigh = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 125), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdPolicyMissPeriodHigh.setStatus('current')
if mibBuilder.loadTexts: apDdPolicyMissPeriodHigh.setDescription('Highest number of the DD subscriber in Timeout state in this period')
apDdPolicyMissPeriodTotal = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 126), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdPolicyMissPeriodTotal.setStatus('current')
if mibBuilder.loadTexts: apDdPolicyMissPeriodTotal.setDescription('Total Number of the DD subscriber in Timeout state in this period')
apDdPolicyMissLifeTotal = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 127), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdPolicyMissLifeTotal.setStatus('current')
if mibBuilder.loadTexts: apDdPolicyMissLifeTotal.setDescription('Total Number of the DD subscriber in Timeout state in life')
apDdPolicyMissLifePerMax = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 128), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdPolicyMissLifePerMax.setStatus('current')
if mibBuilder.loadTexts: apDdPolicyMissLifePerMax.setDescription('PerMax number of the DD subscriber in Timeout state in life')
apDdPolicyMissLifeHigh = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 129), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdPolicyMissLifeHigh.setStatus('current')
if mibBuilder.loadTexts: apDdPolicyMissLifeHigh.setDescription('Highest number of the DD subscriber in Timeout state in life')
apDdSubscriberMissPeriodTotal = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 130), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdSubscriberMissPeriodTotal.setStatus('current')
if mibBuilder.loadTexts: apDdSubscriberMissPeriodTotal.setDescription('Total Number of the DD subscriber in Errors state in this period')
apDdSubscriberMissLifeTotal = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 131), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdSubscriberMissLifeTotal.setStatus('current')
if mibBuilder.loadTexts: apDdSubscriberMissLifeTotal.setDescription('Total Number of the DD subscriber in Errors state in life')
apDdSubscriberMissLifePerMax = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 132), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdSubscriberMissLifePerMax.setStatus('current')
if mibBuilder.loadTexts: apDdSubscriberMissLifePerMax.setDescription('PerMax number of the DD subscriber in Errors state in life')
apDdInterfaceStatsTable = MibTable((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1), )
if mibBuilder.loadTexts: apDdInterfaceStatsTable.setStatus('current')
if mibBuilder.loadTexts: apDdInterfaceStatsTable.setDescription('DD interface statistics.')
apDdInterfaceStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1), ).setIndexNames((0, "APDD-MIB", "apDdInterfaceIndex"))
if mibBuilder.loadTexts: apDdInterfaceStatsEntry.setStatus('current')
if mibBuilder.loadTexts: apDdInterfaceStatsEntry.setDescription('A table entry designed to hold per DD interface statistics.')
apDdInterfaceIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647))).setMaxAccess("accessiblefornotify")
if mibBuilder.loadTexts: apDdInterfaceIndex.setStatus('current')
if mibBuilder.loadTexts: apDdInterfaceIndex.setDescription('An integer for the sole purpose of indexing the DD interface.')
apDdInterfaceRealmName = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdInterfaceRealmName.setStatus('current')
if mibBuilder.loadTexts: apDdInterfaceRealmName.setDescription('Realm name of the DD interface if the row is for per interface stats. Otherwise, it is an empty string.')
apDdClientTransCPActive = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 3), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdClientTransCPActive.setStatus('current')
if mibBuilder.loadTexts: apDdClientTransCPActive.setDescription('Number of active client transactions in the current period.')
apDdClientTransCPHigh = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 4), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdClientTransCPHigh.setStatus('current')
if mibBuilder.loadTexts: apDdClientTransCPHigh.setDescription('Maximum value of apDdClientTransCPActive in the current period (high water mark). ')
apDdClientTransCPTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 5), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdClientTransCPTotal.setStatus('current')
if mibBuilder.loadTexts: apDdClientTransCPTotal.setDescription('Total number of client transactions in the current period.')
apDdClientTransLTTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 6), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdClientTransLTTotal.setStatus('current')
if mibBuilder.loadTexts: apDdClientTransLTTotal.setDescription('Total number of transactions in client side in life time.')
apDdClientTransLTPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 7), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdClientTransLTPerMax.setStatus('current')
if mibBuilder.loadTexts: apDdClientTransLTPerMax.setDescription('Maximum value of apDdClientTransCPTotal across all periods (high water mark).')
apDdClientTransLTHigh = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 8), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdClientTransLTHigh.setStatus('current')
if mibBuilder.loadTexts: apDdClientTransLTHigh.setDescription('Maximum value of apDdClientTransCPHigh across all periods (high water mark).')
apDdServerTransCPActive = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 9), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdServerTransCPActive.setStatus('current')
if mibBuilder.loadTexts: apDdServerTransCPActive.setDescription('Number of active transactions in server side in current period.')
apDdServerTransCPHigh = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 10), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdServerTransCPHigh.setStatus('current')
if mibBuilder.loadTexts: apDdServerTransCPHigh.setDescription('Highest number of active transactions in server side in current period.')
apDdServerTransCPTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 11), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdServerTransCPTotal.setStatus('current')
if mibBuilder.loadTexts: apDdServerTransCPTotal.setDescription('Total number of transactions in server side in current period.')
apDdServerTransLTTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 12), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdServerTransLTTotal.setStatus('current')
if mibBuilder.loadTexts: apDdServerTransLTTotal.setDescription('Total number of transactions in server side in life time.')
apDdServerTransLTPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 13), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdServerTransLTPerMax.setStatus('current')
if mibBuilder.loadTexts: apDdServerTransLTPerMax.setDescription('Maximum value of apDdServerTransCPTotal across all periods (high water mark).')
apDdServerTransLTHigh = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 14), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdServerTransLTHigh.setStatus('current')
if mibBuilder.loadTexts: apDdServerTransLTHigh.setDescription('Maximum value of apDdServerTransCPHigh across all periods (high water mark).')
apDdGenSocketsCPActive = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 15), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdGenSocketsCPActive.setStatus('current')
if mibBuilder.loadTexts: apDdGenSocketsCPActive.setDescription('Number of active sockets in current period.')
apDdGenSocketsCPHigh = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 16), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdGenSocketsCPHigh.setStatus('current')
if mibBuilder.loadTexts: apDdGenSocketsCPHigh.setDescription('Highest number of active sockets in current period.')
apDdGenSocketsCPTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 17), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdGenSocketsCPTotal.setStatus('current')
if mibBuilder.loadTexts: apDdGenSocketsCPTotal.setDescription('Total number of sockets in current period.')
apDdGenSocketsLTTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 18), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdGenSocketsLTTotal.setStatus('current')
if mibBuilder.loadTexts: apDdGenSocketsLTTotal.setDescription('Total number of sockets in life time.')
apDdGenSocketsLTPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 19), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdGenSocketsLTPerMax.setStatus('current')
if mibBuilder.loadTexts: apDdGenSocketsLTPerMax.setDescription('Maximum value of apDdSocketsCPTotal across all periods (high water mark).')
apDdGenSocketsLTHigh = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 20), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdGenSocketsLTHigh.setStatus('current')
if mibBuilder.loadTexts: apDdGenSocketsLTHigh.setDescription('Maximum value of apDdSocketsCPHigh across all periods (high water mark).')
apDdGenConnectsCPActive = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 21), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdGenConnectsCPActive.setStatus('current')
if mibBuilder.loadTexts: apDdGenConnectsCPActive.setDescription('Number of active connections in current period.')
apDdGenConnectsCPHigh = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 22), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdGenConnectsCPHigh.setStatus('current')
if mibBuilder.loadTexts: apDdGenConnectsCPHigh.setDescription('high number of connections in current period.')
apDdGenConnectsCPTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 23), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdGenConnectsCPTotal.setStatus('current')
if mibBuilder.loadTexts: apDdGenConnectsCPTotal.setDescription('Total number of connections in current period.')
apDdGenConnectsLTTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 24), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdGenConnectsLTTotal.setStatus('current')
if mibBuilder.loadTexts: apDdGenConnectsLTTotal.setDescription('Total number of connections in life time.')
apDdGenConnectsLTPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 25), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdGenConnectsLTPerMax.setStatus('current')
if mibBuilder.loadTexts: apDdGenConnectsLTPerMax.setDescription('Maximum value of apDdConnectsCPTotal across all periods (high water mark).')
apDdGenConnectsLTHigh = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 26), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdGenConnectsLTHigh.setStatus('current')
if mibBuilder.loadTexts: apDdGenConnectsLTHigh.setDescription('Maximum value of apDdConnectsCPHigh across all periods (high water mark).')
apDdErrorStatusTable = MibTable((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2), )
if mibBuilder.loadTexts: apDdErrorStatusTable.setStatus('current')
if mibBuilder.loadTexts: apDdErrorStatusTable.setDescription('per DD interface error stats.')
apDdErrorStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1), ).setIndexNames((0, "APDD-MIB", "apDdInterfaceIndex"))
if mibBuilder.loadTexts: apDdErrorStatusEntry.setStatus('current')
if mibBuilder.loadTexts: apDdErrorStatusEntry.setDescription('A table entry designed to hold error status data')
apDdNoRouteFoundRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 1), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdNoRouteFoundRecent.setStatus('current')
if mibBuilder.loadTexts: apDdNoRouteFoundRecent.setDescription("Number of 'no route found' error in recent period.")
apDdNoRouteFoundTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 2), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdNoRouteFoundTotal.setStatus('current')
if mibBuilder.loadTexts: apDdNoRouteFoundTotal.setDescription("Total number of 'no route found' error in life time.")
apDdNoRouteFoundPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 3), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdNoRouteFoundPerMax.setStatus('current')
if mibBuilder.loadTexts: apDdNoRouteFoundPerMax.setDescription('Maximum value of apDdNoRouteFoundRecent across all periods (high water mark).')
apDdMalformedMsgRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 4), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdMalformedMsgRecent.setStatus('current')
if mibBuilder.loadTexts: apDdMalformedMsgRecent.setDescription("Number of 'mal-formed message' error in recent period.")
apDdMalformedMsgTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 5), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdMalformedMsgTotal.setStatus('current')
if mibBuilder.loadTexts: apDdMalformedMsgTotal.setDescription("Total number of 'mal-formed message' error in life time.")
apDdMalformedMsgPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 6), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdMalformedMsgPerMax.setStatus('current')
if mibBuilder.loadTexts: apDdMalformedMsgPerMax.setDescription('Maximum value of apDdMalformedMsgRecent across all periods (high water mark).')
apDdRejectedMsgRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 7), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdRejectedMsgRecent.setStatus('current')
if mibBuilder.loadTexts: apDdRejectedMsgRecent.setDescription("Number of 'rejected msg'' error in recent period.")
apDdRejectedMsgTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 8), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdRejectedMsgTotal.setStatus('current')
if mibBuilder.loadTexts: apDdRejectedMsgTotal.setDescription("Total number of 'rejected msg' error in life time.")
apDdRejectedMsgPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 9), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdRejectedMsgPerMax.setStatus('current')
if mibBuilder.loadTexts: apDdRejectedMsgPerMax.setDescription('Maximum value of apDdRejectedMsgRecent across all periods (high water mark).')
apDdDroppedMsgRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 10), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdDroppedMsgRecent.setStatus('current')
if mibBuilder.loadTexts: apDdDroppedMsgRecent.setDescription("Number of 'dropped msg'' error in recent period.")
apDdDroppedMsgTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 11), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdDroppedMsgTotal.setStatus('current')
if mibBuilder.loadTexts: apDdDroppedMsgTotal.setDescription("Total number of 'dropped msg' error in life time.")
apDdDroppedMsgPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 12), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdDroppedMsgPerMax.setStatus('current')
if mibBuilder.loadTexts: apDdDroppedMsgPerMax.setDescription('Maximum value of apDdDroppedMsgRecent across all periods (high water mark).')
apDdInboundConstraintsRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 13), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdInboundConstraintsRecent.setStatus('current')
if mibBuilder.loadTexts: apDdInboundConstraintsRecent.setDescription("Number of 'inbound constraints'' error in recent period.")
apDdInboundConstraintsTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 14), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdInboundConstraintsTotal.setStatus('current')
if mibBuilder.loadTexts: apDdInboundConstraintsTotal.setDescription("Total number of 'inbound constraints' error in life time.")
apDdInboundConstraintsPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 15), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdInboundConstraintsPerMax.setStatus('current')
if mibBuilder.loadTexts: apDdInboundConstraintsPerMax.setDescription('Maximum value of apDdInboundConstraintsRecent across all periods (high water mark).')
apDdOutboundConstraintsRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 16), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdOutboundConstraintsRecent.setStatus('current')
if mibBuilder.loadTexts: apDdOutboundConstraintsRecent.setDescription("Number of 'outbound constraints'' error in recent period.")
apDdOutboundConstraintsTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 17), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdOutboundConstraintsTotal.setStatus('current')
if mibBuilder.loadTexts: apDdOutboundConstraintsTotal.setDescription("Total number of 'outbound constraints' error in life time.")
apDdOutboundConstraintsPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 18), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdOutboundConstraintsPerMax.setStatus('current')
if mibBuilder.loadTexts: apDdOutboundConstraintsPerMax.setDescription('Maximum value of apDdOutboundConstraintsRecent across all periods (high water mark).')
apDdMsgTypeInfoTable = MibTable((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 3), )
if mibBuilder.loadTexts: apDdMsgTypeInfoTable.setStatus('current')
if mibBuilder.loadTexts: apDdMsgTypeInfoTable.setDescription('static system message type information.')
apDdMsgTypeInfoEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 3, 1), ).setIndexNames((0, "APDD-MIB", "apDdMsgTypeIndex"))
if mibBuilder.loadTexts: apDdMsgTypeInfoEntry.setStatus('current')
if mibBuilder.loadTexts: apDdMsgTypeInfoEntry.setDescription('A table entry designed for message type inf.')
apDdMsgTypeIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 3, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647)))
if mibBuilder.loadTexts: apDdMsgTypeIndex.setStatus('current')
if mibBuilder.loadTexts: apDdMsgTypeIndex.setDescription('An integer for the sole purpose of indexing DD message types.')
apDdMsgTypeMsgName = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 3, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdMsgTypeMsgName.setStatus('current')
if mibBuilder.loadTexts: apDdMsgTypeMsgName.setDescription('The identification string of the message type.')
apDdMsgTypeStatsTable = MibTable((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4), )
if mibBuilder.loadTexts: apDdMsgTypeStatsTable.setStatus('current')
if mibBuilder.loadTexts: apDdMsgTypeStatsTable.setDescription('table for holding message type stats.')
apDdMsgTypeStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1), ).setIndexNames((0, "APDD-MIB", "apDdInterfaceIndex"), (0, "APDD-MIB", "apDdMsgTypeIndex"))
if mibBuilder.loadTexts: apDdMsgTypeStatsEntry.setStatus('current')
if mibBuilder.loadTexts: apDdMsgTypeStatsEntry.setDescription('A table entry designed for message type statistics.')
apDdMsgTypeServerReqRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 3), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdMsgTypeServerReqRecent.setStatus('current')
if mibBuilder.loadTexts: apDdMsgTypeServerReqRecent.setDescription('Number of server requests in recent period.')
apDdMsgTypeServerReqTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 4), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdMsgTypeServerReqTotal.setStatus('current')
if mibBuilder.loadTexts: apDdMsgTypeServerReqTotal.setDescription('Total number of server requests in life time.')
apDdMsgTypeServerReqPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 5), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdMsgTypeServerReqPerMax.setStatus('current')
if mibBuilder.loadTexts: apDdMsgTypeServerReqPerMax.setDescription('Maximum value of apDdMsgTypeServerReqRecent across all periods (high water mark)')
apDdMsgTypeClientReqRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 6), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdMsgTypeClientReqRecent.setStatus('current')
if mibBuilder.loadTexts: apDdMsgTypeClientReqRecent.setDescription('Number of client requests in recent period.')
apDdMsgTypeClientReqTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 7), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdMsgTypeClientReqTotal.setStatus('current')
if mibBuilder.loadTexts: apDdMsgTypeClientReqTotal.setDescription('Total number of client requests in life time.')
apDdMsgTypeClientReqPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 8), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdMsgTypeClientReqPerMax.setStatus('current')
if mibBuilder.loadTexts: apDdMsgTypeClientReqPerMax.setDescription('Maximum value of apDdMsgTypeClientReqRecent across all periods (high water mark).')
apDdMsgTypeServerRetransRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 9), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdMsgTypeServerRetransRecent.setStatus('current')
if mibBuilder.loadTexts: apDdMsgTypeServerRetransRecent.setDescription('Number of server retransmissions in recent period.')
apDdMsgTypeServerRetransTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 10), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdMsgTypeServerRetransTotal.setStatus('current')
if mibBuilder.loadTexts: apDdMsgTypeServerRetransTotal.setDescription('Total number of server retransmissions in life time.')
apDdMsgTypeServerRetransPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 11), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdMsgTypeServerRetransPerMax.setStatus('current')
if mibBuilder.loadTexts: apDdMsgTypeServerRetransPerMax.setDescription('Maximum value of apDdMsgTypeServerRetransRecent across all periods (high water mark)')
apDdMsgTypeClientRetransRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 12), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdMsgTypeClientRetransRecent.setStatus('current')
if mibBuilder.loadTexts: apDdMsgTypeClientRetransRecent.setDescription('Number of client retransmissions in recent period.')
apDdMsgTypeClientRetransTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 13), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdMsgTypeClientRetransTotal.setStatus('current')
if mibBuilder.loadTexts: apDdMsgTypeClientRetransTotal.setDescription('Total number of client retransmissions in life time.')
apDdMsgTypeClientRetransPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 14), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdMsgTypeClientRetransPerMax.setStatus('current')
if mibBuilder.loadTexts: apDdMsgTypeClientRetransPerMax.setDescription('Maximum value of apDdMsgTypeClientRetransRecent across all periods (high water mark).')
apDdMsgTypeServerRespRetransRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 15), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdMsgTypeServerRespRetransRecent.setStatus('current')
if mibBuilder.loadTexts: apDdMsgTypeServerRespRetransRecent.setDescription('Number of server response retransactions in recent period.')
apDdMsgTypeServerRespRetransTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 16), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdMsgTypeServerRespRetransTotal.setStatus('current')
if mibBuilder.loadTexts: apDdMsgTypeServerRespRetransTotal.setDescription('Total number of server response retransactions in life time.')
apDdMsgTypeServerRespRetransPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 17), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdMsgTypeServerRespRetransPerMax.setStatus('current')
if mibBuilder.loadTexts: apDdMsgTypeServerRespRetransPerMax.setDescription('Maximum value of apDdMsgTypeServerRespRetransRecent across all periods (high water mark).')
apDdMsgTypeClientRespRetransRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 21), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdMsgTypeClientRespRetransRecent.setStatus('current')
if mibBuilder.loadTexts: apDdMsgTypeClientRespRetransRecent.setDescription('Number of client response retransactions in recent period.')
apDdMsgTypeClientRespRetransTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 22), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdMsgTypeClientRespRetransTotal.setStatus('current')
if mibBuilder.loadTexts: apDdMsgTypeClientRespRetransTotal.setDescription('Total number of client response retransactions in life time.')
apDdMsgTypeClientRespRetransPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 23), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdMsgTypeClientRespRetransPerMax.setStatus('current')
if mibBuilder.loadTexts: apDdMsgTypeClientRespRetransPerMax.setDescription('Maximum value of apDdMsgTypeClientRespRetransRecent across all periods (high water mark).')
apDdMsgTypeClientTimeoutRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 27), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdMsgTypeClientTimeoutRecent.setStatus('current')
if mibBuilder.loadTexts: apDdMsgTypeClientTimeoutRecent.setDescription('Number of client transaction timeout in recent period.')
apDdMsgTypeClientTimeoutTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 28), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdMsgTypeClientTimeoutTotal.setStatus('current')
if mibBuilder.loadTexts: apDdMsgTypeClientTimeoutTotal.setDescription('Total number of client transaction timeout in life time.')
apDdMsgTypeClientTimeoutPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 29), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdMsgTypeClientTimeoutPerMax.setStatus('current')
if mibBuilder.loadTexts: apDdMsgTypeClientTimeoutPerMax.setDescription('Maximum value of apDdMsgTypeClientTimeoutRecent across all periods (high water mark).')
apDdMsgTypeClientThrottledRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 33), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdMsgTypeClientThrottledRecent.setStatus('current')
if mibBuilder.loadTexts: apDdMsgTypeClientThrottledRecent.setDescription('Number of locally throttled client count in recent period.')
apDdMsgTypeClientThrottledTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 34), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdMsgTypeClientThrottledTotal.setStatus('current')
if mibBuilder.loadTexts: apDdMsgTypeClientThrottledTotal.setDescription('Total number of locally throttled client count in life time.')
apDdMsgTypeClientThrottledPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 35), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdMsgTypeClientThrottledPerMax.setStatus('current')
if mibBuilder.loadTexts: apDdMsgTypeClientThrottledPerMax.setDescription('Maximum value of apDdMsgTypeClientThrottledRecent across all periods (high water mark).')
apDdMsgTypeAverageLatency = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 36), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdMsgTypeAverageLatency.setStatus('current')
if mibBuilder.loadTexts: apDdMsgTypeAverageLatency.setDescription('Average Latency.')
apDdMsgTypeMaximumLatency = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 37), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdMsgTypeMaximumLatency.setStatus('current')
if mibBuilder.loadTexts: apDdMsgTypeMaximumLatency.setDescription('Maximum Latency.')
apDdMsgTypeLatencyWindow = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 38), Integer32()).setUnits('second').setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdMsgTypeLatencyWindow.setStatus('current')
if mibBuilder.loadTexts: apDdMsgTypeLatencyWindow.setDescription('Latency window length.')
apDdMsgReturnCodeInfoTable = MibTable((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 5), )
if mibBuilder.loadTexts: apDdMsgReturnCodeInfoTable.setStatus('current')
if mibBuilder.loadTexts: apDdMsgReturnCodeInfoTable.setDescription('DD return message code stats table.')
apDdMsgReturnCodeInfoEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 5, 1), ).setIndexNames((0, "APDD-MIB", "apDdMsgReturnCodeIndex"))
if mibBuilder.loadTexts: apDdMsgReturnCodeInfoEntry.setStatus('current')
if mibBuilder.loadTexts: apDdMsgReturnCodeInfoEntry.setDescription('A table entry designed to hold return code stats.')
apDdMsgReturnCodeIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 5, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647)))
if mibBuilder.loadTexts: apDdMsgReturnCodeIndex.setStatus('current')
if mibBuilder.loadTexts: apDdMsgReturnCodeIndex.setDescription('An integer for the sole purpose of indexing message return code.')
apDdMsgReturnCodeName = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 5, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdMsgReturnCodeName.setStatus('current')
if mibBuilder.loadTexts: apDdMsgReturnCodeName.setDescription('The name string of the message return code.')
apDdMsgStatsReturnCodeTable = MibTable((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 6), )
if mibBuilder.loadTexts: apDdMsgStatsReturnCodeTable.setStatus('current')
if mibBuilder.loadTexts: apDdMsgStatsReturnCodeTable.setDescription('DD return message code stats table.')
apDdMsgStatsReturnCodeEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 6, 1), ).setIndexNames((0, "APDD-MIB", "apDdInterfaceIndex"), (0, "APDD-MIB", "apDdMsgTypeIndex"), (0, "APDD-MIB", "apDdMsgReturnCodeIndex"))
if mibBuilder.loadTexts: apDdMsgStatsReturnCodeEntry.setStatus('current')
if mibBuilder.loadTexts: apDdMsgStatsReturnCodeEntry.setDescription('A table entry designed to hold return code stats.')
apDdMsgReturnCodeServerRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 6, 1, 3), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdMsgReturnCodeServerRecent.setStatus('current')
if mibBuilder.loadTexts: apDdMsgReturnCodeServerRecent.setDescription('Number of server requests in recent period.')
apDdMsgReturnCodeServerTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 6, 1, 4), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdMsgReturnCodeServerTotal.setStatus('current')
if mibBuilder.loadTexts: apDdMsgReturnCodeServerTotal.setDescription('Total number of server requests in life time.')
apDdMsgReturnCodeServerPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 6, 1, 5), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdMsgReturnCodeServerPerMax.setStatus('current')
if mibBuilder.loadTexts: apDdMsgReturnCodeServerPerMax.setDescription('Maximum value of apDdMsgReturnCodeServerRecent across all periods (high water mark).')
apDdMsgReturnCodeClientRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 6, 1, 6), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdMsgReturnCodeClientRecent.setStatus('current')
if mibBuilder.loadTexts: apDdMsgReturnCodeClientRecent.setDescription('Number of server requests in recent period.')
apDdMsgReturnCodeClientTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 6, 1, 7), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdMsgReturnCodeClientTotal.setStatus('current')
if mibBuilder.loadTexts: apDdMsgReturnCodeClientTotal.setDescription('Total number of server requests in life time.')
apDdMsgReturnCodeClientPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 6, 1, 8), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdMsgReturnCodeClientPerMax.setStatus('current')
if mibBuilder.loadTexts: apDdMsgReturnCodeClientPerMax.setDescription('Maximum value of apDdMsgReturnCodeClientRecent across all periods (high water mark).')
apDdAgentStatsTable = MibTable((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7), )
if mibBuilder.loadTexts: apDdAgentStatsTable.setStatus('current')
if mibBuilder.loadTexts: apDdAgentStatsTable.setDescription('DD agent statistics.')
apDdAgentStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1), ).setIndexNames((0, "APDD-MIB", "apDdAgentIndex"))
if mibBuilder.loadTexts: apDdAgentStatsEntry.setStatus('current')
if mibBuilder.loadTexts: apDdAgentStatsEntry.setDescription('A table entry designed to hold per DD agent statistics.')
apDdAgentIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647))).setMaxAccess("accessiblefornotify")
if mibBuilder.loadTexts: apDdAgentIndex.setStatus('current')
if mibBuilder.loadTexts: apDdAgentIndex.setDescription('An integer for the sole purpose of indexing the DD agent.')
apDdAgentRealmName = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentRealmName.setStatus('current')
if mibBuilder.loadTexts: apDdAgentRealmName.setDescription('Realm name of the DD agent if the row is for per agent stats. Otherwise, it is an empty string.')
apDdAgentClientTransCPActive = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 3), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentClientTransCPActive.setStatus('current')
if mibBuilder.loadTexts: apDdAgentClientTransCPActive.setDescription('Number of active client transactions in the current period.')
apDdAgentClientTransCPHigh = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 4), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentClientTransCPHigh.setStatus('current')
if mibBuilder.loadTexts: apDdAgentClientTransCPHigh.setDescription('Maximum value of apDdAgentClientTransCPActive in the current period (high water mark). ')
apDdAgentClientTransCPTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 5), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentClientTransCPTotal.setStatus('current')
if mibBuilder.loadTexts: apDdAgentClientTransCPTotal.setDescription('Total number of client transactions in the current period.')
apDdAgentClientTransLTTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 6), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentClientTransLTTotal.setStatus('current')
if mibBuilder.loadTexts: apDdAgentClientTransLTTotal.setDescription('Total number of transactions in client side in life time.')
apDdAgentClientTransLTPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 7), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentClientTransLTPerMax.setStatus('current')
if mibBuilder.loadTexts: apDdAgentClientTransLTPerMax.setDescription('Maximum value of apDdAgentClientTransCPTotal across all periods (high water mark).')
apDdAgentClientTransLTHigh = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 8), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentClientTransLTHigh.setStatus('current')
if mibBuilder.loadTexts: apDdAgentClientTransLTHigh.setDescription('Maximum value of apDdAgentClientTransCPHigh across all periods (high water mark).')
apDdAgentServerTransCPActive = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 9), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentServerTransCPActive.setStatus('current')
if mibBuilder.loadTexts: apDdAgentServerTransCPActive.setDescription('Number of active transactions in server side in current period.')
apDdAgentServerTransCPHigh = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 10), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentServerTransCPHigh.setStatus('current')
if mibBuilder.loadTexts: apDdAgentServerTransCPHigh.setDescription('Highest number of active transactions in server side in current period.')
apDdAgentServerTransCPTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 11), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentServerTransCPTotal.setStatus('current')
if mibBuilder.loadTexts: apDdAgentServerTransCPTotal.setDescription('Total number of transactions in server side in current period.')
apDdAgentServerTransLTTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 12), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentServerTransLTTotal.setStatus('current')
if mibBuilder.loadTexts: apDdAgentServerTransLTTotal.setDescription('Total number of transactions in server side in life time.')
apDdAgentServerTransLTPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 13), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentServerTransLTPerMax.setStatus('current')
if mibBuilder.loadTexts: apDdAgentServerTransLTPerMax.setDescription('Maximum value of apDdAgentServerTransCPTotal across all periods (high water mark).')
apDdAgentServerTransLTHigh = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 14), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentServerTransLTHigh.setStatus('current')
if mibBuilder.loadTexts: apDdAgentServerTransLTHigh.setDescription('Maximum value of apDdAgentServerTransCPHigh across all periods (high water mark).')
apDdAgentGenSocketsCPActive = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 15), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentGenSocketsCPActive.setStatus('current')
if mibBuilder.loadTexts: apDdAgentGenSocketsCPActive.setDescription('Number of active sockets in current period.')
apDdAgentGenSocketsCPHigh = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 16), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentGenSocketsCPHigh.setStatus('current')
if mibBuilder.loadTexts: apDdAgentGenSocketsCPHigh.setDescription('Highest number of active sockets in current period.')
apDdAgentGenSocketsCPTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 17), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentGenSocketsCPTotal.setStatus('current')
if mibBuilder.loadTexts: apDdAgentGenSocketsCPTotal.setDescription('Total number of sockets in current period.')
apDdAgentGenSocketsLTTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 18), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentGenSocketsLTTotal.setStatus('current')
if mibBuilder.loadTexts: apDdAgentGenSocketsLTTotal.setDescription('Total number of sockets in life time.')
apDdAgentGenSocketsLTPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 19), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentGenSocketsLTPerMax.setStatus('current')
if mibBuilder.loadTexts: apDdAgentGenSocketsLTPerMax.setDescription('Maximum value of apDdAgentSocketsCPTotal across all periods (high water mark).')
apDdAgentGenSocketsLTHigh = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 20), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentGenSocketsLTHigh.setStatus('current')
if mibBuilder.loadTexts: apDdAgentGenSocketsLTHigh.setDescription('Maximum value of apDdAgentSocketsCPHigh across all periods (high water mark).')
apDdAgentGenConnectsCPActive = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 21), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentGenConnectsCPActive.setStatus('current')
if mibBuilder.loadTexts: apDdAgentGenConnectsCPActive.setDescription('Number of active connections in current period.')
apDdAgentGenConnectsCPHigh = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 22), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentGenConnectsCPHigh.setStatus('current')
if mibBuilder.loadTexts: apDdAgentGenConnectsCPHigh.setDescription('high number of connections in current period.')
apDdAgentGenConnectsCPTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 23), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentGenConnectsCPTotal.setStatus('current')
if mibBuilder.loadTexts: apDdAgentGenConnectsCPTotal.setDescription('Total number of connections in current period.')
apDdAgentGenConnectsLTTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 24), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentGenConnectsLTTotal.setStatus('current')
if mibBuilder.loadTexts: apDdAgentGenConnectsLTTotal.setDescription('Total number of connections in life time.')
apDdAgentGenConnectsLTPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 25), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentGenConnectsLTPerMax.setStatus('current')
if mibBuilder.loadTexts: apDdAgentGenConnectsLTPerMax.setDescription('Maximum value of apDdConnectsCPTotal across all periods (high water mark).')
apDdAgentGenConnectsLTHigh = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 26), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentGenConnectsLTHigh.setStatus('current')
if mibBuilder.loadTexts: apDdAgentGenConnectsLTHigh.setDescription('Maximum value of apDdAgentConnectsCPHigh across all periods (high water mark).')
apDdAgentErrorStatusTable = MibTable((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8), )
if mibBuilder.loadTexts: apDdAgentErrorStatusTable.setStatus('current')
if mibBuilder.loadTexts: apDdAgentErrorStatusTable.setDescription('per DD agent error stats.')
apDdAgentErrorStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1), ).setIndexNames((0, "APDD-MIB", "apDdAgentIndex"))
if mibBuilder.loadTexts: apDdAgentErrorStatusEntry.setStatus('current')
if mibBuilder.loadTexts: apDdAgentErrorStatusEntry.setDescription('A table entry designed to hold error status data')
apDdAgentNoRouteFoundRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 1), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentNoRouteFoundRecent.setStatus('current')
if mibBuilder.loadTexts: apDdAgentNoRouteFoundRecent.setDescription("Number of 'no route found' error in recent period.")
apDdAgentNoRouteFoundTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 2), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentNoRouteFoundTotal.setStatus('current')
if mibBuilder.loadTexts: apDdAgentNoRouteFoundTotal.setDescription("Total number of 'no route found' error in life time.")
apDdAgentNoRouteFoundPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 3), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentNoRouteFoundPerMax.setStatus('current')
if mibBuilder.loadTexts: apDdAgentNoRouteFoundPerMax.setDescription('Maximum value of apDdAgentNoRouteFoundRecent across all periods (high water mark).')
apDdAgentMalformedMsgRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 4), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentMalformedMsgRecent.setStatus('current')
if mibBuilder.loadTexts: apDdAgentMalformedMsgRecent.setDescription("Number of 'mal-formed message' error in recent period.")
apDdAgentMalformedMsgTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 5), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentMalformedMsgTotal.setStatus('current')
if mibBuilder.loadTexts: apDdAgentMalformedMsgTotal.setDescription("Total number of 'mal-formed message' error in life time.")
apDdAgentMalformedMsgPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 6), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentMalformedMsgPerMax.setStatus('current')
if mibBuilder.loadTexts: apDdAgentMalformedMsgPerMax.setDescription('Maximum value of apDdAgentMalformedMsgRecent across all periods (high water mark).')
apDdAgentRejectedMsgRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 7), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentRejectedMsgRecent.setStatus('current')
if mibBuilder.loadTexts: apDdAgentRejectedMsgRecent.setDescription("Number of 'rejected msg'' error in recent period.")
apDdAgentRejectedMsgTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 8), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentRejectedMsgTotal.setStatus('current')
if mibBuilder.loadTexts: apDdAgentRejectedMsgTotal.setDescription("Total number of 'rejected msg' error in life time.")
apDdAgentRejectedMsgPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 9), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentRejectedMsgPerMax.setStatus('current')
if mibBuilder.loadTexts: apDdAgentRejectedMsgPerMax.setDescription('Maximum value of apDdAgentRejectedMsgRecent across all periods (high water mark).')
apDdAgentDroppedMsgRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 10), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentDroppedMsgRecent.setStatus('current')
if mibBuilder.loadTexts: apDdAgentDroppedMsgRecent.setDescription("Number of 'dropped msg'' error in recent period.")
apDdAgentDroppedMsgTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 11), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentDroppedMsgTotal.setStatus('current')
if mibBuilder.loadTexts: apDdAgentDroppedMsgTotal.setDescription("Total number of 'dropped msg' error in life time.")
apDdAgentDroppedMsgPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 12), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentDroppedMsgPerMax.setStatus('current')
if mibBuilder.loadTexts: apDdAgentDroppedMsgPerMax.setDescription('Maximum value of apDdAgentDroppedMsgRecent across all periods (high water mark).')
apDdAgentInboundConstraintsRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 13), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentInboundConstraintsRecent.setStatus('current')
if mibBuilder.loadTexts: apDdAgentInboundConstraintsRecent.setDescription("Number of 'inbound constraints'' error in recent period.")
apDdAgentInboundConstraintsTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 14), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentInboundConstraintsTotal.setStatus('current')
if mibBuilder.loadTexts: apDdAgentInboundConstraintsTotal.setDescription("Total number of 'inbound constraints' error in life time.")
apDdAgentInboundConstraintsPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 15), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentInboundConstraintsPerMax.setStatus('current')
if mibBuilder.loadTexts: apDdAgentInboundConstraintsPerMax.setDescription('Maximum value of apDdAgentInboundConstraintsRecent across all periods (high water mark).')
apDdAgentOutboundConstraintsRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 16), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentOutboundConstraintsRecent.setStatus('current')
if mibBuilder.loadTexts: apDdAgentOutboundConstraintsRecent.setDescription("Number of 'outbound constraints'' error in recent period.")
apDdAgentOutboundConstraintsTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 17), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentOutboundConstraintsTotal.setStatus('current')
if mibBuilder.loadTexts: apDdAgentOutboundConstraintsTotal.setDescription("Total number of 'outbound constraints' error in life time.")
apDdAgentOutboundConstraintsPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 18), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentOutboundConstraintsPerMax.setStatus('current')
if mibBuilder.loadTexts: apDdAgentOutboundConstraintsPerMax.setDescription('Maximum value of apDdAgentOutboundConstraintsRecent across all periods (high water mark).')
apDdAgentMsgTypeStatsTable = MibTable((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9), )
if mibBuilder.loadTexts: apDdAgentMsgTypeStatsTable.setStatus('current')
if mibBuilder.loadTexts: apDdAgentMsgTypeStatsTable.setDescription('table for holding message type stats.')
apDdAgentMsgTypeStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1), ).setIndexNames((0, "APDD-MIB", "apDdAgentIndex"), (0, "APDD-MIB", "apDdMsgTypeIndex"))
if mibBuilder.loadTexts: apDdAgentMsgTypeStatsEntry.setStatus('current')
if mibBuilder.loadTexts: apDdAgentMsgTypeStatsEntry.setDescription('A table entry designed for message type statistics.')
apDdAgentMsgTypeServerReqRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 3), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentMsgTypeServerReqRecent.setStatus('current')
if mibBuilder.loadTexts: apDdAgentMsgTypeServerReqRecent.setDescription('Number of server requests in recent period.')
apDdAgentMsgTypeServerReqTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 4), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentMsgTypeServerReqTotal.setStatus('current')
if mibBuilder.loadTexts: apDdAgentMsgTypeServerReqTotal.setDescription('Total number of server requests in life time.')
apDdAgentMsgTypeServerReqPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 5), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentMsgTypeServerReqPerMax.setStatus('current')
if mibBuilder.loadTexts: apDdAgentMsgTypeServerReqPerMax.setDescription('Maximum value of apDdAgentMsgTypeServerReqRecent across all periods (high water mark)')
apDdAgentMsgTypeClientReqRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 6), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentMsgTypeClientReqRecent.setStatus('current')
if mibBuilder.loadTexts: apDdAgentMsgTypeClientReqRecent.setDescription('Number of client requests in recent period.')
apDdAgentMsgTypeClientReqTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 7), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentMsgTypeClientReqTotal.setStatus('current')
if mibBuilder.loadTexts: apDdAgentMsgTypeClientReqTotal.setDescription('Total number of client requests in life time.')
apDdAgentMsgTypeClientReqPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 8), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentMsgTypeClientReqPerMax.setStatus('current')
if mibBuilder.loadTexts: apDdAgentMsgTypeClientReqPerMax.setDescription('Maximum value of apDdAgentMsgTypeClientReqRecent across all periods (high water mark).')
apDdAgentMsgTypeServerRetransRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 9), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentMsgTypeServerRetransRecent.setStatus('current')
if mibBuilder.loadTexts: apDdAgentMsgTypeServerRetransRecent.setDescription('Number of server retransmissions in recent period.')
apDdAgentMsgTypeServerRetransTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 10), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentMsgTypeServerRetransTotal.setStatus('current')
if mibBuilder.loadTexts: apDdAgentMsgTypeServerRetransTotal.setDescription('Total number of server retransmissions in life time.')
apDdAgentMsgTypeServerRetransPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 11), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentMsgTypeServerRetransPerMax.setStatus('current')
if mibBuilder.loadTexts: apDdAgentMsgTypeServerRetransPerMax.setDescription('Maximum value of apDdAgentMsgTypeServerRetransRecent across all periods (high water mark)')
apDdAgentMsgTypeClientRetransRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 12), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentMsgTypeClientRetransRecent.setStatus('current')
if mibBuilder.loadTexts: apDdAgentMsgTypeClientRetransRecent.setDescription('Number of client retransmissions in recent period.')
apDdAgentMsgTypeClientRetransTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 13), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentMsgTypeClientRetransTotal.setStatus('current')
if mibBuilder.loadTexts: apDdAgentMsgTypeClientRetransTotal.setDescription('Total number of client retransmissions in life time.')
apDdAgentMsgTypeClientRetransPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 14), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentMsgTypeClientRetransPerMax.setStatus('current')
if mibBuilder.loadTexts: apDdAgentMsgTypeClientRetransPerMax.setDescription('Maximum value of apDdAgentMsgTypeClientRetransRecent across all periods (high water mark).')
apDdAgentMsgTypeServerRespRetransRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 15), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentMsgTypeServerRespRetransRecent.setStatus('current')
if mibBuilder.loadTexts: apDdAgentMsgTypeServerRespRetransRecent.setDescription('Number of server response retransactions in recent period.')
apDdAgentMsgTypeServerRespRetransTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 16), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentMsgTypeServerRespRetransTotal.setStatus('current')
if mibBuilder.loadTexts: apDdAgentMsgTypeServerRespRetransTotal.setDescription('Total number of server response retransactions in life time.')
apDdAgentMsgTypeServerRespRetransPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 17), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentMsgTypeServerRespRetransPerMax.setStatus('current')
if mibBuilder.loadTexts: apDdAgentMsgTypeServerRespRetransPerMax.setDescription('Maximum value of apDdAgentMsgTypeServerRespRetransRecent across all periods (high water mark).')
apDdAgentMsgTypeClientRespRetransRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 21), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentMsgTypeClientRespRetransRecent.setStatus('current')
if mibBuilder.loadTexts: apDdAgentMsgTypeClientRespRetransRecent.setDescription('Number of client response retransactions in recent period.')
apDdAgentMsgTypeClientRespRetransTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 22), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentMsgTypeClientRespRetransTotal.setStatus('current')
if mibBuilder.loadTexts: apDdAgentMsgTypeClientRespRetransTotal.setDescription('Total number of client response retransactions in life time.')
apDdAgentMsgTypeClientRespRetransPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 23), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentMsgTypeClientRespRetransPerMax.setStatus('current')
if mibBuilder.loadTexts: apDdAgentMsgTypeClientRespRetransPerMax.setDescription('Maximum value of apDdAgentMsgTypeClientRespRetransRecent across all periods (high water mark).')
apDdAgentMsgTypeClientTimeoutRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 27), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentMsgTypeClientTimeoutRecent.setStatus('current')
if mibBuilder.loadTexts: apDdAgentMsgTypeClientTimeoutRecent.setDescription('Number of client transaction timeout in recent period.')
apDdAgentMsgTypeClientTimeoutTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 28), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentMsgTypeClientTimeoutTotal.setStatus('current')
if mibBuilder.loadTexts: apDdAgentMsgTypeClientTimeoutTotal.setDescription('Total number of client transaction timeout in life time.')
apDdAgentMsgTypeClientTimeoutPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 29), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentMsgTypeClientTimeoutPerMax.setStatus('current')
if mibBuilder.loadTexts: apDdAgentMsgTypeClientTimeoutPerMax.setDescription('Maximum value of apDdAgentMsgTypeClientTimeoutRecent across all periods (high water mark).')
apDdAgentMsgTypeClientThrottledRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 33), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentMsgTypeClientThrottledRecent.setStatus('current')
if mibBuilder.loadTexts: apDdAgentMsgTypeClientThrottledRecent.setDescription('Number of locally throttled client count in recent period.')
apDdAgentMsgTypeClientThrottledTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 34), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentMsgTypeClientThrottledTotal.setStatus('current')
if mibBuilder.loadTexts: apDdAgentMsgTypeClientThrottledTotal.setDescription('Total number of locally throttled client count in life time.')
apDdAgentMsgTypeClientThrottledPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 35), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentMsgTypeClientThrottledPerMax.setStatus('current')
if mibBuilder.loadTexts: apDdAgentMsgTypeClientThrottledPerMax.setDescription('Maximum value of apDdAgentMsgTypeClientThrottledRecent across all periods (high water mark).')
apDdAgentMsgTypeAverageLatency = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 36), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentMsgTypeAverageLatency.setStatus('current')
if mibBuilder.loadTexts: apDdAgentMsgTypeAverageLatency.setDescription('Average Latency.')
apDdAgentMsgTypeMaximumLatency = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 37), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentMsgTypeMaximumLatency.setStatus('current')
if mibBuilder.loadTexts: apDdAgentMsgTypeMaximumLatency.setDescription('Maximum Latency.')
apDdAgentMsgTypeLatencyWindow = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 38), Integer32()).setUnits('second').setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentMsgTypeLatencyWindow.setStatus('current')
if mibBuilder.loadTexts: apDdAgentMsgTypeLatencyWindow.setDescription('Latency window length.')
apDdAgentMsgStatsReturnCodeTable = MibTable((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 10), )
if mibBuilder.loadTexts: apDdAgentMsgStatsReturnCodeTable.setStatus('current')
if mibBuilder.loadTexts: apDdAgentMsgStatsReturnCodeTable.setDescription('DD return message code stats table.')
apDdAgentMsgStatsReturnCodeEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 10, 1), ).setIndexNames((0, "APDD-MIB", "apDdAgentIndex"), (0, "APDD-MIB", "apDdMsgTypeIndex"), (0, "APDD-MIB", "apDdMsgReturnCodeIndex"))
if mibBuilder.loadTexts: apDdAgentMsgStatsReturnCodeEntry.setStatus('current')
if mibBuilder.loadTexts: apDdAgentMsgStatsReturnCodeEntry.setDescription('A table entry designed to hold return code stats.')
apDdAgentMsgReturnCodeServerRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 10, 1, 3), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentMsgReturnCodeServerRecent.setStatus('current')
if mibBuilder.loadTexts: apDdAgentMsgReturnCodeServerRecent.setDescription('Number of server requests in recent period.')
apDdAgentMsgReturnCodeServerTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 10, 1, 4), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentMsgReturnCodeServerTotal.setStatus('current')
if mibBuilder.loadTexts: apDdAgentMsgReturnCodeServerTotal.setDescription('Total number of server requests in life time.')
apDdAgentMsgReturnCodeServerPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 10, 1, 5), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentMsgReturnCodeServerPerMax.setStatus('current')
if mibBuilder.loadTexts: apDdAgentMsgReturnCodeServerPerMax.setDescription('Maximum value of apDdAgentMsgReturnCodeServerRecent across all periods (high water mark).')
apDdAgentMsgReturnCodeClientRecent = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 10, 1, 6), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentMsgReturnCodeClientRecent.setStatus('current')
if mibBuilder.loadTexts: apDdAgentMsgReturnCodeClientRecent.setDescription('Number of server requests in recent period.')
apDdAgentMsgReturnCodeClientTotal = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 10, 1, 7), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentMsgReturnCodeClientTotal.setStatus('current')
if mibBuilder.loadTexts: apDdAgentMsgReturnCodeClientTotal.setDescription('Total number of server requests in life time.')
apDdAgentMsgReturnCodeClientPerMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 10, 1, 8), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: apDdAgentMsgReturnCodeClientPerMax.setStatus('current')
if mibBuilder.loadTexts: apDdAgentMsgReturnCodeClientPerMax.setDescription('Maximum value of apDdAgentMsgReturnCodeClientRecent across all periods (high water mark).')
apDdDiameterAgentHostName = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 2, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 255))).setMaxAccess("accessiblefornotify")
if mibBuilder.loadTexts: apDdDiameterAgentHostName.setStatus('current')
if mibBuilder.loadTexts: apDdDiameterAgentHostName.setDescription('The hostname of the Diameter Agent where it is hosted.')
apDdDiameterIPPort = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 255))).setMaxAccess("accessiblefornotify")
if mibBuilder.loadTexts: apDdDiameterIPPort.setStatus('current')
if mibBuilder.loadTexts: apDdDiameterIPPort.setDescription('The IP port of the Diameter Agent where it is hosted.')
apDdDiameterAgentOriginHostName = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 2, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 255))).setMaxAccess("accessiblefornotify")
if mibBuilder.loadTexts: apDdDiameterAgentOriginHostName.setStatus('current')
if mibBuilder.loadTexts: apDdDiameterAgentOriginHostName.setDescription('The origin hostname of the Diameter Agent where it is hosted.')
apDdDiameterAgentOriginRealmName = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 2, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 255))).setMaxAccess("accessiblefornotify")
if mibBuilder.loadTexts: apDdDiameterAgentOriginRealmName.setStatus('current')
if mibBuilder.loadTexts: apDdDiameterAgentOriginRealmName.setDescription('The origin realm name of the Diameter Agent where it is hosted.')
apDdTransportType = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 2, 1, 5), ApTransportType()).setMaxAccess("accessiblefornotify")
if mibBuilder.loadTexts: apDdTransportType.setStatus('current')
if mibBuilder.loadTexts: apDdTransportType.setDescription('The transport type of the DD interface.')
apDdInterfaceStatusReason = MibScalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 2, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("disconnectByRequest", 0), ("diameterAgentUnreachable", 1), ("transportFailure", 2)))).setMaxAccess("accessiblefornotify")
if mibBuilder.loadTexts: apDdInterfaceStatusReason.setStatus('current')
if mibBuilder.loadTexts: apDdInterfaceStatusReason.setDescription('The reason for the status change on a DD interface')
apDdConnectionFailureTrap = NotificationType((1, 3, 6, 1, 4, 1, 9148, 3, 12, 2, 2, 0, 1)).setObjects(("APDD-MIB", "apDdInterfaceRealmName"), ("APDD-MIB", "apDdDiameterAgentHostName"), ("APDD-MIB", "apDdDiameterIPPort"), ("APDD-MIB", "apDdDiameterAgentOriginHostName"), ("APDD-MIB", "apDdDiameterAgentOriginRealmName"), ("APDD-MIB", "apDdTransportType"), ("APDD-MIB", "apDdInterfaceStatusReason"))
if mibBuilder.loadTexts: apDdConnectionFailureTrap.setStatus('current')
if mibBuilder.loadTexts: apDdConnectionFailureTrap.setDescription('A notification when a diameter connection is disconnected via a disconnect request.')
apDdConnectionFailureClearTrap = NotificationType((1, 3, 6, 1, 4, 1, 9148, 3, 12, 2, 2, 0, 2)).setObjects(("APDD-MIB", "apDdInterfaceRealmName"), ("APDD-MIB", "apDdDiameterAgentHostName"), ("APDD-MIB", "apDdDiameterIPPort"), ("APDD-MIB", "apDdDiameterAgentOriginHostName"), ("APDD-MIB", "apDdDiameterAgentOriginRealmName"), ("APDD-MIB", "apDdTransportType"), ("APDD-MIB", "apDdInterfaceStatusReason"))
if mibBuilder.loadTexts: apDdConnectionFailureClearTrap.setStatus('current')
if mibBuilder.loadTexts: apDdConnectionFailureClearTrap.setDescription('A notification when a transport failure has been recovered.')
apDdGeneralGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 1, 1)).setObjects(("APDD-MIB", "apDdInterfaceNumber"), ("APDD-MIB", "apDdCurrentTransRate"), ("APDD-MIB", "apDdHighTransRate"), ("APDD-MIB", "apDdLowTransRate"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
apDdGeneralGroup = apDdGeneralGroup.setStatus('current')
if mibBuilder.loadTexts: apDdGeneralGroup.setDescription('A collection of objects generic to DD system.')
apDdInterfaceStatsGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 1, 2)).setObjects(("APDD-MIB", "apDdInterfaceRealmName"), ("APDD-MIB", "apDdClientTransCPActive"), ("APDD-MIB", "apDdClientTransCPHigh"), ("APDD-MIB", "apDdClientTransCPTotal"), ("APDD-MIB", "apDdClientTransLTTotal"), ("APDD-MIB", "apDdClientTransLTPerMax"), ("APDD-MIB", "apDdClientTransLTHigh"), ("APDD-MIB", "apDdServerTransCPActive"), ("APDD-MIB", "apDdServerTransCPHigh"), ("APDD-MIB", "apDdServerTransCPTotal"), ("APDD-MIB", "apDdServerTransLTTotal"), ("APDD-MIB", "apDdServerTransLTPerMax"), ("APDD-MIB", "apDdServerTransLTHigh"), ("APDD-MIB", "apDdGenSocketsCPActive"), ("APDD-MIB", "apDdGenSocketsCPHigh"), ("APDD-MIB", "apDdGenSocketsCPTotal"), ("APDD-MIB", "apDdGenSocketsLTTotal"), ("APDD-MIB", "apDdGenSocketsLTPerMax"), ("APDD-MIB", "apDdGenSocketsLTHigh"), ("APDD-MIB", "apDdGenConnectsCPActive"), ("APDD-MIB", "apDdGenConnectsCPHigh"), ("APDD-MIB", "apDdGenConnectsCPTotal"), ("APDD-MIB", "apDdGenConnectsLTTotal"), ("APDD-MIB", "apDdGenConnectsLTPerMax"), ("APDD-MIB", "apDdGenConnectsLTHigh"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
apDdInterfaceStatsGroup = apDdInterfaceStatsGroup.setStatus('current')
if mibBuilder.loadTexts: apDdInterfaceStatsGroup.setDescription('A collection of statistics for DD interfaces or system.')
apDdErrorStatusGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 1, 3)).setObjects(("APDD-MIB", "apDdNoRouteFoundRecent"), ("APDD-MIB", "apDdNoRouteFoundTotal"), ("APDD-MIB", "apDdNoRouteFoundPerMax"), ("APDD-MIB", "apDdMalformedMsgRecent"), ("APDD-MIB", "apDdMalformedMsgTotal"), ("APDD-MIB", "apDdMalformedMsgPerMax"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
apDdErrorStatusGroup = apDdErrorStatusGroup.setStatus('current')
if mibBuilder.loadTexts: apDdErrorStatusGroup.setDescription('A collection of statistics for DD errors.')
apDdMsgTypeStatsGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 1, 4)).setObjects(("APDD-MIB", "apDdMsgTypeMsgName"), ("APDD-MIB", "apDdMsgTypeServerReqRecent"), ("APDD-MIB", "apDdMsgTypeServerReqTotal"), ("APDD-MIB", "apDdMsgTypeServerReqPerMax"), ("APDD-MIB", "apDdMsgTypeClientReqRecent"), ("APDD-MIB", "apDdMsgTypeClientReqTotal"), ("APDD-MIB", "apDdMsgTypeClientReqPerMax"), ("APDD-MIB", "apDdMsgTypeServerRetransRecent"), ("APDD-MIB", "apDdMsgTypeServerRetransTotal"), ("APDD-MIB", "apDdMsgTypeServerRetransPerMax"), ("APDD-MIB", "apDdMsgTypeClientRetransRecent"), ("APDD-MIB", "apDdMsgTypeClientRetransTotal"), ("APDD-MIB", "apDdMsgTypeClientRetransPerMax"), ("APDD-MIB", "apDdMsgTypeServerRespRetransRecent"), ("APDD-MIB", "apDdMsgTypeServerRespRetransTotal"), ("APDD-MIB", "apDdMsgTypeServerRespRetransPerMax"), ("APDD-MIB", "apDdMsgTypeClientRespRetransRecent"), ("APDD-MIB", "apDdMsgTypeClientRespRetransTotal"), ("APDD-MIB", "apDdMsgTypeClientRespRetransPerMax"), ("APDD-MIB", "apDdMsgTypeClientTimeoutRecent"), ("APDD-MIB", "apDdMsgTypeClientTimeoutTotal"), ("APDD-MIB", "apDdMsgTypeClientTimeoutPerMax"), ("APDD-MIB", "apDdMsgTypeClientThrottledRecent"), ("APDD-MIB", "apDdMsgTypeClientThrottledTotal"), ("APDD-MIB", "apDdMsgTypeClientThrottledPerMax"), ("APDD-MIB", "apDdMsgTypeAverageLatency"), ("APDD-MIB", "apDdMsgTypeMaximumLatency"), ("APDD-MIB", "apDdMsgTypeLatencyWindow"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
apDdMsgTypeStatsGroup = apDdMsgTypeStatsGroup.setStatus('current')
if mibBuilder.loadTexts: apDdMsgTypeStatsGroup.setDescription('A collection of statistics for DD message types.')
apDdMsgStatsReturnCodeGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 1, 5)).setObjects(("APDD-MIB", "apDdMsgReturnCodeName"), ("APDD-MIB", "apDdMsgReturnCodeServerRecent"), ("APDD-MIB", "apDdMsgReturnCodeServerTotal"), ("APDD-MIB", "apDdMsgReturnCodeServerPerMax"), ("APDD-MIB", "apDdMsgReturnCodeClientRecent"), ("APDD-MIB", "apDdMsgReturnCodeClientTotal"), ("APDD-MIB", "apDdMsgReturnCodeClientPerMax"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
apDdMsgStatsReturnCodeGroup = apDdMsgStatsReturnCodeGroup.setStatus('current')
if mibBuilder.loadTexts: apDdMsgStatsReturnCodeGroup.setDescription('A collection of statistics for DD message type return codes.')
apDdIntfErrorStatusGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 1, 6)).setObjects(("APDD-MIB", "apDdRejectedMsgRecent"), ("APDD-MIB", "apDdRejectedMsgTotal"), ("APDD-MIB", "apDdRejectedMsgPerMax"), ("APDD-MIB", "apDdDroppedMsgRecent"), ("APDD-MIB", "apDdDroppedMsgTotal"), ("APDD-MIB", "apDdDroppedMsgPerMax"), ("APDD-MIB", "apDdInboundConstraintsRecent"), ("APDD-MIB", "apDdInboundConstraintsTotal"), ("APDD-MIB", "apDdInboundConstraintsPerMax"), ("APDD-MIB", "apDdOutboundConstraintsRecent"), ("APDD-MIB", "apDdOutboundConstraintsTotal"), ("APDD-MIB", "apDdOutboundConstraintsPerMax"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
apDdIntfErrorStatusGroup = apDdIntfErrorStatusGroup.setStatus('current')
if mibBuilder.loadTexts: apDdIntfErrorStatusGroup.setDescription('A collection of statistics for DD errors.')
apDdAgentGeneralGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 1, 7)).setObjects(("APDD-MIB", "apDdAgentNumber"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
apDdAgentGeneralGroup = apDdAgentGeneralGroup.setStatus('current')
if mibBuilder.loadTexts: apDdAgentGeneralGroup.setDescription('A collection of Agent objects generic to DD system.')
apDdAgentStatsGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 1, 8)).setObjects(("APDD-MIB", "apDdAgentRealmName"), ("APDD-MIB", "apDdAgentClientTransCPActive"), ("APDD-MIB", "apDdAgentClientTransCPHigh"), ("APDD-MIB", "apDdAgentClientTransCPTotal"), ("APDD-MIB", "apDdAgentClientTransLTTotal"), ("APDD-MIB", "apDdAgentClientTransLTPerMax"), ("APDD-MIB", "apDdAgentClientTransLTHigh"), ("APDD-MIB", "apDdAgentServerTransCPActive"), ("APDD-MIB", "apDdAgentServerTransCPHigh"), ("APDD-MIB", "apDdAgentServerTransCPTotal"), ("APDD-MIB", "apDdAgentServerTransLTTotal"), ("APDD-MIB", "apDdAgentServerTransLTPerMax"), ("APDD-MIB", "apDdAgentServerTransLTHigh"), ("APDD-MIB", "apDdAgentGenSocketsCPActive"), ("APDD-MIB", "apDdAgentGenSocketsCPHigh"), ("APDD-MIB", "apDdAgentGenSocketsCPTotal"), ("APDD-MIB", "apDdAgentGenSocketsLTTotal"), ("APDD-MIB", "apDdAgentGenSocketsLTPerMax"), ("APDD-MIB", "apDdAgentGenSocketsLTHigh"), ("APDD-MIB", "apDdAgentGenConnectsCPActive"), ("APDD-MIB", "apDdAgentGenConnectsCPHigh"), ("APDD-MIB", "apDdAgentGenConnectsCPTotal"), ("APDD-MIB", "apDdAgentGenConnectsLTTotal"), ("APDD-MIB", "apDdAgentGenConnectsLTPerMax"), ("APDD-MIB", "apDdAgentGenConnectsLTHigh"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
apDdAgentStatsGroup = apDdAgentStatsGroup.setStatus('current')
if mibBuilder.loadTexts: apDdAgentStatsGroup.setDescription('A collection of statistics for DD agents')
apDdAgentErrorStatusGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 1, 9)).setObjects(("APDD-MIB", "apDdAgentNoRouteFoundRecent"), ("APDD-MIB", "apDdAgentNoRouteFoundTotal"), ("APDD-MIB", "apDdAgentNoRouteFoundPerMax"), ("APDD-MIB", "apDdAgentMalformedMsgRecent"), ("APDD-MIB", "apDdAgentMalformedMsgTotal"), ("APDD-MIB", "apDdAgentMalformedMsgPerMax"), ("APDD-MIB", "apDdAgentRejectedMsgRecent"), ("APDD-MIB", "apDdAgentRejectedMsgTotal"), ("APDD-MIB", "apDdAgentRejectedMsgPerMax"), ("APDD-MIB", "apDdAgentDroppedMsgRecent"), ("APDD-MIB", "apDdAgentDroppedMsgTotal"), ("APDD-MIB", "apDdAgentDroppedMsgPerMax"), ("APDD-MIB", "apDdAgentInboundConstraintsRecent"), ("APDD-MIB", "apDdAgentInboundConstraintsTotal"), ("APDD-MIB", "apDdAgentInboundConstraintsPerMax"), ("APDD-MIB", "apDdAgentOutboundConstraintsRecent"), ("APDD-MIB", "apDdAgentOutboundConstraintsTotal"), ("APDD-MIB", "apDdAgentOutboundConstraintsPerMax"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
apDdAgentErrorStatusGroup = apDdAgentErrorStatusGroup.setStatus('current')
if mibBuilder.loadTexts: apDdAgentErrorStatusGroup.setDescription('A collection of statistics for DD Agent errors.')
apDdAgentMsgTypeStatsGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 1, 10)).setObjects(("APDD-MIB", "apDdMsgTypeMsgName"), ("APDD-MIB", "apDdAgentMsgTypeServerReqRecent"), ("APDD-MIB", "apDdAgentMsgTypeServerReqTotal"), ("APDD-MIB", "apDdAgentMsgTypeServerReqPerMax"), ("APDD-MIB", "apDdAgentMsgTypeClientReqRecent"), ("APDD-MIB", "apDdAgentMsgTypeClientReqTotal"), ("APDD-MIB", "apDdAgentMsgTypeClientReqPerMax"), ("APDD-MIB", "apDdAgentMsgTypeServerRetransRecent"), ("APDD-MIB", "apDdAgentMsgTypeServerRetransTotal"), ("APDD-MIB", "apDdAgentMsgTypeServerRetransPerMax"), ("APDD-MIB", "apDdAgentMsgTypeClientRetransRecent"), ("APDD-MIB", "apDdAgentMsgTypeClientRetransTotal"), ("APDD-MIB", "apDdAgentMsgTypeClientRetransPerMax"), ("APDD-MIB", "apDdAgentMsgTypeServerRespRetransRecent"), ("APDD-MIB", "apDdAgentMsgTypeServerRespRetransTotal"), ("APDD-MIB", "apDdAgentMsgTypeServerRespRetransPerMax"), ("APDD-MIB", "apDdAgentMsgTypeClientRespRetransRecent"), ("APDD-MIB", "apDdAgentMsgTypeClientRespRetransTotal"), ("APDD-MIB", "apDdAgentMsgTypeClientRespRetransPerMax"), ("APDD-MIB", "apDdAgentMsgTypeClientTimeoutRecent"), ("APDD-MIB", "apDdAgentMsgTypeClientTimeoutTotal"), ("APDD-MIB", "apDdAgentMsgTypeClientTimeoutPerMax"), ("APDD-MIB", "apDdAgentMsgTypeClientThrottledRecent"), ("APDD-MIB", "apDdAgentMsgTypeClientThrottledTotal"), ("APDD-MIB", "apDdAgentMsgTypeClientThrottledPerMax"), ("APDD-MIB", "apDdAgentMsgTypeAverageLatency"), ("APDD-MIB", "apDdAgentMsgTypeMaximumLatency"), ("APDD-MIB", "apDdAgentMsgTypeLatencyWindow"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
apDdAgentMsgTypeStatsGroup = apDdAgentMsgTypeStatsGroup.setStatus('current')
if mibBuilder.loadTexts: apDdAgentMsgTypeStatsGroup.setDescription('A collection of statistics for DD Agent message types.')
apDdAgentMsgStatsReturnCodeGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 1, 11)).setObjects(("APDD-MIB", "apDdMsgReturnCodeName"), ("APDD-MIB", "apDdAgentMsgReturnCodeServerRecent"), ("APDD-MIB", "apDdAgentMsgReturnCodeServerTotal"), ("APDD-MIB", "apDdAgentMsgReturnCodeServerPerMax"), ("APDD-MIB", "apDdAgentMsgReturnCodeClientRecent"), ("APDD-MIB", "apDdAgentMsgReturnCodeClientTotal"), ("APDD-MIB", "apDdAgentMsgReturnCodeClientPerMax"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
apDdAgentMsgStatsReturnCodeGroup = apDdAgentMsgStatsReturnCodeGroup.setStatus('current')
if mibBuilder.loadTexts: apDdAgentMsgStatsReturnCodeGroup.setDescription('A collection of statistics for DD Agent message type return codes.')
apDdSessionSubscriberGeneralGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 1, 12)).setObjects(("APDD-MIB", "apDdSessionPeriodActive"), ("APDD-MIB", "apDdSessionPeriodHigh"), ("APDD-MIB", "apDdSessionPeriodTotal"), ("APDD-MIB", "apDdSessionLifeTotal"), ("APDD-MIB", "apDdSessionLifePerMax"), ("APDD-MIB", "apDdSessionLifeHigh"), ("APDD-MIB", "apDdSessInitPeriodActive"), ("APDD-MIB", "apDdSessInitPeriodHigh"), ("APDD-MIB", "apDdSessInitPeriodTotal"), ("APDD-MIB", "apDdSessInitLifeTotal"), ("APDD-MIB", "apDdSessInitLifePerMax"), ("APDD-MIB", "apDdSessInitLifeHigh"), ("APDD-MIB", "apDdSessEstablishedPeriodActive"), ("APDD-MIB", "apDdSessEstablishedPeriodHigh"), ("APDD-MIB", "apDdSessEstablishedPeriodTotal"), ("APDD-MIB", "apDdSessEstablishedLifeTotal"), ("APDD-MIB", "apDdSessEstablishedLifePerMax"), ("APDD-MIB", "apDdSessEstablishedLifeHigh"), ("APDD-MIB", "apDdSessTerminatedPeriodActive"), ("APDD-MIB", "apDdSessTerminatedPeriodHigh"), ("APDD-MIB", "apDdSessTerminatedPeriodTotal"), ("APDD-MIB", "apDdSessTerminatedLifeTotal"), ("APDD-MIB", "apDdSessTerminatedLifePerMax"), ("APDD-MIB", "apDdSessTerminatedLifeHigh"), ("APDD-MIB", "apDdSessTimeoutPeriodTotal"), ("APDD-MIB", "apDdSessTimeoutLifeTotal"), ("APDD-MIB", "apDdSessTimeoutLifePerMax"), ("APDD-MIB", "apDdSessErrorsPeriodTotal"), ("APDD-MIB", "apDdSessErrorsLifeTotal"), ("APDD-MIB", "apDdSessErrorsLifePerMax"), ("APDD-MIB", "apDdSessMissPeriodTotal"), ("APDD-MIB", "apDdSessMissLifeTotal"), ("APDD-MIB", "apDdSessMissLifePerMax"), ("APDD-MIB", "apDdSubscriberPeriodActive"), ("APDD-MIB", "apDdSubscriberPeriodHigh"), ("APDD-MIB", "apDdSubscriberPeriodTotal"), ("APDD-MIB", "apDdSubscriberLifeTotal"), ("APDD-MIB", "apDdSubscriberLifePerMax"), ("APDD-MIB", "apDdSubscriberLifeHigh"), ("APDD-MIB", "apDdSubscribePeriodActive"), ("APDD-MIB", "apDdSubscribePeriodHigh"), ("APDD-MIB", "apDdSubscribePeriodTotal"), ("APDD-MIB", "apDdSubscribeLifeTotal"), ("APDD-MIB", "apDdSubscribeLifePerMax"), ("APDD-MIB", "apDdSubscribeLifeHigh"), ("APDD-MIB", "apDdUnsubscribePeriodActive"), ("APDD-MIB", "apDdUnsubscribePeriodHigh"), ("APDD-MIB", "apDdUnsubscribePeriodTotal"), ("APDD-MIB", "apDdUnsubscribeLifeTotal"), ("APDD-MIB", "apDdUnsubscribeLifePerMax"), ("APDD-MIB", "apDdUnsubscribeLifeHigh"), ("APDD-MIB", "apDdPolicyHitPeriodActive"), ("APDD-MIB", "apDdPolicyHitPeriodHigh"), ("APDD-MIB", "apDdPolicyHitPeriodTotal"), ("APDD-MIB", "apDdPolicyHitLifeTotal"), ("APDD-MIB", "apDdPolicyHitLifePerMax"), ("APDD-MIB", "apDdPolicyHitLifeHigh"), ("APDD-MIB", "apDdPolicyMissPeriodActive"), ("APDD-MIB", "apDdPolicyMissPeriodHigh"), ("APDD-MIB", "apDdPolicyMissPeriodTotal"), ("APDD-MIB", "apDdPolicyMissLifeTotal"), ("APDD-MIB", "apDdPolicyMissLifePerMax"), ("APDD-MIB", "apDdPolicyMissLifeHigh"), ("APDD-MIB", "apDdSubscriberMissPeriodTotal"), ("APDD-MIB", "apDdSubscriberMissLifeTotal"), ("APDD-MIB", "apDdSubscriberMissLifePerMax"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
apDdSessionSubscriberGeneralGroup = apDdSessionSubscriberGeneralGroup.setStatus('current')
if mibBuilder.loadTexts: apDdSessionSubscriberGeneralGroup.setDescription('A collection of Session objects generic to DD system.')
apDDNotifObjectsGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 2, 1)).setObjects(("APDD-MIB", "apDdDiameterAgentHostName"), ("APDD-MIB", "apDdDiameterIPPort"), ("APDD-MIB", "apDdDiameterAgentOriginHostName"), ("APDD-MIB", "apDdDiameterAgentOriginRealmName"), ("APDD-MIB", "apDdTransportType"), ("APDD-MIB", "apDdInterfaceStatusReason"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
apDDNotifObjectsGroup = apDDNotifObjectsGroup.setStatus('current')
if mibBuilder.loadTexts: apDDNotifObjectsGroup.setDescription('A collection of mib objects accessible only to traps.')
apDDNotificationsGroup = NotificationGroup((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 2, 2)).setObjects(("APDD-MIB", "apDdConnectionFailureTrap"), ("APDD-MIB", "apDdConnectionFailureClearTrap"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
apDDNotificationsGroup = apDDNotificationsGroup.setStatus('current')
if mibBuilder.loadTexts: apDDNotificationsGroup.setDescription('A collection of traps defined for DD.')
mibBuilder.exportSymbols("APDD-MIB", apDdSessionPeriodActive=apDdSessionPeriodActive, apDdClientTransLTHigh=apDdClientTransLTHigh, apDdAgentNoRouteFoundTotal=apDdAgentNoRouteFoundTotal, apDdAgentMsgReturnCodeClientRecent=apDdAgentMsgReturnCodeClientRecent, apDdSessMissLifeTotal=apDdSessMissLifeTotal, apDDMIBTabularObjects=apDDMIBTabularObjects, apDdHighTransRate=apDdHighTransRate, apDdMsgTypeServerReqRecent=apDdMsgTypeServerReqRecent, apDdUnsubscribePeriodTotal=apDdUnsubscribePeriodTotal, apDDNotifObjects=apDDNotifObjects, apDdLowTransRate=apDdLowTransRate, apDdMsgStatsReturnCodeEntry=apDdMsgStatsReturnCodeEntry, apDdAgentGenSocketsCPHigh=apDdAgentGenSocketsCPHigh, apDdMsgReturnCodeServerTotal=apDdMsgReturnCodeServerTotal, apDdMsgTypeInfoEntry=apDdMsgTypeInfoEntry, apDdAgentMsgTypeClientRespRetransPerMax=apDdAgentMsgTypeClientRespRetransPerMax, apDdAgentMsgReturnCodeServerRecent=apDdAgentMsgReturnCodeServerRecent, apDdSessTerminatedPeriodTotal=apDdSessTerminatedPeriodTotal, apDdAgentMsgStatsReturnCodeTable=apDdAgentMsgStatsReturnCodeTable, apDDMIBGeneralObjects=apDDMIBGeneralObjects, apDdPolicyMissLifeTotal=apDdPolicyMissLifeTotal, apDdMsgTypeServerReqTotal=apDdMsgTypeServerReqTotal, apDDConformance=apDDConformance, apDdAgentInboundConstraintsTotal=apDdAgentInboundConstraintsTotal, apDdAgentMsgTypeLatencyWindow=apDdAgentMsgTypeLatencyWindow, apDdAgentMsgTypeServerRetransTotal=apDdAgentMsgTypeServerRetransTotal, apDdAgentIndex=apDdAgentIndex, apDdSessInitPeriodActive=apDdSessInitPeriodActive, apDdAgentErrorStatusGroup=apDdAgentErrorStatusGroup, apDdPolicyHitPeriodTotal=apDdPolicyHitPeriodTotal, apDdSubscribeLifeHigh=apDdSubscribeLifeHigh, apDdGenConnectsCPTotal=apDdGenConnectsCPTotal, apDdSessInitPeriodTotal=apDdSessInitPeriodTotal, apDdMsgTypeIndex=apDdMsgTypeIndex, apDdAgentMsgTypeServerReqTotal=apDdAgentMsgTypeServerReqTotal, apDdDroppedMsgTotal=apDdDroppedMsgTotal, apDdMsgReturnCodeServerPerMax=apDdMsgReturnCodeServerPerMax, apDdRejectedMsgPerMax=apDdRejectedMsgPerMax, apDdAgentStatsEntry=apDdAgentStatsEntry, apDdAgentGenSocketsCPTotal=apDdAgentGenSocketsCPTotal, apDdAgentStatsGroup=apDdAgentStatsGroup, apDdSessTerminatedLifePerMax=apDdSessTerminatedLifePerMax, apDdMalformedMsgRecent=apDdMalformedMsgRecent, apDdPolicyMissPeriodHigh=apDdPolicyMissPeriodHigh, apDdAgentMsgTypeServerReqPerMax=apDdAgentMsgTypeServerReqPerMax, apDdSessMissPeriodTotal=apDdSessMissPeriodTotal, apDDNotificationObjects=apDDNotificationObjects, apDdGenConnectsCPHigh=apDdGenConnectsCPHigh, apDdGenSocketsLTTotal=apDdGenSocketsLTTotal, apDdAgentMsgTypeClientTimeoutPerMax=apDdAgentMsgTypeClientTimeoutPerMax, apDdAgentMsgTypeClientReqTotal=apDdAgentMsgTypeClientReqTotal, apDdOutboundConstraintsPerMax=apDdOutboundConstraintsPerMax, apDdSessEstablishedLifeHigh=apDdSessEstablishedLifeHigh, apDDModule=apDDModule, apDdSessionLifePerMax=apDdSessionLifePerMax, apDdAgentClientTransCPTotal=apDdAgentClientTransCPTotal, apDdSubscribePeriodTotal=apDdSubscribePeriodTotal, apDdMsgReturnCodeClientTotal=apDdMsgReturnCodeClientTotal, apDdClientTransLTTotal=apDdClientTransLTTotal, apDdMsgTypeServerRespRetransRecent=apDdMsgTypeServerRespRetransRecent, apDdTransportType=apDdTransportType, apDdMsgTypeServerRespRetransTotal=apDdMsgTypeServerRespRetransTotal, apDdAgentGenConnectsLTPerMax=apDdAgentGenConnectsLTPerMax, apDdMsgTypeStatsTable=apDdMsgTypeStatsTable, apDdInterfaceStatsGroup=apDdInterfaceStatsGroup, apDdIntfErrorStatusGroup=apDdIntfErrorStatusGroup, apDdMsgReturnCodeServerRecent=apDdMsgReturnCodeServerRecent, apDdSubscriberLifeTotal=apDdSubscriberLifeTotal, apDdSessTimeoutPeriodTotal=apDdSessTimeoutPeriodTotal, apDdSessInitLifeHigh=apDdSessInitLifeHigh, apDdMsgTypeClientRetransPerMax=apDdMsgTypeClientRetransPerMax, apDdAgentServerTransCPHigh=apDdAgentServerTransCPHigh, apDdMsgTypeServerRetransPerMax=apDdMsgTypeServerRetransPerMax, apDdSessionLifeHigh=apDdSessionLifeHigh, apDdNoRouteFoundRecent=apDdNoRouteFoundRecent, apDdAgentMsgTypeClientRespRetransTotal=apDdAgentMsgTypeClientRespRetransTotal, apDdAgentOutboundConstraintsTotal=apDdAgentOutboundConstraintsTotal, apDDNotifObjectsGroup=apDDNotifObjectsGroup, apDdInboundConstraintsTotal=apDdInboundConstraintsTotal, apDdSessInitPeriodHigh=apDdSessInitPeriodHigh, apDdClientTransCPHigh=apDdClientTransCPHigh, apDdMsgTypeClientThrottledRecent=apDdMsgTypeClientThrottledRecent, apDdMsgTypeClientThrottledPerMax=apDdMsgTypeClientThrottledPerMax, apDdClientTransCPTotal=apDdClientTransCPTotal, apDdGenConnectsLTPerMax=apDdGenConnectsLTPerMax, apDdSessionPeriodTotal=apDdSessionPeriodTotal, apDdSessErrorsLifeTotal=apDdSessErrorsLifeTotal, apDdAgentGenConnectsCPHigh=apDdAgentGenConnectsCPHigh, apDdAgentMsgStatsReturnCodeEntry=apDdAgentMsgStatsReturnCodeEntry, apDdDiameterAgentOriginRealmName=apDdDiameterAgentOriginRealmName, apDdSubscriberMissPeriodTotal=apDdSubscriberMissPeriodTotal, apDdMsgTypeServerRetransTotal=apDdMsgTypeServerRetransTotal, apDdSessTerminatedLifeTotal=apDdSessTerminatedLifeTotal, apDdAgentNoRouteFoundPerMax=apDdAgentNoRouteFoundPerMax, apDdAgentMsgTypeStatsTable=apDdAgentMsgTypeStatsTable, apDdConnectionFailureClearTrap=apDdConnectionFailureClearTrap, apDdDroppedMsgRecent=apDdDroppedMsgRecent, apDdPolicyHitLifeHigh=apDdPolicyHitLifeHigh, apDdServerTransLTHigh=apDdServerTransLTHigh, apDdMsgTypeStatsEntry=apDdMsgTypeStatsEntry, apDdMsgTypeLatencyWindow=apDdMsgTypeLatencyWindow, apDdMsgStatsReturnCodeTable=apDdMsgStatsReturnCodeTable, apDdSessTerminatedPeriodActive=apDdSessTerminatedPeriodActive, apDdGenSocketsCPTotal=apDdGenSocketsCPTotal, apDdSessionPeriodHigh=apDdSessionPeriodHigh, apDdAgentServerTransCPActive=apDdAgentServerTransCPActive, apDdMsgReturnCodeClientRecent=apDdMsgReturnCodeClientRecent, apDdGenConnectsLTTotal=apDdGenConnectsLTTotal, apDdAgentMsgTypeStatsEntry=apDdAgentMsgTypeStatsEntry, apDdInterfaceIndex=apDdInterfaceIndex, apDdMsgTypeClientRetransTotal=apDdMsgTypeClientRetransTotal, apDdAgentGenConnectsLTTotal=apDdAgentGenConnectsLTTotal, apDdSessEstablishedPeriodActive=apDdSessEstablishedPeriodActive, apDdAgentMsgTypeServerRespRetransTotal=apDdAgentMsgTypeServerRespRetransTotal, apDdAgentClientTransLTTotal=apDdAgentClientTransLTTotal, apDdAgentErrorStatusTable=apDdAgentErrorStatusTable, apDdGeneralGroup=apDdGeneralGroup, apDdPolicyHitLifeTotal=apDdPolicyHitLifeTotal, apDdAgentNoRouteFoundRecent=apDdAgentNoRouteFoundRecent, apDdDiameterIPPort=apDdDiameterIPPort, apDdAgentClientTransCPHigh=apDdAgentClientTransCPHigh, apDdMsgTypeInfoTable=apDdMsgTypeInfoTable, apDdServerTransCPTotal=apDdServerTransCPTotal, apDDMIBObjects=apDDMIBObjects, apDDNotificationsGroup=apDDNotificationsGroup, apDdAgentMsgTypeServerRespRetransRecent=apDdAgentMsgTypeServerRespRetransRecent, apDdServerTransLTTotal=apDdServerTransLTTotal, apDdGenSocketsCPActive=apDdGenSocketsCPActive, apDdPolicyMissLifePerMax=apDdPolicyMissLifePerMax, apDdAgentGenSocketsLTPerMax=apDdAgentGenSocketsLTPerMax, apDdRejectedMsgTotal=apDdRejectedMsgTotal, apDdConnectionFailureTrap=apDdConnectionFailureTrap, apDdMsgTypeServerRespRetransPerMax=apDdMsgTypeServerRespRetransPerMax, apDdAgentMalformedMsgTotal=apDdAgentMalformedMsgTotal, apDdMsgTypeClientTimeoutRecent=apDdMsgTypeClientTimeoutRecent, apDdSessEstablishedPeriodTotal=apDdSessEstablishedPeriodTotal, apDdAgentGenSocketsCPActive=apDdAgentGenSocketsCPActive, apDdSubscribePeriodHigh=apDdSubscribePeriodHigh, apDdMsgTypeClientRespRetransTotal=apDdMsgTypeClientRespRetransTotal, apDdPolicyHitLifePerMax=apDdPolicyHitLifePerMax, apDdSubscribeLifeTotal=apDdSubscribeLifeTotal, apDdSessInitLifeTotal=apDdSessInitLifeTotal, apDdMsgTypeClientThrottledTotal=apDdMsgTypeClientThrottledTotal, apDdSubscribeLifePerMax=apDdSubscribeLifePerMax, apDdAgentServerTransCPTotal=apDdAgentServerTransCPTotal, apDdAgentMsgTypeClientRetransPerMax=apDdAgentMsgTypeClientRetransPerMax, apDdAgentMsgTypeStatsGroup=apDdAgentMsgTypeStatsGroup, apDdGenConnectsCPActive=apDdGenConnectsCPActive, apDdSessInitLifePerMax=apDdSessInitLifePerMax, apDdInboundConstraintsPerMax=apDdInboundConstraintsPerMax, apDdDiameterAgentHostName=apDdDiameterAgentHostName, apDdInterfaceStatusReason=apDdInterfaceStatusReason, apDdUnsubscribeLifeTotal=apDdUnsubscribeLifeTotal, apDdMsgStatsReturnCodeGroup=apDdMsgStatsReturnCodeGroup, apDdAgentGenConnectsLTHigh=apDdAgentGenConnectsLTHigh, apDdAgentMsgTypeClientRetransTotal=apDdAgentMsgTypeClientRetransTotal, apDdAgentMsgTypeMaximumLatency=apDdAgentMsgTypeMaximumLatency, apDdAgentMsgStatsReturnCodeGroup=apDdAgentMsgStatsReturnCodeGroup, apDdAgentClientTransLTPerMax=apDdAgentClientTransLTPerMax, apDdMsgTypeStatsGroup=apDdMsgTypeStatsGroup, apDdMsgTypeMaximumLatency=apDdMsgTypeMaximumLatency, apDdAgentDroppedMsgTotal=apDdAgentDroppedMsgTotal, apDdAgentMsgTypeClientThrottledRecent=apDdAgentMsgTypeClientThrottledRecent, apDdAgentMsgTypeClientThrottledPerMax=apDdAgentMsgTypeClientThrottledPerMax, apDdAgentGeneralGroup=apDdAgentGeneralGroup, apDdMsgTypeClientRetransRecent=apDdMsgTypeClientRetransRecent, apDdPolicyMissLifeHigh=apDdPolicyMissLifeHigh, apDDNotificationGroups=apDDNotificationGroups, apDdAgentMsgTypeClientTimeoutTotal=apDdAgentMsgTypeClientTimeoutTotal, apDdAgentMalformedMsgPerMax=apDdAgentMalformedMsgPerMax, apDdSessEstablishedLifeTotal=apDdSessEstablishedLifeTotal, apDdNoRouteFoundPerMax=apDdNoRouteFoundPerMax, apDdInterfaceStatsTable=apDdInterfaceStatsTable, apDdMsgTypeClientReqRecent=apDdMsgTypeClientReqRecent, apDdMalformedMsgTotal=apDdMalformedMsgTotal, apDdUnsubscribePeriodActive=apDdUnsubscribePeriodActive, apDdMsgTypeClientReqPerMax=apDdMsgTypeClientReqPerMax, apDdAgentStatsTable=apDdAgentStatsTable, apDdMsgTypeClientRespRetransPerMax=apDdMsgTypeClientRespRetransPerMax, apDdAgentServerTransLTHigh=apDdAgentServerTransLTHigh, apDdAgentServerTransLTPerMax=apDdAgentServerTransLTPerMax, apDdAgentMsgReturnCodeServerPerMax=apDdAgentMsgReturnCodeServerPerMax, apDdAgentMsgReturnCodeClientTotal=apDdAgentMsgReturnCodeClientTotal, apDdAgentRealmName=apDdAgentRealmName, apDdMsgReturnCodeInfoTable=apDdMsgReturnCodeInfoTable, apDdAgentMsgTypeServerRetransRecent=apDdAgentMsgTypeServerRetransRecent, apDdInterfaceNumber=apDdInterfaceNumber, apDdSessTerminatedPeriodHigh=apDdSessTerminatedPeriodHigh, apDdSessMissLifePerMax=apDdSessMissLifePerMax, apDdPolicyMissPeriodTotal=apDdPolicyMissPeriodTotal, apDdMsgTypeClientRespRetransRecent=apDdMsgTypeClientRespRetransRecent, apDdAgentGenSocketsLTTotal=apDdAgentGenSocketsLTTotal, apDDNotifPrefix=apDDNotifPrefix, apDdErrorStatusGroup=apDdErrorStatusGroup, apDdAgentInboundConstraintsRecent=apDdAgentInboundConstraintsRecent, apDdInterfaceRealmName=apDdInterfaceRealmName, apDdSessionSubscriberGeneralGroup=apDdSessionSubscriberGeneralGroup, apDdSubscriberPeriodHigh=apDdSubscriberPeriodHigh, apDdMsgReturnCodeInfoEntry=apDdMsgReturnCodeInfoEntry, apDdMsgTypeClientTimeoutTotal=apDdMsgTypeClientTimeoutTotal, apDDObjectGroups=apDDObjectGroups, apDdAgentMsgTypeServerReqRecent=apDdAgentMsgTypeServerReqRecent, apDdPolicyMissPeriodActive=apDdPolicyMissPeriodActive, apDdMsgTypeClientReqTotal=apDdMsgTypeClientReqTotal, apDdErrorStatusEntry=apDdErrorStatusEntry, apDdAgentDroppedMsgRecent=apDdAgentDroppedMsgRecent, apDdAgentMsgTypeServerRespRetransPerMax=apDdAgentMsgTypeServerRespRetransPerMax, apDdSubscriberMissLifeTotal=apDdSubscriberMissLifeTotal, apDdErrorStatusTable=apDdErrorStatusTable, apDdMsgReturnCodeClientPerMax=apDdMsgReturnCodeClientPerMax, apDdAgentDroppedMsgPerMax=apDdAgentDroppedMsgPerMax, apDdGenSocketsCPHigh=apDdGenSocketsCPHigh, apDdOutboundConstraintsRecent=apDdOutboundConstraintsRecent, apDdSubscriberLifePerMax=apDdSubscriberLifePerMax, apDdMsgTypeServerReqPerMax=apDdMsgTypeServerReqPerMax, apDdAgentNumber=apDdAgentNumber, apDdAgentServerTransLTTotal=apDdAgentServerTransLTTotal, apDdAgentRejectedMsgPerMax=apDdAgentRejectedMsgPerMax, apDdSessEstablishedLifePerMax=apDdSessEstablishedLifePerMax, apDdAgentMalformedMsgRecent=apDdAgentMalformedMsgRecent, apDdAgentOutboundConstraintsRecent=apDdAgentOutboundConstraintsRecent, apDdAgentMsgTypeClientTimeoutRecent=apDdAgentMsgTypeClientTimeoutRecent, apDdClientTransLTPerMax=apDdClientTransLTPerMax, apDdAgentMsgTypeClientThrottledTotal=apDdAgentMsgTypeClientThrottledTotal, apDdSubscriberLifeHigh=apDdSubscriberLifeHigh, apDdPolicyHitPeriodHigh=apDdPolicyHitPeriodHigh, apDdClientTransCPActive=apDdClientTransCPActive, apDdSessTimeoutLifePerMax=apDdSessTimeoutLifePerMax, apDdMsgTypeMsgName=apDdMsgTypeMsgName, apDdAgentRejectedMsgRecent=apDdAgentRejectedMsgRecent, apDdAgentGenConnectsCPTotal=apDdAgentGenConnectsCPTotal, apDdSessTimeoutLifeTotal=apDdSessTimeoutLifeTotal, apDdAgentInboundConstraintsPerMax=apDdAgentInboundConstraintsPerMax, apDdCurrentTransRate=apDdCurrentTransRate, apDdAgentClientTransCPActive=apDdAgentClientTransCPActive, apDdServerTransLTPerMax=apDdServerTransLTPerMax, apDdMsgTypeClientTimeoutPerMax=apDdMsgTypeClientTimeoutPerMax, apDdMalformedMsgPerMax=apDdMalformedMsgPerMax, apDdSessErrorsPeriodTotal=apDdSessErrorsPeriodTotal, apDdAgentErrorStatusEntry=apDdAgentErrorStatusEntry, apDdSessionLifeTotal=apDdSessionLifeTotal, apDdMsgReturnCodeIndex=apDdMsgReturnCodeIndex, apDdAgentRejectedMsgTotal=apDdAgentRejectedMsgTotal, apDdNoRouteFoundTotal=apDdNoRouteFoundTotal, apDdAgentMsgTypeClientReqPerMax=apDdAgentMsgTypeClientReqPerMax, apDdInboundConstraintsRecent=apDdInboundConstraintsRecent, apDdMsgTypeAverageLatency=apDdMsgTypeAverageLatency, apDdMsgReturnCodeName=apDdMsgReturnCodeName, apDdAgentMsgTypeServerRetransPerMax=apDdAgentMsgTypeServerRetransPerMax, apDDNotifications=apDDNotifications, apDdServerTransCPActive=apDdServerTransCPActive, apDdSessTerminatedLifeHigh=apDdSessTerminatedLifeHigh, apDdSessEstablishedPeriodHigh=apDdSessEstablishedPeriodHigh, apDdDroppedMsgPerMax=apDdDroppedMsgPerMax)
mibBuilder.exportSymbols("APDD-MIB", apDdAgentMsgReturnCodeServerTotal=apDdAgentMsgReturnCodeServerTotal, apDdGenSocketsLTPerMax=apDdGenSocketsLTPerMax, apDdAgentMsgReturnCodeClientPerMax=apDdAgentMsgReturnCodeClientPerMax, apDdAgentGenSocketsLTHigh=apDdAgentGenSocketsLTHigh, apDdAgentMsgTypeAverageLatency=apDdAgentMsgTypeAverageLatency, apDdGenConnectsLTHigh=apDdGenConnectsLTHigh, apDdUnsubscribeLifePerMax=apDdUnsubscribeLifePerMax, apDdServerTransCPHigh=apDdServerTransCPHigh, apDdInterfaceStatsEntry=apDdInterfaceStatsEntry, apDdAgentGenConnectsCPActive=apDdAgentGenConnectsCPActive, apDdAgentMsgTypeClientRetransRecent=apDdAgentMsgTypeClientRetransRecent, apDdAgentMsgTypeClientRespRetransRecent=apDdAgentMsgTypeClientRespRetransRecent, apDdDiameterAgentOriginHostName=apDdDiameterAgentOriginHostName, apDdAgentOutboundConstraintsPerMax=apDdAgentOutboundConstraintsPerMax, PYSNMP_MODULE_ID=apDDModule, apDdAgentClientTransLTHigh=apDdAgentClientTransLTHigh, apDdSubscriberMissLifePerMax=apDdSubscriberMissLifePerMax, apDdSubscribePeriodActive=apDdSubscribePeriodActive, apDdSubscriberPeriodActive=apDdSubscriberPeriodActive, apDdRejectedMsgRecent=apDdRejectedMsgRecent, apDdSessErrorsLifePerMax=apDdSessErrorsLifePerMax, apDdUnsubscribeLifeHigh=apDdUnsubscribeLifeHigh, apDdMsgTypeServerRetransRecent=apDdMsgTypeServerRetransRecent, apDdUnsubscribePeriodHigh=apDdUnsubscribePeriodHigh, apDdAgentMsgTypeClientReqRecent=apDdAgentMsgTypeClientReqRecent, apDdSubscriberPeriodTotal=apDdSubscriberPeriodTotal, apDdGenSocketsLTHigh=apDdGenSocketsLTHigh, apDdOutboundConstraintsTotal=apDdOutboundConstraintsTotal, apDdPolicyHitPeriodActive=apDdPolicyHitPeriodActive)
| (acmepacket_mgmt,) = mibBuilder.importSymbols('ACMEPACKET-SMI', 'acmepacketMgmt')
(ap_transport_type,) = mibBuilder.importSymbols('ACMEPACKET-TC', 'ApTransportType')
(octet_string, object_identifier, integer) = mibBuilder.importSymbols('ASN1', 'OctetString', 'ObjectIdentifier', 'Integer')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(constraints_union, single_value_constraint, value_range_constraint, constraints_intersection, value_size_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsUnion', 'SingleValueConstraint', 'ValueRangeConstraint', 'ConstraintsIntersection', 'ValueSizeConstraint')
(object_group, notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'ObjectGroup', 'NotificationGroup', 'ModuleCompliance')
(counter64, unsigned32, bits, notification_type, iso, ip_address, time_ticks, object_identity, gauge32, module_identity, mib_identifier, integer32, mib_scalar, mib_table, mib_table_row, mib_table_column, counter32) = mibBuilder.importSymbols('SNMPv2-SMI', 'Counter64', 'Unsigned32', 'Bits', 'NotificationType', 'iso', 'IpAddress', 'TimeTicks', 'ObjectIdentity', 'Gauge32', 'ModuleIdentity', 'MibIdentifier', 'Integer32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Counter32')
(textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString')
ap_dd_module = module_identity((1, 3, 6, 1, 4, 1, 9148, 3, 12))
if mibBuilder.loadTexts:
apDDModule.setLastUpdated('201106080000Z')
if mibBuilder.loadTexts:
apDDModule.setOrganization('Acme Packet, Inc')
if mibBuilder.loadTexts:
apDDModule.setContactInfo(' Customer Service Postal: Acme Packet, Inc 100 Crosby Drive Bedford, MA 01730 US Tel: 1-781-328-4400 E-mail: support@acmepacket.com')
if mibBuilder.loadTexts:
apDDModule.setDescription('The Policy Director MIB for Acme Packet.')
ap_ddmib_objects = mib_identifier((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1))
ap_ddmib_general_objects = mib_identifier((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1))
ap_ddmib_tabular_objects = mib_identifier((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2))
ap_dd_notification_objects = mib_identifier((1, 3, 6, 1, 4, 1, 9148, 3, 12, 2))
ap_dd_notif_objects = mib_identifier((1, 3, 6, 1, 4, 1, 9148, 3, 12, 2, 1))
ap_dd_notif_prefix = mib_identifier((1, 3, 6, 1, 4, 1, 9148, 3, 12, 2, 2))
ap_dd_notifications = mib_identifier((1, 3, 6, 1, 4, 1, 9148, 3, 12, 2, 2, 0))
ap_dd_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3))
ap_dd_object_groups = mib_identifier((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 1))
ap_dd_notification_groups = mib_identifier((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 2))
ap_dd_interface_number = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdInterfaceNumber.setStatus('current')
if mibBuilder.loadTexts:
apDdInterfaceNumber.setDescription('Number of the DD interfaces in the system.')
ap_dd_current_trans_rate = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 2), gauge32()).setUnits('per10Seconds').setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdCurrentTransRate.setStatus('current')
if mibBuilder.loadTexts:
apDdCurrentTransRate.setDescription('The number of transactions over a 10s period.')
ap_dd_high_trans_rate = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 3), gauge32()).setUnits('per10Seconds').setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdHighTransRate.setStatus('current')
if mibBuilder.loadTexts:
apDdHighTransRate.setDescription('Maximum value of apDdCurrentTransRate across all 10s periods.')
ap_dd_low_trans_rate = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 4), gauge32()).setUnits('per10Seconds').setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdLowTransRate.setStatus('current')
if mibBuilder.loadTexts:
apDdLowTransRate.setDescription('Mimimum value of apDdCurrentTransRate across all 10s periods.')
ap_dd_agent_number = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 5), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentNumber.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentNumber.setDescription('Number of the DD Agents in the system.')
ap_dd_session_period_active = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 6), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdSessionPeriodActive.setStatus('current')
if mibBuilder.loadTexts:
apDdSessionPeriodActive.setDescription('Number of the DD session is Active in this period')
ap_dd_session_period_high = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 7), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdSessionPeriodHigh.setStatus('current')
if mibBuilder.loadTexts:
apDdSessionPeriodHigh.setDescription('Highest number of the DD session in this period')
ap_dd_session_period_total = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 8), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdSessionPeriodTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdSessionPeriodTotal.setDescription('Total Number of the DD session in this period')
ap_dd_session_life_total = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 9), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdSessionLifeTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdSessionLifeTotal.setDescription('Total Number of the DD session in life')
ap_dd_session_life_per_max = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 10), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdSessionLifePerMax.setStatus('current')
if mibBuilder.loadTexts:
apDdSessionLifePerMax.setDescription('PerMax number of the DD session in life')
ap_dd_session_life_high = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 11), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdSessionLifeHigh.setStatus('current')
if mibBuilder.loadTexts:
apDdSessionLifeHigh.setDescription('Highest number of the DD session in life')
ap_dd_sess_init_period_active = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 12), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdSessInitPeriodActive.setStatus('current')
if mibBuilder.loadTexts:
apDdSessInitPeriodActive.setDescription('Number of the DD session is Active in Initial state in this period')
ap_dd_sess_init_period_high = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 13), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdSessInitPeriodHigh.setStatus('current')
if mibBuilder.loadTexts:
apDdSessInitPeriodHigh.setDescription('Highest number of the DD session in Initial state in this period')
ap_dd_sess_init_period_total = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 14), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdSessInitPeriodTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdSessInitPeriodTotal.setDescription('Total Number of the DD session in Initial state in this period')
ap_dd_sess_init_life_total = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 15), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdSessInitLifeTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdSessInitLifeTotal.setDescription('Total Number of the DD session in Initial state in life')
ap_dd_sess_init_life_per_max = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 16), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdSessInitLifePerMax.setStatus('current')
if mibBuilder.loadTexts:
apDdSessInitLifePerMax.setDescription('PerMax number of the DD session in Initial state in life')
ap_dd_sess_init_life_high = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 17), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdSessInitLifeHigh.setStatus('current')
if mibBuilder.loadTexts:
apDdSessInitLifeHigh.setDescription('Highest number of the DD session in Initial state in life')
ap_dd_sess_established_period_active = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 18), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdSessEstablishedPeriodActive.setStatus('current')
if mibBuilder.loadTexts:
apDdSessEstablishedPeriodActive.setDescription('Number of the DD session is Active in Established state in this period')
ap_dd_sess_established_period_high = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 19), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdSessEstablishedPeriodHigh.setStatus('current')
if mibBuilder.loadTexts:
apDdSessEstablishedPeriodHigh.setDescription('Highest number of the DD session in Established state in this period')
ap_dd_sess_established_period_total = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 20), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdSessEstablishedPeriodTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdSessEstablishedPeriodTotal.setDescription('Total Number of the DD session in Established state in this period')
ap_dd_sess_established_life_total = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 21), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdSessEstablishedLifeTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdSessEstablishedLifeTotal.setDescription('Total Number of the DD session in Established state in life')
ap_dd_sess_established_life_per_max = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 22), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdSessEstablishedLifePerMax.setStatus('current')
if mibBuilder.loadTexts:
apDdSessEstablishedLifePerMax.setDescription('PerMax number of the DD session in Established state in life')
ap_dd_sess_established_life_high = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 23), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdSessEstablishedLifeHigh.setStatus('current')
if mibBuilder.loadTexts:
apDdSessEstablishedLifeHigh.setDescription('Highest number of the DD session in Established state in life')
ap_dd_sess_terminated_period_active = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 24), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdSessTerminatedPeriodActive.setStatus('current')
if mibBuilder.loadTexts:
apDdSessTerminatedPeriodActive.setDescription('Number of the DD session is Active in Terminated state in this period')
ap_dd_sess_terminated_period_high = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 25), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdSessTerminatedPeriodHigh.setStatus('current')
if mibBuilder.loadTexts:
apDdSessTerminatedPeriodHigh.setDescription('Highest number of the DD session in Terminated state in this period')
ap_dd_sess_terminated_period_total = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 26), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdSessTerminatedPeriodTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdSessTerminatedPeriodTotal.setDescription('Total Number of the DD session in Terminated state in this period')
ap_dd_sess_terminated_life_total = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 27), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdSessTerminatedLifeTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdSessTerminatedLifeTotal.setDescription('Total Number of the DD session in Terminated state in life')
ap_dd_sess_terminated_life_per_max = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 28), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdSessTerminatedLifePerMax.setStatus('current')
if mibBuilder.loadTexts:
apDdSessTerminatedLifePerMax.setDescription('PerMax number of the DD session in Terminated state in life')
ap_dd_sess_terminated_life_high = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 29), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdSessTerminatedLifeHigh.setStatus('current')
if mibBuilder.loadTexts:
apDdSessTerminatedLifeHigh.setDescription('Highest number of the DD session in Terminated state in life')
ap_dd_sess_timeout_period_total = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 30), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdSessTimeoutPeriodTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdSessTimeoutPeriodTotal.setDescription('Total Number of the DD session in Timeout state in this period')
ap_dd_sess_timeout_life_total = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 31), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdSessTimeoutLifeTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdSessTimeoutLifeTotal.setDescription('Total Number of the DD session in Timeout state in life')
ap_dd_sess_timeout_life_per_max = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 32), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdSessTimeoutLifePerMax.setStatus('current')
if mibBuilder.loadTexts:
apDdSessTimeoutLifePerMax.setDescription('PerMax number of the DD session in Timeout state in life')
ap_dd_sess_errors_period_total = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 33), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdSessErrorsPeriodTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdSessErrorsPeriodTotal.setDescription('Total Number of the DD session in Errors state in this period')
ap_dd_sess_errors_life_total = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 34), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdSessErrorsLifeTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdSessErrorsLifeTotal.setDescription('Total Number of the DD session in Errors state in life')
ap_dd_sess_errors_life_per_max = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 35), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdSessErrorsLifePerMax.setStatus('current')
if mibBuilder.loadTexts:
apDdSessErrorsLifePerMax.setDescription('PerMax number of the DD session in Errors state in life')
ap_dd_sess_miss_period_total = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 36), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdSessMissPeriodTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdSessMissPeriodTotal.setDescription('Total Number of the DD session in Miss state in this period')
ap_dd_sess_miss_life_total = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 37), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdSessMissLifeTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdSessMissLifeTotal.setDescription('Total Number of the DD session in Miss state in life')
ap_dd_sess_miss_life_per_max = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 38), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdSessMissLifePerMax.setStatus('current')
if mibBuilder.loadTexts:
apDdSessMissLifePerMax.setDescription('PerMax number of the DD session in Miss state in life')
ap_dd_subscriber_period_active = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 100), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdSubscriberPeriodActive.setStatus('current')
if mibBuilder.loadTexts:
apDdSubscriberPeriodActive.setDescription('Number of the DD subscriber is Active in this period')
ap_dd_subscriber_period_high = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 101), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdSubscriberPeriodHigh.setStatus('current')
if mibBuilder.loadTexts:
apDdSubscriberPeriodHigh.setDescription('Highest number of the DD subscriber in this period')
ap_dd_subscriber_period_total = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 102), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdSubscriberPeriodTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdSubscriberPeriodTotal.setDescription('Total Number of the DD subscriber in this period')
ap_dd_subscriber_life_total = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 103), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdSubscriberLifeTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdSubscriberLifeTotal.setDescription('Total Number of the DD subscriber in life')
ap_dd_subscriber_life_per_max = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 104), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdSubscriberLifePerMax.setStatus('current')
if mibBuilder.loadTexts:
apDdSubscriberLifePerMax.setDescription('PerMax number of the DD subscriber in life')
ap_dd_subscriber_life_high = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 105), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdSubscriberLifeHigh.setStatus('current')
if mibBuilder.loadTexts:
apDdSubscriberLifeHigh.setDescription('Highest number of the DD subscriber in life')
ap_dd_subscribe_period_active = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 106), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdSubscribePeriodActive.setStatus('current')
if mibBuilder.loadTexts:
apDdSubscribePeriodActive.setDescription('Number of the DD subscriber is Active in Initial state in this period')
ap_dd_subscribe_period_high = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 107), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdSubscribePeriodHigh.setStatus('current')
if mibBuilder.loadTexts:
apDdSubscribePeriodHigh.setDescription('Highest number of the DD subscriber in Initial state in this period')
ap_dd_subscribe_period_total = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 108), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdSubscribePeriodTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdSubscribePeriodTotal.setDescription('Total Number of the DD subscriber in Initial state in this period')
ap_dd_subscribe_life_total = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 109), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdSubscribeLifeTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdSubscribeLifeTotal.setDescription('Total Number of the DD subscriber in Initial state in life')
ap_dd_subscribe_life_per_max = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 110), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdSubscribeLifePerMax.setStatus('current')
if mibBuilder.loadTexts:
apDdSubscribeLifePerMax.setDescription('PerMax number of the DD subscriber in Initial state in life')
ap_dd_subscribe_life_high = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 111), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdSubscribeLifeHigh.setStatus('current')
if mibBuilder.loadTexts:
apDdSubscribeLifeHigh.setDescription('Highest number of the DD subscriber in Initial state in life')
ap_dd_unsubscribe_period_active = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 112), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdUnsubscribePeriodActive.setStatus('current')
if mibBuilder.loadTexts:
apDdUnsubscribePeriodActive.setDescription('Number of the DD subscriber is Active in Established state in this period')
ap_dd_unsubscribe_period_high = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 113), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdUnsubscribePeriodHigh.setStatus('current')
if mibBuilder.loadTexts:
apDdUnsubscribePeriodHigh.setDescription('Highest number of the DD subscriber in Established state in this period')
ap_dd_unsubscribe_period_total = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 114), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdUnsubscribePeriodTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdUnsubscribePeriodTotal.setDescription('Total Number of the DD subscriber in Established state in this period')
ap_dd_unsubscribe_life_total = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 115), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdUnsubscribeLifeTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdUnsubscribeLifeTotal.setDescription('Total Number of the DD subscriber in Established state in life')
ap_dd_unsubscribe_life_per_max = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 116), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdUnsubscribeLifePerMax.setStatus('current')
if mibBuilder.loadTexts:
apDdUnsubscribeLifePerMax.setDescription('PerMax number of the DD subscriber in Established state in life')
ap_dd_unsubscribe_life_high = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 117), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdUnsubscribeLifeHigh.setStatus('current')
if mibBuilder.loadTexts:
apDdUnsubscribeLifeHigh.setDescription('Highest number of the DD subscriber in Established state in life')
ap_dd_policy_hit_period_active = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 118), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdPolicyHitPeriodActive.setStatus('current')
if mibBuilder.loadTexts:
apDdPolicyHitPeriodActive.setDescription('Number of the DD subscriber is Active in Terminated state in this period')
ap_dd_policy_hit_period_high = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 119), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdPolicyHitPeriodHigh.setStatus('current')
if mibBuilder.loadTexts:
apDdPolicyHitPeriodHigh.setDescription('Highest number of the DD subscriber in Terminated state in this period')
ap_dd_policy_hit_period_total = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 120), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdPolicyHitPeriodTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdPolicyHitPeriodTotal.setDescription('Total Number of the DD subscriber in Terminated state in this period')
ap_dd_policy_hit_life_total = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 121), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdPolicyHitLifeTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdPolicyHitLifeTotal.setDescription('Total Number of the DD subscriber in Terminated state in life')
ap_dd_policy_hit_life_per_max = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 122), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdPolicyHitLifePerMax.setStatus('current')
if mibBuilder.loadTexts:
apDdPolicyHitLifePerMax.setDescription('PerMax number of the DD subscriber in Terminated state in life')
ap_dd_policy_hit_life_high = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 123), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdPolicyHitLifeHigh.setStatus('current')
if mibBuilder.loadTexts:
apDdPolicyHitLifeHigh.setDescription('Highest number of the DD subscriber in Terminated state in life')
ap_dd_policy_miss_period_active = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 124), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdPolicyMissPeriodActive.setStatus('current')
if mibBuilder.loadTexts:
apDdPolicyMissPeriodActive.setDescription('Number of the DD subscriber is Active in Timeout state in this period')
ap_dd_policy_miss_period_high = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 125), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdPolicyMissPeriodHigh.setStatus('current')
if mibBuilder.loadTexts:
apDdPolicyMissPeriodHigh.setDescription('Highest number of the DD subscriber in Timeout state in this period')
ap_dd_policy_miss_period_total = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 126), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdPolicyMissPeriodTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdPolicyMissPeriodTotal.setDescription('Total Number of the DD subscriber in Timeout state in this period')
ap_dd_policy_miss_life_total = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 127), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdPolicyMissLifeTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdPolicyMissLifeTotal.setDescription('Total Number of the DD subscriber in Timeout state in life')
ap_dd_policy_miss_life_per_max = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 128), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdPolicyMissLifePerMax.setStatus('current')
if mibBuilder.loadTexts:
apDdPolicyMissLifePerMax.setDescription('PerMax number of the DD subscriber in Timeout state in life')
ap_dd_policy_miss_life_high = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 129), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdPolicyMissLifeHigh.setStatus('current')
if mibBuilder.loadTexts:
apDdPolicyMissLifeHigh.setDescription('Highest number of the DD subscriber in Timeout state in life')
ap_dd_subscriber_miss_period_total = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 130), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdSubscriberMissPeriodTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdSubscriberMissPeriodTotal.setDescription('Total Number of the DD subscriber in Errors state in this period')
ap_dd_subscriber_miss_life_total = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 131), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdSubscriberMissLifeTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdSubscriberMissLifeTotal.setDescription('Total Number of the DD subscriber in Errors state in life')
ap_dd_subscriber_miss_life_per_max = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 1, 132), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdSubscriberMissLifePerMax.setStatus('current')
if mibBuilder.loadTexts:
apDdSubscriberMissLifePerMax.setDescription('PerMax number of the DD subscriber in Errors state in life')
ap_dd_interface_stats_table = mib_table((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1))
if mibBuilder.loadTexts:
apDdInterfaceStatsTable.setStatus('current')
if mibBuilder.loadTexts:
apDdInterfaceStatsTable.setDescription('DD interface statistics.')
ap_dd_interface_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1)).setIndexNames((0, 'APDD-MIB', 'apDdInterfaceIndex'))
if mibBuilder.loadTexts:
apDdInterfaceStatsEntry.setStatus('current')
if mibBuilder.loadTexts:
apDdInterfaceStatsEntry.setDescription('A table entry designed to hold per DD interface statistics.')
ap_dd_interface_index = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647))).setMaxAccess('accessiblefornotify')
if mibBuilder.loadTexts:
apDdInterfaceIndex.setStatus('current')
if mibBuilder.loadTexts:
apDdInterfaceIndex.setDescription('An integer for the sole purpose of indexing the DD interface.')
ap_dd_interface_realm_name = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdInterfaceRealmName.setStatus('current')
if mibBuilder.loadTexts:
apDdInterfaceRealmName.setDescription('Realm name of the DD interface if the row is for per interface stats. Otherwise, it is an empty string.')
ap_dd_client_trans_cp_active = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 3), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdClientTransCPActive.setStatus('current')
if mibBuilder.loadTexts:
apDdClientTransCPActive.setDescription('Number of active client transactions in the current period.')
ap_dd_client_trans_cp_high = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 4), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdClientTransCPHigh.setStatus('current')
if mibBuilder.loadTexts:
apDdClientTransCPHigh.setDescription('Maximum value of apDdClientTransCPActive in the current period (high water mark). ')
ap_dd_client_trans_cp_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 5), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdClientTransCPTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdClientTransCPTotal.setDescription('Total number of client transactions in the current period.')
ap_dd_client_trans_lt_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 6), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdClientTransLTTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdClientTransLTTotal.setDescription('Total number of transactions in client side in life time.')
ap_dd_client_trans_lt_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 7), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdClientTransLTPerMax.setStatus('current')
if mibBuilder.loadTexts:
apDdClientTransLTPerMax.setDescription('Maximum value of apDdClientTransCPTotal across all periods (high water mark).')
ap_dd_client_trans_lt_high = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 8), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdClientTransLTHigh.setStatus('current')
if mibBuilder.loadTexts:
apDdClientTransLTHigh.setDescription('Maximum value of apDdClientTransCPHigh across all periods (high water mark).')
ap_dd_server_trans_cp_active = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 9), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdServerTransCPActive.setStatus('current')
if mibBuilder.loadTexts:
apDdServerTransCPActive.setDescription('Number of active transactions in server side in current period.')
ap_dd_server_trans_cp_high = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 10), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdServerTransCPHigh.setStatus('current')
if mibBuilder.loadTexts:
apDdServerTransCPHigh.setDescription('Highest number of active transactions in server side in current period.')
ap_dd_server_trans_cp_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 11), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdServerTransCPTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdServerTransCPTotal.setDescription('Total number of transactions in server side in current period.')
ap_dd_server_trans_lt_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 12), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdServerTransLTTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdServerTransLTTotal.setDescription('Total number of transactions in server side in life time.')
ap_dd_server_trans_lt_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 13), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdServerTransLTPerMax.setStatus('current')
if mibBuilder.loadTexts:
apDdServerTransLTPerMax.setDescription('Maximum value of apDdServerTransCPTotal across all periods (high water mark).')
ap_dd_server_trans_lt_high = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 14), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdServerTransLTHigh.setStatus('current')
if mibBuilder.loadTexts:
apDdServerTransLTHigh.setDescription('Maximum value of apDdServerTransCPHigh across all periods (high water mark).')
ap_dd_gen_sockets_cp_active = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 15), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdGenSocketsCPActive.setStatus('current')
if mibBuilder.loadTexts:
apDdGenSocketsCPActive.setDescription('Number of active sockets in current period.')
ap_dd_gen_sockets_cp_high = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 16), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdGenSocketsCPHigh.setStatus('current')
if mibBuilder.loadTexts:
apDdGenSocketsCPHigh.setDescription('Highest number of active sockets in current period.')
ap_dd_gen_sockets_cp_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 17), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdGenSocketsCPTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdGenSocketsCPTotal.setDescription('Total number of sockets in current period.')
ap_dd_gen_sockets_lt_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 18), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdGenSocketsLTTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdGenSocketsLTTotal.setDescription('Total number of sockets in life time.')
ap_dd_gen_sockets_lt_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 19), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdGenSocketsLTPerMax.setStatus('current')
if mibBuilder.loadTexts:
apDdGenSocketsLTPerMax.setDescription('Maximum value of apDdSocketsCPTotal across all periods (high water mark).')
ap_dd_gen_sockets_lt_high = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 20), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdGenSocketsLTHigh.setStatus('current')
if mibBuilder.loadTexts:
apDdGenSocketsLTHigh.setDescription('Maximum value of apDdSocketsCPHigh across all periods (high water mark).')
ap_dd_gen_connects_cp_active = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 21), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdGenConnectsCPActive.setStatus('current')
if mibBuilder.loadTexts:
apDdGenConnectsCPActive.setDescription('Number of active connections in current period.')
ap_dd_gen_connects_cp_high = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 22), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdGenConnectsCPHigh.setStatus('current')
if mibBuilder.loadTexts:
apDdGenConnectsCPHigh.setDescription('high number of connections in current period.')
ap_dd_gen_connects_cp_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 23), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdGenConnectsCPTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdGenConnectsCPTotal.setDescription('Total number of connections in current period.')
ap_dd_gen_connects_lt_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 24), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdGenConnectsLTTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdGenConnectsLTTotal.setDescription('Total number of connections in life time.')
ap_dd_gen_connects_lt_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 25), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdGenConnectsLTPerMax.setStatus('current')
if mibBuilder.loadTexts:
apDdGenConnectsLTPerMax.setDescription('Maximum value of apDdConnectsCPTotal across all periods (high water mark).')
ap_dd_gen_connects_lt_high = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 1, 1, 26), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdGenConnectsLTHigh.setStatus('current')
if mibBuilder.loadTexts:
apDdGenConnectsLTHigh.setDescription('Maximum value of apDdConnectsCPHigh across all periods (high water mark).')
ap_dd_error_status_table = mib_table((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2))
if mibBuilder.loadTexts:
apDdErrorStatusTable.setStatus('current')
if mibBuilder.loadTexts:
apDdErrorStatusTable.setDescription('per DD interface error stats.')
ap_dd_error_status_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1)).setIndexNames((0, 'APDD-MIB', 'apDdInterfaceIndex'))
if mibBuilder.loadTexts:
apDdErrorStatusEntry.setStatus('current')
if mibBuilder.loadTexts:
apDdErrorStatusEntry.setDescription('A table entry designed to hold error status data')
ap_dd_no_route_found_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 1), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdNoRouteFoundRecent.setStatus('current')
if mibBuilder.loadTexts:
apDdNoRouteFoundRecent.setDescription("Number of 'no route found' error in recent period.")
ap_dd_no_route_found_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 2), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdNoRouteFoundTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdNoRouteFoundTotal.setDescription("Total number of 'no route found' error in life time.")
ap_dd_no_route_found_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 3), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdNoRouteFoundPerMax.setStatus('current')
if mibBuilder.loadTexts:
apDdNoRouteFoundPerMax.setDescription('Maximum value of apDdNoRouteFoundRecent across all periods (high water mark).')
ap_dd_malformed_msg_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 4), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdMalformedMsgRecent.setStatus('current')
if mibBuilder.loadTexts:
apDdMalformedMsgRecent.setDescription("Number of 'mal-formed message' error in recent period.")
ap_dd_malformed_msg_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 5), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdMalformedMsgTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdMalformedMsgTotal.setDescription("Total number of 'mal-formed message' error in life time.")
ap_dd_malformed_msg_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 6), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdMalformedMsgPerMax.setStatus('current')
if mibBuilder.loadTexts:
apDdMalformedMsgPerMax.setDescription('Maximum value of apDdMalformedMsgRecent across all periods (high water mark).')
ap_dd_rejected_msg_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 7), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdRejectedMsgRecent.setStatus('current')
if mibBuilder.loadTexts:
apDdRejectedMsgRecent.setDescription("Number of 'rejected msg'' error in recent period.")
ap_dd_rejected_msg_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 8), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdRejectedMsgTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdRejectedMsgTotal.setDescription("Total number of 'rejected msg' error in life time.")
ap_dd_rejected_msg_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 9), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdRejectedMsgPerMax.setStatus('current')
if mibBuilder.loadTexts:
apDdRejectedMsgPerMax.setDescription('Maximum value of apDdRejectedMsgRecent across all periods (high water mark).')
ap_dd_dropped_msg_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 10), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdDroppedMsgRecent.setStatus('current')
if mibBuilder.loadTexts:
apDdDroppedMsgRecent.setDescription("Number of 'dropped msg'' error in recent period.")
ap_dd_dropped_msg_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 11), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdDroppedMsgTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdDroppedMsgTotal.setDescription("Total number of 'dropped msg' error in life time.")
ap_dd_dropped_msg_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 12), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdDroppedMsgPerMax.setStatus('current')
if mibBuilder.loadTexts:
apDdDroppedMsgPerMax.setDescription('Maximum value of apDdDroppedMsgRecent across all periods (high water mark).')
ap_dd_inbound_constraints_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 13), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdInboundConstraintsRecent.setStatus('current')
if mibBuilder.loadTexts:
apDdInboundConstraintsRecent.setDescription("Number of 'inbound constraints'' error in recent period.")
ap_dd_inbound_constraints_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 14), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdInboundConstraintsTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdInboundConstraintsTotal.setDescription("Total number of 'inbound constraints' error in life time.")
ap_dd_inbound_constraints_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 15), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdInboundConstraintsPerMax.setStatus('current')
if mibBuilder.loadTexts:
apDdInboundConstraintsPerMax.setDescription('Maximum value of apDdInboundConstraintsRecent across all periods (high water mark).')
ap_dd_outbound_constraints_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 16), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdOutboundConstraintsRecent.setStatus('current')
if mibBuilder.loadTexts:
apDdOutboundConstraintsRecent.setDescription("Number of 'outbound constraints'' error in recent period.")
ap_dd_outbound_constraints_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 17), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdOutboundConstraintsTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdOutboundConstraintsTotal.setDescription("Total number of 'outbound constraints' error in life time.")
ap_dd_outbound_constraints_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 2, 1, 18), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdOutboundConstraintsPerMax.setStatus('current')
if mibBuilder.loadTexts:
apDdOutboundConstraintsPerMax.setDescription('Maximum value of apDdOutboundConstraintsRecent across all periods (high water mark).')
ap_dd_msg_type_info_table = mib_table((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 3))
if mibBuilder.loadTexts:
apDdMsgTypeInfoTable.setStatus('current')
if mibBuilder.loadTexts:
apDdMsgTypeInfoTable.setDescription('static system message type information.')
ap_dd_msg_type_info_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 3, 1)).setIndexNames((0, 'APDD-MIB', 'apDdMsgTypeIndex'))
if mibBuilder.loadTexts:
apDdMsgTypeInfoEntry.setStatus('current')
if mibBuilder.loadTexts:
apDdMsgTypeInfoEntry.setDescription('A table entry designed for message type inf.')
ap_dd_msg_type_index = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 3, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647)))
if mibBuilder.loadTexts:
apDdMsgTypeIndex.setStatus('current')
if mibBuilder.loadTexts:
apDdMsgTypeIndex.setDescription('An integer for the sole purpose of indexing DD message types.')
ap_dd_msg_type_msg_name = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 3, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdMsgTypeMsgName.setStatus('current')
if mibBuilder.loadTexts:
apDdMsgTypeMsgName.setDescription('The identification string of the message type.')
ap_dd_msg_type_stats_table = mib_table((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4))
if mibBuilder.loadTexts:
apDdMsgTypeStatsTable.setStatus('current')
if mibBuilder.loadTexts:
apDdMsgTypeStatsTable.setDescription('table for holding message type stats.')
ap_dd_msg_type_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1)).setIndexNames((0, 'APDD-MIB', 'apDdInterfaceIndex'), (0, 'APDD-MIB', 'apDdMsgTypeIndex'))
if mibBuilder.loadTexts:
apDdMsgTypeStatsEntry.setStatus('current')
if mibBuilder.loadTexts:
apDdMsgTypeStatsEntry.setDescription('A table entry designed for message type statistics.')
ap_dd_msg_type_server_req_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 3), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdMsgTypeServerReqRecent.setStatus('current')
if mibBuilder.loadTexts:
apDdMsgTypeServerReqRecent.setDescription('Number of server requests in recent period.')
ap_dd_msg_type_server_req_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 4), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdMsgTypeServerReqTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdMsgTypeServerReqTotal.setDescription('Total number of server requests in life time.')
ap_dd_msg_type_server_req_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 5), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdMsgTypeServerReqPerMax.setStatus('current')
if mibBuilder.loadTexts:
apDdMsgTypeServerReqPerMax.setDescription('Maximum value of apDdMsgTypeServerReqRecent across all periods (high water mark)')
ap_dd_msg_type_client_req_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 6), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdMsgTypeClientReqRecent.setStatus('current')
if mibBuilder.loadTexts:
apDdMsgTypeClientReqRecent.setDescription('Number of client requests in recent period.')
ap_dd_msg_type_client_req_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 7), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdMsgTypeClientReqTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdMsgTypeClientReqTotal.setDescription('Total number of client requests in life time.')
ap_dd_msg_type_client_req_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 8), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdMsgTypeClientReqPerMax.setStatus('current')
if mibBuilder.loadTexts:
apDdMsgTypeClientReqPerMax.setDescription('Maximum value of apDdMsgTypeClientReqRecent across all periods (high water mark).')
ap_dd_msg_type_server_retrans_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 9), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdMsgTypeServerRetransRecent.setStatus('current')
if mibBuilder.loadTexts:
apDdMsgTypeServerRetransRecent.setDescription('Number of server retransmissions in recent period.')
ap_dd_msg_type_server_retrans_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 10), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdMsgTypeServerRetransTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdMsgTypeServerRetransTotal.setDescription('Total number of server retransmissions in life time.')
ap_dd_msg_type_server_retrans_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 11), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdMsgTypeServerRetransPerMax.setStatus('current')
if mibBuilder.loadTexts:
apDdMsgTypeServerRetransPerMax.setDescription('Maximum value of apDdMsgTypeServerRetransRecent across all periods (high water mark)')
ap_dd_msg_type_client_retrans_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 12), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdMsgTypeClientRetransRecent.setStatus('current')
if mibBuilder.loadTexts:
apDdMsgTypeClientRetransRecent.setDescription('Number of client retransmissions in recent period.')
ap_dd_msg_type_client_retrans_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 13), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdMsgTypeClientRetransTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdMsgTypeClientRetransTotal.setDescription('Total number of client retransmissions in life time.')
ap_dd_msg_type_client_retrans_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 14), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdMsgTypeClientRetransPerMax.setStatus('current')
if mibBuilder.loadTexts:
apDdMsgTypeClientRetransPerMax.setDescription('Maximum value of apDdMsgTypeClientRetransRecent across all periods (high water mark).')
ap_dd_msg_type_server_resp_retrans_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 15), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdMsgTypeServerRespRetransRecent.setStatus('current')
if mibBuilder.loadTexts:
apDdMsgTypeServerRespRetransRecent.setDescription('Number of server response retransactions in recent period.')
ap_dd_msg_type_server_resp_retrans_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 16), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdMsgTypeServerRespRetransTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdMsgTypeServerRespRetransTotal.setDescription('Total number of server response retransactions in life time.')
ap_dd_msg_type_server_resp_retrans_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 17), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdMsgTypeServerRespRetransPerMax.setStatus('current')
if mibBuilder.loadTexts:
apDdMsgTypeServerRespRetransPerMax.setDescription('Maximum value of apDdMsgTypeServerRespRetransRecent across all periods (high water mark).')
ap_dd_msg_type_client_resp_retrans_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 21), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdMsgTypeClientRespRetransRecent.setStatus('current')
if mibBuilder.loadTexts:
apDdMsgTypeClientRespRetransRecent.setDescription('Number of client response retransactions in recent period.')
ap_dd_msg_type_client_resp_retrans_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 22), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdMsgTypeClientRespRetransTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdMsgTypeClientRespRetransTotal.setDescription('Total number of client response retransactions in life time.')
ap_dd_msg_type_client_resp_retrans_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 23), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdMsgTypeClientRespRetransPerMax.setStatus('current')
if mibBuilder.loadTexts:
apDdMsgTypeClientRespRetransPerMax.setDescription('Maximum value of apDdMsgTypeClientRespRetransRecent across all periods (high water mark).')
ap_dd_msg_type_client_timeout_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 27), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdMsgTypeClientTimeoutRecent.setStatus('current')
if mibBuilder.loadTexts:
apDdMsgTypeClientTimeoutRecent.setDescription('Number of client transaction timeout in recent period.')
ap_dd_msg_type_client_timeout_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 28), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdMsgTypeClientTimeoutTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdMsgTypeClientTimeoutTotal.setDescription('Total number of client transaction timeout in life time.')
ap_dd_msg_type_client_timeout_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 29), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdMsgTypeClientTimeoutPerMax.setStatus('current')
if mibBuilder.loadTexts:
apDdMsgTypeClientTimeoutPerMax.setDescription('Maximum value of apDdMsgTypeClientTimeoutRecent across all periods (high water mark).')
ap_dd_msg_type_client_throttled_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 33), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdMsgTypeClientThrottledRecent.setStatus('current')
if mibBuilder.loadTexts:
apDdMsgTypeClientThrottledRecent.setDescription('Number of locally throttled client count in recent period.')
ap_dd_msg_type_client_throttled_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 34), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdMsgTypeClientThrottledTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdMsgTypeClientThrottledTotal.setDescription('Total number of locally throttled client count in life time.')
ap_dd_msg_type_client_throttled_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 35), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdMsgTypeClientThrottledPerMax.setStatus('current')
if mibBuilder.loadTexts:
apDdMsgTypeClientThrottledPerMax.setDescription('Maximum value of apDdMsgTypeClientThrottledRecent across all periods (high water mark).')
ap_dd_msg_type_average_latency = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 36), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdMsgTypeAverageLatency.setStatus('current')
if mibBuilder.loadTexts:
apDdMsgTypeAverageLatency.setDescription('Average Latency.')
ap_dd_msg_type_maximum_latency = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 37), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdMsgTypeMaximumLatency.setStatus('current')
if mibBuilder.loadTexts:
apDdMsgTypeMaximumLatency.setDescription('Maximum Latency.')
ap_dd_msg_type_latency_window = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 4, 1, 38), integer32()).setUnits('second').setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdMsgTypeLatencyWindow.setStatus('current')
if mibBuilder.loadTexts:
apDdMsgTypeLatencyWindow.setDescription('Latency window length.')
ap_dd_msg_return_code_info_table = mib_table((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 5))
if mibBuilder.loadTexts:
apDdMsgReturnCodeInfoTable.setStatus('current')
if mibBuilder.loadTexts:
apDdMsgReturnCodeInfoTable.setDescription('DD return message code stats table.')
ap_dd_msg_return_code_info_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 5, 1)).setIndexNames((0, 'APDD-MIB', 'apDdMsgReturnCodeIndex'))
if mibBuilder.loadTexts:
apDdMsgReturnCodeInfoEntry.setStatus('current')
if mibBuilder.loadTexts:
apDdMsgReturnCodeInfoEntry.setDescription('A table entry designed to hold return code stats.')
ap_dd_msg_return_code_index = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 5, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647)))
if mibBuilder.loadTexts:
apDdMsgReturnCodeIndex.setStatus('current')
if mibBuilder.loadTexts:
apDdMsgReturnCodeIndex.setDescription('An integer for the sole purpose of indexing message return code.')
ap_dd_msg_return_code_name = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 5, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdMsgReturnCodeName.setStatus('current')
if mibBuilder.loadTexts:
apDdMsgReturnCodeName.setDescription('The name string of the message return code.')
ap_dd_msg_stats_return_code_table = mib_table((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 6))
if mibBuilder.loadTexts:
apDdMsgStatsReturnCodeTable.setStatus('current')
if mibBuilder.loadTexts:
apDdMsgStatsReturnCodeTable.setDescription('DD return message code stats table.')
ap_dd_msg_stats_return_code_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 6, 1)).setIndexNames((0, 'APDD-MIB', 'apDdInterfaceIndex'), (0, 'APDD-MIB', 'apDdMsgTypeIndex'), (0, 'APDD-MIB', 'apDdMsgReturnCodeIndex'))
if mibBuilder.loadTexts:
apDdMsgStatsReturnCodeEntry.setStatus('current')
if mibBuilder.loadTexts:
apDdMsgStatsReturnCodeEntry.setDescription('A table entry designed to hold return code stats.')
ap_dd_msg_return_code_server_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 6, 1, 3), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdMsgReturnCodeServerRecent.setStatus('current')
if mibBuilder.loadTexts:
apDdMsgReturnCodeServerRecent.setDescription('Number of server requests in recent period.')
ap_dd_msg_return_code_server_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 6, 1, 4), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdMsgReturnCodeServerTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdMsgReturnCodeServerTotal.setDescription('Total number of server requests in life time.')
ap_dd_msg_return_code_server_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 6, 1, 5), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdMsgReturnCodeServerPerMax.setStatus('current')
if mibBuilder.loadTexts:
apDdMsgReturnCodeServerPerMax.setDescription('Maximum value of apDdMsgReturnCodeServerRecent across all periods (high water mark).')
ap_dd_msg_return_code_client_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 6, 1, 6), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdMsgReturnCodeClientRecent.setStatus('current')
if mibBuilder.loadTexts:
apDdMsgReturnCodeClientRecent.setDescription('Number of server requests in recent period.')
ap_dd_msg_return_code_client_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 6, 1, 7), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdMsgReturnCodeClientTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdMsgReturnCodeClientTotal.setDescription('Total number of server requests in life time.')
ap_dd_msg_return_code_client_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 6, 1, 8), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdMsgReturnCodeClientPerMax.setStatus('current')
if mibBuilder.loadTexts:
apDdMsgReturnCodeClientPerMax.setDescription('Maximum value of apDdMsgReturnCodeClientRecent across all periods (high water mark).')
ap_dd_agent_stats_table = mib_table((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7))
if mibBuilder.loadTexts:
apDdAgentStatsTable.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentStatsTable.setDescription('DD agent statistics.')
ap_dd_agent_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1)).setIndexNames((0, 'APDD-MIB', 'apDdAgentIndex'))
if mibBuilder.loadTexts:
apDdAgentStatsEntry.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentStatsEntry.setDescription('A table entry designed to hold per DD agent statistics.')
ap_dd_agent_index = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647))).setMaxAccess('accessiblefornotify')
if mibBuilder.loadTexts:
apDdAgentIndex.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentIndex.setDescription('An integer for the sole purpose of indexing the DD agent.')
ap_dd_agent_realm_name = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentRealmName.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentRealmName.setDescription('Realm name of the DD agent if the row is for per agent stats. Otherwise, it is an empty string.')
ap_dd_agent_client_trans_cp_active = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 3), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentClientTransCPActive.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentClientTransCPActive.setDescription('Number of active client transactions in the current period.')
ap_dd_agent_client_trans_cp_high = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 4), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentClientTransCPHigh.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentClientTransCPHigh.setDescription('Maximum value of apDdAgentClientTransCPActive in the current period (high water mark). ')
ap_dd_agent_client_trans_cp_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 5), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentClientTransCPTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentClientTransCPTotal.setDescription('Total number of client transactions in the current period.')
ap_dd_agent_client_trans_lt_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 6), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentClientTransLTTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentClientTransLTTotal.setDescription('Total number of transactions in client side in life time.')
ap_dd_agent_client_trans_lt_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 7), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentClientTransLTPerMax.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentClientTransLTPerMax.setDescription('Maximum value of apDdAgentClientTransCPTotal across all periods (high water mark).')
ap_dd_agent_client_trans_lt_high = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 8), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentClientTransLTHigh.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentClientTransLTHigh.setDescription('Maximum value of apDdAgentClientTransCPHigh across all periods (high water mark).')
ap_dd_agent_server_trans_cp_active = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 9), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentServerTransCPActive.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentServerTransCPActive.setDescription('Number of active transactions in server side in current period.')
ap_dd_agent_server_trans_cp_high = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 10), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentServerTransCPHigh.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentServerTransCPHigh.setDescription('Highest number of active transactions in server side in current period.')
ap_dd_agent_server_trans_cp_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 11), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentServerTransCPTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentServerTransCPTotal.setDescription('Total number of transactions in server side in current period.')
ap_dd_agent_server_trans_lt_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 12), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentServerTransLTTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentServerTransLTTotal.setDescription('Total number of transactions in server side in life time.')
ap_dd_agent_server_trans_lt_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 13), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentServerTransLTPerMax.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentServerTransLTPerMax.setDescription('Maximum value of apDdAgentServerTransCPTotal across all periods (high water mark).')
ap_dd_agent_server_trans_lt_high = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 14), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentServerTransLTHigh.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentServerTransLTHigh.setDescription('Maximum value of apDdAgentServerTransCPHigh across all periods (high water mark).')
ap_dd_agent_gen_sockets_cp_active = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 15), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentGenSocketsCPActive.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentGenSocketsCPActive.setDescription('Number of active sockets in current period.')
ap_dd_agent_gen_sockets_cp_high = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 16), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentGenSocketsCPHigh.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentGenSocketsCPHigh.setDescription('Highest number of active sockets in current period.')
ap_dd_agent_gen_sockets_cp_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 17), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentGenSocketsCPTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentGenSocketsCPTotal.setDescription('Total number of sockets in current period.')
ap_dd_agent_gen_sockets_lt_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 18), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentGenSocketsLTTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentGenSocketsLTTotal.setDescription('Total number of sockets in life time.')
ap_dd_agent_gen_sockets_lt_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 19), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentGenSocketsLTPerMax.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentGenSocketsLTPerMax.setDescription('Maximum value of apDdAgentSocketsCPTotal across all periods (high water mark).')
ap_dd_agent_gen_sockets_lt_high = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 20), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentGenSocketsLTHigh.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentGenSocketsLTHigh.setDescription('Maximum value of apDdAgentSocketsCPHigh across all periods (high water mark).')
ap_dd_agent_gen_connects_cp_active = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 21), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentGenConnectsCPActive.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentGenConnectsCPActive.setDescription('Number of active connections in current period.')
ap_dd_agent_gen_connects_cp_high = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 22), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentGenConnectsCPHigh.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentGenConnectsCPHigh.setDescription('high number of connections in current period.')
ap_dd_agent_gen_connects_cp_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 23), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentGenConnectsCPTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentGenConnectsCPTotal.setDescription('Total number of connections in current period.')
ap_dd_agent_gen_connects_lt_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 24), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentGenConnectsLTTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentGenConnectsLTTotal.setDescription('Total number of connections in life time.')
ap_dd_agent_gen_connects_lt_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 25), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentGenConnectsLTPerMax.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentGenConnectsLTPerMax.setDescription('Maximum value of apDdConnectsCPTotal across all periods (high water mark).')
ap_dd_agent_gen_connects_lt_high = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 7, 1, 26), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentGenConnectsLTHigh.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentGenConnectsLTHigh.setDescription('Maximum value of apDdAgentConnectsCPHigh across all periods (high water mark).')
ap_dd_agent_error_status_table = mib_table((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8))
if mibBuilder.loadTexts:
apDdAgentErrorStatusTable.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentErrorStatusTable.setDescription('per DD agent error stats.')
ap_dd_agent_error_status_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1)).setIndexNames((0, 'APDD-MIB', 'apDdAgentIndex'))
if mibBuilder.loadTexts:
apDdAgentErrorStatusEntry.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentErrorStatusEntry.setDescription('A table entry designed to hold error status data')
ap_dd_agent_no_route_found_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 1), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentNoRouteFoundRecent.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentNoRouteFoundRecent.setDescription("Number of 'no route found' error in recent period.")
ap_dd_agent_no_route_found_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 2), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentNoRouteFoundTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentNoRouteFoundTotal.setDescription("Total number of 'no route found' error in life time.")
ap_dd_agent_no_route_found_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 3), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentNoRouteFoundPerMax.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentNoRouteFoundPerMax.setDescription('Maximum value of apDdAgentNoRouteFoundRecent across all periods (high water mark).')
ap_dd_agent_malformed_msg_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 4), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentMalformedMsgRecent.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentMalformedMsgRecent.setDescription("Number of 'mal-formed message' error in recent period.")
ap_dd_agent_malformed_msg_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 5), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentMalformedMsgTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentMalformedMsgTotal.setDescription("Total number of 'mal-formed message' error in life time.")
ap_dd_agent_malformed_msg_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 6), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentMalformedMsgPerMax.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentMalformedMsgPerMax.setDescription('Maximum value of apDdAgentMalformedMsgRecent across all periods (high water mark).')
ap_dd_agent_rejected_msg_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 7), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentRejectedMsgRecent.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentRejectedMsgRecent.setDescription("Number of 'rejected msg'' error in recent period.")
ap_dd_agent_rejected_msg_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 8), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentRejectedMsgTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentRejectedMsgTotal.setDescription("Total number of 'rejected msg' error in life time.")
ap_dd_agent_rejected_msg_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 9), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentRejectedMsgPerMax.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentRejectedMsgPerMax.setDescription('Maximum value of apDdAgentRejectedMsgRecent across all periods (high water mark).')
ap_dd_agent_dropped_msg_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 10), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentDroppedMsgRecent.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentDroppedMsgRecent.setDescription("Number of 'dropped msg'' error in recent period.")
ap_dd_agent_dropped_msg_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 11), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentDroppedMsgTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentDroppedMsgTotal.setDescription("Total number of 'dropped msg' error in life time.")
ap_dd_agent_dropped_msg_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 12), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentDroppedMsgPerMax.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentDroppedMsgPerMax.setDescription('Maximum value of apDdAgentDroppedMsgRecent across all periods (high water mark).')
ap_dd_agent_inbound_constraints_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 13), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentInboundConstraintsRecent.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentInboundConstraintsRecent.setDescription("Number of 'inbound constraints'' error in recent period.")
ap_dd_agent_inbound_constraints_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 14), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentInboundConstraintsTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentInboundConstraintsTotal.setDescription("Total number of 'inbound constraints' error in life time.")
ap_dd_agent_inbound_constraints_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 15), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentInboundConstraintsPerMax.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentInboundConstraintsPerMax.setDescription('Maximum value of apDdAgentInboundConstraintsRecent across all periods (high water mark).')
ap_dd_agent_outbound_constraints_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 16), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentOutboundConstraintsRecent.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentOutboundConstraintsRecent.setDescription("Number of 'outbound constraints'' error in recent period.")
ap_dd_agent_outbound_constraints_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 17), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentOutboundConstraintsTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentOutboundConstraintsTotal.setDescription("Total number of 'outbound constraints' error in life time.")
ap_dd_agent_outbound_constraints_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 8, 1, 18), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentOutboundConstraintsPerMax.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentOutboundConstraintsPerMax.setDescription('Maximum value of apDdAgentOutboundConstraintsRecent across all periods (high water mark).')
ap_dd_agent_msg_type_stats_table = mib_table((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9))
if mibBuilder.loadTexts:
apDdAgentMsgTypeStatsTable.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentMsgTypeStatsTable.setDescription('table for holding message type stats.')
ap_dd_agent_msg_type_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1)).setIndexNames((0, 'APDD-MIB', 'apDdAgentIndex'), (0, 'APDD-MIB', 'apDdMsgTypeIndex'))
if mibBuilder.loadTexts:
apDdAgentMsgTypeStatsEntry.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentMsgTypeStatsEntry.setDescription('A table entry designed for message type statistics.')
ap_dd_agent_msg_type_server_req_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 3), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentMsgTypeServerReqRecent.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentMsgTypeServerReqRecent.setDescription('Number of server requests in recent period.')
ap_dd_agent_msg_type_server_req_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 4), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentMsgTypeServerReqTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentMsgTypeServerReqTotal.setDescription('Total number of server requests in life time.')
ap_dd_agent_msg_type_server_req_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 5), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentMsgTypeServerReqPerMax.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentMsgTypeServerReqPerMax.setDescription('Maximum value of apDdAgentMsgTypeServerReqRecent across all periods (high water mark)')
ap_dd_agent_msg_type_client_req_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 6), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentMsgTypeClientReqRecent.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentMsgTypeClientReqRecent.setDescription('Number of client requests in recent period.')
ap_dd_agent_msg_type_client_req_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 7), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentMsgTypeClientReqTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentMsgTypeClientReqTotal.setDescription('Total number of client requests in life time.')
ap_dd_agent_msg_type_client_req_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 8), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentMsgTypeClientReqPerMax.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentMsgTypeClientReqPerMax.setDescription('Maximum value of apDdAgentMsgTypeClientReqRecent across all periods (high water mark).')
ap_dd_agent_msg_type_server_retrans_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 9), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentMsgTypeServerRetransRecent.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentMsgTypeServerRetransRecent.setDescription('Number of server retransmissions in recent period.')
ap_dd_agent_msg_type_server_retrans_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 10), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentMsgTypeServerRetransTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentMsgTypeServerRetransTotal.setDescription('Total number of server retransmissions in life time.')
ap_dd_agent_msg_type_server_retrans_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 11), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentMsgTypeServerRetransPerMax.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentMsgTypeServerRetransPerMax.setDescription('Maximum value of apDdAgentMsgTypeServerRetransRecent across all periods (high water mark)')
ap_dd_agent_msg_type_client_retrans_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 12), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentMsgTypeClientRetransRecent.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentMsgTypeClientRetransRecent.setDescription('Number of client retransmissions in recent period.')
ap_dd_agent_msg_type_client_retrans_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 13), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentMsgTypeClientRetransTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentMsgTypeClientRetransTotal.setDescription('Total number of client retransmissions in life time.')
ap_dd_agent_msg_type_client_retrans_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 14), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentMsgTypeClientRetransPerMax.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentMsgTypeClientRetransPerMax.setDescription('Maximum value of apDdAgentMsgTypeClientRetransRecent across all periods (high water mark).')
ap_dd_agent_msg_type_server_resp_retrans_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 15), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentMsgTypeServerRespRetransRecent.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentMsgTypeServerRespRetransRecent.setDescription('Number of server response retransactions in recent period.')
ap_dd_agent_msg_type_server_resp_retrans_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 16), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentMsgTypeServerRespRetransTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentMsgTypeServerRespRetransTotal.setDescription('Total number of server response retransactions in life time.')
ap_dd_agent_msg_type_server_resp_retrans_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 17), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentMsgTypeServerRespRetransPerMax.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentMsgTypeServerRespRetransPerMax.setDescription('Maximum value of apDdAgentMsgTypeServerRespRetransRecent across all periods (high water mark).')
ap_dd_agent_msg_type_client_resp_retrans_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 21), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentMsgTypeClientRespRetransRecent.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentMsgTypeClientRespRetransRecent.setDescription('Number of client response retransactions in recent period.')
ap_dd_agent_msg_type_client_resp_retrans_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 22), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentMsgTypeClientRespRetransTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentMsgTypeClientRespRetransTotal.setDescription('Total number of client response retransactions in life time.')
ap_dd_agent_msg_type_client_resp_retrans_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 23), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentMsgTypeClientRespRetransPerMax.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentMsgTypeClientRespRetransPerMax.setDescription('Maximum value of apDdAgentMsgTypeClientRespRetransRecent across all periods (high water mark).')
ap_dd_agent_msg_type_client_timeout_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 27), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentMsgTypeClientTimeoutRecent.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentMsgTypeClientTimeoutRecent.setDescription('Number of client transaction timeout in recent period.')
ap_dd_agent_msg_type_client_timeout_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 28), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentMsgTypeClientTimeoutTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentMsgTypeClientTimeoutTotal.setDescription('Total number of client transaction timeout in life time.')
ap_dd_agent_msg_type_client_timeout_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 29), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentMsgTypeClientTimeoutPerMax.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentMsgTypeClientTimeoutPerMax.setDescription('Maximum value of apDdAgentMsgTypeClientTimeoutRecent across all periods (high water mark).')
ap_dd_agent_msg_type_client_throttled_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 33), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentMsgTypeClientThrottledRecent.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentMsgTypeClientThrottledRecent.setDescription('Number of locally throttled client count in recent period.')
ap_dd_agent_msg_type_client_throttled_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 34), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentMsgTypeClientThrottledTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentMsgTypeClientThrottledTotal.setDescription('Total number of locally throttled client count in life time.')
ap_dd_agent_msg_type_client_throttled_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 35), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentMsgTypeClientThrottledPerMax.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentMsgTypeClientThrottledPerMax.setDescription('Maximum value of apDdAgentMsgTypeClientThrottledRecent across all periods (high water mark).')
ap_dd_agent_msg_type_average_latency = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 36), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentMsgTypeAverageLatency.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentMsgTypeAverageLatency.setDescription('Average Latency.')
ap_dd_agent_msg_type_maximum_latency = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 37), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentMsgTypeMaximumLatency.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentMsgTypeMaximumLatency.setDescription('Maximum Latency.')
ap_dd_agent_msg_type_latency_window = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 9, 1, 38), integer32()).setUnits('second').setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentMsgTypeLatencyWindow.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentMsgTypeLatencyWindow.setDescription('Latency window length.')
ap_dd_agent_msg_stats_return_code_table = mib_table((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 10))
if mibBuilder.loadTexts:
apDdAgentMsgStatsReturnCodeTable.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentMsgStatsReturnCodeTable.setDescription('DD return message code stats table.')
ap_dd_agent_msg_stats_return_code_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 10, 1)).setIndexNames((0, 'APDD-MIB', 'apDdAgentIndex'), (0, 'APDD-MIB', 'apDdMsgTypeIndex'), (0, 'APDD-MIB', 'apDdMsgReturnCodeIndex'))
if mibBuilder.loadTexts:
apDdAgentMsgStatsReturnCodeEntry.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentMsgStatsReturnCodeEntry.setDescription('A table entry designed to hold return code stats.')
ap_dd_agent_msg_return_code_server_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 10, 1, 3), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentMsgReturnCodeServerRecent.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentMsgReturnCodeServerRecent.setDescription('Number of server requests in recent period.')
ap_dd_agent_msg_return_code_server_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 10, 1, 4), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentMsgReturnCodeServerTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentMsgReturnCodeServerTotal.setDescription('Total number of server requests in life time.')
ap_dd_agent_msg_return_code_server_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 10, 1, 5), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentMsgReturnCodeServerPerMax.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentMsgReturnCodeServerPerMax.setDescription('Maximum value of apDdAgentMsgReturnCodeServerRecent across all periods (high water mark).')
ap_dd_agent_msg_return_code_client_recent = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 10, 1, 6), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentMsgReturnCodeClientRecent.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentMsgReturnCodeClientRecent.setDescription('Number of server requests in recent period.')
ap_dd_agent_msg_return_code_client_total = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 10, 1, 7), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentMsgReturnCodeClientTotal.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentMsgReturnCodeClientTotal.setDescription('Total number of server requests in life time.')
ap_dd_agent_msg_return_code_client_per_max = mib_table_column((1, 3, 6, 1, 4, 1, 9148, 3, 12, 1, 2, 10, 1, 8), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
apDdAgentMsgReturnCodeClientPerMax.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentMsgReturnCodeClientPerMax.setDescription('Maximum value of apDdAgentMsgReturnCodeClientRecent across all periods (high water mark).')
ap_dd_diameter_agent_host_name = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 2, 1, 1), display_string().subtype(subtypeSpec=value_size_constraint(1, 255))).setMaxAccess('accessiblefornotify')
if mibBuilder.loadTexts:
apDdDiameterAgentHostName.setStatus('current')
if mibBuilder.loadTexts:
apDdDiameterAgentHostName.setDescription('The hostname of the Diameter Agent where it is hosted.')
ap_dd_diameter_ip_port = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 2, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(1, 255))).setMaxAccess('accessiblefornotify')
if mibBuilder.loadTexts:
apDdDiameterIPPort.setStatus('current')
if mibBuilder.loadTexts:
apDdDiameterIPPort.setDescription('The IP port of the Diameter Agent where it is hosted.')
ap_dd_diameter_agent_origin_host_name = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 2, 1, 3), display_string().subtype(subtypeSpec=value_size_constraint(1, 255))).setMaxAccess('accessiblefornotify')
if mibBuilder.loadTexts:
apDdDiameterAgentOriginHostName.setStatus('current')
if mibBuilder.loadTexts:
apDdDiameterAgentOriginHostName.setDescription('The origin hostname of the Diameter Agent where it is hosted.')
ap_dd_diameter_agent_origin_realm_name = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 2, 1, 4), display_string().subtype(subtypeSpec=value_size_constraint(1, 255))).setMaxAccess('accessiblefornotify')
if mibBuilder.loadTexts:
apDdDiameterAgentOriginRealmName.setStatus('current')
if mibBuilder.loadTexts:
apDdDiameterAgentOriginRealmName.setDescription('The origin realm name of the Diameter Agent where it is hosted.')
ap_dd_transport_type = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 2, 1, 5), ap_transport_type()).setMaxAccess('accessiblefornotify')
if mibBuilder.loadTexts:
apDdTransportType.setStatus('current')
if mibBuilder.loadTexts:
apDdTransportType.setDescription('The transport type of the DD interface.')
ap_dd_interface_status_reason = mib_scalar((1, 3, 6, 1, 4, 1, 9148, 3, 12, 2, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('disconnectByRequest', 0), ('diameterAgentUnreachable', 1), ('transportFailure', 2)))).setMaxAccess('accessiblefornotify')
if mibBuilder.loadTexts:
apDdInterfaceStatusReason.setStatus('current')
if mibBuilder.loadTexts:
apDdInterfaceStatusReason.setDescription('The reason for the status change on a DD interface')
ap_dd_connection_failure_trap = notification_type((1, 3, 6, 1, 4, 1, 9148, 3, 12, 2, 2, 0, 1)).setObjects(('APDD-MIB', 'apDdInterfaceRealmName'), ('APDD-MIB', 'apDdDiameterAgentHostName'), ('APDD-MIB', 'apDdDiameterIPPort'), ('APDD-MIB', 'apDdDiameterAgentOriginHostName'), ('APDD-MIB', 'apDdDiameterAgentOriginRealmName'), ('APDD-MIB', 'apDdTransportType'), ('APDD-MIB', 'apDdInterfaceStatusReason'))
if mibBuilder.loadTexts:
apDdConnectionFailureTrap.setStatus('current')
if mibBuilder.loadTexts:
apDdConnectionFailureTrap.setDescription('A notification when a diameter connection is disconnected via a disconnect request.')
ap_dd_connection_failure_clear_trap = notification_type((1, 3, 6, 1, 4, 1, 9148, 3, 12, 2, 2, 0, 2)).setObjects(('APDD-MIB', 'apDdInterfaceRealmName'), ('APDD-MIB', 'apDdDiameterAgentHostName'), ('APDD-MIB', 'apDdDiameterIPPort'), ('APDD-MIB', 'apDdDiameterAgentOriginHostName'), ('APDD-MIB', 'apDdDiameterAgentOriginRealmName'), ('APDD-MIB', 'apDdTransportType'), ('APDD-MIB', 'apDdInterfaceStatusReason'))
if mibBuilder.loadTexts:
apDdConnectionFailureClearTrap.setStatus('current')
if mibBuilder.loadTexts:
apDdConnectionFailureClearTrap.setDescription('A notification when a transport failure has been recovered.')
ap_dd_general_group = object_group((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 1, 1)).setObjects(('APDD-MIB', 'apDdInterfaceNumber'), ('APDD-MIB', 'apDdCurrentTransRate'), ('APDD-MIB', 'apDdHighTransRate'), ('APDD-MIB', 'apDdLowTransRate'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ap_dd_general_group = apDdGeneralGroup.setStatus('current')
if mibBuilder.loadTexts:
apDdGeneralGroup.setDescription('A collection of objects generic to DD system.')
ap_dd_interface_stats_group = object_group((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 1, 2)).setObjects(('APDD-MIB', 'apDdInterfaceRealmName'), ('APDD-MIB', 'apDdClientTransCPActive'), ('APDD-MIB', 'apDdClientTransCPHigh'), ('APDD-MIB', 'apDdClientTransCPTotal'), ('APDD-MIB', 'apDdClientTransLTTotal'), ('APDD-MIB', 'apDdClientTransLTPerMax'), ('APDD-MIB', 'apDdClientTransLTHigh'), ('APDD-MIB', 'apDdServerTransCPActive'), ('APDD-MIB', 'apDdServerTransCPHigh'), ('APDD-MIB', 'apDdServerTransCPTotal'), ('APDD-MIB', 'apDdServerTransLTTotal'), ('APDD-MIB', 'apDdServerTransLTPerMax'), ('APDD-MIB', 'apDdServerTransLTHigh'), ('APDD-MIB', 'apDdGenSocketsCPActive'), ('APDD-MIB', 'apDdGenSocketsCPHigh'), ('APDD-MIB', 'apDdGenSocketsCPTotal'), ('APDD-MIB', 'apDdGenSocketsLTTotal'), ('APDD-MIB', 'apDdGenSocketsLTPerMax'), ('APDD-MIB', 'apDdGenSocketsLTHigh'), ('APDD-MIB', 'apDdGenConnectsCPActive'), ('APDD-MIB', 'apDdGenConnectsCPHigh'), ('APDD-MIB', 'apDdGenConnectsCPTotal'), ('APDD-MIB', 'apDdGenConnectsLTTotal'), ('APDD-MIB', 'apDdGenConnectsLTPerMax'), ('APDD-MIB', 'apDdGenConnectsLTHigh'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ap_dd_interface_stats_group = apDdInterfaceStatsGroup.setStatus('current')
if mibBuilder.loadTexts:
apDdInterfaceStatsGroup.setDescription('A collection of statistics for DD interfaces or system.')
ap_dd_error_status_group = object_group((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 1, 3)).setObjects(('APDD-MIB', 'apDdNoRouteFoundRecent'), ('APDD-MIB', 'apDdNoRouteFoundTotal'), ('APDD-MIB', 'apDdNoRouteFoundPerMax'), ('APDD-MIB', 'apDdMalformedMsgRecent'), ('APDD-MIB', 'apDdMalformedMsgTotal'), ('APDD-MIB', 'apDdMalformedMsgPerMax'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ap_dd_error_status_group = apDdErrorStatusGroup.setStatus('current')
if mibBuilder.loadTexts:
apDdErrorStatusGroup.setDescription('A collection of statistics for DD errors.')
ap_dd_msg_type_stats_group = object_group((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 1, 4)).setObjects(('APDD-MIB', 'apDdMsgTypeMsgName'), ('APDD-MIB', 'apDdMsgTypeServerReqRecent'), ('APDD-MIB', 'apDdMsgTypeServerReqTotal'), ('APDD-MIB', 'apDdMsgTypeServerReqPerMax'), ('APDD-MIB', 'apDdMsgTypeClientReqRecent'), ('APDD-MIB', 'apDdMsgTypeClientReqTotal'), ('APDD-MIB', 'apDdMsgTypeClientReqPerMax'), ('APDD-MIB', 'apDdMsgTypeServerRetransRecent'), ('APDD-MIB', 'apDdMsgTypeServerRetransTotal'), ('APDD-MIB', 'apDdMsgTypeServerRetransPerMax'), ('APDD-MIB', 'apDdMsgTypeClientRetransRecent'), ('APDD-MIB', 'apDdMsgTypeClientRetransTotal'), ('APDD-MIB', 'apDdMsgTypeClientRetransPerMax'), ('APDD-MIB', 'apDdMsgTypeServerRespRetransRecent'), ('APDD-MIB', 'apDdMsgTypeServerRespRetransTotal'), ('APDD-MIB', 'apDdMsgTypeServerRespRetransPerMax'), ('APDD-MIB', 'apDdMsgTypeClientRespRetransRecent'), ('APDD-MIB', 'apDdMsgTypeClientRespRetransTotal'), ('APDD-MIB', 'apDdMsgTypeClientRespRetransPerMax'), ('APDD-MIB', 'apDdMsgTypeClientTimeoutRecent'), ('APDD-MIB', 'apDdMsgTypeClientTimeoutTotal'), ('APDD-MIB', 'apDdMsgTypeClientTimeoutPerMax'), ('APDD-MIB', 'apDdMsgTypeClientThrottledRecent'), ('APDD-MIB', 'apDdMsgTypeClientThrottledTotal'), ('APDD-MIB', 'apDdMsgTypeClientThrottledPerMax'), ('APDD-MIB', 'apDdMsgTypeAverageLatency'), ('APDD-MIB', 'apDdMsgTypeMaximumLatency'), ('APDD-MIB', 'apDdMsgTypeLatencyWindow'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ap_dd_msg_type_stats_group = apDdMsgTypeStatsGroup.setStatus('current')
if mibBuilder.loadTexts:
apDdMsgTypeStatsGroup.setDescription('A collection of statistics for DD message types.')
ap_dd_msg_stats_return_code_group = object_group((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 1, 5)).setObjects(('APDD-MIB', 'apDdMsgReturnCodeName'), ('APDD-MIB', 'apDdMsgReturnCodeServerRecent'), ('APDD-MIB', 'apDdMsgReturnCodeServerTotal'), ('APDD-MIB', 'apDdMsgReturnCodeServerPerMax'), ('APDD-MIB', 'apDdMsgReturnCodeClientRecent'), ('APDD-MIB', 'apDdMsgReturnCodeClientTotal'), ('APDD-MIB', 'apDdMsgReturnCodeClientPerMax'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ap_dd_msg_stats_return_code_group = apDdMsgStatsReturnCodeGroup.setStatus('current')
if mibBuilder.loadTexts:
apDdMsgStatsReturnCodeGroup.setDescription('A collection of statistics for DD message type return codes.')
ap_dd_intf_error_status_group = object_group((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 1, 6)).setObjects(('APDD-MIB', 'apDdRejectedMsgRecent'), ('APDD-MIB', 'apDdRejectedMsgTotal'), ('APDD-MIB', 'apDdRejectedMsgPerMax'), ('APDD-MIB', 'apDdDroppedMsgRecent'), ('APDD-MIB', 'apDdDroppedMsgTotal'), ('APDD-MIB', 'apDdDroppedMsgPerMax'), ('APDD-MIB', 'apDdInboundConstraintsRecent'), ('APDD-MIB', 'apDdInboundConstraintsTotal'), ('APDD-MIB', 'apDdInboundConstraintsPerMax'), ('APDD-MIB', 'apDdOutboundConstraintsRecent'), ('APDD-MIB', 'apDdOutboundConstraintsTotal'), ('APDD-MIB', 'apDdOutboundConstraintsPerMax'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ap_dd_intf_error_status_group = apDdIntfErrorStatusGroup.setStatus('current')
if mibBuilder.loadTexts:
apDdIntfErrorStatusGroup.setDescription('A collection of statistics for DD errors.')
ap_dd_agent_general_group = object_group((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 1, 7)).setObjects(('APDD-MIB', 'apDdAgentNumber'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ap_dd_agent_general_group = apDdAgentGeneralGroup.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentGeneralGroup.setDescription('A collection of Agent objects generic to DD system.')
ap_dd_agent_stats_group = object_group((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 1, 8)).setObjects(('APDD-MIB', 'apDdAgentRealmName'), ('APDD-MIB', 'apDdAgentClientTransCPActive'), ('APDD-MIB', 'apDdAgentClientTransCPHigh'), ('APDD-MIB', 'apDdAgentClientTransCPTotal'), ('APDD-MIB', 'apDdAgentClientTransLTTotal'), ('APDD-MIB', 'apDdAgentClientTransLTPerMax'), ('APDD-MIB', 'apDdAgentClientTransLTHigh'), ('APDD-MIB', 'apDdAgentServerTransCPActive'), ('APDD-MIB', 'apDdAgentServerTransCPHigh'), ('APDD-MIB', 'apDdAgentServerTransCPTotal'), ('APDD-MIB', 'apDdAgentServerTransLTTotal'), ('APDD-MIB', 'apDdAgentServerTransLTPerMax'), ('APDD-MIB', 'apDdAgentServerTransLTHigh'), ('APDD-MIB', 'apDdAgentGenSocketsCPActive'), ('APDD-MIB', 'apDdAgentGenSocketsCPHigh'), ('APDD-MIB', 'apDdAgentGenSocketsCPTotal'), ('APDD-MIB', 'apDdAgentGenSocketsLTTotal'), ('APDD-MIB', 'apDdAgentGenSocketsLTPerMax'), ('APDD-MIB', 'apDdAgentGenSocketsLTHigh'), ('APDD-MIB', 'apDdAgentGenConnectsCPActive'), ('APDD-MIB', 'apDdAgentGenConnectsCPHigh'), ('APDD-MIB', 'apDdAgentGenConnectsCPTotal'), ('APDD-MIB', 'apDdAgentGenConnectsLTTotal'), ('APDD-MIB', 'apDdAgentGenConnectsLTPerMax'), ('APDD-MIB', 'apDdAgentGenConnectsLTHigh'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ap_dd_agent_stats_group = apDdAgentStatsGroup.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentStatsGroup.setDescription('A collection of statistics for DD agents')
ap_dd_agent_error_status_group = object_group((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 1, 9)).setObjects(('APDD-MIB', 'apDdAgentNoRouteFoundRecent'), ('APDD-MIB', 'apDdAgentNoRouteFoundTotal'), ('APDD-MIB', 'apDdAgentNoRouteFoundPerMax'), ('APDD-MIB', 'apDdAgentMalformedMsgRecent'), ('APDD-MIB', 'apDdAgentMalformedMsgTotal'), ('APDD-MIB', 'apDdAgentMalformedMsgPerMax'), ('APDD-MIB', 'apDdAgentRejectedMsgRecent'), ('APDD-MIB', 'apDdAgentRejectedMsgTotal'), ('APDD-MIB', 'apDdAgentRejectedMsgPerMax'), ('APDD-MIB', 'apDdAgentDroppedMsgRecent'), ('APDD-MIB', 'apDdAgentDroppedMsgTotal'), ('APDD-MIB', 'apDdAgentDroppedMsgPerMax'), ('APDD-MIB', 'apDdAgentInboundConstraintsRecent'), ('APDD-MIB', 'apDdAgentInboundConstraintsTotal'), ('APDD-MIB', 'apDdAgentInboundConstraintsPerMax'), ('APDD-MIB', 'apDdAgentOutboundConstraintsRecent'), ('APDD-MIB', 'apDdAgentOutboundConstraintsTotal'), ('APDD-MIB', 'apDdAgentOutboundConstraintsPerMax'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ap_dd_agent_error_status_group = apDdAgentErrorStatusGroup.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentErrorStatusGroup.setDescription('A collection of statistics for DD Agent errors.')
ap_dd_agent_msg_type_stats_group = object_group((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 1, 10)).setObjects(('APDD-MIB', 'apDdMsgTypeMsgName'), ('APDD-MIB', 'apDdAgentMsgTypeServerReqRecent'), ('APDD-MIB', 'apDdAgentMsgTypeServerReqTotal'), ('APDD-MIB', 'apDdAgentMsgTypeServerReqPerMax'), ('APDD-MIB', 'apDdAgentMsgTypeClientReqRecent'), ('APDD-MIB', 'apDdAgentMsgTypeClientReqTotal'), ('APDD-MIB', 'apDdAgentMsgTypeClientReqPerMax'), ('APDD-MIB', 'apDdAgentMsgTypeServerRetransRecent'), ('APDD-MIB', 'apDdAgentMsgTypeServerRetransTotal'), ('APDD-MIB', 'apDdAgentMsgTypeServerRetransPerMax'), ('APDD-MIB', 'apDdAgentMsgTypeClientRetransRecent'), ('APDD-MIB', 'apDdAgentMsgTypeClientRetransTotal'), ('APDD-MIB', 'apDdAgentMsgTypeClientRetransPerMax'), ('APDD-MIB', 'apDdAgentMsgTypeServerRespRetransRecent'), ('APDD-MIB', 'apDdAgentMsgTypeServerRespRetransTotal'), ('APDD-MIB', 'apDdAgentMsgTypeServerRespRetransPerMax'), ('APDD-MIB', 'apDdAgentMsgTypeClientRespRetransRecent'), ('APDD-MIB', 'apDdAgentMsgTypeClientRespRetransTotal'), ('APDD-MIB', 'apDdAgentMsgTypeClientRespRetransPerMax'), ('APDD-MIB', 'apDdAgentMsgTypeClientTimeoutRecent'), ('APDD-MIB', 'apDdAgentMsgTypeClientTimeoutTotal'), ('APDD-MIB', 'apDdAgentMsgTypeClientTimeoutPerMax'), ('APDD-MIB', 'apDdAgentMsgTypeClientThrottledRecent'), ('APDD-MIB', 'apDdAgentMsgTypeClientThrottledTotal'), ('APDD-MIB', 'apDdAgentMsgTypeClientThrottledPerMax'), ('APDD-MIB', 'apDdAgentMsgTypeAverageLatency'), ('APDD-MIB', 'apDdAgentMsgTypeMaximumLatency'), ('APDD-MIB', 'apDdAgentMsgTypeLatencyWindow'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ap_dd_agent_msg_type_stats_group = apDdAgentMsgTypeStatsGroup.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentMsgTypeStatsGroup.setDescription('A collection of statistics for DD Agent message types.')
ap_dd_agent_msg_stats_return_code_group = object_group((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 1, 11)).setObjects(('APDD-MIB', 'apDdMsgReturnCodeName'), ('APDD-MIB', 'apDdAgentMsgReturnCodeServerRecent'), ('APDD-MIB', 'apDdAgentMsgReturnCodeServerTotal'), ('APDD-MIB', 'apDdAgentMsgReturnCodeServerPerMax'), ('APDD-MIB', 'apDdAgentMsgReturnCodeClientRecent'), ('APDD-MIB', 'apDdAgentMsgReturnCodeClientTotal'), ('APDD-MIB', 'apDdAgentMsgReturnCodeClientPerMax'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ap_dd_agent_msg_stats_return_code_group = apDdAgentMsgStatsReturnCodeGroup.setStatus('current')
if mibBuilder.loadTexts:
apDdAgentMsgStatsReturnCodeGroup.setDescription('A collection of statistics for DD Agent message type return codes.')
ap_dd_session_subscriber_general_group = object_group((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 1, 12)).setObjects(('APDD-MIB', 'apDdSessionPeriodActive'), ('APDD-MIB', 'apDdSessionPeriodHigh'), ('APDD-MIB', 'apDdSessionPeriodTotal'), ('APDD-MIB', 'apDdSessionLifeTotal'), ('APDD-MIB', 'apDdSessionLifePerMax'), ('APDD-MIB', 'apDdSessionLifeHigh'), ('APDD-MIB', 'apDdSessInitPeriodActive'), ('APDD-MIB', 'apDdSessInitPeriodHigh'), ('APDD-MIB', 'apDdSessInitPeriodTotal'), ('APDD-MIB', 'apDdSessInitLifeTotal'), ('APDD-MIB', 'apDdSessInitLifePerMax'), ('APDD-MIB', 'apDdSessInitLifeHigh'), ('APDD-MIB', 'apDdSessEstablishedPeriodActive'), ('APDD-MIB', 'apDdSessEstablishedPeriodHigh'), ('APDD-MIB', 'apDdSessEstablishedPeriodTotal'), ('APDD-MIB', 'apDdSessEstablishedLifeTotal'), ('APDD-MIB', 'apDdSessEstablishedLifePerMax'), ('APDD-MIB', 'apDdSessEstablishedLifeHigh'), ('APDD-MIB', 'apDdSessTerminatedPeriodActive'), ('APDD-MIB', 'apDdSessTerminatedPeriodHigh'), ('APDD-MIB', 'apDdSessTerminatedPeriodTotal'), ('APDD-MIB', 'apDdSessTerminatedLifeTotal'), ('APDD-MIB', 'apDdSessTerminatedLifePerMax'), ('APDD-MIB', 'apDdSessTerminatedLifeHigh'), ('APDD-MIB', 'apDdSessTimeoutPeriodTotal'), ('APDD-MIB', 'apDdSessTimeoutLifeTotal'), ('APDD-MIB', 'apDdSessTimeoutLifePerMax'), ('APDD-MIB', 'apDdSessErrorsPeriodTotal'), ('APDD-MIB', 'apDdSessErrorsLifeTotal'), ('APDD-MIB', 'apDdSessErrorsLifePerMax'), ('APDD-MIB', 'apDdSessMissPeriodTotal'), ('APDD-MIB', 'apDdSessMissLifeTotal'), ('APDD-MIB', 'apDdSessMissLifePerMax'), ('APDD-MIB', 'apDdSubscriberPeriodActive'), ('APDD-MIB', 'apDdSubscriberPeriodHigh'), ('APDD-MIB', 'apDdSubscriberPeriodTotal'), ('APDD-MIB', 'apDdSubscriberLifeTotal'), ('APDD-MIB', 'apDdSubscriberLifePerMax'), ('APDD-MIB', 'apDdSubscriberLifeHigh'), ('APDD-MIB', 'apDdSubscribePeriodActive'), ('APDD-MIB', 'apDdSubscribePeriodHigh'), ('APDD-MIB', 'apDdSubscribePeriodTotal'), ('APDD-MIB', 'apDdSubscribeLifeTotal'), ('APDD-MIB', 'apDdSubscribeLifePerMax'), ('APDD-MIB', 'apDdSubscribeLifeHigh'), ('APDD-MIB', 'apDdUnsubscribePeriodActive'), ('APDD-MIB', 'apDdUnsubscribePeriodHigh'), ('APDD-MIB', 'apDdUnsubscribePeriodTotal'), ('APDD-MIB', 'apDdUnsubscribeLifeTotal'), ('APDD-MIB', 'apDdUnsubscribeLifePerMax'), ('APDD-MIB', 'apDdUnsubscribeLifeHigh'), ('APDD-MIB', 'apDdPolicyHitPeriodActive'), ('APDD-MIB', 'apDdPolicyHitPeriodHigh'), ('APDD-MIB', 'apDdPolicyHitPeriodTotal'), ('APDD-MIB', 'apDdPolicyHitLifeTotal'), ('APDD-MIB', 'apDdPolicyHitLifePerMax'), ('APDD-MIB', 'apDdPolicyHitLifeHigh'), ('APDD-MIB', 'apDdPolicyMissPeriodActive'), ('APDD-MIB', 'apDdPolicyMissPeriodHigh'), ('APDD-MIB', 'apDdPolicyMissPeriodTotal'), ('APDD-MIB', 'apDdPolicyMissLifeTotal'), ('APDD-MIB', 'apDdPolicyMissLifePerMax'), ('APDD-MIB', 'apDdPolicyMissLifeHigh'), ('APDD-MIB', 'apDdSubscriberMissPeriodTotal'), ('APDD-MIB', 'apDdSubscriberMissLifeTotal'), ('APDD-MIB', 'apDdSubscriberMissLifePerMax'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ap_dd_session_subscriber_general_group = apDdSessionSubscriberGeneralGroup.setStatus('current')
if mibBuilder.loadTexts:
apDdSessionSubscriberGeneralGroup.setDescription('A collection of Session objects generic to DD system.')
ap_dd_notif_objects_group = object_group((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 2, 1)).setObjects(('APDD-MIB', 'apDdDiameterAgentHostName'), ('APDD-MIB', 'apDdDiameterIPPort'), ('APDD-MIB', 'apDdDiameterAgentOriginHostName'), ('APDD-MIB', 'apDdDiameterAgentOriginRealmName'), ('APDD-MIB', 'apDdTransportType'), ('APDD-MIB', 'apDdInterfaceStatusReason'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ap_dd_notif_objects_group = apDDNotifObjectsGroup.setStatus('current')
if mibBuilder.loadTexts:
apDDNotifObjectsGroup.setDescription('A collection of mib objects accessible only to traps.')
ap_dd_notifications_group = notification_group((1, 3, 6, 1, 4, 1, 9148, 3, 12, 3, 2, 2)).setObjects(('APDD-MIB', 'apDdConnectionFailureTrap'), ('APDD-MIB', 'apDdConnectionFailureClearTrap'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ap_dd_notifications_group = apDDNotificationsGroup.setStatus('current')
if mibBuilder.loadTexts:
apDDNotificationsGroup.setDescription('A collection of traps defined for DD.')
mibBuilder.exportSymbols('APDD-MIB', apDdSessionPeriodActive=apDdSessionPeriodActive, apDdClientTransLTHigh=apDdClientTransLTHigh, apDdAgentNoRouteFoundTotal=apDdAgentNoRouteFoundTotal, apDdAgentMsgReturnCodeClientRecent=apDdAgentMsgReturnCodeClientRecent, apDdSessMissLifeTotal=apDdSessMissLifeTotal, apDDMIBTabularObjects=apDDMIBTabularObjects, apDdHighTransRate=apDdHighTransRate, apDdMsgTypeServerReqRecent=apDdMsgTypeServerReqRecent, apDdUnsubscribePeriodTotal=apDdUnsubscribePeriodTotal, apDDNotifObjects=apDDNotifObjects, apDdLowTransRate=apDdLowTransRate, apDdMsgStatsReturnCodeEntry=apDdMsgStatsReturnCodeEntry, apDdAgentGenSocketsCPHigh=apDdAgentGenSocketsCPHigh, apDdMsgReturnCodeServerTotal=apDdMsgReturnCodeServerTotal, apDdMsgTypeInfoEntry=apDdMsgTypeInfoEntry, apDdAgentMsgTypeClientRespRetransPerMax=apDdAgentMsgTypeClientRespRetransPerMax, apDdAgentMsgReturnCodeServerRecent=apDdAgentMsgReturnCodeServerRecent, apDdSessTerminatedPeriodTotal=apDdSessTerminatedPeriodTotal, apDdAgentMsgStatsReturnCodeTable=apDdAgentMsgStatsReturnCodeTable, apDDMIBGeneralObjects=apDDMIBGeneralObjects, apDdPolicyMissLifeTotal=apDdPolicyMissLifeTotal, apDdMsgTypeServerReqTotal=apDdMsgTypeServerReqTotal, apDDConformance=apDDConformance, apDdAgentInboundConstraintsTotal=apDdAgentInboundConstraintsTotal, apDdAgentMsgTypeLatencyWindow=apDdAgentMsgTypeLatencyWindow, apDdAgentMsgTypeServerRetransTotal=apDdAgentMsgTypeServerRetransTotal, apDdAgentIndex=apDdAgentIndex, apDdSessInitPeriodActive=apDdSessInitPeriodActive, apDdAgentErrorStatusGroup=apDdAgentErrorStatusGroup, apDdPolicyHitPeriodTotal=apDdPolicyHitPeriodTotal, apDdSubscribeLifeHigh=apDdSubscribeLifeHigh, apDdGenConnectsCPTotal=apDdGenConnectsCPTotal, apDdSessInitPeriodTotal=apDdSessInitPeriodTotal, apDdMsgTypeIndex=apDdMsgTypeIndex, apDdAgentMsgTypeServerReqTotal=apDdAgentMsgTypeServerReqTotal, apDdDroppedMsgTotal=apDdDroppedMsgTotal, apDdMsgReturnCodeServerPerMax=apDdMsgReturnCodeServerPerMax, apDdRejectedMsgPerMax=apDdRejectedMsgPerMax, apDdAgentStatsEntry=apDdAgentStatsEntry, apDdAgentGenSocketsCPTotal=apDdAgentGenSocketsCPTotal, apDdAgentStatsGroup=apDdAgentStatsGroup, apDdSessTerminatedLifePerMax=apDdSessTerminatedLifePerMax, apDdMalformedMsgRecent=apDdMalformedMsgRecent, apDdPolicyMissPeriodHigh=apDdPolicyMissPeriodHigh, apDdAgentMsgTypeServerReqPerMax=apDdAgentMsgTypeServerReqPerMax, apDdSessMissPeriodTotal=apDdSessMissPeriodTotal, apDDNotificationObjects=apDDNotificationObjects, apDdGenConnectsCPHigh=apDdGenConnectsCPHigh, apDdGenSocketsLTTotal=apDdGenSocketsLTTotal, apDdAgentMsgTypeClientTimeoutPerMax=apDdAgentMsgTypeClientTimeoutPerMax, apDdAgentMsgTypeClientReqTotal=apDdAgentMsgTypeClientReqTotal, apDdOutboundConstraintsPerMax=apDdOutboundConstraintsPerMax, apDdSessEstablishedLifeHigh=apDdSessEstablishedLifeHigh, apDDModule=apDDModule, apDdSessionLifePerMax=apDdSessionLifePerMax, apDdAgentClientTransCPTotal=apDdAgentClientTransCPTotal, apDdSubscribePeriodTotal=apDdSubscribePeriodTotal, apDdMsgReturnCodeClientTotal=apDdMsgReturnCodeClientTotal, apDdClientTransLTTotal=apDdClientTransLTTotal, apDdMsgTypeServerRespRetransRecent=apDdMsgTypeServerRespRetransRecent, apDdTransportType=apDdTransportType, apDdMsgTypeServerRespRetransTotal=apDdMsgTypeServerRespRetransTotal, apDdAgentGenConnectsLTPerMax=apDdAgentGenConnectsLTPerMax, apDdMsgTypeStatsTable=apDdMsgTypeStatsTable, apDdInterfaceStatsGroup=apDdInterfaceStatsGroup, apDdIntfErrorStatusGroup=apDdIntfErrorStatusGroup, apDdMsgReturnCodeServerRecent=apDdMsgReturnCodeServerRecent, apDdSubscriberLifeTotal=apDdSubscriberLifeTotal, apDdSessTimeoutPeriodTotal=apDdSessTimeoutPeriodTotal, apDdSessInitLifeHigh=apDdSessInitLifeHigh, apDdMsgTypeClientRetransPerMax=apDdMsgTypeClientRetransPerMax, apDdAgentServerTransCPHigh=apDdAgentServerTransCPHigh, apDdMsgTypeServerRetransPerMax=apDdMsgTypeServerRetransPerMax, apDdSessionLifeHigh=apDdSessionLifeHigh, apDdNoRouteFoundRecent=apDdNoRouteFoundRecent, apDdAgentMsgTypeClientRespRetransTotal=apDdAgentMsgTypeClientRespRetransTotal, apDdAgentOutboundConstraintsTotal=apDdAgentOutboundConstraintsTotal, apDDNotifObjectsGroup=apDDNotifObjectsGroup, apDdInboundConstraintsTotal=apDdInboundConstraintsTotal, apDdSessInitPeriodHigh=apDdSessInitPeriodHigh, apDdClientTransCPHigh=apDdClientTransCPHigh, apDdMsgTypeClientThrottledRecent=apDdMsgTypeClientThrottledRecent, apDdMsgTypeClientThrottledPerMax=apDdMsgTypeClientThrottledPerMax, apDdClientTransCPTotal=apDdClientTransCPTotal, apDdGenConnectsLTPerMax=apDdGenConnectsLTPerMax, apDdSessionPeriodTotal=apDdSessionPeriodTotal, apDdSessErrorsLifeTotal=apDdSessErrorsLifeTotal, apDdAgentGenConnectsCPHigh=apDdAgentGenConnectsCPHigh, apDdAgentMsgStatsReturnCodeEntry=apDdAgentMsgStatsReturnCodeEntry, apDdDiameterAgentOriginRealmName=apDdDiameterAgentOriginRealmName, apDdSubscriberMissPeriodTotal=apDdSubscriberMissPeriodTotal, apDdMsgTypeServerRetransTotal=apDdMsgTypeServerRetransTotal, apDdSessTerminatedLifeTotal=apDdSessTerminatedLifeTotal, apDdAgentNoRouteFoundPerMax=apDdAgentNoRouteFoundPerMax, apDdAgentMsgTypeStatsTable=apDdAgentMsgTypeStatsTable, apDdConnectionFailureClearTrap=apDdConnectionFailureClearTrap, apDdDroppedMsgRecent=apDdDroppedMsgRecent, apDdPolicyHitLifeHigh=apDdPolicyHitLifeHigh, apDdServerTransLTHigh=apDdServerTransLTHigh, apDdMsgTypeStatsEntry=apDdMsgTypeStatsEntry, apDdMsgTypeLatencyWindow=apDdMsgTypeLatencyWindow, apDdMsgStatsReturnCodeTable=apDdMsgStatsReturnCodeTable, apDdSessTerminatedPeriodActive=apDdSessTerminatedPeriodActive, apDdGenSocketsCPTotal=apDdGenSocketsCPTotal, apDdSessionPeriodHigh=apDdSessionPeriodHigh, apDdAgentServerTransCPActive=apDdAgentServerTransCPActive, apDdMsgReturnCodeClientRecent=apDdMsgReturnCodeClientRecent, apDdGenConnectsLTTotal=apDdGenConnectsLTTotal, apDdAgentMsgTypeStatsEntry=apDdAgentMsgTypeStatsEntry, apDdInterfaceIndex=apDdInterfaceIndex, apDdMsgTypeClientRetransTotal=apDdMsgTypeClientRetransTotal, apDdAgentGenConnectsLTTotal=apDdAgentGenConnectsLTTotal, apDdSessEstablishedPeriodActive=apDdSessEstablishedPeriodActive, apDdAgentMsgTypeServerRespRetransTotal=apDdAgentMsgTypeServerRespRetransTotal, apDdAgentClientTransLTTotal=apDdAgentClientTransLTTotal, apDdAgentErrorStatusTable=apDdAgentErrorStatusTable, apDdGeneralGroup=apDdGeneralGroup, apDdPolicyHitLifeTotal=apDdPolicyHitLifeTotal, apDdAgentNoRouteFoundRecent=apDdAgentNoRouteFoundRecent, apDdDiameterIPPort=apDdDiameterIPPort, apDdAgentClientTransCPHigh=apDdAgentClientTransCPHigh, apDdMsgTypeInfoTable=apDdMsgTypeInfoTable, apDdServerTransCPTotal=apDdServerTransCPTotal, apDDMIBObjects=apDDMIBObjects, apDDNotificationsGroup=apDDNotificationsGroup, apDdAgentMsgTypeServerRespRetransRecent=apDdAgentMsgTypeServerRespRetransRecent, apDdServerTransLTTotal=apDdServerTransLTTotal, apDdGenSocketsCPActive=apDdGenSocketsCPActive, apDdPolicyMissLifePerMax=apDdPolicyMissLifePerMax, apDdAgentGenSocketsLTPerMax=apDdAgentGenSocketsLTPerMax, apDdRejectedMsgTotal=apDdRejectedMsgTotal, apDdConnectionFailureTrap=apDdConnectionFailureTrap, apDdMsgTypeServerRespRetransPerMax=apDdMsgTypeServerRespRetransPerMax, apDdAgentMalformedMsgTotal=apDdAgentMalformedMsgTotal, apDdMsgTypeClientTimeoutRecent=apDdMsgTypeClientTimeoutRecent, apDdSessEstablishedPeriodTotal=apDdSessEstablishedPeriodTotal, apDdAgentGenSocketsCPActive=apDdAgentGenSocketsCPActive, apDdSubscribePeriodHigh=apDdSubscribePeriodHigh, apDdMsgTypeClientRespRetransTotal=apDdMsgTypeClientRespRetransTotal, apDdPolicyHitLifePerMax=apDdPolicyHitLifePerMax, apDdSubscribeLifeTotal=apDdSubscribeLifeTotal, apDdSessInitLifeTotal=apDdSessInitLifeTotal, apDdMsgTypeClientThrottledTotal=apDdMsgTypeClientThrottledTotal, apDdSubscribeLifePerMax=apDdSubscribeLifePerMax, apDdAgentServerTransCPTotal=apDdAgentServerTransCPTotal, apDdAgentMsgTypeClientRetransPerMax=apDdAgentMsgTypeClientRetransPerMax, apDdAgentMsgTypeStatsGroup=apDdAgentMsgTypeStatsGroup, apDdGenConnectsCPActive=apDdGenConnectsCPActive, apDdSessInitLifePerMax=apDdSessInitLifePerMax, apDdInboundConstraintsPerMax=apDdInboundConstraintsPerMax, apDdDiameterAgentHostName=apDdDiameterAgentHostName, apDdInterfaceStatusReason=apDdInterfaceStatusReason, apDdUnsubscribeLifeTotal=apDdUnsubscribeLifeTotal, apDdMsgStatsReturnCodeGroup=apDdMsgStatsReturnCodeGroup, apDdAgentGenConnectsLTHigh=apDdAgentGenConnectsLTHigh, apDdAgentMsgTypeClientRetransTotal=apDdAgentMsgTypeClientRetransTotal, apDdAgentMsgTypeMaximumLatency=apDdAgentMsgTypeMaximumLatency, apDdAgentMsgStatsReturnCodeGroup=apDdAgentMsgStatsReturnCodeGroup, apDdAgentClientTransLTPerMax=apDdAgentClientTransLTPerMax, apDdMsgTypeStatsGroup=apDdMsgTypeStatsGroup, apDdMsgTypeMaximumLatency=apDdMsgTypeMaximumLatency, apDdAgentDroppedMsgTotal=apDdAgentDroppedMsgTotal, apDdAgentMsgTypeClientThrottledRecent=apDdAgentMsgTypeClientThrottledRecent, apDdAgentMsgTypeClientThrottledPerMax=apDdAgentMsgTypeClientThrottledPerMax, apDdAgentGeneralGroup=apDdAgentGeneralGroup, apDdMsgTypeClientRetransRecent=apDdMsgTypeClientRetransRecent, apDdPolicyMissLifeHigh=apDdPolicyMissLifeHigh, apDDNotificationGroups=apDDNotificationGroups, apDdAgentMsgTypeClientTimeoutTotal=apDdAgentMsgTypeClientTimeoutTotal, apDdAgentMalformedMsgPerMax=apDdAgentMalformedMsgPerMax, apDdSessEstablishedLifeTotal=apDdSessEstablishedLifeTotal, apDdNoRouteFoundPerMax=apDdNoRouteFoundPerMax, apDdInterfaceStatsTable=apDdInterfaceStatsTable, apDdMsgTypeClientReqRecent=apDdMsgTypeClientReqRecent, apDdMalformedMsgTotal=apDdMalformedMsgTotal, apDdUnsubscribePeriodActive=apDdUnsubscribePeriodActive, apDdMsgTypeClientReqPerMax=apDdMsgTypeClientReqPerMax, apDdAgentStatsTable=apDdAgentStatsTable, apDdMsgTypeClientRespRetransPerMax=apDdMsgTypeClientRespRetransPerMax, apDdAgentServerTransLTHigh=apDdAgentServerTransLTHigh, apDdAgentServerTransLTPerMax=apDdAgentServerTransLTPerMax, apDdAgentMsgReturnCodeServerPerMax=apDdAgentMsgReturnCodeServerPerMax, apDdAgentMsgReturnCodeClientTotal=apDdAgentMsgReturnCodeClientTotal, apDdAgentRealmName=apDdAgentRealmName, apDdMsgReturnCodeInfoTable=apDdMsgReturnCodeInfoTable, apDdAgentMsgTypeServerRetransRecent=apDdAgentMsgTypeServerRetransRecent, apDdInterfaceNumber=apDdInterfaceNumber, apDdSessTerminatedPeriodHigh=apDdSessTerminatedPeriodHigh, apDdSessMissLifePerMax=apDdSessMissLifePerMax, apDdPolicyMissPeriodTotal=apDdPolicyMissPeriodTotal, apDdMsgTypeClientRespRetransRecent=apDdMsgTypeClientRespRetransRecent, apDdAgentGenSocketsLTTotal=apDdAgentGenSocketsLTTotal, apDDNotifPrefix=apDDNotifPrefix, apDdErrorStatusGroup=apDdErrorStatusGroup, apDdAgentInboundConstraintsRecent=apDdAgentInboundConstraintsRecent, apDdInterfaceRealmName=apDdInterfaceRealmName, apDdSessionSubscriberGeneralGroup=apDdSessionSubscriberGeneralGroup, apDdSubscriberPeriodHigh=apDdSubscriberPeriodHigh, apDdMsgReturnCodeInfoEntry=apDdMsgReturnCodeInfoEntry, apDdMsgTypeClientTimeoutTotal=apDdMsgTypeClientTimeoutTotal, apDDObjectGroups=apDDObjectGroups, apDdAgentMsgTypeServerReqRecent=apDdAgentMsgTypeServerReqRecent, apDdPolicyMissPeriodActive=apDdPolicyMissPeriodActive, apDdMsgTypeClientReqTotal=apDdMsgTypeClientReqTotal, apDdErrorStatusEntry=apDdErrorStatusEntry, apDdAgentDroppedMsgRecent=apDdAgentDroppedMsgRecent, apDdAgentMsgTypeServerRespRetransPerMax=apDdAgentMsgTypeServerRespRetransPerMax, apDdSubscriberMissLifeTotal=apDdSubscriberMissLifeTotal, apDdErrorStatusTable=apDdErrorStatusTable, apDdMsgReturnCodeClientPerMax=apDdMsgReturnCodeClientPerMax, apDdAgentDroppedMsgPerMax=apDdAgentDroppedMsgPerMax, apDdGenSocketsCPHigh=apDdGenSocketsCPHigh, apDdOutboundConstraintsRecent=apDdOutboundConstraintsRecent, apDdSubscriberLifePerMax=apDdSubscriberLifePerMax, apDdMsgTypeServerReqPerMax=apDdMsgTypeServerReqPerMax, apDdAgentNumber=apDdAgentNumber, apDdAgentServerTransLTTotal=apDdAgentServerTransLTTotal, apDdAgentRejectedMsgPerMax=apDdAgentRejectedMsgPerMax, apDdSessEstablishedLifePerMax=apDdSessEstablishedLifePerMax, apDdAgentMalformedMsgRecent=apDdAgentMalformedMsgRecent, apDdAgentOutboundConstraintsRecent=apDdAgentOutboundConstraintsRecent, apDdAgentMsgTypeClientTimeoutRecent=apDdAgentMsgTypeClientTimeoutRecent, apDdClientTransLTPerMax=apDdClientTransLTPerMax, apDdAgentMsgTypeClientThrottledTotal=apDdAgentMsgTypeClientThrottledTotal, apDdSubscriberLifeHigh=apDdSubscriberLifeHigh, apDdPolicyHitPeriodHigh=apDdPolicyHitPeriodHigh, apDdClientTransCPActive=apDdClientTransCPActive, apDdSessTimeoutLifePerMax=apDdSessTimeoutLifePerMax, apDdMsgTypeMsgName=apDdMsgTypeMsgName, apDdAgentRejectedMsgRecent=apDdAgentRejectedMsgRecent, apDdAgentGenConnectsCPTotal=apDdAgentGenConnectsCPTotal, apDdSessTimeoutLifeTotal=apDdSessTimeoutLifeTotal, apDdAgentInboundConstraintsPerMax=apDdAgentInboundConstraintsPerMax, apDdCurrentTransRate=apDdCurrentTransRate, apDdAgentClientTransCPActive=apDdAgentClientTransCPActive, apDdServerTransLTPerMax=apDdServerTransLTPerMax, apDdMsgTypeClientTimeoutPerMax=apDdMsgTypeClientTimeoutPerMax, apDdMalformedMsgPerMax=apDdMalformedMsgPerMax, apDdSessErrorsPeriodTotal=apDdSessErrorsPeriodTotal, apDdAgentErrorStatusEntry=apDdAgentErrorStatusEntry, apDdSessionLifeTotal=apDdSessionLifeTotal, apDdMsgReturnCodeIndex=apDdMsgReturnCodeIndex, apDdAgentRejectedMsgTotal=apDdAgentRejectedMsgTotal, apDdNoRouteFoundTotal=apDdNoRouteFoundTotal, apDdAgentMsgTypeClientReqPerMax=apDdAgentMsgTypeClientReqPerMax, apDdInboundConstraintsRecent=apDdInboundConstraintsRecent, apDdMsgTypeAverageLatency=apDdMsgTypeAverageLatency, apDdMsgReturnCodeName=apDdMsgReturnCodeName, apDdAgentMsgTypeServerRetransPerMax=apDdAgentMsgTypeServerRetransPerMax, apDDNotifications=apDDNotifications, apDdServerTransCPActive=apDdServerTransCPActive, apDdSessTerminatedLifeHigh=apDdSessTerminatedLifeHigh, apDdSessEstablishedPeriodHigh=apDdSessEstablishedPeriodHigh, apDdDroppedMsgPerMax=apDdDroppedMsgPerMax)
mibBuilder.exportSymbols('APDD-MIB', apDdAgentMsgReturnCodeServerTotal=apDdAgentMsgReturnCodeServerTotal, apDdGenSocketsLTPerMax=apDdGenSocketsLTPerMax, apDdAgentMsgReturnCodeClientPerMax=apDdAgentMsgReturnCodeClientPerMax, apDdAgentGenSocketsLTHigh=apDdAgentGenSocketsLTHigh, apDdAgentMsgTypeAverageLatency=apDdAgentMsgTypeAverageLatency, apDdGenConnectsLTHigh=apDdGenConnectsLTHigh, apDdUnsubscribeLifePerMax=apDdUnsubscribeLifePerMax, apDdServerTransCPHigh=apDdServerTransCPHigh, apDdInterfaceStatsEntry=apDdInterfaceStatsEntry, apDdAgentGenConnectsCPActive=apDdAgentGenConnectsCPActive, apDdAgentMsgTypeClientRetransRecent=apDdAgentMsgTypeClientRetransRecent, apDdAgentMsgTypeClientRespRetransRecent=apDdAgentMsgTypeClientRespRetransRecent, apDdDiameterAgentOriginHostName=apDdDiameterAgentOriginHostName, apDdAgentOutboundConstraintsPerMax=apDdAgentOutboundConstraintsPerMax, PYSNMP_MODULE_ID=apDDModule, apDdAgentClientTransLTHigh=apDdAgentClientTransLTHigh, apDdSubscriberMissLifePerMax=apDdSubscriberMissLifePerMax, apDdSubscribePeriodActive=apDdSubscribePeriodActive, apDdSubscriberPeriodActive=apDdSubscriberPeriodActive, apDdRejectedMsgRecent=apDdRejectedMsgRecent, apDdSessErrorsLifePerMax=apDdSessErrorsLifePerMax, apDdUnsubscribeLifeHigh=apDdUnsubscribeLifeHigh, apDdMsgTypeServerRetransRecent=apDdMsgTypeServerRetransRecent, apDdUnsubscribePeriodHigh=apDdUnsubscribePeriodHigh, apDdAgentMsgTypeClientReqRecent=apDdAgentMsgTypeClientReqRecent, apDdSubscriberPeriodTotal=apDdSubscriberPeriodTotal, apDdGenSocketsLTHigh=apDdGenSocketsLTHigh, apDdOutboundConstraintsTotal=apDdOutboundConstraintsTotal, apDdPolicyHitPeriodActive=apDdPolicyHitPeriodActive) |
class FpolicyServerStatus(basestring):
"""
Status
Possible values:
<ul>
<li> "connected" - Server Connected,
<li> "disconnected" - Server Disconnected,
<li> "connecting" - Connecting Server,
<li> "disconnecting" - Disconnecting Server
</ul>
"""
@staticmethod
def get_api_name():
return "fpolicy-server-status"
| class Fpolicyserverstatus(basestring):
"""
Status
Possible values:
<ul>
<li> "connected" - Server Connected,
<li> "disconnected" - Server Disconnected,
<li> "connecting" - Connecting Server,
<li> "disconnecting" - Disconnecting Server
</ul>
"""
@staticmethod
def get_api_name():
return 'fpolicy-server-status' |
# Common configuration options
# Annotation categories for COCO output (TODO: move to different file)
COCO_CATEGORIES = [
{
"id": 0,
"name": "Paragraph",
"supercategory": None
},
{
"id": 1,
"name": "Title",
"supercategory": None
},
{
"id": 2,
"name": "ListItem",
"supercategory": None
},
{
"id": 3,
"name": "Table",
"supercategory": None
},
{
"id": 4,
"name": "Figure",
"supercategory": None
},
{
"id": 5,
"name": "Meta",
"supercategory": None
},
{
"id": 6,
"name": "Reference",
"supercategory": None
},
{
"id": 7,
"name": "Footnote",
"supercategory": None
},
{
"id": 8,
"name": "TableOfContents",
"supercategory": None
},
{
"id": 9,
"name": "Caption",
"supercategory": None
},
{
"id": 10,
"name": "Formula",
"supercategory": None
},
{
"id": 11,
"name": "Code",
"supercategory": None
},
{
"id": 12,
"name": "Other",
"supercategory": None
},
]
# Mapping from structure types to annotation labels
STRUCT_TYPE_TO_LABEL_MAP = {
'P': 'Paragraph',
'LI': 'ListItem',
'H1': 'Title',
'H2': 'Title',
'H3': 'Title',
'H4': 'Title',
'H5': 'Title',
'H6': 'Title',
'TOC': 'TableOfContents',
'TOCI': 'TableOfContents', # TocItem
'Table': 'Table',
'Figure': 'Figure',
'Footnote': 'Footnote',
'Note': 'Footnote',
}
# Colors for annotations
LABEL_TO_HEX_COLOR_MAP = {
'Paragraph': '#24DD24',
'Title': '#6FDECD',
'ListItem': '#D0EC37',
'Table' : '#EC3737',
'TableOfContents': '#DDBD24',
'TocItem': '#CCAD14',
'Figure': '#375BEC',
'Reference': '#EC9937',
'Footnote': '#777777',
'Note': '#777777',
'Caption': '#E186C0',
}
LABEL_TO_COLOR_MAP = {
k: (int(v[1:3],16)/255, int(v[3:5],16)/255, int(v[5:7],16)/255)
for k, v in LABEL_TO_HEX_COLOR_MAP.items()
}
LABEL_FONT_NAME = 'Courier'
LABEL_FONT_SIZE = 6
| coco_categories = [{'id': 0, 'name': 'Paragraph', 'supercategory': None}, {'id': 1, 'name': 'Title', 'supercategory': None}, {'id': 2, 'name': 'ListItem', 'supercategory': None}, {'id': 3, 'name': 'Table', 'supercategory': None}, {'id': 4, 'name': 'Figure', 'supercategory': None}, {'id': 5, 'name': 'Meta', 'supercategory': None}, {'id': 6, 'name': 'Reference', 'supercategory': None}, {'id': 7, 'name': 'Footnote', 'supercategory': None}, {'id': 8, 'name': 'TableOfContents', 'supercategory': None}, {'id': 9, 'name': 'Caption', 'supercategory': None}, {'id': 10, 'name': 'Formula', 'supercategory': None}, {'id': 11, 'name': 'Code', 'supercategory': None}, {'id': 12, 'name': 'Other', 'supercategory': None}]
struct_type_to_label_map = {'P': 'Paragraph', 'LI': 'ListItem', 'H1': 'Title', 'H2': 'Title', 'H3': 'Title', 'H4': 'Title', 'H5': 'Title', 'H6': 'Title', 'TOC': 'TableOfContents', 'TOCI': 'TableOfContents', 'Table': 'Table', 'Figure': 'Figure', 'Footnote': 'Footnote', 'Note': 'Footnote'}
label_to_hex_color_map = {'Paragraph': '#24DD24', 'Title': '#6FDECD', 'ListItem': '#D0EC37', 'Table': '#EC3737', 'TableOfContents': '#DDBD24', 'TocItem': '#CCAD14', 'Figure': '#375BEC', 'Reference': '#EC9937', 'Footnote': '#777777', 'Note': '#777777', 'Caption': '#E186C0'}
label_to_color_map = {k: (int(v[1:3], 16) / 255, int(v[3:5], 16) / 255, int(v[5:7], 16) / 255) for (k, v) in LABEL_TO_HEX_COLOR_MAP.items()}
label_font_name = 'Courier'
label_font_size = 6 |
'''
Example-related classes.
@author: anze.vavpetic@ijs.si
'''
class Example:
'''
Represents an example with its score, label, id and annotations.
'''
ClassLabeled = 'class'
Ranked = 'ranked'
def __init__(self, id, label, score, annotations=[], weights={}):
self.id = id
self.label = label
self.score = score
if not type(score) in [str]:
self.target_type = Example.Ranked
else:
self.target_type = Example.ClassLabeled
self.annotations = annotations
self.weights = weights
def __str__(self):
if self.target_type == Example.Ranked:
return '<id=%d, score=%.5f, label=%s>' % (self.id,
self.score,
self.label)
else:
return '<id=%d, class=%s, label=%s>' % (self.id,
self.score,
self.label)
| """
Example-related classes.
@author: anze.vavpetic@ijs.si
"""
class Example:
"""
Represents an example with its score, label, id and annotations.
"""
class_labeled = 'class'
ranked = 'ranked'
def __init__(self, id, label, score, annotations=[], weights={}):
self.id = id
self.label = label
self.score = score
if not type(score) in [str]:
self.target_type = Example.Ranked
else:
self.target_type = Example.ClassLabeled
self.annotations = annotations
self.weights = weights
def __str__(self):
if self.target_type == Example.Ranked:
return '<id=%d, score=%.5f, label=%s>' % (self.id, self.score, self.label)
else:
return '<id=%d, class=%s, label=%s>' % (self.id, self.score, self.label) |
"""
Reach a Number
You are standing at position 0 on an infinite number line. There is a goal at position target.
On each move, you can either go left or right. During the n-th move (starting from 1), you take n steps.
Return the minimum number of steps required to reach the destination.
Example 1:
Input: target = 3
Output: 2
Explanation:
On the first move we step from 0 to 1.
On the second step we step from 1 to 3.
Example 2:
Input: target = 2
Output: 3
Explanation:
On the first move we step from 0 to 1.
On the second move we step from 1 to -1.
On the third move we step from -1 to 2.
Note:
target will be a non-zero integer in the range [-10^9, 10^9].
"""
# approach: formula: (n^2 + n) / 2
# runtime: O(n^1/2)
# memory: O(1)
class Solution:
def reachNumber(self, target: int) -> int:
# initialize values
steps = 0
target = abs(target)
total = 0
# increment step size and total until total >= target
while total < target:
steps += 1
total += steps
# if difference is even or non-existent: target can be reached in steps
if (total - target) % 2 == 0:
return steps
# difference is odd, but steps are even: 1 extra step to adjust
if steps % 2 == 0:
return steps + 1
# difference is odd, and steps are odd: 2 extra steps to adjust
return steps + 2
| """
Reach a Number
You are standing at position 0 on an infinite number line. There is a goal at position target.
On each move, you can either go left or right. During the n-th move (starting from 1), you take n steps.
Return the minimum number of steps required to reach the destination.
Example 1:
Input: target = 3
Output: 2
Explanation:
On the first move we step from 0 to 1.
On the second step we step from 1 to 3.
Example 2:
Input: target = 2
Output: 3
Explanation:
On the first move we step from 0 to 1.
On the second move we step from 1 to -1.
On the third move we step from -1 to 2.
Note:
target will be a non-zero integer in the range [-10^9, 10^9].
"""
class Solution:
def reach_number(self, target: int) -> int:
steps = 0
target = abs(target)
total = 0
while total < target:
steps += 1
total += steps
if (total - target) % 2 == 0:
return steps
if steps % 2 == 0:
return steps + 1
return steps + 2 |
class SparseVector:
def __init__(self, nums: List[int]):
# self.data = {}
# for idx, val in enumerate(nums):
# if val > 0:
# self.data[idx]=val
self.data = []
for idx, val in enumerate(nums):
if val > 0:
self.data.append((idx,val))
# Return the dotProduct of two sparse vectors
def dotProduct(self, vec: 'SparseVector') -> int:
# ans = 0
# for idx, val in self.data:
# if idx in vec.data:
# ans += self.data[idx]*vec.data[idx]
# return ans
ans = 0
i1,i2=0,0
while i1<len(self.data) and i2<len(vec.data):
if self.data[i1][0]==vec.data[i2][0]:
ans += self.data[i1][1] * vec.data[i2][1]
i1+=1
i2+=1
elif self.data[i1][0]<vec.data[i2][0]:
i1+=1
else:
i2+=1
return ans
# Your SparseVector object will be instantiated and called as such:
# v1 = SparseVector(nums1)
# v2 = SparseVector(nums2)
# ans = v1.dotProduct(v2) | class Sparsevector:
def __init__(self, nums: List[int]):
self.data = []
for (idx, val) in enumerate(nums):
if val > 0:
self.data.append((idx, val))
def dot_product(self, vec: 'SparseVector') -> int:
ans = 0
(i1, i2) = (0, 0)
while i1 < len(self.data) and i2 < len(vec.data):
if self.data[i1][0] == vec.data[i2][0]:
ans += self.data[i1][1] * vec.data[i2][1]
i1 += 1
i2 += 1
elif self.data[i1][0] < vec.data[i2][0]:
i1 += 1
else:
i2 += 1
return ans |
class Colors():
"""
Colors which boil down to RGB tuples
"""
Black = (0, 0, 0)
Medium_Purple = (106, 90, 205)
Neon_Cyan = (8, 247, 254)
Neon_Green = (57, 255, 20)
Neon_Magenta = (255, 29, 206)
Neon_Orange = (252, 76, 2)
Neon_Yellow = (255, 239, 0)
Red = (255, 0, 0)
White = (255, 255, 255) | class Colors:
"""
Colors which boil down to RGB tuples
"""
black = (0, 0, 0)
medium__purple = (106, 90, 205)
neon__cyan = (8, 247, 254)
neon__green = (57, 255, 20)
neon__magenta = (255, 29, 206)
neon__orange = (252, 76, 2)
neon__yellow = (255, 239, 0)
red = (255, 0, 0)
white = (255, 255, 255) |
__author__ = 'kemi'
# Plugin globals
SERVICE_COMMANDS = 'service.commands.'
PACKAGE_COMMANDS = 'package.commands'
INSTALL = 'install '
REMOVE = 'remove '
# Install commands
APT_GET = 'sudo apt-get -y '
APT_GET_UPDATE = 'sudo apt-get update'
DPKG = 'sudo dpkg -i '
YUM = 'sudo yum -y '
APT_SOURCELIST_DIR = '/etc/apt/sources.list.d/'
YUM_REPOS_DIR = '/etc/yum.repos.d/'
# Services
START_SERVICE_COMMAND = 'sudo service {0} start '
STOP_SERVICE_COMMAND = 'sudo service {0} stop '
RESTART_SERVICE_COMMAND = 'sudo service {0} restart '
| __author__ = 'kemi'
service_commands = 'service.commands.'
package_commands = 'package.commands'
install = 'install '
remove = 'remove '
apt_get = 'sudo apt-get -y '
apt_get_update = 'sudo apt-get update'
dpkg = 'sudo dpkg -i '
yum = 'sudo yum -y '
apt_sourcelist_dir = '/etc/apt/sources.list.d/'
yum_repos_dir = '/etc/yum.repos.d/'
start_service_command = 'sudo service {0} start '
stop_service_command = 'sudo service {0} stop '
restart_service_command = 'sudo service {0} restart ' |
def is_palindrome(text) :
""" Takes in a string and determines if palindrome. Returns true or false. """
if len(text) == 1 :
return True
elif len(text) == 2 and text[0] == text[-1] :
return True
elif text[0] != text[-1] :
return False
elif text[0] == text[-1] :
is_palindrome(text[1:-1])
return True
# Main Program:
message = input("Give me a message: ")
if is_palindrome(message) == True:
print('"{}" is a palindrome.'.format(message))
elif is_palindrome(message) == False:
print('"{}" is not a palindrome.'.format(message)) | def is_palindrome(text):
""" Takes in a string and determines if palindrome. Returns true or false. """
if len(text) == 1:
return True
elif len(text) == 2 and text[0] == text[-1]:
return True
elif text[0] != text[-1]:
return False
elif text[0] == text[-1]:
is_palindrome(text[1:-1])
return True
message = input('Give me a message: ')
if is_palindrome(message) == True:
print('"{}" is a palindrome.'.format(message))
elif is_palindrome(message) == False:
print('"{}" is not a palindrome.'.format(message)) |
'''
Parse curry (lisp) code.
'''
def remove_comment(line):
if ';' not in line:
return line
else:
return line[:line.find(';')]
def typify(item):
'''
Error-free conversion of an abitrary AST element into typed versions
i.e. ['X', '1'] becomes ['X', 1] where the second element is converted str->int
'''
try:
return int(item)
except ValueError:
try:
return float(item)
except ValueError:
return item
except TypeError:
return [typify(subitem) for subitem in item]
def parse(item):
'''
item is the raw text of a q-lisp file
Comments are removed, and then the parentheses are parsed, i.e.
(if (= c0 1) (X 0) (X 1))
becomes the python list:
['if', ['=', 'c0', '1'], ['X', '0'], ['X', '1']]
'''
cleaned = (remove_comment(line) for line in item.split('\n'))
item = '\n'.join(line for line in cleaned if line != '') # Strip comments
stack = []
depth = 0
inner = ''
def add(item):
current = stack
for _ in range(depth):
current = current[-1]
if isinstance(item, str):
for subitem in item.split():
current.append(subitem)
else:
current.append(item)
for character in item.strip():
if character == '(':
if inner.strip() != '':
add(inner.strip())
inner = ''
add([])
depth += 1
elif character == ')':
add(inner.strip())
depth -= 1
inner = ''
else:
inner += character
return stack
| """
Parse curry (lisp) code.
"""
def remove_comment(line):
if ';' not in line:
return line
else:
return line[:line.find(';')]
def typify(item):
"""
Error-free conversion of an abitrary AST element into typed versions
i.e. ['X', '1'] becomes ['X', 1] where the second element is converted str->int
"""
try:
return int(item)
except ValueError:
try:
return float(item)
except ValueError:
return item
except TypeError:
return [typify(subitem) for subitem in item]
def parse(item):
"""
item is the raw text of a q-lisp file
Comments are removed, and then the parentheses are parsed, i.e.
(if (= c0 1) (X 0) (X 1))
becomes the python list:
['if', ['=', 'c0', '1'], ['X', '0'], ['X', '1']]
"""
cleaned = (remove_comment(line) for line in item.split('\n'))
item = '\n'.join((line for line in cleaned if line != ''))
stack = []
depth = 0
inner = ''
def add(item):
current = stack
for _ in range(depth):
current = current[-1]
if isinstance(item, str):
for subitem in item.split():
current.append(subitem)
else:
current.append(item)
for character in item.strip():
if character == '(':
if inner.strip() != '':
add(inner.strip())
inner = ''
add([])
depth += 1
elif character == ')':
add(inner.strip())
depth -= 1
inner = ''
else:
inner += character
return stack |
#!/usr/local/bin/python
class ParsingExpression(object):
def __repr__(self):
return self.__str__()
def __or__(self,right):
return Ore(self, pe(right))
def __and__(self,right):
return seq(self,pe(right))
def __xor__(self,right):
return seq(self,lfold("", pe(right)))
def __rand__(self,left):
return seq(pe(left), self)
def __add__(self,right):
return seq(Many1(self),pe(right))
def __mul__(self,right):
return seq(Many(self),pe(right))
def __truediv__ (self, right):
return Ore(self, pe(right))
def __invert__(self):
return Not(self)
def __neq__(self):
return Not(self)
def __pos__(self):
return And(self)
def setg(self, peg):
if hasattr(self, 'inner'):
self.inner.setg(peg)
if hasattr(self, 'left'):
self.left.setg(peg)
self.right.setg(peg)
class Empty(ParsingExpression):
def __str__(self):
return "''"
EMPTY = Empty()
class Char(ParsingExpression):
__slots__ = ['a']
def __init__(self, a):
self.a = a
def __str__(self):
return "'" + quote_str(self.a) + "'"
class Range(ParsingExpression):
__slots__ = ['chars', 'ranges']
def __init__(self, *ss):
chars = []
ranges = []
for s in ss :
if len(s) == 3 and s[1] is '-':
ranges.append((s[0], s[2]))
else:
for c in s:
chars.append(c)
self.chars = tuple(chars)
self.ranges = tuple(ranges)
def __str__(self):
l = tuple(map(lambda x: quote_str(x[0], ']')+'-'+quote_str(x[1], ']'), self.ranges))
return "[" + ''.join(l) + quote_str(self.chars, ']') + "]"
class Any(ParsingExpression):
def __str__(self):
return '.'
ANY = Any()
class Ref(ParsingExpression):
__slots__ = ['peg', 'name']
def __init__(self, name, peg = None):
self.name = name
self.peg = peg
def __str__(self):
return str(self.name)
def setg(self, peg):
self.peg = peg
def isNonTerminal(self):
return hasattr(self.peg, self.name)
def deref(self):
return getattr(self.peg, self.name).inner
def prop(self):
return getattr(self.peg, self.name)
def getmemo(self,prefix):
return self.peg.getmemo(prefix+self.name)
def setmemo(self,prefix,value):
return self.peg.setmemo(prefix+self.name,value)
class Seq(ParsingExpression):
__slots__ = ['left', 'right']
def __init__(self, left, right):
self.left = pe(left)
self.right = pe(right)
def __str__(self):
return quote_pe(self.left, inSeq) + ' ' + quote_pe(self.right, inSeq)
def flatten(self, ls):
if isinstance(self.left, Seq):
self.left.flatten(ls)
else:
ls.append(self.left)
if isinstance(self.right, Seq):
self.right.flatten(ls)
else:
ls.append(self.right)
return ls
class Ore(ParsingExpression):
__slots__ = ['left', 'right']
def __init__(self, left, right):
self.left = pe(left)
self.right = pe(right)
def __str__(self):
if self.right == EMPTY:
return quote_pe(self.left, inUnary) + '?'
return str(self.left) + ' / ' + str(self.right)
def flatten(self, ls):
if isinstance(self.left, Ore):
self.left.flatten(ls)
else:
ls.append(self.left)
if isinstance(self.right, Ore):
self.right.flatten(ls)
else:
ls.append(self.right)
return ls
class Alt(ParsingExpression):
__slots__ = ['left', 'right']
def __init__(self, left, right):
self.left = pe(left)
self.right = pe(right)
def __str__(self):
return str(self.left) + ' | ' + str(self.right)
def flatten(self, ls):
if isinstance(self.left, Alt):
self.left.flatten(ls)
else:
ls.append(self.left)
if isinstance(self.right, Alt):
self.right.flatten(ls)
else:
ls.append(self.right)
return ls
class And(ParsingExpression):
__slots__ = ['inner']
def __init__(self, inner):
self.inner = pe(inner)
def __str__(self):
return '&' + quote_pe(self.inner, inUnary)
class Not(ParsingExpression):
__slots__ = ['inner']
def __init__(self, inner):
self.inner = pe(inner)
def __str__(self):
return '!' + quote_pe(self.inner, inUnary)
class Many(ParsingExpression):
__slots__ = ['inner']
def __init__(self, inner):
self.inner = pe(inner)
def __str__(self):
return quote_pe(self.inner, inUnary) + '*'
class Many1(ParsingExpression):
__slots__ = ['inner']
def __init__(self, inner):
self.inner = pe(inner)
def __str__(self):
return quote_pe(self.inner, inUnary) + '+'
def quote_pe(e, f): return '(' + str(e) + ')' if f(e) else str(e)
def inSeq(e): return isinstance(e, Ore) or isinstance(e, Alt)
def inUnary(e): return (isinstance(e, Ore) and e.right != EMPTY) or isinstance(e, Seq) or isinstance(e, Alt)
def quote_str(e, esc = "'"):
sb = []
for c in e:
if c == '\n' : sb.append(r'\n')
elif c == '\t' : sb.append(r'\t')
elif c == '\\' : sb.append(r'\\')
elif c == '\r' : sb.append(r'\r')
elif c in esc : sb.append('\\' + c)
else: sb.append(c)
return "".join(sb)
def pe(x):
if x == 0 : return EMPTY
if isinstance(x, str):
if len(x) == 0:
return EMPTY
return Char(x)
return x
def ref(name):
if name.find('/') != -1:
return lor(list(map(ref, name.split('/'))))
if name.find(' ') != -1:
return lseq(list(map(ref, name.split(' '))))
if name.startswith('$'):
return LinkAs("", Ref(name[1:]))
return Ref(name)
def seq(x,y):
if isinstance(y, Empty): return x
return Seq(x, y)
def lseq(ls):
if len(ls) > 1:
return seq(ls[0], lseq(ls[1:]))
if len(ls) == 1: return ls[0]
return EMPTY
def lor(ls):
if len(ls) > 1:
return Ore(ls[0], lor(ls[1:]))
if len(ls) == 1: return ls[0]
return EMPTY
def lfold(ltag,e):
if isinstance(e, Many) and isinstance(e.inner, TreeAs):
return Many(lfold(ltag, e.inner))
if isinstance(e, Many1) and isinstance(e.inner, TreeAs):
return Many1(lfold(ltag, e.inner))
if isinstance(e, Ore):
return Ore(lfold(ltag, e.left), lfold(ltag, e.right))
if isinstance(e, TreeAs):
return FoldAs(ltag, e.tag, pe(e.inner))
return e
## Tree Construction
class TreeAs(ParsingExpression):
__slots__ = ['tag', 'inner']
def __init__(self, tag, inner):
self.tag = tag
self.inner = pe(inner)
def __str__(self):
return self.tag + '{ ' + str(self.inner) + ' }'
class LinkAs(ParsingExpression):
__slots__ = ['tag', 'inner']
def __init__(self, tag, inner=None):
self.tag = tag
self.inner = pe(inner)
def __str__(self):
if self.tag == '':
return '$' + quote_pe(self.inner, inUnary)
return '(' + self.tag + '=>' + str(self.inner) + ')'
def __le__(self, right):
return LinkAs(self.tag, right)
def __ge__(self, right):
return LinkAs(self.tag, right)
def __mod__(self, right):
return ref(right)
def __xor__(self,right):
return lfold(self.tag, pe(right))
N = LinkAs("")
class FoldAs(ParsingExpression):
__slots__ = ['ltag', 'tag', 'inner']
def __init__(self, ltag, tag, inner):
self.inner = pe(inner)
self.ltag = ltag
self.tag = tag
def __str__(self):
return self.ltag + '^' + self.tag +'{ ' + str(self.inner) + ' }'
class Detree(ParsingExpression):
__slots__ = ['inner']
def __init__(self, inner):
self.inner = pe(inner)
def __str__(self):
return '@unit(' + str(self.inner) + ')'
'''
@if(Bool)
@symbol(Indent)
@match(Indent)
@exists(Indent, 'hoge')
'''
class Meta(ParsingExpression):
__slots__ = ['tag', 'inner', 'opt']
def __init__(self, tag, inner, opt = None):
self.tag = tag
self.inner = pe(inner)
self.opt = opt
def __str__(self):
arg = ', ' + repr(self.opt) if self.opt != None else ''
return self.tag + '(' + str(self.inner) + arg + ')'
'''
class ParserContext:
__slots__ = ['inputs', 'pos', 'headpos', 'ast']
def __init__(self, inputs, pos = 0):
self.inputs = inputs
self.pos = pos
self.headpos = pos
self.ast = None
'''
# Rule
class Rule(object):
def __init__(self, name, inner):
self.name = name
self.inner = pe(inner)
self.checked = False
def __str__(self):
return str(self.inner)
def isConsumed(self):
if not hasattr(self, 'nonnull'):
self.nonnull = isAlwaysConsumed(self.inner)
return self.nonnull
def treeState(self):
if not hasattr(self, 'ts'):
self.ts = treeState(self.inner)
return self.ts
def checkRule(self):
if not self.checked:
s0 = str(self.inner)
if isRec(self.inner, self.name, {}):
checkRec(self.inner, self.name, {})
ts = treeState(self.inner)
ts = treeCheck(self.inner, ts)
s1 = str(self.inner)
if s0 != s1:
print(self.name, s0, s1)
## Grammar
class PEG(object):
def __init__(self, ns = None):
self.ns77 = ns
self.memo77 = {}
self.example77 = []
def __getitem__(self, item):
return getattr(self, item, None)
def __setattr__(self, key, value):
if isinstance(value, ParsingExpression):
value.setg(self)
if not isinstance(value, Rule):
value = Rule(key, value)
super().__setattr__(key, value)
print(key, '=', value)
if not hasattr(self, "start"):
setattr(self, "start", value)
else:
super().__setattr__(key, value)
def ns(self): return self.ns77
def hasmemo(self, key): return key in self.memo77
def getmemo(self, key): return self.memo77[key] if key in self.memo77 else None
def setmemo(self, key, value): self.memo77[key] = value
def example(self, prod, input, output = None):
for name in prod.split(','):
self.example77.append((name, input, output))
def testAll(self, combinator):
p = {}
test = 0
ok = 0
for testcase in self.example77:
name, input, output = testcase
if not name in p: p[name] = combinator(self, name)
res = p[name](input)
t = str(res).replace(" b'", " '")
if output == None:
print(name, input, '=>', t)
else:
test += 1
if t == output:
print('OK', name, input)
ok += 1
else:
print('NG', name, input, output, '!=', t)
if test > 0:
print('OK', ok, 'FAIL', test - ok, ok / test * 100.0, '%')
## Properties
def match(*ctags):
def _match(func):
name = ctags[-1]
for ctag in ctags[:-1]:
setattr(ctag, name, func)
return func
return _match
def isRec(pe: ParsingExpression, name: str, visited : dict) -> bool:
if isinstance(pe, Ref):
if pe.name == name: return True
if not pe.name in visited:
visited[pe.name] = True
return isRec(pe.deref(), name, visited)
if hasattr(pe, 'inner'):
return isRec(pe.inner, name, visited)
if hasattr(pe, 'left'):
res = isRec(pe.left, name, visited)
return res if res else isRec(pe.right, name, visited)
return False
def checkRec(pe: ParsingExpression, name: str, visited : dict) -> bool:
if hasattr(pe, 'left'):
if isinstance(pe, Seq):
return checkRec(pe.left, name, visited) and checkRec(pe.right, name, visited)
else: #Ore, Alt
c0 = checkRec(pe.left, name, visited)
c1 = checkRec(pe.right, name, visited)
return c0 or c1
if hasattr(pe, 'inner'):
rec = checkRec(pe.inner, name, visited)
return True if isinstance(pe, Not) or isinstance(pe, Many) or isinstance(pe, And) else rec
if isinstance(pe, Ref):
if pe.name == name:
print("left recursion")
if not pe.name in visited:
visited[pe.name] = True
checkRec(pe.deref(), name, visited)
return not pe.prop().isConsumed()
return isinstance(pe, Empty) # False if (Char,Range,Any)
def isAlwaysConsumed(pe: ParsingExpression):
if not hasattr(pe, 'cc'):
@match(Char, Any, Range, 'cc')
def consumed(pe): return True
@match(Many, Not, And, Empty, 'cc')
def consumed(pe): return False
@match(Many1, LinkAs, TreeAs, FoldAs, Detree, Meta, 'cc')
def unary(pe):
return isAlwaysConsumed(pe.inner)
@match(Seq, 'cc')
def seq(pe):
if not isAlwaysConsumed(pe.left): return False
return isAlwaysConsumed(pe.right)
@match(Ore, Alt, 'cc')
def ore(pe):
return isAlwaysConsumed(pe.left) and isAlwaysConsumed(pe.right)
@match(Ref, 'cc')
def memo(pe: Ref):
if not pe.isNonTerminal():
return True
key = 'null' + pe.name
memoed = pe.getmemo('null')
if memoed == None:
pe.setmemo('null', True)
memoed = isAlwaysConsumed(pe.deref())
pe.setmemo('null', memoed)
return memoed
return pe.cc()
## TreeState
TUnit = 0
TTree = 1
TMut = 2
TFold = 3
def treeState(pe):
if not hasattr(pe, 'ts'):
@match(Char, Any, Range, Not, Detree, 'ts')
def stateUnit(pe):
return TUnit
@match(TreeAs, 'ts')
def stateTree(pe):
return TTree
@match(LinkAs, 'ts')
def stateMut(pe):
return TMut
@match(FoldAs, 'ts')
def stateFold(pe):
return TFold
@match(Seq, 'ts')
def stateSeq(pe):
ts0 = treeState(pe.left)
return ts0 if ts0 != TUnit else treeState(pe.right)
@match(Ore, Alt, 'ts')
def stateAlt(pe):
ts0 = treeState(pe.left)
if ts0 != TUnit: return ts0
ts1 = treeState(pe.right)
return TMut if ts1 == TTree else ts1
@match(Many, Many1, And, 'ts')
def stateAlt(pe):
ts0 = treeState(pe.inner)
return TMut if ts0 == TTree else ts0
@match(Ref, 'ts')
def memo(pe: Ref):
if not pe.isNonTerminal(): return TUnit
memoed = pe.getmemo('ts')
if memoed == None:
pe.setmemo('ts', TUnit)
memoed = treeState(pe.deref())
pe.setmemo('ts', memoed)
return memoed
return pe.ts()
def treeCheck(pe, ts):
if not hasattr(pe, 'tc'):
@match(ParsingExpression, 'tc')
def checkEmpty(pe, ts): return pe
@match(TreeAs, 'tc')
def checkTree(pe, ts):
if ts == TUnit:
return treeCheck(pe.inner, TUnit)
if ts == TTree:
pe.inner = treeCheck(pe.inner, TMut)
return pe
if ts == TMut:
pe.inner = treeCheck(pe.inner, TMut)
return LinkAs('', pe)
if ts == TFold:
pe.inner = treeCheck(pe.inner, TMut)
return FoldAs('', pe.tag, pe.inner)
@match(LinkAs, 'tc')
def checkLink(pe, ts):
if ts == TUnit or ts == TFold:
return treeCheck(pe.inner, TUnit)
if ts == TTree:
return treeCheck(pe.inner, TTree)
if ts == TMut:
ts0 = treeState(pe.inner)
if ts0 == TUnit or ts0 == TFold: pe.inner = TreeAs('', treeCheck(pe.inner, TUnit))
if ts0 == TTree: pe.inner = treeCheck(pe.inner, TTree)
if ts0 == TMut: pe.inner = TreeAs('', treeCheck(pe.inner, TMut))
return pe
@match(FoldAs, 'tc')
def checkFold(pe, ts):
if ts == TUnit:
return treeCheck(pe.inner, TUnit)
if ts == TTree:
pe.inner = treeCheck(pe.inner, TMut)
return TreeAs(pe.tag, pe.inner)
if ts == TMut:
pe.inner = treeCheck(pe.inner, TMut)
return LinkAs(pe.ltag, pe.inner)
if ts == TFold:
pe.inner = treeCheck(pe.inner, TMut)
return pe
@match(Seq, 'tc')
def checkSeq(pe, ts):
if ts == TUnit or ts == TMut or ts == TFold:
pe.left = treeCheck(pe.left, ts)
pe.right = treeCheck(pe.right, ts)
return pe
ts0 = treeState(pe.left)
if ts0 == TUnit:
pe.left = treeCheck(pe.left, TUnit)
pe.right = treeCheck(pe.right, ts)
return pe
if ts0 == TTree:
pe.left = treeCheck(pe.left, TTree)
pe.right = treeCheck(pe.right, TFold)
return pe
@match(Ore, Alt, 'tc')
def checkAlt(pe, ts):
pe.left = treeCheck(pe.left, ts)
pe.right = treeCheck(pe.right, ts)
return pe
@match(Many, Many1, 'tc')
def checkMany(pe, ts):
if ts == TUnit:
pe.inner = treeCheck(pe.inner, TUnit)
return pe
if ts == TTree:
pe.inner = treeCheck(pe.inner, TUnit)
return TreeAs('', pe)
if ts == TMut:
ts0 = treeState(pe.inner)
if ts0 == TUnit or ts0 == TFold: pe.inner = treeCheck(pe.inner, TUnit)
if ts0 == TTree or ts0 == TMut: pe.inner = treeCheck(pe.inner, TMut)
return pe
if ts == TFold:
pe.inner = treeCheck(pe.inner, TFold)
return pe
@match(Ref, 'tc')
def checkRef(pe: Ref, ts):
if not pe.isNonTerminal(): return pe
ts0 = treeState(pe)
if ts == ts0: return pe
if ts == TUnit: Detree(pe)
if ts == TTree:
if ts0 == TUnit or ts0 == TMut: return TreeAs('', pe)
if ts0 == TFold: return seq(TreeAs('', EMPTY), pe)
if ts == TMut:
if ts0 == TUnit: return pe
if ts0 == TTree: return LinkAs('', pe)
if ts0 == TFold: return LinkAs('', seq(TreeAs('', EMPTY), pe))
if ts == TFold:
if ts0 == TUnit: return pe
if ts0 == TTree: return FoldAs('', '', pe)
if ts0 == TMut: return FoldAs('', '', TreeAs('', pe))
return pe.tc(ts)
def testRules(g: PEG):
for name in dir(g):
if not name[0].isupper(): continue
p = getattr(g, name)
p.checkRule()
## TPEG
def TPEGGrammar(g = None):
if g == None: g = PEG('tpeg')
# Preliminary
__ = N % '__'
_ = N % '_'
EOS = N % 'EOS'
g.Start = N%'__ Source EOF'
g.EOF = ~ANY
g.EOL = pe('\n') | pe('\r\n') | N%'EOF'
g.COMMENT = '/*' & (~pe('*/') & ANY)* 0 & '*/' | '//' & (~(N%'EOL') & ANY)* 0
g._ = (Range(' \t') | N%'COMMENT')* 0
g.__ = (Range(' \t\r\n') | N%'COMMENT')* 0
g.S = Range(' \t')
g.Source = TreeAs('Source', (N%'$Statement')*0)
"EOS = _ (';' _ / EOL (S/COMMENT) _ / EOL )*"
g.EOS = N%'_' & (';' & N%'_' | N%'EOL' & (N%'S' | N%'COMMENT') & N%'_' | N%'EOL')* 0
g.Statement = N%'Example/Production'
g.Production = TreeAs('Production', N%'$Identifier __' & '=' & __ & (Range('/|') & __ |0) & N%'$Expression') & EOS
g.Name = TreeAs('Name', N%'NAME')
g.NAME = '"' & (pe(r'\"') | ~Range('\\"\n') & ANY)*0 & '"' | (~Range(' \t\r\n(,){};<>[|/*+?=^\'`') & ANY)+0
g.Example = TreeAs('Example', 'example' & N%'S _ $Names $Doc') & EOS
g.Names = TreeAs('', N%'$Identifier _' & (Range(',&') & N%'_ $Identifier _')*0)
Doc1 = TreeAs("Doc", (~(N%'DELIM EOL') & ANY)* 0)
Doc2 = TreeAs("Doc", (~Range('\r\n') & ANY)*0)
g.Doc = N%'DELIM' & (N%'S'*0) & N%'EOL' & Doc1 & N % 'DELIM' | Doc2
g.DELIM = pe("'''")
g.Expression = N%'Choice' ^ (TreeAs('Alt', __ & '|' & _ & N%'$Expression')|0)
g.Choice = N%'Sequence' ^ (TreeAs('Or', __ & '/' & _ & N%'$Choice')|0)
g.SS = N%'S _' & ~(N%'EOL') | (N%'_ EOL')+0 & N%'S _'
g.Sequence = N%'Predicate' ^ (TreeAs('Seq', N%'SS $Sequence')|0)
g.Predicate = TreeAs('Not', '!' & N%'$Predicate') | TreeAs('And', '&' & N%'$Predicate') | TreeAs('Append', '$' & N%'_ $Predicate') | N%'Suffix'
g.Suffix = N%'Term' ^ (TreeAs('Many', '*') | TreeAs('OneMore', '+') | TreeAs('Option', '?') | 0)
g.Term = N%'Group/Char/Class/Any/Tree/Fold/BindFold/Bind/Func/Ref'
g.Group = '(' & __ & N%'Expression/Empty' & __ & ')'
g.Empty = TreeAs('Empty', EMPTY)
g.Any = TreeAs('Any', '.')
g.Char = "'" & TreeAs('Char', (r'\\' & ANY | ~Range("'\n") & ANY)*0) & "'"
g.Class = '[' & TreeAs('Class', (r'\\' & ANY | ~Range("]") & ANY)*0) & ']'
g.Tree = TreeAs('Tree', N%'Tag __' & (N%'$Expression __' | N%'$Empty') & '}' )
g.Fold = '^' & _ & TreeAs('Fold', N%'Tag __' & (N%'$Expression __' | N%'$Empty') & '}' )
g.Tag = (N%'$Identifier'|0) & '{'
g.Identifier = TreeAs('Name', Range('A-Z', 'a-z', '@') & Range('A-Z', 'a-z', '0-9', '_.')*0)
g.Bind = TreeAs('Bind', N%'$Var _' & '=>' & N%'_ $Expression')
g.BindFold = TreeAs('Fold', N%'$Var _' & '^' & _ & N%'Tag __' & (N%'$Expression __' | N%'$Empty') & '}')
g.Var = TreeAs('Name', Range('a-z', '$') & Range('A-Z', 'a-z', '0-9', '_')*0)
g.Func = TreeAs('Func', N%'$Identifier' & '(' & (N%'$Expression _' & ',' & __)* 0 & N%'$Expression _' & ')')
g.Ref = N%'Name'
# Example
g.example("Name", "abc")
g.example("Name", '"abc"')
g.example("COMMENT", "/*hoge*/hoge", "[# '/*hoge*/']")
g.example("COMMENT", "//hoge\nhoge", "[# '//hoge']")
g.example("Ref,Term,Expression", "a", "[#Name 'a']")
g.example("Char,Expression", "''", "[#Char '']")
g.example("Char,Expression", "'a'", "[#Char 'a']")
g.example("Name,Expression", "\"a\"", "[#Name '\"a\"']")
g.example("Class,Expression", "[a]", "[#Class 'a']")
g.example("Func", "f(a)", "[#Func [#Name 'a'] [#Name 'f']]")
g.example("Func", "f(a,b)", "[#Func [#Name 'b'] [#Name 'a'] [#Name 'f']]")
g.example("Predicate,Expression", "&a", "[#And [#Name 'a']]")
g.example("Predicate,Expression", "!a", "[#Not [#Name 'a']]")
g.example("Suffix,Expression", "a?", "[#Option [#Name 'a']]")
g.example("Suffix,Expression", "a*", "[#Many [#Name 'a']]")
g.example("Suffix,Expression", "a+", "[#OneMore [#Name 'a']]")
g.example("Expression", "{}", "[#Tree [#Empty '']]")
g.example("Expression", "{ a }", "[#Tree [#Name 'a']]")
g.example("Expression", "{ }", "[#Tree [#Empty '']]")
g.example("Expression", "()", "[#Empty '']")
g.example("Expression", "&'a'", "[#And [#Char 'a']]")
g.example("Expression", "{a}", "[#Tree [#Name 'a']]")
g.example("Expression", "Int{a}", "[#Tree [#Name 'a'] [#Name 'Int']]")
g.example("Expression", "^{a}", "[#Fold [#Name 'a']]")
g.example("Expression", "^Int{a}", "[#Fold [#Name 'a'] [#Name 'Int']]")
g.example("Expression", "name^{a}", "[#Fold [#Name 'a'] [#Name 'name']]")
g.example("Expression", "name^Int{a}", "[#Fold [#Name 'a'] [#Name 'Int'] [#Name 'name']]")
g.example("Expression", "$a", "[#Append [#Name 'a']]")
g.example("Expression", "name=>a", "[#Bind [#Name 'a'] [#Name 'name']]")
g.example("Expression", "name => a", "[#Bind [#Name 'a'] [#Name 'name']]")
g.example("Expression", "a a", "[#Seq [#Name 'a'] [#Name 'a']]")
g.example("Expression", "a b c", "[#Seq [#Seq [#Name 'c'] [#Name 'b']] [#Name 'a']]")
g.example("Expression", "a/b / c", "[#Or [#Or [#Name 'c'] [#Name 'b']] [#Name 'a']]")
g.example("Statement", "A=a", "[#Production [#Name 'a'] [#Name 'A']]")
g.example("Statement", "example A,B abc \n", "[#Example [#Doc 'abc '] [# [#Name 'B'] [#Name 'A']]]")
g.example("Statement", "A = a\n b", "[#Production [#Seq [#Name 'b'] [#Name 'a']] [#Name 'A']]")
g.example("Start", "A = a; B = b;;",
"[#Source [#Production [#Name 'b'] [#Name 'B']] [#Production [#Name 'a'] [#Name 'A']]]")
g.example("Start", "A = a\nB = b",
"[#Source [#Production [#Name 'b'] [#Name 'B']] [#Production [#Name 'a'] [#Name 'A']]]")
g.example("Start", "A = a //hoge\nB = b",
"[#Source [#Production [#Name 'b'] [#Name 'B']] [#Production [#Name 'a'] [#Name 'A']]]")
return g
'''
class TreeConv(object):
def parse(self, t:ParseTree):
f = getattr(self, t.tag)
return f(t)
class TPEGConv(TreeConv):
def __init__(self, peg:PEG):
self.peg = peg
def load(self, path):
self.peg = PEG(path)
f = open(path, 'r')
data = f.read()
f.close()
return self.peg
def Source(self,t:ParseTree):
for stmt in t.asArray():
self.parse(stmt)
def Example(self, t:ParseTree):
names, input = t.asArray()
for name in names:
self.peg.example(name.asString(), input.asString())
def Production(self, t:ParseTree):
name, expr = t.asArray()
setattr(self.peg, name.asString(), self.parse(expr))
def Name(self, t:ParseTree):
return Ref(t.asString())
def Char(self, t:ParseTree):
return pe(t.asString())
def Class(self, t:ParseTree):
return pe(t.asString())
def Any(self, t:ParseTree):
return ANY
def Or(self,t:ParseTree):
return lor(list(map(lambda x: self.parse(x), t.asArray())))
def Seq(self,t:ParseTree):
return lseq(list(map(lambda x: self.parse(x), t.asArray())))
def Many(self,t:ParseTree):
return Many(self.parse(t[0]))
def Many1(self,t:ParseTree):
return Many1(self.parse(t[0]))
def Option(self,t:ParseTree):
return Ore(self.parse(t[0]), EMPTY)
def And(self,t:ParseTree):
return And(self.parse(t[0]))
def Not(self,t:ParseTree):
return Not(self.parse(t[0]))
def Append(self,t:ParseTree):
return LinkAs('', self.parse(t[0]))
def Tree(self,t:ParseTree):
if len(t) == 2:
return TreeAs(t[0].asString(), self.parse(t[1]))
return TreeAs('', self.parse(t[0]))
def Link(self,t:ParseTree):
if len(t) == 2:
return LinkAs(t[0].asString(), self.parse(t[1]))
return LinkAs('', self.parse(t[0]))
def Fold(self,t:ParseTree):
if len(t) == 3:
return FoldAs(t[0].asString(), t[1].asString(), self.parse(t[3]))
if len(t) == 2:
return FoldAs('', t[0].asString(), self.parse(t[1]))
return FoldAs('', '', self.parse(t[0]))
def unquote(self, s):
sb = []
while len(s) > 0:
if s.startswith('\\') and len(s) > 1:
s = self.unesc(s, sb)
else:
sb.append(s[0])
s = s[1:]
return ''.join(sb)
'''
| class Parsingexpression(object):
def __repr__(self):
return self.__str__()
def __or__(self, right):
return ore(self, pe(right))
def __and__(self, right):
return seq(self, pe(right))
def __xor__(self, right):
return seq(self, lfold('', pe(right)))
def __rand__(self, left):
return seq(pe(left), self)
def __add__(self, right):
return seq(many1(self), pe(right))
def __mul__(self, right):
return seq(many(self), pe(right))
def __truediv__(self, right):
return ore(self, pe(right))
def __invert__(self):
return not(self)
def __neq__(self):
return not(self)
def __pos__(self):
return and(self)
def setg(self, peg):
if hasattr(self, 'inner'):
self.inner.setg(peg)
if hasattr(self, 'left'):
self.left.setg(peg)
self.right.setg(peg)
class Empty(ParsingExpression):
def __str__(self):
return "''"
empty = empty()
class Char(ParsingExpression):
__slots__ = ['a']
def __init__(self, a):
self.a = a
def __str__(self):
return "'" + quote_str(self.a) + "'"
class Range(ParsingExpression):
__slots__ = ['chars', 'ranges']
def __init__(self, *ss):
chars = []
ranges = []
for s in ss:
if len(s) == 3 and s[1] is '-':
ranges.append((s[0], s[2]))
else:
for c in s:
chars.append(c)
self.chars = tuple(chars)
self.ranges = tuple(ranges)
def __str__(self):
l = tuple(map(lambda x: quote_str(x[0], ']') + '-' + quote_str(x[1], ']'), self.ranges))
return '[' + ''.join(l) + quote_str(self.chars, ']') + ']'
class Any(ParsingExpression):
def __str__(self):
return '.'
any = any()
class Ref(ParsingExpression):
__slots__ = ['peg', 'name']
def __init__(self, name, peg=None):
self.name = name
self.peg = peg
def __str__(self):
return str(self.name)
def setg(self, peg):
self.peg = peg
def is_non_terminal(self):
return hasattr(self.peg, self.name)
def deref(self):
return getattr(self.peg, self.name).inner
def prop(self):
return getattr(self.peg, self.name)
def getmemo(self, prefix):
return self.peg.getmemo(prefix + self.name)
def setmemo(self, prefix, value):
return self.peg.setmemo(prefix + self.name, value)
class Seq(ParsingExpression):
__slots__ = ['left', 'right']
def __init__(self, left, right):
self.left = pe(left)
self.right = pe(right)
def __str__(self):
return quote_pe(self.left, inSeq) + ' ' + quote_pe(self.right, inSeq)
def flatten(self, ls):
if isinstance(self.left, Seq):
self.left.flatten(ls)
else:
ls.append(self.left)
if isinstance(self.right, Seq):
self.right.flatten(ls)
else:
ls.append(self.right)
return ls
class Ore(ParsingExpression):
__slots__ = ['left', 'right']
def __init__(self, left, right):
self.left = pe(left)
self.right = pe(right)
def __str__(self):
if self.right == EMPTY:
return quote_pe(self.left, inUnary) + '?'
return str(self.left) + ' / ' + str(self.right)
def flatten(self, ls):
if isinstance(self.left, Ore):
self.left.flatten(ls)
else:
ls.append(self.left)
if isinstance(self.right, Ore):
self.right.flatten(ls)
else:
ls.append(self.right)
return ls
class Alt(ParsingExpression):
__slots__ = ['left', 'right']
def __init__(self, left, right):
self.left = pe(left)
self.right = pe(right)
def __str__(self):
return str(self.left) + ' | ' + str(self.right)
def flatten(self, ls):
if isinstance(self.left, Alt):
self.left.flatten(ls)
else:
ls.append(self.left)
if isinstance(self.right, Alt):
self.right.flatten(ls)
else:
ls.append(self.right)
return ls
class And(ParsingExpression):
__slots__ = ['inner']
def __init__(self, inner):
self.inner = pe(inner)
def __str__(self):
return '&' + quote_pe(self.inner, inUnary)
class Not(ParsingExpression):
__slots__ = ['inner']
def __init__(self, inner):
self.inner = pe(inner)
def __str__(self):
return '!' + quote_pe(self.inner, inUnary)
class Many(ParsingExpression):
__slots__ = ['inner']
def __init__(self, inner):
self.inner = pe(inner)
def __str__(self):
return quote_pe(self.inner, inUnary) + '*'
class Many1(ParsingExpression):
__slots__ = ['inner']
def __init__(self, inner):
self.inner = pe(inner)
def __str__(self):
return quote_pe(self.inner, inUnary) + '+'
def quote_pe(e, f):
return '(' + str(e) + ')' if f(e) else str(e)
def in_seq(e):
return isinstance(e, Ore) or isinstance(e, Alt)
def in_unary(e):
return isinstance(e, Ore) and e.right != EMPTY or isinstance(e, Seq) or isinstance(e, Alt)
def quote_str(e, esc="'"):
sb = []
for c in e:
if c == '\n':
sb.append('\\n')
elif c == '\t':
sb.append('\\t')
elif c == '\\':
sb.append('\\\\')
elif c == '\r':
sb.append('\\r')
elif c in esc:
sb.append('\\' + c)
else:
sb.append(c)
return ''.join(sb)
def pe(x):
if x == 0:
return EMPTY
if isinstance(x, str):
if len(x) == 0:
return EMPTY
return char(x)
return x
def ref(name):
if name.find('/') != -1:
return lor(list(map(ref, name.split('/'))))
if name.find(' ') != -1:
return lseq(list(map(ref, name.split(' '))))
if name.startswith('$'):
return link_as('', ref(name[1:]))
return ref(name)
def seq(x, y):
if isinstance(y, Empty):
return x
return seq(x, y)
def lseq(ls):
if len(ls) > 1:
return seq(ls[0], lseq(ls[1:]))
if len(ls) == 1:
return ls[0]
return EMPTY
def lor(ls):
if len(ls) > 1:
return ore(ls[0], lor(ls[1:]))
if len(ls) == 1:
return ls[0]
return EMPTY
def lfold(ltag, e):
if isinstance(e, Many) and isinstance(e.inner, TreeAs):
return many(lfold(ltag, e.inner))
if isinstance(e, Many1) and isinstance(e.inner, TreeAs):
return many1(lfold(ltag, e.inner))
if isinstance(e, Ore):
return ore(lfold(ltag, e.left), lfold(ltag, e.right))
if isinstance(e, TreeAs):
return fold_as(ltag, e.tag, pe(e.inner))
return e
class Treeas(ParsingExpression):
__slots__ = ['tag', 'inner']
def __init__(self, tag, inner):
self.tag = tag
self.inner = pe(inner)
def __str__(self):
return self.tag + '{ ' + str(self.inner) + ' }'
class Linkas(ParsingExpression):
__slots__ = ['tag', 'inner']
def __init__(self, tag, inner=None):
self.tag = tag
self.inner = pe(inner)
def __str__(self):
if self.tag == '':
return '$' + quote_pe(self.inner, inUnary)
return '(' + self.tag + '=>' + str(self.inner) + ')'
def __le__(self, right):
return link_as(self.tag, right)
def __ge__(self, right):
return link_as(self.tag, right)
def __mod__(self, right):
return ref(right)
def __xor__(self, right):
return lfold(self.tag, pe(right))
n = link_as('')
class Foldas(ParsingExpression):
__slots__ = ['ltag', 'tag', 'inner']
def __init__(self, ltag, tag, inner):
self.inner = pe(inner)
self.ltag = ltag
self.tag = tag
def __str__(self):
return self.ltag + '^' + self.tag + '{ ' + str(self.inner) + ' }'
class Detree(ParsingExpression):
__slots__ = ['inner']
def __init__(self, inner):
self.inner = pe(inner)
def __str__(self):
return '@unit(' + str(self.inner) + ')'
"\n@if(Bool)\n@symbol(Indent)\n@match(Indent)\n@exists(Indent, 'hoge')\n"
class Meta(ParsingExpression):
__slots__ = ['tag', 'inner', 'opt']
def __init__(self, tag, inner, opt=None):
self.tag = tag
self.inner = pe(inner)
self.opt = opt
def __str__(self):
arg = ', ' + repr(self.opt) if self.opt != None else ''
return self.tag + '(' + str(self.inner) + arg + ')'
"\nclass ParserContext:\n __slots__ = ['inputs', 'pos', 'headpos', 'ast']\n def __init__(self, inputs, pos = 0):\n self.inputs = inputs\n self.pos = pos\n self.headpos = pos\n self.ast = None\n"
class Rule(object):
def __init__(self, name, inner):
self.name = name
self.inner = pe(inner)
self.checked = False
def __str__(self):
return str(self.inner)
def is_consumed(self):
if not hasattr(self, 'nonnull'):
self.nonnull = is_always_consumed(self.inner)
return self.nonnull
def tree_state(self):
if not hasattr(self, 'ts'):
self.ts = tree_state(self.inner)
return self.ts
def check_rule(self):
if not self.checked:
s0 = str(self.inner)
if is_rec(self.inner, self.name, {}):
check_rec(self.inner, self.name, {})
ts = tree_state(self.inner)
ts = tree_check(self.inner, ts)
s1 = str(self.inner)
if s0 != s1:
print(self.name, s0, s1)
class Peg(object):
def __init__(self, ns=None):
self.ns77 = ns
self.memo77 = {}
self.example77 = []
def __getitem__(self, item):
return getattr(self, item, None)
def __setattr__(self, key, value):
if isinstance(value, ParsingExpression):
value.setg(self)
if not isinstance(value, Rule):
value = rule(key, value)
super().__setattr__(key, value)
print(key, '=', value)
if not hasattr(self, 'start'):
setattr(self, 'start', value)
else:
super().__setattr__(key, value)
def ns(self):
return self.ns77
def hasmemo(self, key):
return key in self.memo77
def getmemo(self, key):
return self.memo77[key] if key in self.memo77 else None
def setmemo(self, key, value):
self.memo77[key] = value
def example(self, prod, input, output=None):
for name in prod.split(','):
self.example77.append((name, input, output))
def test_all(self, combinator):
p = {}
test = 0
ok = 0
for testcase in self.example77:
(name, input, output) = testcase
if not name in p:
p[name] = combinator(self, name)
res = p[name](input)
t = str(res).replace(" b'", " '")
if output == None:
print(name, input, '=>', t)
else:
test += 1
if t == output:
print('OK', name, input)
ok += 1
else:
print('NG', name, input, output, '!=', t)
if test > 0:
print('OK', ok, 'FAIL', test - ok, ok / test * 100.0, '%')
def match(*ctags):
def _match(func):
name = ctags[-1]
for ctag in ctags[:-1]:
setattr(ctag, name, func)
return func
return _match
def is_rec(pe: ParsingExpression, name: str, visited: dict) -> bool:
if isinstance(pe, Ref):
if pe.name == name:
return True
if not pe.name in visited:
visited[pe.name] = True
return is_rec(pe.deref(), name, visited)
if hasattr(pe, 'inner'):
return is_rec(pe.inner, name, visited)
if hasattr(pe, 'left'):
res = is_rec(pe.left, name, visited)
return res if res else is_rec(pe.right, name, visited)
return False
def check_rec(pe: ParsingExpression, name: str, visited: dict) -> bool:
if hasattr(pe, 'left'):
if isinstance(pe, Seq):
return check_rec(pe.left, name, visited) and check_rec(pe.right, name, visited)
else:
c0 = check_rec(pe.left, name, visited)
c1 = check_rec(pe.right, name, visited)
return c0 or c1
if hasattr(pe, 'inner'):
rec = check_rec(pe.inner, name, visited)
return True if isinstance(pe, Not) or isinstance(pe, Many) or isinstance(pe, And) else rec
if isinstance(pe, Ref):
if pe.name == name:
print('left recursion')
if not pe.name in visited:
visited[pe.name] = True
check_rec(pe.deref(), name, visited)
return not pe.prop().isConsumed()
return isinstance(pe, Empty)
def is_always_consumed(pe: ParsingExpression):
if not hasattr(pe, 'cc'):
@match(Char, Any, Range, 'cc')
def consumed(pe):
return True
@match(Many, Not, And, Empty, 'cc')
def consumed(pe):
return False
@match(Many1, LinkAs, TreeAs, FoldAs, Detree, Meta, 'cc')
def unary(pe):
return is_always_consumed(pe.inner)
@match(Seq, 'cc')
def seq(pe):
if not is_always_consumed(pe.left):
return False
return is_always_consumed(pe.right)
@match(Ore, Alt, 'cc')
def ore(pe):
return is_always_consumed(pe.left) and is_always_consumed(pe.right)
@match(Ref, 'cc')
def memo(pe: Ref):
if not pe.isNonTerminal():
return True
key = 'null' + pe.name
memoed = pe.getmemo('null')
if memoed == None:
pe.setmemo('null', True)
memoed = is_always_consumed(pe.deref())
pe.setmemo('null', memoed)
return memoed
return pe.cc()
t_unit = 0
t_tree = 1
t_mut = 2
t_fold = 3
def tree_state(pe):
if not hasattr(pe, 'ts'):
@match(Char, Any, Range, Not, Detree, 'ts')
def state_unit(pe):
return TUnit
@match(TreeAs, 'ts')
def state_tree(pe):
return TTree
@match(LinkAs, 'ts')
def state_mut(pe):
return TMut
@match(FoldAs, 'ts')
def state_fold(pe):
return TFold
@match(Seq, 'ts')
def state_seq(pe):
ts0 = tree_state(pe.left)
return ts0 if ts0 != TUnit else tree_state(pe.right)
@match(Ore, Alt, 'ts')
def state_alt(pe):
ts0 = tree_state(pe.left)
if ts0 != TUnit:
return ts0
ts1 = tree_state(pe.right)
return TMut if ts1 == TTree else ts1
@match(Many, Many1, And, 'ts')
def state_alt(pe):
ts0 = tree_state(pe.inner)
return TMut if ts0 == TTree else ts0
@match(Ref, 'ts')
def memo(pe: Ref):
if not pe.isNonTerminal():
return TUnit
memoed = pe.getmemo('ts')
if memoed == None:
pe.setmemo('ts', TUnit)
memoed = tree_state(pe.deref())
pe.setmemo('ts', memoed)
return memoed
return pe.ts()
def tree_check(pe, ts):
if not hasattr(pe, 'tc'):
@match(ParsingExpression, 'tc')
def check_empty(pe, ts):
return pe
@match(TreeAs, 'tc')
def check_tree(pe, ts):
if ts == TUnit:
return tree_check(pe.inner, TUnit)
if ts == TTree:
pe.inner = tree_check(pe.inner, TMut)
return pe
if ts == TMut:
pe.inner = tree_check(pe.inner, TMut)
return link_as('', pe)
if ts == TFold:
pe.inner = tree_check(pe.inner, TMut)
return fold_as('', pe.tag, pe.inner)
@match(LinkAs, 'tc')
def check_link(pe, ts):
if ts == TUnit or ts == TFold:
return tree_check(pe.inner, TUnit)
if ts == TTree:
return tree_check(pe.inner, TTree)
if ts == TMut:
ts0 = tree_state(pe.inner)
if ts0 == TUnit or ts0 == TFold:
pe.inner = tree_as('', tree_check(pe.inner, TUnit))
if ts0 == TTree:
pe.inner = tree_check(pe.inner, TTree)
if ts0 == TMut:
pe.inner = tree_as('', tree_check(pe.inner, TMut))
return pe
@match(FoldAs, 'tc')
def check_fold(pe, ts):
if ts == TUnit:
return tree_check(pe.inner, TUnit)
if ts == TTree:
pe.inner = tree_check(pe.inner, TMut)
return tree_as(pe.tag, pe.inner)
if ts == TMut:
pe.inner = tree_check(pe.inner, TMut)
return link_as(pe.ltag, pe.inner)
if ts == TFold:
pe.inner = tree_check(pe.inner, TMut)
return pe
@match(Seq, 'tc')
def check_seq(pe, ts):
if ts == TUnit or ts == TMut or ts == TFold:
pe.left = tree_check(pe.left, ts)
pe.right = tree_check(pe.right, ts)
return pe
ts0 = tree_state(pe.left)
if ts0 == TUnit:
pe.left = tree_check(pe.left, TUnit)
pe.right = tree_check(pe.right, ts)
return pe
if ts0 == TTree:
pe.left = tree_check(pe.left, TTree)
pe.right = tree_check(pe.right, TFold)
return pe
@match(Ore, Alt, 'tc')
def check_alt(pe, ts):
pe.left = tree_check(pe.left, ts)
pe.right = tree_check(pe.right, ts)
return pe
@match(Many, Many1, 'tc')
def check_many(pe, ts):
if ts == TUnit:
pe.inner = tree_check(pe.inner, TUnit)
return pe
if ts == TTree:
pe.inner = tree_check(pe.inner, TUnit)
return tree_as('', pe)
if ts == TMut:
ts0 = tree_state(pe.inner)
if ts0 == TUnit or ts0 == TFold:
pe.inner = tree_check(pe.inner, TUnit)
if ts0 == TTree or ts0 == TMut:
pe.inner = tree_check(pe.inner, TMut)
return pe
if ts == TFold:
pe.inner = tree_check(pe.inner, TFold)
return pe
@match(Ref, 'tc')
def check_ref(pe: Ref, ts):
if not pe.isNonTerminal():
return pe
ts0 = tree_state(pe)
if ts == ts0:
return pe
if ts == TUnit:
detree(pe)
if ts == TTree:
if ts0 == TUnit or ts0 == TMut:
return tree_as('', pe)
if ts0 == TFold:
return seq(tree_as('', EMPTY), pe)
if ts == TMut:
if ts0 == TUnit:
return pe
if ts0 == TTree:
return link_as('', pe)
if ts0 == TFold:
return link_as('', seq(tree_as('', EMPTY), pe))
if ts == TFold:
if ts0 == TUnit:
return pe
if ts0 == TTree:
return fold_as('', '', pe)
if ts0 == TMut:
return fold_as('', '', tree_as('', pe))
return pe.tc(ts)
def test_rules(g: PEG):
for name in dir(g):
if not name[0].isupper():
continue
p = getattr(g, name)
p.checkRule()
def tpeg_grammar(g=None):
if g == None:
g = peg('tpeg')
__ = N % '__'
_ = N % '_'
eos = N % 'EOS'
g.Start = N % '__ Source EOF'
g.EOF = ~ANY
g.EOL = pe('\n') | pe('\r\n') | N % 'EOF'
g.COMMENT = '/*' & (~pe('*/') & ANY) * 0 & '*/' | '//' & (~(N % 'EOL') & ANY) * 0
g._ = (range(' \t') | N % 'COMMENT') * 0
g.__ = (range(' \t\r\n') | N % 'COMMENT') * 0
g.S = range(' \t')
g.Source = tree_as('Source', N % '$Statement' * 0)
"EOS = _ (';' _ / EOL (S/COMMENT) _ / EOL )*"
g.EOS = N % '_' & (';' & N % '_' | N % 'EOL' & (N % 'S' | N % 'COMMENT') & N % '_' | N % 'EOL') * 0
g.Statement = N % 'Example/Production'
g.Production = tree_as('Production', N % '$Identifier __' & '=' & __ & (range('/|') & __ | 0) & N % '$Expression') & EOS
g.Name = tree_as('Name', N % 'NAME')
g.NAME = '"' & (pe('\\"') | ~range('\\"\n') & ANY) * 0 & '"' | (~range(" \t\r\n(,){};<>[|/*+?=^'`") & ANY) + 0
g.Example = tree_as('Example', 'example' & N % 'S _ $Names $Doc') & EOS
g.Names = tree_as('', N % '$Identifier _' & (range(',&') & N % '_ $Identifier _') * 0)
doc1 = tree_as('Doc', (~(N % 'DELIM EOL') & ANY) * 0)
doc2 = tree_as('Doc', (~range('\r\n') & ANY) * 0)
g.Doc = N % 'DELIM' & N % 'S' * 0 & N % 'EOL' & Doc1 & N % 'DELIM' | Doc2
g.DELIM = pe("'''")
g.Expression = N % 'Choice' ^ (tree_as('Alt', __ & '|' & _ & N % '$Expression') | 0)
g.Choice = N % 'Sequence' ^ (tree_as('Or', __ & '/' & _ & N % '$Choice') | 0)
g.SS = N % 'S _' & ~(N % 'EOL') | N % '_ EOL' + 0 & N % 'S _'
g.Sequence = N % 'Predicate' ^ (tree_as('Seq', N % 'SS $Sequence') | 0)
g.Predicate = tree_as('Not', '!' & N % '$Predicate') | tree_as('And', '&' & N % '$Predicate') | tree_as('Append', '$' & N % '_ $Predicate') | N % 'Suffix'
g.Suffix = N % 'Term' ^ (tree_as('Many', '*') | tree_as('OneMore', '+') | tree_as('Option', '?') | 0)
g.Term = N % 'Group/Char/Class/Any/Tree/Fold/BindFold/Bind/Func/Ref'
g.Group = '(' & __ & N % 'Expression/Empty' & __ & ')'
g.Empty = tree_as('Empty', EMPTY)
g.Any = tree_as('Any', '.')
g.Char = "'" & tree_as('Char', ('\\\\' & ANY | ~range("'\n") & ANY) * 0) & "'"
g.Class = '[' & tree_as('Class', ('\\\\' & ANY | ~range(']') & ANY) * 0) & ']'
g.Tree = tree_as('Tree', N % 'Tag __' & (N % '$Expression __' | N % '$Empty') & '}')
g.Fold = '^' & _ & tree_as('Fold', N % 'Tag __' & (N % '$Expression __' | N % '$Empty') & '}')
g.Tag = (N % '$Identifier' | 0) & '{'
g.Identifier = tree_as('Name', range('A-Z', 'a-z', '@') & range('A-Z', 'a-z', '0-9', '_.') * 0)
g.Bind = tree_as('Bind', N % '$Var _' & '=>' & N % '_ $Expression')
g.BindFold = tree_as('Fold', N % '$Var _' & '^' & _ & N % 'Tag __' & (N % '$Expression __' | N % '$Empty') & '}')
g.Var = tree_as('Name', range('a-z', '$') & range('A-Z', 'a-z', '0-9', '_') * 0)
g.Func = tree_as('Func', N % '$Identifier' & '(' & (N % '$Expression _' & ',' & __) * 0 & N % '$Expression _' & ')')
g.Ref = N % 'Name'
g.example('Name', 'abc')
g.example('Name', '"abc"')
g.example('COMMENT', '/*hoge*/hoge', "[# '/*hoge*/']")
g.example('COMMENT', '//hoge\nhoge', "[# '//hoge']")
g.example('Ref,Term,Expression', 'a', "[#Name 'a']")
g.example('Char,Expression', "''", "[#Char '']")
g.example('Char,Expression', "'a'", "[#Char 'a']")
g.example('Name,Expression', '"a"', '[#Name \'"a"\']')
g.example('Class,Expression', '[a]', "[#Class 'a']")
g.example('Func', 'f(a)', "[#Func [#Name 'a'] [#Name 'f']]")
g.example('Func', 'f(a,b)', "[#Func [#Name 'b'] [#Name 'a'] [#Name 'f']]")
g.example('Predicate,Expression', '&a', "[#And [#Name 'a']]")
g.example('Predicate,Expression', '!a', "[#Not [#Name 'a']]")
g.example('Suffix,Expression', 'a?', "[#Option [#Name 'a']]")
g.example('Suffix,Expression', 'a*', "[#Many [#Name 'a']]")
g.example('Suffix,Expression', 'a+', "[#OneMore [#Name 'a']]")
g.example('Expression', '{}', "[#Tree [#Empty '']]")
g.example('Expression', '{ a }', "[#Tree [#Name 'a']]")
g.example('Expression', '{ }', "[#Tree [#Empty '']]")
g.example('Expression', '()', "[#Empty '']")
g.example('Expression', "&'a'", "[#And [#Char 'a']]")
g.example('Expression', '{a}', "[#Tree [#Name 'a']]")
g.example('Expression', 'Int{a}', "[#Tree [#Name 'a'] [#Name 'Int']]")
g.example('Expression', '^{a}', "[#Fold [#Name 'a']]")
g.example('Expression', '^Int{a}', "[#Fold [#Name 'a'] [#Name 'Int']]")
g.example('Expression', 'name^{a}', "[#Fold [#Name 'a'] [#Name 'name']]")
g.example('Expression', 'name^Int{a}', "[#Fold [#Name 'a'] [#Name 'Int'] [#Name 'name']]")
g.example('Expression', '$a', "[#Append [#Name 'a']]")
g.example('Expression', 'name=>a', "[#Bind [#Name 'a'] [#Name 'name']]")
g.example('Expression', 'name => a', "[#Bind [#Name 'a'] [#Name 'name']]")
g.example('Expression', 'a a', "[#Seq [#Name 'a'] [#Name 'a']]")
g.example('Expression', 'a b c', "[#Seq [#Seq [#Name 'c'] [#Name 'b']] [#Name 'a']]")
g.example('Expression', 'a/b / c', "[#Or [#Or [#Name 'c'] [#Name 'b']] [#Name 'a']]")
g.example('Statement', 'A=a', "[#Production [#Name 'a'] [#Name 'A']]")
g.example('Statement', 'example A,B abc \n', "[#Example [#Doc 'abc '] [# [#Name 'B'] [#Name 'A']]]")
g.example('Statement', 'A = a\n b', "[#Production [#Seq [#Name 'b'] [#Name 'a']] [#Name 'A']]")
g.example('Start', 'A = a; B = b;;', "[#Source [#Production [#Name 'b'] [#Name 'B']] [#Production [#Name 'a'] [#Name 'A']]]")
g.example('Start', 'A = a\nB = b', "[#Source [#Production [#Name 'b'] [#Name 'B']] [#Production [#Name 'a'] [#Name 'A']]]")
g.example('Start', 'A = a //hoge\nB = b', "[#Source [#Production [#Name 'b'] [#Name 'B']] [#Production [#Name 'a'] [#Name 'A']]]")
return g
"\nclass TreeConv(object):\n def parse(self, t:ParseTree):\n f = getattr(self, t.tag)\n return f(t)\n\nclass TPEGConv(TreeConv):\n def __init__(self, peg:PEG):\n self.peg = peg\n def load(self, path):\n self.peg = PEG(path)\n f = open(path, 'r')\n data = f.read()\n f.close()\n return self.peg\n def Source(self,t:ParseTree):\n for stmt in t.asArray():\n self.parse(stmt)\n def Example(self, t:ParseTree):\n names, input = t.asArray()\n for name in names:\n self.peg.example(name.asString(), input.asString())\n def Production(self, t:ParseTree):\n name, expr = t.asArray()\n setattr(self.peg, name.asString(), self.parse(expr))\n def Name(self, t:ParseTree):\n return Ref(t.asString())\n def Char(self, t:ParseTree):\n return pe(t.asString())\n def Class(self, t:ParseTree):\n return pe(t.asString())\n def Any(self, t:ParseTree):\n return ANY\n def Or(self,t:ParseTree):\n return lor(list(map(lambda x: self.parse(x), t.asArray())))\n def Seq(self,t:ParseTree):\n return lseq(list(map(lambda x: self.parse(x), t.asArray())))\n def Many(self,t:ParseTree):\n return Many(self.parse(t[0]))\n def Many1(self,t:ParseTree):\n return Many1(self.parse(t[0]))\n def Option(self,t:ParseTree):\n return Ore(self.parse(t[0]), EMPTY)\n def And(self,t:ParseTree):\n return And(self.parse(t[0]))\n def Not(self,t:ParseTree):\n return Not(self.parse(t[0]))\n def Append(self,t:ParseTree):\n return LinkAs('', self.parse(t[0]))\n def Tree(self,t:ParseTree):\n if len(t) == 2:\n return TreeAs(t[0].asString(), self.parse(t[1]))\n return TreeAs('', self.parse(t[0]))\n def Link(self,t:ParseTree):\n if len(t) == 2:\n return LinkAs(t[0].asString(), self.parse(t[1]))\n return LinkAs('', self.parse(t[0]))\n def Fold(self,t:ParseTree):\n if len(t) == 3:\n return FoldAs(t[0].asString(), t[1].asString(), self.parse(t[3]))\n if len(t) == 2:\n return FoldAs('', t[0].asString(), self.parse(t[1]))\n return FoldAs('', '', self.parse(t[0]))\n\n def unquote(self, s):\n sb = []\n while len(s) > 0:\n if s.startswith('\\') and len(s) > 1:\n s = self.unesc(s, sb)\n else:\n sb.append(s[0])\n s = s[1:]\n return ''.join(sb)\n" |
# last bit in the foreground map is 2**6
LMC_VAL = 2**7
HYPERLEDA_VAL = 2**9
GAIA_VAL = 2**10
DES_STARS_VAL = 2**11
NSIDE_COVERAGE = 32
NSIDE = 16384
FOOTPRINT_VAL = 2**0
# Hyperleda
HYPERLEDA_RADIUS_FAC = 1
# HYPERLEDA_RADIUS_FAC = 2
HYPERLEDA_MINRAD_ARCSEC = 0.0
# HYPERLEDA_MINRAD_ARCSEC = 10
# Gaia
GAIA_RADIUS_FAC = 1
# GAIA_RADIUS_FAC = 2
GAIA_MINRAD_ARCSEC = 5
# GAIA_MINRAD_ARCSEC = 10
GAIA_MAX_GMAG = 1000
# coefficients for log10(radius_arcsec) vs mag.
GAIA_POLY_COEFFS = [0.00443223, -0.22569131, 2.99642999]
# foreground
FOREGROUND_RADIUS_FAC = 1
# FOREGROUND_RADIUS_FAC = 2
# FOREGROUND_MINRAD_ARCSEC = 0
FOREGROUND_MINRAD_ARCSEC = 5
# DES Stars
DES_STARS_RADIUS_ARCSEC = 5
| lmc_val = 2 ** 7
hyperleda_val = 2 ** 9
gaia_val = 2 ** 10
des_stars_val = 2 ** 11
nside_coverage = 32
nside = 16384
footprint_val = 2 ** 0
hyperleda_radius_fac = 1
hyperleda_minrad_arcsec = 0.0
gaia_radius_fac = 1
gaia_minrad_arcsec = 5
gaia_max_gmag = 1000
gaia_poly_coeffs = [0.00443223, -0.22569131, 2.99642999]
foreground_radius_fac = 1
foreground_minrad_arcsec = 5
des_stars_radius_arcsec = 5 |
class Action:
def __init__(self, number, values):
self.number = number
self.values = values
| class Action:
def __init__(self, number, values):
self.number = number
self.values = values |
class Solution:
def countComponents(self, n: int, edges: List[List[int]]) -> int:
visited, count, graph = [False for _ in range(n)], 0, defaultdict(set)
def dfs(i):
for j in graph[i]:
if not visited[j]:
visited[j] = True
dfs(j)
for start, end in edges:
graph[start].add(end)
graph[end].add(start)
for i in range(n):
if not visited[i]:
dfs(i)
count += 1
return count | class Solution:
def count_components(self, n: int, edges: List[List[int]]) -> int:
(visited, count, graph) = ([False for _ in range(n)], 0, defaultdict(set))
def dfs(i):
for j in graph[i]:
if not visited[j]:
visited[j] = True
dfs(j)
for (start, end) in edges:
graph[start].add(end)
graph[end].add(start)
for i in range(n):
if not visited[i]:
dfs(i)
count += 1
return count |
#=========================
# Weapon List
#=========================
stick = {'name':'Stick','damage':1, 'description':'A wooden stick.... Maybe it will help'}
club = {'name':'Club', 'damage':2, 'description': 'It is a wooden club to swing around'}
woodenSword = {'name':'Wooden Sword', 'damage':3, 'description':'It is a wooden sword with a reasonably sharp blade for being made out of wood.'}
shortSword = {'name':'Short Sword','damage':5, 'description':'A short sword of reasonable quality'}
smallAxe = {'name':'Small Axe', 'damage':7, 'description':'It is a small handheld ax with a suprising amount of weight behind it.'}
shineySword = {'name':'Shiney Steel Sword', 'damage':10, 'description':'It is a nice steel sword that looks fairly new and very strong.'}
heavyAxe = {'atk': 12, 'name':'Heavy Axe', 'damage':12, 'description':'It is a very large and heavy ax, it takes all your might to swing it.'}
greatSword = {'name':'Great Sword', 'damage':15, 'description':'It is a long broad sword, you can almost feel the power flowing through it as if enchanted by some great magic.'}
weaponList = [stick, club, woodenSword, shortSword, smallAxe, shineySword, heavyAxe, greatSword]
| stick = {'name': 'Stick', 'damage': 1, 'description': 'A wooden stick.... Maybe it will help'}
club = {'name': 'Club', 'damage': 2, 'description': 'It is a wooden club to swing around'}
wooden_sword = {'name': 'Wooden Sword', 'damage': 3, 'description': 'It is a wooden sword with a reasonably sharp blade for being made out of wood.'}
short_sword = {'name': 'Short Sword', 'damage': 5, 'description': 'A short sword of reasonable quality'}
small_axe = {'name': 'Small Axe', 'damage': 7, 'description': 'It is a small handheld ax with a suprising amount of weight behind it.'}
shiney_sword = {'name': 'Shiney Steel Sword', 'damage': 10, 'description': 'It is a nice steel sword that looks fairly new and very strong.'}
heavy_axe = {'atk': 12, 'name': 'Heavy Axe', 'damage': 12, 'description': 'It is a very large and heavy ax, it takes all your might to swing it.'}
great_sword = {'name': 'Great Sword', 'damage': 15, 'description': 'It is a long broad sword, you can almost feel the power flowing through it as if enchanted by some great magic.'}
weapon_list = [stick, club, woodenSword, shortSword, smallAxe, shineySword, heavyAxe, greatSword] |
{
"targets": [
{
"variables": {
"cpp_base": "./src/cpp/"
},
"target_name": "uTicTacToe",
"sources": [
"<(cpp_base)node-driver.cpp",
"<(cpp_base)UltimateTicTacToe.cpp",
"<(cpp_base)UltimateTicTacToe-minimax.cpp",
"<(cpp_base)uTicTacToeWrapper.cpp",
"<(cpp_base)MoveWrapper.cpp"
],
"include_dirs": [
"<!@(node -p \"require('node-addon-api').include\")",
"./src/include"
],
"dependencies": [
"<!(node -p \"require('node-addon-api').gyp\")"
],
"defines": [
"NAPI_CPP_EXCEPTIONS"
],
'conditions': [
["OS=='mac'", {
"OTHER_LDFLAGS": ["-stdlib=libc++"],
"xcode_settings": {
"GCC_ENABLE_CPP_EXCEPTIONS": "YES",
"GCC_ENABLE_CPP_RTTI": "YES"
}
}],
["OS=='linux'", {
"OTHER_CFLAGS": [
"-fexceptions"
],
"cflags": [
"-fexceptions"
],
"cflags_cc": [
"-fexceptions"
]
}],
["OS=='windows'", {
"msvs_settings": {
"VCCLCompilerTool": {
"ExceptionHandling": 1,
"Optimization": 2
}
}
}]
]
}
]
}
| {'targets': [{'variables': {'cpp_base': './src/cpp/'}, 'target_name': 'uTicTacToe', 'sources': ['<(cpp_base)node-driver.cpp', '<(cpp_base)UltimateTicTacToe.cpp', '<(cpp_base)UltimateTicTacToe-minimax.cpp', '<(cpp_base)uTicTacToeWrapper.cpp', '<(cpp_base)MoveWrapper.cpp'], 'include_dirs': ['<!@(node -p "require(\'node-addon-api\').include")', './src/include'], 'dependencies': ['<!(node -p "require(\'node-addon-api\').gyp")'], 'defines': ['NAPI_CPP_EXCEPTIONS'], 'conditions': [["OS=='mac'", {'OTHER_LDFLAGS': ['-stdlib=libc++'], 'xcode_settings': {'GCC_ENABLE_CPP_EXCEPTIONS': 'YES', 'GCC_ENABLE_CPP_RTTI': 'YES'}}], ["OS=='linux'", {'OTHER_CFLAGS': ['-fexceptions'], 'cflags': ['-fexceptions'], 'cflags_cc': ['-fexceptions']}], ["OS=='windows'", {'msvs_settings': {'VCCLCompilerTool': {'ExceptionHandling': 1, 'Optimization': 2}}}]]}]} |
#AUTHOR: Farrah Akram
#Python3 Concept: Simple ATM in Python
#GITHUB: https://github.com/krosskid12
while True:
balance=10000;
print(" <<-- Welcome to Github ATM -->> ")
print("""
1) Balance Check
2) Withdraw Balance
3) Deposit
4) Quit
""")
try:
Option=int(input("Enter Option :"))
except Exception as e:
print("Error:",e)
print("Enter 1,2,3 or 4 only")
continue
if Option==1:
print("Balance $ ",balance)
if Option==2:
print("Balance $ ",balance)
Withdraw=float(input("Enter Withdraw ammount $ :"))
if Withdraw>0:
forwardbalance=(balance-Withdraw)
print("Forward balance is $ ",forwardbalance)
elif Withdraw>balance:
print("No Balance in account !!!")
else:
print("None withdraw made ")
if Option==3:
print("Balance $ ",balance)
Deposit=float(input("Enter deposit ammount $ :"))
if Deposit>0:
forwardbalance=(balance+Deposit)
print("forwardbalance $",forwardbalance)
else:
print("No deposit made !!!")
if Option==4:
exit()
| while True:
balance = 10000
print(' <<-- Welcome to Github ATM -->> ')
print('\n 1) Balance Check\n 2) Withdraw Balance\n 3) Deposit\n 4) Quit\n ')
try:
option = int(input('Enter Option :'))
except Exception as e:
print('Error:', e)
print('Enter 1,2,3 or 4 only')
continue
if Option == 1:
print('Balance $ ', balance)
if Option == 2:
print('Balance $ ', balance)
withdraw = float(input('Enter Withdraw ammount $ :'))
if Withdraw > 0:
forwardbalance = balance - Withdraw
print('Forward balance is $ ', forwardbalance)
elif Withdraw > balance:
print('No Balance in account !!!')
else:
print('None withdraw made ')
if Option == 3:
print('Balance $ ', balance)
deposit = float(input('Enter deposit ammount $ :'))
if Deposit > 0:
forwardbalance = balance + Deposit
print('forwardbalance $', forwardbalance)
else:
print('No deposit made !!!')
if Option == 4:
exit() |
#!/usr/bin/python
"""Const values"""
CONFIG_PATH_NAME = 'configs'
VERSIONS_FILENAME = 'app_version'
VERSIONS_FILENAME_EXT = ".json"
APPS_METADATE_FILENAME = 'meta_'
TMP_IGNORE_DIR = 'ignore_tmp'
APP_MANIFEST_HEADERS = ['commitid', 'application', 'whitelist', 'blacklist', 'method']
LOGPATH = '/var/appetite'
META_DIR = 'appetite'
DEPLOYMENT_METHODS_FILENAME = "deploymentmethods.conf"
# Default version given to applications with no version
# This is supplemented with the commit id before storing to file
DEFAULT_VERSION = "1.0"
# Status Change values
META_APP_CHANGED = 'changed'
META_APP_DELETED = 'deleted'
META_APP_ADDED = 'added'
META_APP_UNCHANGED = 'unchanged'
# Lists to check app statuses
META_CURRENT = [META_APP_CHANGED, META_APP_ADDED, META_APP_UNCHANGED]
META_UPDATED = [META_APP_CHANGED, META_APP_ADDED, META_APP_DELETED]
META_CHANGED = [META_APP_CHANGED, META_APP_ADDED]
# Extensions to use with templating
JSON_EXTS = ['json']
YMAL_EXTS = ['ymal', 'yml']
TEMPLATING_EXTS = JSON_EXTS + YMAL_EXTS
HOST_LOGS_FOLDER_NAME = "logs"
# Name formatting for host names
NAME_FORMATTING = []
NAME_FORMATTING_SPLIT_TOKEN = 11110000100001111
DM_COMMANDS_SEQUENCE = ['run_first_script', 'commands', 'run_last_script']
DEFAULT_THREAD_POOL_SIZE = 10
DEFAULT_LOG_RETENTION = 30 # days
REMOTE_CMD_RUN_SLEEP_TIMER = 30 # seconds
REMOTE_AUTH_RUN_SLEEP_TIMER = 5 # seconds
# Pulling commit logs have standard names, this helps format the correctly
RENAME_COMMIT_LOG_KEYS = {
'commit_id': "app_commit_id",
'abbrv_commit_id': "app_abbrev_commit_id"
}
# Default (needed) columns in the manifest
DEFAULT_COLUMN_HEADER = [
'commitid',
'application',
'deploymentmethod',
'whitelist',
'blacklist'
]
# Location within an application to look for version number
LOCATION_DEFAULT = 'default/app.conf'
LOCATION_LOCAL = 'local/app.conf'
# Var used to set up version stanza im a file
LAUNCHER_STANZA = 'launcher'
VERSION_KEY = 'version'
| """Const values"""
config_path_name = 'configs'
versions_filename = 'app_version'
versions_filename_ext = '.json'
apps_metadate_filename = 'meta_'
tmp_ignore_dir = 'ignore_tmp'
app_manifest_headers = ['commitid', 'application', 'whitelist', 'blacklist', 'method']
logpath = '/var/appetite'
meta_dir = 'appetite'
deployment_methods_filename = 'deploymentmethods.conf'
default_version = '1.0'
meta_app_changed = 'changed'
meta_app_deleted = 'deleted'
meta_app_added = 'added'
meta_app_unchanged = 'unchanged'
meta_current = [META_APP_CHANGED, META_APP_ADDED, META_APP_UNCHANGED]
meta_updated = [META_APP_CHANGED, META_APP_ADDED, META_APP_DELETED]
meta_changed = [META_APP_CHANGED, META_APP_ADDED]
json_exts = ['json']
ymal_exts = ['ymal', 'yml']
templating_exts = JSON_EXTS + YMAL_EXTS
host_logs_folder_name = 'logs'
name_formatting = []
name_formatting_split_token = 11110000100001111
dm_commands_sequence = ['run_first_script', 'commands', 'run_last_script']
default_thread_pool_size = 10
default_log_retention = 30
remote_cmd_run_sleep_timer = 30
remote_auth_run_sleep_timer = 5
rename_commit_log_keys = {'commit_id': 'app_commit_id', 'abbrv_commit_id': 'app_abbrev_commit_id'}
default_column_header = ['commitid', 'application', 'deploymentmethod', 'whitelist', 'blacklist']
location_default = 'default/app.conf'
location_local = 'local/app.conf'
launcher_stanza = 'launcher'
version_key = 'version' |
class Node:
def __init__(self, data):
self.data = data
self.nxt = None
def add(self, data):
nxt = self
while nxt.nxt is not None:
nxt = nxt.nxt
nxt.nxt = Node(data)
return nxt.nxt
def join(self, node):
self.nxt = node
def get_size(n):
count = 1
while n.nxt is not None:
count += 1
n = n.nxt
return count
def print_nodes(node, msg='--', separator='->'):
r = ''
while node is not None:
r += str(node.data) + separator
node = node.nxt
if len(separator) > 0:
print(msg, r[0:-1 * len(separator)])
else:
print(msg, r)
def print_node_mem(node, msg='--'):
while node is not None:
print(node, end='-')
node = node.nxt
if __name__ == "__main__":
head = Node(1)
n2 = head.add(2)
head.add(3)
print_nodes(head)
print_nodes(n2)
| class Node:
def __init__(self, data):
self.data = data
self.nxt = None
def add(self, data):
nxt = self
while nxt.nxt is not None:
nxt = nxt.nxt
nxt.nxt = node(data)
return nxt.nxt
def join(self, node):
self.nxt = node
def get_size(n):
count = 1
while n.nxt is not None:
count += 1
n = n.nxt
return count
def print_nodes(node, msg='--', separator='->'):
r = ''
while node is not None:
r += str(node.data) + separator
node = node.nxt
if len(separator) > 0:
print(msg, r[0:-1 * len(separator)])
else:
print(msg, r)
def print_node_mem(node, msg='--'):
while node is not None:
print(node, end='-')
node = node.nxt
if __name__ == '__main__':
head = node(1)
n2 = head.add(2)
head.add(3)
print_nodes(head)
print_nodes(n2) |
'''
Tuple - An ordered set of data
1. They are immutable, not changeable*.
2. Parenthesis are not necessary, it is there only for avoiding syntactic ambiguity(i.e x=1,2 is the same as x=(1,2s))
3. t = 'a', 'b', 'c' 3-ary tuple
print(t)
We need to make the things good.
4. We can access them like lists using []. But don't try to change em
5. We can mix different data types.
6. We can update tuples by just reassigning them to the tuple with data changed
7. We have equality associativity from Right to Left
8. Tuples are immutable in order to avoid errors(be robust) - philosophy.
9. Tuples are useful for records, not for actively changing data.
10. We can extract values of the tuple(This is called tuple unpacking)
a. a, b, c = tuple_name # Number of values SHOULD be the same as len(tuple)
b. We can assign the same values to multiple things
c. Don't use together on the same line
e.g a = b, c = 1, 3
a = (1, 3)
b = 1
c = 3
Not intuitive
11. Tuples can contain anything inside, tuples lists etc, Changing these 'inside' lists is allowed.
a = (1, [1, 2])
a[1].append(3) # -> (1 , [1,2,3])
this is allowed - the tuple stores the data structures's reference only.
It is useful in many ways.
12. It is useful to make a tuple so that relationships between variables is intuitive.
13. We can print any tuple, so they can be passed as it is to .format()
-------------------------
Binary Number Systems:
We can specify the number system and the decimal at last(but not together)
1. Use x for hex, o for oct and b for binary - small letters strictly
2. For representing in decimal 0b101001, 0xAF24, 0o137
3. For converting from decimal to other systems do int(str(hex(i))), or bin(i) or oct(i) - All are strings.
'''
| """
Tuple - An ordered set of data
1. They are immutable, not changeable*.
2. Parenthesis are not necessary, it is there only for avoiding syntactic ambiguity(i.e x=1,2 is the same as x=(1,2s))
3. t = 'a', 'b', 'c' 3-ary tuple
print(t)
We need to make the things good.
4. We can access them like lists using []. But don't try to change em
5. We can mix different data types.
6. We can update tuples by just reassigning them to the tuple with data changed
7. We have equality associativity from Right to Left
8. Tuples are immutable in order to avoid errors(be robust) - philosophy.
9. Tuples are useful for records, not for actively changing data.
10. We can extract values of the tuple(This is called tuple unpacking)
a. a, b, c = tuple_name # Number of values SHOULD be the same as len(tuple)
b. We can assign the same values to multiple things
c. Don't use together on the same line
e.g a = b, c = 1, 3
a = (1, 3)
b = 1
c = 3
Not intuitive
11. Tuples can contain anything inside, tuples lists etc, Changing these 'inside' lists is allowed.
a = (1, [1, 2])
a[1].append(3) # -> (1 , [1,2,3])
this is allowed - the tuple stores the data structures's reference only.
It is useful in many ways.
12. It is useful to make a tuple so that relationships between variables is intuitive.
13. We can print any tuple, so they can be passed as it is to .format()
-------------------------
Binary Number Systems:
We can specify the number system and the decimal at last(but not together)
1. Use x for hex, o for oct and b for binary - small letters strictly
2. For representing in decimal 0b101001, 0xAF24, 0o137
3. For converting from decimal to other systems do int(str(hex(i))), or bin(i) or oct(i) - All are strings.
""" |
"""
In this exercise you are helping your younger sister edit her paper for school.
The teacher is looking for correct punctuation, grammar, and excellent word choice.
You have four tasks to clean up and modify strings.
"""
def capitalize_title(title: str) -> str:
"""
:param title: str title string that needs title casing
:return: str title string in title case (first letters capitalized)
"""
return title.title()
def check_sentence_ending(sentence: str) -> bool:
"""
:param sentence: str a sentence to check.
:return: bool True if punctuated correctly with period, False otherwise.
"""
return sentence.endswith('.')
def clean_up_spacing(sentence: str) -> str:
"""
:param sentence: str a sentence to clean of leading and trailing space characters.
:return: str a sentence that has been cleaned of leading and trailing space characters.
"""
return sentence.strip()
def replace_word_choice(sentence: str, old_word: str, new_word: str) -> str:
"""
:param sentence: str a sentence to replace words in.
:param new_word: str replacement word
:param old_word: str word to replace
:return: str input sentence with new words in place of old words
"""
return sentence.replace(old_word, new_word)
| """
In this exercise you are helping your younger sister edit her paper for school.
The teacher is looking for correct punctuation, grammar, and excellent word choice.
You have four tasks to clean up and modify strings.
"""
def capitalize_title(title: str) -> str:
"""
:param title: str title string that needs title casing
:return: str title string in title case (first letters capitalized)
"""
return title.title()
def check_sentence_ending(sentence: str) -> bool:
"""
:param sentence: str a sentence to check.
:return: bool True if punctuated correctly with period, False otherwise.
"""
return sentence.endswith('.')
def clean_up_spacing(sentence: str) -> str:
"""
:param sentence: str a sentence to clean of leading and trailing space characters.
:return: str a sentence that has been cleaned of leading and trailing space characters.
"""
return sentence.strip()
def replace_word_choice(sentence: str, old_word: str, new_word: str) -> str:
"""
:param sentence: str a sentence to replace words in.
:param new_word: str replacement word
:param old_word: str word to replace
:return: str input sentence with new words in place of old words
"""
return sentence.replace(old_word, new_word) |
with open('./Gonduls/13/input.txt', 'r') as inputf:
lista= list(inputf.read().split('\n'))
lista[1] = lista[1].split(',')
buses =[]
for i, elem in enumerate(lista[1]):
if (elem != 'x'):
buses.append([int(elem), i, True])
times = 0
step = 1
i = 0
notfound= True
while(notfound):
# checks if i is final number: inside map returns result of i+minutes_offset % ele in buses,
# outside map returns list of Trues if inside map is all zeros ([0, 0, 0, 0, ...]), all finishes the job
if all(map(lambda el: el==0, map(lambda ele: (i+ele[1])%ele[0], buses))):
break
# works because if i+minutes_offset % bus == 0 => (step*bus + i+minutes_offset)% bus == 0,
# where step can be set so this works for any number of buses, then step = step*bus
for bus in buses:
if (bus[2] and (i+bus[1])%bus[0]==0):
bus[2] = False
step *= bus[0]
i += step
print(i) | with open('./Gonduls/13/input.txt', 'r') as inputf:
lista = list(inputf.read().split('\n'))
lista[1] = lista[1].split(',')
buses = []
for (i, elem) in enumerate(lista[1]):
if elem != 'x':
buses.append([int(elem), i, True])
times = 0
step = 1
i = 0
notfound = True
while notfound:
if all(map(lambda el: el == 0, map(lambda ele: (i + ele[1]) % ele[0], buses))):
break
for bus in buses:
if bus[2] and (i + bus[1]) % bus[0] == 0:
bus[2] = False
step *= bus[0]
i += step
print(i) |
exit_list= [3602, 1174, 1194, 818, 878, 4296]
total_example = 0
for number in exit_list:
total_example += number
for index, number in enumerate(exit_list):
print("layer:", index+1, "exit %:", number/total_example*100) | exit_list = [3602, 1174, 1194, 818, 878, 4296]
total_example = 0
for number in exit_list:
total_example += number
for (index, number) in enumerate(exit_list):
print('layer:', index + 1, 'exit %:', number / total_example * 100) |
def multiply1(x,y):
n = len(x)
if (n==1):
return x[0]*y[0]
s = int(n/2)
xl = x[0:s]
xh = x[s:]
yl = y[0:s]
yh = y[s:]
p1 = multiply(xl,yl)
p2 = multiply(xh,yh)
xz = [x1 + x2 for x1, x2 in zip(xl, xh)]
yz = [y1 + y2 for y1, y2 in zip(yl, yh)]
p3 = multiply(xz,yz)
if isinstance(p2, list):
t2 = [p3t -p2t - p1t for p1t, p2t, p3t in zip(p1,p2,p3 )]
else:
t2 = p3-p2-p1
return [p1,t2,p2]
def multiply(X,Y):
if ((len(X)==1) or (len(X)==2)):
return (multiply1(X,Y))
elif (len(X)==4):
p1,p2,p3 = multiply1(X,Y)
return ([p1[0],p1[1],(p1[2]+p2[0]),p2[1],(p2[2]+p3[0]),p3[1],p3[2]])
else:
print("polnomial order must be 1, 2, or 4")
return -1
x=[4,7,2,5]
y=[1,3,9,2]
print(multiply(x,y))
| def multiply1(x, y):
n = len(x)
if n == 1:
return x[0] * y[0]
s = int(n / 2)
xl = x[0:s]
xh = x[s:]
yl = y[0:s]
yh = y[s:]
p1 = multiply(xl, yl)
p2 = multiply(xh, yh)
xz = [x1 + x2 for (x1, x2) in zip(xl, xh)]
yz = [y1 + y2 for (y1, y2) in zip(yl, yh)]
p3 = multiply(xz, yz)
if isinstance(p2, list):
t2 = [p3t - p2t - p1t for (p1t, p2t, p3t) in zip(p1, p2, p3)]
else:
t2 = p3 - p2 - p1
return [p1, t2, p2]
def multiply(X, Y):
if len(X) == 1 or len(X) == 2:
return multiply1(X, Y)
elif len(X) == 4:
(p1, p2, p3) = multiply1(X, Y)
return [p1[0], p1[1], p1[2] + p2[0], p2[1], p2[2] + p3[0], p3[1], p3[2]]
else:
print('polnomial order must be 1, 2, or 4')
return -1
x = [4, 7, 2, 5]
y = [1, 3, 9, 2]
print(multiply(x, y)) |
b = "this is file 'b'"
def b_func():
inside_b_func = 'inside b_func()'
print("b")
| b = "this is file 'b'"
def b_func():
inside_b_func = 'inside b_func()'
print('b') |
# Copyright 2021 Edoardo Riggio
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
class Queue:
"""Class for the fixed-size Queue data structure. It contains the data and
metadata of the Queue.
"""
queue: list
length: int
tail: int
head: int
empty: bool
full: bool
def __init__(self, length):
self.queue = [None] * length
self.length = length
self.head = self.tail = 0
self.empty = True
self.full = False
def enqueue(self, value):
"""Insert the given value at the tail pointer of the Queue, return
error if overflow occurs.
Args:
value (void): a value to be inserted into the Queue
"""
if not self.full:
self.queue[self.tail] = value
self.tail = (self.tail + 1) % self.length
self.empty = False
elif self.full:
print("OVERFLOW")
return
self.full = self.tail == self.head
def dequeue(self):
"""Remove the item to which 'head' is pointing from the Queue.
Returns:
void: the removed element
"""
if not self.empty:
value = self.queue[self.head]
self.queue[self.head] = None
self.head = (self.head + 1) % self.length
self.full = False
elif self.empty:
print("UNDERFLOW")
return
self.empty = self.head == self.tail
return value
| class Queue:
"""Class for the fixed-size Queue data structure. It contains the data and
metadata of the Queue.
"""
queue: list
length: int
tail: int
head: int
empty: bool
full: bool
def __init__(self, length):
self.queue = [None] * length
self.length = length
self.head = self.tail = 0
self.empty = True
self.full = False
def enqueue(self, value):
"""Insert the given value at the tail pointer of the Queue, return
error if overflow occurs.
Args:
value (void): a value to be inserted into the Queue
"""
if not self.full:
self.queue[self.tail] = value
self.tail = (self.tail + 1) % self.length
self.empty = False
elif self.full:
print('OVERFLOW')
return
self.full = self.tail == self.head
def dequeue(self):
"""Remove the item to which 'head' is pointing from the Queue.
Returns:
void: the removed element
"""
if not self.empty:
value = self.queue[self.head]
self.queue[self.head] = None
self.head = (self.head + 1) % self.length
self.full = False
elif self.empty:
print('UNDERFLOW')
return
self.empty = self.head == self.tail
return value |
'''
MIT License
Copyright (c) 2019 Keith Christopher Cronin
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
'''
_parseddictionary = {}
_hasreadxdf = False
debug = False
def readxdf(filepath, data=None, markercharacter='@', listseparatormarker=','):
global _hasreadxdf
isonproperty = False
isonpropertyvalue = False
isonequal = False
isonmarker = True
position = 0
propertyvaluebuffer = []
propertybuffer = []
global _parseddictionary
propertystartindex = 0
propertyendindex = 0
propertyvaluestartindex = 0
propertyvalueendindex = 0
propwasmarked = False
propvaluewasmarked = False
propertyname = ''
lastlistsepposition = 0
haslist = False
propertyvaluelistbuffer = []
if filepath is not None:
try:
file = open(filepath, 'r')
data = file.read()
file.close()
except PermissionError:
return False
except OSError:
return False
if len(data) == 0:
return False
if data[0] != markercharacter or _hasreadxdf or len(markercharacter) != 1:
return False
else:
for character in data:
if isonproperty:
if propwasmarked == False:
propertystartindex = position
propwasmarked = True
elif character == listseparatormarker:
return False
else:
pass
if character == '=':
isonpropertyvalue = True
isonproperty = False
propertyendindex = position
propertyname = data[propertystartindex:propertyendindex].strip('\n')
propertyvaluestartindex = position + 1
if isonpropertyvalue:
if character == markercharacter or position == len(data)-1 and not haslist:
isonmarker = True
propertyvalueendindex = position
_parseddictionary[propertyname] = data[propertyvaluestartindex:propertyvalueendindex].strip('\n')
propwasmarked = False
if position == len(data)-1 and not haslist:
_parseddictionary[propertyname] = data[propertyvaluestartindex:propertyvalueendindex+1].strip('\n')
elif character == listseparatormarker and not haslist:
haslist = True
propertyvaluelistbuffer.append(data[propertyendindex+1:position].strip(F"{listseparatormarker}\n"))
lastlistsepposition = position
elif character == listseparatormarker and haslist:
propertyvaluelistbuffer.append(data[lastlistsepposition+1:position].strip(F"{listseparatormarker}\n"))
lastlistsepposition = position
if haslist and position == len(data)-1:
propertyvaluelistbuffer.append(data[lastlistsepposition+1:position+1].strip(F"{listseparatormarker}\n"))
_parseddictionary[propertyname] = propertyvaluelistbuffer
propertyvaluelistbuffer = []
lastlistsepposition = 0
haslist = False
if character == markercharacter and haslist:
propertyvaluelistbuffer.append(data[lastlistsepposition+1:position].strip(F"{listseparatormarker}\n"))
_parseddictionary[propertyname] = propertyvaluelistbuffer
propertyvaluelistbuffer = []
lastlistsepposition = 0
haslist = False
else:
pass
if isonmarker:
isonproperty = True
isonmarker = False
position += 1
_hasreadxdf = True
return True
def reset():
global debug
_hasreadxdf = False
_parseddictionary.clear()
if debug:
_tellcurrentparserdictionary()
return True
def getproperty(propertystring):
if propertystring in _parseddictionary:
return _parseddictionary[propertystring]
else:
return False
def setproperty(propertystring, propertyvalue):
_parseddictionary[propertystring] = propertyvalue
return True
def appendtoproperty(propertystring, propertyvalue):
if propertystring in _parseddictionary:
_parseddictionary[propertystring] += F",{propertyvalue}"
return True
else:
return False
def writexdf(filepath, propertydictionary, markercharacter='@', listseparatormarker=','):
if markercharacter == listseparatormarker:
return False
listelementcounter = 0
try:
file = open(filepath,'w')
for key in propertydictionary:
if isinstance(propertydictionary[key], list):
file.write(markercharacter+key+'=')
for element in propertydictionary[key]:
if listelementcounter != len(propertydictionary[key]) - 1:
file.write(element+listseparatormarker)
else:
file.write(element+'\n')
listelementcounter += 1
listelementcounter = 0
else:
file.write(markercharacter+key+'='+str(propertydictionary[key])+'\n')
file.close()
return True
except PermissionError:
return False
except OSError:
return False
def getcurrentdata():
if len(_parseddictionary) < 1:
return False
else:
return _parseddictionary
def _tellcurrentparserdictionary():
print(F"Listing {len(_parseddictionary)} properties and values in memory: \n{_parseddictionary}")
| """
MIT License
Copyright (c) 2019 Keith Christopher Cronin
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
"""
_parseddictionary = {}
_hasreadxdf = False
debug = False
def readxdf(filepath, data=None, markercharacter='@', listseparatormarker=','):
global _hasreadxdf
isonproperty = False
isonpropertyvalue = False
isonequal = False
isonmarker = True
position = 0
propertyvaluebuffer = []
propertybuffer = []
global _parseddictionary
propertystartindex = 0
propertyendindex = 0
propertyvaluestartindex = 0
propertyvalueendindex = 0
propwasmarked = False
propvaluewasmarked = False
propertyname = ''
lastlistsepposition = 0
haslist = False
propertyvaluelistbuffer = []
if filepath is not None:
try:
file = open(filepath, 'r')
data = file.read()
file.close()
except PermissionError:
return False
except OSError:
return False
if len(data) == 0:
return False
if data[0] != markercharacter or _hasreadxdf or len(markercharacter) != 1:
return False
else:
for character in data:
if isonproperty:
if propwasmarked == False:
propertystartindex = position
propwasmarked = True
elif character == listseparatormarker:
return False
else:
pass
if character == '=':
isonpropertyvalue = True
isonproperty = False
propertyendindex = position
propertyname = data[propertystartindex:propertyendindex].strip('\n')
propertyvaluestartindex = position + 1
if isonpropertyvalue:
if character == markercharacter or (position == len(data) - 1 and (not haslist)):
isonmarker = True
propertyvalueendindex = position
_parseddictionary[propertyname] = data[propertyvaluestartindex:propertyvalueendindex].strip('\n')
propwasmarked = False
if position == len(data) - 1 and (not haslist):
_parseddictionary[propertyname] = data[propertyvaluestartindex:propertyvalueendindex + 1].strip('\n')
elif character == listseparatormarker and (not haslist):
haslist = True
propertyvaluelistbuffer.append(data[propertyendindex + 1:position].strip(f'{listseparatormarker}\n'))
lastlistsepposition = position
elif character == listseparatormarker and haslist:
propertyvaluelistbuffer.append(data[lastlistsepposition + 1:position].strip(f'{listseparatormarker}\n'))
lastlistsepposition = position
if haslist and position == len(data) - 1:
propertyvaluelistbuffer.append(data[lastlistsepposition + 1:position + 1].strip(f'{listseparatormarker}\n'))
_parseddictionary[propertyname] = propertyvaluelistbuffer
propertyvaluelistbuffer = []
lastlistsepposition = 0
haslist = False
if character == markercharacter and haslist:
propertyvaluelistbuffer.append(data[lastlistsepposition + 1:position].strip(f'{listseparatormarker}\n'))
_parseddictionary[propertyname] = propertyvaluelistbuffer
propertyvaluelistbuffer = []
lastlistsepposition = 0
haslist = False
else:
pass
if isonmarker:
isonproperty = True
isonmarker = False
position += 1
_hasreadxdf = True
return True
def reset():
global debug
_hasreadxdf = False
_parseddictionary.clear()
if debug:
_tellcurrentparserdictionary()
return True
def getproperty(propertystring):
if propertystring in _parseddictionary:
return _parseddictionary[propertystring]
else:
return False
def setproperty(propertystring, propertyvalue):
_parseddictionary[propertystring] = propertyvalue
return True
def appendtoproperty(propertystring, propertyvalue):
if propertystring in _parseddictionary:
_parseddictionary[propertystring] += f',{propertyvalue}'
return True
else:
return False
def writexdf(filepath, propertydictionary, markercharacter='@', listseparatormarker=','):
if markercharacter == listseparatormarker:
return False
listelementcounter = 0
try:
file = open(filepath, 'w')
for key in propertydictionary:
if isinstance(propertydictionary[key], list):
file.write(markercharacter + key + '=')
for element in propertydictionary[key]:
if listelementcounter != len(propertydictionary[key]) - 1:
file.write(element + listseparatormarker)
else:
file.write(element + '\n')
listelementcounter += 1
listelementcounter = 0
else:
file.write(markercharacter + key + '=' + str(propertydictionary[key]) + '\n')
file.close()
return True
except PermissionError:
return False
except OSError:
return False
def getcurrentdata():
if len(_parseddictionary) < 1:
return False
else:
return _parseddictionary
def _tellcurrentparserdictionary():
print(f'Listing {len(_parseddictionary)} properties and values in memory: \n{_parseddictionary}') |
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def sumOfLeftLeaves(self, root: Optional[TreeNode]) -> int:
stack=[(root, 1)]
output=0
while(stack):
node, where = stack.pop(0)
if where==0 and not node.left and not node.right:
output+=node.val
if node.left:
stack.append((node.left, 0))
if node.right:
stack.append((node.right, 1))
return output
| class Solution:
def sum_of_left_leaves(self, root: Optional[TreeNode]) -> int:
stack = [(root, 1)]
output = 0
while stack:
(node, where) = stack.pop(0)
if where == 0 and (not node.left) and (not node.right):
output += node.val
if node.left:
stack.append((node.left, 0))
if node.right:
stack.append((node.right, 1))
return output |
class Solution(object):
def minSubArrayLen(self, s, nums):
"""
:type s: int
:type nums: List[int]
:rtype: int
"""
i=0
t=0
if not nums:
return 0
res=None
for j,x in enumerate(nums):
t+=x
while t>=s:
res=min(res,j-i+1) if res else j-i+1
t-=nums[i]
i+=1
return res if res else 0 | class Solution(object):
def min_sub_array_len(self, s, nums):
"""
:type s: int
:type nums: List[int]
:rtype: int
"""
i = 0
t = 0
if not nums:
return 0
res = None
for (j, x) in enumerate(nums):
t += x
while t >= s:
res = min(res, j - i + 1) if res else j - i + 1
t -= nums[i]
i += 1
return res if res else 0 |
class DataTypeTemplate(object):
"""Defines a DataType template.
The template defines a name and all the paths to the "data" folders in a KiProject.
"""
_templates = []
def __init__(self, name, description, paths, is_default=False):
"""Instantiates a new instance.
Args:
name: The friendly name of the template.
description: A description of the template.
paths: The paths contained in the template.
is_default: True if this is the default template otherwise False.
"""
self.name = name
self.description = description
self.paths = paths
self.is_default = is_default
@classmethod
def all(cls):
"""Gets all the templates."""
return cls._templates
@classmethod
def default(cls):
"""Gets the default template."""
return next(d for d in cls._templates if d.is_default)
@classmethod
def register(cls, template):
"""Registers a template so it can be used.
Args:
template: The template to register.
Returns:
None
"""
cls._templates.append(template)
@classmethod
def get(cls, name):
"""Gets a template by name.
Args:
name: The name of the template top get.
Returns:
The template or None.
"""
return next((t for t in cls._templates if t.name == name), None)
class DataTypeTemplatePath(object):
"""Defines a name and path in a DataTypeTemplate"""
def __init__(self, name, rel_path):
"""Instantiates a new instance.
Args:
name: The friendly name of the path.
rel_path: The relative path to the directory for the path.
"""
self.name = name
self.rel_path = rel_path
| class Datatypetemplate(object):
"""Defines a DataType template.
The template defines a name and all the paths to the "data" folders in a KiProject.
"""
_templates = []
def __init__(self, name, description, paths, is_default=False):
"""Instantiates a new instance.
Args:
name: The friendly name of the template.
description: A description of the template.
paths: The paths contained in the template.
is_default: True if this is the default template otherwise False.
"""
self.name = name
self.description = description
self.paths = paths
self.is_default = is_default
@classmethod
def all(cls):
"""Gets all the templates."""
return cls._templates
@classmethod
def default(cls):
"""Gets the default template."""
return next((d for d in cls._templates if d.is_default))
@classmethod
def register(cls, template):
"""Registers a template so it can be used.
Args:
template: The template to register.
Returns:
None
"""
cls._templates.append(template)
@classmethod
def get(cls, name):
"""Gets a template by name.
Args:
name: The name of the template top get.
Returns:
The template or None.
"""
return next((t for t in cls._templates if t.name == name), None)
class Datatypetemplatepath(object):
"""Defines a name and path in a DataTypeTemplate"""
def __init__(self, name, rel_path):
"""Instantiates a new instance.
Args:
name: The friendly name of the path.
rel_path: The relative path to the directory for the path.
"""
self.name = name
self.rel_path = rel_path |
config = {}
def set_config(conf):
global config
config = conf
def get_config():
global config
return config
def get_full_url(relative_url):
return '%s/api/%s/%s' % (config['HOST'], config['API_VERSION'], relative_url)
def get_headers():
return {
'Accept': 'application/json',
# 'Authorization': 'JWT %s' % (config['TOKEN']),
'X-BC-AUTH': config['TOKEN'],
'Content-Type': 'application/json',
}
| config = {}
def set_config(conf):
global config
config = conf
def get_config():
global config
return config
def get_full_url(relative_url):
return '%s/api/%s/%s' % (config['HOST'], config['API_VERSION'], relative_url)
def get_headers():
return {'Accept': 'application/json', 'X-BC-AUTH': config['TOKEN'], 'Content-Type': 'application/json'} |
class UsiError(Exception):
def __init__(self, message, error_code):
self.message = message
self.error_code = error_code
| class Usierror(Exception):
def __init__(self, message, error_code):
self.message = message
self.error_code = error_code |
# -*- coding: UTF-8 -*-
# Copyright 2017 Luc Saffre
# License: BSD (see file COPYING for details)
"""Extended and specific plugins for Lino Noi.
.. autosummary::
:toctree:
contacts
amici
"""
| """Extended and specific plugins for Lino Noi.
.. autosummary::
:toctree:
contacts
amici
""" |
###
# range()
###
# 1. create a list of integers from 0 to n
# l = list(range(10))
# print(l)
# # 2. create a list of integers from 3 to 10
# l2 = list(range(3,10))
# print(l2)
# # 3. create a list of integers from 0, 10 with step size of 2
# # 0, 2, 4, ...
# l3 = list(range(0,10,2))
# print(l3)
# # 4. create a list of integers from 10 to 1
# l4 = list(range(10,0,-1))
# print(l4)
# create a list of integers from 0, n with step size of k
# l = list(range(0, n, k))
# create a list of integers from 10 to 0
# l5 = list(range(10,-1,-1))
# range(start_position=0, end_position, step_size=1)
# by default
#############################
##############################
l = list(range(10))
# print(l)
# [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
# # [0, 1, 2, 3, 4]
# # [5, 6, 7, 8, 9]
# print(l[:5])
# print(l[5:])
# # reverse the list [4,3,2,1,0] -> [4,3,2,1]
# print(l[-1:-11:-1])
# print [0,1,8,9]
# l = [1,2,3]
# l2 = [5,4,7]
# print(l+l2)
# l.extend(l2)
# print(l)
# # print(l[:2]+l[9:])
# l.append(10)
# l.pop(6)
# l.insert(0,50)
# https://developers.google.com/edu/python
| l = list(range(10)) |
class ZenHttpException(Exception):
"""Exception with HTTP status code."""
def __init__(self, status):
"""Creates an instance.
Args:
status (int): HTTP status code.
"""
self.status = status
| class Zenhttpexception(Exception):
"""Exception with HTTP status code."""
def __init__(self, status):
"""Creates an instance.
Args:
status (int): HTTP status code.
"""
self.status = status |
# Definition for a binary tree node.
class TreeNode:
def __init__(self, val=0, left=None, right=None):
self.val = val
self.left = left
self.right = right
# 1. Linear Time
class Solution:
def countNodes(self, root: TreeNode) -> int:
return 1 + self.countNodes(root.right) + self.countNodes(root.left) if root else 0
# 2. Better Solution
class Solution:
def countNodes(self, root: TreeNode) -> int:
if not root:
return 0
self.last_level_count = 0
self.level = 0
# Stop flag to end searching
self.stop = 0
# Start with -1 since the searching ends on the children of leafs (None)
# Make -1 offset then self.level can be the real value
self.dfs(root, -1)
return 2 ** self.level - 1 + self.last_level_count // 2
def dfs(self, node, level):
if self.stop:
return
if not node:
self.level = max(self.level, level)
# If the reaches the final level, then count 1
# Note this is actually counting for # of children (None) of final level nodes
if self.level == level:
self.last_level_count += 1
else:
self.stop = 1
return
self.dfs(node.left, level + 1)
self.dfs(node.right, level + 1)
# 3. Binary Search
class Solution:
def countNodes(self, root: TreeNode) -> int:
if not root:
return 0
# Find tree final level (Tree Height)
self.root = root
node = root
self.level = -1
while node:
node = node.left
self.level += 1
# Start Binary Search
left = 0
right = 2 ** self.level - 1
# If it's full binary tree then directly return # nodes
if self.check_node(right):
return 2 ** self.level + right
while left < right - 1:
mid = (left + right) // 2
if self.check_node(mid):
left = mid
else:
right = mid
return 2 ** self.level + left
def check_node(self, idx):
node = self.root
# The order if search path could be regarded as binary value converted from index
# Make sure the len(order) = self.level
order = format(idx, '0{}b'.format(self.level))
for num in order:
if num == '0':
node = node.left
else:
node = node.right
return True if node else False
| class Treenode:
def __init__(self, val=0, left=None, right=None):
self.val = val
self.left = left
self.right = right
class Solution:
def count_nodes(self, root: TreeNode) -> int:
return 1 + self.countNodes(root.right) + self.countNodes(root.left) if root else 0
class Solution:
def count_nodes(self, root: TreeNode) -> int:
if not root:
return 0
self.last_level_count = 0
self.level = 0
self.stop = 0
self.dfs(root, -1)
return 2 ** self.level - 1 + self.last_level_count // 2
def dfs(self, node, level):
if self.stop:
return
if not node:
self.level = max(self.level, level)
if self.level == level:
self.last_level_count += 1
else:
self.stop = 1
return
self.dfs(node.left, level + 1)
self.dfs(node.right, level + 1)
class Solution:
def count_nodes(self, root: TreeNode) -> int:
if not root:
return 0
self.root = root
node = root
self.level = -1
while node:
node = node.left
self.level += 1
left = 0
right = 2 ** self.level - 1
if self.check_node(right):
return 2 ** self.level + right
while left < right - 1:
mid = (left + right) // 2
if self.check_node(mid):
left = mid
else:
right = mid
return 2 ** self.level + left
def check_node(self, idx):
node = self.root
order = format(idx, '0{}b'.format(self.level))
for num in order:
if num == '0':
node = node.left
else:
node = node.right
return True if node else False |
class FeatureImportance(object):
def __init__(self, importance=0, importance_2=0, main_type='split'):
self.legal_type = ['split', 'gain']
assert main_type in self.legal_type, 'illegal importance type {}'.format(main_type)
self.importance = importance
self.importance_2 = importance_2
self.main_type = main_type
def add_gain(self, val):
if self.main_type == 'gain':
self.importance += val
else:
self.importance_2 += val
def add_split(self, val):
if self.main_type == 'split':
self.importance += val
else:
self.importance_2 += val
def __cmp__(self, other):
if self.importance > other.importance:
return 1
elif self.importance < other.importance:
return -1
else:
return 0
def __eq__(self, other):
return self.importance == other.importance
def __lt__(self, other):
return self.importance < other.importance
def __repr__(self):
return 'importance type: {}, importance: {}, importance2 {}'.format(self.main_type, self.importance,
self.importance_2)
def __add__(self, other):
new_importance = FeatureImportance(main_type=self.main_type, importance=self.importance+other.importance,
importance_2=self.importance_2+other.importance_2)
return new_importance
| class Featureimportance(object):
def __init__(self, importance=0, importance_2=0, main_type='split'):
self.legal_type = ['split', 'gain']
assert main_type in self.legal_type, 'illegal importance type {}'.format(main_type)
self.importance = importance
self.importance_2 = importance_2
self.main_type = main_type
def add_gain(self, val):
if self.main_type == 'gain':
self.importance += val
else:
self.importance_2 += val
def add_split(self, val):
if self.main_type == 'split':
self.importance += val
else:
self.importance_2 += val
def __cmp__(self, other):
if self.importance > other.importance:
return 1
elif self.importance < other.importance:
return -1
else:
return 0
def __eq__(self, other):
return self.importance == other.importance
def __lt__(self, other):
return self.importance < other.importance
def __repr__(self):
return 'importance type: {}, importance: {}, importance2 {}'.format(self.main_type, self.importance, self.importance_2)
def __add__(self, other):
new_importance = feature_importance(main_type=self.main_type, importance=self.importance + other.importance, importance_2=self.importance_2 + other.importance_2)
return new_importance |
# By default the LibriSpeech corpus is set.
path_to_corpus = '../audio_data/LibriSpeech/'
# By default librispeech file-name has been set. Please modify if you are using some other corpus
speaker_meta_info_file_name='SPEAKERS.TXT'
# Each of the subset will have deifferent output sub-folder identified by subset-type
output_folder='./output/'
#Word Meta_info_file path
path_to_word_meta_info='./word_meta_info/'
#Utterance_Level_meta_info path
path_to_utt_meta_info='./utt_meta_info/'
# log-file path
path_to_log_file = './log/'
#Google-API-KEY file is required to run Google Cloud ASR
path_to_google_api_key='../Google_API_Key/api-key.json' | path_to_corpus = '../audio_data/LibriSpeech/'
speaker_meta_info_file_name = 'SPEAKERS.TXT'
output_folder = './output/'
path_to_word_meta_info = './word_meta_info/'
path_to_utt_meta_info = './utt_meta_info/'
path_to_log_file = './log/'
path_to_google_api_key = '../Google_API_Key/api-key.json' |
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, x):
# self.val = x
# self.next = None
class Solution:
def getDecimalValue(self, head: ListNode) -> int:
ans = 0
while head:
ans = 2*ans + head.val
head = head.next
return ans | class Solution:
def get_decimal_value(self, head: ListNode) -> int:
ans = 0
while head:
ans = 2 * ans + head.val
head = head.next
return ans |
def MySort(UnsortedArray):
n=len(UnsortedArray)
if n==1:
SortedArray=UnsortedArray
else:
midpoint=n//2
Array1=MySort(UnsortedArray[0:midpoint])
Array2=MySort(UnsortedArray[midpoint:n])
i=0;
j=0;
SortedArray=[]
while i<midpoint and j<n-midpoint:
if Array1[i]<Array2[j]:
SortedArray.append(Array1[i])
i+=1
else:
SortedArray.append(Array2[j])
j+=1
if i==midpoint:
SortedArray+=Array2[j:(n-midpoint)]
else:
SortedArray+=Array1[i:midpoint]
return SortedArray
MyInput=[95,33,7,87,665,4,2,5,4,8,56,5,13,45,6,87,34,345,1,6,7,67,434,53,24,64]
print(MySort(MyInput))
| def my_sort(UnsortedArray):
n = len(UnsortedArray)
if n == 1:
sorted_array = UnsortedArray
else:
midpoint = n // 2
array1 = my_sort(UnsortedArray[0:midpoint])
array2 = my_sort(UnsortedArray[midpoint:n])
i = 0
j = 0
sorted_array = []
while i < midpoint and j < n - midpoint:
if Array1[i] < Array2[j]:
SortedArray.append(Array1[i])
i += 1
else:
SortedArray.append(Array2[j])
j += 1
if i == midpoint:
sorted_array += Array2[j:n - midpoint]
else:
sorted_array += Array1[i:midpoint]
return SortedArray
my_input = [95, 33, 7, 87, 665, 4, 2, 5, 4, 8, 56, 5, 13, 45, 6, 87, 34, 345, 1, 6, 7, 67, 434, 53, 24, 64]
print(my_sort(MyInput)) |
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
class Solution:
def reverseList1(self, head: Optional[ListNode]) -> Optional[ListNode]:
new_head = None
node = head
while node: # 3 -> 4 -> 5
next_node = node.next # 3
node.next = new_head # 2-> 1-> 0
new_head = node # 2-> 1-> 0
node = next_node
return new_head
def reverseList(self, head: Optional[ListNode]) -> Optional[ListNode]:
new_head, node = self.reverse(head)
return new_head
def reverse(self, head: Optional[ListNode]) -> Optional[ListNode]: # 5 -> 4 -> 3 -> 2 -> 1
if not head:
return head, head
if head.next:
new_head, node = self.reverse(head.next)
node.next = head
head.next = None
return new_head, node.next
return head, head | class Solution:
def reverse_list1(self, head: Optional[ListNode]) -> Optional[ListNode]:
new_head = None
node = head
while node:
next_node = node.next
node.next = new_head
new_head = node
node = next_node
return new_head
def reverse_list(self, head: Optional[ListNode]) -> Optional[ListNode]:
(new_head, node) = self.reverse(head)
return new_head
def reverse(self, head: Optional[ListNode]) -> Optional[ListNode]:
if not head:
return (head, head)
if head.next:
(new_head, node) = self.reverse(head.next)
node.next = head
head.next = None
return (new_head, node.next)
return (head, head) |
class Var(object) :
def __init__(self, name) :
self.name = name
def __str__(self) :
return str(self.name)
class Data(object) :
def __init__(self, x) :
self.x = x
def __str__(self) :
return str(self.x)
class Fun(object) :
def __init__(self, var, body) :
self.var = var
self.body = body
def __str__(self) :
return "function(" + str(self.var) + ")" + str(self.body)
class Prim(object) :
def __init__(self, op, args) :
self.op = op
self.args = args
self.ops = {'ADD':'+', 'SUB':'-', 'MUL':'*', 'DIV':'/', 'EQ':'==', 'NOTEQ':'!=', 'LT':'<', 'LTE':'<=', 'GT':'>', 'GTE':'>=', 'AND':'&&', 'OR':'||', 'NOT':'!'}
def __str__(self) :
if (self.op == "SEQ") :
return " ; ".join(map(str, self.args))
else :
return "(" + str(self.args[0]) + " " + self.ops[self.op] + " " + str(self.args[1]) + ")"
class Prop(object) :
def __init__(self, base, field) :
self.base = base
self.field = field
def __str__(self) :
return str(self.base) + "." + self.field
class Assign(object) :
def __init__(self, op, target, source) :
self.op = op
self.target = target
self.source = source
def __str__(self) :
return str(self.target) + " " + str(self.op) + "=" + str(self.source)
class Let(object) :
def __init__(self, var, expression, body) :
self.var = var
self.expression = expression
self.body = body
def __str__(self) :
return "var " + str(self.var) + "=" + str(self.expression) + "; " + str(self.body)
class If(object) :
def __init__(self, condition, thenExp, elseExp) :
self.condition = condition
self.thenExp = thenExp
self.elseExp = elseExp
def __str__(self) :
return "if (" + str(self.condition) + ") {" + str(thenExp) + "} else {" + str(self.elseExp) + "}"
class Loop(object) :
def __init__(self, var, collection, body) :
self.var = var
self.collection = collection
self.body = body
def __str__(self) :
#if (type(self.collection) == Out) : # Assume it is an output
# var = self.collection.location
# collection = self.collection.expression
#else :
# var = self.var
# collection = self.collection
#return "for (" + str(var) + " in " + str(collection) + ") {" + str(self.body) + "}"
return "for (" + str(self.var) + " in " + str(self.collection) + ") {" + str(self.body) + "}"
class Call(object) :
def __init__(self, target, method, args) :
self.target = target
self.method = method
self.args = args
def __str__(self) :
return str(self.target) + "." + str(self.method) + "(" + ",".join(map(str, self.args)) + ")"
class Out(object) :
def __init__(self, location, expression) :
self.location = location
self.expression = expression
def __str__(self) :
return "OUTPUT(" + '"' + str(self.location) + '",' + str(self.expression) + ")"
class In(object) :
def __init__(self, location) :
self.location = location
def __str__(self) :
return "INPUT(" + '"' + self.location + '")'
class Skip(object) :
def __init__(self) :
pass
def __str__(self) :
return "skip"
| class Var(object):
def __init__(self, name):
self.name = name
def __str__(self):
return str(self.name)
class Data(object):
def __init__(self, x):
self.x = x
def __str__(self):
return str(self.x)
class Fun(object):
def __init__(self, var, body):
self.var = var
self.body = body
def __str__(self):
return 'function(' + str(self.var) + ')' + str(self.body)
class Prim(object):
def __init__(self, op, args):
self.op = op
self.args = args
self.ops = {'ADD': '+', 'SUB': '-', 'MUL': '*', 'DIV': '/', 'EQ': '==', 'NOTEQ': '!=', 'LT': '<', 'LTE': '<=', 'GT': '>', 'GTE': '>=', 'AND': '&&', 'OR': '||', 'NOT': '!'}
def __str__(self):
if self.op == 'SEQ':
return ' ; '.join(map(str, self.args))
else:
return '(' + str(self.args[0]) + ' ' + self.ops[self.op] + ' ' + str(self.args[1]) + ')'
class Prop(object):
def __init__(self, base, field):
self.base = base
self.field = field
def __str__(self):
return str(self.base) + '.' + self.field
class Assign(object):
def __init__(self, op, target, source):
self.op = op
self.target = target
self.source = source
def __str__(self):
return str(self.target) + ' ' + str(self.op) + '=' + str(self.source)
class Let(object):
def __init__(self, var, expression, body):
self.var = var
self.expression = expression
self.body = body
def __str__(self):
return 'var ' + str(self.var) + '=' + str(self.expression) + '; ' + str(self.body)
class If(object):
def __init__(self, condition, thenExp, elseExp):
self.condition = condition
self.thenExp = thenExp
self.elseExp = elseExp
def __str__(self):
return 'if (' + str(self.condition) + ') {' + str(thenExp) + '} else {' + str(self.elseExp) + '}'
class Loop(object):
def __init__(self, var, collection, body):
self.var = var
self.collection = collection
self.body = body
def __str__(self):
return 'for (' + str(self.var) + ' in ' + str(self.collection) + ') {' + str(self.body) + '}'
class Call(object):
def __init__(self, target, method, args):
self.target = target
self.method = method
self.args = args
def __str__(self):
return str(self.target) + '.' + str(self.method) + '(' + ','.join(map(str, self.args)) + ')'
class Out(object):
def __init__(self, location, expression):
self.location = location
self.expression = expression
def __str__(self):
return 'OUTPUT(' + '"' + str(self.location) + '",' + str(self.expression) + ')'
class In(object):
def __init__(self, location):
self.location = location
def __str__(self):
return 'INPUT(' + '"' + self.location + '")'
class Skip(object):
def __init__(self):
pass
def __str__(self):
return 'skip' |
class Url:
"""
This module implements useful methods that manipulate urls, used in the
project.
"""
_github_main_page_url = 'https://github.com'
_googlecache_urlprefix = 'http://webcache.googleusercontent.com/search?q='
@staticmethod
def github_url(relative_url):
"""
Get the absolute url from the repository relative url
hosted on Github
"""
if type(relative_url) is str:
return f'{Url._github_main_page_url}/{relative_url}'
else:
raise ValueError('relative_url must be a string.')
@staticmethod
def cached(url):
"""
Get the google cached version of url
"""
if type(url) is str:
return f'{Url._googlecache_urlprefix}{url}'
else:
raise ValueError('url must be a string.')
| class Url:
"""
This module implements useful methods that manipulate urls, used in the
project.
"""
_github_main_page_url = 'https://github.com'
_googlecache_urlprefix = 'http://webcache.googleusercontent.com/search?q='
@staticmethod
def github_url(relative_url):
"""
Get the absolute url from the repository relative url
hosted on Github
"""
if type(relative_url) is str:
return f'{Url._github_main_page_url}/{relative_url}'
else:
raise value_error('relative_url must be a string.')
@staticmethod
def cached(url):
"""
Get the google cached version of url
"""
if type(url) is str:
return f'{Url._googlecache_urlprefix}{url}'
else:
raise value_error('url must be a string.') |
op = input()
ops = {}
for i in range(len(op)):
if op[i + 1] == ':':
ops[op[i]] = True
elif op[i + 1] != ':' and op != ':':
ops[op[i]] = False
n = int(input())
for idx in range(1, n + 1):
ans = ''
print("Case {0}: {1}".format(idx, ans))
| op = input()
ops = {}
for i in range(len(op)):
if op[i + 1] == ':':
ops[op[i]] = True
elif op[i + 1] != ':' and op != ':':
ops[op[i]] = False
n = int(input())
for idx in range(1, n + 1):
ans = ''
print('Case {0}: {1}'.format(idx, ans)) |
class Solution:
def minReorder(self, n: int, connections: List[List[int]]) -> int:
tree = [[] for _ in range(n)]
# a --> b
for a, b in connections:
tree[a].append((b, 1))
tree[b].append((a, 0))
self.ans = 0
def dfs(u, parent):
for v, d in tree[u]:
if v != parent:
if d == 1:
self.ans += 1
dfs(v, u)
dfs(0, -1)
return self.ans
| class Solution:
def min_reorder(self, n: int, connections: List[List[int]]) -> int:
tree = [[] for _ in range(n)]
for (a, b) in connections:
tree[a].append((b, 1))
tree[b].append((a, 0))
self.ans = 0
def dfs(u, parent):
for (v, d) in tree[u]:
if v != parent:
if d == 1:
self.ans += 1
dfs(v, u)
dfs(0, -1)
return self.ans |
# Examples to see class inheritance
class Car:
""" A class that models a real life car in a oversimplified way."""
def __init__(self, make, model, year):
"""Function to store key attributes of the car."""
self.make = make
self.model = model
self.year = year
self.odometer = 0
def describe_car(self):
"""Function to print the name of the car in a clear fashion."""
car_description = f"{self.year} {self.make} {self.model}"
return car_description.title()
def read_odometer(self):
"""Function to print the car's mileage"""
print(f"The {self.model} has {self.odometer} miles on it.")
def update_odometer(self, value):
"""Function to update the value of odometer and avoid rollback."""
if value >= self.odometer:
self.odometer = value
else:
print("odometer can't be rolled back!")
def increment_odometer(self, miles):
"""Function to increment odometer for every road trip."""
self.odometer += miles
def fill_gas_tank(self):
"""Function to simulate filling glass tanks."""
print("Thanks for filling the gas!")
# Working with an inherited class.
class Electric(Car):
"""Special child class of regular cars. """
def __init__(self, make, model, year):
"""All attributes inherited from parent class."""
super().__init__(make, model, year)
self.battery_size = 100
def describe_battery(self):
"""Method to print the battery size of the electric vehicle."""
print(f"The battery size of the vehicle is {self.battery_size} kWh.")
def fill_gas_tank(self):
"""Method to override the gas tank."""
print("Electric cars don't have a glass tank.")
# Working with an instance of inherited class.
my_tesla = Electric('tesla', 'model s', 2019)
print(my_tesla.describe_car())
my_tesla.describe_battery()
| class Car:
""" A class that models a real life car in a oversimplified way."""
def __init__(self, make, model, year):
"""Function to store key attributes of the car."""
self.make = make
self.model = model
self.year = year
self.odometer = 0
def describe_car(self):
"""Function to print the name of the car in a clear fashion."""
car_description = f'{self.year} {self.make} {self.model}'
return car_description.title()
def read_odometer(self):
"""Function to print the car's mileage"""
print(f'The {self.model} has {self.odometer} miles on it.')
def update_odometer(self, value):
"""Function to update the value of odometer and avoid rollback."""
if value >= self.odometer:
self.odometer = value
else:
print("odometer can't be rolled back!")
def increment_odometer(self, miles):
"""Function to increment odometer for every road trip."""
self.odometer += miles
def fill_gas_tank(self):
"""Function to simulate filling glass tanks."""
print('Thanks for filling the gas!')
class Electric(Car):
"""Special child class of regular cars. """
def __init__(self, make, model, year):
"""All attributes inherited from parent class."""
super().__init__(make, model, year)
self.battery_size = 100
def describe_battery(self):
"""Method to print the battery size of the electric vehicle."""
print(f'The battery size of the vehicle is {self.battery_size} kWh.')
def fill_gas_tank(self):
"""Method to override the gas tank."""
print("Electric cars don't have a glass tank.")
my_tesla = electric('tesla', 'model s', 2019)
print(my_tesla.describe_car())
my_tesla.describe_battery() |
"""
Given an array of positive and negative numbers,
arrange them in an alternate fashion such that every
positive number is followed by negative and vice-versa
maintaining the order of appearance.
"""
def find_first_positive(lst):
j = 0
pivot = 0
for i in range(len(lst)):
if lst[i] < pivot:
temp = lst[i]
lst[i] = lst[j]
lst[j] = temp
j = j+1
return j # it is holding first index of positive number
# now let's arrange the list such that it contains 1 +ve and 1 -ve
def re_arrange_numbers(lst):
p = find_first_positive(lst)
num = 0
while len(lst) > p >num:
temp = lst[num]
lst[num] = lst[p]
lst[p] = temp
p += 1
num += 2
lst = [9, -3, 5, -2, -8, -6, 1, 3, 1, 12, 43, 56]
re_arrange_numbers(lst)
print(lst)
| """
Given an array of positive and negative numbers,
arrange them in an alternate fashion such that every
positive number is followed by negative and vice-versa
maintaining the order of appearance.
"""
def find_first_positive(lst):
j = 0
pivot = 0
for i in range(len(lst)):
if lst[i] < pivot:
temp = lst[i]
lst[i] = lst[j]
lst[j] = temp
j = j + 1
return j
def re_arrange_numbers(lst):
p = find_first_positive(lst)
num = 0
while len(lst) > p > num:
temp = lst[num]
lst[num] = lst[p]
lst[p] = temp
p += 1
num += 2
lst = [9, -3, 5, -2, -8, -6, 1, 3, 1, 12, 43, 56]
re_arrange_numbers(lst)
print(lst) |
# All endpoint constants for the User resource
USER_ADD_DEVICE_TOKEN = "/push/{token_type}"
USER_BAN_FROM_CHANNELS_WITH_CUSTOM_TYPES = "/banned_channel_custom_types"
USER_BLOCK = "/block"
USER_CHOOSE_PUSH_MESSAGE_TEMPLATE = "/push/template"
USER_LIST_BANNED_CHANNELS = "/ban"
USER_LIST_BLOCKED_USERS = "/block"
USER_LIST_DEVICE_TOKENS = "/push/{token_type}"
USER_LIST_MUTED_CHANNELS = "/mute"
USER_MARK_AS_READ_ALL = "/mark_as_read_all"
USER_MUTE_FROM_CHANNELS_WITH_CUSTOM_TYPES = "/muted_channel_custom_types"
USER_MY_GROUP_CHANNELS = "/my_group_channels"
USER_REGISTER_OPERATOR_CHANNELS_CUSTOM_TYPES = "/operating_channel_custom_types"
USER_REMOVE_ALL_DEVICE_TOKENS = "/push"
USER_REMOVE_DEVICE_TOKEN = "/push/{token_type}/{token}"
USER_REMOVE_DEVICE_TOKEN_FROM_OWNER = "/push/device_tokens/{token_type}/{token}"
USER_RESET_PUSH_PREFERENCE = "/push_preference"
USER_UNBLOCK = "/block/{target_id}"
USER_UNREAD_CHANNEL_COUNT = "/unread_channel_count"
USER_UNREAD_ITEM_COUNT = "/unread_item_count"
USER_UNREAD_MESSAGE_COUNT = "/unread_message_count"
USER_UPDATE_CHANNEL_INVITE_PREFERENCE = "/channel_invitation_preference"
USER_UPDATE_COUNT_PREFERENCE_OF_CHANNEL = "/count_preference/{channel_url}"
USER_UPDATE_PUSH_PREFERENCE = "/push_preference"
USER_UPDATE_PUSH_PREFERENCE_FOR_CHANNEL = "/push_preference/{channel_url}"
USER_VIEW_CHANNEL_INVITE_PREFERENCE = "/channel_invitation_preference"
USER_COUNT_PREFERENCE_OF_CHANNEL = "/count_preference/{channel_url}"
USER_VIEW_DEVICE_TOKEN_OWNER = "/push/device_tokens/{token_type}/{token}"
USER_VIEW_GROUP_CHANNEL_COUNT_BY_JOIN_STATUS = "/group_channel_count"
USER_VIEW_PUSH_PREFERENCE = "/push_preference"
USER_VIEW_PUSH_PREFERENCE_FOR_CHANNEL = "/push_preference/{channel_url}"
USER_CREATE_METADATA = "/metadata"
USER_DELETE_METADATA = "/metadata"
USER_UPDATE_METADATA = "/metadata"
USER_VIEW_METADATA = "/metadata"
| user_add_device_token = '/push/{token_type}'
user_ban_from_channels_with_custom_types = '/banned_channel_custom_types'
user_block = '/block'
user_choose_push_message_template = '/push/template'
user_list_banned_channels = '/ban'
user_list_blocked_users = '/block'
user_list_device_tokens = '/push/{token_type}'
user_list_muted_channels = '/mute'
user_mark_as_read_all = '/mark_as_read_all'
user_mute_from_channels_with_custom_types = '/muted_channel_custom_types'
user_my_group_channels = '/my_group_channels'
user_register_operator_channels_custom_types = '/operating_channel_custom_types'
user_remove_all_device_tokens = '/push'
user_remove_device_token = '/push/{token_type}/{token}'
user_remove_device_token_from_owner = '/push/device_tokens/{token_type}/{token}'
user_reset_push_preference = '/push_preference'
user_unblock = '/block/{target_id}'
user_unread_channel_count = '/unread_channel_count'
user_unread_item_count = '/unread_item_count'
user_unread_message_count = '/unread_message_count'
user_update_channel_invite_preference = '/channel_invitation_preference'
user_update_count_preference_of_channel = '/count_preference/{channel_url}'
user_update_push_preference = '/push_preference'
user_update_push_preference_for_channel = '/push_preference/{channel_url}'
user_view_channel_invite_preference = '/channel_invitation_preference'
user_count_preference_of_channel = '/count_preference/{channel_url}'
user_view_device_token_owner = '/push/device_tokens/{token_type}/{token}'
user_view_group_channel_count_by_join_status = '/group_channel_count'
user_view_push_preference = '/push_preference'
user_view_push_preference_for_channel = '/push_preference/{channel_url}'
user_create_metadata = '/metadata'
user_delete_metadata = '/metadata'
user_update_metadata = '/metadata'
user_view_metadata = '/metadata' |
def dict_equal(first, second):
"""
This is a utility function used in testing to determine if two dictionaries are, in a nested sense, equal (ie they have the same keys and values at all levels).
:param dict first: The first dictionary to compare.
:param dict second: The second dictionary to compare.
:return: Whether or not the dictionaries are (recursively) equal.
:rtype: bool
"""
if not set(first.keys()) == set(second.keys()):
return False
for k1, v1 in first.items():
if isinstance(v1, dict) and isinstance(second[k1], dict):
if not dict_equal(v1, second[k1]):
return False
elif not isinstance(v1, dict) and not isinstance(second[k1], dict):
if v1 != second[k1]:
return False
else:
return False
return True
| def dict_equal(first, second):
"""
This is a utility function used in testing to determine if two dictionaries are, in a nested sense, equal (ie they have the same keys and values at all levels).
:param dict first: The first dictionary to compare.
:param dict second: The second dictionary to compare.
:return: Whether or not the dictionaries are (recursively) equal.
:rtype: bool
"""
if not set(first.keys()) == set(second.keys()):
return False
for (k1, v1) in first.items():
if isinstance(v1, dict) and isinstance(second[k1], dict):
if not dict_equal(v1, second[k1]):
return False
elif not isinstance(v1, dict) and (not isinstance(second[k1], dict)):
if v1 != second[k1]:
return False
else:
return False
return True |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.