content stringlengths 7 1.05M | fixed_cases stringlengths 1 1.28M |
|---|---|
# Pretty good, but I golfed the top one even more
n=input
s="".join(n()for _ in"_"*int(n()))
print(s.count("00")+s.count("11")+1) | n = input
s = ''.join((n() for _ in '_' * int(n())))
print(s.count('00') + s.count('11') + 1) |
def do_twice(f, v):
f(v)
f(v)
def print_twice(s):
print(s)
print(s)
# do_twice(print_twice, 'spam')
def do_four(f, v):
do_twice(f, v)
do_twice(f, v)
do_four(print, 'spam')
| def do_twice(f, v):
f(v)
f(v)
def print_twice(s):
print(s)
print(s)
def do_four(f, v):
do_twice(f, v)
do_twice(f, v)
do_four(print, 'spam') |
# https://www.youtube.com/watch?v=OSGv2VnC0go
names = ["rouge", "geralt", "blizzard", "yennefer"]
colors = ["red", "green", "blue", "yellow"]
for color in reversed(colors):
print(color)
for i, color in enumerate(colors):
print(i, "-->", color)
for name, color in zip(names, colors):
print("{:<12}{:<12}".format(name, color))
for color in sorted(zip(names, colors), key=lambda x: x[0]):
print(color)
| names = ['rouge', 'geralt', 'blizzard', 'yennefer']
colors = ['red', 'green', 'blue', 'yellow']
for color in reversed(colors):
print(color)
for (i, color) in enumerate(colors):
print(i, '-->', color)
for (name, color) in zip(names, colors):
print('{:<12}{:<12}'.format(name, color))
for color in sorted(zip(names, colors), key=lambda x: x[0]):
print(color) |
# --------------------------------------------------------------
# DO NOT EDIT BELOW OF THIS UNLESS REALLY SURE
NFDUMP_FIELDS = []
NFDUMP_FIELDS.append( { "ID": "pr", "AggrType_A": "proto", "AggrType_s": "proto", "Name": "Protocol" } )
NFDUMP_FIELDS.append( { "ID": "exp", "AggrType_A": None, "AggrType_s": "sysid", "Name": "Exporter ID" } )
NFDUMP_FIELDS.append( { "ID": "sa", "AggrType_A": "srcip", "AggrType_s": "srcip", "Name": "Source Address", "Details": "IP" } )
NFDUMP_FIELDS.append( { "ID": "da", "AggrType_A": "dstip", "AggrType_s": "dstip", "Name": "Destination Address", "Details": "IP" } )
NFDUMP_FIELDS.append( { "ID": "sp", "AggrType_A": "srcport", "AggrType_s": "srcport", "Name": "Source Port" } )
NFDUMP_FIELDS.append( { "ID": "dp", "AggrType_A": "dstport", "AggrType_s": "dstport", "Name": "Destination Port" } )
NFDUMP_FIELDS.append( { "ID": "nh", "AggrType_A": "next", "AggrType_s": "nhip", "Name": "Next-hop IP Address", "Details": "IP" } )
NFDUMP_FIELDS.append( { "ID": "nhb", "AggrType_A": "bgpnext", "AggrType_s": "nhbip", "Name": "BGP Next-hop IP Address", "Details": "IP" } )
NFDUMP_FIELDS.append( { "ID": "ra", "AggrType_A": "router", "AggrType_s": "router", "Name": "Router IP Address", "Details": "IP" } )
NFDUMP_FIELDS.append( { "ID": "sas", "AggrType_A": "srcas", "AggrType_s": "srcas", "Name": "Source AS", "Details": "AS" } )
NFDUMP_FIELDS.append( { "ID": "das", "AggrType_A": "dstas", "AggrType_s": "dstas", "Name": "Destination AS", "Details": "AS" } )
NFDUMP_FIELDS.append( { "ID": "nas", "AggrType_A": "nextas", "AggrType_s": None, "Name": "Next AS", "Details": "AS" } )
NFDUMP_FIELDS.append( { "ID": "pas", "AggrType_A": "prevas", "AggrType_s": None, "Name": "Previous AS", "Details": "AS" } )
NFDUMP_FIELDS.append( { "ID": "in", "AggrType_A": "inif", "AggrType_s": "inif", "Name": "Input Interface num" } )
NFDUMP_FIELDS.append( { "ID": "out", "AggrType_A": "outif", "AggrType_s": "outif", "Name": "Output Interface num" } )
NFDUMP_FIELDS.append( { "ID": "sn4", "AggrType_A": "srcip4/%s", "AggrType_s": None, "Name": "IPv4 source network", "Details": "IP",
"OutputField": "sa", "ArgRequired": True } )
NFDUMP_FIELDS.append( { "ID": "sn6", "AggrType_A": "srcip6/%s", "AggrType_s": None, "Name": "IPv6 source network", "Details": "IP",
"OutputField": "sa", "ArgRequired": True } )
NFDUMP_FIELDS.append( { "ID": "dn4", "AggrType_A": "dstip4/%s", "AggrType_s": None, "Name": "IPv4 destination network", "Details": "IP",
"OutputField": "da", "ArgRequired": True } )
NFDUMP_FIELDS.append( { "ID": "dn6", "AggrType_A": "dstip6/%s", "AggrType_s": None, "Name": "IPv6 destination network", "Details": "IP",
"OutputField": "da", "ArgRequired": True } )
| nfdump_fields = []
NFDUMP_FIELDS.append({'ID': 'pr', 'AggrType_A': 'proto', 'AggrType_s': 'proto', 'Name': 'Protocol'})
NFDUMP_FIELDS.append({'ID': 'exp', 'AggrType_A': None, 'AggrType_s': 'sysid', 'Name': 'Exporter ID'})
NFDUMP_FIELDS.append({'ID': 'sa', 'AggrType_A': 'srcip', 'AggrType_s': 'srcip', 'Name': 'Source Address', 'Details': 'IP'})
NFDUMP_FIELDS.append({'ID': 'da', 'AggrType_A': 'dstip', 'AggrType_s': 'dstip', 'Name': 'Destination Address', 'Details': 'IP'})
NFDUMP_FIELDS.append({'ID': 'sp', 'AggrType_A': 'srcport', 'AggrType_s': 'srcport', 'Name': 'Source Port'})
NFDUMP_FIELDS.append({'ID': 'dp', 'AggrType_A': 'dstport', 'AggrType_s': 'dstport', 'Name': 'Destination Port'})
NFDUMP_FIELDS.append({'ID': 'nh', 'AggrType_A': 'next', 'AggrType_s': 'nhip', 'Name': 'Next-hop IP Address', 'Details': 'IP'})
NFDUMP_FIELDS.append({'ID': 'nhb', 'AggrType_A': 'bgpnext', 'AggrType_s': 'nhbip', 'Name': 'BGP Next-hop IP Address', 'Details': 'IP'})
NFDUMP_FIELDS.append({'ID': 'ra', 'AggrType_A': 'router', 'AggrType_s': 'router', 'Name': 'Router IP Address', 'Details': 'IP'})
NFDUMP_FIELDS.append({'ID': 'sas', 'AggrType_A': 'srcas', 'AggrType_s': 'srcas', 'Name': 'Source AS', 'Details': 'AS'})
NFDUMP_FIELDS.append({'ID': 'das', 'AggrType_A': 'dstas', 'AggrType_s': 'dstas', 'Name': 'Destination AS', 'Details': 'AS'})
NFDUMP_FIELDS.append({'ID': 'nas', 'AggrType_A': 'nextas', 'AggrType_s': None, 'Name': 'Next AS', 'Details': 'AS'})
NFDUMP_FIELDS.append({'ID': 'pas', 'AggrType_A': 'prevas', 'AggrType_s': None, 'Name': 'Previous AS', 'Details': 'AS'})
NFDUMP_FIELDS.append({'ID': 'in', 'AggrType_A': 'inif', 'AggrType_s': 'inif', 'Name': 'Input Interface num'})
NFDUMP_FIELDS.append({'ID': 'out', 'AggrType_A': 'outif', 'AggrType_s': 'outif', 'Name': 'Output Interface num'})
NFDUMP_FIELDS.append({'ID': 'sn4', 'AggrType_A': 'srcip4/%s', 'AggrType_s': None, 'Name': 'IPv4 source network', 'Details': 'IP', 'OutputField': 'sa', 'ArgRequired': True})
NFDUMP_FIELDS.append({'ID': 'sn6', 'AggrType_A': 'srcip6/%s', 'AggrType_s': None, 'Name': 'IPv6 source network', 'Details': 'IP', 'OutputField': 'sa', 'ArgRequired': True})
NFDUMP_FIELDS.append({'ID': 'dn4', 'AggrType_A': 'dstip4/%s', 'AggrType_s': None, 'Name': 'IPv4 destination network', 'Details': 'IP', 'OutputField': 'da', 'ArgRequired': True})
NFDUMP_FIELDS.append({'ID': 'dn6', 'AggrType_A': 'dstip6/%s', 'AggrType_s': None, 'Name': 'IPv6 destination network', 'Details': 'IP', 'OutputField': 'da', 'ArgRequired': True}) |
#
# Vivante Cross Toolchain configuration
#
load("@bazel_tools//tools/build_defs/cc:action_names.bzl", "ACTION_NAMES")
load("@bazel_tools//tools/cpp:cc_toolchain_config_lib.bzl",
"tool_path",
"feature",
"with_feature_set",
"flag_group",
"flag_set")
load("//:cc_toolchain_base.bzl",
"build_cc_toolchain_config",
"all_compile_actions",
"all_cpp_compile_actions",
"all_link_actions")
tool_paths = [
tool_path(name = "ar", path = "bin/wrapper-ar",),
tool_path(name = "compat-ld", path = "bin/wrapper-ld",),
tool_path(name = "cpp", path = "bin/wrapper-cpp",),
tool_path(name = "dwp", path = "bin/wrapper-dwp",),
tool_path(name = "gcc", path = "bin/wrapper-gcc",),
tool_path(name = "gcov", path = "bin/wrapper-gcov",),
tool_path(name = "ld", path = "bin/wrapper-ld",),
tool_path(name = "nm", path = "bin/wrapper-nm",),
tool_path(name = "objcopy", path = "bin/wrapper-objcopy",),
tool_path(name = "objdump", path = "bin/wrapper-objdump",),
tool_path(name = "strip", path = "bin/wrapper-strip",),
]
def _impl(ctx):
builtin_sysroot = "external/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/aarch64-linux-gnu/libc"
compile_flags_feature = feature(
name = "compile_flags",
enabled = True,
flag_sets = [
flag_set(
actions = all_compile_actions,
flag_groups = [
flag_group(
flags = [
"-idirafter", "external/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/aarch64-linux-gnu/libc/usr/include",
"-idirafter", "external/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/lib/gcc/aarch64-linux-gnu/7.3.1/include",
"-idirafter", "external/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/lib/gcc/aarch64-linux-gnu/7.3.1/include-fixed",
"-idirafter", "external/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/lib/gcc/aarch64-linux-gnu/7.3.1/install-tools/include",
"-idirafter", "external/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/lib/gcc/aarch64-linux-gnu/7.3.1/plugin/include",
],
),
flag_group(
flags = [
"-D__arm64",
"-Wall", # All warnings are enabled.
"-Wunused-but-set-parameter", # Enable a few more warnings that aren't part of -Wall.
"-Wno-free-nonheap-object", # Disable some that are problematic, has false positives
"-fno-omit-frame-pointer", # Keep stack frames for debugging, even in opt mode.
"-no-canonical-prefixes",
"-fstack-protector",
"-fPIE",
"-fPIC",
],
),
],
),
flag_set(
actions = all_cpp_compile_actions + [ACTION_NAMES.lto_backend],
flag_groups = [
flag_group(
flags = [
"-isystem" , "external/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/aarch64-linux-gnu/include/c++/7.3.1",
"-isystem" , "external/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/aarch64-linux-gnu/include/c++/7.3.1/aarch64-linux-gnu",
]
),
],
),
flag_set(
actions = all_compile_actions,
flag_groups = [
flag_group(
flags = [
"-g",
],
),
],
with_features = [with_feature_set(features = ["dbg"])],
),
flag_set(
actions = all_compile_actions,
flag_groups = [
flag_group(
flags = [
"-g0",
"-O2",
"-DNDEBUG",
"-ffunction-sections",
"-fdata-sections",
],
),
],
with_features = [with_feature_set(features = ["opt"])],
),
flag_set(
actions = all_link_actions,
flag_groups = [
flag_group(
flags = [
"-lstdc++",
],
),
],
),
flag_set(
actions = all_link_actions,
flag_groups = [
flag_group(
flags = [
"-Wl,--gc-sections",
],
),
],
with_features = [with_feature_set(features = ["opt"])],
),
flag_set(
actions = [
ACTION_NAMES.cpp_link_executable,
],
flag_groups = [
flag_group(
flags = [
"-pie",
],
),
],
),
],
)
cxx_builtin_include_directories = [
"%package(@gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu//aarch64-linux-gnu/libc/usr/include)%",
"%package(@gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu//lib/gcc/aarch64-linux-gnu/7.3.1/include)%",
"%package(@gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu//lib/gcc/aarch64-linux-gnu/7.3.1/include-fixed)%",
"%package(@gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu//lib/gcc/aarch64-linux-gnu/7.3.1/install-tools/include)%",
"%package(@gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu//lib/gcc/aarch64-linux-gnu/7.3.1/plugin/include)%",
"%package(@gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu//aarch64-linux-gnu/include/c++/7.3.1)%",
"%package(@gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu//aarch64-linux-gnu/include/c++/7.3.1/aarch64-linux-gnu)%",
]
objcopy_embed_flags_feature = feature(
name = "objcopy_embed_flags",
enabled = True,
flag_sets = [
flag_set(
actions = ["objcopy_embed_data"],
flag_groups = [
flag_group(
flags = [
"-I",
"binary",
],
),
],
),
]
)
dbg_feature = feature(name = "dbg")
opt_feature = feature(name = "opt")
return cc_common.create_cc_toolchain_config_info(
ctx = ctx,
toolchain_identifier = ctx.attr.toolchain_name,
host_system_name = "",
target_system_name = "linux",
target_cpu = ctx.attr.target_cpu,
target_libc = ctx.attr.target_cpu,
compiler = ctx.attr.compiler,
abi_version = ctx.attr.compiler,
abi_libc_version = ctx.attr.compiler,
tool_paths = tool_paths,
features = [compile_flags_feature, objcopy_embed_flags_feature, dbg_feature, opt_feature],
cxx_builtin_include_directories = cxx_builtin_include_directories,
builtin_sysroot = builtin_sysroot,
)
# DON'T MODIFY
cc_toolchain_config = build_cc_toolchain_config(_impl)
# EOF
| load('@bazel_tools//tools/build_defs/cc:action_names.bzl', 'ACTION_NAMES')
load('@bazel_tools//tools/cpp:cc_toolchain_config_lib.bzl', 'tool_path', 'feature', 'with_feature_set', 'flag_group', 'flag_set')
load('//:cc_toolchain_base.bzl', 'build_cc_toolchain_config', 'all_compile_actions', 'all_cpp_compile_actions', 'all_link_actions')
tool_paths = [tool_path(name='ar', path='bin/wrapper-ar'), tool_path(name='compat-ld', path='bin/wrapper-ld'), tool_path(name='cpp', path='bin/wrapper-cpp'), tool_path(name='dwp', path='bin/wrapper-dwp'), tool_path(name='gcc', path='bin/wrapper-gcc'), tool_path(name='gcov', path='bin/wrapper-gcov'), tool_path(name='ld', path='bin/wrapper-ld'), tool_path(name='nm', path='bin/wrapper-nm'), tool_path(name='objcopy', path='bin/wrapper-objcopy'), tool_path(name='objdump', path='bin/wrapper-objdump'), tool_path(name='strip', path='bin/wrapper-strip')]
def _impl(ctx):
builtin_sysroot = 'external/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/aarch64-linux-gnu/libc'
compile_flags_feature = feature(name='compile_flags', enabled=True, flag_sets=[flag_set(actions=all_compile_actions, flag_groups=[flag_group(flags=['-idirafter', 'external/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/aarch64-linux-gnu/libc/usr/include', '-idirafter', 'external/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/lib/gcc/aarch64-linux-gnu/7.3.1/include', '-idirafter', 'external/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/lib/gcc/aarch64-linux-gnu/7.3.1/include-fixed', '-idirafter', 'external/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/lib/gcc/aarch64-linux-gnu/7.3.1/install-tools/include', '-idirafter', 'external/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/lib/gcc/aarch64-linux-gnu/7.3.1/plugin/include']), flag_group(flags=['-D__arm64', '-Wall', '-Wunused-but-set-parameter', '-Wno-free-nonheap-object', '-fno-omit-frame-pointer', '-no-canonical-prefixes', '-fstack-protector', '-fPIE', '-fPIC'])]), flag_set(actions=all_cpp_compile_actions + [ACTION_NAMES.lto_backend], flag_groups=[flag_group(flags=['-isystem', 'external/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/aarch64-linux-gnu/include/c++/7.3.1', '-isystem', 'external/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/aarch64-linux-gnu/include/c++/7.3.1/aarch64-linux-gnu'])]), flag_set(actions=all_compile_actions, flag_groups=[flag_group(flags=['-g'])], with_features=[with_feature_set(features=['dbg'])]), flag_set(actions=all_compile_actions, flag_groups=[flag_group(flags=['-g0', '-O2', '-DNDEBUG', '-ffunction-sections', '-fdata-sections'])], with_features=[with_feature_set(features=['opt'])]), flag_set(actions=all_link_actions, flag_groups=[flag_group(flags=['-lstdc++'])]), flag_set(actions=all_link_actions, flag_groups=[flag_group(flags=['-Wl,--gc-sections'])], with_features=[with_feature_set(features=['opt'])]), flag_set(actions=[ACTION_NAMES.cpp_link_executable], flag_groups=[flag_group(flags=['-pie'])])])
cxx_builtin_include_directories = ['%package(@gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu//aarch64-linux-gnu/libc/usr/include)%', '%package(@gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu//lib/gcc/aarch64-linux-gnu/7.3.1/include)%', '%package(@gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu//lib/gcc/aarch64-linux-gnu/7.3.1/include-fixed)%', '%package(@gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu//lib/gcc/aarch64-linux-gnu/7.3.1/install-tools/include)%', '%package(@gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu//lib/gcc/aarch64-linux-gnu/7.3.1/plugin/include)%', '%package(@gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu//aarch64-linux-gnu/include/c++/7.3.1)%', '%package(@gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu//aarch64-linux-gnu/include/c++/7.3.1/aarch64-linux-gnu)%']
objcopy_embed_flags_feature = feature(name='objcopy_embed_flags', enabled=True, flag_sets=[flag_set(actions=['objcopy_embed_data'], flag_groups=[flag_group(flags=['-I', 'binary'])])])
dbg_feature = feature(name='dbg')
opt_feature = feature(name='opt')
return cc_common.create_cc_toolchain_config_info(ctx=ctx, toolchain_identifier=ctx.attr.toolchain_name, host_system_name='', target_system_name='linux', target_cpu=ctx.attr.target_cpu, target_libc=ctx.attr.target_cpu, compiler=ctx.attr.compiler, abi_version=ctx.attr.compiler, abi_libc_version=ctx.attr.compiler, tool_paths=tool_paths, features=[compile_flags_feature, objcopy_embed_flags_feature, dbg_feature, opt_feature], cxx_builtin_include_directories=cxx_builtin_include_directories, builtin_sysroot=builtin_sysroot)
cc_toolchain_config = build_cc_toolchain_config(_impl) |
dia = input('what day were you born?')
mes = input('what month were you born?')
ano = input('what year were you born?')
saudacaoDia = ('voce nasceu no dia')
saudacaoDe = ('de')
print(saudacaoDia, dia,saudacaoDe,mes,saudacaoDe,ano) | dia = input('what day were you born?')
mes = input('what month were you born?')
ano = input('what year were you born?')
saudacao_dia = 'voce nasceu no dia'
saudacao_de = 'de'
print(saudacaoDia, dia, saudacaoDe, mes, saudacaoDe, ano) |
#!/usr/bin/env python
if __name__ == "__main__":
N = int(raw_input())
for i in range(N):
print(pow(i,2))
| if __name__ == '__main__':
n = int(raw_input())
for i in range(N):
print(pow(i, 2)) |
'''
1. Write a Python program to create a tuple.
2. Write a Python program to create a tuple with different data types.
3. Write a Python program to create a tuple with numbers and print one item.
4. Write a Python program to unpack a tuple in several variables.
5. Write a Python program to add an item in a tuple.
6. Write a Python program to convert a tuple to a string.
7. Write a Python program to get the 4th element and 4th element from last of a tuple.
8. Write a Python program to create the colon of a tuple.
9. Write a Python program to find the repeated items of a tuple.
10. Write a Python program to check whether an element exists within a tuple.
'''
| """
1. Write a Python program to create a tuple.
2. Write a Python program to create a tuple with different data types.
3. Write a Python program to create a tuple with numbers and print one item.
4. Write a Python program to unpack a tuple in several variables.
5. Write a Python program to add an item in a tuple.
6. Write a Python program to convert a tuple to a string.
7. Write a Python program to get the 4th element and 4th element from last of a tuple.
8. Write a Python program to create the colon of a tuple.
9. Write a Python program to find the repeated items of a tuple.
10. Write a Python program to check whether an element exists within a tuple.
""" |
# Write a program that does the following:
## Prompt the user for their age. Convert it to a number, add one to it, and tell them how old they will be on their next birthday.
## Prompt the user for the number of egg cartons they have. Assume each carton holds 12 eggs, multiply their number by 12, and display the total number of eggs.
## Prompt the user for a number of cookies and a number of people. Then, divide the number of cookies by the number of people to determine how many cookies each person gets.
age_now = int(input("How old are you? "))
age_one_year_after = age_now+1
print("Next year you will be " +str(age_one_year_after))
print("\n----------------")
egg_cartoons = int(input("How much egg cartoons do you have? "))
total_eggs = egg_cartoons*12
print("Nice! So you have "+ str(total_eggs)+" eggs in total!")
print("\n----------------")
cookies = int(input("Give me a number of cookies: "))
people = int(input("Now, give a number of people: "))
num_parts_of_cookies = cookies/people
print(f"If we divide these {cookies} cookies to these {people} people, each person with have {num_parts_of_cookies} parts of cookies")
| age_now = int(input('How old are you? '))
age_one_year_after = age_now + 1
print('Next year you will be ' + str(age_one_year_after))
print('\n----------------')
egg_cartoons = int(input('How much egg cartoons do you have? '))
total_eggs = egg_cartoons * 12
print('Nice! So you have ' + str(total_eggs) + ' eggs in total!')
print('\n----------------')
cookies = int(input('Give me a number of cookies: '))
people = int(input('Now, give a number of people: '))
num_parts_of_cookies = cookies / people
print(f'If we divide these {cookies} cookies to these {people} people, each person with have {num_parts_of_cookies} parts of cookies') |
def find_string_len():
str_dict = {x: len(x) for x in input().split(', ')}
return str_dict
def print_dict(dictionary):
print(', '.join([f'{k} -> {v}' for k, v in dictionary.items()]))
print_dict(find_string_len()) | def find_string_len():
str_dict = {x: len(x) for x in input().split(', ')}
return str_dict
def print_dict(dictionary):
print(', '.join([f'{k} -> {v}' for (k, v) in dictionary.items()]))
print_dict(find_string_len()) |
numbers = {
items
for items in range(2,471)
if (items % 7 == 0)
if (items % 5 != 0)
}
print (sorted(numbers)) | numbers = {items for items in range(2, 471) if items % 7 == 0 if items % 5 != 0}
print(sorted(numbers)) |
class Node:
def __init__(self, value):
self.value = value
self.next = None
class Queue:
def __init__(self):
self.first = None
self.last = None
self.length = 0
def peek(self):
if self.length > 0:
return f"First: {self.first.value}\nLast: {self.last.value}\n"
else:
return
def enqueue(self, value):
new_node = Node(value)
if self.length == 0:
self.first = new_node
self.last = new_node
self.length += 1
else:
new_node.next = self.last
self.last = new_node
self.length += 1
def dequeue(self):
if self.length > 0:
tmp = self.last
for i in range(self.length - 2):
# self.last = self.first.next
tmp = tmp.next
tmp.next = None
self.first = tmp
self.length -= 1
else:
return
# Instantiate Queue class
q = Queue()
q.enqueue('google') # 1 - First
q.enqueue('twitter') # 2
q.enqueue('steam') # 3
q.enqueue('tesla') # 4 - Last
print(q.peek())
q.dequeue()
print(q.peek())
q.dequeue()
print(q.peek())
| class Node:
def __init__(self, value):
self.value = value
self.next = None
class Queue:
def __init__(self):
self.first = None
self.last = None
self.length = 0
def peek(self):
if self.length > 0:
return f'First: {self.first.value}\nLast: {self.last.value}\n'
else:
return
def enqueue(self, value):
new_node = node(value)
if self.length == 0:
self.first = new_node
self.last = new_node
self.length += 1
else:
new_node.next = self.last
self.last = new_node
self.length += 1
def dequeue(self):
if self.length > 0:
tmp = self.last
for i in range(self.length - 2):
tmp = tmp.next
tmp.next = None
self.first = tmp
self.length -= 1
else:
return
q = queue()
q.enqueue('google')
q.enqueue('twitter')
q.enqueue('steam')
q.enqueue('tesla')
print(q.peek())
q.dequeue()
print(q.peek())
q.dequeue()
print(q.peek()) |
def mdc(number_one, number_two):
max_mdc = 1
if number_one < number_two:
for max in range(1, abs(number_one) + 1):
if number_one % max == 0 and number_two % max == 0:
max_mdc = max
elif number_one >= number_two:
for max in range(1, abs(number_two) + 1):
if number_one % max == 0 and number_two % max == 0:
max_mdc = max
return max_mdc
class Rational:
def __init__(self, numerator, denominator):
self.numerator = int(numerator)
self.denominator = int(denominator)
def get_numerator(self):
return self.numerator
def get_denominator(self):
return self.denominator
def to_float(self):
return self.numerator/self.denominator
def reciprocal(self):
return Rational(self.get_denominator(), self.get_numerator())
def reduce(self):
mdc_value = mdc(self.get_numerator(), self.get_denominator())
return Rational(self.get_numerator() / mdc_value, self.get_denominator() / mdc_value)
# Dunder methods
def __add__(self, other):
if isinstance(other, Rational):
new_denominator = self.get_denominator() * other.get_denominator()
return Rational(((new_denominator / self.get_denominator()) * self.get_numerator()) + ((new_denominator / other.get_denominator()) * other.get_numerator()), new_denominator).reduce()
elif isinstance(other, int):
return Rational(self.get_numerator() + self.get_denominator() * other, self.get_denominator()).reduce()
elif isinstance(other, float):
return self.to_float() + other
else:
return None
def __mul__(self, other):
if isinstance(other, Rational):
return Rational(self.get_numerator() * other.get_numerator(), self.get_denominator() * other.get_denominator()).reduce()
elif isinstance(other, int):
return Rational(self.get_numerator() * other, self.get_denominator()).reduce()
elif isinstance(other, float):
return self.to_float() * other
else:
return None
def __truediv__(self, other):
if isinstance(other, Rational):
return Rational(self.get_numerator() * other.get_denominator(), self.get_denominator() * other.get_numerator()).reduce()
elif isinstance(other, int):
return Rational(self.get_numerator(), self.get_denominator() * other).reduce()
elif isinstance(other, float):
return self.to_float() / other
else:
return None
def __sub__(self, other):
if isinstance(other, Rational):
return Rational((self.get_numerator() * other.get_denominator() - self.get_denominator() * other.get_numerator()), (self.get_denominator() * other.get_denominator())).reduce()
elif isinstance(other, int):
return Rational(self.get_numerator() - self.get_denominator() * other, self.get_denominator()).reduce()
elif isinstance(other, float):
return self.to_float() - other
else:
return None
| def mdc(number_one, number_two):
max_mdc = 1
if number_one < number_two:
for max in range(1, abs(number_one) + 1):
if number_one % max == 0 and number_two % max == 0:
max_mdc = max
elif number_one >= number_two:
for max in range(1, abs(number_two) + 1):
if number_one % max == 0 and number_two % max == 0:
max_mdc = max
return max_mdc
class Rational:
def __init__(self, numerator, denominator):
self.numerator = int(numerator)
self.denominator = int(denominator)
def get_numerator(self):
return self.numerator
def get_denominator(self):
return self.denominator
def to_float(self):
return self.numerator / self.denominator
def reciprocal(self):
return rational(self.get_denominator(), self.get_numerator())
def reduce(self):
mdc_value = mdc(self.get_numerator(), self.get_denominator())
return rational(self.get_numerator() / mdc_value, self.get_denominator() / mdc_value)
def __add__(self, other):
if isinstance(other, Rational):
new_denominator = self.get_denominator() * other.get_denominator()
return rational(new_denominator / self.get_denominator() * self.get_numerator() + new_denominator / other.get_denominator() * other.get_numerator(), new_denominator).reduce()
elif isinstance(other, int):
return rational(self.get_numerator() + self.get_denominator() * other, self.get_denominator()).reduce()
elif isinstance(other, float):
return self.to_float() + other
else:
return None
def __mul__(self, other):
if isinstance(other, Rational):
return rational(self.get_numerator() * other.get_numerator(), self.get_denominator() * other.get_denominator()).reduce()
elif isinstance(other, int):
return rational(self.get_numerator() * other, self.get_denominator()).reduce()
elif isinstance(other, float):
return self.to_float() * other
else:
return None
def __truediv__(self, other):
if isinstance(other, Rational):
return rational(self.get_numerator() * other.get_denominator(), self.get_denominator() * other.get_numerator()).reduce()
elif isinstance(other, int):
return rational(self.get_numerator(), self.get_denominator() * other).reduce()
elif isinstance(other, float):
return self.to_float() / other
else:
return None
def __sub__(self, other):
if isinstance(other, Rational):
return rational(self.get_numerator() * other.get_denominator() - self.get_denominator() * other.get_numerator(), self.get_denominator() * other.get_denominator()).reduce()
elif isinstance(other, int):
return rational(self.get_numerator() - self.get_denominator() * other, self.get_denominator()).reduce()
elif isinstance(other, float):
return self.to_float() - other
else:
return None |
#!/usr/bin/env python
command('start-configuration-editing')
command('cd /')
command('delete-element /sessionClusterConfig')
command('activate-configuration')
| command('start-configuration-editing')
command('cd /')
command('delete-element /sessionClusterConfig')
command('activate-configuration') |
class Field:
__slots__ = ('name', 'typ')
def __init__(self, typ, name=None):
self.typ = typ
self.name = name
def __get__(self, instance, owner):
if instance is None:
return self
typ = instance.__dict__.get(self.name)
return typ.value if typ else typ
def __set__(self, instance, value):
instance._changed(self.name)
instance.__dict__[self.name] = self.typ(value)
def marshal(self, instance):
return instance.__dict__[self.name].marshal()
| class Field:
__slots__ = ('name', 'typ')
def __init__(self, typ, name=None):
self.typ = typ
self.name = name
def __get__(self, instance, owner):
if instance is None:
return self
typ = instance.__dict__.get(self.name)
return typ.value if typ else typ
def __set__(self, instance, value):
instance._changed(self.name)
instance.__dict__[self.name] = self.typ(value)
def marshal(self, instance):
return instance.__dict__[self.name].marshal() |
# Take string, mirrors its string argument, and print result
def get_mirror(string):
# mirrors string argument
result = string + string[::-1]
return result
# Define main function
def main():
# Prompt user for a string
astring = input('Enter a string: ')
# Obtain mirror string
mirror = get_mirror(astring)
# Display mirror
print(mirror)
# Call main function
main()
| def get_mirror(string):
result = string + string[::-1]
return result
def main():
astring = input('Enter a string: ')
mirror = get_mirror(astring)
print(mirror)
main() |
#!/usr/bin/env python3
# with_example02.py
class Sample:
def __enter__(self):
return self
def __exit__(self, type, value, trace):
print("type:", type)
print("value:", value)
print("trace:", trace)
def do_something(self):
bar = 1/0
return bar + 10
with Sample() as sample:
sample.do_something()
| class Sample:
def __enter__(self):
return self
def __exit__(self, type, value, trace):
print('type:', type)
print('value:', value)
print('trace:', trace)
def do_something(self):
bar = 1 / 0
return bar + 10
with sample() as sample:
sample.do_something() |
N, M = map(int, input().split())
loop = (2**M)
print(1900*loop*M+100*(N-M)*loop)
| (n, m) = map(int, input().split())
loop = 2 ** M
print(1900 * loop * M + 100 * (N - M) * loop) |
def check_double(number):
if len(str(number))==(len(str(number*2))) and number!=number*2 :
return sorted(str(number)) == sorted(str(number*2))
return False
print(check_double(125874)) | def check_double(number):
if len(str(number)) == len(str(number * 2)) and number != number * 2:
return sorted(str(number)) == sorted(str(number * 2))
return False
print(check_double(125874)) |
DEBUG = False
TESTING = False
PROXY = False # True if app is proxied by Apache or similar.
# Application Settings
BROWSER_NAME = 'Bravo'
DATASET_NAME = 'Example Dataset' # Change to your dataset name
SHOW_POWERED_BY = False
NUM_SAMPLES = 0 # Change to the number of samples you are using
NUM_VARIANTS = 'XYZ million' # Change to the number of variants you are using
# Database Settings
MONGO = {
'host': '127.0.0.1',
'port': 27017,
'name': 'bravo'
}
DOWNLOAD_ALL_FILEPATH = ''
URL_PREFIX = ''
# Google Analytics Settings
GOOGLE_ANALYTICS_TRACKING_ID = '' # (Optional) Change to your Google Analytics Tracking ID.
SECRET_KEY = '' # (Optional) Change to your Google Analytics Secret Key
# Google Auth Settings
GOOGLE_AUTH = False # True if app is using Google Auth 2.0
GOOGLE_LOGIN_CLIENT_ID = '' # Insert your Google Login Client ID
GOOGLE_LOGIN_CLIENT_SECRET = '' # Insert your Google Login Secret
TERMS = True # True if app requires 'Terms of Use'. Can be used only if GOOGLE_AUTH is enabled.
# Email Whitelist Settings
EMAIL_WHITELIST = False # True if app has whitelisted emails. Can be used only if GOOGLE_AUTH is enabled.
API_GOOGLE_AUTH = False
API_IP_WHITELIST = ['127.0.0.1']
API_VERSION = ''
API_DATASET_NAME = ''
API_COLLECTION_NAME = 'variants'
API_URL_PREFIX = '/api/' + API_VERSION
API_PAGE_SIZE = 1000
API_MAX_REGION = 250000
API_REQUESTS_RATE_LIMIT = ['1800/15 minute']
# BRAVO Settings
BRAVO_AUTH_SECRET = ''
BRAVO_ACCESS_SECRET = ''
BRAVO_AUTH_URL_PREFIX = '/api/' + API_VERSION + '/auth'
# Data Directory Settings. By default all data is stored in /data root directory
IGV_REFERENCE_PATH = '/data/genomes/genome.fa'
IGV_CRAM_DIRECTORY = '/data/cram/'
IGV_CACHE_COLLECTION = 'igv_cache'
IGV_CACHE_DIRECTORY = '/data/cache/igv_cache/'
IGV_CACHE_LIMIT = 1000
BASE_COVERAGE_DIRECTORY = '/data/coverage/'
# FASTA Data URL Settings.
FASTA_URL = 'https://<your-bravo-domain>/genomes/genome.fa' # Edit to reflect your URL for your BRAVO application
ADMINS = [
'email@email.email'
]
ADMIN = False # True if app is running in admin mode.
ADMIN_ALLOWED_IP = [] # IPs allowed to reach admin interface
| debug = False
testing = False
proxy = False
browser_name = 'Bravo'
dataset_name = 'Example Dataset'
show_powered_by = False
num_samples = 0
num_variants = 'XYZ million'
mongo = {'host': '127.0.0.1', 'port': 27017, 'name': 'bravo'}
download_all_filepath = ''
url_prefix = ''
google_analytics_tracking_id = ''
secret_key = ''
google_auth = False
google_login_client_id = ''
google_login_client_secret = ''
terms = True
email_whitelist = False
api_google_auth = False
api_ip_whitelist = ['127.0.0.1']
api_version = ''
api_dataset_name = ''
api_collection_name = 'variants'
api_url_prefix = '/api/' + API_VERSION
api_page_size = 1000
api_max_region = 250000
api_requests_rate_limit = ['1800/15 minute']
bravo_auth_secret = ''
bravo_access_secret = ''
bravo_auth_url_prefix = '/api/' + API_VERSION + '/auth'
igv_reference_path = '/data/genomes/genome.fa'
igv_cram_directory = '/data/cram/'
igv_cache_collection = 'igv_cache'
igv_cache_directory = '/data/cache/igv_cache/'
igv_cache_limit = 1000
base_coverage_directory = '/data/coverage/'
fasta_url = 'https://<your-bravo-domain>/genomes/genome.fa'
admins = ['email@email.email']
admin = False
admin_allowed_ip = [] |
## Coding Conventions
# 'p' variables in p_<fun> are container() type
# possible scopes: package, global, functions, ....
global curr_scope
curr_scope = None
global scope_count
scope_count = 0
global temp_count
temp_count = 0
global label_count
label_count = 0
class ScopeTree:
def __init__(self, parent, scopeName=None):
self.children = []
self.parent = parent
self.symbolTable = {} #{"var": [type, size, value, offset]}
self.typeTable = self.parent.typeTable if parent is not None else {}
if scopeName is None:
global scope_count
self.identity = {"name":scope_count}
scope_count += 1
else:
self.identity = {"name":scopeName}
scope_count += 1
def insert(self, id, type, is_var=1, arg_list=None, size=None, ret_type=None, length=None, base=None):
self.symbolTable[id] = {"type":type, "base":base, "is_var":is_var,"size":size, "arg_list":arg_list, "ret_type":ret_type, "length":length}
def insert_type(self, new_type, Ntype):
self.typeTable[new_type] = Ntype
def makeChildren(self, childName=None):
child = ScopeTree(self, childName)
self.children.append(child)
return child
def lookup(self, id):
if id in self.symbolTable:
return self.symbolTable[id]
else:
if self.parent is None:
return None
# raise_general_error("undeclared variable: " + id)
return self.parent.lookup(id)
def new_temp(self):
global temp_count
temp_count += 1
return "$"+str(temp_count)
def new_label(self):
global label_count
label_count += 1
return "#"+str(label_count)
class container(object):
def __init__(self,type=None,value=None):
self.code = list()
self.place = None
self.extra = dict()
self.type = type
self.value = value
class sourcefile(object):
def __init__(self):
self.code = list()
self.package = str()
# for each import - { package:package_name,as:local_name,path:package_path }
self.imports = list()
class Builtin(object):
def __init__(self,name,width=None):
self.name = name
self.width = width
self.base = None
def __len__(self):
return self.width
def __repr__(self):
return self.name
class Int(Builtin):
def __init__(self):
super().__init__("int",4)
class Float(Builtin):
def __init__(self):
super().__init__("float",8)
class String(Builtin):
def __init__(self):
super().__init__("string")
class Byte(Builtin):
def __init__(self):
super().__init__("byte",1)
class Void(Builtin):
def __init__(self):
super().__init__("void")
class Error(Builtin):
def __init__(self):
super().__init__("error")
typeOp = set({"array","struct","pointer","function","interface","slice","map"})
class Derived(object):
def __init__(self,op,base,arg=None):
self.arg = dict(arg)
if op in typeOp:
self.op = op
if isinstance(base,(Derived,Builtin)) and (not isinstance(base,(Error,Void))) :
self.base = base
if op == "arr" :
self.name = "arr" + base.name
elif op == "struct" :
self.name = "struct" + arg["name"]
# i am saying use attributes for array - base, just like for func type
class Tac(object):
def __init__(self, op=None, arg1=None, arg2=None, dst=None, type=None):
self.type = type
self.op = op
self.arg1 = arg1
self.arg2 = arg2
self.dst = dst
class LBL(Tac):
'''Label Operation -> label :'''
def __init__(self, arg1, type="LBL"):
super().__init__(type,arg1=arg1)
def __str__(self):
return " ".join([str(self.arg1),":"])
class BOP(Tac):
'''Binary Operation -> dst = arg1 op arg2'''
def __init__(self, op, arg1, arg2, dst, type="BOP"):
super().__init__(op=op,arg1=arg1,arg2=arg2,dst=dst,type=type)
def __str__(self):
return " ".join([self.dst,"=",str(self.arg1),self.op,str(self.arg2)])
class UOP(Tac):
'''Unary Operation -> dst = op arg1'''
def __init__(self,op,arg1,type="UOP"):
super().__init__(op=op,arg1=arg1,type=type)
def __str__(self):
return " ".join([self.dst,"=",self.op,str(self.arg1)])
class ASN(Tac):
'''Assignment Operation -> dst = arg1'''
def __init__(self,arg1,dst,type="ASN"):
super().__init__(arg1=arg1,dst=dst,type=type)
def __str__(self):
return " ".join([self.dst,"=",str(self.arg1)])
class JMP(Tac):
'''Jump Operation -> goto dst'''
def __init__(self,dst,type="JMP"):
super().__init__(dst=dst,type=type)
def __str__(self):
return " ".join(["goto",self.dst])
# class JIF(Tac):
# '''Jump If -> if arg1 goto dst'''
# def __init__(self,arg1,dst,type="JIF"):
# super().__init__(arg1=arg1,dst=dst,type=type)
# def __str__(self):
# return " ".join(["if",str(self.arg1),"goto",self.dst])
class CBR(Tac):
'''Conditional Branch -> if arg1 op arg2 goto dst'''
def __init__(self, op, arg1, arg2, dst, type="CBR"):
super().__init__(op=op,arg1=arg1,arg2=arg2,dst=dst,type=type)
def __str__(self):
return " ".join(["if",str(self.arg1),self.op,str(self.arg2),"goto",self.dst])
# class BOP(Tac):
# '''Binary Operation
# dst = arg1 op arg2
# op can be :
# + : Add
# - : Subtract
# * : Multiply
# & : Bitwise AND
# | : Bitwise OR
# ^ : Bitwise XOR
# && : Logical AND
# || : Logical OR
# '''
# def __init__(self, type, op, arg1, arg2, dst):
# super().__init__(type,op,arg1,arg2,dst)
#
# class LOP(Tac):
# '''Logical Operation
# dst = arg1 op arg2
# op can be :
# < : Less Than
# > : Greater Than
# <= : Less Than Equal
# >= : Greater Than Equal
# == : Equals
# != : Not Equals
# '''
# def __init__(self, type, op, arg1, arg2, dst):
# super().__init__(type,op,arg1,arg2,dst)
#
# class SOP(Tac):
# '''Shift Operation
# dst = arg1 op arg2
# op can be :
# << : Bitwise Shift Left
# >> : Bitwise Shift Right
# '''
# def __init__(self, type, op, arg1, arg2, dst):
# super().__init__(type,op,arg1,arg2,dst)
#
# class DOP(Tac):
# '''Division Operation
# dst = arg1 op arg2
# op can be :
# / : Divide
# % : Remainder
# '''
# def __init__(self, type, op, arg1, arg2, dst):
# super().__init__(type,op,arg1,arg2,dst)
def raise_typerror(p, s=""):
print("Type error", s)
print(p)
exit(-1)
def raise_out_of_bounds_error(p, s="" ):
print("out of bounds error")
print(p)
print(s)
exit(-1)
def raise_general_error(s):
print(s)
exit(-1)
def extract_package(package_name):
return package_name.split("/")[-1]
def print_scopeTree(node,source_root,flag=False):
temp = node
if flag :
print("")
print("me:", temp.identity)
for i in temp.children:
print("child:", i.identity)
print("symbolTable:")
for var, val in temp.symbolTable.items():
print(var, val)
print("TypeTable:")
for new_type, Ntype in temp.typeTable.items():
print(new_type, Ntype)
for i in temp.children:
print_scopeTree(i,source_root)
ipkgs = ""
for pkg in source_root.imports :
ipkgs = (ipkgs +"package :"+pkg["package"] + " , as :" +pkg["as"]
+" , path:"+pkg["path"] + "\n")
three_ac = ""
for line in source_root.code :
three_ac = three_ac + str(line) + "\n"
return three_ac[:-1],ipkgs[:-1],source_root.package
| global curr_scope
curr_scope = None
global scope_count
scope_count = 0
global temp_count
temp_count = 0
global label_count
label_count = 0
class Scopetree:
def __init__(self, parent, scopeName=None):
self.children = []
self.parent = parent
self.symbolTable = {}
self.typeTable = self.parent.typeTable if parent is not None else {}
if scopeName is None:
global scope_count
self.identity = {'name': scope_count}
scope_count += 1
else:
self.identity = {'name': scopeName}
scope_count += 1
def insert(self, id, type, is_var=1, arg_list=None, size=None, ret_type=None, length=None, base=None):
self.symbolTable[id] = {'type': type, 'base': base, 'is_var': is_var, 'size': size, 'arg_list': arg_list, 'ret_type': ret_type, 'length': length}
def insert_type(self, new_type, Ntype):
self.typeTable[new_type] = Ntype
def make_children(self, childName=None):
child = scope_tree(self, childName)
self.children.append(child)
return child
def lookup(self, id):
if id in self.symbolTable:
return self.symbolTable[id]
else:
if self.parent is None:
return None
return self.parent.lookup(id)
def new_temp(self):
global temp_count
temp_count += 1
return '$' + str(temp_count)
def new_label(self):
global label_count
label_count += 1
return '#' + str(label_count)
class Container(object):
def __init__(self, type=None, value=None):
self.code = list()
self.place = None
self.extra = dict()
self.type = type
self.value = value
class Sourcefile(object):
def __init__(self):
self.code = list()
self.package = str()
self.imports = list()
class Builtin(object):
def __init__(self, name, width=None):
self.name = name
self.width = width
self.base = None
def __len__(self):
return self.width
def __repr__(self):
return self.name
class Int(Builtin):
def __init__(self):
super().__init__('int', 4)
class Float(Builtin):
def __init__(self):
super().__init__('float', 8)
class String(Builtin):
def __init__(self):
super().__init__('string')
class Byte(Builtin):
def __init__(self):
super().__init__('byte', 1)
class Void(Builtin):
def __init__(self):
super().__init__('void')
class Error(Builtin):
def __init__(self):
super().__init__('error')
type_op = set({'array', 'struct', 'pointer', 'function', 'interface', 'slice', 'map'})
class Derived(object):
def __init__(self, op, base, arg=None):
self.arg = dict(arg)
if op in typeOp:
self.op = op
if isinstance(base, (Derived, Builtin)) and (not isinstance(base, (Error, Void))):
self.base = base
if op == 'arr':
self.name = 'arr' + base.name
elif op == 'struct':
self.name = 'struct' + arg['name']
class Tac(object):
def __init__(self, op=None, arg1=None, arg2=None, dst=None, type=None):
self.type = type
self.op = op
self.arg1 = arg1
self.arg2 = arg2
self.dst = dst
class Lbl(Tac):
"""Label Operation -> label :"""
def __init__(self, arg1, type='LBL'):
super().__init__(type, arg1=arg1)
def __str__(self):
return ' '.join([str(self.arg1), ':'])
class Bop(Tac):
"""Binary Operation -> dst = arg1 op arg2"""
def __init__(self, op, arg1, arg2, dst, type='BOP'):
super().__init__(op=op, arg1=arg1, arg2=arg2, dst=dst, type=type)
def __str__(self):
return ' '.join([self.dst, '=', str(self.arg1), self.op, str(self.arg2)])
class Uop(Tac):
"""Unary Operation -> dst = op arg1"""
def __init__(self, op, arg1, type='UOP'):
super().__init__(op=op, arg1=arg1, type=type)
def __str__(self):
return ' '.join([self.dst, '=', self.op, str(self.arg1)])
class Asn(Tac):
"""Assignment Operation -> dst = arg1"""
def __init__(self, arg1, dst, type='ASN'):
super().__init__(arg1=arg1, dst=dst, type=type)
def __str__(self):
return ' '.join([self.dst, '=', str(self.arg1)])
class Jmp(Tac):
"""Jump Operation -> goto dst"""
def __init__(self, dst, type='JMP'):
super().__init__(dst=dst, type=type)
def __str__(self):
return ' '.join(['goto', self.dst])
class Cbr(Tac):
"""Conditional Branch -> if arg1 op arg2 goto dst"""
def __init__(self, op, arg1, arg2, dst, type='CBR'):
super().__init__(op=op, arg1=arg1, arg2=arg2, dst=dst, type=type)
def __str__(self):
return ' '.join(['if', str(self.arg1), self.op, str(self.arg2), 'goto', self.dst])
def raise_typerror(p, s=''):
print('Type error', s)
print(p)
exit(-1)
def raise_out_of_bounds_error(p, s=''):
print('out of bounds error')
print(p)
print(s)
exit(-1)
def raise_general_error(s):
print(s)
exit(-1)
def extract_package(package_name):
return package_name.split('/')[-1]
def print_scope_tree(node, source_root, flag=False):
temp = node
if flag:
print('')
print('me:', temp.identity)
for i in temp.children:
print('child:', i.identity)
print('symbolTable:')
for (var, val) in temp.symbolTable.items():
print(var, val)
print('TypeTable:')
for (new_type, ntype) in temp.typeTable.items():
print(new_type, Ntype)
for i in temp.children:
print_scope_tree(i, source_root)
ipkgs = ''
for pkg in source_root.imports:
ipkgs = ipkgs + 'package :' + pkg['package'] + ' , as :' + pkg['as'] + ' , path:' + pkg['path'] + '\n'
three_ac = ''
for line in source_root.code:
three_ac = three_ac + str(line) + '\n'
return (three_ac[:-1], ipkgs[:-1], source_root.package) |
test=int(input())
for y in range(test):
k,dig0,dig1=input().split()
k,dig0,dig1=int(k),int(dig0),int(dig1)
sum1=dig0+dig1
for i in range(3,k+2):
y=sum1%10
sum1+=y
if(y==2):
ter1=((k-i)//4)
ter1*=20
sum1+=ter1
ter=k-i
if(ter%4==3):
sum1+=18
elif(ter%4==2):
sum1+=12
elif(ter%4==1):
sum1+=4
break
if(y==0):
break
if(sum1%3==0):
print("YES")
else:
print("NO") | test = int(input())
for y in range(test):
(k, dig0, dig1) = input().split()
(k, dig0, dig1) = (int(k), int(dig0), int(dig1))
sum1 = dig0 + dig1
for i in range(3, k + 2):
y = sum1 % 10
sum1 += y
if y == 2:
ter1 = (k - i) // 4
ter1 *= 20
sum1 += ter1
ter = k - i
if ter % 4 == 3:
sum1 += 18
elif ter % 4 == 2:
sum1 += 12
elif ter % 4 == 1:
sum1 += 4
break
if y == 0:
break
if sum1 % 3 == 0:
print('YES')
else:
print('NO') |
class Solution:
def kWeakestRows(self, mat: List[List[int]], k: int) -> List[int]:
h = []
for i, li in enumerate(mat):
l = self.countSoider(li)
heapq.heappush(h, (l, i))
ans = []
for _ in range(k):
ans.append(heapq.heappop(h)[1])
return ans
def countSoider(self, li):
l = 0
r = len(li)
if li[l] == 0:
return 0
if li[r - 1] == 1:
return r
while l < r:
mid = (l + r - 1) //2
if li[mid] == 0:
if li[mid - 1] == 1:
return mid
else:
r = mid - 1
else:
if li[mid + 1] == 0:
return mid + 1
else:
l = mid + 1
| class Solution:
def k_weakest_rows(self, mat: List[List[int]], k: int) -> List[int]:
h = []
for (i, li) in enumerate(mat):
l = self.countSoider(li)
heapq.heappush(h, (l, i))
ans = []
for _ in range(k):
ans.append(heapq.heappop(h)[1])
return ans
def count_soider(self, li):
l = 0
r = len(li)
if li[l] == 0:
return 0
if li[r - 1] == 1:
return r
while l < r:
mid = (l + r - 1) // 2
if li[mid] == 0:
if li[mid - 1] == 1:
return mid
else:
r = mid - 1
elif li[mid + 1] == 0:
return mid + 1
else:
l = mid + 1 |
# This file is needs to be multi-lingual in both Python and POSIX
# shell which "execfile" or "source" it respectively.
# This file should define a variable VERSION which we use as the
# debugger version number.
VERSION='0.3.6'
| version = '0.3.6' |
tmp = 0
monday_temperatures = [9.1, 8.8, 7.5]
tmp = monday_temperatures.__getitem__(1)
tmp = monday_temperatures[1]
print(tmp) | tmp = 0
monday_temperatures = [9.1, 8.8, 7.5]
tmp = monday_temperatures.__getitem__(1)
tmp = monday_temperatures[1]
print(tmp) |
'''
You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is that adjacent houses have security systems connected and it will automatically contact the police if two adjacent houses were broken into on the same night.
Given an integer array nums representing the amount of money of each house, return the maximum amount of money you can rob tonight without alerting the police.
Input: nums = [1,2,3,1]
Output: 4
Explanation: Rob house 1 (money = 1) and then rob house 3 (money = 3).
Total amount you can rob = 1 + 3 = 4.
'''
class Solution:
def rob(self, nums: List[int]) -> int:
#handle base condition
if(len(nums) == 0):
return 0
if(len(nums) == 1):
return(nums[0])
if(len(nums) == 2):
return(max(nums[0],nums[1]))
dp = [0 for _ in range(len(nums))]
dp[0] = nums[0]
dp[1] = max(nums[0],nums[1])
for i in range(2,len(nums)):
dp[i] = max(nums[i]+dp[i-2],dp[i-1])
return(dp[-1])
| """
You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is that adjacent houses have security systems connected and it will automatically contact the police if two adjacent houses were broken into on the same night.
Given an integer array nums representing the amount of money of each house, return the maximum amount of money you can rob tonight without alerting the police.
Input: nums = [1,2,3,1]
Output: 4
Explanation: Rob house 1 (money = 1) and then rob house 3 (money = 3).
Total amount you can rob = 1 + 3 = 4.
"""
class Solution:
def rob(self, nums: List[int]) -> int:
if len(nums) == 0:
return 0
if len(nums) == 1:
return nums[0]
if len(nums) == 2:
return max(nums[0], nums[1])
dp = [0 for _ in range(len(nums))]
dp[0] = nums[0]
dp[1] = max(nums[0], nums[1])
for i in range(2, len(nums)):
dp[i] = max(nums[i] + dp[i - 2], dp[i - 1])
return dp[-1] |
class Map:
def __init__(self, filepath):
#first index will be y, second is x
self.data = list()
with open(filepath, "r") as f:
for line in f:
line = line.strip()
self.data.append(line)
self.width = len(self.data[0])
self.height = len(self.data)
#Check that we loaded the map with the same width everywhere
assert all([self.width == len(i) for i in self.data])
def check(self, x, y):
if y >= self.height:
return None
return self.data[y][x%self.width] == "#"
def print(self):
for line in self.data:
print("".join(line))
class Sled:
def __init__(self, map_):
self.map = map_
def go(self, xpos, ypos, step_x, step_y):
count = 0
status = self.map.check(xpos,ypos)
while status is not None:
xpos += step_x
ypos += step_y
status = self.map.check(xpos,ypos)
if status:
count += 1
return count
| class Map:
def __init__(self, filepath):
self.data = list()
with open(filepath, 'r') as f:
for line in f:
line = line.strip()
self.data.append(line)
self.width = len(self.data[0])
self.height = len(self.data)
assert all([self.width == len(i) for i in self.data])
def check(self, x, y):
if y >= self.height:
return None
return self.data[y][x % self.width] == '#'
def print(self):
for line in self.data:
print(''.join(line))
class Sled:
def __init__(self, map_):
self.map = map_
def go(self, xpos, ypos, step_x, step_y):
count = 0
status = self.map.check(xpos, ypos)
while status is not None:
xpos += step_x
ypos += step_y
status = self.map.check(xpos, ypos)
if status:
count += 1
return count |
# https://www.hackerrank.com/challenges/s10-geometric-distribution-1/problem
# Enter your code here. Read input from STDIN. Print output to STDOUT
x,y=map(int,input().split())
z=int(input())
p=x/y
q=1-p
print(round((q**(z-1))*p,3)) | (x, y) = map(int, input().split())
z = int(input())
p = x / y
q = 1 - p
print(round(q ** (z - 1) * p, 3)) |
MP3_PREVIEW = "mp3_preview"
OGG_PREVIEW = "ogg_preview"
OGG_RELEASE = "ogg_release"
| mp3_preview = 'mp3_preview'
ogg_preview = 'ogg_preview'
ogg_release = 'ogg_release' |
MAJOR_COLORS = ['White', 'Red', 'Black', 'Yellow', 'Violet']
MINOR_COLORS = ["Blue", "Orange", "Green", "Brown", "Slate"]
def print_color_code_mapping():
print('{:15} {:15} {:5} \n'.format('Major Color', 'Minor Color', 'Pair No.'))
for major_color_index, major_color in enumerate(MAJOR_COLORS):
for minor_color_index, minor_color in enumerate(MINOR_COLORS):
print('{:15} {:15} {:5} \n'.format(major_color, minor_color, major_color_index * len(MINOR_COLORS) + minor_color_index + 1))
def get_color_from_pair_number(pair_number):
zero_based_pair_number = pair_number - 1
major_index = zero_based_pair_number // len(MINOR_COLORS)
if major_index >= len(MAJOR_COLORS):
raise Exception('Major index out of range')
minor_index = zero_based_pair_number % len(MINOR_COLORS)
if minor_index >= len(MINOR_COLORS):
raise Exception('Minor index out of range')
return MAJOR_COLORS[major_index], MINOR_COLORS[minor_index]
def get_pair_number_from_color(major_color, minor_color):
try:
major_index = MAJOR_COLORS.index(major_color)
except ValueError:
raise Exception('Major index out of range')
try:
minor_index = MINOR_COLORS.index(minor_color)
except ValueError:
raise Exception('Minor index out of range')
return major_index * len(MINOR_COLORS) + minor_index + 1
| major_colors = ['White', 'Red', 'Black', 'Yellow', 'Violet']
minor_colors = ['Blue', 'Orange', 'Green', 'Brown', 'Slate']
def print_color_code_mapping():
print('{:15} {:15} {:5} \n'.format('Major Color', 'Minor Color', 'Pair No.'))
for (major_color_index, major_color) in enumerate(MAJOR_COLORS):
for (minor_color_index, minor_color) in enumerate(MINOR_COLORS):
print('{:15} {:15} {:5} \n'.format(major_color, minor_color, major_color_index * len(MINOR_COLORS) + minor_color_index + 1))
def get_color_from_pair_number(pair_number):
zero_based_pair_number = pair_number - 1
major_index = zero_based_pair_number // len(MINOR_COLORS)
if major_index >= len(MAJOR_COLORS):
raise exception('Major index out of range')
minor_index = zero_based_pair_number % len(MINOR_COLORS)
if minor_index >= len(MINOR_COLORS):
raise exception('Minor index out of range')
return (MAJOR_COLORS[major_index], MINOR_COLORS[minor_index])
def get_pair_number_from_color(major_color, minor_color):
try:
major_index = MAJOR_COLORS.index(major_color)
except ValueError:
raise exception('Major index out of range')
try:
minor_index = MINOR_COLORS.index(minor_color)
except ValueError:
raise exception('Minor index out of range')
return major_index * len(MINOR_COLORS) + minor_index + 1 |
CRITICAL_MARK_BEGIN = '<!-- BEGIN: django-critical css ('
CRITICAL_MARK_END = ') END: django-critical css -->'
CRITICAL_ASYNC_MARK = '<!-- django-critical async snippet -->'
CRITICAL_KEY_MARK_BEGIN = '<!-- BEGIN: django-critical key ('
CRITICAL_KEY_MARK_END = ') END: django-critical key -->'
| critical_mark_begin = '<!-- BEGIN: django-critical css ('
critical_mark_end = ') END: django-critical css -->'
critical_async_mark = '<!-- django-critical async snippet -->'
critical_key_mark_begin = '<!-- BEGIN: django-critical key ('
critical_key_mark_end = ') END: django-critical key -->' |
l=[]
z=[]
def selection_sort(l):
for i in range(0,5):
MIN=min(l)
z.append(MIN)
l.remove(MIN)
return z
print("Enter Integer list of 5 values")
for i in range(0, 5):
x = int(input())
l.append(x)
print("List is: ",l)
print("Sorted list is: ",selection_sort(l))
| l = []
z = []
def selection_sort(l):
for i in range(0, 5):
min = min(l)
z.append(MIN)
l.remove(MIN)
return z
print('Enter Integer list of 5 values')
for i in range(0, 5):
x = int(input())
l.append(x)
print('List is: ', l)
print('Sorted list is: ', selection_sort(l)) |
load("//tools/jest:jest.bzl", _jest_test = "jest_test")
load("//tools/go:go.bzl", _test_go_fmt = "test_go_fmt")
load("@io_bazel_rules_go//go:def.bzl", _go_binary = "go_binary", _go_library = "go_library", _go_test = "go_test")
load("@npm//@bazel/typescript:index.bzl", _ts_config = "ts_config", _ts_project = "ts_project")
load("@npm//eslint:index.bzl", _eslint_test = "eslint_test")
load("@build_bazel_rules_nodejs//:index.bzl", "js_library", _nodejs_binary = "nodejs_binary")
def nodejs_binary(**kwargs):
_nodejs_binary(**kwargs)
def ts_config(**kwargs):
_ts_config(**kwargs)
def jest_test(project_deps = [], deps = [], **kwargs):
_jest_test(
deps = deps + [x + "_js" for x in project_deps],
**kwargs
)
def ts_lint(name, srcs = [], tags = [], data = [], **kwargs):
targets = srcs + data
eslint_test(
name = name,
data = targets,
tags = tags + ["+formatting"],
args = ["$(location %s)" % x for x in targets],
**kwargs
)
def ts_project(name, project_deps = [], deps = [], srcs = [], incremental = None, composite = False, tsconfig = "//:tsconfig", declaration = False, preserve_jsx = None, **kwargs):
__ts_project(
name = name + "_ts",
deps = deps + [dep + "_ts" for dep in project_deps],
srcs = srcs,
composite = composite,
declaration = declaration,
tsconfig = tsconfig,
preserve_jsx = preserve_jsx,
incremental = incremental,
**kwargs
)
js_library(
name = name + "_js",
deps = [dep + "_js" for dep in project_deps] + deps,
srcs = [src[:src.rfind(".")] + ".js" for src in srcs],
**kwargs
)
def __ts_project(name, tags = [], deps = [], srcs = [], tsconfig = "//:tsconfig", **kwargs):
_ts_project(
name = name,
tsc = "@npm//ttypescript/bin:ttsc",
srcs = srcs,
deps = deps + ["@npm//typescript-transform-paths"],
tags = tags,
tsconfig = tsconfig,
**kwargs
)
ts_lint(name = name + "_lint", data = srcs, tags = tags)
def eslint_test(name = None, data = [], args = [], **kwargs):
_eslint_test(
name = name,
data = data + [
"//:.prettierrc.json",
"//:.gitignore",
"//:.editorconfig",
"//:.eslintrc.json",
"@npm//eslint-plugin-prettier",
"@npm//@typescript-eslint/parser",
"@npm//@typescript-eslint/eslint-plugin",
"@npm//eslint-config-prettier",
],
args = args + ["--ignore-path", "$(location //:.gitignore)"] +
["$(location " + x + ")" for x in data],
)
def go_binary(name = None, importpath = None, deps = [], **kwargs):
_go_binary(
name = name,
deps = deps,
importpath = importpath,
**kwargs
)
_test_go_fmt(
name = name + "_fmt",
**kwargs
)
def go_test(name = None, importpath = None, deps = [], **kwargs):
_go_test(
name = name,
deps = deps,
importpath = importpath,
**kwargs
)
_test_go_fmt(
name = name + "_fmt",
**kwargs
)
def go_library(name = None, importpath = None, deps = [], **kwargs):
_go_library(
name = name,
deps = deps,
importpath = importpath,
**kwargs
)
_test_go_fmt(
name = name + "_fmt",
**kwargs
)
| load('//tools/jest:jest.bzl', _jest_test='jest_test')
load('//tools/go:go.bzl', _test_go_fmt='test_go_fmt')
load('@io_bazel_rules_go//go:def.bzl', _go_binary='go_binary', _go_library='go_library', _go_test='go_test')
load('@npm//@bazel/typescript:index.bzl', _ts_config='ts_config', _ts_project='ts_project')
load('@npm//eslint:index.bzl', _eslint_test='eslint_test')
load('@build_bazel_rules_nodejs//:index.bzl', 'js_library', _nodejs_binary='nodejs_binary')
def nodejs_binary(**kwargs):
_nodejs_binary(**kwargs)
def ts_config(**kwargs):
_ts_config(**kwargs)
def jest_test(project_deps=[], deps=[], **kwargs):
_jest_test(deps=deps + [x + '_js' for x in project_deps], **kwargs)
def ts_lint(name, srcs=[], tags=[], data=[], **kwargs):
targets = srcs + data
eslint_test(name=name, data=targets, tags=tags + ['+formatting'], args=['$(location %s)' % x for x in targets], **kwargs)
def ts_project(name, project_deps=[], deps=[], srcs=[], incremental=None, composite=False, tsconfig='//:tsconfig', declaration=False, preserve_jsx=None, **kwargs):
__ts_project(name=name + '_ts', deps=deps + [dep + '_ts' for dep in project_deps], srcs=srcs, composite=composite, declaration=declaration, tsconfig=tsconfig, preserve_jsx=preserve_jsx, incremental=incremental, **kwargs)
js_library(name=name + '_js', deps=[dep + '_js' for dep in project_deps] + deps, srcs=[src[:src.rfind('.')] + '.js' for src in srcs], **kwargs)
def __ts_project(name, tags=[], deps=[], srcs=[], tsconfig='//:tsconfig', **kwargs):
_ts_project(name=name, tsc='@npm//ttypescript/bin:ttsc', srcs=srcs, deps=deps + ['@npm//typescript-transform-paths'], tags=tags, tsconfig=tsconfig, **kwargs)
ts_lint(name=name + '_lint', data=srcs, tags=tags)
def eslint_test(name=None, data=[], args=[], **kwargs):
_eslint_test(name=name, data=data + ['//:.prettierrc.json', '//:.gitignore', '//:.editorconfig', '//:.eslintrc.json', '@npm//eslint-plugin-prettier', '@npm//@typescript-eslint/parser', '@npm//@typescript-eslint/eslint-plugin', '@npm//eslint-config-prettier'], args=args + ['--ignore-path', '$(location //:.gitignore)'] + ['$(location ' + x + ')' for x in data])
def go_binary(name=None, importpath=None, deps=[], **kwargs):
_go_binary(name=name, deps=deps, importpath=importpath, **kwargs)
_test_go_fmt(name=name + '_fmt', **kwargs)
def go_test(name=None, importpath=None, deps=[], **kwargs):
_go_test(name=name, deps=deps, importpath=importpath, **kwargs)
_test_go_fmt(name=name + '_fmt', **kwargs)
def go_library(name=None, importpath=None, deps=[], **kwargs):
_go_library(name=name, deps=deps, importpath=importpath, **kwargs)
_test_go_fmt(name=name + '_fmt', **kwargs) |
antenna = int(input())
eyes = int(input())
if antenna>=3 and eyes<=4:
print("TroyMartian")
if antenna<=6 and eyes>=2:
print("VladSaturnian")
if antenna<=2 and eyes<= 3:
print("GraemeMercurian")
| antenna = int(input())
eyes = int(input())
if antenna >= 3 and eyes <= 4:
print('TroyMartian')
if antenna <= 6 and eyes >= 2:
print('VladSaturnian')
if antenna <= 2 and eyes <= 3:
print('GraemeMercurian') |
# test builtin abs function with float args
for val in (
"1.0",
"-1.0",
"0.0",
"-0.0",
"nan",
"-nan",
"inf",
"-inf",
):
print(val, abs(float(val)))
| for val in ('1.0', '-1.0', '0.0', '-0.0', 'nan', '-nan', 'inf', '-inf'):
print(val, abs(float(val))) |
# Big O complexity
# O(log2(n))
# works only on sorted array
# recursive
def binary_search_recursive(arr, arg, left, right):
if right >= left:
middle = left + (right - left) // 2
if arr[middle] == arg:
return middle
elif arr[middle] > arg:
return binary_search_recursive(arr, arg, left, middle - 1)
else:
return binary_search_recursive(arr, arg, middle + 1, right)
else:
return -1
# iterative
def binary_search(arr, arg, left, right):
while left <= right:
mid = left + (right - left) // 2
if arr[mid] == arg:
return mid
elif arr[mid] < arg:
left = mid + 1
else:
right = mid - 1
return -1
| def binary_search_recursive(arr, arg, left, right):
if right >= left:
middle = left + (right - left) // 2
if arr[middle] == arg:
return middle
elif arr[middle] > arg:
return binary_search_recursive(arr, arg, left, middle - 1)
else:
return binary_search_recursive(arr, arg, middle + 1, right)
else:
return -1
def binary_search(arr, arg, left, right):
while left <= right:
mid = left + (right - left) // 2
if arr[mid] == arg:
return mid
elif arr[mid] < arg:
left = mid + 1
else:
right = mid - 1
return -1 |
s = input("s: ")
t = input("t: ")
if s == t:
print("Same")
else:
print("Different") | s = input('s: ')
t = input('t: ')
if s == t:
print('Same')
else:
print('Different') |
'''Deoxyribonucleic acid (DNA) is a chemical found in the nucleus
of cells and carries the "instructions" for the development and functioning of living organisms.
If you want to know more http://en.wikipedia.org/wiki/DNA
In DNA strings, symbols "A" and "T" are complements of each other,
as "C" and "G". You have function with one side of the DNA
(string, except for Haskell); you need to get the other complementary side.
DNA strand is never empty or there is no DNA at all (again, except for Haskell).'''
#ATTGC >>>> TAACG
def DNA_strand(dna):
Dna_dict = {'A': 'T', 'T': 'A', 'G': 'C', 'C': 'G'}
return ''.join(Dna_dict[letter] for letter in dna if letter in Dna_dict.keys())
'''also we can simply do : return dna.translate(str.maketrans('ATTGC', 'TAACG'))'''
| """Deoxyribonucleic acid (DNA) is a chemical found in the nucleus
of cells and carries the "instructions" for the development and functioning of living organisms.
If you want to know more http://en.wikipedia.org/wiki/DNA
In DNA strings, symbols "A" and "T" are complements of each other,
as "C" and "G". You have function with one side of the DNA
(string, except for Haskell); you need to get the other complementary side.
DNA strand is never empty or there is no DNA at all (again, except for Haskell)."""
def dna_strand(dna):
dna_dict = {'A': 'T', 'T': 'A', 'G': 'C', 'C': 'G'}
return ''.join((Dna_dict[letter] for letter in dna if letter in Dna_dict.keys()))
"also we can simply do : return dna.translate(str.maketrans('ATTGC', 'TAACG'))" |
#!/usr/bin/env python3
# -*- coding:utf-8 -*-
#
# @name : E-ntel - Email Information Gathering
# @url : http://github.com/CybernetiX-S3C
# @author : John Modica (CybernetiX S3C)
R = "\033[%s;31m"
B = "\033[%s;34m"
G = "\033[%s;32m"
W = "\033[%s;38m"
Y = "\033[%s;33m"
E = "\033[0m" | r = '\x1b[%s;31m'
b = '\x1b[%s;34m'
g = '\x1b[%s;32m'
w = '\x1b[%s;38m'
y = '\x1b[%s;33m'
e = '\x1b[0m' |
# dummy wordlist
# by Jeeb
# Information about your version of Wordle
Metadata = {
"name": "Dummy",
"version": "dummy",
"guesses": 4,
"launch": (2222, 2, 16),
"boxes": ["[]", "!!", "<3", " ", " "],
"colors": [0x1666666, 0x1bb9900, 0x1008800, 0xe8e8e8, 0x1222222],
"keyboard": ["aaaaaaaaaa"], # max 10 keys per row, please
}
# Your custom list of non-answer words goes here
Words = ["b", "c", "d", "e", "f"]
# Your custom list of answer-words goes here
Answers = ["a"] | metadata = {'name': 'Dummy', 'version': 'dummy', 'guesses': 4, 'launch': (2222, 2, 16), 'boxes': ['[]', '!!', '<3', ' ', ' '], 'colors': [23488102, 29071616, 16812032, 15263976, 19014178], 'keyboard': ['aaaaaaaaaa']}
words = ['b', 'c', 'd', 'e', 'f']
answers = ['a'] |
a = a+1
a += 1
b = b-5
b -= 5
| a = a + 1
a += 1
b = b - 5
b -= 5 |
class FieldC():
def __init__(self, name, column_type, primary_key, default):
self.name = name
self.column_type = column_type
self.primary_key = primary_key
self.default = default
def __str__(self):
return '<%s, %s:%s>' % (self.__class__.__name__, self.column_type, self.name)
class StringFieldC(FieldC):
def __init__(self, name=None, primary_key=False, default=None, ddl='varchat(255)'):
super().__init__(name, ddl, primary_key, default)
class TinyIntFieldC(FieldC):
def __init__(self, name=None, default=0):
super().__init__(name, 'tinyint', False, default)
class IntFieldC(FieldC):
def __init__(self, name=None, primary_key=False, default=0):
super().__init__(name, 'int', primary_key, default)
class BigIntFieldC(FieldC):
def __init__(self, name=None, primary_key=False, default=0):
super().__init__(name, 'bigint', primary_key, default)
class DoubleFieldC(FieldC):
def __init__(self, name=None, primary_key=False, default=0.0):
super().__init__(name, 'double', primary_key, default)
class TextFieldC(FieldC):
def __init__(self, name=None, default=None):
super().__init__(name, 'text', False, default)
| class Fieldc:
def __init__(self, name, column_type, primary_key, default):
self.name = name
self.column_type = column_type
self.primary_key = primary_key
self.default = default
def __str__(self):
return '<%s, %s:%s>' % (self.__class__.__name__, self.column_type, self.name)
class Stringfieldc(FieldC):
def __init__(self, name=None, primary_key=False, default=None, ddl='varchat(255)'):
super().__init__(name, ddl, primary_key, default)
class Tinyintfieldc(FieldC):
def __init__(self, name=None, default=0):
super().__init__(name, 'tinyint', False, default)
class Intfieldc(FieldC):
def __init__(self, name=None, primary_key=False, default=0):
super().__init__(name, 'int', primary_key, default)
class Bigintfieldc(FieldC):
def __init__(self, name=None, primary_key=False, default=0):
super().__init__(name, 'bigint', primary_key, default)
class Doublefieldc(FieldC):
def __init__(self, name=None, primary_key=False, default=0.0):
super().__init__(name, 'double', primary_key, default)
class Textfieldc(FieldC):
def __init__(self, name=None, default=None):
super().__init__(name, 'text', False, default) |
#line = r'''execute if score waveGlowTimer glowTimer matches %s run tag @e[type=!player,type=!dolphin,distance=%s,nbt={Attributes:[{Name:"generic.attackDamage"}]},nbt=!{Glowing: 1b}] add madeGlowing'''
#type=!player,type=!dolphin,distance=16..20,nbt={Attributes:[{Name:"generic.attackDamage"}]},nbt=!{Glowing: 1b}
line = r'''execute if score waveGlowTimer glowTimer matches %s if entity @a[distance=%s] run tag @s add madeGlowing'''
bandDistance = 4
bandDuration = 0
minDistance = 16
maxDistance = 64
timeMod = (3 * bandDistance)
distMod = maxDistance - minDistance
def dotdotspan(start, end):
if start != end:
return "%s..%s" % (start, end)
return str(start)
maxDistance += (minDistance - maxDistance) % timeMod
print("#NOTE: The conditions for waveGlowTimer wrapping in 'dotick' must be made to match the maximum count in this file (%r)" % (timeMod - 1,))
#print(r'''tag @e[type=!player,type=!dolphin,distance=..%s,nbt={Attributes:[{Name:"generic.attackDamage"}]},nbt=!{Glowing: 1b}] add madeGlowing''' % (minDistance-1,))
print(r'''execute if entity @a[distance=%s] run tag @s add madeGlowing''' % (minDistance-1,))
for ii, dd in enumerate(range(minDistance, maxDistance)):
startTime = ii % timeMod
endTime = (startTime + bandDuration) % timeMod
startDist = (dd - minDistance) % distMod + minDistance
endDist = (startDist + bandDistance - minDistance) % distMod + minDistance
if endTime != startTime + bandDuration:
if endDist != startDist + bandDistance:
print(line % (dotdotspan(startTime, timeMod-1), dotdotspan(startDist, distMod-1+minDistance)))
print(line % (dotdotspan(0, endTime), dotdotspan(startDist, distMod-1+minDistance)))
print(line % (dotdotspan(startTime, timeMod-1), dotdotspan(minDistance, endDist)))
print(line % (dotdotspan(0, endTime), dotdotspan(minDistance, endDist)))
else:
print(line % (dotdotspan(startTime, timeMod-1), dotdotspan(dd, dd + bandDistance)))
print(line % (dotdotspan(0, endTime), dotdotspan(dd, dd + bandDistance)))
else:
if endDist != startDist + bandDistance:
print(line % (dotdotspan(startTime, endTime), dotdotspan(startDist, distMod-1+minDistance)))
print(line % (dotdotspan(startTime, endTime), dotdotspan(minDistance, endDist)))
else:
print(line % (dotdotspan(startTime, endTime), dotdotspan(dd, dd + bandDistance)))
| line = 'execute if score waveGlowTimer glowTimer matches %s if entity @a[distance=%s] run tag @s add madeGlowing'
band_distance = 4
band_duration = 0
min_distance = 16
max_distance = 64
time_mod = 3 * bandDistance
dist_mod = maxDistance - minDistance
def dotdotspan(start, end):
if start != end:
return '%s..%s' % (start, end)
return str(start)
max_distance += (minDistance - maxDistance) % timeMod
print("#NOTE: The conditions for waveGlowTimer wrapping in 'dotick' must be made to match the maximum count in this file (%r)" % (timeMod - 1,))
print('execute if entity @a[distance=%s] run tag @s add madeGlowing' % (minDistance - 1,))
for (ii, dd) in enumerate(range(minDistance, maxDistance)):
start_time = ii % timeMod
end_time = (startTime + bandDuration) % timeMod
start_dist = (dd - minDistance) % distMod + minDistance
end_dist = (startDist + bandDistance - minDistance) % distMod + minDistance
if endTime != startTime + bandDuration:
if endDist != startDist + bandDistance:
print(line % (dotdotspan(startTime, timeMod - 1), dotdotspan(startDist, distMod - 1 + minDistance)))
print(line % (dotdotspan(0, endTime), dotdotspan(startDist, distMod - 1 + minDistance)))
print(line % (dotdotspan(startTime, timeMod - 1), dotdotspan(minDistance, endDist)))
print(line % (dotdotspan(0, endTime), dotdotspan(minDistance, endDist)))
else:
print(line % (dotdotspan(startTime, timeMod - 1), dotdotspan(dd, dd + bandDistance)))
print(line % (dotdotspan(0, endTime), dotdotspan(dd, dd + bandDistance)))
elif endDist != startDist + bandDistance:
print(line % (dotdotspan(startTime, endTime), dotdotspan(startDist, distMod - 1 + minDistance)))
print(line % (dotdotspan(startTime, endTime), dotdotspan(minDistance, endDist)))
else:
print(line % (dotdotspan(startTime, endTime), dotdotspan(dd, dd + bandDistance))) |
n,m=map(int,input().split())
x=[i for i in range(1,n+1)]
for i in range(m):
a,b=map(int,input().split())
x[a-1],x[b-1]=x[b-1],x[a-1]
for i in x: print(i,end=' ') | (n, m) = map(int, input().split())
x = [i for i in range(1, n + 1)]
for i in range(m):
(a, b) = map(int, input().split())
(x[a - 1], x[b - 1]) = (x[b - 1], x[a - 1])
for i in x:
print(i, end=' ') |
class DimError(Exception):
code = 1
error_types = dict(
InvalidPoolError=2,
InvalidIPError=3,
InvalidVLANError=4,
InvalidStatusError=5,
InvalidPriorityError=6,
InvalidGroupError=7,
InvalidUserError=8,
InvalidAccessRightError=9,
InvalidZoneError=10,
InvalidViewError=11,
MultipleViewsError=12,
InvalidParameterError=19,
AlreadyExistsError=20,
NotInPoolError=21,
NotInDelegationError=22,
PermissionDeniedError=23,
HasChildrenError=24,
)
for name, code in error_types.iteritems():
globals()[name] = type(name, (DimError,), {'code': code})
| class Dimerror(Exception):
code = 1
error_types = dict(InvalidPoolError=2, InvalidIPError=3, InvalidVLANError=4, InvalidStatusError=5, InvalidPriorityError=6, InvalidGroupError=7, InvalidUserError=8, InvalidAccessRightError=9, InvalidZoneError=10, InvalidViewError=11, MultipleViewsError=12, InvalidParameterError=19, AlreadyExistsError=20, NotInPoolError=21, NotInDelegationError=22, PermissionDeniedError=23, HasChildrenError=24)
for (name, code) in error_types.iteritems():
globals()[name] = type(name, (DimError,), {'code': code}) |
# ------------------------------------------------------------------------------
# Path setup
# Variables ending in _PATH are used as URL paths; those ending with _FSPATH
# are filesystem paths.
# For a single board setup (wakaba style), set SITE_PATH to / and point
# MATSUBA_PATH to /boardname/matsuba.py
# The base URL for the entire website. Used for RSS feeds if enabled, and some
# other stuff. The spam filter always accepts links within the site regardless
# of other spam-settings.
SITE_BASEURL = 'http://127.0.0.1/'
# Where are the boards?
# e.g. if you want http://yoursite.tld/matsuba/boardname/index.html
# then your SITE_PATH will be /matsuba
SITE_PATH = '/'
# Paths to various other places
MATSUBA_PATH = '/matsuba.py' # path to the dispatching cgi script
CSS_PATH = '/css'
JS_PATH = '/js'
IMG_PATH = '/img'
# Filesystem paths
SITE_FSPATH = '/home/you/public_html'
CSS_FSPATH = SITE_FSPATH + CSS_PATH
IMG_FSPATH = SITE_FSPATH + IMG_PATH
# Where is the private directory?
# This directory should NOT be web-accessible.
# Page templates and various other config files are located here.
PRIVATE_FSPATH = '/home/you/matsuba/priv'
# SQL configuration (for sqlite)
DB_DATABASE = PRIVATE_FSPATH + '/matsuba.db'
# ------------------------------------------------------------------------------
# Other options
# How many threads are shown on each page
THREADS_PER_PAGE = 10
# How many columns each row of the catalog should have
CATALOG_COLUMNS = THREADS_PER_PAGE
# How many pages of threads to keep
MAX_PAGES = 10
# How many replies before autosage
THREAD_AUTOSAGE_REPLIES = 100
# How many replies before autoclose
# (Not implemented)
THREAD_AUTOCLOSE_REPLIES = None
# How many replies to show per thread on the main page
MAX_REPLIES_SHOWN = 10
MAX_STICKY_REPLIES_SHOWN = 4
# How many characters can be in a name/link/subject (Wakaba uses 100 by default)
MAX_FIELD_LENGTH = 256
# How many characters can be in a post (Wakaba uses 8192)
MAX_MESSAGE_LENGTH = 65536
# Secret word, used to generate secure tripcodes. Make it long and random.
SECRET = "fill this with some actual random data"
# Allow posting new threads without images?
ALLOW_TEXT_THREADS = False
# Header that shows on the top of all boards. Don't put HTML here, since this
# shows up in the titlebar.
SITE_TITLE = u'hi'
# Top left text.
BOARD_LIST = u'''\
[Board list goes here]
'''
# Each board can override this.
MAX_FILESIZE = 1048576 * 4
# Force anonymous posting by default?
# This can be overriden on a per-board basis.
FORCED_ANON = False
# Name to use when no name is given.
# If this begins with "random:", names are randomized based on the parameters
# which follow. Possible values are:
# time[=seconds[+offset]] - reset names each day, or every <n> seconds
# (optionally adjusting the time first)
# by default, names will reset at midnight UTC if 'time' is given.
# board - each board gets a different name (otherwise random name is the
# same for all boards, as long as the other settings are the same)
# thread - names are unique to a thread. note that this requires an extra
# step to process the name for the first post in a thread.
# Names are always randomized by IP address, so even if no other parameters are
# given everyone still gets a unique statically assigned name. (as long as they
# have the same IP, of course)
ANONYMOUS = 'Anonymous'
#ANONYMOUS = 'random:board,thread,time'
# Rule set for generating poster IDs. Same format as above, except without the
# "random:" prefix. Set to an empty string to disable IDs.
# Possible values are:
# time, board, thread - same as above
# sage - ID is always "Heaven" for sage posts (2ch-ism)
# This rule will reset IDs every week, per board, per thread.
DEFAULT_ID_RULESET = '' # 'board,thread,time=604800,sage'
# Default template for boards without a defined template, and for pages that
# don't specify a board template (such as error messages)
DEFAULT_TEMPLATE = 'image'
# send xhtml to browsers that claim to support it?
# (this is broken for some reason, i don't know why)
USE_XHTML = False
# How many times can a link be repeated in a post before it is flagged as spam?
MAX_REPEATED_LINKS = 3
# for the two different flavors of rss feeds
RSS_REPLIES = 100
RSS_THREADS = 25
ABBREV_MAX_LINES = 15
ABBREV_LINE_LEN = 150
HARD_SPAM_FILES = ['spam-hardblock.txt']
SPAM_FILES = ['spam.txt', 'spam-local.txt'] + HARD_SPAM_FILES
LOGIN_TIMEOUT = 60 * 60 * 4
# ------------------------------------------------------------------------------
# Thumbnailing
THUMBNAIL_SIZE = [250, 175] # [0] is for the first post, [1] is for replies
CATNAIL_SIZE = 50 # size for thumbnails on catalog.html
GIF_MAX_FILESIZE = 524288 # animated gif thumbnailing threshold (needs gifsicle)
GIFSICLE_PATH = '/usr/bin/gifsicle' # for thumbnailing animated GIF files
CONVERT_PATH = '/usr/bin/convert' # used if PIL fails or isn't installed; set to None to disable ImageMagick
SIPS_PATH = None # for OS X
JPEG_QUALITY = 75
# Default thumbnails. These should go in the site-shared directory.
FALLBACK_THUMBNAIL = 'no_thumbnail.png'
DELETED_THUMBNAIL = 'file_deleted.png'
DELETED_THUMBNAIL_RES = 'file_deleted_res.png'
# ------------------------------------------------------------------------------
# don't mess with this
SITE_BASEURL = SITE_BASEURL.rstrip('/')
SITE_PATH = SITE_PATH.rstrip('/')
| site_baseurl = 'http://127.0.0.1/'
site_path = '/'
matsuba_path = '/matsuba.py'
css_path = '/css'
js_path = '/js'
img_path = '/img'
site_fspath = '/home/you/public_html'
css_fspath = SITE_FSPATH + CSS_PATH
img_fspath = SITE_FSPATH + IMG_PATH
private_fspath = '/home/you/matsuba/priv'
db_database = PRIVATE_FSPATH + '/matsuba.db'
threads_per_page = 10
catalog_columns = THREADS_PER_PAGE
max_pages = 10
thread_autosage_replies = 100
thread_autoclose_replies = None
max_replies_shown = 10
max_sticky_replies_shown = 4
max_field_length = 256
max_message_length = 65536
secret = 'fill this with some actual random data'
allow_text_threads = False
site_title = u'hi'
board_list = u'[Board list goes here]\n'
max_filesize = 1048576 * 4
forced_anon = False
anonymous = 'Anonymous'
default_id_ruleset = ''
default_template = 'image'
use_xhtml = False
max_repeated_links = 3
rss_replies = 100
rss_threads = 25
abbrev_max_lines = 15
abbrev_line_len = 150
hard_spam_files = ['spam-hardblock.txt']
spam_files = ['spam.txt', 'spam-local.txt'] + HARD_SPAM_FILES
login_timeout = 60 * 60 * 4
thumbnail_size = [250, 175]
catnail_size = 50
gif_max_filesize = 524288
gifsicle_path = '/usr/bin/gifsicle'
convert_path = '/usr/bin/convert'
sips_path = None
jpeg_quality = 75
fallback_thumbnail = 'no_thumbnail.png'
deleted_thumbnail = 'file_deleted.png'
deleted_thumbnail_res = 'file_deleted_res.png'
site_baseurl = SITE_BASEURL.rstrip('/')
site_path = SITE_PATH.rstrip('/') |
def type(a,b):
if isinstance(a,int) and isinstance(b,int):
return a+b
return 'Not integer type'
print(type(2,3))
print(type('a','boy')) | def type(a, b):
if isinstance(a, int) and isinstance(b, int):
return a + b
return 'Not integer type'
print(type(2, 3))
print(type('a', 'boy')) |
obj0 = SystemBusNode()
obj1 = SystemBusDeviceNode(
qom_type = "TYPE_INTERRUPT_CONTROLLER",
system_bus = obj0,
var_base = "interrupt_controller"
)
obj2 = SystemBusDeviceNode(
qom_type = "TYPE_UART",
system_bus = obj0,
var_base = "uart"
)
obj3 = DeviceNode(
qom_type = "TYPE_CPU",
var_base = "cpu"
)
obj4 = SystemBusDeviceNode(
qom_type = "UART",
system_bus = obj0,
var_base = "uart"
)
obj5 = SystemBusDeviceNode(
qom_type = "TYPE_PCI_HOST",
system_bus = obj0,
var_base = "pci_host"
)
obj6 = PCIExpressBusNode(
host_bridge = obj5
)
obj7 = PCIExpressDeviceNode(
qom_type = "TYPE_ETHERNET",
pci_express_bus = obj6,
slot = 0,
function = 0,
var_base = "ethernet"
)
obj8 = PCIExpressDeviceNode(
qom_type = "TYPE_ETHERNET",
pci_express_bus = obj6,
slot = 0,
function = 0,
var_base = "ethernet"
)
obj9 = SystemBusDeviceNode(
qom_type = "TYPE_ROM",
system_bus = obj0,
var_base = "rom"
)
obj10 = SystemBusDeviceNode(
qom_type = "TYPE_HID",
system_bus = obj0,
var_base = "hid"
)
obj11 = SystemBusDeviceNode(
qom_type = "TYPE_DISPLAY",
system_bus = obj0,
var_base = "display"
)
obj12 = IRQLine(
src_dev = obj1,
dst_dev = obj3
)
obj13 = IRQHub(
srcs = [],
dsts = []
)
obj14 = IRQLine(
src_dev = obj13,
dst_dev = obj1
)
obj15 = IRQLine(
src_dev = obj2,
dst_dev = obj13
)
obj16 = IRQLine(
src_dev = obj4,
dst_dev = obj13
)
obj17 = IRQLine(
src_dev = obj5,
dst_dev = obj1,
dst_irq_idx = 0x1
)
obj18 = IRQLine(
src_dev = obj9,
dst_dev = obj1,
dst_irq_idx = 0x2
)
obj19 = IRQLine(
src_dev = obj11,
dst_dev = obj1,
dst_irq_idx = 0x3
)
obj20 = IRQLine(
src_dev = obj10,
dst_dev = obj1,
dst_irq_idx = 0x4
)
obj21 = MachineNode(
name = "description0",
directory = ""
)
obj21.add_node(obj0, with_id = 0)
obj21.add_node(obj1, with_id = 1)
obj21.add_node(obj2, with_id = 2)
obj21.add_node(obj13, with_id = 3)
obj21.add_node(obj3, with_id = 4)
obj21.add_node(obj12, with_id = 5)
obj21.add_node(obj14, with_id = 6)
obj21.add_node(obj4, with_id = 7)
obj21.add_node(obj15, with_id = 8)
obj21.add_node(obj16, with_id = 9)
obj21.add_node(obj5, with_id = 10)
obj21.add_node(obj6, with_id = 11)
obj21.add_node(obj7, with_id = 12)
obj21.add_node(obj8, with_id = 13)
obj21.add_node(obj17, with_id = 14)
obj21.add_node(obj9, with_id = 15)
obj21.add_node(obj18, with_id = 16)
obj21.add_node(obj10, with_id = 17)
obj21.add_node(obj11, with_id = 18)
obj21.add_node(obj19, with_id = 19)
obj21.add_node(obj20, with_id = 20)
obj22 = MachineWidgetLayout(
mdwl = {
0: (
41.20573293511035,
125.9760158583141
),
0x1: (
96.1447438641203,
96.92583042837722
),
0x2: (
84.0,
189.0
),
0x3: (
148.0,
157.0
),
0x4: (
201.0,
34.0
),
0x7: (
154.0,
217.0
),
0xa: (
273.0,
241.0
),
0xb: (
293.0,
142.0
),
0xc: (
334.0,
55.0
),
0xd: (
333.0,
98.0
),
0xf: (
112.0,
26.0
),
0x11: (
-7.0,
16.0
),
0x12: (
-39.0,
60.0
),
-1: {
"physical layout": False,
"IRQ lines points": {
0x10: [],
0x13: [],
0x14: [],
0x5: [],
0x6: [],
0x8: [],
0x9: [],
0xe: [
(
230.0,
210.0
),
(
229.0,
165.0
)
]
},
"show mesh": False,
"mesh step": 0x14
}
},
mtwl = {},
use_tabs = True
)
obj23 = GUILayout(
desc_name = "description0",
opaque = obj22,
shown = True
)
obj23.lid = 0
obj24 = GUIProject(
layouts = [
obj23
],
build_path = None,
descriptions = [
obj21
]
)
| obj0 = system_bus_node()
obj1 = system_bus_device_node(qom_type='TYPE_INTERRUPT_CONTROLLER', system_bus=obj0, var_base='interrupt_controller')
obj2 = system_bus_device_node(qom_type='TYPE_UART', system_bus=obj0, var_base='uart')
obj3 = device_node(qom_type='TYPE_CPU', var_base='cpu')
obj4 = system_bus_device_node(qom_type='UART', system_bus=obj0, var_base='uart')
obj5 = system_bus_device_node(qom_type='TYPE_PCI_HOST', system_bus=obj0, var_base='pci_host')
obj6 = pci_express_bus_node(host_bridge=obj5)
obj7 = pci_express_device_node(qom_type='TYPE_ETHERNET', pci_express_bus=obj6, slot=0, function=0, var_base='ethernet')
obj8 = pci_express_device_node(qom_type='TYPE_ETHERNET', pci_express_bus=obj6, slot=0, function=0, var_base='ethernet')
obj9 = system_bus_device_node(qom_type='TYPE_ROM', system_bus=obj0, var_base='rom')
obj10 = system_bus_device_node(qom_type='TYPE_HID', system_bus=obj0, var_base='hid')
obj11 = system_bus_device_node(qom_type='TYPE_DISPLAY', system_bus=obj0, var_base='display')
obj12 = irq_line(src_dev=obj1, dst_dev=obj3)
obj13 = irq_hub(srcs=[], dsts=[])
obj14 = irq_line(src_dev=obj13, dst_dev=obj1)
obj15 = irq_line(src_dev=obj2, dst_dev=obj13)
obj16 = irq_line(src_dev=obj4, dst_dev=obj13)
obj17 = irq_line(src_dev=obj5, dst_dev=obj1, dst_irq_idx=1)
obj18 = irq_line(src_dev=obj9, dst_dev=obj1, dst_irq_idx=2)
obj19 = irq_line(src_dev=obj11, dst_dev=obj1, dst_irq_idx=3)
obj20 = irq_line(src_dev=obj10, dst_dev=obj1, dst_irq_idx=4)
obj21 = machine_node(name='description0', directory='')
obj21.add_node(obj0, with_id=0)
obj21.add_node(obj1, with_id=1)
obj21.add_node(obj2, with_id=2)
obj21.add_node(obj13, with_id=3)
obj21.add_node(obj3, with_id=4)
obj21.add_node(obj12, with_id=5)
obj21.add_node(obj14, with_id=6)
obj21.add_node(obj4, with_id=7)
obj21.add_node(obj15, with_id=8)
obj21.add_node(obj16, with_id=9)
obj21.add_node(obj5, with_id=10)
obj21.add_node(obj6, with_id=11)
obj21.add_node(obj7, with_id=12)
obj21.add_node(obj8, with_id=13)
obj21.add_node(obj17, with_id=14)
obj21.add_node(obj9, with_id=15)
obj21.add_node(obj18, with_id=16)
obj21.add_node(obj10, with_id=17)
obj21.add_node(obj11, with_id=18)
obj21.add_node(obj19, with_id=19)
obj21.add_node(obj20, with_id=20)
obj22 = machine_widget_layout(mdwl={0: (41.20573293511035, 125.9760158583141), 1: (96.1447438641203, 96.92583042837722), 2: (84.0, 189.0), 3: (148.0, 157.0), 4: (201.0, 34.0), 7: (154.0, 217.0), 10: (273.0, 241.0), 11: (293.0, 142.0), 12: (334.0, 55.0), 13: (333.0, 98.0), 15: (112.0, 26.0), 17: (-7.0, 16.0), 18: (-39.0, 60.0), -1: {'physical layout': False, 'IRQ lines points': {16: [], 19: [], 20: [], 5: [], 6: [], 8: [], 9: [], 14: [(230.0, 210.0), (229.0, 165.0)]}, 'show mesh': False, 'mesh step': 20}}, mtwl={}, use_tabs=True)
obj23 = gui_layout(desc_name='description0', opaque=obj22, shown=True)
obj23.lid = 0
obj24 = gui_project(layouts=[obj23], build_path=None, descriptions=[obj21]) |
FALSE=0
TRUE=1
DBSAVE=1
DBNOSAVE=0
INT_EXIT=0
INT_CONTINUE=1
INT_CANCEL=2
INT_TIMEOUT=3
DBMAXNUMLEN=33
DBMAXNAME=30
DBVERSION_UNKNOWN=0
DBVERSION_46=1
DBVERSION_100=2
DBVERSION_42=3
DBVERSION_70=4
DBVERSION_71=5
DBVERSION_72=6
DBTDS_UNKNOWN=0
DBTXPLEN=16
BCPMAXERRS=1
BCPFIRST=2
BCPLAST=3
BCPBATCH=4
BCPKEEPIDENTITY=8
BCPLABELED=5
BCPHINTS=6
DBCMDNONE=0
DBCMDPEND=1
DBCMDSENT=2
DBPARSEONLY=0
DBESTIMATE=1
DBSHOWPLAN=2
DBNOEXEC=3
DBARITHIGNORE=4
DBNOCOUNT=5
DBARITHABORT=6
DBTEXTLIMIT=7
DBBROWSE=8
DBOFFSET=9
DBSTAT=10
DBERRLVL=11
DBCONFIRM=12
DBSTORPROCID=13
DBBUFFER=14
DBNOAUTOFREE=15
DBROWCOUNT=16
DBTEXTSIZE=17
DBNATLANG=18
DBDATEFORMAT=19
DBPRPAD=20
DBPRCOLSEP=21
DBPRLINELEN=22
DBPRLINESEP=23
DBLFCONVERT=24
DBDATEFIRST=25
DBCHAINXACTS=26
DBFIPSFLAG=27
DBISOLATION=28
DBAUTH=29
DBIDENTITY=30
DBNOIDCOL=31
DBDATESHORT=32
DBCLIENTCURSORS=33
DBSETTIME=34
DBQUOTEDIDENT=35
DBNUMOPTIONS=36
DBPADOFF=0
DBPADON=1
OFF=0
ON=1
NOSUCHOPTION=2
MAXOPTTEXT=32
DBRESULT=1
DBNOTIFICATION=2
DBTIMEOUT=3
DBINTERRUPT=4
DBTXTSLEN=8
CHARBIND=0
STRINGBIND=1
NTBSTRINGBIND=2
VARYCHARBIND=3
VARYBINBIND=4
TINYBIND=6
SMALLBIND=7
INTBIND=8
FLT8BIND=9
REALBIND=10
DATETIMEBIND=11
SMALLDATETIMEBIND=12
MONEYBIND=13
SMALLMONEYBIND=14
BINARYBIND=15
BITBIND=16
NUMERICBIND=17
DECIMALBIND=18
BIGINTBIND=30
DBPRCOLSEP=21
DBPRLINELEN=22
DBRPCRETURN=1
DBRPCDEFAULT=2
NO_MORE_RESULTS=2
SUCCEED=1
FAIL=0
DB_IN=1
DB_OUT=2
DB_QUERYOUT=3
DBSINGLE=0
DBDOUBLE=1
DBBOTH=2
DBSETHOST=1
DBSETUSER=2
DBSETPWD=3
DBSETAPP=5
DBSETBCP=6
DBSETCHARSET=10
DBSETPACKET=11
DBSETENCRYPT=12
DBSETLABELED=13
DBSETDBNAME=14 | false = 0
true = 1
dbsave = 1
dbnosave = 0
int_exit = 0
int_continue = 1
int_cancel = 2
int_timeout = 3
dbmaxnumlen = 33
dbmaxname = 30
dbversion_unknown = 0
dbversion_46 = 1
dbversion_100 = 2
dbversion_42 = 3
dbversion_70 = 4
dbversion_71 = 5
dbversion_72 = 6
dbtds_unknown = 0
dbtxplen = 16
bcpmaxerrs = 1
bcpfirst = 2
bcplast = 3
bcpbatch = 4
bcpkeepidentity = 8
bcplabeled = 5
bcphints = 6
dbcmdnone = 0
dbcmdpend = 1
dbcmdsent = 2
dbparseonly = 0
dbestimate = 1
dbshowplan = 2
dbnoexec = 3
dbarithignore = 4
dbnocount = 5
dbarithabort = 6
dbtextlimit = 7
dbbrowse = 8
dboffset = 9
dbstat = 10
dberrlvl = 11
dbconfirm = 12
dbstorprocid = 13
dbbuffer = 14
dbnoautofree = 15
dbrowcount = 16
dbtextsize = 17
dbnatlang = 18
dbdateformat = 19
dbprpad = 20
dbprcolsep = 21
dbprlinelen = 22
dbprlinesep = 23
dblfconvert = 24
dbdatefirst = 25
dbchainxacts = 26
dbfipsflag = 27
dbisolation = 28
dbauth = 29
dbidentity = 30
dbnoidcol = 31
dbdateshort = 32
dbclientcursors = 33
dbsettime = 34
dbquotedident = 35
dbnumoptions = 36
dbpadoff = 0
dbpadon = 1
off = 0
on = 1
nosuchoption = 2
maxopttext = 32
dbresult = 1
dbnotification = 2
dbtimeout = 3
dbinterrupt = 4
dbtxtslen = 8
charbind = 0
stringbind = 1
ntbstringbind = 2
varycharbind = 3
varybinbind = 4
tinybind = 6
smallbind = 7
intbind = 8
flt8_bind = 9
realbind = 10
datetimebind = 11
smalldatetimebind = 12
moneybind = 13
smallmoneybind = 14
binarybind = 15
bitbind = 16
numericbind = 17
decimalbind = 18
bigintbind = 30
dbprcolsep = 21
dbprlinelen = 22
dbrpcreturn = 1
dbrpcdefault = 2
no_more_results = 2
succeed = 1
fail = 0
db_in = 1
db_out = 2
db_queryout = 3
dbsingle = 0
dbdouble = 1
dbboth = 2
dbsethost = 1
dbsetuser = 2
dbsetpwd = 3
dbsetapp = 5
dbsetbcp = 6
dbsetcharset = 10
dbsetpacket = 11
dbsetencrypt = 12
dbsetlabeled = 13
dbsetdbname = 14 |
# O(N) where n is len of string
def get_str_zig_zagged(s, numRows):
if numRows == 1:
return s
ret = ''
n = len(s)
cycle_len = numRows*2 - 2
for i in range(numRows):
j = 0
while j +i < n:
ret += s[j+i]
if (i != 0 and i != numRows -1 and j + cycle_len -i < n):
ret += s[j + cycle_len - i]
j += cycle_len
return ret | def get_str_zig_zagged(s, numRows):
if numRows == 1:
return s
ret = ''
n = len(s)
cycle_len = numRows * 2 - 2
for i in range(numRows):
j = 0
while j + i < n:
ret += s[j + i]
if i != 0 and i != numRows - 1 and (j + cycle_len - i < n):
ret += s[j + cycle_len - i]
j += cycle_len
return ret |
red = 0
black = 1
empty = 2
#Expected Outcome: True
row_win = [
[empty, empty, empty, empty, empty, empty, empty],
[empty, empty, empty, empty, empty, empty, empty],
[empty, red, red, red, red, empty, empty],
[red, black, red, black, red, empty, empty],
[black, red, black, red, black, black, empty],
[black, black, red, black, black, red, black],
]
#Expected Outcome: True
col_win = [
[empty, empty, empty, empty, empty, empty, empty],
[empty, empty, empty, empty, empty, empty, empty],
[empty, red, empty, empty, empty, empty, empty],
[black, red, empty, empty, empty, empty, empty],
[black, red, empty, empty, empty, empty, empty],
[black, red, black, empty, empty, empty, empty],
]
#Expected Outcome: True
pos_diagonal_win = [
[empty, empty, empty, empty, empty, empty, empty],
[empty, empty, empty, empty, empty, empty, empty],
[empty, empty, empty, red, empty, empty, empty],
[empty, empty, red, black, empty, empty, empty],
[black, red, red, black, black, empty, empty],
[red, red, black, black, black, empty, empty],
]
#Expected Outcome: True
neg_diagonal_win = [
[empty, empty, empty, empty, empty, empty, empty],
[empty, empty, empty, empty, empty, empty, empty],
[red, black, empty, empty, empty, empty, empty],
[black, red, empty, empty, empty, empty, empty],
[black, red, red, black, empty, empty, empty],
[black, red, black, red, empty, empty, empty],
]
#Expected Outcome: True
almost_row_win = [
[empty, empty, empty, empty, empty, empty, empty],
[empty, empty, empty, empty, empty, empty, empty],
[empty, red, red, red, empty, empty, red],
[red, black, red, black, red, black, black],
[black, red, black, red, black, black, red],
[black, black, red, black, black, red, black],
]
#Expected Outcome: True
almost_col_win = [
[empty, empty, empty, empty, empty, empty, empty],
[empty, empty, empty, empty, empty, empty, empty],
[empty, empty, empty, empty, empty, empty, empty],
[black, red, empty, empty, empty, empty, empty],
[black, red, empty, empty, empty, empty, empty],
[black, red, black, empty, empty, empty, empty],
]
#Expected Outcome: True
almost_pos_diagonal_win = [
[empty, empty, empty, empty, empty, empty, empty],
[empty, empty, empty, empty, empty, empty, empty],
[empty, empty, empty, empty, empty, empty, empty],
[black, red, red, black, empty, empty, empty],
[black, red, red, black, empty, empty, empty],
[red, red, black, black, black, empty, empty],
]
#Expected Outcome: True
almost_neg_diagonal_win = [
[empty, empty, empty, empty, empty, empty, empty],
[empty, empty, empty, empty, empty, empty, empty],
[red, empty, empty, empty, empty, empty, empty],
[black, red, empty, empty, empty, empty, empty],
[black, red, red, empty, empty, empty, empty],
[black, red, black, empty, empty, empty, empty],
]
#Expected Outcome: False
col_loss = [
[empty, empty, empty, empty, empty, empty, empty],
[empty, empty, empty, empty, empty, empty, empty],
[black, empty, empty, empty, empty, empty, empty],
[black, red, empty, empty, empty, empty, empty],
[black, red, empty, empty, empty, empty, empty],
[black, red, empty, empty, empty, empty, empty],
]
#Expected Outcome: False (invalid board)
col_black_won_first = [
[empty, empty, empty, empty, empty, empty, empty],
[empty, empty, empty, empty, empty, empty, empty],
[black, red, empty, empty, empty, empty, empty],
[black, red, empty, empty, empty, empty, empty],
[black, red, empty, empty, empty, empty, empty],
[black, red, empty, empty, empty, empty, empty],
]
#Expected Outcome: False
black_won = [
[empty, empty, empty, empty, empty, empty, empty],
[empty, empty, empty, empty, empty, empty, empty],
[black, empty, empty, empty, empty, empty, empty],
[black, red, empty, empty, empty, empty, empty],
[black, red, empty, empty, empty, empty, empty],
[black, red, empty, empty, empty, empty, empty],
] | red = 0
black = 1
empty = 2
row_win = [[empty, empty, empty, empty, empty, empty, empty], [empty, empty, empty, empty, empty, empty, empty], [empty, red, red, red, red, empty, empty], [red, black, red, black, red, empty, empty], [black, red, black, red, black, black, empty], [black, black, red, black, black, red, black]]
col_win = [[empty, empty, empty, empty, empty, empty, empty], [empty, empty, empty, empty, empty, empty, empty], [empty, red, empty, empty, empty, empty, empty], [black, red, empty, empty, empty, empty, empty], [black, red, empty, empty, empty, empty, empty], [black, red, black, empty, empty, empty, empty]]
pos_diagonal_win = [[empty, empty, empty, empty, empty, empty, empty], [empty, empty, empty, empty, empty, empty, empty], [empty, empty, empty, red, empty, empty, empty], [empty, empty, red, black, empty, empty, empty], [black, red, red, black, black, empty, empty], [red, red, black, black, black, empty, empty]]
neg_diagonal_win = [[empty, empty, empty, empty, empty, empty, empty], [empty, empty, empty, empty, empty, empty, empty], [red, black, empty, empty, empty, empty, empty], [black, red, empty, empty, empty, empty, empty], [black, red, red, black, empty, empty, empty], [black, red, black, red, empty, empty, empty]]
almost_row_win = [[empty, empty, empty, empty, empty, empty, empty], [empty, empty, empty, empty, empty, empty, empty], [empty, red, red, red, empty, empty, red], [red, black, red, black, red, black, black], [black, red, black, red, black, black, red], [black, black, red, black, black, red, black]]
almost_col_win = [[empty, empty, empty, empty, empty, empty, empty], [empty, empty, empty, empty, empty, empty, empty], [empty, empty, empty, empty, empty, empty, empty], [black, red, empty, empty, empty, empty, empty], [black, red, empty, empty, empty, empty, empty], [black, red, black, empty, empty, empty, empty]]
almost_pos_diagonal_win = [[empty, empty, empty, empty, empty, empty, empty], [empty, empty, empty, empty, empty, empty, empty], [empty, empty, empty, empty, empty, empty, empty], [black, red, red, black, empty, empty, empty], [black, red, red, black, empty, empty, empty], [red, red, black, black, black, empty, empty]]
almost_neg_diagonal_win = [[empty, empty, empty, empty, empty, empty, empty], [empty, empty, empty, empty, empty, empty, empty], [red, empty, empty, empty, empty, empty, empty], [black, red, empty, empty, empty, empty, empty], [black, red, red, empty, empty, empty, empty], [black, red, black, empty, empty, empty, empty]]
col_loss = [[empty, empty, empty, empty, empty, empty, empty], [empty, empty, empty, empty, empty, empty, empty], [black, empty, empty, empty, empty, empty, empty], [black, red, empty, empty, empty, empty, empty], [black, red, empty, empty, empty, empty, empty], [black, red, empty, empty, empty, empty, empty]]
col_black_won_first = [[empty, empty, empty, empty, empty, empty, empty], [empty, empty, empty, empty, empty, empty, empty], [black, red, empty, empty, empty, empty, empty], [black, red, empty, empty, empty, empty, empty], [black, red, empty, empty, empty, empty, empty], [black, red, empty, empty, empty, empty, empty]]
black_won = [[empty, empty, empty, empty, empty, empty, empty], [empty, empty, empty, empty, empty, empty, empty], [black, empty, empty, empty, empty, empty, empty], [black, red, empty, empty, empty, empty, empty], [black, red, empty, empty, empty, empty, empty], [black, red, empty, empty, empty, empty, empty]] |
class Vertex:
def __init__(self, value):
self.value = value
self.edges = {}
def add_edge(self, vertex, weight=0):
self.edges[vertex] = weight
def get_edges(self):
return list(self.edges.keys())
class Graph:
def __init__(self, directed = False):
self.graph_dict = {}
self.directed = directed
def add_vertex(self, vertex):
self.graph_dict[vertex.value] = vertex
def add_edge(self, from_vertex, to_vertex, weight = 0):
self.graph_dict[from_vertex.value].add_edge(to_vertex.value, weight)
if not self.directed:
self.graph_dict[to_vertex.value].add_edge(from_vertex.value, weight)
#BFS
def find_path(self, start_vertex, end_vertex):
start = [start_vertex]
seen = {}
while len(start) > 0:
current_vertex = start.pop(0)
seen[current_vertex] = True
if current_vertex == end_vertex:
return True
else:
vertices_to_visit = set(self.graph_dict[current_vertex].edges.keys())
start += [vertex for vertex in vertices_to_visit if vertex not in seen]
return False
class adjacency_matrices:
def __init__(self, data):
self.graph = data
self.matrix_elements = sorted(self.graph.keys())
self.cols = self.rows = len(self.matrix_elements)
def create_matrix(self):
adjacency_matrices = [[0 for x in range(self.rows)] for y in range(self.cols)]
edges_list = []
# we found all the vertexcies that have relationship between them
# then we store them in pair as
# [(A, B), (A, C), (B, E), ...]
for key in self.matrix_elements:
for neighbor in self.graph[key]:
edges_list.append((key, neighbor))
# then we fill the grids that relationship with 1
for edge in edges_list:
index_of_first_vertex = self.matrix_elements.index(edge[0])
index_of_second_vertex = self.matrix_elements.index(edge[1])
adjacency_matrices[index_of_first_vertex][index_of_second_vertex] = 1
| class Vertex:
def __init__(self, value):
self.value = value
self.edges = {}
def add_edge(self, vertex, weight=0):
self.edges[vertex] = weight
def get_edges(self):
return list(self.edges.keys())
class Graph:
def __init__(self, directed=False):
self.graph_dict = {}
self.directed = directed
def add_vertex(self, vertex):
self.graph_dict[vertex.value] = vertex
def add_edge(self, from_vertex, to_vertex, weight=0):
self.graph_dict[from_vertex.value].add_edge(to_vertex.value, weight)
if not self.directed:
self.graph_dict[to_vertex.value].add_edge(from_vertex.value, weight)
def find_path(self, start_vertex, end_vertex):
start = [start_vertex]
seen = {}
while len(start) > 0:
current_vertex = start.pop(0)
seen[current_vertex] = True
if current_vertex == end_vertex:
return True
else:
vertices_to_visit = set(self.graph_dict[current_vertex].edges.keys())
start += [vertex for vertex in vertices_to_visit if vertex not in seen]
return False
class Adjacency_Matrices:
def __init__(self, data):
self.graph = data
self.matrix_elements = sorted(self.graph.keys())
self.cols = self.rows = len(self.matrix_elements)
def create_matrix(self):
adjacency_matrices = [[0 for x in range(self.rows)] for y in range(self.cols)]
edges_list = []
for key in self.matrix_elements:
for neighbor in self.graph[key]:
edges_list.append((key, neighbor))
for edge in edges_list:
index_of_first_vertex = self.matrix_elements.index(edge[0])
index_of_second_vertex = self.matrix_elements.index(edge[1])
adjacency_matrices[index_of_first_vertex][index_of_second_vertex] = 1 |
N = int(input())
if N <= 5:
print(N + 2)
elif N == 6:
print('1')
else:
print('2')
| n = int(input())
if N <= 5:
print(N + 2)
elif N == 6:
print('1')
else:
print('2') |
# First step printing UI
def drawFields(field):
for row in range(5):
if row % 2 == 0:
fieldRow = int(row / 2)
for column in range(5): # 0,1,2,3,4 --> 0,.,1,.,2
if column % 2 == 0: # 0,2,4
fieldColumn = int(column / 2) # 0,1,2
if column != 4:
print(field[fieldColumn][fieldRow], end="")
else:
print(field[fieldColumn][fieldRow])
else:
print("|", end="")
else:
print("-----")
Player = 1
currentField = [[" ", " ", " "], [" ", " ", " "], [" ", " ", " "]]
drawFields(currentField)
while(True):
print("Player turn: ", Player)
MoveRow = int(input("Please enter the row: "))
MoveColumn = int(input("Please enter the column: "))
if Player == 1:
if currentField[MoveColumn][MoveRow] == " ":
currentField[MoveColumn][MoveRow] = "X"
Player = 2
else:
if currentField[MoveColumn][MoveRow] == " ":
currentField[MoveColumn][MoveRow] = "O"
Player = 1
drawFields(currentField)
| def draw_fields(field):
for row in range(5):
if row % 2 == 0:
field_row = int(row / 2)
for column in range(5):
if column % 2 == 0:
field_column = int(column / 2)
if column != 4:
print(field[fieldColumn][fieldRow], end='')
else:
print(field[fieldColumn][fieldRow])
else:
print('|', end='')
else:
print('-----')
player = 1
current_field = [[' ', ' ', ' '], [' ', ' ', ' '], [' ', ' ', ' ']]
draw_fields(currentField)
while True:
print('Player turn: ', Player)
move_row = int(input('Please enter the row: '))
move_column = int(input('Please enter the column: '))
if Player == 1:
if currentField[MoveColumn][MoveRow] == ' ':
currentField[MoveColumn][MoveRow] = 'X'
player = 2
elif currentField[MoveColumn][MoveRow] == ' ':
currentField[MoveColumn][MoveRow] = 'O'
player = 1
draw_fields(currentField) |
# print index of string
str_one = 'python land is a place for everyone not just beginner'
# 012345
print(str_one[0]) # print the first letter of our string str-one
print(str_one[-1]) # pring the last letter of our string str_one
# print special range of string
print(str_one[0:4]) # reult will be from index 0 till index 4, index 4 is not included, only 4 index is included.
print(str_one[0:]) # start from index 0 till end and will print whole string
print(str_one[1:]) # same as above just start from index 1
# f string in python, good for concat multiple string
first_name = 'pooya'
last_name = 'panahandeh'
message = f'{first_name} [{last_name}] is a beginner programmer.' # f string is a method to manipulate the string
print(message)
# get the number of element of string
course = 'python is awsome'
print(len(course))
# change string to upper case
print(course.upper())
# change letter to lower case
course_two = "NODEJS PROGRAMMING"
print(course_two.lower())
# finding specific element in string
str_two = 'we are one of the best group of people'
print(str_two.find('g'))
# replace two words in string
print(str_two.replace('best', 'fucking best'))
print('one' in str_two) # checking if there the string we mentioned is exist in str_two or not, result will be true or false
# division and remainder operation in python
print(10 / 3) # result will be float
print(10 // 3) # result will be integer
# multiplication
print(10 * 2) # multiplication of two number
print(10 ** 2) # power of number
# assign variable to number and manipulate.
x = 10
# x = x + 4 short way in next line
x += 4
print(x)
# first multiplication then addition
z = 10 + 2 ** 2
print(z)
| str_one = 'python land is a place for everyone not just beginner'
print(str_one[0])
print(str_one[-1])
print(str_one[0:4])
print(str_one[0:])
print(str_one[1:])
first_name = 'pooya'
last_name = 'panahandeh'
message = f'{first_name} [{last_name}] is a beginner programmer.'
print(message)
course = 'python is awsome'
print(len(course))
print(course.upper())
course_two = 'NODEJS PROGRAMMING'
print(course_two.lower())
str_two = 'we are one of the best group of people'
print(str_two.find('g'))
print(str_two.replace('best', 'fucking best'))
print('one' in str_two)
print(10 / 3)
print(10 // 3)
print(10 * 2)
print(10 ** 2)
x = 10
x += 4
print(x)
z = 10 + 2 ** 2
print(z) |
# https://leetcode.com/problems/excel-sheet-column-title/
# ---------------------------------------------------
# Runtime Complexity: O(log26(n)) => O(log(n))
# Space Complexity: O(log26(n)) => O(log(n)), if we take into account res, otherwise it's O(1).
class Solution:
def convertToTitle(self, n: int) -> str:
res = ''
while n > 0:
# Because Radix starts from 1 to 26.
# In contrast to decimal Radix (which is from 0 to 9)
n -= 1
ch_code = n % 26
n = (n - ch_code) // 26
res = chr(ord('A') + ch_code) + res
return res
# ---------------------------------------------------
# Test Cases
# ---------------------------------------------------
solution = Solution()
# 'A'
print(solution.convertToTitle(1))
# 'B'
print(solution.convertToTitle(2))
# 'Z'
print(solution.convertToTitle(26))
# 'AB'
print(solution.convertToTitle(28))
# 'ZY'
print(solution.convertToTitle(701))
# 'BMG'
print(solution.convertToTitle(1697))
| class Solution:
def convert_to_title(self, n: int) -> str:
res = ''
while n > 0:
n -= 1
ch_code = n % 26
n = (n - ch_code) // 26
res = chr(ord('A') + ch_code) + res
return res
solution = solution()
print(solution.convertToTitle(1))
print(solution.convertToTitle(2))
print(solution.convertToTitle(26))
print(solution.convertToTitle(28))
print(solution.convertToTitle(701))
print(solution.convertToTitle(1697)) |
class DataDictException(Exception):
def __init__(self, message, data_dict=None, exc=None):
self._message = message
if data_dict is None:
data_dict = {}
formatted_data_dict = {}
for key, value in data_dict.items():
formatted_data_dict[str(key)] = str(value)
if exc is not None:
formatted_data_dict['exc'] = str(exc)
self._formatted_data_dict = formatted_data_dict
formatted_message = '{0}: {1}'.format(self._message,
str(formatted_data_dict).replace(': ', '=').replace('\'', '')[1:-1])
super().__init__(formatted_message)
| class Datadictexception(Exception):
def __init__(self, message, data_dict=None, exc=None):
self._message = message
if data_dict is None:
data_dict = {}
formatted_data_dict = {}
for (key, value) in data_dict.items():
formatted_data_dict[str(key)] = str(value)
if exc is not None:
formatted_data_dict['exc'] = str(exc)
self._formatted_data_dict = formatted_data_dict
formatted_message = '{0}: {1}'.format(self._message, str(formatted_data_dict).replace(': ', '=').replace("'", '')[1:-1])
super().__init__(formatted_message) |
def hello_request(data):
data['type'] = 'hello_request'
return data
def hello_response(data):
data['type'] = 'hello_reply'
return data
def goodbye(data):
data['type'] = 'goodbye'
return data
def ok():
return {'type': 'ok'}
def shout(data):
data['type'] = 'shout'
return data
def proto_welcome():
return {'type': 'welcome'}
def proto_page(uri, pubkey, guid, text, signature, nickname, PGPPubKey, email,
bitmessage, arbiter, notary, arbiter_description, sin):
data = {
'type': 'page',
'uri': uri,
'pubkey': pubkey,
'senderGUID': guid,
'text': text,
'nickname': nickname,
'PGPPubKey': PGPPubKey,
'email': email,
'bitmessage': bitmessage,
'arbiter': arbiter,
'notary': notary,
'arbiter_description': arbiter_description,
'sin': sin
}
return data
def query_page(guid):
data = {'type': 'query_page', 'findGUID': guid}
return data
def order(id, buyer, seller, state, text, escrows=None, tx=None):
if not escrows:
escrows = []
data = {
'type': 'order',
'order_id': id,
'buyer': buyer.encode('hex'),
'seller': seller.encode('hex'),
'escrows': escrows
}
# this is who signs
# this is who the review is about
# the signature
# the signature
if data.get('tex'):
data['tx'] = tx.encode('hex')
# some text
data['text'] = text
# some text
data['address'] = ''
data['state'] = state
# new -> accepted/rejected -> payed -> sent -> received
return data
def proto_listing(productTitle, productDescription, productPrice,
productQuantity, market_id, productShippingPrice,
productImageName, productImageData):
data = {
'productTitle': productTitle,
'productDescription': productDescription,
'productPrice': productPrice,
'productQuantity': productQuantity,
'market_id': market_id,
'productShippingPrice': productShippingPrice,
'productImageName': productImageName,
'productImageData': productImageData
}
return data
def proto_store(key, value, originalPublisherID, age):
data = {
'type': 'store',
'key': key,
'value': value,
'originalPublisherID': originalPublisherID,
'age': age
}
return data
def negotiate_pubkey(nickname, ident_pubkey):
data = {
'type': 'negotiate_pubkey',
'nickname': nickname,
'ident_pubkey': ident_pubkey.encode("hex")
}
return data
def proto_response_pubkey(nickname, pubkey, signature):
data = {
'type': "proto_response_pubkey",
'nickname': nickname,
'pubkey': pubkey.encode("hex"),
'signature': signature.encode("hex")
}
return data
| def hello_request(data):
data['type'] = 'hello_request'
return data
def hello_response(data):
data['type'] = 'hello_reply'
return data
def goodbye(data):
data['type'] = 'goodbye'
return data
def ok():
return {'type': 'ok'}
def shout(data):
data['type'] = 'shout'
return data
def proto_welcome():
return {'type': 'welcome'}
def proto_page(uri, pubkey, guid, text, signature, nickname, PGPPubKey, email, bitmessage, arbiter, notary, arbiter_description, sin):
data = {'type': 'page', 'uri': uri, 'pubkey': pubkey, 'senderGUID': guid, 'text': text, 'nickname': nickname, 'PGPPubKey': PGPPubKey, 'email': email, 'bitmessage': bitmessage, 'arbiter': arbiter, 'notary': notary, 'arbiter_description': arbiter_description, 'sin': sin}
return data
def query_page(guid):
data = {'type': 'query_page', 'findGUID': guid}
return data
def order(id, buyer, seller, state, text, escrows=None, tx=None):
if not escrows:
escrows = []
data = {'type': 'order', 'order_id': id, 'buyer': buyer.encode('hex'), 'seller': seller.encode('hex'), 'escrows': escrows}
if data.get('tex'):
data['tx'] = tx.encode('hex')
data['text'] = text
data['address'] = ''
data['state'] = state
return data
def proto_listing(productTitle, productDescription, productPrice, productQuantity, market_id, productShippingPrice, productImageName, productImageData):
data = {'productTitle': productTitle, 'productDescription': productDescription, 'productPrice': productPrice, 'productQuantity': productQuantity, 'market_id': market_id, 'productShippingPrice': productShippingPrice, 'productImageName': productImageName, 'productImageData': productImageData}
return data
def proto_store(key, value, originalPublisherID, age):
data = {'type': 'store', 'key': key, 'value': value, 'originalPublisherID': originalPublisherID, 'age': age}
return data
def negotiate_pubkey(nickname, ident_pubkey):
data = {'type': 'negotiate_pubkey', 'nickname': nickname, 'ident_pubkey': ident_pubkey.encode('hex')}
return data
def proto_response_pubkey(nickname, pubkey, signature):
data = {'type': 'proto_response_pubkey', 'nickname': nickname, 'pubkey': pubkey.encode('hex'), 'signature': signature.encode('hex')}
return data |
# The new config inherits a base config to highlight the necessary modification
_base_ = '../cascade_rcnn/cascade_mask_rcnn_x101_32x4d_fpn_mstrain_3x_coco.py'
# We also need to change the num_classes in head to match the dataset's annotation
model = dict(
roi_head=dict(
bbox_head=[
dict(type='Shared2FCBBoxHead', num_classes=1),
dict(type='Shared2FCBBoxHead', num_classes=1),
dict(type='Shared2FCBBoxHead', num_classes=1)
],
mask_head=dict(num_classes=1)
)
)
# Modify dataset related settings
dataset_type = 'CocoDataset'
classes = ('nucleus',)
runner = dict(type='EpochBasedRunner', max_epochs=200)
test_pipeline = [
dict(type='LoadImageFromFile'),
dict(
type='MultiScaleFlipAug',
img_scale=(1333, 800),
flip=False,
transforms=[
dict(type='Resize', keep_ratio=True),
dict(type='RandomFlip'),
dict(
type='Normalize',
mean=[123.675, 116.28, 103.53],
std=[58.395, 57.12, 57.375],
to_rgb=True),
dict(type='Pad', size_divisor=32),
dict(type='DefaultFormatBundle'),
dict(type='Collect', keys=['img']),
])
]
train_pipeline = [
dict(type='LoadImageFromFile'),
dict(
type='LoadAnnotations',
with_bbox=True,
with_mask=True,
poly2mask=False),
dict(type='Resize', img_scale=(1333, 800), keep_ratio=True),
dict(type='RandomFlip', flip_ratio=0.5),
dict(
type='Normalize',
mean=[123.675, 116.28, 103.53],
std=[58.395, 57.12, 57.375],
to_rgb=True),
dict(type='Pad', size_divisor=32),
dict(type='DefaultFormatBundle'),
dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels', 'gt_masks'])
]
data = dict(
samples_per_gpu=1,
workers_per_gpu=1,
train=dict(
type='RepeatDataset',
times=3,
dataset=dict(
type='CocoDataset',
ann_file='/work/zchin31415/nucleus_data/annotations/instance_all_train.json',
img_prefix='/work/zchin31415/nucleus_data/all_train',
# classes=('tennis', )
pipeline=train_pipeline
),
classes=classes,
ann_file='/work/zchin31415/nucleus_data/annotations/instance_all_train.json',
img_prefix='/work/zchin31415/nucleus_data/all_train'),
val=dict(
type=dataset_type,
ann_file='/work/zchin31415/nucleus_data/annotations/instance_all_train.json',
img_prefix='/work/zchin31415/nucleus_data/all_train',
classes=classes),
test=dict(
type=dataset_type,
ann_file='/work/zchin31415/nucleus_data/annotations/instance_test.json',
img_prefix='/work/zchin31415/nucleus_data/test',
pipeline=test_pipeline,
classes=classes)
)
load_from = '/home/zchin31415/mmdet-nucleus-instance-segmentation/mmdetection/checkpoints/cascade_mask_rcnn_x101_32x4d_fpn_mstrain_3x_coco_20210706_225234-40773067.pth'
| _base_ = '../cascade_rcnn/cascade_mask_rcnn_x101_32x4d_fpn_mstrain_3x_coco.py'
model = dict(roi_head=dict(bbox_head=[dict(type='Shared2FCBBoxHead', num_classes=1), dict(type='Shared2FCBBoxHead', num_classes=1), dict(type='Shared2FCBBoxHead', num_classes=1)], mask_head=dict(num_classes=1)))
dataset_type = 'CocoDataset'
classes = ('nucleus',)
runner = dict(type='EpochBasedRunner', max_epochs=200)
test_pipeline = [dict(type='LoadImageFromFile'), dict(type='MultiScaleFlipAug', img_scale=(1333, 800), flip=False, transforms=[dict(type='Resize', keep_ratio=True), dict(type='RandomFlip'), dict(type='Normalize', mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True), dict(type='Pad', size_divisor=32), dict(type='DefaultFormatBundle'), dict(type='Collect', keys=['img'])])]
train_pipeline = [dict(type='LoadImageFromFile'), dict(type='LoadAnnotations', with_bbox=True, with_mask=True, poly2mask=False), dict(type='Resize', img_scale=(1333, 800), keep_ratio=True), dict(type='RandomFlip', flip_ratio=0.5), dict(type='Normalize', mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True), dict(type='Pad', size_divisor=32), dict(type='DefaultFormatBundle'), dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels', 'gt_masks'])]
data = dict(samples_per_gpu=1, workers_per_gpu=1, train=dict(type='RepeatDataset', times=3, dataset=dict(type='CocoDataset', ann_file='/work/zchin31415/nucleus_data/annotations/instance_all_train.json', img_prefix='/work/zchin31415/nucleus_data/all_train', pipeline=train_pipeline), classes=classes, ann_file='/work/zchin31415/nucleus_data/annotations/instance_all_train.json', img_prefix='/work/zchin31415/nucleus_data/all_train'), val=dict(type=dataset_type, ann_file='/work/zchin31415/nucleus_data/annotations/instance_all_train.json', img_prefix='/work/zchin31415/nucleus_data/all_train', classes=classes), test=dict(type=dataset_type, ann_file='/work/zchin31415/nucleus_data/annotations/instance_test.json', img_prefix='/work/zchin31415/nucleus_data/test', pipeline=test_pipeline, classes=classes))
load_from = '/home/zchin31415/mmdet-nucleus-instance-segmentation/mmdetection/checkpoints/cascade_mask_rcnn_x101_32x4d_fpn_mstrain_3x_coco_20210706_225234-40773067.pth' |
class Solution:
def maxCoins(self, piles: List[int]) -> int:
piles=sorted(piles)
n=len(piles)
answer=0
for i in range(int(n/3),n, 2):
answer+=piles[i]
return answer
| class Solution:
def max_coins(self, piles: List[int]) -> int:
piles = sorted(piles)
n = len(piles)
answer = 0
for i in range(int(n / 3), n, 2):
answer += piles[i]
return answer |
m: int; n: int; i: int; j: int
m = int(input("Qual a quantidade de linhas da matriz? "))
n = int(input("Qual a quantidade de colunas da matriz? "))
mat: [[int]] = [[0 for x in range(n)] for x in range(m)]
for i in range(0, m):
for j in range(0, n):
mat[i][j] = int(input(f"Elemento [{i},{j}]: "))
print("VALORES NEGATIVOS:")
for i in range(0, m):
for j in range(0, n):
if mat[i][j] < 0:
print(mat[i][j])
| m: int
n: int
i: int
j: int
m = int(input('Qual a quantidade de linhas da matriz? '))
n = int(input('Qual a quantidade de colunas da matriz? '))
mat: [[int]] = [[0 for x in range(n)] for x in range(m)]
for i in range(0, m):
for j in range(0, n):
mat[i][j] = int(input(f'Elemento [{i},{j}]: '))
print('VALORES NEGATIVOS:')
for i in range(0, m):
for j in range(0, n):
if mat[i][j] < 0:
print(mat[i][j]) |
#MenuTitle: Change LayerColor to Purple
# -*- coding: utf-8 -*-
font = Glyphs.font
selectedLayers = font.selectedLayers
for thisLayer in selectedLayers:
thisGlyph = thisLayer.parent
thisGlyph.layers[font.selectedFontMaster.id].color = 8
| font = Glyphs.font
selected_layers = font.selectedLayers
for this_layer in selectedLayers:
this_glyph = thisLayer.parent
thisGlyph.layers[font.selectedFontMaster.id].color = 8 |
# Line SPW setup for 17B-162 w/ rest frequencies
# SPW $: [Name, Restfreq, Num chans, Chans for uvcontsub]
# Notes for uvcontsub channels:
# - Avoid first and last 5% of channels in a SPW
# - Avoid -80 to -280 km/s for M33
# - Avoid -30 to 30 km/s for MW
# Channel offset b/w cubes made with test_line_imaging.py (excludes edge
# channels) and the full SPW (since we split from the full SPW):
# Halp - 7 channels
# OH - 13 channels
# HI - 205 channels
linespw_dict = {0: ["HI", "1.420405752GHz", 4096, "1240~1560;2820~3410"],
1: ["H166alp", "1.42473GHz", 128, "32~47;107~114"],
2: ["H164alp", "1.47734GHz", 128, "32~47;107~114"],
3: ["OH1612", "1.612231GHz", 256, "53~88;223~240"],
4: ["H158alp", "1.65154GHz", 128, "32~47;107~114"],
5: ["OH1665", "1.6654018GHz", 256, "53~88;223~240"],
6: ["OH1667", "1.667359GHz", 256, "53~88;223~240"],
7: ["OH1720", "1.72053GHz", 256, "53~88;223~240"],
8: ["H153alp", "1.81825GHz", 128, "32~47;107~114"],
9: ["H152alp", "1.85425GHz", 128, "32~47;107~114"]}
| linespw_dict = {0: ['HI', '1.420405752GHz', 4096, '1240~1560;2820~3410'], 1: ['H166alp', '1.42473GHz', 128, '32~47;107~114'], 2: ['H164alp', '1.47734GHz', 128, '32~47;107~114'], 3: ['OH1612', '1.612231GHz', 256, '53~88;223~240'], 4: ['H158alp', '1.65154GHz', 128, '32~47;107~114'], 5: ['OH1665', '1.6654018GHz', 256, '53~88;223~240'], 6: ['OH1667', '1.667359GHz', 256, '53~88;223~240'], 7: ['OH1720', '1.72053GHz', 256, '53~88;223~240'], 8: ['H153alp', '1.81825GHz', 128, '32~47;107~114'], 9: ['H152alp', '1.85425GHz', 128, '32~47;107~114']} |
'''
Input
An integer t, 1<=t<=100, denoting the number of testcases, followed by t lines, each containing a single integer n, 1<=n<=100.
Output
For each integer n given at input, display a line with the value of n!
Example
Sample input:
4
1
2
5
3
Sample output:
1
2
120
6
'''
t=int(input())
for i in range(t):
n=int(input())
ans=1
while n>1:
ans*=n
n-=1
print(ans) | """
Input
An integer t, 1<=t<=100, denoting the number of testcases, followed by t lines, each containing a single integer n, 1<=n<=100.
Output
For each integer n given at input, display a line with the value of n!
Example
Sample input:
4
1
2
5
3
Sample output:
1
2
120
6
"""
t = int(input())
for i in range(t):
n = int(input())
ans = 1
while n > 1:
ans *= n
n -= 1
print(ans) |
number = int(input())
dp = []
dp.append([0, 1])
for n in range(1, number):
dp.append([])
dp[n].append(sum(dp[n-1])) # 0
dp[n].append(dp[n-1][0]) # 1
print(sum(dp[number-1]))
| number = int(input())
dp = []
dp.append([0, 1])
for n in range(1, number):
dp.append([])
dp[n].append(sum(dp[n - 1]))
dp[n].append(dp[n - 1][0])
print(sum(dp[number - 1])) |
#!/usr/bin/env python3
with open('challenge67_data.txt', 'r') as f:
triangle = [[int(i) for i in l.split(' ')] for l in f.readlines()]
longest_paths = [[0] * (i+1) for i in range(len(triangle))]
# edges between x and x + 1
# Algorithm:
# Start at top
# Go to each branch, make note of the longest path to get to that point
# find the longest path in the bottom row
longest_paths[0][0] = triangle[0][0]
# now, each location has up to 2 sources (x and/or x-1, y-1)
# we can set the cost to arrive at each location the greater of the source + that locations cost
for y, row in enumerate(triangle):
if y == 0:
continue
for x, n in enumerate(row):
total_cost1 = 0
total_cost2 = 0
total_cost1 = n + longest_paths[y-1][x-1]
try:
total_cost2 = n + longest_paths[y-1][x]
except IndexError:
pass
longest_paths[y][x] = max(total_cost1, total_cost2)
# print('\n'.join([str(l) for l in longest_paths]))
print(max(longest_paths[-1]))
| with open('challenge67_data.txt', 'r') as f:
triangle = [[int(i) for i in l.split(' ')] for l in f.readlines()]
longest_paths = [[0] * (i + 1) for i in range(len(triangle))]
longest_paths[0][0] = triangle[0][0]
for (y, row) in enumerate(triangle):
if y == 0:
continue
for (x, n) in enumerate(row):
total_cost1 = 0
total_cost2 = 0
total_cost1 = n + longest_paths[y - 1][x - 1]
try:
total_cost2 = n + longest_paths[y - 1][x]
except IndexError:
pass
longest_paths[y][x] = max(total_cost1, total_cost2)
print(max(longest_paths[-1])) |
media_filter_parameter_schema = [
{
'name': 'media_id',
'in': 'query',
'required': False,
'description': 'List of integers identifying media.',
'explode': False,
'schema': {
'type': 'array',
'items': {
'type': 'integer',
'minimum': 1,
},
},
},
{
'name': 'type',
'in': 'query',
'required': False,
'description': 'Unique integer identifying media type.',
'schema': {'type': 'integer'},
},
{
'name': 'name',
'in': 'query',
'required': False,
'description': 'Name of the media to filter on.',
'schema': {'type': 'string'},
},
{
'name': 'section',
'in': 'query',
'required': False,
'description': 'Unique integer identifying a media section.',
'schema': {'type': 'integer'},
},
{
'name': 'dtype',
'in': 'query',
'required': False,
'description': 'Data type of the files, either image or video.',
'schema': {'type': 'string', 'enum': ['image', 'video', 'multi']},
},
{
'name': 'md5',
'in': 'query',
'required': False,
'description': 'MD5 sum of the media file.',
'schema': {'type': 'string'},
},
{
'name': 'gid',
'in': 'query',
'required': False,
'description': 'Upload group ID of the media file.',
'schema': {'type': 'string'},
},
{
'name': 'uid',
'in': 'query',
'required': False,
'description': 'Upload unique ID of the media file.',
'schema': {'type': 'string'},
},
{
'name': 'after',
'in': 'query',
'required': False,
'description': 'If given, all results returned will be after the '
'file with this filename. The `start` and `stop` '
'parameters are relative to this modified range.',
'schema': {'type': 'string'},
},
{
"name": "archive_lifecycle",
"in": "query",
"required": False,
"description": ("Archive lifecycle of the files, one of live (live only), archived "
"(to_archive, archived, or to_live), or all. Defaults to 'live'"),
"schema": {"type": "string", "enum": ["live", "archived", "all"]},
},
{
'name': 'annotation_search',
'in': 'query',
'required': False,
'description': 'Lucene query syntax string for use with Elasticsearch. '
'See <a href=https://www.elastic.co/guide/en/elasticsearch/'
'reference/7.10/query-dsl-query-string-query.html#query-string-syntax>reference</a>. '
'This search is applied to child annotations of media only.',
'schema': {'type': 'string'},
},
]
| media_filter_parameter_schema = [{'name': 'media_id', 'in': 'query', 'required': False, 'description': 'List of integers identifying media.', 'explode': False, 'schema': {'type': 'array', 'items': {'type': 'integer', 'minimum': 1}}}, {'name': 'type', 'in': 'query', 'required': False, 'description': 'Unique integer identifying media type.', 'schema': {'type': 'integer'}}, {'name': 'name', 'in': 'query', 'required': False, 'description': 'Name of the media to filter on.', 'schema': {'type': 'string'}}, {'name': 'section', 'in': 'query', 'required': False, 'description': 'Unique integer identifying a media section.', 'schema': {'type': 'integer'}}, {'name': 'dtype', 'in': 'query', 'required': False, 'description': 'Data type of the files, either image or video.', 'schema': {'type': 'string', 'enum': ['image', 'video', 'multi']}}, {'name': 'md5', 'in': 'query', 'required': False, 'description': 'MD5 sum of the media file.', 'schema': {'type': 'string'}}, {'name': 'gid', 'in': 'query', 'required': False, 'description': 'Upload group ID of the media file.', 'schema': {'type': 'string'}}, {'name': 'uid', 'in': 'query', 'required': False, 'description': 'Upload unique ID of the media file.', 'schema': {'type': 'string'}}, {'name': 'after', 'in': 'query', 'required': False, 'description': 'If given, all results returned will be after the file with this filename. The `start` and `stop` parameters are relative to this modified range.', 'schema': {'type': 'string'}}, {'name': 'archive_lifecycle', 'in': 'query', 'required': False, 'description': "Archive lifecycle of the files, one of live (live only), archived (to_archive, archived, or to_live), or all. Defaults to 'live'", 'schema': {'type': 'string', 'enum': ['live', 'archived', 'all']}}, {'name': 'annotation_search', 'in': 'query', 'required': False, 'description': 'Lucene query syntax string for use with Elasticsearch. See <a href=https://www.elastic.co/guide/en/elasticsearch/reference/7.10/query-dsl-query-string-query.html#query-string-syntax>reference</a>. This search is applied to child annotations of media only.', 'schema': {'type': 'string'}}] |
class Request:
def __init__(self,number, time):
self.number = number
self.time = time
| class Request:
def __init__(self, number, time):
self.number = number
self.time = time |
# abrir y leer archivo
f = open ('input.txt','r')
mensaje = f.read()
f.close()
# divido por linea y guardo en una lista
list_sits = mensaje.split('\n')
def extractRow(row,ini,end):
ini = ini
end = end
distance = end - ini
current = list(row)
for i in current:
distance = int(distance/2)
if(i=="F"):
end = ini + distance
elif(i=="B"):
ini = end - distance
return ini
def extractColumn(column,ini,end):
ini = ini
end = end
distance = end - ini
current = list(column)
for i in current:
distance = int(distance/2)
if(i=="L"):
end = ini + distance
elif(i=="R"):
ini = end - distance
return ini
higher_seat_id = 0
for i in list_sits:
row = extractRow(i[:-3],0,127)
column = extractColumn(i[-3:],0,7)
seat_id = row * 8 + column
if(higher_seat_id<=seat_id):
higher_seat_id = seat_id
print(higher_seat_id) | f = open('input.txt', 'r')
mensaje = f.read()
f.close()
list_sits = mensaje.split('\n')
def extract_row(row, ini, end):
ini = ini
end = end
distance = end - ini
current = list(row)
for i in current:
distance = int(distance / 2)
if i == 'F':
end = ini + distance
elif i == 'B':
ini = end - distance
return ini
def extract_column(column, ini, end):
ini = ini
end = end
distance = end - ini
current = list(column)
for i in current:
distance = int(distance / 2)
if i == 'L':
end = ini + distance
elif i == 'R':
ini = end - distance
return ini
higher_seat_id = 0
for i in list_sits:
row = extract_row(i[:-3], 0, 127)
column = extract_column(i[-3:], 0, 7)
seat_id = row * 8 + column
if higher_seat_id <= seat_id:
higher_seat_id = seat_id
print(higher_seat_id) |
w, h, n = map(int, input().split())
def k_fit_dip(side):
w_k = side // w
h_k = side // h
return w_k * h_k
def size_search():
left = 0
right = 10 ** 14
while right - left > 1:
mid = (right + left) // 2
k_dip = k_fit_dip(mid)
if k_dip >= n:
right = mid
else:
left = mid
return right
print(size_search())
| (w, h, n) = map(int, input().split())
def k_fit_dip(side):
w_k = side // w
h_k = side // h
return w_k * h_k
def size_search():
left = 0
right = 10 ** 14
while right - left > 1:
mid = (right + left) // 2
k_dip = k_fit_dip(mid)
if k_dip >= n:
right = mid
else:
left = mid
return right
print(size_search()) |
# Tuples is an immutable object in Python. It means once data is set, you cannot change those data.
# Can be used for constant data or dictionary without key (nested tuples)
# Empty Tuple initialization
tup = ()
print(tup)
# Tuple initialization with data
# I didn't like this way thought ;)
tup1 = 'python', 'aws', 'security'
print(tup1)
# Another for doing the same
tup2 = ('python', 'django', 'linux')
print(tup2)
# Concatenation
tup3 = tup1 + tup2
print(tup3)
# Nesting of tuples
tup4 = (tup1, tup2)
print(tup4)
# Length of a tuple
print(len(tup3))
print(len(tup4))
# Tuple Indexing and slicing
print(tup3[2])
print(tup2[1:])
# Deleting a tuple, removing individual element from the tuple is not possible. It deletes the whole tuple
del tup4
# Converts a list into tuple
tup5 = tuple(["Sanjeev", '2021', "Flexmind"])
print(tup5)
# try tuple() to a string
tup6 = tuple('Python')
print(tup6)
#Tuple iteration
for tup in tup5:
print(tup)
# Max and min method
max_elem = max(tup1)
print("max element: ", max_elem)
print("min element: ", min(tup5))
| tup = ()
print(tup)
tup1 = ('python', 'aws', 'security')
print(tup1)
tup2 = ('python', 'django', 'linux')
print(tup2)
tup3 = tup1 + tup2
print(tup3)
tup4 = (tup1, tup2)
print(tup4)
print(len(tup3))
print(len(tup4))
print(tup3[2])
print(tup2[1:])
del tup4
tup5 = tuple(['Sanjeev', '2021', 'Flexmind'])
print(tup5)
tup6 = tuple('Python')
print(tup6)
for tup in tup5:
print(tup)
max_elem = max(tup1)
print('max element: ', max_elem)
print('min element: ', min(tup5)) |
class CombinationIterator:
def __init__(self, characters, combinationLength):
self.characters = characters
self.combinationLength = combinationLength
self.every_comb = self.generate()
def generate(self):
every_comb = []
for i in range(2**len(self.characters)):
string = ""
for j in range(len(self.characters)):
if ((1<<j) & i > 0):
string += self.characters[j]
if len(string) == self.combinationLength and string not in every_comb:
every_comb.append(string)
every_comb.sort()
return every_comb
def nextStr(self):
for id in range(len(self.every_comb)):
return self.every_comb.pop(id)
def hasNext(self):
if len(self.every_comb) >= 1:
return True
return False
itr = CombinationIterator("bvwz", 2)
#print(itr.every_comb)
| class Combinationiterator:
def __init__(self, characters, combinationLength):
self.characters = characters
self.combinationLength = combinationLength
self.every_comb = self.generate()
def generate(self):
every_comb = []
for i in range(2 ** len(self.characters)):
string = ''
for j in range(len(self.characters)):
if 1 << j & i > 0:
string += self.characters[j]
if len(string) == self.combinationLength and string not in every_comb:
every_comb.append(string)
every_comb.sort()
return every_comb
def next_str(self):
for id in range(len(self.every_comb)):
return self.every_comb.pop(id)
def has_next(self):
if len(self.every_comb) >= 1:
return True
return False
itr = combination_iterator('bvwz', 2) |
def digit_count1(n):
n = str(n)
return int(''.join(str(n.count(i)) for i in n))
def digit_count2(n):
num_counts = dict()
str_n = str(n)
for x in str_n:
if x not in num_counts:
num_counts[x] = 1
else:
num_counts[x] += 1
return int("".join(str(num_counts[x]) for x in str_n))
dc1 = digit_count1(136116), digit_count1(221333), digit_count1(136116), digit_count1(2)
print(dc1)
dc2 = digit_count2(136116), digit_count2(221333), digit_count2(136116), digit_count2(2)
print(dc2) | def digit_count1(n):
n = str(n)
return int(''.join((str(n.count(i)) for i in n)))
def digit_count2(n):
num_counts = dict()
str_n = str(n)
for x in str_n:
if x not in num_counts:
num_counts[x] = 1
else:
num_counts[x] += 1
return int(''.join((str(num_counts[x]) for x in str_n)))
dc1 = (digit_count1(136116), digit_count1(221333), digit_count1(136116), digit_count1(2))
print(dc1)
dc2 = (digit_count2(136116), digit_count2(221333), digit_count2(136116), digit_count2(2))
print(dc2) |
DARK_SKY_BASE_URL = 'https://api.darksky.net/forecast'
WEATHER_COLUMNS = [
'time',
'summary',
'icon',
'sunriseTime',
'sunsetTime',
'precipIntensity',
'precipIntensityMax',
'precipProbability',
'precipType',
'temperatureHigh',
'temperatureHighTime',
'temperatureLow',
'temperatureLowTime',
'dewPoint',
'humidity',
'pressure',
'windSpeed',
'windGust',
'windGustTime',
'windBearing',
'cloudCover',
'uvIndex',
'uvIndexTime',
'visibility',
'ozone',
]
FEATURE_COLUMNS = [
'sunriseTime',
'sunsetTime',
'precipIntensity',
'precipIntensityMax',
'precipProbability',
'temperatureHigh',
'temperatureHighTime',
'temperatureLow',
'temperatureLowTime',
'dewPoint',
'humidity',
'pressure',
'windSpeed',
'windGust',
'windGustTime',
'windBearing',
'cloudCover',
'uvIndex',
'uvIndexTime',
'visibility',
'ozone',
'summary_Clear throughout the day.',
'summary_Drizzle in the afternoon and evening.',
'summary_Drizzle in the morning and afternoon.',
'summary_Drizzle starting in the afternoon.',
'summary_Drizzle until morning, starting again in the evening.',
'summary_Foggy in the morning and afternoon.',
'summary_Foggy in the morning.',
'summary_Foggy overnight.',
'summary_Foggy starting in the afternoon.',
'summary_Foggy throughout the day.',
'summary_Foggy until evening.',
'summary_Heavy rain until morning, starting again in the evening.',
'summary_Light rain in the afternoon and evening.',
'summary_Light rain in the evening and overnight.',
'summary_Light rain in the morning and afternoon.',
'summary_Light rain in the morning and overnight.',
'summary_Light rain in the morning.',
'summary_Light rain overnight.',
'summary_Light rain starting in the afternoon.',
'summary_Light rain throughout the day.',
'summary_Light rain until evening.',
'summary_Light rain until morning, starting again in the evening.',
'summary_Mostly cloudy throughout the day.',
'summary_Overcast throughout the day.',
'summary_Partly cloudy throughout the day.',
'summary_Possible drizzle in the afternoon and evening.',
'summary_Possible drizzle in the evening and overnight.',
'summary_Possible drizzle in the morning and afternoon.',
'summary_Possible drizzle in the morning.',
'summary_Possible drizzle overnight.',
'summary_Possible drizzle throughout the day.',
'summary_Possible drizzle until morning, starting again in the evening.',
'summary_Possible light rain until evening.',
'summary_Rain in the evening and overnight.',
'summary_Rain in the morning and afternoon.',
'summary_Rain in the morning.',
'summary_Rain overnight.',
'summary_Rain starting in the afternoon.',
'summary_Rain throughout the day.',
'summary_Rain until evening.',
'summary_Rain until morning, starting again in the evening.',
'icon_clear-day',
'icon_cloudy',
'icon_fog',
'icon_partly-cloudy-day',
'icon_rain',
'didRain_False',
'didRain_True',
]
LABEL_COLUMN = 'peak_traffic_load'
| dark_sky_base_url = 'https://api.darksky.net/forecast'
weather_columns = ['time', 'summary', 'icon', 'sunriseTime', 'sunsetTime', 'precipIntensity', 'precipIntensityMax', 'precipProbability', 'precipType', 'temperatureHigh', 'temperatureHighTime', 'temperatureLow', 'temperatureLowTime', 'dewPoint', 'humidity', 'pressure', 'windSpeed', 'windGust', 'windGustTime', 'windBearing', 'cloudCover', 'uvIndex', 'uvIndexTime', 'visibility', 'ozone']
feature_columns = ['sunriseTime', 'sunsetTime', 'precipIntensity', 'precipIntensityMax', 'precipProbability', 'temperatureHigh', 'temperatureHighTime', 'temperatureLow', 'temperatureLowTime', 'dewPoint', 'humidity', 'pressure', 'windSpeed', 'windGust', 'windGustTime', 'windBearing', 'cloudCover', 'uvIndex', 'uvIndexTime', 'visibility', 'ozone', 'summary_Clear throughout the day.', 'summary_Drizzle in the afternoon and evening.', 'summary_Drizzle in the morning and afternoon.', 'summary_Drizzle starting in the afternoon.', 'summary_Drizzle until morning, starting again in the evening.', 'summary_Foggy in the morning and afternoon.', 'summary_Foggy in the morning.', 'summary_Foggy overnight.', 'summary_Foggy starting in the afternoon.', 'summary_Foggy throughout the day.', 'summary_Foggy until evening.', 'summary_Heavy rain until morning, starting again in the evening.', 'summary_Light rain in the afternoon and evening.', 'summary_Light rain in the evening and overnight.', 'summary_Light rain in the morning and afternoon.', 'summary_Light rain in the morning and overnight.', 'summary_Light rain in the morning.', 'summary_Light rain overnight.', 'summary_Light rain starting in the afternoon.', 'summary_Light rain throughout the day.', 'summary_Light rain until evening.', 'summary_Light rain until morning, starting again in the evening.', 'summary_Mostly cloudy throughout the day.', 'summary_Overcast throughout the day.', 'summary_Partly cloudy throughout the day.', 'summary_Possible drizzle in the afternoon and evening.', 'summary_Possible drizzle in the evening and overnight.', 'summary_Possible drizzle in the morning and afternoon.', 'summary_Possible drizzle in the morning.', 'summary_Possible drizzle overnight.', 'summary_Possible drizzle throughout the day.', 'summary_Possible drizzle until morning, starting again in the evening.', 'summary_Possible light rain until evening.', 'summary_Rain in the evening and overnight.', 'summary_Rain in the morning and afternoon.', 'summary_Rain in the morning.', 'summary_Rain overnight.', 'summary_Rain starting in the afternoon.', 'summary_Rain throughout the day.', 'summary_Rain until evening.', 'summary_Rain until morning, starting again in the evening.', 'icon_clear-day', 'icon_cloudy', 'icon_fog', 'icon_partly-cloudy-day', 'icon_rain', 'didRain_False', 'didRain_True']
label_column = 'peak_traffic_load' |
# Write a procedure, rotate which takes as its input a string of lower case
# letters, a-z, and spaces, and an integer n, and returns the string constructed
# by shifting each of the letters n steps, and leaving the spaces unchanged.
# Note that 'a' follows 'z'. You can use an additional procedure if you
# choose to as long as rotate returns the correct string.
# Note that n can be positive, negative or zero.
def rotate(string_, shift):
output = []
for letter in string_:
if letter == ' ':
output.append(' ')
else:
output.append(shift_n_letters(letter, shift))
return ''.join(output)
def shift_n_letters(letter, n):
result = ord(letter) + n
if result < ord('a'):
return chr(ord('z') - (ord('a') - result) + 1)
elif result > ord('z'):
return chr(ord('a') + (result - ord('z')) - 1)
else:
return chr(result)
print(rotate ('sarah', 13))
# >>> 'fnenu'
print(rotate('fnenu', 13))
# >>> 'sarah'
print(rotate('dave', 5))
# >>>'ifaj'
print(rotate('ifaj', -5))
# >>>'dave'
print(rotate(("zw pfli tfuv nfibj tfiivtkcp pfl jyflcu "
"sv rscv kf ivru kyzj"), -17))
# >>> ???
| def rotate(string_, shift):
output = []
for letter in string_:
if letter == ' ':
output.append(' ')
else:
output.append(shift_n_letters(letter, shift))
return ''.join(output)
def shift_n_letters(letter, n):
result = ord(letter) + n
if result < ord('a'):
return chr(ord('z') - (ord('a') - result) + 1)
elif result > ord('z'):
return chr(ord('a') + (result - ord('z')) - 1)
else:
return chr(result)
print(rotate('sarah', 13))
print(rotate('fnenu', 13))
print(rotate('dave', 5))
print(rotate('ifaj', -5))
print(rotate('zw pfli tfuv nfibj tfiivtkcp pfl jyflcu sv rscv kf ivru kyzj', -17)) |
# eisagwgh stoixeiwn
my_list = []
# insert the first element
my_list.append(2)
print("This is the new list: ", my_list)
# insert the second element
my_list.append(3)
print("This is the new list: ", my_list)
my_list.append("Names")
print("This is a mixed list, with integers and strings: ", my_list)
# Afairwntas ena stoixeio
# removing the second element, which is 3
my_list.remove(3)
print("this is the list after removing \'3\': ", my_list)
# removing the first element of the list
my_list.remove(my_list[0])
print("This is the list after removing my_list[0]: ", my_list)
| my_list = []
my_list.append(2)
print('This is the new list: ', my_list)
my_list.append(3)
print('This is the new list: ', my_list)
my_list.append('Names')
print('This is a mixed list, with integers and strings: ', my_list)
my_list.remove(3)
print("this is the list after removing '3': ", my_list)
my_list.remove(my_list[0])
print('This is the list after removing my_list[0]: ', my_list) |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# parameters.py
# search query
search_query = 'site:linkedin.com/in/ AND "guide touristique" AND "paris"'
# file were scraped profile information will be stored
file_name = 'candidates.csv'
# login credentials
linkedin_username = 'YOUR EMAIL GOES HERE'
linkedin_password = 'YOUR PASSWORD GOES HERE'
| search_query = 'site:linkedin.com/in/ AND "guide touristique" AND "paris"'
file_name = 'candidates.csv'
linkedin_username = 'YOUR EMAIL GOES HERE'
linkedin_password = 'YOUR PASSWORD GOES HERE' |
# Start of Lesson 2
#if else - do while(nope) - for loops - switch statements(nope) - conditions
my_list0 = [23, 1.5566, 'fruits', True]
num1 = 10
num2 = 5
#If statements
if num1 > num2:
print('Num1 is greater than Num2')
if num1 == num2:
print('Num1 is equal ')
if num1 < num2:
print('Num1 is less than Num2')
#Operators
# > - greater than
# <= - greater than or equals to
# <= - less than or equal to
# < - less than
# == - equal to
# && / and - and
# || / or - or
#while loops
while num1 > num2:
print(num2)
num2 += 1
myfruit = ['apple', 'oragne', 'bananas']
#for loops
for item in myfruit:
print(item)
#Using indexes
for index, item in enumerate(myfruit):
print(index)
print(item) | my_list0 = [23, 1.5566, 'fruits', True]
num1 = 10
num2 = 5
if num1 > num2:
print('Num1 is greater than Num2')
if num1 == num2:
print('Num1 is equal ')
if num1 < num2:
print('Num1 is less than Num2')
while num1 > num2:
print(num2)
num2 += 1
myfruit = ['apple', 'oragne', 'bananas']
for item in myfruit:
print(item)
for (index, item) in enumerate(myfruit):
print(index)
print(item) |
# Taken from https://raw.githubusercontent.com/stripe/stripe-python/master/stripe/error.py
# Kudos
# The MIT License
#
# Copyright (c) 2010-2011 Stripe (http://stripe.com)
#
# 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.
class TaxamoApiError(Exception):
def __init__(self, message=None, http_body=None, http_status=None,
json_body=None):
super(TaxamoApiError, self).__init__(message)
if http_body and hasattr(http_body, 'decode'):
try:
http_body = http_body.decode('utf-8')
except:
http_body = ('<Could not decode body as utf-8. '
'Please report to support@taxamo.com>')
self.http_body = http_body
self.http_status = http_status
self.json_body = json_body
class APIError(TaxamoApiError):
pass
class APIConnectionError(TaxamoApiError):
pass
class ValidationError(TaxamoApiError):
def __init__(self, message, errors, http_body=None,
http_status=None, json_body=None):
super(ValidationError, self).__init__(
message + str(errors), http_body, http_status, json_body)
self.errors = errors
class AuthenticationError(TaxamoApiError):
pass | class Taxamoapierror(Exception):
def __init__(self, message=None, http_body=None, http_status=None, json_body=None):
super(TaxamoApiError, self).__init__(message)
if http_body and hasattr(http_body, 'decode'):
try:
http_body = http_body.decode('utf-8')
except:
http_body = '<Could not decode body as utf-8. Please report to support@taxamo.com>'
self.http_body = http_body
self.http_status = http_status
self.json_body = json_body
class Apierror(TaxamoApiError):
pass
class Apiconnectionerror(TaxamoApiError):
pass
class Validationerror(TaxamoApiError):
def __init__(self, message, errors, http_body=None, http_status=None, json_body=None):
super(ValidationError, self).__init__(message + str(errors), http_body, http_status, json_body)
self.errors = errors
class Authenticationerror(TaxamoApiError):
pass |
# A tree is symmetric if its data and shape remain unchanged when it is
# reflected about the root node. The following tree is an example:
# 4
# / | \
# 3 5 3
# / \
# 9 9
# Given a k-ary tree, determine whether it is symmetric.
class Node:
def __init__(self, value, child=None):
self.value = value
if child is None:
self.child = []
else:
self.child = child
def symmetric(node):
if not node.child:
return True
def is_the_same(x, y):
if x.value != y.value:
return False
elif len(x.child) != len(y.child):
return False
else:
return all([is_the_same(x.child[i], y.child[i]) for i in range(len(x.child))])
n = len(node.child)
return all([is_the_same(node.child[i], node.child[n-1-i]) for i in range(n//2)])
if __name__ == '__main__':
for root in [
Node(4, [Node(3, [Node(9)]), Node(5), Node(3, [Node(9)])]),
Node(2, [Node(1, [Node(2)]), Node(1, [Node(0)])]),
Node(1)
]:
print(symmetric(root))
| class Node:
def __init__(self, value, child=None):
self.value = value
if child is None:
self.child = []
else:
self.child = child
def symmetric(node):
if not node.child:
return True
def is_the_same(x, y):
if x.value != y.value:
return False
elif len(x.child) != len(y.child):
return False
else:
return all([is_the_same(x.child[i], y.child[i]) for i in range(len(x.child))])
n = len(node.child)
return all([is_the_same(node.child[i], node.child[n - 1 - i]) for i in range(n // 2)])
if __name__ == '__main__':
for root in [node(4, [node(3, [node(9)]), node(5), node(3, [node(9)])]), node(2, [node(1, [node(2)]), node(1, [node(0)])]), node(1)]:
print(symmetric(root)) |
# TODO(dragondriver): add more default configs to here
class DefaultConfigs:
WaitTimeDurationWhenLoad = 0.5 # in seconds
MaxVarCharLengthKey = "max_length"
MaxVarCharLength = 65535
EncodeProtocol = 'utf-8'
IndexName = "_default_idx"
| class Defaultconfigs:
wait_time_duration_when_load = 0.5
max_var_char_length_key = 'max_length'
max_var_char_length = 65535
encode_protocol = 'utf-8'
index_name = '_default_idx' |
#
# PySNMP MIB module Nortel-Magellan-Passport-SnaMIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Nortel-Magellan-Passport-SnaMIB
# Produced by pysmi-0.3.4 at Wed May 1 14:28:18 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ConstraintsIntersection, SingleValueConstraint, ValueRangeConstraint, ValueSizeConstraint, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "SingleValueConstraint", "ValueRangeConstraint", "ValueSizeConstraint", "ConstraintsUnion")
Integer32, RowStatus, Counter32, Gauge32, DisplayString, RowPointer, StorageType, Unsigned32 = mibBuilder.importSymbols("Nortel-Magellan-Passport-StandardTextualConventionsMIB", "Integer32", "RowStatus", "Counter32", "Gauge32", "DisplayString", "RowPointer", "StorageType", "Unsigned32")
HexString, NonReplicated, DashedHexString = mibBuilder.importSymbols("Nortel-Magellan-Passport-TextualConventionsMIB", "HexString", "NonReplicated", "DashedHexString")
passportMIBs, = mibBuilder.importSymbols("Nortel-Magellan-Passport-UsefulDefinitionsMIB", "passportMIBs")
vrPpIndex, vrIndex, vrPp, vr = mibBuilder.importSymbols("Nortel-Magellan-Passport-VirtualRouterMIB", "vrPpIndex", "vrIndex", "vrPp", "vr")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
iso, Integer32, Counter32, Gauge32, IpAddress, MibIdentifier, TimeTicks, Counter64, MibScalar, MibTable, MibTableRow, MibTableColumn, ModuleIdentity, NotificationType, Bits, Unsigned32, ObjectIdentity = mibBuilder.importSymbols("SNMPv2-SMI", "iso", "Integer32", "Counter32", "Gauge32", "IpAddress", "MibIdentifier", "TimeTicks", "Counter64", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "ModuleIdentity", "NotificationType", "Bits", "Unsigned32", "ObjectIdentity")
DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention")
snaMIB = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 2, 56))
vrPpSnaPort = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15))
vrPpSnaPortRowStatusTable = MibTable((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 1), )
if mibBuilder.loadTexts: vrPpSnaPortRowStatusTable.setStatus('mandatory')
if mibBuilder.loadTexts: vrPpSnaPortRowStatusTable.setDescription('This entry controls the addition and deletion of vrPpSnaPort components.')
vrPpSnaPortRowStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 1, 1), ).setIndexNames((0, "Nortel-Magellan-Passport-VirtualRouterMIB", "vrIndex"), (0, "Nortel-Magellan-Passport-VirtualRouterMIB", "vrPpIndex"), (0, "Nortel-Magellan-Passport-SnaMIB", "vrPpSnaPortIndex"))
if mibBuilder.loadTexts: vrPpSnaPortRowStatusEntry.setStatus('mandatory')
if mibBuilder.loadTexts: vrPpSnaPortRowStatusEntry.setDescription('A single entry in the table represents a single vrPpSnaPort component.')
vrPpSnaPortRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 1, 1, 1), RowStatus()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: vrPpSnaPortRowStatus.setStatus('mandatory')
if mibBuilder.loadTexts: vrPpSnaPortRowStatus.setDescription('This variable is used as the basis for SNMP naming of vrPpSnaPort components. These components can be added and deleted.')
vrPpSnaPortComponentName = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 1, 1, 2), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrPpSnaPortComponentName.setStatus('mandatory')
if mibBuilder.loadTexts: vrPpSnaPortComponentName.setDescription("This variable provides the component's string name for use with the ASCII Console Interface")
vrPpSnaPortStorageType = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 1, 1, 4), StorageType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrPpSnaPortStorageType.setStatus('mandatory')
if mibBuilder.loadTexts: vrPpSnaPortStorageType.setDescription('This variable represents the storage type value for the vrPpSnaPort tables.')
vrPpSnaPortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 1, 1, 10), NonReplicated())
if mibBuilder.loadTexts: vrPpSnaPortIndex.setStatus('mandatory')
if mibBuilder.loadTexts: vrPpSnaPortIndex.setDescription('This variable represents the index for the vrPpSnaPort tables.')
vrPpSnaPortAdminControlTable = MibTable((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 100), )
if mibBuilder.loadTexts: vrPpSnaPortAdminControlTable.setStatus('mandatory')
if mibBuilder.loadTexts: vrPpSnaPortAdminControlTable.setDescription('This group includes the Administrative Control attribute. This attribute defines the current administrative state of this component.')
vrPpSnaPortAdminControlEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 100, 1), ).setIndexNames((0, "Nortel-Magellan-Passport-VirtualRouterMIB", "vrIndex"), (0, "Nortel-Magellan-Passport-VirtualRouterMIB", "vrPpIndex"), (0, "Nortel-Magellan-Passport-SnaMIB", "vrPpSnaPortIndex"))
if mibBuilder.loadTexts: vrPpSnaPortAdminControlEntry.setStatus('mandatory')
if mibBuilder.loadTexts: vrPpSnaPortAdminControlEntry.setDescription('An entry in the vrPpSnaPortAdminControlTable.')
vrPpSnaPortSnmpAdminStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 100, 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: vrPpSnaPortSnmpAdminStatus.setStatus('mandatory')
if mibBuilder.loadTexts: vrPpSnaPortSnmpAdminStatus.setDescription('The desired state of the interface. The up state indicates the interface is operational and packet forwarding is allowed. The down state indicates the interface is not operational and packet forwarding is unavailable. The testing state indicates that no operational packets can be passed.')
vrPpSnaPortProvTable = MibTable((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 101), )
if mibBuilder.loadTexts: vrPpSnaPortProvTable.setStatus('mandatory')
if mibBuilder.loadTexts: vrPpSnaPortProvTable.setDescription('This group contains provisionable attributes for SNA ports.')
vrPpSnaPortProvEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 101, 1), ).setIndexNames((0, "Nortel-Magellan-Passport-VirtualRouterMIB", "vrIndex"), (0, "Nortel-Magellan-Passport-VirtualRouterMIB", "vrPpIndex"), (0, "Nortel-Magellan-Passport-SnaMIB", "vrPpSnaPortIndex"))
if mibBuilder.loadTexts: vrPpSnaPortProvEntry.setStatus('mandatory')
if mibBuilder.loadTexts: vrPpSnaPortProvEntry.setDescription('An entry in the vrPpSnaPortProvTable.')
vrPpSnaPortVirtualSegmentLFSize = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 101, 1, 1), Unsigned32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(516, 516), ValueRangeConstraint(635, 635), ValueRangeConstraint(754, 754), ValueRangeConstraint(873, 873), ValueRangeConstraint(993, 993), ValueRangeConstraint(1112, 1112), ValueRangeConstraint(1231, 1231), ValueRangeConstraint(1350, 1350), ValueRangeConstraint(1470, 1470), ValueRangeConstraint(1542, 1542), ValueRangeConstraint(1615, 1615), ValueRangeConstraint(1688, 1688), ValueRangeConstraint(1761, 1761), ValueRangeConstraint(1833, 1833), ValueRangeConstraint(1906, 1906), ValueRangeConstraint(1979, 1979), ValueRangeConstraint(2052, 2052), ValueRangeConstraint(2345, 2345), ValueRangeConstraint(5331, 5331), ValueRangeConstraint(5798, 5798), ValueRangeConstraint(6264, 6264), ValueRangeConstraint(6730, 6730), ValueRangeConstraint(7197, 7197), ValueRangeConstraint(7663, 7663), ValueRangeConstraint(8130, 8130), ValueRangeConstraint(8539, 8539), ValueRangeConstraint(8949, 8949), ValueRangeConstraint(9358, 9358), ValueRangeConstraint(9768, 9768), ValueRangeConstraint(10178, 10178), ValueRangeConstraint(10587, 10587), ValueRangeConstraint(10997, 10997), ValueRangeConstraint(11407, 11407), ValueRangeConstraint(12199, 12199), ValueRangeConstraint(12992, 12992), ValueRangeConstraint(13785, 13785), ValueRangeConstraint(14578, 14578), ValueRangeConstraint(15370, 15370), ValueRangeConstraint(16163, 16163), ValueRangeConstraint(16956, 16956), ValueRangeConstraint(17749, 17749), ValueRangeConstraint(20730, 20730), ValueRangeConstraint(23711, 23711), ValueRangeConstraint(26693, 26693), ValueRangeConstraint(29674, 29674), ValueRangeConstraint(32655, 32655), ValueRangeConstraint(35637, 35637), ValueRangeConstraint(38618, 38618), ValueRangeConstraint(41600, 41600), ValueRangeConstraint(44591, 44591), ValueRangeConstraint(47583, 47583), ValueRangeConstraint(50575, 50575), ValueRangeConstraint(53567, 53567), ValueRangeConstraint(56559, 56559), ValueRangeConstraint(59551, 59551), ValueRangeConstraint(65535, 65535), )).clone(2345)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: vrPpSnaPortVirtualSegmentLFSize.setStatus('mandatory')
if mibBuilder.loadTexts: vrPpSnaPortVirtualSegmentLFSize.setDescription('This attribute specifies the largest frame size (including DLC header and info field but not any MAC-level or framing octets) for end-to- end connections established through this Sna component. This value is used as the largest frame size for all circuits unless a smaller value is specified in XID signals or by local LAN constraints.')
vrPpSnaPortStateTable = MibTable((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 103), )
if mibBuilder.loadTexts: vrPpSnaPortStateTable.setStatus('mandatory')
if mibBuilder.loadTexts: vrPpSnaPortStateTable.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.')
vrPpSnaPortStateEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 103, 1), ).setIndexNames((0, "Nortel-Magellan-Passport-VirtualRouterMIB", "vrIndex"), (0, "Nortel-Magellan-Passport-VirtualRouterMIB", "vrPpIndex"), (0, "Nortel-Magellan-Passport-SnaMIB", "vrPpSnaPortIndex"))
if mibBuilder.loadTexts: vrPpSnaPortStateEntry.setStatus('mandatory')
if mibBuilder.loadTexts: vrPpSnaPortStateEntry.setDescription('An entry in the vrPpSnaPortStateTable.')
vrPpSnaPortAdminState = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 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: vrPpSnaPortAdminState.setStatus('mandatory')
if mibBuilder.loadTexts: vrPpSnaPortAdminState.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.')
vrPpSnaPortOperationalState = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 103, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1))).clone('disabled')).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrPpSnaPortOperationalState.setStatus('mandatory')
if mibBuilder.loadTexts: vrPpSnaPortOperationalState.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.')
vrPpSnaPortUsageState = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 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: vrPpSnaPortUsageState.setStatus('mandatory')
if mibBuilder.loadTexts: vrPpSnaPortUsageState.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.')
vrPpSnaPortOperStatusTable = MibTable((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 104), )
if mibBuilder.loadTexts: vrPpSnaPortOperStatusTable.setStatus('mandatory')
if mibBuilder.loadTexts: vrPpSnaPortOperStatusTable.setDescription('This group includes the Operational Status attribute. This attribute defines the current operational state of this component.')
vrPpSnaPortOperStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 104, 1), ).setIndexNames((0, "Nortel-Magellan-Passport-VirtualRouterMIB", "vrIndex"), (0, "Nortel-Magellan-Passport-VirtualRouterMIB", "vrPpIndex"), (0, "Nortel-Magellan-Passport-SnaMIB", "vrPpSnaPortIndex"))
if mibBuilder.loadTexts: vrPpSnaPortOperStatusEntry.setStatus('mandatory')
if mibBuilder.loadTexts: vrPpSnaPortOperStatusEntry.setDescription('An entry in the vrPpSnaPortOperStatusTable.')
vrPpSnaPortSnmpOperStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 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: vrPpSnaPortSnmpOperStatus.setStatus('mandatory')
if mibBuilder.loadTexts: vrPpSnaPortSnmpOperStatus.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.')
vrPpSnaPortCircuit = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 2))
vrPpSnaPortCircuitRowStatusTable = MibTable((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 2, 1), )
if mibBuilder.loadTexts: vrPpSnaPortCircuitRowStatusTable.setStatus('mandatory')
if mibBuilder.loadTexts: vrPpSnaPortCircuitRowStatusTable.setDescription('*** THIS TABLE CURRENTLY NOT IMPLEMENTED *** This entry controls the addition and deletion of vrPpSnaPortCircuit components.')
vrPpSnaPortCircuitRowStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 2, 1, 1), ).setIndexNames((0, "Nortel-Magellan-Passport-VirtualRouterMIB", "vrIndex"), (0, "Nortel-Magellan-Passport-VirtualRouterMIB", "vrPpIndex"), (0, "Nortel-Magellan-Passport-SnaMIB", "vrPpSnaPortIndex"), (0, "Nortel-Magellan-Passport-SnaMIB", "vrPpSnaPortCircuitS1MacIndex"), (0, "Nortel-Magellan-Passport-SnaMIB", "vrPpSnaPortCircuitS1SapIndex"), (0, "Nortel-Magellan-Passport-SnaMIB", "vrPpSnaPortCircuitS2MacIndex"), (0, "Nortel-Magellan-Passport-SnaMIB", "vrPpSnaPortCircuitS2SapIndex"))
if mibBuilder.loadTexts: vrPpSnaPortCircuitRowStatusEntry.setStatus('mandatory')
if mibBuilder.loadTexts: vrPpSnaPortCircuitRowStatusEntry.setDescription('A single entry in the table represents a single vrPpSnaPortCircuit component.')
vrPpSnaPortCircuitRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 2, 1, 1, 1), RowStatus()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrPpSnaPortCircuitRowStatus.setStatus('mandatory')
if mibBuilder.loadTexts: vrPpSnaPortCircuitRowStatus.setDescription('This variable is used as the basis for SNMP naming of vrPpSnaPortCircuit components. These components cannot be added nor deleted.')
vrPpSnaPortCircuitComponentName = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 2, 1, 1, 2), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrPpSnaPortCircuitComponentName.setStatus('mandatory')
if mibBuilder.loadTexts: vrPpSnaPortCircuitComponentName.setDescription("This variable provides the component's string name for use with the ASCII Console Interface")
vrPpSnaPortCircuitStorageType = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 2, 1, 1, 4), StorageType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrPpSnaPortCircuitStorageType.setStatus('mandatory')
if mibBuilder.loadTexts: vrPpSnaPortCircuitStorageType.setDescription('This variable represents the storage type value for the vrPpSnaPortCircuit tables.')
vrPpSnaPortCircuitS1MacIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 2, 1, 1, 10), DashedHexString().subtype(subtypeSpec=ValueSizeConstraint(6, 6)).setFixedLength(6))
if mibBuilder.loadTexts: vrPpSnaPortCircuitS1MacIndex.setStatus('mandatory')
if mibBuilder.loadTexts: vrPpSnaPortCircuitS1MacIndex.setDescription('This variable represents an index for the vrPpSnaPortCircuit tables.')
vrPpSnaPortCircuitS1SapIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 2, 1, 1, 11), Integer32().subtype(subtypeSpec=ValueRangeConstraint(2, 254)))
if mibBuilder.loadTexts: vrPpSnaPortCircuitS1SapIndex.setStatus('mandatory')
if mibBuilder.loadTexts: vrPpSnaPortCircuitS1SapIndex.setDescription('This variable represents an index for the vrPpSnaPortCircuit tables.')
vrPpSnaPortCircuitS2MacIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 2, 1, 1, 12), DashedHexString().subtype(subtypeSpec=ValueSizeConstraint(6, 6)).setFixedLength(6))
if mibBuilder.loadTexts: vrPpSnaPortCircuitS2MacIndex.setStatus('mandatory')
if mibBuilder.loadTexts: vrPpSnaPortCircuitS2MacIndex.setDescription('This variable represents an index for the vrPpSnaPortCircuit tables.')
vrPpSnaPortCircuitS2SapIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 2, 1, 1, 13), Integer32().subtype(subtypeSpec=ValueRangeConstraint(2, 254)))
if mibBuilder.loadTexts: vrPpSnaPortCircuitS2SapIndex.setStatus('mandatory')
if mibBuilder.loadTexts: vrPpSnaPortCircuitS2SapIndex.setDescription('This variable represents an index for the vrPpSnaPortCircuit tables.')
vrPpSnaPortCircuitOperTable = MibTable((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 2, 100), )
if mibBuilder.loadTexts: vrPpSnaPortCircuitOperTable.setStatus('mandatory')
if mibBuilder.loadTexts: vrPpSnaPortCircuitOperTable.setDescription('*** THIS TABLE CURRENTLY NOT IMPLEMENTED *** This group defines an entry in the SnaCircuitEntry Table.')
vrPpSnaPortCircuitOperEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 2, 100, 1), ).setIndexNames((0, "Nortel-Magellan-Passport-VirtualRouterMIB", "vrIndex"), (0, "Nortel-Magellan-Passport-VirtualRouterMIB", "vrPpIndex"), (0, "Nortel-Magellan-Passport-SnaMIB", "vrPpSnaPortIndex"), (0, "Nortel-Magellan-Passport-SnaMIB", "vrPpSnaPortCircuitS1MacIndex"), (0, "Nortel-Magellan-Passport-SnaMIB", "vrPpSnaPortCircuitS1SapIndex"), (0, "Nortel-Magellan-Passport-SnaMIB", "vrPpSnaPortCircuitS2MacIndex"), (0, "Nortel-Magellan-Passport-SnaMIB", "vrPpSnaPortCircuitS2SapIndex"))
if mibBuilder.loadTexts: vrPpSnaPortCircuitOperEntry.setStatus('mandatory')
if mibBuilder.loadTexts: vrPpSnaPortCircuitOperEntry.setDescription('An entry in the vrPpSnaPortCircuitOperTable.')
vrPpSnaPortCircuitS1DlcType = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 2, 100, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("other", 1), ("na", 2), ("llc", 3), ("sdlc", 4), ("qllc", 5)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrPpSnaPortCircuitS1DlcType.setStatus('mandatory')
if mibBuilder.loadTexts: vrPpSnaPortCircuitS1DlcType.setDescription('This attribute indicates the DLC protocol in use between the SNA node and S1.')
vrPpSnaPortCircuitS1RouteInfo = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 2, 100, 1, 3), HexString().subtype(subtypeSpec=ValueSizeConstraint(0, 30))).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrPpSnaPortCircuitS1RouteInfo.setStatus('mandatory')
if mibBuilder.loadTexts: vrPpSnaPortCircuitS1RouteInfo.setDescription('If source-route bridging is in use between the SNA node and S1, this is the routing information field describing the path between the two devices. The format of the routing information corresponds to that of the route designator fields of a specifically routed SRB frame. Otherwise the value will be a Hex string of zero length.')
vrPpSnaPortCircuitS2Location = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 2, 100, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("other", 1), ("internal", 2), ("remote", 3), ("local", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrPpSnaPortCircuitS2Location.setStatus('mandatory')
if mibBuilder.loadTexts: vrPpSnaPortCircuitS2Location.setDescription('This attribute indicates the location of End Station 2 (S2). If the location of End Station 2 is local, the interface information will be available in the conceptual row whose S1 and S2 are the S2 and the S1 of this conceptual row, respectively.')
vrPpSnaPortCircuitOrigin = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 2, 100, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("s2", 0), ("s1", 1)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrPpSnaPortCircuitOrigin.setStatus('mandatory')
if mibBuilder.loadTexts: vrPpSnaPortCircuitOrigin.setDescription('This attribute indicates which of the two end stations initiated the establishment of this circuit.')
vrPpSnaPortCircuitState = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 2, 100, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13))).clone(namedValues=NamedValues(("disconnected", 1), ("circuitStart", 2), ("resolvePending", 3), ("circuitPending", 4), ("circuitEstablished", 5), ("connectPending", 6), ("contactPending", 7), ("connected", 8), ("disconnectPending", 9), ("haltPending", 10), ("haltPendingNoack", 11), ("circuitRestart", 12), ("restartPending", 13)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrPpSnaPortCircuitState.setStatus('mandatory')
if mibBuilder.loadTexts: vrPpSnaPortCircuitState.setDescription('This attribute indicates the current state of this circuit. Note that this implementation does not keep entries after circuit disconnect. Details regarding the state machine and meaning of individual states may be found in RFC 1795.')
vrPpSnaPortCircuitPriority = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 2, 100, 1, 14), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("unsupported", 1), ("low", 2), ("medium", 3), ("high", 4), ("highest", 5)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrPpSnaPortCircuitPriority.setStatus('mandatory')
if mibBuilder.loadTexts: vrPpSnaPortCircuitPriority.setDescription('This attribute indicates the transmission priority of this circuit as understood by this SNA node. This value is determined by the two SNA nodes at circuit startup time.')
vrPpSnaPortCircuitVcId = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 2, 100, 1, 26), RowPointer()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrPpSnaPortCircuitVcId.setStatus('mandatory')
if mibBuilder.loadTexts: vrPpSnaPortCircuitVcId.setDescription('This attribute indicates the component name of the GvcIf/n Dlci/n which represents this VC connection in the SNA DLR service. This attribute appears only for circuits that are connecting over a Frame Relay DLCI only. For circuits connecting over Qllc VCs or Token Ring interface this attribute does not appear.')
vrSna = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14))
vrSnaRowStatusTable = MibTable((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 1), )
if mibBuilder.loadTexts: vrSnaRowStatusTable.setStatus('mandatory')
if mibBuilder.loadTexts: vrSnaRowStatusTable.setDescription('This entry controls the addition and deletion of vrSna components.')
vrSnaRowStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 1, 1), ).setIndexNames((0, "Nortel-Magellan-Passport-VirtualRouterMIB", "vrIndex"), (0, "Nortel-Magellan-Passport-SnaMIB", "vrSnaIndex"))
if mibBuilder.loadTexts: vrSnaRowStatusEntry.setStatus('mandatory')
if mibBuilder.loadTexts: vrSnaRowStatusEntry.setDescription('A single entry in the table represents a single vrSna component.')
vrSnaRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 1, 1, 1), RowStatus()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: vrSnaRowStatus.setStatus('mandatory')
if mibBuilder.loadTexts: vrSnaRowStatus.setDescription('This variable is used as the basis for SNMP naming of vrSna components. These components can be added and deleted.')
vrSnaComponentName = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 1, 1, 2), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrSnaComponentName.setStatus('mandatory')
if mibBuilder.loadTexts: vrSnaComponentName.setDescription("This variable provides the component's string name for use with the ASCII Console Interface")
vrSnaStorageType = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 1, 1, 4), StorageType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrSnaStorageType.setStatus('mandatory')
if mibBuilder.loadTexts: vrSnaStorageType.setDescription('This variable represents the storage type value for the vrSna tables.')
vrSnaIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 1, 1, 10), NonReplicated())
if mibBuilder.loadTexts: vrSnaIndex.setStatus('mandatory')
if mibBuilder.loadTexts: vrSnaIndex.setDescription('This variable represents the index for the vrSna tables.')
vrSnaAdminControlTable = MibTable((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 100), )
if mibBuilder.loadTexts: vrSnaAdminControlTable.setStatus('mandatory')
if mibBuilder.loadTexts: vrSnaAdminControlTable.setDescription('This group includes the Administrative Control attribute. This attribute defines the current administrative state of this component.')
vrSnaAdminControlEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 100, 1), ).setIndexNames((0, "Nortel-Magellan-Passport-VirtualRouterMIB", "vrIndex"), (0, "Nortel-Magellan-Passport-SnaMIB", "vrSnaIndex"))
if mibBuilder.loadTexts: vrSnaAdminControlEntry.setStatus('mandatory')
if mibBuilder.loadTexts: vrSnaAdminControlEntry.setDescription('An entry in the vrSnaAdminControlTable.')
vrSnaSnmpAdminStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 100, 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: vrSnaSnmpAdminStatus.setStatus('mandatory')
if mibBuilder.loadTexts: vrSnaSnmpAdminStatus.setDescription('The desired state of the interface. The up state indicates the interface is operational and packet forwarding is allowed. The down state indicates the interface is not operational and packet forwarding is unavailable. The testing state indicates that no operational packets can be passed.')
vrSnaStateTable = MibTable((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 101), )
if mibBuilder.loadTexts: vrSnaStateTable.setStatus('mandatory')
if mibBuilder.loadTexts: vrSnaStateTable.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.')
vrSnaStateEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 101, 1), ).setIndexNames((0, "Nortel-Magellan-Passport-VirtualRouterMIB", "vrIndex"), (0, "Nortel-Magellan-Passport-SnaMIB", "vrSnaIndex"))
if mibBuilder.loadTexts: vrSnaStateEntry.setStatus('mandatory')
if mibBuilder.loadTexts: vrSnaStateEntry.setDescription('An entry in the vrSnaStateTable.')
vrSnaAdminState = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 101, 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: vrSnaAdminState.setStatus('mandatory')
if mibBuilder.loadTexts: vrSnaAdminState.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.')
vrSnaOperationalState = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 101, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1))).clone('disabled')).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrSnaOperationalState.setStatus('mandatory')
if mibBuilder.loadTexts: vrSnaOperationalState.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.')
vrSnaUsageState = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 101, 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: vrSnaUsageState.setStatus('mandatory')
if mibBuilder.loadTexts: vrSnaUsageState.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.')
vrSnaOperStatusTable = MibTable((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 102), )
if mibBuilder.loadTexts: vrSnaOperStatusTable.setStatus('mandatory')
if mibBuilder.loadTexts: vrSnaOperStatusTable.setDescription('This group includes the Operational Status attribute. This attribute defines the current operational state of this component.')
vrSnaOperStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 102, 1), ).setIndexNames((0, "Nortel-Magellan-Passport-VirtualRouterMIB", "vrIndex"), (0, "Nortel-Magellan-Passport-SnaMIB", "vrSnaIndex"))
if mibBuilder.loadTexts: vrSnaOperStatusEntry.setStatus('mandatory')
if mibBuilder.loadTexts: vrSnaOperStatusEntry.setDescription('An entry in the vrSnaOperStatusTable.')
vrSnaSnmpOperStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 102, 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: vrSnaSnmpOperStatus.setStatus('mandatory')
if mibBuilder.loadTexts: vrSnaSnmpOperStatus.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.')
vrSnaOperTable = MibTable((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 103), )
if mibBuilder.loadTexts: vrSnaOperTable.setStatus('mandatory')
if mibBuilder.loadTexts: vrSnaOperTable.setDescription('This group contains operational attributes which describe the behavior of the Sna component and associated ports under the Virtual Router (VR).')
vrSnaOperEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 103, 1), ).setIndexNames((0, "Nortel-Magellan-Passport-VirtualRouterMIB", "vrIndex"), (0, "Nortel-Magellan-Passport-SnaMIB", "vrSnaIndex"))
if mibBuilder.loadTexts: vrSnaOperEntry.setStatus('mandatory')
if mibBuilder.loadTexts: vrSnaOperEntry.setDescription('An entry in the vrSnaOperTable.')
vrSnaVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 103, 1, 2), HexString().subtype(subtypeSpec=ValueSizeConstraint(2, 2)).setFixedLength(2)).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrSnaVersion.setStatus('mandatory')
if mibBuilder.loadTexts: vrSnaVersion.setDescription('This attribute indicates the particular version of the SNA standard supported by this Sna. The first 2 digits represent the SNA standard Version number of this Sna, the second 2 digits represent the SNA standard Release number.')
vrSnaCircStatsTable = MibTable((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 104), )
if mibBuilder.loadTexts: vrSnaCircStatsTable.setStatus('mandatory')
if mibBuilder.loadTexts: vrSnaCircStatsTable.setDescription("A circuit is the end-to-end association of two Data Link Routing (DLR) entities through one or two DLR nodes. It is the concatenation of two 'data links', optionally with an intervening transport connection (not initially supported). The origin of the circuit is the end station that initiates the circuit. The target of the circuit is the end station that receives the initiation.")
vrSnaCircStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 104, 1), ).setIndexNames((0, "Nortel-Magellan-Passport-VirtualRouterMIB", "vrIndex"), (0, "Nortel-Magellan-Passport-SnaMIB", "vrSnaIndex"))
if mibBuilder.loadTexts: vrSnaCircStatsEntry.setStatus('mandatory')
if mibBuilder.loadTexts: vrSnaCircStatsEntry.setDescription('An entry in the vrSnaCircStatsTable.')
vrSnaActives = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 104, 1, 1), Gauge32().subtype(subtypeSpec=ValueRangeConstraint(0, 4292967295))).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrSnaActives.setStatus('mandatory')
if mibBuilder.loadTexts: vrSnaActives.setDescription('This attribute indiates the current number of circuits in Circuit table that are not in the disconnected state.')
vrSnaCreates = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 104, 1, 2), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrSnaCreates.setStatus('mandatory')
if mibBuilder.loadTexts: vrSnaCreates.setDescription('This attribute indicates the total number of entries ever added to Circuit table, or reactivated upon exiting disconnected state.')
vrSnaDirStatsTable = MibTable((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 105), )
if mibBuilder.loadTexts: vrSnaDirStatsTable.setStatus('mandatory')
if mibBuilder.loadTexts: vrSnaDirStatsTable.setDescription('MAC Table Directory statistics')
vrSnaDirStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 105, 1), ).setIndexNames((0, "Nortel-Magellan-Passport-VirtualRouterMIB", "vrIndex"), (0, "Nortel-Magellan-Passport-SnaMIB", "vrSnaIndex"))
if mibBuilder.loadTexts: vrSnaDirStatsEntry.setStatus('mandatory')
if mibBuilder.loadTexts: vrSnaDirStatsEntry.setDescription('An entry in the vrSnaDirStatsTable.')
vrSnaMacEntries = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 105, 1, 1), Gauge32().subtype(subtypeSpec=ValueRangeConstraint(0, 10000))).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrSnaMacEntries.setStatus('mandatory')
if mibBuilder.loadTexts: vrSnaMacEntries.setDescription('This attribute indicates the current total number of entries in the DirectoryEntry table.')
vrSnaMacCacheHits = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 105, 1, 2), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrSnaMacCacheHits.setStatus('mandatory')
if mibBuilder.loadTexts: vrSnaMacCacheHits.setDescription('This attribute indicates the number of times a cache search for a particular MAC address resulted in success.')
vrSnaMacCacheMisses = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 105, 1, 3), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vrSnaMacCacheMisses.setStatus('mandatory')
if mibBuilder.loadTexts: vrSnaMacCacheMisses.setDescription('This attribute indicates the number of times a cache search for a particular MAC address resulted in failure.')
snaGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 2, 56, 1))
snaGroupBE = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 2, 56, 1, 5))
snaGroupBE01 = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 2, 56, 1, 5, 2))
snaGroupBE01A = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 2, 56, 1, 5, 2, 2))
snaCapabilities = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 2, 56, 3))
snaCapabilitiesBE = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 2, 56, 3, 5))
snaCapabilitiesBE01 = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 2, 56, 3, 5, 2))
snaCapabilitiesBE01A = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 2, 56, 3, 5, 2, 2))
mibBuilder.exportSymbols("Nortel-Magellan-Passport-SnaMIB", vrSnaMacEntries=vrSnaMacEntries, vrPpSnaPortOperStatusEntry=vrPpSnaPortOperStatusEntry, vrPpSnaPortCircuitOperTable=vrPpSnaPortCircuitOperTable, vrSnaActives=vrSnaActives, vrSnaSnmpAdminStatus=vrSnaSnmpAdminStatus, vrSnaStorageType=vrSnaStorageType, snaGroupBE01=snaGroupBE01, vrSnaOperStatusEntry=vrSnaOperStatusEntry, vrSnaUsageState=vrSnaUsageState, vrPpSnaPortOperStatusTable=vrPpSnaPortOperStatusTable, vrSnaOperStatusTable=vrSnaOperStatusTable, vrPpSnaPortCircuitStorageType=vrPpSnaPortCircuitStorageType, vrSnaCircStatsEntry=vrSnaCircStatsEntry, vrPpSnaPortCircuitS1MacIndex=vrPpSnaPortCircuitS1MacIndex, vrPpSnaPortCircuitRowStatus=vrPpSnaPortCircuitRowStatus, vrSnaAdminControlTable=vrSnaAdminControlTable, vrPpSnaPortStorageType=vrPpSnaPortStorageType, vrSnaStateTable=vrSnaStateTable, vrSnaRowStatusTable=vrSnaRowStatusTable, vrSnaDirStatsTable=vrSnaDirStatsTable, vrSnaOperEntry=vrSnaOperEntry, vrPpSnaPortCircuitOrigin=vrPpSnaPortCircuitOrigin, vrPpSnaPortStateTable=vrPpSnaPortStateTable, vrPpSnaPortCircuitS1DlcType=vrPpSnaPortCircuitS1DlcType, vrSnaComponentName=vrSnaComponentName, vrPpSnaPortRowStatusTable=vrPpSnaPortRowStatusTable, vrPpSnaPortCircuitRowStatusEntry=vrPpSnaPortCircuitRowStatusEntry, vrSnaCreates=vrSnaCreates, vrPpSnaPortCircuitPriority=vrPpSnaPortCircuitPriority, vrPpSnaPortSnmpOperStatus=vrPpSnaPortSnmpOperStatus, vrPpSnaPortProvTable=vrPpSnaPortProvTable, vrPpSnaPortStateEntry=vrPpSnaPortStateEntry, vrPpSnaPortCircuitS2SapIndex=vrPpSnaPortCircuitS2SapIndex, vrPpSnaPortAdminControlTable=vrPpSnaPortAdminControlTable, vrSnaMacCacheMisses=vrSnaMacCacheMisses, snaCapabilitiesBE=snaCapabilitiesBE, vrPpSnaPortCircuitS1SapIndex=vrPpSnaPortCircuitS1SapIndex, vrSnaDirStatsEntry=vrSnaDirStatsEntry, vrPpSnaPortOperationalState=vrPpSnaPortOperationalState, vrPpSnaPortCircuitOperEntry=vrPpSnaPortCircuitOperEntry, snaCapabilities=snaCapabilities, vrPpSnaPortRowStatus=vrPpSnaPortRowStatus, vrPpSnaPortIndex=vrPpSnaPortIndex, vrPpSnaPortCircuitS2Location=vrPpSnaPortCircuitS2Location, snaGroup=snaGroup, vrPpSnaPortCircuitComponentName=vrPpSnaPortCircuitComponentName, snaMIB=snaMIB, vrSnaAdminControlEntry=vrSnaAdminControlEntry, vrSna=vrSna, vrPpSnaPortUsageState=vrPpSnaPortUsageState, vrSnaRowStatus=vrSnaRowStatus, vrSnaIndex=vrSnaIndex, vrSnaAdminState=vrSnaAdminState, snaCapabilitiesBE01A=snaCapabilitiesBE01A, vrPpSnaPortCircuitVcId=vrPpSnaPortCircuitVcId, snaGroupBE01A=snaGroupBE01A, vrPpSnaPortRowStatusEntry=vrPpSnaPortRowStatusEntry, vrSnaSnmpOperStatus=vrSnaSnmpOperStatus, vrPpSnaPortAdminControlEntry=vrPpSnaPortAdminControlEntry, vrPpSnaPortProvEntry=vrPpSnaPortProvEntry, vrPpSnaPortCircuitRowStatusTable=vrPpSnaPortCircuitRowStatusTable, vrSnaMacCacheHits=vrSnaMacCacheHits, vrPpSnaPort=vrPpSnaPort, snaGroupBE=snaGroupBE, vrPpSnaPortCircuit=vrPpSnaPortCircuit, vrPpSnaPortComponentName=vrPpSnaPortComponentName, vrSnaCircStatsTable=vrSnaCircStatsTable, vrSnaStateEntry=vrSnaStateEntry, vrSnaVersion=vrSnaVersion, vrPpSnaPortCircuitS1RouteInfo=vrPpSnaPortCircuitS1RouteInfo, snaCapabilitiesBE01=snaCapabilitiesBE01, vrPpSnaPortCircuitS2MacIndex=vrPpSnaPortCircuitS2MacIndex, vrPpSnaPortCircuitState=vrPpSnaPortCircuitState, vrPpSnaPortAdminState=vrPpSnaPortAdminState, vrPpSnaPortVirtualSegmentLFSize=vrPpSnaPortVirtualSegmentLFSize, vrSnaOperTable=vrSnaOperTable, vrSnaOperationalState=vrSnaOperationalState, vrPpSnaPortSnmpAdminStatus=vrPpSnaPortSnmpAdminStatus, vrSnaRowStatusEntry=vrSnaRowStatusEntry)
| (object_identifier, integer, octet_string) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'Integer', 'OctetString')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(constraints_intersection, single_value_constraint, value_range_constraint, value_size_constraint, constraints_union) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'SingleValueConstraint', 'ValueRangeConstraint', 'ValueSizeConstraint', 'ConstraintsUnion')
(integer32, row_status, counter32, gauge32, display_string, row_pointer, storage_type, unsigned32) = mibBuilder.importSymbols('Nortel-Magellan-Passport-StandardTextualConventionsMIB', 'Integer32', 'RowStatus', 'Counter32', 'Gauge32', 'DisplayString', 'RowPointer', 'StorageType', 'Unsigned32')
(hex_string, non_replicated, dashed_hex_string) = mibBuilder.importSymbols('Nortel-Magellan-Passport-TextualConventionsMIB', 'HexString', 'NonReplicated', 'DashedHexString')
(passport_mi_bs,) = mibBuilder.importSymbols('Nortel-Magellan-Passport-UsefulDefinitionsMIB', 'passportMIBs')
(vr_pp_index, vr_index, vr_pp, vr) = mibBuilder.importSymbols('Nortel-Magellan-Passport-VirtualRouterMIB', 'vrPpIndex', 'vrIndex', 'vrPp', 'vr')
(module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup')
(iso, integer32, counter32, gauge32, ip_address, mib_identifier, time_ticks, counter64, mib_scalar, mib_table, mib_table_row, mib_table_column, module_identity, notification_type, bits, unsigned32, object_identity) = mibBuilder.importSymbols('SNMPv2-SMI', 'iso', 'Integer32', 'Counter32', 'Gauge32', 'IpAddress', 'MibIdentifier', 'TimeTicks', 'Counter64', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'ModuleIdentity', 'NotificationType', 'Bits', 'Unsigned32', 'ObjectIdentity')
(display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention')
sna_mib = mib_identifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 2, 56))
vr_pp_sna_port = mib_identifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15))
vr_pp_sna_port_row_status_table = mib_table((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 1))
if mibBuilder.loadTexts:
vrPpSnaPortRowStatusTable.setStatus('mandatory')
if mibBuilder.loadTexts:
vrPpSnaPortRowStatusTable.setDescription('This entry controls the addition and deletion of vrPpSnaPort components.')
vr_pp_sna_port_row_status_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 1, 1)).setIndexNames((0, 'Nortel-Magellan-Passport-VirtualRouterMIB', 'vrIndex'), (0, 'Nortel-Magellan-Passport-VirtualRouterMIB', 'vrPpIndex'), (0, 'Nortel-Magellan-Passport-SnaMIB', 'vrPpSnaPortIndex'))
if mibBuilder.loadTexts:
vrPpSnaPortRowStatusEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
vrPpSnaPortRowStatusEntry.setDescription('A single entry in the table represents a single vrPpSnaPort component.')
vr_pp_sna_port_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 1, 1, 1), row_status()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
vrPpSnaPortRowStatus.setStatus('mandatory')
if mibBuilder.loadTexts:
vrPpSnaPortRowStatus.setDescription('This variable is used as the basis for SNMP naming of vrPpSnaPort components. These components can be added and deleted.')
vr_pp_sna_port_component_name = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 1, 1, 2), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrPpSnaPortComponentName.setStatus('mandatory')
if mibBuilder.loadTexts:
vrPpSnaPortComponentName.setDescription("This variable provides the component's string name for use with the ASCII Console Interface")
vr_pp_sna_port_storage_type = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 1, 1, 4), storage_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrPpSnaPortStorageType.setStatus('mandatory')
if mibBuilder.loadTexts:
vrPpSnaPortStorageType.setDescription('This variable represents the storage type value for the vrPpSnaPort tables.')
vr_pp_sna_port_index = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 1, 1, 10), non_replicated())
if mibBuilder.loadTexts:
vrPpSnaPortIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
vrPpSnaPortIndex.setDescription('This variable represents the index for the vrPpSnaPort tables.')
vr_pp_sna_port_admin_control_table = mib_table((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 100))
if mibBuilder.loadTexts:
vrPpSnaPortAdminControlTable.setStatus('mandatory')
if mibBuilder.loadTexts:
vrPpSnaPortAdminControlTable.setDescription('This group includes the Administrative Control attribute. This attribute defines the current administrative state of this component.')
vr_pp_sna_port_admin_control_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 100, 1)).setIndexNames((0, 'Nortel-Magellan-Passport-VirtualRouterMIB', 'vrIndex'), (0, 'Nortel-Magellan-Passport-VirtualRouterMIB', 'vrPpIndex'), (0, 'Nortel-Magellan-Passport-SnaMIB', 'vrPpSnaPortIndex'))
if mibBuilder.loadTexts:
vrPpSnaPortAdminControlEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
vrPpSnaPortAdminControlEntry.setDescription('An entry in the vrPpSnaPortAdminControlTable.')
vr_pp_sna_port_snmp_admin_status = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 100, 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:
vrPpSnaPortSnmpAdminStatus.setStatus('mandatory')
if mibBuilder.loadTexts:
vrPpSnaPortSnmpAdminStatus.setDescription('The desired state of the interface. The up state indicates the interface is operational and packet forwarding is allowed. The down state indicates the interface is not operational and packet forwarding is unavailable. The testing state indicates that no operational packets can be passed.')
vr_pp_sna_port_prov_table = mib_table((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 101))
if mibBuilder.loadTexts:
vrPpSnaPortProvTable.setStatus('mandatory')
if mibBuilder.loadTexts:
vrPpSnaPortProvTable.setDescription('This group contains provisionable attributes for SNA ports.')
vr_pp_sna_port_prov_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 101, 1)).setIndexNames((0, 'Nortel-Magellan-Passport-VirtualRouterMIB', 'vrIndex'), (0, 'Nortel-Magellan-Passport-VirtualRouterMIB', 'vrPpIndex'), (0, 'Nortel-Magellan-Passport-SnaMIB', 'vrPpSnaPortIndex'))
if mibBuilder.loadTexts:
vrPpSnaPortProvEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
vrPpSnaPortProvEntry.setDescription('An entry in the vrPpSnaPortProvTable.')
vr_pp_sna_port_virtual_segment_lf_size = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 101, 1, 1), unsigned32().subtype(subtypeSpec=constraints_union(value_range_constraint(516, 516), value_range_constraint(635, 635), value_range_constraint(754, 754), value_range_constraint(873, 873), value_range_constraint(993, 993), value_range_constraint(1112, 1112), value_range_constraint(1231, 1231), value_range_constraint(1350, 1350), value_range_constraint(1470, 1470), value_range_constraint(1542, 1542), value_range_constraint(1615, 1615), value_range_constraint(1688, 1688), value_range_constraint(1761, 1761), value_range_constraint(1833, 1833), value_range_constraint(1906, 1906), value_range_constraint(1979, 1979), value_range_constraint(2052, 2052), value_range_constraint(2345, 2345), value_range_constraint(5331, 5331), value_range_constraint(5798, 5798), value_range_constraint(6264, 6264), value_range_constraint(6730, 6730), value_range_constraint(7197, 7197), value_range_constraint(7663, 7663), value_range_constraint(8130, 8130), value_range_constraint(8539, 8539), value_range_constraint(8949, 8949), value_range_constraint(9358, 9358), value_range_constraint(9768, 9768), value_range_constraint(10178, 10178), value_range_constraint(10587, 10587), value_range_constraint(10997, 10997), value_range_constraint(11407, 11407), value_range_constraint(12199, 12199), value_range_constraint(12992, 12992), value_range_constraint(13785, 13785), value_range_constraint(14578, 14578), value_range_constraint(15370, 15370), value_range_constraint(16163, 16163), value_range_constraint(16956, 16956), value_range_constraint(17749, 17749), value_range_constraint(20730, 20730), value_range_constraint(23711, 23711), value_range_constraint(26693, 26693), value_range_constraint(29674, 29674), value_range_constraint(32655, 32655), value_range_constraint(35637, 35637), value_range_constraint(38618, 38618), value_range_constraint(41600, 41600), value_range_constraint(44591, 44591), value_range_constraint(47583, 47583), value_range_constraint(50575, 50575), value_range_constraint(53567, 53567), value_range_constraint(56559, 56559), value_range_constraint(59551, 59551), value_range_constraint(65535, 65535))).clone(2345)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
vrPpSnaPortVirtualSegmentLFSize.setStatus('mandatory')
if mibBuilder.loadTexts:
vrPpSnaPortVirtualSegmentLFSize.setDescription('This attribute specifies the largest frame size (including DLC header and info field but not any MAC-level or framing octets) for end-to- end connections established through this Sna component. This value is used as the largest frame size for all circuits unless a smaller value is specified in XID signals or by local LAN constraints.')
vr_pp_sna_port_state_table = mib_table((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 103))
if mibBuilder.loadTexts:
vrPpSnaPortStateTable.setStatus('mandatory')
if mibBuilder.loadTexts:
vrPpSnaPortStateTable.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.')
vr_pp_sna_port_state_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 103, 1)).setIndexNames((0, 'Nortel-Magellan-Passport-VirtualRouterMIB', 'vrIndex'), (0, 'Nortel-Magellan-Passport-VirtualRouterMIB', 'vrPpIndex'), (0, 'Nortel-Magellan-Passport-SnaMIB', 'vrPpSnaPortIndex'))
if mibBuilder.loadTexts:
vrPpSnaPortStateEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
vrPpSnaPortStateEntry.setDescription('An entry in the vrPpSnaPortStateTable.')
vr_pp_sna_port_admin_state = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 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:
vrPpSnaPortAdminState.setStatus('mandatory')
if mibBuilder.loadTexts:
vrPpSnaPortAdminState.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.')
vr_pp_sna_port_operational_state = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 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:
vrPpSnaPortOperationalState.setStatus('mandatory')
if mibBuilder.loadTexts:
vrPpSnaPortOperationalState.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.')
vr_pp_sna_port_usage_state = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 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:
vrPpSnaPortUsageState.setStatus('mandatory')
if mibBuilder.loadTexts:
vrPpSnaPortUsageState.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.')
vr_pp_sna_port_oper_status_table = mib_table((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 104))
if mibBuilder.loadTexts:
vrPpSnaPortOperStatusTable.setStatus('mandatory')
if mibBuilder.loadTexts:
vrPpSnaPortOperStatusTable.setDescription('This group includes the Operational Status attribute. This attribute defines the current operational state of this component.')
vr_pp_sna_port_oper_status_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 104, 1)).setIndexNames((0, 'Nortel-Magellan-Passport-VirtualRouterMIB', 'vrIndex'), (0, 'Nortel-Magellan-Passport-VirtualRouterMIB', 'vrPpIndex'), (0, 'Nortel-Magellan-Passport-SnaMIB', 'vrPpSnaPortIndex'))
if mibBuilder.loadTexts:
vrPpSnaPortOperStatusEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
vrPpSnaPortOperStatusEntry.setDescription('An entry in the vrPpSnaPortOperStatusTable.')
vr_pp_sna_port_snmp_oper_status = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 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:
vrPpSnaPortSnmpOperStatus.setStatus('mandatory')
if mibBuilder.loadTexts:
vrPpSnaPortSnmpOperStatus.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.')
vr_pp_sna_port_circuit = mib_identifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 2))
vr_pp_sna_port_circuit_row_status_table = mib_table((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 2, 1))
if mibBuilder.loadTexts:
vrPpSnaPortCircuitRowStatusTable.setStatus('mandatory')
if mibBuilder.loadTexts:
vrPpSnaPortCircuitRowStatusTable.setDescription('*** THIS TABLE CURRENTLY NOT IMPLEMENTED *** This entry controls the addition and deletion of vrPpSnaPortCircuit components.')
vr_pp_sna_port_circuit_row_status_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 2, 1, 1)).setIndexNames((0, 'Nortel-Magellan-Passport-VirtualRouterMIB', 'vrIndex'), (0, 'Nortel-Magellan-Passport-VirtualRouterMIB', 'vrPpIndex'), (0, 'Nortel-Magellan-Passport-SnaMIB', 'vrPpSnaPortIndex'), (0, 'Nortel-Magellan-Passport-SnaMIB', 'vrPpSnaPortCircuitS1MacIndex'), (0, 'Nortel-Magellan-Passport-SnaMIB', 'vrPpSnaPortCircuitS1SapIndex'), (0, 'Nortel-Magellan-Passport-SnaMIB', 'vrPpSnaPortCircuitS2MacIndex'), (0, 'Nortel-Magellan-Passport-SnaMIB', 'vrPpSnaPortCircuitS2SapIndex'))
if mibBuilder.loadTexts:
vrPpSnaPortCircuitRowStatusEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
vrPpSnaPortCircuitRowStatusEntry.setDescription('A single entry in the table represents a single vrPpSnaPortCircuit component.')
vr_pp_sna_port_circuit_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 2, 1, 1, 1), row_status()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrPpSnaPortCircuitRowStatus.setStatus('mandatory')
if mibBuilder.loadTexts:
vrPpSnaPortCircuitRowStatus.setDescription('This variable is used as the basis for SNMP naming of vrPpSnaPortCircuit components. These components cannot be added nor deleted.')
vr_pp_sna_port_circuit_component_name = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 2, 1, 1, 2), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrPpSnaPortCircuitComponentName.setStatus('mandatory')
if mibBuilder.loadTexts:
vrPpSnaPortCircuitComponentName.setDescription("This variable provides the component's string name for use with the ASCII Console Interface")
vr_pp_sna_port_circuit_storage_type = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 2, 1, 1, 4), storage_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrPpSnaPortCircuitStorageType.setStatus('mandatory')
if mibBuilder.loadTexts:
vrPpSnaPortCircuitStorageType.setDescription('This variable represents the storage type value for the vrPpSnaPortCircuit tables.')
vr_pp_sna_port_circuit_s1_mac_index = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 2, 1, 1, 10), dashed_hex_string().subtype(subtypeSpec=value_size_constraint(6, 6)).setFixedLength(6))
if mibBuilder.loadTexts:
vrPpSnaPortCircuitS1MacIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
vrPpSnaPortCircuitS1MacIndex.setDescription('This variable represents an index for the vrPpSnaPortCircuit tables.')
vr_pp_sna_port_circuit_s1_sap_index = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 2, 1, 1, 11), integer32().subtype(subtypeSpec=value_range_constraint(2, 254)))
if mibBuilder.loadTexts:
vrPpSnaPortCircuitS1SapIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
vrPpSnaPortCircuitS1SapIndex.setDescription('This variable represents an index for the vrPpSnaPortCircuit tables.')
vr_pp_sna_port_circuit_s2_mac_index = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 2, 1, 1, 12), dashed_hex_string().subtype(subtypeSpec=value_size_constraint(6, 6)).setFixedLength(6))
if mibBuilder.loadTexts:
vrPpSnaPortCircuitS2MacIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
vrPpSnaPortCircuitS2MacIndex.setDescription('This variable represents an index for the vrPpSnaPortCircuit tables.')
vr_pp_sna_port_circuit_s2_sap_index = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 2, 1, 1, 13), integer32().subtype(subtypeSpec=value_range_constraint(2, 254)))
if mibBuilder.loadTexts:
vrPpSnaPortCircuitS2SapIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
vrPpSnaPortCircuitS2SapIndex.setDescription('This variable represents an index for the vrPpSnaPortCircuit tables.')
vr_pp_sna_port_circuit_oper_table = mib_table((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 2, 100))
if mibBuilder.loadTexts:
vrPpSnaPortCircuitOperTable.setStatus('mandatory')
if mibBuilder.loadTexts:
vrPpSnaPortCircuitOperTable.setDescription('*** THIS TABLE CURRENTLY NOT IMPLEMENTED *** This group defines an entry in the SnaCircuitEntry Table.')
vr_pp_sna_port_circuit_oper_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 2, 100, 1)).setIndexNames((0, 'Nortel-Magellan-Passport-VirtualRouterMIB', 'vrIndex'), (0, 'Nortel-Magellan-Passport-VirtualRouterMIB', 'vrPpIndex'), (0, 'Nortel-Magellan-Passport-SnaMIB', 'vrPpSnaPortIndex'), (0, 'Nortel-Magellan-Passport-SnaMIB', 'vrPpSnaPortCircuitS1MacIndex'), (0, 'Nortel-Magellan-Passport-SnaMIB', 'vrPpSnaPortCircuitS1SapIndex'), (0, 'Nortel-Magellan-Passport-SnaMIB', 'vrPpSnaPortCircuitS2MacIndex'), (0, 'Nortel-Magellan-Passport-SnaMIB', 'vrPpSnaPortCircuitS2SapIndex'))
if mibBuilder.loadTexts:
vrPpSnaPortCircuitOperEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
vrPpSnaPortCircuitOperEntry.setDescription('An entry in the vrPpSnaPortCircuitOperTable.')
vr_pp_sna_port_circuit_s1_dlc_type = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 2, 100, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('other', 1), ('na', 2), ('llc', 3), ('sdlc', 4), ('qllc', 5)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrPpSnaPortCircuitS1DlcType.setStatus('mandatory')
if mibBuilder.loadTexts:
vrPpSnaPortCircuitS1DlcType.setDescription('This attribute indicates the DLC protocol in use between the SNA node and S1.')
vr_pp_sna_port_circuit_s1_route_info = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 2, 100, 1, 3), hex_string().subtype(subtypeSpec=value_size_constraint(0, 30))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrPpSnaPortCircuitS1RouteInfo.setStatus('mandatory')
if mibBuilder.loadTexts:
vrPpSnaPortCircuitS1RouteInfo.setDescription('If source-route bridging is in use between the SNA node and S1, this is the routing information field describing the path between the two devices. The format of the routing information corresponds to that of the route designator fields of a specifically routed SRB frame. Otherwise the value will be a Hex string of zero length.')
vr_pp_sna_port_circuit_s2_location = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 2, 100, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('other', 1), ('internal', 2), ('remote', 3), ('local', 4)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrPpSnaPortCircuitS2Location.setStatus('mandatory')
if mibBuilder.loadTexts:
vrPpSnaPortCircuitS2Location.setDescription('This attribute indicates the location of End Station 2 (S2). If the location of End Station 2 is local, the interface information will be available in the conceptual row whose S1 and S2 are the S2 and the S1 of this conceptual row, respectively.')
vr_pp_sna_port_circuit_origin = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 2, 100, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('s2', 0), ('s1', 1)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrPpSnaPortCircuitOrigin.setStatus('mandatory')
if mibBuilder.loadTexts:
vrPpSnaPortCircuitOrigin.setDescription('This attribute indicates which of the two end stations initiated the establishment of this circuit.')
vr_pp_sna_port_circuit_state = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 2, 100, 1, 13), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13))).clone(namedValues=named_values(('disconnected', 1), ('circuitStart', 2), ('resolvePending', 3), ('circuitPending', 4), ('circuitEstablished', 5), ('connectPending', 6), ('contactPending', 7), ('connected', 8), ('disconnectPending', 9), ('haltPending', 10), ('haltPendingNoack', 11), ('circuitRestart', 12), ('restartPending', 13)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrPpSnaPortCircuitState.setStatus('mandatory')
if mibBuilder.loadTexts:
vrPpSnaPortCircuitState.setDescription('This attribute indicates the current state of this circuit. Note that this implementation does not keep entries after circuit disconnect. Details regarding the state machine and meaning of individual states may be found in RFC 1795.')
vr_pp_sna_port_circuit_priority = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 2, 100, 1, 14), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('unsupported', 1), ('low', 2), ('medium', 3), ('high', 4), ('highest', 5)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrPpSnaPortCircuitPriority.setStatus('mandatory')
if mibBuilder.loadTexts:
vrPpSnaPortCircuitPriority.setDescription('This attribute indicates the transmission priority of this circuit as understood by this SNA node. This value is determined by the two SNA nodes at circuit startup time.')
vr_pp_sna_port_circuit_vc_id = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 3, 15, 2, 100, 1, 26), row_pointer()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrPpSnaPortCircuitVcId.setStatus('mandatory')
if mibBuilder.loadTexts:
vrPpSnaPortCircuitVcId.setDescription('This attribute indicates the component name of the GvcIf/n Dlci/n which represents this VC connection in the SNA DLR service. This attribute appears only for circuits that are connecting over a Frame Relay DLCI only. For circuits connecting over Qllc VCs or Token Ring interface this attribute does not appear.')
vr_sna = mib_identifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14))
vr_sna_row_status_table = mib_table((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 1))
if mibBuilder.loadTexts:
vrSnaRowStatusTable.setStatus('mandatory')
if mibBuilder.loadTexts:
vrSnaRowStatusTable.setDescription('This entry controls the addition and deletion of vrSna components.')
vr_sna_row_status_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 1, 1)).setIndexNames((0, 'Nortel-Magellan-Passport-VirtualRouterMIB', 'vrIndex'), (0, 'Nortel-Magellan-Passport-SnaMIB', 'vrSnaIndex'))
if mibBuilder.loadTexts:
vrSnaRowStatusEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
vrSnaRowStatusEntry.setDescription('A single entry in the table represents a single vrSna component.')
vr_sna_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 1, 1, 1), row_status()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
vrSnaRowStatus.setStatus('mandatory')
if mibBuilder.loadTexts:
vrSnaRowStatus.setDescription('This variable is used as the basis for SNMP naming of vrSna components. These components can be added and deleted.')
vr_sna_component_name = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 1, 1, 2), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrSnaComponentName.setStatus('mandatory')
if mibBuilder.loadTexts:
vrSnaComponentName.setDescription("This variable provides the component's string name for use with the ASCII Console Interface")
vr_sna_storage_type = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 1, 1, 4), storage_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrSnaStorageType.setStatus('mandatory')
if mibBuilder.loadTexts:
vrSnaStorageType.setDescription('This variable represents the storage type value for the vrSna tables.')
vr_sna_index = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 1, 1, 10), non_replicated())
if mibBuilder.loadTexts:
vrSnaIndex.setStatus('mandatory')
if mibBuilder.loadTexts:
vrSnaIndex.setDescription('This variable represents the index for the vrSna tables.')
vr_sna_admin_control_table = mib_table((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 100))
if mibBuilder.loadTexts:
vrSnaAdminControlTable.setStatus('mandatory')
if mibBuilder.loadTexts:
vrSnaAdminControlTable.setDescription('This group includes the Administrative Control attribute. This attribute defines the current administrative state of this component.')
vr_sna_admin_control_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 100, 1)).setIndexNames((0, 'Nortel-Magellan-Passport-VirtualRouterMIB', 'vrIndex'), (0, 'Nortel-Magellan-Passport-SnaMIB', 'vrSnaIndex'))
if mibBuilder.loadTexts:
vrSnaAdminControlEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
vrSnaAdminControlEntry.setDescription('An entry in the vrSnaAdminControlTable.')
vr_sna_snmp_admin_status = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 100, 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:
vrSnaSnmpAdminStatus.setStatus('mandatory')
if mibBuilder.loadTexts:
vrSnaSnmpAdminStatus.setDescription('The desired state of the interface. The up state indicates the interface is operational and packet forwarding is allowed. The down state indicates the interface is not operational and packet forwarding is unavailable. The testing state indicates that no operational packets can be passed.')
vr_sna_state_table = mib_table((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 101))
if mibBuilder.loadTexts:
vrSnaStateTable.setStatus('mandatory')
if mibBuilder.loadTexts:
vrSnaStateTable.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.')
vr_sna_state_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 101, 1)).setIndexNames((0, 'Nortel-Magellan-Passport-VirtualRouterMIB', 'vrIndex'), (0, 'Nortel-Magellan-Passport-SnaMIB', 'vrSnaIndex'))
if mibBuilder.loadTexts:
vrSnaStateEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
vrSnaStateEntry.setDescription('An entry in the vrSnaStateTable.')
vr_sna_admin_state = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 101, 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:
vrSnaAdminState.setStatus('mandatory')
if mibBuilder.loadTexts:
vrSnaAdminState.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.')
vr_sna_operational_state = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 101, 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:
vrSnaOperationalState.setStatus('mandatory')
if mibBuilder.loadTexts:
vrSnaOperationalState.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.')
vr_sna_usage_state = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 101, 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:
vrSnaUsageState.setStatus('mandatory')
if mibBuilder.loadTexts:
vrSnaUsageState.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.')
vr_sna_oper_status_table = mib_table((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 102))
if mibBuilder.loadTexts:
vrSnaOperStatusTable.setStatus('mandatory')
if mibBuilder.loadTexts:
vrSnaOperStatusTable.setDescription('This group includes the Operational Status attribute. This attribute defines the current operational state of this component.')
vr_sna_oper_status_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 102, 1)).setIndexNames((0, 'Nortel-Magellan-Passport-VirtualRouterMIB', 'vrIndex'), (0, 'Nortel-Magellan-Passport-SnaMIB', 'vrSnaIndex'))
if mibBuilder.loadTexts:
vrSnaOperStatusEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
vrSnaOperStatusEntry.setDescription('An entry in the vrSnaOperStatusTable.')
vr_sna_snmp_oper_status = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 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('readonly')
if mibBuilder.loadTexts:
vrSnaSnmpOperStatus.setStatus('mandatory')
if mibBuilder.loadTexts:
vrSnaSnmpOperStatus.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.')
vr_sna_oper_table = mib_table((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 103))
if mibBuilder.loadTexts:
vrSnaOperTable.setStatus('mandatory')
if mibBuilder.loadTexts:
vrSnaOperTable.setDescription('This group contains operational attributes which describe the behavior of the Sna component and associated ports under the Virtual Router (VR).')
vr_sna_oper_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 103, 1)).setIndexNames((0, 'Nortel-Magellan-Passport-VirtualRouterMIB', 'vrIndex'), (0, 'Nortel-Magellan-Passport-SnaMIB', 'vrSnaIndex'))
if mibBuilder.loadTexts:
vrSnaOperEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
vrSnaOperEntry.setDescription('An entry in the vrSnaOperTable.')
vr_sna_version = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 103, 1, 2), hex_string().subtype(subtypeSpec=value_size_constraint(2, 2)).setFixedLength(2)).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrSnaVersion.setStatus('mandatory')
if mibBuilder.loadTexts:
vrSnaVersion.setDescription('This attribute indicates the particular version of the SNA standard supported by this Sna. The first 2 digits represent the SNA standard Version number of this Sna, the second 2 digits represent the SNA standard Release number.')
vr_sna_circ_stats_table = mib_table((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 104))
if mibBuilder.loadTexts:
vrSnaCircStatsTable.setStatus('mandatory')
if mibBuilder.loadTexts:
vrSnaCircStatsTable.setDescription("A circuit is the end-to-end association of two Data Link Routing (DLR) entities through one or two DLR nodes. It is the concatenation of two 'data links', optionally with an intervening transport connection (not initially supported). The origin of the circuit is the end station that initiates the circuit. The target of the circuit is the end station that receives the initiation.")
vr_sna_circ_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 104, 1)).setIndexNames((0, 'Nortel-Magellan-Passport-VirtualRouterMIB', 'vrIndex'), (0, 'Nortel-Magellan-Passport-SnaMIB', 'vrSnaIndex'))
if mibBuilder.loadTexts:
vrSnaCircStatsEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
vrSnaCircStatsEntry.setDescription('An entry in the vrSnaCircStatsTable.')
vr_sna_actives = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 104, 1, 1), gauge32().subtype(subtypeSpec=value_range_constraint(0, 4292967295))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrSnaActives.setStatus('mandatory')
if mibBuilder.loadTexts:
vrSnaActives.setDescription('This attribute indiates the current number of circuits in Circuit table that are not in the disconnected state.')
vr_sna_creates = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 104, 1, 2), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrSnaCreates.setStatus('mandatory')
if mibBuilder.loadTexts:
vrSnaCreates.setDescription('This attribute indicates the total number of entries ever added to Circuit table, or reactivated upon exiting disconnected state.')
vr_sna_dir_stats_table = mib_table((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 105))
if mibBuilder.loadTexts:
vrSnaDirStatsTable.setStatus('mandatory')
if mibBuilder.loadTexts:
vrSnaDirStatsTable.setDescription('MAC Table Directory statistics')
vr_sna_dir_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 105, 1)).setIndexNames((0, 'Nortel-Magellan-Passport-VirtualRouterMIB', 'vrIndex'), (0, 'Nortel-Magellan-Passport-SnaMIB', 'vrSnaIndex'))
if mibBuilder.loadTexts:
vrSnaDirStatsEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
vrSnaDirStatsEntry.setDescription('An entry in the vrSnaDirStatsTable.')
vr_sna_mac_entries = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 105, 1, 1), gauge32().subtype(subtypeSpec=value_range_constraint(0, 10000))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrSnaMacEntries.setStatus('mandatory')
if mibBuilder.loadTexts:
vrSnaMacEntries.setDescription('This attribute indicates the current total number of entries in the DirectoryEntry table.')
vr_sna_mac_cache_hits = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 105, 1, 2), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrSnaMacCacheHits.setStatus('mandatory')
if mibBuilder.loadTexts:
vrSnaMacCacheHits.setDescription('This attribute indicates the number of times a cache search for a particular MAC address resulted in success.')
vr_sna_mac_cache_misses = mib_table_column((1, 3, 6, 1, 4, 1, 562, 2, 4, 1, 100, 14, 105, 1, 3), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vrSnaMacCacheMisses.setStatus('mandatory')
if mibBuilder.loadTexts:
vrSnaMacCacheMisses.setDescription('This attribute indicates the number of times a cache search for a particular MAC address resulted in failure.')
sna_group = mib_identifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 2, 56, 1))
sna_group_be = mib_identifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 2, 56, 1, 5))
sna_group_be01 = mib_identifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 2, 56, 1, 5, 2))
sna_group_be01_a = mib_identifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 2, 56, 1, 5, 2, 2))
sna_capabilities = mib_identifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 2, 56, 3))
sna_capabilities_be = mib_identifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 2, 56, 3, 5))
sna_capabilities_be01 = mib_identifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 2, 56, 3, 5, 2))
sna_capabilities_be01_a = mib_identifier((1, 3, 6, 1, 4, 1, 562, 2, 4, 2, 56, 3, 5, 2, 2))
mibBuilder.exportSymbols('Nortel-Magellan-Passport-SnaMIB', vrSnaMacEntries=vrSnaMacEntries, vrPpSnaPortOperStatusEntry=vrPpSnaPortOperStatusEntry, vrPpSnaPortCircuitOperTable=vrPpSnaPortCircuitOperTable, vrSnaActives=vrSnaActives, vrSnaSnmpAdminStatus=vrSnaSnmpAdminStatus, vrSnaStorageType=vrSnaStorageType, snaGroupBE01=snaGroupBE01, vrSnaOperStatusEntry=vrSnaOperStatusEntry, vrSnaUsageState=vrSnaUsageState, vrPpSnaPortOperStatusTable=vrPpSnaPortOperStatusTable, vrSnaOperStatusTable=vrSnaOperStatusTable, vrPpSnaPortCircuitStorageType=vrPpSnaPortCircuitStorageType, vrSnaCircStatsEntry=vrSnaCircStatsEntry, vrPpSnaPortCircuitS1MacIndex=vrPpSnaPortCircuitS1MacIndex, vrPpSnaPortCircuitRowStatus=vrPpSnaPortCircuitRowStatus, vrSnaAdminControlTable=vrSnaAdminControlTable, vrPpSnaPortStorageType=vrPpSnaPortStorageType, vrSnaStateTable=vrSnaStateTable, vrSnaRowStatusTable=vrSnaRowStatusTable, vrSnaDirStatsTable=vrSnaDirStatsTable, vrSnaOperEntry=vrSnaOperEntry, vrPpSnaPortCircuitOrigin=vrPpSnaPortCircuitOrigin, vrPpSnaPortStateTable=vrPpSnaPortStateTable, vrPpSnaPortCircuitS1DlcType=vrPpSnaPortCircuitS1DlcType, vrSnaComponentName=vrSnaComponentName, vrPpSnaPortRowStatusTable=vrPpSnaPortRowStatusTable, vrPpSnaPortCircuitRowStatusEntry=vrPpSnaPortCircuitRowStatusEntry, vrSnaCreates=vrSnaCreates, vrPpSnaPortCircuitPriority=vrPpSnaPortCircuitPriority, vrPpSnaPortSnmpOperStatus=vrPpSnaPortSnmpOperStatus, vrPpSnaPortProvTable=vrPpSnaPortProvTable, vrPpSnaPortStateEntry=vrPpSnaPortStateEntry, vrPpSnaPortCircuitS2SapIndex=vrPpSnaPortCircuitS2SapIndex, vrPpSnaPortAdminControlTable=vrPpSnaPortAdminControlTable, vrSnaMacCacheMisses=vrSnaMacCacheMisses, snaCapabilitiesBE=snaCapabilitiesBE, vrPpSnaPortCircuitS1SapIndex=vrPpSnaPortCircuitS1SapIndex, vrSnaDirStatsEntry=vrSnaDirStatsEntry, vrPpSnaPortOperationalState=vrPpSnaPortOperationalState, vrPpSnaPortCircuitOperEntry=vrPpSnaPortCircuitOperEntry, snaCapabilities=snaCapabilities, vrPpSnaPortRowStatus=vrPpSnaPortRowStatus, vrPpSnaPortIndex=vrPpSnaPortIndex, vrPpSnaPortCircuitS2Location=vrPpSnaPortCircuitS2Location, snaGroup=snaGroup, vrPpSnaPortCircuitComponentName=vrPpSnaPortCircuitComponentName, snaMIB=snaMIB, vrSnaAdminControlEntry=vrSnaAdminControlEntry, vrSna=vrSna, vrPpSnaPortUsageState=vrPpSnaPortUsageState, vrSnaRowStatus=vrSnaRowStatus, vrSnaIndex=vrSnaIndex, vrSnaAdminState=vrSnaAdminState, snaCapabilitiesBE01A=snaCapabilitiesBE01A, vrPpSnaPortCircuitVcId=vrPpSnaPortCircuitVcId, snaGroupBE01A=snaGroupBE01A, vrPpSnaPortRowStatusEntry=vrPpSnaPortRowStatusEntry, vrSnaSnmpOperStatus=vrSnaSnmpOperStatus, vrPpSnaPortAdminControlEntry=vrPpSnaPortAdminControlEntry, vrPpSnaPortProvEntry=vrPpSnaPortProvEntry, vrPpSnaPortCircuitRowStatusTable=vrPpSnaPortCircuitRowStatusTable, vrSnaMacCacheHits=vrSnaMacCacheHits, vrPpSnaPort=vrPpSnaPort, snaGroupBE=snaGroupBE, vrPpSnaPortCircuit=vrPpSnaPortCircuit, vrPpSnaPortComponentName=vrPpSnaPortComponentName, vrSnaCircStatsTable=vrSnaCircStatsTable, vrSnaStateEntry=vrSnaStateEntry, vrSnaVersion=vrSnaVersion, vrPpSnaPortCircuitS1RouteInfo=vrPpSnaPortCircuitS1RouteInfo, snaCapabilitiesBE01=snaCapabilitiesBE01, vrPpSnaPortCircuitS2MacIndex=vrPpSnaPortCircuitS2MacIndex, vrPpSnaPortCircuitState=vrPpSnaPortCircuitState, vrPpSnaPortAdminState=vrPpSnaPortAdminState, vrPpSnaPortVirtualSegmentLFSize=vrPpSnaPortVirtualSegmentLFSize, vrSnaOperTable=vrSnaOperTable, vrSnaOperationalState=vrSnaOperationalState, vrPpSnaPortSnmpAdminStatus=vrPpSnaPortSnmpAdminStatus, vrSnaRowStatusEntry=vrSnaRowStatusEntry) |
c.NotebookApp.ip = '0.0.0.0'
c.NotebookApp.allow_origin = '*'
c.NotebookApp.open_browser = False
c.NotebookApp.token = ''
c.NotebookApp.password = ''
| c.NotebookApp.ip = '0.0.0.0'
c.NotebookApp.allow_origin = '*'
c.NotebookApp.open_browser = False
c.NotebookApp.token = ''
c.NotebookApp.password = '' |
'''input
2
212
1253
'''
total_case = int(input(''))
total = 0
for i in range(0, total_case):
inp = input('')
total += int(inp[:-1])**(int(inp[-1:]))
print(total) | """input
2
212
1253
"""
total_case = int(input(''))
total = 0
for i in range(0, total_case):
inp = input('')
total += int(inp[:-1]) ** int(inp[-1:])
print(total) |
extensions = ['sphinxcontrib.opencontracting']
exclude_patterns = ['_build']
codelist_headers = {
'en': {'code': 'non-code', 'description': 'non-description'},
}
| extensions = ['sphinxcontrib.opencontracting']
exclude_patterns = ['_build']
codelist_headers = {'en': {'code': 'non-code', 'description': 'non-description'}} |
#
# PySNMP MIB module ASCEND-MIBTRAP-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ASCEND-MIBTRAP-MIB
# Produced by pysmi-0.3.4 at Wed May 1 11:28:47 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)
#
configuration, = mibBuilder.importSymbols("ASCEND-MIB", "configuration")
Integer, ObjectIdentifier, OctetString = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueSizeConstraint, ConstraintsIntersection, ValueRangeConstraint, SingleValueConstraint, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "ConstraintsIntersection", "ValueRangeConstraint", "SingleValueConstraint", "ConstraintsUnion")
NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance")
Unsigned32, Counter32, Bits, Counter64, NotificationType, MibScalar, MibTable, MibTableRow, MibTableColumn, MibIdentifier, ModuleIdentity, ObjectIdentity, Gauge32, TimeTicks, IpAddress, Integer32, iso = mibBuilder.importSymbols("SNMPv2-SMI", "Unsigned32", "Counter32", "Bits", "Counter64", "NotificationType", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "MibIdentifier", "ModuleIdentity", "ObjectIdentity", "Gauge32", "TimeTicks", "IpAddress", "Integer32", "iso")
DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention")
class DisplayString(OctetString):
pass
mibtrapProfile = MibIdentifier((1, 3, 6, 1, 4, 1, 529, 23, 132))
mibtrapProfileTable = MibTable((1, 3, 6, 1, 4, 1, 529, 23, 132, 1), )
if mibBuilder.loadTexts: mibtrapProfileTable.setStatus('mandatory')
if mibBuilder.loadTexts: mibtrapProfileTable.setDescription('A list of mibtrapProfile profile entries.')
mibtrapProfileEntry = MibTableRow((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1), ).setIndexNames((0, "ASCEND-MIBTRAP-MIB", "trapProfile-HostName"))
if mibBuilder.loadTexts: mibtrapProfileEntry.setStatus('mandatory')
if mibBuilder.loadTexts: mibtrapProfileEntry.setDescription('A mibtrapProfile entry containing objects that maps to the parameters of mibtrapProfile profile.')
trapProfile_HostName = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 1), DisplayString()).setLabel("trapProfile-HostName").setMaxAccess("readonly")
if mibBuilder.loadTexts: trapProfile_HostName.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_HostName.setDescription('The name of the host to send traps to. When DNS or YP/NIS is supported this name will be used to look up the LAN address when hostAddress is 0.')
trapProfile_ActiveEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-ActiveEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_ActiveEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_ActiveEnabled.setDescription('If TRUE, profile is enabled to send traps to this target')
trapProfile_CommunityName = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 3), DisplayString()).setLabel("trapProfile-CommunityName").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_CommunityName.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_CommunityName.setDescription('The community name associated with the SNMP PDU.')
trapProfile_HostAddress = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 4), IpAddress()).setLabel("trapProfile-HostAddress").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_HostAddress.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_HostAddress.setDescription('The LAN address of the named host. If 0 the address will be looked up via DNS or YP/NIS when supported.')
trapProfile_HostPort = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 5), Integer32()).setLabel("trapProfile-HostPort").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_HostPort.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_HostPort.setDescription('Port number of the named host. Value 0 is not allowed')
trapProfile_InformTimeOut = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 6), Integer32()).setLabel("trapProfile-InformTimeOut").setMaxAccess("readonly")
if mibBuilder.loadTexts: trapProfile_InformTimeOut.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_InformTimeOut.setDescription('Timeout interval in units of 0.01 seconds after which the Inform PDU is retransmitted on receiving no acknowledgement')
trapProfile_InformRetryCount = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 7), Integer32()).setLabel("trapProfile-InformRetryCount").setMaxAccess("readonly")
if mibBuilder.loadTexts: trapProfile_InformRetryCount.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_InformRetryCount.setDescription('Number of retries attempted when acknowledgement is not received for an Inform PDU')
trapProfile_NotifyTagList = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 8), OctetString()).setLabel("trapProfile-NotifyTagList").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_NotifyTagList.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_NotifyTagList.setDescription('String containing a list of tag values that are used to select target addresses for a particular operation.')
trapProfile_TargetParamsName = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 9), OctetString()).setLabel("trapProfile-TargetParamsName").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_TargetParamsName.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_TargetParamsName.setDescription('Index to the row an entry in SNMPV3-TARGET-PARAM table which is used when generating messages to be sent to this host-address')
trapProfile_NotificationLogEnable = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 75), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-NotificationLogEnable").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_NotificationLogEnable.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_NotificationLogEnable.setDescription('YES if notifications sent on behalf of this entry needs to be logged. ')
trapProfile_NotificationLogLimit = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 76), Integer32()).setLabel("trapProfile-NotificationLogLimit").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_NotificationLogLimit.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_NotificationLogLimit.setDescription('The maximum number of notification entries that can be held in the notification log.')
trapProfile_AgentAddress = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 10), IpAddress()).setLabel("trapProfile-AgentAddress").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_AgentAddress.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_AgentAddress.setDescription('The IP address of the object, generating the SNMP trap.')
trapProfile_AlarmEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-AlarmEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_AlarmEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_AlarmEnabled.setDescription('TRUE if alarm class traps are to be sent to the identified host.')
trapProfile_SecurityEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-SecurityEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_SecurityEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_SecurityEnabled.setDescription('TRUE if security class traps are to be sent to the identified host.')
trapProfile_PortEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-PortEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_PortEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_PortEnabled.setDescription('TRUE if port class traps are to be sent to the identified host.')
trapProfile_SlotEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 14), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-SlotEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_SlotEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_SlotEnabled.setDescription('TRUE if slot class traps are to be sent to the identified host.')
trapProfile_ColdstartEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 15), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-ColdstartEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_ColdstartEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_ColdstartEnabled.setDescription('TRUE if cold start trap is enabled.')
trapProfile_WarmstartEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 16), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-WarmstartEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_WarmstartEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_WarmstartEnabled.setDescription('TRUE if warm start trap is enabled.')
trapProfile_LinkdownEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 17), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-LinkdownEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_LinkdownEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_LinkdownEnabled.setDescription('TRUE if link down trap is enabled.')
trapProfile_LinkupEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 18), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-LinkupEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_LinkupEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_LinkupEnabled.setDescription('TRUE if link up trap is enabled.')
trapProfile_AscendEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 19), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-AscendEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_AscendEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_AscendEnabled.setDescription('TRUE if Ascend trap is enabled.')
trapProfile_ConsoleEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 20), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-ConsoleEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_ConsoleEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_ConsoleEnabled.setDescription('TRUE if console trap is enabled.')
trapProfile_UseExceededEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 21), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-UseExceededEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_UseExceededEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_UseExceededEnabled.setDescription('TRUE if use exceeded trap is enabled.')
trapProfile_PasswordEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 22), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-PasswordEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_PasswordEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_PasswordEnabled.setDescription('TRUE if Telnet password trap is enabled.')
trapProfile_FrLinkupEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 23), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-FrLinkupEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_FrLinkupEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_FrLinkupEnabled.setDescription('TRUE if FR link up trap is enabled.')
trapProfile_FrLinkdownEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 24), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-FrLinkdownEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_FrLinkdownEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_FrLinkdownEnabled.setDescription('TRUE if FR Link Down trap is enabled.')
trapProfile_EventOverwriteEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 25), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-EventOverwriteEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_EventOverwriteEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_EventOverwriteEnabled.setDescription('TRUE if event Overwrite trap is enabled.')
trapProfile_RadiusChangeEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 26), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-RadiusChangeEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_RadiusChangeEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_RadiusChangeEnabled.setDescription('TRUE if radius change trap is enabled.')
trapProfile_McastMonitorEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 27), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-McastMonitorEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_McastMonitorEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_McastMonitorEnabled.setDescription('TRUE if multicast monitor trap is enabled.')
trapProfile_LanModemEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 28), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-LanModemEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_LanModemEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_LanModemEnabled.setDescription('TRUE if lan modem trap is enabled.')
trapProfile_DirdoEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 29), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-DirdoEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_DirdoEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_DirdoEnabled.setDescription('TRUE if DIRDO trap is enabled.')
trapProfile_SlotProfileChangeEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 30), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-SlotProfileChangeEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_SlotProfileChangeEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_SlotProfileChangeEnabled.setDescription('TRUE if slot profile change trap is enabled.')
trapProfile_PowerSupplyEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 31), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-PowerSupplyEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_PowerSupplyEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_PowerSupplyEnabled.setDescription('TRUE if power supply changed trap is enabled.')
trapProfile_MultishelfEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 32), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-MultishelfEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_MultishelfEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_MultishelfEnabled.setDescription('TRUE if multi-shelf controller state trap is enabled.')
trapProfile_AuthenticationEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 33), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-AuthenticationEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_AuthenticationEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_AuthenticationEnabled.setDescription('TRUE if SNMP authentication trap is enabled.')
trapProfile_ConfigChangeEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 34), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-ConfigChangeEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_ConfigChangeEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_ConfigChangeEnabled.setDescription('TRUE if SNMP configuration change trap is enabled.')
trapProfile_SysClockDriftEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 35), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-SysClockDriftEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_SysClockDriftEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_SysClockDriftEnabled.setDescription('TRUE if system clock drifted trap is enabled.')
trapProfile_PrimarySdtnEmptyEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 36), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-PrimarySdtnEmptyEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_PrimarySdtnEmptyEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_PrimarySdtnEmptyEnabled.setDescription('TRUE if SDTN Primary List Empty trap is enabled.')
trapProfile_SecondarySdtnEmptyEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 37), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-SecondarySdtnEmptyEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_SecondarySdtnEmptyEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_SecondarySdtnEmptyEnabled.setDescription('TRUE if SDTN Secondary List Empty trap is enabled.')
trapProfile_SuspectAccessResourceEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 38), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-SuspectAccessResourceEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_SuspectAccessResourceEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_SuspectAccessResourceEnabled.setDescription('TRUE if suspect access resource trap is enabled.')
trapProfile_OspfEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 39), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-OspfEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_OspfEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_OspfEnabled.setDescription('TRUE if OSPF traps are to be sent to the identified host.')
trapProfile_OspfIfConfigErrorEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 40), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-OspfIfConfigErrorEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_OspfIfConfigErrorEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_OspfIfConfigErrorEnabled.setDescription('TRUE if OSPF interface configuration error trap is enabled.')
trapProfile_OspfIfAuthFailureEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 41), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-OspfIfAuthFailureEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_OspfIfAuthFailureEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_OspfIfAuthFailureEnabled.setDescription('TRUE if OSPF interface authentication failure trap is enabled.')
trapProfile_OspfIfStateChangeEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 42), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-OspfIfStateChangeEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_OspfIfStateChangeEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_OspfIfStateChangeEnabled.setDescription('TRUE if OSPF interface state change trap is enabled.')
trapProfile_OspfIfRxBadPacket = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 43), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-OspfIfRxBadPacket").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_OspfIfRxBadPacket.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_OspfIfRxBadPacket.setDescription('TRUE if OSPF interface receive bad packet trap is enabled.')
trapProfile_OspfTxRetransmitEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 44), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-OspfTxRetransmitEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_OspfTxRetransmitEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_OspfTxRetransmitEnabled.setDescription('TRUE if OSPF retransmit trap is enabled.')
trapProfile_OspfNbrStateChangeEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 45), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-OspfNbrStateChangeEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_OspfNbrStateChangeEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_OspfNbrStateChangeEnabled.setDescription('TRUE if OSPF neighbor state change trap is enabled.')
trapProfile_OspfVirtIfConfigErrorEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 46), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-OspfVirtIfConfigErrorEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_OspfVirtIfConfigErrorEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_OspfVirtIfConfigErrorEnabled.setDescription('TRUE if OSPF virtual interface configuration error trap is enabled.')
trapProfile_OspfVirtIfAuthFailureEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 47), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-OspfVirtIfAuthFailureEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_OspfVirtIfAuthFailureEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_OspfVirtIfAuthFailureEnabled.setDescription('TRUE if OSPF virtual interface authentication failure trap is enabled.')
trapProfile_OspfVirtIfStateChangeEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 48), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-OspfVirtIfStateChangeEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_OspfVirtIfStateChangeEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_OspfVirtIfStateChangeEnabled.setDescription('TRUE if OSPF virtual interface state change trap is enabled.')
trapProfile_OspfVirtIfRxBadPacket = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 49), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-OspfVirtIfRxBadPacket").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_OspfVirtIfRxBadPacket.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_OspfVirtIfRxBadPacket.setDescription('TRUE if OSPF virtual interface receive bad packet trap is enabled.')
trapProfile_OspfVirtIfTxRetransmitEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 50), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-OspfVirtIfTxRetransmitEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_OspfVirtIfTxRetransmitEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_OspfVirtIfTxRetransmitEnabled.setDescription('TRUE if OSPF virtual interface retransmit trap is enabled.')
trapProfile_OspfVirtNbrStateChangeEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 51), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-OspfVirtNbrStateChangeEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_OspfVirtNbrStateChangeEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_OspfVirtNbrStateChangeEnabled.setDescription('TRUE if OSPF virtual neighbor state change trap is enabled.')
trapProfile_OspfOriginateLsaEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 52), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-OspfOriginateLsaEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_OspfOriginateLsaEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_OspfOriginateLsaEnabled.setDescription('TRUE if OSPF originate LSA trap is enabled.')
trapProfile_OspfMaxAgeLsaEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 53), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-OspfMaxAgeLsaEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_OspfMaxAgeLsaEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_OspfMaxAgeLsaEnabled.setDescription('TRUE if OSPF MaxAgeLsa trap is enabled.')
trapProfile_OspfLsdbOverflowEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 54), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-OspfLsdbOverflowEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_OspfLsdbOverflowEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_OspfLsdbOverflowEnabled.setDescription('TRUE if OSPF LSDB overflow trap is enabled.')
trapProfile_OspfApproachingOverflowEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 55), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-OspfApproachingOverflowEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_OspfApproachingOverflowEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_OspfApproachingOverflowEnabled.setDescription('TRUE if OSPF LSDB approaching overflow trap is enabled.')
trapProfile_WatchdogWarningEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 56), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-WatchdogWarningEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_WatchdogWarningEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_WatchdogWarningEnabled.setDescription('TRUE if watchdog warning trap is enabled.')
trapProfile_ControllerSwitchoverEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 57), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-ControllerSwitchoverEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_ControllerSwitchoverEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_ControllerSwitchoverEnabled.setDescription('TRUE if controller switchover trap is enabled.')
trapProfile_CallLogServChangeEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 58), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-CallLogServChangeEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_CallLogServChangeEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_CallLogServChangeEnabled.setDescription('TRUE if call logging server change trap is enabled.')
trapProfile_VoipGkChangeEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 59), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-VoipGkChangeEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_VoipGkChangeEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_VoipGkChangeEnabled.setDescription('TRUE if VOIP gatekeeper change trap is enabled.')
trapProfile_WanLineStateChangeEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 60), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-WanLineStateChangeEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_WanLineStateChangeEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_WanLineStateChangeEnabled.setDescription('TRUE if WAN line state change trap is enabled.')
trapProfile_CallLogDroppedPktEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 61), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-CallLogDroppedPktEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_CallLogDroppedPktEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_CallLogDroppedPktEnabled.setDescription('TRUE if call logging dropped packet trap is enabled.')
trapProfile_LimSparingEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 62), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-LimSparingEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_LimSparingEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_LimSparingEnabled.setDescription('TRUE if LIM sparing trap should to be sent to the identified host.')
trapProfile_InterfaceSparingEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 63), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-InterfaceSparingEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_InterfaceSparingEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_InterfaceSparingEnabled.setDescription('TRUE if interface (port) sparing trap should to be sent to the identified host.')
trapProfile_MegacoLinkStatusEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 64), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-MegacoLinkStatusEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_MegacoLinkStatusEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_MegacoLinkStatusEnabled.setDescription('TRUE if the trap that reports changes in the operational status of media gateway control link(s) is enabled.')
trapProfile_SecondaryControllerStateChangeEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 65), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-SecondaryControllerStateChangeEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_SecondaryControllerStateChangeEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_SecondaryControllerStateChangeEnabled.setDescription('TRUE if cntrReduAvailTrap is enabled.')
trapProfile_PctfiTrunkStatusChangeEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 66), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-PctfiTrunkStatusChangeEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_PctfiTrunkStatusChangeEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_PctfiTrunkStatusChangeEnabled.setDescription('TRUE if enabledPctfiTrunkStatusChange is enabled.')
trapProfile_NoResourceAvailableEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 67), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-NoResourceAvailableEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_NoResourceAvailableEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_NoResourceAvailableEnabled.setDescription('TRUE if No Resource Available to answer call is enabled.')
trapProfile_DslThreshTrapEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 68), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-DslThreshTrapEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_DslThreshTrapEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_DslThreshTrapEnabled.setDescription('TRUE if various DSL threshold traps should be sent to the identified host.')
trapProfile_AtmPvcFailureTrapEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 69), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-AtmPvcFailureTrapEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_AtmPvcFailureTrapEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_AtmPvcFailureTrapEnabled.setDescription('TRUE if PVC or Soft PVC failure trap should be sent to the identified host.')
trapProfile_AtmImaAlarmTrapEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 70), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-AtmImaAlarmTrapEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_AtmImaAlarmTrapEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_AtmImaAlarmTrapEnabled.setDescription('TRUE if IMA Alarm trap should be sent to the identified host.')
trapProfile_AscendLinkDownTrapEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 71), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-AscendLinkDownTrapEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_AscendLinkDownTrapEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_AscendLinkDownTrapEnabled.setDescription('TRUE if the ascend link down trap should be sent to the identified host. This can be enabled only if linkdown-enabled is enabled. This is an alarm class trap.')
trapProfile_AscendLinkUpTrapEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 72), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-AscendLinkUpTrapEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_AscendLinkUpTrapEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_AscendLinkUpTrapEnabled.setDescription('TRUE if the ascend link up trap should be sent to the identified host. This can be enabled only if linkup-enabled is enabled. This is an alarm class trap.')
trapProfile_SnmpIllegalAccessAttempt = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 73), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-SnmpIllegalAccessAttempt").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_SnmpIllegalAccessAttempt.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_SnmpIllegalAccessAttempt.setDescription('TRUE if the ascend security alert trap is enabled.')
trapProfile_L2tpTunnelTrapEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 79), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-L2tpTunnelTrapEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_L2tpTunnelTrapEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_L2tpTunnelTrapEnabled.setDescription('TRUE if L2TP Setup failure and L2TP Tunnel Disconnect trap should be sent to the identified host.')
trapProfile_Hdsl2ShdslThresholdTrapsEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 77), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-Hdsl2ShdslThresholdTrapsEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_Hdsl2ShdslThresholdTrapsEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_Hdsl2ShdslThresholdTrapsEnabled.setDescription('Set to TRUE to enable HDSL2/SHDSL threshold traps.')
trapProfile_ClockChangeTrapEnabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 78), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("trapProfile-ClockChangeTrapEnabled").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_ClockChangeTrapEnabled.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_ClockChangeTrapEnabled.setDescription('TRUE if clock change trap is enabled.')
trapProfile_Action_o = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 74), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("noAction", 1), ("createProfile", 2), ("deleteProfile", 3)))).setLabel("trapProfile-Action-o").setMaxAccess("readwrite")
if mibBuilder.loadTexts: trapProfile_Action_o.setStatus('mandatory')
if mibBuilder.loadTexts: trapProfile_Action_o.setDescription('')
mibBuilder.exportSymbols("ASCEND-MIBTRAP-MIB", trapProfile_PrimarySdtnEmptyEnabled=trapProfile_PrimarySdtnEmptyEnabled, trapProfile_SuspectAccessResourceEnabled=trapProfile_SuspectAccessResourceEnabled, trapProfile_L2tpTunnelTrapEnabled=trapProfile_L2tpTunnelTrapEnabled, trapProfile_ColdstartEnabled=trapProfile_ColdstartEnabled, trapProfile_NotificationLogLimit=trapProfile_NotificationLogLimit, trapProfile_OspfVirtIfRxBadPacket=trapProfile_OspfVirtIfRxBadPacket, trapProfile_OspfVirtNbrStateChangeEnabled=trapProfile_OspfVirtNbrStateChangeEnabled, trapProfile_McastMonitorEnabled=trapProfile_McastMonitorEnabled, trapProfile_OspfLsdbOverflowEnabled=trapProfile_OspfLsdbOverflowEnabled, trapProfile_NotificationLogEnable=trapProfile_NotificationLogEnable, trapProfile_InterfaceSparingEnabled=trapProfile_InterfaceSparingEnabled, trapProfile_WanLineStateChangeEnabled=trapProfile_WanLineStateChangeEnabled, trapProfile_OspfVirtIfStateChangeEnabled=trapProfile_OspfVirtIfStateChangeEnabled, trapProfile_PctfiTrunkStatusChangeEnabled=trapProfile_PctfiTrunkStatusChangeEnabled, trapProfile_OspfIfConfigErrorEnabled=trapProfile_OspfIfConfigErrorEnabled, trapProfile_SecondaryControllerStateChangeEnabled=trapProfile_SecondaryControllerStateChangeEnabled, trapProfile_AscendLinkDownTrapEnabled=trapProfile_AscendLinkDownTrapEnabled, trapProfile_ClockChangeTrapEnabled=trapProfile_ClockChangeTrapEnabled, trapProfile_DirdoEnabled=trapProfile_DirdoEnabled, trapProfile_AtmPvcFailureTrapEnabled=trapProfile_AtmPvcFailureTrapEnabled, trapProfile_ConfigChangeEnabled=trapProfile_ConfigChangeEnabled, trapProfile_SecondarySdtnEmptyEnabled=trapProfile_SecondarySdtnEmptyEnabled, trapProfile_OspfVirtIfAuthFailureEnabled=trapProfile_OspfVirtIfAuthFailureEnabled, trapProfile_EventOverwriteEnabled=trapProfile_EventOverwriteEnabled, trapProfile_DslThreshTrapEnabled=trapProfile_DslThreshTrapEnabled, trapProfile_InformRetryCount=trapProfile_InformRetryCount, trapProfile_AlarmEnabled=trapProfile_AlarmEnabled, trapProfile_OspfTxRetransmitEnabled=trapProfile_OspfTxRetransmitEnabled, trapProfile_SecurityEnabled=trapProfile_SecurityEnabled, trapProfile_ControllerSwitchoverEnabled=trapProfile_ControllerSwitchoverEnabled, trapProfile_Hdsl2ShdslThresholdTrapsEnabled=trapProfile_Hdsl2ShdslThresholdTrapsEnabled, trapProfile_CommunityName=trapProfile_CommunityName, trapProfile_OspfNbrStateChangeEnabled=trapProfile_OspfNbrStateChangeEnabled, trapProfile_InformTimeOut=trapProfile_InformTimeOut, trapProfile_OspfVirtIfConfigErrorEnabled=trapProfile_OspfVirtIfConfigErrorEnabled, DisplayString=DisplayString, trapProfile_HostAddress=trapProfile_HostAddress, trapProfile_OspfEnabled=trapProfile_OspfEnabled, trapProfile_Action_o=trapProfile_Action_o, trapProfile_AtmImaAlarmTrapEnabled=trapProfile_AtmImaAlarmTrapEnabled, trapProfile_LanModemEnabled=trapProfile_LanModemEnabled, trapProfile_AgentAddress=trapProfile_AgentAddress, trapProfile_AuthenticationEnabled=trapProfile_AuthenticationEnabled, mibtrapProfileEntry=mibtrapProfileEntry, trapProfile_PowerSupplyEnabled=trapProfile_PowerSupplyEnabled, trapProfile_CallLogServChangeEnabled=trapProfile_CallLogServChangeEnabled, trapProfile_AscendEnabled=trapProfile_AscendEnabled, trapProfile_HostPort=trapProfile_HostPort, trapProfile_OspfIfRxBadPacket=trapProfile_OspfIfRxBadPacket, mibtrapProfile=mibtrapProfile, trapProfile_LimSparingEnabled=trapProfile_LimSparingEnabled, trapProfile_MultishelfEnabled=trapProfile_MultishelfEnabled, trapProfile_LinkdownEnabled=trapProfile_LinkdownEnabled, trapProfile_MegacoLinkStatusEnabled=trapProfile_MegacoLinkStatusEnabled, trapProfile_OspfMaxAgeLsaEnabled=trapProfile_OspfMaxAgeLsaEnabled, trapProfile_WatchdogWarningEnabled=trapProfile_WatchdogWarningEnabled, trapProfile_ConsoleEnabled=trapProfile_ConsoleEnabled, trapProfile_SnmpIllegalAccessAttempt=trapProfile_SnmpIllegalAccessAttempt, trapProfile_OspfVirtIfTxRetransmitEnabled=trapProfile_OspfVirtIfTxRetransmitEnabled, trapProfile_CallLogDroppedPktEnabled=trapProfile_CallLogDroppedPktEnabled, trapProfile_FrLinkupEnabled=trapProfile_FrLinkupEnabled, trapProfile_AscendLinkUpTrapEnabled=trapProfile_AscendLinkUpTrapEnabled, trapProfile_FrLinkdownEnabled=trapProfile_FrLinkdownEnabled, trapProfile_SlotEnabled=trapProfile_SlotEnabled, mibtrapProfileTable=mibtrapProfileTable, trapProfile_PortEnabled=trapProfile_PortEnabled, trapProfile_OspfOriginateLsaEnabled=trapProfile_OspfOriginateLsaEnabled, trapProfile_VoipGkChangeEnabled=trapProfile_VoipGkChangeEnabled, trapProfile_OspfApproachingOverflowEnabled=trapProfile_OspfApproachingOverflowEnabled, trapProfile_SlotProfileChangeEnabled=trapProfile_SlotProfileChangeEnabled, trapProfile_ActiveEnabled=trapProfile_ActiveEnabled, trapProfile_SysClockDriftEnabled=trapProfile_SysClockDriftEnabled, trapProfile_NotifyTagList=trapProfile_NotifyTagList, trapProfile_NoResourceAvailableEnabled=trapProfile_NoResourceAvailableEnabled, trapProfile_LinkupEnabled=trapProfile_LinkupEnabled, trapProfile_WarmstartEnabled=trapProfile_WarmstartEnabled, trapProfile_OspfIfStateChangeEnabled=trapProfile_OspfIfStateChangeEnabled, trapProfile_UseExceededEnabled=trapProfile_UseExceededEnabled, trapProfile_OspfIfAuthFailureEnabled=trapProfile_OspfIfAuthFailureEnabled, trapProfile_PasswordEnabled=trapProfile_PasswordEnabled, trapProfile_RadiusChangeEnabled=trapProfile_RadiusChangeEnabled, trapProfile_TargetParamsName=trapProfile_TargetParamsName, trapProfile_HostName=trapProfile_HostName)
| (configuration,) = mibBuilder.importSymbols('ASCEND-MIB', 'configuration')
(integer, object_identifier, octet_string) = mibBuilder.importSymbols('ASN1', 'Integer', 'ObjectIdentifier', 'OctetString')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_size_constraint, constraints_intersection, value_range_constraint, single_value_constraint, constraints_union) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueSizeConstraint', 'ConstraintsIntersection', 'ValueRangeConstraint', 'SingleValueConstraint', 'ConstraintsUnion')
(notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance')
(unsigned32, counter32, bits, counter64, notification_type, mib_scalar, mib_table, mib_table_row, mib_table_column, mib_identifier, module_identity, object_identity, gauge32, time_ticks, ip_address, integer32, iso) = mibBuilder.importSymbols('SNMPv2-SMI', 'Unsigned32', 'Counter32', 'Bits', 'Counter64', 'NotificationType', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'MibIdentifier', 'ModuleIdentity', 'ObjectIdentity', 'Gauge32', 'TimeTicks', 'IpAddress', 'Integer32', 'iso')
(display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention')
class Displaystring(OctetString):
pass
mibtrap_profile = mib_identifier((1, 3, 6, 1, 4, 1, 529, 23, 132))
mibtrap_profile_table = mib_table((1, 3, 6, 1, 4, 1, 529, 23, 132, 1))
if mibBuilder.loadTexts:
mibtrapProfileTable.setStatus('mandatory')
if mibBuilder.loadTexts:
mibtrapProfileTable.setDescription('A list of mibtrapProfile profile entries.')
mibtrap_profile_entry = mib_table_row((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1)).setIndexNames((0, 'ASCEND-MIBTRAP-MIB', 'trapProfile-HostName'))
if mibBuilder.loadTexts:
mibtrapProfileEntry.setStatus('mandatory')
if mibBuilder.loadTexts:
mibtrapProfileEntry.setDescription('A mibtrapProfile entry containing objects that maps to the parameters of mibtrapProfile profile.')
trap_profile__host_name = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 1), display_string()).setLabel('trapProfile-HostName').setMaxAccess('readonly')
if mibBuilder.loadTexts:
trapProfile_HostName.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_HostName.setDescription('The name of the host to send traps to. When DNS or YP/NIS is supported this name will be used to look up the LAN address when hostAddress is 0.')
trap_profile__active_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-ActiveEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_ActiveEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_ActiveEnabled.setDescription('If TRUE, profile is enabled to send traps to this target')
trap_profile__community_name = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 3), display_string()).setLabel('trapProfile-CommunityName').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_CommunityName.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_CommunityName.setDescription('The community name associated with the SNMP PDU.')
trap_profile__host_address = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 4), ip_address()).setLabel('trapProfile-HostAddress').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_HostAddress.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_HostAddress.setDescription('The LAN address of the named host. If 0 the address will be looked up via DNS or YP/NIS when supported.')
trap_profile__host_port = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 5), integer32()).setLabel('trapProfile-HostPort').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_HostPort.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_HostPort.setDescription('Port number of the named host. Value 0 is not allowed')
trap_profile__inform_time_out = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 6), integer32()).setLabel('trapProfile-InformTimeOut').setMaxAccess('readonly')
if mibBuilder.loadTexts:
trapProfile_InformTimeOut.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_InformTimeOut.setDescription('Timeout interval in units of 0.01 seconds after which the Inform PDU is retransmitted on receiving no acknowledgement')
trap_profile__inform_retry_count = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 7), integer32()).setLabel('trapProfile-InformRetryCount').setMaxAccess('readonly')
if mibBuilder.loadTexts:
trapProfile_InformRetryCount.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_InformRetryCount.setDescription('Number of retries attempted when acknowledgement is not received for an Inform PDU')
trap_profile__notify_tag_list = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 8), octet_string()).setLabel('trapProfile-NotifyTagList').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_NotifyTagList.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_NotifyTagList.setDescription('String containing a list of tag values that are used to select target addresses for a particular operation.')
trap_profile__target_params_name = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 9), octet_string()).setLabel('trapProfile-TargetParamsName').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_TargetParamsName.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_TargetParamsName.setDescription('Index to the row an entry in SNMPV3-TARGET-PARAM table which is used when generating messages to be sent to this host-address')
trap_profile__notification_log_enable = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 75), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-NotificationLogEnable').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_NotificationLogEnable.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_NotificationLogEnable.setDescription('YES if notifications sent on behalf of this entry needs to be logged. ')
trap_profile__notification_log_limit = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 76), integer32()).setLabel('trapProfile-NotificationLogLimit').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_NotificationLogLimit.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_NotificationLogLimit.setDescription('The maximum number of notification entries that can be held in the notification log.')
trap_profile__agent_address = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 10), ip_address()).setLabel('trapProfile-AgentAddress').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_AgentAddress.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_AgentAddress.setDescription('The IP address of the object, generating the SNMP trap.')
trap_profile__alarm_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 11), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-AlarmEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_AlarmEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_AlarmEnabled.setDescription('TRUE if alarm class traps are to be sent to the identified host.')
trap_profile__security_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 12), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-SecurityEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_SecurityEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_SecurityEnabled.setDescription('TRUE if security class traps are to be sent to the identified host.')
trap_profile__port_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 13), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-PortEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_PortEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_PortEnabled.setDescription('TRUE if port class traps are to be sent to the identified host.')
trap_profile__slot_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 14), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-SlotEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_SlotEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_SlotEnabled.setDescription('TRUE if slot class traps are to be sent to the identified host.')
trap_profile__coldstart_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 15), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-ColdstartEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_ColdstartEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_ColdstartEnabled.setDescription('TRUE if cold start trap is enabled.')
trap_profile__warmstart_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 16), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-WarmstartEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_WarmstartEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_WarmstartEnabled.setDescription('TRUE if warm start trap is enabled.')
trap_profile__linkdown_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 17), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-LinkdownEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_LinkdownEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_LinkdownEnabled.setDescription('TRUE if link down trap is enabled.')
trap_profile__linkup_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 18), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-LinkupEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_LinkupEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_LinkupEnabled.setDescription('TRUE if link up trap is enabled.')
trap_profile__ascend_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 19), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-AscendEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_AscendEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_AscendEnabled.setDescription('TRUE if Ascend trap is enabled.')
trap_profile__console_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 20), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-ConsoleEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_ConsoleEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_ConsoleEnabled.setDescription('TRUE if console trap is enabled.')
trap_profile__use_exceeded_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 21), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-UseExceededEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_UseExceededEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_UseExceededEnabled.setDescription('TRUE if use exceeded trap is enabled.')
trap_profile__password_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 22), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-PasswordEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_PasswordEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_PasswordEnabled.setDescription('TRUE if Telnet password trap is enabled.')
trap_profile__fr_linkup_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 23), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-FrLinkupEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_FrLinkupEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_FrLinkupEnabled.setDescription('TRUE if FR link up trap is enabled.')
trap_profile__fr_linkdown_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 24), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-FrLinkdownEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_FrLinkdownEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_FrLinkdownEnabled.setDescription('TRUE if FR Link Down trap is enabled.')
trap_profile__event_overwrite_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 25), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-EventOverwriteEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_EventOverwriteEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_EventOverwriteEnabled.setDescription('TRUE if event Overwrite trap is enabled.')
trap_profile__radius_change_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 26), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-RadiusChangeEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_RadiusChangeEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_RadiusChangeEnabled.setDescription('TRUE if radius change trap is enabled.')
trap_profile__mcast_monitor_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 27), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-McastMonitorEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_McastMonitorEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_McastMonitorEnabled.setDescription('TRUE if multicast monitor trap is enabled.')
trap_profile__lan_modem_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 28), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-LanModemEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_LanModemEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_LanModemEnabled.setDescription('TRUE if lan modem trap is enabled.')
trap_profile__dirdo_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 29), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-DirdoEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_DirdoEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_DirdoEnabled.setDescription('TRUE if DIRDO trap is enabled.')
trap_profile__slot_profile_change_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 30), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-SlotProfileChangeEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_SlotProfileChangeEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_SlotProfileChangeEnabled.setDescription('TRUE if slot profile change trap is enabled.')
trap_profile__power_supply_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 31), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-PowerSupplyEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_PowerSupplyEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_PowerSupplyEnabled.setDescription('TRUE if power supply changed trap is enabled.')
trap_profile__multishelf_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 32), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-MultishelfEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_MultishelfEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_MultishelfEnabled.setDescription('TRUE if multi-shelf controller state trap is enabled.')
trap_profile__authentication_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 33), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-AuthenticationEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_AuthenticationEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_AuthenticationEnabled.setDescription('TRUE if SNMP authentication trap is enabled.')
trap_profile__config_change_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 34), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-ConfigChangeEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_ConfigChangeEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_ConfigChangeEnabled.setDescription('TRUE if SNMP configuration change trap is enabled.')
trap_profile__sys_clock_drift_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 35), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-SysClockDriftEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_SysClockDriftEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_SysClockDriftEnabled.setDescription('TRUE if system clock drifted trap is enabled.')
trap_profile__primary_sdtn_empty_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 36), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-PrimarySdtnEmptyEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_PrimarySdtnEmptyEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_PrimarySdtnEmptyEnabled.setDescription('TRUE if SDTN Primary List Empty trap is enabled.')
trap_profile__secondary_sdtn_empty_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 37), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-SecondarySdtnEmptyEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_SecondarySdtnEmptyEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_SecondarySdtnEmptyEnabled.setDescription('TRUE if SDTN Secondary List Empty trap is enabled.')
trap_profile__suspect_access_resource_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 38), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-SuspectAccessResourceEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_SuspectAccessResourceEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_SuspectAccessResourceEnabled.setDescription('TRUE if suspect access resource trap is enabled.')
trap_profile__ospf_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 39), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-OspfEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_OspfEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_OspfEnabled.setDescription('TRUE if OSPF traps are to be sent to the identified host.')
trap_profile__ospf_if_config_error_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 40), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-OspfIfConfigErrorEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_OspfIfConfigErrorEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_OspfIfConfigErrorEnabled.setDescription('TRUE if OSPF interface configuration error trap is enabled.')
trap_profile__ospf_if_auth_failure_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 41), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-OspfIfAuthFailureEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_OspfIfAuthFailureEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_OspfIfAuthFailureEnabled.setDescription('TRUE if OSPF interface authentication failure trap is enabled.')
trap_profile__ospf_if_state_change_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 42), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-OspfIfStateChangeEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_OspfIfStateChangeEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_OspfIfStateChangeEnabled.setDescription('TRUE if OSPF interface state change trap is enabled.')
trap_profile__ospf_if_rx_bad_packet = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 43), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-OspfIfRxBadPacket').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_OspfIfRxBadPacket.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_OspfIfRxBadPacket.setDescription('TRUE if OSPF interface receive bad packet trap is enabled.')
trap_profile__ospf_tx_retransmit_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 44), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-OspfTxRetransmitEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_OspfTxRetransmitEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_OspfTxRetransmitEnabled.setDescription('TRUE if OSPF retransmit trap is enabled.')
trap_profile__ospf_nbr_state_change_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 45), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-OspfNbrStateChangeEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_OspfNbrStateChangeEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_OspfNbrStateChangeEnabled.setDescription('TRUE if OSPF neighbor state change trap is enabled.')
trap_profile__ospf_virt_if_config_error_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 46), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-OspfVirtIfConfigErrorEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_OspfVirtIfConfigErrorEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_OspfVirtIfConfigErrorEnabled.setDescription('TRUE if OSPF virtual interface configuration error trap is enabled.')
trap_profile__ospf_virt_if_auth_failure_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 47), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-OspfVirtIfAuthFailureEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_OspfVirtIfAuthFailureEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_OspfVirtIfAuthFailureEnabled.setDescription('TRUE if OSPF virtual interface authentication failure trap is enabled.')
trap_profile__ospf_virt_if_state_change_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 48), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-OspfVirtIfStateChangeEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_OspfVirtIfStateChangeEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_OspfVirtIfStateChangeEnabled.setDescription('TRUE if OSPF virtual interface state change trap is enabled.')
trap_profile__ospf_virt_if_rx_bad_packet = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 49), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-OspfVirtIfRxBadPacket').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_OspfVirtIfRxBadPacket.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_OspfVirtIfRxBadPacket.setDescription('TRUE if OSPF virtual interface receive bad packet trap is enabled.')
trap_profile__ospf_virt_if_tx_retransmit_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 50), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-OspfVirtIfTxRetransmitEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_OspfVirtIfTxRetransmitEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_OspfVirtIfTxRetransmitEnabled.setDescription('TRUE if OSPF virtual interface retransmit trap is enabled.')
trap_profile__ospf_virt_nbr_state_change_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 51), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-OspfVirtNbrStateChangeEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_OspfVirtNbrStateChangeEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_OspfVirtNbrStateChangeEnabled.setDescription('TRUE if OSPF virtual neighbor state change trap is enabled.')
trap_profile__ospf_originate_lsa_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 52), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-OspfOriginateLsaEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_OspfOriginateLsaEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_OspfOriginateLsaEnabled.setDescription('TRUE if OSPF originate LSA trap is enabled.')
trap_profile__ospf_max_age_lsa_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 53), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-OspfMaxAgeLsaEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_OspfMaxAgeLsaEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_OspfMaxAgeLsaEnabled.setDescription('TRUE if OSPF MaxAgeLsa trap is enabled.')
trap_profile__ospf_lsdb_overflow_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 54), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-OspfLsdbOverflowEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_OspfLsdbOverflowEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_OspfLsdbOverflowEnabled.setDescription('TRUE if OSPF LSDB overflow trap is enabled.')
trap_profile__ospf_approaching_overflow_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 55), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-OspfApproachingOverflowEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_OspfApproachingOverflowEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_OspfApproachingOverflowEnabled.setDescription('TRUE if OSPF LSDB approaching overflow trap is enabled.')
trap_profile__watchdog_warning_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 56), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-WatchdogWarningEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_WatchdogWarningEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_WatchdogWarningEnabled.setDescription('TRUE if watchdog warning trap is enabled.')
trap_profile__controller_switchover_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 57), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-ControllerSwitchoverEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_ControllerSwitchoverEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_ControllerSwitchoverEnabled.setDescription('TRUE if controller switchover trap is enabled.')
trap_profile__call_log_serv_change_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 58), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-CallLogServChangeEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_CallLogServChangeEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_CallLogServChangeEnabled.setDescription('TRUE if call logging server change trap is enabled.')
trap_profile__voip_gk_change_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 59), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-VoipGkChangeEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_VoipGkChangeEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_VoipGkChangeEnabled.setDescription('TRUE if VOIP gatekeeper change trap is enabled.')
trap_profile__wan_line_state_change_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 60), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-WanLineStateChangeEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_WanLineStateChangeEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_WanLineStateChangeEnabled.setDescription('TRUE if WAN line state change trap is enabled.')
trap_profile__call_log_dropped_pkt_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 61), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-CallLogDroppedPktEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_CallLogDroppedPktEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_CallLogDroppedPktEnabled.setDescription('TRUE if call logging dropped packet trap is enabled.')
trap_profile__lim_sparing_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 62), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-LimSparingEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_LimSparingEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_LimSparingEnabled.setDescription('TRUE if LIM sparing trap should to be sent to the identified host.')
trap_profile__interface_sparing_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 63), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-InterfaceSparingEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_InterfaceSparingEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_InterfaceSparingEnabled.setDescription('TRUE if interface (port) sparing trap should to be sent to the identified host.')
trap_profile__megaco_link_status_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 64), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-MegacoLinkStatusEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_MegacoLinkStatusEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_MegacoLinkStatusEnabled.setDescription('TRUE if the trap that reports changes in the operational status of media gateway control link(s) is enabled.')
trap_profile__secondary_controller_state_change_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 65), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-SecondaryControllerStateChangeEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_SecondaryControllerStateChangeEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_SecondaryControllerStateChangeEnabled.setDescription('TRUE if cntrReduAvailTrap is enabled.')
trap_profile__pctfi_trunk_status_change_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 66), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-PctfiTrunkStatusChangeEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_PctfiTrunkStatusChangeEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_PctfiTrunkStatusChangeEnabled.setDescription('TRUE if enabledPctfiTrunkStatusChange is enabled.')
trap_profile__no_resource_available_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 67), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-NoResourceAvailableEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_NoResourceAvailableEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_NoResourceAvailableEnabled.setDescription('TRUE if No Resource Available to answer call is enabled.')
trap_profile__dsl_thresh_trap_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 68), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-DslThreshTrapEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_DslThreshTrapEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_DslThreshTrapEnabled.setDescription('TRUE if various DSL threshold traps should be sent to the identified host.')
trap_profile__atm_pvc_failure_trap_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 69), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-AtmPvcFailureTrapEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_AtmPvcFailureTrapEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_AtmPvcFailureTrapEnabled.setDescription('TRUE if PVC or Soft PVC failure trap should be sent to the identified host.')
trap_profile__atm_ima_alarm_trap_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 70), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-AtmImaAlarmTrapEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_AtmImaAlarmTrapEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_AtmImaAlarmTrapEnabled.setDescription('TRUE if IMA Alarm trap should be sent to the identified host.')
trap_profile__ascend_link_down_trap_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 71), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-AscendLinkDownTrapEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_AscendLinkDownTrapEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_AscendLinkDownTrapEnabled.setDescription('TRUE if the ascend link down trap should be sent to the identified host. This can be enabled only if linkdown-enabled is enabled. This is an alarm class trap.')
trap_profile__ascend_link_up_trap_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 72), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-AscendLinkUpTrapEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_AscendLinkUpTrapEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_AscendLinkUpTrapEnabled.setDescription('TRUE if the ascend link up trap should be sent to the identified host. This can be enabled only if linkup-enabled is enabled. This is an alarm class trap.')
trap_profile__snmp_illegal_access_attempt = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 73), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-SnmpIllegalAccessAttempt').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_SnmpIllegalAccessAttempt.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_SnmpIllegalAccessAttempt.setDescription('TRUE if the ascend security alert trap is enabled.')
trap_profile_l2tp_tunnel_trap_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 79), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-L2tpTunnelTrapEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_L2tpTunnelTrapEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_L2tpTunnelTrapEnabled.setDescription('TRUE if L2TP Setup failure and L2TP Tunnel Disconnect trap should be sent to the identified host.')
trap_profile__hdsl2_shdsl_threshold_traps_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 77), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-Hdsl2ShdslThresholdTrapsEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_Hdsl2ShdslThresholdTrapsEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_Hdsl2ShdslThresholdTrapsEnabled.setDescription('Set to TRUE to enable HDSL2/SHDSL threshold traps.')
trap_profile__clock_change_trap_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 78), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('no', 1), ('yes', 2)))).setLabel('trapProfile-ClockChangeTrapEnabled').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_ClockChangeTrapEnabled.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_ClockChangeTrapEnabled.setDescription('TRUE if clock change trap is enabled.')
trap_profile__action_o = mib_scalar((1, 3, 6, 1, 4, 1, 529, 23, 132, 1, 1, 74), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('noAction', 1), ('createProfile', 2), ('deleteProfile', 3)))).setLabel('trapProfile-Action-o').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
trapProfile_Action_o.setStatus('mandatory')
if mibBuilder.loadTexts:
trapProfile_Action_o.setDescription('')
mibBuilder.exportSymbols('ASCEND-MIBTRAP-MIB', trapProfile_PrimarySdtnEmptyEnabled=trapProfile_PrimarySdtnEmptyEnabled, trapProfile_SuspectAccessResourceEnabled=trapProfile_SuspectAccessResourceEnabled, trapProfile_L2tpTunnelTrapEnabled=trapProfile_L2tpTunnelTrapEnabled, trapProfile_ColdstartEnabled=trapProfile_ColdstartEnabled, trapProfile_NotificationLogLimit=trapProfile_NotificationLogLimit, trapProfile_OspfVirtIfRxBadPacket=trapProfile_OspfVirtIfRxBadPacket, trapProfile_OspfVirtNbrStateChangeEnabled=trapProfile_OspfVirtNbrStateChangeEnabled, trapProfile_McastMonitorEnabled=trapProfile_McastMonitorEnabled, trapProfile_OspfLsdbOverflowEnabled=trapProfile_OspfLsdbOverflowEnabled, trapProfile_NotificationLogEnable=trapProfile_NotificationLogEnable, trapProfile_InterfaceSparingEnabled=trapProfile_InterfaceSparingEnabled, trapProfile_WanLineStateChangeEnabled=trapProfile_WanLineStateChangeEnabled, trapProfile_OspfVirtIfStateChangeEnabled=trapProfile_OspfVirtIfStateChangeEnabled, trapProfile_PctfiTrunkStatusChangeEnabled=trapProfile_PctfiTrunkStatusChangeEnabled, trapProfile_OspfIfConfigErrorEnabled=trapProfile_OspfIfConfigErrorEnabled, trapProfile_SecondaryControllerStateChangeEnabled=trapProfile_SecondaryControllerStateChangeEnabled, trapProfile_AscendLinkDownTrapEnabled=trapProfile_AscendLinkDownTrapEnabled, trapProfile_ClockChangeTrapEnabled=trapProfile_ClockChangeTrapEnabled, trapProfile_DirdoEnabled=trapProfile_DirdoEnabled, trapProfile_AtmPvcFailureTrapEnabled=trapProfile_AtmPvcFailureTrapEnabled, trapProfile_ConfigChangeEnabled=trapProfile_ConfigChangeEnabled, trapProfile_SecondarySdtnEmptyEnabled=trapProfile_SecondarySdtnEmptyEnabled, trapProfile_OspfVirtIfAuthFailureEnabled=trapProfile_OspfVirtIfAuthFailureEnabled, trapProfile_EventOverwriteEnabled=trapProfile_EventOverwriteEnabled, trapProfile_DslThreshTrapEnabled=trapProfile_DslThreshTrapEnabled, trapProfile_InformRetryCount=trapProfile_InformRetryCount, trapProfile_AlarmEnabled=trapProfile_AlarmEnabled, trapProfile_OspfTxRetransmitEnabled=trapProfile_OspfTxRetransmitEnabled, trapProfile_SecurityEnabled=trapProfile_SecurityEnabled, trapProfile_ControllerSwitchoverEnabled=trapProfile_ControllerSwitchoverEnabled, trapProfile_Hdsl2ShdslThresholdTrapsEnabled=trapProfile_Hdsl2ShdslThresholdTrapsEnabled, trapProfile_CommunityName=trapProfile_CommunityName, trapProfile_OspfNbrStateChangeEnabled=trapProfile_OspfNbrStateChangeEnabled, trapProfile_InformTimeOut=trapProfile_InformTimeOut, trapProfile_OspfVirtIfConfigErrorEnabled=trapProfile_OspfVirtIfConfigErrorEnabled, DisplayString=DisplayString, trapProfile_HostAddress=trapProfile_HostAddress, trapProfile_OspfEnabled=trapProfile_OspfEnabled, trapProfile_Action_o=trapProfile_Action_o, trapProfile_AtmImaAlarmTrapEnabled=trapProfile_AtmImaAlarmTrapEnabled, trapProfile_LanModemEnabled=trapProfile_LanModemEnabled, trapProfile_AgentAddress=trapProfile_AgentAddress, trapProfile_AuthenticationEnabled=trapProfile_AuthenticationEnabled, mibtrapProfileEntry=mibtrapProfileEntry, trapProfile_PowerSupplyEnabled=trapProfile_PowerSupplyEnabled, trapProfile_CallLogServChangeEnabled=trapProfile_CallLogServChangeEnabled, trapProfile_AscendEnabled=trapProfile_AscendEnabled, trapProfile_HostPort=trapProfile_HostPort, trapProfile_OspfIfRxBadPacket=trapProfile_OspfIfRxBadPacket, mibtrapProfile=mibtrapProfile, trapProfile_LimSparingEnabled=trapProfile_LimSparingEnabled, trapProfile_MultishelfEnabled=trapProfile_MultishelfEnabled, trapProfile_LinkdownEnabled=trapProfile_LinkdownEnabled, trapProfile_MegacoLinkStatusEnabled=trapProfile_MegacoLinkStatusEnabled, trapProfile_OspfMaxAgeLsaEnabled=trapProfile_OspfMaxAgeLsaEnabled, trapProfile_WatchdogWarningEnabled=trapProfile_WatchdogWarningEnabled, trapProfile_ConsoleEnabled=trapProfile_ConsoleEnabled, trapProfile_SnmpIllegalAccessAttempt=trapProfile_SnmpIllegalAccessAttempt, trapProfile_OspfVirtIfTxRetransmitEnabled=trapProfile_OspfVirtIfTxRetransmitEnabled, trapProfile_CallLogDroppedPktEnabled=trapProfile_CallLogDroppedPktEnabled, trapProfile_FrLinkupEnabled=trapProfile_FrLinkupEnabled, trapProfile_AscendLinkUpTrapEnabled=trapProfile_AscendLinkUpTrapEnabled, trapProfile_FrLinkdownEnabled=trapProfile_FrLinkdownEnabled, trapProfile_SlotEnabled=trapProfile_SlotEnabled, mibtrapProfileTable=mibtrapProfileTable, trapProfile_PortEnabled=trapProfile_PortEnabled, trapProfile_OspfOriginateLsaEnabled=trapProfile_OspfOriginateLsaEnabled, trapProfile_VoipGkChangeEnabled=trapProfile_VoipGkChangeEnabled, trapProfile_OspfApproachingOverflowEnabled=trapProfile_OspfApproachingOverflowEnabled, trapProfile_SlotProfileChangeEnabled=trapProfile_SlotProfileChangeEnabled, trapProfile_ActiveEnabled=trapProfile_ActiveEnabled, trapProfile_SysClockDriftEnabled=trapProfile_SysClockDriftEnabled, trapProfile_NotifyTagList=trapProfile_NotifyTagList, trapProfile_NoResourceAvailableEnabled=trapProfile_NoResourceAvailableEnabled, trapProfile_LinkupEnabled=trapProfile_LinkupEnabled, trapProfile_WarmstartEnabled=trapProfile_WarmstartEnabled, trapProfile_OspfIfStateChangeEnabled=trapProfile_OspfIfStateChangeEnabled, trapProfile_UseExceededEnabled=trapProfile_UseExceededEnabled, trapProfile_OspfIfAuthFailureEnabled=trapProfile_OspfIfAuthFailureEnabled, trapProfile_PasswordEnabled=trapProfile_PasswordEnabled, trapProfile_RadiusChangeEnabled=trapProfile_RadiusChangeEnabled, trapProfile_TargetParamsName=trapProfile_TargetParamsName, trapProfile_HostName=trapProfile_HostName) |
# Python
def fib():
a, b = 1, 1
while True:
yield a
a, b = b, a + b
for index, x in enumerate(fib()):
if index == 10:
break
print("%s" % x),
# Python 3
def fib3():
a, b = 1, 1
while True:
yield a
a, b = b, a + b
for index, x in enumerate(fib()):
if index == 10:
break
print("{} ".format(x), end="") | def fib():
(a, b) = (1, 1)
while True:
yield a
(a, b) = (b, a + b)
for (index, x) in enumerate(fib()):
if index == 10:
break
(print('%s' % x),)
def fib3():
(a, b) = (1, 1)
while True:
yield a
(a, b) = (b, a + b)
for (index, x) in enumerate(fib()):
if index == 10:
break
print('{} '.format(x), end='') |
print('Hello World!')
print('This is how we print on the screen.')
print()
print('What just happened?')
print('This is a message on this line.', end=' ')
print('This is a message on the same line.')
print('Learning Python is FUN!') | print('Hello World!')
print('This is how we print on the screen.')
print()
print('What just happened?')
print('This is a message on this line.', end=' ')
print('This is a message on the same line.')
print('Learning Python is FUN!') |
'''
There are 7 letter(symbols) that are used to represent Roman numerals:
I, V, X, L, C, D and M
Their values are:
I=1
V=5
X=10
L=50
C=100
D=500
M=1000
For example, two is written as II in Roman numeral, just two one's added togethrer.
Thirteen is written as XIII , The number seventeen is written as XVII
Roman numerals are usually written largest to smalles from left to right.
However, the numerals for four is not III bu IV.
Because the one is before the five we subtract it making four.
The same principle applies to the number nine, which is witten as IX.
There are six instances where subtraction is used:
I can be placed before V (5) and X (10) to make 4 and 9.
X can be placed before L (50) and C (100) to make 40 and 90
C can be placed before D (500) and
'''
# If current > previous:
## current substract previous
def romanTonum(str):
#initializa all romans str and our number
romans = {"I":1, "V":5, "X":10, "L":50, "C":100, "D":500, "M":1000}
num = 0
#combine string to a list
theList = list(str)
## iterate over list to get each character
for index, i in enumerate(theList):
## evaluate the numerals, add a value of roman numeral into number
num = num + romans[i]
## if it's grater than zero, we gonna check if is greater than previous
if index > 0:
continue
## current decreased by previous. Value add to increment number
## return number
return num
print(romanTonum("X"))
| """
There are 7 letter(symbols) that are used to represent Roman numerals:
I, V, X, L, C, D and M
Their values are:
I=1
V=5
X=10
L=50
C=100
D=500
M=1000
For example, two is written as II in Roman numeral, just two one's added togethrer.
Thirteen is written as XIII , The number seventeen is written as XVII
Roman numerals are usually written largest to smalles from left to right.
However, the numerals for four is not III bu IV.
Because the one is before the five we subtract it making four.
The same principle applies to the number nine, which is witten as IX.
There are six instances where subtraction is used:
I can be placed before V (5) and X (10) to make 4 and 9.
X can be placed before L (50) and C (100) to make 40 and 90
C can be placed before D (500) and
"""
def roman_tonum(str):
romans = {'I': 1, 'V': 5, 'X': 10, 'L': 50, 'C': 100, 'D': 500, 'M': 1000}
num = 0
the_list = list(str)
for (index, i) in enumerate(theList):
num = num + romans[i]
if index > 0:
continue
return num
print(roman_tonum('X')) |
class Solution:
def balancedStringSplit(self, s: str) -> int:
count_match = 0
count_L = 0
count_R = 0
for char in s:
if char == "L":
count_L += 1
if char == "R":
count_R += 1
if (count_L == count_R) & (count_L != 0):
count_match += 1
count_L = 0
count_R = 0
return count_match | class Solution:
def balanced_string_split(self, s: str) -> int:
count_match = 0
count_l = 0
count_r = 0
for char in s:
if char == 'L':
count_l += 1
if char == 'R':
count_r += 1
if (count_L == count_R) & (count_L != 0):
count_match += 1
count_l = 0
count_r = 0
return count_match |
try:
print('test')
xpcall()
print('still going')
except:
print('Error in function')
print('running') | try:
print('test')
xpcall()
print('still going')
except:
print('Error in function')
print('running') |
class Solution:
def floodFill(self, image: List[List[int]], sr: int, sc: int, newColor: int) -> List[List[int]]:
color = image[sr][sc]
if color == newColor: return image
R, C = len(image), len(image[0])
@lru_cache(None)
def dfs(r, c):
if image[r][c] == color:
image[r][c] = newColor
if r >= 1: dfs(r - 1, c)
if r + 1 < R: dfs(r + 1, c)
if c >= 1: dfs(r, c - 1)
if c + 1 < C: dfs(r, c + 1)
dfs(sr, sc)
return image
| class Solution:
def flood_fill(self, image: List[List[int]], sr: int, sc: int, newColor: int) -> List[List[int]]:
color = image[sr][sc]
if color == newColor:
return image
(r, c) = (len(image), len(image[0]))
@lru_cache(None)
def dfs(r, c):
if image[r][c] == color:
image[r][c] = newColor
if r >= 1:
dfs(r - 1, c)
if r + 1 < R:
dfs(r + 1, c)
if c >= 1:
dfs(r, c - 1)
if c + 1 < C:
dfs(r, c + 1)
dfs(sr, sc)
return image |
def update_dictionary(d, key, value):
if d.get(key) != None:
d[key].append(value)
elif d.get(key*2) != None:
d[key*2].append(value)
else:
d[key*2] = [value]
words = input().lower().split(" ")
word={}
for i in words:
if word.get(i) != None:
word[i] = word[i] + 1
else:
word.setdefault(i, 1)
for key, value in word.items():
print(key, value)
n = int(input())
dic = {}
for n in range(0, n):
n = int(input())
if dic.get(n) == None:
dic.setdefault(n, f(n))
print(dic[n]) | def update_dictionary(d, key, value):
if d.get(key) != None:
d[key].append(value)
elif d.get(key * 2) != None:
d[key * 2].append(value)
else:
d[key * 2] = [value]
words = input().lower().split(' ')
word = {}
for i in words:
if word.get(i) != None:
word[i] = word[i] + 1
else:
word.setdefault(i, 1)
for (key, value) in word.items():
print(key, value)
n = int(input())
dic = {}
for n in range(0, n):
n = int(input())
if dic.get(n) == None:
dic.setdefault(n, f(n))
print(dic[n]) |
# Copyright (c) 2014 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'targets': [
{
'target_name': 'f',
'type': 'executable',
'sources': [
'f.c',
],
},
{
'target_name': 'g',
'type': 'executable',
'sources': [
'g.c',
],
'dependencies': [
'f',
],
},
],
}
| {'targets': [{'target_name': 'f', 'type': 'executable', 'sources': ['f.c']}, {'target_name': 'g', 'type': 'executable', 'sources': ['g.c'], 'dependencies': ['f']}]} |
a=input("Enter the array to sort:")
n = len(a)
for i in range(n):
for j in range(0, n-i-1):
if a[j] > a[j+1] :
a[j], a[j+1] = a[j+1], a[j]
print(a) | a = input('Enter the array to sort:')
n = len(a)
for i in range(n):
for j in range(0, n - i - 1):
if a[j] > a[j + 1]:
(a[j], a[j + 1]) = (a[j + 1], a[j])
print(a) |
# Normal Function syntax
# def name(args):
# return
# Lambda Function syntax
# name = lambda args: return
# Normal
def dob(a):
return a*2
print(f'def 10x2: {dob(10)}')
# Lambda
dobro = lambda b: b*2
print(f'lambda 10x2: {dobro(10)}')
| def dob(a):
return a * 2
print(f'def 10x2: {dob(10)}')
dobro = lambda b: b * 2
print(f'lambda 10x2: {dobro(10)}') |
# Quick Tester for the logic used to reset the yaw slot count
TOTAL_SLOTS = 10
MAX_ABSOLUTE_ROTATIONS = 10
def round_yaw(current_yaw, target_yaw):
if (abs(current_yaw) >= TOTAL_SLOTS * MAX_ABSOLUTE_ROTATIONS):
target_yaw = target_yaw - current_yaw
current_yaw = 0
return (target_yaw, current_yaw)
yaw_error = abs(current_yaw) % TOTAL_SLOTS
yaw_change = 0
if (yaw_error > (TOTAL_SLOTS / 2)):
yaw_change = TOTAL_SLOTS - yaw_error
else:
yaw_change = 0 - yaw_error
if (current_yaw < 0):
yaw_change = 0 - yaw_change
current_yaw += yaw_change
return (target_yaw, current_yaw)
def tests():
yaws = [(5000, 5050),(-5000, -5050), (100, 100), (-100, -110), (26, 30), (-26, -30)]
answers = [(50, 0), (-50, 0), (0, 0), (-10, 0), (30, 30), (-30, -30)]
results = []
for yaw in yaws:
ans = round_yaw(yaw[0], yaw[1])
results.append(ans)
if (answers != results):
print("Failed")
else:
print("Passed")
print("Answers: {}".format(answers))
print("Results: {}".format(results))
tests()
| total_slots = 10
max_absolute_rotations = 10
def round_yaw(current_yaw, target_yaw):
if abs(current_yaw) >= TOTAL_SLOTS * MAX_ABSOLUTE_ROTATIONS:
target_yaw = target_yaw - current_yaw
current_yaw = 0
return (target_yaw, current_yaw)
yaw_error = abs(current_yaw) % TOTAL_SLOTS
yaw_change = 0
if yaw_error > TOTAL_SLOTS / 2:
yaw_change = TOTAL_SLOTS - yaw_error
else:
yaw_change = 0 - yaw_error
if current_yaw < 0:
yaw_change = 0 - yaw_change
current_yaw += yaw_change
return (target_yaw, current_yaw)
def tests():
yaws = [(5000, 5050), (-5000, -5050), (100, 100), (-100, -110), (26, 30), (-26, -30)]
answers = [(50, 0), (-50, 0), (0, 0), (-10, 0), (30, 30), (-30, -30)]
results = []
for yaw in yaws:
ans = round_yaw(yaw[0], yaw[1])
results.append(ans)
if answers != results:
print('Failed')
else:
print('Passed')
print('Answers: {}'.format(answers))
print('Results: {}'.format(results))
tests() |
variable = "var"
var2 = "2"
var3 = 3
print(variable)
print("---")
# No newline at the end
print(variable, end="")
print("---")
# More variables
print(variable, var2, var3)
print("---")
# Different separator
print(variable, var2, var3, sep=", ")
print("---")
# Personal recomendation for var printing (bit advanced, but good practise)
four = 2*2
my_array = [7,"6","five",four,[0,1,2]]
print('"len(my_array[2])": {}'.format(len(my_array[2])))
| variable = 'var'
var2 = '2'
var3 = 3
print(variable)
print('---')
print(variable, end='')
print('---')
print(variable, var2, var3)
print('---')
print(variable, var2, var3, sep=', ')
print('---')
four = 2 * 2
my_array = [7, '6', 'five', four, [0, 1, 2]]
print('"len(my_array[2])": {}'.format(len(my_array[2]))) |
# -*- coding: utf-8 -*-
def get_default_encoding():
return "utf-8"
################################################################################
# 1: str/unicode wrappers used to prevent double-escaping. This is the
# same concept as django.utils.safestring and webhelpers.html.literal
class safe_bytes(str):
def decode(self, *args, **kws):
return safe_unicode(super(safe_bytes, self).encode(*args, **kws))
def __add__(self, o):
res = super(safe_bytes, self).__add__(o)
if isinstance(o, safe_unicode):
return safe_unicode(res)
elif isinstance(o, safe_bytes):
return safe_bytes(res)
else:
return res
class safe_unicode(str):
def encode(self, *args, **kws):
return safe_bytes(super(safe_unicode, self).encode(*args, **kws))
def __add__(self, o):
res = super(safe_unicode, self).__add__(o)
return (
safe_unicode(res)
if isinstance(o, (safe_unicode, safe_bytes))
else res
)
| def get_default_encoding():
return 'utf-8'
class Safe_Bytes(str):
def decode(self, *args, **kws):
return safe_unicode(super(safe_bytes, self).encode(*args, **kws))
def __add__(self, o):
res = super(safe_bytes, self).__add__(o)
if isinstance(o, safe_unicode):
return safe_unicode(res)
elif isinstance(o, safe_bytes):
return safe_bytes(res)
else:
return res
class Safe_Unicode(str):
def encode(self, *args, **kws):
return safe_bytes(super(safe_unicode, self).encode(*args, **kws))
def __add__(self, o):
res = super(safe_unicode, self).__add__(o)
return safe_unicode(res) if isinstance(o, (safe_unicode, safe_bytes)) else res |
def get_bit(num, i):
#Return the value of the i-th bit in num.
num = int(to_binary_string(num), 2)
mask = 1 << i
return 1 if num & mask else 0
def set_bit(num, i):
#Sets the i-th bit in num to be 1.
num = int(to_binary_string(num), 2)
mask = 1 << i
return num | mask
def clear_bit(num, i):
num = int(to_binary_string(num), 2)
mask = ~(1 << i)
return num & mask
def update_bit(num, i, bit_is_1):
num = int(to_binary_string(num), 2)
cleared = clear_bit(num, i)
bit = 1 if bit_is_1 else 0
return cleared | (bit_is_1 << i)
def print_binary(num):
#Num is an int.
print(to_binary_string(num))
def to_binary_string(num):
return "{0:b}".format(num)
def main():
num = 113
print_binary(num)
bit = get_bit(num, 3)
print(bit)
num = set_bit(num, 3)
print_binary(num)
if __name__ == '__main__':
main()
| def get_bit(num, i):
num = int(to_binary_string(num), 2)
mask = 1 << i
return 1 if num & mask else 0
def set_bit(num, i):
num = int(to_binary_string(num), 2)
mask = 1 << i
return num | mask
def clear_bit(num, i):
num = int(to_binary_string(num), 2)
mask = ~(1 << i)
return num & mask
def update_bit(num, i, bit_is_1):
num = int(to_binary_string(num), 2)
cleared = clear_bit(num, i)
bit = 1 if bit_is_1 else 0
return cleared | bit_is_1 << i
def print_binary(num):
print(to_binary_string(num))
def to_binary_string(num):
return '{0:b}'.format(num)
def main():
num = 113
print_binary(num)
bit = get_bit(num, 3)
print(bit)
num = set_bit(num, 3)
print_binary(num)
if __name__ == '__main__':
main() |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.