content
stringlengths
7
1.05M
fixed_cases
stringlengths
1
1.28M
# # PySNMP MIB module RADLAN-CDB-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/RADLAN-CDB-MIB # Produced by pysmi-0.3.4 at Wed May 1 14:45:42 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # Integer, ObjectIdentifier, OctetString = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueRangeConstraint, ConstraintsUnion, SingleValueConstraint, ConstraintsIntersection, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ConstraintsUnion", "SingleValueConstraint", "ConstraintsIntersection", "ValueSizeConstraint") rnd, = mibBuilder.importSymbols("RADLAN-MIB", "rnd") ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup") Counter64, MibIdentifier, ModuleIdentity, TimeTicks, Gauge32, Bits, Unsigned32, Counter32, Integer32, NotificationType, MibScalar, MibTable, MibTableRow, MibTableColumn, IpAddress, iso, ObjectIdentity = mibBuilder.importSymbols("SNMPv2-SMI", "Counter64", "MibIdentifier", "ModuleIdentity", "TimeTicks", "Gauge32", "Bits", "Unsigned32", "Counter32", "Integer32", "NotificationType", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "IpAddress", "iso", "ObjectIdentity") DisplayString, TruthValue, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TruthValue", "TextualConvention") rlCDB = ModuleIdentity((1, 3, 6, 1, 4, 1, 89, 94)) rlCDB.setRevisions(('2007-01-02 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: rlCDB.setRevisionsDescriptions(('Initial revision.',)) if mibBuilder.loadTexts: rlCDB.setLastUpdated('200701020000Z') if mibBuilder.loadTexts: rlCDB.setOrganization('Radlan - a MARVELL company. Marvell Semiconductor, Inc.') if mibBuilder.loadTexts: rlCDB.setContactInfo('www.marvell.com') if mibBuilder.loadTexts: rlCDB.setDescription('This private MIB module defines CDB private MIBs.') rlStartupCDBChanged = MibScalar((1, 3, 6, 1, 4, 1, 89, 94, 1), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlStartupCDBChanged.setStatus('current') if mibBuilder.loadTexts: rlStartupCDBChanged.setDescription("Indicates whether the startup CDB has changed between the router's last two reboots") rlManualReboot = MibScalar((1, 3, 6, 1, 4, 1, 89, 94, 2), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlManualReboot.setStatus('current') if mibBuilder.loadTexts: rlManualReboot.setDescription('Indicates whether the device was shutdown orderly before reboot or not (i.e. power failure)') rlStartupCDBEmpty = MibScalar((1, 3, 6, 1, 4, 1, 89, 94, 3), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlStartupCDBEmpty.setStatus('current') if mibBuilder.loadTexts: rlStartupCDBEmpty.setDescription('Indicates whether the startup-cdb is empty, meaning: does not include any user configuration.') mibBuilder.exportSymbols("RADLAN-CDB-MIB", rlCDB=rlCDB, PYSNMP_MODULE_ID=rlCDB, rlStartupCDBChanged=rlStartupCDBChanged, rlStartupCDBEmpty=rlStartupCDBEmpty, rlManualReboot=rlManualReboot)
(integer, object_identifier, octet_string) = mibBuilder.importSymbols('ASN1', 'Integer', 'ObjectIdentifier', 'OctetString') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (value_range_constraint, constraints_union, single_value_constraint, constraints_intersection, value_size_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'ConstraintsUnion', 'SingleValueConstraint', 'ConstraintsIntersection', 'ValueSizeConstraint') (rnd,) = mibBuilder.importSymbols('RADLAN-MIB', 'rnd') (module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup') (counter64, mib_identifier, module_identity, time_ticks, gauge32, bits, unsigned32, counter32, integer32, notification_type, mib_scalar, mib_table, mib_table_row, mib_table_column, ip_address, iso, object_identity) = mibBuilder.importSymbols('SNMPv2-SMI', 'Counter64', 'MibIdentifier', 'ModuleIdentity', 'TimeTicks', 'Gauge32', 'Bits', 'Unsigned32', 'Counter32', 'Integer32', 'NotificationType', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'IpAddress', 'iso', 'ObjectIdentity') (display_string, truth_value, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TruthValue', 'TextualConvention') rl_cdb = module_identity((1, 3, 6, 1, 4, 1, 89, 94)) rlCDB.setRevisions(('2007-01-02 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: rlCDB.setRevisionsDescriptions(('Initial revision.',)) if mibBuilder.loadTexts: rlCDB.setLastUpdated('200701020000Z') if mibBuilder.loadTexts: rlCDB.setOrganization('Radlan - a MARVELL company. Marvell Semiconductor, Inc.') if mibBuilder.loadTexts: rlCDB.setContactInfo('www.marvell.com') if mibBuilder.loadTexts: rlCDB.setDescription('This private MIB module defines CDB private MIBs.') rl_startup_cdb_changed = mib_scalar((1, 3, 6, 1, 4, 1, 89, 94, 1), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlStartupCDBChanged.setStatus('current') if mibBuilder.loadTexts: rlStartupCDBChanged.setDescription("Indicates whether the startup CDB has changed between the router's last two reboots") rl_manual_reboot = mib_scalar((1, 3, 6, 1, 4, 1, 89, 94, 2), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlManualReboot.setStatus('current') if mibBuilder.loadTexts: rlManualReboot.setDescription('Indicates whether the device was shutdown orderly before reboot or not (i.e. power failure)') rl_startup_cdb_empty = mib_scalar((1, 3, 6, 1, 4, 1, 89, 94, 3), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlStartupCDBEmpty.setStatus('current') if mibBuilder.loadTexts: rlStartupCDBEmpty.setDescription('Indicates whether the startup-cdb is empty, meaning: does not include any user configuration.') mibBuilder.exportSymbols('RADLAN-CDB-MIB', rlCDB=rlCDB, PYSNMP_MODULE_ID=rlCDB, rlStartupCDBChanged=rlStartupCDBChanged, rlStartupCDBEmpty=rlStartupCDBEmpty, rlManualReboot=rlManualReboot)
# atom # : OPEN_PAREN (yield_expr | testlist_comp)? CLOSE_PAREN # | OPEN_BRACKET testlist_comp? CLOSE_BRACKET # | OPEN_BRACE dictorsetmaker? CLOSE_BRACE # | REVERSE_QUOTE testlist COMMA? REVERSE_QUOTE # | dotted_name # | ELLIPSIS # | name # | PRINT # | EXEC # | MINUS? number # | NONE # | STRING+ # ; # OPEN_PAREN CLOSE_PAREN () # OPEN_PAREN yield_expr CLOSE_PAREN def f(): (yield) # OPEN_PAREN testlist_comp CLOSE_PAREN (x, a, q == 1) # OPEN_BRACKET CLOSE_BRACKET [] # OPEN_BRACKET testlist_comp CLOSE_BRACKET [1, 3, b, p == 1] # OPEN_BRACE CLOSE_BRACE {} # OPEN_BRACE dictorsetmaker CLOSE_BRACE {x : y for x, y in a} # dotted_name b.a # ELLIPSIS ... # name f # number 90 # MINUS number -1 # NONE None # STRING "12312313" # STRING STRING "1231231" "123151"
() def f(): yield (x, a, q == 1) [] [1, 3, b, p == 1] {} {x: y for (x, y) in a} b.a ... f 90 -1 None '12312313' '1231231123151'
name = "Maciek" age = 22 print("imie:", name, "\nwiek:", age) fovoruite_language = "Python" print(age + 4) fact_or_fiction = 3 < 5 print(fact_or_fiction)
name = 'Maciek' age = 22 print('imie:', name, '\nwiek:', age) fovoruite_language = 'Python' print(age + 4) fact_or_fiction = 3 < 5 print(fact_or_fiction)
# def test_one(): # assert sum([1, 12], 2) == 15 # # # test_one() def my_unit_test(func): def wrapper(a): print(f'my unit test started for {a}') func(a) print('my unit test ended') return wrapper # @my_unit_test # def test_one(a): # assert sum([1, 12], a) == 15 # test_one(1) @my_unit_test def test_2(a): assert a in [1, 2, 3] test_2(1) my_unit_test(test_2(3)) # test_one(1 + 1) # test_2(2) # my_unit_test(test_one)(2)
def my_unit_test(func): def wrapper(a): print(f'my unit test started for {a}') func(a) print('my unit test ended') return wrapper @my_unit_test def test_2(a): assert a in [1, 2, 3] test_2(1) my_unit_test(test_2(3))
''' this util is made to validate the subdomains getting added into the hosts if they're like the main subdomain the program is scanning. then it should pass otherwise it shouldn't return anything ''' def vSubdomains(sList, huntingTarget): mainSubdomains = [] for singleSubdomain in sList: if singleSubdomain[-len(huntingTarget):] == huntingTarget: mainSubdomains.append(singleSubdomain) else: pass return mainSubdomains
""" this util is made to validate the subdomains getting added into the hosts if they're like the main subdomain the program is scanning. then it should pass otherwise it shouldn't return anything """ def v_subdomains(sList, huntingTarget): main_subdomains = [] for single_subdomain in sList: if singleSubdomain[-len(huntingTarget):] == huntingTarget: mainSubdomains.append(singleSubdomain) else: pass return mainSubdomains
n = int(input('Enter number: ')) flag = False if n > 1: for i in range(2, int(n**0.5)+1): # we only need to check up to square root if n % i == 0: print(f"{n} divides by {i}") flag = True break if flag: print(n, 'is not a prime number') else: print(n, 'is a prime number')
n = int(input('Enter number: ')) flag = False if n > 1: for i in range(2, int(n ** 0.5) + 1): if n % i == 0: print(f'{n} divides by {i}') flag = True break if flag: print(n, 'is not a prime number') else: print(n, 'is a prime number')
# https://github.com/carpedm20/emoji # http://www.unicode.org/emoji/charts/full-emoji-list.html class Button: Camera = u'\U0001F4F7' FileFolder = u'\U0001F4C1' FileFolderOpen = u'\U0001F4C2' RightArrowUp = u'\U00002934' RightArrowDown = u'\U00002935' CrossMarkRed = u'\U0000274C' CheckMark = u'\U00002714' CheckMarkGreen = u'\U00002705' CircleArrow = u'\U0001F504' QuestionMark = u'\U00002754' MarkWarning = u'\U000026A0' NoEntry = u'\U000026D4' Like = u'\U0001F44D' Dislike = u'\U0001F44E\U0001F3FF' Writing = u'\U0000270D' Automobile = u'\U0001F697' Hourglass = u'\U000023F3' WatchClock = u'\U0000231A' AlarmClock = u'\U000023F0' Bell = u'\U0001F514' Telephone = u'\U0000260E' HammerWork = u'\U00002692' WrenchWork = u'\U0001F527' Worker = u'\U0001F477' ManShadow = u'\U0001F464' GroupShadow = u'\U0001F465' Money = u'\U0001F4B0' Calendar = u'\U0001F4C5' Clipboard = u'\U0001F4CB' WasteBasket = u'\U0001F5D1' ChequeredFlag = u'\U0001F3C1' Man = u'\U0001F468' SpeakingHead = u'\U0001F5E3' class Country: UnitedKingdom = u'\U0001F1EC\U0001F1E7' Russia = u'\U0001F1F7\U0001F1FA' Armenia = u'\U0001F1E6\U0001F1F2' Azerbaijan = u'\U0001F1E6\U0001F1FF' Belarus = u'\U0001F1E7\U0001F1FE' China = u'\U0001F1E8\U0001F1F3' Estonia = u'\U0001F1EA\U0001F1EA' Georgia = u'\U0001F1EC\U0001F1EA' Kyrgyzstan = u'\U0001F1F0\U0001F1EC' Kazakhstan = u'\U0001F1F0\U0001F1FF' Lithuania = u'\U0001F1F1\U0001F1F9' Latvia = u'\U0001F1F1\U0001F1FB' Moldova = u'\U0001F1F2\U0001F1E9' Poland = u'\U0001F1F5\U0001F1F1' Tajikistan = u'\U0001F1F9\U0001F1EF' Turkmenistan = u'\U0001F1F9\U0001F1F2' Ukraine = u'\U0001F1FA\U0001F1E6' Uzbekistan = u'\U0001F1FA\U0001F1FF' USA = u'\U0001F1FA\U0001F1F8'
class Button: camera = u'πŸ“·' file_folder = u'πŸ“' file_folder_open = u'πŸ“‚' right_arrow_up = u'‴' right_arrow_down = u'‡' cross_mark_red = u'❌' check_mark = u'βœ”' check_mark_green = u'βœ…' circle_arrow = u'πŸ”„' question_mark = u'❔' mark_warning = u'⚠' no_entry = u'β›”' like = u'πŸ‘' dislike = u'πŸ‘ŽπŸΏ' writing = u'✍' automobile = u'πŸš—' hourglass = u'⏳' watch_clock = u'⌚' alarm_clock = u'⏰' bell = u'πŸ””' telephone = u'☎' hammer_work = u'βš’' wrench_work = u'πŸ”§' worker = u'πŸ‘·' man_shadow = u'πŸ‘€' group_shadow = u'πŸ‘₯' money = u'πŸ’°' calendar = u'πŸ“…' clipboard = u'πŸ“‹' waste_basket = u'πŸ—‘' chequered_flag = u'🏁' man = u'πŸ‘¨' speaking_head = u'πŸ—£' class Country: united_kingdom = u'πŸ‡¬πŸ‡§' russia = u'πŸ‡·πŸ‡Ί' armenia = u'πŸ‡¦πŸ‡²' azerbaijan = u'πŸ‡¦πŸ‡Ώ' belarus = u'πŸ‡§πŸ‡Ύ' china = u'πŸ‡¨πŸ‡³' estonia = u'πŸ‡ͺπŸ‡ͺ' georgia = u'πŸ‡¬πŸ‡ͺ' kyrgyzstan = u'πŸ‡°πŸ‡¬' kazakhstan = u'πŸ‡°πŸ‡Ώ' lithuania = u'πŸ‡±πŸ‡Ή' latvia = u'πŸ‡±πŸ‡»' moldova = u'πŸ‡²πŸ‡©' poland = u'πŸ‡΅πŸ‡±' tajikistan = u'πŸ‡ΉπŸ‡―' turkmenistan = u'πŸ‡ΉπŸ‡²' ukraine = u'πŸ‡ΊπŸ‡¦' uzbekistan = u'πŸ‡ΊπŸ‡Ώ' usa = u'πŸ‡ΊπŸ‡Έ'
def parse_password_data(string): # This function the password data into the 4 usable components: e.g. "1-9 x: xwjgxtmrzxzmkx" minbound, maxbound, letter, passwords = [], [], [], [] for line in string: firstpart = line.split(sep = '-') secondpart = firstpart[-1].split(sep = ' ', maxsplit = 1) thirdpart = secondpart[-1].split(sep = ': ') minbound.append(int(firstpart[0])) maxbound.append(int(secondpart[0])) letter.append(str(thirdpart[0])) passwords.append(str(thirdpart[-1])) return minbound, maxbound, letter, passwords def password_analyzer_one(minbound, maxbound, letter, passwords): # This function test the validity of the password based on the rules: # Each line gives the password policy and then the password. # The password policy indicates the lowest and highest number of times a given letter must appear for the password to be valid. # For example, "1-3 a" means that the password must contain a at least 1 time and at most 3 times. valid_count = 0 for i in range(len(passwords)): occurances = passwords[i].count(letter[i]) if minbound[i] <= occurances <= maxbound[i]: valid_count += 1 return valid_count def password_analyzer_two(minbound, maxbound, letter, passwords): # This function test the validity of the password based on the rules: # Each policy actually describes two positions in the password, where 1 means the first character, 2 means the second character, and so on. # (Be careful; Toboggan Corporate Policies have no concept of "index zero"!) # Exactly one of these positions must contain the given letter. # Other occurrences of the letter are irrelevant for the purposes of policy enforcement. valid_count = 0 for i in range(len(passwords)): firstpos = passwords[i][minbound[i]-1] == letter[i] secondpos = passwords[i][maxbound[i]-1] == letter[i] # XOR hack if firstpos != secondpos: valid_count += 1 return valid_count
def parse_password_data(string): (minbound, maxbound, letter, passwords) = ([], [], [], []) for line in string: firstpart = line.split(sep='-') secondpart = firstpart[-1].split(sep=' ', maxsplit=1) thirdpart = secondpart[-1].split(sep=': ') minbound.append(int(firstpart[0])) maxbound.append(int(secondpart[0])) letter.append(str(thirdpart[0])) passwords.append(str(thirdpart[-1])) return (minbound, maxbound, letter, passwords) def password_analyzer_one(minbound, maxbound, letter, passwords): valid_count = 0 for i in range(len(passwords)): occurances = passwords[i].count(letter[i]) if minbound[i] <= occurances <= maxbound[i]: valid_count += 1 return valid_count def password_analyzer_two(minbound, maxbound, letter, passwords): valid_count = 0 for i in range(len(passwords)): firstpos = passwords[i][minbound[i] - 1] == letter[i] secondpos = passwords[i][maxbound[i] - 1] == letter[i] if firstpos != secondpos: valid_count += 1 return valid_count
def indenter(): return " " * 4 def indent(n, lines, start, stop): i = n * indenter() for j in range(start, stop): lines[j] = i + lines[j] return lines def check_shape(shape, typename): if len(shape) == 1 and typename == "Polyvertex": return True if len(shape) != 2: return False if shape[1] == 3 and typename == "Triangle": return True if shape[1] == 4 and typename == "Quadrilateral": return True if shape[1] == 8 and typename == "Hexahedron": return True return False def join_as_string(arg, sep): return sep.join([str(i) for i in arg])
def indenter(): return ' ' * 4 def indent(n, lines, start, stop): i = n * indenter() for j in range(start, stop): lines[j] = i + lines[j] return lines def check_shape(shape, typename): if len(shape) == 1 and typename == 'Polyvertex': return True if len(shape) != 2: return False if shape[1] == 3 and typename == 'Triangle': return True if shape[1] == 4 and typename == 'Quadrilateral': return True if shape[1] == 8 and typename == 'Hexahedron': return True return False def join_as_string(arg, sep): return sep.join([str(i) for i in arg])
__all__ = [ 'CommandHelpers', 'CommandManager', 'CommandRegistry', 'CommandManagerCallback' ]
__all__ = ['CommandHelpers', 'CommandManager', 'CommandRegistry', 'CommandManagerCallback']
""" Given an integer, n, and n space-separated integers as input, create a tuple, t, of those n integers. Then compute and print the result of hash(t). Note: hash() is one of the functions in the __builtins__ module, so it need not be imported. """ if __name__ == '__main__': n = int(input("Enter the length\n")) integer_list = map(int, input().split()) t = tuple(integer_list) print(hash(t))
""" Given an integer, n, and n space-separated integers as input, create a tuple, t, of those n integers. Then compute and print the result of hash(t). Note: hash() is one of the functions in the __builtins__ module, so it need not be imported. """ if __name__ == '__main__': n = int(input('Enter the length\n')) integer_list = map(int, input().split()) t = tuple(integer_list) print(hash(t))
# ------------------------------------------------------------------------ # File: model_info.py # ------------------------------------------------------------------------ # Licensed Materials - Property of IBM # 5725-A06 5725-A29 5724-Y48 5724-Y49 5724-Y54 5724-Y55 5655-Y21 # Copyright IBM Corporation 2008, 2020. All Rights Reserved. # # US Government Users Restricted Rights - Use, duplication or # disclosure restricted by GSA ADP Schedule Contract with # IBM Corp. # ------------------------------------------------------------------------ """Modeling information IDs returned by the Callable Library. This module defines symbolic names for the integer modeling information IDs returned by the Callable Library. The names to which the modeling information IDs are assigned are the same names used in the Callable Library, all of which begin with CPXMI. The modeling information IDs are accessible through the modeling assistance callback. These symbolic names can be used to test if a particular modeling issue has been detected. See `Cplex.set_modeling_assistance_callback`. """ CPXMI_BIGM_COEF = 1040 """See :macros:`CPXMI_BIGM_COEF` in the C API.""" CPXMI_BIGM_TO_IND = 1041 """See :macros:`CPXMI_BIGM_TO_IND` in the C API.""" CPXMI_BIGM_VARBOUND = 1042 """See :macros:`CPXMI_BIGM_VARBOUND` in the C API.""" CPXMI_CANCEL_TOL = 1045 """See :macros:`CPXMI_CANCEL_TOL` in the C API.""" CPXMI_EPGAP_LARGE = 1038 """See :macros:`CPXMI_EPGAP_LARGE` in the C API.""" CPXMI_EPGAP_OBJOFFSET = 1037 """See :macros:`CPXMI_EPGAP_OBJOFFSET` in the C API.""" CPXMI_FEAS_TOL = 1043 """See :macros:`CPXMI_FEAS_TOL` in the C API.""" CPXMI_FRACTION_SCALING = 1047 """See :macros:`CPXMI_FRACTION_SCALING` in the C API.""" CPXMI_IND_NZ_LARGE_NUM = 1019 """See :macros:`CPXMI_IND_NZ_LARGE_NUM` in the C API.""" CPXMI_IND_NZ_SMALL_NUM = 1020 """See :macros:`CPXMI_IND_NZ_SMALL_NUM` in the C API.""" CPXMI_IND_RHS_LARGE_NUM = 1021 """See :macros:`CPXMI_IND_RHS_LARGE_NUM` in the C API.""" CPXMI_IND_RHS_SMALL_NUM = 1022 """See :macros:`CPXMI_IND_RHS_SMALL_NUM` in the C API.""" CPXMI_KAPPA_ILLPOSED = 1035 """See :macros:`CPXMI_KAPPA_ILLPOSED` in the C API.""" CPXMI_KAPPA_SUSPICIOUS = 1033 """See :macros:`CPXMI_KAPPA_SUSPICIOUS` in the C API.""" CPXMI_KAPPA_UNSTABLE = 1034 """See :macros:`CPXMI_KAPPA_UNSTABLE` in the C API.""" CPXMI_LB_LARGE_NUM = 1003 """See :macros:`CPXMI_LB_LARGE_NUM` in the C API.""" CPXMI_LB_SMALL_NUM = 1004 """See :macros:`CPXMI_LB_SMALL_NUM` in the C API.""" CPXMI_LC_NZ_LARGE_NUM = 1023 """See :macros:`CPXMI_LC_NZ_LARGE_NUM` in the C API.""" CPXMI_LC_NZ_SMALL_NUM = 1024 """See :macros:`CPXMI_LC_NZ_SMALL_NUM` in the C API.""" CPXMI_LC_RHS_LARGE_NUM = 1025 """See :macros:`CPXMI_LC_RHS_LARGE_NUM` in the C API.""" CPXMI_LC_RHS_SMALL_NUM = 1026 """See :macros:`CPXMI_LC_RHS_SMALL_NUM` in the C API.""" CPXMI_MULTIOBJ_COEFFS = 1062 """See :macros:`CPXMI_MULTIOBJ_COEFFS` in the C API.""" CPXMI_MULTIOBJ_LARGE_NUM = 1058 """See :macros:`CPXMI_MULTIOBJ_LARGE_NUM` in the C API.""" CPXMI_MULTIOBJ_MIX = 1063 """See :macros:`CPXMI_MULTIOBJ_MIX` in the C API.""" CPXMI_MULTIOBJ_OPT_TOL = 1060 """See :macros:`CPXMI_MULTIOBJ_OPT_TOL` in the C API.""" CPXMI_MULTIOBJ_SMALL_NUM = 1059 """See :macros:`CPXMI_MULTIOBJ_SMALL_NUM` in the C API.""" CPXMI_NZ_LARGE_NUM = 1009 """See :macros:`CPXMI_NZ_LARGE_NUM` in the C API.""" CPXMI_NZ_SMALL_NUM = 1010 """See :macros:`CPXMI_NZ_SMALL_NUM` in the C API.""" CPXMI_OBJ_LARGE_NUM = 1001 """See :macros:`CPXMI_OBJ_LARGE_NUM` in the C API.""" CPXMI_OBJ_SMALL_NUM = 1002 """See :macros:`CPXMI_OBJ_SMALL_NUM` in the C API.""" CPXMI_OPT_TOL = 1044 """See :macros:`CPXMI_OPT_TOL` in the C API.""" CPXMI_PWL_SLOPE_LARGE_NUM = 1064 """See :macros:`CPXMI_PWL_SLOPE_LARGE_NUM` in the C API.""" CPXMI_PWL_SLOPE_SMALL_NUM = 1065 """See :macros:`CPXMI_PWL_SLOPE_SMALL_NUM` in the C API.""" CPXMI_QC_LINNZ_LARGE_NUM = 1015 """See :macros:`CPXMI_QC_LINNZ_LARGE_NUM` in the C API.""" CPXMI_QC_LINNZ_SMALL_NUM = 1016 """See :macros:`CPXMI_QC_LINNZ_SMALL_NUM` in the C API.""" CPXMI_QC_QNZ_LARGE_NUM = 1017 """See :macros:`CPXMI_QC_QNZ_LARGE_NUM` in the C API.""" CPXMI_QC_QNZ_SMALL_NUM = 1018 """See :macros:`CPXMI_QC_QNZ_SMALL_NUM` in the C API.""" CPXMI_QC_RHS_LARGE_NUM = 1013 """See :macros:`CPXMI_QC_RHS_LARGE_NUM` in the C API.""" CPXMI_QC_RHS_SMALL_NUM = 1014 """See :macros:`CPXMI_QC_RHS_SMALL_NUM` in the C API.""" CPXMI_QOBJ_LARGE_NUM = 1011 """See :macros:`CPXMI_QOBJ_LARGE_NUM` in the C API.""" CPXMI_QOBJ_SMALL_NUM = 1012 """See :macros:`CPXMI_QOBJ_SMALL_NUM` in the C API.""" CPXMI_QOPT_TOL = 1046 """See :macros:`CPXMI_QOPT_TOL` in the C API.""" CPXMI_RHS_LARGE_NUM = 1007 """See :macros:`CPXMI_RHS_LARGE_NUM` in the C API.""" CPXMI_RHS_SMALL_NUM = 1008 """See :macros:`CPXMI_RHS_SMALL_NUM` in the C API.""" CPXMI_SAMECOEFF_COL = 1050 """See :macros:`CPXMI_SAMECOEFF_COL` in the C API.""" CPXMI_SAMECOEFF_IND = 1051 """See :macros:`CPXMI_SAMECOEFF_IND` in the C API.""" CPXMI_SAMECOEFF_LAZY = 1054 """See :macros:`CPXMI_SAMECOEFF_LAZY` in the C API.""" CPXMI_SAMECOEFF_MULTIOBJ = 1061 """See :macros:`CPXMI_SAMECOEFF_MULTIOBJ` in the C API.""" CPXMI_SAMECOEFF_OBJ = 1057 """See :macros:`CPXMI_SAMECOEFF_OBJ` in the C API.""" CPXMI_SAMECOEFF_QLIN = 1052 """See :macros:`CPXMI_SAMECOEFF_QLIN` in the C API.""" CPXMI_SAMECOEFF_QUAD = 1053 """See :macros:`CPXMI_SAMECOEFF_QUAD` in the C API.""" CPXMI_SAMECOEFF_RHS = 1056 """See :macros:`CPXMI_SAMECOEFF_RHS` in the C API.""" CPXMI_SAMECOEFF_ROW = 1049 """See :macros:`CPXMI_SAMECOEFF_ROW` in the C API.""" CPXMI_SAMECOEFF_UCUT = 1055 """See :macros:`CPXMI_SAMECOEFF_UCUT` in the C API.""" CPXMI_SINGLE_PRECISION = 1036 """See :macros:`CPXMI_SINGLE_PRECISION` in the C API.""" CPXMI_SYMMETRY_BREAKING_INEQ = 1039 """See :macros:`CPXMI_SYMMETRY_BREAKING_INEQ` in the C API.""" CPXMI_UB_LARGE_NUM = 1005 """See :macros:`CPXMI_UB_LARGE_NUM` in the C API.""" CPXMI_UB_SMALL_NUM = 1006 """See :macros:`CPXMI_UB_SMALL_NUM` in the C API.""" CPXMI_UC_NZ_LARGE_NUM = 1027 """See :macros:`CPXMI_UC_NZ_LARGE_NUM` in the C API.""" CPXMI_UC_NZ_SMALL_NUM = 1028 """See :macros:`CPXMI_UC_NZ_SMALL_NUM` in the C API.""" CPXMI_UC_RHS_LARGE_NUM = 1029 """See :macros:`CPXMI_UC_RHS_LARGE_NUM` in the C API.""" CPXMI_UC_RHS_SMALL_NUM = 1030 """See :macros:`CPXMI_UC_RHS_SMALL_NUM` in the C API.""" CPXMI_WIDE_COEFF_RANGE = 1048 """See :macros:`CPXMI_WIDE_COEFF_RANGE` in the C API."""
"""Modeling information IDs returned by the Callable Library. This module defines symbolic names for the integer modeling information IDs returned by the Callable Library. The names to which the modeling information IDs are assigned are the same names used in the Callable Library, all of which begin with CPXMI. The modeling information IDs are accessible through the modeling assistance callback. These symbolic names can be used to test if a particular modeling issue has been detected. See `Cplex.set_modeling_assistance_callback`. """ cpxmi_bigm_coef = 1040 'See :macros:`CPXMI_BIGM_COEF` in the C API.' cpxmi_bigm_to_ind = 1041 'See :macros:`CPXMI_BIGM_TO_IND` in the C API.' cpxmi_bigm_varbound = 1042 'See :macros:`CPXMI_BIGM_VARBOUND` in the C API.' cpxmi_cancel_tol = 1045 'See :macros:`CPXMI_CANCEL_TOL` in the C API.' cpxmi_epgap_large = 1038 'See :macros:`CPXMI_EPGAP_LARGE` in the C API.' cpxmi_epgap_objoffset = 1037 'See :macros:`CPXMI_EPGAP_OBJOFFSET` in the C API.' cpxmi_feas_tol = 1043 'See :macros:`CPXMI_FEAS_TOL` in the C API.' cpxmi_fraction_scaling = 1047 'See :macros:`CPXMI_FRACTION_SCALING` in the C API.' cpxmi_ind_nz_large_num = 1019 'See :macros:`CPXMI_IND_NZ_LARGE_NUM` in the C API.' cpxmi_ind_nz_small_num = 1020 'See :macros:`CPXMI_IND_NZ_SMALL_NUM` in the C API.' cpxmi_ind_rhs_large_num = 1021 'See :macros:`CPXMI_IND_RHS_LARGE_NUM` in the C API.' cpxmi_ind_rhs_small_num = 1022 'See :macros:`CPXMI_IND_RHS_SMALL_NUM` in the C API.' cpxmi_kappa_illposed = 1035 'See :macros:`CPXMI_KAPPA_ILLPOSED` in the C API.' cpxmi_kappa_suspicious = 1033 'See :macros:`CPXMI_KAPPA_SUSPICIOUS` in the C API.' cpxmi_kappa_unstable = 1034 'See :macros:`CPXMI_KAPPA_UNSTABLE` in the C API.' cpxmi_lb_large_num = 1003 'See :macros:`CPXMI_LB_LARGE_NUM` in the C API.' cpxmi_lb_small_num = 1004 'See :macros:`CPXMI_LB_SMALL_NUM` in the C API.' cpxmi_lc_nz_large_num = 1023 'See :macros:`CPXMI_LC_NZ_LARGE_NUM` in the C API.' cpxmi_lc_nz_small_num = 1024 'See :macros:`CPXMI_LC_NZ_SMALL_NUM` in the C API.' cpxmi_lc_rhs_large_num = 1025 'See :macros:`CPXMI_LC_RHS_LARGE_NUM` in the C API.' cpxmi_lc_rhs_small_num = 1026 'See :macros:`CPXMI_LC_RHS_SMALL_NUM` in the C API.' cpxmi_multiobj_coeffs = 1062 'See :macros:`CPXMI_MULTIOBJ_COEFFS` in the C API.' cpxmi_multiobj_large_num = 1058 'See :macros:`CPXMI_MULTIOBJ_LARGE_NUM` in the C API.' cpxmi_multiobj_mix = 1063 'See :macros:`CPXMI_MULTIOBJ_MIX` in the C API.' cpxmi_multiobj_opt_tol = 1060 'See :macros:`CPXMI_MULTIOBJ_OPT_TOL` in the C API.' cpxmi_multiobj_small_num = 1059 'See :macros:`CPXMI_MULTIOBJ_SMALL_NUM` in the C API.' cpxmi_nz_large_num = 1009 'See :macros:`CPXMI_NZ_LARGE_NUM` in the C API.' cpxmi_nz_small_num = 1010 'See :macros:`CPXMI_NZ_SMALL_NUM` in the C API.' cpxmi_obj_large_num = 1001 'See :macros:`CPXMI_OBJ_LARGE_NUM` in the C API.' cpxmi_obj_small_num = 1002 'See :macros:`CPXMI_OBJ_SMALL_NUM` in the C API.' cpxmi_opt_tol = 1044 'See :macros:`CPXMI_OPT_TOL` in the C API.' cpxmi_pwl_slope_large_num = 1064 'See :macros:`CPXMI_PWL_SLOPE_LARGE_NUM` in the C API.' cpxmi_pwl_slope_small_num = 1065 'See :macros:`CPXMI_PWL_SLOPE_SMALL_NUM` in the C API.' cpxmi_qc_linnz_large_num = 1015 'See :macros:`CPXMI_QC_LINNZ_LARGE_NUM` in the C API.' cpxmi_qc_linnz_small_num = 1016 'See :macros:`CPXMI_QC_LINNZ_SMALL_NUM` in the C API.' cpxmi_qc_qnz_large_num = 1017 'See :macros:`CPXMI_QC_QNZ_LARGE_NUM` in the C API.' cpxmi_qc_qnz_small_num = 1018 'See :macros:`CPXMI_QC_QNZ_SMALL_NUM` in the C API.' cpxmi_qc_rhs_large_num = 1013 'See :macros:`CPXMI_QC_RHS_LARGE_NUM` in the C API.' cpxmi_qc_rhs_small_num = 1014 'See :macros:`CPXMI_QC_RHS_SMALL_NUM` in the C API.' cpxmi_qobj_large_num = 1011 'See :macros:`CPXMI_QOBJ_LARGE_NUM` in the C API.' cpxmi_qobj_small_num = 1012 'See :macros:`CPXMI_QOBJ_SMALL_NUM` in the C API.' cpxmi_qopt_tol = 1046 'See :macros:`CPXMI_QOPT_TOL` in the C API.' cpxmi_rhs_large_num = 1007 'See :macros:`CPXMI_RHS_LARGE_NUM` in the C API.' cpxmi_rhs_small_num = 1008 'See :macros:`CPXMI_RHS_SMALL_NUM` in the C API.' cpxmi_samecoeff_col = 1050 'See :macros:`CPXMI_SAMECOEFF_COL` in the C API.' cpxmi_samecoeff_ind = 1051 'See :macros:`CPXMI_SAMECOEFF_IND` in the C API.' cpxmi_samecoeff_lazy = 1054 'See :macros:`CPXMI_SAMECOEFF_LAZY` in the C API.' cpxmi_samecoeff_multiobj = 1061 'See :macros:`CPXMI_SAMECOEFF_MULTIOBJ` in the C API.' cpxmi_samecoeff_obj = 1057 'See :macros:`CPXMI_SAMECOEFF_OBJ` in the C API.' cpxmi_samecoeff_qlin = 1052 'See :macros:`CPXMI_SAMECOEFF_QLIN` in the C API.' cpxmi_samecoeff_quad = 1053 'See :macros:`CPXMI_SAMECOEFF_QUAD` in the C API.' cpxmi_samecoeff_rhs = 1056 'See :macros:`CPXMI_SAMECOEFF_RHS` in the C API.' cpxmi_samecoeff_row = 1049 'See :macros:`CPXMI_SAMECOEFF_ROW` in the C API.' cpxmi_samecoeff_ucut = 1055 'See :macros:`CPXMI_SAMECOEFF_UCUT` in the C API.' cpxmi_single_precision = 1036 'See :macros:`CPXMI_SINGLE_PRECISION` in the C API.' cpxmi_symmetry_breaking_ineq = 1039 'See :macros:`CPXMI_SYMMETRY_BREAKING_INEQ` in the C API.' cpxmi_ub_large_num = 1005 'See :macros:`CPXMI_UB_LARGE_NUM` in the C API.' cpxmi_ub_small_num = 1006 'See :macros:`CPXMI_UB_SMALL_NUM` in the C API.' cpxmi_uc_nz_large_num = 1027 'See :macros:`CPXMI_UC_NZ_LARGE_NUM` in the C API.' cpxmi_uc_nz_small_num = 1028 'See :macros:`CPXMI_UC_NZ_SMALL_NUM` in the C API.' cpxmi_uc_rhs_large_num = 1029 'See :macros:`CPXMI_UC_RHS_LARGE_NUM` in the C API.' cpxmi_uc_rhs_small_num = 1030 'See :macros:`CPXMI_UC_RHS_SMALL_NUM` in the C API.' cpxmi_wide_coeff_range = 1048 'See :macros:`CPXMI_WIDE_COEFF_RANGE` in the C API.'
def test_checkboxes(env, similar, template, expected): template = env.from_string(template) assert similar(template.render(), expected) def test_checkboxes_with_id_and_name(env, similar, template, expected): template = env.from_string(template) assert similar(template.render(), expected) def test_checkboxes_with_hints_on_items(env, similar, template, expected): template = env.from_string(template) assert similar(template.render(), expected) def test_checkboxes_with_disabled_item(env, similar, template, expected): template = env.from_string(template) assert similar(template.render(), expected) def test_checkboxes_with_legend_as_page_heading(env, similar, template, expected): template = env.from_string(template) assert similar(template.render(), expected) def test_checkboxes_with_a_medium_legend(env, similar, template, expected): template = env.from_string(template) assert similar(template.render(), expected) def test_checkboxes_without_fieldset(env, similar, template, expected): template = env.from_string(template) assert similar(template.render(), expected) def test_checkboxes_with_all_fieldset_attributes(env, similar, template, expected): template = env.from_string(template) assert similar(template.render(), expected) def test_checkboxes_with_error_message(env, similar, template, expected): template = env.from_string(template) assert similar(template.render(), expected)
def test_checkboxes(env, similar, template, expected): template = env.from_string(template) assert similar(template.render(), expected) def test_checkboxes_with_id_and_name(env, similar, template, expected): template = env.from_string(template) assert similar(template.render(), expected) def test_checkboxes_with_hints_on_items(env, similar, template, expected): template = env.from_string(template) assert similar(template.render(), expected) def test_checkboxes_with_disabled_item(env, similar, template, expected): template = env.from_string(template) assert similar(template.render(), expected) def test_checkboxes_with_legend_as_page_heading(env, similar, template, expected): template = env.from_string(template) assert similar(template.render(), expected) def test_checkboxes_with_a_medium_legend(env, similar, template, expected): template = env.from_string(template) assert similar(template.render(), expected) def test_checkboxes_without_fieldset(env, similar, template, expected): template = env.from_string(template) assert similar(template.render(), expected) def test_checkboxes_with_all_fieldset_attributes(env, similar, template, expected): template = env.from_string(template) assert similar(template.render(), expected) def test_checkboxes_with_error_message(env, similar, template, expected): template = env.from_string(template) assert similar(template.render(), expected)
with open('assets/day08.txt', 'r') as file: lines = [line for line in file.read().splitlines()] collection = [] for line in lines: inputs, outputs = tuple(line.split('|')) collection.append({ 'input': [digit for digit in inputs.strip().split(' ')], 'output': [digit for digit in outputs.strip().split(' ')], }) segments = [6, 2, 5, 5, 4, 5, 6, 3, 7, 6] unique_segments = [number for number in segments if 1 == segments.count(number)] unique_occurrences = 0 outputs = [] for input_output in collection: inputs = sorted(input_output['input'], key=len) one, seven, four, eight = tuple([ set(list(inputs[0])), set(list(inputs[1])), set(list(inputs[2])), set(list(inputs[9])), ]) possibilities = [set(list(inputs[6])), set(list(inputs[7])), set(list(inputs[8]))] for possibility in possibilities: if 2 == len(eight.difference(four).intersection(possibility)): nine = possibility elif 2 == len(one.intersection(possibility)): zero = possibility else: six = possibility possibilities = [set(list(inputs[3])), set(list(inputs[4])), set(list(inputs[5]))] for possibility in possibilities: if 4 == len(nine.intersection(possibility)): two = possibility elif 5 == len(six.intersection(possibility)): five = possibility else: three = possibility resolved = [zero, one, two, three, four, five, six, seven, eight, nine] output = '' for digit in input_output['output']: if len(digit) in unique_segments: unique_occurrences += 1 output += str(resolved.index(set(list(digit)))) outputs.append(int(output)) print(f"Unique segment occurrences: {unique_occurrences}") print(f"Combined output values: {sum(outputs)}")
with open('assets/day08.txt', 'r') as file: lines = [line for line in file.read().splitlines()] collection = [] for line in lines: (inputs, outputs) = tuple(line.split('|')) collection.append({'input': [digit for digit in inputs.strip().split(' ')], 'output': [digit for digit in outputs.strip().split(' ')]}) segments = [6, 2, 5, 5, 4, 5, 6, 3, 7, 6] unique_segments = [number for number in segments if 1 == segments.count(number)] unique_occurrences = 0 outputs = [] for input_output in collection: inputs = sorted(input_output['input'], key=len) (one, seven, four, eight) = tuple([set(list(inputs[0])), set(list(inputs[1])), set(list(inputs[2])), set(list(inputs[9]))]) possibilities = [set(list(inputs[6])), set(list(inputs[7])), set(list(inputs[8]))] for possibility in possibilities: if 2 == len(eight.difference(four).intersection(possibility)): nine = possibility elif 2 == len(one.intersection(possibility)): zero = possibility else: six = possibility possibilities = [set(list(inputs[3])), set(list(inputs[4])), set(list(inputs[5]))] for possibility in possibilities: if 4 == len(nine.intersection(possibility)): two = possibility elif 5 == len(six.intersection(possibility)): five = possibility else: three = possibility resolved = [zero, one, two, three, four, five, six, seven, eight, nine] output = '' for digit in input_output['output']: if len(digit) in unique_segments: unique_occurrences += 1 output += str(resolved.index(set(list(digit)))) outputs.append(int(output)) print(f'Unique segment occurrences: {unique_occurrences}') print(f'Combined output values: {sum(outputs)}')
''' try: f = open('file1.txt', 'r') except IOError: print('Problem with Input Output...\n') else: print('No Problem with Input Output...') ''' try: f = open('file1.txt', 'w') except IOError: print('Problem with Input Output...\n') else: print('No Problem with Input Output...')
""" try: f = open('file1.txt', 'r') except IOError: print('Problem with Input Output... ') else: print('No Problem with Input Output...') """ try: f = open('file1.txt', 'w') except IOError: print('Problem with Input Output...\n') else: print('No Problem with Input Output...')
lines_colors = [ "Red", "DodgerBlue", "LimeGreen", "Gold", "MediumSlateBlue", "Brown", "Olive", "Orange", "DarkGoldenRod", "Salmon", "Fuchsia", "Aqua", "LightSlateGray", "MediumBlue", "GreenYellow", "DarkRed", "DarkMagenta", "Khaki", "MediumSpringGreen", "OrangeRed", "DarkGreen", "LightPink", "DarkSlateBlue", "Yellow", "Turquoise", "SaddleBrown", "Maroon", "Ivory", "SpringGreen", "BlueViolet", "Coral", "Teal", "Navy", "LightGoldenRodYellow", "DarkOliveGreen", "Coral", "Red", "DodgerBlue", "LimeGreen", "Gold", "MediumSlateBlue", "Brown", "Olive", "Orange", "DarkGoldenRod", "Salmon", "Fuchsia", "Aqua", "LightSlateGray", "MediumBlue", "GreenYellow", "DarkRed", "DarkMagenta", "Khaki", "MediumSpringGreen", "OrangeRed", "DarkGreen", "LightPink", "DarkSlateBlue", "Yellow", "Turquoise", "SaddleBrown", "Maroon", "Ivory", "SpringGreen", "BlueViolet", "Coral", "Teal", "Navy", "LightGoldenRodYellow", "DarkOliveGreen", "Coral", "Red", "DodgerBlue", "LimeGreen", "Gold", "MediumSlateBlue", "Brown", "Olive", "Orange", "DarkGoldenRod", "Salmon", "Fuchsia", "Aqua", "LightSlateGray", "MediumBlue", "GreenYellow", "DarkRed", "DarkMagenta", "Khaki", "MediumSpringGreen", "OrangeRed", "DarkGreen", "LightPink", "DarkSlateBlue", "Yellow", "Turquoise", "SaddleBrown", "Maroon", "Ivory", "SpringGreen", "BlueViolet", "Coral", "Teal", "Navy", "LightGoldenRodYellow", "DarkOliveGreen", "Coral", "Red", "DodgerBlue", "LimeGreen", "Gold", "MediumSlateBlue", "Brown", "Olive", "Orange", "DarkGoldenRod", "Salmon", "Fuchsia", "Aqua", "LightSlateGray", "MediumBlue", "GreenYellow", "DarkRed", "DarkMagenta", "Khaki", "MediumSpringGreen", "OrangeRed", "DarkGreen", "LightPink", "DarkSlateBlue", "Yellow", "Turquoise", "SaddleBrown", "Maroon", "Ivory", "SpringGreen", "BlueViolet", "Coral", "Teal", "Navy", "LightGoldenRodYellow", "DarkOliveGreen", "Coral", "Red", "DodgerBlue", "LimeGreen", "Gold", "MediumSlateBlue", "Brown", "Olive", "Orange", "DarkGoldenRod", "Salmon", "Fuchsia", "Aqua", "LightSlateGray", "MediumBlue", "GreenYellow", "DarkRed", "DarkMagenta", "Khaki", "MediumSpringGreen", "OrangeRed", "DarkGreen", "LightPink", "DarkSlateBlue", "Yellow", "Turquoise", "SaddleBrown", "Maroon", "Ivory", "SpringGreen", "BlueViolet", "Coral", "Teal", "Navy", "LightGoldenRodYellow", "DarkOliveGreen", "Coral", ]
lines_colors = ['Red', 'DodgerBlue', 'LimeGreen', 'Gold', 'MediumSlateBlue', 'Brown', 'Olive', 'Orange', 'DarkGoldenRod', 'Salmon', 'Fuchsia', 'Aqua', 'LightSlateGray', 'MediumBlue', 'GreenYellow', 'DarkRed', 'DarkMagenta', 'Khaki', 'MediumSpringGreen', 'OrangeRed', 'DarkGreen', 'LightPink', 'DarkSlateBlue', 'Yellow', 'Turquoise', 'SaddleBrown', 'Maroon', 'Ivory', 'SpringGreen', 'BlueViolet', 'Coral', 'Teal', 'Navy', 'LightGoldenRodYellow', 'DarkOliveGreen', 'Coral', 'Red', 'DodgerBlue', 'LimeGreen', 'Gold', 'MediumSlateBlue', 'Brown', 'Olive', 'Orange', 'DarkGoldenRod', 'Salmon', 'Fuchsia', 'Aqua', 'LightSlateGray', 'MediumBlue', 'GreenYellow', 'DarkRed', 'DarkMagenta', 'Khaki', 'MediumSpringGreen', 'OrangeRed', 'DarkGreen', 'LightPink', 'DarkSlateBlue', 'Yellow', 'Turquoise', 'SaddleBrown', 'Maroon', 'Ivory', 'SpringGreen', 'BlueViolet', 'Coral', 'Teal', 'Navy', 'LightGoldenRodYellow', 'DarkOliveGreen', 'Coral', 'Red', 'DodgerBlue', 'LimeGreen', 'Gold', 'MediumSlateBlue', 'Brown', 'Olive', 'Orange', 'DarkGoldenRod', 'Salmon', 'Fuchsia', 'Aqua', 'LightSlateGray', 'MediumBlue', 'GreenYellow', 'DarkRed', 'DarkMagenta', 'Khaki', 'MediumSpringGreen', 'OrangeRed', 'DarkGreen', 'LightPink', 'DarkSlateBlue', 'Yellow', 'Turquoise', 'SaddleBrown', 'Maroon', 'Ivory', 'SpringGreen', 'BlueViolet', 'Coral', 'Teal', 'Navy', 'LightGoldenRodYellow', 'DarkOliveGreen', 'Coral', 'Red', 'DodgerBlue', 'LimeGreen', 'Gold', 'MediumSlateBlue', 'Brown', 'Olive', 'Orange', 'DarkGoldenRod', 'Salmon', 'Fuchsia', 'Aqua', 'LightSlateGray', 'MediumBlue', 'GreenYellow', 'DarkRed', 'DarkMagenta', 'Khaki', 'MediumSpringGreen', 'OrangeRed', 'DarkGreen', 'LightPink', 'DarkSlateBlue', 'Yellow', 'Turquoise', 'SaddleBrown', 'Maroon', 'Ivory', 'SpringGreen', 'BlueViolet', 'Coral', 'Teal', 'Navy', 'LightGoldenRodYellow', 'DarkOliveGreen', 'Coral', 'Red', 'DodgerBlue', 'LimeGreen', 'Gold', 'MediumSlateBlue', 'Brown', 'Olive', 'Orange', 'DarkGoldenRod', 'Salmon', 'Fuchsia', 'Aqua', 'LightSlateGray', 'MediumBlue', 'GreenYellow', 'DarkRed', 'DarkMagenta', 'Khaki', 'MediumSpringGreen', 'OrangeRed', 'DarkGreen', 'LightPink', 'DarkSlateBlue', 'Yellow', 'Turquoise', 'SaddleBrown', 'Maroon', 'Ivory', 'SpringGreen', 'BlueViolet', 'Coral', 'Teal', 'Navy', 'LightGoldenRodYellow', 'DarkOliveGreen', 'Coral']
#main class class Characters: def __init__(self, name="none", lastname="none", age="none", hp="50", title="none", language="none", race="human or unknown", weakness="none" ): # instance variable unique to each instance self.name = name self.lastname = lastname self.age = age self.hp = hp self.title = title self.race = race self.weakness = weakness self.language = language def character_info(self): return f"ID:{self.name} {self.lastname}\n" \ f"age:{self.age}\n" \ f"Hp:{self.hp} \n" \ f"race:{self.race}\n" \ f"title:{self.title}\n" \ f"weakness:{self.weakness}\n" \ f"language:{self.language}\n" \ f"that's all buddy" #These classes are inheritors of the main class. class WarriorPerson(Characters): def __init__(self, name="none", lastname="none", age="none", hp="50", title="none", language="none", race="human or unknown", weakness="none"): super().__init__(name, lastname, age, hp, title, language, race, weakness) self.hp = int(int(self.hp) + 100) class RegularHumanPerson(Characters): def __init__(self, name="none", lastname="none", age="none", hp="50", title="none", language="none", race="human or unknown", weakness="none"): super().__init__(name, lastname, age, hp, title, language, race, weakness) self.hp = int(int(self.hp) - 30) class WitchPerson(Characters): def __init__(self, name="none", lastname="none", age="none", hp="50", title="none", language="none", race="human or unknown", weakness="none"): super().__init__(name, lastname, age, hp, title, language, race, weakness) self.hp = int(int(self.hp) - 120) class VampirePerson(Characters): def __init__(self, name="none", lastname="none", age="none", hp="50", title="none", language="none", race="human or unknown", weakness="none"): super().__init__(name, lastname, age, hp, title, language, race, weakness) self.hp = int(int(self.hp) + 450) regular_human = RegularHumanPerson( name="john", lastname="smith", age="45", title="The man who be normal", language="He knows only English", race="Human", weakness="who knows" ) old_warrior = WarriorPerson( name="Berserker", lastname="", age="345", title="old warrior", language="English and old vikings language", race="Human", weakness="Science" ) old_which = WitchPerson( name="Sarah", lastname="", age="600", title="Girl of beast", language="She knows little bit old english and witch language", race="Human", weakness="Science and light of angel" ) young_Vampire = VampirePerson( name="Deacon", lastname="", age="783", language="She knows little bit old english and new english", race="vampire", weakness="stake" )
class Characters: def __init__(self, name='none', lastname='none', age='none', hp='50', title='none', language='none', race='human or unknown', weakness='none'): self.name = name self.lastname = lastname self.age = age self.hp = hp self.title = title self.race = race self.weakness = weakness self.language = language def character_info(self): return f"ID:{self.name} {self.lastname}\nage:{self.age}\nHp:{self.hp} \nrace:{self.race}\ntitle:{self.title}\nweakness:{self.weakness}\nlanguage:{self.language}\nthat's all buddy" class Warriorperson(Characters): def __init__(self, name='none', lastname='none', age='none', hp='50', title='none', language='none', race='human or unknown', weakness='none'): super().__init__(name, lastname, age, hp, title, language, race, weakness) self.hp = int(int(self.hp) + 100) class Regularhumanperson(Characters): def __init__(self, name='none', lastname='none', age='none', hp='50', title='none', language='none', race='human or unknown', weakness='none'): super().__init__(name, lastname, age, hp, title, language, race, weakness) self.hp = int(int(self.hp) - 30) class Witchperson(Characters): def __init__(self, name='none', lastname='none', age='none', hp='50', title='none', language='none', race='human or unknown', weakness='none'): super().__init__(name, lastname, age, hp, title, language, race, weakness) self.hp = int(int(self.hp) - 120) class Vampireperson(Characters): def __init__(self, name='none', lastname='none', age='none', hp='50', title='none', language='none', race='human or unknown', weakness='none'): super().__init__(name, lastname, age, hp, title, language, race, weakness) self.hp = int(int(self.hp) + 450) regular_human = regular_human_person(name='john', lastname='smith', age='45', title='The man who be normal', language='He knows only English', race='Human', weakness='who knows') old_warrior = warrior_person(name='Berserker', lastname='', age='345', title='old warrior', language='English and old vikings language', race='Human', weakness='Science') old_which = witch_person(name='Sarah', lastname='', age='600', title='Girl of beast', language='She knows little bit old english and witch language', race='Human', weakness='Science and light of angel') young__vampire = vampire_person(name='Deacon', lastname='', age='783', language='She knows little bit old english and new english', race='vampire', weakness='stake')
#!/usr/bin/python3 # -*- coding: utf-8 -*- class SimParameters(object): def __init__(self): self.run_time = 0 self.name = "default" def debug(self): print('SimParameters instance :') print('---------------------------------------------------')
class Simparameters(object): def __init__(self): self.run_time = 0 self.name = 'default' def debug(self): print('SimParameters instance :') print('---------------------------------------------------')
class Digit(object): def __init__(self, representation): self._digit_representation = representation def scale(self, scale_factor=1): if scale_factor == 1: return self scaled_lines = [] for line in self._digit_representation: scaled_lines.append(line[0] + line[1]*scale_factor + line[2]) scaled_digit = [] scaled_digit.append(scaled_lines[0]) for _ in xrange(scale_factor): scaled_digit.append(scaled_lines[1]) scaled_digit.append(scaled_lines[2]) for _ in xrange(scale_factor): scaled_digit.append(scaled_lines[3]) scaled_digit.append(scaled_lines[4]) return Digit(scaled_digit) def get_representation(self): return self._digit_representation class Digits(object): def __init__(self, digit_representations, scale_factor=1): self._digits = [Digit(representation).scale(scale_factor) for _, representation in enumerate(digit_representations)] def get_digit(self, digit): return self._digits[int(digit)] #This is an indexed getter def assemble_numbers(self, numbers): def concat_lists(list1, list2): if list1 is None: return list2 return [a+b for a, b in zip(list1, list2)] new_representation = None for number in str(numbers): digit = self.get_digit(number) new_representation = concat_lists(new_representation, digit.get_representation()) return new_representation def print_numbers(self, numbers, printer): for line in self.assemble_numbers(numbers): printer(line) class DigitReader(object): def __init__(self, resource_directory): self._resource_directory = resource_directory def read_digits(self, scale_factor=1): return Digits([self._read_digit_from_file(number) for number in xrange(10)], scale_factor) def _read_digit_from_file(self, digit): file_name = self._resource_directory + str(digit) + ".txt" with open(file_name) as file_handle: return [line.replace('\n', '') for line in file_handle.readlines()]
class Digit(object): def __init__(self, representation): self._digit_representation = representation def scale(self, scale_factor=1): if scale_factor == 1: return self scaled_lines = [] for line in self._digit_representation: scaled_lines.append(line[0] + line[1] * scale_factor + line[2]) scaled_digit = [] scaled_digit.append(scaled_lines[0]) for _ in xrange(scale_factor): scaled_digit.append(scaled_lines[1]) scaled_digit.append(scaled_lines[2]) for _ in xrange(scale_factor): scaled_digit.append(scaled_lines[3]) scaled_digit.append(scaled_lines[4]) return digit(scaled_digit) def get_representation(self): return self._digit_representation class Digits(object): def __init__(self, digit_representations, scale_factor=1): self._digits = [digit(representation).scale(scale_factor) for (_, representation) in enumerate(digit_representations)] def get_digit(self, digit): return self._digits[int(digit)] def assemble_numbers(self, numbers): def concat_lists(list1, list2): if list1 is None: return list2 return [a + b for (a, b) in zip(list1, list2)] new_representation = None for number in str(numbers): digit = self.get_digit(number) new_representation = concat_lists(new_representation, digit.get_representation()) return new_representation def print_numbers(self, numbers, printer): for line in self.assemble_numbers(numbers): printer(line) class Digitreader(object): def __init__(self, resource_directory): self._resource_directory = resource_directory def read_digits(self, scale_factor=1): return digits([self._read_digit_from_file(number) for number in xrange(10)], scale_factor) def _read_digit_from_file(self, digit): file_name = self._resource_directory + str(digit) + '.txt' with open(file_name) as file_handle: return [line.replace('\n', '') for line in file_handle.readlines()]
def mult(m,n): ans = 0 while n>0: ans+=m n-=1 return ans
def mult(m, n): ans = 0 while n > 0: ans += m n -= 1 return ans
loci = 20000000 #!!! sample = 26 mu = 2e-6 rr = 1.05e-6 Na = 1000 Bt = 67
loci = 20000000 sample = 26 mu = 2e-06 rr = 1.05e-06 na = 1000 bt = 67
# # PySNMP MIB module ELTEX-MES-SMON-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ELTEX-MES-SMON-MIB # Produced by pysmi-0.3.4 at Wed May 1 13:01:55 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueSizeConstraint, SingleValueConstraint, ConstraintsUnion, ConstraintsIntersection, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "SingleValueConstraint", "ConstraintsUnion", "ConstraintsIntersection", "ValueRangeConstraint") dot1dBasePort, = mibBuilder.importSymbols("BRIDGE-MIB", "dot1dBasePort") eltMes, = mibBuilder.importSymbols("ELTEX-MES", "eltMes") VlanId, = mibBuilder.importSymbols("Q-BRIDGE-MIB", "VlanId") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") MibScalar, MibTable, MibTableRow, MibTableColumn, Bits, Counter32, ModuleIdentity, IpAddress, Counter64, Integer32, TimeTicks, ObjectIdentity, NotificationType, Unsigned32, iso, Gauge32, MibIdentifier = mibBuilder.importSymbols("SNMPv2-SMI", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Bits", "Counter32", "ModuleIdentity", "IpAddress", "Counter64", "Integer32", "TimeTicks", "ObjectIdentity", "NotificationType", "Unsigned32", "iso", "Gauge32", "MibIdentifier") DisplayString, TruthValue, TextualConvention, RowStatus = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TruthValue", "TextualConvention", "RowStatus") class EltPortCopyRemoteDirectionType(TextualConvention, Integer32): description = 'copy remote direction type: 1- Rx 2- Tx' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2)) namedValues = NamedValues(("eltPortCopyRemoteRx", 1), ("eltPortCopyRemoteTx", 2)) eltMesSmon = ModuleIdentity((1, 3, 6, 1, 4, 1, 35265, 1, 23, 84)) eltMesSmon.setRevisions(('2016-02-10 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: eltMesSmon.setRevisionsDescriptions(('Initial revision.',)) if mibBuilder.loadTexts: eltMesSmon.setLastUpdated('201602100000Z') if mibBuilder.loadTexts: eltMesSmon.setOrganization('Eltex Enterprise, Ltd.') if mibBuilder.loadTexts: eltMesSmon.setContactInfo('www.eltex.nsk.ru') if mibBuilder.loadTexts: eltMesSmon.setDescription('This private MIB module defines SMON private MIBs.') eltPortCopyRemoteTable = MibTable((1, 3, 6, 1, 4, 1, 35265, 1, 23, 84, 1), ) if mibBuilder.loadTexts: eltPortCopyRemoteTable.setStatus('current') if mibBuilder.loadTexts: eltPortCopyRemoteTable.setDescription('A supplementing table for eltPortCopyRemoteTable.') eltPortCopyRemoteEntry = MibTableRow((1, 3, 6, 1, 4, 1, 35265, 1, 23, 84, 1, 1), ).setIndexNames((0, "ELTEX-MES-SMON-MIB", "eltPortCopyRemoteDirection")) if mibBuilder.loadTexts: eltPortCopyRemoteEntry.setStatus('current') if mibBuilder.loadTexts: eltPortCopyRemoteEntry.setDescription('Each entry specifies vlan tag and user priority added by analyzer to a mirrored Rx/Tx packets.') eltPortCopyRemoteDirection = MibTableColumn((1, 3, 6, 1, 4, 1, 35265, 1, 23, 84, 1, 1, 1), EltPortCopyRemoteDirectionType()) if mibBuilder.loadTexts: eltPortCopyRemoteDirection.setStatus('current') if mibBuilder.loadTexts: eltPortCopyRemoteDirection.setDescription('This field defines a direction') eltPortCopyRemoteVlan = MibTableColumn((1, 3, 6, 1, 4, 1, 35265, 1, 23, 84, 1, 1, 2), VlanId()).setMaxAccess("readwrite") if mibBuilder.loadTexts: eltPortCopyRemoteVlan.setStatus('current') if mibBuilder.loadTexts: eltPortCopyRemoteVlan.setDescription('This field defines an RSPAN VLAN id') eltPortCopyRemotePrio = MibTableColumn((1, 3, 6, 1, 4, 1, 35265, 1, 23, 84, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 7))).setMaxAccess("readwrite") if mibBuilder.loadTexts: eltPortCopyRemotePrio.setStatus('current') if mibBuilder.loadTexts: eltPortCopyRemotePrio.setDescription('This field defines an RSPAN user priority') eltPortCopyRemoteStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 35265, 1, 23, 84, 1, 1, 4), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: eltPortCopyRemoteStatus.setStatus('current') if mibBuilder.loadTexts: eltPortCopyRemoteStatus.setDescription('This field defines a row status') mibBuilder.exportSymbols("ELTEX-MES-SMON-MIB", eltPortCopyRemoteStatus=eltPortCopyRemoteStatus, eltPortCopyRemoteVlan=eltPortCopyRemoteVlan, PYSNMP_MODULE_ID=eltMesSmon, eltPortCopyRemoteDirection=eltPortCopyRemoteDirection, EltPortCopyRemoteDirectionType=EltPortCopyRemoteDirectionType, eltPortCopyRemotePrio=eltPortCopyRemotePrio, eltPortCopyRemoteTable=eltPortCopyRemoteTable, eltPortCopyRemoteEntry=eltPortCopyRemoteEntry, eltMesSmon=eltMesSmon)
(object_identifier, integer, octet_string) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'Integer', 'OctetString') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (value_size_constraint, single_value_constraint, constraints_union, constraints_intersection, value_range_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueSizeConstraint', 'SingleValueConstraint', 'ConstraintsUnion', 'ConstraintsIntersection', 'ValueRangeConstraint') (dot1d_base_port,) = mibBuilder.importSymbols('BRIDGE-MIB', 'dot1dBasePort') (elt_mes,) = mibBuilder.importSymbols('ELTEX-MES', 'eltMes') (vlan_id,) = mibBuilder.importSymbols('Q-BRIDGE-MIB', 'VlanId') (notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance') (mib_scalar, mib_table, mib_table_row, mib_table_column, bits, counter32, module_identity, ip_address, counter64, integer32, time_ticks, object_identity, notification_type, unsigned32, iso, gauge32, mib_identifier) = mibBuilder.importSymbols('SNMPv2-SMI', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Bits', 'Counter32', 'ModuleIdentity', 'IpAddress', 'Counter64', 'Integer32', 'TimeTicks', 'ObjectIdentity', 'NotificationType', 'Unsigned32', 'iso', 'Gauge32', 'MibIdentifier') (display_string, truth_value, textual_convention, row_status) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TruthValue', 'TextualConvention', 'RowStatus') class Eltportcopyremotedirectiontype(TextualConvention, Integer32): description = 'copy remote direction type: 1- Rx 2- Tx' status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2)) named_values = named_values(('eltPortCopyRemoteRx', 1), ('eltPortCopyRemoteTx', 2)) elt_mes_smon = module_identity((1, 3, 6, 1, 4, 1, 35265, 1, 23, 84)) eltMesSmon.setRevisions(('2016-02-10 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: eltMesSmon.setRevisionsDescriptions(('Initial revision.',)) if mibBuilder.loadTexts: eltMesSmon.setLastUpdated('201602100000Z') if mibBuilder.loadTexts: eltMesSmon.setOrganization('Eltex Enterprise, Ltd.') if mibBuilder.loadTexts: eltMesSmon.setContactInfo('www.eltex.nsk.ru') if mibBuilder.loadTexts: eltMesSmon.setDescription('This private MIB module defines SMON private MIBs.') elt_port_copy_remote_table = mib_table((1, 3, 6, 1, 4, 1, 35265, 1, 23, 84, 1)) if mibBuilder.loadTexts: eltPortCopyRemoteTable.setStatus('current') if mibBuilder.loadTexts: eltPortCopyRemoteTable.setDescription('A supplementing table for eltPortCopyRemoteTable.') elt_port_copy_remote_entry = mib_table_row((1, 3, 6, 1, 4, 1, 35265, 1, 23, 84, 1, 1)).setIndexNames((0, 'ELTEX-MES-SMON-MIB', 'eltPortCopyRemoteDirection')) if mibBuilder.loadTexts: eltPortCopyRemoteEntry.setStatus('current') if mibBuilder.loadTexts: eltPortCopyRemoteEntry.setDescription('Each entry specifies vlan tag and user priority added by analyzer to a mirrored Rx/Tx packets.') elt_port_copy_remote_direction = mib_table_column((1, 3, 6, 1, 4, 1, 35265, 1, 23, 84, 1, 1, 1), elt_port_copy_remote_direction_type()) if mibBuilder.loadTexts: eltPortCopyRemoteDirection.setStatus('current') if mibBuilder.loadTexts: eltPortCopyRemoteDirection.setDescription('This field defines a direction') elt_port_copy_remote_vlan = mib_table_column((1, 3, 6, 1, 4, 1, 35265, 1, 23, 84, 1, 1, 2), vlan_id()).setMaxAccess('readwrite') if mibBuilder.loadTexts: eltPortCopyRemoteVlan.setStatus('current') if mibBuilder.loadTexts: eltPortCopyRemoteVlan.setDescription('This field defines an RSPAN VLAN id') elt_port_copy_remote_prio = mib_table_column((1, 3, 6, 1, 4, 1, 35265, 1, 23, 84, 1, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 7))).setMaxAccess('readwrite') if mibBuilder.loadTexts: eltPortCopyRemotePrio.setStatus('current') if mibBuilder.loadTexts: eltPortCopyRemotePrio.setDescription('This field defines an RSPAN user priority') elt_port_copy_remote_status = mib_table_column((1, 3, 6, 1, 4, 1, 35265, 1, 23, 84, 1, 1, 4), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: eltPortCopyRemoteStatus.setStatus('current') if mibBuilder.loadTexts: eltPortCopyRemoteStatus.setDescription('This field defines a row status') mibBuilder.exportSymbols('ELTEX-MES-SMON-MIB', eltPortCopyRemoteStatus=eltPortCopyRemoteStatus, eltPortCopyRemoteVlan=eltPortCopyRemoteVlan, PYSNMP_MODULE_ID=eltMesSmon, eltPortCopyRemoteDirection=eltPortCopyRemoteDirection, EltPortCopyRemoteDirectionType=EltPortCopyRemoteDirectionType, eltPortCopyRemotePrio=eltPortCopyRemotePrio, eltPortCopyRemoteTable=eltPortCopyRemoteTable, eltPortCopyRemoteEntry=eltPortCopyRemoteEntry, eltMesSmon=eltMesSmon)
try: number=float(input("Enter a number between 0.0 and 1.0: ")) if number < 0 or number > 1: print("Bad score!") elif number >= 0.9: print("A") elif number >= 0.8: print("B") elif number >= 0.7: print("C") elif number >= 0.6: print("D") else: print("F") except: print("Bad score!")
try: number = float(input('Enter a number between 0.0 and 1.0: ')) if number < 0 or number > 1: print('Bad score!') elif number >= 0.9: print('A') elif number >= 0.8: print('B') elif number >= 0.7: print('C') elif number >= 0.6: print('D') else: print('F') except: print('Bad score!')
""" class BinaryTreeNode(object): def __init__(self, value): self.value = value self.left = None self.right = None def insert_left(self, value): self.left = BinaryTreeNode(value) return self.left def insert_right(self, value): self.right = BinaryTreeNode(value) return self.right """ def find_largest(root_node): # set the current_node to the root_node current_node = root_node # while there is a current_node while current_node: # if current_node does not have a right child node if current_node.right is None: # return current_node's value return current_node.value # set current_node to current_node's right child node current_node = current_node.right def find_second_largest(root_node): # Perform a biased DFT # keep going down to the right child node until # there is no right child node anymore # at that point return the last node parent node if there is no left child # if there is a left child, the second maximum will be # the largest value from the left subtree # alternatively, if the root_node only has a left subtree # the second largest will be the largest value from the # left subtree # if the root_node is empty or does not have any child nodes if (root_node.value is None) or (root_node.right is None and root_node.left is None): # raise exception raise ValueError("Root node cannot be empty or be a single node") # if there is a left subtree without a right if root_node.left and root_node.right is None: # return the largest value from the left subtree return find_largest(root_node.left) # initialize the current_node to the root_node current_node = root_node # initialize the previous_node to None previous_node = None # loop while current_node while current_node: # if the current_node does not have a right child node if current_node.right is None: # if current_node has a left child node if current_node.left is not None: # return the largest value from the left subtree return find_largest(current_node.left) # return the current_node's value return previous_node.value # set the previous_node to the current_node previous_node = current_node # set current_node to the current_node's right child node current_node = current_node.right
""" class BinaryTreeNode(object): def __init__(self, value): self.value = value self.left = None self.right = None def insert_left(self, value): self.left = BinaryTreeNode(value) return self.left def insert_right(self, value): self.right = BinaryTreeNode(value) return self.right """ def find_largest(root_node): current_node = root_node while current_node: if current_node.right is None: return current_node.value current_node = current_node.right def find_second_largest(root_node): if root_node.value is None or (root_node.right is None and root_node.left is None): raise value_error('Root node cannot be empty or be a single node') if root_node.left and root_node.right is None: return find_largest(root_node.left) current_node = root_node previous_node = None while current_node: if current_node.right is None: if current_node.left is not None: return find_largest(current_node.left) return previous_node.value previous_node = current_node current_node = current_node.right
# Any or All # Problem Link: https://www.hackerrank.com/challenges/any-or-all/problem _ = int(input()) l = input().split() print(all([int(i) > 0 for i in l]) and any([j == j[::-1] for j in l]))
_ = int(input()) l = input().split() print(all([int(i) > 0 for i in l]) and any([j == j[::-1] for j in l]))
print(2 not in [1,2,3]) print(2 not in [4,5]) print(1 not in [1] not in [[1]]) print(3 not in [1] not in [[1]])
print(2 not in [1, 2, 3]) print(2 not in [4, 5]) print(1 not in [1] not in [[1]]) print(3 not in [1] not in [[1]])
def sum_of_numbers_in_an_integer(num): answer = 0 while num > 0: last_num = num % 10 num = num // 10 answer += last_num print(answer) def main(): num = int(input("Enter a number: " )) sum_of_numbers_in_an_integer(num) main()
def sum_of_numbers_in_an_integer(num): answer = 0 while num > 0: last_num = num % 10 num = num // 10 answer += last_num print(answer) def main(): num = int(input('Enter a number: ')) sum_of_numbers_in_an_integer(num) main()
''' Created on 2017. 4. 12. @author: Byoungho Kang ''' class Calculator: def __init__(self, first, second): self.first = first self.second = second def plus(self): return self.first + self.second def minus(self): return self.first - self.second def multiply(self): return self.first * self.second def divide(self): return self.first / self.second c = Calculator(3, 4) print(c.plus(), c.minus(), c.multiply(), c.divide())
""" Created on 2017. 4. 12. @author: Byoungho Kang """ class Calculator: def __init__(self, first, second): self.first = first self.second = second def plus(self): return self.first + self.second def minus(self): return self.first - self.second def multiply(self): return self.first * self.second def divide(self): return self.first / self.second c = calculator(3, 4) print(c.plus(), c.minus(), c.multiply(), c.divide())
#Questao 9 fila = [] print("Fila: ", fila) fila.append("Tarefa E") print("Inserindo um elemento no final da fila: ", fila) fila.append("Tarefa I") print("Inserindo outro elemento no final da fila: ", fila) fila.append("Tarefa C") print("Inserindo outro elemento no final da fila: ", fila) fila.append("Tarefa F") print("Inserindo outro elemento no final da fila: ", fila) fila.append("Tarefa B") print("Inserindo outro elemento no final da fila: ", fila) fila.append("Tarefa H") print("Inserindo outro elemento no final da fila: ", fila) fila.append("Tarefa J") print("Inserindo outro elemento no final da fila: ", fila) fila.append("Tarefa A") print("Inserindo outro elemento no final da fila: ", fila) fila.append("Tarefa D") print("Inserindo outro elemento no final da fila: ", fila) fila.append("Tarefa G") print("Inserindo outro elemento no final da fila: ", fila)
fila = [] print('Fila: ', fila) fila.append('Tarefa E') print('Inserindo um elemento no final da fila: ', fila) fila.append('Tarefa I') print('Inserindo outro elemento no final da fila: ', fila) fila.append('Tarefa C') print('Inserindo outro elemento no final da fila: ', fila) fila.append('Tarefa F') print('Inserindo outro elemento no final da fila: ', fila) fila.append('Tarefa B') print('Inserindo outro elemento no final da fila: ', fila) fila.append('Tarefa H') print('Inserindo outro elemento no final da fila: ', fila) fila.append('Tarefa J') print('Inserindo outro elemento no final da fila: ', fila) fila.append('Tarefa A') print('Inserindo outro elemento no final da fila: ', fila) fila.append('Tarefa D') print('Inserindo outro elemento no final da fila: ', fila) fila.append('Tarefa G') print('Inserindo outro elemento no final da fila: ', fila)
def hello(verb, path, query): return "Server received your " + verb + " request" + str(query) + "\r\n" def register(urlMapper): urlMapper["/hello"] = hello
def hello(verb, path, query): return 'Server received your ' + verb + ' request' + str(query) + '\r\n' def register(urlMapper): urlMapper['/hello'] = hello
""" Copyright (c) Facebook, Inc. and its affiliates. """ BEFORE = """ <!-- Bootstrap v3.0.3 --> <link href="https://s3.amazonaws.com/mturk-public/bs30/css/bootstrap.min.css" rel="stylesheet" /> <section class="container" id="Other" style="margin-bottom:15px; padding: 10px 10px; font-family: Verdana, Geneva, sans-serif; color:#333333; font-size:0.9em;"> <div class="row col-xs-12 col-md-12"><!-- Instructions --> <div class="panel panel-primary"> <div class="panel-heading"><strong>Instructions</strong></div> <div class="panel-body" style="font-size:14px;"> <h1><strong>Split a composite command into individual commands.</strong></h1> <p>Please help us split a command into individual single commands. The command shown to you here is given to an AI assistant. You will be shown a command that possibly has a sequence or list of single commands and your task is to give us multiple single complete actions that are intended by the command shown to you.</p> &nbsp; <p><b>When splitting the commands, please only use the exact words shown in the original command.</b></p> <p>Few valid examples below:</p> <p>For <b>&quot;build a castle and then come back here&quot;</b> the answer is the following:</p> <ul> <li>&quot;build a castle&quot; and</li> <li>&quot;come back here&quot;</li> </ul> <p>&nbsp;</p> <p>For <b>&quot;destroy the roof and build a stone ceiling in its place&quot;</b> the answer is the following:</p> <ul> <li>&quot;destroy the roof&quot; and</li> <li>&quot;build a stone ceiling in its place&quot;</li> </ul> <p>&nbsp;</p> <p>For <b>&quot;move to the door and open it&quot;</b> the answer is the following:</p> <ul> <li>&quot;move to the door&quot; and</li> <li>&quot;open it&quot;</li> </ul> <p>&nbsp;</p> <p>For <b>&quot;i want you to undo the last two spawns and try again with new spawns&quot; </b></p> <ul> <li>&quot;i want you to undo the last two spawns&quot; and</li> <li>&quot;try again with new spawns&quot;</li> </ul> <p>&nbsp;</p> <p>For <b>&quot;can you turn around and start moving to the left&quot; </b></p> <ul> <li>&quot;can you turn around&quot; and</li> <li>&quot;start moving to the left&quot;</li> </ul> <p>&nbsp;</p> <p>Note that:<br /> <b>1. Some commands might have more than two splits. We&#39;ve given you three more optional boxes.</b><br /> <b>2. Make sure that the commands you enter in text boxes are single and complete sentences using the exact words written in the original command.</b><br /> <b>3. Please copy and use the exact words shown in the original commands. Do not rephrase the sentences.</b></p> </div> </div> <div class="well" style="position:sticky;position:-webkit-sticky;top:0;z-index:9999"> <h2><strong>Command:</strong> <b id="sentence"></b></h2> </div> <!-- Content Body --> <section> """ BETWEEN = """ <section> <fieldset> <div class="input-group"><span style="font-family: verdana, geneva, sans-serif;font-size: 18px;">The individual commands.&nbsp;</span> <p>Command 1<textarea class="form-control" cols="150" name="command_1" rows="2"></textarea></p> <p>Command 2<textarea class="form-control" cols="150" name="command_2" rows="2"></textarea></p> <p>Command 3 (optional)<textarea class="form-control" cols="150" name="command_3" rows="2"></textarea></p> <p>Command 4 (optional)<textarea class="form-control" cols="150" name="command_4" rows="2"></textarea></p> <p>Command 5 (optional)<textarea class="form-control" cols="150" name="command_5" rows="2"></textarea></p> </div> </fieldset> """ AFTER = """ </section> <!-- End Content Body --> </div> </section> <style type="text/css">fieldset { padding: 10px; background:#fbfbfb; border-radius:5px; margin-bottom:5px; } </style> <script src="https://code.jquery.com/jquery.js"></script> <script src="https://netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></script> """ if __name__ == "__main__": # XML: yes, gross, I know. but Turk requires XML for its API, so we deal print( """ <HTMLQuestion xmlns="http://mechanicalturk.amazonaws.com/AWSMechanicalTurkDataSchemas/2011-11-11/HTMLQuestion.xsd"> <HTMLContent><![CDATA[ """ ) print(BEFORE) print( """ <script type='text/javascript' src='https://s3.amazonaws.com/mturk-public/externalHIT_v1.js'></script> <form name='mturk_form' method='post' id='mturk_form' action='https://workersandbox.mturk.com/mturk/externalSubmit'><input type='hidden' value='' name='assignmentId' id='assignmentId'/> """ ) print(BETWEEN) print( """ <p><input type='submit' id='submitButton' value='Submit' /></p></form> <script language='Javascript'> turkSetAssignmentID(); const queryString = window.location.search; console.log(queryString); let urlParams = new URLSearchParams(queryString); const sentence = urlParams.get('sentence'); document.getElementById("sentence").innerHTML=sentence; </script> """ ) print(AFTER) print( """ ]]> </HTMLContent> <FrameHeight>600</FrameHeight> </HTMLQuestion> """ )
""" Copyright (c) Facebook, Inc. and its affiliates. """ before = '\n<!-- Bootstrap v3.0.3 -->\n<link href="https://s3.amazonaws.com/mturk-public/bs30/css/bootstrap.min.css" rel="stylesheet" />\n<section class="container" id="Other" style="margin-bottom:15px; padding: 10px 10px;\n font-family: Verdana, Geneva, sans-serif; color:#333333; font-size:0.9em;">\n<div class="row col-xs-12 col-md-12"><!-- Instructions -->\n<div class="panel panel-primary">\n<div class="panel-heading"><strong>Instructions</strong></div>\n\n<div class="panel-body" style="font-size:14px;">\n<h1><strong>Split a composite command into individual commands.</strong></h1>\n\n<p>Please help us split a command into individual single commands. The command shown to you here is given to an AI assistant. \nYou will be shown a command that possibly has a sequence or list of single commands and your task is to give us multiple single \ncomplete actions that are intended by the command shown to you.</p>\n&nbsp;\n\n<p><b>When splitting the commands, please only use the exact words shown in the original command.</b></p>\n<p>Few valid examples below:</p>\n\n<p>For <b>&quot;build a castle and then come back here&quot;</b> the answer is the following:</p>\n\n<ul>\n\t<li>&quot;build a castle&quot; and</li>\n\t<li>&quot;come back here&quot;</li>\n</ul>\n\n<p>&nbsp;</p>\n\n<p>For <b>&quot;destroy the roof and build a stone ceiling in its place&quot;</b> the answer is the following:</p>\n\n<ul>\n\t<li>&quot;destroy the roof&quot; and</li>\n\t<li>&quot;build a stone ceiling in its place&quot;</li>\n</ul>\n\n<p>&nbsp;</p>\n\n<p>For <b>&quot;move to the door and open it&quot;</b> the answer is the following:</p>\n\n<ul>\n\t<li>&quot;move to the door&quot; and</li>\n\t<li>&quot;open it&quot;</li>\n</ul>\n\n<p>&nbsp;</p>\n\n<p>For <b>&quot;i want you to undo the last two spawns and try again with new spawns&quot; </b></p>\n\n<ul>\n\t<li>&quot;i want you to undo the last two spawns&quot; and</li>\n\t<li>&quot;try again with new spawns&quot;</li>\n</ul>\n\n<p>&nbsp;</p>\n\n<p>For <b>&quot;can you turn around and start moving to the left&quot; </b></p>\n\n<ul>\n\t<li>&quot;can you turn around&quot; and</li>\n\t<li>&quot;start moving to the left&quot;</li>\n</ul>\n\n<p>&nbsp;</p>\n\n<p>Note that:<br />\n<b>1. Some commands might have more than two splits. We&#39;ve given you three more optional boxes.</b><br />\n<b>2. Make sure that the commands you enter in text boxes are single and complete sentences using the exact words written in the original command.</b><br />\n<b>3. Please copy and use the exact words shown in the original commands. Do not rephrase the sentences.</b></p>\n</div>\n</div>\n<div class="well" style="position:sticky;position:-webkit-sticky;top:0;z-index:9999">\n\n<h2><strong>Command:</strong> <b id="sentence"></b></h2> \n</div>\n<!-- Content Body -->\n\n<section>\n' between = '\n<section>\n<fieldset>\n<div class="input-group"><span style="font-family: verdana, geneva, sans-serif;font-size: 18px;">The individual commands.&nbsp;</span>\n\n<p>Command 1<textarea class="form-control" cols="150" name="command_1" rows="2"></textarea></p>\n\n<p>Command 2<textarea class="form-control" cols="150" name="command_2" rows="2"></textarea></p>\n\n<p>Command 3 (optional)<textarea class="form-control" cols="150" name="command_3" rows="2"></textarea></p>\n\n<p>Command 4 (optional)<textarea class="form-control" cols="150" name="command_4" rows="2"></textarea></p>\n\n<p>Command 5 (optional)<textarea class="form-control" cols="150" name="command_5" rows="2"></textarea></p>\n\n</div>\n</fieldset>\n' after = '\n </section>\n <!-- End Content Body -->\n\n </div>\n</section>\n\n<style type="text/css">fieldset { padding: 10px; background:#fbfbfb; border-radius:5px; margin-bottom:5px; }\n</style>\n<script src="https://code.jquery.com/jquery.js"></script>\n<script src="https://netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>\n\n' if __name__ == '__main__': print('\n <HTMLQuestion xmlns="http://mechanicalturk.amazonaws.com/AWSMechanicalTurkDataSchemas/2011-11-11/HTMLQuestion.xsd">\n <HTMLContent><![CDATA[\n ') print(BEFORE) print("\n <script type='text/javascript' src='https://s3.amazonaws.com/mturk-public/externalHIT_v1.js'></script>\n <form name='mturk_form' method='post' id='mturk_form' action='https://workersandbox.mturk.com/mturk/externalSubmit'><input type='hidden' value='' name='assignmentId' id='assignmentId'/>\n ") print(BETWEEN) print('\n <p><input type=\'submit\' id=\'submitButton\' value=\'Submit\' /></p></form>\n <script language=\'Javascript\'>\n turkSetAssignmentID();\n const queryString = window.location.search;\n console.log(queryString);\n let urlParams = new URLSearchParams(queryString);\n const sentence = urlParams.get(\'sentence\');\n document.getElementById("sentence").innerHTML=sentence;\n </script>\n ') print(AFTER) print('\n ]]>\n </HTMLContent>\n <FrameHeight>600</FrameHeight>\n </HTMLQuestion>\n ')
class Logger(object): """ La classe modellizza un logger, per generare un file di testo di output """ def __init__(self, fp): self.fp = open(fp, 'w') def log(self, msg): self.fp.write(msg + '\n') def close(self): self.fp.close()
class Logger(object): """ La classe modellizza un logger, per generare un file di testo di output """ def __init__(self, fp): self.fp = open(fp, 'w') def log(self, msg): self.fp.write(msg + '\n') def close(self): self.fp.close()
#!/usr/bin/python # -*- coding: utf-8 -*- # cython: language_level=2, boundscheck=False class NoValidVersion(Exception): pass class VersionZero(Exception): pass class ExceededPaddingVersion(Exception): pass class NoVersionNumber(Exception): pass
class Novalidversion(Exception): pass class Versionzero(Exception): pass class Exceededpaddingversion(Exception): pass class Noversionnumber(Exception): pass
""" Various container utilities """ def get_from_dict(d, path): """ Extract a value pointed by ``path`` from a nested dict. Example: >>> d = { ... "path": { ... "to": { ... "item": "value" ... } ... } ... } >>> get_from_dict(d, "/path/to/item") 'value' """ components = [c for c in path.split("/") if c] if not len(components): raise ValueError("empty path") try: c = d[components.pop(0)] while components: c = c[components.pop(0)] except KeyError: raise ValueError("invalid path: %s" % path) return c
""" Various container utilities """ def get_from_dict(d, path): """ Extract a value pointed by ``path`` from a nested dict. Example: >>> d = { ... "path": { ... "to": { ... "item": "value" ... } ... } ... } >>> get_from_dict(d, "/path/to/item") 'value' """ components = [c for c in path.split('/') if c] if not len(components): raise value_error('empty path') try: c = d[components.pop(0)] while components: c = c[components.pop(0)] except KeyError: raise value_error('invalid path: %s' % path) return c
name = input("[>] Enter name: ") email = input("[>] Enter email: ") if "@" not in name and "@" in email: print("[+] OK") elif "@" not in name and "@" not in email: print("[-] Incorrect email") elif "@" in name and "@" in email: print("[-] Incorrect login") elif "@" in name and "@" not in email: print("[-] Incorrect data")
name = input('[>] Enter name: ') email = input('[>] Enter email: ') if '@' not in name and '@' in email: print('[+] OK') elif '@' not in name and '@' not in email: print('[-] Incorrect email') elif '@' in name and '@' in email: print('[-] Incorrect login') elif '@' in name and '@' not in email: print('[-] Incorrect data')
# # PySNMP MIB module CISCO-ROUTE-POLICIES-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-ROUTE-POLICIES-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 17:54:14 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") ValueRangeConstraint, ValueSizeConstraint, SingleValueConstraint, ConstraintsUnion, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ValueSizeConstraint", "SingleValueConstraint", "ConstraintsUnion", "ConstraintsIntersection") ciscoMgmt, = mibBuilder.importSymbols("CISCO-SMI", "ciscoMgmt") ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup") Bits, MibScalar, MibTable, MibTableRow, MibTableColumn, Gauge32, ModuleIdentity, MibIdentifier, TimeTicks, Integer32, Unsigned32, Counter64, ObjectIdentity, NotificationType, iso, Counter32, IpAddress = mibBuilder.importSymbols("SNMPv2-SMI", "Bits", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Gauge32", "ModuleIdentity", "MibIdentifier", "TimeTicks", "Integer32", "Unsigned32", "Counter64", "ObjectIdentity", "NotificationType", "iso", "Counter32", "IpAddress") DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") ciscoRoutePoliciesMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 9, 9, 578)) ciscoRoutePoliciesMIB.setRevisions(('2006-08-18 00:00',)) if mibBuilder.loadTexts: ciscoRoutePoliciesMIB.setLastUpdated('200608180000Z') if mibBuilder.loadTexts: ciscoRoutePoliciesMIB.setOrganization('Cisco Systems, Inc. ') ciscoRoutePoliciesMIBNotifs = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 578, 0)) ciscoRoutePoliciesMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 578, 1)) ciscoRoutePoliciesMIBConform = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 578, 2)) crpPolicies = ObjectIdentity((1, 3, 6, 1, 4, 1, 9, 9, 578, 1, 1)) if mibBuilder.loadTexts: crpPolicies.setStatus('current') crpPolicyIfIndex = ObjectIdentity((1, 3, 6, 1, 4, 1, 9, 9, 578, 1, 1, 1)) if mibBuilder.loadTexts: crpPolicyIfIndex.setStatus('current') mibBuilder.exportSymbols("CISCO-ROUTE-POLICIES-MIB", ciscoRoutePoliciesMIB=ciscoRoutePoliciesMIB, ciscoRoutePoliciesMIBObjects=ciscoRoutePoliciesMIBObjects, PYSNMP_MODULE_ID=ciscoRoutePoliciesMIB, crpPolicyIfIndex=crpPolicyIfIndex, ciscoRoutePoliciesMIBConform=ciscoRoutePoliciesMIBConform, crpPolicies=crpPolicies, ciscoRoutePoliciesMIBNotifs=ciscoRoutePoliciesMIBNotifs)
(object_identifier, integer, octet_string) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'Integer', 'OctetString') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (value_range_constraint, value_size_constraint, single_value_constraint, constraints_union, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'ValueSizeConstraint', 'SingleValueConstraint', 'ConstraintsUnion', 'ConstraintsIntersection') (cisco_mgmt,) = mibBuilder.importSymbols('CISCO-SMI', 'ciscoMgmt') (module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup') (bits, mib_scalar, mib_table, mib_table_row, mib_table_column, gauge32, module_identity, mib_identifier, time_ticks, integer32, unsigned32, counter64, object_identity, notification_type, iso, counter32, ip_address) = mibBuilder.importSymbols('SNMPv2-SMI', 'Bits', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Gauge32', 'ModuleIdentity', 'MibIdentifier', 'TimeTicks', 'Integer32', 'Unsigned32', 'Counter64', 'ObjectIdentity', 'NotificationType', 'iso', 'Counter32', 'IpAddress') (display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention') cisco_route_policies_mib = module_identity((1, 3, 6, 1, 4, 1, 9, 9, 578)) ciscoRoutePoliciesMIB.setRevisions(('2006-08-18 00:00',)) if mibBuilder.loadTexts: ciscoRoutePoliciesMIB.setLastUpdated('200608180000Z') if mibBuilder.loadTexts: ciscoRoutePoliciesMIB.setOrganization('Cisco Systems, Inc. ') cisco_route_policies_mib_notifs = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 578, 0)) cisco_route_policies_mib_objects = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 578, 1)) cisco_route_policies_mib_conform = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 578, 2)) crp_policies = object_identity((1, 3, 6, 1, 4, 1, 9, 9, 578, 1, 1)) if mibBuilder.loadTexts: crpPolicies.setStatus('current') crp_policy_if_index = object_identity((1, 3, 6, 1, 4, 1, 9, 9, 578, 1, 1, 1)) if mibBuilder.loadTexts: crpPolicyIfIndex.setStatus('current') mibBuilder.exportSymbols('CISCO-ROUTE-POLICIES-MIB', ciscoRoutePoliciesMIB=ciscoRoutePoliciesMIB, ciscoRoutePoliciesMIBObjects=ciscoRoutePoliciesMIBObjects, PYSNMP_MODULE_ID=ciscoRoutePoliciesMIB, crpPolicyIfIndex=crpPolicyIfIndex, ciscoRoutePoliciesMIBConform=ciscoRoutePoliciesMIBConform, crpPolicies=crpPolicies, ciscoRoutePoliciesMIBNotifs=ciscoRoutePoliciesMIBNotifs)
# Copyright 2018-2020 Stanislav Pidhorskyi # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== def find_maximum(f, min_x, max_x, epsilon=1e-5): def binary_search(l, r, fl, fr, epsilon): mid = l + (r - l) / 2 fm = f(mid) binary_search.eval_count += 1 if (fm == fl and fm == fr) or r - l < epsilon: return mid, fm if fl > fm >= fr: return binary_search(l, mid, fl, fm, epsilon) if fl <= fm < fr: return binary_search(mid, r, fm, fr, epsilon) p1, f1 = binary_search(l, mid, fl, fm, epsilon) p2, f2 = binary_search(mid, r, fm, fr, epsilon) if f1 > f2: return p1, f1 else: return p2, f2 binary_search.eval_count = 0 best_th, best_value = binary_search(min_x, max_x, f(min_x), f(max_x), epsilon) # print("Found maximum %f at x = %f in %d evaluations" % (best_value, best_th, binary_search.eval_count)) return best_th, best_value
def find_maximum(f, min_x, max_x, epsilon=1e-05): def binary_search(l, r, fl, fr, epsilon): mid = l + (r - l) / 2 fm = f(mid) binary_search.eval_count += 1 if fm == fl and fm == fr or r - l < epsilon: return (mid, fm) if fl > fm >= fr: return binary_search(l, mid, fl, fm, epsilon) if fl <= fm < fr: return binary_search(mid, r, fm, fr, epsilon) (p1, f1) = binary_search(l, mid, fl, fm, epsilon) (p2, f2) = binary_search(mid, r, fm, fr, epsilon) if f1 > f2: return (p1, f1) else: return (p2, f2) binary_search.eval_count = 0 (best_th, best_value) = binary_search(min_x, max_x, f(min_x), f(max_x), epsilon) return (best_th, best_value)
class GPIOBus(object): """ This is a helper class for when your pins don't line up with ports. """ def __init__(self, pins): self.pins = pins self.width = len(pins) self.max = pow(2, len(pins)) - 1 def write(self, value): if value > self.max: raise AttributeError('{} pins is not enough to represent {}'.format(len(self.pins), value)) for i in range(0, len(self.pins)): self.pins[i].write(value & (1 << i) > 0) def read(self): result = 0 for i in range(0, len(self.pins)): result <<= 1 result |= self.pins[i].read() return result
class Gpiobus(object): """ This is a helper class for when your pins don't line up with ports. """ def __init__(self, pins): self.pins = pins self.width = len(pins) self.max = pow(2, len(pins)) - 1 def write(self, value): if value > self.max: raise attribute_error('{} pins is not enough to represent {}'.format(len(self.pins), value)) for i in range(0, len(self.pins)): self.pins[i].write(value & 1 << i > 0) def read(self): result = 0 for i in range(0, len(self.pins)): result <<= 1 result |= self.pins[i].read() return result
#!/usr/bin/env python3 ''' homework/data_structure/1_17_k_fib.py count the $(m)th $(k)-Fibonacci number with time complexity of O(n) ''' class FibCache: ''' Acts like heap? Make sure you DON'T re-use the instance! ''' def __init__(self, k): ''' initialize FibCache instance ''' self._max_size = k # pop size self._cursor = 0 # get order self._cache = [] # actual cache # allocate cache space for _ in range(k-1): self._cache.append(0) self._cache.append(1) def _reset(self): ''' init _cache to all 0s NOTE: FibCache can be reused ''' # reset cache for i in range(self._max_size-1): self._cache[i] = 0 self._cache[-1] = 1 # reset cursor self._cursor = 0 def append(self, val): ''' append to LOGICAL tail of cache depricate useless fibonacci value automatically ''' self._cache[self._cursor % self._max_size] = val self._cursor += 1 def _reduce_sum(self): ''' a fancier way of saying - SUM from fib_k(n-1) to fib_k(n-k) ''' return sum(self._cache) def run(self, tgt): ''' starts the calculation session, gives you the result ''' if self._cursor: self._reset() # if not first run -> clean-up if tgt < self._max_size-1: return 0 if tgt == self._max_size-1: return 1 for _ in range(self._max_size, tgt): self.append(self._reduce_sum()) return self._reduce_sum() # the moment of TRUTH! if __name__ == '__main__': k = int(input('k = ')) m = int(input('m = ')) print(FibCache(k).run(m))
""" homework/data_structure/1_17_k_fib.py count the $(m)th $(k)-Fibonacci number with time complexity of O(n) """ class Fibcache: """ Acts like heap? Make sure you DON'T re-use the instance! """ def __init__(self, k): """ initialize FibCache instance """ self._max_size = k self._cursor = 0 self._cache = [] for _ in range(k - 1): self._cache.append(0) self._cache.append(1) def _reset(self): """ init _cache to all 0s NOTE: FibCache can be reused """ for i in range(self._max_size - 1): self._cache[i] = 0 self._cache[-1] = 1 self._cursor = 0 def append(self, val): """ append to LOGICAL tail of cache depricate useless fibonacci value automatically """ self._cache[self._cursor % self._max_size] = val self._cursor += 1 def _reduce_sum(self): """ a fancier way of saying - SUM from fib_k(n-1) to fib_k(n-k) """ return sum(self._cache) def run(self, tgt): """ starts the calculation session, gives you the result """ if self._cursor: self._reset() if tgt < self._max_size - 1: return 0 if tgt == self._max_size - 1: return 1 for _ in range(self._max_size, tgt): self.append(self._reduce_sum()) return self._reduce_sum() if __name__ == '__main__': k = int(input('k = ')) m = int(input('m = ')) print(fib_cache(k).run(m))
numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] for number in numbers: # Lewatkan loop untuk angka yang dapat di bagi 3 if number % 3 == 0: continue print(number)
numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] for number in numbers: if number % 3 == 0: continue print(number)
# Conner Skoumal # Matchmaker Lite print("") print("Matchmaker 2021") print("") print("[[Your instruction here.]]") print("") userResponse1 = int(input("Ironclad Robotics rocks!")) desiredResponse1 = 5 compatibility1 = 5 - abs(userResponse1 - desiredResponse1) print("Question 1 Compatibility: " + str(compatibility1)) print("") userResponse2 = int(input("Sports are the best!")) desiredResponse2 = 1 compatibility2 = 5 - abs(userResponse2 - desiredResponse2) print("Question 2 Compatibility: " + str(compatibility2)) print("") totalCompatibility = (compatibility1 + compatibility2) * 10 print("Total Compatability: " + str(totalCompatibility)) print("")
print('') print('Matchmaker 2021') print('') print('[[Your instruction here.]]') print('') user_response1 = int(input('Ironclad Robotics rocks!')) desired_response1 = 5 compatibility1 = 5 - abs(userResponse1 - desiredResponse1) print('Question 1 Compatibility: ' + str(compatibility1)) print('') user_response2 = int(input('Sports are the best!')) desired_response2 = 1 compatibility2 = 5 - abs(userResponse2 - desiredResponse2) print('Question 2 Compatibility: ' + str(compatibility2)) print('') total_compatibility = (compatibility1 + compatibility2) * 10 print('Total Compatability: ' + str(totalCompatibility)) print('')
def main(): print("Please enter a sentence: ") user_sentence = input() str_for_checking = prepare_str_for_palindrome_checking(user_sentence) res = is_palindrome(str_for_checking) if(res == True): print("Your sentence is a palindrome") else: print(("Your sentence is not a palindrome")) def prepare_str_for_palindrome_checking(s): only_letters_str = keep_only_letters(s) return only_letters_str.lower() def keep_only_letters(s): res_str = '' for char in s: if char.isalpha() == True: res_str = res_str + char return res_str def is_palindrome(s): rev_s = reverse_str(s) if(s == rev_s): return True else: return False def reverse_str(s): res_str = '' for char in s: res_str = char + res_str return res_str main()
def main(): print('Please enter a sentence: ') user_sentence = input() str_for_checking = prepare_str_for_palindrome_checking(user_sentence) res = is_palindrome(str_for_checking) if res == True: print('Your sentence is a palindrome') else: print('Your sentence is not a palindrome') def prepare_str_for_palindrome_checking(s): only_letters_str = keep_only_letters(s) return only_letters_str.lower() def keep_only_letters(s): res_str = '' for char in s: if char.isalpha() == True: res_str = res_str + char return res_str def is_palindrome(s): rev_s = reverse_str(s) if s == rev_s: return True else: return False def reverse_str(s): res_str = '' for char in s: res_str = char + res_str return res_str main()
#kpbochenek@gmail.com def swap_sort(array): array = list(array[:]) result = [] for i in range(1, len(array)): j = i-1 k = i while j >= 0 and array[j] > array[k]: array[k], array[j] = array[j], array[k] result.append("%d%d" % (j, k)) j -= 1 k -= 1 return ",".join(result) if __name__ == '__main__': # These "asserts" using only for self-checking and not necessary for auto-testing def check_solution(f, indata): result = f(indata) array = list(indata[:]) la = len(array) if not isinstance(result, str): print("The result should be a string") return False actions = result.split(",") if result else [] for act in actions: if len(act) != 2 or not act.isdigit(): print("The wrong action: {}".format(act)) return False i, j = int(act[0]), int(act[1]) if i >= la or j >= la: print("Index error: {}".format(act)) return False if abs(i - j) != 1: print("The wrong action: {}".format(act)) return False array[i], array[j] = array[j], array[i] if len(actions) > (la * (la - 1)) // 2: print("Too many actions. BOOM!") return False if array != sorted(indata): print("The array is not sorted. BOOM!") return False return True assert check_solution(swap_sort, (6, 4, 2)), "Reverse simple" assert check_solution(swap_sort, (1, 2, 3, 4, 5)), "All right!" assert check_solution(swap_sort, (1, 2, 3, 5, 3)), "One move"
def swap_sort(array): array = list(array[:]) result = [] for i in range(1, len(array)): j = i - 1 k = i while j >= 0 and array[j] > array[k]: (array[k], array[j]) = (array[j], array[k]) result.append('%d%d' % (j, k)) j -= 1 k -= 1 return ','.join(result) if __name__ == '__main__': def check_solution(f, indata): result = f(indata) array = list(indata[:]) la = len(array) if not isinstance(result, str): print('The result should be a string') return False actions = result.split(',') if result else [] for act in actions: if len(act) != 2 or not act.isdigit(): print('The wrong action: {}'.format(act)) return False (i, j) = (int(act[0]), int(act[1])) if i >= la or j >= la: print('Index error: {}'.format(act)) return False if abs(i - j) != 1: print('The wrong action: {}'.format(act)) return False (array[i], array[j]) = (array[j], array[i]) if len(actions) > la * (la - 1) // 2: print('Too many actions. BOOM!') return False if array != sorted(indata): print('The array is not sorted. BOOM!') return False return True assert check_solution(swap_sort, (6, 4, 2)), 'Reverse simple' assert check_solution(swap_sort, (1, 2, 3, 4, 5)), 'All right!' assert check_solution(swap_sort, (1, 2, 3, 5, 3)), 'One move'
name = "Fahad Hafeez" print(len(name)) if len(name) < 3: print("Name must be at least 3 characters long") elif len(name) > 50: print("Name must be a maximum of 50 characters long") else: print("Name looks good")
name = 'Fahad Hafeez' print(len(name)) if len(name) < 3: print('Name must be at least 3 characters long') elif len(name) > 50: print('Name must be a maximum of 50 characters long') else: print('Name looks good')
#!/usr/bin/env python3 def MakeCaseAgnostic(choices): def find_choice(choice): for key, item in enumerate(choice.lower() for choice in choices): if choice.lower() == item: return choices[key] return choice return find_choice
def make_case_agnostic(choices): def find_choice(choice): for (key, item) in enumerate((choice.lower() for choice in choices)): if choice.lower() == item: return choices[key] return choice return find_choice
class Config(object): def __init__(self): # model params self.model = "AR" self.nsteps = 10 # equivalent to x_len self.msteps = 7 self.nbins = 4 self.attention_size = 16 self.num_filters = 32 self.kernel_sizes = [3] self.l2_lambda = 1e-3 self.hidden_units = 512 self.num_heads = 8 # data params self.data_path = '../data/18579_12_2mins.csv' self.nfeatures = 8 self.x_len = self.nsteps self.y_len = 1 self.mem_len = self.msteps self.foresight = 0 self.dev_ratio = 0.1 self.test_len = 7 self.seed = None # train params self.lr = 1e-3 self.num_epochs = 200 self.batch_size = 32 self.dropout = 0.9 self.nepoch_no_improv = 5 self.clip = 5 self.desc = self._desc() self.allow_gpu = True def _desc(self): desc = "" for mem, val in self.__dict__.items(): desc += mem + ":" + str(val) + ", " return desc if __name__ == "__main__": config = Config() print(config.desc)
class Config(object): def __init__(self): self.model = 'AR' self.nsteps = 10 self.msteps = 7 self.nbins = 4 self.attention_size = 16 self.num_filters = 32 self.kernel_sizes = [3] self.l2_lambda = 0.001 self.hidden_units = 512 self.num_heads = 8 self.data_path = '../data/18579_12_2mins.csv' self.nfeatures = 8 self.x_len = self.nsteps self.y_len = 1 self.mem_len = self.msteps self.foresight = 0 self.dev_ratio = 0.1 self.test_len = 7 self.seed = None self.lr = 0.001 self.num_epochs = 200 self.batch_size = 32 self.dropout = 0.9 self.nepoch_no_improv = 5 self.clip = 5 self.desc = self._desc() self.allow_gpu = True def _desc(self): desc = '' for (mem, val) in self.__dict__.items(): desc += mem + ':' + str(val) + ', ' return desc if __name__ == '__main__': config = config() print(config.desc)
# General info COMPANY_NAME = "Shore East" SITENAME = "Cloudy Memory" EMAIL_PREFIX = "[ %s ] " % SITENAME APPNAME = "cloudmemory-app" BASE = "http://%s.appspot.com" % APPNAME API_AUTH = "waywayb4ck" PLAY_STORE_LINK = "" DAYS = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"] # Branding CL_PRIMARY = "#409777" CL_PRIMARY_DK = "#275D4A" # Emails APP_OWNER = "onejgordon@gmail.com" # This should be an owner of the cloud project INSTALL_PW = "REPLACEWITHYOURPASSWORD" ADMIN_EMAIL = APP_OWNER ERROR_EMAIL = APP_OWNER NOTIF_EMAILS = [APP_OWNER] SENDER_EMAIL = "%s Notifications <noreply@%s.appspotmail.com>" % (SITENAME, APPNAME) GA_ID = "" SVC_DATA_MCKEY = "%s:%s" # svc:date MEMCACHE_EXPIRE_SECS = 60*60*3 # Flags DEBUG_API = False TEST_VERSIONS = ["test"] MAX_REQUEST_SECONDS = 40 class SERVICE(): # Service Keys GMAIL = "g_mail" GCAL = "g_calendar" GTASKS = "g_tasks" GDRIVE = "g_drive" NYT_NEWS = "nyt_news" # Statuses NOT_LOADED = 0 LOADING = 1 ERROR = 2 LOADED = 3 # Item Types EMAIL = 1 EVENT = 2 PHOTO = 3 TASK = 4 DOCUMENT = 5 NEWS = 6 # Sync with AppConstants SCOPES = { GMAIL: "https://mail.google.com/", GTASKS: "https://www.googleapis.com/auth/tasks.readonly", GCAL: "https://www.googleapis.com/auth/calendar.readonly", GDRIVE: "https://www.googleapis.com/auth/drive.appdata https://www.googleapis.com/auth/drive.readonly https://www.googleapis.com/auth/drive.photos.readonly" } DEFAULT = [] class ERROR(): OK = 0 UNAUTHORIZED = 1 BAD_TOKEN = 2 USER_NOT_FOUND = 3 MALFORMED = 4 AUTH_FAILED = 5 SENSOR_NOT_FOUND = 6 OTHER = 99 LABELS = {OK: "OK", UNAUTHORIZED: "Unauthorized", BAD_TOKEN: "Bad Token", USER_NOT_FOUND: "User not found", MALFORMED: "Malformed Request!", AUTH_FAILED: "Auth failed"} class USER(): USER = 1 ADMIN = 2 LABELS = {USER: "User", ADMIN: "Admin"} COUNTRIES = [ ("US","United States"), ("AF","Afghanistan"), ("AX","Aland Islands"), ("AL","Albania"), ("DZ","Algeria"), ("AS","American Samoa"), ("AD","Andorra"), ("AO","Angola"), ("AI","Anguilla"), ("AQ","Antarctica"), ("AG","Antigua and Barbuda"), ("AR","Argentina"), ("AM","Armenia"), ("AW","Aruba"), ("AU","Australia"), ("AT","Austria"), ("AZ","Azerbaijan"), ("BS","Bahamas"), ("BH","Bahrain"), ("BD","Bangladesh"), ("BB","Barbados"), ("BY","Belarus"), ("BE","Belgium"), ("BZ","Belize"), ("BJ","Benin"), ("BM","Bermuda"), ("BT","Bhutan"), ("BO","Bolivia, Plurinational State of"), ("BQ","Bonaire, Sint Eustatius and Saba"), ("BA","Bosnia and Herzegovina"), ("BW","Botswana"), ("BV","Bouvet Island"), ("BR","Brazil"), ("IO","British Indian Ocean Territory"), ("BN","Brunei Darussalam"), ("BG","Bulgaria"), ("BF","Burkina Faso"), ("BI","Burundi"), ("KH","Cambodia"), ("CM","Cameroon"), ("CA","Canada"), ("CV","Cape Verde"), ("KY","Cayman Islands"), ("CF","Central African Republic"), ("TD","Chad"), ("CL","Chile"), ("CN","China"), ("CX","Christmas Island"), ("CC","Cocos (Keeling) Islands"), ("CO","Colombia"), ("KM","Comoros"), ("CG","Congo"), ("CD","Congo, the Democratic Republic of the"), ("CK","Cook Islands"), ("CR","Costa Rica"), ("CI","Cote d'Ivoire"), ("HR","Croatia"), ("CU","Cuba"), ("CW","Curacao"), ("CY","Cyprus"), ("CZ","Czech Republic"), ("DK","Denmark"), ("DJ","Djibouti"), ("DM","Dominica"), ("DO","Dominican Republic"), ("EC","Ecuador"), ("EG","Egypt"), ("SV","El Salvador"), ("GQ","Equatorial Guinea"), ("ER","Eritrea"), ("EE","Estonia"), ("ET","Ethiopia"), ("FK","Falkland Islands (Malvinas)"), ("FO","Faroe Islands"), ("FJ","Fiji"), ("FI","Finland"), ("FR","France"), ("GF","French Guiana"), ("PF","French Polynesia"), ("TF","French Southern Territories"), ("GA","Gabon"), ("GM","Gambia"), ("GE","Georgia"), ("DE","Germany"), ("GH","Ghana"), ("GI","Gibraltar"), ("GR","Greece"), ("GL","Greenland"), ("GD","Grenada"), ("GP","Guadeloupe"), ("GU","Guam"), ("GT","Guatemala"), ("GG","Guernsey"), ("GN","Guinea"), ("GW","Guinea-Bissau"), ("GY","Guyana"), ("HT","Haiti"), ("HM","Heard Island and McDonald Islands"), ("VA","Holy See (Vatican City State)"), ("HN","Honduras"), ("HK","Hong Kong"), ("HU","Hungary"), ("IS","Iceland"), ("IN","India"), ("ID","Indonesia"), ("IR","Iran, Islamic Republic of"), ("IQ","Iraq"), ("IE","Ireland"), ("IM","Isle of Man"), ("IL","Israel"), ("IT","Italy"), ("JM","Jamaica"), ("JP","Japan"), ("JE","Jersey"), ("JO","Jordan"), ("KZ","Kazakhstan"), ("KE","Kenya"), ("KI","Kiribati"), ("KP","Korea, Democratic People's Republic of"), ("KR","Korea, Republic of"), ("KW","Kuwait"), ("KG","Kyrgyzstan"), ("LA","Lao People's Democratic Republic"), ("LV","Latvia"), ("LB","Lebanon"), ("LS","Lesotho"), ("LR","Liberia"), ("LY","Libya"), ("LI","Liechtenstein"), ("LT","Lithuania"), ("LU","Luxembourg"), ("MO","Macao"), ("MK","Macedonia, the former Yugoslav Republic of"), ("MG","Madagascar"), ("MW","Malawi"), ("MY","Malaysia"), ("MV","Maldives"), ("ML","Mali"), ("MT","Malta"), ("MH","Marshall Islands"), ("MQ","Martinique"), ("MR","Mauritania"), ("MU","Mauritius"), ("YT","Mayotte"), ("MX","Mexico"), ("FM","Micronesia, Federated States of"), ("MD","Moldova, Republic of"), ("MC","Monaco"), ("MN","Mongolia"), ("ME","Montenegro"), ("MS","Montserrat"), ("MA","Morocco"), ("MZ","Mozambique"), ("MM","Myanmar"), ("NA","Namibia"), ("NR","Nauru"), ("NP","Nepal"), ("NL","Netherlands"), ("NC","New Caledonia"), ("NZ","New Zealand"), ("NI","Nicaragua"), ("NE","Niger"), ("NG","Nigeria"), ("NU","Niue"), ("NF","Norfolk Island"), ("MP","Northern Mariana Islands"), ("NO","Norway"), ("OM","Oman"), ("PK","Pakistan"), ("PW","Palau"), ("PS","Palestinian Territory, Occupied"), ("PA","Panama"), ("PG","Papua New Guinea"), ("PY","Paraguay"), ("PE","Peru"), ("PH","Philippines"), ("PN","Pitcairn"), ("PL","Poland"), ("PT","Portugal"), ("PR","Puerto Rico"), ("QA","Qatar"), ("RE","Reunion"), ("RO","Romania"), ("RU","Russian Federation"), ("RW","Rwanda"), ("BL","Saint Barthelemy"), ("SH","Saint Helena, Ascension and Tristan da Cunha"), ("KN","Saint Kitts and Nevis"), ("LC","Saint Lucia"), ("MF","Saint Martin (French part)"), ("PM","Saint Pierre and Miquelon"), ("VC","Saint Vincent and the Grenadines"), ("WS","Samoa"), ("SM","San Marino"), ("ST","Sao Tome and Principe"), ("SA","Saudi Arabia"), ("SN","Senegal"), ("RS","Serbia"), ("SC","Seychelles"), ("SL","Sierra Leone"), ("SG","Singapore"), ("SX","Sint Maarten (Dutch part)"), ("SK","Slovakia"), ("SI","Slovenia"), ("SB","Solomon Islands"), ("SO","Somalia"), ("ZA","South Africa"), ("GS","South Georgia and the South Sandwich Islands"), ("SS","South Sudan"), ("ES","Spain"), ("LK","Sri Lanka"), ("SD","Sudan"), ("SR","Suriname"), ("SJ","Svalbard and Jan Mayen"), ("SZ","Swaziland"), ("SE","Sweden"), ("CH","Switzerland"), ("SY","Syrian Arab Republic"), ("TW","Taiwan, Province of China"), ("TJ","Tajikistan"), ("TZ","Tanzania, United Republic of"), ("TH","Thailand"), ("TL","Timor-Leste"), ("TG","Togo"), ("TK","Tokelau"), ("TO","Tonga"), ("TT","Trinidad and Tobago"), ("TN","Tunisia"), ("TR","Turkey"), ("TM","Turkmenistan"), ("TC","Turks and Caicos Islands"), ("TV","Tuvalu"), ("UG","Uganda"), ("UA","Ukraine"), ("AE","United Arab Emirates"), ("GB","United Kingdom"), ("UM","United States Minor Outlying Islands"), ("UY","Uruguay"), ("UZ","Uzbekistan"), ("VU","Vanuatu"), ("VE","Venezuela, Bolivarian Republic of"), ("VN","Viet Nam"), ("VG","Virgin Islands, British"), ("VI","Virgin Islands, U.S."), ("WF","Wallis and Futuna"), ("EH","Western Sahara"), ("YE","Yemen"), ("ZM","Zambia"), ("ZW","Zimbabwe") ]
company_name = 'Shore East' sitename = 'Cloudy Memory' email_prefix = '[ %s ] ' % SITENAME appname = 'cloudmemory-app' base = 'http://%s.appspot.com' % APPNAME api_auth = 'waywayb4ck' play_store_link = '' days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'] cl_primary = '#409777' cl_primary_dk = '#275D4A' app_owner = 'onejgordon@gmail.com' install_pw = 'REPLACEWITHYOURPASSWORD' admin_email = APP_OWNER error_email = APP_OWNER notif_emails = [APP_OWNER] sender_email = '%s Notifications <noreply@%s.appspotmail.com>' % (SITENAME, APPNAME) ga_id = '' svc_data_mckey = '%s:%s' memcache_expire_secs = 60 * 60 * 3 debug_api = False test_versions = ['test'] max_request_seconds = 40 class Service: gmail = 'g_mail' gcal = 'g_calendar' gtasks = 'g_tasks' gdrive = 'g_drive' nyt_news = 'nyt_news' not_loaded = 0 loading = 1 error = 2 loaded = 3 email = 1 event = 2 photo = 3 task = 4 document = 5 news = 6 scopes = {GMAIL: 'https://mail.google.com/', GTASKS: 'https://www.googleapis.com/auth/tasks.readonly', GCAL: 'https://www.googleapis.com/auth/calendar.readonly', GDRIVE: 'https://www.googleapis.com/auth/drive.appdata https://www.googleapis.com/auth/drive.readonly https://www.googleapis.com/auth/drive.photos.readonly'} default = [] class Error: ok = 0 unauthorized = 1 bad_token = 2 user_not_found = 3 malformed = 4 auth_failed = 5 sensor_not_found = 6 other = 99 labels = {OK: 'OK', UNAUTHORIZED: 'Unauthorized', BAD_TOKEN: 'Bad Token', USER_NOT_FOUND: 'User not found', MALFORMED: 'Malformed Request!', AUTH_FAILED: 'Auth failed'} class User: user = 1 admin = 2 labels = {USER: 'User', ADMIN: 'Admin'} countries = [('US', 'United States'), ('AF', 'Afghanistan'), ('AX', 'Aland Islands'), ('AL', 'Albania'), ('DZ', 'Algeria'), ('AS', 'American Samoa'), ('AD', 'Andorra'), ('AO', 'Angola'), ('AI', 'Anguilla'), ('AQ', 'Antarctica'), ('AG', 'Antigua and Barbuda'), ('AR', 'Argentina'), ('AM', 'Armenia'), ('AW', 'Aruba'), ('AU', 'Australia'), ('AT', 'Austria'), ('AZ', 'Azerbaijan'), ('BS', 'Bahamas'), ('BH', 'Bahrain'), ('BD', 'Bangladesh'), ('BB', 'Barbados'), ('BY', 'Belarus'), ('BE', 'Belgium'), ('BZ', 'Belize'), ('BJ', 'Benin'), ('BM', 'Bermuda'), ('BT', 'Bhutan'), ('BO', 'Bolivia, Plurinational State of'), ('BQ', 'Bonaire, Sint Eustatius and Saba'), ('BA', 'Bosnia and Herzegovina'), ('BW', 'Botswana'), ('BV', 'Bouvet Island'), ('BR', 'Brazil'), ('IO', 'British Indian Ocean Territory'), ('BN', 'Brunei Darussalam'), ('BG', 'Bulgaria'), ('BF', 'Burkina Faso'), ('BI', 'Burundi'), ('KH', 'Cambodia'), ('CM', 'Cameroon'), ('CA', 'Canada'), ('CV', 'Cape Verde'), ('KY', 'Cayman Islands'), ('CF', 'Central African Republic'), ('TD', 'Chad'), ('CL', 'Chile'), ('CN', 'China'), ('CX', 'Christmas Island'), ('CC', 'Cocos (Keeling) Islands'), ('CO', 'Colombia'), ('KM', 'Comoros'), ('CG', 'Congo'), ('CD', 'Congo, the Democratic Republic of the'), ('CK', 'Cook Islands'), ('CR', 'Costa Rica'), ('CI', "Cote d'Ivoire"), ('HR', 'Croatia'), ('CU', 'Cuba'), ('CW', 'Curacao'), ('CY', 'Cyprus'), ('CZ', 'Czech Republic'), ('DK', 'Denmark'), ('DJ', 'Djibouti'), ('DM', 'Dominica'), ('DO', 'Dominican Republic'), ('EC', 'Ecuador'), ('EG', 'Egypt'), ('SV', 'El Salvador'), ('GQ', 'Equatorial Guinea'), ('ER', 'Eritrea'), ('EE', 'Estonia'), ('ET', 'Ethiopia'), ('FK', 'Falkland Islands (Malvinas)'), ('FO', 'Faroe Islands'), ('FJ', 'Fiji'), ('FI', 'Finland'), ('FR', 'France'), ('GF', 'French Guiana'), ('PF', 'French Polynesia'), ('TF', 'French Southern Territories'), ('GA', 'Gabon'), ('GM', 'Gambia'), ('GE', 'Georgia'), ('DE', 'Germany'), ('GH', 'Ghana'), ('GI', 'Gibraltar'), ('GR', 'Greece'), ('GL', 'Greenland'), ('GD', 'Grenada'), ('GP', 'Guadeloupe'), ('GU', 'Guam'), ('GT', 'Guatemala'), ('GG', 'Guernsey'), ('GN', 'Guinea'), ('GW', 'Guinea-Bissau'), ('GY', 'Guyana'), ('HT', 'Haiti'), ('HM', 'Heard Island and McDonald Islands'), ('VA', 'Holy See (Vatican City State)'), ('HN', 'Honduras'), ('HK', 'Hong Kong'), ('HU', 'Hungary'), ('IS', 'Iceland'), ('IN', 'India'), ('ID', 'Indonesia'), ('IR', 'Iran, Islamic Republic of'), ('IQ', 'Iraq'), ('IE', 'Ireland'), ('IM', 'Isle of Man'), ('IL', 'Israel'), ('IT', 'Italy'), ('JM', 'Jamaica'), ('JP', 'Japan'), ('JE', 'Jersey'), ('JO', 'Jordan'), ('KZ', 'Kazakhstan'), ('KE', 'Kenya'), ('KI', 'Kiribati'), ('KP', "Korea, Democratic People's Republic of"), ('KR', 'Korea, Republic of'), ('KW', 'Kuwait'), ('KG', 'Kyrgyzstan'), ('LA', "Lao People's Democratic Republic"), ('LV', 'Latvia'), ('LB', 'Lebanon'), ('LS', 'Lesotho'), ('LR', 'Liberia'), ('LY', 'Libya'), ('LI', 'Liechtenstein'), ('LT', 'Lithuania'), ('LU', 'Luxembourg'), ('MO', 'Macao'), ('MK', 'Macedonia, the former Yugoslav Republic of'), ('MG', 'Madagascar'), ('MW', 'Malawi'), ('MY', 'Malaysia'), ('MV', 'Maldives'), ('ML', 'Mali'), ('MT', 'Malta'), ('MH', 'Marshall Islands'), ('MQ', 'Martinique'), ('MR', 'Mauritania'), ('MU', 'Mauritius'), ('YT', 'Mayotte'), ('MX', 'Mexico'), ('FM', 'Micronesia, Federated States of'), ('MD', 'Moldova, Republic of'), ('MC', 'Monaco'), ('MN', 'Mongolia'), ('ME', 'Montenegro'), ('MS', 'Montserrat'), ('MA', 'Morocco'), ('MZ', 'Mozambique'), ('MM', 'Myanmar'), ('NA', 'Namibia'), ('NR', 'Nauru'), ('NP', 'Nepal'), ('NL', 'Netherlands'), ('NC', 'New Caledonia'), ('NZ', 'New Zealand'), ('NI', 'Nicaragua'), ('NE', 'Niger'), ('NG', 'Nigeria'), ('NU', 'Niue'), ('NF', 'Norfolk Island'), ('MP', 'Northern Mariana Islands'), ('NO', 'Norway'), ('OM', 'Oman'), ('PK', 'Pakistan'), ('PW', 'Palau'), ('PS', 'Palestinian Territory, Occupied'), ('PA', 'Panama'), ('PG', 'Papua New Guinea'), ('PY', 'Paraguay'), ('PE', 'Peru'), ('PH', 'Philippines'), ('PN', 'Pitcairn'), ('PL', 'Poland'), ('PT', 'Portugal'), ('PR', 'Puerto Rico'), ('QA', 'Qatar'), ('RE', 'Reunion'), ('RO', 'Romania'), ('RU', 'Russian Federation'), ('RW', 'Rwanda'), ('BL', 'Saint Barthelemy'), ('SH', 'Saint Helena, Ascension and Tristan da Cunha'), ('KN', 'Saint Kitts and Nevis'), ('LC', 'Saint Lucia'), ('MF', 'Saint Martin (French part)'), ('PM', 'Saint Pierre and Miquelon'), ('VC', 'Saint Vincent and the Grenadines'), ('WS', 'Samoa'), ('SM', 'San Marino'), ('ST', 'Sao Tome and Principe'), ('SA', 'Saudi Arabia'), ('SN', 'Senegal'), ('RS', 'Serbia'), ('SC', 'Seychelles'), ('SL', 'Sierra Leone'), ('SG', 'Singapore'), ('SX', 'Sint Maarten (Dutch part)'), ('SK', 'Slovakia'), ('SI', 'Slovenia'), ('SB', 'Solomon Islands'), ('SO', 'Somalia'), ('ZA', 'South Africa'), ('GS', 'South Georgia and the South Sandwich Islands'), ('SS', 'South Sudan'), ('ES', 'Spain'), ('LK', 'Sri Lanka'), ('SD', 'Sudan'), ('SR', 'Suriname'), ('SJ', 'Svalbard and Jan Mayen'), ('SZ', 'Swaziland'), ('SE', 'Sweden'), ('CH', 'Switzerland'), ('SY', 'Syrian Arab Republic'), ('TW', 'Taiwan, Province of China'), ('TJ', 'Tajikistan'), ('TZ', 'Tanzania, United Republic of'), ('TH', 'Thailand'), ('TL', 'Timor-Leste'), ('TG', 'Togo'), ('TK', 'Tokelau'), ('TO', 'Tonga'), ('TT', 'Trinidad and Tobago'), ('TN', 'Tunisia'), ('TR', 'Turkey'), ('TM', 'Turkmenistan'), ('TC', 'Turks and Caicos Islands'), ('TV', 'Tuvalu'), ('UG', 'Uganda'), ('UA', 'Ukraine'), ('AE', 'United Arab Emirates'), ('GB', 'United Kingdom'), ('UM', 'United States Minor Outlying Islands'), ('UY', 'Uruguay'), ('UZ', 'Uzbekistan'), ('VU', 'Vanuatu'), ('VE', 'Venezuela, Bolivarian Republic of'), ('VN', 'Viet Nam'), ('VG', 'Virgin Islands, British'), ('VI', 'Virgin Islands, U.S.'), ('WF', 'Wallis and Futuna'), ('EH', 'Western Sahara'), ('YE', 'Yemen'), ('ZM', 'Zambia'), ('ZW', 'Zimbabwe')]
# # PySNMP MIB module HUAWEI-MUSA-MA5100-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HUAWEI-MUSA-MA5100-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 19:32:50 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # Integer, ObjectIdentifier, OctetString = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsIntersection, ValueSizeConstraint, ConstraintsUnion, ValueRangeConstraint, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ValueSizeConstraint", "ConstraintsUnion", "ValueRangeConstraint", "SingleValueConstraint") musa, = mibBuilder.importSymbols("HUAWEI-MIB", "musa") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") Unsigned32, Gauge32, ObjectIdentity, Counter32, TimeTicks, IpAddress, MibIdentifier, Counter64, Bits, Integer32, MibScalar, MibTable, MibTableRow, MibTableColumn, iso, ModuleIdentity, NotificationType = mibBuilder.importSymbols("SNMPv2-SMI", "Unsigned32", "Gauge32", "ObjectIdentity", "Counter32", "TimeTicks", "IpAddress", "MibIdentifier", "Counter64", "Bits", "Integer32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "iso", "ModuleIdentity", "NotificationType") TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString") class DisplayString(OctetString): pass hwMa5100Mib = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5)) hwMusaSysMib = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1)) hwMusaDevice = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1)) hwMusaEndOfMib = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 100)) hwMusaSysDate = MibScalar((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 9), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaSysDate.setStatus('mandatory') hwMusaSysTime = MibScalar((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 10), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaSysTime.setStatus('mandatory') hwMusaSysCpuRatio = MibScalar((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 11), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaSysCpuRatio.setStatus('mandatory') hwMusaHostVersion = MibScalar((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 12), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaHostVersion.setStatus('mandatory') hwMusaResetSys = MibScalar((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 13), Integer32()).setMaxAccess("writeonly") if mibBuilder.loadTexts: hwMusaResetSys.setStatus('mandatory') hwMusaIpAddr = MibScalar((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 14), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaIpAddr.setStatus('mandatory') hwMusaIpMask = MibScalar((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 15), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaIpMask.setStatus('mandatory') hwMusaGatewayIpAddr = MibScalar((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 16), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaGatewayIpAddr.setStatus('mandatory') hwMusaMacAddr = MibScalar((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 17), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaMacAddr.setStatus('mandatory') hwMusaIpAddrPermitTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 18), ) if mibBuilder.loadTexts: hwMusaIpAddrPermitTable.setStatus('mandatory') hwMusaIpAddrPermitEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 18, 1), ).setIndexNames((0, "HUAWEI-MUSA-MA5100-MIB", "hwMusaIpPermitTableId")) if mibBuilder.loadTexts: hwMusaIpAddrPermitEntry.setStatus('mandatory') hwMusaIpPermitTableId = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 18, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaIpPermitTableId.setStatus('mandatory') hwMusaIpAddrPermitOper = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 18, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("add", 0), ("del", 1), ("modify", 2), ("query", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaIpAddrPermitOper.setStatus('mandatory') hwMusaPermitBeginIp = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 18, 1, 3), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaPermitBeginIp.setStatus('mandatory') hwMusaPermitEndIp = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 18, 1, 4), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaPermitEndIp.setStatus('mandatory') hwMusaPermitIpMask = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 18, 1, 5), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaPermitIpMask.setStatus('mandatory') hwMusaIpAddrRejectTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 19), ) if mibBuilder.loadTexts: hwMusaIpAddrRejectTable.setStatus('mandatory') hwMusaIpAddrRejectEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 19, 1), ).setIndexNames((0, "HUAWEI-MUSA-MA5100-MIB", "hwMusaIpRejectTableId")) if mibBuilder.loadTexts: hwMusaIpAddrRejectEntry.setStatus('mandatory') hwMusaIpRejectTableId = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 19, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaIpRejectTableId.setStatus('mandatory') hwMusaIpAddrRejectOper = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 19, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("add", 0), ("del", 1), ("modify", 2), ("query", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaIpAddrRejectOper.setStatus('mandatory') hwMusaRejectBeginIp = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 19, 1, 3), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaRejectBeginIp.setStatus('mandatory') hwMusaRejectEndIp = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 19, 1, 4), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaRejectEndIp.setStatus('mandatory') hwMusaRejectIpMask = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 19, 1, 5), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaRejectIpMask.setStatus('mandatory') hwMusaAtmIpAddr = MibScalar((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 20), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaAtmIpAddr.setStatus('mandatory') hwMusaAtmIpMask = MibScalar((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 21), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaAtmIpMask.setStatus('mandatory') hwMusaMtu = MibScalar((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 22), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaMtu.setStatus('mandatory') hwMusaOpticConvergentRate = MibScalar((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 23), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaOpticConvergentRate.setStatus('mandatory') hwMusaCellbusID = MibScalar((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 24), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("ma5100", 1), ("ma5103", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaCellbusID.setStatus('mandatory') hwMusaResetSlaveMMX = MibScalar((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 25), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("loaddata", 1), ("noloaddata", 2)))).setMaxAccess("writeonly") if mibBuilder.loadTexts: hwMusaResetSlaveMMX.setStatus('mandatory') hwMusaBiosVersion = MibScalar((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 26), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaBiosVersion.setStatus('mandatory') hwMusaEthernetFirewall = MibScalar((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 27), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enable", 1), ("disable", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaEthernetFirewall.setStatus('mandatory') hwMusaNmsPvcConfTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 3), ) if mibBuilder.loadTexts: hwMusaNmsPvcConfTable.setStatus('mandatory') hwMusaNmsPvcConfEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 3, 1), ).setIndexNames((0, "HUAWEI-MUSA-MA5100-MIB", "hwMusaNmsPvcIndex")) if mibBuilder.loadTexts: hwMusaNmsPvcConfEntry.setStatus('mandatory') hwMusaNmsPvcIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 3, 1, 1), Integer32()) if mibBuilder.loadTexts: hwMusaNmsPvcIndex.setStatus('mandatory') hwMusaNmsRelayVpi = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 3, 1, 2), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaNmsRelayVpi.setStatus('mandatory') hwMusaNmsRelayVci = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 3, 1, 3), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaNmsRelayVci.setStatus('mandatory') hwMusaNmsIp = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 3, 1, 4), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaNmsIp.setStatus('mandatory') hwMusaNmsPvcOper = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 3, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("add", 0), ("del", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaNmsPvcOper.setStatus('mandatory') hwMusaNmsRxTraffic = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 3, 1, 8), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaNmsRxTraffic.setStatus('mandatory') hwMusaNmsTxTraffic = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 3, 1, 9), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaNmsTxTraffic.setStatus('mandatory') hwMusaNmsSarVci = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 3, 1, 10), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaNmsSarVci.setStatus('mandatory') hwMusaNmsLLCVC = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 3, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("llc", 1), ("vc", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaNmsLLCVC.setStatus('mandatory') hwMusaNmsENCAP = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 3, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("eipoa", 0), ("e1483B", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaNmsENCAP.setStatus('mandatory') hwMusaNmsFrameId = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 3, 1, 14), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaNmsFrameId.setStatus('mandatory') hwMusaNmsSlotId = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 3, 1, 15), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaNmsSlotId.setStatus('mandatory') hwMusaNmsPortVlanId = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 3, 1, 16), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaNmsPortVlanId.setStatus('mandatory') hwMusaNmsParaConfTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 5), ) if mibBuilder.loadTexts: hwMusaNmsParaConfTable.setStatus('mandatory') hwMusaNmsParaConfEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 5, 1), ).setIndexNames((0, "HUAWEI-MUSA-MA5100-MIB", "hwMusaNmsID")) if mibBuilder.loadTexts: hwMusaNmsParaConfEntry.setStatus('mandatory') hwMusaNmsID = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 5, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 7))) if mibBuilder.loadTexts: hwMusaNmsID.setStatus('mandatory') hwMusaNmsOperState = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 5, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 4, 5))).clone(namedValues=NamedValues(("add", 0), ("del", 1), ("modify", 2), ("active", 4), ("deactive", 5)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaNmsOperState.setStatus('mandatory') hwMusaNmsName = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 5, 1, 3), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaNmsName.setStatus('mandatory') hwMusaNmsIpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 5, 1, 4), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaNmsIpAddr.setStatus('mandatory') hwMusaGetCommunity = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 5, 1, 5), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaGetCommunity.setStatus('mandatory') hwMusaSetCommunity = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 5, 1, 6), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaSetCommunity.setStatus('mandatory') hwMusaTrapPort = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 5, 1, 7), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaTrapPort.setStatus('mandatory') hwMusaGetSetPort = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 5, 1, 8), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaGetSetPort.setStatus('mandatory') hwMusaNmsStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 5, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("active", 1), ("deactive", 2), ("commfail", 3), ("uninstall", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaNmsStatus.setStatus('mandatory') hwMusaNmsStyle = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 5, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("bandin", 0), ("bandout", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaNmsStyle.setStatus('mandatory') hwMusaSlotGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6)) hwMusaShelf = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 1)) hwMusaFrame = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 2)) hwMusaSlot = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3)) hwMusaShelfNumber = MibScalar((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaShelfNumber.setStatus('mandatory') hwMusaShelfConfTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 1, 2), ) if mibBuilder.loadTexts: hwMusaShelfConfTable.setStatus('mandatory') hwMusaShelfConfEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 1, 2, 1), ).setIndexNames((0, "HUAWEI-MUSA-MA5100-MIB", "hwMusaShelfIndex")) if mibBuilder.loadTexts: hwMusaShelfConfEntry.setStatus('mandatory') hwMusaShelfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 1, 2, 1, 1), Integer32()) if mibBuilder.loadTexts: hwMusaShelfIndex.setStatus('mandatory') hwMusaShelfType = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 1, 2, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("other", 1), ("empty", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaShelfType.setStatus('mandatory') hwMusaShelfName = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 1, 2, 1, 3), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaShelfName.setStatus('mandatory') hwMusaFrameNumbers = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 1, 2, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaFrameNumbers.setStatus('mandatory') hwMusaFrameNumber = MibScalar((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 2, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaFrameNumber.setStatus('mandatory') hwMusaFrameConfTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 2, 2), ) if mibBuilder.loadTexts: hwMusaFrameConfTable.setStatus('mandatory') hwMusaFrameConfEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 2, 2, 1), ).setIndexNames((0, "HUAWEI-MUSA-MA5100-MIB", "hwMusaShelfIndex"), (0, "HUAWEI-MUSA-MA5100-MIB", "hwMusaFrameIndex")) if mibBuilder.loadTexts: hwMusaFrameConfEntry.setStatus('mandatory') hwMusaFrameIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 2, 2, 1, 1), Integer32()) if mibBuilder.loadTexts: hwMusaFrameIndex.setStatus('mandatory') hwMusaFrameType = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 2, 2, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("other", 1), ("empty", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaFrameType.setStatus('mandatory') hwMusaFrameName = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 2, 2, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 20))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaFrameName.setStatus('mandatory') hwMusaSlotNumbers = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 2, 2, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaSlotNumbers.setStatus('mandatory') hwMusaFrameBandWidth = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 2, 2, 1, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaFrameBandWidth.setStatus('mandatory') hwMusaFrameUsedBandWidth = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 2, 2, 1, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaFrameUsedBandWidth.setStatus('mandatory') hwMusaSlotNumber = MibScalar((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaSlotNumber.setStatus('mandatory') hwMusaSlotConfTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3, 2), ) if mibBuilder.loadTexts: hwMusaSlotConfTable.setStatus('mandatory') hwMusaSlotConfEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3, 2, 1), ).setIndexNames((0, "HUAWEI-MUSA-MA5100-MIB", "hwMusaFrameIndex"), (0, "HUAWEI-MUSA-MA5100-MIB", "hwMusaSlotIndex")) if mibBuilder.loadTexts: hwMusaSlotConfEntry.setStatus('mandatory') hwMusaSlotIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 15))) if mibBuilder.loadTexts: hwMusaSlotIndex.setStatus('mandatory') hwMusaSlotCardType = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3, 2, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 19, 21, 25))).clone(namedValues=NamedValues(("null", 0), ("mmx", 1), ("smx", 2), ("adl", 3), ("lanb", 4), ("lana", 5), ("cesa", 6), ("cesb", 7), ("spl", 8), ("fra", 9), ("adlb", 10), ("unknown", 11), ("splb", 12), ("sep", 13), ("smxa", 14), ("smxb", 15), ("pots", 16), ("splc", 18), ("lan", 19), ("adlc", 21), ("adld", 25)))).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaSlotCardType.setStatus('mandatory') hwMusaSlotCardSerial = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3, 2, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaSlotCardSerial.setStatus('mandatory') hwMusaSlotCardVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3, 2, 1, 4), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaSlotCardVersion.setStatus('mandatory') hwMusaSlotIpAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3, 2, 1, 5), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaSlotIpAddress.setStatus('mandatory') hwMusaSlotCardAdminStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3, 2, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13))).clone(namedValues=NamedValues(("noinstall", 0), ("normal", 1), ("fault", 2), ("mainnormal", 3), ("mainfault", 4), ("baknormal", 5), ("bakfault", 6), ("forbid", 7), ("config", 8), ("online", 10), ("none", 11), ("commok", 12), ("commfail", 13)))).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaSlotCardAdminStatus.setStatus('mandatory') hwMusaSlotCardOperStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3, 2, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9))).clone(namedValues=NamedValues(("del", 0), ("add", 1), ("reset", 2), ("use", 3), ("nouse", 4), ("inverse", 5), ("mmxswitchover", 6), ("delmmxsubboard", 7), ("addaiusubboard", 8), ("delaiusubboard", 9)))).setMaxAccess("writeonly") if mibBuilder.loadTexts: hwMusaSlotCardOperStatus.setStatus('mandatory') hwMusaSlotDescript = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3, 2, 1, 8), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaSlotDescript.setStatus('mandatory') hwMusaBoardCellLossPriority = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3, 2, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("low", 0), ("high", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaBoardCellLossPriority.setStatus('mandatory') hwMusaBoardMaxBandwidth = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3, 2, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("b-155M", 0), ("b-80M", 1), ("b-20M", 2), ("b-4M", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaBoardMaxBandwidth.setStatus('mandatory') hwMusaCpuOccupyRate = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3, 2, 1, 11), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaCpuOccupyRate.setStatus('mandatory') hwMusaQueryMemory = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3, 2, 1, 12), DisplayString()).setMaxAccess("writeonly") if mibBuilder.loadTexts: hwMusaQueryMemory.setStatus('mandatory') hwMusaLoadProtocol = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3, 2, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0))).clone(namedValues=NamedValues(("tftp", 0)))).setMaxAccess("writeonly") if mibBuilder.loadTexts: hwMusaLoadProtocol.setStatus('mandatory') hwMusaLoadContent = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3, 2, 1, 14), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(6, 8, 7))).clone(namedValues=NamedValues(("program", 6), ("data", 8), ("fpga", 7)))).setMaxAccess("writeonly") if mibBuilder.loadTexts: hwMusaLoadContent.setStatus('mandatory') hwMusaLoadTftpServerIp = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3, 2, 1, 15), IpAddress()).setMaxAccess("writeonly") if mibBuilder.loadTexts: hwMusaLoadTftpServerIp.setStatus('mandatory') hwMusaLoadFileName = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3, 2, 1, 16), DisplayString()).setMaxAccess("writeonly") if mibBuilder.loadTexts: hwMusaLoadFileName.setStatus('mandatory') hwMusaLoadOperType = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3, 2, 1, 17), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4))).clone(namedValues=NamedValues(("load", 0), ("upback", 1), ("downback", 2), ("rollback", 3), ("clearflash", 4)))).setMaxAccess("writeonly") if mibBuilder.loadTexts: hwMusaLoadOperType.setStatus('mandatory') hwMusaSlotUpBandWidth = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3, 2, 1, 18), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaSlotUpBandWidth.setStatus('mandatory') hwMusaSlotDownBandWidth = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3, 2, 1, 19), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaSlotDownBandWidth.setStatus('mandatory') hwMusaSlotUsedUpBandWidth = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3, 2, 1, 20), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaSlotUsedUpBandWidth.setStatus('mandatory') hwMusaSlotUsedDownBandWidth = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3, 2, 1, 21), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaSlotUsedDownBandWidth.setStatus('mandatory') hwMusaSlotUpPracticalBandWidth = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3, 2, 1, 22), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaSlotUpPracticalBandWidth.setStatus('mandatory') hwMusaSlotDownPracticalBandWidth = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3, 2, 1, 23), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaSlotDownPracticalBandWidth.setStatus('mandatory') hwMusaOamGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7)) hwMusaOimPhyTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 1), ) if mibBuilder.loadTexts: hwMusaOimPhyTable.setStatus('mandatory') hwMusaOimPhyEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 1, 1), ).setIndexNames((0, "HUAWEI-MUSA-MA5100-MIB", "hwMusaFrameIndex"), (0, "HUAWEI-MUSA-MA5100-MIB", "hwMusaSlotIndex"), (0, "HUAWEI-MUSA-MA5100-MIB", "hwOIMPortIndex")) if mibBuilder.loadTexts: hwMusaOimPhyEntry.setStatus('mandatory') hwOIMPortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 1, 1, 1), Integer32()) if mibBuilder.loadTexts: hwOIMPortIndex.setStatus('mandatory') hwMusaSetSrcLoop = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("notloop", 0), ("loop", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaSetSrcLoop.setStatus('mandatory') hwMusaSetLineLoop = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("notloop", 0), ("loop", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaSetLineLoop.setStatus('mandatory') hwMusaSetUtopiaLoop = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("notloop", 0), ("loop", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaSetUtopiaLoop.setStatus('mandatory') hwMusaInsertLOF = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("notinsert", 0), ("insert", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaInsertLOF.setStatus('mandatory') hwMusaInsertLOS = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("notinsert", 0), ("insert", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaInsertLOS.setStatus('mandatory') hwMusaInsertBIP1 = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 1, 1, 7), Integer32()).setMaxAccess("writeonly") if mibBuilder.loadTexts: hwMusaInsertBIP1.setStatus('mandatory') hwMusaInsertBIP2 = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 1, 1, 8), Integer32()).setMaxAccess("writeonly") if mibBuilder.loadTexts: hwMusaInsertBIP2.setStatus('mandatory') hwMusaInsertBIP3 = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 1, 1, 9), Integer32()).setMaxAccess("writeonly") if mibBuilder.loadTexts: hwMusaInsertBIP3.setStatus('mandatory') hwMusaInsertLAIS = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 1, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("notinsert", 0), ("insert", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaInsertLAIS.setStatus('mandatory') hwMusaInsertPAIS = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 1, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("notinsert", 0), ("insert", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaInsertPAIS.setStatus('mandatory') hwMusaInsertLRDI = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 1, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("notinsert", 0), ("insert", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaInsertLRDI.setStatus('mandatory') hwMusaOimOpticTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 2), ) if mibBuilder.loadTexts: hwMusaOimOpticTable.setStatus('mandatory') hwMusaOimOpticEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 2, 1), ).setIndexNames((0, "HUAWEI-MUSA-MA5100-MIB", "hwMusaFrameIndex"), (0, "HUAWEI-MUSA-MA5100-MIB", "hwMusaSlotIndex"), (0, "HUAWEI-MUSA-MA5100-MIB", "hwOIMPortIndex")) if mibBuilder.loadTexts: hwMusaOimOpticEntry.setStatus('mandatory') hwMusaQueryCurBIP1 = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 2, 1, 1), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaQueryCurBIP1.setStatus('mandatory') hwMusaQueryCurBIP2 = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 2, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaQueryCurBIP2.setStatus('mandatory') hwMusaQueryCurBIP3 = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 2, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaQueryCurBIP3.setStatus('mandatory') hwMusaQueryCurLFEBE = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 2, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaQueryCurLFEBE.setStatus('mandatory') hwMusaQueryCurPFEBE = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 2, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaQueryCurPFEBE.setStatus('mandatory') hwMusaQueryCurSendCellNum = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 2, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaQueryCurSendCellNum.setStatus('mandatory') hwMusaQueryCurReceiveCellNum = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 2, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaQueryCurReceiveCellNum.setStatus('mandatory') hwMusaQueryCurCorrectHECNum = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 2, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaQueryCurCorrectHECNum.setStatus('mandatory') hwMusaQueryCurNonCorrectHECNum = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 2, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaQueryCurNonCorrectHECNum.setStatus('mandatory') hwMusaQueryCurLOCDNum = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 2, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaQueryCurLOCDNum.setStatus('mandatory') hwMusaQueryCurUnmatchCellNum = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 2, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaQueryCurUnmatchCellNum.setStatus('mandatory') hwMusaQueryCurOOFNum = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 2, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaQueryCurOOFNum.setStatus('mandatory') hwMusaClearAllAlarmStat = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 2, 1, 13), Integer32()).setMaxAccess("writeonly") if mibBuilder.loadTexts: hwMusaClearAllAlarmStat.setStatus('mandatory') hwMusaClearOIMErrEventStat = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 2, 1, 14), Integer32()).setMaxAccess("writeonly") if mibBuilder.loadTexts: hwMusaClearOIMErrEventStat.setStatus('mandatory') hwMusaWarningCtrlTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 9), ) if mibBuilder.loadTexts: hwMusaWarningCtrlTable.setStatus('mandatory') hwMusaWarningCtrlEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 9, 1), ).setIndexNames((0, "HUAWEI-MUSA-MA5100-MIB", "hwMusaWarningID")) if mibBuilder.loadTexts: hwMusaWarningCtrlEntry.setStatus('mandatory') hwMusaWarningID = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 9, 1, 1), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaWarningID.setStatus('mandatory') hwMusaWarningLevel = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 9, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4))).clone(namedValues=NamedValues(("notify", 0), ("normal", 1), ("serious", 2), ("fatal", 3), ("default", 4)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaWarningLevel.setStatus('mandatory') hwMusaWarningNmsCtrl = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 9, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("off", 0), ("on", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaWarningNmsCtrl.setStatus('mandatory') hwMusaWarningTerminalCtrl = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 9, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("off", 0), ("on", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaWarningTerminalCtrl.setStatus('mandatory') hwMusaWarningIsCount = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 9, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("off", 0), ("on", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaWarningIsCount.setStatus('mandatory') hwMusaWarn15MinThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 9, 1, 6), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaWarn15MinThreshold.setStatus('mandatory') hwMusaWarn24HourThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 9, 1, 7), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaWarn24HourThreshold.setStatus('mandatory') hwMusaWarningDesc = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 9, 1, 8), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaWarningDesc.setStatus('mandatory') hwMusaWarningEngDesc = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 9, 1, 9), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaWarningEngDesc.setStatus('mandatory') hwMusaSysRouteTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 10), ) if mibBuilder.loadTexts: hwMusaSysRouteTable.setStatus('mandatory') hwMusaSysRouteEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 10, 1), ).setIndexNames((0, "HUAWEI-MUSA-MA5100-MIB", "hwMusaSysRouteIndex")) if mibBuilder.loadTexts: hwMusaSysRouteEntry.setStatus('mandatory') hwMusaSysRouteIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 10, 1, 1), Integer32()) if mibBuilder.loadTexts: hwMusaSysRouteIndex.setStatus('mandatory') hwMusaDstIp = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 10, 1, 2), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaDstIp.setStatus('mandatory') hwMusaDstIpMask = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 10, 1, 3), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaDstIpMask.setStatus('mandatory') hwMusaGateIp = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 10, 1, 4), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaGateIp.setStatus('mandatory') hwMusaSysRouteOper = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 10, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("add", 0), ("del", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaSysRouteOper.setStatus('mandatory') hwMusaLoadRateTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 11), ) if mibBuilder.loadTexts: hwMusaLoadRateTable.setStatus('mandatory') hwMusaLoadRateEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 11, 1), ).setIndexNames((0, "HUAWEI-MUSA-MA5100-MIB", "hwMusaFrameIndex"), (0, "HUAWEI-MUSA-MA5100-MIB", "hwMusaSlotIndex")) if mibBuilder.loadTexts: hwMusaLoadRateEntry.setStatus('mandatory') hwMusaLoadRate = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 11, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaLoadRate.setStatus('mandatory') hwMusaLoadType = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 11, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8))).clone(namedValues=NamedValues(("noOper", 0), ("backData", 1), ("dumpData", 2), ("loadData", 3), ("loadProc", 4), ("loadFpga", 5), ("program", 6), ("fpga", 7), ("data", 8)))).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaLoadType.setStatus('mandatory') hwMusaTrafficTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 13), ) if mibBuilder.loadTexts: hwMusaTrafficTable.setStatus('mandatory') hwMusaTrafficEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 13, 1), ).setIndexNames((0, "HUAWEI-MUSA-MA5100-MIB", "hwMusaTrafficIndex")) if mibBuilder.loadTexts: hwMusaTrafficEntry.setStatus('mandatory') hwMusaTrafficIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 13, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 5000))) if mibBuilder.loadTexts: hwMusaTrafficIndex.setStatus('mandatory') hwMusaTrafficType = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 13, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14))).clone(namedValues=NamedValues(("noclpnoscr", 1), ("clpnotaggingnoscr", 2), ("clptaggingnoscr", 3), ("noclpscr", 4), ("clpnotaggingscr", 5), ("clptaggingscr", 6), ("clpnotaggingmcr", 7), ("clptransparentnoscr", 8), ("clptransparentscr", 9), ("noclptaggingnoscr", 10), ("noclpnoscrcdvt", 11), ("noclpscrcdvt", 12), ("clpnotaggingscrcdvt", 13), ("clptaggingscrcdvt", 14)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaTrafficType.setStatus('mandatory') hwMusaServiceClass = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 13, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(2, 3, 4, 6))).clone(namedValues=NamedValues(("cbr", 2), ("rtVBR", 3), ("nrtVBR", 4), ("ubr", 6)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaServiceClass.setStatus('mandatory') hwMusaRefCount = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 13, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaRefCount.setStatus('mandatory') hwMusaRecordState = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 13, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("disable", 0), ("enable", 1), ("module", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaRecordState.setStatus('mandatory') hwMusaClp01pcr = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 13, 1, 6), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaClp01pcr.setStatus('mandatory') hwMusaClp0pcr = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 13, 1, 7), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaClp0pcr.setStatus('mandatory') hwMusaClp01scr = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 13, 1, 8), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaClp01scr.setStatus('mandatory') hwMusaClp0scr = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 13, 1, 9), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaClp0scr.setStatus('mandatory') hwMusaMbs = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 13, 1, 10), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaMbs.setStatus('mandatory') hwMusaMcr = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 13, 1, 11), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaMcr.setStatus('mandatory') hwMusaCDVT = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 13, 1, 12), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaCDVT.setStatus('mandatory') hwMusaOperat = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 13, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("add", 0), ("del", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaOperat.setStatus('mandatory') hwMusaNextTrafficIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 13, 1, 14), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaNextTrafficIndex.setStatus('mandatory') hwMusaCampusPvcConfTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 15), ) if mibBuilder.loadTexts: hwMusaCampusPvcConfTable.setStatus('mandatory') hwMusaCampusPvcConfEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 15, 1), ).setIndexNames((0, "HUAWEI-MUSA-MA5100-MIB", "hwMusaFrameIndex"), (0, "HUAWEI-MUSA-MA5100-MIB", "hwMusaSlotIndex"), (0, "HUAWEI-MUSA-MA5100-MIB", "hwMusaVlanId"), (0, "HUAWEI-MUSA-MA5100-MIB", "hwMusaVlanIciIndex")) if mibBuilder.loadTexts: hwMusaCampusPvcConfEntry.setStatus('mandatory') hwMusaVlanId = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 15, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 63))).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaVlanId.setStatus('mandatory') hwMusaVlanIciIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 15, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaVlanIciIndex.setStatus('mandatory') hwMusaAdlPortCount = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 15, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaAdlPortCount.setStatus('mandatory') hwMusaAdlFrameId = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 15, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaAdlFrameId.setStatus('mandatory') hwMusaAdlSlotId = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 15, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 15))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaAdlSlotId.setStatus('mandatory') hwMusaAdlPortId = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 15, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 15))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaAdlPortId.setStatus('mandatory') hwMusaAdlVpi = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 15, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 127))).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaAdlVpi.setStatus('mandatory') hwMusaAdlVci = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 15, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(32, 127))).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaAdlVci.setStatus('mandatory') hwMusaToLanTrafficId = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 15, 1, 9), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaToLanTrafficId.setStatus('mandatory') hwMusaFromLanTrafficId = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 15, 1, 10), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaFromLanTrafficId.setStatus('mandatory') hwMusaAdlPortOperat = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 15, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("add", 0), ("del", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaAdlPortOperat.setStatus('mandatory') hwMusaOpticBandwidthTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 17), ) if mibBuilder.loadTexts: hwMusaOpticBandwidthTable.setStatus('mandatory') hwMusaOpticBandwidthEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 17, 1), ).setIndexNames((0, "HUAWEI-MUSA-MA5100-MIB", "hwMusaFrameIndex"), (0, "HUAWEI-MUSA-MA5100-MIB", "hwMusaSlotIndex"), (0, "HUAWEI-MUSA-MA5100-MIB", "hwOIMPortIndex")) if mibBuilder.loadTexts: hwMusaOpticBandwidthEntry.setStatus('mandatory') hwMusaUpOpticMainBandWidth = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 17, 1, 1), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaUpOpticMainBandWidth.setStatus('mandatory') hwMusaDnOpticMainBandWidth = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 17, 1, 2), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaDnOpticMainBandWidth.setStatus('mandatory') hwMusaCurUsedUpBandWidth = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 17, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaCurUsedUpBandWidth.setStatus('mandatory') hwMusaCurUsedDownBandWidth = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 17, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaCurUsedDownBandWidth.setStatus('mandatory') hwMusaUpReservedBandWidth = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 17, 1, 5), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaUpReservedBandWidth.setStatus('mandatory') hwMusaDownReservedBandWidth = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 17, 1, 6), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaDownReservedBandWidth.setStatus('mandatory') hwMusaUpPracticalBandWidth = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 17, 1, 7), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaUpPracticalBandWidth.setStatus('mandatory') hwMusaDownPracticalBandWidth = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 17, 1, 8), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaDownPracticalBandWidth.setStatus('mandatory') hwMusaTrafficCbrPcrTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 18), ) if mibBuilder.loadTexts: hwMusaTrafficCbrPcrTable.setStatus('mandatory') hwMusaTrafficCbrPcrEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 18, 1), ).setIndexNames((0, "HUAWEI-MUSA-MA5100-MIB", "hwMusaCbrPcrIndex")) if mibBuilder.loadTexts: hwMusaTrafficCbrPcrEntry.setStatus('mandatory') hwMusaCbrPcrIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 18, 1, 1), Integer32()) if mibBuilder.loadTexts: hwMusaCbrPcrIndex.setStatus('mandatory') hwMusaCbrPcrValue = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 18, 1, 2), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaCbrPcrValue.setStatus('mandatory') hwMusaCbrPcrRefCount = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 18, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaCbrPcrRefCount.setStatus('mandatory') hwMusaTrafficRtvbrScrTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 19), ) if mibBuilder.loadTexts: hwMusaTrafficRtvbrScrTable.setStatus('mandatory') hwMusaTrafficRtvbrScrEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 19, 1), ).setIndexNames((0, "HUAWEI-MUSA-MA5100-MIB", "hwMusaRtvbrScrIndex")) if mibBuilder.loadTexts: hwMusaTrafficRtvbrScrEntry.setStatus('mandatory') hwMusaRtvbrScrIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 19, 1, 1), Integer32()) if mibBuilder.loadTexts: hwMusaRtvbrScrIndex.setStatus('mandatory') hwMusaRtvbrScrValue = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 19, 1, 2), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaRtvbrScrValue.setStatus('mandatory') hwMusaRtvbrScrRefCount = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 19, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaRtvbrScrRefCount.setStatus('mandatory') hwMusaPvcTrafficStatisTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 21), ) if mibBuilder.loadTexts: hwMusaPvcTrafficStatisTable.setStatus('mandatory') hwMusaPvcTrafficStatisEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 21, 1), ).setIndexNames((0, "HUAWEI-MUSA-MA5100-MIB", "hwMusaSPvcIndex")) if mibBuilder.loadTexts: hwMusaPvcTrafficStatisEntry.setStatus('mandatory') hwMusaUpStreamTrafficRx = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 21, 1, 1), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaUpStreamTrafficRx.setStatus('mandatory') hwMusaUpStreamTrafficTx = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 21, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaUpStreamTrafficTx.setStatus('mandatory') hwMusaDownStreamTrafficRx = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 21, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaDownStreamTrafficRx.setStatus('mandatory') hwMusaDownStreamTrafficTx = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 21, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaDownStreamTrafficTx.setStatus('mandatory') hwMusaAllPvcConfTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22), ) if mibBuilder.loadTexts: hwMusaAllPvcConfTable.setStatus('mandatory') hwMusaAllPvcConfEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1), ).setIndexNames((0, "HUAWEI-MUSA-MA5100-MIB", "hwMusaTypeOfPvcPvp"), (0, "HUAWEI-MUSA-MA5100-MIB", "hwMusaCidIndex")) if mibBuilder.loadTexts: hwMusaAllPvcConfEntry.setStatus('mandatory') hwMusaCidIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 1), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaCidIndex.setStatus('mandatory') hwMusaSrcFrameId = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 2), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaSrcFrameId.setStatus('mandatory') hwMuasSrcSlotId = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 3), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMuasSrcSlotId.setStatus('mandatory') hwMusaSrcPortVlanVccId = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 4), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaSrcPortVlanVccId.setStatus('mandatory') hwMusaSrcOnuId = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 5), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaSrcOnuId.setStatus('mandatory') hwMusaSrcBoardVpi = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 6), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaSrcBoardVpi.setStatus('mandatory') hwMusaSrcBoardVci = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 7), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaSrcBoardVci.setStatus('mandatory') hwMusaSrcPortType = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("uni", 0), ("sdt", 1), ("udt", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaSrcPortType.setStatus('mandatory') hwMusaSrcCescChannelId = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 9), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaSrcCescChannelId.setStatus('mandatory') hwMusaSrcCescChannelBitmap = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 10), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaSrcCescChannelBitmap.setStatus('mandatory') hwMusaSrcCescFillDegree = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 11), Integer32().subtype(subtypeSpec=ValueRangeConstraint(20, 47))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaSrcCescFillDegree.setStatus('mandatory') hwMusaSrcFrcDlciType = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 12), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 5))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaSrcFrcDlciType.setStatus('mandatory') hwMusaSrcFrcIwfType = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("network11", 0), ("service", 1), ("hdlc", 2), ("networkN1", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaSrcFrcIwfType.setStatus('mandatory') hwMusaSrcFrcActiveStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 14), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("block", 0), ("unblock", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaSrcFrcActiveStatus.setStatus('mandatory') hwMusaSrcFrcFreeBandwidth = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 15), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaSrcFrcFreeBandwidth.setStatus('mandatory') hwMusaSrcApcConnectAttribute = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 16), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaSrcApcConnectAttribute.setStatus('mandatory') hwMusaSrcCescV35N = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 17), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaSrcCescV35N.setStatus('mandatory') hwMusaDestFrameId = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 20), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaDestFrameId.setStatus('mandatory') hwMusaDestSlotId = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 21), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaDestSlotId.setStatus('mandatory') hwMusaDestPortVlanVccId = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 22), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaDestPortVlanVccId.setStatus('mandatory') hwMusaDestOnuId = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 23), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaDestOnuId.setStatus('mandatory') hwMusaDestBoardVpi = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 24), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaDestBoardVpi.setStatus('mandatory') hwMusaDestBoardVci = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 25), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaDestBoardVci.setStatus('mandatory') hwMusaDestPortType = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 26), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("uni", 0), ("sdt", 1), ("udt", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaDestPortType.setStatus('mandatory') hwMusaDestCescChannelId = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 27), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaDestCescChannelId.setStatus('mandatory') hwMusaDestCescChannelBitmap = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 28), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaDestCescChannelBitmap.setStatus('mandatory') hwMusaDestCescFillDegree = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 29), Integer32().subtype(subtypeSpec=ValueRangeConstraint(20, 47))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaDestCescFillDegree.setStatus('mandatory') hwMusaDestFrcDlciType = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 30), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 5))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaDestFrcDlciType.setStatus('mandatory') hwMusaDestFrcIwfType = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 31), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("network11", 0), ("service", 1), ("hdlc", 2), ("networkN1", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaDestFrcIwfType.setStatus('mandatory') hwMusaDestFrcActiveStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 32), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("block", 0), ("unblock", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaDestFrcActiveStatus.setStatus('mandatory') hwMusaDestFrcFreeBandwidth = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 33), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaDestFrcFreeBandwidth.setStatus('mandatory') hwMusaDestApcConnectAttribute = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 34), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaDestApcConnectAttribute.setStatus('mandatory') hwMusaDestCescV35N = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 35), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaDestCescV35N.setStatus('mandatory') hwMusaSrcToDestTraffic = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 38), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaSrcToDestTraffic.setStatus('mandatory') hwMusaDestToSrcTraffic = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 39), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaDestToSrcTraffic.setStatus('mandatory') hwMusaAllPvcOperater = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 40), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("add", 0), ("del", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaAllPvcOperater.setStatus('mandatory') hwMusaTypeOfPvcPvp = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 41), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("pvc", 0), ("pvp", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaTypeOfPvcPvp.setStatus('mandatory') hwMusaPvcPvpState = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 42), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("normal", 1), ("invalid", 2), ("delete", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaPvcPvpState.setStatus('mandatory') hwMusaPvcCidTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 23), ) if mibBuilder.loadTexts: hwMusaPvcCidTable.setStatus('mandatory') hwMusaPvcCidEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 23, 1), ).setIndexNames((0, "HUAWEI-MUSA-MA5100-MIB", "hwMusaFrameIndex"), (0, "HUAWEI-MUSA-MA5100-MIB", "hwMusaSlotIndex"), (0, "HUAWEI-MUSA-MA5100-MIB", "hwMusaSrcPortVlanVccId"), (0, "HUAWEI-MUSA-MA5100-MIB", "hwMusaSrcOnuId"), (0, "HUAWEI-MUSA-MA5100-MIB", "hwMusaSrcBoardVpi"), (0, "HUAWEI-MUSA-MA5100-MIB", "hwMusaSrcBoardVci")) if mibBuilder.loadTexts: hwMusaPvcCidEntry.setStatus('mandatory') hwMusaPvcCid = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 23, 1, 1), Counter32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwMusaPvcCid.setStatus('mandatory') hwMusaPatchOperateTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 24), ) if mibBuilder.loadTexts: hwMusaPatchOperateTable.setStatus('mandatory') hwMusaPatchOperateEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 24, 1), ).setIndexNames((0, "HUAWEI-MUSA-MA5100-MIB", "hwMusaPatchIdIndex")) if mibBuilder.loadTexts: hwMusaPatchOperateEntry.setStatus('mandatory') hwMusaPatchIdIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 24, 1, 1), Integer32()) if mibBuilder.loadTexts: hwMusaPatchIdIndex.setStatus('mandatory') hwMusaPatchLoadProtocol = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 24, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1))).clone(namedValues=NamedValues(("tftp", 1)))).setMaxAccess("writeonly") if mibBuilder.loadTexts: hwMusaPatchLoadProtocol.setStatus('mandatory') hwMusaPatchLoadFilename = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 24, 1, 3), DisplayString()).setMaxAccess("writeonly") if mibBuilder.loadTexts: hwMusaPatchLoadFilename.setStatus('mandatory') hwMusaPatchLoadSerIp = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 24, 1, 4), IpAddress()).setMaxAccess("writeonly") if mibBuilder.loadTexts: hwMusaPatchLoadSerIp.setStatus('mandatory') hwMusaPatchOper = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 24, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("activate", 1), ("deactivate", 2), ("load", 3), ("remove", 4), ("run", 5)))).setMaxAccess("writeonly") if mibBuilder.loadTexts: hwMusaPatchOper.setStatus('mandatory') hwMusaPatchTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 25), ) if mibBuilder.loadTexts: hwMusaPatchTable.setStatus('mandatory') hwMusaPatchEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 25, 1), ).setIndexNames((0, "HUAWEI-MUSA-MA5100-MIB", "hwMusaPatchIdIndex")) if mibBuilder.loadTexts: hwMusaPatchEntry.setStatus('mandatory') hwMusaPatchShowIdIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 25, 1, 1), Integer32()) if mibBuilder.loadTexts: hwMusaPatchShowIdIndex.setStatus('mandatory') hwMusaPatchCRC = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 25, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaPatchCRC.setStatus('mandatory') hwMusaPatchType = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 25, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("c-Commonpatch", 1), ("t-Temporarypatch", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaPatchType.setStatus('mandatory') hwMusaPatchState = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 25, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("run", 1), ("activate", 2), ("deactivate", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaPatchState.setStatus('mandatory') hwMusaPatchCodeAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 25, 1, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaPatchCodeAddress.setStatus('mandatory') hwMusaPatchCodeLength = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 25, 1, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaPatchCodeLength.setStatus('mandatory') hwMusaPatchDataAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 25, 1, 7), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaPatchDataAddress.setStatus('mandatory') hwMusaPatchDataLength = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 25, 1, 8), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaPatchDataLength.setStatus('mandatory') hwMusaPatchFunctionNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 25, 1, 9), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMusaPatchFunctionNumber.setStatus('mandatory') hwMa5100EndOfMib = MibScalar((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 100, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMa5100EndOfMib.setStatus('mandatory') mibBuilder.exportSymbols("HUAWEI-MUSA-MA5100-MIB", hwMusaSrcApcConnectAttribute=hwMusaSrcApcConnectAttribute, hwMusaResetSys=hwMusaResetSys, hwMusaWarningID=hwMusaWarningID, hwMusaOimOpticTable=hwMusaOimOpticTable, hwMusaDestFrameId=hwMusaDestFrameId, hwMusaMcr=hwMusaMcr, hwMusaTrafficEntry=hwMusaTrafficEntry, hwMusaFrameUsedBandWidth=hwMusaFrameUsedBandWidth, hwMusaTrafficTable=hwMusaTrafficTable, hwMusaInsertLAIS=hwMusaInsertLAIS, hwMusaShelfType=hwMusaShelfType, hwMusaIpAddrRejectOper=hwMusaIpAddrRejectOper, hwMusaQueryCurNonCorrectHECNum=hwMusaQueryCurNonCorrectHECNum, hwMusaLoadOperType=hwMusaLoadOperType, hwMusaDestBoardVpi=hwMusaDestBoardVpi, hwMusaPatchEntry=hwMusaPatchEntry, hwMusaSrcBoardVci=hwMusaSrcBoardVci, hwMusaShelfConfTable=hwMusaShelfConfTable, hwMusaClp0pcr=hwMusaClp0pcr, hwMusaInsertBIP1=hwMusaInsertBIP1, hwMusaInsertLOS=hwMusaInsertLOS, hwMusaVlanIciIndex=hwMusaVlanIciIndex, hwMusaWarn24HourThreshold=hwMusaWarn24HourThreshold, hwMusaDestFrcIwfType=hwMusaDestFrcIwfType, hwMusaPatchLoadProtocol=hwMusaPatchLoadProtocol, hwMusaEndOfMib=hwMusaEndOfMib, hwMusaIpAddr=hwMusaIpAddr, hwMusaOperat=hwMusaOperat, hwMusaSrcFrcDlciType=hwMusaSrcFrcDlciType, hwMusaSrcFrcIwfType=hwMusaSrcFrcIwfType, hwMusaMtu=hwMusaMtu, hwMusaEthernetFirewall=hwMusaEthernetFirewall, hwMusaCpuOccupyRate=hwMusaCpuOccupyRate, hwMusaClearOIMErrEventStat=hwMusaClearOIMErrEventStat, hwMusaVlanId=hwMusaVlanId, hwMusaFrameConfEntry=hwMusaFrameConfEntry, hwMusaDestApcConnectAttribute=hwMusaDestApcConnectAttribute, hwMusaTypeOfPvcPvp=hwMusaTypeOfPvcPvp, hwMusaDestCescChannelId=hwMusaDestCescChannelId, hwMusaShelfConfEntry=hwMusaShelfConfEntry, hwMusaUpOpticMainBandWidth=hwMusaUpOpticMainBandWidth, hwMusaSysTime=hwMusaSysTime, hwMusaSysRouteOper=hwMusaSysRouteOper, hwMusaPatchOper=hwMusaPatchOper, hwMusaInsertLRDI=hwMusaInsertLRDI, hwMusaOimPhyEntry=hwMusaOimPhyEntry, hwMusaDownStreamTrafficRx=hwMusaDownStreamTrafficRx, hwMusaSlotIndex=hwMusaSlotIndex, hwMusaUpStreamTrafficTx=hwMusaUpStreamTrafficTx, hwMusaFrameConfTable=hwMusaFrameConfTable, hwMusaQueryCurBIP1=hwMusaQueryCurBIP1, hwMusaInsertBIP3=hwMusaInsertBIP3, hwMusaPatchTable=hwMusaPatchTable, hwMusaSrcPortVlanVccId=hwMusaSrcPortVlanVccId, hwMusaClp01pcr=hwMusaClp01pcr, hwMusaQueryCurUnmatchCellNum=hwMusaQueryCurUnmatchCellNum, hwMusaCampusPvcConfTable=hwMusaCampusPvcConfTable, hwMusaSlotConfTable=hwMusaSlotConfTable, hwMusaSysRouteTable=hwMusaSysRouteTable, hwMusaAllPvcConfTable=hwMusaAllPvcConfTable, hwMusaMbs=hwMusaMbs, hwMusaSetLineLoop=hwMusaSetLineLoop, hwMusaSlotNumber=hwMusaSlotNumber, hwOIMPortIndex=hwOIMPortIndex, hwMusaPatchOperateEntry=hwMusaPatchOperateEntry, hwMusaNmsName=hwMusaNmsName, hwMusaIpRejectTableId=hwMusaIpRejectTableId, hwMusaShelfName=hwMusaShelfName, hwMusaPvcCid=hwMusaPvcCid, hwMusaSlotCardVersion=hwMusaSlotCardVersion, hwMusaSrcFrcActiveStatus=hwMusaSrcFrcActiveStatus, hwMusaCurUsedUpBandWidth=hwMusaCurUsedUpBandWidth, hwMusaNmsFrameId=hwMusaNmsFrameId, hwMusaPvcTrafficStatisTable=hwMusaPvcTrafficStatisTable, hwMusaSlotDownPracticalBandWidth=hwMusaSlotDownPracticalBandWidth, hwMusaInsertBIP2=hwMusaInsertBIP2, hwMusaIpMask=hwMusaIpMask, hwMusaNmsIpAddr=hwMusaNmsIpAddr, hwMusaQueryCurSendCellNum=hwMusaQueryCurSendCellNum, hwMusaAdlSlotId=hwMusaAdlSlotId, hwMusaSlotUpPracticalBandWidth=hwMusaSlotUpPracticalBandWidth, hwMusaOimPhyTable=hwMusaOimPhyTable, hwMusaPatchLoadFilename=hwMusaPatchLoadFilename, hwMusaIpAddrPermitOper=hwMusaIpAddrPermitOper, DisplayString=DisplayString, hwMusaLoadTftpServerIp=hwMusaLoadTftpServerIp, hwMusaIpAddrPermitEntry=hwMusaIpAddrPermitEntry, hwMusaNmsTxTraffic=hwMusaNmsTxTraffic, hwMusaNextTrafficIndex=hwMusaNextTrafficIndex, hwMusaCbrPcrIndex=hwMusaCbrPcrIndex, hwMusaToLanTrafficId=hwMusaToLanTrafficId, hwMusaSlotUpBandWidth=hwMusaSlotUpBandWidth, hwMusaAdlPortCount=hwMusaAdlPortCount, hwMusaAdlPortId=hwMusaAdlPortId, hwMusaPatchCodeLength=hwMusaPatchCodeLength, hwMusaPatchDataLength=hwMusaPatchDataLength, hwMusaPermitEndIp=hwMusaPermitEndIp, hwMusaLoadContent=hwMusaLoadContent, hwMusaAllPvcConfEntry=hwMusaAllPvcConfEntry, hwMusaPvcCidEntry=hwMusaPvcCidEntry, hwMusaPvcPvpState=hwMusaPvcPvpState, hwMusaNmsRxTraffic=hwMusaNmsRxTraffic, hwMusaSlotUsedUpBandWidth=hwMusaSlotUsedUpBandWidth, hwMusaNmsPvcConfEntry=hwMusaNmsPvcConfEntry, hwMusaWarningTerminalCtrl=hwMusaWarningTerminalCtrl, hwMusaCellbusID=hwMusaCellbusID, hwMusaSrcCescChannelId=hwMusaSrcCescChannelId, hwMusaFrame=hwMusaFrame, hwMusaSlotCardOperStatus=hwMusaSlotCardOperStatus, hwMusaSrcFrameId=hwMusaSrcFrameId, hwMusaLoadRateTable=hwMusaLoadRateTable, hwMusaSrcFrcFreeBandwidth=hwMusaSrcFrcFreeBandwidth, hwMusaPatchType=hwMusaPatchType, hwMusaFrameType=hwMusaFrameType, hwMusaWarn15MinThreshold=hwMusaWarn15MinThreshold, hwMusaDestCescFillDegree=hwMusaDestCescFillDegree, hwMusaDestBoardVci=hwMusaDestBoardVci, hwMusaCurUsedDownBandWidth=hwMusaCurUsedDownBandWidth, hwMusaMacAddr=hwMusaMacAddr, hwMusaDestCescChannelBitmap=hwMusaDestCescChannelBitmap, hwMusaSysCpuRatio=hwMusaSysCpuRatio, hwMusaIpAddrPermitTable=hwMusaIpAddrPermitTable, hwMusaDestPortType=hwMusaDestPortType, hwMusaSlotDownBandWidth=hwMusaSlotDownBandWidth, hwMusaQueryCurLOCDNum=hwMusaQueryCurLOCDNum, hwMusaQueryCurBIP3=hwMusaQueryCurBIP3, hwMusaSysRouteEntry=hwMusaSysRouteEntry, hwMusaPatchShowIdIndex=hwMusaPatchShowIdIndex, hwMusaAtmIpAddr=hwMusaAtmIpAddr, hwMusaSrcCescV35N=hwMusaSrcCescV35N, hwMusaDestToSrcTraffic=hwMusaDestToSrcTraffic, hwMusaTrafficRtvbrScrEntry=hwMusaTrafficRtvbrScrEntry, hwMusaLoadType=hwMusaLoadType, hwMusaPatchIdIndex=hwMusaPatchIdIndex, hwMusaDownPracticalBandWidth=hwMusaDownPracticalBandWidth, hwMusaInsertPAIS=hwMusaInsertPAIS, hwMusaFrameBandWidth=hwMusaFrameBandWidth, hwMusaQueryCurPFEBE=hwMusaQueryCurPFEBE, hwMusaShelfNumber=hwMusaShelfNumber, hwMusaQueryMemory=hwMusaQueryMemory, hwMusaDestPortVlanVccId=hwMusaDestPortVlanVccId, hwMusaShelfIndex=hwMusaShelfIndex, hwMusaFrameIndex=hwMusaFrameIndex, hwMusaRefCount=hwMusaRefCount, hwMusaTrafficCbrPcrTable=hwMusaTrafficCbrPcrTable, hwMusaWarningDesc=hwMusaWarningDesc, hwMusaPermitIpMask=hwMusaPermitIpMask, hwMusaDestCescV35N=hwMusaDestCescV35N, hwMusaDnOpticMainBandWidth=hwMusaDnOpticMainBandWidth, hwMusaFromLanTrafficId=hwMusaFromLanTrafficId, hwMusaTrapPort=hwMusaTrapPort, hwMusaSrcCescFillDegree=hwMusaSrcCescFillDegree, hwMusaTrafficRtvbrScrTable=hwMusaTrafficRtvbrScrTable, hwMusaSrcPortType=hwMusaSrcPortType, hwMusaPatchCRC=hwMusaPatchCRC, hwMusaServiceClass=hwMusaServiceClass, hwMusaFrameName=hwMusaFrameName, hwMusaNmsPvcIndex=hwMusaNmsPvcIndex, hwMusaSlotNumbers=hwMusaSlotNumbers, hwMusaNmsRelayVpi=hwMusaNmsRelayVpi, hwMusaInsertLOF=hwMusaInsertLOF, hwMusaSlotIpAddress=hwMusaSlotIpAddress, hwMusaClp0scr=hwMusaClp0scr, hwMusaUpReservedBandWidth=hwMusaUpReservedBandWidth, hwMusaCbrPcrRefCount=hwMusaCbrPcrRefCount, hwMusaRtvbrScrRefCount=hwMusaRtvbrScrRefCount, hwMusaCidIndex=hwMusaCidIndex, hwMusaDestSlotId=hwMusaDestSlotId, hwMusaClp01scr=hwMusaClp01scr, hwMusaSlotGroup=hwMusaSlotGroup, hwMusaQueryCurBIP2=hwMusaQueryCurBIP2, hwMusaAdlPortOperat=hwMusaAdlPortOperat, hwMusaOpticConvergentRate=hwMusaOpticConvergentRate, hwMusaNmsParaConfTable=hwMusaNmsParaConfTable, hwMusaLoadRate=hwMusaLoadRate, hwMusaGatewayIpAddr=hwMusaGatewayIpAddr, hwMusaLoadFileName=hwMusaLoadFileName, hwMusaPvcTrafficStatisEntry=hwMusaPvcTrafficStatisEntry, hwMusaSlotCardAdminStatus=hwMusaSlotCardAdminStatus, hwMusaDestOnuId=hwMusaDestOnuId, hwMusaLoadRateEntry=hwMusaLoadRateEntry, hwMusaResetSlaveMMX=hwMusaResetSlaveMMX, hwMusaQueryCurOOFNum=hwMusaQueryCurOOFNum, hwMusaDestFrcActiveStatus=hwMusaDestFrcActiveStatus, hwMusaPatchLoadSerIp=hwMusaPatchLoadSerIp, hwMusaSetCommunity=hwMusaSetCommunity, hwMusaPatchDataAddress=hwMusaPatchDataAddress, hwMa5100EndOfMib=hwMa5100EndOfMib, hwMuasSrcSlotId=hwMuasSrcSlotId, hwMusaUpPracticalBandWidth=hwMusaUpPracticalBandWidth, hwMusaSlotUsedDownBandWidth=hwMusaSlotUsedDownBandWidth, hwMusaNmsStyle=hwMusaNmsStyle, hwMusaNmsENCAP=hwMusaNmsENCAP, hwMusaFrameNumber=hwMusaFrameNumber, hwMusaNmsParaConfEntry=hwMusaNmsParaConfEntry, hwMusaClearAllAlarmStat=hwMusaClearAllAlarmStat, hwMusaSrcOnuId=hwMusaSrcOnuId, hwMusaSrcCescChannelBitmap=hwMusaSrcCescChannelBitmap, hwMusaWarningLevel=hwMusaWarningLevel, hwMusaAllPvcOperater=hwMusaAllPvcOperater, hwMusaPatchState=hwMusaPatchState, hwMusaOpticBandwidthTable=hwMusaOpticBandwidthTable, hwMusaWarningEngDesc=hwMusaWarningEngDesc, hwMusaNmsIp=hwMusaNmsIp, hwMusaIpAddrRejectTable=hwMusaIpAddrRejectTable, hwMusaIpPermitTableId=hwMusaIpPermitTableId, hwMusaSlotCardType=hwMusaSlotCardType, hwMusaGetCommunity=hwMusaGetCommunity, hwMusaSetUtopiaLoop=hwMusaSetUtopiaLoop, hwMusaWarningCtrlEntry=hwMusaWarningCtrlEntry, hwMusaUpStreamTrafficRx=hwMusaUpStreamTrafficRx, hwMusaSlot=hwMusaSlot, hwMusaTrafficCbrPcrEntry=hwMusaTrafficCbrPcrEntry, hwMusaPvcCidTable=hwMusaPvcCidTable, hwMusaDevice=hwMusaDevice, hwMusaSetSrcLoop=hwMusaSetSrcLoop, hwMusaQueryCurCorrectHECNum=hwMusaQueryCurCorrectHECNum, hwMusaSlotCardSerial=hwMusaSlotCardSerial, hwMusaCbrPcrValue=hwMusaCbrPcrValue, hwMusaRtvbrScrValue=hwMusaRtvbrScrValue, hwMusaDstIp=hwMusaDstIp, hwMusaRtvbrScrIndex=hwMusaRtvbrScrIndex, hwMusaTrafficIndex=hwMusaTrafficIndex, hwMusaNmsSlotId=hwMusaNmsSlotId, hwMusaNmsRelayVci=hwMusaNmsRelayVci, hwMusaQueryCurReceiveCellNum=hwMusaQueryCurReceiveCellNum, hwMusaPatchFunctionNumber=hwMusaPatchFunctionNumber, hwMusaPermitBeginIp=hwMusaPermitBeginIp, hwMusaNmsPvcOper=hwMusaNmsPvcOper, hwMusaAdlVci=hwMusaAdlVci, hwMusaSlotConfEntry=hwMusaSlotConfEntry, hwMusaAtmIpMask=hwMusaAtmIpMask, hwMusaDstIpMask=hwMusaDstIpMask, hwMusaOpticBandwidthEntry=hwMusaOpticBandwidthEntry, hwMusaGetSetPort=hwMusaGetSetPort, hwMusaSlotDescript=hwMusaSlotDescript, hwMusaDownStreamTrafficTx=hwMusaDownStreamTrafficTx, hwMusaPatchOperateTable=hwMusaPatchOperateTable, hwMusaIpAddrRejectEntry=hwMusaIpAddrRejectEntry, hwMusaSysDate=hwMusaSysDate, hwMusaWarningIsCount=hwMusaWarningIsCount, hwMusaQueryCurLFEBE=hwMusaQueryCurLFEBE, hwMusaBiosVersion=hwMusaBiosVersion, hwMusaBoardCellLossPriority=hwMusaBoardCellLossPriority, hwMusaPatchCodeAddress=hwMusaPatchCodeAddress, hwMusaRejectBeginIp=hwMusaRejectBeginIp, hwMusaSysMib=hwMusaSysMib, hwMusaRecordState=hwMusaRecordState, hwMusaLoadProtocol=hwMusaLoadProtocol, hwMusaShelf=hwMusaShelf, hwMusaHostVersion=hwMusaHostVersion, hwMusaNmsSarVci=hwMusaNmsSarVci, hwMusaTrafficType=hwMusaTrafficType, hwMusaAdlVpi=hwMusaAdlVpi) mibBuilder.exportSymbols("HUAWEI-MUSA-MA5100-MIB", hwMusaSrcBoardVpi=hwMusaSrcBoardVpi, hwMa5100Mib=hwMa5100Mib, hwMusaRejectIpMask=hwMusaRejectIpMask, hwMusaCampusPvcConfEntry=hwMusaCampusPvcConfEntry, hwMusaNmsPortVlanId=hwMusaNmsPortVlanId, hwMusaGateIp=hwMusaGateIp, hwMusaRejectEndIp=hwMusaRejectEndIp, hwMusaSrcToDestTraffic=hwMusaSrcToDestTraffic, hwMusaNmsID=hwMusaNmsID, hwMusaWarningCtrlTable=hwMusaWarningCtrlTable, hwMusaSysRouteIndex=hwMusaSysRouteIndex, hwMusaCDVT=hwMusaCDVT, hwMusaDestFrcDlciType=hwMusaDestFrcDlciType, hwMusaOamGroup=hwMusaOamGroup, hwMusaBoardMaxBandwidth=hwMusaBoardMaxBandwidth, hwMusaWarningNmsCtrl=hwMusaWarningNmsCtrl, hwMusaDestFrcFreeBandwidth=hwMusaDestFrcFreeBandwidth, hwMusaNmsOperState=hwMusaNmsOperState, hwMusaNmsPvcConfTable=hwMusaNmsPvcConfTable, hwMusaAdlFrameId=hwMusaAdlFrameId, hwMusaNmsStatus=hwMusaNmsStatus, hwMusaNmsLLCVC=hwMusaNmsLLCVC, hwMusaOimOpticEntry=hwMusaOimOpticEntry, hwMusaFrameNumbers=hwMusaFrameNumbers, hwMusaDownReservedBandWidth=hwMusaDownReservedBandWidth)
(integer, object_identifier, octet_string) = mibBuilder.importSymbols('ASN1', 'Integer', 'ObjectIdentifier', 'OctetString') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_intersection, value_size_constraint, constraints_union, value_range_constraint, single_value_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'ValueSizeConstraint', 'ConstraintsUnion', 'ValueRangeConstraint', 'SingleValueConstraint') (musa,) = mibBuilder.importSymbols('HUAWEI-MIB', 'musa') (notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance') (unsigned32, gauge32, object_identity, counter32, time_ticks, ip_address, mib_identifier, counter64, bits, integer32, mib_scalar, mib_table, mib_table_row, mib_table_column, iso, module_identity, notification_type) = mibBuilder.importSymbols('SNMPv2-SMI', 'Unsigned32', 'Gauge32', 'ObjectIdentity', 'Counter32', 'TimeTicks', 'IpAddress', 'MibIdentifier', 'Counter64', 'Bits', 'Integer32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'iso', 'ModuleIdentity', 'NotificationType') (textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString') class Displaystring(OctetString): pass hw_ma5100_mib = mib_identifier((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5)) hw_musa_sys_mib = mib_identifier((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1)) hw_musa_device = mib_identifier((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1)) hw_musa_end_of_mib = mib_identifier((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 100)) hw_musa_sys_date = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 9), display_string()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaSysDate.setStatus('mandatory') hw_musa_sys_time = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 10), display_string()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaSysTime.setStatus('mandatory') hw_musa_sys_cpu_ratio = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 11), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaSysCpuRatio.setStatus('mandatory') hw_musa_host_version = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 12), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaHostVersion.setStatus('mandatory') hw_musa_reset_sys = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 13), integer32()).setMaxAccess('writeonly') if mibBuilder.loadTexts: hwMusaResetSys.setStatus('mandatory') hw_musa_ip_addr = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 14), ip_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaIpAddr.setStatus('mandatory') hw_musa_ip_mask = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 15), ip_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaIpMask.setStatus('mandatory') hw_musa_gateway_ip_addr = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 16), ip_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaGatewayIpAddr.setStatus('mandatory') hw_musa_mac_addr = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 17), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaMacAddr.setStatus('mandatory') hw_musa_ip_addr_permit_table = mib_table((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 18)) if mibBuilder.loadTexts: hwMusaIpAddrPermitTable.setStatus('mandatory') hw_musa_ip_addr_permit_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 18, 1)).setIndexNames((0, 'HUAWEI-MUSA-MA5100-MIB', 'hwMusaIpPermitTableId')) if mibBuilder.loadTexts: hwMusaIpAddrPermitEntry.setStatus('mandatory') hw_musa_ip_permit_table_id = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 18, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaIpPermitTableId.setStatus('mandatory') hw_musa_ip_addr_permit_oper = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 18, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3))).clone(namedValues=named_values(('add', 0), ('del', 1), ('modify', 2), ('query', 3)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaIpAddrPermitOper.setStatus('mandatory') hw_musa_permit_begin_ip = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 18, 1, 3), ip_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaPermitBeginIp.setStatus('mandatory') hw_musa_permit_end_ip = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 18, 1, 4), ip_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaPermitEndIp.setStatus('mandatory') hw_musa_permit_ip_mask = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 18, 1, 5), ip_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaPermitIpMask.setStatus('mandatory') hw_musa_ip_addr_reject_table = mib_table((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 19)) if mibBuilder.loadTexts: hwMusaIpAddrRejectTable.setStatus('mandatory') hw_musa_ip_addr_reject_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 19, 1)).setIndexNames((0, 'HUAWEI-MUSA-MA5100-MIB', 'hwMusaIpRejectTableId')) if mibBuilder.loadTexts: hwMusaIpAddrRejectEntry.setStatus('mandatory') hw_musa_ip_reject_table_id = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 19, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaIpRejectTableId.setStatus('mandatory') hw_musa_ip_addr_reject_oper = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 19, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3))).clone(namedValues=named_values(('add', 0), ('del', 1), ('modify', 2), ('query', 3)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaIpAddrRejectOper.setStatus('mandatory') hw_musa_reject_begin_ip = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 19, 1, 3), ip_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaRejectBeginIp.setStatus('mandatory') hw_musa_reject_end_ip = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 19, 1, 4), ip_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaRejectEndIp.setStatus('mandatory') hw_musa_reject_ip_mask = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 19, 1, 5), ip_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaRejectIpMask.setStatus('mandatory') hw_musa_atm_ip_addr = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 20), ip_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaAtmIpAddr.setStatus('mandatory') hw_musa_atm_ip_mask = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 21), ip_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaAtmIpMask.setStatus('mandatory') hw_musa_mtu = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 22), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaMtu.setStatus('mandatory') hw_musa_optic_convergent_rate = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 23), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaOpticConvergentRate.setStatus('mandatory') hw_musa_cellbus_id = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 24), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('ma5100', 1), ('ma5103', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaCellbusID.setStatus('mandatory') hw_musa_reset_slave_mmx = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 25), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('loaddata', 1), ('noloaddata', 2)))).setMaxAccess('writeonly') if mibBuilder.loadTexts: hwMusaResetSlaveMMX.setStatus('mandatory') hw_musa_bios_version = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 26), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaBiosVersion.setStatus('mandatory') hw_musa_ethernet_firewall = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 1, 27), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enable', 1), ('disable', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaEthernetFirewall.setStatus('mandatory') hw_musa_nms_pvc_conf_table = mib_table((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 3)) if mibBuilder.loadTexts: hwMusaNmsPvcConfTable.setStatus('mandatory') hw_musa_nms_pvc_conf_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 3, 1)).setIndexNames((0, 'HUAWEI-MUSA-MA5100-MIB', 'hwMusaNmsPvcIndex')) if mibBuilder.loadTexts: hwMusaNmsPvcConfEntry.setStatus('mandatory') hw_musa_nms_pvc_index = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 3, 1, 1), integer32()) if mibBuilder.loadTexts: hwMusaNmsPvcIndex.setStatus('mandatory') hw_musa_nms_relay_vpi = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 3, 1, 2), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaNmsRelayVpi.setStatus('mandatory') hw_musa_nms_relay_vci = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 3, 1, 3), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaNmsRelayVci.setStatus('mandatory') hw_musa_nms_ip = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 3, 1, 4), ip_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaNmsIp.setStatus('mandatory') hw_musa_nms_pvc_oper = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 3, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('add', 0), ('del', 1)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaNmsPvcOper.setStatus('mandatory') hw_musa_nms_rx_traffic = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 3, 1, 8), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaNmsRxTraffic.setStatus('mandatory') hw_musa_nms_tx_traffic = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 3, 1, 9), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaNmsTxTraffic.setStatus('mandatory') hw_musa_nms_sar_vci = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 3, 1, 10), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaNmsSarVci.setStatus('mandatory') hw_musa_nms_llcvc = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 3, 1, 11), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('llc', 1), ('vc', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaNmsLLCVC.setStatus('mandatory') hw_musa_nms_encap = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 3, 1, 12), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('eipoa', 0), ('e1483B', 1)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaNmsENCAP.setStatus('mandatory') hw_musa_nms_frame_id = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 3, 1, 14), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaNmsFrameId.setStatus('mandatory') hw_musa_nms_slot_id = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 3, 1, 15), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaNmsSlotId.setStatus('mandatory') hw_musa_nms_port_vlan_id = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 3, 1, 16), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaNmsPortVlanId.setStatus('mandatory') hw_musa_nms_para_conf_table = mib_table((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 5)) if mibBuilder.loadTexts: hwMusaNmsParaConfTable.setStatus('mandatory') hw_musa_nms_para_conf_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 5, 1)).setIndexNames((0, 'HUAWEI-MUSA-MA5100-MIB', 'hwMusaNmsID')) if mibBuilder.loadTexts: hwMusaNmsParaConfEntry.setStatus('mandatory') hw_musa_nms_id = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 5, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 7))) if mibBuilder.loadTexts: hwMusaNmsID.setStatus('mandatory') hw_musa_nms_oper_state = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 5, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 4, 5))).clone(namedValues=named_values(('add', 0), ('del', 1), ('modify', 2), ('active', 4), ('deactive', 5)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaNmsOperState.setStatus('mandatory') hw_musa_nms_name = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 5, 1, 3), display_string()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaNmsName.setStatus('mandatory') hw_musa_nms_ip_addr = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 5, 1, 4), ip_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaNmsIpAddr.setStatus('mandatory') hw_musa_get_community = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 5, 1, 5), display_string()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaGetCommunity.setStatus('mandatory') hw_musa_set_community = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 5, 1, 6), display_string()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaSetCommunity.setStatus('mandatory') hw_musa_trap_port = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 5, 1, 7), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaTrapPort.setStatus('mandatory') hw_musa_get_set_port = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 5, 1, 8), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaGetSetPort.setStatus('mandatory') hw_musa_nms_status = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 5, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('active', 1), ('deactive', 2), ('commfail', 3), ('uninstall', 4)))).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaNmsStatus.setStatus('mandatory') hw_musa_nms_style = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 5, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('bandin', 0), ('bandout', 1)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaNmsStyle.setStatus('mandatory') hw_musa_slot_group = mib_identifier((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6)) hw_musa_shelf = mib_identifier((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 1)) hw_musa_frame = mib_identifier((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 2)) hw_musa_slot = mib_identifier((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3)) hw_musa_shelf_number = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaShelfNumber.setStatus('mandatory') hw_musa_shelf_conf_table = mib_table((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 1, 2)) if mibBuilder.loadTexts: hwMusaShelfConfTable.setStatus('mandatory') hw_musa_shelf_conf_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 1, 2, 1)).setIndexNames((0, 'HUAWEI-MUSA-MA5100-MIB', 'hwMusaShelfIndex')) if mibBuilder.loadTexts: hwMusaShelfConfEntry.setStatus('mandatory') hw_musa_shelf_index = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 1, 2, 1, 1), integer32()) if mibBuilder.loadTexts: hwMusaShelfIndex.setStatus('mandatory') hw_musa_shelf_type = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 1, 2, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('other', 1), ('empty', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaShelfType.setStatus('mandatory') hw_musa_shelf_name = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 1, 2, 1, 3), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaShelfName.setStatus('mandatory') hw_musa_frame_numbers = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 1, 2, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaFrameNumbers.setStatus('mandatory') hw_musa_frame_number = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 2, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaFrameNumber.setStatus('mandatory') hw_musa_frame_conf_table = mib_table((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 2, 2)) if mibBuilder.loadTexts: hwMusaFrameConfTable.setStatus('mandatory') hw_musa_frame_conf_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 2, 2, 1)).setIndexNames((0, 'HUAWEI-MUSA-MA5100-MIB', 'hwMusaShelfIndex'), (0, 'HUAWEI-MUSA-MA5100-MIB', 'hwMusaFrameIndex')) if mibBuilder.loadTexts: hwMusaFrameConfEntry.setStatus('mandatory') hw_musa_frame_index = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 2, 2, 1, 1), integer32()) if mibBuilder.loadTexts: hwMusaFrameIndex.setStatus('mandatory') hw_musa_frame_type = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 2, 2, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('other', 1), ('empty', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaFrameType.setStatus('mandatory') hw_musa_frame_name = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 2, 2, 1, 3), display_string().subtype(subtypeSpec=value_size_constraint(0, 20))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaFrameName.setStatus('mandatory') hw_musa_slot_numbers = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 2, 2, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaSlotNumbers.setStatus('mandatory') hw_musa_frame_band_width = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 2, 2, 1, 5), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaFrameBandWidth.setStatus('mandatory') hw_musa_frame_used_band_width = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 2, 2, 1, 6), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaFrameUsedBandWidth.setStatus('mandatory') hw_musa_slot_number = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaSlotNumber.setStatus('mandatory') hw_musa_slot_conf_table = mib_table((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3, 2)) if mibBuilder.loadTexts: hwMusaSlotConfTable.setStatus('mandatory') hw_musa_slot_conf_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3, 2, 1)).setIndexNames((0, 'HUAWEI-MUSA-MA5100-MIB', 'hwMusaFrameIndex'), (0, 'HUAWEI-MUSA-MA5100-MIB', 'hwMusaSlotIndex')) if mibBuilder.loadTexts: hwMusaSlotConfEntry.setStatus('mandatory') hw_musa_slot_index = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3, 2, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 15))) if mibBuilder.loadTexts: hwMusaSlotIndex.setStatus('mandatory') hw_musa_slot_card_type = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3, 2, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 19, 21, 25))).clone(namedValues=named_values(('null', 0), ('mmx', 1), ('smx', 2), ('adl', 3), ('lanb', 4), ('lana', 5), ('cesa', 6), ('cesb', 7), ('spl', 8), ('fra', 9), ('adlb', 10), ('unknown', 11), ('splb', 12), ('sep', 13), ('smxa', 14), ('smxb', 15), ('pots', 16), ('splc', 18), ('lan', 19), ('adlc', 21), ('adld', 25)))).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaSlotCardType.setStatus('mandatory') hw_musa_slot_card_serial = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3, 2, 1, 3), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaSlotCardSerial.setStatus('mandatory') hw_musa_slot_card_version = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3, 2, 1, 4), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaSlotCardVersion.setStatus('mandatory') hw_musa_slot_ip_address = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3, 2, 1, 5), ip_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaSlotIpAddress.setStatus('mandatory') hw_musa_slot_card_admin_status = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3, 2, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13))).clone(namedValues=named_values(('noinstall', 0), ('normal', 1), ('fault', 2), ('mainnormal', 3), ('mainfault', 4), ('baknormal', 5), ('bakfault', 6), ('forbid', 7), ('config', 8), ('online', 10), ('none', 11), ('commok', 12), ('commfail', 13)))).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaSlotCardAdminStatus.setStatus('mandatory') hw_musa_slot_card_oper_status = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3, 2, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9))).clone(namedValues=named_values(('del', 0), ('add', 1), ('reset', 2), ('use', 3), ('nouse', 4), ('inverse', 5), ('mmxswitchover', 6), ('delmmxsubboard', 7), ('addaiusubboard', 8), ('delaiusubboard', 9)))).setMaxAccess('writeonly') if mibBuilder.loadTexts: hwMusaSlotCardOperStatus.setStatus('mandatory') hw_musa_slot_descript = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3, 2, 1, 8), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaSlotDescript.setStatus('mandatory') hw_musa_board_cell_loss_priority = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3, 2, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('low', 0), ('high', 1)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaBoardCellLossPriority.setStatus('mandatory') hw_musa_board_max_bandwidth = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3, 2, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3))).clone(namedValues=named_values(('b-155M', 0), ('b-80M', 1), ('b-20M', 2), ('b-4M', 3)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaBoardMaxBandwidth.setStatus('mandatory') hw_musa_cpu_occupy_rate = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3, 2, 1, 11), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaCpuOccupyRate.setStatus('mandatory') hw_musa_query_memory = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3, 2, 1, 12), display_string()).setMaxAccess('writeonly') if mibBuilder.loadTexts: hwMusaQueryMemory.setStatus('mandatory') hw_musa_load_protocol = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3, 2, 1, 13), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0))).clone(namedValues=named_values(('tftp', 0)))).setMaxAccess('writeonly') if mibBuilder.loadTexts: hwMusaLoadProtocol.setStatus('mandatory') hw_musa_load_content = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3, 2, 1, 14), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(6, 8, 7))).clone(namedValues=named_values(('program', 6), ('data', 8), ('fpga', 7)))).setMaxAccess('writeonly') if mibBuilder.loadTexts: hwMusaLoadContent.setStatus('mandatory') hw_musa_load_tftp_server_ip = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3, 2, 1, 15), ip_address()).setMaxAccess('writeonly') if mibBuilder.loadTexts: hwMusaLoadTftpServerIp.setStatus('mandatory') hw_musa_load_file_name = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3, 2, 1, 16), display_string()).setMaxAccess('writeonly') if mibBuilder.loadTexts: hwMusaLoadFileName.setStatus('mandatory') hw_musa_load_oper_type = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3, 2, 1, 17), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4))).clone(namedValues=named_values(('load', 0), ('upback', 1), ('downback', 2), ('rollback', 3), ('clearflash', 4)))).setMaxAccess('writeonly') if mibBuilder.loadTexts: hwMusaLoadOperType.setStatus('mandatory') hw_musa_slot_up_band_width = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3, 2, 1, 18), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaSlotUpBandWidth.setStatus('mandatory') hw_musa_slot_down_band_width = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3, 2, 1, 19), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaSlotDownBandWidth.setStatus('mandatory') hw_musa_slot_used_up_band_width = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3, 2, 1, 20), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaSlotUsedUpBandWidth.setStatus('mandatory') hw_musa_slot_used_down_band_width = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3, 2, 1, 21), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaSlotUsedDownBandWidth.setStatus('mandatory') hw_musa_slot_up_practical_band_width = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3, 2, 1, 22), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaSlotUpPracticalBandWidth.setStatus('mandatory') hw_musa_slot_down_practical_band_width = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 6, 3, 2, 1, 23), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaSlotDownPracticalBandWidth.setStatus('mandatory') hw_musa_oam_group = mib_identifier((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7)) hw_musa_oim_phy_table = mib_table((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 1)) if mibBuilder.loadTexts: hwMusaOimPhyTable.setStatus('mandatory') hw_musa_oim_phy_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 1, 1)).setIndexNames((0, 'HUAWEI-MUSA-MA5100-MIB', 'hwMusaFrameIndex'), (0, 'HUAWEI-MUSA-MA5100-MIB', 'hwMusaSlotIndex'), (0, 'HUAWEI-MUSA-MA5100-MIB', 'hwOIMPortIndex')) if mibBuilder.loadTexts: hwMusaOimPhyEntry.setStatus('mandatory') hw_oim_port_index = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 1, 1, 1), integer32()) if mibBuilder.loadTexts: hwOIMPortIndex.setStatus('mandatory') hw_musa_set_src_loop = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 1, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('notloop', 0), ('loop', 1)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaSetSrcLoop.setStatus('mandatory') hw_musa_set_line_loop = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 1, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('notloop', 0), ('loop', 1)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaSetLineLoop.setStatus('mandatory') hw_musa_set_utopia_loop = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 1, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('notloop', 0), ('loop', 1)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaSetUtopiaLoop.setStatus('mandatory') hw_musa_insert_lof = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 1, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('notinsert', 0), ('insert', 1)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaInsertLOF.setStatus('mandatory') hw_musa_insert_los = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 1, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('notinsert', 0), ('insert', 1)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaInsertLOS.setStatus('mandatory') hw_musa_insert_bip1 = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 1, 1, 7), integer32()).setMaxAccess('writeonly') if mibBuilder.loadTexts: hwMusaInsertBIP1.setStatus('mandatory') hw_musa_insert_bip2 = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 1, 1, 8), integer32()).setMaxAccess('writeonly') if mibBuilder.loadTexts: hwMusaInsertBIP2.setStatus('mandatory') hw_musa_insert_bip3 = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 1, 1, 9), integer32()).setMaxAccess('writeonly') if mibBuilder.loadTexts: hwMusaInsertBIP3.setStatus('mandatory') hw_musa_insert_lais = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 1, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('notinsert', 0), ('insert', 1)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaInsertLAIS.setStatus('mandatory') hw_musa_insert_pais = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 1, 1, 11), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('notinsert', 0), ('insert', 1)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaInsertPAIS.setStatus('mandatory') hw_musa_insert_lrdi = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 1, 1, 12), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('notinsert', 0), ('insert', 1)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaInsertLRDI.setStatus('mandatory') hw_musa_oim_optic_table = mib_table((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 2)) if mibBuilder.loadTexts: hwMusaOimOpticTable.setStatus('mandatory') hw_musa_oim_optic_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 2, 1)).setIndexNames((0, 'HUAWEI-MUSA-MA5100-MIB', 'hwMusaFrameIndex'), (0, 'HUAWEI-MUSA-MA5100-MIB', 'hwMusaSlotIndex'), (0, 'HUAWEI-MUSA-MA5100-MIB', 'hwOIMPortIndex')) if mibBuilder.loadTexts: hwMusaOimOpticEntry.setStatus('mandatory') hw_musa_query_cur_bip1 = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 2, 1, 1), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaQueryCurBIP1.setStatus('mandatory') hw_musa_query_cur_bip2 = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 2, 1, 2), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaQueryCurBIP2.setStatus('mandatory') hw_musa_query_cur_bip3 = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 2, 1, 3), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaQueryCurBIP3.setStatus('mandatory') hw_musa_query_cur_lfebe = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 2, 1, 4), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaQueryCurLFEBE.setStatus('mandatory') hw_musa_query_cur_pfebe = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 2, 1, 5), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaQueryCurPFEBE.setStatus('mandatory') hw_musa_query_cur_send_cell_num = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 2, 1, 6), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaQueryCurSendCellNum.setStatus('mandatory') hw_musa_query_cur_receive_cell_num = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 2, 1, 7), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaQueryCurReceiveCellNum.setStatus('mandatory') hw_musa_query_cur_correct_hec_num = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 2, 1, 8), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaQueryCurCorrectHECNum.setStatus('mandatory') hw_musa_query_cur_non_correct_hec_num = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 2, 1, 9), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaQueryCurNonCorrectHECNum.setStatus('mandatory') hw_musa_query_cur_locd_num = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 2, 1, 10), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaQueryCurLOCDNum.setStatus('mandatory') hw_musa_query_cur_unmatch_cell_num = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 2, 1, 11), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaQueryCurUnmatchCellNum.setStatus('mandatory') hw_musa_query_cur_oof_num = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 2, 1, 12), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaQueryCurOOFNum.setStatus('mandatory') hw_musa_clear_all_alarm_stat = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 2, 1, 13), integer32()).setMaxAccess('writeonly') if mibBuilder.loadTexts: hwMusaClearAllAlarmStat.setStatus('mandatory') hw_musa_clear_oim_err_event_stat = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 7, 2, 1, 14), integer32()).setMaxAccess('writeonly') if mibBuilder.loadTexts: hwMusaClearOIMErrEventStat.setStatus('mandatory') hw_musa_warning_ctrl_table = mib_table((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 9)) if mibBuilder.loadTexts: hwMusaWarningCtrlTable.setStatus('mandatory') hw_musa_warning_ctrl_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 9, 1)).setIndexNames((0, 'HUAWEI-MUSA-MA5100-MIB', 'hwMusaWarningID')) if mibBuilder.loadTexts: hwMusaWarningCtrlEntry.setStatus('mandatory') hw_musa_warning_id = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 9, 1, 1), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaWarningID.setStatus('mandatory') hw_musa_warning_level = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 9, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4))).clone(namedValues=named_values(('notify', 0), ('normal', 1), ('serious', 2), ('fatal', 3), ('default', 4)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaWarningLevel.setStatus('mandatory') hw_musa_warning_nms_ctrl = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 9, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('off', 0), ('on', 1)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaWarningNmsCtrl.setStatus('mandatory') hw_musa_warning_terminal_ctrl = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 9, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('off', 0), ('on', 1)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaWarningTerminalCtrl.setStatus('mandatory') hw_musa_warning_is_count = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 9, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('off', 0), ('on', 1)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaWarningIsCount.setStatus('mandatory') hw_musa_warn15_min_threshold = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 9, 1, 6), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaWarn15MinThreshold.setStatus('mandatory') hw_musa_warn24_hour_threshold = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 9, 1, 7), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaWarn24HourThreshold.setStatus('mandatory') hw_musa_warning_desc = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 9, 1, 8), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaWarningDesc.setStatus('mandatory') hw_musa_warning_eng_desc = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 9, 1, 9), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaWarningEngDesc.setStatus('mandatory') hw_musa_sys_route_table = mib_table((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 10)) if mibBuilder.loadTexts: hwMusaSysRouteTable.setStatus('mandatory') hw_musa_sys_route_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 10, 1)).setIndexNames((0, 'HUAWEI-MUSA-MA5100-MIB', 'hwMusaSysRouteIndex')) if mibBuilder.loadTexts: hwMusaSysRouteEntry.setStatus('mandatory') hw_musa_sys_route_index = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 10, 1, 1), integer32()) if mibBuilder.loadTexts: hwMusaSysRouteIndex.setStatus('mandatory') hw_musa_dst_ip = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 10, 1, 2), ip_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaDstIp.setStatus('mandatory') hw_musa_dst_ip_mask = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 10, 1, 3), ip_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaDstIpMask.setStatus('mandatory') hw_musa_gate_ip = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 10, 1, 4), ip_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaGateIp.setStatus('mandatory') hw_musa_sys_route_oper = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 10, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('add', 0), ('del', 1)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaSysRouteOper.setStatus('mandatory') hw_musa_load_rate_table = mib_table((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 11)) if mibBuilder.loadTexts: hwMusaLoadRateTable.setStatus('mandatory') hw_musa_load_rate_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 11, 1)).setIndexNames((0, 'HUAWEI-MUSA-MA5100-MIB', 'hwMusaFrameIndex'), (0, 'HUAWEI-MUSA-MA5100-MIB', 'hwMusaSlotIndex')) if mibBuilder.loadTexts: hwMusaLoadRateEntry.setStatus('mandatory') hw_musa_load_rate = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 11, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaLoadRate.setStatus('mandatory') hw_musa_load_type = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 11, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7, 8))).clone(namedValues=named_values(('noOper', 0), ('backData', 1), ('dumpData', 2), ('loadData', 3), ('loadProc', 4), ('loadFpga', 5), ('program', 6), ('fpga', 7), ('data', 8)))).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaLoadType.setStatus('mandatory') hw_musa_traffic_table = mib_table((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 13)) if mibBuilder.loadTexts: hwMusaTrafficTable.setStatus('mandatory') hw_musa_traffic_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 13, 1)).setIndexNames((0, 'HUAWEI-MUSA-MA5100-MIB', 'hwMusaTrafficIndex')) if mibBuilder.loadTexts: hwMusaTrafficEntry.setStatus('mandatory') hw_musa_traffic_index = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 13, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 5000))) if mibBuilder.loadTexts: hwMusaTrafficIndex.setStatus('mandatory') hw_musa_traffic_type = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 13, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14))).clone(namedValues=named_values(('noclpnoscr', 1), ('clpnotaggingnoscr', 2), ('clptaggingnoscr', 3), ('noclpscr', 4), ('clpnotaggingscr', 5), ('clptaggingscr', 6), ('clpnotaggingmcr', 7), ('clptransparentnoscr', 8), ('clptransparentscr', 9), ('noclptaggingnoscr', 10), ('noclpnoscrcdvt', 11), ('noclpscrcdvt', 12), ('clpnotaggingscrcdvt', 13), ('clptaggingscrcdvt', 14)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaTrafficType.setStatus('mandatory') hw_musa_service_class = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 13, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(2, 3, 4, 6))).clone(namedValues=named_values(('cbr', 2), ('rtVBR', 3), ('nrtVBR', 4), ('ubr', 6)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaServiceClass.setStatus('mandatory') hw_musa_ref_count = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 13, 1, 4), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaRefCount.setStatus('mandatory') hw_musa_record_state = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 13, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('disable', 0), ('enable', 1), ('module', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaRecordState.setStatus('mandatory') hw_musa_clp01pcr = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 13, 1, 6), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaClp01pcr.setStatus('mandatory') hw_musa_clp0pcr = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 13, 1, 7), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaClp0pcr.setStatus('mandatory') hw_musa_clp01scr = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 13, 1, 8), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaClp01scr.setStatus('mandatory') hw_musa_clp0scr = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 13, 1, 9), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaClp0scr.setStatus('mandatory') hw_musa_mbs = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 13, 1, 10), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaMbs.setStatus('mandatory') hw_musa_mcr = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 13, 1, 11), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaMcr.setStatus('mandatory') hw_musa_cdvt = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 13, 1, 12), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaCDVT.setStatus('mandatory') hw_musa_operat = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 13, 1, 13), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('add', 0), ('del', 1)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaOperat.setStatus('mandatory') hw_musa_next_traffic_index = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 13, 1, 14), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaNextTrafficIndex.setStatus('mandatory') hw_musa_campus_pvc_conf_table = mib_table((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 15)) if mibBuilder.loadTexts: hwMusaCampusPvcConfTable.setStatus('mandatory') hw_musa_campus_pvc_conf_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 15, 1)).setIndexNames((0, 'HUAWEI-MUSA-MA5100-MIB', 'hwMusaFrameIndex'), (0, 'HUAWEI-MUSA-MA5100-MIB', 'hwMusaSlotIndex'), (0, 'HUAWEI-MUSA-MA5100-MIB', 'hwMusaVlanId'), (0, 'HUAWEI-MUSA-MA5100-MIB', 'hwMusaVlanIciIndex')) if mibBuilder.loadTexts: hwMusaCampusPvcConfEntry.setStatus('mandatory') hw_musa_vlan_id = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 15, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 63))).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaVlanId.setStatus('mandatory') hw_musa_vlan_ici_index = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 15, 1, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaVlanIciIndex.setStatus('mandatory') hw_musa_adl_port_count = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 15, 1, 3), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaAdlPortCount.setStatus('mandatory') hw_musa_adl_frame_id = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 15, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 4))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaAdlFrameId.setStatus('mandatory') hw_musa_adl_slot_id = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 15, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(1, 15))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaAdlSlotId.setStatus('mandatory') hw_musa_adl_port_id = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 15, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(0, 15))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaAdlPortId.setStatus('mandatory') hw_musa_adl_vpi = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 15, 1, 7), integer32().subtype(subtypeSpec=value_range_constraint(0, 127))).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaAdlVpi.setStatus('mandatory') hw_musa_adl_vci = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 15, 1, 8), integer32().subtype(subtypeSpec=value_range_constraint(32, 127))).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaAdlVci.setStatus('mandatory') hw_musa_to_lan_traffic_id = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 15, 1, 9), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaToLanTrafficId.setStatus('mandatory') hw_musa_from_lan_traffic_id = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 15, 1, 10), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaFromLanTrafficId.setStatus('mandatory') hw_musa_adl_port_operat = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 15, 1, 11), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('add', 0), ('del', 1)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaAdlPortOperat.setStatus('mandatory') hw_musa_optic_bandwidth_table = mib_table((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 17)) if mibBuilder.loadTexts: hwMusaOpticBandwidthTable.setStatus('mandatory') hw_musa_optic_bandwidth_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 17, 1)).setIndexNames((0, 'HUAWEI-MUSA-MA5100-MIB', 'hwMusaFrameIndex'), (0, 'HUAWEI-MUSA-MA5100-MIB', 'hwMusaSlotIndex'), (0, 'HUAWEI-MUSA-MA5100-MIB', 'hwOIMPortIndex')) if mibBuilder.loadTexts: hwMusaOpticBandwidthEntry.setStatus('mandatory') hw_musa_up_optic_main_band_width = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 17, 1, 1), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaUpOpticMainBandWidth.setStatus('mandatory') hw_musa_dn_optic_main_band_width = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 17, 1, 2), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaDnOpticMainBandWidth.setStatus('mandatory') hw_musa_cur_used_up_band_width = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 17, 1, 3), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaCurUsedUpBandWidth.setStatus('mandatory') hw_musa_cur_used_down_band_width = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 17, 1, 4), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaCurUsedDownBandWidth.setStatus('mandatory') hw_musa_up_reserved_band_width = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 17, 1, 5), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaUpReservedBandWidth.setStatus('mandatory') hw_musa_down_reserved_band_width = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 17, 1, 6), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaDownReservedBandWidth.setStatus('mandatory') hw_musa_up_practical_band_width = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 17, 1, 7), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaUpPracticalBandWidth.setStatus('mandatory') hw_musa_down_practical_band_width = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 17, 1, 8), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaDownPracticalBandWidth.setStatus('mandatory') hw_musa_traffic_cbr_pcr_table = mib_table((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 18)) if mibBuilder.loadTexts: hwMusaTrafficCbrPcrTable.setStatus('mandatory') hw_musa_traffic_cbr_pcr_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 18, 1)).setIndexNames((0, 'HUAWEI-MUSA-MA5100-MIB', 'hwMusaCbrPcrIndex')) if mibBuilder.loadTexts: hwMusaTrafficCbrPcrEntry.setStatus('mandatory') hw_musa_cbr_pcr_index = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 18, 1, 1), integer32()) if mibBuilder.loadTexts: hwMusaCbrPcrIndex.setStatus('mandatory') hw_musa_cbr_pcr_value = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 18, 1, 2), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaCbrPcrValue.setStatus('mandatory') hw_musa_cbr_pcr_ref_count = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 18, 1, 3), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaCbrPcrRefCount.setStatus('mandatory') hw_musa_traffic_rtvbr_scr_table = mib_table((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 19)) if mibBuilder.loadTexts: hwMusaTrafficRtvbrScrTable.setStatus('mandatory') hw_musa_traffic_rtvbr_scr_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 19, 1)).setIndexNames((0, 'HUAWEI-MUSA-MA5100-MIB', 'hwMusaRtvbrScrIndex')) if mibBuilder.loadTexts: hwMusaTrafficRtvbrScrEntry.setStatus('mandatory') hw_musa_rtvbr_scr_index = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 19, 1, 1), integer32()) if mibBuilder.loadTexts: hwMusaRtvbrScrIndex.setStatus('mandatory') hw_musa_rtvbr_scr_value = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 19, 1, 2), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaRtvbrScrValue.setStatus('mandatory') hw_musa_rtvbr_scr_ref_count = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 19, 1, 3), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaRtvbrScrRefCount.setStatus('mandatory') hw_musa_pvc_traffic_statis_table = mib_table((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 21)) if mibBuilder.loadTexts: hwMusaPvcTrafficStatisTable.setStatus('mandatory') hw_musa_pvc_traffic_statis_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 21, 1)).setIndexNames((0, 'HUAWEI-MUSA-MA5100-MIB', 'hwMusaSPvcIndex')) if mibBuilder.loadTexts: hwMusaPvcTrafficStatisEntry.setStatus('mandatory') hw_musa_up_stream_traffic_rx = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 21, 1, 1), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaUpStreamTrafficRx.setStatus('mandatory') hw_musa_up_stream_traffic_tx = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 21, 1, 2), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaUpStreamTrafficTx.setStatus('mandatory') hw_musa_down_stream_traffic_rx = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 21, 1, 3), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaDownStreamTrafficRx.setStatus('mandatory') hw_musa_down_stream_traffic_tx = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 21, 1, 4), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaDownStreamTrafficTx.setStatus('mandatory') hw_musa_all_pvc_conf_table = mib_table((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22)) if mibBuilder.loadTexts: hwMusaAllPvcConfTable.setStatus('mandatory') hw_musa_all_pvc_conf_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1)).setIndexNames((0, 'HUAWEI-MUSA-MA5100-MIB', 'hwMusaTypeOfPvcPvp'), (0, 'HUAWEI-MUSA-MA5100-MIB', 'hwMusaCidIndex')) if mibBuilder.loadTexts: hwMusaAllPvcConfEntry.setStatus('mandatory') hw_musa_cid_index = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 1), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaCidIndex.setStatus('mandatory') hw_musa_src_frame_id = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 2), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaSrcFrameId.setStatus('mandatory') hw_muas_src_slot_id = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 3), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMuasSrcSlotId.setStatus('mandatory') hw_musa_src_port_vlan_vcc_id = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 4), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaSrcPortVlanVccId.setStatus('mandatory') hw_musa_src_onu_id = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 5), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaSrcOnuId.setStatus('mandatory') hw_musa_src_board_vpi = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 6), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaSrcBoardVpi.setStatus('mandatory') hw_musa_src_board_vci = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 7), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaSrcBoardVci.setStatus('mandatory') hw_musa_src_port_type = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('uni', 0), ('sdt', 1), ('udt', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaSrcPortType.setStatus('mandatory') hw_musa_src_cesc_channel_id = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 9), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaSrcCescChannelId.setStatus('mandatory') hw_musa_src_cesc_channel_bitmap = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 10), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaSrcCescChannelBitmap.setStatus('mandatory') hw_musa_src_cesc_fill_degree = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 11), integer32().subtype(subtypeSpec=value_range_constraint(20, 47))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaSrcCescFillDegree.setStatus('mandatory') hw_musa_src_frc_dlci_type = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 12), integer32().subtype(subtypeSpec=value_range_constraint(1, 5))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaSrcFrcDlciType.setStatus('mandatory') hw_musa_src_frc_iwf_type = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 13), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3))).clone(namedValues=named_values(('network11', 0), ('service', 1), ('hdlc', 2), ('networkN1', 3)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaSrcFrcIwfType.setStatus('mandatory') hw_musa_src_frc_active_status = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 14), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('block', 0), ('unblock', 1)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaSrcFrcActiveStatus.setStatus('mandatory') hw_musa_src_frc_free_bandwidth = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 15), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaSrcFrcFreeBandwidth.setStatus('mandatory') hw_musa_src_apc_connect_attribute = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 16), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaSrcApcConnectAttribute.setStatus('mandatory') hw_musa_src_cesc_v35_n = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 17), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaSrcCescV35N.setStatus('mandatory') hw_musa_dest_frame_id = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 20), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaDestFrameId.setStatus('mandatory') hw_musa_dest_slot_id = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 21), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaDestSlotId.setStatus('mandatory') hw_musa_dest_port_vlan_vcc_id = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 22), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaDestPortVlanVccId.setStatus('mandatory') hw_musa_dest_onu_id = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 23), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaDestOnuId.setStatus('mandatory') hw_musa_dest_board_vpi = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 24), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaDestBoardVpi.setStatus('mandatory') hw_musa_dest_board_vci = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 25), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaDestBoardVci.setStatus('mandatory') hw_musa_dest_port_type = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 26), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('uni', 0), ('sdt', 1), ('udt', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaDestPortType.setStatus('mandatory') hw_musa_dest_cesc_channel_id = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 27), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaDestCescChannelId.setStatus('mandatory') hw_musa_dest_cesc_channel_bitmap = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 28), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaDestCescChannelBitmap.setStatus('mandatory') hw_musa_dest_cesc_fill_degree = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 29), integer32().subtype(subtypeSpec=value_range_constraint(20, 47))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaDestCescFillDegree.setStatus('mandatory') hw_musa_dest_frc_dlci_type = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 30), integer32().subtype(subtypeSpec=value_range_constraint(1, 5))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaDestFrcDlciType.setStatus('mandatory') hw_musa_dest_frc_iwf_type = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 31), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3))).clone(namedValues=named_values(('network11', 0), ('service', 1), ('hdlc', 2), ('networkN1', 3)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaDestFrcIwfType.setStatus('mandatory') hw_musa_dest_frc_active_status = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 32), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('block', 0), ('unblock', 1)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaDestFrcActiveStatus.setStatus('mandatory') hw_musa_dest_frc_free_bandwidth = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 33), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaDestFrcFreeBandwidth.setStatus('mandatory') hw_musa_dest_apc_connect_attribute = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 34), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaDestApcConnectAttribute.setStatus('mandatory') hw_musa_dest_cesc_v35_n = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 35), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaDestCescV35N.setStatus('mandatory') hw_musa_src_to_dest_traffic = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 38), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaSrcToDestTraffic.setStatus('mandatory') hw_musa_dest_to_src_traffic = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 39), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaDestToSrcTraffic.setStatus('mandatory') hw_musa_all_pvc_operater = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 40), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('add', 0), ('del', 1)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaAllPvcOperater.setStatus('mandatory') hw_musa_type_of_pvc_pvp = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 41), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('pvc', 0), ('pvp', 1)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaTypeOfPvcPvp.setStatus('mandatory') hw_musa_pvc_pvp_state = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 22, 1, 42), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('normal', 1), ('invalid', 2), ('delete', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaPvcPvpState.setStatus('mandatory') hw_musa_pvc_cid_table = mib_table((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 23)) if mibBuilder.loadTexts: hwMusaPvcCidTable.setStatus('mandatory') hw_musa_pvc_cid_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 23, 1)).setIndexNames((0, 'HUAWEI-MUSA-MA5100-MIB', 'hwMusaFrameIndex'), (0, 'HUAWEI-MUSA-MA5100-MIB', 'hwMusaSlotIndex'), (0, 'HUAWEI-MUSA-MA5100-MIB', 'hwMusaSrcPortVlanVccId'), (0, 'HUAWEI-MUSA-MA5100-MIB', 'hwMusaSrcOnuId'), (0, 'HUAWEI-MUSA-MA5100-MIB', 'hwMusaSrcBoardVpi'), (0, 'HUAWEI-MUSA-MA5100-MIB', 'hwMusaSrcBoardVci')) if mibBuilder.loadTexts: hwMusaPvcCidEntry.setStatus('mandatory') hw_musa_pvc_cid = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 23, 1, 1), counter32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hwMusaPvcCid.setStatus('mandatory') hw_musa_patch_operate_table = mib_table((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 24)) if mibBuilder.loadTexts: hwMusaPatchOperateTable.setStatus('mandatory') hw_musa_patch_operate_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 24, 1)).setIndexNames((0, 'HUAWEI-MUSA-MA5100-MIB', 'hwMusaPatchIdIndex')) if mibBuilder.loadTexts: hwMusaPatchOperateEntry.setStatus('mandatory') hw_musa_patch_id_index = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 24, 1, 1), integer32()) if mibBuilder.loadTexts: hwMusaPatchIdIndex.setStatus('mandatory') hw_musa_patch_load_protocol = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 24, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1))).clone(namedValues=named_values(('tftp', 1)))).setMaxAccess('writeonly') if mibBuilder.loadTexts: hwMusaPatchLoadProtocol.setStatus('mandatory') hw_musa_patch_load_filename = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 24, 1, 3), display_string()).setMaxAccess('writeonly') if mibBuilder.loadTexts: hwMusaPatchLoadFilename.setStatus('mandatory') hw_musa_patch_load_ser_ip = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 24, 1, 4), ip_address()).setMaxAccess('writeonly') if mibBuilder.loadTexts: hwMusaPatchLoadSerIp.setStatus('mandatory') hw_musa_patch_oper = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 24, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('activate', 1), ('deactivate', 2), ('load', 3), ('remove', 4), ('run', 5)))).setMaxAccess('writeonly') if mibBuilder.loadTexts: hwMusaPatchOper.setStatus('mandatory') hw_musa_patch_table = mib_table((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 25)) if mibBuilder.loadTexts: hwMusaPatchTable.setStatus('mandatory') hw_musa_patch_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 25, 1)).setIndexNames((0, 'HUAWEI-MUSA-MA5100-MIB', 'hwMusaPatchIdIndex')) if mibBuilder.loadTexts: hwMusaPatchEntry.setStatus('mandatory') hw_musa_patch_show_id_index = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 25, 1, 1), integer32()) if mibBuilder.loadTexts: hwMusaPatchShowIdIndex.setStatus('mandatory') hw_musa_patch_crc = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 25, 1, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaPatchCRC.setStatus('mandatory') hw_musa_patch_type = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 25, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('c-Commonpatch', 1), ('t-Temporarypatch', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaPatchType.setStatus('mandatory') hw_musa_patch_state = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 25, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('run', 1), ('activate', 2), ('deactivate', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaPatchState.setStatus('mandatory') hw_musa_patch_code_address = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 25, 1, 5), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaPatchCodeAddress.setStatus('mandatory') hw_musa_patch_code_length = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 25, 1, 6), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaPatchCodeLength.setStatus('mandatory') hw_musa_patch_data_address = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 25, 1, 7), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaPatchDataAddress.setStatus('mandatory') hw_musa_patch_data_length = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 25, 1, 8), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaPatchDataLength.setStatus('mandatory') hw_musa_patch_function_number = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 1, 25, 1, 9), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMusaPatchFunctionNumber.setStatus('mandatory') hw_ma5100_end_of_mib = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 2, 6, 5, 100, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hwMa5100EndOfMib.setStatus('mandatory') mibBuilder.exportSymbols('HUAWEI-MUSA-MA5100-MIB', hwMusaSrcApcConnectAttribute=hwMusaSrcApcConnectAttribute, hwMusaResetSys=hwMusaResetSys, hwMusaWarningID=hwMusaWarningID, hwMusaOimOpticTable=hwMusaOimOpticTable, hwMusaDestFrameId=hwMusaDestFrameId, hwMusaMcr=hwMusaMcr, hwMusaTrafficEntry=hwMusaTrafficEntry, hwMusaFrameUsedBandWidth=hwMusaFrameUsedBandWidth, hwMusaTrafficTable=hwMusaTrafficTable, hwMusaInsertLAIS=hwMusaInsertLAIS, hwMusaShelfType=hwMusaShelfType, hwMusaIpAddrRejectOper=hwMusaIpAddrRejectOper, hwMusaQueryCurNonCorrectHECNum=hwMusaQueryCurNonCorrectHECNum, hwMusaLoadOperType=hwMusaLoadOperType, hwMusaDestBoardVpi=hwMusaDestBoardVpi, hwMusaPatchEntry=hwMusaPatchEntry, hwMusaSrcBoardVci=hwMusaSrcBoardVci, hwMusaShelfConfTable=hwMusaShelfConfTable, hwMusaClp0pcr=hwMusaClp0pcr, hwMusaInsertBIP1=hwMusaInsertBIP1, hwMusaInsertLOS=hwMusaInsertLOS, hwMusaVlanIciIndex=hwMusaVlanIciIndex, hwMusaWarn24HourThreshold=hwMusaWarn24HourThreshold, hwMusaDestFrcIwfType=hwMusaDestFrcIwfType, hwMusaPatchLoadProtocol=hwMusaPatchLoadProtocol, hwMusaEndOfMib=hwMusaEndOfMib, hwMusaIpAddr=hwMusaIpAddr, hwMusaOperat=hwMusaOperat, hwMusaSrcFrcDlciType=hwMusaSrcFrcDlciType, hwMusaSrcFrcIwfType=hwMusaSrcFrcIwfType, hwMusaMtu=hwMusaMtu, hwMusaEthernetFirewall=hwMusaEthernetFirewall, hwMusaCpuOccupyRate=hwMusaCpuOccupyRate, hwMusaClearOIMErrEventStat=hwMusaClearOIMErrEventStat, hwMusaVlanId=hwMusaVlanId, hwMusaFrameConfEntry=hwMusaFrameConfEntry, hwMusaDestApcConnectAttribute=hwMusaDestApcConnectAttribute, hwMusaTypeOfPvcPvp=hwMusaTypeOfPvcPvp, hwMusaDestCescChannelId=hwMusaDestCescChannelId, hwMusaShelfConfEntry=hwMusaShelfConfEntry, hwMusaUpOpticMainBandWidth=hwMusaUpOpticMainBandWidth, hwMusaSysTime=hwMusaSysTime, hwMusaSysRouteOper=hwMusaSysRouteOper, hwMusaPatchOper=hwMusaPatchOper, hwMusaInsertLRDI=hwMusaInsertLRDI, hwMusaOimPhyEntry=hwMusaOimPhyEntry, hwMusaDownStreamTrafficRx=hwMusaDownStreamTrafficRx, hwMusaSlotIndex=hwMusaSlotIndex, hwMusaUpStreamTrafficTx=hwMusaUpStreamTrafficTx, hwMusaFrameConfTable=hwMusaFrameConfTable, hwMusaQueryCurBIP1=hwMusaQueryCurBIP1, hwMusaInsertBIP3=hwMusaInsertBIP3, hwMusaPatchTable=hwMusaPatchTable, hwMusaSrcPortVlanVccId=hwMusaSrcPortVlanVccId, hwMusaClp01pcr=hwMusaClp01pcr, hwMusaQueryCurUnmatchCellNum=hwMusaQueryCurUnmatchCellNum, hwMusaCampusPvcConfTable=hwMusaCampusPvcConfTable, hwMusaSlotConfTable=hwMusaSlotConfTable, hwMusaSysRouteTable=hwMusaSysRouteTable, hwMusaAllPvcConfTable=hwMusaAllPvcConfTable, hwMusaMbs=hwMusaMbs, hwMusaSetLineLoop=hwMusaSetLineLoop, hwMusaSlotNumber=hwMusaSlotNumber, hwOIMPortIndex=hwOIMPortIndex, hwMusaPatchOperateEntry=hwMusaPatchOperateEntry, hwMusaNmsName=hwMusaNmsName, hwMusaIpRejectTableId=hwMusaIpRejectTableId, hwMusaShelfName=hwMusaShelfName, hwMusaPvcCid=hwMusaPvcCid, hwMusaSlotCardVersion=hwMusaSlotCardVersion, hwMusaSrcFrcActiveStatus=hwMusaSrcFrcActiveStatus, hwMusaCurUsedUpBandWidth=hwMusaCurUsedUpBandWidth, hwMusaNmsFrameId=hwMusaNmsFrameId, hwMusaPvcTrafficStatisTable=hwMusaPvcTrafficStatisTable, hwMusaSlotDownPracticalBandWidth=hwMusaSlotDownPracticalBandWidth, hwMusaInsertBIP2=hwMusaInsertBIP2, hwMusaIpMask=hwMusaIpMask, hwMusaNmsIpAddr=hwMusaNmsIpAddr, hwMusaQueryCurSendCellNum=hwMusaQueryCurSendCellNum, hwMusaAdlSlotId=hwMusaAdlSlotId, hwMusaSlotUpPracticalBandWidth=hwMusaSlotUpPracticalBandWidth, hwMusaOimPhyTable=hwMusaOimPhyTable, hwMusaPatchLoadFilename=hwMusaPatchLoadFilename, hwMusaIpAddrPermitOper=hwMusaIpAddrPermitOper, DisplayString=DisplayString, hwMusaLoadTftpServerIp=hwMusaLoadTftpServerIp, hwMusaIpAddrPermitEntry=hwMusaIpAddrPermitEntry, hwMusaNmsTxTraffic=hwMusaNmsTxTraffic, hwMusaNextTrafficIndex=hwMusaNextTrafficIndex, hwMusaCbrPcrIndex=hwMusaCbrPcrIndex, hwMusaToLanTrafficId=hwMusaToLanTrafficId, hwMusaSlotUpBandWidth=hwMusaSlotUpBandWidth, hwMusaAdlPortCount=hwMusaAdlPortCount, hwMusaAdlPortId=hwMusaAdlPortId, hwMusaPatchCodeLength=hwMusaPatchCodeLength, hwMusaPatchDataLength=hwMusaPatchDataLength, hwMusaPermitEndIp=hwMusaPermitEndIp, hwMusaLoadContent=hwMusaLoadContent, hwMusaAllPvcConfEntry=hwMusaAllPvcConfEntry, hwMusaPvcCidEntry=hwMusaPvcCidEntry, hwMusaPvcPvpState=hwMusaPvcPvpState, hwMusaNmsRxTraffic=hwMusaNmsRxTraffic, hwMusaSlotUsedUpBandWidth=hwMusaSlotUsedUpBandWidth, hwMusaNmsPvcConfEntry=hwMusaNmsPvcConfEntry, hwMusaWarningTerminalCtrl=hwMusaWarningTerminalCtrl, hwMusaCellbusID=hwMusaCellbusID, hwMusaSrcCescChannelId=hwMusaSrcCescChannelId, hwMusaFrame=hwMusaFrame, hwMusaSlotCardOperStatus=hwMusaSlotCardOperStatus, hwMusaSrcFrameId=hwMusaSrcFrameId, hwMusaLoadRateTable=hwMusaLoadRateTable, hwMusaSrcFrcFreeBandwidth=hwMusaSrcFrcFreeBandwidth, hwMusaPatchType=hwMusaPatchType, hwMusaFrameType=hwMusaFrameType, hwMusaWarn15MinThreshold=hwMusaWarn15MinThreshold, hwMusaDestCescFillDegree=hwMusaDestCescFillDegree, hwMusaDestBoardVci=hwMusaDestBoardVci, hwMusaCurUsedDownBandWidth=hwMusaCurUsedDownBandWidth, hwMusaMacAddr=hwMusaMacAddr, hwMusaDestCescChannelBitmap=hwMusaDestCescChannelBitmap, hwMusaSysCpuRatio=hwMusaSysCpuRatio, hwMusaIpAddrPermitTable=hwMusaIpAddrPermitTable, hwMusaDestPortType=hwMusaDestPortType, hwMusaSlotDownBandWidth=hwMusaSlotDownBandWidth, hwMusaQueryCurLOCDNum=hwMusaQueryCurLOCDNum, hwMusaQueryCurBIP3=hwMusaQueryCurBIP3, hwMusaSysRouteEntry=hwMusaSysRouteEntry, hwMusaPatchShowIdIndex=hwMusaPatchShowIdIndex, hwMusaAtmIpAddr=hwMusaAtmIpAddr, hwMusaSrcCescV35N=hwMusaSrcCescV35N, hwMusaDestToSrcTraffic=hwMusaDestToSrcTraffic, hwMusaTrafficRtvbrScrEntry=hwMusaTrafficRtvbrScrEntry, hwMusaLoadType=hwMusaLoadType, hwMusaPatchIdIndex=hwMusaPatchIdIndex, hwMusaDownPracticalBandWidth=hwMusaDownPracticalBandWidth, hwMusaInsertPAIS=hwMusaInsertPAIS, hwMusaFrameBandWidth=hwMusaFrameBandWidth, hwMusaQueryCurPFEBE=hwMusaQueryCurPFEBE, hwMusaShelfNumber=hwMusaShelfNumber, hwMusaQueryMemory=hwMusaQueryMemory, hwMusaDestPortVlanVccId=hwMusaDestPortVlanVccId, hwMusaShelfIndex=hwMusaShelfIndex, hwMusaFrameIndex=hwMusaFrameIndex, hwMusaRefCount=hwMusaRefCount, hwMusaTrafficCbrPcrTable=hwMusaTrafficCbrPcrTable, hwMusaWarningDesc=hwMusaWarningDesc, hwMusaPermitIpMask=hwMusaPermitIpMask, hwMusaDestCescV35N=hwMusaDestCescV35N, hwMusaDnOpticMainBandWidth=hwMusaDnOpticMainBandWidth, hwMusaFromLanTrafficId=hwMusaFromLanTrafficId, hwMusaTrapPort=hwMusaTrapPort, hwMusaSrcCescFillDegree=hwMusaSrcCescFillDegree, hwMusaTrafficRtvbrScrTable=hwMusaTrafficRtvbrScrTable, hwMusaSrcPortType=hwMusaSrcPortType, hwMusaPatchCRC=hwMusaPatchCRC, hwMusaServiceClass=hwMusaServiceClass, hwMusaFrameName=hwMusaFrameName, hwMusaNmsPvcIndex=hwMusaNmsPvcIndex, hwMusaSlotNumbers=hwMusaSlotNumbers, hwMusaNmsRelayVpi=hwMusaNmsRelayVpi, hwMusaInsertLOF=hwMusaInsertLOF, hwMusaSlotIpAddress=hwMusaSlotIpAddress, hwMusaClp0scr=hwMusaClp0scr, hwMusaUpReservedBandWidth=hwMusaUpReservedBandWidth, hwMusaCbrPcrRefCount=hwMusaCbrPcrRefCount, hwMusaRtvbrScrRefCount=hwMusaRtvbrScrRefCount, hwMusaCidIndex=hwMusaCidIndex, hwMusaDestSlotId=hwMusaDestSlotId, hwMusaClp01scr=hwMusaClp01scr, hwMusaSlotGroup=hwMusaSlotGroup, hwMusaQueryCurBIP2=hwMusaQueryCurBIP2, hwMusaAdlPortOperat=hwMusaAdlPortOperat, hwMusaOpticConvergentRate=hwMusaOpticConvergentRate, hwMusaNmsParaConfTable=hwMusaNmsParaConfTable, hwMusaLoadRate=hwMusaLoadRate, hwMusaGatewayIpAddr=hwMusaGatewayIpAddr, hwMusaLoadFileName=hwMusaLoadFileName, hwMusaPvcTrafficStatisEntry=hwMusaPvcTrafficStatisEntry, hwMusaSlotCardAdminStatus=hwMusaSlotCardAdminStatus, hwMusaDestOnuId=hwMusaDestOnuId, hwMusaLoadRateEntry=hwMusaLoadRateEntry, hwMusaResetSlaveMMX=hwMusaResetSlaveMMX, hwMusaQueryCurOOFNum=hwMusaQueryCurOOFNum, hwMusaDestFrcActiveStatus=hwMusaDestFrcActiveStatus, hwMusaPatchLoadSerIp=hwMusaPatchLoadSerIp, hwMusaSetCommunity=hwMusaSetCommunity, hwMusaPatchDataAddress=hwMusaPatchDataAddress, hwMa5100EndOfMib=hwMa5100EndOfMib, hwMuasSrcSlotId=hwMuasSrcSlotId, hwMusaUpPracticalBandWidth=hwMusaUpPracticalBandWidth, hwMusaSlotUsedDownBandWidth=hwMusaSlotUsedDownBandWidth, hwMusaNmsStyle=hwMusaNmsStyle, hwMusaNmsENCAP=hwMusaNmsENCAP, hwMusaFrameNumber=hwMusaFrameNumber, hwMusaNmsParaConfEntry=hwMusaNmsParaConfEntry, hwMusaClearAllAlarmStat=hwMusaClearAllAlarmStat, hwMusaSrcOnuId=hwMusaSrcOnuId, hwMusaSrcCescChannelBitmap=hwMusaSrcCescChannelBitmap, hwMusaWarningLevel=hwMusaWarningLevel, hwMusaAllPvcOperater=hwMusaAllPvcOperater, hwMusaPatchState=hwMusaPatchState, hwMusaOpticBandwidthTable=hwMusaOpticBandwidthTable, hwMusaWarningEngDesc=hwMusaWarningEngDesc, hwMusaNmsIp=hwMusaNmsIp, hwMusaIpAddrRejectTable=hwMusaIpAddrRejectTable, hwMusaIpPermitTableId=hwMusaIpPermitTableId, hwMusaSlotCardType=hwMusaSlotCardType, hwMusaGetCommunity=hwMusaGetCommunity, hwMusaSetUtopiaLoop=hwMusaSetUtopiaLoop, hwMusaWarningCtrlEntry=hwMusaWarningCtrlEntry, hwMusaUpStreamTrafficRx=hwMusaUpStreamTrafficRx, hwMusaSlot=hwMusaSlot, hwMusaTrafficCbrPcrEntry=hwMusaTrafficCbrPcrEntry, hwMusaPvcCidTable=hwMusaPvcCidTable, hwMusaDevice=hwMusaDevice, hwMusaSetSrcLoop=hwMusaSetSrcLoop, hwMusaQueryCurCorrectHECNum=hwMusaQueryCurCorrectHECNum, hwMusaSlotCardSerial=hwMusaSlotCardSerial, hwMusaCbrPcrValue=hwMusaCbrPcrValue, hwMusaRtvbrScrValue=hwMusaRtvbrScrValue, hwMusaDstIp=hwMusaDstIp, hwMusaRtvbrScrIndex=hwMusaRtvbrScrIndex, hwMusaTrafficIndex=hwMusaTrafficIndex, hwMusaNmsSlotId=hwMusaNmsSlotId, hwMusaNmsRelayVci=hwMusaNmsRelayVci, hwMusaQueryCurReceiveCellNum=hwMusaQueryCurReceiveCellNum, hwMusaPatchFunctionNumber=hwMusaPatchFunctionNumber, hwMusaPermitBeginIp=hwMusaPermitBeginIp, hwMusaNmsPvcOper=hwMusaNmsPvcOper, hwMusaAdlVci=hwMusaAdlVci, hwMusaSlotConfEntry=hwMusaSlotConfEntry, hwMusaAtmIpMask=hwMusaAtmIpMask, hwMusaDstIpMask=hwMusaDstIpMask, hwMusaOpticBandwidthEntry=hwMusaOpticBandwidthEntry, hwMusaGetSetPort=hwMusaGetSetPort, hwMusaSlotDescript=hwMusaSlotDescript, hwMusaDownStreamTrafficTx=hwMusaDownStreamTrafficTx, hwMusaPatchOperateTable=hwMusaPatchOperateTable, hwMusaIpAddrRejectEntry=hwMusaIpAddrRejectEntry, hwMusaSysDate=hwMusaSysDate, hwMusaWarningIsCount=hwMusaWarningIsCount, hwMusaQueryCurLFEBE=hwMusaQueryCurLFEBE, hwMusaBiosVersion=hwMusaBiosVersion, hwMusaBoardCellLossPriority=hwMusaBoardCellLossPriority, hwMusaPatchCodeAddress=hwMusaPatchCodeAddress, hwMusaRejectBeginIp=hwMusaRejectBeginIp, hwMusaSysMib=hwMusaSysMib, hwMusaRecordState=hwMusaRecordState, hwMusaLoadProtocol=hwMusaLoadProtocol, hwMusaShelf=hwMusaShelf, hwMusaHostVersion=hwMusaHostVersion, hwMusaNmsSarVci=hwMusaNmsSarVci, hwMusaTrafficType=hwMusaTrafficType, hwMusaAdlVpi=hwMusaAdlVpi) mibBuilder.exportSymbols('HUAWEI-MUSA-MA5100-MIB', hwMusaSrcBoardVpi=hwMusaSrcBoardVpi, hwMa5100Mib=hwMa5100Mib, hwMusaRejectIpMask=hwMusaRejectIpMask, hwMusaCampusPvcConfEntry=hwMusaCampusPvcConfEntry, hwMusaNmsPortVlanId=hwMusaNmsPortVlanId, hwMusaGateIp=hwMusaGateIp, hwMusaRejectEndIp=hwMusaRejectEndIp, hwMusaSrcToDestTraffic=hwMusaSrcToDestTraffic, hwMusaNmsID=hwMusaNmsID, hwMusaWarningCtrlTable=hwMusaWarningCtrlTable, hwMusaSysRouteIndex=hwMusaSysRouteIndex, hwMusaCDVT=hwMusaCDVT, hwMusaDestFrcDlciType=hwMusaDestFrcDlciType, hwMusaOamGroup=hwMusaOamGroup, hwMusaBoardMaxBandwidth=hwMusaBoardMaxBandwidth, hwMusaWarningNmsCtrl=hwMusaWarningNmsCtrl, hwMusaDestFrcFreeBandwidth=hwMusaDestFrcFreeBandwidth, hwMusaNmsOperState=hwMusaNmsOperState, hwMusaNmsPvcConfTable=hwMusaNmsPvcConfTable, hwMusaAdlFrameId=hwMusaAdlFrameId, hwMusaNmsStatus=hwMusaNmsStatus, hwMusaNmsLLCVC=hwMusaNmsLLCVC, hwMusaOimOpticEntry=hwMusaOimOpticEntry, hwMusaFrameNumbers=hwMusaFrameNumbers, hwMusaDownReservedBandWidth=hwMusaDownReservedBandWidth)
class WeightRegularizerMixin: def __init__(self, regularizer=None, reg_weight=1, **kwargs): super().__init__(**kwargs) self.regularizer = regularizer self.reg_weight = reg_weight def regularization_loss(self, weights): if self.regularizer is None: return 0 return self.regularizer(weights) * self.reg_weight
class Weightregularizermixin: def __init__(self, regularizer=None, reg_weight=1, **kwargs): super().__init__(**kwargs) self.regularizer = regularizer self.reg_weight = reg_weight def regularization_loss(self, weights): if self.regularizer is None: return 0 return self.regularizer(weights) * self.reg_weight
def whatday(num): if num == 1: return "Sunday" elif num == 2: return "Monday" elif num == 3: return "Tuesday" elif num == 4: return "Wednesday" elif num == 5: return "Thursday" elif num == 6: return "Friday" elif num == 7: return "Saturday" else: return "Wrong, please enter a number between 1 and 7"
def whatday(num): if num == 1: return 'Sunday' elif num == 2: return 'Monday' elif num == 3: return 'Tuesday' elif num == 4: return 'Wednesday' elif num == 5: return 'Thursday' elif num == 6: return 'Friday' elif num == 7: return 'Saturday' else: return 'Wrong, please enter a number between 1 and 7'
# rects using framebuf display.fill(0) for i in range(0, 15): j = 6 * i display.framebuf.fill_rect(j, j, 12, 12, i) display.framebuf.rect(90 - (j), j, 12, 12, i) display.show()
display.fill(0) for i in range(0, 15): j = 6 * i display.framebuf.fill_rect(j, j, 12, 12, i) display.framebuf.rect(90 - j, j, 12, 12, i) display.show()
wildcards = dict() ## experiments x params x wildcards['/lustre/projects/project-broaddus/denoise_experiments/flower/e01/n2v2/'] = "mask_{n}_{m}/table.csv" wildcards['/lustre/projects/project-broaddus/denoise_experiments/flower/e01/n2gt/'] = "d{a}/table.csv" wildcards['/lustre/projects/project-broaddus/denoise_experiments/flower/e01/nlm/'] = "d{a}/table.csv" wildcards['/lustre/projects/project-broaddus/denoise_experiments/flower/e01/bm4d/'] = "d{a}/table.csv"
wildcards = dict() wildcards['/lustre/projects/project-broaddus/denoise_experiments/flower/e01/n2v2/'] = 'mask_{n}_{m}/table.csv' wildcards['/lustre/projects/project-broaddus/denoise_experiments/flower/e01/n2gt/'] = 'd{a}/table.csv' wildcards['/lustre/projects/project-broaddus/denoise_experiments/flower/e01/nlm/'] = 'd{a}/table.csv' wildcards['/lustre/projects/project-broaddus/denoise_experiments/flower/e01/bm4d/'] = 'd{a}/table.csv'
class AlmaException(Exception): class_message = "An exception occurred." def __init__(self, message=None, **kwargs): if message: self._message = message % kwargs else: self._message = self.class_message % kwargs def __repr__(self): return self._message def __str__(self): return self._message class SizeMustBeEqual(AlmaException): class_message = ("Vector size must be equal. " "Current sizes are not: " "%(size1)s != %(size2)s")
class Almaexception(Exception): class_message = 'An exception occurred.' def __init__(self, message=None, **kwargs): if message: self._message = message % kwargs else: self._message = self.class_message % kwargs def __repr__(self): return self._message def __str__(self): return self._message class Sizemustbeequal(AlmaException): class_message = 'Vector size must be equal. Current sizes are not: %(size1)s != %(size2)s'
def test_get_wallet_not_authenticated(api_client): rsp = api_client.get("/api/wallet/") assert rsp.status_code == 401 def test_get_wallet_success(api_client, wallet): api_client.force_authenticate(wallet.user) rsp = api_client.get("/api/wallet/") assert rsp.status_code == 200 print(rsp.content) assert rsp.json() == { "id": wallet.id, "currencies": [ { "currency": "PLN", "amount": "100.00", }, { "currency": "EUR", "amount": "50.00", }, ], "stocks": [], }
def test_get_wallet_not_authenticated(api_client): rsp = api_client.get('/api/wallet/') assert rsp.status_code == 401 def test_get_wallet_success(api_client, wallet): api_client.force_authenticate(wallet.user) rsp = api_client.get('/api/wallet/') assert rsp.status_code == 200 print(rsp.content) assert rsp.json() == {'id': wallet.id, 'currencies': [{'currency': 'PLN', 'amount': '100.00'}, {'currency': 'EUR', 'amount': '50.00'}], 'stocks': []}
STARTING_CHAR_FOR_SHAPE_NAME = "@" class Shape(object): def __init__(self, name, class_uri, statements): self._name = name self._class_uri = class_uri self._statements = statements @property def name(self): return self._name @property def class_uri(self): return self._class_uri def yield_statements(self): for a_statement in self._statements: yield a_statement def sort_statements(self, callback, reverse=False): self._statements.sort(key=lambda x :callback(x), reverse=reverse)
starting_char_for_shape_name = '@' class Shape(object): def __init__(self, name, class_uri, statements): self._name = name self._class_uri = class_uri self._statements = statements @property def name(self): return self._name @property def class_uri(self): return self._class_uri def yield_statements(self): for a_statement in self._statements: yield a_statement def sort_statements(self, callback, reverse=False): self._statements.sort(key=lambda x: callback(x), reverse=reverse)
# # PySNMP MIB module CXLlcFrConv-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CXLlcFrConv-MIB # Produced by pysmi-0.3.4 at Wed May 1 12:33:04 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsIntersection, ValueSizeConstraint, ValueRangeConstraint, SingleValueConstraint, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ValueSizeConstraint", "ValueRangeConstraint", "SingleValueConstraint", "ConstraintsUnion") cxLlcFrConv, Alias = mibBuilder.importSymbols("CXProduct-SMI", "cxLlcFrConv", "Alias") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") Gauge32, Counter32, ModuleIdentity, IpAddress, iso, TimeTicks, NotificationType, Unsigned32, MibIdentifier, Integer32, ObjectIdentity, MibScalar, MibTable, MibTableRow, MibTableColumn, Bits, Counter64 = mibBuilder.importSymbols("SNMPv2-SMI", "Gauge32", "Counter32", "ModuleIdentity", "IpAddress", "iso", "TimeTicks", "NotificationType", "Unsigned32", "MibIdentifier", "Integer32", "ObjectIdentity", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Bits", "Counter64") TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString") class MacAddress(OctetString): subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(6, 6) fixedLength = 6 class SubRef(Integer32): subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(0, 255) llcfrcnvSysRouteConnectInterval = MibScalar((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(10, 900)).clone(30)).setMaxAccess("readwrite") if mibBuilder.loadTexts: llcfrcnvSysRouteConnectInterval.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSysRouteConnectInterval.setDescription('Determines the number of seconds between route connection attempts by the LLC-2 Frame Relay Convergence layer. Range of Values: 10 - 900 seconds Default Value: 30 seconds Configuration Changed: administrative') llcfrcnvMibLevel = MibScalar((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: llcfrcnvMibLevel.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvMibLevel.setDescription('Used to determine current MIB module release supported by the agent. Object is in decimal.') llcfrcnvSapTable = MibTable((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 10), ) if mibBuilder.loadTexts: llcfrcnvSapTable.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSapTable.setDescription('This table contains configuration information for each LLC-2 Frame Relay Convergence layer SAP (service access point).') llcfrcnvSapEntry = MibTableRow((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 10, 1), ).setIndexNames((0, "CXLlcFrConv-MIB", "llcfrcnvSapNumber")) if mibBuilder.loadTexts: llcfrcnvSapEntry.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSapEntry.setDescription('Defines a row in the llcfrcnvSapTable. Each row contains the objects which define a service access point.') llcfrcnvSapNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 10, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: llcfrcnvSapNumber.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSapNumber.setDescription('Identifies this SAP (service access point) with a numerical value which must be unique for each LLC-2 Frame Relay Convergence SAP. Value 0 is allocated to the Public SAP (PSAP) used to interface with the FRIM module via IAM. The row associated with value 0 always exists and cannot be deleted. All other SAPs are used to communicate with other higher layer protocols.') llcfrcnvSapRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 10, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("invalid", 1), ("valid", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: llcfrcnvSapRowStatus.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSapRowStatus.setDescription('Determines the status of the objects in a table row. Options: invalid (1): Row is flagged, after next reset the values will be disabled and the row is deleted from the table valid (2): Values are enabled Configuration Changed: administrative') llcfrcnvSapAlias = MibTableColumn((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 10, 1, 3), Alias()).setMaxAccess("readwrite") if mibBuilder.loadTexts: llcfrcnvSapAlias.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSapAlias.setDescription('Identifies this service access point by a textual name. Names must be unique across all service access points at all layers. Range of Values: 1 -16 alphanumeric characters (first character must be a letter) Default Value: none Configuration Changed: administrative') llcfrcnvSapSrcLlcSap = MibTableColumn((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 10, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(2, 254)).clone(4)).setMaxAccess("readwrite") if mibBuilder.loadTexts: llcfrcnvSapSrcLlcSap.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSapSrcLlcSap.setDescription('Determines the source LLC-2 SAP address associated with this connection. Only even values are allowed (usually assigned as a multiple of 04 hexadecimal). This SAP address should not be confused with the internal SAP numbers used by the LLC-2 layer. Range of Values: 2 - 254 (even values only) Default Value: 4 Configuration Changed: administrative and operative') llcfrcnvSapDstLlcSap = MibTableColumn((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 10, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(2, 254)).clone(4)).setMaxAccess("readwrite") if mibBuilder.loadTexts: llcfrcnvSapDstLlcSap.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSapDstLlcSap.setDescription('Determines the destination LLC-2 SAP address associated with this connection. Only even values are allowed (usually assigned as a multiple of 04 hexadecimal). This SAP address should not be confused with the internal SAP numbers used by the LLC-2 layer. Range of Values: 2 - 254 (even values only) Default Value: 4 Configuration Changed: administrative and operative') llcfrcnvSapRouteIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 10, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 64))).setMaxAccess("readwrite") if mibBuilder.loadTexts: llcfrcnvSapRouteIndex.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSapRouteIndex.setDescription('Determines the route associated with this SAP (service access point). The value of this object is the llcfrcnvSRIndex which identifies the route in the llcfrcnvSysRouteTable. Multiple SAP entries may use the same system route provided that they have a different llcfrcnvSapSrcLlcSap-llcfrcnvSapDstLlcSap pair. Range of Values: 0 - 64 Note: A value of 0 indicates no route is selected. Default Value: none Related Objects: llcfrcnvSRIndex llcfrcnvSapSrcLlcSap llcfrcnvSapDstLlcSap Configuration Changed: administrative and operative') llcfrcnvSapControl = MibTableColumn((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 10, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1))).clone(namedValues=NamedValues(("clearStats", 1)))).setMaxAccess("writeonly") if mibBuilder.loadTexts: llcfrcnvSapControl.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSapControl.setDescription('Clears all objects that contain statistics for this service access point. Options: clearStats (1) Configuration Changed: administrative and operative') llcfrcnvSapState = MibTableColumn((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 10, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("offLine", 1), ("unbound", 2), ("bound", 3), ("connected", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: llcfrcnvSapState.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSapState.setDescription('Indicates the status of the SAP (service access point). Options: offLine (1): Indicates that the SAP is not configured. unbound (2): Indicates that this SAP is not bound to its companion SAP. bound (3): Indicates that this SAP is bound to its companion SAP. connected (4):.Indicates that this SAP is bound and is available for data transfer.') llcfrcnvSapTxFrames = MibTableColumn((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 10, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: llcfrcnvSapTxFrames.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSapTxFrames.setDescription('Indicates the number of frames transmitted by this service access point.') llcfrcnvSapRxFrames = MibTableColumn((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 10, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: llcfrcnvSapRxFrames.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSapRxFrames.setDescription('Indicates the number of frames received by this service access point.') llcfrcnvSapTxOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 10, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: llcfrcnvSapTxOctets.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSapTxOctets.setDescription('Indicates the number of octets transmitted by this service access point.') llcfrcnvSapRxOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 10, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: llcfrcnvSapRxOctets.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSapRxOctets.setDescription('Indicates the number of octets received by this service access point.') llcfrcnvSapUnopenedServiceDiscards = MibTableColumn((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 10, 1, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: llcfrcnvSapUnopenedServiceDiscards.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSapUnopenedServiceDiscards.setDescription('Indicates the number of frames received and discarded by this service access point because there was no associated connection.') llcfrcnvSapTxResets = MibTableColumn((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 10, 1, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: llcfrcnvSapTxResets.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSapTxResets.setDescription('Indicates the number of connection reset requests issued from this service access point.') llcfrcnvSapRxResets = MibTableColumn((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 10, 1, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: llcfrcnvSapRxResets.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSapRxResets.setDescription('Indicates the number of connection reset requests/indications received by this service access point.') llcfrcnvSapHostMacAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 10, 1, 16), MacAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: llcfrcnvSapHostMacAddr.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSapHostMacAddr.setDescription('This object specifies the MAC address of the host station to which the FR LLC-2 connection will be established - Used only for SNA BAN Transport. If this object is configured, then it is automatically assumed that BAN will be the SNA transport used. Otherwise, the SNA transport is BNN.') llcfrcnvSapCntrMacAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 10, 1, 17), MacAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: llcfrcnvSapCntrMacAddr.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSapCntrMacAddr.setDescription('This object specifies the MAC address of the work station which will be connected to the host - Used only for SNA BAN Transport. If this object is configured, then it is automatically assumed that BAN will be the SNA transport used. Otherwise, the SNA transport is BNN.') llcfrcnvSysRouteTable = MibTable((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 11), ) if mibBuilder.loadTexts: llcfrcnvSysRouteTable.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSysRouteTable.setDescription('This table contains information about each LLC-2 FR Convergence system route.') llcfrcnvSysRouteEntry = MibTableRow((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 11, 1), ).setIndexNames((0, "CXLlcFrConv-MIB", "llcfrcnvSRIndex")) if mibBuilder.loadTexts: llcfrcnvSysRouteEntry.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSysRouteEntry.setDescription('Defines a row in the llcfrcnvSysRouteTable. Each row contains the objects which define an LLC-2 FR Convergence system route.') llcfrcnvSRIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 11, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 64))).setMaxAccess("readonly") if mibBuilder.loadTexts: llcfrcnvSRIndex.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSRIndex.setDescription('A number that uniquely identifies each LLC-2 Frame Relay Convergence Route. Related Objects: llcfrcnvSapRouteIndex Range of Values: 0 - 64') llcfrcnvSRRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 11, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("invalid", 1), ("valid", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: llcfrcnvSRRowStatus.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSRRowStatus.setDescription('Determines the status of the objects in a table row. Options: invalid (1): Row is flagged, after next reset the values will be disabled and the row is deleted from the table valid (2): Values are enabled Default Value: none Configuration Changed: administrative') llcfrcnvSRDestAlias = MibTableColumn((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 11, 1, 3), Alias()).setMaxAccess("readwrite") if mibBuilder.loadTexts: llcfrcnvSRDestAlias.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSRDestAlias.setDescription('Identifies the textual name of the destination service this route connects to. The destination alias is the name of the Frame Relay layer outlet circuit (frpCircuitAlias). Range of Values: 1 -16 alphanumeric characters (first character must be a letter) Default Value: none Configuration Changed: administrative and operative') llcfrcnvSRControl = MibTableColumn((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 11, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1))).clone(namedValues=NamedValues(("clearStats", 1)))).setMaxAccess("writeonly") if mibBuilder.loadTexts: llcfrcnvSRControl.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSRControl.setDescription('Permits control of a specific SAP (service access point). Options: clearStats (1): Clear all statistics stored by statistics objects. Configuration Changed: administrative and operative') llcfrcnvSRPriority = MibTableColumn((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 11, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("discard", 1), ("forward", 2), ("priority-low", 3), ("priority-high", 4))).clone('forward')).setMaxAccess("readwrite") if mibBuilder.loadTexts: llcfrcnvSRPriority.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSRPriority.setDescription('Determines the filtering/forwarding action and the forwarding priority for data sent from the STP bridge. Options: discard (1): Do not forward the data. forward (2): Forward the data. priority-low (3): Forward with a low priority (Frame Relay only). priority-high (4): Forward with a high priority (Frame Relay only). Default Value: forward (2) Configuration Changed: Administrative') llcfrcnvSRSubRef = MibTableColumn((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 11, 1, 6), SubRef()).setMaxAccess("readwrite") if mibBuilder.loadTexts: llcfrcnvSRSubRef.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSRSubRef.setDescription('Specifies a reference number that uniquely identifies this route. This number is used by the FRIM (Frame Relay Interface Module) to identify routes using the same DLCI (enables PVC consolidation). This number must be unique for all routes sharing the same DLCI. Range of Values: 1 - 255 (when using PVC consolidation) 0 (when not using PVC consolidation) Default Value: 0 Configuration Changed: administrative and operative') llcfrcnvSRRouteStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 11, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("offLine", 1), ("notConnected", 2), ("inProgress", 3), ("connected", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: llcfrcnvSRRouteStatus.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSRRouteStatus.setDescription('Indicates the status of this route. Options: offLine (1): Indicates that the route is not configured. notConnected (2): Indicates that the remote destination may not exist, or has refused the connection. inProgress (3): Indicates that the connection is in the process of being established. This is a transient state. connected (4): Indicates that the connection is established and is ready for data transfer.') llcfrcnvSRClearStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 11, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9))).clone(namedValues=NamedValues(("noFailure", 1), ("internalError", 2), ("remoteAllocFailure", 3), ("remoteNoAccess", 4), ("remotePvcDown", 5), ("remotePvcBusy", 6), ("localFcnFailure", 7), ("remoteFcnFailure", 8), ("remoteAliasNotFound", 9)))).setMaxAccess("readonly") if mibBuilder.loadTexts: llcfrcnvSRClearStatus.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSRClearStatus.setDescription('Indicates the status of a failed connection. The value of this object is only valid only between attempts to establish the route connection (llcfrcnvSRRouteStatus = notConnected), and may or may not change after successive failed attempts. Options: noFailure (1): Once a system route has been successfully connected, this value is maintained for the duration of the connection. internalError (2): An internal error has occurred. remoteAllocFailure (3): There is insufficient memory available for FRIM to establish this connection. remoteNoAccess (4): The requested frame relay service does not exist. remotePvcDown (5): The requested Frame Relay outlet circuit is down. remotePvcBusy (6): The requested Frame Relay outlet circuit is already connected. localFcnFailure (7): Flow control negotiation failed. remoteFcnFailure (8): Flow control negotiation failed at the Frame Relay layer. remoteAliasNotFound (9): The destination service alias (llcfrcnvSRDestAlias) does not exist.') llcfrcnvSROutSuccessfullConnects = MibTableColumn((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 11, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: llcfrcnvSROutSuccessfullConnects.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSROutSuccessfullConnects.setDescription('Indicates the number of successful connections originated for this route. An outgoing connection is always attempted from LLC-2 Frame Relay Convergence to FRIM.') llcfrcnvSROutUnsuccessfullConnects = MibTableColumn((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 11, 1, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: llcfrcnvSROutUnsuccessfullConnects.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSROutUnsuccessfullConnects.setDescription('Indicates the number of unsuccessful connections originated for this route. An outgoing connection is always attempted from LLC-2 Frame Relay Convergence to FRIM.') mibBuilder.exportSymbols("CXLlcFrConv-MIB", llcfrcnvSapSrcLlcSap=llcfrcnvSapSrcLlcSap, llcfrcnvSysRouteEntry=llcfrcnvSysRouteEntry, llcfrcnvSapState=llcfrcnvSapState, llcfrcnvSapRxFrames=llcfrcnvSapRxFrames, llcfrcnvSapCntrMacAddr=llcfrcnvSapCntrMacAddr, llcfrcnvMibLevel=llcfrcnvMibLevel, llcfrcnvSysRouteTable=llcfrcnvSysRouteTable, llcfrcnvSRSubRef=llcfrcnvSRSubRef, llcfrcnvSROutSuccessfullConnects=llcfrcnvSROutSuccessfullConnects, llcfrcnvSRDestAlias=llcfrcnvSRDestAlias, llcfrcnvSapNumber=llcfrcnvSapNumber, llcfrcnvSapRouteIndex=llcfrcnvSapRouteIndex, llcfrcnvSapTable=llcfrcnvSapTable, llcfrcnvSapEntry=llcfrcnvSapEntry, llcfrcnvSapTxOctets=llcfrcnvSapTxOctets, MacAddress=MacAddress, llcfrcnvSapRxOctets=llcfrcnvSapRxOctets, llcfrcnvSapDstLlcSap=llcfrcnvSapDstLlcSap, llcfrcnvSapRxResets=llcfrcnvSapRxResets, llcfrcnvSysRouteConnectInterval=llcfrcnvSysRouteConnectInterval, llcfrcnvSapUnopenedServiceDiscards=llcfrcnvSapUnopenedServiceDiscards, llcfrcnvSapControl=llcfrcnvSapControl, llcfrcnvSRRouteStatus=llcfrcnvSRRouteStatus, llcfrcnvSapTxResets=llcfrcnvSapTxResets, llcfrcnvSROutUnsuccessfullConnects=llcfrcnvSROutUnsuccessfullConnects, llcfrcnvSapAlias=llcfrcnvSapAlias, SubRef=SubRef, llcfrcnvSRControl=llcfrcnvSRControl, llcfrcnvSRIndex=llcfrcnvSRIndex, llcfrcnvSRRowStatus=llcfrcnvSRRowStatus, llcfrcnvSapRowStatus=llcfrcnvSapRowStatus, llcfrcnvSapTxFrames=llcfrcnvSapTxFrames, llcfrcnvSRClearStatus=llcfrcnvSRClearStatus, llcfrcnvSRPriority=llcfrcnvSRPriority, llcfrcnvSapHostMacAddr=llcfrcnvSapHostMacAddr)
(object_identifier, octet_string, integer) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'OctetString', 'Integer') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_intersection, value_size_constraint, value_range_constraint, single_value_constraint, constraints_union) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'ValueSizeConstraint', 'ValueRangeConstraint', 'SingleValueConstraint', 'ConstraintsUnion') (cx_llc_fr_conv, alias) = mibBuilder.importSymbols('CXProduct-SMI', 'cxLlcFrConv', 'Alias') (notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance') (gauge32, counter32, module_identity, ip_address, iso, time_ticks, notification_type, unsigned32, mib_identifier, integer32, object_identity, mib_scalar, mib_table, mib_table_row, mib_table_column, bits, counter64) = mibBuilder.importSymbols('SNMPv2-SMI', 'Gauge32', 'Counter32', 'ModuleIdentity', 'IpAddress', 'iso', 'TimeTicks', 'NotificationType', 'Unsigned32', 'MibIdentifier', 'Integer32', 'ObjectIdentity', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Bits', 'Counter64') (textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString') class Macaddress(OctetString): subtype_spec = OctetString.subtypeSpec + value_size_constraint(6, 6) fixed_length = 6 class Subref(Integer32): subtype_spec = Integer32.subtypeSpec + value_range_constraint(0, 255) llcfrcnv_sys_route_connect_interval = mib_scalar((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 1), integer32().subtype(subtypeSpec=value_range_constraint(10, 900)).clone(30)).setMaxAccess('readwrite') if mibBuilder.loadTexts: llcfrcnvSysRouteConnectInterval.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSysRouteConnectInterval.setDescription('Determines the number of seconds between route connection attempts by the LLC-2 Frame Relay Convergence layer. Range of Values: 10 - 900 seconds Default Value: 30 seconds Configuration Changed: administrative') llcfrcnv_mib_level = mib_scalar((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: llcfrcnvMibLevel.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvMibLevel.setDescription('Used to determine current MIB module release supported by the agent. Object is in decimal.') llcfrcnv_sap_table = mib_table((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 10)) if mibBuilder.loadTexts: llcfrcnvSapTable.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSapTable.setDescription('This table contains configuration information for each LLC-2 Frame Relay Convergence layer SAP (service access point).') llcfrcnv_sap_entry = mib_table_row((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 10, 1)).setIndexNames((0, 'CXLlcFrConv-MIB', 'llcfrcnvSapNumber')) if mibBuilder.loadTexts: llcfrcnvSapEntry.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSapEntry.setDescription('Defines a row in the llcfrcnvSapTable. Each row contains the objects which define a service access point.') llcfrcnv_sap_number = mib_table_column((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 10, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: llcfrcnvSapNumber.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSapNumber.setDescription('Identifies this SAP (service access point) with a numerical value which must be unique for each LLC-2 Frame Relay Convergence SAP. Value 0 is allocated to the Public SAP (PSAP) used to interface with the FRIM module via IAM. The row associated with value 0 always exists and cannot be deleted. All other SAPs are used to communicate with other higher layer protocols.') llcfrcnv_sap_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 10, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('invalid', 1), ('valid', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: llcfrcnvSapRowStatus.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSapRowStatus.setDescription('Determines the status of the objects in a table row. Options: invalid (1): Row is flagged, after next reset the values will be disabled and the row is deleted from the table valid (2): Values are enabled Configuration Changed: administrative') llcfrcnv_sap_alias = mib_table_column((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 10, 1, 3), alias()).setMaxAccess('readwrite') if mibBuilder.loadTexts: llcfrcnvSapAlias.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSapAlias.setDescription('Identifies this service access point by a textual name. Names must be unique across all service access points at all layers. Range of Values: 1 -16 alphanumeric characters (first character must be a letter) Default Value: none Configuration Changed: administrative') llcfrcnv_sap_src_llc_sap = mib_table_column((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 10, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(2, 254)).clone(4)).setMaxAccess('readwrite') if mibBuilder.loadTexts: llcfrcnvSapSrcLlcSap.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSapSrcLlcSap.setDescription('Determines the source LLC-2 SAP address associated with this connection. Only even values are allowed (usually assigned as a multiple of 04 hexadecimal). This SAP address should not be confused with the internal SAP numbers used by the LLC-2 layer. Range of Values: 2 - 254 (even values only) Default Value: 4 Configuration Changed: administrative and operative') llcfrcnv_sap_dst_llc_sap = mib_table_column((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 10, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(2, 254)).clone(4)).setMaxAccess('readwrite') if mibBuilder.loadTexts: llcfrcnvSapDstLlcSap.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSapDstLlcSap.setDescription('Determines the destination LLC-2 SAP address associated with this connection. Only even values are allowed (usually assigned as a multiple of 04 hexadecimal). This SAP address should not be confused with the internal SAP numbers used by the LLC-2 layer. Range of Values: 2 - 254 (even values only) Default Value: 4 Configuration Changed: administrative and operative') llcfrcnv_sap_route_index = mib_table_column((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 10, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(0, 64))).setMaxAccess('readwrite') if mibBuilder.loadTexts: llcfrcnvSapRouteIndex.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSapRouteIndex.setDescription('Determines the route associated with this SAP (service access point). The value of this object is the llcfrcnvSRIndex which identifies the route in the llcfrcnvSysRouteTable. Multiple SAP entries may use the same system route provided that they have a different llcfrcnvSapSrcLlcSap-llcfrcnvSapDstLlcSap pair. Range of Values: 0 - 64 Note: A value of 0 indicates no route is selected. Default Value: none Related Objects: llcfrcnvSRIndex llcfrcnvSapSrcLlcSap llcfrcnvSapDstLlcSap Configuration Changed: administrative and operative') llcfrcnv_sap_control = mib_table_column((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 10, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1))).clone(namedValues=named_values(('clearStats', 1)))).setMaxAccess('writeonly') if mibBuilder.loadTexts: llcfrcnvSapControl.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSapControl.setDescription('Clears all objects that contain statistics for this service access point. Options: clearStats (1) Configuration Changed: administrative and operative') llcfrcnv_sap_state = mib_table_column((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 10, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('offLine', 1), ('unbound', 2), ('bound', 3), ('connected', 4)))).setMaxAccess('readonly') if mibBuilder.loadTexts: llcfrcnvSapState.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSapState.setDescription('Indicates the status of the SAP (service access point). Options: offLine (1): Indicates that the SAP is not configured. unbound (2): Indicates that this SAP is not bound to its companion SAP. bound (3): Indicates that this SAP is bound to its companion SAP. connected (4):.Indicates that this SAP is bound and is available for data transfer.') llcfrcnv_sap_tx_frames = mib_table_column((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 10, 1, 9), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: llcfrcnvSapTxFrames.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSapTxFrames.setDescription('Indicates the number of frames transmitted by this service access point.') llcfrcnv_sap_rx_frames = mib_table_column((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 10, 1, 10), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: llcfrcnvSapRxFrames.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSapRxFrames.setDescription('Indicates the number of frames received by this service access point.') llcfrcnv_sap_tx_octets = mib_table_column((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 10, 1, 11), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: llcfrcnvSapTxOctets.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSapTxOctets.setDescription('Indicates the number of octets transmitted by this service access point.') llcfrcnv_sap_rx_octets = mib_table_column((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 10, 1, 12), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: llcfrcnvSapRxOctets.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSapRxOctets.setDescription('Indicates the number of octets received by this service access point.') llcfrcnv_sap_unopened_service_discards = mib_table_column((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 10, 1, 13), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: llcfrcnvSapUnopenedServiceDiscards.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSapUnopenedServiceDiscards.setDescription('Indicates the number of frames received and discarded by this service access point because there was no associated connection.') llcfrcnv_sap_tx_resets = mib_table_column((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 10, 1, 14), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: llcfrcnvSapTxResets.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSapTxResets.setDescription('Indicates the number of connection reset requests issued from this service access point.') llcfrcnv_sap_rx_resets = mib_table_column((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 10, 1, 15), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: llcfrcnvSapRxResets.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSapRxResets.setDescription('Indicates the number of connection reset requests/indications received by this service access point.') llcfrcnv_sap_host_mac_addr = mib_table_column((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 10, 1, 16), mac_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: llcfrcnvSapHostMacAddr.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSapHostMacAddr.setDescription('This object specifies the MAC address of the host station to which the FR LLC-2 connection will be established - Used only for SNA BAN Transport. If this object is configured, then it is automatically assumed that BAN will be the SNA transport used. Otherwise, the SNA transport is BNN.') llcfrcnv_sap_cntr_mac_addr = mib_table_column((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 10, 1, 17), mac_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: llcfrcnvSapCntrMacAddr.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSapCntrMacAddr.setDescription('This object specifies the MAC address of the work station which will be connected to the host - Used only for SNA BAN Transport. If this object is configured, then it is automatically assumed that BAN will be the SNA transport used. Otherwise, the SNA transport is BNN.') llcfrcnv_sys_route_table = mib_table((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 11)) if mibBuilder.loadTexts: llcfrcnvSysRouteTable.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSysRouteTable.setDescription('This table contains information about each LLC-2 FR Convergence system route.') llcfrcnv_sys_route_entry = mib_table_row((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 11, 1)).setIndexNames((0, 'CXLlcFrConv-MIB', 'llcfrcnvSRIndex')) if mibBuilder.loadTexts: llcfrcnvSysRouteEntry.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSysRouteEntry.setDescription('Defines a row in the llcfrcnvSysRouteTable. Each row contains the objects which define an LLC-2 FR Convergence system route.') llcfrcnv_sr_index = mib_table_column((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 11, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 64))).setMaxAccess('readonly') if mibBuilder.loadTexts: llcfrcnvSRIndex.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSRIndex.setDescription('A number that uniquely identifies each LLC-2 Frame Relay Convergence Route. Related Objects: llcfrcnvSapRouteIndex Range of Values: 0 - 64') llcfrcnv_sr_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 11, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('invalid', 1), ('valid', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: llcfrcnvSRRowStatus.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSRRowStatus.setDescription('Determines the status of the objects in a table row. Options: invalid (1): Row is flagged, after next reset the values will be disabled and the row is deleted from the table valid (2): Values are enabled Default Value: none Configuration Changed: administrative') llcfrcnv_sr_dest_alias = mib_table_column((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 11, 1, 3), alias()).setMaxAccess('readwrite') if mibBuilder.loadTexts: llcfrcnvSRDestAlias.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSRDestAlias.setDescription('Identifies the textual name of the destination service this route connects to. The destination alias is the name of the Frame Relay layer outlet circuit (frpCircuitAlias). Range of Values: 1 -16 alphanumeric characters (first character must be a letter) Default Value: none Configuration Changed: administrative and operative') llcfrcnv_sr_control = mib_table_column((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 11, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1))).clone(namedValues=named_values(('clearStats', 1)))).setMaxAccess('writeonly') if mibBuilder.loadTexts: llcfrcnvSRControl.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSRControl.setDescription('Permits control of a specific SAP (service access point). Options: clearStats (1): Clear all statistics stored by statistics objects. Configuration Changed: administrative and operative') llcfrcnv_sr_priority = mib_table_column((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 11, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('discard', 1), ('forward', 2), ('priority-low', 3), ('priority-high', 4))).clone('forward')).setMaxAccess('readwrite') if mibBuilder.loadTexts: llcfrcnvSRPriority.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSRPriority.setDescription('Determines the filtering/forwarding action and the forwarding priority for data sent from the STP bridge. Options: discard (1): Do not forward the data. forward (2): Forward the data. priority-low (3): Forward with a low priority (Frame Relay only). priority-high (4): Forward with a high priority (Frame Relay only). Default Value: forward (2) Configuration Changed: Administrative') llcfrcnv_sr_sub_ref = mib_table_column((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 11, 1, 6), sub_ref()).setMaxAccess('readwrite') if mibBuilder.loadTexts: llcfrcnvSRSubRef.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSRSubRef.setDescription('Specifies a reference number that uniquely identifies this route. This number is used by the FRIM (Frame Relay Interface Module) to identify routes using the same DLCI (enables PVC consolidation). This number must be unique for all routes sharing the same DLCI. Range of Values: 1 - 255 (when using PVC consolidation) 0 (when not using PVC consolidation) Default Value: 0 Configuration Changed: administrative and operative') llcfrcnv_sr_route_status = mib_table_column((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 11, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('offLine', 1), ('notConnected', 2), ('inProgress', 3), ('connected', 4)))).setMaxAccess('readonly') if mibBuilder.loadTexts: llcfrcnvSRRouteStatus.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSRRouteStatus.setDescription('Indicates the status of this route. Options: offLine (1): Indicates that the route is not configured. notConnected (2): Indicates that the remote destination may not exist, or has refused the connection. inProgress (3): Indicates that the connection is in the process of being established. This is a transient state. connected (4): Indicates that the connection is established and is ready for data transfer.') llcfrcnv_sr_clear_status = mib_table_column((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 11, 1, 11), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9))).clone(namedValues=named_values(('noFailure', 1), ('internalError', 2), ('remoteAllocFailure', 3), ('remoteNoAccess', 4), ('remotePvcDown', 5), ('remotePvcBusy', 6), ('localFcnFailure', 7), ('remoteFcnFailure', 8), ('remoteAliasNotFound', 9)))).setMaxAccess('readonly') if mibBuilder.loadTexts: llcfrcnvSRClearStatus.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSRClearStatus.setDescription('Indicates the status of a failed connection. The value of this object is only valid only between attempts to establish the route connection (llcfrcnvSRRouteStatus = notConnected), and may or may not change after successive failed attempts. Options: noFailure (1): Once a system route has been successfully connected, this value is maintained for the duration of the connection. internalError (2): An internal error has occurred. remoteAllocFailure (3): There is insufficient memory available for FRIM to establish this connection. remoteNoAccess (4): The requested frame relay service does not exist. remotePvcDown (5): The requested Frame Relay outlet circuit is down. remotePvcBusy (6): The requested Frame Relay outlet circuit is already connected. localFcnFailure (7): Flow control negotiation failed. remoteFcnFailure (8): Flow control negotiation failed at the Frame Relay layer. remoteAliasNotFound (9): The destination service alias (llcfrcnvSRDestAlias) does not exist.') llcfrcnv_sr_out_successfull_connects = mib_table_column((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 11, 1, 12), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: llcfrcnvSROutSuccessfullConnects.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSROutSuccessfullConnects.setDescription('Indicates the number of successful connections originated for this route. An outgoing connection is always attempted from LLC-2 Frame Relay Convergence to FRIM.') llcfrcnv_sr_out_unsuccessfull_connects = mib_table_column((1, 3, 6, 1, 4, 1, 495, 2, 1, 6, 33, 11, 1, 13), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: llcfrcnvSROutUnsuccessfullConnects.setStatus('mandatory') if mibBuilder.loadTexts: llcfrcnvSROutUnsuccessfullConnects.setDescription('Indicates the number of unsuccessful connections originated for this route. An outgoing connection is always attempted from LLC-2 Frame Relay Convergence to FRIM.') mibBuilder.exportSymbols('CXLlcFrConv-MIB', llcfrcnvSapSrcLlcSap=llcfrcnvSapSrcLlcSap, llcfrcnvSysRouteEntry=llcfrcnvSysRouteEntry, llcfrcnvSapState=llcfrcnvSapState, llcfrcnvSapRxFrames=llcfrcnvSapRxFrames, llcfrcnvSapCntrMacAddr=llcfrcnvSapCntrMacAddr, llcfrcnvMibLevel=llcfrcnvMibLevel, llcfrcnvSysRouteTable=llcfrcnvSysRouteTable, llcfrcnvSRSubRef=llcfrcnvSRSubRef, llcfrcnvSROutSuccessfullConnects=llcfrcnvSROutSuccessfullConnects, llcfrcnvSRDestAlias=llcfrcnvSRDestAlias, llcfrcnvSapNumber=llcfrcnvSapNumber, llcfrcnvSapRouteIndex=llcfrcnvSapRouteIndex, llcfrcnvSapTable=llcfrcnvSapTable, llcfrcnvSapEntry=llcfrcnvSapEntry, llcfrcnvSapTxOctets=llcfrcnvSapTxOctets, MacAddress=MacAddress, llcfrcnvSapRxOctets=llcfrcnvSapRxOctets, llcfrcnvSapDstLlcSap=llcfrcnvSapDstLlcSap, llcfrcnvSapRxResets=llcfrcnvSapRxResets, llcfrcnvSysRouteConnectInterval=llcfrcnvSysRouteConnectInterval, llcfrcnvSapUnopenedServiceDiscards=llcfrcnvSapUnopenedServiceDiscards, llcfrcnvSapControl=llcfrcnvSapControl, llcfrcnvSRRouteStatus=llcfrcnvSRRouteStatus, llcfrcnvSapTxResets=llcfrcnvSapTxResets, llcfrcnvSROutUnsuccessfullConnects=llcfrcnvSROutUnsuccessfullConnects, llcfrcnvSapAlias=llcfrcnvSapAlias, SubRef=SubRef, llcfrcnvSRControl=llcfrcnvSRControl, llcfrcnvSRIndex=llcfrcnvSRIndex, llcfrcnvSRRowStatus=llcfrcnvSRRowStatus, llcfrcnvSapRowStatus=llcfrcnvSapRowStatus, llcfrcnvSapTxFrames=llcfrcnvSapTxFrames, llcfrcnvSRClearStatus=llcfrcnvSRClearStatus, llcfrcnvSRPriority=llcfrcnvSRPriority, llcfrcnvSapHostMacAddr=llcfrcnvSapHostMacAddr)
number = int(input("Input an int: ")) oddNum = 1 for x in range(number): print(oddNum) oddNum += 2
number = int(input('Input an int: ')) odd_num = 1 for x in range(number): print(oddNum) odd_num += 2
""" Tema: Listas, mutabilidad y clonacion. Curso: Pensamiento computacional. Plataforma: Platzi. Profesor: David Aroesti. Alumno: @edinsonrequena. """ a = [1, 2, 3] b = a print(b) print(id(a)) # Aca podemos ver como a y b estan en el mismo lugar de print(id(b)) # memoria, lo que quiere decir que son la misma lista. c = list(a) # Aca estamos clonando lo que hay en a en c. print(c) # Aca podemos ver que tienen los mismos elementos. print(id(c)) # Aca podemos ver que ocupan distintos lugares en memoria, lo que quiere decir que son listas distintas. a.append(5) # Modificamos a, lo que quiere decir que tambien se modifica b print(a) print(c) # Aca como podemos ver no se modifica c porque no ocupa el mismo lugar en memoria que a # ya que anteriormente habiamos clonado los elementos d = a [::] # Otra forma de clonar una lista en otra en donde le indicamos que lo hara desde el indice 0 hasta el ultimo. print(d) print(id(d)) # Aca podemos ver que ocupan distintos lugares en memoria, lo que quiere decir que si se modifica a no se modificara d. e = a [0:2] # Aca clonamos los elementos del 0 al 2 en el indice a print(e) print(id(e)) # Aca podemos ver que ocupa un lugar distinto en memoria.
""" Tema: Listas, mutabilidad y clonacion. Curso: Pensamiento computacional. Plataforma: Platzi. Profesor: David Aroesti. Alumno: @edinsonrequena. """ a = [1, 2, 3] b = a print(b) print(id(a)) print(id(b)) c = list(a) print(c) print(id(c)) a.append(5) print(a) print(c) d = a[:] print(d) print(id(d)) e = a[0:2] print(e) print(id(e))
"""Top-level package for webml.""" __author__ = """BlueML AI""" __email__ = 'james.liang.cje@gmail.com' __version__ = '0.1.0'
"""Top-level package for webml.""" __author__ = 'BlueML AI' __email__ = 'james.liang.cje@gmail.com' __version__ = '0.1.0'
''' Given two integer arrays preorder and inorder where preorder is the preorder traversal of a binary tree and inorder is the inorder traversal of the same tree, construct and return the binary tree. ''' # Definition for a binary tree node. class TreeNode(object): def __init__(self, val=0, left=None, right=None): self.val = val self.left = left self.right = right class Solution(object): def __init__(self, ): self.node_set = {} def _get_node(self, node_val): if node_val in self.node_set: return self.node_set[node_val] else: self.node_set[node_val] = TreeNode(val=node_val) return self.node_set[node_val] def buildTree(self, preorder, inorder): """ :type preorder: List[int] :type inorder: List[int] :rtype: TreeNode """ if not inorder and not preorder: return que = [] que.append((inorder, preorder)) head_node = self._get_node(preorder[0]) while que: length = len(que) for _ in range(length): inorder, preorder = que.pop(0) root = self._get_node(preorder[0]) if len(inorder) == 1: continue for i, node in enumerate(inorder): if node == root.val: break left_inorder = inorder[:i] right_inorder = inorder[i + 1:] left_preorder = preorder[1:len(left_inorder) + 1] right_preorder = preorder[len(left_inorder) + 1:] if left_inorder: que.append((left_inorder, left_preorder)) root.left = self._get_node(left_preorder[0]) if right_inorder: que.append((right_inorder, right_preorder)) root.right = self._get_node(right_preorder[0]) return head_node
""" Given two integer arrays preorder and inorder where preorder is the preorder traversal of a binary tree and inorder is the inorder traversal of the same tree, construct and return the binary tree. """ class Treenode(object): def __init__(self, val=0, left=None, right=None): self.val = val self.left = left self.right = right class Solution(object): def __init__(self): self.node_set = {} def _get_node(self, node_val): if node_val in self.node_set: return self.node_set[node_val] else: self.node_set[node_val] = tree_node(val=node_val) return self.node_set[node_val] def build_tree(self, preorder, inorder): """ :type preorder: List[int] :type inorder: List[int] :rtype: TreeNode """ if not inorder and (not preorder): return que = [] que.append((inorder, preorder)) head_node = self._get_node(preorder[0]) while que: length = len(que) for _ in range(length): (inorder, preorder) = que.pop(0) root = self._get_node(preorder[0]) if len(inorder) == 1: continue for (i, node) in enumerate(inorder): if node == root.val: break left_inorder = inorder[:i] right_inorder = inorder[i + 1:] left_preorder = preorder[1:len(left_inorder) + 1] right_preorder = preorder[len(left_inorder) + 1:] if left_inorder: que.append((left_inorder, left_preorder)) root.left = self._get_node(left_preorder[0]) if right_inorder: que.append((right_inorder, right_preorder)) root.right = self._get_node(right_preorder[0]) return head_node
class IridaConnectionError(Exception): """ This error is thrown when the api cannot connect to the IRIDA api Either the server is unreachable or the credentials are invalid All calls to the api should expect this error """ pass
class Iridaconnectionerror(Exception): """ This error is thrown when the api cannot connect to the IRIDA api Either the server is unreachable or the credentials are invalid All calls to the api should expect this error """ pass
set1 = set() set1.add(1) set1.add(3) set1.add(1) set1.add(2) print(set1) set2 = set([1, 3, 5, 7, 9]) print(set2) # union print(set1 | set2) # intersection print(set1 & set2) # difference print(set1 - set2) set3 = {"a", "b"} print(set3) # immutable set set4 = frozenset([9, 10])
set1 = set() set1.add(1) set1.add(3) set1.add(1) set1.add(2) print(set1) set2 = set([1, 3, 5, 7, 9]) print(set2) print(set1 | set2) print(set1 & set2) print(set1 - set2) set3 = {'a', 'b'} print(set3) set4 = frozenset([9, 10])
"""Setting file for the Cloud SQL guestbook""" CLOUDSQL_INSTANCE = 'ReplaceWithYourInstanceName' DATABASE_NAME = 'guestbook' USER_NAME = 'ReplaceWithYourDatabaseUserName' PASSWORD = 'ReplaceWithYourDatabasePassword'
"""Setting file for the Cloud SQL guestbook""" cloudsql_instance = 'ReplaceWithYourInstanceName' database_name = 'guestbook' user_name = 'ReplaceWithYourDatabaseUserName' password = 'ReplaceWithYourDatabasePassword'
# -------------- class_1=['Geoffrey Hinton', 'Andrew Ng', 'Sebastian Raschka', 'Yoshua Bengio'] class_2=['Hilary Mason','Carla Gentry', 'Corinna Cortes'] new_class=class_1+class_2 print(new_class) new_class.append('Peter Warden') print(new_class) new_class.remove('Carla Gentry') print(new_class) courses={'Math':65, 'English':70, 'History':80, 'French':70, 'Science':60} print(courses) total=sum(courses.values()) print(total) percentage=total*100/500 print(percentage) mathematics={'Geoffrey Hinton':78, 'Andrew Ng':95, 'Sebastian Raschka':65, 'Yoshua Benjio':50, 'Hilary Mason': 70, 'Corinna Cortes':66, 'Peter Warden':75} print(mathematics) topper=max(mathematics,key=mathematics.get) print(topper) last_name=topper.split()[1] first_name=topper.split()[0] full_name=last_name+" "+first_name certificate_name=full_name.upper() print(certificate_name)
class_1 = ['Geoffrey Hinton', 'Andrew Ng', 'Sebastian Raschka', 'Yoshua Bengio'] class_2 = ['Hilary Mason', 'Carla Gentry', 'Corinna Cortes'] new_class = class_1 + class_2 print(new_class) new_class.append('Peter Warden') print(new_class) new_class.remove('Carla Gentry') print(new_class) courses = {'Math': 65, 'English': 70, 'History': 80, 'French': 70, 'Science': 60} print(courses) total = sum(courses.values()) print(total) percentage = total * 100 / 500 print(percentage) mathematics = {'Geoffrey Hinton': 78, 'Andrew Ng': 95, 'Sebastian Raschka': 65, 'Yoshua Benjio': 50, 'Hilary Mason': 70, 'Corinna Cortes': 66, 'Peter Warden': 75} print(mathematics) topper = max(mathematics, key=mathematics.get) print(topper) last_name = topper.split()[1] first_name = topper.split()[0] full_name = last_name + ' ' + first_name certificate_name = full_name.upper() print(certificate_name)
def combo(ls, c): if c == 0: return [[]] l =[] for i in range(0, len(ls)): m = ls[i] remLst = ls[i + 1:] for p in combo(remLst, c-1): l.append([m]+p) return l a =str("input") n =int(input("combo :")) list_1 =[i for i in a] print("combination :",combo(list_1, n))
def combo(ls, c): if c == 0: return [[]] l = [] for i in range(0, len(ls)): m = ls[i] rem_lst = ls[i + 1:] for p in combo(remLst, c - 1): l.append([m] + p) return l a = str('input') n = int(input('combo :')) list_1 = [i for i in a] print('combination :', combo(list_1, n))
""" Sample module docstring """ def world(): """ Sample function docstring """ print('world')
""" Sample module docstring """ def world(): """ Sample function docstring """ print('world')
# https://www.hackerrank.com/challenges/strange-code/problem def strangeCounter(t): k = 3 while t > k: t -= k k *= 2 return k - t + 1 if __name__ == '__main__': t0 = 6 assert strangeCounter(t0) == 4
def strange_counter(t): k = 3 while t > k: t -= k k *= 2 return k - t + 1 if __name__ == '__main__': t0 = 6 assert strange_counter(t0) == 4
SECRET_KEY = 'fake-key' INSTALLED_APPS = [ 'django_mercadopago', 'tests', ] MIDDLEWARE = [ 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', ] DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', } } ROOT_URLCONF = 'tests.urls' MERCADOPAGO = { 'autoprocess': False, 'base_host': 'http://localhost:8001', 'success_url': 'mp_success', # Inexistant 'failure_url': 'mp_failure', # Inexistant 'pending_url': 'mp_pending', # Inexistant }
secret_key = 'fake-key' installed_apps = ['django_mercadopago', 'tests'] middleware = ['django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware'] databases = {'default': {'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:'}} root_urlconf = 'tests.urls' mercadopago = {'autoprocess': False, 'base_host': 'http://localhost:8001', 'success_url': 'mp_success', 'failure_url': 'mp_failure', 'pending_url': 'mp_pending'}
def print_name(firstName, lastName, reverse=False): """ :param firstName: String first name :param lastName: String last name :param reverse: boolean :return: None """ if reverse: print(lastName, ',', firstName) else: print(firstName, lastName) print_name("Eric", "Grimson", True) print_name("Eric", "Grimson", False) print_name("Eric", "Grimson", reverse=False) # We can specify a parameter print_name("Eric", lastName="Grimson", reverse=False) # If we specify each param, then we can change the order print_name(lastName="Grimson", reverse=False, firstName="Erick") print_name("Erick", "Grimson") # If we specified a param in the function we can ignore that param
def print_name(firstName, lastName, reverse=False): """ :param firstName: String first name :param lastName: String last name :param reverse: boolean :return: None """ if reverse: print(lastName, ',', firstName) else: print(firstName, lastName) print_name('Eric', 'Grimson', True) print_name('Eric', 'Grimson', False) print_name('Eric', 'Grimson', reverse=False) print_name('Eric', lastName='Grimson', reverse=False) print_name(lastName='Grimson', reverse=False, firstName='Erick') print_name('Erick', 'Grimson')
class PrivateMessage: def __init__(self, type, author, body, filename=None, waID=None, tgID=None): self.type = type self.author = author self.body = body self.waID = waID self.tgID = tgID self.filename = filename class GroupMessage: def __init__(self, type, author, body, title, filename=None, waID=None, tgID=None): self.type = type self.author = author self.body = body self.title = title self.waID = waID self.tgID = tgID self.filename = filename class CreateChat: def __init__(self, title, waID=None, tgID=None): self.title = title self.waID = waID self.tgID = tgID class UpdateChat: def __init__(self, title, picture, participants, waID=None, tgID=None): self.title = title self.picture = picture self.participants = participants self.waID = waID self.tgID = tgID
class Privatemessage: def __init__(self, type, author, body, filename=None, waID=None, tgID=None): self.type = type self.author = author self.body = body self.waID = waID self.tgID = tgID self.filename = filename class Groupmessage: def __init__(self, type, author, body, title, filename=None, waID=None, tgID=None): self.type = type self.author = author self.body = body self.title = title self.waID = waID self.tgID = tgID self.filename = filename class Createchat: def __init__(self, title, waID=None, tgID=None): self.title = title self.waID = waID self.tgID = tgID class Updatechat: def __init__(self, title, picture, participants, waID=None, tgID=None): self.title = title self.picture = picture self.participants = participants self.waID = waID self.tgID = tgID
# Create phone number def create_phone_number(n): full_str = ''.join([str(numb) for numb in x]) return f'({full_str[0:3]})' + ' ' + f'{full_str[3:6]}' + '-' + f'{full_str[6:10]}' def create_phone_number_2(x): phone_number = "({}{}{}) {}{}{}-{}{}{}{}".format(*x) return phone_number
def create_phone_number(n): full_str = ''.join([str(numb) for numb in x]) return f'({full_str[0:3]})' + ' ' + f'{full_str[3:6]}' + '-' + f'{full_str[6:10]}' def create_phone_number_2(x): phone_number = '({}{}{}) {}{}{}-{}{}{}{}'.format(*x) return phone_number
# -*- coding: utf-8 -*- def shape(src_str, prefix_str, suffix_str): prefix_pos = src_str.find(prefix_str); if prefix_pos == -1: return None; #endif prefix_pos = prefix_pos + len(prefix_str); temp_str = src_str[prefix_pos:]; suffix_pos = temp_str.find(suffix_str); if suffix_pos == -1: return None; #endif dest_str = temp_str[:suffix_pos]; return dest_str; #enddef if __name__ == '__main__': pass; #end
def shape(src_str, prefix_str, suffix_str): prefix_pos = src_str.find(prefix_str) if prefix_pos == -1: return None prefix_pos = prefix_pos + len(prefix_str) temp_str = src_str[prefix_pos:] suffix_pos = temp_str.find(suffix_str) if suffix_pos == -1: return None dest_str = temp_str[:suffix_pos] return dest_str if __name__ == '__main__': pass
fileout = open("makeshingles.sh", "w") for i in range(1,57): if i >= 10: s = "0" + str(i) else: s = "00" + str(i) fileout.write("./a.out TEMPF/OUT-" + s + ".txt TEMPK/KEYWORDS-" + s + ".txt\n") fileout.close()
fileout = open('makeshingles.sh', 'w') for i in range(1, 57): if i >= 10: s = '0' + str(i) else: s = '00' + str(i) fileout.write('./a.out TEMPF/OUT-' + s + '.txt TEMPK/KEYWORDS-' + s + '.txt\n') fileout.close()
""" n & (n - 1) == 0 """ class Solution(object): def isPowerOfTwo(self, n): if n == 0: return False return n & (n - 1) == 0 """ n&(-n) == n """ class Solution(object): def isPowerOfTwo(self, n): if n == 0: return False return n & (-n) == n """ log N """ class Solution(object): def isPowerOfTwo(self, n): if n == 0: return False while n % 2 == 0: n /= 2 return n == 1
""" n & (n - 1) == 0 """ class Solution(object): def is_power_of_two(self, n): if n == 0: return False return n & n - 1 == 0 '\n\nn&(-n) == n\n\n' class Solution(object): def is_power_of_two(self, n): if n == 0: return False return n & -n == n '\n\nlog N\n\n' class Solution(object): def is_power_of_two(self, n): if n == 0: return False while n % 2 == 0: n /= 2 return n == 1
# 0: 1: 2: 3: 4: # aaaa .... aaaa aaaa .... # b c . c . c . c b c # b c . c . c . c b c # .... .... dddd dddd dddd # e f . f e . . f . f # e f . f e . . f . f # gggg .... gggg gggg .... # # 5: 6: 7: 8: 9: # aaaa aaaa aaaa aaaa aaaa # b . b . . c b c b c # b . b . . c b c b c # dddd dddd .... dddd dddd # . f e f . f e f . f # . f e f . f e f . f # gggg gggg .... gggg gggg with open('input') as f: values = [line.split(' | ') for line in f.read().strip().split('\n')] # Part 1 count = 0 for _, outputs in values: for o in outputs.split(): count += len(o) in (2, 3, 4, 7) print(count) # 301 # Part 2 mapping = { 'abcefg': '0', 'cf': '1', 'acdeg': '2', 'acdfg': '3', 'bcdf': '4', 'abdfg': '5', 'abdefg': '6', 'acf': '7', 'abcdefg': '8', 'abcdfg': '9', } def decode_signals(signals): tr = {} signals = [set(s) for s in signals] zero_six_nine = list(filter(lambda x: len(x) == 6, signals)) one = next(filter(lambda x: len(x) == 2, signals)) two_three_five = list(filter(lambda x: len(x) == 5, signals)) four = next(filter(lambda x: len(x) == 4, signals)) six = next(filter(lambda x: len(one - x), zero_six_nine)) seven = next(filter(lambda x: len(x) == 3, signals)) eight = next(filter(lambda x: len(x) == 7, signals)) nine = next(filter(lambda x: not len(four - x), zero_six_nine)) zero = next(filter(lambda x: x is not six and x is not nine, zero_six_nine)) two_or_three = next(filter(lambda x: len(six - x) == 2, two_three_five)) tr[next(iter(seven - one))] = 'a' tr[next(iter(four - two_or_three - one))] = 'b' tr[next(iter(one - six))] = 'c' tr[next(iter(eight - zero))] = 'd' tr[next(iter(eight - nine))] = 'e' tr[next(iter(one - (one - six)))] = 'f' tr[next(iter(nine - four - seven))] = 'g' return tr def translate(outputs, tr): return int(''.join(mapping[''.join(sorted(tr[c] for c in o))] for o in outputs)) total = 0 for signals, outputs in values: total += translate(outputs.split(), decode_signals(signals.split())) print(total) # 908067
with open('input') as f: values = [line.split(' | ') for line in f.read().strip().split('\n')] count = 0 for (_, outputs) in values: for o in outputs.split(): count += len(o) in (2, 3, 4, 7) print(count) mapping = {'abcefg': '0', 'cf': '1', 'acdeg': '2', 'acdfg': '3', 'bcdf': '4', 'abdfg': '5', 'abdefg': '6', 'acf': '7', 'abcdefg': '8', 'abcdfg': '9'} def decode_signals(signals): tr = {} signals = [set(s) for s in signals] zero_six_nine = list(filter(lambda x: len(x) == 6, signals)) one = next(filter(lambda x: len(x) == 2, signals)) two_three_five = list(filter(lambda x: len(x) == 5, signals)) four = next(filter(lambda x: len(x) == 4, signals)) six = next(filter(lambda x: len(one - x), zero_six_nine)) seven = next(filter(lambda x: len(x) == 3, signals)) eight = next(filter(lambda x: len(x) == 7, signals)) nine = next(filter(lambda x: not len(four - x), zero_six_nine)) zero = next(filter(lambda x: x is not six and x is not nine, zero_six_nine)) two_or_three = next(filter(lambda x: len(six - x) == 2, two_three_five)) tr[next(iter(seven - one))] = 'a' tr[next(iter(four - two_or_three - one))] = 'b' tr[next(iter(one - six))] = 'c' tr[next(iter(eight - zero))] = 'd' tr[next(iter(eight - nine))] = 'e' tr[next(iter(one - (one - six)))] = 'f' tr[next(iter(nine - four - seven))] = 'g' return tr def translate(outputs, tr): return int(''.join((mapping[''.join(sorted((tr[c] for c in o)))] for o in outputs))) total = 0 for (signals, outputs) in values: total += translate(outputs.split(), decode_signals(signals.split())) print(total)
class Error (Exception): pass class NotEnoughPlayersError (Error): """ when too many cards have been drawn """ def __init__(self, message): self.message = "must have more than one player!" class BetTooSmallError (Error): """ too little has been bet """ def __init__(self, message): self.message = "you must bet at least as much as the prior bet increase!" class BetTooLargeError (Error): """ when the bet is larger than holdings """ def __init__(self, message): self.message = "you have bet more than what you have!"
class Error(Exception): pass class Notenoughplayerserror(Error): """ when too many cards have been drawn """ def __init__(self, message): self.message = 'must have more than one player!' class Bettoosmallerror(Error): """ too little has been bet """ def __init__(self, message): self.message = 'you must bet at least as much as the prior bet increase!' class Bettoolargeerror(Error): """ when the bet is larger than holdings """ def __init__(self, message): self.message = 'you have bet more than what you have!'
def subset(array,n,ans): subs = [None]*n helper(n,array,subs,0,ans) return ans def helper(n,array,subs,i,ans): if i==n: lis=[] if any(subs): for j in range(len(subs)): if subs[j]!=None: lis.append(subs[j]) ans.append(lis) else: subs[i]=None helper(n,array,subs,i+1,ans) subs[i]=array[i] helper(n,array,subs,i+1,ans) ans=[] a = subset([1,2,3],3,ans) print(a)
def subset(array, n, ans): subs = [None] * n helper(n, array, subs, 0, ans) return ans def helper(n, array, subs, i, ans): if i == n: lis = [] if any(subs): for j in range(len(subs)): if subs[j] != None: lis.append(subs[j]) ans.append(lis) else: subs[i] = None helper(n, array, subs, i + 1, ans) subs[i] = array[i] helper(n, array, subs, i + 1, ans) ans = [] a = subset([1, 2, 3], 3, ans) print(a)
while True: username = input("Enter username: ") if username == 'pypy': break else: continue
while True: username = input('Enter username: ') if username == 'pypy': break else: continue
lados = [float(x) for x in input().split()] lados.sort() lados = lados[::-1] a, b, c = list(lados) if a >= b + c: print('NAO FORMA TRIANGULO') else: if a ** 2 == b ** 2 + c ** 2: print('TRIANGULO RETANGULO') if a ** 2 > b ** 2 + c ** 2: print('TRIANGULO OBTUSANGULO') if a ** 2 < b ** 2 + c ** 2: print('TRIANGULO ACUTANGULO') if a == b == c: print('TRIANGULO EQUILATERO') if a == b != c or a != b == c or a == c != b: print('TRIANGULO ISOSCELES')
lados = [float(x) for x in input().split()] lados.sort() lados = lados[::-1] (a, b, c) = list(lados) if a >= b + c: print('NAO FORMA TRIANGULO') else: if a ** 2 == b ** 2 + c ** 2: print('TRIANGULO RETANGULO') if a ** 2 > b ** 2 + c ** 2: print('TRIANGULO OBTUSANGULO') if a ** 2 < b ** 2 + c ** 2: print('TRIANGULO ACUTANGULO') if a == b == c: print('TRIANGULO EQUILATERO') if a == b != c or a != b == c or a == c != b: print('TRIANGULO ISOSCELES')
char = [] string = "ppphhpphhppppphhhhhhhpphhpppphhpphpp" for i in range(len(string)): if string[i] == 'p' or string[i] == 'P': char.append('P') else: char.append('H') print(char)
char = [] string = 'ppphhpphhppppphhhhhhhpphhpppphhpphpp' for i in range(len(string)): if string[i] == 'p' or string[i] == 'P': char.append('P') else: char.append('H') print(char)
def pal(p): # str.isalpha is function form of the method .isalpha() np = list(filter(str.isalpha, p.lower())) # remove non-letters return np == np[::-1] and len(np) > 0 # check if palindrome # py.test exercise_10_26_16.py --cov=exercise_10_26_16.py --cov-report=html def test_pal(): assert pal('mom') assert pal('dog') is False assert pal('9874^&') is False assert pal("Go hang a salami I'm a lasagna hog.") if __name__ == '__main__': t = input("Text: ") print(pal(t))
def pal(p): np = list(filter(str.isalpha, p.lower())) return np == np[::-1] and len(np) > 0 def test_pal(): assert pal('mom') assert pal('dog') is False assert pal('9874^&') is False assert pal("Go hang a salami I'm a lasagna hog.") if __name__ == '__main__': t = input('Text: ') print(pal(t))
class ParkingSystem: # # Instance Variables (Accepted), O(1) time, O(1) space wrt addCar # def __init__(self, big: int, medium: int, small: int): # self.big = big # self.medium = medium # self.small = small # def addCar(self, carType: int) -> bool: # if carType == 1: # if self.big > 0: # self.big -= 1 # return True # elif carType == 2: # if self.medium > 0: # self.medium -= 1 # return True # else: # if self.small > 0: # self.small -= 1 # return True # return False # # Hashmap (Accepted), O(1) time and space wrt addCar # def __init__(self, big: int, medium: int, small: int): # self.spaces = {} # self.spaces[1] = big # self.spaces[2] = medium # self.spaces[3] = small # def addCar(self, carType: int) -> bool: # if self.spaces[carType] > 0: # self.spaces[carType] -= 1 # return True # return False # Array (Top Voted), O(1) time, O(1) space wrt addCar def __init__(self, big, medium, small): self.A = [big, medium, small] def addCar(self, carType): self.A[carType - 1] -= 1 return self.A[carType - 1] >= 0 # Your ParkingSystem object will be instantiated and called as such: # obj = ParkingSystem(big, medium, small) # param_1 = obj.addCar(carType)
class Parkingsystem: def __init__(self, big, medium, small): self.A = [big, medium, small] def add_car(self, carType): self.A[carType - 1] -= 1 return self.A[carType - 1] >= 0
numero = int(input("Introduzca el numero= ")) if numero >= 10: numero *= 3 print(numero) else: numero *=4 print(numero)
numero = int(input('Introduzca el numero= ')) if numero >= 10: numero *= 3 print(numero) else: numero *= 4 print(numero)
#Week1 #Exercise 1: Use input to ask name, age, and hometown. #Print Hello, my name is {}. I am {} years old and I live in {} name=input("Enter your name: ") age=input("Enter your age: ") hometown=input("Enter your hometown: ") print("Hello, my name is {}. I am {} years old and I live in {}".format(name, age, hometown)) #Exercise 2: Use input to ask 3 numbers #Print average of these 3 numbers number1=float(input("Enter your number1: ")) number2=float(input("Enter your number2: ")) number3=float(input("Enter your number3: ")) print((number1+number2+number3)/3) #Exercise 3: Use input to ask gpa of student #If gpa bigger than 9.0 print excellent #if gpa bigger than 6.5 print good #If gpa bigger than 5.0 print average #Else print Weak gpa=float(input("Your gpa: ")) if gpa>=9: print("excellent") elif gpa>=6.5: print("good") elif gpa>=5.0: print("average") #Exercise 4: Use input to ask a number #After that print result of number after going through flow chart in this link #https://drive.google.com/file/d/1CXpx60fYVfJGWxP79jlwADtn2aNjj1Ju/view?usp=sharing x=int(input("enter your number: ")) if(x<5): x=x*10 if(x<2): x=x-6 else: x=x+5 elif (x>10): x=x*x else: x=x*6 print(x) #Week2 #Exercise 5: Use input to ask number #Print every number divisible by three from 1 to this number number=int(input("Enter your number: ")) for i in range(1,number+1): if(i%3==0): print(i) #Exercise 6: Use input to ask number #Print yes if this number is a prime number, else print no #Method 1: prime=True number=int(input("Enter your number: ")) for i in range(2, number): if(number%i==0): prime = False break if prime==True: print("Yes") else: print("No") #Method 2: count=0 number=int(input("Enter your number: ")) for i in range(1, number+1): if(number%i==0): count+=1 if(count==2): print("Yes") else: print("No") #We have list zoo = ['cat', 'elephant', 'panda', 'lion'] #Exercise 7: Print the number of animal in zoo zoo = ['cat', 'elephant', 'panda', 'lion'] print(len(zoo)) #Exercise 8: Use input to ask a animal #If this animal is not already in zoo print zoo after adding this animal #Else print This animal already in zoo and ask again (#Hint: use while) repeat=True while repeat: animal=input("Enter your animal: ") if animal in zoo: print("This animal already in zoo") else: zoo.append(animal) repeat=False
name = input('Enter your name: ') age = input('Enter your age: ') hometown = input('Enter your hometown: ') print('Hello, my name is {}. I am {} years old and I live in {}'.format(name, age, hometown)) number1 = float(input('Enter your number1: ')) number2 = float(input('Enter your number2: ')) number3 = float(input('Enter your number3: ')) print((number1 + number2 + number3) / 3) gpa = float(input('Your gpa: ')) if gpa >= 9: print('excellent') elif gpa >= 6.5: print('good') elif gpa >= 5.0: print('average') x = int(input('enter your number: ')) if x < 5: x = x * 10 if x < 2: x = x - 6 else: x = x + 5 elif x > 10: x = x * x else: x = x * 6 print(x) number = int(input('Enter your number: ')) for i in range(1, number + 1): if i % 3 == 0: print(i) prime = True number = int(input('Enter your number: ')) for i in range(2, number): if number % i == 0: prime = False break if prime == True: print('Yes') else: print('No') count = 0 number = int(input('Enter your number: ')) for i in range(1, number + 1): if number % i == 0: count += 1 if count == 2: print('Yes') else: print('No') zoo = ['cat', 'elephant', 'panda', 'lion'] print(len(zoo)) repeat = True while repeat: animal = input('Enter your animal: ') if animal in zoo: print('This animal already in zoo') else: zoo.append(animal) repeat = False
class Solution: def binaryGap(self, N): """ :type N: int :rtype: int """ dis = 0 last = 0 now = 1 while N > 0: bit = N & 0x01 if bit == 1 and last == 0: last = now elif bit == 1: dis = max(dis, now - last) last = now N >>= 1 now += 1 return dis if __name__ == '__main__': solution = Solution() print(solution.binaryGap(22)) print(solution.binaryGap(5)) print(solution.binaryGap(6)) print(solution.binaryGap(8)) else: pass
class Solution: def binary_gap(self, N): """ :type N: int :rtype: int """ dis = 0 last = 0 now = 1 while N > 0: bit = N & 1 if bit == 1 and last == 0: last = now elif bit == 1: dis = max(dis, now - last) last = now n >>= 1 now += 1 return dis if __name__ == '__main__': solution = solution() print(solution.binaryGap(22)) print(solution.binaryGap(5)) print(solution.binaryGap(6)) print(solution.binaryGap(8)) else: pass
# parsetab.py # This file is automatically generated. Do not edit. _tabversion = '3.2' _lr_method = 'LALR' _lr_signature = '\x126h\x8d\xec\x81\xa9\x13 O\x084\xd7\xbc\xd3\x17' _lr_action_items = {'RPAREN':([1,2,4,8,11,12,13,14,15,],[-1,-7,-6,13,-5,-4,-8,-2,-3,]),'DIVIDE':([1,2,4,11,12,13,14,15,],[6,-7,-6,-5,-4,-8,6,6,]),'NUMBER':([0,3,6,7,9,10,],[2,2,2,2,2,2,]),'TIMES':([1,2,4,11,12,13,14,15,],[7,-7,-6,-5,-4,-8,7,7,]),'PLUS':([1,2,4,5,8,11,12,13,14,15,],[-1,-7,-6,9,9,-5,-4,-8,-2,-3,]),'LPAREN':([0,3,6,7,9,10,],[3,3,3,3,3,3,]),'MINUS':([1,2,4,5,8,11,12,13,14,15,],[-1,-7,-6,10,10,-5,-4,-8,-2,-3,]),'$end':([1,2,4,5,11,12,13,14,15,],[-1,-7,-6,0,-5,-4,-8,-2,-3,]),} _lr_action = { } for _k, _v in _lr_action_items.items(): for _x,_y in zip(_v[0],_v[1]): if not _x in _lr_action: _lr_action[_x] = { } _lr_action[_x][_k] = _y del _lr_action_items _lr_goto_items = {'term':([0,3,9,10,],[1,1,14,15,]),'expression':([0,3,],[5,8,]),'factor':([0,3,6,7,9,10,],[4,4,11,12,4,4,]),} _lr_goto = { } for _k, _v in _lr_goto_items.items(): for _x,_y in zip(_v[0],_v[1]): if not _x in _lr_goto: _lr_goto[_x] = { } _lr_goto[_x][_k] = _y del _lr_goto_items _lr_productions = [ ("S' -> expression","S'",1,None,None,None), ('expression -> term','expression',1,'p_expression_term','/Users/a1070571/Documents/GitHub/muddy/src/muddy/muddy/language/compute.py',53), ('expression -> expression PLUS term','expression',3,'p_expression_plus','/Users/a1070571/Documents/GitHub/muddy/src/muddy/muddy/language/compute.py',57), ('expression -> expression MINUS term','expression',3,'p_expression_minus','/Users/a1070571/Documents/GitHub/muddy/src/muddy/muddy/language/compute.py',61), ('term -> term TIMES factor','term',3,'p_term_times','/Users/a1070571/Documents/GitHub/muddy/src/muddy/muddy/language/compute.py',65), ('term -> term DIVIDE factor','term',3,'p_term_divide','/Users/a1070571/Documents/GitHub/muddy/src/muddy/muddy/language/compute.py',69), ('term -> factor','term',1,'p_term_factor','/Users/a1070571/Documents/GitHub/muddy/src/muddy/muddy/language/compute.py',73), ('factor -> NUMBER','factor',1,'p_factor_num','/Users/a1070571/Documents/GitHub/muddy/src/muddy/muddy/language/compute.py',77), ('factor -> LPAREN expression RPAREN','factor',3,'p_factor_expr','/Users/a1070571/Documents/GitHub/muddy/src/muddy/muddy/language/compute.py',81), ]
_tabversion = '3.2' _lr_method = 'LALR' _lr_signature = '\x126h\x8dì\x81©\x13 O\x084×¼Ó\x17' _lr_action_items = {'RPAREN': ([1, 2, 4, 8, 11, 12, 13, 14, 15], [-1, -7, -6, 13, -5, -4, -8, -2, -3]), 'DIVIDE': ([1, 2, 4, 11, 12, 13, 14, 15], [6, -7, -6, -5, -4, -8, 6, 6]), 'NUMBER': ([0, 3, 6, 7, 9, 10], [2, 2, 2, 2, 2, 2]), 'TIMES': ([1, 2, 4, 11, 12, 13, 14, 15], [7, -7, -6, -5, -4, -8, 7, 7]), 'PLUS': ([1, 2, 4, 5, 8, 11, 12, 13, 14, 15], [-1, -7, -6, 9, 9, -5, -4, -8, -2, -3]), 'LPAREN': ([0, 3, 6, 7, 9, 10], [3, 3, 3, 3, 3, 3]), 'MINUS': ([1, 2, 4, 5, 8, 11, 12, 13, 14, 15], [-1, -7, -6, 10, 10, -5, -4, -8, -2, -3]), '$end': ([1, 2, 4, 5, 11, 12, 13, 14, 15], [-1, -7, -6, 0, -5, -4, -8, -2, -3])} _lr_action = {} for (_k, _v) in _lr_action_items.items(): for (_x, _y) in zip(_v[0], _v[1]): if not _x in _lr_action: _lr_action[_x] = {} _lr_action[_x][_k] = _y del _lr_action_items _lr_goto_items = {'term': ([0, 3, 9, 10], [1, 1, 14, 15]), 'expression': ([0, 3], [5, 8]), 'factor': ([0, 3, 6, 7, 9, 10], [4, 4, 11, 12, 4, 4])} _lr_goto = {} for (_k, _v) in _lr_goto_items.items(): for (_x, _y) in zip(_v[0], _v[1]): if not _x in _lr_goto: _lr_goto[_x] = {} _lr_goto[_x][_k] = _y del _lr_goto_items _lr_productions = [("S' -> expression", "S'", 1, None, None, None), ('expression -> term', 'expression', 1, 'p_expression_term', '/Users/a1070571/Documents/GitHub/muddy/src/muddy/muddy/language/compute.py', 53), ('expression -> expression PLUS term', 'expression', 3, 'p_expression_plus', '/Users/a1070571/Documents/GitHub/muddy/src/muddy/muddy/language/compute.py', 57), ('expression -> expression MINUS term', 'expression', 3, 'p_expression_minus', '/Users/a1070571/Documents/GitHub/muddy/src/muddy/muddy/language/compute.py', 61), ('term -> term TIMES factor', 'term', 3, 'p_term_times', '/Users/a1070571/Documents/GitHub/muddy/src/muddy/muddy/language/compute.py', 65), ('term -> term DIVIDE factor', 'term', 3, 'p_term_divide', '/Users/a1070571/Documents/GitHub/muddy/src/muddy/muddy/language/compute.py', 69), ('term -> factor', 'term', 1, 'p_term_factor', '/Users/a1070571/Documents/GitHub/muddy/src/muddy/muddy/language/compute.py', 73), ('factor -> NUMBER', 'factor', 1, 'p_factor_num', '/Users/a1070571/Documents/GitHub/muddy/src/muddy/muddy/language/compute.py', 77), ('factor -> LPAREN expression RPAREN', 'factor', 3, 'p_factor_expr', '/Users/a1070571/Documents/GitHub/muddy/src/muddy/muddy/language/compute.py', 81)]
# https://leetcode.com/problems/license-key-formatting/ class Solution: def licenseKeyFormatting(self, S, K): """ :type S: str :type K: int :rtype: str """ S = ''.join(s.upper() for s in S if s.isalnum()) first_group = len(S) % K out = [] is_first_group = first_group > 0 i = 0 for s in S: if is_first_group and i == first_group: is_first_group = False out.append('-') i = 0 if is_first_group: out.append(s) else: out.append(s) if i == K - 1: out.append('-') i = (i + 1) % K if out and out[-1] == '-': out.pop() return ''.join(out)
class Solution: def license_key_formatting(self, S, K): """ :type S: str :type K: int :rtype: str """ s = ''.join((s.upper() for s in S if s.isalnum())) first_group = len(S) % K out = [] is_first_group = first_group > 0 i = 0 for s in S: if is_first_group and i == first_group: is_first_group = False out.append('-') i = 0 if is_first_group: out.append(s) else: out.append(s) if i == K - 1: out.append('-') i = (i + 1) % K if out and out[-1] == '-': out.pop() return ''.join(out)
# # PySNMP MIB module PDN-SYSLOG-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/PDN-SYSLOG-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 20:30:50 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsIntersection, ValueSizeConstraint, ConstraintsUnion, SingleValueConstraint, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ValueSizeConstraint", "ConstraintsUnion", "SingleValueConstraint", "ValueRangeConstraint") entPhysicalIndex, = mibBuilder.importSymbols("ENTITY-MIB", "entPhysicalIndex") pdn_syslog, = mibBuilder.importSymbols("PDN-HEADER-MIB", "pdn-syslog") NotificationGroup, ObjectGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ObjectGroup", "ModuleCompliance") Integer32, TimeTicks, IpAddress, MibScalar, MibTable, MibTableRow, MibTableColumn, NotificationType, Gauge32, Bits, ModuleIdentity, Counter64, Unsigned32, MibIdentifier, ObjectIdentity, Counter32, iso = mibBuilder.importSymbols("SNMPv2-SMI", "Integer32", "TimeTicks", "IpAddress", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "NotificationType", "Gauge32", "Bits", "ModuleIdentity", "Counter64", "Unsigned32", "MibIdentifier", "ObjectIdentity", "Counter32", "iso") DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") pdnSyslog = ModuleIdentity((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 1)) pdnSyslog.setRevisions(('2003-02-13 00:00', '2001-11-15 00:00', '2001-04-10 00:00', '2001-08-09 00:00', '2000-04-24 00:00', '2000-02-05 00:00',)) if mibBuilder.loadTexts: pdnSyslog.setLastUpdated('200302130000Z') if mibBuilder.loadTexts: pdnSyslog.setOrganization('Paradyne Networks MIB Working Group') pdnSyslogConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 14)) pdnSyslogStatus = MibScalar((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("disable", 1), ("enable", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: pdnSyslogStatus.setStatus('current') pdnSyslogIPAddr = MibScalar((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 1, 2), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: pdnSyslogIPAddr.setStatus('current') pdnSyslogLevel = MibScalar((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("emerg", 1), ("err", 2), ("norm", 3), ("info", 4))).clone('norm')).setMaxAccess("readwrite") if mibBuilder.loadTexts: pdnSyslogLevel.setStatus('deprecated') pdnSyslogPort = MibScalar((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 1, 4), Integer32().clone(514)).setMaxAccess("readwrite") if mibBuilder.loadTexts: pdnSyslogPort.setStatus('current') pdnSyslogSeverityThreshold = MibScalar((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("emerg", 0), ("alert", 1), ("critical", 2), ("error", 3), ("warning", 4), ("notice", 5), ("info", 6), ("debug", 7)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: pdnSyslogSeverityThreshold.setStatus('current') pdnSyslogRemoteDaemon = MibScalar((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("disable", 1), ("enable", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: pdnSyslogRemoteDaemon.setStatus('current') pdnSyslogTable = MibTable((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 1, 7), ) if mibBuilder.loadTexts: pdnSyslogTable.setStatus('current') pdnSyslogEntry = MibTableRow((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 1, 7, 1), ).setIndexNames((0, "PDN-SYSLOG-MIB", "pdnSyslogNumber")) if mibBuilder.loadTexts: pdnSyslogEntry.setStatus('current') pdnSyslogNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 1, 7, 1, 1), Integer32()) if mibBuilder.loadTexts: pdnSyslogNumber.setStatus('current') pdnSyslogMessage = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 1, 7, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1024, 1024)).setFixedLength(1024)).setMaxAccess("readonly") if mibBuilder.loadTexts: pdnSyslogMessage.setStatus('current') pdnEntitySyslogTable = MibTable((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 1, 13), ) if mibBuilder.loadTexts: pdnEntitySyslogTable.setStatus('current') pdnEntitySyslogEntry = MibTableRow((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 1, 13, 1), ).setIndexNames((0, "ENTITY-MIB", "entPhysicalIndex"), (0, "PDN-SYSLOG-MIB", "pdnEntitySyslogNumber")) if mibBuilder.loadTexts: pdnEntitySyslogEntry.setStatus('current') pdnEntitySyslogNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 1, 13, 1, 1), Integer32()) if mibBuilder.loadTexts: pdnEntitySyslogNumber.setStatus('current') pdnEntitySyslogMessage = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 1, 13, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1024, 1024)).setFixedLength(1024)).setMaxAccess("readonly") if mibBuilder.loadTexts: pdnEntitySyslogMessage.setStatus('current') pdnSyslogNumOfMsgInTable = MibScalar((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 1, 8), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pdnSyslogNumOfMsgInTable.setStatus('current') pdnSyslogMaxTableSize = MibScalar((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 1, 9), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pdnSyslogMaxTableSize.setStatus('current') pdnSyslogClearTable = MibScalar((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("noOp", 1), ("clear", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: pdnSyslogClearTable.setStatus('current') pdnSyslogMsgToConsole = MibScalar((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("disable", 1), ("enable", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: pdnSyslogMsgToConsole.setStatus('current') pdnSyslogRateLimiting = MibScalar((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("disable", 1), ("enable", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: pdnSyslogRateLimiting.setStatus('current') pdnSyslogCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 14, 1)) pdnSyslogGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 14, 2)) pdnSyslogCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 14, 1, 1)).setObjects(("PDN-SYSLOG-MIB", "pdnSyslogGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): pdnSyslogCompliance = pdnSyslogCompliance.setStatus('current') pdnSyslogGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 14, 2, 1)).setObjects(("PDN-SYSLOG-MIB", "pdnSyslogStatus"), ("PDN-SYSLOG-MIB", "pdnSyslogIPAddr"), ("PDN-SYSLOG-MIB", "pdnSyslogPort"), ("PDN-SYSLOG-MIB", "pdnSyslogSeverityThreshold"), ("PDN-SYSLOG-MIB", "pdnSyslogRemoteDaemon"), ("PDN-SYSLOG-MIB", "pdnSyslogMessage"), ("PDN-SYSLOG-MIB", "pdnSyslogNumOfMsgInTable"), ("PDN-SYSLOG-MIB", "pdnSyslogMaxTableSize"), ("PDN-SYSLOG-MIB", "pdnSyslogClearTable"), ("PDN-SYSLOG-MIB", "pdnSyslogMsgToConsole"), ("PDN-SYSLOG-MIB", "pdnSyslogRateLimiting")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): pdnSyslogGroup = pdnSyslogGroup.setStatus('current') pdnSyslogOptionalGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 14, 2, 2)).setObjects(("PDN-SYSLOG-MIB", "pdnEntitySyslogMessage")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): pdnSyslogOptionalGroup = pdnSyslogOptionalGroup.setStatus('current') pdnSyslogDeprecatedGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 14, 2, 3)).setObjects(("PDN-SYSLOG-MIB", "pdnSyslogLevel")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): pdnSyslogDeprecatedGroup = pdnSyslogDeprecatedGroup.setStatus('deprecated') mibBuilder.exportSymbols("PDN-SYSLOG-MIB", pdnSyslogRemoteDaemon=pdnSyslogRemoteDaemon, pdnSyslogLevel=pdnSyslogLevel, pdnEntitySyslogNumber=pdnEntitySyslogNumber, pdnSyslogCompliance=pdnSyslogCompliance, pdnSyslogOptionalGroup=pdnSyslogOptionalGroup, pdnSyslogSeverityThreshold=pdnSyslogSeverityThreshold, PYSNMP_MODULE_ID=pdnSyslog, pdnSyslogMaxTableSize=pdnSyslogMaxTableSize, pdnSyslogIPAddr=pdnSyslogIPAddr, pdnSyslogTable=pdnSyslogTable, pdnSyslogMessage=pdnSyslogMessage, pdnSyslogRateLimiting=pdnSyslogRateLimiting, pdnSyslogClearTable=pdnSyslogClearTable, pdnEntitySyslogEntry=pdnEntitySyslogEntry, pdnSyslogNumber=pdnSyslogNumber, pdnSyslogConformance=pdnSyslogConformance, pdnSyslogEntry=pdnSyslogEntry, pdnSyslogCompliances=pdnSyslogCompliances, pdnSyslogMsgToConsole=pdnSyslogMsgToConsole, pdnEntitySyslogTable=pdnEntitySyslogTable, pdnEntitySyslogMessage=pdnEntitySyslogMessage, pdnSyslogNumOfMsgInTable=pdnSyslogNumOfMsgInTable, pdnSyslogGroups=pdnSyslogGroups, pdnSyslog=pdnSyslog, pdnSyslogGroup=pdnSyslogGroup, pdnSyslogStatus=pdnSyslogStatus, pdnSyslogDeprecatedGroup=pdnSyslogDeprecatedGroup, pdnSyslogPort=pdnSyslogPort)
(object_identifier, octet_string, integer) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'OctetString', 'Integer') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_intersection, value_size_constraint, constraints_union, single_value_constraint, value_range_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'ValueSizeConstraint', 'ConstraintsUnion', 'SingleValueConstraint', 'ValueRangeConstraint') (ent_physical_index,) = mibBuilder.importSymbols('ENTITY-MIB', 'entPhysicalIndex') (pdn_syslog,) = mibBuilder.importSymbols('PDN-HEADER-MIB', 'pdn-syslog') (notification_group, object_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ObjectGroup', 'ModuleCompliance') (integer32, time_ticks, ip_address, mib_scalar, mib_table, mib_table_row, mib_table_column, notification_type, gauge32, bits, module_identity, counter64, unsigned32, mib_identifier, object_identity, counter32, iso) = mibBuilder.importSymbols('SNMPv2-SMI', 'Integer32', 'TimeTicks', 'IpAddress', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'NotificationType', 'Gauge32', 'Bits', 'ModuleIdentity', 'Counter64', 'Unsigned32', 'MibIdentifier', 'ObjectIdentity', 'Counter32', 'iso') (display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention') pdn_syslog = module_identity((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 1)) pdnSyslog.setRevisions(('2003-02-13 00:00', '2001-11-15 00:00', '2001-04-10 00:00', '2001-08-09 00:00', '2000-04-24 00:00', '2000-02-05 00:00')) if mibBuilder.loadTexts: pdnSyslog.setLastUpdated('200302130000Z') if mibBuilder.loadTexts: pdnSyslog.setOrganization('Paradyne Networks MIB Working Group') pdn_syslog_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 14)) pdn_syslog_status = mib_scalar((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('disable', 1), ('enable', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: pdnSyslogStatus.setStatus('current') pdn_syslog_ip_addr = mib_scalar((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 1, 2), ip_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: pdnSyslogIPAddr.setStatus('current') pdn_syslog_level = mib_scalar((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('emerg', 1), ('err', 2), ('norm', 3), ('info', 4))).clone('norm')).setMaxAccess('readwrite') if mibBuilder.loadTexts: pdnSyslogLevel.setStatus('deprecated') pdn_syslog_port = mib_scalar((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 1, 4), integer32().clone(514)).setMaxAccess('readwrite') if mibBuilder.loadTexts: pdnSyslogPort.setStatus('current') pdn_syslog_severity_threshold = mib_scalar((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7))).clone(namedValues=named_values(('emerg', 0), ('alert', 1), ('critical', 2), ('error', 3), ('warning', 4), ('notice', 5), ('info', 6), ('debug', 7)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: pdnSyslogSeverityThreshold.setStatus('current') pdn_syslog_remote_daemon = mib_scalar((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('disable', 1), ('enable', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: pdnSyslogRemoteDaemon.setStatus('current') pdn_syslog_table = mib_table((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 1, 7)) if mibBuilder.loadTexts: pdnSyslogTable.setStatus('current') pdn_syslog_entry = mib_table_row((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 1, 7, 1)).setIndexNames((0, 'PDN-SYSLOG-MIB', 'pdnSyslogNumber')) if mibBuilder.loadTexts: pdnSyslogEntry.setStatus('current') pdn_syslog_number = mib_table_column((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 1, 7, 1, 1), integer32()) if mibBuilder.loadTexts: pdnSyslogNumber.setStatus('current') pdn_syslog_message = mib_table_column((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 1, 7, 1, 2), octet_string().subtype(subtypeSpec=value_size_constraint(1024, 1024)).setFixedLength(1024)).setMaxAccess('readonly') if mibBuilder.loadTexts: pdnSyslogMessage.setStatus('current') pdn_entity_syslog_table = mib_table((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 1, 13)) if mibBuilder.loadTexts: pdnEntitySyslogTable.setStatus('current') pdn_entity_syslog_entry = mib_table_row((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 1, 13, 1)).setIndexNames((0, 'ENTITY-MIB', 'entPhysicalIndex'), (0, 'PDN-SYSLOG-MIB', 'pdnEntitySyslogNumber')) if mibBuilder.loadTexts: pdnEntitySyslogEntry.setStatus('current') pdn_entity_syslog_number = mib_table_column((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 1, 13, 1, 1), integer32()) if mibBuilder.loadTexts: pdnEntitySyslogNumber.setStatus('current') pdn_entity_syslog_message = mib_table_column((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 1, 13, 1, 2), octet_string().subtype(subtypeSpec=value_size_constraint(1024, 1024)).setFixedLength(1024)).setMaxAccess('readonly') if mibBuilder.loadTexts: pdnEntitySyslogMessage.setStatus('current') pdn_syslog_num_of_msg_in_table = mib_scalar((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 1, 8), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: pdnSyslogNumOfMsgInTable.setStatus('current') pdn_syslog_max_table_size = mib_scalar((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 1, 9), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: pdnSyslogMaxTableSize.setStatus('current') pdn_syslog_clear_table = mib_scalar((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('noOp', 1), ('clear', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: pdnSyslogClearTable.setStatus('current') pdn_syslog_msg_to_console = mib_scalar((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 1, 11), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('disable', 1), ('enable', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: pdnSyslogMsgToConsole.setStatus('current') pdn_syslog_rate_limiting = mib_scalar((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 1, 12), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('disable', 1), ('enable', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: pdnSyslogRateLimiting.setStatus('current') pdn_syslog_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 14, 1)) pdn_syslog_groups = mib_identifier((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 14, 2)) pdn_syslog_compliance = module_compliance((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 14, 1, 1)).setObjects(('PDN-SYSLOG-MIB', 'pdnSyslogGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): pdn_syslog_compliance = pdnSyslogCompliance.setStatus('current') pdn_syslog_group = object_group((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 14, 2, 1)).setObjects(('PDN-SYSLOG-MIB', 'pdnSyslogStatus'), ('PDN-SYSLOG-MIB', 'pdnSyslogIPAddr'), ('PDN-SYSLOG-MIB', 'pdnSyslogPort'), ('PDN-SYSLOG-MIB', 'pdnSyslogSeverityThreshold'), ('PDN-SYSLOG-MIB', 'pdnSyslogRemoteDaemon'), ('PDN-SYSLOG-MIB', 'pdnSyslogMessage'), ('PDN-SYSLOG-MIB', 'pdnSyslogNumOfMsgInTable'), ('PDN-SYSLOG-MIB', 'pdnSyslogMaxTableSize'), ('PDN-SYSLOG-MIB', 'pdnSyslogClearTable'), ('PDN-SYSLOG-MIB', 'pdnSyslogMsgToConsole'), ('PDN-SYSLOG-MIB', 'pdnSyslogRateLimiting')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): pdn_syslog_group = pdnSyslogGroup.setStatus('current') pdn_syslog_optional_group = object_group((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 14, 2, 2)).setObjects(('PDN-SYSLOG-MIB', 'pdnEntitySyslogMessage')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): pdn_syslog_optional_group = pdnSyslogOptionalGroup.setStatus('current') pdn_syslog_deprecated_group = object_group((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 31, 14, 2, 3)).setObjects(('PDN-SYSLOG-MIB', 'pdnSyslogLevel')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): pdn_syslog_deprecated_group = pdnSyslogDeprecatedGroup.setStatus('deprecated') mibBuilder.exportSymbols('PDN-SYSLOG-MIB', pdnSyslogRemoteDaemon=pdnSyslogRemoteDaemon, pdnSyslogLevel=pdnSyslogLevel, pdnEntitySyslogNumber=pdnEntitySyslogNumber, pdnSyslogCompliance=pdnSyslogCompliance, pdnSyslogOptionalGroup=pdnSyslogOptionalGroup, pdnSyslogSeverityThreshold=pdnSyslogSeverityThreshold, PYSNMP_MODULE_ID=pdnSyslog, pdnSyslogMaxTableSize=pdnSyslogMaxTableSize, pdnSyslogIPAddr=pdnSyslogIPAddr, pdnSyslogTable=pdnSyslogTable, pdnSyslogMessage=pdnSyslogMessage, pdnSyslogRateLimiting=pdnSyslogRateLimiting, pdnSyslogClearTable=pdnSyslogClearTable, pdnEntitySyslogEntry=pdnEntitySyslogEntry, pdnSyslogNumber=pdnSyslogNumber, pdnSyslogConformance=pdnSyslogConformance, pdnSyslogEntry=pdnSyslogEntry, pdnSyslogCompliances=pdnSyslogCompliances, pdnSyslogMsgToConsole=pdnSyslogMsgToConsole, pdnEntitySyslogTable=pdnEntitySyslogTable, pdnEntitySyslogMessage=pdnEntitySyslogMessage, pdnSyslogNumOfMsgInTable=pdnSyslogNumOfMsgInTable, pdnSyslogGroups=pdnSyslogGroups, pdnSyslog=pdnSyslog, pdnSyslogGroup=pdnSyslogGroup, pdnSyslogStatus=pdnSyslogStatus, pdnSyslogDeprecatedGroup=pdnSyslogDeprecatedGroup, pdnSyslogPort=pdnSyslogPort)
BASE_NAME = "GTR Tool Rack Stereo" BUFFER_SIZE = 255 def main(): log('\n') # Get the track name proj_index = 0 track_index = 0 track = RPR_GetTrack(proj_index, track_index) response = RPR_GetSetMediaTrackInfo_String(track, 'P_NAME', '', False) (succeeded, track, param_name, track_name, set_new_value) = response if not succeeded: log('Failed to get the name for the default track in the default project: {}'.format(response)) return log('Current track name: {}'.format(track_name)) current_preset_index = 1 # Check if the track name already has the base name if track_name.startswith(BASE_NAME): # Get the current index and increment it track_name_parts = track_name.split('_') if len(track_name_parts) != 2: log('Track name does not match the expected format: {}'.format(track_name)) else: current_preset_index = int(track_name_parts[1]) log('Current preset index: {}'.format(current_preset_index)) if current_preset_index < 1: log('Could not reliably parse the current preset index: {}'.format(current_preset_index)) current_preset_index = 1 else: current_preset_index += 1 # Now set the name track_name = '{}_{}'.format(BASE_NAME, current_preset_index) log('New track name: {}'.format(track_name)) response = RPR_GetSetMediaTrackInfo_String(track, 'P_NAME', track_name, True) (succeeded, track, param_name, track_name, set_new_value) = response if not succeeded: log('Failed to update the track name to the new name: {}'.format(response)) return log('Success!') def log(string): RPR_ShowConsoleMsg('{}{}'.format(string,'\n')) if __name__ == "__main__": main()
base_name = 'GTR Tool Rack Stereo' buffer_size = 255 def main(): log('\n') proj_index = 0 track_index = 0 track = rpr__get_track(proj_index, track_index) response = rpr__get_set_media_track_info__string(track, 'P_NAME', '', False) (succeeded, track, param_name, track_name, set_new_value) = response if not succeeded: log('Failed to get the name for the default track in the default project: {}'.format(response)) return log('Current track name: {}'.format(track_name)) current_preset_index = 1 if track_name.startswith(BASE_NAME): track_name_parts = track_name.split('_') if len(track_name_parts) != 2: log('Track name does not match the expected format: {}'.format(track_name)) else: current_preset_index = int(track_name_parts[1]) log('Current preset index: {}'.format(current_preset_index)) if current_preset_index < 1: log('Could not reliably parse the current preset index: {}'.format(current_preset_index)) current_preset_index = 1 else: current_preset_index += 1 track_name = '{}_{}'.format(BASE_NAME, current_preset_index) log('New track name: {}'.format(track_name)) response = rpr__get_set_media_track_info__string(track, 'P_NAME', track_name, True) (succeeded, track, param_name, track_name, set_new_value) = response if not succeeded: log('Failed to update the track name to the new name: {}'.format(response)) return log('Success!') def log(string): rpr__show_console_msg('{}{}'.format(string, '\n')) if __name__ == '__main__': main()
""" notation_instances.py """ population = [{ 'Name': 'Shlaer-Mellor', 'About': 'Source of Executable UML / xUML modeling semantics', 'Why use it': 'Designed for fast easy hand drawing.Great for whiteboards and notes!' }, { 'Name': 'Starr', 'About': 'Stealth mode! Mimimal drawing clutter to put the focus on the subject. Easy to draw online', 'Why use it': 'Stealth mode! Mimimal drawing clutter to put the focus on the subject. Easy to draw online' }, { 'Name': 'xUML', 'About': 'AKA, Executable UML. Usage of UML to represent executable semantics', 'Why use it': 'Standards conformance. You are showing diagram to someone who knows, uses or must use UML' }]
""" notation_instances.py """ population = [{'Name': 'Shlaer-Mellor', 'About': 'Source of Executable UML / xUML modeling semantics', 'Why use it': 'Designed for fast easy hand drawing.Great for whiteboards and notes!'}, {'Name': 'Starr', 'About': 'Stealth mode! Mimimal drawing clutter to put the focus on the subject. Easy to draw online', 'Why use it': 'Stealth mode! Mimimal drawing clutter to put the focus on the subject. Easy to draw online'}, {'Name': 'xUML', 'About': 'AKA, Executable UML. Usage of UML to represent executable semantics', 'Why use it': 'Standards conformance. You are showing diagram to someone who knows, uses or must use UML'}]
def isPrime(n): # 1 is not a prime number by definition if n < 2: return False return sum(d for d in xrange(2, n) if n % d == 0) == 0 def UnitTests(): assert isPrime(1) == False assert isPrime(2) == True assert isPrime(3) == True assert isPrime(4) == False assert isPrime(13) == True assert isPrime(23) == True assert isPrime(30011) == True assert isPrime(1009) == True assert isPrime(17 * 19) == False assert isPrime(16) == False assert isPrime(101) UnitTests()
def is_prime(n): if n < 2: return False return sum((d for d in xrange(2, n) if n % d == 0)) == 0 def unit_tests(): assert is_prime(1) == False assert is_prime(2) == True assert is_prime(3) == True assert is_prime(4) == False assert is_prime(13) == True assert is_prime(23) == True assert is_prime(30011) == True assert is_prime(1009) == True assert is_prime(17 * 19) == False assert is_prime(16) == False assert is_prime(101) unit_tests()
# pylint: disable=missing-module-docstring __all__ = [ 'conftest', 'standard', 'test_main_layout', 'test_root_index', 'utils', ]
__all__ = ['conftest', 'standard', 'test_main_layout', 'test_root_index', 'utils']
# Check input files to see if 200 sample id's match def main(): file_a = "1kg-200samples.tsv" file_b = "1000genomes.low_coverage.GRCh38DH.alignment.index" sample_ids_a = [] sample_ids_b = [] fh_a = open(file_a, "r") fh_a.readline() for line in fh_a: sample_id = line.strip().split("\t")[-1] sample_ids_a.append(sample_id) fh_b = open(file_b, "r") for line in fh_b: sample_id = line.rstrip().split("\t")[0].split("/")[-1].split(".")[0] sample_ids_b.append(sample_id) sorted_samples_a = ",".join(sorted(sample_ids_a)) sorted_samples_b = ",".join(sorted(sample_ids_b)) if sorted_samples_a == sorted_samples_b: print("EQUAL") else: print("NOT EQUAL") if __name__ == "__main__": main()
def main(): file_a = '1kg-200samples.tsv' file_b = '1000genomes.low_coverage.GRCh38DH.alignment.index' sample_ids_a = [] sample_ids_b = [] fh_a = open(file_a, 'r') fh_a.readline() for line in fh_a: sample_id = line.strip().split('\t')[-1] sample_ids_a.append(sample_id) fh_b = open(file_b, 'r') for line in fh_b: sample_id = line.rstrip().split('\t')[0].split('/')[-1].split('.')[0] sample_ids_b.append(sample_id) sorted_samples_a = ','.join(sorted(sample_ids_a)) sorted_samples_b = ','.join(sorted(sample_ids_b)) if sorted_samples_a == sorted_samples_b: print('EQUAL') else: print('NOT EQUAL') if __name__ == '__main__': main()
def solution(X, A): leaves = set(range(1, X+1)) for second, leaf in enumerate(A): if leaf in leaves: leaves.remove(leaf) if not leaves: return second return -1 def test_solution(): assert solution(5, [1, 3, 1, 4, 2, 3, 5, 4]) == 6
def solution(X, A): leaves = set(range(1, X + 1)) for (second, leaf) in enumerate(A): if leaf in leaves: leaves.remove(leaf) if not leaves: return second return -1 def test_solution(): assert solution(5, [1, 3, 1, 4, 2, 3, 5, 4]) == 6
def frequency(lst, search_term): """Return frequency of term in lst. >>> frequency([1, 4, 3, 4, 4], 4) 3 >>> frequency([1, 4, 3], 7) 0 """ d = {} for x in lst: if x in d: d[x] = d[x] + 1 else: d[x] = 1 if search_term in d: return d[search_term] return 0
def frequency(lst, search_term): """Return frequency of term in lst. >>> frequency([1, 4, 3, 4, 4], 4) 3 >>> frequency([1, 4, 3], 7) 0 """ d = {} for x in lst: if x in d: d[x] = d[x] + 1 else: d[x] = 1 if search_term in d: return d[search_term] return 0
# -------------------- PATH --------------------- #ROOT_PATH = "/local/data2/pxu4/TypeClassification" ROOT_PATH = "." DATA_PATH = "%s/data" % ROOT_PATH ONTONOTES_DATA_PATH = "%s/OntoNotes" % DATA_PATH BBN_DATA_PATH="%s/BBN" % DATA_PATH LOG_DIR = "%s/log" % ROOT_PATH CHECKPOINT_DIR = "%s/checkpoint" % ROOT_PATH OUTPUT_DIR = "%s/output" % ROOT_PATH PKL_DIR='./pkl' EMBEDDING_DATA = "%s/glove.840B.300d.txt" % DATA_PATH testemb='testemb' prep='prep' # -------------------- DATA ---------------------- ONTONOTES_ALL = "%s/all.txt" % ONTONOTES_DATA_PATH ONTONOTES_TRAIN = "%s/train.txt" % ONTONOTES_DATA_PATH ONTONOTES_VALID = "%s/dev.txt" % ONTONOTES_DATA_PATH ONTONOTES_TEST = "%s/test.txt" % ONTONOTES_DATA_PATH ONTONOTES_TYPE = "%s/type.pkl" % ONTONOTES_DATA_PATH ONTONOTES_TRAIN_CLEAN = "%s/train_clean.tsv" % ONTONOTES_DATA_PATH ONTONOTES_TEST_CLEAN = "%s/test_clean.tsv" % ONTONOTES_DATA_PATH BBN_ALL = "%s/all.txt" % BBN_DATA_PATH BBN_TRAIN = "%s/train.txt" % BBN_DATA_PATH BBN_VALID = "%s/dev.txt" % BBN_DATA_PATH BBN_TEST = "%s/test.txt" % BBN_DATA_PATH BBN_TRAIN_CLEAN = "%s/train_clean.tsv" % BBN_DATA_PATH BBN_TEST_CLEAN = "%s/test_clean.tsv" % BBN_DATA_PATH BBN_TYPE = "%s/type.pkl" % BBN_DATA_PATH # --------------------- PARAM ----------------------- MAX_DOCUMENT_LENGTH = 30 MENTION_SIZE = 15 WINDOW_SIZE = 10 RANDOM_SEED = 2017
root_path = '.' data_path = '%s/data' % ROOT_PATH ontonotes_data_path = '%s/OntoNotes' % DATA_PATH bbn_data_path = '%s/BBN' % DATA_PATH log_dir = '%s/log' % ROOT_PATH checkpoint_dir = '%s/checkpoint' % ROOT_PATH output_dir = '%s/output' % ROOT_PATH pkl_dir = './pkl' embedding_data = '%s/glove.840B.300d.txt' % DATA_PATH testemb = 'testemb' prep = 'prep' ontonotes_all = '%s/all.txt' % ONTONOTES_DATA_PATH ontonotes_train = '%s/train.txt' % ONTONOTES_DATA_PATH ontonotes_valid = '%s/dev.txt' % ONTONOTES_DATA_PATH ontonotes_test = '%s/test.txt' % ONTONOTES_DATA_PATH ontonotes_type = '%s/type.pkl' % ONTONOTES_DATA_PATH ontonotes_train_clean = '%s/train_clean.tsv' % ONTONOTES_DATA_PATH ontonotes_test_clean = '%s/test_clean.tsv' % ONTONOTES_DATA_PATH bbn_all = '%s/all.txt' % BBN_DATA_PATH bbn_train = '%s/train.txt' % BBN_DATA_PATH bbn_valid = '%s/dev.txt' % BBN_DATA_PATH bbn_test = '%s/test.txt' % BBN_DATA_PATH bbn_train_clean = '%s/train_clean.tsv' % BBN_DATA_PATH bbn_test_clean = '%s/test_clean.tsv' % BBN_DATA_PATH bbn_type = '%s/type.pkl' % BBN_DATA_PATH max_document_length = 30 mention_size = 15 window_size = 10 random_seed = 2017
""" Reservoir sampling. Sample from stream of unknown length usage: from statistics import median res = initialize_res_samples(fields) num_samples = 50 random_generator = random.Random() random_generator.seed(42) for row_index, row in enumerate(stream): for field in fields: value = row[field] update_res_samples(res_samples, row_index, field, value, num_samples, random_generator) medians = {field: median(res_samples[field] for field in fields} """ def initialize_res_samples(fields): return {field: [] for field in fields} def update_res_samples(res_samples, row_index, field, value, num_samples, random_generator): """ Update reservoir samples :param res_samples: dicts of lists, instantiated with initialize_res_samples :param row_index: the index in the stream :param field: field that is being updated :param value: value for this field in this row :param num_samples: number of samples to keep for each field :param random_generator: random.Random() instance, be sure to set seed :return: """ if row_index < num_samples: res_samples[field].append(value) else: probability = num_samples/(row_index + 1) ramdom_number = random_generator.random() if ramdom_number < probability: index = random_generator.randint(0, num_samples - 1) res_samples[field][index] = value
""" Reservoir sampling. Sample from stream of unknown length usage: from statistics import median res = initialize_res_samples(fields) num_samples = 50 random_generator = random.Random() random_generator.seed(42) for row_index, row in enumerate(stream): for field in fields: value = row[field] update_res_samples(res_samples, row_index, field, value, num_samples, random_generator) medians = {field: median(res_samples[field] for field in fields} """ def initialize_res_samples(fields): return {field: [] for field in fields} def update_res_samples(res_samples, row_index, field, value, num_samples, random_generator): """ Update reservoir samples :param res_samples: dicts of lists, instantiated with initialize_res_samples :param row_index: the index in the stream :param field: field that is being updated :param value: value for this field in this row :param num_samples: number of samples to keep for each field :param random_generator: random.Random() instance, be sure to set seed :return: """ if row_index < num_samples: res_samples[field].append(value) else: probability = num_samples / (row_index + 1) ramdom_number = random_generator.random() if ramdom_number < probability: index = random_generator.randint(0, num_samples - 1) res_samples[field][index] = value
s = 0 for i in range(5): a = int(input()) if a < 40: a = 40 s += a print(int(s / 5))
s = 0 for i in range(5): a = int(input()) if a < 40: a = 40 s += a print(int(s / 5))
def fill_nan(df): # fill NaN in df sets and categorize columns datatype # adding missing column for the missing imputed values for column in df.columns: if column in numerical_feature_names: df[column+'_missing'] = df[column].isnull() mean = np.nanmean(df[column].values) df.loc[df[column].isnull(), column] = mean else: df.loc[df[column].isnull(), column] = "unknown" return df # Because otherwise the feature will be perfectly # linear and the regression will not be able to understand the different parameters def ensure_at_least_two_values_in_columns(df): number_un = df.nunique() >= 2 columns_with_at_least_two_entries = df.columns[number_un == True] df = df[columns_with_at_least_two_entries] return df ### remove similar features by only considering the most signaficant feature for similiar features def _features_explaining_output_without_similiar_features(dataframe_cleaned_of_nan, lower_threshold=0.65): """ removes the features too similiar too eachother but keeps one of these features to represent the output. This is choosen by explaintion of the output """ pairwise_explanation = pairwise_r2(dataframe_cleaned_of_nan) upper_threshold = 0.9999 ## now we are not interested in the y_column, in the pairwise matrix, this is why we take it from both axis pairwise_explanation.drop(self.y_output, axis=1, inplace=True) pairwise_explanation.drop(self.y_output, axis=0, inplace=True) features_that_are_similiar = pairwise_explanation.applymap(lambda x: x if (x > lower_threshold and x < upper_threshold) else None) feature_columns = [] columns_remove_due_to_similiarity = [] cols = features_that_are_similiar.columns cols_similiarity = defaultdict() for col in cols: similiar_features_to_column = features_that_are_similiar.unstack().dropna()[col].index.tolist() cols_similiar_to_eachother = [col] + similiar_features_to_column cols_similiar = defaultdict() ## need more than feature to be seperated if len(cols_similiar_to_eachother) > 1: explanation_of_output_from_similiar_features = r2_to_output(dataframe_cleaned_of_nan[self.y_output], dataframe_cleaned_of_nan[cols_similiar_to_eachother]) explanation_of_output = max(explanation_of_output_from_similiar_features) ## TODO: hardcoded value if explanation_of_output < 0.95: index_of_feature_to_keep = explanation_of_output_from_similiar_features.index(explanation_of_output) feature_to_keep = cols_similiar_to_eachother.pop(index_of_feature_to_keep) feature_columns.append(feature_to_keep) columns_remove_due_to_similiarity.append(cols_similiar_to_eachother) cols_similiarity[feature_to_keep] = cols_similiar_to_eachother if len(cols_similiar_to_eachother) == 1: if not dataframe_cleaned_of_nan[cols_similiar_to_eachother].empty: explanation_of_output = r2_to_output(dataframe_cleaned_of_nan[self.y_output], dataframe_cleaned_of_nan[cols_similiar_to_eachother]) else: explanation_of_output = [0] if explanation_of_output[0] > 0.95: columns_remove_due_to_similiarity.append(cols_similiar_to_eachother) cols_similiarity[cols_similiar_to_eachother[0]] = cols_similiar_to_eachother self.save_processed_dataset(self.dataset_data, cols_similiarity=cols_similiarity) # same feature can be explaining similiar attributes columns_remove_due_to_similiarity = [item for sublist in columns_remove_due_to_similiarity for item in sublist] cols_similiar_to_eachother = list(set(cols_similiar_to_eachother)) feature_columns = list(set(feature_columns)) columns_explaining_output = dataframe_cleaned_of_nan.drop(columns_remove_due_to_similiarity, axis=1).columns.tolist() columns_explaining_output.remove(self.y_output[0]) if self.mandatory_features: for col in self.mandatory_continous_feature_columns: if col not in columns_explaining_output: columns_explaining_output.append(col) self.save_processed_dataset(self.dataset_data, continuous_feature_columns=columns_explaining_output) return dataframe_cleaned_of_nan[columns_explaining_output]
def fill_nan(df): for column in df.columns: if column in numerical_feature_names: df[column + '_missing'] = df[column].isnull() mean = np.nanmean(df[column].values) df.loc[df[column].isnull(), column] = mean else: df.loc[df[column].isnull(), column] = 'unknown' return df def ensure_at_least_two_values_in_columns(df): number_un = df.nunique() >= 2 columns_with_at_least_two_entries = df.columns[number_un == True] df = df[columns_with_at_least_two_entries] return df def _features_explaining_output_without_similiar_features(dataframe_cleaned_of_nan, lower_threshold=0.65): """ removes the features too similiar too eachother but keeps one of these features to represent the output. This is choosen by explaintion of the output """ pairwise_explanation = pairwise_r2(dataframe_cleaned_of_nan) upper_threshold = 0.9999 pairwise_explanation.drop(self.y_output, axis=1, inplace=True) pairwise_explanation.drop(self.y_output, axis=0, inplace=True) features_that_are_similiar = pairwise_explanation.applymap(lambda x: x if x > lower_threshold and x < upper_threshold else None) feature_columns = [] columns_remove_due_to_similiarity = [] cols = features_that_are_similiar.columns cols_similiarity = defaultdict() for col in cols: similiar_features_to_column = features_that_are_similiar.unstack().dropna()[col].index.tolist() cols_similiar_to_eachother = [col] + similiar_features_to_column cols_similiar = defaultdict() if len(cols_similiar_to_eachother) > 1: explanation_of_output_from_similiar_features = r2_to_output(dataframe_cleaned_of_nan[self.y_output], dataframe_cleaned_of_nan[cols_similiar_to_eachother]) explanation_of_output = max(explanation_of_output_from_similiar_features) if explanation_of_output < 0.95: index_of_feature_to_keep = explanation_of_output_from_similiar_features.index(explanation_of_output) feature_to_keep = cols_similiar_to_eachother.pop(index_of_feature_to_keep) feature_columns.append(feature_to_keep) columns_remove_due_to_similiarity.append(cols_similiar_to_eachother) cols_similiarity[feature_to_keep] = cols_similiar_to_eachother if len(cols_similiar_to_eachother) == 1: if not dataframe_cleaned_of_nan[cols_similiar_to_eachother].empty: explanation_of_output = r2_to_output(dataframe_cleaned_of_nan[self.y_output], dataframe_cleaned_of_nan[cols_similiar_to_eachother]) else: explanation_of_output = [0] if explanation_of_output[0] > 0.95: columns_remove_due_to_similiarity.append(cols_similiar_to_eachother) cols_similiarity[cols_similiar_to_eachother[0]] = cols_similiar_to_eachother self.save_processed_dataset(self.dataset_data, cols_similiarity=cols_similiarity) columns_remove_due_to_similiarity = [item for sublist in columns_remove_due_to_similiarity for item in sublist] cols_similiar_to_eachother = list(set(cols_similiar_to_eachother)) feature_columns = list(set(feature_columns)) columns_explaining_output = dataframe_cleaned_of_nan.drop(columns_remove_due_to_similiarity, axis=1).columns.tolist() columns_explaining_output.remove(self.y_output[0]) if self.mandatory_features: for col in self.mandatory_continous_feature_columns: if col not in columns_explaining_output: columns_explaining_output.append(col) self.save_processed_dataset(self.dataset_data, continuous_feature_columns=columns_explaining_output) return dataframe_cleaned_of_nan[columns_explaining_output]
metric_dimension = { "post_all_days": { "metric": [ "post_impressions_unique", "post_engaged_users", "post_impressions_paid_unique" ], "period": [ "lifetime", ], "date_window": "lifetime", "dimension": [ "post_id", "period" ] }, }
metric_dimension = {'post_all_days': {'metric': ['post_impressions_unique', 'post_engaged_users', 'post_impressions_paid_unique'], 'period': ['lifetime'], 'date_window': 'lifetime', 'dimension': ['post_id', 'period']}}