content stringlengths 7 1.05M | fixed_cases stringlengths 1 1.28M |
|---|---|
class BaseResponse(object):
_allowedResponses = []
_http_responses = {}
def __init__(self, allowedResponses=None):
self.__allowedResponses = allowedResponses
for code in allowedResponses:
status_code = str(code)
self._http_responses[status_code] = self._default_response
def handle_response(self, status_code, raw_response):
if status_code not in self.__allowedResponses:
raise Exception('Not Allowed', 'No such response code allowed')
else:
response, new_code = self._http_responses[str(status_code)](raw_response, status_code)
return (response, new_code)
def _default_response(self, json_response, status_code):
return (json_response, status_code)
def _translate(self, field, dict, value):
dict[field] = dict[field].format(value)
| class Baseresponse(object):
_allowed_responses = []
_http_responses = {}
def __init__(self, allowedResponses=None):
self.__allowedResponses = allowedResponses
for code in allowedResponses:
status_code = str(code)
self._http_responses[status_code] = self._default_response
def handle_response(self, status_code, raw_response):
if status_code not in self.__allowedResponses:
raise exception('Not Allowed', 'No such response code allowed')
else:
(response, new_code) = self._http_responses[str(status_code)](raw_response, status_code)
return (response, new_code)
def _default_response(self, json_response, status_code):
return (json_response, status_code)
def _translate(self, field, dict, value):
dict[field] = dict[field].format(value) |
with open("map.txt", 'r') as fd:
contents = fd.readlines()
mapping = {}
for line in contents:
row, col, name = line.strip().split("\t")
pos = (int(row), int(col))
if pos in mapping:
print("Collision!", pos)
mapping[pos] = name | with open('map.txt', 'r') as fd:
contents = fd.readlines()
mapping = {}
for line in contents:
(row, col, name) = line.strip().split('\t')
pos = (int(row), int(col))
if pos in mapping:
print('Collision!', pos)
mapping[pos] = name |
'''Crie um programa que mostre na tela todos os numeros pares que estao no intervalo de 1 a 50.'''
for c in range(1,50 +1,):
if c % 2 == 0:
print(c) | """Crie um programa que mostre na tela todos os numeros pares que estao no intervalo de 1 a 50."""
for c in range(1, 50 + 1):
if c % 2 == 0:
print(c) |
# day one, advent 2020
def day_one():
# read input for day one, calculate and print answer
with open('advent/20201201.txt', 'r') as f:
data = f.read()
data = [int(i) for i in data.split()]
for i in data:
for j in data:
if i + j == 2020:
print(f"Day 1.1: i: {i}, j: {j}, answer: {i * j}")
break
else:
continue
break
for i in data:
for j in data:
for k in data:
if i + j + k == 2020:
print(f"Day 1.2: i: {i}, j: {j}, k: {k}, answer: {i * j * k}")
return
def main():
day_one()
if __name__ == "__main__":
main()
| def day_one():
with open('advent/20201201.txt', 'r') as f:
data = f.read()
data = [int(i) for i in data.split()]
for i in data:
for j in data:
if i + j == 2020:
print(f'Day 1.1: i: {i}, j: {j}, answer: {i * j}')
break
else:
continue
break
for i in data:
for j in data:
for k in data:
if i + j + k == 2020:
print(f'Day 1.2: i: {i}, j: {j}, k: {k}, answer: {i * j * k}')
return
def main():
day_one()
if __name__ == '__main__':
main() |
__author__ = 'petar@google.com (Petar Petrov)'
class GeneratedServiceType(type):
_DESCRIPTOR_KEY = 'DESCRIPTOR'
def __init__(cls, name, bases, dictionary):
if GeneratedServiceType._DESCRIPTOR_KEY not in dictionary:
return
descriptor = dictionary[GeneratedServiceType._DESCRIPTOR_KEY]
service_builder = _ServiceBuilder(descriptor)
service_builder.BuildService(cls)
class GeneratedServiceStubType(GeneratedServiceType):
_DESCRIPTOR_KEY = 'DESCRIPTOR'
def __init__(cls, name, bases, dictionary):
super(GeneratedServiceStubType, cls).__init__(name, bases, dictionary)
if GeneratedServiceStubType._DESCRIPTOR_KEY not in dictionary:
return
descriptor = dictionary[GeneratedServiceStubType._DESCRIPTOR_KEY]
service_stub_builder = _ServiceStubBuilder(descriptor)
service_stub_builder.BuildServiceStub(cls)
class _ServiceBuilder(object):
def __init__(self, service_descriptor):
self.descriptor = service_descriptor
def BuildService(self, cls):
def _WrapCallMethod(srvc, method_descriptor, rpc_controller, request, callback):
return self._CallMethod(srvc, method_descriptor, rpc_controller, request, callback)
self.cls = cls
cls.CallMethod = _WrapCallMethod
cls.GetDescriptor = staticmethod(lambda : self.descriptor)
cls.GetDescriptor.__doc__ = 'Returns the service descriptor.'
cls.GetRequestClass = self._GetRequestClass
cls.GetResponseClass = self._GetResponseClass
for method in self.descriptor.methods:
setattr(cls, method.name, self._GenerateNonImplementedMethod(method))
def _CallMethod(self, srvc, method_descriptor, rpc_controller, request, callback):
if method_descriptor.containing_service != self.descriptor:
raise RuntimeError('CallMethod() given method descriptor for wrong service type.')
method = getattr(srvc, method_descriptor.name)
return method(rpc_controller, request, callback)
def _GetRequestClass(self, method_descriptor):
if method_descriptor.containing_service != self.descriptor:
raise RuntimeError('GetRequestClass() given method descriptor for wrong service type.')
return method_descriptor.input_type._concrete_class
def _GetResponseClass(self, method_descriptor):
if method_descriptor.containing_service != self.descriptor:
raise RuntimeError('GetResponseClass() given method descriptor for wrong service type.')
return method_descriptor.output_type._concrete_class
def _GenerateNonImplementedMethod(self, method):
return lambda inst, rpc_controller, request, callback: self._NonImplementedMethod(method.name, rpc_controller, callback)
def _NonImplementedMethod(self, method_name, rpc_controller, callback):
rpc_controller.SetFailed('Method %s not implemented.' % method_name)
callback(None)
class _ServiceStubBuilder(object):
def __init__(self, service_descriptor):
self.descriptor = service_descriptor
def BuildServiceStub(self, cls):
def _ServiceStubInit(stub, rpc_channel):
stub.rpc_channel = rpc_channel
self.cls = cls
cls.__init__ = _ServiceStubInit
for method in self.descriptor.methods:
setattr(cls, method.name, self._GenerateStubMethod(method))
def _GenerateStubMethod(self, method):
return lambda inst, rpc_controller, request, callback=None: self._StubMethod(inst, method, rpc_controller, request, callback)
def _StubMethod(self, stub, method_descriptor, rpc_controller, request, callback):
return stub.rpc_channel.CallMethod(method_descriptor, rpc_controller, request, method_descriptor.output_type._concrete_class, callback)
| __author__ = 'petar@google.com (Petar Petrov)'
class Generatedservicetype(type):
_descriptor_key = 'DESCRIPTOR'
def __init__(cls, name, bases, dictionary):
if GeneratedServiceType._DESCRIPTOR_KEY not in dictionary:
return
descriptor = dictionary[GeneratedServiceType._DESCRIPTOR_KEY]
service_builder = __service_builder(descriptor)
service_builder.BuildService(cls)
class Generatedservicestubtype(GeneratedServiceType):
_descriptor_key = 'DESCRIPTOR'
def __init__(cls, name, bases, dictionary):
super(GeneratedServiceStubType, cls).__init__(name, bases, dictionary)
if GeneratedServiceStubType._DESCRIPTOR_KEY not in dictionary:
return
descriptor = dictionary[GeneratedServiceStubType._DESCRIPTOR_KEY]
service_stub_builder = __service_stub_builder(descriptor)
service_stub_builder.BuildServiceStub(cls)
class _Servicebuilder(object):
def __init__(self, service_descriptor):
self.descriptor = service_descriptor
def build_service(self, cls):
def __wrap_call_method(srvc, method_descriptor, rpc_controller, request, callback):
return self._CallMethod(srvc, method_descriptor, rpc_controller, request, callback)
self.cls = cls
cls.CallMethod = _WrapCallMethod
cls.GetDescriptor = staticmethod(lambda : self.descriptor)
cls.GetDescriptor.__doc__ = 'Returns the service descriptor.'
cls.GetRequestClass = self._GetRequestClass
cls.GetResponseClass = self._GetResponseClass
for method in self.descriptor.methods:
setattr(cls, method.name, self._GenerateNonImplementedMethod(method))
def __call_method(self, srvc, method_descriptor, rpc_controller, request, callback):
if method_descriptor.containing_service != self.descriptor:
raise runtime_error('CallMethod() given method descriptor for wrong service type.')
method = getattr(srvc, method_descriptor.name)
return method(rpc_controller, request, callback)
def __get_request_class(self, method_descriptor):
if method_descriptor.containing_service != self.descriptor:
raise runtime_error('GetRequestClass() given method descriptor for wrong service type.')
return method_descriptor.input_type._concrete_class
def __get_response_class(self, method_descriptor):
if method_descriptor.containing_service != self.descriptor:
raise runtime_error('GetResponseClass() given method descriptor for wrong service type.')
return method_descriptor.output_type._concrete_class
def __generate_non_implemented_method(self, method):
return lambda inst, rpc_controller, request, callback: self._NonImplementedMethod(method.name, rpc_controller, callback)
def __non_implemented_method(self, method_name, rpc_controller, callback):
rpc_controller.SetFailed('Method %s not implemented.' % method_name)
callback(None)
class _Servicestubbuilder(object):
def __init__(self, service_descriptor):
self.descriptor = service_descriptor
def build_service_stub(self, cls):
def __service_stub_init(stub, rpc_channel):
stub.rpc_channel = rpc_channel
self.cls = cls
cls.__init__ = _ServiceStubInit
for method in self.descriptor.methods:
setattr(cls, method.name, self._GenerateStubMethod(method))
def __generate_stub_method(self, method):
return lambda inst, rpc_controller, request, callback=None: self._StubMethod(inst, method, rpc_controller, request, callback)
def __stub_method(self, stub, method_descriptor, rpc_controller, request, callback):
return stub.rpc_channel.CallMethod(method_descriptor, rpc_controller, request, method_descriptor.output_type._concrete_class, callback) |
def to_rna(dna):
rna = ''
dna_rna = {'G':'C', 'C':'G', 'T':'A', 'A':'U'}
for char in dna:
try:
rna = rna + dna_rna[char]
except:
return ""
return rna
| def to_rna(dna):
rna = ''
dna_rna = {'G': 'C', 'C': 'G', 'T': 'A', 'A': 'U'}
for char in dna:
try:
rna = rna + dna_rna[char]
except:
return ''
return rna |
POSITION = "position"
FORCE = "force"
TOTAL_ENERGY = "total_energy"
PER_ATOM_ENERGY = "per_atom_energy"
CELL = "cell"
NATOMS = "natoms"
PER_FRAME_ATTRS = "per_frame_attrs"
METADATA_ATTRS = "metadata_attrs"
FIXED_ATTRS = "fixed_attrs"
DIM = "dimension"
SPECIES = "species"
STRESS = "stress"
VELOCITY = "velocity"
| position = 'position'
force = 'force'
total_energy = 'total_energy'
per_atom_energy = 'per_atom_energy'
cell = 'cell'
natoms = 'natoms'
per_frame_attrs = 'per_frame_attrs'
metadata_attrs = 'metadata_attrs'
fixed_attrs = 'fixed_attrs'
dim = 'dimension'
species = 'species'
stress = 'stress'
velocity = 'velocity' |
# the following line reads the list from the input; do not modify it, please
numbers = [int(num) for num in input().split()]
print(numbers[16:3:-1]) # the line with an error
| numbers = [int(num) for num in input().split()]
print(numbers[16:3:-1]) |
userReply = input("Do you need to ship a package? (Enter yes or no) ")
if userReply == "yes":
print("We can help you ship that package!")
else:
print("Please come back when you need to ship a package. Thank you.")
userReply = input("Would you like to buy stamps, buy an envelope, or make a copy? (Enter stamps, envelope, or copy) ")
if userReply == "stamps":
print("We have many stamp designs to choose from.")
elif userReply == "envelope":
print("We have many envelope sizes to choose from.")
elif userReply == "copy":
copies = input("How many copies would you like? (Enter a number) ")
print("Here are {} copies.".format(copies))
else:
print("Thank you, please come again.") | user_reply = input('Do you need to ship a package? (Enter yes or no) ')
if userReply == 'yes':
print('We can help you ship that package!')
else:
print('Please come back when you need to ship a package. Thank you.')
user_reply = input('Would you like to buy stamps, buy an envelope, or make a copy? (Enter stamps, envelope, or copy) ')
if userReply == 'stamps':
print('We have many stamp designs to choose from.')
elif userReply == 'envelope':
print('We have many envelope sizes to choose from.')
elif userReply == 'copy':
copies = input('How many copies would you like? (Enter a number) ')
print('Here are {} copies.'.format(copies))
else:
print('Thank you, please come again.') |
a = 'Tell mme somehting , I will give you feed back'
a += '\n(Enter quit to leave)'
message = ''
while message !='quit':
message = input(a)
if message == 'quit':
break
else:
print(message) | a = 'Tell mme somehting , I will give you feed back'
a += '\n(Enter quit to leave)'
message = ''
while message != 'quit':
message = input(a)
if message == 'quit':
break
else:
print(message) |
class InvalidEventType(Exception):
def __init__(self, event_type_passed):
self._event_type_value = type(event_type_passed)
def __str__(self):
return f"An invalid event type: {self._event_type_value} was passed. An event type must be a string!"
| class Invalideventtype(Exception):
def __init__(self, event_type_passed):
self._event_type_value = type(event_type_passed)
def __str__(self):
return f'An invalid event type: {self._event_type_value} was passed. An event type must be a string!' |
def subset(A, B):
return A.issubset(B)
if __name__ == '__main__':
no_T = int(input()) # no. of test cases
for i in range(no_T):
no_A = int(input()) # no. of elements in A
A = set(map(int, input().split())) # elements of A
no_B = int(input()) # no. of elements in B
B = set(map(int, input().split())) # elements of B
print(subset(A, B)) | def subset(A, B):
return A.issubset(B)
if __name__ == '__main__':
no_t = int(input())
for i in range(no_T):
no_a = int(input())
a = set(map(int, input().split()))
no_b = int(input())
b = set(map(int, input().split()))
print(subset(A, B)) |
# Time: O(n)
# Space: O(1)
class ListNode(object):
def __init__(self, x):
self.val = x
self.next = None
def __repr__(self):
if self:
return "{} -> {}".format(self.val, repr(self.next))
class Solution(object):
# @param head, a ListNode
# @return nothing
def reorderList(self, head):
if head == None or head.next == None:
return head
fast, slow, prev = head, head, None
while fast != None and fast.next != None:
fast, slow, prev = fast.next.next, slow.next, slow
current, prev.next, prev = slow, None, None
while current != None:
current.next, prev, current = prev, current, current.next
l1, l2 = head, prev
dummy = ListNode(0)
current = dummy
while l1 != None and l2 != None:
current.next, current, l1 = l1, l1, l1.next
current.next, current, l2 = l2, l2, l2.next
return dummy.next
| class Listnode(object):
def __init__(self, x):
self.val = x
self.next = None
def __repr__(self):
if self:
return '{} -> {}'.format(self.val, repr(self.next))
class Solution(object):
def reorder_list(self, head):
if head == None or head.next == None:
return head
(fast, slow, prev) = (head, head, None)
while fast != None and fast.next != None:
(fast, slow, prev) = (fast.next.next, slow.next, slow)
(current, prev.next, prev) = (slow, None, None)
while current != None:
(current.next, prev, current) = (prev, current, current.next)
(l1, l2) = (head, prev)
dummy = list_node(0)
current = dummy
while l1 != None and l2 != None:
(current.next, current, l1) = (l1, l1, l1.next)
(current.next, current, l2) = (l2, l2, l2.next)
return dummy.next |
# PIGEONHOLE SORT
# This is a non-comparison based sorting algorithm that works for
# arrays where number of elements and the range of possible key values are approximately the
# same. To perform this sort, we need to make some holes. The number of holes needed is decided
# by the range of numbers. In each hole, items are inserted. Finally deleted from the hole and stored
# into an array for sorted order.
# Algorithm:
# Create a empty set of array i.e pigeonhole. One pigeonhole for each key in through the range of the original array.
# Iterate through the original array and put the elements in the pigeonhole corresponding to its key such that
# each pigeonhole eventually contains a list of all values with that key.
# Iterate over the pigeonhole array in order, and put elements from non-empty pigeonholes back into the original array.
def pigeonhole_sort(arr):
# calculate the size of pigeonhole
pig_size = max(arr) - min(arr) + 1
# create a auxiliary array for the pigeonhole
hole = [0] * pig_size
# add elements to the holes at indices arr[i]-min(arr)
for i in range(len(arr)):
hole[arr[i] - min(arr)] += 1
# pointer to iterate over sorted array
i = 0
# iterate over hole
for j in range(pig_size):
# while there are elements left in hole
while hole[j]:
# remove element from hole
hole[j] -= 1
# add non-empty holes to the original array
arr[i] = j + min(arr)
# increment the pointer
i += 1
# Driver Code
arr = [8, 3, 2, 7, 4, 6, 8]
pigeonhole_sort(arr)
for i in range(len(arr)):
print(arr[i], end=" ")
# Time Complexity : O(n+Range)
# Space Complexity : O(n+Range)
# Where n is the number of elements and Range is the range of input array
| def pigeonhole_sort(arr):
pig_size = max(arr) - min(arr) + 1
hole = [0] * pig_size
for i in range(len(arr)):
hole[arr[i] - min(arr)] += 1
i = 0
for j in range(pig_size):
while hole[j]:
hole[j] -= 1
arr[i] = j + min(arr)
i += 1
arr = [8, 3, 2, 7, 4, 6, 8]
pigeonhole_sort(arr)
for i in range(len(arr)):
print(arr[i], end=' ') |
#!/usr/bin/env python3
if __name__ == "__main__":
with open("./seedpool.txt", "r") as inf, open("./seedpool.h", "w") as ouf:
ouf.write("#ifndef SEED_POOL_H_\n#define SEED_POOL_H_\n\n"
"#include <vector>\n\nnamespace pbsutil {\n")
ouf.write("std::vector<uint> loadSeedPool() {\n"
"\treturn {")
seeds = [line.strip() for line in inf]
ouf.write(', '.join(seeds) + "};\n}\n}// namespace pbsutil\n#endif // SEED_POOL_H_\n")
| if __name__ == '__main__':
with open('./seedpool.txt', 'r') as inf, open('./seedpool.h', 'w') as ouf:
ouf.write('#ifndef SEED_POOL_H_\n#define SEED_POOL_H_\n\n#include <vector>\n\nnamespace pbsutil {\n')
ouf.write('std::vector<uint> loadSeedPool() {\n\treturn {')
seeds = [line.strip() for line in inf]
ouf.write(', '.join(seeds) + '};\n}\n}// namespace pbsutil\n#endif // SEED_POOL_H_\n') |
with open('./PrimeraMuestraSceneFrame.map') as f:
content = f.readlines()
with open('./PrimeraMuestraSceneFrame2.map', 'w') as f2:
first = True;
for line in content:
l = line.split(' ');
f2.write(str(int(l[0])+450)+" "+l[1]+"\n");
| with open('./PrimeraMuestraSceneFrame.map') as f:
content = f.readlines()
with open('./PrimeraMuestraSceneFrame2.map', 'w') as f2:
first = True
for line in content:
l = line.split(' ')
f2.write(str(int(l[0]) + 450) + ' ' + l[1] + '\n') |
#!/usr/bin/env python
# Software License Agreement (MIT License)
#
# Copyright (c) 2020, tri_star
# All rights reserved.
#
# 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.
#
# Author: Meiying Qin, Jake Brawer
# https://misc.flogisoft.com/bash/tip_colors_and_formatting
# https://gist.github.com/vratiu/9780109
# tested under unbuntu 18 bash
RESET = '\033[0m'
BLACK = '0' # light grey is dark grey
RED = '1'
GREEN = '2'
YELLOW = '3'
BLUE = '4'
MAGENTA = '5'
CYAN = '6'
LIGHT_GRAY = '7' # light grey is white
FOREGROUND_REGULAR = '3'
FOREGROUND_LIGHT = '9'
BACKGROUND_REGULAR = '4'
BACKGROUND_LIGHT = '10'
BOLD = '1'
DIM = '2'
ITALIC = '3'
UNDERLINE = '4'
BLINK = '5'
REVERSE = '7'
HIDDEN = '8'
STRIKETHROUGH = '9'
def colored_text(text, text_color='', text_color_light=False, background_color='', background_color_light=False, bold=False, dim=False, italic=False, underline=False, blink=False, reverse=False, hidden=False, strikethrough=False):
formatting = ''
template = "\033[{}m{}\033[00m"
if bold:
formatting += BOLD + ';'
if dim:
formatting += DIM + ';'
if italic:
formatting += ITALIC + ';'
if underline:
formatting += UNDERLINE + ';'
if blink:
formatting += BLINK + ';'
if reverse:
formatting += REVERSE + ';'
if hidden:
formatting += HIDDEN + ';'
if strikethrough:
formatting += STRIKETHROUGH + ';'
if text_color:
if text_color_light:
formatting += FOREGROUND_LIGHT + text_color + ';'
else:
formatting += FOREGROUND_REGULAR + text_color + ';'
if background_color:
if background_color_light:
formatting += BACKGROUND_LIGHT + background_color + ';'
else:
formatting += BACKGROUND_REGULAR + background_color + ';'
if formatting:
formatting = formatting[:-1]
return template.format(formatting, text)
else:
return text | reset = '\x1b[0m'
black = '0'
red = '1'
green = '2'
yellow = '3'
blue = '4'
magenta = '5'
cyan = '6'
light_gray = '7'
foreground_regular = '3'
foreground_light = '9'
background_regular = '4'
background_light = '10'
bold = '1'
dim = '2'
italic = '3'
underline = '4'
blink = '5'
reverse = '7'
hidden = '8'
strikethrough = '9'
def colored_text(text, text_color='', text_color_light=False, background_color='', background_color_light=False, bold=False, dim=False, italic=False, underline=False, blink=False, reverse=False, hidden=False, strikethrough=False):
formatting = ''
template = '\x1b[{}m{}\x1b[00m'
if bold:
formatting += BOLD + ';'
if dim:
formatting += DIM + ';'
if italic:
formatting += ITALIC + ';'
if underline:
formatting += UNDERLINE + ';'
if blink:
formatting += BLINK + ';'
if reverse:
formatting += REVERSE + ';'
if hidden:
formatting += HIDDEN + ';'
if strikethrough:
formatting += STRIKETHROUGH + ';'
if text_color:
if text_color_light:
formatting += FOREGROUND_LIGHT + text_color + ';'
else:
formatting += FOREGROUND_REGULAR + text_color + ';'
if background_color:
if background_color_light:
formatting += BACKGROUND_LIGHT + background_color + ';'
else:
formatting += BACKGROUND_REGULAR + background_color + ';'
if formatting:
formatting = formatting[:-1]
return template.format(formatting, text)
else:
return text |
class TestMySQLCLi:
def test_create_mysql_client_command(self, return_bck_obj):
result = '/usr/bin/mysql --defaults-file= -uroot --password=12345 --socket=/var/run/mysqld/mysqld.sock -e "select 1"'
sql = "select 1"
assert return_bck_obj.mysql_cli.create_mysql_client_command(sql) == result
def test_mysql_run_command(self, return_bck_obj):
sql = "select 1"
assert return_bck_obj.mysql_cli.mysql_run_command(sql) is True
| class Testmysqlcli:
def test_create_mysql_client_command(self, return_bck_obj):
result = '/usr/bin/mysql --defaults-file= -uroot --password=12345 --socket=/var/run/mysqld/mysqld.sock -e "select 1"'
sql = 'select 1'
assert return_bck_obj.mysql_cli.create_mysql_client_command(sql) == result
def test_mysql_run_command(self, return_bck_obj):
sql = 'select 1'
assert return_bck_obj.mysql_cli.mysql_run_command(sql) is True |
# API contants
FAN_MODE_AWAY = 'away'
FAN_MODE_LOW = 'low'
FAN_MODE_MEDIUM = 'medium'
FAN_MODE_HIGH = 'high'
# Commands
CMD_FAN_MODE_AWAY = b'\x84\x15\x01\x01\x00\x00\x00\x00\x01\x00\x00\x00\x00'
CMD_FAN_MODE_LOW = b'\x84\x15\x01\x01\x00\x00\x00\x00\x01\x00\x00\x00\x01'
CMD_FAN_MODE_MEDIUM = b'\x84\x15\x01\x01\x00\x00\x00\x00\x01\x00\x00\x00\x02'
CMD_FAN_MODE_HIGH = b'\x84\x15\x01\x01\x00\x00\x00\x00\x01\x00\x00\x00\x03'
CMD_MODE_AUTO = b'\x85\x15\x08\x01' #AUTO !!!
CMD_MODE_MANUAL = b'\x84\x15\x08\x01\x00\x00\x00\x00\x01\x00\x00\x00\x01' # MANUAL !!!
CMD_START_SUPPLY_FAN = b'\x85\x15\x07\x01'
CMD_START_EXHAUST_FAN = b'\x85\x15\x06\x01'
CMD_TEMPPROF_NORMAL = b'\x84\x15\x03\x01\x00\x00\x00\x00\xff\xff\xff\xff\x00'
CMD_TEMPPROF_COOL = b'\x84\x15\x03\x01\x00\x00\x00\x00\xff\xff\xff\xff\x01'
CMD_TEMPPROF_WARM = b'\x84\x15\x03\x01\x00\x00\x00\x00\xff\xff\xff\xff\x02'
CMD_BYPASS_ON = b'\x84\x15\x02\x01\x00\x00\x00\x00\x10\x0e\x00\x00\x01'
CMD_BYPASS_OFF = b'\x84\x15\x02\x01\x00\x00\x00\x00\x10\x0e\x00\x00\x02'
CMD_BYPASS_AUTO = b'\x85\x15\x02\x01'
CMD_SENSOR_TEMP_OFF = b'\x03\x1d\x01\x04\x00'
CMD_SENSOR_TEMP_AUTO = b'\x03\x1d\x01\x04\x01'
CMD_SENSOR_TEMP_ON = b'\x03\x1d\x01\x04\x02'
CMD_SENSOR_HUMC_OFF = b'\x03\x1d\x01\x06\x00'
CMD_SENSOR_HUMC_AUTO = b'\x03\x1d\x01\x06\x01'
CMD_SENSOR_HUMC_ON = b'\x03\x1d\x01\x06\x02'
CMD_SENSOR_HUMP_OFF = b'\x03\x1d\x01\x07\x00'
CMD_SENSOR_HUMP_AUTO = b'\x03\x1d\x01\x07\x01'
CMD_SENSOR_HUMP_ON = b'\x03\x1d\x01\x07\x02'
CMD_READ_CONFIG = b'\x87\x15\x01'
CMD_READ_HRU = b'\x01\x01\x01\x10\x08'
CMD_BOOST_MODE_END = b'\x85\x15\x01\x06'
# Sensor locations
SENSOR_AWAY = 16
SENSOR_OPERATING_MODE_BIS = 49
SENSOR_OPERATING_MODE = 56
SENSOR_FAN_SPEED_MODE = 65
SENSOR_BYPASS_MODE = 66
SENSOR_PROFILE_TEMPERATURE = 67
SENSOR_FAN_MODE_SUPPLY = 70
SENSOR_FAN_MODE_EXHAUST = 71
SENSOR_FAN_TIME = 81
SENSOR_BYPASS_TIME = 82
SENSOR_SUPPLY_TIME = 86
SENSOR_EXHAUST_TIME = 87
SENSOR_FAN_EXHAUST_DUTY = 117
SENSOR_FAN_SUPPLY_DUTY = 118
SENSOR_FAN_SUPPLY_FLOW = 119
SENSOR_FAN_EXHAUS_FLOW = 120
SENSOR_FAN_EXHAUST_SPEED = 121
SENSOR_FAN_SUPPLY_SPEED = 122
SENSOR_POWER_CURRENT = 128
SENSOR_POWER_TOTAL_YEAR = 129
SENSOR_POWER_TOTAL = 130
SENSOR_PREHEATER_POWER_TOTAL_YEAR = 144
SENSOR_PREHEATER_POWER_TOTAL = 145
SENSOR_PREHEATER_POWER_CURRENT = 146
SENSOR_SETTING_RF_PAIRING = 176
SENSOR_DAYS_TO_REPLACE_FILTER = 192
SENSOR_CURRENT_RMOT = 209
SENSOR_HEATING_SEASON = 210
SENSOR_COOLING_SEASON = 211
SENSOR_TARGET_TEMPERATURE = 212
SENSOR_AVOIDED_HEATING_CURRENT = 213
SENSOR_AVOIDED_HEATING_TOTAL_YEAR = 214
SENSOR_AVOIDED_HEATING_TOTAL = 215
SENSOR_AVOIDED_COOLING_CURRENT = 216
SENSOR_AVOIDED_COOLING_YEAR = 217
SENSOR_AVOIDED_COOLING_TOTAL = 218
SENSOR_AVOIDED_COOLING_CURRENT_TARGET = 219
SENSOR_TEMPERATURE_SUPPLY = 221
SENSOR_COMFORTCONTROL_MODE = 225
SENSOR_BYPASS_STATE = 227
SENSOR_FROSTPROTECTION_UNBALANCE = 228
SENSOR_TEMPERATURE_EXTRACT = 274
SENSOR_TEMPERATURE_EXHAUST = 275
SENSOR_TEMPERATURE_OUTDOOR = 276
SENSOR_TEMPERATURE_AFTER_PREHEATER = 277
SENSOR_HUMIDITY_EXTRACT = 290
SENSOR_HUMIDITY_EXHAUST = 291
SENSOR_HUMIDITY_OUTDOOR = 292
SENSOR_HUMIDITY_AFTER_PREHEATER = 293
SENSOR_HUMIDITY_SUPPLY = 294
| fan_mode_away = 'away'
fan_mode_low = 'low'
fan_mode_medium = 'medium'
fan_mode_high = 'high'
cmd_fan_mode_away = b'\x84\x15\x01\x01\x00\x00\x00\x00\x01\x00\x00\x00\x00'
cmd_fan_mode_low = b'\x84\x15\x01\x01\x00\x00\x00\x00\x01\x00\x00\x00\x01'
cmd_fan_mode_medium = b'\x84\x15\x01\x01\x00\x00\x00\x00\x01\x00\x00\x00\x02'
cmd_fan_mode_high = b'\x84\x15\x01\x01\x00\x00\x00\x00\x01\x00\x00\x00\x03'
cmd_mode_auto = b'\x85\x15\x08\x01'
cmd_mode_manual = b'\x84\x15\x08\x01\x00\x00\x00\x00\x01\x00\x00\x00\x01'
cmd_start_supply_fan = b'\x85\x15\x07\x01'
cmd_start_exhaust_fan = b'\x85\x15\x06\x01'
cmd_tempprof_normal = b'\x84\x15\x03\x01\x00\x00\x00\x00\xff\xff\xff\xff\x00'
cmd_tempprof_cool = b'\x84\x15\x03\x01\x00\x00\x00\x00\xff\xff\xff\xff\x01'
cmd_tempprof_warm = b'\x84\x15\x03\x01\x00\x00\x00\x00\xff\xff\xff\xff\x02'
cmd_bypass_on = b'\x84\x15\x02\x01\x00\x00\x00\x00\x10\x0e\x00\x00\x01'
cmd_bypass_off = b'\x84\x15\x02\x01\x00\x00\x00\x00\x10\x0e\x00\x00\x02'
cmd_bypass_auto = b'\x85\x15\x02\x01'
cmd_sensor_temp_off = b'\x03\x1d\x01\x04\x00'
cmd_sensor_temp_auto = b'\x03\x1d\x01\x04\x01'
cmd_sensor_temp_on = b'\x03\x1d\x01\x04\x02'
cmd_sensor_humc_off = b'\x03\x1d\x01\x06\x00'
cmd_sensor_humc_auto = b'\x03\x1d\x01\x06\x01'
cmd_sensor_humc_on = b'\x03\x1d\x01\x06\x02'
cmd_sensor_hump_off = b'\x03\x1d\x01\x07\x00'
cmd_sensor_hump_auto = b'\x03\x1d\x01\x07\x01'
cmd_sensor_hump_on = b'\x03\x1d\x01\x07\x02'
cmd_read_config = b'\x87\x15\x01'
cmd_read_hru = b'\x01\x01\x01\x10\x08'
cmd_boost_mode_end = b'\x85\x15\x01\x06'
sensor_away = 16
sensor_operating_mode_bis = 49
sensor_operating_mode = 56
sensor_fan_speed_mode = 65
sensor_bypass_mode = 66
sensor_profile_temperature = 67
sensor_fan_mode_supply = 70
sensor_fan_mode_exhaust = 71
sensor_fan_time = 81
sensor_bypass_time = 82
sensor_supply_time = 86
sensor_exhaust_time = 87
sensor_fan_exhaust_duty = 117
sensor_fan_supply_duty = 118
sensor_fan_supply_flow = 119
sensor_fan_exhaus_flow = 120
sensor_fan_exhaust_speed = 121
sensor_fan_supply_speed = 122
sensor_power_current = 128
sensor_power_total_year = 129
sensor_power_total = 130
sensor_preheater_power_total_year = 144
sensor_preheater_power_total = 145
sensor_preheater_power_current = 146
sensor_setting_rf_pairing = 176
sensor_days_to_replace_filter = 192
sensor_current_rmot = 209
sensor_heating_season = 210
sensor_cooling_season = 211
sensor_target_temperature = 212
sensor_avoided_heating_current = 213
sensor_avoided_heating_total_year = 214
sensor_avoided_heating_total = 215
sensor_avoided_cooling_current = 216
sensor_avoided_cooling_year = 217
sensor_avoided_cooling_total = 218
sensor_avoided_cooling_current_target = 219
sensor_temperature_supply = 221
sensor_comfortcontrol_mode = 225
sensor_bypass_state = 227
sensor_frostprotection_unbalance = 228
sensor_temperature_extract = 274
sensor_temperature_exhaust = 275
sensor_temperature_outdoor = 276
sensor_temperature_after_preheater = 277
sensor_humidity_extract = 290
sensor_humidity_exhaust = 291
sensor_humidity_outdoor = 292
sensor_humidity_after_preheater = 293
sensor_humidity_supply = 294 |
# OpenWeatherMap API Key
api_key = "KEY HERE PLEASE"
# Google API Key
g_key = "KEY HERE PLEASE"
| api_key = 'KEY HERE PLEASE'
g_key = 'KEY HERE PLEASE' |
#
# PySNMP MIB module DGS-6600-ID-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/DGS-6600-ID-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 18:30:02 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ConstraintsUnion, ValueSizeConstraint, ConstraintsIntersection, SingleValueConstraint, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "ValueSizeConstraint", "ConstraintsIntersection", "SingleValueConstraint", "ValueRangeConstraint")
dlink_products, = mibBuilder.importSymbols("DLINK-ID-REC-MIB", "dlink-products")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
Gauge32, ModuleIdentity, Unsigned32, ObjectIdentity, TimeTicks, Integer32, Bits, Counter32, Counter64, NotificationType, MibScalar, MibTable, MibTableRow, MibTableColumn, IpAddress, MibIdentifier, iso = mibBuilder.importSymbols("SNMPv2-SMI", "Gauge32", "ModuleIdentity", "Unsigned32", "ObjectIdentity", "TimeTicks", "Integer32", "Bits", "Counter32", "Counter64", "NotificationType", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "IpAddress", "MibIdentifier", "iso")
DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention")
dgs6600Series = MibIdentifier((1, 3, 6, 1, 4, 1, 171, 10, 120))
dgs6604 = MibIdentifier((1, 3, 6, 1, 4, 1, 171, 10, 120, 1))
dgs6608 = MibIdentifier((1, 3, 6, 1, 4, 1, 171, 10, 120, 2))
dgs6600Private = MibIdentifier((1, 3, 6, 1, 4, 1, 171, 10, 120, 100))
dgs6600_system = MibIdentifier((1, 3, 6, 1, 4, 1, 171, 10, 120, 100, 1)).setLabel("dgs6600-system")
dgs6600_l2 = MibIdentifier((1, 3, 6, 1, 4, 1, 171, 10, 120, 100, 2)).setLabel("dgs6600-l2")
dgs6600_l3 = MibIdentifier((1, 3, 6, 1, 4, 1, 171, 10, 120, 100, 3)).setLabel("dgs6600-l3")
dgs6600_mpls = MibIdentifier((1, 3, 6, 1, 4, 1, 171, 10, 120, 100, 4)).setLabel("dgs6600-mpls")
dgs6600_qosacl = MibIdentifier((1, 3, 6, 1, 4, 1, 171, 10, 120, 100, 5)).setLabel("dgs6600-qosacl")
dgs6600_security = MibIdentifier((1, 3, 6, 1, 4, 1, 171, 10, 120, 100, 6)).setLabel("dgs6600-security")
dgs6600_mgmt = MibIdentifier((1, 3, 6, 1, 4, 1, 171, 10, 120, 100, 7)).setLabel("dgs6600-mgmt")
dgs6600_others = MibIdentifier((1, 3, 6, 1, 4, 1, 171, 10, 120, 100, 8)).setLabel("dgs6600-others")
mibBuilder.exportSymbols("DGS-6600-ID-MIB", dgs6600Private=dgs6600Private, dgs6600_others=dgs6600_others, dgs6600Series=dgs6600Series, dgs6600_security=dgs6600_security, dgs6600_mgmt=dgs6600_mgmt, dgs6600_mpls=dgs6600_mpls, dgs6600_system=dgs6600_system, dgs6604=dgs6604, dgs6600_l2=dgs6600_l2, dgs6600_qosacl=dgs6600_qosacl, dgs6608=dgs6608, dgs6600_l3=dgs6600_l3)
| (object_identifier, integer, octet_string) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'Integer', 'OctetString')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(constraints_union, value_size_constraint, constraints_intersection, single_value_constraint, value_range_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsUnion', 'ValueSizeConstraint', 'ConstraintsIntersection', 'SingleValueConstraint', 'ValueRangeConstraint')
(dlink_products,) = mibBuilder.importSymbols('DLINK-ID-REC-MIB', 'dlink-products')
(module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup')
(gauge32, module_identity, unsigned32, object_identity, time_ticks, integer32, bits, counter32, counter64, notification_type, mib_scalar, mib_table, mib_table_row, mib_table_column, ip_address, mib_identifier, iso) = mibBuilder.importSymbols('SNMPv2-SMI', 'Gauge32', 'ModuleIdentity', 'Unsigned32', 'ObjectIdentity', 'TimeTicks', 'Integer32', 'Bits', 'Counter32', 'Counter64', 'NotificationType', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'IpAddress', 'MibIdentifier', 'iso')
(display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention')
dgs6600_series = mib_identifier((1, 3, 6, 1, 4, 1, 171, 10, 120))
dgs6604 = mib_identifier((1, 3, 6, 1, 4, 1, 171, 10, 120, 1))
dgs6608 = mib_identifier((1, 3, 6, 1, 4, 1, 171, 10, 120, 2))
dgs6600_private = mib_identifier((1, 3, 6, 1, 4, 1, 171, 10, 120, 100))
dgs6600_system = mib_identifier((1, 3, 6, 1, 4, 1, 171, 10, 120, 100, 1)).setLabel('dgs6600-system')
dgs6600_l2 = mib_identifier((1, 3, 6, 1, 4, 1, 171, 10, 120, 100, 2)).setLabel('dgs6600-l2')
dgs6600_l3 = mib_identifier((1, 3, 6, 1, 4, 1, 171, 10, 120, 100, 3)).setLabel('dgs6600-l3')
dgs6600_mpls = mib_identifier((1, 3, 6, 1, 4, 1, 171, 10, 120, 100, 4)).setLabel('dgs6600-mpls')
dgs6600_qosacl = mib_identifier((1, 3, 6, 1, 4, 1, 171, 10, 120, 100, 5)).setLabel('dgs6600-qosacl')
dgs6600_security = mib_identifier((1, 3, 6, 1, 4, 1, 171, 10, 120, 100, 6)).setLabel('dgs6600-security')
dgs6600_mgmt = mib_identifier((1, 3, 6, 1, 4, 1, 171, 10, 120, 100, 7)).setLabel('dgs6600-mgmt')
dgs6600_others = mib_identifier((1, 3, 6, 1, 4, 1, 171, 10, 120, 100, 8)).setLabel('dgs6600-others')
mibBuilder.exportSymbols('DGS-6600-ID-MIB', dgs6600Private=dgs6600Private, dgs6600_others=dgs6600_others, dgs6600Series=dgs6600Series, dgs6600_security=dgs6600_security, dgs6600_mgmt=dgs6600_mgmt, dgs6600_mpls=dgs6600_mpls, dgs6600_system=dgs6600_system, dgs6604=dgs6604, dgs6600_l2=dgs6600_l2, dgs6600_qosacl=dgs6600_qosacl, dgs6608=dgs6608, dgs6600_l3=dgs6600_l3) |
__all__ = ["directory"]
def package_name() -> str:
return "timer-for-python"
def package_install_name() -> str:
return "timer-for-python"
| __all__ = ['directory']
def package_name() -> str:
return 'timer-for-python'
def package_install_name() -> str:
return 'timer-for-python' |
{
"targets": [
{
"target_name": "storm-replay",
"sources": [
"src/storm-replay.cpp",
"src/StormLib/src/adpcm/adpcm.cpp",
"src/StormLib/src/huffman/huff.cpp",
"src/StormLib/src/sparse/sparse.cpp",
"src/StormLib/src/FileStream.cpp",
"src/StormLib/src/SBaseCommon.cpp",
"src/StormLib/src/SBaseDumpData.cpp",
"src/StormLib/src/SBaseFileTable.cpp",
"src/StormLib/src/SBaseSubTypes.cpp",
"src/StormLib/src/SCompression.cpp",
"src/StormLib/src/SFileAddFile.cpp",
"src/StormLib/src/SFileAttributes.cpp",
"src/StormLib/src/SFileCompactArchive.cpp",
"src/StormLib/src/SFileCreateArchive.cpp",
"src/StormLib/src/SFileExtractFile.cpp",
"src/StormLib/src/SFileFindFile.cpp",
"src/StormLib/src/SFileGetFileInfo.cpp",
"src/StormLib/src/SFileListFile.cpp",
"src/StormLib/src/SFileOpenArchive.cpp",
"src/StormLib/src/SFileOpenFileEx.cpp",
"src/StormLib/src/SFilePatchArchives.cpp",
"src/StormLib/src/SFileReadFile.cpp",
"src/StormLib/src/SFileVerify.cpp",
"src/StormLib/src/libtomcrypt/src/hashes/sha1.c",
"src/StormLib/src/libtomcrypt/src/hashes/hash_memory.c",
"src/StormLib/src/libtomcrypt/src/hashes/md5.c",
"src/StormLib/src/libtomcrypt/src/misc/crypt_hash_is_valid.c",
"src/StormLib/src/libtomcrypt/src/misc/crypt_prng_descriptor.c",
"src/StormLib/src/libtomcrypt/src/misc/crypt_register_prng.c",
"src/StormLib/src/libtomcrypt/src/misc/crypt_ltc_mp_descriptor.c",
"src/StormLib/src/libtomcrypt/src/misc/crypt_find_hash.c",
"src/StormLib/src/libtomcrypt/src/misc/zeromem.c",
"src/StormLib/src/libtomcrypt/src/misc/base64_decode.c",
"src/StormLib/src/libtomcrypt/src/misc/crypt_register_hash.c",
"src/StormLib/src/libtomcrypt/src/misc/crypt_find_prng.c",
"src/StormLib/src/libtomcrypt/src/misc/crypt_prng_is_valid.c",
"src/StormLib/src/libtomcrypt/src/misc/crypt_hash_descriptor.c",
"src/StormLib/src/libtomcrypt/src/misc/crypt_libc.c",
"src/StormLib/src/libtomcrypt/src/misc/crypt_argchk.c",
"src/StormLib/src/libtomcrypt/src/math/multi.c",
"src/StormLib/src/libtomcrypt/src/math/ltm_desc.c",
"src/StormLib/src/libtomcrypt/src/math/rand_prime.c",
"src/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_bit_string.c",
"src/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_boolean.c",
"src/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_choice.c",
"src/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_ia5_string.c",
"src/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_integer.c",
"src/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_object_identifier.c",
"src/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_octet_string.c",
"src/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_printable_string.c",
"src/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_sequence_ex.c",
"src/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_sequence_flexi.c",
"src/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_sequence_multi.c",
"src/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_short_integer.c",
"src/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_utctime.c",
"src/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_utf8_string.c",
"src/StormLib/src/libtomcrypt/src/pk/asn1/der_encode_bit_string.c",
"src/StormLib/src/libtomcrypt/src/pk/asn1/der_encode_boolean.c",
"src/StormLib/src/libtomcrypt/src/pk/asn1/der_encode_ia5_string.c",
"src/StormLib/src/libtomcrypt/src/pk/asn1/der_encode_integer.c",
"src/StormLib/src/libtomcrypt/src/pk/asn1/der_encode_object_identifier.c",
"src/StormLib/src/libtomcrypt/src/pk/asn1/der_encode_octet_string.c",
"src/StormLib/src/libtomcrypt/src/pk/asn1/der_encode_printable_string.c",
"src/StormLib/src/libtomcrypt/src/pk/asn1/der_encode_sequence_ex.c",
"src/StormLib/src/libtomcrypt/src/pk/asn1/der_encode_sequence_multi.c",
"src/StormLib/src/libtomcrypt/src/pk/asn1/der_encode_set.c",
"src/StormLib/src/libtomcrypt/src/pk/asn1/der_encode_setof.c",
"src/StormLib/src/libtomcrypt/src/pk/asn1/der_encode_short_integer.c",
"src/StormLib/src/libtomcrypt/src/pk/asn1/der_encode_utctime.c",
"src/StormLib/src/libtomcrypt/src/pk/asn1/der_encode_utf8_string.c",
"src/StormLib/src/libtomcrypt/src/pk/asn1/der_length_bit_string.c",
"src/StormLib/src/libtomcrypt/src/pk/asn1/der_length_boolean.c",
"src/StormLib/src/libtomcrypt/src/pk/asn1/der_length_ia5_string.c",
"src/StormLib/src/libtomcrypt/src/pk/asn1/der_length_integer.c",
"src/StormLib/src/libtomcrypt/src/pk/asn1/der_length_object_identifier.c",
"src/StormLib/src/libtomcrypt/src/pk/asn1/der_length_octet_string.c",
"src/StormLib/src/libtomcrypt/src/pk/asn1/der_length_printable_string.c",
"src/StormLib/src/libtomcrypt/src/pk/asn1/der_length_sequence.c",
"src/StormLib/src/libtomcrypt/src/pk/asn1/der_length_utctime.c",
"src/StormLib/src/libtomcrypt/src/pk/asn1/der_sequence_free.c",
"src/StormLib/src/libtomcrypt/src/pk/asn1/der_length_utf8_string.c",
"src/StormLib/src/libtomcrypt/src/pk/asn1/der_length_short_integer.c",
"src/StormLib/src/libtomcrypt/src/pk/ecc/ltc_ecc_projective_dbl_point.c",
"src/StormLib/src/libtomcrypt/src/pk/ecc/ltc_ecc_mulmod.c",
"src/StormLib/src/libtomcrypt/src/pk/ecc/ltc_ecc_projective_add_point.c",
"src/StormLib/src/libtomcrypt/src/pk/ecc/ltc_ecc_map.c",
"src/StormLib/src/libtomcrypt/src/pk/ecc/ltc_ecc_points.c",
"src/StormLib/src/libtomcrypt/src/pk/ecc/ltc_ecc_mul2add.c",
"src/StormLib/src/libtomcrypt/src/pk/pkcs1/pkcs_1_v1_5_decode.c",
"src/StormLib/src/libtomcrypt/src/pk/pkcs1/pkcs_1_v1_5_encode.c",
"src/StormLib/src/libtomcrypt/src/pk/pkcs1/pkcs_1_pss_decode.c",
"src/StormLib/src/libtomcrypt/src/pk/pkcs1/pkcs_1_pss_encode.c",
"src/StormLib/src/libtomcrypt/src/pk/pkcs1/pkcs_1_mgf1.c",
"src/StormLib/src/libtomcrypt/src/pk/pkcs1/pkcs_1_oaep_decode.c",
"src/StormLib/src/libtomcrypt/src/pk/rsa/rsa_make_key.c",
"src/StormLib/src/libtomcrypt/src/pk/rsa/rsa_free.c",
"src/StormLib/src/libtomcrypt/src/pk/rsa/rsa_verify_simple.c",
"src/StormLib/src/libtomcrypt/src/pk/rsa/rsa_import.c",
"src/StormLib/src/libtomcrypt/src/pk/rsa/rsa_verify_hash.c",
"src/StormLib/src/libtomcrypt/src/pk/rsa/rsa_sign_hash.c",
"src/StormLib/src/libtomcrypt/src/pk/rsa/rsa_exptmod.c",
"src/StormLib/src/libtommath/bn_mp_exptmod_fast.c",
"src/StormLib/src/libtommath/bn_mp_jacobi.c",
"src/StormLib/src/libtommath/bn_mp_mod.c",
"src/StormLib/src/libtommath/bn_mp_signed_bin_size.c",
"src/StormLib/src/libtommath/bn_mp_invmod.c",
"src/StormLib/src/libtommath/bn_mp_is_square.c",
"src/StormLib/src/libtommath/bn_mp_neg.c",
"src/StormLib/src/libtommath/bn_mp_reduce_2k.c",
"src/StormLib/src/libtommath/bn_mp_xor.c",
"src/StormLib/src/libtommath/bn_mp_karatsuba_mul.c",
"src/StormLib/src/libtommath/bn_mp_dr_setup.c",
"src/StormLib/src/libtommath/bn_mp_mul.c",
"src/StormLib/src/libtommath/bn_mp_init_multi.c",
"src/StormLib/src/libtommath/bn_mp_clear.c",
"src/StormLib/src/libtommath/bn_s_mp_sqr.c",
"src/StormLib/src/libtommath/bn_mp_rshd.c",
"src/StormLib/src/libtommath/bn_s_mp_sub.c",
"src/StormLib/src/libtommath/bn_mp_sub.c",
"src/StormLib/src/libtommath/bn_mp_toradix.c",
"src/StormLib/src/libtommath/bn_mp_reduce.c",
"src/StormLib/src/libtommath/bn_mp_prime_is_prime.c",
"src/StormLib/src/libtommath/bn_mp_prime_next_prime.c",
"src/StormLib/src/libtommath/bn_mp_exptmod.c",
"src/StormLib/src/libtommath/bn_mp_mod_2d.c",
"src/StormLib/src/libtommath/bn_reverse.c",
"src/StormLib/src/libtommath/bn_mp_init.c",
"src/StormLib/src/libtommath/bn_fast_s_mp_sqr.c",
"src/StormLib/src/libtommath/bn_mp_sqr.c",
"src/StormLib/src/libtommath/bn_mp_cnt_lsb.c",
"src/StormLib/src/libtommath/bn_mp_clear_multi.c",
"src/StormLib/src/libtommath/bn_mp_exch.c",
"src/StormLib/src/libtommath/bn_fast_s_mp_mul_digs.c",
"src/StormLib/src/libtommath/bn_mp_grow.c",
"src/StormLib/src/libtommath/bn_mp_read_radix.c",
"src/StormLib/src/libtommath/bn_mp_mul_2.c",
"src/StormLib/src/libtommath/bn_mp_shrink.c",
"src/StormLib/src/libtommath/bn_mp_div_2.c",
"src/StormLib/src/libtommath/bn_fast_mp_invmod.c",
"src/StormLib/src/libtommath/bn_mp_prime_miller_rabin.c",
"src/StormLib/src/libtommath/bn_mp_to_unsigned_bin.c",
"src/StormLib/src/libtommath/bn_mp_prime_rabin_miller_trials.c",
"src/StormLib/src/libtommath/bn_mp_2expt.c",
"src/StormLib/src/libtommath/bn_mp_cmp_mag.c",
"src/StormLib/src/libtommath/bn_mp_to_signed_bin.c",
"src/StormLib/src/libtommath/bn_mp_get_int.c",
"src/StormLib/src/libtommath/bn_mp_montgomery_reduce.c",
"src/StormLib/src/libtommath/bn_mp_dr_reduce.c",
"src/StormLib/src/libtommath/bn_mp_fwrite.c",
"src/StormLib/src/libtommath/bn_mp_and.c",
"src/StormLib/src/libtommath/bn_mp_exteuclid.c",
"src/StormLib/src/libtommath/bn_fast_mp_montgomery_reduce.c",
"src/StormLib/src/libtommath/bn_s_mp_mul_high_digs.c",
"src/StormLib/src/libtommath/bn_mp_reduce_setup.c",
"src/StormLib/src/libtommath/bn_mp_lcm.c",
"src/StormLib/src/libtommath/bn_mp_abs.c",
"src/StormLib/src/libtommath/bn_mp_cmp.c",
"src/StormLib/src/libtommath/bn_mp_submod.c",
"src/StormLib/src/libtommath/bn_mp_div_d.c",
"src/StormLib/src/libtommath/bn_s_mp_mul_digs.c",
"src/StormLib/src/libtommath/bn_mp_mul_d.c",
"src/StormLib/src/libtommath/bn_mp_to_unsigned_bin_n.c",
"src/StormLib/src/libtommath/bn_mp_prime_random_ex.c",
"src/StormLib/src/libtommath/bn_mp_rand.c",
"src/StormLib/src/libtommath/bn_mp_div_2d.c",
"src/StormLib/src/libtommath/bn_mp_addmod.c",
"src/StormLib/src/libtommath/bn_mp_init_copy.c",
"src/StormLib/src/libtommath/bn_mp_read_unsigned_bin.c",
"src/StormLib/src/libtommath/bn_mp_toradix_n.c",
"src/StormLib/src/libtommath/bn_fast_s_mp_mul_high_digs.c",
"src/StormLib/src/libtommath/bn_mp_toom_sqr.c",
"src/StormLib/src/libtommath/bn_mp_to_signed_bin_n.c",
"src/StormLib/src/libtommath/bn_mp_reduce_2k_setup_l.c",
"src/StormLib/src/libtommath/bn_mp_div.c",
"src/StormLib/src/libtommath/bn_prime_tab.c",
"src/StormLib/src/libtommath/bn_mp_karatsuba_sqr.c",
"src/StormLib/src/libtommath/bn_mp_gcd.c",
"src/StormLib/src/libtommath/bn_mp_prime_is_divisible.c",
"src/StormLib/src/libtommath/bn_mp_set_int.c",
"src/StormLib/src/libtommath/bn_mp_prime_fermat.c",
"src/StormLib/src/libtommath/bn_mp_cmp_d.c",
"src/StormLib/src/libtommath/bn_mp_add.c",
"src/StormLib/src/libtommath/bn_mp_sub_d.c",
"src/StormLib/src/libtommath/bn_s_mp_exptmod.c",
"src/StormLib/src/libtommath/bn_mp_init_size.c",
"src/StormLib/src/libtommath/bncore.c",
"src/StormLib/src/libtommath/bn_mp_radix_smap.c",
"src/StormLib/src/libtommath/bn_mp_reduce_2k_l.c",
"src/StormLib/src/libtommath/bn_mp_montgomery_calc_normalization.c",
"src/StormLib/src/libtommath/bn_mp_mod_d.c",
"src/StormLib/src/libtommath/bn_mp_set.c",
"src/StormLib/src/libtommath/bn_mp_or.c",
"src/StormLib/src/libtommath/bn_mp_sqrt.c",
"src/StormLib/src/libtommath/bn_mp_invmod_slow.c",
"src/StormLib/src/libtommath/bn_mp_count_bits.c",
"src/StormLib/src/libtommath/bn_mp_read_signed_bin.c",
"src/StormLib/src/libtommath/bn_mp_div_3.c",
"src/StormLib/src/libtommath/bn_mp_unsigned_bin_size.c",
"src/StormLib/src/libtommath/bn_mp_mulmod.c",
"src/StormLib/src/libtommath/bn_mp_clamp.c",
"src/StormLib/src/libtommath/bn_mp_reduce_2k_setup.c",
"src/StormLib/src/libtommath/bn_mp_toom_mul.c",
"src/StormLib/src/libtommath/bn_mp_montgomery_setup.c",
"src/StormLib/src/libtommath/bn_mp_expt_d.c",
"src/StormLib/src/libtommath/bn_mp_copy.c",
"src/StormLib/src/libtommath/bn_mp_dr_is_modulus.c",
"src/StormLib/src/libtommath/bn_mp_sqrmod.c",
"src/StormLib/src/libtommath/bn_mp_reduce_is_2k_l.c",
"src/StormLib/src/libtommath/bn_mp_mul_2d.c",
"src/StormLib/src/libtommath/bn_mp_fread.c",
"src/StormLib/src/libtommath/bn_mp_init_set.c",
"src/StormLib/src/libtommath/bn_mp_add_d.c",
"src/StormLib/src/libtommath/bn_mp_zero.c",
"src/StormLib/src/libtommath/bn_s_mp_add.c",
"src/StormLib/src/libtommath/bn_mp_radix_size.c",
"src/StormLib/src/libtommath/bn_mp_init_set_int.c",
"src/StormLib/src/libtommath/bn_mp_n_root.c",
"src/StormLib/src/libtommath/bn_mp_lshd.c",
"src/StormLib/src/libtommath/bn_mp_reduce_is_2k.c",
"src/StormLib/src/pklib/implode.c",
"src/StormLib/src/pklib/crc32.c",
"src/StormLib/src/pklib/explode.c",
"src/StormLib/src/zlib/crc32.c",
"src/StormLib/src/zlib/trees.c",
"src/StormLib/src/zlib/compress.c",
"src/StormLib/src/zlib/adler32.c",
"src/StormLib/src/zlib/inftrees.c",
"src/StormLib/src/zlib/inffast.c",
"src/StormLib/src/zlib/deflate.c",
"src/StormLib/src/zlib/inflate.c",
"src/StormLib/src/zlib/zutil.c",
"src/StormLib/src/lzma/C/LzFind.c",
"src/StormLib/src/lzma/C/LzmaEnc.c",
"src/StormLib/src/lzma/C/LzmaDec.c",
"src/StormLib/src/jenkins/lookup3.c"
],
'include_dirs': [
'src/'
'StormLib/src/',
"<!(node -e \"require('nan')\")"
],
'conditions': [
[ 'OS=="mac"',
{
'sources!': [
"src/StormLib/src/lzma/C/LzFind.c",
"src/StormLib/src/lzma/C/LzmaEnc.c",
"src/StormLib/src/lzma/C/LzmaDec.c",
],
'cflags': [
'-Wall',
'-D__SYS_BZLIB',
'-D__SYS_ZLIB',
'-D_7ZIP_ST',
'-arch x86_64',
'-shared'
],
'link_settings': {
'libraries': [
'-lbz2',
'-lz',
'-framework Carbon',
]
},
},
'OS=="linux"',
{
'cflags': [
'-Wall',
'-fPIC',
'-D__SYS_BZLIB',
'-D__SYS_ZLIB',
'-D_7ZIP_ST',
],
'link_settings': {
'libraries': [
'-lbz2',
'-lz',
]
},
}
]
]
}
]
}
| {'targets': [{'target_name': 'storm-replay', 'sources': ['src/storm-replay.cpp', 'src/StormLib/src/adpcm/adpcm.cpp', 'src/StormLib/src/huffman/huff.cpp', 'src/StormLib/src/sparse/sparse.cpp', 'src/StormLib/src/FileStream.cpp', 'src/StormLib/src/SBaseCommon.cpp', 'src/StormLib/src/SBaseDumpData.cpp', 'src/StormLib/src/SBaseFileTable.cpp', 'src/StormLib/src/SBaseSubTypes.cpp', 'src/StormLib/src/SCompression.cpp', 'src/StormLib/src/SFileAddFile.cpp', 'src/StormLib/src/SFileAttributes.cpp', 'src/StormLib/src/SFileCompactArchive.cpp', 'src/StormLib/src/SFileCreateArchive.cpp', 'src/StormLib/src/SFileExtractFile.cpp', 'src/StormLib/src/SFileFindFile.cpp', 'src/StormLib/src/SFileGetFileInfo.cpp', 'src/StormLib/src/SFileListFile.cpp', 'src/StormLib/src/SFileOpenArchive.cpp', 'src/StormLib/src/SFileOpenFileEx.cpp', 'src/StormLib/src/SFilePatchArchives.cpp', 'src/StormLib/src/SFileReadFile.cpp', 'src/StormLib/src/SFileVerify.cpp', 'src/StormLib/src/libtomcrypt/src/hashes/sha1.c', 'src/StormLib/src/libtomcrypt/src/hashes/hash_memory.c', 'src/StormLib/src/libtomcrypt/src/hashes/md5.c', 'src/StormLib/src/libtomcrypt/src/misc/crypt_hash_is_valid.c', 'src/StormLib/src/libtomcrypt/src/misc/crypt_prng_descriptor.c', 'src/StormLib/src/libtomcrypt/src/misc/crypt_register_prng.c', 'src/StormLib/src/libtomcrypt/src/misc/crypt_ltc_mp_descriptor.c', 'src/StormLib/src/libtomcrypt/src/misc/crypt_find_hash.c', 'src/StormLib/src/libtomcrypt/src/misc/zeromem.c', 'src/StormLib/src/libtomcrypt/src/misc/base64_decode.c', 'src/StormLib/src/libtomcrypt/src/misc/crypt_register_hash.c', 'src/StormLib/src/libtomcrypt/src/misc/crypt_find_prng.c', 'src/StormLib/src/libtomcrypt/src/misc/crypt_prng_is_valid.c', 'src/StormLib/src/libtomcrypt/src/misc/crypt_hash_descriptor.c', 'src/StormLib/src/libtomcrypt/src/misc/crypt_libc.c', 'src/StormLib/src/libtomcrypt/src/misc/crypt_argchk.c', 'src/StormLib/src/libtomcrypt/src/math/multi.c', 'src/StormLib/src/libtomcrypt/src/math/ltm_desc.c', 'src/StormLib/src/libtomcrypt/src/math/rand_prime.c', 'src/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_bit_string.c', 'src/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_boolean.c', 'src/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_choice.c', 'src/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_ia5_string.c', 'src/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_integer.c', 'src/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_object_identifier.c', 'src/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_octet_string.c', 'src/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_printable_string.c', 'src/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_sequence_ex.c', 'src/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_sequence_flexi.c', 'src/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_sequence_multi.c', 'src/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_short_integer.c', 'src/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_utctime.c', 'src/StormLib/src/libtomcrypt/src/pk/asn1/der_decode_utf8_string.c', 'src/StormLib/src/libtomcrypt/src/pk/asn1/der_encode_bit_string.c', 'src/StormLib/src/libtomcrypt/src/pk/asn1/der_encode_boolean.c', 'src/StormLib/src/libtomcrypt/src/pk/asn1/der_encode_ia5_string.c', 'src/StormLib/src/libtomcrypt/src/pk/asn1/der_encode_integer.c', 'src/StormLib/src/libtomcrypt/src/pk/asn1/der_encode_object_identifier.c', 'src/StormLib/src/libtomcrypt/src/pk/asn1/der_encode_octet_string.c', 'src/StormLib/src/libtomcrypt/src/pk/asn1/der_encode_printable_string.c', 'src/StormLib/src/libtomcrypt/src/pk/asn1/der_encode_sequence_ex.c', 'src/StormLib/src/libtomcrypt/src/pk/asn1/der_encode_sequence_multi.c', 'src/StormLib/src/libtomcrypt/src/pk/asn1/der_encode_set.c', 'src/StormLib/src/libtomcrypt/src/pk/asn1/der_encode_setof.c', 'src/StormLib/src/libtomcrypt/src/pk/asn1/der_encode_short_integer.c', 'src/StormLib/src/libtomcrypt/src/pk/asn1/der_encode_utctime.c', 'src/StormLib/src/libtomcrypt/src/pk/asn1/der_encode_utf8_string.c', 'src/StormLib/src/libtomcrypt/src/pk/asn1/der_length_bit_string.c', 'src/StormLib/src/libtomcrypt/src/pk/asn1/der_length_boolean.c', 'src/StormLib/src/libtomcrypt/src/pk/asn1/der_length_ia5_string.c', 'src/StormLib/src/libtomcrypt/src/pk/asn1/der_length_integer.c', 'src/StormLib/src/libtomcrypt/src/pk/asn1/der_length_object_identifier.c', 'src/StormLib/src/libtomcrypt/src/pk/asn1/der_length_octet_string.c', 'src/StormLib/src/libtomcrypt/src/pk/asn1/der_length_printable_string.c', 'src/StormLib/src/libtomcrypt/src/pk/asn1/der_length_sequence.c', 'src/StormLib/src/libtomcrypt/src/pk/asn1/der_length_utctime.c', 'src/StormLib/src/libtomcrypt/src/pk/asn1/der_sequence_free.c', 'src/StormLib/src/libtomcrypt/src/pk/asn1/der_length_utf8_string.c', 'src/StormLib/src/libtomcrypt/src/pk/asn1/der_length_short_integer.c', 'src/StormLib/src/libtomcrypt/src/pk/ecc/ltc_ecc_projective_dbl_point.c', 'src/StormLib/src/libtomcrypt/src/pk/ecc/ltc_ecc_mulmod.c', 'src/StormLib/src/libtomcrypt/src/pk/ecc/ltc_ecc_projective_add_point.c', 'src/StormLib/src/libtomcrypt/src/pk/ecc/ltc_ecc_map.c', 'src/StormLib/src/libtomcrypt/src/pk/ecc/ltc_ecc_points.c', 'src/StormLib/src/libtomcrypt/src/pk/ecc/ltc_ecc_mul2add.c', 'src/StormLib/src/libtomcrypt/src/pk/pkcs1/pkcs_1_v1_5_decode.c', 'src/StormLib/src/libtomcrypt/src/pk/pkcs1/pkcs_1_v1_5_encode.c', 'src/StormLib/src/libtomcrypt/src/pk/pkcs1/pkcs_1_pss_decode.c', 'src/StormLib/src/libtomcrypt/src/pk/pkcs1/pkcs_1_pss_encode.c', 'src/StormLib/src/libtomcrypt/src/pk/pkcs1/pkcs_1_mgf1.c', 'src/StormLib/src/libtomcrypt/src/pk/pkcs1/pkcs_1_oaep_decode.c', 'src/StormLib/src/libtomcrypt/src/pk/rsa/rsa_make_key.c', 'src/StormLib/src/libtomcrypt/src/pk/rsa/rsa_free.c', 'src/StormLib/src/libtomcrypt/src/pk/rsa/rsa_verify_simple.c', 'src/StormLib/src/libtomcrypt/src/pk/rsa/rsa_import.c', 'src/StormLib/src/libtomcrypt/src/pk/rsa/rsa_verify_hash.c', 'src/StormLib/src/libtomcrypt/src/pk/rsa/rsa_sign_hash.c', 'src/StormLib/src/libtomcrypt/src/pk/rsa/rsa_exptmod.c', 'src/StormLib/src/libtommath/bn_mp_exptmod_fast.c', 'src/StormLib/src/libtommath/bn_mp_jacobi.c', 'src/StormLib/src/libtommath/bn_mp_mod.c', 'src/StormLib/src/libtommath/bn_mp_signed_bin_size.c', 'src/StormLib/src/libtommath/bn_mp_invmod.c', 'src/StormLib/src/libtommath/bn_mp_is_square.c', 'src/StormLib/src/libtommath/bn_mp_neg.c', 'src/StormLib/src/libtommath/bn_mp_reduce_2k.c', 'src/StormLib/src/libtommath/bn_mp_xor.c', 'src/StormLib/src/libtommath/bn_mp_karatsuba_mul.c', 'src/StormLib/src/libtommath/bn_mp_dr_setup.c', 'src/StormLib/src/libtommath/bn_mp_mul.c', 'src/StormLib/src/libtommath/bn_mp_init_multi.c', 'src/StormLib/src/libtommath/bn_mp_clear.c', 'src/StormLib/src/libtommath/bn_s_mp_sqr.c', 'src/StormLib/src/libtommath/bn_mp_rshd.c', 'src/StormLib/src/libtommath/bn_s_mp_sub.c', 'src/StormLib/src/libtommath/bn_mp_sub.c', 'src/StormLib/src/libtommath/bn_mp_toradix.c', 'src/StormLib/src/libtommath/bn_mp_reduce.c', 'src/StormLib/src/libtommath/bn_mp_prime_is_prime.c', 'src/StormLib/src/libtommath/bn_mp_prime_next_prime.c', 'src/StormLib/src/libtommath/bn_mp_exptmod.c', 'src/StormLib/src/libtommath/bn_mp_mod_2d.c', 'src/StormLib/src/libtommath/bn_reverse.c', 'src/StormLib/src/libtommath/bn_mp_init.c', 'src/StormLib/src/libtommath/bn_fast_s_mp_sqr.c', 'src/StormLib/src/libtommath/bn_mp_sqr.c', 'src/StormLib/src/libtommath/bn_mp_cnt_lsb.c', 'src/StormLib/src/libtommath/bn_mp_clear_multi.c', 'src/StormLib/src/libtommath/bn_mp_exch.c', 'src/StormLib/src/libtommath/bn_fast_s_mp_mul_digs.c', 'src/StormLib/src/libtommath/bn_mp_grow.c', 'src/StormLib/src/libtommath/bn_mp_read_radix.c', 'src/StormLib/src/libtommath/bn_mp_mul_2.c', 'src/StormLib/src/libtommath/bn_mp_shrink.c', 'src/StormLib/src/libtommath/bn_mp_div_2.c', 'src/StormLib/src/libtommath/bn_fast_mp_invmod.c', 'src/StormLib/src/libtommath/bn_mp_prime_miller_rabin.c', 'src/StormLib/src/libtommath/bn_mp_to_unsigned_bin.c', 'src/StormLib/src/libtommath/bn_mp_prime_rabin_miller_trials.c', 'src/StormLib/src/libtommath/bn_mp_2expt.c', 'src/StormLib/src/libtommath/bn_mp_cmp_mag.c', 'src/StormLib/src/libtommath/bn_mp_to_signed_bin.c', 'src/StormLib/src/libtommath/bn_mp_get_int.c', 'src/StormLib/src/libtommath/bn_mp_montgomery_reduce.c', 'src/StormLib/src/libtommath/bn_mp_dr_reduce.c', 'src/StormLib/src/libtommath/bn_mp_fwrite.c', 'src/StormLib/src/libtommath/bn_mp_and.c', 'src/StormLib/src/libtommath/bn_mp_exteuclid.c', 'src/StormLib/src/libtommath/bn_fast_mp_montgomery_reduce.c', 'src/StormLib/src/libtommath/bn_s_mp_mul_high_digs.c', 'src/StormLib/src/libtommath/bn_mp_reduce_setup.c', 'src/StormLib/src/libtommath/bn_mp_lcm.c', 'src/StormLib/src/libtommath/bn_mp_abs.c', 'src/StormLib/src/libtommath/bn_mp_cmp.c', 'src/StormLib/src/libtommath/bn_mp_submod.c', 'src/StormLib/src/libtommath/bn_mp_div_d.c', 'src/StormLib/src/libtommath/bn_s_mp_mul_digs.c', 'src/StormLib/src/libtommath/bn_mp_mul_d.c', 'src/StormLib/src/libtommath/bn_mp_to_unsigned_bin_n.c', 'src/StormLib/src/libtommath/bn_mp_prime_random_ex.c', 'src/StormLib/src/libtommath/bn_mp_rand.c', 'src/StormLib/src/libtommath/bn_mp_div_2d.c', 'src/StormLib/src/libtommath/bn_mp_addmod.c', 'src/StormLib/src/libtommath/bn_mp_init_copy.c', 'src/StormLib/src/libtommath/bn_mp_read_unsigned_bin.c', 'src/StormLib/src/libtommath/bn_mp_toradix_n.c', 'src/StormLib/src/libtommath/bn_fast_s_mp_mul_high_digs.c', 'src/StormLib/src/libtommath/bn_mp_toom_sqr.c', 'src/StormLib/src/libtommath/bn_mp_to_signed_bin_n.c', 'src/StormLib/src/libtommath/bn_mp_reduce_2k_setup_l.c', 'src/StormLib/src/libtommath/bn_mp_div.c', 'src/StormLib/src/libtommath/bn_prime_tab.c', 'src/StormLib/src/libtommath/bn_mp_karatsuba_sqr.c', 'src/StormLib/src/libtommath/bn_mp_gcd.c', 'src/StormLib/src/libtommath/bn_mp_prime_is_divisible.c', 'src/StormLib/src/libtommath/bn_mp_set_int.c', 'src/StormLib/src/libtommath/bn_mp_prime_fermat.c', 'src/StormLib/src/libtommath/bn_mp_cmp_d.c', 'src/StormLib/src/libtommath/bn_mp_add.c', 'src/StormLib/src/libtommath/bn_mp_sub_d.c', 'src/StormLib/src/libtommath/bn_s_mp_exptmod.c', 'src/StormLib/src/libtommath/bn_mp_init_size.c', 'src/StormLib/src/libtommath/bncore.c', 'src/StormLib/src/libtommath/bn_mp_radix_smap.c', 'src/StormLib/src/libtommath/bn_mp_reduce_2k_l.c', 'src/StormLib/src/libtommath/bn_mp_montgomery_calc_normalization.c', 'src/StormLib/src/libtommath/bn_mp_mod_d.c', 'src/StormLib/src/libtommath/bn_mp_set.c', 'src/StormLib/src/libtommath/bn_mp_or.c', 'src/StormLib/src/libtommath/bn_mp_sqrt.c', 'src/StormLib/src/libtommath/bn_mp_invmod_slow.c', 'src/StormLib/src/libtommath/bn_mp_count_bits.c', 'src/StormLib/src/libtommath/bn_mp_read_signed_bin.c', 'src/StormLib/src/libtommath/bn_mp_div_3.c', 'src/StormLib/src/libtommath/bn_mp_unsigned_bin_size.c', 'src/StormLib/src/libtommath/bn_mp_mulmod.c', 'src/StormLib/src/libtommath/bn_mp_clamp.c', 'src/StormLib/src/libtommath/bn_mp_reduce_2k_setup.c', 'src/StormLib/src/libtommath/bn_mp_toom_mul.c', 'src/StormLib/src/libtommath/bn_mp_montgomery_setup.c', 'src/StormLib/src/libtommath/bn_mp_expt_d.c', 'src/StormLib/src/libtommath/bn_mp_copy.c', 'src/StormLib/src/libtommath/bn_mp_dr_is_modulus.c', 'src/StormLib/src/libtommath/bn_mp_sqrmod.c', 'src/StormLib/src/libtommath/bn_mp_reduce_is_2k_l.c', 'src/StormLib/src/libtommath/bn_mp_mul_2d.c', 'src/StormLib/src/libtommath/bn_mp_fread.c', 'src/StormLib/src/libtommath/bn_mp_init_set.c', 'src/StormLib/src/libtommath/bn_mp_add_d.c', 'src/StormLib/src/libtommath/bn_mp_zero.c', 'src/StormLib/src/libtommath/bn_s_mp_add.c', 'src/StormLib/src/libtommath/bn_mp_radix_size.c', 'src/StormLib/src/libtommath/bn_mp_init_set_int.c', 'src/StormLib/src/libtommath/bn_mp_n_root.c', 'src/StormLib/src/libtommath/bn_mp_lshd.c', 'src/StormLib/src/libtommath/bn_mp_reduce_is_2k.c', 'src/StormLib/src/pklib/implode.c', 'src/StormLib/src/pklib/crc32.c', 'src/StormLib/src/pklib/explode.c', 'src/StormLib/src/zlib/crc32.c', 'src/StormLib/src/zlib/trees.c', 'src/StormLib/src/zlib/compress.c', 'src/StormLib/src/zlib/adler32.c', 'src/StormLib/src/zlib/inftrees.c', 'src/StormLib/src/zlib/inffast.c', 'src/StormLib/src/zlib/deflate.c', 'src/StormLib/src/zlib/inflate.c', 'src/StormLib/src/zlib/zutil.c', 'src/StormLib/src/lzma/C/LzFind.c', 'src/StormLib/src/lzma/C/LzmaEnc.c', 'src/StormLib/src/lzma/C/LzmaDec.c', 'src/StormLib/src/jenkins/lookup3.c'], 'include_dirs': ['src/StormLib/src/', '<!(node -e "require(\'nan\')")'], 'conditions': [['OS=="mac"', {'sources!': ['src/StormLib/src/lzma/C/LzFind.c', 'src/StormLib/src/lzma/C/LzmaEnc.c', 'src/StormLib/src/lzma/C/LzmaDec.c'], 'cflags': ['-Wall', '-D__SYS_BZLIB', '-D__SYS_ZLIB', '-D_7ZIP_ST', '-arch x86_64', '-shared'], 'link_settings': {'libraries': ['-lbz2', '-lz', '-framework Carbon']}}, 'OS=="linux"', {'cflags': ['-Wall', '-fPIC', '-D__SYS_BZLIB', '-D__SYS_ZLIB', '-D_7ZIP_ST'], 'link_settings': {'libraries': ['-lbz2', '-lz']}}]]}]} |
#!/usr/bin/env python
tableData = [['apples', 'oranges', 'cherries', 'banana'],
['Alice', 'Bob', 'Carol', 'David'],
['dogs', 'cats', 'moose', 'goose']]
widthTable = [0] * len(tableData)
def getMaxWidth():
for i in range(len(tableData)):
maxLen = -1
for j in range(len(tableData[i])):
if len(tableData[i][j]) > maxLen:
maxLen = len(tableData[i][j])
widthTable[i] = maxLen
def printData():
for i in range(len(tableData[0])):
for j in range(len(tableData)):
print(tableData[j][i].rjust(widthTable[j]), end=' ')
print('')
getMaxWidth()
printData()
| table_data = [['apples', 'oranges', 'cherries', 'banana'], ['Alice', 'Bob', 'Carol', 'David'], ['dogs', 'cats', 'moose', 'goose']]
width_table = [0] * len(tableData)
def get_max_width():
for i in range(len(tableData)):
max_len = -1
for j in range(len(tableData[i])):
if len(tableData[i][j]) > maxLen:
max_len = len(tableData[i][j])
widthTable[i] = maxLen
def print_data():
for i in range(len(tableData[0])):
for j in range(len(tableData)):
print(tableData[j][i].rjust(widthTable[j]), end=' ')
print('')
get_max_width()
print_data() |
# coding: utf-8
n = int(input())
if n%2==1:
print(-1)
else:
print(' '.join([str(i+1) if i%2==1 else str(i-1) for i in range(1,n+1)]))
| n = int(input())
if n % 2 == 1:
print(-1)
else:
print(' '.join([str(i + 1) if i % 2 == 1 else str(i - 1) for i in range(1, n + 1)])) |
a, b = map(int,input().split())
while a > 0 and b > 0:
if a > b:
a, b = b, a
seq = ' '.join(str(c) for c in range(a, b+1))
print("{} Sum={}".format(seq, sum(range(a,b+1))))
a, b = map(int, input().split())
| (a, b) = map(int, input().split())
while a > 0 and b > 0:
if a > b:
(a, b) = (b, a)
seq = ' '.join((str(c) for c in range(a, b + 1)))
print('{} Sum={}'.format(seq, sum(range(a, b + 1))))
(a, b) = map(int, input().split()) |
# Day 0: Weighted Mean
# Enter your code here. Read input from STDIN. Print output to STDOUT
__author__ = "Sanju Sci"
__email__ = "sanju.sci9@gmail.com"
__copyright__ = "Copyright 2019"
class Day0(object):
def __init__(self):
pass
def mean(self, values: list, n) -> int:
result = 0
for value in values:
result += value
result /= n
return result
def median(self, values: list, n)-> float:
values = sorted(values)
if n % 2 != 0:
return values[n//2] / 2
else:
return (values[n//2] + values[n//2 -1]) / 2
def mode(self, values: list) -> int:
counters = {}
result = None
for value in values:
if value not in counters:
counters[value] = 1
else:
counters[value] += 1
if result is None or counters[value] > counters[result]:
result = value
elif (counters[value] == counters[result]) and (value < result):
result = value
return result
if __name__ == '__main__':
n = int(input())
arr = list(map(int, input().split()))
d0 = Day0()
print(d0.mean(arr, n))
print(d0.median(arr, n))
print(d0.mode(arr))
| __author__ = 'Sanju Sci'
__email__ = 'sanju.sci9@gmail.com'
__copyright__ = 'Copyright 2019'
class Day0(object):
def __init__(self):
pass
def mean(self, values: list, n) -> int:
result = 0
for value in values:
result += value
result /= n
return result
def median(self, values: list, n) -> float:
values = sorted(values)
if n % 2 != 0:
return values[n // 2] / 2
else:
return (values[n // 2] + values[n // 2 - 1]) / 2
def mode(self, values: list) -> int:
counters = {}
result = None
for value in values:
if value not in counters:
counters[value] = 1
else:
counters[value] += 1
if result is None or counters[value] > counters[result]:
result = value
elif counters[value] == counters[result] and value < result:
result = value
return result
if __name__ == '__main__':
n = int(input())
arr = list(map(int, input().split()))
d0 = day0()
print(d0.mean(arr, n))
print(d0.median(arr, n))
print(d0.mode(arr)) |
bedroom_choices = {
'1': 1,
'2': 2,
'3': 3,
'4': 4,
'5': 5,
'6': 6,
'7': 7,
'8': 8,
'9': 9,
'10': 10
}
price_choices = {
'10000': "kshs10,000",
'25000': "kshs25,000",
'50000': "kshs50,000",
'75000': "kshs75,000",
'100000': "kshs100,000",
'150000': "kshs150,000",
'200000': "kshs200,000",
'300000': "kshs300,000",
'400000': "kshs400,000",
'500000': "kshs500,000",
'600000': "kshs600,000",
'1000000': "kshs1,000,000",
'5000000': "kshs5,000,000",
'10000000': "kshs10,000,000",
'15000000': "kshs15,000,000",
'20000000': "kshs20,000,000",
'30000000': "kshs30,000,000",
'50000000': "kshs50,000,000",
'75000000': "kshs75,000,000",
'100000000': "kshs100,000,000",
'150000000': "kshs150,000,000",
'200000000': "kshs200,000,000",
'300000000': "kshs300,000,000",
'400000000': "kshs400,000,000",
'600000000': "kshs600,000,000",
'800000000': "kshs800,000,000"
}
county_choices = {
'Nairobi': "Nairobi",
'Nakuru': "Nakuru",
'Mombasa': "Mombasa",
'Kisumu': "Kisumu",
'UasinGishu': "UasinGishu",
'Kajiado': "Kajiado",
'Lamu': "Lamu",
'Kwale': "Kwale",
'Nanyuki': "Nanyuki",
'Machakos': "Machakos",
'Kiambu': "Kiambu",
'Nyeri': "Nyeri"
} | bedroom_choices = {'1': 1, '2': 2, '3': 3, '4': 4, '5': 5, '6': 6, '7': 7, '8': 8, '9': 9, '10': 10}
price_choices = {'10000': 'kshs10,000', '25000': 'kshs25,000', '50000': 'kshs50,000', '75000': 'kshs75,000', '100000': 'kshs100,000', '150000': 'kshs150,000', '200000': 'kshs200,000', '300000': 'kshs300,000', '400000': 'kshs400,000', '500000': 'kshs500,000', '600000': 'kshs600,000', '1000000': 'kshs1,000,000', '5000000': 'kshs5,000,000', '10000000': 'kshs10,000,000', '15000000': 'kshs15,000,000', '20000000': 'kshs20,000,000', '30000000': 'kshs30,000,000', '50000000': 'kshs50,000,000', '75000000': 'kshs75,000,000', '100000000': 'kshs100,000,000', '150000000': 'kshs150,000,000', '200000000': 'kshs200,000,000', '300000000': 'kshs300,000,000', '400000000': 'kshs400,000,000', '600000000': 'kshs600,000,000', '800000000': 'kshs800,000,000'}
county_choices = {'Nairobi': 'Nairobi', 'Nakuru': 'Nakuru', 'Mombasa': 'Mombasa', 'Kisumu': 'Kisumu', 'UasinGishu': 'UasinGishu', 'Kajiado': 'Kajiado', 'Lamu': 'Lamu', 'Kwale': 'Kwale', 'Nanyuki': 'Nanyuki', 'Machakos': 'Machakos', 'Kiambu': 'Kiambu', 'Nyeri': 'Nyeri'} |
emotions = {
0: 'angry',
1: 'calm',
2 : 'fearful',
3 : 'happy',
4 : 'sad'
} | emotions = {0: 'angry', 1: 'calm', 2: 'fearful', 3: 'happy', 4: 'sad'} |
currencies = {
"AUD": "Australian dollar",
"BGN": "Bulgarian lev",
"BRL": "Brazilian real",
"CAD": "Canadian dollar",
"CHF": "Swiss franc",
"CNY": "Chinese yuan",
"CZK": "Czech koruna",
"DKK": "Danish krone",
"EUR": "Euro",
"GBP": "British pound",
"HKD": "Hong Kong dollar",
"HRK": "Croatian kuna",
"HUF": "Hungarian forint",
"IDR": "Indonesian rupiah",
"ILS": "Israeli shekel",
"INR": "Indian rupee",
"JPY": "Japanese yen",
"KRW": "South Korean won",
"MXN": "Mexican peso",
"MYR": "Malaysian ringgit",
"NOK": "Norwegian krone",
"NZD": "New Zealand dollar",
"PHP": "Philippine peso",
"PLN": "Polish zloty",
"RON": "Romanian leu",
"RUB": "Russian ruble",
"SEK": "Swedish krona",
"SGD": "Singapore dollar",
"THB": "Thai baht",
"TRY": "Turkish lira",
"USD": "US dollar",
"ZAR": "South African rand"
}
def print_rate(value, rate, base, target):
print(str(value) + " " + currencies[base] + " = " + str(rate*value) + " " +
currencies[target])
def print_help(cmd):
print(
"Example: '" + cmd + " 20 USD BRL'\n" +
"This converts 20 US dollars to Brazilian reals\n\n" +
"Type '" + cmd + " -l' to get all available currencies")
def print_currencies():
print("Available currencies:\n")
for k, v in currencies.items():
print(k, " - ", v)
| currencies = {'AUD': 'Australian dollar', 'BGN': 'Bulgarian lev', 'BRL': 'Brazilian real', 'CAD': 'Canadian dollar', 'CHF': 'Swiss franc', 'CNY': 'Chinese yuan', 'CZK': 'Czech koruna', 'DKK': 'Danish krone', 'EUR': 'Euro', 'GBP': 'British pound', 'HKD': 'Hong Kong dollar', 'HRK': 'Croatian kuna', 'HUF': 'Hungarian forint', 'IDR': 'Indonesian rupiah', 'ILS': 'Israeli shekel', 'INR': 'Indian rupee', 'JPY': 'Japanese yen', 'KRW': 'South Korean won', 'MXN': 'Mexican peso', 'MYR': 'Malaysian ringgit', 'NOK': 'Norwegian krone', 'NZD': 'New Zealand dollar', 'PHP': 'Philippine peso', 'PLN': 'Polish zloty', 'RON': 'Romanian leu', 'RUB': 'Russian ruble', 'SEK': 'Swedish krona', 'SGD': 'Singapore dollar', 'THB': 'Thai baht', 'TRY': 'Turkish lira', 'USD': 'US dollar', 'ZAR': 'South African rand'}
def print_rate(value, rate, base, target):
print(str(value) + ' ' + currencies[base] + ' = ' + str(rate * value) + ' ' + currencies[target])
def print_help(cmd):
print("Example: '" + cmd + " 20 USD BRL'\n" + 'This converts 20 US dollars to Brazilian reals\n\n' + "Type '" + cmd + " -l' to get all available currencies")
def print_currencies():
print('Available currencies:\n')
for (k, v) in currencies.items():
print(k, ' - ', v) |
gsr_samples_number = 10 #Wait 10 samples of GSR to filter average
gsr_samples_delay = 0.02 #Time between samples equals to 20ms
gsr_channel = 1 #ADS1115 Channel for the GSR sensor
GAIN = 1 #ADS1115 Gain for values between +/- 4.096V
#-------------------------------GRSensor()----------------------------------------#
#Alert function for the GSR sensor to detect the user stress level and skin status#
#---------------------------------------------------------------------------------#
def GRSensor():
gsr_sum = 0.0
for i in range(0, gsr_samples_number):
gsr_adc_read = Adafruit_ADS1x15.ADS1115()
gsr_value = gsr_adc_read.read_adc(gsr_channel, gain=GAIN)/100
gsr_sum += gsr_value
time.sleep(gsr_samples_delay) #delay
gsr_avg = gsr_sum/gsr_samples_number #Filter average from gsr samples
if gsr_avg <= 20:
return 0 #Disconnected
elif gsr_avg >= 20 and gsr_avg<=210:
return 1 #Normal status
else:
return 2 #Alert status
#print("GSR AVERAGE => ", gsr_avg)
| gsr_samples_number = 10
gsr_samples_delay = 0.02
gsr_channel = 1
gain = 1
def gr_sensor():
gsr_sum = 0.0
for i in range(0, gsr_samples_number):
gsr_adc_read = Adafruit_ADS1x15.ADS1115()
gsr_value = gsr_adc_read.read_adc(gsr_channel, gain=GAIN) / 100
gsr_sum += gsr_value
time.sleep(gsr_samples_delay)
gsr_avg = gsr_sum / gsr_samples_number
if gsr_avg <= 20:
return 0
elif gsr_avg >= 20 and gsr_avg <= 210:
return 1
else:
return 2 |
#
class Direction (object):
'''
A list of direction types, as used in Busiest Travel Period
.. code-block:: python
from amadeus import Direction
client.travel.analytics.air_traffic.busiest_period.get(
cityCode = 'MAD',
period = '2017',
direction = Direction.ARRIVING
)
:cvar ARRIVING: ``"ARRIVING"``
:cvar DEPARTING: ``"DEPARTING"``
'''
# Arriving
ARRIVING = 'ARRIVING'
# Departing
DEPARTING = 'DEPARTING'
| class Direction(object):
"""
A list of direction types, as used in Busiest Travel Period
.. code-block:: python
from amadeus import Direction
client.travel.analytics.air_traffic.busiest_period.get(
cityCode = 'MAD',
period = '2017',
direction = Direction.ARRIVING
)
:cvar ARRIVING: ``"ARRIVING"``
:cvar DEPARTING: ``"DEPARTING"``
"""
arriving = 'ARRIVING'
departing = 'DEPARTING' |
num1 = 15
num2 = 20
sum = num1 + num2
print("sum of {0} and {1} is {2}".format(num1,num2,sum)) | num1 = 15
num2 = 20
sum = num1 + num2
print('sum of {0} and {1} is {2}'.format(num1, num2, sum)) |
def exchange(a, i, j):
temp = a[i]
a[i] = a[j]
a[j] = temp
class MinPQ(object):
s = None
N = 0
compare = None
def __init__(self, compare=None):
self.s = [0] * 10
self.N = 0
if compare is None:
compare = lambda x, y: x - y
self.compare = compare
def less(self, a1, a2):
return self.compare(a1, a2) < 0
def enqueue(self, item):
if self.N + 1 >= len(self.s):
self.resize(len(self.s) * 2)
self.N += 1
self.s[self.N] = item
self.swim(self.N)
def resize(self, new_length):
temp = [0] * new_length
length = min(new_length, len(self.s))
for i in range(length):
temp[i] = self.s[i]
self.s = temp
def swim(self, k):
while k > 1:
parent = k // 2
if self.less(self.s[k], self.s[parent]):
exchange(self.s, k, parent)
k = parent
else:
break
def del_min(self):
if self.N == 0:
return None
item = self.s[1]
exchange(self.s, 1, self.N)
self.N -= 1
self.sink(1)
return item
def sink(self, k):
while 2 * k <= self.N:
child = k * 2
if child < self.N and self.less(self.s[child + 1], self.s[child]):
child += 1
if self.less(self.s[child], self.s[k]):
exchange(self.s, k, child)
k = child
else:
break
def size(self):
return self.N
def is_empty(self):
return self.N == 0
| def exchange(a, i, j):
temp = a[i]
a[i] = a[j]
a[j] = temp
class Minpq(object):
s = None
n = 0
compare = None
def __init__(self, compare=None):
self.s = [0] * 10
self.N = 0
if compare is None:
compare = lambda x, y: x - y
self.compare = compare
def less(self, a1, a2):
return self.compare(a1, a2) < 0
def enqueue(self, item):
if self.N + 1 >= len(self.s):
self.resize(len(self.s) * 2)
self.N += 1
self.s[self.N] = item
self.swim(self.N)
def resize(self, new_length):
temp = [0] * new_length
length = min(new_length, len(self.s))
for i in range(length):
temp[i] = self.s[i]
self.s = temp
def swim(self, k):
while k > 1:
parent = k // 2
if self.less(self.s[k], self.s[parent]):
exchange(self.s, k, parent)
k = parent
else:
break
def del_min(self):
if self.N == 0:
return None
item = self.s[1]
exchange(self.s, 1, self.N)
self.N -= 1
self.sink(1)
return item
def sink(self, k):
while 2 * k <= self.N:
child = k * 2
if child < self.N and self.less(self.s[child + 1], self.s[child]):
child += 1
if self.less(self.s[child], self.s[k]):
exchange(self.s, k, child)
k = child
else:
break
def size(self):
return self.N
def is_empty(self):
return self.N == 0 |
# Generated from 'Lists.h'
def FOUR_CHAR_CODE(x): return x
listNotifyNothing = FOUR_CHAR_CODE('nada')
listNotifyClick = FOUR_CHAR_CODE('clik')
listNotifyDoubleClick = FOUR_CHAR_CODE('dblc')
listNotifyPreClick = FOUR_CHAR_CODE('pclk')
lDrawingModeOffBit = 3
lDoVAutoscrollBit = 1
lDoHAutoscrollBit = 0
lDrawingModeOff = 8
lDoVAutoscroll = 2
lDoHAutoscroll = 1
lOnlyOneBit = 7
lExtendDragBit = 6
lNoDisjointBit = 5
lNoExtendBit = 4
lNoRectBit = 3
lUseSenseBit = 2
lNoNilHiliteBit = 1
lOnlyOne = -128
lExtendDrag = 64
lNoDisjoint = 32
lNoExtend = 16
lNoRect = 8
lUseSense = 4
lNoNilHilite = 2
lInitMsg = 0
lDrawMsg = 1
lHiliteMsg = 2
lCloseMsg = 3
kListDefProcPtr = 0
kListDefUserProcType = kListDefProcPtr
kListDefStandardTextType = 1
kListDefStandardIconType = 2
| def four_char_code(x):
return x
list_notify_nothing = four_char_code('nada')
list_notify_click = four_char_code('clik')
list_notify_double_click = four_char_code('dblc')
list_notify_pre_click = four_char_code('pclk')
l_drawing_mode_off_bit = 3
l_do_v_autoscroll_bit = 1
l_do_h_autoscroll_bit = 0
l_drawing_mode_off = 8
l_do_v_autoscroll = 2
l_do_h_autoscroll = 1
l_only_one_bit = 7
l_extend_drag_bit = 6
l_no_disjoint_bit = 5
l_no_extend_bit = 4
l_no_rect_bit = 3
l_use_sense_bit = 2
l_no_nil_hilite_bit = 1
l_only_one = -128
l_extend_drag = 64
l_no_disjoint = 32
l_no_extend = 16
l_no_rect = 8
l_use_sense = 4
l_no_nil_hilite = 2
l_init_msg = 0
l_draw_msg = 1
l_hilite_msg = 2
l_close_msg = 3
k_list_def_proc_ptr = 0
k_list_def_user_proc_type = kListDefProcPtr
k_list_def_standard_text_type = 1
k_list_def_standard_icon_type = 2 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# created by Lipson on 19-12-2.
# email to LipsonChan@yahoo.com
#
class Config(object):
DEBUG = True
TESTTING = False
DB_URI = 'mysql+pymysql://xxx:xxxx@127.0.0.1:3306/flask_test'
| class Config(object):
debug = True
testting = False
db_uri = 'mysql+pymysql://xxx:xxxx@127.0.0.1:3306/flask_test' |
my_kustomization = {
'commonLabels': {
'app': 'hello',
},
'resources': [
'deployment:my_deployment',
'service:my_service',
'configMap:my_config_map',
],
}
| my_kustomization = {'commonLabels': {'app': 'hello'}, 'resources': ['deployment:my_deployment', 'service:my_service', 'configMap:my_config_map']} |
# This macro uses the native genrule which is a lot shorter
def archive2(name, files, out):
native.genrule(
name = name,
outs = [out],
srcs = files,
cmd = "zip $(OUTS) $(SRCS)",
)
| def archive2(name, files, out):
native.genrule(name=name, outs=[out], srcs=files, cmd='zip $(OUTS) $(SRCS)') |
#!/usr/bin/env python3
#this program will write
#Thura Dwe He/Him/His
print("Thura Dwe He/Him/His") # print out Thura Dwe He/Him/His
| print('Thura Dwe He/Him/His') |
#
# This file contains the Python code from Program 14.17 of
# "Data Structures and Algorithms
# with Object-Oriented Design Patterns in Python"
# by Bruno R. Preiss.
#
# Copyright (c) 2003 by Bruno R. Preiss, P.Eng. All rights reserved.
#
# http://www.brpreiss.com/books/opus7/programs/pgm14_17.txt
#
def pi(trials):
hits = 0
for i in xrange(trials):
x = RandomNumberGenerator.next
y = RandomNumberGenerator.next
if x * x + y * y < 1.0:
hits += 1
return 4.0 * hits / trials
| def pi(trials):
hits = 0
for i in xrange(trials):
x = RandomNumberGenerator.next
y = RandomNumberGenerator.next
if x * x + y * y < 1.0:
hits += 1
return 4.0 * hits / trials |
###############################################################################
# This module exposes LITMUS APIs
#
__all__ = ["config", "litmus_mixing"]
name = "litmus"
| __all__ = ['config', 'litmus_mixing']
name = 'litmus' |
num = int(input())
partner_one = input().split()
partner_two = input().split()
if len(partner_one) != len(set(partner_one)) or len(partner_two) != len(set(partner_two)):
exit('bad')
d = {partner_one[q]:partner_two[q] for q in range(num)}
for q in range(num):
if d[partner_two[q]] != partner_one[q]:
exit('bad')
print('good') | num = int(input())
partner_one = input().split()
partner_two = input().split()
if len(partner_one) != len(set(partner_one)) or len(partner_two) != len(set(partner_two)):
exit('bad')
d = {partner_one[q]: partner_two[q] for q in range(num)}
for q in range(num):
if d[partner_two[q]] != partner_one[q]:
exit('bad')
print('good') |
# coding: utf-8
a = 2
b = 3
c = 2.3
d = a + b
print(d) # 5
print(a+b) # 5
print(a+c) # 4.3
print (b/a) # 1.5
print(b//a) # ! 1 floor division
print (a*c) # 4.6
print (a ** b ) # ! 8 power
print (17 % 3) # Modulus 17 = 3*5+2
| a = 2
b = 3
c = 2.3
d = a + b
print(d)
print(a + b)
print(a + c)
print(b / a)
print(b // a)
print(a * c)
print(a ** b)
print(17 % 3) |
def insertionSort(A):
valueIndex = 0
value = 0
for i in range(1, len(A)):
valueIndex = i
value = A[i]
while valueIndex > 0 and A[valueIndex - 1] > value:
A[valueIndex] = A[valueIndex - 1];
valueIndex = valueIndex - 1;
A[valueIndex] = value
return A
| def insertion_sort(A):
value_index = 0
value = 0
for i in range(1, len(A)):
value_index = i
value = A[i]
while valueIndex > 0 and A[valueIndex - 1] > value:
A[valueIndex] = A[valueIndex - 1]
value_index = valueIndex - 1
A[valueIndex] = value
return A |
#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) 2016+ Buro Petr van Blokland + Claudia Mens
# www.pagebot.io
#
# P A G E B O T
#
# Licensed under MIT conditions
#
# Supporting DrawBot, www.drawbot.com
# Supporting Flat, xxyxyz.org/flat
# -----------------------------------------------------------------------------
#
# errors.py
#
#
class PageBotOSXError(TypeError):
pass
class PageBotOSXFileFormatError(Exception):
def __init__(self, msg):
super().__init__()
self.msg = msg
def __str__(self):
return '! PageBot OSX file format error: %s' % self.msg
| class Pagebotosxerror(TypeError):
pass
class Pagebotosxfileformaterror(Exception):
def __init__(self, msg):
super().__init__()
self.msg = msg
def __str__(self):
return '! PageBot OSX file format error: %s' % self.msg |
__version__ = "1.1.17"
__version_info__ = VersionInfo._from_version_string(__version__)
__title__ = "django-materializecss-form"
__description__ = "A simple Django form template tag to work with Materializecss"
__url__ = "https://github.com/kalwalkden/django-materializecss-form"
__uri__ = "https://github.com/kalwalkden/django-materializecss-form"
__doc__ = __description__ + " <" + __uri__ + ">"
__author__ = "Kal Walkden, Samuel von Stachelski"
__email__ = "kal@walkden.us, sam@basx.dev"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2020 Kal Walkden"
| __version__ = '1.1.17'
__version_info__ = VersionInfo._from_version_string(__version__)
__title__ = 'django-materializecss-form'
__description__ = 'A simple Django form template tag to work with Materializecss'
__url__ = 'https://github.com/kalwalkden/django-materializecss-form'
__uri__ = 'https://github.com/kalwalkden/django-materializecss-form'
__doc__ = __description__ + ' <' + __uri__ + '>'
__author__ = 'Kal Walkden, Samuel von Stachelski'
__email__ = 'kal@walkden.us, sam@basx.dev'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2020 Kal Walkden' |
name = input('Please enter your name >')
print('type(name):' , type(name))
print('your name is ' + name.upper())
| name = input('Please enter your name >')
print('type(name):', type(name))
print('your name is ' + name.upper()) |
class iron_ore_mining():
SCRIPT_NAME = "IRON ORE MINING SCRIPT 0.2v";
BUTTON = [
];
CHATBOX = [
];
FUNCTION = [
];
INTERFACE = [
];
ITEM = [
".\\resources\\item\\inventor\\iron_ore.png",
".\\resources\\item\\inventor\\uncut_sapphire.png",
".\\resources\\item\\inventor\\uncut_emerald.png"
];
NPC = [
];
MAP = [
];
OBJECT = [
".\\resources\\method\\iron_ore_mining\\object\\south_rock.png",
".\\resources\\method\\iron_ore_mining\\object\\west_rock.png",
".\\resources\\method\\iron_ore_mining\\object\\nord_rock.png",
".\\resources\\method\\iron_ore_mining\\inventor\\full.png"
]; | class Iron_Ore_Mining:
script_name = 'IRON ORE MINING SCRIPT 0.2v'
button = []
chatbox = []
function = []
interface = []
item = ['.\\resources\\item\\inventor\\iron_ore.png', '.\\resources\\item\\inventor\\uncut_sapphire.png', '.\\resources\\item\\inventor\\uncut_emerald.png']
npc = []
map = []
object = ['.\\resources\\method\\iron_ore_mining\\object\\south_rock.png', '.\\resources\\method\\iron_ore_mining\\object\\west_rock.png', '.\\resources\\method\\iron_ore_mining\\object\\nord_rock.png', '.\\resources\\method\\iron_ore_mining\\inventor\\full.png'] |
n = int(input())
a = list(map(int, input().split()))
stack = []
stack.extend([(each,) for each in range(len(a))])
diff = {} # {node: value}
while stack:
node = stack.pop()
if len(node) > 1:
value = abs(a[node[-2]]-a[node[-1]])
diff.update({node: diff.get(node[:-1], 0) + value})
for index in range(len(a)):
if index in node:
continue
stack.append((*node, index))
maximum = None
for node, value in diff.items():
if len(node) != n:
continue
if maximum is None:
maximum = value
if value > maximum:
maximum = value
print(maximum)
| n = int(input())
a = list(map(int, input().split()))
stack = []
stack.extend([(each,) for each in range(len(a))])
diff = {}
while stack:
node = stack.pop()
if len(node) > 1:
value = abs(a[node[-2]] - a[node[-1]])
diff.update({node: diff.get(node[:-1], 0) + value})
for index in range(len(a)):
if index in node:
continue
stack.append((*node, index))
maximum = None
for (node, value) in diff.items():
if len(node) != n:
continue
if maximum is None:
maximum = value
if value > maximum:
maximum = value
print(maximum) |
def binary_search(arr, elem):
lo = 0
hi = len(arr) - 1
res = -1
while lo <= hi:
mid = (lo + hi) // 2
if arr[mid] == elem:
res = mid
return res
if arr[mid] > elem:
hi = mid - 1
else:
lo = mid + 1
return res
arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
elem = 10
result = binary_search(arr, elem)
print(result)
| def binary_search(arr, elem):
lo = 0
hi = len(arr) - 1
res = -1
while lo <= hi:
mid = (lo + hi) // 2
if arr[mid] == elem:
res = mid
return res
if arr[mid] > elem:
hi = mid - 1
else:
lo = mid + 1
return res
arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
elem = 10
result = binary_search(arr, elem)
print(result) |
class WordFrequencies(object):
def __init__(self, ddi_frequencies, random_articles_frequencies):
self.ddi_frequencies = ddi_frequencies
self.random_articles_frequencies = random_articles_frequencies
| class Wordfrequencies(object):
def __init__(self, ddi_frequencies, random_articles_frequencies):
self.ddi_frequencies = ddi_frequencies
self.random_articles_frequencies = random_articles_frequencies |
a, b = map(int, input().split())
result = 0
if a > b:
result += a
a -= 1
else:
result += b
b -= 1
if a > b:
result += a
else:
result += b
print(result)
| (a, b) = map(int, input().split())
result = 0
if a > b:
result += a
a -= 1
else:
result += b
b -= 1
if a > b:
result += a
else:
result += b
print(result) |
# these functions are called in main.py
print("This is a calculator powered by TMath Module by Trevlin Morris")
print("Avaliable commands are:\nDiv\nMult\nAdd\nSub\nRound\nCompare")
def Div():
A = float(input())
B = float(input())
C = A / B
print(C)
def Mult():
A = float(input())
B = float(input())
C = A * B
print(C)
def Add():
A = float(input())
B = float(input())
C = A + B
print(C)
def Sub():
A = float(input())
B = float(input())
C = A - B
print(C)
def Round():
A = float(input())
X = round(A)
print(X)
def Compare():
A = float(input())
B = float(input())
if A > B:
print("A is more than B")
else:
print("B is more than A")
def NoFunc():
print("This is a function just for testing\nThis has no use")
| print('This is a calculator powered by TMath Module by Trevlin Morris')
print('Avaliable commands are:\nDiv\nMult\nAdd\nSub\nRound\nCompare')
def div():
a = float(input())
b = float(input())
c = A / B
print(C)
def mult():
a = float(input())
b = float(input())
c = A * B
print(C)
def add():
a = float(input())
b = float(input())
c = A + B
print(C)
def sub():
a = float(input())
b = float(input())
c = A - B
print(C)
def round():
a = float(input())
x = round(A)
print(X)
def compare():
a = float(input())
b = float(input())
if A > B:
print('A is more than B')
else:
print('B is more than A')
def no_func():
print('This is a function just for testing\nThis has no use') |
# setup.py needs to import this without worrying about required packages being
# installed. So if you add imports here, you may need to do something like:
# https://github.com/mitsuhiko/click/blob/da080dd2de1a116fc5789ffdc1ec6ffb864f2044/setup.py#L1-L11
__version__ = '0.8.0'
| __version__ = '0.8.0' |
# -*- coding: utf-8 -*-
def factorial(number):
if number == 0:
return 1
return number * factorial(number - 1)
if __name__ == '__main__':
numero = int(input('\nFactorial de : '))
result = factorial(numero)
print(result)
| def factorial(number):
if number == 0:
return 1
return number * factorial(number - 1)
if __name__ == '__main__':
numero = int(input('\nFactorial de : '))
result = factorial(numero)
print(result) |
# Example - Rewrite star gazing show
# print menu function
def print_menu():
print("------------------------------------------------")
print(" Welcome to Science Park! ")
print()
print("Admission Charges: Adult $35, Child $20 ")
print("Stargazing Show: $10/person ")
print()
print("Free Science Park Hats if you spend $150 or more")
print("10% discount if you spend $200 or more ")
print("------------------------------------------------")
print()
# End of function: "print_menu"
# Take order from user
# This function returns three values:
# (1) number of adults (2) number of children
# (3) include star show or not
def take_order():
print("Please make your order.")
print()
# ask number of adults
adult_input = input("Enter number of adults: ")
adult = int(adult_input)
# ask number of children
child_input = input("Enter number of children: ")
child = int(child_input)
# ask additional star show
star_show_input = input("Add Stargazing Show: (Y/N) ")
if ((star_show_input == "Y") or (star_show_input == "y")):
include_star_show = True
else:
include_star_show = False
return adult, child, include_star_show
# End of function: "take_order"
# Assign price values to price variables
ADULT_PRICE = 35
CHILD_PRICE = 20
SHOW_PRICE = 10
DISCOUNT_MIN = 200
# Minimum amount to qualify for discount
DISCOUNT_PCT = 10
# Quantity of discount percentage
FREE_HAT_MIN = 150
# Minimum cost to qualify for free hat
# print cost
def print_cost(adult, child, include_star_show):
# calculate the total charge, no discount yet
adult_cost = ADULT_PRICE * adult
child_cost = CHILD_PRICE * child
if (include_star_show):
show_cost = SHOW_PRICE * (adult + child)
else:
show_cost = 0
total_cost = adult_cost + child_cost + show_cost
# calculate discount and final charge
if (total_cost >= DISCOUNT_MIN):
# eligible for discount
final_cost = total_cost * (100 - DISCOUNT_PCT) / 100
print("Total cost: ${0}".format(total_cost))
print("Discount {0}%".format(DISCOUNT_PCT))
else:
# not eligible for discount
final_cost = total_cost
print()
print("Final charge: ${0}".format(final_cost))
# check Free Hat
if (total_cost >= FREE_HAT_MIN):
print("Please collect Science Park Hats at the counter.")
print()
print("Enjoy your day!!!")
# End of function: "print_cost"
# Main program:
# print menu to user
print_menu()
# take order from user
adult, child, include_star_show = take_order()
# print receipt to user
print_cost(adult, child, include_star_show)
# End of Science Park Example.
| def print_menu():
print('------------------------------------------------')
print(' Welcome to Science Park! ')
print()
print('Admission Charges: Adult $35, Child $20 ')
print('Stargazing Show: $10/person ')
print()
print('Free Science Park Hats if you spend $150 or more')
print('10% discount if you spend $200 or more ')
print('------------------------------------------------')
print()
def take_order():
print('Please make your order.')
print()
adult_input = input('Enter number of adults: ')
adult = int(adult_input)
child_input = input('Enter number of children: ')
child = int(child_input)
star_show_input = input('Add Stargazing Show: (Y/N) ')
if star_show_input == 'Y' or star_show_input == 'y':
include_star_show = True
else:
include_star_show = False
return (adult, child, include_star_show)
adult_price = 35
child_price = 20
show_price = 10
discount_min = 200
discount_pct = 10
free_hat_min = 150
def print_cost(adult, child, include_star_show):
adult_cost = ADULT_PRICE * adult
child_cost = CHILD_PRICE * child
if include_star_show:
show_cost = SHOW_PRICE * (adult + child)
else:
show_cost = 0
total_cost = adult_cost + child_cost + show_cost
if total_cost >= DISCOUNT_MIN:
final_cost = total_cost * (100 - DISCOUNT_PCT) / 100
print('Total cost: ${0}'.format(total_cost))
print('Discount {0}%'.format(DISCOUNT_PCT))
else:
final_cost = total_cost
print()
print('Final charge: ${0}'.format(final_cost))
if total_cost >= FREE_HAT_MIN:
print('Please collect Science Park Hats at the counter.')
print()
print('Enjoy your day!!!')
print_menu()
(adult, child, include_star_show) = take_order()
print_cost(adult, child, include_star_show) |
def base_tech_tree():
return Tech('Agriculture', 'agriculture', 0, 1.0,
[
Tech('Stone Working', 'material', 400, 1.1,
[
Tech('Copper', 'material', 1600, 1.5,
[
Tech('Bronze', 'material', 3200, 2.0,
[
Tech('Iron', 'material', 6400, 2.5,
[
Tech('Steel', 'material', 12800, 3.0,
[
Tech('Refined Steel', 'material', 12800 * (3 / 2),
3.25,
[
])
])
])
])
])
]),
Tech('Housing I', 'housing', 250, 1.25,
[
Tech('Housing II', 'housing', 400, 1.5,
[
Tech('Housing III', 'housing', 600, 1.75,
[
Tech('Housing IV', 'housing', 800, 2.0,
[
Tech('Housing V', 'housing', 1200, 2.5, [])
])
])
]),
Tech('Compact Building I', 'compact_building', 800, 1.15,
[
Tech('Compact Building II', 'compact_building', 1600, 1.5, [])
])
]),
Tech('Mining I', 'mining', 400, 1.25,
[
Tech('Mining II', 'mining', 600, 1.5,
[
Tech('Mining III', 'mining', 700, 1.75,
[
Tech('Mining IV', 'mining', 900, 2.0,
[
Tech('Mining V', 'mining', 1200, 2.5, [])
])
])
])
]),
Tech('Agriculture I', 'agriculture', 200, 1.1,
[
Tech('Agriculture II', 'agriculture', 300, 1.2,
[
Tech('Agriculture III', 'agriculture', 400, 1.3,
[
Tech('Agriculture IV', 'agriculture', 600, 1.4,
[
Tech('Agriculture V', 'agriculture', 800, 1.5, [])
])
])
])
]),
])
def tech_categories():
return ['agriculture', 'material', 'housing', 'mining']
class Tech:
def __init__(self, name, category, research_points, effect_strength, next_techs):
self.name = name
self.category = category
self.current_research_points = 0
self.research_points = research_points
self.effect_strength = effect_strength
self.next_techs = next_techs
self.best_techs = {}
self.get_best_in_categories()
def get_info(self):
res = {}
res['name'] = self.name
res['category'] = self.category
res['current_research_points'] = self.current_research_points
res['research_points'] = self.research_points
res['effect_strength'] = self.effect_strength
res['next_techs'] = list(map(lambda tech: tech.get_info(), self.next_techs))
# We don't need to save best_techs, we can just recalculate them when we load.
return res
def save(self, path):
with open(path + 'tech.txt', 'w') as f:
f.write(str(self.get_info()))
def is_unlocked(self):
return self.current_research_points >= self.research_points
def get_tech(self, tech_name):
if self.name == tech_name and self.is_unlocked():
return self
else:
for next_tech in self.next_techs:
res = next_tech.get_tech(tech_name)
if res is not None:
return res
return None
def has_tech(self, tech_name):
if self.name == tech_name:
return self.is_unlocked()
else:
for next_tech in self.next_techs:
if next_tech.has_tech(tech_name):
return True
return False
def get_best_in_categories(self):
for category in tech_categories():
self.best_techs[category] = self.get_best_in_category(category, True)
def get_best_in_category(self, category_name, calc=False):
if calc or not category_name in self.best_techs:
for i in self.next_techs:
if i.category == category_name and i.is_unlocked():
return i.get_best_in_category(category_name)
if self.category == category_name:
return self
return None
else:
return self.best_techs[category_name]
def get_available_research(self):
if self.is_unlocked():
result = []
for next_tech in self.next_techs:
result.extend(next_tech.get_available_research())
return result
else:
return [self]
def do_research(self, research_amount):
if not self.is_unlocked():
self.current_research_points += research_amount
self.get_best_in_categories()
| def base_tech_tree():
return tech('Agriculture', 'agriculture', 0, 1.0, [tech('Stone Working', 'material', 400, 1.1, [tech('Copper', 'material', 1600, 1.5, [tech('Bronze', 'material', 3200, 2.0, [tech('Iron', 'material', 6400, 2.5, [tech('Steel', 'material', 12800, 3.0, [tech('Refined Steel', 'material', 12800 * (3 / 2), 3.25, [])])])])])]), tech('Housing I', 'housing', 250, 1.25, [tech('Housing II', 'housing', 400, 1.5, [tech('Housing III', 'housing', 600, 1.75, [tech('Housing IV', 'housing', 800, 2.0, [tech('Housing V', 'housing', 1200, 2.5, [])])])]), tech('Compact Building I', 'compact_building', 800, 1.15, [tech('Compact Building II', 'compact_building', 1600, 1.5, [])])]), tech('Mining I', 'mining', 400, 1.25, [tech('Mining II', 'mining', 600, 1.5, [tech('Mining III', 'mining', 700, 1.75, [tech('Mining IV', 'mining', 900, 2.0, [tech('Mining V', 'mining', 1200, 2.5, [])])])])]), tech('Agriculture I', 'agriculture', 200, 1.1, [tech('Agriculture II', 'agriculture', 300, 1.2, [tech('Agriculture III', 'agriculture', 400, 1.3, [tech('Agriculture IV', 'agriculture', 600, 1.4, [tech('Agriculture V', 'agriculture', 800, 1.5, [])])])])])])
def tech_categories():
return ['agriculture', 'material', 'housing', 'mining']
class Tech:
def __init__(self, name, category, research_points, effect_strength, next_techs):
self.name = name
self.category = category
self.current_research_points = 0
self.research_points = research_points
self.effect_strength = effect_strength
self.next_techs = next_techs
self.best_techs = {}
self.get_best_in_categories()
def get_info(self):
res = {}
res['name'] = self.name
res['category'] = self.category
res['current_research_points'] = self.current_research_points
res['research_points'] = self.research_points
res['effect_strength'] = self.effect_strength
res['next_techs'] = list(map(lambda tech: tech.get_info(), self.next_techs))
return res
def save(self, path):
with open(path + 'tech.txt', 'w') as f:
f.write(str(self.get_info()))
def is_unlocked(self):
return self.current_research_points >= self.research_points
def get_tech(self, tech_name):
if self.name == tech_name and self.is_unlocked():
return self
else:
for next_tech in self.next_techs:
res = next_tech.get_tech(tech_name)
if res is not None:
return res
return None
def has_tech(self, tech_name):
if self.name == tech_name:
return self.is_unlocked()
else:
for next_tech in self.next_techs:
if next_tech.has_tech(tech_name):
return True
return False
def get_best_in_categories(self):
for category in tech_categories():
self.best_techs[category] = self.get_best_in_category(category, True)
def get_best_in_category(self, category_name, calc=False):
if calc or not category_name in self.best_techs:
for i in self.next_techs:
if i.category == category_name and i.is_unlocked():
return i.get_best_in_category(category_name)
if self.category == category_name:
return self
return None
else:
return self.best_techs[category_name]
def get_available_research(self):
if self.is_unlocked():
result = []
for next_tech in self.next_techs:
result.extend(next_tech.get_available_research())
return result
else:
return [self]
def do_research(self, research_amount):
if not self.is_unlocked():
self.current_research_points += research_amount
self.get_best_in_categories() |
# we identified: Phrag, MrFlesh, thetimeisnow, MyaloMark, mexicodoug
author_list = ["MrFlesh","oddmanout","Phrag","NoMoreNicksLeft","permaculture",
"aletoledo","thetimeisnow","MyaloMark","mexicodoug","rainman_104","mutatron",
"otakucode","cuteman","donh","nixonrichard","garyp714","Stormflux","seeker135",
"dirtymoney","folderol"]
sample_num = 5
author_counts = {i:[] for i in author_list}
with open("prolific_authors","r") as authors:
for id_,author in enumerate(authors):
if author.strip() in author_list:
if len(author_counts[author.strip()]) >= sample_num:
pass
else:
author_counts[author.strip()].append(id_)
finished = 0
for authorship in author_counts:
if author_counts[authorship] == sample_num:
finished += 1
if finished == len(author_list):
break
author_texts = {i:[] for i in author_list}
with open("prolific_texts","r") as texts:
reader = texts.readlines()
with open("prolific_texts","w") as texts:
for line in reader:
if line.strip() != "":
print(line.strip(),end="\n",file=texts)
with open("prolific_texts","r") as texts:
for id_,text in enumerate(texts):
for author in author_list:
if id_ in author_counts[author]:
author_texts[author].append(text.strip())
with open("prolific_sampled_comments", "w") as sample:
for author in author_texts:
print("\n"+author+":\n",file=sample)
for text in author_texts[author]:
print(text,end="\n",file=sample)
| author_list = ['MrFlesh', 'oddmanout', 'Phrag', 'NoMoreNicksLeft', 'permaculture', 'aletoledo', 'thetimeisnow', 'MyaloMark', 'mexicodoug', 'rainman_104', 'mutatron', 'otakucode', 'cuteman', 'donh', 'nixonrichard', 'garyp714', 'Stormflux', 'seeker135', 'dirtymoney', 'folderol']
sample_num = 5
author_counts = {i: [] for i in author_list}
with open('prolific_authors', 'r') as authors:
for (id_, author) in enumerate(authors):
if author.strip() in author_list:
if len(author_counts[author.strip()]) >= sample_num:
pass
else:
author_counts[author.strip()].append(id_)
finished = 0
for authorship in author_counts:
if author_counts[authorship] == sample_num:
finished += 1
if finished == len(author_list):
break
author_texts = {i: [] for i in author_list}
with open('prolific_texts', 'r') as texts:
reader = texts.readlines()
with open('prolific_texts', 'w') as texts:
for line in reader:
if line.strip() != '':
print(line.strip(), end='\n', file=texts)
with open('prolific_texts', 'r') as texts:
for (id_, text) in enumerate(texts):
for author in author_list:
if id_ in author_counts[author]:
author_texts[author].append(text.strip())
with open('prolific_sampled_comments', 'w') as sample:
for author in author_texts:
print('\n' + author + ':\n', file=sample)
for text in author_texts[author]:
print(text, end='\n', file=sample) |
# python3
def anticlockwise_area(x1, y1, x2, y2, x3, y3):
return (x2-x1)*(y3-y1) - (x3-x1)*(y2-y1)
def solve(Ax, Ay, Bx, By, P):
n = len(P)
for i in range(n):
px, py = P[i]
area = anticlockwise_area(Ax, Ay, Bx, By, px, py)
if area > 0:
print("LEFT")
elif area < 0:
print("RIGHT")
elif area == 0:
if min(Ax, Bx) <= px <= max(Ax, Bx) and min(Ay, By) <= py <= max(Ay, By):
print("ON_SEGMENT")
else:
print("ON_LINE")
if __name__ == '__main__':
Ax, Ay, Bx, By = map(int, input().split())
P = []
n = int(input())
for _ in range(n):
px, py = map(int, input().split())
P.append([px, py])
solve(Ax, Ay, Bx, By, P)
| def anticlockwise_area(x1, y1, x2, y2, x3, y3):
return (x2 - x1) * (y3 - y1) - (x3 - x1) * (y2 - y1)
def solve(Ax, Ay, Bx, By, P):
n = len(P)
for i in range(n):
(px, py) = P[i]
area = anticlockwise_area(Ax, Ay, Bx, By, px, py)
if area > 0:
print('LEFT')
elif area < 0:
print('RIGHT')
elif area == 0:
if min(Ax, Bx) <= px <= max(Ax, Bx) and min(Ay, By) <= py <= max(Ay, By):
print('ON_SEGMENT')
else:
print('ON_LINE')
if __name__ == '__main__':
(ax, ay, bx, by) = map(int, input().split())
p = []
n = int(input())
for _ in range(n):
(px, py) = map(int, input().split())
P.append([px, py])
solve(Ax, Ay, Bx, By, P) |
def est_paire(n):
if n%2 == 0:
print(str(n)+" est pair")
else:
print(str(n)+" n'est pas pair")
a=[2,4,3,7]
for i in range(4):
est_paire(a[i]) | def est_paire(n):
if n % 2 == 0:
print(str(n) + ' est pair')
else:
print(str(n) + " n'est pas pair")
a = [2, 4, 3, 7]
for i in range(4):
est_paire(a[i]) |
modulename = "RocketLeague"
sd_structure = {
"activated": True
}
| modulename = 'RocketLeague'
sd_structure = {'activated': True} |
A, B = map(int, input().split())
if 1 <= A <= 9 and 1 <= B <= 9:
print(A * B)
else:
print(-1)
| (a, b) = map(int, input().split())
if 1 <= A <= 9 and 1 <= B <= 9:
print(A * B)
else:
print(-1) |
def last_neuron(self):
labels = list(set(self.y.flatten('F')))
try:
last_neuron = self.y.shape[1]
except IndexError:
if len(labels) == 2 and max(labels) == 1:
last_neuron = 1
elif len(labels) == 2 and max(labels) > 1:
last_neuron = 3
elif len(labels) > 2:
last_neuron = len(labels)
return last_neuron
| def last_neuron(self):
labels = list(set(self.y.flatten('F')))
try:
last_neuron = self.y.shape[1]
except IndexError:
if len(labels) == 2 and max(labels) == 1:
last_neuron = 1
elif len(labels) == 2 and max(labels) > 1:
last_neuron = 3
elif len(labels) > 2:
last_neuron = len(labels)
return last_neuron |
#!/usr/bin/env python
# Define a filename.
filename = "input.txt"
def count_depth_changes(depths):
depth_counts = {}
depth_counts["increased"] = 0
depth_counts["decreased"] = 0
depth_counts["no_change"] = 0
for index, depth in enumerate(depths):
if index == 0:
continue
change = int(depth) - int(depths[index - 1])
if change > 0:
print(depth, "increased")
depth_counts["increased"] += 1
elif change < 0:
print(depth, "decreased")
depth_counts["decreased"] += 1
else:
print(depth, "no change")
depth_counts["no_change"] += 1
return depth_counts
# Open the file as f.
# The function readlines() reads the file.
with open(filename) as f:
depths = f.readlines()
depth_counts = count_depth_changes(depths)
print()
print("depth changes", depth_counts)
| filename = 'input.txt'
def count_depth_changes(depths):
depth_counts = {}
depth_counts['increased'] = 0
depth_counts['decreased'] = 0
depth_counts['no_change'] = 0
for (index, depth) in enumerate(depths):
if index == 0:
continue
change = int(depth) - int(depths[index - 1])
if change > 0:
print(depth, 'increased')
depth_counts['increased'] += 1
elif change < 0:
print(depth, 'decreased')
depth_counts['decreased'] += 1
else:
print(depth, 'no change')
depth_counts['no_change'] += 1
return depth_counts
with open(filename) as f:
depths = f.readlines()
depth_counts = count_depth_changes(depths)
print()
print('depth changes', depth_counts) |
if __name__ == '__main__':
with open('chapter.txt') as f:
chapter = f.readlines()
chapter_set = set(chapter)
with open('byterun/pyvm2.py') as g:
source = g.readlines()
source_set = set(source)
zero_missing = True
for line in source:
if line and line not in chapter_set:
if zero_missing:
print("Missing lines of source!")
zero_missing = False
print(line, end=' ')
for line in chapter:
if line not in source_set and line not in ["```", "~~~~"]:
print(line, end=' ')
| if __name__ == '__main__':
with open('chapter.txt') as f:
chapter = f.readlines()
chapter_set = set(chapter)
with open('byterun/pyvm2.py') as g:
source = g.readlines()
source_set = set(source)
zero_missing = True
for line in source:
if line and line not in chapter_set:
if zero_missing:
print('Missing lines of source!')
zero_missing = False
print(line, end=' ')
for line in chapter:
if line not in source_set and line not in ['```', '~~~~']:
print(line, end=' ') |
# -*- coding: utf-8 -*-
class MissingField(Exception):
TEMPLATE = "[!] WARNING: mandatory field %s missing from capture"
def __init__(self, value):
super().__init__(self.TEMPLATE % value)
class XmlWrapper(object):
def __init__(self, layer):
self.layer = layer
@property
def type(self):
return self.layer.attrib["name"]
def nested(self, field):
xml_element = self.layer.find(f'field[@name="{field}"]')
if xml_element:
return XmlWrapper(xml_element)
else:
raise MissingField(field)
def proto(self, field):
xml_element = self.layer.find(f'proto[@name="{field}"]')
if xml_element is None:
raise MissingField(field)
else:
return XmlWrapper(xml_element)
def exists(self, field):
return self.layer.find(f'field[@name="{field}"]') is not None
def children(self, field):
return enumerate(self.layer.findall(f'field[@name="{field}"]'))
def integer(self, field):
xml_element = self.layer.find(f'field[@name="{field}"]')
if xml_element is None:
raise MissingField(field)
else:
return int(xml_element.attrib["show"])
def boolean(self, field):
xml_element = self.layer.find(f'field[@name="{field}"]')
if xml_element is None:
raise MissingField(field)
else:
return xml_element.attrib["show"] == "1"
def real(self, field):
xml_element = self.layer.find(f'field[@name="{field}"]')
if xml_element is None:
raise MissingField(field)
else:
return float(xml_element.attrib["show"])
def string(self, field):
xml_element = self.layer.find(f'field[@name="{field}"]')
if xml_element is None:
raise MissingField(field)
else:
return str(xml_element.attrib["show"])
| class Missingfield(Exception):
template = '[!] WARNING: mandatory field %s missing from capture'
def __init__(self, value):
super().__init__(self.TEMPLATE % value)
class Xmlwrapper(object):
def __init__(self, layer):
self.layer = layer
@property
def type(self):
return self.layer.attrib['name']
def nested(self, field):
xml_element = self.layer.find(f'field[@name="{field}"]')
if xml_element:
return xml_wrapper(xml_element)
else:
raise missing_field(field)
def proto(self, field):
xml_element = self.layer.find(f'proto[@name="{field}"]')
if xml_element is None:
raise missing_field(field)
else:
return xml_wrapper(xml_element)
def exists(self, field):
return self.layer.find(f'field[@name="{field}"]') is not None
def children(self, field):
return enumerate(self.layer.findall(f'field[@name="{field}"]'))
def integer(self, field):
xml_element = self.layer.find(f'field[@name="{field}"]')
if xml_element is None:
raise missing_field(field)
else:
return int(xml_element.attrib['show'])
def boolean(self, field):
xml_element = self.layer.find(f'field[@name="{field}"]')
if xml_element is None:
raise missing_field(field)
else:
return xml_element.attrib['show'] == '1'
def real(self, field):
xml_element = self.layer.find(f'field[@name="{field}"]')
if xml_element is None:
raise missing_field(field)
else:
return float(xml_element.attrib['show'])
def string(self, field):
xml_element = self.layer.find(f'field[@name="{field}"]')
if xml_element is None:
raise missing_field(field)
else:
return str(xml_element.attrib['show']) |
#!/usr/bin/env python
nodes = {}
with open('file2.txt', 'r') as file:
for line in file:
parent = line.split(')')[0].strip()
children = []
try:
children = line.split('->')[1].strip().split(', ')
nodes[parent] = children
except:
nodes[parent] = children
node_weights = {}
for name in nodes.keys():
n = name.split('(')[0].strip()
weight = name.split('(')[1]
node_weights[n] = weight
class Node:
def __init__(self, name=None, weight=None, parent=None):
self.weight = weight
self.parent = parent
self.children = []
self.name = name
def add_child(self, child):
self.children.append(child)
Nodes = {}
for name, children in nodes.items():
parent_name = name.split('(')[0].strip()
parent = None
try:
parent = Nodes[parent_name]
except:
parent = Node(parent_name, node_weights[parent_name], None)
Nodes[parent_name] = parent
for child in children:
try:
child_node = Nodes[child]
except:
child_node = Node(child, node_weights[child], parent)
parent.add_child(child_node)
# #DEBUG - Print all info
# for name, node in Nodes.items():
# print(name)
# print(parent.name)
# print(node.weight)
# print([child.name for child in node.children])
# print
p = Nodes['eugwuhl']
# p = Nodes['tknk']
def rec_sum(node):
return int(node.weight) + sum(rec_sum(child) for child in node.children)
sums = {}
for c in p.children:
sums[c.name] = rec_sum(c)
print(sums)
| nodes = {}
with open('file2.txt', 'r') as file:
for line in file:
parent = line.split(')')[0].strip()
children = []
try:
children = line.split('->')[1].strip().split(', ')
nodes[parent] = children
except:
nodes[parent] = children
node_weights = {}
for name in nodes.keys():
n = name.split('(')[0].strip()
weight = name.split('(')[1]
node_weights[n] = weight
class Node:
def __init__(self, name=None, weight=None, parent=None):
self.weight = weight
self.parent = parent
self.children = []
self.name = name
def add_child(self, child):
self.children.append(child)
nodes = {}
for (name, children) in nodes.items():
parent_name = name.split('(')[0].strip()
parent = None
try:
parent = Nodes[parent_name]
except:
parent = node(parent_name, node_weights[parent_name], None)
Nodes[parent_name] = parent
for child in children:
try:
child_node = Nodes[child]
except:
child_node = node(child, node_weights[child], parent)
parent.add_child(child_node)
p = Nodes['eugwuhl']
def rec_sum(node):
return int(node.weight) + sum((rec_sum(child) for child in node.children))
sums = {}
for c in p.children:
sums[c.name] = rec_sum(c)
print(sums) |
a = []
n = int(input())
for i in range(n):
temp = input()
if temp not in a:
a.append(temp)
print(len(a)) | a = []
n = int(input())
for i in range(n):
temp = input()
if temp not in a:
a.append(temp)
print(len(a)) |
class Store:
def __init__(self):
self.init()
def add(self, target):
self.targets.append(target)
self.look_up_by_output[target.output] = target
def init(self):
self.targets = []
self.look_up_by_output = {}
self.intermediate_targets = []
STORE = Store()
| class Store:
def __init__(self):
self.init()
def add(self, target):
self.targets.append(target)
self.look_up_by_output[target.output] = target
def init(self):
self.targets = []
self.look_up_by_output = {}
self.intermediate_targets = []
store = store() |
wort = deltat*UA/M/Cp
glycol = deltat*UA/mj/cpj
A = np.array([[1 - wort, wort],
[glycol,1 - glycol]]) | wort = deltat * UA / M / Cp
glycol = deltat * UA / mj / cpj
a = np.array([[1 - wort, wort], [glycol, 1 - glycol]]) |
def result(num):
if num % 3 == 0 and num % 5 == 0:
return 'FizzBuzz'
elif num % 3 == 0:
return 'Fizz'
elif num % 5 == 0:
return 'Buzz'
else:
return num
for n in range(1,100):
print(result(n))
| def result(num):
if num % 3 == 0 and num % 5 == 0:
return 'FizzBuzz'
elif num % 3 == 0:
return 'Fizz'
elif num % 5 == 0:
return 'Buzz'
else:
return num
for n in range(1, 100):
print(result(n)) |
population = 100
# car
car_sizes = [40, 80]
car_color = (50, 50, 0)
car_frame = 6 | population = 100
car_sizes = [40, 80]
car_color = (50, 50, 0)
car_frame = 6 |
device = ['RTR02']
mode = 'jsnapy_pre'
playbook_summary = 'Jsnapy pre'
custom_def = False
jsnapy_test = ['test_rsvp','test_bgp'] | device = ['RTR02']
mode = 'jsnapy_pre'
playbook_summary = 'Jsnapy pre'
custom_def = False
jsnapy_test = ['test_rsvp', 'test_bgp'] |
__version__ = '0.0.1'
# Version synonym
VERSION = __version__
| __version__ = '0.0.1'
version = __version__ |
def extractSilentfishHomeBlog(item):
'''
Parser for 'silentfish.home.blog'
'''
vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title'])
if not (chp or vol) or "preview" in item['title'].lower():
return None
tagmap = [
('RMS', 'Reincarnation of Master Su', 'translated'),
('Reincarnation of Master Su', 'Reincarnation of Master Su', 'translated'),
('IAAA', 'I Am An Alpha', 'translated'),
('TBN', 'Tales of the Blood Night', 'translated'),
('WUTYO', 'Waiting Until Thirty-five Years Old', 'translated'),
('Loiterous', 'Loiterous', 'oel'),
]
for tagname, name, tl_type in tagmap:
if tagname in item['tags']:
return buildReleaseMessageWithType(item, name, vol, chp, frag=frag, postfix=postfix, tl_type=tl_type)
return False | def extract_silentfish_home_blog(item):
"""
Parser for 'silentfish.home.blog'
"""
(vol, chp, frag, postfix) = extract_vol_chapter_fragment_postfix(item['title'])
if not (chp or vol) or 'preview' in item['title'].lower():
return None
tagmap = [('RMS', 'Reincarnation of Master Su', 'translated'), ('Reincarnation of Master Su', 'Reincarnation of Master Su', 'translated'), ('IAAA', 'I Am An Alpha', 'translated'), ('TBN', 'Tales of the Blood Night', 'translated'), ('WUTYO', 'Waiting Until Thirty-five Years Old', 'translated'), ('Loiterous', 'Loiterous', 'oel')]
for (tagname, name, tl_type) in tagmap:
if tagname in item['tags']:
return build_release_message_with_type(item, name, vol, chp, frag=frag, postfix=postfix, tl_type=tl_type)
return False |
x = 10
print(x == 2) # prints out false since 10 is not equal to 2
print(x == 3) # prints out False since 10 is not equal to 3
print(x < 3) # prints out false since 10 is not less than 3
print(x>3) # prints out true since 10 is greater than 3
| x = 10
print(x == 2)
print(x == 3)
print(x < 3)
print(x > 3) |
List1 = [[0,1,2,3,4,5,6,7,8,9],[0,1,2,3,4,5,6,7,8,9]]
print (List1[1],[1])
List2 = [1,1]
print (List1[List2])
# Does not work | list1 = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]]
print(List1[1], [1])
list2 = [1, 1]
print(List1[List2]) |
# Author: btjanaka (Bryon Tjanaka)
# Problem: (UVa) 787
while True:
try:
line = input()
except:
break
nums = list(map(int, line.split()[:-1]))
mx = nums[0]
for i in range(len(nums)):
for j in range(i, len(nums)):
prod = 1
for k in range(i, j + 1):
prod *= nums[k]
if prod > mx: mx = prod
print(mx)
| while True:
try:
line = input()
except:
break
nums = list(map(int, line.split()[:-1]))
mx = nums[0]
for i in range(len(nums)):
for j in range(i, len(nums)):
prod = 1
for k in range(i, j + 1):
prod *= nums[k]
if prod > mx:
mx = prod
print(mx) |
print ('-=-' * 10)
print (' \033[1mWelcome to text analyzer\033[m')
print ('-=-' * 10)
phrase = str(input('\033[1;37mType a phrase\033[m: ' )).strip()
print ('\033[1;37mThe phrase that was written was\033[m \033[1;32m{}\033[m'.format(phrase))
print ('-=-' * 13)
print ('\033[1mThe number of words are\033[m \033[1;32m \033[1;32m{}\033[m'.format(len(phrase)))
print ('\033[1mYour capital phrase is\033[m \033[1;32m{}\033[m'.format(phrase.upper()))
print ('\033[1mYour lowercase phrase is\033[m \033[1;32m{}\033[m'.format(phrase.lower()))
print ('\033[1mYour phrase in separate houses is like this\033[m \033[1;32m{}\033[m'.format(phrase.split()))
print ('\033[1mOnly with the first capital letter is\033[m \033[1;32m{}\033[m'.format(phrase.capitalize()))
print ('\033[1mWhat is in lowercase to uppercase and vice-versa\033[m \033[1;32m{}\033[m'.format(phrase.title()))
print ('\033[1mTotally capitalized?\033[m \033[1;32m{}\033[m'.format(phrase.islower()))
print ('\033[1mDoes it contain letters and numbers?\033[m \033[1;32m{}\033[m'.format(phrase.isalnum()))
print ('\033[1mContains only letters\033[m \033[1;32m{}\033[m'.format(phrase.isalpha()))
print ('\033[1mDoes it contain only numbers?\033[m \033[1;32m{}\033[m'.format(phrase.isdigit()))
print ('\033[1mDoes it only contain spaces?\033[m \033[1;32m{}\033[m'.format(phrase.isspace()))
print ('-=-' * 13)
| print('-=-' * 10)
print(' \x1b[1mWelcome to text analyzer\x1b[m')
print('-=-' * 10)
phrase = str(input('\x1b[1;37mType a phrase\x1b[m: ')).strip()
print('\x1b[1;37mThe phrase that was written was\x1b[m \x1b[1;32m{}\x1b[m'.format(phrase))
print('-=-' * 13)
print('\x1b[1mThe number of words are\x1b[m \x1b[1;32m \x1b[1;32m{}\x1b[m'.format(len(phrase)))
print('\x1b[1mYour capital phrase is\x1b[m \x1b[1;32m{}\x1b[m'.format(phrase.upper()))
print('\x1b[1mYour lowercase phrase is\x1b[m \x1b[1;32m{}\x1b[m'.format(phrase.lower()))
print('\x1b[1mYour phrase in separate houses is like this\x1b[m \x1b[1;32m{}\x1b[m'.format(phrase.split()))
print('\x1b[1mOnly with the first capital letter is\x1b[m \x1b[1;32m{}\x1b[m'.format(phrase.capitalize()))
print('\x1b[1mWhat is in lowercase to uppercase and vice-versa\x1b[m \x1b[1;32m{}\x1b[m'.format(phrase.title()))
print('\x1b[1mTotally capitalized?\x1b[m \x1b[1;32m{}\x1b[m'.format(phrase.islower()))
print('\x1b[1mDoes it contain letters and numbers?\x1b[m \x1b[1;32m{}\x1b[m'.format(phrase.isalnum()))
print('\x1b[1mContains only letters\x1b[m \x1b[1;32m{}\x1b[m'.format(phrase.isalpha()))
print('\x1b[1mDoes it contain only numbers?\x1b[m \x1b[1;32m{}\x1b[m'.format(phrase.isdigit()))
print('\x1b[1mDoes it only contain spaces?\x1b[m \x1b[1;32m{}\x1b[m'.format(phrase.isspace()))
print('-=-' * 13) |
class box:
def __init__(self,lst):
self.height = lst[0]
self.width = lst[1]
self.breadth = lst[2]
print("Creating a Box!")
sum1 = self.height * self.width * self.breadth
print(f"Volume of the box is {sum1} cubic units.")
print("Box 1")
b1 = box([10,10,10])
print("=========================")
print("Height:", b1.height)
print("Width:", b1.width)
print("Breadth:", b1.breadth)
print("-------------------------")
print("Box 2")
b2 = box((30,10,10))
print("=========================")
print("Height:", b2.height)
print("Width:", b2.width)
print("Breadth:", b2.breadth)
b2.height = 300
print("Updating Box 2!")
print("Height:", b2.height)
print("Width:", b2.width)
print("Breadth:", b2.breadth)
print("-------------------------")
print("Box 3")
b3 = b2
print("Height:", b3.height)
print("Width:", b3.width)
print("Breadth:", b3.breadth) | class Box:
def __init__(self, lst):
self.height = lst[0]
self.width = lst[1]
self.breadth = lst[2]
print('Creating a Box!')
sum1 = self.height * self.width * self.breadth
print(f'Volume of the box is {sum1} cubic units.')
print('Box 1')
b1 = box([10, 10, 10])
print('=========================')
print('Height:', b1.height)
print('Width:', b1.width)
print('Breadth:', b1.breadth)
print('-------------------------')
print('Box 2')
b2 = box((30, 10, 10))
print('=========================')
print('Height:', b2.height)
print('Width:', b2.width)
print('Breadth:', b2.breadth)
b2.height = 300
print('Updating Box 2!')
print('Height:', b2.height)
print('Width:', b2.width)
print('Breadth:', b2.breadth)
print('-------------------------')
print('Box 3')
b3 = b2
print('Height:', b3.height)
print('Width:', b3.width)
print('Breadth:', b3.breadth) |
#Input a variable x and check for Negative, Positive or Zero Number
x = int(input("Enter a number: "))
if x < 0:
print("Negative")
elif x == 0:
print("Zero")
elif x > 0:
print("Positive")
| x = int(input('Enter a number: '))
if x < 0:
print('Negative')
elif x == 0:
print('Zero')
elif x > 0:
print('Positive') |
# part of requirement 1
# Asks for a file name and tries to find it and adds a file extention to the
# input name. If it is not found, tell and try again untill it is found
def enterFile():
# initialisation
notFound = True
# while the file isn't found, keep asking for a filename
while notFound:
# input filename needs to be without the file extention
fileName = input('Enter the filename here, without the suffux(".txt"): ')
# adds custom file extention
fileName += str('.txt')
# assigns the opening of a file to a variable, and tries to open it
try:
open(fileName)
# If file isn't found, tell the user
except FileNotFoundError:
print('')
print('File not found, please try again')
print('')
# if file is found, tell the user and stop asking for a new filename
else:
print('')
print('File found, congratulations!')
print('')
notFound = False
return(fileName)
# requirement 1, 2, 3
# This method reads a file, puts each line into a list whilst splitting each
# line at each Seperator, also removes newline Name of the file you wish to
# convert to a list, the seperator returns list which has the file info in it
def fileToList(fileName, seperator):
# creates a list in which the file is put into
tempList = []
# opens the file and defines it as a temp var called file. The mode (r, w,
# etc) is not added because it wil now automaticaly choose 'r'
with open(fileName) as file:
# iterates over each line in file until it hits a pointer exeption
# (a.k.a blank line)
for line in file:
# adds line to file, removes newline and seperates by given
# seperator
tempList.append(line.strip().split(seperator))
# returns list which has the file info in it
return (tempList)
# calculates deviation
def calcDeviation(continualValues, mean):
lenValues = len(continualValues)
sumSquared = 0
for i in continualValues:
sumSquared += ((float(i.replace(",", ".")) - mean)**2)
mathVariable = (sumSquared / (lenValues - 1))
deviation = (mathVariable**0.5)
return deviation
# calculates IQR
def calcIQR(discreteValues):
lenValues = len(discreteValues)
sortedValues = sorted(discreteValues)
medianIndex = lenValues // 2
if (lenValues % 2 == 0):
quartile1 = calcMedian(discreteValues[0:medianIndex])
quartile3 = calcMedian(discreteValues[medianIndex:])
else:
quartile1 = calcMedian(discreteValues[0:medianIndex])
quartile3 = calcMedian(discreteValues[(medianIndex + 1):])
IQR = int(quartile1) - int(quartile3)
return (IQR)
# calculates mean
def calcMean(listOfMean):
lenList = len(listOfMean)
total = 0
for i in listOfMean:
total += float(i.replace(",", "."))
mean = total / lenList
return mean
# calculates median
def calcMedian(discreteValues):
lenValues = len(discreteValues)
sortedValues = sorted(discreteValues)
medianIndex = lenValues // 2
if (lenValues % 2 == 0):
median = int(((int(sortedValues[medianIndex]) + int(sortedValues[(medianIndex + 1)])) / 2))
else:
median = sortedValues[medianIndex]
return median
# calculates modus
def calcMode(listOfData):
return max(listOfData, key=listOfData.count)
# prints results
def printResults(fileList, modes, means, deviations, medians, IQRs):
modeCounter = 0
meanCounter = 0
deviationCounter = 0
medianCounter = 0
IQRCounter = 0
categoricalList = [["Name", "Mode"]]
continualList = [["Name", "Mean", "Deviation"]]
discreteList = [["Name", "median", "IQR"]]
for i in range(len(fileList[1])):
tempList = []
if fileList[1][i] == "categorical":
tempList.append(fileList[0][i])
tempList.append(modes[modeCounter])
modeCounter += 1
categoricalList.append(tempList)
elif fileList[1][i] == "continual":
tempList.append(fileList[0][i])
tempList.append(means[meanCounter])
tempList.append(deviations[deviationCounter])
deviationCounter += 1
meanCounter += 1
continualList.append(tempList)
elif fileList[1][i] == "discrete":
tempList.append(fileList[0][i])
tempList.append(medians[medianCounter])
tempList.append(IQRs[IQRCounter])
medianCounter += 1
IQRCounter += 1
discreteList.append(tempList)
print("\n Categorical \n")
for i in range(0, len(categoricalList)):
for j in range(0, len(categoricalList[i])):
print('{:<20}'.format(categoricalList[i][j]), end="" )
print()
print("\n Continual \n")
for i in range(0, len(continualList)):
for j in range(0, len(continualList[i])):
print('{:<20}'.format(continualList[i][j]), end="" )
print()
print("\n Discrete \n")
for i in range(0, len(discreteList)):
for j in range(0, len(discreteList[i])):
print('{:<20}'.format(discreteList[i][j]), end="" )
print()
fileName = enterFile()
fileList = fileToList(fileName, ";")
defineList = []
for i in fileList[0]:
charRightInput = False
while (charRightInput == False):
print("The characteristic you're defining is %s" % (i))
print("Is this characteristic categorical or numerical?")
charInput = input().lower()
if charInput == "categorical":
defineList.append("categorical")
print("You have answered that the characteristic is categorical.")
charRightInput = True
elif charInput == "numerical":
dataRightInput = False
print("You have answered that the characteristic is numerical.")
while (dataRightInput == False):
print("Does this characteristic contain continual or discrete data?")
dataInput = input().lower()
if dataInput == "continual":
defineList.append("continual")
dataRightInput = True
elif dataInput == "discrete":
defineList.append("discrete")
dataRightInput = True
else:
print("Answer not recognised, please try again.")
charRightInput = True
else:
print("Wrong answer, please try again.")
fileList.insert(1, defineList)
categoricalValues = []
continualValues = []
discreteValues = []
for j in range(len(fileList[1])):
tempList = []
for k in range(2, len(fileList)):
tempList.append(fileList[k][j])
if fileList[1][j] == "categorical":
categoricalValues.append(tempList)
elif fileList[1][j] == "continual":
continualValues.append(tempList)
elif fileList[1][j] == "discrete":
discreteValues.append(tempList)
#if any categorical values exists, returns true
if categoricalValues:
Modes = []
for i in range(len(categoricalValues)):
Modes.append(calcMode(categoricalValues[i]))
#if any continual values exists, returns true
if continualValues:
Means = []
for i in continualValues:
Means.append(calcMean(i))
Deviations = []
for i in range(len(continualValues)):
Deviations.append(calcDeviation(continualValues[i], Means[i]))
#if any discrete values exists, returns true
if discreteValues:
Medians = []
for i in discreteValues:
Medians.append(calcMedian(i))
IQRs = []
for i in discreteValues:
IQRs.append(calcIQR(i))
#prints results
printResults(fileList, Modes, Means, Deviations, Medians, IQRs) | def enter_file():
not_found = True
while notFound:
file_name = input('Enter the filename here, without the suffux(".txt"): ')
file_name += str('.txt')
try:
open(fileName)
except FileNotFoundError:
print('')
print('File not found, please try again')
print('')
else:
print('')
print('File found, congratulations!')
print('')
not_found = False
return fileName
def file_to_list(fileName, seperator):
temp_list = []
with open(fileName) as file:
for line in file:
tempList.append(line.strip().split(seperator))
return tempList
def calc_deviation(continualValues, mean):
len_values = len(continualValues)
sum_squared = 0
for i in continualValues:
sum_squared += (float(i.replace(',', '.')) - mean) ** 2
math_variable = sumSquared / (lenValues - 1)
deviation = mathVariable ** 0.5
return deviation
def calc_iqr(discreteValues):
len_values = len(discreteValues)
sorted_values = sorted(discreteValues)
median_index = lenValues // 2
if lenValues % 2 == 0:
quartile1 = calc_median(discreteValues[0:medianIndex])
quartile3 = calc_median(discreteValues[medianIndex:])
else:
quartile1 = calc_median(discreteValues[0:medianIndex])
quartile3 = calc_median(discreteValues[medianIndex + 1:])
iqr = int(quartile1) - int(quartile3)
return IQR
def calc_mean(listOfMean):
len_list = len(listOfMean)
total = 0
for i in listOfMean:
total += float(i.replace(',', '.'))
mean = total / lenList
return mean
def calc_median(discreteValues):
len_values = len(discreteValues)
sorted_values = sorted(discreteValues)
median_index = lenValues // 2
if lenValues % 2 == 0:
median = int((int(sortedValues[medianIndex]) + int(sortedValues[medianIndex + 1])) / 2)
else:
median = sortedValues[medianIndex]
return median
def calc_mode(listOfData):
return max(listOfData, key=listOfData.count)
def print_results(fileList, modes, means, deviations, medians, IQRs):
mode_counter = 0
mean_counter = 0
deviation_counter = 0
median_counter = 0
iqr_counter = 0
categorical_list = [['Name', 'Mode']]
continual_list = [['Name', 'Mean', 'Deviation']]
discrete_list = [['Name', 'median', 'IQR']]
for i in range(len(fileList[1])):
temp_list = []
if fileList[1][i] == 'categorical':
tempList.append(fileList[0][i])
tempList.append(modes[modeCounter])
mode_counter += 1
categoricalList.append(tempList)
elif fileList[1][i] == 'continual':
tempList.append(fileList[0][i])
tempList.append(means[meanCounter])
tempList.append(deviations[deviationCounter])
deviation_counter += 1
mean_counter += 1
continualList.append(tempList)
elif fileList[1][i] == 'discrete':
tempList.append(fileList[0][i])
tempList.append(medians[medianCounter])
tempList.append(IQRs[IQRCounter])
median_counter += 1
iqr_counter += 1
discreteList.append(tempList)
print('\n Categorical \n')
for i in range(0, len(categoricalList)):
for j in range(0, len(categoricalList[i])):
print('{:<20}'.format(categoricalList[i][j]), end='')
print()
print('\n Continual \n')
for i in range(0, len(continualList)):
for j in range(0, len(continualList[i])):
print('{:<20}'.format(continualList[i][j]), end='')
print()
print('\n Discrete \n')
for i in range(0, len(discreteList)):
for j in range(0, len(discreteList[i])):
print('{:<20}'.format(discreteList[i][j]), end='')
print()
file_name = enter_file()
file_list = file_to_list(fileName, ';')
define_list = []
for i in fileList[0]:
char_right_input = False
while charRightInput == False:
print("The characteristic you're defining is %s" % i)
print('Is this characteristic categorical or numerical?')
char_input = input().lower()
if charInput == 'categorical':
defineList.append('categorical')
print('You have answered that the characteristic is categorical.')
char_right_input = True
elif charInput == 'numerical':
data_right_input = False
print('You have answered that the characteristic is numerical.')
while dataRightInput == False:
print('Does this characteristic contain continual or discrete data?')
data_input = input().lower()
if dataInput == 'continual':
defineList.append('continual')
data_right_input = True
elif dataInput == 'discrete':
defineList.append('discrete')
data_right_input = True
else:
print('Answer not recognised, please try again.')
char_right_input = True
else:
print('Wrong answer, please try again.')
fileList.insert(1, defineList)
categorical_values = []
continual_values = []
discrete_values = []
for j in range(len(fileList[1])):
temp_list = []
for k in range(2, len(fileList)):
tempList.append(fileList[k][j])
if fileList[1][j] == 'categorical':
categoricalValues.append(tempList)
elif fileList[1][j] == 'continual':
continualValues.append(tempList)
elif fileList[1][j] == 'discrete':
discreteValues.append(tempList)
if categoricalValues:
modes = []
for i in range(len(categoricalValues)):
Modes.append(calc_mode(categoricalValues[i]))
if continualValues:
means = []
for i in continualValues:
Means.append(calc_mean(i))
deviations = []
for i in range(len(continualValues)):
Deviations.append(calc_deviation(continualValues[i], Means[i]))
if discreteValues:
medians = []
for i in discreteValues:
Medians.append(calc_median(i))
iq_rs = []
for i in discreteValues:
IQRs.append(calc_iqr(i))
print_results(fileList, Modes, Means, Deviations, Medians, IQRs) |
expected_output = {
"instance_id": {
4100: {"lisp": 0},
8188: {
"lisp": 0,
"site_name": {
"site_uci": {
"any-mac": {
"last_register": "never",
"up": "no",
"who_last_registered": "--",
"inst_id": 8188,
},
"1416.9dff.e928/48": {
"last_register": "2w1d",
"up": "yes#",
"who_last_registered": "10.8.130.4:61275",
"inst_id": 8188,
},
"1416.9dff.eae8/48": {
"last_register": "2w1d",
"up": "yes#",
"who_last_registered": "10.8.130.4:61275",
"inst_id": 8188,
},
"1416.9dff.eb28/48": {
"last_register": "2w1d",
"up": "yes#",
"who_last_registered": "10.8.130.4:61275",
"inst_id": 8188,
},
"1416.9dff.ebc8/48": {
"last_register": "2w1d",
"up": "yes#",
"who_last_registered": "10.8.130.4:61275",
"inst_id": 8188,
},
"1416.9dff.1328/48": {
"last_register": "2w1d",
"up": "yes#",
"who_last_registered": "10.8.130.4:61275",
"inst_id": 8188,
},
"1416.9dff.13e8/48": {
"last_register": "2w1d",
"up": "yes#",
"who_last_registered": "10.8.130.4:61275",
"inst_id": 8188,
},
},
"site_uci2": {
"1416.9dff.16c8/48": {
"last_register": "2w1d",
"up": "yes#",
"who_last_registered": "10.8.130.4:61275",
"inst_id": 8188,
},
"1416.9dff.2428/48": {
"last_register": "2w1d",
"up": "yes#",
"who_last_registered": "10.8.130.4:61275",
"inst_id": 8188,
},
"1416.9dff.10a9/48": {
"last_register": "2w1d",
"up": "yes#",
"who_last_registered": "10.8.130.4:61275",
"inst_id": 8188,
},
"1416.9dff.01eb/48": {
"last_register": "2w1d",
"up": "yes#",
"who_last_registered": "10.8.130.4:61275",
"inst_id": 8188,
},
"1416.9dff.1bcb/48": {
"last_register": "2w1d",
"up": "yes#",
"who_last_registered": "10.8.130.4:61275",
"inst_id": 8188,
},
},
"site_uci3": {
"1416.9dff.248b/48": {
"last_register": "2w1d",
"up": "yes#",
"who_last_registered": "10.8.130.4:61275",
"inst_id": 8188,
},
"1416.9dff.254b/48": {
"last_register": "2w1d",
"up": "yes#",
"who_last_registered": "10.8.130.4:61275",
"inst_id": 8188,
},
"1416.9dff.264b/48": {
"last_register": "2w1d",
"up": "yes#",
"who_last_registered": "10.8.130.4:61275",
"inst_id": 8188,
},
},
},
},
}
}
| expected_output = {'instance_id': {4100: {'lisp': 0}, 8188: {'lisp': 0, 'site_name': {'site_uci': {'any-mac': {'last_register': 'never', 'up': 'no', 'who_last_registered': '--', 'inst_id': 8188}, '1416.9dff.e928/48': {'last_register': '2w1d', 'up': 'yes#', 'who_last_registered': '10.8.130.4:61275', 'inst_id': 8188}, '1416.9dff.eae8/48': {'last_register': '2w1d', 'up': 'yes#', 'who_last_registered': '10.8.130.4:61275', 'inst_id': 8188}, '1416.9dff.eb28/48': {'last_register': '2w1d', 'up': 'yes#', 'who_last_registered': '10.8.130.4:61275', 'inst_id': 8188}, '1416.9dff.ebc8/48': {'last_register': '2w1d', 'up': 'yes#', 'who_last_registered': '10.8.130.4:61275', 'inst_id': 8188}, '1416.9dff.1328/48': {'last_register': '2w1d', 'up': 'yes#', 'who_last_registered': '10.8.130.4:61275', 'inst_id': 8188}, '1416.9dff.13e8/48': {'last_register': '2w1d', 'up': 'yes#', 'who_last_registered': '10.8.130.4:61275', 'inst_id': 8188}}, 'site_uci2': {'1416.9dff.16c8/48': {'last_register': '2w1d', 'up': 'yes#', 'who_last_registered': '10.8.130.4:61275', 'inst_id': 8188}, '1416.9dff.2428/48': {'last_register': '2w1d', 'up': 'yes#', 'who_last_registered': '10.8.130.4:61275', 'inst_id': 8188}, '1416.9dff.10a9/48': {'last_register': '2w1d', 'up': 'yes#', 'who_last_registered': '10.8.130.4:61275', 'inst_id': 8188}, '1416.9dff.01eb/48': {'last_register': '2w1d', 'up': 'yes#', 'who_last_registered': '10.8.130.4:61275', 'inst_id': 8188}, '1416.9dff.1bcb/48': {'last_register': '2w1d', 'up': 'yes#', 'who_last_registered': '10.8.130.4:61275', 'inst_id': 8188}}, 'site_uci3': {'1416.9dff.248b/48': {'last_register': '2w1d', 'up': 'yes#', 'who_last_registered': '10.8.130.4:61275', 'inst_id': 8188}, '1416.9dff.254b/48': {'last_register': '2w1d', 'up': 'yes#', 'who_last_registered': '10.8.130.4:61275', 'inst_id': 8188}, '1416.9dff.264b/48': {'last_register': '2w1d', 'up': 'yes#', 'who_last_registered': '10.8.130.4:61275', 'inst_id': 8188}}}}}} |
load(
"@io_bazel_rules_dotnet//dotnet/private:context.bzl",
"dotnet_context",
)
load(
"@io_bazel_rules_dotnet//dotnet/private:providers.bzl",
"DotnetLibrary",
"DotnetResource",
)
load(
"@io_bazel_rules_dotnet//dotnet/private:rules/runfiles.bzl",
"CopyRunfiles",
)
def _unit_test(ctx):
dotnet = dotnet_context(ctx)
name = ctx.label.name
subdir = name + "/"
if dotnet.assembly == None:
empty = dotnet.declare_file(dotnet, path = "empty.exe")
ctx.actions.run(
outputs = [empty],
inputs = ctx.attr._empty.files.to_list(),
executable = ctx.attr._copy.files.to_list()[0],
arguments = [empty.path, ctx.attr._empty.files.to_list()[0].path],
mnemonic = "CopyEmpty",
)
library = dotnet.new_library(dotnet = dotnet)
return [library, DefaultInfo(executable = empty)]
executable = dotnet.assembly(
dotnet,
name = name,
srcs = ctx.attr.srcs,
deps = ctx.attr.deps,
resources = ctx.attr.resources,
out = ctx.attr.out,
defines = ctx.attr.defines,
unsafe = ctx.attr.unsafe,
data = ctx.attr.data,
executable = False,
keyfile = ctx.attr.keyfile,
subdir = subdir,
)
launcher = dotnet.declare_file(dotnet, path = subdir + executable.result.basename + "_0.exe")
ctx.actions.run(
outputs = [launcher],
inputs = ctx.attr._launcher.files.to_list(),
executable = ctx.attr._copy.files.to_list()[0],
arguments = [launcher.path, ctx.attr._launcher.files.to_list()[0].path],
mnemonic = "CopyLauncher",
)
if dotnet.runner != None:
runner = [dotnet.runner]
else:
runner = []
runfiles = ctx.runfiles(files = [launcher] + runner + ctx.attr.native_deps.files.to_list() + ctx.attr._xslt.files.to_list(), transitive_files = depset(transitive = [executable.runfiles, ctx.attr.testlauncher[DotnetLibrary].runfiles]))
runfiles = CopyRunfiles(dotnet, runfiles, ctx.attr._copy, ctx.attr._symlink, executable, subdir)
return [
executable,
DefaultInfo(
files = depset([executable.result, launcher]),
runfiles = runfiles,
executable = launcher,
),
]
dotnet_nunit_test = rule(
_unit_test,
attrs = {
"deps": attr.label_list(providers = [DotnetLibrary]),
"resources": attr.label_list(providers = [DotnetResource]),
"srcs": attr.label_list(allow_files = [".cs"]),
"out": attr.string(),
"defines": attr.string_list(),
"unsafe": attr.bool(default = False),
"data": attr.label_list(allow_files = True),
"dotnet_context_data": attr.label(default = Label("@io_bazel_rules_dotnet//:dotnet_context_data")),
"_manifest_prep": attr.label(default = Label("//dotnet/tools/manifest_prep")),
"native_deps": attr.label(default = Label("@dotnet_sdk//:native_deps")),
"testlauncher": attr.label(default = "@nunitrunnersv2//:mono_tool", providers = [DotnetLibrary]),
"_launcher": attr.label(default = Label("//dotnet/tools/launcher_mono_nunit:launcher_mono_nunit.exe")),
"_copy": attr.label(default = Label("//dotnet/tools/copy")),
"_symlink": attr.label(default = Label("//dotnet/tools/symlink")),
"_xslt": attr.label(default = Label("@io_bazel_rules_dotnet//tools/converttests:n3.xslt"), allow_files = True),
"keyfile": attr.label(allow_files = True),
"_empty": attr.label(default = Label("//dotnet/tools/empty:empty.exe")),
},
toolchains = ["@io_bazel_rules_dotnet//dotnet:toolchain"],
executable = True,
test = True,
)
net_nunit_test = rule(
_unit_test,
attrs = {
"deps": attr.label_list(providers = [DotnetLibrary]),
"resources": attr.label_list(providers = [DotnetResource]),
"srcs": attr.label_list(allow_files = [".cs"]),
"out": attr.string(),
"defines": attr.string_list(),
"unsafe": attr.bool(default = False),
"data": attr.label_list(allow_files = True),
"dotnet_context_data": attr.label(default = Label("@io_bazel_rules_dotnet//:net_context_data")),
"_manifest_prep": attr.label(default = Label("//dotnet/tools/manifest_prep")),
"native_deps": attr.label(default = Label("@net_sdk//:native_deps")),
"testlauncher": attr.label(default = "@nunitrunnersv2//:netstandard1.0_net_tool", providers = [DotnetLibrary]),
"_launcher": attr.label(default = Label("//dotnet/tools/launcher_net_nunit:launcher_net_nunit.exe")),
"_copy": attr.label(default = Label("//dotnet/tools/copy")),
"_symlink": attr.label(default = Label("//dotnet/tools/symlink")),
"_xslt": attr.label(default = Label("@io_bazel_rules_dotnet//tools/converttests:n3.xslt"), allow_files = True),
"keyfile": attr.label(allow_files = True),
"_empty": attr.label(default = Label("//dotnet/tools/empty:empty.exe")),
},
toolchains = ["@io_bazel_rules_dotnet//dotnet:toolchain_net"],
executable = True,
test = True,
)
net_nunit3_test = rule(
_unit_test,
attrs = {
"deps": attr.label_list(providers = [DotnetLibrary]),
"resources": attr.label_list(providers = [DotnetResource]),
"srcs": attr.label_list(allow_files = [".cs"]),
"out": attr.string(),
"defines": attr.string_list(),
"unsafe": attr.bool(default = False),
"data": attr.label_list(allow_files = True),
"dotnet_context_data": attr.label(default = Label("@io_bazel_rules_dotnet//:net_context_data")),
"_manifest_prep": attr.label(default = Label("//dotnet/tools/manifest_prep")),
"native_deps": attr.label(default = Label("@net_sdk//:native_deps")),
"testlauncher": attr.label(default = "@nunit.consolerunner//:netstandard1.0_net_tool", providers = [DotnetLibrary]),
"_launcher": attr.label(default = Label("//dotnet/tools/launcher_net_nunit3:launcher_net_nunit3.exe")),
"_copy": attr.label(default = Label("//dotnet/tools/copy")),
"_symlink": attr.label(default = Label("//dotnet/tools/symlink")),
"_xslt": attr.label(default = Label("@io_bazel_rules_dotnet//tools/converttests:n3.xslt"), allow_files = True),
"keyfile": attr.label(allow_files = True),
"_empty": attr.label(default = Label("//dotnet/tools/empty:empty.exe")),
},
toolchains = ["@io_bazel_rules_dotnet//dotnet:toolchain_net"],
executable = True,
test = True,
)
core_xunit_test = rule(
_unit_test,
attrs = {
"deps": attr.label_list(providers = [DotnetLibrary]),
"resources": attr.label_list(providers = [DotnetResource]),
"srcs": attr.label_list(allow_files = [".cs"]),
"out": attr.string(),
"defines": attr.string_list(),
"unsafe": attr.bool(default = False),
"data": attr.label_list(allow_files = True),
"dotnet_context_data": attr.label(default = Label("@io_bazel_rules_dotnet//:core_context_data")),
"native_deps": attr.label(default = Label("@core_sdk//:native_deps")),
"testlauncher": attr.label(default = "@xunit.runner.console//:netcoreapp2.0_core_tool", providers = [DotnetLibrary]),
"_launcher": attr.label(default = Label("//dotnet/tools/launcher_core_xunit:launcher_core_xunit.exe")),
"_copy": attr.label(default = Label("//dotnet/tools/copy")),
"_symlink": attr.label(default = Label("//dotnet/tools/symlink")),
"_xslt": attr.label(default = Label("@io_bazel_rules_dotnet//tools/converttests:n3.xslt"), allow_files = True),
"keyfile": attr.label(allow_files = True),
"_empty": attr.label(default = Label("//dotnet/tools/empty:empty.exe")),
},
toolchains = ["@io_bazel_rules_dotnet//dotnet:toolchain_core"],
executable = True,
test = True,
)
net_xunit_test = rule(
_unit_test,
attrs = {
"deps": attr.label_list(providers = [DotnetLibrary]),
"resources": attr.label_list(providers = [DotnetResource]),
"srcs": attr.label_list(allow_files = [".cs"]),
"out": attr.string(),
"defines": attr.string_list(),
"unsafe": attr.bool(default = False),
"data": attr.label_list(allow_files = True),
"dotnet_context_data": attr.label(default = Label("@io_bazel_rules_dotnet//:net_context_data")),
"_manifest_prep": attr.label(default = Label("//dotnet/tools/manifest_prep")),
"native_deps": attr.label(default = Label("@net_sdk//:native_deps")),
"testlauncher": attr.label(default = "@xunit.runner.console//:net472_net_tool", providers = [DotnetLibrary]),
"_launcher": attr.label(default = Label("//dotnet/tools/launcher_net_xunit:launcher_net_xunit.exe")),
"_copy": attr.label(default = Label("//dotnet/tools/copy")),
"_symlink": attr.label(default = Label("//dotnet/tools/symlink")),
"_xslt": attr.label(default = Label("@io_bazel_rules_dotnet//tools/converttests:n3.xslt"), allow_files = True),
"keyfile": attr.label(allow_files = True),
"_empty": attr.label(default = Label("//dotnet/tools/empty:empty.exe")),
},
toolchains = ["@io_bazel_rules_dotnet//dotnet:toolchain_net"],
executable = True,
test = True,
)
dotnet_xunit_test = rule(
_unit_test,
attrs = {
"deps": attr.label_list(providers = [DotnetLibrary]),
"resources": attr.label_list(providers = [DotnetResource]),
"srcs": attr.label_list(allow_files = [".cs"]),
"out": attr.string(),
"defines": attr.string_list(),
"unsafe": attr.bool(default = False),
"data": attr.label_list(allow_files = True),
"dotnet_context_data": attr.label(default = Label("@io_bazel_rules_dotnet//:dotnet_context_data")),
"_manifest_prep": attr.label(default = Label("//dotnet/tools/manifest_prep")),
"native_deps": attr.label(default = Label("@dotnet_sdk//:native_deps")),
"testlauncher": attr.label(default = "@xunit.runner.console//:mono_tool", providers = [DotnetLibrary]),
"_launcher": attr.label(default = Label("//dotnet/tools/launcher_mono_xunit:launcher_mono_xunit.exe")),
"_copy": attr.label(default = Label("//dotnet/tools/copy")),
"_symlink": attr.label(default = Label("//dotnet/tools/symlink")),
"_xslt": attr.label(default = Label("@io_bazel_rules_dotnet//tools/converttests:n3.xslt"), allow_files = True),
"keyfile": attr.label(allow_files = True),
"_empty": attr.label(default = Label("//dotnet/tools/empty:empty.exe")),
},
toolchains = ["@io_bazel_rules_dotnet//dotnet:toolchain"],
executable = True,
test = True,
)
| load('@io_bazel_rules_dotnet//dotnet/private:context.bzl', 'dotnet_context')
load('@io_bazel_rules_dotnet//dotnet/private:providers.bzl', 'DotnetLibrary', 'DotnetResource')
load('@io_bazel_rules_dotnet//dotnet/private:rules/runfiles.bzl', 'CopyRunfiles')
def _unit_test(ctx):
dotnet = dotnet_context(ctx)
name = ctx.label.name
subdir = name + '/'
if dotnet.assembly == None:
empty = dotnet.declare_file(dotnet, path='empty.exe')
ctx.actions.run(outputs=[empty], inputs=ctx.attr._empty.files.to_list(), executable=ctx.attr._copy.files.to_list()[0], arguments=[empty.path, ctx.attr._empty.files.to_list()[0].path], mnemonic='CopyEmpty')
library = dotnet.new_library(dotnet=dotnet)
return [library, default_info(executable=empty)]
executable = dotnet.assembly(dotnet, name=name, srcs=ctx.attr.srcs, deps=ctx.attr.deps, resources=ctx.attr.resources, out=ctx.attr.out, defines=ctx.attr.defines, unsafe=ctx.attr.unsafe, data=ctx.attr.data, executable=False, keyfile=ctx.attr.keyfile, subdir=subdir)
launcher = dotnet.declare_file(dotnet, path=subdir + executable.result.basename + '_0.exe')
ctx.actions.run(outputs=[launcher], inputs=ctx.attr._launcher.files.to_list(), executable=ctx.attr._copy.files.to_list()[0], arguments=[launcher.path, ctx.attr._launcher.files.to_list()[0].path], mnemonic='CopyLauncher')
if dotnet.runner != None:
runner = [dotnet.runner]
else:
runner = []
runfiles = ctx.runfiles(files=[launcher] + runner + ctx.attr.native_deps.files.to_list() + ctx.attr._xslt.files.to_list(), transitive_files=depset(transitive=[executable.runfiles, ctx.attr.testlauncher[DotnetLibrary].runfiles]))
runfiles = copy_runfiles(dotnet, runfiles, ctx.attr._copy, ctx.attr._symlink, executable, subdir)
return [executable, default_info(files=depset([executable.result, launcher]), runfiles=runfiles, executable=launcher)]
dotnet_nunit_test = rule(_unit_test, attrs={'deps': attr.label_list(providers=[DotnetLibrary]), 'resources': attr.label_list(providers=[DotnetResource]), 'srcs': attr.label_list(allow_files=['.cs']), 'out': attr.string(), 'defines': attr.string_list(), 'unsafe': attr.bool(default=False), 'data': attr.label_list(allow_files=True), 'dotnet_context_data': attr.label(default=label('@io_bazel_rules_dotnet//:dotnet_context_data')), '_manifest_prep': attr.label(default=label('//dotnet/tools/manifest_prep')), 'native_deps': attr.label(default=label('@dotnet_sdk//:native_deps')), 'testlauncher': attr.label(default='@nunitrunnersv2//:mono_tool', providers=[DotnetLibrary]), '_launcher': attr.label(default=label('//dotnet/tools/launcher_mono_nunit:launcher_mono_nunit.exe')), '_copy': attr.label(default=label('//dotnet/tools/copy')), '_symlink': attr.label(default=label('//dotnet/tools/symlink')), '_xslt': attr.label(default=label('@io_bazel_rules_dotnet//tools/converttests:n3.xslt'), allow_files=True), 'keyfile': attr.label(allow_files=True), '_empty': attr.label(default=label('//dotnet/tools/empty:empty.exe'))}, toolchains=['@io_bazel_rules_dotnet//dotnet:toolchain'], executable=True, test=True)
net_nunit_test = rule(_unit_test, attrs={'deps': attr.label_list(providers=[DotnetLibrary]), 'resources': attr.label_list(providers=[DotnetResource]), 'srcs': attr.label_list(allow_files=['.cs']), 'out': attr.string(), 'defines': attr.string_list(), 'unsafe': attr.bool(default=False), 'data': attr.label_list(allow_files=True), 'dotnet_context_data': attr.label(default=label('@io_bazel_rules_dotnet//:net_context_data')), '_manifest_prep': attr.label(default=label('//dotnet/tools/manifest_prep')), 'native_deps': attr.label(default=label('@net_sdk//:native_deps')), 'testlauncher': attr.label(default='@nunitrunnersv2//:netstandard1.0_net_tool', providers=[DotnetLibrary]), '_launcher': attr.label(default=label('//dotnet/tools/launcher_net_nunit:launcher_net_nunit.exe')), '_copy': attr.label(default=label('//dotnet/tools/copy')), '_symlink': attr.label(default=label('//dotnet/tools/symlink')), '_xslt': attr.label(default=label('@io_bazel_rules_dotnet//tools/converttests:n3.xslt'), allow_files=True), 'keyfile': attr.label(allow_files=True), '_empty': attr.label(default=label('//dotnet/tools/empty:empty.exe'))}, toolchains=['@io_bazel_rules_dotnet//dotnet:toolchain_net'], executable=True, test=True)
net_nunit3_test = rule(_unit_test, attrs={'deps': attr.label_list(providers=[DotnetLibrary]), 'resources': attr.label_list(providers=[DotnetResource]), 'srcs': attr.label_list(allow_files=['.cs']), 'out': attr.string(), 'defines': attr.string_list(), 'unsafe': attr.bool(default=False), 'data': attr.label_list(allow_files=True), 'dotnet_context_data': attr.label(default=label('@io_bazel_rules_dotnet//:net_context_data')), '_manifest_prep': attr.label(default=label('//dotnet/tools/manifest_prep')), 'native_deps': attr.label(default=label('@net_sdk//:native_deps')), 'testlauncher': attr.label(default='@nunit.consolerunner//:netstandard1.0_net_tool', providers=[DotnetLibrary]), '_launcher': attr.label(default=label('//dotnet/tools/launcher_net_nunit3:launcher_net_nunit3.exe')), '_copy': attr.label(default=label('//dotnet/tools/copy')), '_symlink': attr.label(default=label('//dotnet/tools/symlink')), '_xslt': attr.label(default=label('@io_bazel_rules_dotnet//tools/converttests:n3.xslt'), allow_files=True), 'keyfile': attr.label(allow_files=True), '_empty': attr.label(default=label('//dotnet/tools/empty:empty.exe'))}, toolchains=['@io_bazel_rules_dotnet//dotnet:toolchain_net'], executable=True, test=True)
core_xunit_test = rule(_unit_test, attrs={'deps': attr.label_list(providers=[DotnetLibrary]), 'resources': attr.label_list(providers=[DotnetResource]), 'srcs': attr.label_list(allow_files=['.cs']), 'out': attr.string(), 'defines': attr.string_list(), 'unsafe': attr.bool(default=False), 'data': attr.label_list(allow_files=True), 'dotnet_context_data': attr.label(default=label('@io_bazel_rules_dotnet//:core_context_data')), 'native_deps': attr.label(default=label('@core_sdk//:native_deps')), 'testlauncher': attr.label(default='@xunit.runner.console//:netcoreapp2.0_core_tool', providers=[DotnetLibrary]), '_launcher': attr.label(default=label('//dotnet/tools/launcher_core_xunit:launcher_core_xunit.exe')), '_copy': attr.label(default=label('//dotnet/tools/copy')), '_symlink': attr.label(default=label('//dotnet/tools/symlink')), '_xslt': attr.label(default=label('@io_bazel_rules_dotnet//tools/converttests:n3.xslt'), allow_files=True), 'keyfile': attr.label(allow_files=True), '_empty': attr.label(default=label('//dotnet/tools/empty:empty.exe'))}, toolchains=['@io_bazel_rules_dotnet//dotnet:toolchain_core'], executable=True, test=True)
net_xunit_test = rule(_unit_test, attrs={'deps': attr.label_list(providers=[DotnetLibrary]), 'resources': attr.label_list(providers=[DotnetResource]), 'srcs': attr.label_list(allow_files=['.cs']), 'out': attr.string(), 'defines': attr.string_list(), 'unsafe': attr.bool(default=False), 'data': attr.label_list(allow_files=True), 'dotnet_context_data': attr.label(default=label('@io_bazel_rules_dotnet//:net_context_data')), '_manifest_prep': attr.label(default=label('//dotnet/tools/manifest_prep')), 'native_deps': attr.label(default=label('@net_sdk//:native_deps')), 'testlauncher': attr.label(default='@xunit.runner.console//:net472_net_tool', providers=[DotnetLibrary]), '_launcher': attr.label(default=label('//dotnet/tools/launcher_net_xunit:launcher_net_xunit.exe')), '_copy': attr.label(default=label('//dotnet/tools/copy')), '_symlink': attr.label(default=label('//dotnet/tools/symlink')), '_xslt': attr.label(default=label('@io_bazel_rules_dotnet//tools/converttests:n3.xslt'), allow_files=True), 'keyfile': attr.label(allow_files=True), '_empty': attr.label(default=label('//dotnet/tools/empty:empty.exe'))}, toolchains=['@io_bazel_rules_dotnet//dotnet:toolchain_net'], executable=True, test=True)
dotnet_xunit_test = rule(_unit_test, attrs={'deps': attr.label_list(providers=[DotnetLibrary]), 'resources': attr.label_list(providers=[DotnetResource]), 'srcs': attr.label_list(allow_files=['.cs']), 'out': attr.string(), 'defines': attr.string_list(), 'unsafe': attr.bool(default=False), 'data': attr.label_list(allow_files=True), 'dotnet_context_data': attr.label(default=label('@io_bazel_rules_dotnet//:dotnet_context_data')), '_manifest_prep': attr.label(default=label('//dotnet/tools/manifest_prep')), 'native_deps': attr.label(default=label('@dotnet_sdk//:native_deps')), 'testlauncher': attr.label(default='@xunit.runner.console//:mono_tool', providers=[DotnetLibrary]), '_launcher': attr.label(default=label('//dotnet/tools/launcher_mono_xunit:launcher_mono_xunit.exe')), '_copy': attr.label(default=label('//dotnet/tools/copy')), '_symlink': attr.label(default=label('//dotnet/tools/symlink')), '_xslt': attr.label(default=label('@io_bazel_rules_dotnet//tools/converttests:n3.xslt'), allow_files=True), 'keyfile': attr.label(allow_files=True), '_empty': attr.label(default=label('//dotnet/tools/empty:empty.exe'))}, toolchains=['@io_bazel_rules_dotnet//dotnet:toolchain'], executable=True, test=True) |
n = int(input("Enter a number: "))
statement = "is a prime number."
for x in range(2,n):
if n%x == 0:
statement = 'is not a prime number.'
print(n,statement)
| n = int(input('Enter a number: '))
statement = 'is a prime number.'
for x in range(2, n):
if n % x == 0:
statement = 'is not a prime number.'
print(n, statement) |
def main():
a, b = map(int, input().split())
if 1 <= a and a <= 9 and 1 <= b and b <= 9:
print(a * b)
else:
print(-1)
if __name__ == '__main__':
main()
| def main():
(a, b) = map(int, input().split())
if 1 <= a and a <= 9 and (1 <= b) and (b <= 9):
print(a * b)
else:
print(-1)
if __name__ == '__main__':
main() |
#
# PySNMP MIB module Nortel-Magellan-Passport-DataIsdnMIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Nortel-Magellan-Passport-DataIsdnMIB
# Produced by pysmi-0.3.4 at Wed May 1 14:26:48 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
OctetString, Integer, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "OctetString", "Integer", "ObjectIdentifier")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueSizeConstraint, ValueRangeConstraint, SingleValueConstraint, ConstraintsIntersection, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "ValueRangeConstraint", "SingleValueConstraint", "ConstraintsIntersection", "ConstraintsUnion")
DisplayString, Integer32, StorageType, InterfaceIndex, Unsigned32, RowStatus = mibBuilder.importSymbols("Nortel-Magellan-Passport-StandardTextualConventionsMIB", "DisplayString", "Integer32", "StorageType", "InterfaceIndex", "Unsigned32", "RowStatus")
AsciiString, NonReplicated, DigitString = mibBuilder.importSymbols("Nortel-Magellan-Passport-TextualConventionsMIB", "AsciiString", "NonReplicated", "DigitString")
passportMIBs, components = mibBuilder.importSymbols("Nortel-Magellan-Passport-UsefulDefinitionsMIB", "passportMIBs", "components")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
MibScalar, MibTable, MibTableRow, MibTableColumn, ObjectIdentity, Counter64, NotificationType, MibIdentifier, Integer32, ModuleIdentity, Unsigned32, Counter32, Gauge32, TimeTicks, iso, IpAddress, Bits = mibBuilder.importSymbols("SNMPv2-SMI", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "ObjectIdentity", "Counter64", "NotificationType", "MibIdentifier", "Integer32", "ModuleIdentity", "Unsigned32", "Counter32", "Gauge32", "TimeTicks", "iso", "IpAddress", "Bits")
TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString")
dataIsdnMIB = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 2, 113))
dataSigChan = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120))
dataSigChanRowStatusTable = MibTable((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 1), )
if mibBuilder.loadTexts: dataSigChanRowStatusTable.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanRowStatusTable.setDescription('This entry controls the addition and deletion of dataSigChan components.')
dataSigChanRowStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 1, 1), ).setIndexNames((0, "Nortel-Magellan-Passport-DataIsdnMIB", "dataSigChanIndex"))
if mibBuilder.loadTexts: dataSigChanRowStatusEntry.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanRowStatusEntry.setDescription('A single entry in the table represents a single dataSigChan component.')
dataSigChanRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 1, 1, 1), RowStatus()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: dataSigChanRowStatus.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanRowStatus.setDescription('This variable is used as the basis for SNMP naming of dataSigChan components. These components can be added and deleted.')
dataSigChanComponentName = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 1, 1, 2), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: dataSigChanComponentName.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanComponentName.setDescription("This variable provides the component's string name for use with the ASCII Console Interface")
dataSigChanStorageType = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 1, 1, 4), StorageType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: dataSigChanStorageType.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanStorageType.setDescription('This variable represents the storage type value for the dataSigChan tables.')
dataSigChanIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 1, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 255)))
if mibBuilder.loadTexts: dataSigChanIndex.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanIndex.setDescription('This variable represents the index for the dataSigChan tables.')
dataSigChanProvTable = MibTable((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 100), )
if mibBuilder.loadTexts: dataSigChanProvTable.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanProvTable.setDescription('This group represents the provisionable attributes of a DataSigChan.')
dataSigChanProvEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 100, 1), ).setIndexNames((0, "Nortel-Magellan-Passport-DataIsdnMIB", "dataSigChanIndex"))
if mibBuilder.loadTexts: dataSigChanProvEntry.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanProvEntry.setDescription('An entry in the dataSigChanProvTable.')
dataSigChanCommentText = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 100, 1, 1), AsciiString().subtype(subtypeSpec=ValueSizeConstraint(0, 40))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: dataSigChanCommentText.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCommentText.setDescription('This attribute specifies the name of the customer that is using this DataSigChan. Typical use of this attribute is to store customer name.')
dataSigChanCidDataTable = MibTable((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 101), )
if mibBuilder.loadTexts: dataSigChanCidDataTable.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCidDataTable.setDescription("This group contains the attribute for a component's Customer Identifier (CID). Refer to the attribute description for a detailed explanation of CIDs.")
dataSigChanCidDataEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 101, 1), ).setIndexNames((0, "Nortel-Magellan-Passport-DataIsdnMIB", "dataSigChanIndex"))
if mibBuilder.loadTexts: dataSigChanCidDataEntry.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCidDataEntry.setDescription('An entry in the dataSigChanCidDataTable.')
dataSigChanCustomerIdentifier = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 101, 1, 1), Unsigned32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(1, 8191), ))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: dataSigChanCustomerIdentifier.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCustomerIdentifier.setDescription("This attribute holds the Customer Identifier (CID). Every component has a CID. If a component has a cid attribute, the component's CID is the provisioned value of that attribute; otherwise the component inherits the CID of its parent. The top- level component has a CID of 0. Every operator session also has a CID, which is the CID provisioned for the operator's user ID. An operator will see only the stream data for components having a matching CID. Also, the operator will be allowed to issue commands for only those components which have a matching CID. An operator CID of 0 is used to identify the Network Manager (referred to as 'NetMan' in DPN). This CID matches the CID of any component. Values 1 to 8191 inclusive (equivalent to 'basic CIDs' in DPN) may be assigned to specific customers.")
dataSigChanIfEntryTable = MibTable((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 102), )
if mibBuilder.loadTexts: dataSigChanIfEntryTable.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanIfEntryTable.setDescription('This group contains the provisionable attributes for the ifEntry.')
dataSigChanIfEntryEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 102, 1), ).setIndexNames((0, "Nortel-Magellan-Passport-DataIsdnMIB", "dataSigChanIndex"))
if mibBuilder.loadTexts: dataSigChanIfEntryEntry.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanIfEntryEntry.setDescription('An entry in the dataSigChanIfEntryTable.')
dataSigChanIfAdminStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 102, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("up", 1), ("down", 2), ("testing", 3))).clone('up')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: dataSigChanIfAdminStatus.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanIfAdminStatus.setDescription('The desired state of the interface. The up state indicates the interface is operational. The down state indicates the interface is not operational. The testing state indicates that no operational packets can be passed.')
dataSigChanIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 102, 1, 2), InterfaceIndex().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: dataSigChanIfIndex.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanIfIndex.setDescription('This is the index for the IfEntry. Its value is automatically initialized during the provisioning process.')
dataSigChanStateTable = MibTable((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 103), )
if mibBuilder.loadTexts: dataSigChanStateTable.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanStateTable.setDescription('This group contains the three OSI State attributes. The descriptions generically indicate what each state attribute implies about the component. Note that not all the values and state combinations described here are supported by every component which uses this group. For component-specific information and the valid state combinations, refer to NTP 241-7001-150, Passport Operations and Maintenance Guide.')
dataSigChanStateEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 103, 1), ).setIndexNames((0, "Nortel-Magellan-Passport-DataIsdnMIB", "dataSigChanIndex"))
if mibBuilder.loadTexts: dataSigChanStateEntry.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanStateEntry.setDescription('An entry in the dataSigChanStateTable.')
dataSigChanAdminState = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 103, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("locked", 0), ("unlocked", 1), ("shuttingDown", 2))).clone('unlocked')).setMaxAccess("readonly")
if mibBuilder.loadTexts: dataSigChanAdminState.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanAdminState.setDescription('This attribute indicates the OSI Administrative State of the component. The value locked indicates that the component is administratively prohibited from providing services for its users. A Lock or Lock - force command has been previously issued for this component. When the value is locked, the value of usageState must be idle. The value shuttingDown indicates that the component is administratively permitted to provide service to its existing users only. A Lock command was issued against the component and it is in the process of shutting down. The value unlocked indicates that the component is administratively permitted to provide services for its users. To enter this state, issue an Unlock command to this component.')
dataSigChanOperationalState = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 103, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1))).clone('disabled')).setMaxAccess("readonly")
if mibBuilder.loadTexts: dataSigChanOperationalState.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanOperationalState.setDescription('This attribute indicates the OSI Operational State of the component. The value enabled indicates that the component is available for operation. Note that if adminState is locked, it would still not be providing service. The value disabled indicates that the component is not available for operation. For example, something is wrong with the component itself, or with another component on which this one depends. If the value is disabled, the usageState must be idle.')
dataSigChanUsageState = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 103, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("idle", 0), ("active", 1), ("busy", 2))).clone('idle')).setMaxAccess("readonly")
if mibBuilder.loadTexts: dataSigChanUsageState.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanUsageState.setDescription('This attribute indicates the OSI Usage State of the component. The value idle indicates that the component is not currently in use. The value active indicates that the component is in use and has spare capacity to provide for additional users. The value busy indicates that the component is in use and has no spare operating capacity for additional users at this time.')
dataSigChanOperStatusTable = MibTable((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 104), )
if mibBuilder.loadTexts: dataSigChanOperStatusTable.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanOperStatusTable.setDescription('This group includes the Operational Status attribute. This attribute defines the current operational state of this component.')
dataSigChanOperStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 104, 1), ).setIndexNames((0, "Nortel-Magellan-Passport-DataIsdnMIB", "dataSigChanIndex"))
if mibBuilder.loadTexts: dataSigChanOperStatusEntry.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanOperStatusEntry.setDescription('An entry in the dataSigChanOperStatusTable.')
dataSigChanSnmpOperStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 104, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("up", 1), ("down", 2), ("testing", 3))).clone('up')).setMaxAccess("readonly")
if mibBuilder.loadTexts: dataSigChanSnmpOperStatus.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanSnmpOperStatus.setDescription('The current state of the interface. The up state indicates the interface is operational and capable of forwarding packets. The down state indicates the interface is not operational, thus unable to forward packets. testing state indicates that no operational packets can be passed.')
dataSigChanCc = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2))
dataSigChanCcRowStatusTable = MibTable((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 1), )
if mibBuilder.loadTexts: dataSigChanCcRowStatusTable.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcRowStatusTable.setDescription('This entry controls the addition and deletion of dataSigChanCc components.')
dataSigChanCcRowStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 1, 1), ).setIndexNames((0, "Nortel-Magellan-Passport-DataIsdnMIB", "dataSigChanIndex"), (0, "Nortel-Magellan-Passport-DataIsdnMIB", "dataSigChanCcIndex"))
if mibBuilder.loadTexts: dataSigChanCcRowStatusEntry.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcRowStatusEntry.setDescription('A single entry in the table represents a single dataSigChanCc component.')
dataSigChanCcRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 1, 1, 1), RowStatus()).setMaxAccess("readonly")
if mibBuilder.loadTexts: dataSigChanCcRowStatus.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcRowStatus.setDescription('This variable is used as the basis for SNMP naming of dataSigChanCc components. These components cannot be added nor deleted.')
dataSigChanCcComponentName = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 1, 1, 2), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: dataSigChanCcComponentName.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcComponentName.setDescription("This variable provides the component's string name for use with the ASCII Console Interface")
dataSigChanCcStorageType = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 1, 1, 4), StorageType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: dataSigChanCcStorageType.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcStorageType.setDescription('This variable represents the storage type value for the dataSigChanCc tables.')
dataSigChanCcIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 1, 1, 10), NonReplicated())
if mibBuilder.loadTexts: dataSigChanCcIndex.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcIndex.setDescription('This variable represents the index for the dataSigChanCc tables.')
dataSigChanCcStatsTable = MibTable((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 10), )
if mibBuilder.loadTexts: dataSigChanCcStatsTable.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcStatsTable.setDescription('This group contains the statistics of the CallControl')
dataSigChanCcStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 10, 1), ).setIndexNames((0, "Nortel-Magellan-Passport-DataIsdnMIB", "dataSigChanIndex"), (0, "Nortel-Magellan-Passport-DataIsdnMIB", "dataSigChanCcIndex"))
if mibBuilder.loadTexts: dataSigChanCcStatsEntry.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcStatsEntry.setDescription('An entry in the dataSigChanCcStatsTable.')
dataSigChanCcTotalValidInCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 10, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 4294967295))).setMaxAccess("readonly")
if mibBuilder.loadTexts: dataSigChanCcTotalValidInCalls.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcTotalValidInCalls.setDescription('This attribute counts the total number of incoming calls (with valid mandatory IE contents and received in a valid ISDN state) from the interface. This counter wraps to zero after reaching its maximum value.')
dataSigChanCcSuccessfullInCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 10, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 4294967295))).setMaxAccess("readonly")
if mibBuilder.loadTexts: dataSigChanCcSuccessfullInCalls.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcSuccessfullInCalls.setDescription('This attribute counts the total number of successfull valid incoming calls from the interface. Unsuccessful calls include those that have disallowed Capability (BC, LLC), screening indicator, or calling party number, and calls that are rejected due to requested channel busy. This counter wraps to zero after reaching its maximum value.')
dataSigChanCcInInvalidCapability = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 10, 1, 3), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 4294967295))).setMaxAccess("readonly")
if mibBuilder.loadTexts: dataSigChanCcInInvalidCapability.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcInInvalidCapability.setDescription('This attribute counts the number of valid incoming calls rejected due to an unsupported service capability, such as Information Transfer Rate, Class of Service, Protocol Standard. This counter wraps to zero after reaching its maximum value.')
dataSigChanCcInInvalidScreen = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 10, 1, 4), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 4294967295))).setMaxAccess("readonly")
if mibBuilder.loadTexts: dataSigChanCcInInvalidScreen.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcInInvalidScreen.setDescription("This attribute counts the number of valid incoming calls rejected due to a screening indicator value not provisioned in the channel group's screeningIndicator attribute. This counter wraps to zero after reaching its maximum value.")
dataSigChanCcInInvalidCgpn = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 10, 1, 5), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 4294967295))).setMaxAccess("readonly")
if mibBuilder.loadTexts: dataSigChanCcInInvalidCgpn.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcInInvalidCgpn.setDescription('This attribute counts the number of valid incoming calls rejected due to the calling party number not beeing provisioned in any channelGroup component of this call control. This counter wraps to zero after reaching its maximum value.')
dataSigChanCcInChannelBusy = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 10, 1, 6), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 4294967295))).setMaxAccess("readonly")
if mibBuilder.loadTexts: dataSigChanCcInChannelBusy.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcInChannelBusy.setDescription('This attribute counts the number of valid incoming calls rejected due to no available B-Channels. This counter wraps to zero after reaching its maximum value.')
dataSigChanCcLastClearCause = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 10, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: dataSigChanCcLastClearCause.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcLastClearCause.setDescription('This attribute indicates the Q931 clear cause of the last valid call that is rejected or cleared.')
dataSigChanCcLastClearedCallingPartyNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 10, 1, 8), DigitString().subtype(subtypeSpec=ValueSizeConstraint(1, 14))).setMaxAccess("readonly")
if mibBuilder.loadTexts: dataSigChanCcLastClearedCallingPartyNumber.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcLastClearedCallingPartyNumber.setDescription('This attribute shows the calling party number of the last valid call that is rejected or cleared.')
dataSigChanCcCg = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2))
dataSigChanCcCgRowStatusTable = MibTable((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 1), )
if mibBuilder.loadTexts: dataSigChanCcCgRowStatusTable.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcCgRowStatusTable.setDescription('This entry controls the addition and deletion of dataSigChanCcCg components.')
dataSigChanCcCgRowStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 1, 1), ).setIndexNames((0, "Nortel-Magellan-Passport-DataIsdnMIB", "dataSigChanIndex"), (0, "Nortel-Magellan-Passport-DataIsdnMIB", "dataSigChanCcIndex"), (0, "Nortel-Magellan-Passport-DataIsdnMIB", "dataSigChanCcCgIndex"))
if mibBuilder.loadTexts: dataSigChanCcCgRowStatusEntry.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcCgRowStatusEntry.setDescription('A single entry in the table represents a single dataSigChanCcCg component.')
dataSigChanCcCgRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 1, 1, 1), RowStatus()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: dataSigChanCcCgRowStatus.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcCgRowStatus.setDescription('This variable is used as the basis for SNMP naming of dataSigChanCcCg components. These components can be added and deleted.')
dataSigChanCcCgComponentName = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 1, 1, 2), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: dataSigChanCcCgComponentName.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcCgComponentName.setDescription("This variable provides the component's string name for use with the ASCII Console Interface")
dataSigChanCcCgStorageType = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 1, 1, 4), StorageType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: dataSigChanCcCgStorageType.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcCgStorageType.setDescription('This variable represents the storage type value for the dataSigChanCcCg tables.')
dataSigChanCcCgIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 1, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 31)))
if mibBuilder.loadTexts: dataSigChanCcCgIndex.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcCgIndex.setDescription('This variable represents the index for the dataSigChanCcCg tables.')
dataSigChanCcCgCidDataTable = MibTable((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 10), )
if mibBuilder.loadTexts: dataSigChanCcCgCidDataTable.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcCgCidDataTable.setDescription("This group contains the attribute for a component's Customer Identifier (CID). Refer to the attribute description for a detailed explanation of CIDs.")
dataSigChanCcCgCidDataEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 10, 1), ).setIndexNames((0, "Nortel-Magellan-Passport-DataIsdnMIB", "dataSigChanIndex"), (0, "Nortel-Magellan-Passport-DataIsdnMIB", "dataSigChanCcIndex"), (0, "Nortel-Magellan-Passport-DataIsdnMIB", "dataSigChanCcCgIndex"))
if mibBuilder.loadTexts: dataSigChanCcCgCidDataEntry.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcCgCidDataEntry.setDescription('An entry in the dataSigChanCcCgCidDataTable.')
dataSigChanCcCgCustomerIdentifier = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 10, 1, 1), Unsigned32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(1, 8191), ))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: dataSigChanCcCgCustomerIdentifier.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcCgCustomerIdentifier.setDescription("This attribute holds the Customer Identifier (CID). Every component has a CID. If a component has a cid attribute, the component's CID is the provisioned value of that attribute; otherwise the component inherits the CID of its parent. The top- level component has a CID of 0. Every operator session also has a CID, which is the CID provisioned for the operator's user ID. An operator will see only the stream data for components having a matching CID. Also, the operator will be allowed to issue commands for only those components which have a matching CID. An operator CID of 0 is used to identify the Network Manager (referred to as 'NetMan' in DPN). This CID matches the CID of any component. Values 1 to 8191 inclusive (equivalent to 'basic CIDs' in DPN) may be assigned to specific customers.")
dataSigChanCcCgProvTable = MibTable((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 11), )
if mibBuilder.loadTexts: dataSigChanCcCgProvTable.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcCgProvTable.setDescription('This group defines the call admission parameters applied to the group of B-Channels.')
dataSigChanCcCgProvEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 11, 1), ).setIndexNames((0, "Nortel-Magellan-Passport-DataIsdnMIB", "dataSigChanIndex"), (0, "Nortel-Magellan-Passport-DataIsdnMIB", "dataSigChanCcIndex"), (0, "Nortel-Magellan-Passport-DataIsdnMIB", "dataSigChanCcCgIndex"))
if mibBuilder.loadTexts: dataSigChanCcCgProvEntry.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcCgProvEntry.setDescription('An entry in the dataSigChanCcCgProvTable.')
dataSigChanCcCgCommentText = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 11, 1, 1), AsciiString().subtype(subtypeSpec=ValueSizeConstraint(0, 40))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: dataSigChanCcCgCommentText.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcCgCommentText.setDescription('This attribute specifies the name of the customer that is using this ChannelGroup. Typical use of this attribute is to store customer name.')
dataSigChanCcCgScreeningIndicator = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 11, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 1)).setFixedLength(1).clone(hexValue="50")).setMaxAccess("readwrite")
if mibBuilder.loadTexts: dataSigChanCcCgScreeningIndicator.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcCgScreeningIndicator.setDescription('This attribute defines the acceptable set of screening modes. The screening mode is carried by the Calling Party Number information element (IE) of the B-Channel request packet. There are four types of mode: upns - User provided, not screened upvp - User provided, verified and passed upvf - User provided, verified and failed np - Network provided When a call is received with a screening indicator not provisioned in the list, the call is cleared. Description of bits: upns(0) upvp(1) upvf(2) np(3)')
dataSigChanCcCgChannelAssignmentOrder = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 11, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("ascending", 0), ("descending", 1))).clone('ascending')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: dataSigChanCcCgChannelAssignmentOrder.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcCgChannelAssignmentOrder.setDescription('This attribute defines the order (ascending or descending) in which the B-Channels are allocated. This attribute is used only when it is not signalled in the call setup message.')
dataSigChanCcCgChannelList = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 11, 1, 4), OctetString().subtype(subtypeSpec=ValueSizeConstraint(4, 4)).setFixedLength(4)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: dataSigChanCcCgChannelList.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcCgChannelList.setDescription('This attribute contains the list of B-Channel numbers forming the channel group. At least one channel must be specified. Description of bits: notused0(0) n1(1) n2(2) n3(3) n4(4) n5(5) n6(6) n7(7) n8(8) n9(9) n10(10) n11(11) n12(12) n13(13) n14(14) n15(15) n16(16) n17(17) n18(18) n19(19) n20(20) n21(21) n22(22) n23(23) n24(24) n25(25) n26(26) n27(27) n28(28) n29(29) n30(30) n31(31)')
dataSigChanCcCgStatsTable = MibTable((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 12), )
if mibBuilder.loadTexts: dataSigChanCcCgStatsTable.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcCgStatsTable.setDescription('This group contains the statistics for a ChannelGroup')
dataSigChanCcCgStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 12, 1), ).setIndexNames((0, "Nortel-Magellan-Passport-DataIsdnMIB", "dataSigChanIndex"), (0, "Nortel-Magellan-Passport-DataIsdnMIB", "dataSigChanCcIndex"), (0, "Nortel-Magellan-Passport-DataIsdnMIB", "dataSigChanCcCgIndex"))
if mibBuilder.loadTexts: dataSigChanCcCgStatsEntry.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcCgStatsEntry.setDescription('An entry in the dataSigChanCcCgStatsTable.')
dataSigChanCcCgTotalInCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 12, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 4294967295))).setMaxAccess("readonly")
if mibBuilder.loadTexts: dataSigChanCcCgTotalInCalls.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcCgTotalInCalls.setDescription('This attribute counts the total number of incoming calls (with valid mandatory IE contents and received in a valid ISDN state) from the interface for this channelGroup. This counter wraps to zero after reaching its maximum value.')
dataSigChanCcCgSuccessfullInCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 12, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 4294967295))).setMaxAccess("readonly")
if mibBuilder.loadTexts: dataSigChanCcCgSuccessfullInCalls.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcCgSuccessfullInCalls.setDescription('This attribute counts the number of valid incoming calls for this channelGroup. This counter wraps to zero after reaching its maximum value. DESCRIPTION')
dataSigChanCcCgRejectedNoChanAvail = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 12, 1, 3), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 4294967295))).setMaxAccess("readonly")
if mibBuilder.loadTexts: dataSigChanCcCgRejectedNoChanAvail.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcCgRejectedNoChanAvail.setDescription('This attribute counts the number of rejected call because no channel were available under the selected channel group. This counter wraps to zero after reaching its maximum value. DESCRIPTION')
dataSigChanCcCgIdleChannelCount = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 12, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: dataSigChanCcCgIdleChannelCount.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcCgIdleChannelCount.setDescription('This attribute shows the number of B-channels in the channel group that are in idle state.')
dataSigChanCcCgBusyChannelCount = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 12, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: dataSigChanCcCgBusyChannelCount.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcCgBusyChannelCount.setDescription('This attribute shows the number of B-Channels in this channel group that are in busy state.')
dataSigChanCcCgCgpn = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 2))
dataSigChanCcCgCgpnRowStatusTable = MibTable((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 2, 1), )
if mibBuilder.loadTexts: dataSigChanCcCgCgpnRowStatusTable.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcCgCgpnRowStatusTable.setDescription('This entry controls the addition and deletion of dataSigChanCcCgCgpn components.')
dataSigChanCcCgCgpnRowStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 2, 1, 1), ).setIndexNames((0, "Nortel-Magellan-Passport-DataIsdnMIB", "dataSigChanIndex"), (0, "Nortel-Magellan-Passport-DataIsdnMIB", "dataSigChanCcIndex"), (0, "Nortel-Magellan-Passport-DataIsdnMIB", "dataSigChanCcCgIndex"), (0, "Nortel-Magellan-Passport-DataIsdnMIB", "dataSigChanCcCgCgpnIndex"))
if mibBuilder.loadTexts: dataSigChanCcCgCgpnRowStatusEntry.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcCgCgpnRowStatusEntry.setDescription('A single entry in the table represents a single dataSigChanCcCgCgpn component.')
dataSigChanCcCgCgpnRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 2, 1, 1, 1), RowStatus()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: dataSigChanCcCgCgpnRowStatus.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcCgCgpnRowStatus.setDescription('This variable is used as the basis for SNMP naming of dataSigChanCcCgCgpn components. These components can be added and deleted.')
dataSigChanCcCgCgpnComponentName = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 2, 1, 1, 2), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: dataSigChanCcCgCgpnComponentName.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcCgCgpnComponentName.setDescription("This variable provides the component's string name for use with the ASCII Console Interface")
dataSigChanCcCgCgpnStorageType = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 2, 1, 1, 4), StorageType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: dataSigChanCcCgCgpnStorageType.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcCgCgpnStorageType.setDescription('This variable represents the storage type value for the dataSigChanCcCgCgpn tables.')
dataSigChanCcCgCgpnIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 2, 1, 1, 10), DigitString().subtype(subtypeSpec=ValueSizeConstraint(1, 14)))
if mibBuilder.loadTexts: dataSigChanCcCgCgpnIndex.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcCgCgpnIndex.setDescription('This variable represents the index for the dataSigChanCcCgCgpn tables.')
dataSigChanCcCgBch = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 3))
dataSigChanCcCgBchRowStatusTable = MibTable((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 3, 1), )
if mibBuilder.loadTexts: dataSigChanCcCgBchRowStatusTable.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcCgBchRowStatusTable.setDescription('*** THIS TABLE CURRENTLY NOT IMPLEMENTED *** This entry controls the addition and deletion of dataSigChanCcCgBch components.')
dataSigChanCcCgBchRowStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 3, 1, 1), ).setIndexNames((0, "Nortel-Magellan-Passport-DataIsdnMIB", "dataSigChanIndex"), (0, "Nortel-Magellan-Passport-DataIsdnMIB", "dataSigChanCcIndex"), (0, "Nortel-Magellan-Passport-DataIsdnMIB", "dataSigChanCcCgIndex"), (0, "Nortel-Magellan-Passport-DataIsdnMIB", "dataSigChanCcCgBchIndex"))
if mibBuilder.loadTexts: dataSigChanCcCgBchRowStatusEntry.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcCgBchRowStatusEntry.setDescription('A single entry in the table represents a single dataSigChanCcCgBch component.')
dataSigChanCcCgBchRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 3, 1, 1, 1), RowStatus()).setMaxAccess("readonly")
if mibBuilder.loadTexts: dataSigChanCcCgBchRowStatus.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcCgBchRowStatus.setDescription('This variable is used as the basis for SNMP naming of dataSigChanCcCgBch components. These components cannot be added nor deleted.')
dataSigChanCcCgBchComponentName = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 3, 1, 1, 2), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: dataSigChanCcCgBchComponentName.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcCgBchComponentName.setDescription("This variable provides the component's string name for use with the ASCII Console Interface")
dataSigChanCcCgBchStorageType = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 3, 1, 1, 4), StorageType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: dataSigChanCcCgBchStorageType.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcCgBchStorageType.setDescription('This variable represents the storage type value for the dataSigChanCcCgBch tables.')
dataSigChanCcCgBchIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 3, 1, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 31)))
if mibBuilder.loadTexts: dataSigChanCcCgBchIndex.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcCgBchIndex.setDescription('This variable represents the index for the dataSigChanCcCgBch tables.')
dataSigChanCcCgBchBchanOpDataTable = MibTable((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 3, 2), )
if mibBuilder.loadTexts: dataSigChanCcCgBchBchanOpDataTable.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcCgBchBchanOpDataTable.setDescription('*** THIS TABLE CURRENTLY NOT IMPLEMENTED *** This group contains the operational data of a B-Channel.')
dataSigChanCcCgBchBchanOpDataEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 3, 2, 1), ).setIndexNames((0, "Nortel-Magellan-Passport-DataIsdnMIB", "dataSigChanIndex"), (0, "Nortel-Magellan-Passport-DataIsdnMIB", "dataSigChanCcIndex"), (0, "Nortel-Magellan-Passport-DataIsdnMIB", "dataSigChanCcCgIndex"), (0, "Nortel-Magellan-Passport-DataIsdnMIB", "dataSigChanCcCgBchIndex"))
if mibBuilder.loadTexts: dataSigChanCcCgBchBchanOpDataEntry.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcCgBchBchanOpDataEntry.setDescription('An entry in the dataSigChanCcCgBchBchanOpDataTable.')
dataSigChanCcCgBchState = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 3, 2, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("idle", 0), ("busy", 1), ("disabled", 2), ("noProtocolProvisioned", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: dataSigChanCcCgBchState.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcCgBchState.setDescription('This attribute indicates the state of the B-channel. A B-channel is in idle state when it is available for a call. The busy state indicate that the B-channel is presently in use. The disabled state means that the access service is not enabled because it is locked or the port is down. The state noProtocolProvisioned means that the call control did not yet received the registration for this B-channel.')
dataSigChanCcCgBchCallingPartyNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 3, 2, 1, 2), DigitString().subtype(subtypeSpec=ValueSizeConstraint(1, 14))).setMaxAccess("readonly")
if mibBuilder.loadTexts: dataSigChanCcCgBchCallingPartyNumber.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcCgBchCallingPartyNumber.setDescription('This attribute indicates the calling party number of the last valid call request for this channel.')
dataSigChanCcCgBchLastQ931ClearCause = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 3, 2, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: dataSigChanCcCgBchLastQ931ClearCause.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcCgBchLastQ931ClearCause.setDescription('The clear cause of the last call on this B-channel.')
dataSigChanCcCgBchRunningApplication = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 3, 2, 1, 4), AsciiString().subtype(subtypeSpec=ValueSizeConstraint(0, 20)).clone(hexValue="")).setMaxAccess("readonly")
if mibBuilder.loadTexts: dataSigChanCcCgBchRunningApplication.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcCgBchRunningApplication.setDescription('The name of the application running on this B-channel.')
dataSigChanCcTr = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 3))
dataSigChanCcTrRowStatusTable = MibTable((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 3, 1), )
if mibBuilder.loadTexts: dataSigChanCcTrRowStatusTable.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcTrRowStatusTable.setDescription('This entry controls the addition and deletion of dataSigChanCcTr components.')
dataSigChanCcTrRowStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 3, 1, 1), ).setIndexNames((0, "Nortel-Magellan-Passport-DataIsdnMIB", "dataSigChanIndex"), (0, "Nortel-Magellan-Passport-DataIsdnMIB", "dataSigChanCcIndex"), (0, "Nortel-Magellan-Passport-DataIsdnMIB", "dataSigChanCcTrIndex"))
if mibBuilder.loadTexts: dataSigChanCcTrRowStatusEntry.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcTrRowStatusEntry.setDescription('A single entry in the table represents a single dataSigChanCcTr component.')
dataSigChanCcTrRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 3, 1, 1, 1), RowStatus()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: dataSigChanCcTrRowStatus.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcTrRowStatus.setDescription('This variable is used as the basis for SNMP naming of dataSigChanCcTr components. These components can be added and deleted.')
dataSigChanCcTrComponentName = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 3, 1, 1, 2), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: dataSigChanCcTrComponentName.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcTrComponentName.setDescription("This variable provides the component's string name for use with the ASCII Console Interface")
dataSigChanCcTrStorageType = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 3, 1, 1, 4), StorageType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: dataSigChanCcTrStorageType.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcTrStorageType.setDescription('This variable represents the storage type value for the dataSigChanCcTr tables.')
dataSigChanCcTrIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 3, 1, 1, 10), NonReplicated())
if mibBuilder.loadTexts: dataSigChanCcTrIndex.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcTrIndex.setDescription('This variable represents the index for the dataSigChanCcTr tables.')
dataSigChanCcTrPri = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 3, 2))
dataSigChanCcTrPriRowStatusTable = MibTable((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 3, 2, 1), )
if mibBuilder.loadTexts: dataSigChanCcTrPriRowStatusTable.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcTrPriRowStatusTable.setDescription('*** THIS TABLE CURRENTLY NOT IMPLEMENTED *** This entry controls the addition and deletion of dataSigChanCcTrPri components.')
dataSigChanCcTrPriRowStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 3, 2, 1, 1), ).setIndexNames((0, "Nortel-Magellan-Passport-DataIsdnMIB", "dataSigChanIndex"), (0, "Nortel-Magellan-Passport-DataIsdnMIB", "dataSigChanCcIndex"), (0, "Nortel-Magellan-Passport-DataIsdnMIB", "dataSigChanCcTrIndex"), (0, "Nortel-Magellan-Passport-DataIsdnMIB", "dataSigChanCcTrPriIndex"))
if mibBuilder.loadTexts: dataSigChanCcTrPriRowStatusEntry.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcTrPriRowStatusEntry.setDescription('A single entry in the table represents a single dataSigChanCcTrPri component.')
dataSigChanCcTrPriRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 3, 2, 1, 1, 1), RowStatus()).setMaxAccess("readonly")
if mibBuilder.loadTexts: dataSigChanCcTrPriRowStatus.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcTrPriRowStatus.setDescription('This variable is used as the basis for SNMP naming of dataSigChanCcTrPri components. These components cannot be added nor deleted.')
dataSigChanCcTrPriComponentName = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 3, 2, 1, 1, 2), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: dataSigChanCcTrPriComponentName.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcTrPriComponentName.setDescription("This variable provides the component's string name for use with the ASCII Console Interface")
dataSigChanCcTrPriStorageType = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 3, 2, 1, 1, 4), StorageType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: dataSigChanCcTrPriStorageType.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcTrPriStorageType.setDescription('This variable represents the storage type value for the dataSigChanCcTrPri tables.')
dataSigChanCcTrPriIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 3, 2, 1, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 3)))
if mibBuilder.loadTexts: dataSigChanCcTrPriIndex.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcTrPriIndex.setDescription('This variable represents the index for the dataSigChanCcTrPri tables.')
dataSigChanCcTrPriBch = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 3, 2, 2))
dataSigChanCcTrPriBchRowStatusTable = MibTable((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 3, 2, 2, 1), )
if mibBuilder.loadTexts: dataSigChanCcTrPriBchRowStatusTable.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcTrPriBchRowStatusTable.setDescription('*** THIS TABLE CURRENTLY NOT IMPLEMENTED *** This entry controls the addition and deletion of dataSigChanCcTrPriBch components.')
dataSigChanCcTrPriBchRowStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 3, 2, 2, 1, 1), ).setIndexNames((0, "Nortel-Magellan-Passport-DataIsdnMIB", "dataSigChanIndex"), (0, "Nortel-Magellan-Passport-DataIsdnMIB", "dataSigChanCcIndex"), (0, "Nortel-Magellan-Passport-DataIsdnMIB", "dataSigChanCcTrIndex"), (0, "Nortel-Magellan-Passport-DataIsdnMIB", "dataSigChanCcTrPriIndex"), (0, "Nortel-Magellan-Passport-DataIsdnMIB", "dataSigChanCcTrPriBchIndex"))
if mibBuilder.loadTexts: dataSigChanCcTrPriBchRowStatusEntry.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcTrPriBchRowStatusEntry.setDescription('A single entry in the table represents a single dataSigChanCcTrPriBch component.')
dataSigChanCcTrPriBchRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 3, 2, 2, 1, 1, 1), RowStatus()).setMaxAccess("readonly")
if mibBuilder.loadTexts: dataSigChanCcTrPriBchRowStatus.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcTrPriBchRowStatus.setDescription('This variable is used as the basis for SNMP naming of dataSigChanCcTrPriBch components. These components cannot be added nor deleted.')
dataSigChanCcTrPriBchComponentName = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 3, 2, 2, 1, 1, 2), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: dataSigChanCcTrPriBchComponentName.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcTrPriBchComponentName.setDescription("This variable provides the component's string name for use with the ASCII Console Interface")
dataSigChanCcTrPriBchStorageType = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 3, 2, 2, 1, 1, 4), StorageType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: dataSigChanCcTrPriBchStorageType.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcTrPriBchStorageType.setDescription('This variable represents the storage type value for the dataSigChanCcTrPriBch tables.')
dataSigChanCcTrPriBchIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 3, 2, 2, 1, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 31)))
if mibBuilder.loadTexts: dataSigChanCcTrPriBchIndex.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcTrPriBchIndex.setDescription('This variable represents the index for the dataSigChanCcTrPriBch tables.')
dataSigChanCcBch = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 4))
dataSigChanCcBchRowStatusTable = MibTable((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 4, 1), )
if mibBuilder.loadTexts: dataSigChanCcBchRowStatusTable.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcBchRowStatusTable.setDescription('*** THIS TABLE CURRENTLY NOT IMPLEMENTED *** This entry controls the addition and deletion of dataSigChanCcBch components.')
dataSigChanCcBchRowStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 4, 1, 1), ).setIndexNames((0, "Nortel-Magellan-Passport-DataIsdnMIB", "dataSigChanIndex"), (0, "Nortel-Magellan-Passport-DataIsdnMIB", "dataSigChanCcIndex"), (0, "Nortel-Magellan-Passport-DataIsdnMIB", "dataSigChanCcBchIndex"))
if mibBuilder.loadTexts: dataSigChanCcBchRowStatusEntry.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcBchRowStatusEntry.setDescription('A single entry in the table represents a single dataSigChanCcBch component.')
dataSigChanCcBchRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 4, 1, 1, 1), RowStatus()).setMaxAccess("readonly")
if mibBuilder.loadTexts: dataSigChanCcBchRowStatus.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcBchRowStatus.setDescription('This variable is used as the basis for SNMP naming of dataSigChanCcBch components. These components cannot be added nor deleted.')
dataSigChanCcBchComponentName = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 4, 1, 1, 2), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: dataSigChanCcBchComponentName.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcBchComponentName.setDescription("This variable provides the component's string name for use with the ASCII Console Interface")
dataSigChanCcBchStorageType = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 4, 1, 1, 4), StorageType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: dataSigChanCcBchStorageType.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcBchStorageType.setDescription('This variable represents the storage type value for the dataSigChanCcBch tables.')
dataSigChanCcBchIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 4, 1, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 31)))
if mibBuilder.loadTexts: dataSigChanCcBchIndex.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcBchIndex.setDescription('This variable represents the index for the dataSigChanCcBch tables.')
dataSigChanCcBchBchanOpDataTable = MibTable((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 4, 2), )
if mibBuilder.loadTexts: dataSigChanCcBchBchanOpDataTable.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcBchBchanOpDataTable.setDescription('*** THIS TABLE CURRENTLY NOT IMPLEMENTED *** This group contains the operational data of a B-Channel.')
dataSigChanCcBchBchanOpDataEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 4, 2, 1), ).setIndexNames((0, "Nortel-Magellan-Passport-DataIsdnMIB", "dataSigChanIndex"), (0, "Nortel-Magellan-Passport-DataIsdnMIB", "dataSigChanCcIndex"), (0, "Nortel-Magellan-Passport-DataIsdnMIB", "dataSigChanCcBchIndex"))
if mibBuilder.loadTexts: dataSigChanCcBchBchanOpDataEntry.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcBchBchanOpDataEntry.setDescription('An entry in the dataSigChanCcBchBchanOpDataTable.')
dataSigChanCcBchState = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 4, 2, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("idle", 0), ("busy", 1), ("disabled", 2), ("noProtocolProvisioned", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: dataSigChanCcBchState.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcBchState.setDescription('This attribute indicates the state of the B-channel. A B-channel is in idle state when it is available for a call. The busy state indicate that the B-channel is presently in use. The disabled state means that the access service is not enabled because it is locked or the port is down. The state noProtocolProvisioned means that the call control did not yet received the registration for this B-channel.')
dataSigChanCcBchCallingPartyNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 4, 2, 1, 2), DigitString().subtype(subtypeSpec=ValueSizeConstraint(1, 14))).setMaxAccess("readonly")
if mibBuilder.loadTexts: dataSigChanCcBchCallingPartyNumber.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcBchCallingPartyNumber.setDescription('This attribute indicates the calling party number of the last valid call request for this channel.')
dataSigChanCcBchLastQ931ClearCause = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 4, 2, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: dataSigChanCcBchLastQ931ClearCause.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcBchLastQ931ClearCause.setDescription('The clear cause of the last call on this B-channel.')
dataSigChanCcBchRunningApplication = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 4, 2, 1, 4), AsciiString().subtype(subtypeSpec=ValueSizeConstraint(0, 20)).clone(hexValue="")).setMaxAccess("readonly")
if mibBuilder.loadTexts: dataSigChanCcBchRunningApplication.setStatus('mandatory')
if mibBuilder.loadTexts: dataSigChanCcBchRunningApplication.setDescription('The name of the application running on this B-channel.')
dataIsdnGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 2, 113, 1))
dataIsdnGroupBD = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 2, 113, 1, 4))
dataIsdnGroupBD01 = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 2, 113, 1, 4, 2))
dataIsdnGroupBD01A = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 2, 113, 1, 4, 2, 2))
dataIsdnCapabilities = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 2, 113, 3))
dataIsdnCapabilitiesBD = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 2, 113, 3, 4))
dataIsdnCapabilitiesBD01 = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 2, 113, 3, 4, 2))
dataIsdnCapabilitiesBD01A = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 2, 113, 3, 4, 2, 2))
mibBuilder.exportSymbols("Nortel-Magellan-Passport-DataIsdnMIB", dataSigChanIfAdminStatus=dataSigChanIfAdminStatus, dataSigChanRowStatus=dataSigChanRowStatus, dataSigChanIndex=dataSigChanIndex, dataSigChanCcCgRowStatus=dataSigChanCcCgRowStatus, dataSigChanCcCgProvEntry=dataSigChanCcCgProvEntry, dataSigChanCcBchCallingPartyNumber=dataSigChanCcBchCallingPartyNumber, dataSigChanCcBchState=dataSigChanCcBchState, dataSigChanCommentText=dataSigChanCommentText, dataSigChanCcTrPriStorageType=dataSigChanCcTrPriStorageType, dataSigChanCcInInvalidCapability=dataSigChanCcInInvalidCapability, dataSigChanCcComponentName=dataSigChanCcComponentName, dataSigChanCcCgBchLastQ931ClearCause=dataSigChanCcCgBchLastQ931ClearCause, dataSigChanCcSuccessfullInCalls=dataSigChanCcSuccessfullInCalls, dataSigChanCcCgCidDataEntry=dataSigChanCcCgCidDataEntry, dataSigChanIfIndex=dataSigChanIfIndex, dataIsdnGroupBD01=dataIsdnGroupBD01, dataSigChanCcCgBchBchanOpDataTable=dataSigChanCcCgBchBchanOpDataTable, dataSigChanCcCgChannelList=dataSigChanCcCgChannelList, dataSigChanRowStatusEntry=dataSigChanRowStatusEntry, dataSigChanCcCgBchIndex=dataSigChanCcCgBchIndex, dataSigChanCcCgRowStatusTable=dataSigChanCcCgRowStatusTable, dataSigChanCcCgBch=dataSigChanCcCgBch, dataSigChanCcCgCustomerIdentifier=dataSigChanCcCgCustomerIdentifier, dataSigChanCcCgRowStatusEntry=dataSigChanCcCgRowStatusEntry, dataSigChanCcCgProvTable=dataSigChanCcCgProvTable, dataSigChanCcCgStorageType=dataSigChanCcCgStorageType, dataSigChanCcTrIndex=dataSigChanCcTrIndex, dataSigChanCcRowStatusTable=dataSigChanCcRowStatusTable, dataIsdnMIB=dataIsdnMIB, dataSigChanCcCgCgpnRowStatus=dataSigChanCcCgCgpnRowStatus, dataSigChanCcCgCgpn=dataSigChanCcCgCgpn, dataSigChanCcCgScreeningIndicator=dataSigChanCcCgScreeningIndicator, dataSigChanProvTable=dataSigChanProvTable, dataSigChanCcTrComponentName=dataSigChanCcTrComponentName, dataIsdnGroupBD01A=dataIsdnGroupBD01A, dataSigChanOperationalState=dataSigChanOperationalState, dataSigChanCcTrPriBchRowStatusEntry=dataSigChanCcTrPriBchRowStatusEntry, dataSigChanOperStatusEntry=dataSigChanOperStatusEntry, dataSigChanCcCgChannelAssignmentOrder=dataSigChanCcCgChannelAssignmentOrder, dataSigChanCcBchRowStatus=dataSigChanCcBchRowStatus, dataSigChanCcRowStatusEntry=dataSigChanCcRowStatusEntry, dataSigChanCcTrPriRowStatusTable=dataSigChanCcTrPriRowStatusTable, dataSigChanComponentName=dataSigChanComponentName, dataSigChanCcTrRowStatusTable=dataSigChanCcTrRowStatusTable, dataSigChanCcTrPriRowStatusEntry=dataSigChanCcTrPriRowStatusEntry, dataSigChanCcTrPriBchRowStatus=dataSigChanCcTrPriBchRowStatus, dataSigChanCcCgBchCallingPartyNumber=dataSigChanCcCgBchCallingPartyNumber, dataSigChanCcCgBchBchanOpDataEntry=dataSigChanCcCgBchBchanOpDataEntry, dataSigChanCcCgBchRunningApplication=dataSigChanCcCgBchRunningApplication, dataSigChanProvEntry=dataSigChanProvEntry, dataSigChanCcBchRunningApplication=dataSigChanCcBchRunningApplication, dataSigChanSnmpOperStatus=dataSigChanSnmpOperStatus, dataSigChanCcStorageType=dataSigChanCcStorageType, dataSigChanCcStatsTable=dataSigChanCcStatsTable, dataSigChanCcTrPriBchRowStatusTable=dataSigChanCcTrPriBchRowStatusTable, dataSigChanCcTrPriBchStorageType=dataSigChanCcTrPriBchStorageType, dataIsdnCapabilities=dataIsdnCapabilities, dataSigChanCcTrRowStatus=dataSigChanCcTrRowStatus, dataSigChanIfEntryEntry=dataSigChanIfEntryEntry, dataSigChanCcCgCidDataTable=dataSigChanCcCgCidDataTable, dataSigChanCcBchLastQ931ClearCause=dataSigChanCcBchLastQ931ClearCause, dataSigChanCcBchBchanOpDataEntry=dataSigChanCcBchBchanOpDataEntry, dataSigChanStateEntry=dataSigChanStateEntry, dataSigChanCcCgSuccessfullInCalls=dataSigChanCcCgSuccessfullInCalls, dataSigChanCcTr=dataSigChanCcTr, dataSigChanUsageState=dataSigChanUsageState, dataSigChanCcTrPriBch=dataSigChanCcTrPriBch, dataSigChanCcCgIndex=dataSigChanCcCgIndex, dataSigChanCcInChannelBusy=dataSigChanCcInChannelBusy, dataSigChanCcCgBchRowStatusEntry=dataSigChanCcCgBchRowStatusEntry, dataSigChanCcCgBchState=dataSigChanCcCgBchState, dataSigChanCcTrPriComponentName=dataSigChanCcTrPriComponentName, dataSigChanCcStatsEntry=dataSigChanCcStatsEntry, dataSigChanCcCgCommentText=dataSigChanCcCgCommentText, dataSigChanStorageType=dataSigChanStorageType, dataSigChan=dataSigChan, dataSigChanCcBchRowStatusTable=dataSigChanCcBchRowStatusTable, dataSigChanCcCgRejectedNoChanAvail=dataSigChanCcCgRejectedNoChanAvail, dataSigChanCcBchBchanOpDataTable=dataSigChanCcBchBchanOpDataTable, dataSigChanCcTrPriIndex=dataSigChanCcTrPriIndex, dataSigChanCcCgCgpnRowStatusEntry=dataSigChanCcCgCgpnRowStatusEntry, dataSigChanCcCgBchComponentName=dataSigChanCcCgBchComponentName, dataSigChanStateTable=dataSigChanStateTable, dataIsdnGroupBD=dataIsdnGroupBD, dataSigChanCcBchIndex=dataSigChanCcBchIndex, dataSigChanCcCgStatsTable=dataSigChanCcCgStatsTable, dataSigChanCcLastClearCause=dataSigChanCcLastClearCause, dataSigChanCcInInvalidScreen=dataSigChanCcInInvalidScreen, dataSigChanRowStatusTable=dataSigChanRowStatusTable, dataSigChanCcRowStatus=dataSigChanCcRowStatus, dataSigChanCustomerIdentifier=dataSigChanCustomerIdentifier, dataSigChanCcLastClearedCallingPartyNumber=dataSigChanCcLastClearedCallingPartyNumber, dataSigChanCcCgCgpnIndex=dataSigChanCcCgCgpnIndex, dataSigChanCcCgBchRowStatus=dataSigChanCcCgBchRowStatus, dataSigChanCcCgBchRowStatusTable=dataSigChanCcCgBchRowStatusTable, dataIsdnGroup=dataIsdnGroup, dataSigChanCcCgBusyChannelCount=dataSigChanCcCgBusyChannelCount, dataSigChanCcTrPriBchIndex=dataSigChanCcTrPriBchIndex, dataSigChanCcInInvalidCgpn=dataSigChanCcInInvalidCgpn, dataSigChanCcCgIdleChannelCount=dataSigChanCcCgIdleChannelCount, dataSigChanIfEntryTable=dataSigChanIfEntryTable, dataSigChanCcTrPri=dataSigChanCcTrPri, dataSigChanCcIndex=dataSigChanCcIndex, dataSigChanCcBchStorageType=dataSigChanCcBchStorageType, dataSigChanCidDataEntry=dataSigChanCidDataEntry, dataSigChanOperStatusTable=dataSigChanOperStatusTable, dataSigChanCcCgStatsEntry=dataSigChanCcCgStatsEntry, dataSigChanCcCgComponentName=dataSigChanCcCgComponentName, dataSigChanCcCgCgpnComponentName=dataSigChanCcCgCgpnComponentName, dataIsdnCapabilitiesBD01A=dataIsdnCapabilitiesBD01A, dataSigChanCc=dataSigChanCc, dataIsdnCapabilitiesBD01=dataIsdnCapabilitiesBD01, dataSigChanCcTrRowStatusEntry=dataSigChanCcTrRowStatusEntry, dataSigChanCcCgCgpnStorageType=dataSigChanCcCgCgpnStorageType, dataSigChanCcTrPriRowStatus=dataSigChanCcTrPriRowStatus, dataSigChanCcTrPriBchComponentName=dataSigChanCcTrPriBchComponentName, dataSigChanCcBch=dataSigChanCcBch, dataSigChanCcBchRowStatusEntry=dataSigChanCcBchRowStatusEntry, dataSigChanCcTotalValidInCalls=dataSigChanCcTotalValidInCalls, dataSigChanCcCgBchStorageType=dataSigChanCcCgBchStorageType, dataSigChanCcCgCgpnRowStatusTable=dataSigChanCcCgCgpnRowStatusTable, dataIsdnCapabilitiesBD=dataIsdnCapabilitiesBD, dataSigChanCcCg=dataSigChanCcCg, dataSigChanCcTrStorageType=dataSigChanCcTrStorageType, dataSigChanCidDataTable=dataSigChanCidDataTable, dataSigChanAdminState=dataSigChanAdminState, dataSigChanCcBchComponentName=dataSigChanCcBchComponentName, dataSigChanCcCgTotalInCalls=dataSigChanCcCgTotalInCalls)
| (octet_string, integer, object_identifier) = mibBuilder.importSymbols('ASN1', 'OctetString', 'Integer', 'ObjectIdentifier')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_size_constraint, value_range_constraint, single_value_constraint, constraints_intersection, constraints_union) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueSizeConstraint', 'ValueRangeConstraint', 'SingleValueConstraint', 'ConstraintsIntersection', 'ConstraintsUnion')
(display_string, integer32, storage_type, interface_index, unsigned32, row_status) = mibBuilder.importSymbols('Nortel-Magellan-Passport-StandardTextualConventionsMIB', 'DisplayString', 'Integer32', 'StorageType', 'InterfaceIndex', 'Unsigned32', 'RowStatus')
(ascii_string, non_replicated, digit_string) = mibBuilder.importSymbols('Nortel-Magellan-Passport-TextualConventionsMIB', 'AsciiString', 'NonReplicated', 'DigitString')
(passport_mi_bs, components) = mibBuilder.importSymbols('Nortel-Magellan-Passport-UsefulDefinitionsMIB', 'passportMIBs', 'components')
(module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup')
(mib_scalar, mib_table, mib_table_row, mib_table_column, object_identity, counter64, notification_type, mib_identifier, integer32, module_identity, unsigned32, counter32, gauge32, time_ticks, iso, ip_address, bits) = mibBuilder.importSymbols('SNMPv2-SMI', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'ObjectIdentity', 'Counter64', 'NotificationType', 'MibIdentifier', 'Integer32', 'ModuleIdentity', 'Unsigned32', 'Counter32', 'Gauge32', 'TimeTicks', 'iso', 'IpAddress', 'Bits')
(textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString')
data_isdn_mib = mib_identifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 2, 113))
data_sig_chan = mib_identifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120))
data_sig_chan_row_status_table = mib_table((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 1))
if mibBuilder.loadTexts:
dataSigChanRowStatusTable.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanRowStatusTable.setDescription('This entry controls the addition and deletion of dataSigChan components.')
data_sig_chan_row_status_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 1, 1)).setIndexNames((0, 'Nortel-Magellan-Passport-DataIsdnMIB', 'dataSigChanIndex'))
if mibBuilder.loadTexts:
dataSigChanRowStatusEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanRowStatusEntry.setDescription('A single entry in the table represents a single dataSigChan component.')
data_sig_chan_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 1, 1, 1), row_status()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
dataSigChanRowStatus.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanRowStatus.setDescription('This variable is used as the basis for SNMP naming of dataSigChan components. These components can be added and deleted.')
data_sig_chan_component_name = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 1, 1, 2), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dataSigChanComponentName.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanComponentName.setDescription("This variable provides the component's string name for use with the ASCII Console Interface")
data_sig_chan_storage_type = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 1, 1, 4), storage_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dataSigChanStorageType.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanStorageType.setDescription('This variable represents the storage type value for the dataSigChan tables.')
data_sig_chan_index = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 1, 1, 10), integer32().subtype(subtypeSpec=value_range_constraint(1, 255)))
if mibBuilder.loadTexts:
dataSigChanIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanIndex.setDescription('This variable represents the index for the dataSigChan tables.')
data_sig_chan_prov_table = mib_table((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 100))
if mibBuilder.loadTexts:
dataSigChanProvTable.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanProvTable.setDescription('This group represents the provisionable attributes of a DataSigChan.')
data_sig_chan_prov_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 100, 1)).setIndexNames((0, 'Nortel-Magellan-Passport-DataIsdnMIB', 'dataSigChanIndex'))
if mibBuilder.loadTexts:
dataSigChanProvEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanProvEntry.setDescription('An entry in the dataSigChanProvTable.')
data_sig_chan_comment_text = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 100, 1, 1), ascii_string().subtype(subtypeSpec=value_size_constraint(0, 40))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
dataSigChanCommentText.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCommentText.setDescription('This attribute specifies the name of the customer that is using this DataSigChan. Typical use of this attribute is to store customer name.')
data_sig_chan_cid_data_table = mib_table((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 101))
if mibBuilder.loadTexts:
dataSigChanCidDataTable.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCidDataTable.setDescription("This group contains the attribute for a component's Customer Identifier (CID). Refer to the attribute description for a detailed explanation of CIDs.")
data_sig_chan_cid_data_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 101, 1)).setIndexNames((0, 'Nortel-Magellan-Passport-DataIsdnMIB', 'dataSigChanIndex'))
if mibBuilder.loadTexts:
dataSigChanCidDataEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCidDataEntry.setDescription('An entry in the dataSigChanCidDataTable.')
data_sig_chan_customer_identifier = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 101, 1, 1), unsigned32().subtype(subtypeSpec=constraints_union(value_range_constraint(0, 0), value_range_constraint(1, 8191)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
dataSigChanCustomerIdentifier.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCustomerIdentifier.setDescription("This attribute holds the Customer Identifier (CID). Every component has a CID. If a component has a cid attribute, the component's CID is the provisioned value of that attribute; otherwise the component inherits the CID of its parent. The top- level component has a CID of 0. Every operator session also has a CID, which is the CID provisioned for the operator's user ID. An operator will see only the stream data for components having a matching CID. Also, the operator will be allowed to issue commands for only those components which have a matching CID. An operator CID of 0 is used to identify the Network Manager (referred to as 'NetMan' in DPN). This CID matches the CID of any component. Values 1 to 8191 inclusive (equivalent to 'basic CIDs' in DPN) may be assigned to specific customers.")
data_sig_chan_if_entry_table = mib_table((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 102))
if mibBuilder.loadTexts:
dataSigChanIfEntryTable.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanIfEntryTable.setDescription('This group contains the provisionable attributes for the ifEntry.')
data_sig_chan_if_entry_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 102, 1)).setIndexNames((0, 'Nortel-Magellan-Passport-DataIsdnMIB', 'dataSigChanIndex'))
if mibBuilder.loadTexts:
dataSigChanIfEntryEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanIfEntryEntry.setDescription('An entry in the dataSigChanIfEntryTable.')
data_sig_chan_if_admin_status = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 102, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('up', 1), ('down', 2), ('testing', 3))).clone('up')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
dataSigChanIfAdminStatus.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanIfAdminStatus.setDescription('The desired state of the interface. The up state indicates the interface is operational. The down state indicates the interface is not operational. The testing state indicates that no operational packets can be passed.')
data_sig_chan_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 102, 1, 2), interface_index().subtype(subtypeSpec=value_range_constraint(1, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dataSigChanIfIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanIfIndex.setDescription('This is the index for the IfEntry. Its value is automatically initialized during the provisioning process.')
data_sig_chan_state_table = mib_table((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 103))
if mibBuilder.loadTexts:
dataSigChanStateTable.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanStateTable.setDescription('This group contains the three OSI State attributes. The descriptions generically indicate what each state attribute implies about the component. Note that not all the values and state combinations described here are supported by every component which uses this group. For component-specific information and the valid state combinations, refer to NTP 241-7001-150, Passport Operations and Maintenance Guide.')
data_sig_chan_state_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 103, 1)).setIndexNames((0, 'Nortel-Magellan-Passport-DataIsdnMIB', 'dataSigChanIndex'))
if mibBuilder.loadTexts:
dataSigChanStateEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanStateEntry.setDescription('An entry in the dataSigChanStateTable.')
data_sig_chan_admin_state = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 103, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('locked', 0), ('unlocked', 1), ('shuttingDown', 2))).clone('unlocked')).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dataSigChanAdminState.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanAdminState.setDescription('This attribute indicates the OSI Administrative State of the component. The value locked indicates that the component is administratively prohibited from providing services for its users. A Lock or Lock - force command has been previously issued for this component. When the value is locked, the value of usageState must be idle. The value shuttingDown indicates that the component is administratively permitted to provide service to its existing users only. A Lock command was issued against the component and it is in the process of shutting down. The value unlocked indicates that the component is administratively permitted to provide services for its users. To enter this state, issue an Unlock command to this component.')
data_sig_chan_operational_state = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 103, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('disabled', 0), ('enabled', 1))).clone('disabled')).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dataSigChanOperationalState.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanOperationalState.setDescription('This attribute indicates the OSI Operational State of the component. The value enabled indicates that the component is available for operation. Note that if adminState is locked, it would still not be providing service. The value disabled indicates that the component is not available for operation. For example, something is wrong with the component itself, or with another component on which this one depends. If the value is disabled, the usageState must be idle.')
data_sig_chan_usage_state = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 103, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('idle', 0), ('active', 1), ('busy', 2))).clone('idle')).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dataSigChanUsageState.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanUsageState.setDescription('This attribute indicates the OSI Usage State of the component. The value idle indicates that the component is not currently in use. The value active indicates that the component is in use and has spare capacity to provide for additional users. The value busy indicates that the component is in use and has no spare operating capacity for additional users at this time.')
data_sig_chan_oper_status_table = mib_table((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 104))
if mibBuilder.loadTexts:
dataSigChanOperStatusTable.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanOperStatusTable.setDescription('This group includes the Operational Status attribute. This attribute defines the current operational state of this component.')
data_sig_chan_oper_status_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 104, 1)).setIndexNames((0, 'Nortel-Magellan-Passport-DataIsdnMIB', 'dataSigChanIndex'))
if mibBuilder.loadTexts:
dataSigChanOperStatusEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanOperStatusEntry.setDescription('An entry in the dataSigChanOperStatusTable.')
data_sig_chan_snmp_oper_status = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 104, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('up', 1), ('down', 2), ('testing', 3))).clone('up')).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dataSigChanSnmpOperStatus.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanSnmpOperStatus.setDescription('The current state of the interface. The up state indicates the interface is operational and capable of forwarding packets. The down state indicates the interface is not operational, thus unable to forward packets. testing state indicates that no operational packets can be passed.')
data_sig_chan_cc = mib_identifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2))
data_sig_chan_cc_row_status_table = mib_table((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 1))
if mibBuilder.loadTexts:
dataSigChanCcRowStatusTable.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcRowStatusTable.setDescription('This entry controls the addition and deletion of dataSigChanCc components.')
data_sig_chan_cc_row_status_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 1, 1)).setIndexNames((0, 'Nortel-Magellan-Passport-DataIsdnMIB', 'dataSigChanIndex'), (0, 'Nortel-Magellan-Passport-DataIsdnMIB', 'dataSigChanCcIndex'))
if mibBuilder.loadTexts:
dataSigChanCcRowStatusEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcRowStatusEntry.setDescription('A single entry in the table represents a single dataSigChanCc component.')
data_sig_chan_cc_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 1, 1, 1), row_status()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dataSigChanCcRowStatus.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcRowStatus.setDescription('This variable is used as the basis for SNMP naming of dataSigChanCc components. These components cannot be added nor deleted.')
data_sig_chan_cc_component_name = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 1, 1, 2), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dataSigChanCcComponentName.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcComponentName.setDescription("This variable provides the component's string name for use with the ASCII Console Interface")
data_sig_chan_cc_storage_type = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 1, 1, 4), storage_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dataSigChanCcStorageType.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcStorageType.setDescription('This variable represents the storage type value for the dataSigChanCc tables.')
data_sig_chan_cc_index = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 1, 1, 10), non_replicated())
if mibBuilder.loadTexts:
dataSigChanCcIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcIndex.setDescription('This variable represents the index for the dataSigChanCc tables.')
data_sig_chan_cc_stats_table = mib_table((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 10))
if mibBuilder.loadTexts:
dataSigChanCcStatsTable.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcStatsTable.setDescription('This group contains the statistics of the CallControl')
data_sig_chan_cc_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 10, 1)).setIndexNames((0, 'Nortel-Magellan-Passport-DataIsdnMIB', 'dataSigChanIndex'), (0, 'Nortel-Magellan-Passport-DataIsdnMIB', 'dataSigChanCcIndex'))
if mibBuilder.loadTexts:
dataSigChanCcStatsEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcStatsEntry.setDescription('An entry in the dataSigChanCcStatsTable.')
data_sig_chan_cc_total_valid_in_calls = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 10, 1, 1), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 4294967295))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dataSigChanCcTotalValidInCalls.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcTotalValidInCalls.setDescription('This attribute counts the total number of incoming calls (with valid mandatory IE contents and received in a valid ISDN state) from the interface. This counter wraps to zero after reaching its maximum value.')
data_sig_chan_cc_successfull_in_calls = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 10, 1, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 4294967295))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dataSigChanCcSuccessfullInCalls.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcSuccessfullInCalls.setDescription('This attribute counts the total number of successfull valid incoming calls from the interface. Unsuccessful calls include those that have disallowed Capability (BC, LLC), screening indicator, or calling party number, and calls that are rejected due to requested channel busy. This counter wraps to zero after reaching its maximum value.')
data_sig_chan_cc_in_invalid_capability = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 10, 1, 3), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 4294967295))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dataSigChanCcInInvalidCapability.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcInInvalidCapability.setDescription('This attribute counts the number of valid incoming calls rejected due to an unsupported service capability, such as Information Transfer Rate, Class of Service, Protocol Standard. This counter wraps to zero after reaching its maximum value.')
data_sig_chan_cc_in_invalid_screen = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 10, 1, 4), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 4294967295))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dataSigChanCcInInvalidScreen.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcInInvalidScreen.setDescription("This attribute counts the number of valid incoming calls rejected due to a screening indicator value not provisioned in the channel group's screeningIndicator attribute. This counter wraps to zero after reaching its maximum value.")
data_sig_chan_cc_in_invalid_cgpn = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 10, 1, 5), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 4294967295))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dataSigChanCcInInvalidCgpn.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcInInvalidCgpn.setDescription('This attribute counts the number of valid incoming calls rejected due to the calling party number not beeing provisioned in any channelGroup component of this call control. This counter wraps to zero after reaching its maximum value.')
data_sig_chan_cc_in_channel_busy = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 10, 1, 6), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 4294967295))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dataSigChanCcInChannelBusy.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcInChannelBusy.setDescription('This attribute counts the number of valid incoming calls rejected due to no available B-Channels. This counter wraps to zero after reaching its maximum value.')
data_sig_chan_cc_last_clear_cause = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 10, 1, 7), integer32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dataSigChanCcLastClearCause.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcLastClearCause.setDescription('This attribute indicates the Q931 clear cause of the last valid call that is rejected or cleared.')
data_sig_chan_cc_last_cleared_calling_party_number = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 10, 1, 8), digit_string().subtype(subtypeSpec=value_size_constraint(1, 14))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dataSigChanCcLastClearedCallingPartyNumber.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcLastClearedCallingPartyNumber.setDescription('This attribute shows the calling party number of the last valid call that is rejected or cleared.')
data_sig_chan_cc_cg = mib_identifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2))
data_sig_chan_cc_cg_row_status_table = mib_table((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 1))
if mibBuilder.loadTexts:
dataSigChanCcCgRowStatusTable.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcCgRowStatusTable.setDescription('This entry controls the addition and deletion of dataSigChanCcCg components.')
data_sig_chan_cc_cg_row_status_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 1, 1)).setIndexNames((0, 'Nortel-Magellan-Passport-DataIsdnMIB', 'dataSigChanIndex'), (0, 'Nortel-Magellan-Passport-DataIsdnMIB', 'dataSigChanCcIndex'), (0, 'Nortel-Magellan-Passport-DataIsdnMIB', 'dataSigChanCcCgIndex'))
if mibBuilder.loadTexts:
dataSigChanCcCgRowStatusEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcCgRowStatusEntry.setDescription('A single entry in the table represents a single dataSigChanCcCg component.')
data_sig_chan_cc_cg_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 1, 1, 1), row_status()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
dataSigChanCcCgRowStatus.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcCgRowStatus.setDescription('This variable is used as the basis for SNMP naming of dataSigChanCcCg components. These components can be added and deleted.')
data_sig_chan_cc_cg_component_name = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 1, 1, 2), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dataSigChanCcCgComponentName.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcCgComponentName.setDescription("This variable provides the component's string name for use with the ASCII Console Interface")
data_sig_chan_cc_cg_storage_type = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 1, 1, 4), storage_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dataSigChanCcCgStorageType.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcCgStorageType.setDescription('This variable represents the storage type value for the dataSigChanCcCg tables.')
data_sig_chan_cc_cg_index = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 1, 1, 10), integer32().subtype(subtypeSpec=value_range_constraint(1, 31)))
if mibBuilder.loadTexts:
dataSigChanCcCgIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcCgIndex.setDescription('This variable represents the index for the dataSigChanCcCg tables.')
data_sig_chan_cc_cg_cid_data_table = mib_table((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 10))
if mibBuilder.loadTexts:
dataSigChanCcCgCidDataTable.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcCgCidDataTable.setDescription("This group contains the attribute for a component's Customer Identifier (CID). Refer to the attribute description for a detailed explanation of CIDs.")
data_sig_chan_cc_cg_cid_data_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 10, 1)).setIndexNames((0, 'Nortel-Magellan-Passport-DataIsdnMIB', 'dataSigChanIndex'), (0, 'Nortel-Magellan-Passport-DataIsdnMIB', 'dataSigChanCcIndex'), (0, 'Nortel-Magellan-Passport-DataIsdnMIB', 'dataSigChanCcCgIndex'))
if mibBuilder.loadTexts:
dataSigChanCcCgCidDataEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcCgCidDataEntry.setDescription('An entry in the dataSigChanCcCgCidDataTable.')
data_sig_chan_cc_cg_customer_identifier = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 10, 1, 1), unsigned32().subtype(subtypeSpec=constraints_union(value_range_constraint(0, 0), value_range_constraint(1, 8191)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
dataSigChanCcCgCustomerIdentifier.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcCgCustomerIdentifier.setDescription("This attribute holds the Customer Identifier (CID). Every component has a CID. If a component has a cid attribute, the component's CID is the provisioned value of that attribute; otherwise the component inherits the CID of its parent. The top- level component has a CID of 0. Every operator session also has a CID, which is the CID provisioned for the operator's user ID. An operator will see only the stream data for components having a matching CID. Also, the operator will be allowed to issue commands for only those components which have a matching CID. An operator CID of 0 is used to identify the Network Manager (referred to as 'NetMan' in DPN). This CID matches the CID of any component. Values 1 to 8191 inclusive (equivalent to 'basic CIDs' in DPN) may be assigned to specific customers.")
data_sig_chan_cc_cg_prov_table = mib_table((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 11))
if mibBuilder.loadTexts:
dataSigChanCcCgProvTable.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcCgProvTable.setDescription('This group defines the call admission parameters applied to the group of B-Channels.')
data_sig_chan_cc_cg_prov_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 11, 1)).setIndexNames((0, 'Nortel-Magellan-Passport-DataIsdnMIB', 'dataSigChanIndex'), (0, 'Nortel-Magellan-Passport-DataIsdnMIB', 'dataSigChanCcIndex'), (0, 'Nortel-Magellan-Passport-DataIsdnMIB', 'dataSigChanCcCgIndex'))
if mibBuilder.loadTexts:
dataSigChanCcCgProvEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcCgProvEntry.setDescription('An entry in the dataSigChanCcCgProvTable.')
data_sig_chan_cc_cg_comment_text = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 11, 1, 1), ascii_string().subtype(subtypeSpec=value_size_constraint(0, 40))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
dataSigChanCcCgCommentText.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcCgCommentText.setDescription('This attribute specifies the name of the customer that is using this ChannelGroup. Typical use of this attribute is to store customer name.')
data_sig_chan_cc_cg_screening_indicator = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 11, 1, 2), octet_string().subtype(subtypeSpec=value_size_constraint(1, 1)).setFixedLength(1).clone(hexValue='50')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
dataSigChanCcCgScreeningIndicator.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcCgScreeningIndicator.setDescription('This attribute defines the acceptable set of screening modes. The screening mode is carried by the Calling Party Number information element (IE) of the B-Channel request packet. There are four types of mode: upns - User provided, not screened upvp - User provided, verified and passed upvf - User provided, verified and failed np - Network provided When a call is received with a screening indicator not provisioned in the list, the call is cleared. Description of bits: upns(0) upvp(1) upvf(2) np(3)')
data_sig_chan_cc_cg_channel_assignment_order = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 11, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('ascending', 0), ('descending', 1))).clone('ascending')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
dataSigChanCcCgChannelAssignmentOrder.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcCgChannelAssignmentOrder.setDescription('This attribute defines the order (ascending or descending) in which the B-Channels are allocated. This attribute is used only when it is not signalled in the call setup message.')
data_sig_chan_cc_cg_channel_list = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 11, 1, 4), octet_string().subtype(subtypeSpec=value_size_constraint(4, 4)).setFixedLength(4)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
dataSigChanCcCgChannelList.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcCgChannelList.setDescription('This attribute contains the list of B-Channel numbers forming the channel group. At least one channel must be specified. Description of bits: notused0(0) n1(1) n2(2) n3(3) n4(4) n5(5) n6(6) n7(7) n8(8) n9(9) n10(10) n11(11) n12(12) n13(13) n14(14) n15(15) n16(16) n17(17) n18(18) n19(19) n20(20) n21(21) n22(22) n23(23) n24(24) n25(25) n26(26) n27(27) n28(28) n29(29) n30(30) n31(31)')
data_sig_chan_cc_cg_stats_table = mib_table((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 12))
if mibBuilder.loadTexts:
dataSigChanCcCgStatsTable.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcCgStatsTable.setDescription('This group contains the statistics for a ChannelGroup')
data_sig_chan_cc_cg_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 12, 1)).setIndexNames((0, 'Nortel-Magellan-Passport-DataIsdnMIB', 'dataSigChanIndex'), (0, 'Nortel-Magellan-Passport-DataIsdnMIB', 'dataSigChanCcIndex'), (0, 'Nortel-Magellan-Passport-DataIsdnMIB', 'dataSigChanCcCgIndex'))
if mibBuilder.loadTexts:
dataSigChanCcCgStatsEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcCgStatsEntry.setDescription('An entry in the dataSigChanCcCgStatsTable.')
data_sig_chan_cc_cg_total_in_calls = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 12, 1, 1), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 4294967295))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dataSigChanCcCgTotalInCalls.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcCgTotalInCalls.setDescription('This attribute counts the total number of incoming calls (with valid mandatory IE contents and received in a valid ISDN state) from the interface for this channelGroup. This counter wraps to zero after reaching its maximum value.')
data_sig_chan_cc_cg_successfull_in_calls = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 12, 1, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 4294967295))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dataSigChanCcCgSuccessfullInCalls.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcCgSuccessfullInCalls.setDescription('This attribute counts the number of valid incoming calls for this channelGroup. This counter wraps to zero after reaching its maximum value. DESCRIPTION')
data_sig_chan_cc_cg_rejected_no_chan_avail = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 12, 1, 3), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 4294967295))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dataSigChanCcCgRejectedNoChanAvail.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcCgRejectedNoChanAvail.setDescription('This attribute counts the number of rejected call because no channel were available under the selected channel group. This counter wraps to zero after reaching its maximum value. DESCRIPTION')
data_sig_chan_cc_cg_idle_channel_count = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 12, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dataSigChanCcCgIdleChannelCount.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcCgIdleChannelCount.setDescription('This attribute shows the number of B-channels in the channel group that are in idle state.')
data_sig_chan_cc_cg_busy_channel_count = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 12, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dataSigChanCcCgBusyChannelCount.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcCgBusyChannelCount.setDescription('This attribute shows the number of B-Channels in this channel group that are in busy state.')
data_sig_chan_cc_cg_cgpn = mib_identifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 2))
data_sig_chan_cc_cg_cgpn_row_status_table = mib_table((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 2, 1))
if mibBuilder.loadTexts:
dataSigChanCcCgCgpnRowStatusTable.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcCgCgpnRowStatusTable.setDescription('This entry controls the addition and deletion of dataSigChanCcCgCgpn components.')
data_sig_chan_cc_cg_cgpn_row_status_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 2, 1, 1)).setIndexNames((0, 'Nortel-Magellan-Passport-DataIsdnMIB', 'dataSigChanIndex'), (0, 'Nortel-Magellan-Passport-DataIsdnMIB', 'dataSigChanCcIndex'), (0, 'Nortel-Magellan-Passport-DataIsdnMIB', 'dataSigChanCcCgIndex'), (0, 'Nortel-Magellan-Passport-DataIsdnMIB', 'dataSigChanCcCgCgpnIndex'))
if mibBuilder.loadTexts:
dataSigChanCcCgCgpnRowStatusEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcCgCgpnRowStatusEntry.setDescription('A single entry in the table represents a single dataSigChanCcCgCgpn component.')
data_sig_chan_cc_cg_cgpn_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 2, 1, 1, 1), row_status()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
dataSigChanCcCgCgpnRowStatus.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcCgCgpnRowStatus.setDescription('This variable is used as the basis for SNMP naming of dataSigChanCcCgCgpn components. These components can be added and deleted.')
data_sig_chan_cc_cg_cgpn_component_name = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 2, 1, 1, 2), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dataSigChanCcCgCgpnComponentName.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcCgCgpnComponentName.setDescription("This variable provides the component's string name for use with the ASCII Console Interface")
data_sig_chan_cc_cg_cgpn_storage_type = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 2, 1, 1, 4), storage_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dataSigChanCcCgCgpnStorageType.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcCgCgpnStorageType.setDescription('This variable represents the storage type value for the dataSigChanCcCgCgpn tables.')
data_sig_chan_cc_cg_cgpn_index = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 2, 1, 1, 10), digit_string().subtype(subtypeSpec=value_size_constraint(1, 14)))
if mibBuilder.loadTexts:
dataSigChanCcCgCgpnIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcCgCgpnIndex.setDescription('This variable represents the index for the dataSigChanCcCgCgpn tables.')
data_sig_chan_cc_cg_bch = mib_identifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 3))
data_sig_chan_cc_cg_bch_row_status_table = mib_table((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 3, 1))
if mibBuilder.loadTexts:
dataSigChanCcCgBchRowStatusTable.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcCgBchRowStatusTable.setDescription('*** THIS TABLE CURRENTLY NOT IMPLEMENTED *** This entry controls the addition and deletion of dataSigChanCcCgBch components.')
data_sig_chan_cc_cg_bch_row_status_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 3, 1, 1)).setIndexNames((0, 'Nortel-Magellan-Passport-DataIsdnMIB', 'dataSigChanIndex'), (0, 'Nortel-Magellan-Passport-DataIsdnMIB', 'dataSigChanCcIndex'), (0, 'Nortel-Magellan-Passport-DataIsdnMIB', 'dataSigChanCcCgIndex'), (0, 'Nortel-Magellan-Passport-DataIsdnMIB', 'dataSigChanCcCgBchIndex'))
if mibBuilder.loadTexts:
dataSigChanCcCgBchRowStatusEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcCgBchRowStatusEntry.setDescription('A single entry in the table represents a single dataSigChanCcCgBch component.')
data_sig_chan_cc_cg_bch_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 3, 1, 1, 1), row_status()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dataSigChanCcCgBchRowStatus.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcCgBchRowStatus.setDescription('This variable is used as the basis for SNMP naming of dataSigChanCcCgBch components. These components cannot be added nor deleted.')
data_sig_chan_cc_cg_bch_component_name = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 3, 1, 1, 2), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dataSigChanCcCgBchComponentName.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcCgBchComponentName.setDescription("This variable provides the component's string name for use with the ASCII Console Interface")
data_sig_chan_cc_cg_bch_storage_type = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 3, 1, 1, 4), storage_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dataSigChanCcCgBchStorageType.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcCgBchStorageType.setDescription('This variable represents the storage type value for the dataSigChanCcCgBch tables.')
data_sig_chan_cc_cg_bch_index = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 3, 1, 1, 10), integer32().subtype(subtypeSpec=value_range_constraint(1, 31)))
if mibBuilder.loadTexts:
dataSigChanCcCgBchIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcCgBchIndex.setDescription('This variable represents the index for the dataSigChanCcCgBch tables.')
data_sig_chan_cc_cg_bch_bchan_op_data_table = mib_table((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 3, 2))
if mibBuilder.loadTexts:
dataSigChanCcCgBchBchanOpDataTable.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcCgBchBchanOpDataTable.setDescription('*** THIS TABLE CURRENTLY NOT IMPLEMENTED *** This group contains the operational data of a B-Channel.')
data_sig_chan_cc_cg_bch_bchan_op_data_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 3, 2, 1)).setIndexNames((0, 'Nortel-Magellan-Passport-DataIsdnMIB', 'dataSigChanIndex'), (0, 'Nortel-Magellan-Passport-DataIsdnMIB', 'dataSigChanCcIndex'), (0, 'Nortel-Magellan-Passport-DataIsdnMIB', 'dataSigChanCcCgIndex'), (0, 'Nortel-Magellan-Passport-DataIsdnMIB', 'dataSigChanCcCgBchIndex'))
if mibBuilder.loadTexts:
dataSigChanCcCgBchBchanOpDataEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcCgBchBchanOpDataEntry.setDescription('An entry in the dataSigChanCcCgBchBchanOpDataTable.')
data_sig_chan_cc_cg_bch_state = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 3, 2, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3))).clone(namedValues=named_values(('idle', 0), ('busy', 1), ('disabled', 2), ('noProtocolProvisioned', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dataSigChanCcCgBchState.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcCgBchState.setDescription('This attribute indicates the state of the B-channel. A B-channel is in idle state when it is available for a call. The busy state indicate that the B-channel is presently in use. The disabled state means that the access service is not enabled because it is locked or the port is down. The state noProtocolProvisioned means that the call control did not yet received the registration for this B-channel.')
data_sig_chan_cc_cg_bch_calling_party_number = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 3, 2, 1, 2), digit_string().subtype(subtypeSpec=value_size_constraint(1, 14))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dataSigChanCcCgBchCallingPartyNumber.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcCgBchCallingPartyNumber.setDescription('This attribute indicates the calling party number of the last valid call request for this channel.')
data_sig_chan_cc_cg_bch_last_q931_clear_cause = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 3, 2, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dataSigChanCcCgBchLastQ931ClearCause.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcCgBchLastQ931ClearCause.setDescription('The clear cause of the last call on this B-channel.')
data_sig_chan_cc_cg_bch_running_application = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 2, 3, 2, 1, 4), ascii_string().subtype(subtypeSpec=value_size_constraint(0, 20)).clone(hexValue='')).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dataSigChanCcCgBchRunningApplication.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcCgBchRunningApplication.setDescription('The name of the application running on this B-channel.')
data_sig_chan_cc_tr = mib_identifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 3))
data_sig_chan_cc_tr_row_status_table = mib_table((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 3, 1))
if mibBuilder.loadTexts:
dataSigChanCcTrRowStatusTable.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcTrRowStatusTable.setDescription('This entry controls the addition and deletion of dataSigChanCcTr components.')
data_sig_chan_cc_tr_row_status_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 3, 1, 1)).setIndexNames((0, 'Nortel-Magellan-Passport-DataIsdnMIB', 'dataSigChanIndex'), (0, 'Nortel-Magellan-Passport-DataIsdnMIB', 'dataSigChanCcIndex'), (0, 'Nortel-Magellan-Passport-DataIsdnMIB', 'dataSigChanCcTrIndex'))
if mibBuilder.loadTexts:
dataSigChanCcTrRowStatusEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcTrRowStatusEntry.setDescription('A single entry in the table represents a single dataSigChanCcTr component.')
data_sig_chan_cc_tr_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 3, 1, 1, 1), row_status()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
dataSigChanCcTrRowStatus.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcTrRowStatus.setDescription('This variable is used as the basis for SNMP naming of dataSigChanCcTr components. These components can be added and deleted.')
data_sig_chan_cc_tr_component_name = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 3, 1, 1, 2), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dataSigChanCcTrComponentName.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcTrComponentName.setDescription("This variable provides the component's string name for use with the ASCII Console Interface")
data_sig_chan_cc_tr_storage_type = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 3, 1, 1, 4), storage_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dataSigChanCcTrStorageType.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcTrStorageType.setDescription('This variable represents the storage type value for the dataSigChanCcTr tables.')
data_sig_chan_cc_tr_index = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 3, 1, 1, 10), non_replicated())
if mibBuilder.loadTexts:
dataSigChanCcTrIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcTrIndex.setDescription('This variable represents the index for the dataSigChanCcTr tables.')
data_sig_chan_cc_tr_pri = mib_identifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 3, 2))
data_sig_chan_cc_tr_pri_row_status_table = mib_table((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 3, 2, 1))
if mibBuilder.loadTexts:
dataSigChanCcTrPriRowStatusTable.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcTrPriRowStatusTable.setDescription('*** THIS TABLE CURRENTLY NOT IMPLEMENTED *** This entry controls the addition and deletion of dataSigChanCcTrPri components.')
data_sig_chan_cc_tr_pri_row_status_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 3, 2, 1, 1)).setIndexNames((0, 'Nortel-Magellan-Passport-DataIsdnMIB', 'dataSigChanIndex'), (0, 'Nortel-Magellan-Passport-DataIsdnMIB', 'dataSigChanCcIndex'), (0, 'Nortel-Magellan-Passport-DataIsdnMIB', 'dataSigChanCcTrIndex'), (0, 'Nortel-Magellan-Passport-DataIsdnMIB', 'dataSigChanCcTrPriIndex'))
if mibBuilder.loadTexts:
dataSigChanCcTrPriRowStatusEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcTrPriRowStatusEntry.setDescription('A single entry in the table represents a single dataSigChanCcTrPri component.')
data_sig_chan_cc_tr_pri_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 3, 2, 1, 1, 1), row_status()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dataSigChanCcTrPriRowStatus.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcTrPriRowStatus.setDescription('This variable is used as the basis for SNMP naming of dataSigChanCcTrPri components. These components cannot be added nor deleted.')
data_sig_chan_cc_tr_pri_component_name = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 3, 2, 1, 1, 2), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dataSigChanCcTrPriComponentName.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcTrPriComponentName.setDescription("This variable provides the component's string name for use with the ASCII Console Interface")
data_sig_chan_cc_tr_pri_storage_type = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 3, 2, 1, 1, 4), storage_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dataSigChanCcTrPriStorageType.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcTrPriStorageType.setDescription('This variable represents the storage type value for the dataSigChanCcTrPri tables.')
data_sig_chan_cc_tr_pri_index = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 3, 2, 1, 1, 10), integer32().subtype(subtypeSpec=value_range_constraint(0, 3)))
if mibBuilder.loadTexts:
dataSigChanCcTrPriIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcTrPriIndex.setDescription('This variable represents the index for the dataSigChanCcTrPri tables.')
data_sig_chan_cc_tr_pri_bch = mib_identifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 3, 2, 2))
data_sig_chan_cc_tr_pri_bch_row_status_table = mib_table((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 3, 2, 2, 1))
if mibBuilder.loadTexts:
dataSigChanCcTrPriBchRowStatusTable.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcTrPriBchRowStatusTable.setDescription('*** THIS TABLE CURRENTLY NOT IMPLEMENTED *** This entry controls the addition and deletion of dataSigChanCcTrPriBch components.')
data_sig_chan_cc_tr_pri_bch_row_status_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 3, 2, 2, 1, 1)).setIndexNames((0, 'Nortel-Magellan-Passport-DataIsdnMIB', 'dataSigChanIndex'), (0, 'Nortel-Magellan-Passport-DataIsdnMIB', 'dataSigChanCcIndex'), (0, 'Nortel-Magellan-Passport-DataIsdnMIB', 'dataSigChanCcTrIndex'), (0, 'Nortel-Magellan-Passport-DataIsdnMIB', 'dataSigChanCcTrPriIndex'), (0, 'Nortel-Magellan-Passport-DataIsdnMIB', 'dataSigChanCcTrPriBchIndex'))
if mibBuilder.loadTexts:
dataSigChanCcTrPriBchRowStatusEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcTrPriBchRowStatusEntry.setDescription('A single entry in the table represents a single dataSigChanCcTrPriBch component.')
data_sig_chan_cc_tr_pri_bch_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 3, 2, 2, 1, 1, 1), row_status()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dataSigChanCcTrPriBchRowStatus.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcTrPriBchRowStatus.setDescription('This variable is used as the basis for SNMP naming of dataSigChanCcTrPriBch components. These components cannot be added nor deleted.')
data_sig_chan_cc_tr_pri_bch_component_name = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 3, 2, 2, 1, 1, 2), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dataSigChanCcTrPriBchComponentName.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcTrPriBchComponentName.setDescription("This variable provides the component's string name for use with the ASCII Console Interface")
data_sig_chan_cc_tr_pri_bch_storage_type = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 3, 2, 2, 1, 1, 4), storage_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dataSigChanCcTrPriBchStorageType.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcTrPriBchStorageType.setDescription('This variable represents the storage type value for the dataSigChanCcTrPriBch tables.')
data_sig_chan_cc_tr_pri_bch_index = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 3, 2, 2, 1, 1, 10), integer32().subtype(subtypeSpec=value_range_constraint(1, 31)))
if mibBuilder.loadTexts:
dataSigChanCcTrPriBchIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcTrPriBchIndex.setDescription('This variable represents the index for the dataSigChanCcTrPriBch tables.')
data_sig_chan_cc_bch = mib_identifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 4))
data_sig_chan_cc_bch_row_status_table = mib_table((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 4, 1))
if mibBuilder.loadTexts:
dataSigChanCcBchRowStatusTable.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcBchRowStatusTable.setDescription('*** THIS TABLE CURRENTLY NOT IMPLEMENTED *** This entry controls the addition and deletion of dataSigChanCcBch components.')
data_sig_chan_cc_bch_row_status_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 4, 1, 1)).setIndexNames((0, 'Nortel-Magellan-Passport-DataIsdnMIB', 'dataSigChanIndex'), (0, 'Nortel-Magellan-Passport-DataIsdnMIB', 'dataSigChanCcIndex'), (0, 'Nortel-Magellan-Passport-DataIsdnMIB', 'dataSigChanCcBchIndex'))
if mibBuilder.loadTexts:
dataSigChanCcBchRowStatusEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcBchRowStatusEntry.setDescription('A single entry in the table represents a single dataSigChanCcBch component.')
data_sig_chan_cc_bch_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 4, 1, 1, 1), row_status()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dataSigChanCcBchRowStatus.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcBchRowStatus.setDescription('This variable is used as the basis for SNMP naming of dataSigChanCcBch components. These components cannot be added nor deleted.')
data_sig_chan_cc_bch_component_name = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 4, 1, 1, 2), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dataSigChanCcBchComponentName.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcBchComponentName.setDescription("This variable provides the component's string name for use with the ASCII Console Interface")
data_sig_chan_cc_bch_storage_type = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 4, 1, 1, 4), storage_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dataSigChanCcBchStorageType.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcBchStorageType.setDescription('This variable represents the storage type value for the dataSigChanCcBch tables.')
data_sig_chan_cc_bch_index = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 4, 1, 1, 10), integer32().subtype(subtypeSpec=value_range_constraint(1, 31)))
if mibBuilder.loadTexts:
dataSigChanCcBchIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcBchIndex.setDescription('This variable represents the index for the dataSigChanCcBch tables.')
data_sig_chan_cc_bch_bchan_op_data_table = mib_table((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 4, 2))
if mibBuilder.loadTexts:
dataSigChanCcBchBchanOpDataTable.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcBchBchanOpDataTable.setDescription('*** THIS TABLE CURRENTLY NOT IMPLEMENTED *** This group contains the operational data of a B-Channel.')
data_sig_chan_cc_bch_bchan_op_data_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 4, 2, 1)).setIndexNames((0, 'Nortel-Magellan-Passport-DataIsdnMIB', 'dataSigChanIndex'), (0, 'Nortel-Magellan-Passport-DataIsdnMIB', 'dataSigChanCcIndex'), (0, 'Nortel-Magellan-Passport-DataIsdnMIB', 'dataSigChanCcBchIndex'))
if mibBuilder.loadTexts:
dataSigChanCcBchBchanOpDataEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcBchBchanOpDataEntry.setDescription('An entry in the dataSigChanCcBchBchanOpDataTable.')
data_sig_chan_cc_bch_state = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 4, 2, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3))).clone(namedValues=named_values(('idle', 0), ('busy', 1), ('disabled', 2), ('noProtocolProvisioned', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dataSigChanCcBchState.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcBchState.setDescription('This attribute indicates the state of the B-channel. A B-channel is in idle state when it is available for a call. The busy state indicate that the B-channel is presently in use. The disabled state means that the access service is not enabled because it is locked or the port is down. The state noProtocolProvisioned means that the call control did not yet received the registration for this B-channel.')
data_sig_chan_cc_bch_calling_party_number = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 4, 2, 1, 2), digit_string().subtype(subtypeSpec=value_size_constraint(1, 14))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dataSigChanCcBchCallingPartyNumber.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcBchCallingPartyNumber.setDescription('This attribute indicates the calling party number of the last valid call request for this channel.')
data_sig_chan_cc_bch_last_q931_clear_cause = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 4, 2, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dataSigChanCcBchLastQ931ClearCause.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcBchLastQ931ClearCause.setDescription('The clear cause of the last call on this B-channel.')
data_sig_chan_cc_bch_running_application = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 120, 2, 4, 2, 1, 4), ascii_string().subtype(subtypeSpec=value_size_constraint(0, 20)).clone(hexValue='')).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dataSigChanCcBchRunningApplication.setStatus('mandatory')
if mibBuilder.loadTexts:
dataSigChanCcBchRunningApplication.setDescription('The name of the application running on this B-channel.')
data_isdn_group = mib_identifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 2, 113, 1))
data_isdn_group_bd = mib_identifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 2, 113, 1, 4))
data_isdn_group_bd01 = mib_identifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 2, 113, 1, 4, 2))
data_isdn_group_bd01_a = mib_identifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 2, 113, 1, 4, 2, 2))
data_isdn_capabilities = mib_identifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 2, 113, 3))
data_isdn_capabilities_bd = mib_identifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 2, 113, 3, 4))
data_isdn_capabilities_bd01 = mib_identifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 2, 113, 3, 4, 2))
data_isdn_capabilities_bd01_a = mib_identifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 2, 113, 3, 4, 2, 2))
mibBuilder.exportSymbols('Nortel-Magellan-Passport-DataIsdnMIB', dataSigChanIfAdminStatus=dataSigChanIfAdminStatus, dataSigChanRowStatus=dataSigChanRowStatus, dataSigChanIndex=dataSigChanIndex, dataSigChanCcCgRowStatus=dataSigChanCcCgRowStatus, dataSigChanCcCgProvEntry=dataSigChanCcCgProvEntry, dataSigChanCcBchCallingPartyNumber=dataSigChanCcBchCallingPartyNumber, dataSigChanCcBchState=dataSigChanCcBchState, dataSigChanCommentText=dataSigChanCommentText, dataSigChanCcTrPriStorageType=dataSigChanCcTrPriStorageType, dataSigChanCcInInvalidCapability=dataSigChanCcInInvalidCapability, dataSigChanCcComponentName=dataSigChanCcComponentName, dataSigChanCcCgBchLastQ931ClearCause=dataSigChanCcCgBchLastQ931ClearCause, dataSigChanCcSuccessfullInCalls=dataSigChanCcSuccessfullInCalls, dataSigChanCcCgCidDataEntry=dataSigChanCcCgCidDataEntry, dataSigChanIfIndex=dataSigChanIfIndex, dataIsdnGroupBD01=dataIsdnGroupBD01, dataSigChanCcCgBchBchanOpDataTable=dataSigChanCcCgBchBchanOpDataTable, dataSigChanCcCgChannelList=dataSigChanCcCgChannelList, dataSigChanRowStatusEntry=dataSigChanRowStatusEntry, dataSigChanCcCgBchIndex=dataSigChanCcCgBchIndex, dataSigChanCcCgRowStatusTable=dataSigChanCcCgRowStatusTable, dataSigChanCcCgBch=dataSigChanCcCgBch, dataSigChanCcCgCustomerIdentifier=dataSigChanCcCgCustomerIdentifier, dataSigChanCcCgRowStatusEntry=dataSigChanCcCgRowStatusEntry, dataSigChanCcCgProvTable=dataSigChanCcCgProvTable, dataSigChanCcCgStorageType=dataSigChanCcCgStorageType, dataSigChanCcTrIndex=dataSigChanCcTrIndex, dataSigChanCcRowStatusTable=dataSigChanCcRowStatusTable, dataIsdnMIB=dataIsdnMIB, dataSigChanCcCgCgpnRowStatus=dataSigChanCcCgCgpnRowStatus, dataSigChanCcCgCgpn=dataSigChanCcCgCgpn, dataSigChanCcCgScreeningIndicator=dataSigChanCcCgScreeningIndicator, dataSigChanProvTable=dataSigChanProvTable, dataSigChanCcTrComponentName=dataSigChanCcTrComponentName, dataIsdnGroupBD01A=dataIsdnGroupBD01A, dataSigChanOperationalState=dataSigChanOperationalState, dataSigChanCcTrPriBchRowStatusEntry=dataSigChanCcTrPriBchRowStatusEntry, dataSigChanOperStatusEntry=dataSigChanOperStatusEntry, dataSigChanCcCgChannelAssignmentOrder=dataSigChanCcCgChannelAssignmentOrder, dataSigChanCcBchRowStatus=dataSigChanCcBchRowStatus, dataSigChanCcRowStatusEntry=dataSigChanCcRowStatusEntry, dataSigChanCcTrPriRowStatusTable=dataSigChanCcTrPriRowStatusTable, dataSigChanComponentName=dataSigChanComponentName, dataSigChanCcTrRowStatusTable=dataSigChanCcTrRowStatusTable, dataSigChanCcTrPriRowStatusEntry=dataSigChanCcTrPriRowStatusEntry, dataSigChanCcTrPriBchRowStatus=dataSigChanCcTrPriBchRowStatus, dataSigChanCcCgBchCallingPartyNumber=dataSigChanCcCgBchCallingPartyNumber, dataSigChanCcCgBchBchanOpDataEntry=dataSigChanCcCgBchBchanOpDataEntry, dataSigChanCcCgBchRunningApplication=dataSigChanCcCgBchRunningApplication, dataSigChanProvEntry=dataSigChanProvEntry, dataSigChanCcBchRunningApplication=dataSigChanCcBchRunningApplication, dataSigChanSnmpOperStatus=dataSigChanSnmpOperStatus, dataSigChanCcStorageType=dataSigChanCcStorageType, dataSigChanCcStatsTable=dataSigChanCcStatsTable, dataSigChanCcTrPriBchRowStatusTable=dataSigChanCcTrPriBchRowStatusTable, dataSigChanCcTrPriBchStorageType=dataSigChanCcTrPriBchStorageType, dataIsdnCapabilities=dataIsdnCapabilities, dataSigChanCcTrRowStatus=dataSigChanCcTrRowStatus, dataSigChanIfEntryEntry=dataSigChanIfEntryEntry, dataSigChanCcCgCidDataTable=dataSigChanCcCgCidDataTable, dataSigChanCcBchLastQ931ClearCause=dataSigChanCcBchLastQ931ClearCause, dataSigChanCcBchBchanOpDataEntry=dataSigChanCcBchBchanOpDataEntry, dataSigChanStateEntry=dataSigChanStateEntry, dataSigChanCcCgSuccessfullInCalls=dataSigChanCcCgSuccessfullInCalls, dataSigChanCcTr=dataSigChanCcTr, dataSigChanUsageState=dataSigChanUsageState, dataSigChanCcTrPriBch=dataSigChanCcTrPriBch, dataSigChanCcCgIndex=dataSigChanCcCgIndex, dataSigChanCcInChannelBusy=dataSigChanCcInChannelBusy, dataSigChanCcCgBchRowStatusEntry=dataSigChanCcCgBchRowStatusEntry, dataSigChanCcCgBchState=dataSigChanCcCgBchState, dataSigChanCcTrPriComponentName=dataSigChanCcTrPriComponentName, dataSigChanCcStatsEntry=dataSigChanCcStatsEntry, dataSigChanCcCgCommentText=dataSigChanCcCgCommentText, dataSigChanStorageType=dataSigChanStorageType, dataSigChan=dataSigChan, dataSigChanCcBchRowStatusTable=dataSigChanCcBchRowStatusTable, dataSigChanCcCgRejectedNoChanAvail=dataSigChanCcCgRejectedNoChanAvail, dataSigChanCcBchBchanOpDataTable=dataSigChanCcBchBchanOpDataTable, dataSigChanCcTrPriIndex=dataSigChanCcTrPriIndex, dataSigChanCcCgCgpnRowStatusEntry=dataSigChanCcCgCgpnRowStatusEntry, dataSigChanCcCgBchComponentName=dataSigChanCcCgBchComponentName, dataSigChanStateTable=dataSigChanStateTable, dataIsdnGroupBD=dataIsdnGroupBD, dataSigChanCcBchIndex=dataSigChanCcBchIndex, dataSigChanCcCgStatsTable=dataSigChanCcCgStatsTable, dataSigChanCcLastClearCause=dataSigChanCcLastClearCause, dataSigChanCcInInvalidScreen=dataSigChanCcInInvalidScreen, dataSigChanRowStatusTable=dataSigChanRowStatusTable, dataSigChanCcRowStatus=dataSigChanCcRowStatus, dataSigChanCustomerIdentifier=dataSigChanCustomerIdentifier, dataSigChanCcLastClearedCallingPartyNumber=dataSigChanCcLastClearedCallingPartyNumber, dataSigChanCcCgCgpnIndex=dataSigChanCcCgCgpnIndex, dataSigChanCcCgBchRowStatus=dataSigChanCcCgBchRowStatus, dataSigChanCcCgBchRowStatusTable=dataSigChanCcCgBchRowStatusTable, dataIsdnGroup=dataIsdnGroup, dataSigChanCcCgBusyChannelCount=dataSigChanCcCgBusyChannelCount, dataSigChanCcTrPriBchIndex=dataSigChanCcTrPriBchIndex, dataSigChanCcInInvalidCgpn=dataSigChanCcInInvalidCgpn, dataSigChanCcCgIdleChannelCount=dataSigChanCcCgIdleChannelCount, dataSigChanIfEntryTable=dataSigChanIfEntryTable, dataSigChanCcTrPri=dataSigChanCcTrPri, dataSigChanCcIndex=dataSigChanCcIndex, dataSigChanCcBchStorageType=dataSigChanCcBchStorageType, dataSigChanCidDataEntry=dataSigChanCidDataEntry, dataSigChanOperStatusTable=dataSigChanOperStatusTable, dataSigChanCcCgStatsEntry=dataSigChanCcCgStatsEntry, dataSigChanCcCgComponentName=dataSigChanCcCgComponentName, dataSigChanCcCgCgpnComponentName=dataSigChanCcCgCgpnComponentName, dataIsdnCapabilitiesBD01A=dataIsdnCapabilitiesBD01A, dataSigChanCc=dataSigChanCc, dataIsdnCapabilitiesBD01=dataIsdnCapabilitiesBD01, dataSigChanCcTrRowStatusEntry=dataSigChanCcTrRowStatusEntry, dataSigChanCcCgCgpnStorageType=dataSigChanCcCgCgpnStorageType, dataSigChanCcTrPriRowStatus=dataSigChanCcTrPriRowStatus, dataSigChanCcTrPriBchComponentName=dataSigChanCcTrPriBchComponentName, dataSigChanCcBch=dataSigChanCcBch, dataSigChanCcBchRowStatusEntry=dataSigChanCcBchRowStatusEntry, dataSigChanCcTotalValidInCalls=dataSigChanCcTotalValidInCalls, dataSigChanCcCgBchStorageType=dataSigChanCcCgBchStorageType, dataSigChanCcCgCgpnRowStatusTable=dataSigChanCcCgCgpnRowStatusTable, dataIsdnCapabilitiesBD=dataIsdnCapabilitiesBD, dataSigChanCcCg=dataSigChanCcCg, dataSigChanCcTrStorageType=dataSigChanCcTrStorageType, dataSigChanCidDataTable=dataSigChanCidDataTable, dataSigChanAdminState=dataSigChanAdminState, dataSigChanCcBchComponentName=dataSigChanCcBchComponentName, dataSigChanCcCgTotalInCalls=dataSigChanCcCgTotalInCalls) |
# Similar to test1, but this time B2 attempt to define base1_1. Since base1_1
# is already defined in B1 and F derives from both B1 and B2, this results
# in an error. However, when building for B2 instead of F, defining base1_1
# should be OK.
expected_results = {
"f": {
"desc": "attempt to redefine parameter in target inheritance tree",
"exception_msg": "Parameter name 'base1_1' defined in both 'target:b2' and 'target:b1'"
},
"b2": {
"desc": "it should be OK to define parameters with the same name in non-related targets",
"target.base2_1": "v_base2_1_b2",
"target.base2_2": "v_base2_2_b2",
"target.base1_1": "v_base1_1_b2"
}
}
| expected_results = {'f': {'desc': 'attempt to redefine parameter in target inheritance tree', 'exception_msg': "Parameter name 'base1_1' defined in both 'target:b2' and 'target:b1'"}, 'b2': {'desc': 'it should be OK to define parameters with the same name in non-related targets', 'target.base2_1': 'v_base2_1_b2', 'target.base2_2': 'v_base2_2_b2', 'target.base1_1': 'v_base1_1_b2'}} |
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: MNN
class STORAGE_TYPE(object):
BUFFER = 0
UNIFORM = 1
IMAGE = 2
| class Storage_Type(object):
buffer = 0
uniform = 1
image = 2 |
def drop_duplicates_in_input(untokenized_dataset):
indices_to_keep = []
id_to_idx = {}
outputs = []
for i, (id_, output) in enumerate(zip(untokenized_dataset["id"], untokenized_dataset["output"])):
if id_ in id_to_idx:
outputs[id_to_idx[id_]].append(output)
continue
indices_to_keep.append(i)
id_to_idx[id_] = len(outputs)
outputs.append([output])
untokenized_dataset = untokenized_dataset.select(indices_to_keep).flatten_indices()
untokenized_dataset = untokenized_dataset.remove_columns("output")
untokenized_dataset = untokenized_dataset.add_column("outputs", outputs)
return untokenized_dataset
| def drop_duplicates_in_input(untokenized_dataset):
indices_to_keep = []
id_to_idx = {}
outputs = []
for (i, (id_, output)) in enumerate(zip(untokenized_dataset['id'], untokenized_dataset['output'])):
if id_ in id_to_idx:
outputs[id_to_idx[id_]].append(output)
continue
indices_to_keep.append(i)
id_to_idx[id_] = len(outputs)
outputs.append([output])
untokenized_dataset = untokenized_dataset.select(indices_to_keep).flatten_indices()
untokenized_dataset = untokenized_dataset.remove_columns('output')
untokenized_dataset = untokenized_dataset.add_column('outputs', outputs)
return untokenized_dataset |
# Definition for a binary tree node.
class TreeNode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
# class Solution:
# def preorderTraversal(self, root: TreeNode) -> List[int]:
# return [root.val] + self.preorderTraversal(root.left) + self.preorderTraversal(root.right) if root else []
class Solution:
def preorderTraversal(self, root: TreeNode) -> list:
ans = []
self.helper(root, ans)
return ans
def helper(self, root: TreeNode, ans: list):
if root:
ans.append(root.val)
if root.left:
self.helper(root.left, ans)
if root.right:
self.helper(root.right, ans)
| class Treenode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution:
def preorder_traversal(self, root: TreeNode) -> list:
ans = []
self.helper(root, ans)
return ans
def helper(self, root: TreeNode, ans: list):
if root:
ans.append(root.val)
if root.left:
self.helper(root.left, ans)
if root.right:
self.helper(root.right, ans) |
# There is only data available for one day.
def run_SC(args):
raise Exception()
if __name__ == '__main__':
run_SC({})
| def run_sc(args):
raise exception()
if __name__ == '__main__':
run_sc({}) |
def min(a, b):
if a > b:
return b
elif b > a:
return a
else:
return a
print(min(2, 2))
def max(a, b):
if a >= b:
return a
elif b > a:
return b
def test1(a,b,c):
if a == b:
print("a is equal to b")
elif b == c:
print("a is not equal to b, but b is equal to c")
def test2(a,b,c):
if a == b:
print("a is equal to b")
if b == c:
print("a is not equal to b, but b is equal to c")
print(min(1,max(5,min(35,5.986))))
| def min(a, b):
if a > b:
return b
elif b > a:
return a
else:
return a
print(min(2, 2))
def max(a, b):
if a >= b:
return a
elif b > a:
return b
def test1(a, b, c):
if a == b:
print('a is equal to b')
elif b == c:
print('a is not equal to b, but b is equal to c')
def test2(a, b, c):
if a == b:
print('a is equal to b')
if b == c:
print('a is not equal to b, but b is equal to c')
print(min(1, max(5, min(35, 5.986)))) |
INSTALLED_APPS = [
'hooked',
]
SECRET_KEY = 'nFG*WM(K7C9iun%Qy9G6De9XDZB$?4?Rj8KMBY[#7cue4#.Uj8'
| installed_apps = ['hooked']
secret_key = 'nFG*WM(K7C9iun%Qy9G6De9XDZB$?4?Rj8KMBY[#7cue4#.Uj8' |
# data
TARGET_FILE = '/cl/work/shusuke-t/BioIE/data/multi_label_corpus/longest_match/'
test_data = TARGET_FILE + 'test_conllform.txt'
toy_data = TARGET_FILE + 'toy.txt'
# dict
PROTEIN = '/cl/work/shusuke-t/BioIE/2019_03_05_keywords/protein.tsv'
GENE = '/cl/work/shusuke-t/BioIE/2019_03_05_keywords/gene.tsv'
#ENZYME = '/cl/work/shusuke-t/BioIE/2019_03_05_keywords/enzyme.tsv'
#dict_list = [(PROTEIN, 'protein'), (GENE, 'gene'), (ENZYME, 'enzyme')]
#dict_list = [(PROTEIN, 'protein'), (GENE, 'gene')]
dict_list = [(PROTEIN, 'protein')]
| target_file = '/cl/work/shusuke-t/BioIE/data/multi_label_corpus/longest_match/'
test_data = TARGET_FILE + 'test_conllform.txt'
toy_data = TARGET_FILE + 'toy.txt'
protein = '/cl/work/shusuke-t/BioIE/2019_03_05_keywords/protein.tsv'
gene = '/cl/work/shusuke-t/BioIE/2019_03_05_keywords/gene.tsv'
dict_list = [(PROTEIN, 'protein')] |
# 2413 - Busca na Internet
# https://www.urionlinejudge.com.br/judge/pt/problems/view/2413
def main():
print(int(input()) * 4)
if __name__ == "__main__":
main()
| def main():
print(int(input()) * 4)
if __name__ == '__main__':
main() |
filename_top_left = "cmu_top_left.txt"
filename_top_right = "cmu_top_right.txt"
filename_bottom_left = "cmu_bottom_left.txt"
filename_bottom_right = "cmu_bottom_right.txt"
filename_output = "cmu.txt"
n_rows = 100
out = open(filename_output,"w")
def getRows(file):
rows = []
for line in file:
if(line[-1] == "\n"):
line = line[0:-1]
rows += [line]
return rows
#top
top_left = open(filename_top_left, "r")
top_left_rows = getRows(top_left)
top_right = open(filename_top_right, "r")
top_right_rows = getRows(top_right)
for i in range(0, n_rows):
row = top_left_rows[i] + top_right_rows[i] + "\n"
out.write(row)
# #bottom
bottom_left = open(filename_bottom_left, "r")
bottom_left_rows = getRows(bottom_left)
bottom_right = open(filename_bottom_right, "r")
bottom_right_rows = getRows(bottom_right)
for i in range(0, n_rows):
row = bottom_left_rows[i] + bottom_right_rows[i] + "\n"
out.write(row)
top_left.close()
top_right.close()
bottom_left.close()
bottom_right.close()
out.close() | filename_top_left = 'cmu_top_left.txt'
filename_top_right = 'cmu_top_right.txt'
filename_bottom_left = 'cmu_bottom_left.txt'
filename_bottom_right = 'cmu_bottom_right.txt'
filename_output = 'cmu.txt'
n_rows = 100
out = open(filename_output, 'w')
def get_rows(file):
rows = []
for line in file:
if line[-1] == '\n':
line = line[0:-1]
rows += [line]
return rows
top_left = open(filename_top_left, 'r')
top_left_rows = get_rows(top_left)
top_right = open(filename_top_right, 'r')
top_right_rows = get_rows(top_right)
for i in range(0, n_rows):
row = top_left_rows[i] + top_right_rows[i] + '\n'
out.write(row)
bottom_left = open(filename_bottom_left, 'r')
bottom_left_rows = get_rows(bottom_left)
bottom_right = open(filename_bottom_right, 'r')
bottom_right_rows = get_rows(bottom_right)
for i in range(0, n_rows):
row = bottom_left_rows[i] + bottom_right_rows[i] + '\n'
out.write(row)
top_left.close()
top_right.close()
bottom_left.close()
bottom_right.close()
out.close() |
#creating prompts
name = input("What is your name?")
age = int(input("How old are you?"))
true_false = bool(input("True or False: Is this statement true?"))
print("My name is " + str(name))
print("My age is " + str(age))
print ("I will be " + str(age + 1) + " this year")
print("This statement is " + str(true_false)) | name = input('What is your name?')
age = int(input('How old are you?'))
true_false = bool(input('True or False: Is this statement true?'))
print('My name is ' + str(name))
print('My age is ' + str(age))
print('I will be ' + str(age + 1) + ' this year')
print('This statement is ' + str(true_false)) |
def main():
s1 = input() # String.
s1 = dict.fromkeys(s1) # Convert it to dictionary to remove duplicates.
if len(s1) % 2 == 0:
print("CHAT WITH HER!")
else:
print("IGNORE HIM!")
if __name__ == "__main__":
main() | def main():
s1 = input()
s1 = dict.fromkeys(s1)
if len(s1) % 2 == 0:
print('CHAT WITH HER!')
else:
print('IGNORE HIM!')
if __name__ == '__main__':
main() |
class Bike(object):
def __init__(self, description, condition, sale_price, cost=0):
# Different initial values for every new instance
self.description = description
self.condition = condition
self.sale_price = sale_price
self.cost = cost
# Same initial value for every new instance
self.sold = False
def update_sale_price(self):
pass
def sell(self):
pass
def service(self):
pass
| class Bike(object):
def __init__(self, description, condition, sale_price, cost=0):
self.description = description
self.condition = condition
self.sale_price = sale_price
self.cost = cost
self.sold = False
def update_sale_price(self):
pass
def sell(self):
pass
def service(self):
pass |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.