content
stringlengths
7
1.05M
fixed_cases
stringlengths
1
1.28M
n = int(input()) lst = [list(map(int, input().split())) for _ in range(n)] dp = [[0]*3 for _ in range(n)] for i in range(3): dp[0][i] = lst[0][i] for i in range(1, n): dp[i][0] = max(dp[i-1][1], dp[i-1][2])+lst[i][0] dp[i][1] = max(dp[i-1][0], dp[i-1][2])+lst[i][1] dp[i][2] = max(dp[i-1][0], dp[i-1][1])+lst[i][2] print(max(dp[n-1]))
n = int(input()) lst = [list(map(int, input().split())) for _ in range(n)] dp = [[0] * 3 for _ in range(n)] for i in range(3): dp[0][i] = lst[0][i] for i in range(1, n): dp[i][0] = max(dp[i - 1][1], dp[i - 1][2]) + lst[i][0] dp[i][1] = max(dp[i - 1][0], dp[i - 1][2]) + lst[i][1] dp[i][2] = max(dp[i - 1][0], dp[i - 1][1]) + lst[i][2] print(max(dp[n - 1]))
# cases where FunctionAchievement should not unlock # >> CASE def test(): pass # >> CASE def func(): pass func # >> CASE def func(): pass f = func f() # >> CASE func() # >> CASE func
def test(): pass def func(): pass func def func(): pass f = func f() func() func
class Solution: def removeDuplicates(self, nums: List[int]) -> int: return len(nums) if len(nums) < 2 else self.calculate(nums) @staticmethod def calculate(nums): result = 0 for i in range(1, len(nums)): if nums[i] != nums[result]: result += 1 nums[result] = nums[i] return result + 1
class Solution: def remove_duplicates(self, nums: List[int]) -> int: return len(nums) if len(nums) < 2 else self.calculate(nums) @staticmethod def calculate(nums): result = 0 for i in range(1, len(nums)): if nums[i] != nums[result]: result += 1 nums[result] = nums[i] return result + 1
# function with large number of arguments def fun(a, b, c, d, e, f, g): return a + b + c * d + e * f * g print(fun(1, 2, 3, 4, 5, 6, 7))
def fun(a, b, c, d, e, f, g): return a + b + c * d + e * f * g print(fun(1, 2, 3, 4, 5, 6, 7))
# Input: nums = [0,1,2,2,3,0,4,2], val = 2 # Output: 5, nums = [0,1,4,0,3] # Explanation: Your function should return length = 5, # with the first five elements of nums containing 0, 1, 3, 0, and 4. # Note that the order of those five elements can be arbitrary. # It doesn't matter what values are set beyond the returned length. class Solution: def removeElement(self, nums: List[int], val: int) -> int: try: while True: nums.remove(val) finally: return len(nums)
class Solution: def remove_element(self, nums: List[int], val: int) -> int: try: while True: nums.remove(val) finally: return len(nums)
class Solution: def firstMissingPositive(self, nums: List[int], res: int = 1) -> int: for num in sorted(nums): res += num == res return res
class Solution: def first_missing_positive(self, nums: List[int], res: int=1) -> int: for num in sorted(nums): res += num == res return res
# # PySNMP MIB module Wellfleet-AOT-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Wellfleet-AOT-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 21:32:37 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, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") SingleValueConstraint, ConstraintsIntersection, ConstraintsUnion, ValueRangeConstraint, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ConstraintsIntersection", "ConstraintsUnion", "ValueRangeConstraint", "ValueSizeConstraint") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") NotificationType, Bits, Integer32, ModuleIdentity, ObjectIdentity, Counter32, TimeTicks, Gauge32, Counter64, iso, MibScalar, MibTable, MibTableRow, MibTableColumn, IpAddress, Unsigned32, MibIdentifier = mibBuilder.importSymbols("SNMPv2-SMI", "NotificationType", "Bits", "Integer32", "ModuleIdentity", "ObjectIdentity", "Counter32", "TimeTicks", "Gauge32", "Counter64", "iso", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "IpAddress", "Unsigned32", "MibIdentifier") DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") wfAsyncOverTcpGroup, = mibBuilder.importSymbols("Wellfleet-COMMON-MIB", "wfAsyncOverTcpGroup") wfAot = MibIdentifier((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 1)) wfAotDelete = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("created", 1), ("deleted", 2))).clone('created')).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfAotDelete.setStatus('mandatory') wfAotDisable = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone('enabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfAotDisable.setStatus('mandatory') wfAotState = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("up", 1), ("down", 2), ("init", 3), ("notpresent", 4))).clone('down')).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAotState.setStatus('mandatory') wfAotInterfaceTable = MibTable((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 2), ) if mibBuilder.loadTexts: wfAotInterfaceTable.setStatus('mandatory') wfAotInterfaceEntry = MibTableRow((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 2, 1), ).setIndexNames((0, "Wellfleet-AOT-MIB", "wfAotInterfaceSlotNumber"), (0, "Wellfleet-AOT-MIB", "wfAotInterfaceCctNumber")) if mibBuilder.loadTexts: wfAotInterfaceEntry.setStatus('mandatory') wfAotInterfaceDelete = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 2, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("created", 1), ("deleted", 2))).clone('created')).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfAotInterfaceDelete.setStatus('mandatory') wfAotInterfaceDisable = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 2, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone('enabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfAotInterfaceDisable.setStatus('mandatory') wfAotInterfaceCctNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 2, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAotInterfaceCctNumber.setStatus('mandatory') wfAotInterfaceSlotNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 2, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAotInterfaceSlotNumber.setStatus('mandatory') wfAotInterfaceState = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 2, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("up", 1), ("down", 2), ("init", 3))).clone('down')).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAotInterfaceState.setStatus('mandatory') wfAotInterfaceType = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 2, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("singledrop", 1), ("multidrop", 2))).clone('singledrop')).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfAotInterfaceType.setStatus('mandatory') wfAotInterfaceAttachedTo = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 2, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("primary", 1), ("secondary", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfAotInterfaceAttachedTo.setStatus('mandatory') wfAotInterfacePktCnt = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 2, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAotInterfacePktCnt.setStatus('mandatory') wfAotKeepaliveInterval = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 2, 1, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 86400)).clone(120)).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfAotKeepaliveInterval.setStatus('mandatory') wfAotKeepaliveRto = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 2, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 600)).clone(4)).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfAotKeepaliveRto.setStatus('mandatory') wfAotKeepaliveMaxRetry = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 2, 1, 11), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 99)).clone(5)).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfAotKeepaliveMaxRetry.setStatus('mandatory') wfAotPeerTable = MibTable((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 3), ) if mibBuilder.loadTexts: wfAotPeerTable.setStatus('mandatory') wfAotPeerEntry = MibTableRow((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 3, 1), ).setIndexNames((0, "Wellfleet-AOT-MIB", "wfAotPeerSlotNumber"), (0, "Wellfleet-AOT-MIB", "wfAotPeerCctNumber"), (0, "Wellfleet-AOT-MIB", "wfAotPeerRemoteIpAddr"), (0, "Wellfleet-AOT-MIB", "wfAotPeerLocalTcpListenPort"), (0, "Wellfleet-AOT-MIB", "wfAotPeerRemoteTcpListenPort"), (0, "Wellfleet-AOT-MIB", "wfAotConnOriginator")) if mibBuilder.loadTexts: wfAotPeerEntry.setStatus('mandatory') wfAotPeerEntryDelete = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 3, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("created", 1), ("deleted", 2))).clone('created')).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfAotPeerEntryDelete.setStatus('mandatory') wfAotPeerEntryDisable = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 3, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone('enabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfAotPeerEntryDisable.setStatus('mandatory') wfAotPeerSlotNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 3, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAotPeerSlotNumber.setStatus('mandatory') wfAotPeerCctNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 3, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAotPeerCctNumber.setStatus('mandatory') wfAotPeerRemoteIpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 3, 1, 5), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAotPeerRemoteIpAddr.setStatus('mandatory') wfAotConnOriginator = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 3, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("self", 1), ("partner", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAotConnOriginator.setStatus('mandatory') wfAotPeerLocalTcpListenPort = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 3, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1000, 9999))).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAotPeerLocalTcpListenPort.setStatus('mandatory') wfAotPeerRemoteTcpListenPort = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 3, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1000, 9999))).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAotPeerRemoteTcpListenPort.setStatus('mandatory') wfAotPeerLocalTcpPort = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 3, 1, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1000, 9999))).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAotPeerLocalTcpPort.setStatus('mandatory') wfAotPeerRemoteTcpPort = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 3, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1000, 9999))).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAotPeerRemoteTcpPort.setStatus('mandatory') mibBuilder.exportSymbols("Wellfleet-AOT-MIB", wfAotPeerRemoteIpAddr=wfAotPeerRemoteIpAddr, wfAotInterfaceState=wfAotInterfaceState, wfAotInterfaceAttachedTo=wfAotInterfaceAttachedTo, wfAotPeerTable=wfAotPeerTable, wfAotInterfaceCctNumber=wfAotInterfaceCctNumber, wfAotState=wfAotState, wfAotPeerEntryDisable=wfAotPeerEntryDisable, wfAotPeerLocalTcpListenPort=wfAotPeerLocalTcpListenPort, wfAotPeerLocalTcpPort=wfAotPeerLocalTcpPort, wfAotPeerEntryDelete=wfAotPeerEntryDelete, wfAotDelete=wfAotDelete, wfAotDisable=wfAotDisable, wfAotInterfaceType=wfAotInterfaceType, wfAotInterfaceEntry=wfAotInterfaceEntry, wfAotKeepaliveInterval=wfAotKeepaliveInterval, wfAotPeerSlotNumber=wfAotPeerSlotNumber, wfAotPeerCctNumber=wfAotPeerCctNumber, wfAotInterfaceDisable=wfAotInterfaceDisable, wfAotInterfaceSlotNumber=wfAotInterfaceSlotNumber, wfAotInterfaceTable=wfAotInterfaceTable, wfAotKeepaliveMaxRetry=wfAotKeepaliveMaxRetry, wfAotInterfaceDelete=wfAotInterfaceDelete, wfAotPeerEntry=wfAotPeerEntry, wfAotConnOriginator=wfAotConnOriginator, wfAotPeerRemoteTcpListenPort=wfAotPeerRemoteTcpListenPort, wfAotPeerRemoteTcpPort=wfAotPeerRemoteTcpPort, wfAotInterfacePktCnt=wfAotInterfacePktCnt, wfAot=wfAot, wfAotKeepaliveRto=wfAotKeepaliveRto)
(integer, octet_string, object_identifier) = mibBuilder.importSymbols('ASN1', 'Integer', 'OctetString', 'ObjectIdentifier') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (single_value_constraint, constraints_intersection, constraints_union, value_range_constraint, value_size_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'SingleValueConstraint', 'ConstraintsIntersection', 'ConstraintsUnion', 'ValueRangeConstraint', 'ValueSizeConstraint') (notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance') (notification_type, bits, integer32, module_identity, object_identity, counter32, time_ticks, gauge32, counter64, iso, mib_scalar, mib_table, mib_table_row, mib_table_column, ip_address, unsigned32, mib_identifier) = mibBuilder.importSymbols('SNMPv2-SMI', 'NotificationType', 'Bits', 'Integer32', 'ModuleIdentity', 'ObjectIdentity', 'Counter32', 'TimeTicks', 'Gauge32', 'Counter64', 'iso', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'IpAddress', 'Unsigned32', 'MibIdentifier') (display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention') (wf_async_over_tcp_group,) = mibBuilder.importSymbols('Wellfleet-COMMON-MIB', 'wfAsyncOverTcpGroup') wf_aot = mib_identifier((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 1)) wf_aot_delete = mib_scalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('created', 1), ('deleted', 2))).clone('created')).setMaxAccess('readwrite') if mibBuilder.loadTexts: wfAotDelete.setStatus('mandatory') wf_aot_disable = mib_scalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2))).clone('enabled')).setMaxAccess('readwrite') if mibBuilder.loadTexts: wfAotDisable.setStatus('mandatory') wf_aot_state = mib_scalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('up', 1), ('down', 2), ('init', 3), ('notpresent', 4))).clone('down')).setMaxAccess('readonly') if mibBuilder.loadTexts: wfAotState.setStatus('mandatory') wf_aot_interface_table = mib_table((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 2)) if mibBuilder.loadTexts: wfAotInterfaceTable.setStatus('mandatory') wf_aot_interface_entry = mib_table_row((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 2, 1)).setIndexNames((0, 'Wellfleet-AOT-MIB', 'wfAotInterfaceSlotNumber'), (0, 'Wellfleet-AOT-MIB', 'wfAotInterfaceCctNumber')) if mibBuilder.loadTexts: wfAotInterfaceEntry.setStatus('mandatory') wf_aot_interface_delete = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 2, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('created', 1), ('deleted', 2))).clone('created')).setMaxAccess('readwrite') if mibBuilder.loadTexts: wfAotInterfaceDelete.setStatus('mandatory') wf_aot_interface_disable = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 2, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2))).clone('enabled')).setMaxAccess('readwrite') if mibBuilder.loadTexts: wfAotInterfaceDisable.setStatus('mandatory') wf_aot_interface_cct_number = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 2, 1, 3), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: wfAotInterfaceCctNumber.setStatus('mandatory') wf_aot_interface_slot_number = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 2, 1, 4), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: wfAotInterfaceSlotNumber.setStatus('mandatory') wf_aot_interface_state = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 2, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('up', 1), ('down', 2), ('init', 3))).clone('down')).setMaxAccess('readonly') if mibBuilder.loadTexts: wfAotInterfaceState.setStatus('mandatory') wf_aot_interface_type = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 2, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('singledrop', 1), ('multidrop', 2))).clone('singledrop')).setMaxAccess('readwrite') if mibBuilder.loadTexts: wfAotInterfaceType.setStatus('mandatory') wf_aot_interface_attached_to = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 2, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('primary', 1), ('secondary', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: wfAotInterfaceAttachedTo.setStatus('mandatory') wf_aot_interface_pkt_cnt = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 2, 1, 8), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: wfAotInterfacePktCnt.setStatus('mandatory') wf_aot_keepalive_interval = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 2, 1, 9), integer32().subtype(subtypeSpec=value_range_constraint(0, 86400)).clone(120)).setMaxAccess('readwrite') if mibBuilder.loadTexts: wfAotKeepaliveInterval.setStatus('mandatory') wf_aot_keepalive_rto = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 2, 1, 10), integer32().subtype(subtypeSpec=value_range_constraint(0, 600)).clone(4)).setMaxAccess('readwrite') if mibBuilder.loadTexts: wfAotKeepaliveRto.setStatus('mandatory') wf_aot_keepalive_max_retry = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 2, 1, 11), integer32().subtype(subtypeSpec=value_range_constraint(0, 99)).clone(5)).setMaxAccess('readwrite') if mibBuilder.loadTexts: wfAotKeepaliveMaxRetry.setStatus('mandatory') wf_aot_peer_table = mib_table((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 3)) if mibBuilder.loadTexts: wfAotPeerTable.setStatus('mandatory') wf_aot_peer_entry = mib_table_row((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 3, 1)).setIndexNames((0, 'Wellfleet-AOT-MIB', 'wfAotPeerSlotNumber'), (0, 'Wellfleet-AOT-MIB', 'wfAotPeerCctNumber'), (0, 'Wellfleet-AOT-MIB', 'wfAotPeerRemoteIpAddr'), (0, 'Wellfleet-AOT-MIB', 'wfAotPeerLocalTcpListenPort'), (0, 'Wellfleet-AOT-MIB', 'wfAotPeerRemoteTcpListenPort'), (0, 'Wellfleet-AOT-MIB', 'wfAotConnOriginator')) if mibBuilder.loadTexts: wfAotPeerEntry.setStatus('mandatory') wf_aot_peer_entry_delete = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 3, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('created', 1), ('deleted', 2))).clone('created')).setMaxAccess('readwrite') if mibBuilder.loadTexts: wfAotPeerEntryDelete.setStatus('mandatory') wf_aot_peer_entry_disable = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 3, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2))).clone('enabled')).setMaxAccess('readwrite') if mibBuilder.loadTexts: wfAotPeerEntryDisable.setStatus('mandatory') wf_aot_peer_slot_number = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 3, 1, 3), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: wfAotPeerSlotNumber.setStatus('mandatory') wf_aot_peer_cct_number = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 3, 1, 4), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: wfAotPeerCctNumber.setStatus('mandatory') wf_aot_peer_remote_ip_addr = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 3, 1, 5), ip_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: wfAotPeerRemoteIpAddr.setStatus('mandatory') wf_aot_conn_originator = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 3, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('self', 1), ('partner', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: wfAotConnOriginator.setStatus('mandatory') wf_aot_peer_local_tcp_listen_port = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 3, 1, 7), integer32().subtype(subtypeSpec=value_range_constraint(1000, 9999))).setMaxAccess('readonly') if mibBuilder.loadTexts: wfAotPeerLocalTcpListenPort.setStatus('mandatory') wf_aot_peer_remote_tcp_listen_port = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 3, 1, 8), integer32().subtype(subtypeSpec=value_range_constraint(1000, 9999))).setMaxAccess('readonly') if mibBuilder.loadTexts: wfAotPeerRemoteTcpListenPort.setStatus('mandatory') wf_aot_peer_local_tcp_port = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 3, 1, 9), integer32().subtype(subtypeSpec=value_range_constraint(1000, 9999))).setMaxAccess('readonly') if mibBuilder.loadTexts: wfAotPeerLocalTcpPort.setStatus('mandatory') wf_aot_peer_remote_tcp_port = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 5, 21, 3, 1, 10), integer32().subtype(subtypeSpec=value_range_constraint(1000, 9999))).setMaxAccess('readonly') if mibBuilder.loadTexts: wfAotPeerRemoteTcpPort.setStatus('mandatory') mibBuilder.exportSymbols('Wellfleet-AOT-MIB', wfAotPeerRemoteIpAddr=wfAotPeerRemoteIpAddr, wfAotInterfaceState=wfAotInterfaceState, wfAotInterfaceAttachedTo=wfAotInterfaceAttachedTo, wfAotPeerTable=wfAotPeerTable, wfAotInterfaceCctNumber=wfAotInterfaceCctNumber, wfAotState=wfAotState, wfAotPeerEntryDisable=wfAotPeerEntryDisable, wfAotPeerLocalTcpListenPort=wfAotPeerLocalTcpListenPort, wfAotPeerLocalTcpPort=wfAotPeerLocalTcpPort, wfAotPeerEntryDelete=wfAotPeerEntryDelete, wfAotDelete=wfAotDelete, wfAotDisable=wfAotDisable, wfAotInterfaceType=wfAotInterfaceType, wfAotInterfaceEntry=wfAotInterfaceEntry, wfAotKeepaliveInterval=wfAotKeepaliveInterval, wfAotPeerSlotNumber=wfAotPeerSlotNumber, wfAotPeerCctNumber=wfAotPeerCctNumber, wfAotInterfaceDisable=wfAotInterfaceDisable, wfAotInterfaceSlotNumber=wfAotInterfaceSlotNumber, wfAotInterfaceTable=wfAotInterfaceTable, wfAotKeepaliveMaxRetry=wfAotKeepaliveMaxRetry, wfAotInterfaceDelete=wfAotInterfaceDelete, wfAotPeerEntry=wfAotPeerEntry, wfAotConnOriginator=wfAotConnOriginator, wfAotPeerRemoteTcpListenPort=wfAotPeerRemoteTcpListenPort, wfAotPeerRemoteTcpPort=wfAotPeerRemoteTcpPort, wfAotInterfacePktCnt=wfAotInterfacePktCnt, wfAot=wfAot, wfAotKeepaliveRto=wfAotKeepaliveRto)
# absoluteimports/__init__.py print("inside absoluteimports/__init__.py")
print('inside absoluteimports/__init__.py')
''' 5 - Remapping categories To better understand survey respondents from airlines, you want to find out if there is a relationship between certain responses and the day of the week and wait time at the gate. The airlines DataFrame contains the day and wait_min columns, which are categorical and numerical respectively. The day column contains the exact day a flight took place, and wait_min contains the amount of minutes it took travelers to wait at the gate. To make your analysis easier, you want to create two new categorical variables: - wait_type: 'short' for 0-60 min, 'medium' for 60-180 and long for 180+ - day_week: 'weekday' if day is in the weekday, 'weekend' if day is in the weekend. The pandas and numpy packages have been imported as pd and np. Let's create some new categorical data! Instructions - Create the ranges and labels for the wait_type column mentioned in the description above. - Create the wait_type column by from wait_min by using pd.cut(), while inputting label_ranges and label_names in the correct arguments. - Create the mapping dictionary mapping weekdays to 'weekday' and weekend days to 'weekend'. - Create the day_week column by using .replace(). ''' # Create ranges for categories label_ranges = [0, 60, 180, np.inf] label_names = ['short', 'medium', 'long'] # Create wait_type column airlines['wait_type'] = pd.cut(airlines['wait_min'], bins=label_ranges, labels=label_names) # Create mappings and replace mappings = {'Monday': 'weekday', 'Tuesday': 'weekday', 'Wednesday': 'weekday', 'Thursday': 'weekday', 'Friday': 'weekday', 'Saturday': 'weekend', 'Sunday': 'weekend'} airlines['day_week'] = airlines['day'].replace(mappings) ''' Note: ---------------------------------------------------------------------- we just created two new categorical variables, that when combined with other columns, could produce really interesting analysis. Don't forget, we can always use an assert statement to check our changes passed. ---------------------------------------------------------------------- '''
""" 5 - Remapping categories To better understand survey respondents from airlines, you want to find out if there is a relationship between certain responses and the day of the week and wait time at the gate. The airlines DataFrame contains the day and wait_min columns, which are categorical and numerical respectively. The day column contains the exact day a flight took place, and wait_min contains the amount of minutes it took travelers to wait at the gate. To make your analysis easier, you want to create two new categorical variables: - wait_type: 'short' for 0-60 min, 'medium' for 60-180 and long for 180+ - day_week: 'weekday' if day is in the weekday, 'weekend' if day is in the weekend. The pandas and numpy packages have been imported as pd and np. Let's create some new categorical data! Instructions - Create the ranges and labels for the wait_type column mentioned in the description above. - Create the wait_type column by from wait_min by using pd.cut(), while inputting label_ranges and label_names in the correct arguments. - Create the mapping dictionary mapping weekdays to 'weekday' and weekend days to 'weekend'. - Create the day_week column by using .replace(). """ label_ranges = [0, 60, 180, np.inf] label_names = ['short', 'medium', 'long'] airlines['wait_type'] = pd.cut(airlines['wait_min'], bins=label_ranges, labels=label_names) mappings = {'Monday': 'weekday', 'Tuesday': 'weekday', 'Wednesday': 'weekday', 'Thursday': 'weekday', 'Friday': 'weekday', 'Saturday': 'weekend', 'Sunday': 'weekend'} airlines['day_week'] = airlines['day'].replace(mappings) "\nNote:\n----------------------------------------------------------------------\nwe just created two new categorical variables, that when combined with \nother columns, could produce really interesting analysis. Don't forget, \nwe can always use an assert statement to check our changes passed.\n----------------------------------------------------------------------\n"
def read_file(): file_input = open("data/file_input_data.txt", 'r') file_data = file_input.readlines() file_input.close() return file_data if __name__ == "__main__": data = read_file() print(type(data)) print(data) for line in data: print(line)
def read_file(): file_input = open('data/file_input_data.txt', 'r') file_data = file_input.readlines() file_input.close() return file_data if __name__ == '__main__': data = read_file() print(type(data)) print(data) for line in data: print(line)
def is_armstrong_number(number): digits = [int(i) for i in str(number)] d_len = len(digits) d_sum = 0 for digit in digits: d_sum += digit ** d_len return d_sum == number
def is_armstrong_number(number): digits = [int(i) for i in str(number)] d_len = len(digits) d_sum = 0 for digit in digits: d_sum += digit ** d_len return d_sum == number
# Preprocessing config SAMPLING_RATE = 22050 FFT_WINDOW_SIZE = 1024 HOP_LENGTH = 512 N_MELS = 80 F_MIN = 27.5 F_MAX = 8000 AUDIO_MAX_LENGTH = 90 # in seconds # Data augmentation config MAX_SHIFTING_PITCH = 0.3 MAX_STRETCHING = 0.3 MAX_LOUDNESS_DB = 10 BLOCK_MIXING_MIN = 0.2 BLOCK_MIXING_MAX = 0.5 # Model config LOSS = "binary_crossentropy" METRICS = ["binary_accuracy", "categorical_accuracy"] CLASSES = 2 # For audio augmentation - deprecated STRETCHING_MIN = 0.75 STRETCHING_MAX = 1.25 SHIFTING_MIN = -3.5 SHIFTING_MAX = 3.5
sampling_rate = 22050 fft_window_size = 1024 hop_length = 512 n_mels = 80 f_min = 27.5 f_max = 8000 audio_max_length = 90 max_shifting_pitch = 0.3 max_stretching = 0.3 max_loudness_db = 10 block_mixing_min = 0.2 block_mixing_max = 0.5 loss = 'binary_crossentropy' metrics = ['binary_accuracy', 'categorical_accuracy'] classes = 2 stretching_min = 0.75 stretching_max = 1.25 shifting_min = -3.5 shifting_max = 3.5
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") def repo(): http_archive( name = "fmt", strip_prefix = "fmt-7.1.3", urls = ["https://github.com/fmtlib/fmt/releases/download/7.1.3/fmt-7.1.3.zip"], sha256 = "5d98c504d0205f912e22449ecdea776b78ce0bb096927334f80781e720084c9f", build_file = "@//third_party/fmt:fmt.BUILD", )
load('@bazel_tools//tools/build_defs/repo:http.bzl', 'http_archive') def repo(): http_archive(name='fmt', strip_prefix='fmt-7.1.3', urls=['https://github.com/fmtlib/fmt/releases/download/7.1.3/fmt-7.1.3.zip'], sha256='5d98c504d0205f912e22449ecdea776b78ce0bb096927334f80781e720084c9f', build_file='@//third_party/fmt:fmt.BUILD')
# 1 - push # 2 - pop # 3 - print max element # 4 - print max element # last - print all elements n = int(input()) query = [] for _ in range(n): num = input().split() if num[0] == "1": query.append(int(num[1])) elif num[0] == "2": if query: query.pop() continue elif num[0] == "3": if query: # !!!!!!!!!!!!!!!!!!!!!!!!! print(max(query)) elif num[0] == "4": if query: # !!!!!!!!!!!!!!!!!!!!!!!!! print(min(query)) print(', '.join([str(x) for x in reversed(query)]))
n = int(input()) query = [] for _ in range(n): num = input().split() if num[0] == '1': query.append(int(num[1])) elif num[0] == '2': if query: query.pop() continue elif num[0] == '3': if query: print(max(query)) elif num[0] == '4': if query: print(min(query)) print(', '.join([str(x) for x in reversed(query)]))
# Constants for the image IMAGE_URL = str(input("Enter a valid image URL: ")) IMAGE_WIDTH = 280 IMAGE_HEIGHT = 200 blueUpFactor = int(input("How much more blue do you want this image | Enter a value between 1 and 255")) maxPixelValue = 255 image = Image(IMAGE_URL) image.set_position(70, 70) image.set_size(IMAGE_WIDTH, IMAGE_HEIGHT) add(image) # Filter to brighten an image def blueFilter(pixel): blue = blueColour(pixel[2]) return blue def blueColour(colorValue): return min(colorValue + blueUpFactor, maxPixelValue) def changePicture(): for x in range(image.get_width()): for y in range(image.get_height()): pixel = image.get_pixel(x,y) newColor = blueFilter(pixel) image.set_blue(x, y, newColor) # Give the image time to load print("Creating Blue Skies....") print("Might take a minute....") timer.set_timeout(changePicture, 1000)
image_url = str(input('Enter a valid image URL: ')) image_width = 280 image_height = 200 blue_up_factor = int(input('How much more blue do you want this image | Enter a value between 1 and 255')) max_pixel_value = 255 image = image(IMAGE_URL) image.set_position(70, 70) image.set_size(IMAGE_WIDTH, IMAGE_HEIGHT) add(image) def blue_filter(pixel): blue = blue_colour(pixel[2]) return blue def blue_colour(colorValue): return min(colorValue + blueUpFactor, maxPixelValue) def change_picture(): for x in range(image.get_width()): for y in range(image.get_height()): pixel = image.get_pixel(x, y) new_color = blue_filter(pixel) image.set_blue(x, y, newColor) print('Creating Blue Skies....') print('Might take a minute....') timer.set_timeout(changePicture, 1000)
class Solution: def reverseOnlyLetters(self, S: str) -> str: alpha = set([chr(i) for i in list(range(ord('a'), ord('z')+1)) + list(range(ord('A'), ord('Z')+1))]) words, res = [], list(S) for char in res: if char in alpha: words.append(char) for i in range(len(res)): if res[i] in alpha: res[i] = words.pop() return ''.join(res)
class Solution: def reverse_only_letters(self, S: str) -> str: alpha = set([chr(i) for i in list(range(ord('a'), ord('z') + 1)) + list(range(ord('A'), ord('Z') + 1))]) (words, res) = ([], list(S)) for char in res: if char in alpha: words.append(char) for i in range(len(res)): if res[i] in alpha: res[i] = words.pop() return ''.join(res)
number = int(input()) while number < 1 or number > 100: print('Invalid number') number = int(input()) print(f'The number is: {number}')
number = int(input()) while number < 1 or number > 100: print('Invalid number') number = int(input()) print(f'The number is: {number}')
class Configuration(object): config={} def __str__(self): return str(Configuration.config) @staticmethod def defaults(): Configuration.config['api_base_link'] = 'https://api.twitch.tv/kraken/' @staticmethod def load(file=None): if file: with open (file, 'r', encoding='utf-8') as fh: Configuration.config['api_base_link'] = 'https://api.twitch.tv/kraken/' else: Configuration.defaults()
class Configuration(object): config = {} def __str__(self): return str(Configuration.config) @staticmethod def defaults(): Configuration.config['api_base_link'] = 'https://api.twitch.tv/kraken/' @staticmethod def load(file=None): if file: with open(file, 'r', encoding='utf-8') as fh: Configuration.config['api_base_link'] = 'https://api.twitch.tv/kraken/' else: Configuration.defaults()
# By Taiwo Kareem <taiwo.kareem36@gmail.com> # Github <https://github.com/tushortz> # Last updated (08-February-2016) # Card class class Card: # Initialize necessary field variables def __init__(self, *code): # Accept two character arguments if len(code) == 2: rank = code[0] suit = code[1] # Can also accept one string argument elif len(code) == 1: if len(code[0]) == 2: rank = code[0][0] suit = code[0][1] else: raise ValueError("card codes must be two characters") else: raise ValueError("card codes must be two characters") self.rank = rank self.suit = suit # All available ranks self.RANKS = [ "A", "2", "3", "4", "5", "6", "7", "8", "9", "T", "J", "Q", "K" ] # All available suits self.SUITS = ["C", "D", "H", "S"] # Error checks if not self.rank in self.RANKS: raise ValueError("Invalid rank") if not self.suit in self.SUITS: raise ValueError("Invalid suit") # String representation of cards def __str__(self): return "%s%s" % (self.rank, self.suit) # Class Methods def getRanks(self): return self.RANKS def getSuits(self): return self.SUITS def getRank(self): return self.rank def getSuit(self): return self.suit def hashCode(self): prime = 31 result = 1 result = str(prime * result) + self.rank result = str(prime * result) + self.suit return result def equals(self, thing): same = False if (thing == self): same = True elif (thing != None and isinstance(thing, Card)): if thing.rank == self.rank and thing.suit == self.suit: same = True else: same = False return same def compareTo(self, other): mySuit = self.SUITS.index(self.suit) otherSuit = self.SUITS.index(other.suit) difference = mySuit - otherSuit if difference == 0: myRank = self.RANKS.index(self.rank) otherRank = self.RANKS.index(other.rank) difference = myRank - otherRank return difference
class Card: def __init__(self, *code): if len(code) == 2: rank = code[0] suit = code[1] elif len(code) == 1: if len(code[0]) == 2: rank = code[0][0] suit = code[0][1] else: raise value_error('card codes must be two characters') else: raise value_error('card codes must be two characters') self.rank = rank self.suit = suit self.RANKS = ['A', '2', '3', '4', '5', '6', '7', '8', '9', 'T', 'J', 'Q', 'K'] self.SUITS = ['C', 'D', 'H', 'S'] if not self.rank in self.RANKS: raise value_error('Invalid rank') if not self.suit in self.SUITS: raise value_error('Invalid suit') def __str__(self): return '%s%s' % (self.rank, self.suit) def get_ranks(self): return self.RANKS def get_suits(self): return self.SUITS def get_rank(self): return self.rank def get_suit(self): return self.suit def hash_code(self): prime = 31 result = 1 result = str(prime * result) + self.rank result = str(prime * result) + self.suit return result def equals(self, thing): same = False if thing == self: same = True elif thing != None and isinstance(thing, Card): if thing.rank == self.rank and thing.suit == self.suit: same = True else: same = False return same def compare_to(self, other): my_suit = self.SUITS.index(self.suit) other_suit = self.SUITS.index(other.suit) difference = mySuit - otherSuit if difference == 0: my_rank = self.RANKS.index(self.rank) other_rank = self.RANKS.index(other.rank) difference = myRank - otherRank return difference
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: def getMinimumDifference(self, root: TreeNode) -> int: def dfs(root): if not root: return dfs(root.left) nums.append(root.val) dfs(root.right) nums = [] dfs(root) res = float('inf') for i in range(1, len(nums)): res = min(res, nums[i] - nums[i - 1]) return res
class Solution: def get_minimum_difference(self, root: TreeNode) -> int: def dfs(root): if not root: return dfs(root.left) nums.append(root.val) dfs(root.right) nums = [] dfs(root) res = float('inf') for i in range(1, len(nums)): res = min(res, nums[i] - nums[i - 1]) return res
# -*- coding: utf-8 -*- __author__ = 'Andile Jaden Mbele' __email__ = 'andilembele020@gmail.com' __github__ = 'https://github.com/xeroxzen/genuine-fake' __package__ = 'genuine-fake' __version__ = '1.2.20'
__author__ = 'Andile Jaden Mbele' __email__ = 'andilembele020@gmail.com' __github__ = 'https://github.com/xeroxzen/genuine-fake' __package__ = 'genuine-fake' __version__ = '1.2.20'
def b2d(number): decimal_number = 0 i = 0 while number > 0: decimal_number += number % 10*(2**i) number = int(number / 10) i += 1 return decimal_number def d2b(number): binary_number = 0 i = 0 while number > 0: binary_number += number % 2*(10**i) number = int(number / 2) i += 1 return binary_number if __name__ == '__main__': choice = '' while not (choice == '1' or choice == '2'): choice = input("1 - decimal to binary\n2 - binary to decimal\nEnter your choice : ") if choice == '1': decimal_number = int(input('Enter a decimal number: ')) print(f'your binary conversion is {d2b(decimal_number)}') elif choice == '2': binary_number = int(input('Enter a binary number: ')) print(f'your deciml conversion is {b2d(binary_number)}') else: print('Enter a valid choice.')
def b2d(number): decimal_number = 0 i = 0 while number > 0: decimal_number += number % 10 * 2 ** i number = int(number / 10) i += 1 return decimal_number def d2b(number): binary_number = 0 i = 0 while number > 0: binary_number += number % 2 * 10 ** i number = int(number / 2) i += 1 return binary_number if __name__ == '__main__': choice = '' while not (choice == '1' or choice == '2'): choice = input('1 - decimal to binary\n2 - binary to decimal\nEnter your choice : ') if choice == '1': decimal_number = int(input('Enter a decimal number: ')) print(f'your binary conversion is {d2b(decimal_number)}') elif choice == '2': binary_number = int(input('Enter a binary number: ')) print(f'your deciml conversion is {b2d(binary_number)}') else: print('Enter a valid choice.')
''' 06 - Treating duplicates In the last exercise, you were able to verify that the new update feeding into ride_sharing contains a bug generating both complete and incomplete duplicated rows for some values of the ride_id column, with occasional discrepant values for the user_birth_year and duration columns. In this exercise, you will be treating those duplicated rows by first dropping complete duplicates, and then merging the incomplete duplicate rows into one while keeping the average duration, and the minimum user_birth_year for each set of incomplete duplicate rows. Instructions - Drop complete duplicates in ride_sharing and store the results in ride_dup. - Create the statistics dictionary which holds minimum aggregation for user_birth_year and mean aggregation for duration. - Drop incomplete duplicates by grouping by ride_id and applying the aggregation in statistics. - Find duplicates again and run the assert statement to verify de-duplication. ''' # Drop complete duplicates from ride_sharing ride_dup = ride_sharing.drop_duplicates() # Create statistics dictionary for aggregation function statistics = {'user_birth_year': 'min', 'duration': 'mean'} # Group by ride_id and compute new statistics ride_unique = ride_dup.groupby('ride_id').agg(statistics).reset_index() # Find duplicated values again duplicates = ride_unique.duplicated(subset='ride_id', keep=False) duplicated_rides = ride_unique[duplicates == True] # Assert duplicates are processed assert duplicated_rides.shape[0] == 0
""" 06 - Treating duplicates In the last exercise, you were able to verify that the new update feeding into ride_sharing contains a bug generating both complete and incomplete duplicated rows for some values of the ride_id column, with occasional discrepant values for the user_birth_year and duration columns. In this exercise, you will be treating those duplicated rows by first dropping complete duplicates, and then merging the incomplete duplicate rows into one while keeping the average duration, and the minimum user_birth_year for each set of incomplete duplicate rows. Instructions - Drop complete duplicates in ride_sharing and store the results in ride_dup. - Create the statistics dictionary which holds minimum aggregation for user_birth_year and mean aggregation for duration. - Drop incomplete duplicates by grouping by ride_id and applying the aggregation in statistics. - Find duplicates again and run the assert statement to verify de-duplication. """ ride_dup = ride_sharing.drop_duplicates() statistics = {'user_birth_year': 'min', 'duration': 'mean'} ride_unique = ride_dup.groupby('ride_id').agg(statistics).reset_index() duplicates = ride_unique.duplicated(subset='ride_id', keep=False) duplicated_rides = ride_unique[duplicates == True] assert duplicated_rides.shape[0] == 0
print("Welcome to RollerCoaster") height = int(input("Enter your height in cm : ")) bill = 0 # Comparison operators are used more > , <= , == , > , >= , != if height >= 120 : print("You can ride the RollerCoaster") age = int(input("Enter your age : ")) if age < 12 : bill = 5 print("Childeren tickets are $5") elif age <= 18 : bill = 7 print("youth tickets are $7") elif age >= 45 and age <=55 : bill = 0 print("Have a free ride") else : bill = 12 print("Adult tickets are $12") photo = input("Do you want photo (y or n) : ") if photo == 'y' : bill += 3 print(f"your total bill : {bill}") else : print("Sorry, you have to grow taller before you can ride")
print('Welcome to RollerCoaster') height = int(input('Enter your height in cm : ')) bill = 0 if height >= 120: print('You can ride the RollerCoaster') age = int(input('Enter your age : ')) if age < 12: bill = 5 print('Childeren tickets are $5') elif age <= 18: bill = 7 print('youth tickets are $7') elif age >= 45 and age <= 55: bill = 0 print('Have a free ride') else: bill = 12 print('Adult tickets are $12') photo = input('Do you want photo (y or n) : ') if photo == 'y': bill += 3 print(f'your total bill : {bill}') else: print('Sorry, you have to grow taller before you can ride')
class Revoked(Exception): pass class MintingNotAllowed(Exception): pass
class Revoked(Exception): pass class Mintingnotallowed(Exception): pass
class Time: def __init__(self): self.hours=0 self.minutes=0 self.seconds=0 def input_values(self): self.hours=int(input('Enter the hours: ')) self.minutes=int(input('Enter the minutes: ')) self.seconds=int(input('Enter the seconds: ')) def print_details(self): print(self.hours,':',self.minutes,':',self.seconds) def __add__(self,other): t=Time() t.seconds=self.seconds+other.seconds t.minutes=self.minutes+other.minutes+t.seconds//60 t.seconds=t.seconds%60 t.hours=self.hours+other.hours+t.minutes//60 t.minutes=t.minutes%60 t.hours=t.hours%24 t.print_details() return t def __sub__(self,other): t=Time() t.hours=self.hours-other.hours t.minutes=self.minutes-other.minutes if(t.minutes<0): t.minutes=t.minutes+60 t.hours=t.hours-1 t.seconds=self.seconds-other.seconds if(t.seconds<0): t.seconds=t.seconds+60 t.minutes=t.minutes-1 t.print_details() return t t1=Time() print('Enter the time 1') t1.input_values() t1.print_details() t2=Time() print('Enter the time 2') t2.input_values() t2.print_details() print('Added time') t3=t1+t2 print('Subtracted time') t3=t1-t2
class Time: def __init__(self): self.hours = 0 self.minutes = 0 self.seconds = 0 def input_values(self): self.hours = int(input('Enter the hours: ')) self.minutes = int(input('Enter the minutes: ')) self.seconds = int(input('Enter the seconds: ')) def print_details(self): print(self.hours, ':', self.minutes, ':', self.seconds) def __add__(self, other): t = time() t.seconds = self.seconds + other.seconds t.minutes = self.minutes + other.minutes + t.seconds // 60 t.seconds = t.seconds % 60 t.hours = self.hours + other.hours + t.minutes // 60 t.minutes = t.minutes % 60 t.hours = t.hours % 24 t.print_details() return t def __sub__(self, other): t = time() t.hours = self.hours - other.hours t.minutes = self.minutes - other.minutes if t.minutes < 0: t.minutes = t.minutes + 60 t.hours = t.hours - 1 t.seconds = self.seconds - other.seconds if t.seconds < 0: t.seconds = t.seconds + 60 t.minutes = t.minutes - 1 t.print_details() return t t1 = time() print('Enter the time 1') t1.input_values() t1.print_details() t2 = time() print('Enter the time 2') t2.input_values() t2.print_details() print('Added time') t3 = t1 + t2 print('Subtracted time') t3 = t1 - t2
PANEL_GROUP = 'default' PANEL_DASHBOARD = 'billing' PANEL = 'billing_invoices' # Python panel class of the PANEL to be added. ADD_PANEL = 'astutedashboard.dashboards.billing.invoices.panel.BillingInvoices'
panel_group = 'default' panel_dashboard = 'billing' panel = 'billing_invoices' add_panel = 'astutedashboard.dashboards.billing.invoices.panel.BillingInvoices'
def isPrime(n): if n <= 1: return False for i in range(2,int(n**.5)+1): if n % i == 0: return False return True def findPrime(n): k=1 for i in range(n): if isPrime(i): if(k>=10001):return i k+=1 print(findPrime(300000))
def is_prime(n): if n <= 1: return False for i in range(2, int(n ** 0.5) + 1): if n % i == 0: return False return True def find_prime(n): k = 1 for i in range(n): if is_prime(i): if k >= 10001: return i k += 1 print(find_prime(300000))
dict={'A': ['B', 'CB', 'D', 'E', 'F', 'GD', 'H', 'IE'], 'B': ['A', 'C', 'D', 'E', 'F', 'G', 'HE', 'I'], 'C': ['AB', 'GE', 'D', 'E', 'F', 'B', 'H', 'IF'], 'D': ['A', 'B', 'C', 'E', 'FE', 'G', 'H', 'I'], 'E': ['A', 'B', 'C', 'D', 'F', 'G', 'H', 'I'], 'F': ['A', 'B', 'C', 'DE', 'E', 'G', 'H', 'I'], 'G': ['AD', 'B', 'CE', 'D', 'E', 'F', 'H', 'IH'], 'H': ['A', 'BE', 'C', 'D', 'E', 'F', 'G', 'I'], 'I': ['AE', 'B', 'F', 'D', 'E', 'CF', 'GH', 'H']} def count_patterns_from(firstPoint, length): if length<=1 or length>9: return 1 if length==1 else 0 return helper(firstPoint, length, {firstPoint}, {"":0}, 1, [firstPoint]) def helper(cur, target, went, res, n, order): if n>=target: if n==target==len(order): res[""]+=1 return length=len(went) for i in dict[cur]: comp=went|{i[0]} if len(i)==1 else went|{i[0], i[1]} diff=len(comp)-length if (diff==1 and i[0] not in went) or diff==2: helper(i[0], target, comp, res, n+diff, order+[i[0]]) return res[""]
dict = {'A': ['B', 'CB', 'D', 'E', 'F', 'GD', 'H', 'IE'], 'B': ['A', 'C', 'D', 'E', 'F', 'G', 'HE', 'I'], 'C': ['AB', 'GE', 'D', 'E', 'F', 'B', 'H', 'IF'], 'D': ['A', 'B', 'C', 'E', 'FE', 'G', 'H', 'I'], 'E': ['A', 'B', 'C', 'D', 'F', 'G', 'H', 'I'], 'F': ['A', 'B', 'C', 'DE', 'E', 'G', 'H', 'I'], 'G': ['AD', 'B', 'CE', 'D', 'E', 'F', 'H', 'IH'], 'H': ['A', 'BE', 'C', 'D', 'E', 'F', 'G', 'I'], 'I': ['AE', 'B', 'F', 'D', 'E', 'CF', 'GH', 'H']} def count_patterns_from(firstPoint, length): if length <= 1 or length > 9: return 1 if length == 1 else 0 return helper(firstPoint, length, {firstPoint}, {'': 0}, 1, [firstPoint]) def helper(cur, target, went, res, n, order): if n >= target: if n == target == len(order): res[''] += 1 return length = len(went) for i in dict[cur]: comp = went | {i[0]} if len(i) == 1 else went | {i[0], i[1]} diff = len(comp) - length if diff == 1 and i[0] not in went or diff == 2: helper(i[0], target, comp, res, n + diff, order + [i[0]]) return res['']
test = { 'name': 'q4c', 'points': 10, 'suites': [ { 'cases': [ { 'code': '>>> len(prophet_forecast) == ' '5863\n' 'True', 'hidden': False, 'locked': False}, { 'code': '>>> ' 'len(prophet_forecast_holidays) ' '== 5863\n' 'True', 'hidden': False, 'locked': False}], 'scored': True, 'setup': '', 'teardown': '', 'type': 'doctest'}]}
test = {'name': 'q4c', 'points': 10, 'suites': [{'cases': [{'code': '>>> len(prophet_forecast) == 5863\nTrue', 'hidden': False, 'locked': False}, {'code': '>>> len(prophet_forecast_holidays) == 5863\nTrue', 'hidden': False, 'locked': False}], 'scored': True, 'setup': '', 'teardown': '', 'type': 'doctest'}]}
def read_blob(blob, bucket): return bucket.blob(blob).download_as_string().decode("utf-8", errors="ignore") def download_blob(blob, file_obj, bucket): return bucket.blob(blob).download_to_file(file_obj) def write_blob(key, file_obj, bucket): return bucket.blob(key).upload_from_file(file_obj)
def read_blob(blob, bucket): return bucket.blob(blob).download_as_string().decode('utf-8', errors='ignore') def download_blob(blob, file_obj, bucket): return bucket.blob(blob).download_to_file(file_obj) def write_blob(key, file_obj, bucket): return bucket.blob(key).upload_from_file(file_obj)
class Attachment: def __init__( self, fallback: str, color: str = None, pretext: str = None, text: str = None, author_name: str = None, author_link: str = None, author_icon: str = None, title: str = None, title_link: str = None, fields: list = None, image_url: str = None, thumb_url: str = None, ): self.fallback = fallback self.color = color self.pretext = pretext self.text = text self.author_name = author_name self.author_link = author_link self.author_icon = author_icon self.title = title self.title_link = title_link self.fields = fields self.image_url = image_url self.thumb_url = thumb_url payload = {"fallback": self.fallback} if self.color: payload["color"] = self.color if self.pretext: payload["pretext"] = self.pretext if self.text: payload["text"] = self.text if self.author_name: payload["author_name"] = self.author_name if self.author_link: payload["author_link"] = self.author_link if self.author_icon: payload["author_icon"] = self.author_icon if self.title: payload["title"] = self.title if self.title_link: payload["title_link"] = self.title_link if self.fields: payload["fields"] = self.fields if self.image_url: payload["image_url"] = self.image_url if self.thumb_url: payload["thumb_url"] = self.thumb_url self.payload = payload
class Attachment: def __init__(self, fallback: str, color: str=None, pretext: str=None, text: str=None, author_name: str=None, author_link: str=None, author_icon: str=None, title: str=None, title_link: str=None, fields: list=None, image_url: str=None, thumb_url: str=None): self.fallback = fallback self.color = color self.pretext = pretext self.text = text self.author_name = author_name self.author_link = author_link self.author_icon = author_icon self.title = title self.title_link = title_link self.fields = fields self.image_url = image_url self.thumb_url = thumb_url payload = {'fallback': self.fallback} if self.color: payload['color'] = self.color if self.pretext: payload['pretext'] = self.pretext if self.text: payload['text'] = self.text if self.author_name: payload['author_name'] = self.author_name if self.author_link: payload['author_link'] = self.author_link if self.author_icon: payload['author_icon'] = self.author_icon if self.title: payload['title'] = self.title if self.title_link: payload['title_link'] = self.title_link if self.fields: payload['fields'] = self.fields if self.image_url: payload['image_url'] = self.image_url if self.thumb_url: payload['thumb_url'] = self.thumb_url self.payload = payload
infile = open("sud3_results.csv","r") outfile = open("sud4_results.csv","w") keywords = infile.readline().strip().split(",")[1:] outfile.write("%s, %s" % ("filename", ",".join("Environment+Social+Economic", "Environment+Social+Economic+Cultural", "Environment+Social+Economic+Cultural+Institutional"))) three_pillars_keywords = ["environmental", "housing", "energy", "water", "social", "local", "community", "public", "economic"] four_pillars_keywords = three_pillars_keywords + ["cultural", "culture"] five_pillar_keywords = four_pillars_keywords + ["urban", "planning"] for line in infile.readlines(): data = line.split(",") filename = data[0] numerical = [int(entry) for entry in data[1:]]
infile = open('sud3_results.csv', 'r') outfile = open('sud4_results.csv', 'w') keywords = infile.readline().strip().split(',')[1:] outfile.write('%s, %s' % ('filename', ','.join('Environment+Social+Economic', 'Environment+Social+Economic+Cultural', 'Environment+Social+Economic+Cultural+Institutional'))) three_pillars_keywords = ['environmental', 'housing', 'energy', 'water', 'social', 'local', 'community', 'public', 'economic'] four_pillars_keywords = three_pillars_keywords + ['cultural', 'culture'] five_pillar_keywords = four_pillars_keywords + ['urban', 'planning'] for line in infile.readlines(): data = line.split(',') filename = data[0] numerical = [int(entry) for entry in data[1:]]
class EnvInfo(object): def __init__(self, frame_id, time_stamp, road_path, obstacle_array): # default params self.frame_id = frame_id self.time_stamp = time_stamp self.road_path = road_path self.obstacle_array = obstacle_array
class Envinfo(object): def __init__(self, frame_id, time_stamp, road_path, obstacle_array): self.frame_id = frame_id self.time_stamp = time_stamp self.road_path = road_path self.obstacle_array = obstacle_array
# Module for implementing gradients used in the autograd system __all__ = ["GradFunc"] def forward_grad(tensor): ## tensor here should be an AutogradTensor or a Tensor where we can set .grad try: grad_fn = tensor.grad_fn except AttributeError: return None # If a tensor doesn't have a grad_fn already attached to it, that means # it's a leaf of the graph and we want to accumulate the gradient if grad_fn is None and tensor.requires_grad: return Accumulate(tensor) else: return grad_fn class GradFunc: def __init__(self, *args): # This part builds our graph. It takes grad functions (if they exist) # from the input arguments and builds a tuple pointing to them. This way # we can use .next_functions to traverse through the entire graph. self.next_functions = tuple( filter(lambda x: x is not None, [forward_grad(arg) for arg in args]) ) self.result = None def gradient(self, grad): raise NotImplementedError def __setattr__(self, name, value): # Doing this because we want to pass in AutogradTensors so we can update # tensor.grad in Accumulate, but we also need native looking tensors for # the gradient operations in GradFuncs. try: value = value.child except AttributeError: pass object.__setattr__(self, name, value) def __call__(self, grad): return self.gradient(grad) def __repr__(self): return self.__class__.__name__ # Accumulate gradients at graph leafs class Accumulate: def __init__(self, tensor): # Note that tensor here should be an AutogradTensor so we can update # .grad appropriately self.next_functions = [] self.tensor = tensor def __call__(self, grad): if self.tensor.grad is not None: self.tensor.grad += grad else: self.tensor.grad = grad + 0 return () def __repr__(self): return self.__class__.__name__
__all__ = ['GradFunc'] def forward_grad(tensor): try: grad_fn = tensor.grad_fn except AttributeError: return None if grad_fn is None and tensor.requires_grad: return accumulate(tensor) else: return grad_fn class Gradfunc: def __init__(self, *args): self.next_functions = tuple(filter(lambda x: x is not None, [forward_grad(arg) for arg in args])) self.result = None def gradient(self, grad): raise NotImplementedError def __setattr__(self, name, value): try: value = value.child except AttributeError: pass object.__setattr__(self, name, value) def __call__(self, grad): return self.gradient(grad) def __repr__(self): return self.__class__.__name__ class Accumulate: def __init__(self, tensor): self.next_functions = [] self.tensor = tensor def __call__(self, grad): if self.tensor.grad is not None: self.tensor.grad += grad else: self.tensor.grad = grad + 0 return () def __repr__(self): return self.__class__.__name__
class KeywordsOnlyMeta(type): def __call__(cls, *args, **kwargs): if args: raise TypeError("Constructor for class {!r} does not accept positional arguments.".format(cls)) return super().__call__(cls, **kwargs) class ConstrainedToKeywords(metaclass=KeywordsOnlyMeta): def __init__(self, *args, **kwargs): print("args =", args) print("kwargs = ", kwargs)
class Keywordsonlymeta(type): def __call__(cls, *args, **kwargs): if args: raise type_error('Constructor for class {!r} does not accept positional arguments.'.format(cls)) return super().__call__(cls, **kwargs) class Constrainedtokeywords(metaclass=KeywordsOnlyMeta): def __init__(self, *args, **kwargs): print('args =', args) print('kwargs = ', kwargs)
if __name__ == "__main__": ans = "" for n in range(2, 10): for i in range(1, 10**(9 // n)): s = "".join(str(i * j) for j in range(1, n + 1)) if "".join(sorted(s)) == "123456789": ans = max(s, ans) print(ans)
if __name__ == '__main__': ans = '' for n in range(2, 10): for i in range(1, 10 ** (9 // n)): s = ''.join((str(i * j) for j in range(1, n + 1))) if ''.join(sorted(s)) == '123456789': ans = max(s, ans) print(ans)
COLORS = { 'Black': u'\u001b[30m', 'Red': u'\u001b[31m', 'Green': u'\u001b[32m', 'Yellow': u'\u001b[33m', 'Blue': u'\u001b[34m', 'Magenta': u'\u001b[35m', 'Cyan': u'\u001b[36m', 'White': u'\u001b[37m', 'Reset': u'\u001b[0m', }
colors = {'Black': u'\x1b[30m', 'Red': u'\x1b[31m', 'Green': u'\x1b[32m', 'Yellow': u'\x1b[33m', 'Blue': u'\x1b[34m', 'Magenta': u'\x1b[35m', 'Cyan': u'\x1b[36m', 'White': u'\x1b[37m', 'Reset': u'\x1b[0m'}
def mmc(x, y): if a == 0 or b == 0: return 0 return a * b // mdc(a, b) def mdc(a, b): if b == 0: return a return mdc(b, a % b) a, b = input().split() a, b = int(a), int(b) while a >= 0 and b >= 0: print(mmc(a, b)) a, b = input().split() a, b = int(a), int(b)
def mmc(x, y): if a == 0 or b == 0: return 0 return a * b // mdc(a, b) def mdc(a, b): if b == 0: return a return mdc(b, a % b) (a, b) = input().split() (a, b) = (int(a), int(b)) while a >= 0 and b >= 0: print(mmc(a, b)) (a, b) = input().split() (a, b) = (int(a), int(b))
# Puzzle Input with open('Day20_Input.txt') as puzzle_input: tiles = puzzle_input.read().split('\n\n') # Parse the tiles: Separate the ID and get the 4 sides: parsed_tiles = [] tiles_IDs = [] for original_tile in tiles: # For every tile: original_tile = original_tile.split('\n') # Split the original tile into rows tiles_IDs += [int(original_tile[0][5:-1])] # Get the ID of the tile -> Tile: XXXX, XXXX starts at index 5 parsed_tiles += [[]] # Next parsed tile left_side = '' right_side = '' for row in original_tile[1:]: # The left and right sides are the: left_side += row[0] # Beginning of rows right_side += row[-1] # End of rows parsed_tiles[-1] += original_tile[1][:], right_side[:], original_tile[-1][:], left_side[:] # Make connections between the tiles connections = [[] for _ in range(len(tiles_IDs))] # Create an empty list of connections for tile_index, tile in enumerate(parsed_tiles): # For every tile: tile_id = tiles_IDs[tile_index] # Get it's ID for other_tile_index, other_tile in enumerate(parsed_tiles): # Try to match it to every other tile if other_tile_index == tile_index: # If they're the same tile, go to the next continue other_tile_id = tiles_IDs[other_tile_index] # Get the other tile's ID if other_tile_id in connections[tile_index]: # The other tile has the connection, skip this continue for other_side in other_tile: # For every side in the other tile if other_side in tile or other_side[::-1] in tile: # See if either the side currently matches connections[tile_index] += [other_tile_id] # or if a rotated tile would match this tile connections[other_tile_index] += [tile_id] # then, add the connections # Get the product of the corners (the tiles that only have 2 connections) total = 1 for ID, conn in zip(tiles_IDs, connections): if len(conn) == 2: total *= ID # Show the result print(total)
with open('Day20_Input.txt') as puzzle_input: tiles = puzzle_input.read().split('\n\n') parsed_tiles = [] tiles_i_ds = [] for original_tile in tiles: original_tile = original_tile.split('\n') tiles_i_ds += [int(original_tile[0][5:-1])] parsed_tiles += [[]] left_side = '' right_side = '' for row in original_tile[1:]: left_side += row[0] right_side += row[-1] parsed_tiles[-1] += (original_tile[1][:], right_side[:], original_tile[-1][:], left_side[:]) connections = [[] for _ in range(len(tiles_IDs))] for (tile_index, tile) in enumerate(parsed_tiles): tile_id = tiles_IDs[tile_index] for (other_tile_index, other_tile) in enumerate(parsed_tiles): if other_tile_index == tile_index: continue other_tile_id = tiles_IDs[other_tile_index] if other_tile_id in connections[tile_index]: continue for other_side in other_tile: if other_side in tile or other_side[::-1] in tile: connections[tile_index] += [other_tile_id] connections[other_tile_index] += [tile_id] total = 1 for (id, conn) in zip(tiles_IDs, connections): if len(conn) == 2: total *= ID print(total)
# FLOYD TRIANGLE limit = int(input("Enter the limit: ")) n = 1 for i in range(1, limit+1): for j in range(1, i+1): print(n, ' ', end='') # print on same line n += 1 print('')
limit = int(input('Enter the limit: ')) n = 1 for i in range(1, limit + 1): for j in range(1, i + 1): print(n, ' ', end='') n += 1 print('')
# 008: Make a program that reads a value in meter and convert to centimeter and millimeter n = float(input('Write a number in meter: ')) print(f'{n} is: {n*100:.1f}cm and {n*1000:.1f}mm')
n = float(input('Write a number in meter: ')) print(f'{n} is: {n * 100:.1f}cm and {n * 1000:.1f}mm')
def restar(x,y): resta = x-y return resta def multiplicar(x,y): mult = x*y return mult def dividir(x,y): div = x/y return div
def restar(x, y): resta = x - y return resta def multiplicar(x, y): mult = x * y return mult def dividir(x, y): div = x / y return div
if 1: print("1 is ") else: print("???")
if 1: print('1 is ') else: print('???')
print(''' _ _ _ _ _ | || | __ _ _ _ ___ | |_ (_) | |_ | __ | / _` | | '_| (_-< | ' \ | | | _| |_||_| \__,_| |_| /__/ |_||_| |_| \__| ''') print("IP \t Date time \t Request \t") with open("website.log","r") as f: lines= f.readlines() with open("output.txt", 'w+') as nf: for line in lines: line = line.split(" ") nf.write("{}\t {}\t {}\n" .format(line[0],line[3].replace('[',' '),line[5].replace('"',' ')))
print("\n _ _ _ _ _ \n | || | __ _ _ _ ___ | |_ (_) | |_ \n | __ | / _` | | '_| (_-< | ' \\ | | | _|\n |_||_| \\__,_| |_| /__/ |_||_| |_| \\__|\n ") print('IP \t Date time \t Request \t') with open('website.log', 'r') as f: lines = f.readlines() with open('output.txt', 'w+') as nf: for line in lines: line = line.split(' ') nf.write('{}\t {}\t {}\n'.format(line[0], line[3].replace('[', ' '), line[5].replace('"', ' ')))
sumTotal = 0 nameNum = '' a = 1 b = 2 c = 3 d = 4 e = 5 f = 6 g = 7 h = 8 i = 9 j = 10 k = 11 l = 12 m = 13 n = 14 o = 15 p = 16 q = 17 r = 18 s = 19 t = 20 u = 21 v = 22 w = 23 x = 24 y = 25 z = 26 A = '1' B = '2' C = '3' D = '4' E = '5' F = '6' G = '7' H = '8' I = '9' J = '10' K = '11' L = '12' M = '13' N = '14' O = '15' P = '16' Q = '17' R = '18' S = '19' T = '20' U = '21' V = '22' W = '23' X = '24' Y = '25' Z = '26' def letraA(sumTotal, nameNum): sumTotal = sumTotal + a nameNum = nameNum + A return sumTotal, nameNum def letraB(sumTotal, nameNum): sumTotal = sumTotal + a nameNum = nameNum + B return sumTotal, nameNum def letraC(sumTotal, nameNum): sumTotal = sumTotal + a nameNum = nameNum + C return sumTotal, nameNum def letraD(sumTotal, nameNum): sumTotal = sumTotal + d nameNum = nameNum + D return sumTotal, nameNum def letraE(sumTotal, nameNum): sumTotal = sumTotal + e nameNum = nameNum + E return sumTotal, nameNum def letraF(sumTotal, nameNum): sumTotal = sumTotal + f nameNum = nameNum + F return sumTotal, nameNum def letraG(sumTotal, nameNum): sumTotal = sumTotal + g nameNum = nameNum + G return sumTotal, nameNum def letraH(sumTotal, nameNum): sumTotal = sumTotal + h nameNum = nameNum + H return sumTotal, nameNum def letraI(sumTotal, nameNum): sumTotal = sumTotal + i nameNum = nameNum + I return sumTotal, nameNum def letraJ(sumTotal, nameNum): sumTotal = sumTotal + j nameNum = nameNum + J return sumTotal, nameNum def letraK(sumTotal, nameNum): sumTotal = sumTotal + k nameNum = nameNum + K return sumTotal, nameNum def letraL(sumTotal, nameNum): sumTotal = sumTotal + l nameNum = nameNum + L return sumTotal, nameNum def letraM(sumTotal, nameNum): sumTotal = sumTotal + m nameNum = nameNum + M return sumTotal, nameNum def letraN(sumTotal, nameNum): sumTotal = sumTotal + n nameNum = nameNum + N return sumTotal, nameNum def letraO(sumTotal, nameNum): sumTotal = sumTotal + o nameNum = nameNum + O return sumTotal, nameNum def letraP(sumTotal, nameNum): sumTotal = sumTotal + p nameNum = nameNum + P return sumTotal, nameNum def letraQ(sumTotal, nameNum): sumTotal = sumTotal + q nameNum = nameNum + Q return sumTotal, nameNum def letraR(sumTotal, nameNum): sumTotal = sumTotal + r nameNum = nameNum + R return sumTotal, nameNum def letraS(sumTotal, nameNum): sumTotal = sumTotal + s nameNum = nameNum + S return sumTotal, nameNum def letraT(sumTotal, nameNum): sumTotal = sumTotal + t nameNum = nameNum + T return sumTotal, nameNum def letraU(sumTotal, nameNum): sumTotal = sumTotal + u nameNum = nameNum + U return sumTotal, nameNum def letraV(sumTotal, nameNum): sumTotal = sumTotal + v nameNum = nameNum + V return sumTotal, nameNum def letraW(sumTotal, nameNum): sumTotal = sumTotal + w nameNum = nameNum + W return sumTotal, nameNum def letraX(sumTotal, nameNum): sumTotal = sumTotal + x nameNum = nameNum + X return sumTotal, nameNum def letraY(sumTotal, nameNum): sumTotal = sumTotal + y nameNum = nameNum + Y return sumTotal, nameNum def letraZ(sumTotal, nameNum): sumTotal = sumTotal + z nameNum = nameNum + Z return sumTotal, nameNum def nonLetra(): pass def complete(): print("A soma de suas letras sao", sumTotal, "no total.") print("Nome numerico sem soma de numeros:", nameNum)
sum_total = 0 name_num = '' a = 1 b = 2 c = 3 d = 4 e = 5 f = 6 g = 7 h = 8 i = 9 j = 10 k = 11 l = 12 m = 13 n = 14 o = 15 p = 16 q = 17 r = 18 s = 19 t = 20 u = 21 v = 22 w = 23 x = 24 y = 25 z = 26 a = '1' b = '2' c = '3' d = '4' e = '5' f = '6' g = '7' h = '8' i = '9' j = '10' k = '11' l = '12' m = '13' n = '14' o = '15' p = '16' q = '17' r = '18' s = '19' t = '20' u = '21' v = '22' w = '23' x = '24' y = '25' z = '26' def letra_a(sumTotal, nameNum): sum_total = sumTotal + a name_num = nameNum + A return (sumTotal, nameNum) def letra_b(sumTotal, nameNum): sum_total = sumTotal + a name_num = nameNum + B return (sumTotal, nameNum) def letra_c(sumTotal, nameNum): sum_total = sumTotal + a name_num = nameNum + C return (sumTotal, nameNum) def letra_d(sumTotal, nameNum): sum_total = sumTotal + d name_num = nameNum + D return (sumTotal, nameNum) def letra_e(sumTotal, nameNum): sum_total = sumTotal + e name_num = nameNum + E return (sumTotal, nameNum) def letra_f(sumTotal, nameNum): sum_total = sumTotal + f name_num = nameNum + F return (sumTotal, nameNum) def letra_g(sumTotal, nameNum): sum_total = sumTotal + g name_num = nameNum + G return (sumTotal, nameNum) def letra_h(sumTotal, nameNum): sum_total = sumTotal + h name_num = nameNum + H return (sumTotal, nameNum) def letra_i(sumTotal, nameNum): sum_total = sumTotal + i name_num = nameNum + I return (sumTotal, nameNum) def letra_j(sumTotal, nameNum): sum_total = sumTotal + j name_num = nameNum + J return (sumTotal, nameNum) def letra_k(sumTotal, nameNum): sum_total = sumTotal + k name_num = nameNum + K return (sumTotal, nameNum) def letra_l(sumTotal, nameNum): sum_total = sumTotal + l name_num = nameNum + L return (sumTotal, nameNum) def letra_m(sumTotal, nameNum): sum_total = sumTotal + m name_num = nameNum + M return (sumTotal, nameNum) def letra_n(sumTotal, nameNum): sum_total = sumTotal + n name_num = nameNum + N return (sumTotal, nameNum) def letra_o(sumTotal, nameNum): sum_total = sumTotal + o name_num = nameNum + O return (sumTotal, nameNum) def letra_p(sumTotal, nameNum): sum_total = sumTotal + p name_num = nameNum + P return (sumTotal, nameNum) def letra_q(sumTotal, nameNum): sum_total = sumTotal + q name_num = nameNum + Q return (sumTotal, nameNum) def letra_r(sumTotal, nameNum): sum_total = sumTotal + r name_num = nameNum + R return (sumTotal, nameNum) def letra_s(sumTotal, nameNum): sum_total = sumTotal + s name_num = nameNum + S return (sumTotal, nameNum) def letra_t(sumTotal, nameNum): sum_total = sumTotal + t name_num = nameNum + T return (sumTotal, nameNum) def letra_u(sumTotal, nameNum): sum_total = sumTotal + u name_num = nameNum + U return (sumTotal, nameNum) def letra_v(sumTotal, nameNum): sum_total = sumTotal + v name_num = nameNum + V return (sumTotal, nameNum) def letra_w(sumTotal, nameNum): sum_total = sumTotal + w name_num = nameNum + W return (sumTotal, nameNum) def letra_x(sumTotal, nameNum): sum_total = sumTotal + x name_num = nameNum + X return (sumTotal, nameNum) def letra_y(sumTotal, nameNum): sum_total = sumTotal + y name_num = nameNum + Y return (sumTotal, nameNum) def letra_z(sumTotal, nameNum): sum_total = sumTotal + z name_num = nameNum + Z return (sumTotal, nameNum) def non_letra(): pass def complete(): print('A soma de suas letras sao', sumTotal, 'no total.') print('Nome numerico sem soma de numeros:', nameNum)
############################################################################ # # Copyright (C) 2016 The Qt Company Ltd. # Contact: https://www.qt.io/licensing/ # # This file is part of Qt Creator. # # Commercial License Usage # Licensees holding valid commercial Qt licenses may use this file in # accordance with the commercial license agreement provided with the # Software or, alternatively, in accordance with the terms contained in # a written agreement between you and The Qt Company. For licensing terms # and conditions see https://www.qt.io/terms-conditions. For further # information use the contact form at https://www.qt.io/contact-us. # # GNU General Public License Usage # Alternatively, this file may be used under the terms of the GNU # General Public License version 3 as published by the Free Software # Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT # included in the packaging of this file. Please review the following # information to ensure the GNU General Public License requirements will # be met: https://www.gnu.org/licenses/gpl-3.0.html. # ############################################################################ source("../../shared/qtcreator.py") def main(): startApplication("qtcreator" + SettingsPath) if not startedWithoutPluginError(): return available = ["5.6"] for qtVersion in available: # using a temporary directory won't mess up a potentially existing workingDir = tempDir() projectName = createNewQtQuickUI(workingDir, qtVersion) quick = "2.6" qmlViewer = modifyRunSettingsForHookIntoQtQuickUI(1, 0, workingDir, projectName, 11223, quick) if qmlViewer!=None: qmlViewerPath = os.path.dirname(qmlViewer) qmlViewer = os.path.basename(qmlViewer) result = addExecutableAsAttachableAUT(qmlViewer, 11223) allowAppThroughWinFW(qmlViewerPath, qmlViewer, None) if result: result = runAndCloseApp(True, qmlViewer, 11223, sType=SubprocessType.QT_QUICK_UI, quickVersion=quick) else: result = runAndCloseApp(sType=SubprocessType.QT_QUICK_UI) removeExecutableAsAttachableAUT(qmlViewer, 11223) deleteAppFromWinFW(qmlViewerPath, qmlViewer) else: result = runAndCloseApp(sType=SubprocessType.QT_QUICK_UI) if result == None: checkCompile() else: appOutput = logApplicationOutput() test.verify(not ("untitled.qml" in appOutput or "MainForm.ui.qml" in appOutput), "Does the Application Output indicate QML errors?") invokeMenuItem("File", "Close All Projects and Editors") invokeMenuItem("File", "Exit")
source('../../shared/qtcreator.py') def main(): start_application('qtcreator' + SettingsPath) if not started_without_plugin_error(): return available = ['5.6'] for qt_version in available: working_dir = temp_dir() project_name = create_new_qt_quick_ui(workingDir, qtVersion) quick = '2.6' qml_viewer = modify_run_settings_for_hook_into_qt_quick_ui(1, 0, workingDir, projectName, 11223, quick) if qmlViewer != None: qml_viewer_path = os.path.dirname(qmlViewer) qml_viewer = os.path.basename(qmlViewer) result = add_executable_as_attachable_aut(qmlViewer, 11223) allow_app_through_win_fw(qmlViewerPath, qmlViewer, None) if result: result = run_and_close_app(True, qmlViewer, 11223, sType=SubprocessType.QT_QUICK_UI, quickVersion=quick) else: result = run_and_close_app(sType=SubprocessType.QT_QUICK_UI) remove_executable_as_attachable_aut(qmlViewer, 11223) delete_app_from_win_fw(qmlViewerPath, qmlViewer) else: result = run_and_close_app(sType=SubprocessType.QT_QUICK_UI) if result == None: check_compile() else: app_output = log_application_output() test.verify(not ('untitled.qml' in appOutput or 'MainForm.ui.qml' in appOutput), 'Does the Application Output indicate QML errors?') invoke_menu_item('File', 'Close All Projects and Editors') invoke_menu_item('File', 'Exit')
#State Codes area_codes = [("Alabama",[205, 251, 256, 334, 659, 938]), ("Alaska",[907]), ("Arizona",[480, 520, 602, 623, 928]), ("Arkansas",[327, 479, 501, 870]), ("California",[209, 213, 310, 323, 341, 369, 408, 415, 424, 442, 510, 530, 559, 562, 619, 626, 627, 628, 650, 657, 661, 669, 707, 714, 747, 760, 764, 805, 818, 831, 858, 909, 916, 925, 935, 949, 951 ]), ("Colorado",[303, 719, 720, 970 ]), ("Connecticut",[203, 475, 860, 959]), ("Delaware",[302]), ("District of Columbia",[202]), ("Florida",[239, 305, 321, 352, 386, 407, 561, 689, 727, 754, 772, 786, 813, 850, 863, 904, 927, 941, 954 ]), ("Georgia",[229, 404, 470, 478, 678, 706, 762, 770, 912 ]), ("Hawaii",[808]), ("Idaho",[208]), ("Illinois",[217, 224, 309, 312, 331, 447, 464, 618, 630, 708, 730, 773, 779, 815, 847, 872 ]), ("Indiana",[219, 260, 317, 574, 765, 812, 930]), ("Iowa",[319, 515, 563, 641, 712 ]), ("Kansas",[316, 620, 785, 913]), ("Kentucky",[270, 364, 502, 606, 859]), ("Louisiana",[225, 318, 337, 504, 985]), ("Maine",[207]), ("Maryland",[227, 240, 301, 410, 443, 667]), ("Massachusetts",[339, 351, 413, 508, 617, 774, 781, 857, 978 ]), ("Michigan",[231, 248, 269, 278, 313, 517, 586, 616, 679, 734, 810, 906, 947, 989 ]), ("Minnesota",[218, 320, 507, 612, 651, 763, 952]), ("Mississippi",[228, 601, 662, 769]), ("Missouri",[314, 417, 557, 573, 636, 660, 816, 975]), ("Montana",[406]), ("Nebraska",[308, 402, 531]), ("Nevada",[702, 725, 775]), ("New Hampshire",[603]), ("New Jersey",[201, 551, 609, 732, 848, 856, 862, 908, 973 ]), ("New Mexico",[505, 575]), ("New York",[212, 315, 347, 516, 518, 585, 607, 631, 646, 716, 718, 845, 914, 917, 929, 934 ]), ("North Carolina",[252, 336, 704, 743, 828, 910, 919, 980, 984 ]), ("North Dakota",[701]), ("Ohio",[216, 220, 234, 283, 330, 380, 419, 440, 513, 567, 614, 740, 937]), ("Oklahoma",[405, 539, 580, 918]), ("Oregon",[458, 503, 541, 971]), ("Pennsylvania",[215, 267, 272, 412, 484, 570, 582, 610, 717, 724, 814, 878 ]), ("Rhode Island",[401]), ("South Carolina",[803, 843, 854, 864]), ("South Dakota",[605]), ("Tennessee",[423, 615, 629, 731, 865, 901, 931]), ("Texas",[210, 214, 254, 281, 325, 346, 361, 409, 430, 432, 469, 512, 682, 713, 737, 806, 817, 830, 832, 903, 915, 936, 940, 956, 972, 979 ]), ("Utah",[385, 435, 801]), ("Vermont",[802]), ("Virginia",[276, 434, 540, 571, 703, 757, 804 ]), ("Washington",[206, 253, 360, 425, 509, 564]), ("West Virginia",[304, 681]), ("Wisconsin",[262, 274, 414, 534, 608, 715, 920]), ("Wyoming",[307])]
area_codes = [('Alabama', [205, 251, 256, 334, 659, 938]), ('Alaska', [907]), ('Arizona', [480, 520, 602, 623, 928]), ('Arkansas', [327, 479, 501, 870]), ('California', [209, 213, 310, 323, 341, 369, 408, 415, 424, 442, 510, 530, 559, 562, 619, 626, 627, 628, 650, 657, 661, 669, 707, 714, 747, 760, 764, 805, 818, 831, 858, 909, 916, 925, 935, 949, 951]), ('Colorado', [303, 719, 720, 970]), ('Connecticut', [203, 475, 860, 959]), ('Delaware', [302]), ('District of Columbia', [202]), ('Florida', [239, 305, 321, 352, 386, 407, 561, 689, 727, 754, 772, 786, 813, 850, 863, 904, 927, 941, 954]), ('Georgia', [229, 404, 470, 478, 678, 706, 762, 770, 912]), ('Hawaii', [808]), ('Idaho', [208]), ('Illinois', [217, 224, 309, 312, 331, 447, 464, 618, 630, 708, 730, 773, 779, 815, 847, 872]), ('Indiana', [219, 260, 317, 574, 765, 812, 930]), ('Iowa', [319, 515, 563, 641, 712]), ('Kansas', [316, 620, 785, 913]), ('Kentucky', [270, 364, 502, 606, 859]), ('Louisiana', [225, 318, 337, 504, 985]), ('Maine', [207]), ('Maryland', [227, 240, 301, 410, 443, 667]), ('Massachusetts', [339, 351, 413, 508, 617, 774, 781, 857, 978]), ('Michigan', [231, 248, 269, 278, 313, 517, 586, 616, 679, 734, 810, 906, 947, 989]), ('Minnesota', [218, 320, 507, 612, 651, 763, 952]), ('Mississippi', [228, 601, 662, 769]), ('Missouri', [314, 417, 557, 573, 636, 660, 816, 975]), ('Montana', [406]), ('Nebraska', [308, 402, 531]), ('Nevada', [702, 725, 775]), ('New Hampshire', [603]), ('New Jersey', [201, 551, 609, 732, 848, 856, 862, 908, 973]), ('New Mexico', [505, 575]), ('New York', [212, 315, 347, 516, 518, 585, 607, 631, 646, 716, 718, 845, 914, 917, 929, 934]), ('North Carolina', [252, 336, 704, 743, 828, 910, 919, 980, 984]), ('North Dakota', [701]), ('Ohio', [216, 220, 234, 283, 330, 380, 419, 440, 513, 567, 614, 740, 937]), ('Oklahoma', [405, 539, 580, 918]), ('Oregon', [458, 503, 541, 971]), ('Pennsylvania', [215, 267, 272, 412, 484, 570, 582, 610, 717, 724, 814, 878]), ('Rhode Island', [401]), ('South Carolina', [803, 843, 854, 864]), ('South Dakota', [605]), ('Tennessee', [423, 615, 629, 731, 865, 901, 931]), ('Texas', [210, 214, 254, 281, 325, 346, 361, 409, 430, 432, 469, 512, 682, 713, 737, 806, 817, 830, 832, 903, 915, 936, 940, 956, 972, 979]), ('Utah', [385, 435, 801]), ('Vermont', [802]), ('Virginia', [276, 434, 540, 571, 703, 757, 804]), ('Washington', [206, 253, 360, 425, 509, 564]), ('West Virginia', [304, 681]), ('Wisconsin', [262, 274, 414, 534, 608, 715, 920]), ('Wyoming', [307])]
#!/usr/bin/python '''the -O turns off the assertions''' def myFunc(a,b,c,d): ''' this is my function with the formula (2*a+b)/(c-d) ''' assert c!=d, "c should not equal d" return (2*a+b)/(c-d) myFunc(1,2,3,3)
"""the -O turns off the assertions""" def my_func(a, b, c, d): """ this is my function with the formula (2*a+b)/(c-d) """ assert c != d, 'c should not equal d' return (2 * a + b) / (c - d) my_func(1, 2, 3, 3)
# # PySNMP MIB module H3C-IKE-MONITOR-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/H3C-IKE-MONITOR-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 19:09:27 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, ValueRangeConstraint, ConstraintsUnion, ConstraintsIntersection, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "ValueRangeConstraint", "ConstraintsUnion", "ConstraintsIntersection", "SingleValueConstraint") h3cCommon, = mibBuilder.importSymbols("HUAWEI-3COM-OID-MIB", "h3cCommon") ifIndex, = mibBuilder.importSymbols("IF-MIB", "ifIndex") ObjectGroup, NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "ObjectGroup", "NotificationGroup", "ModuleCompliance") Gauge32, Bits, ObjectIdentity, Integer32, TimeTicks, ModuleIdentity, Counter32, Unsigned32, Counter64, NotificationType, MibIdentifier, IpAddress, MibScalar, MibTable, MibTableRow, MibTableColumn, iso = mibBuilder.importSymbols("SNMPv2-SMI", "Gauge32", "Bits", "ObjectIdentity", "Integer32", "TimeTicks", "ModuleIdentity", "Counter32", "Unsigned32", "Counter64", "NotificationType", "MibIdentifier", "IpAddress", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "iso") TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString") h3cIKEMonitor = ModuleIdentity((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30)) if mibBuilder.loadTexts: h3cIKEMonitor.setLastUpdated('200410260000Z') if mibBuilder.loadTexts: h3cIKEMonitor.setOrganization('Huawei-3COM Technologies Co., Ltd.') class H3cIKENegoMode(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(2, 4, 32)) namedValues = NamedValues(("mainMode", 2), ("aggressiveMode", 4), ("quickMode", 32)) class H3cIKEAuthMethod(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 3)) namedValues = NamedValues(("preSharedKey", 1), ("rsaSignatures", 3)) class H3cDiffHellmanGrp(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 5, 14)) namedValues = NamedValues(("modp768", 1), ("modp1024", 2), ("modp1536", 5), ("modp2048", 14)) class H3cEncryptAlgo(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10)) namedValues = NamedValues(("none", 0), ("desCbc", 1), ("ideaCbc", 2), ("blowfishCbc", 3), ("rc5R16B64Cbc", 4), ("tripleDesCbc", 5), ("castCbc", 6), ("aesCbc", 7), ("aesCbc128", 8), ("aesCbc192", 9), ("aesCbc256", 10)) class H3cAuthAlgo(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2)) namedValues = NamedValues(("none", 0), ("md5", 1), ("sha", 2)) class H3cSaProtocol(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4)) namedValues = NamedValues(("reserved", 0), ("isakmp", 1), ("ah", 2), ("esp", 3), ("ipcomp", 4)) class H3cTrapStatus(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2)) namedValues = NamedValues(("enabled", 1), ("disabled", 2)) class H3cIKEIDType(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11)) namedValues = NamedValues(("reserved", 0), ("ipv4Addr", 1), ("fqdn", 2), ("userFqdn", 3), ("ipv4AddrSubnet", 4), ("ipv6Addr", 5), ("ipv6AddrSubnet", 6), ("ipv4AddrRange", 7), ("ipv6AddrRange", 8), ("derAsn1Dn", 9), ("derAsn1Gn", 10), ("keyId", 11)) class H3cTrafficType(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 4, 5, 6, 7, 8)) namedValues = NamedValues(("ipv4Addr", 1), ("ipv4AddrSubnet", 4), ("ipv6Addr", 5), ("ipv6AddrSubnet", 6), ("ipv4AddrRange", 7), ("ipv6AddrRange", 8)) class H3cIKETunnelState(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2)) namedValues = NamedValues(("active", 1), ("timeout", 2)) h3cIKEObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1)) h3cIKETunnelTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 1), ) if mibBuilder.loadTexts: h3cIKETunnelTable.setStatus('current') h3cIKETunnelEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 1, 1), ).setIndexNames((0, "H3C-IKE-MONITOR-MIB", "h3cIKETunIndex")) if mibBuilder.loadTexts: h3cIKETunnelEntry.setStatus('current') h3cIKETunIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647))) if mibBuilder.loadTexts: h3cIKETunIndex.setStatus('current') h3cIKETunLocalType = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 1, 1, 2), H3cIKEIDType()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKETunLocalType.setStatus('current') h3cIKETunLocalValue1 = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 1, 1, 3), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKETunLocalValue1.setStatus('current') h3cIKETunLocalValue2 = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 1, 1, 4), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKETunLocalValue2.setStatus('current') h3cIKETunLocalAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 1, 1, 5), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKETunLocalAddr.setStatus('current') h3cIKETunRemoteType = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 1, 1, 6), H3cIKEIDType()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKETunRemoteType.setStatus('current') h3cIKETunRemoteValue1 = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 1, 1, 7), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKETunRemoteValue1.setStatus('current') h3cIKETunRemoteValue2 = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 1, 1, 8), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKETunRemoteValue2.setStatus('current') h3cIKETunRemoteAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 1, 1, 9), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKETunRemoteAddr.setStatus('current') h3cIKETunInitiator = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 1, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("local", 1), ("remote", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKETunInitiator.setStatus('current') h3cIKETunNegoMode = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 1, 1, 11), H3cIKENegoMode()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKETunNegoMode.setStatus('current') h3cIKETunDiffHellmanGrp = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 1, 1, 12), H3cDiffHellmanGrp()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKETunDiffHellmanGrp.setStatus('current') h3cIKETunEncryptAlgo = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 1, 1, 13), H3cEncryptAlgo()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKETunEncryptAlgo.setStatus('current') h3cIKETunHashAlgo = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 1, 1, 14), H3cAuthAlgo()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKETunHashAlgo.setStatus('current') h3cIKETunAuthMethod = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 1, 1, 15), H3cIKEAuthMethod()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKETunAuthMethod.setStatus('current') h3cIKETunLifeTime = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 1, 1, 16), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647))).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKETunLifeTime.setStatus('current') h3cIKETunActiveTime = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 1, 1, 17), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647))).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKETunActiveTime.setStatus('current') h3cIKETunRemainTime = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 1, 1, 18), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647))).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKETunRemainTime.setStatus('current') h3cIKETunTotalRefreshes = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 1, 1, 19), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKETunTotalRefreshes.setStatus('current') h3cIKETunState = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 1, 1, 20), H3cIKETunnelState()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKETunState.setStatus('current') h3cIKETunDpdIntervalTime = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 1, 1, 21), Integer32().clone(10)).setUnits('second').setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKETunDpdIntervalTime.setStatus('current') h3cIKETunDpdTimeOut = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 1, 1, 22), Integer32().clone(5)).setUnits('second').setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKETunDpdTimeOut.setStatus('current') h3cIKETunnelStatTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 2), ) if mibBuilder.loadTexts: h3cIKETunnelStatTable.setStatus('current') h3cIKETunnelStatEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 2, 1), ).setIndexNames((0, "H3C-IKE-MONITOR-MIB", "h3cIKETunIndex")) if mibBuilder.loadTexts: h3cIKETunnelStatEntry.setStatus('current') h3cIKETunInOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 2, 1, 1), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKETunInOctets.setStatus('current') h3cIKETunInPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 2, 1, 2), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKETunInPkts.setStatus('current') h3cIKETunInDropPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 2, 1, 3), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKETunInDropPkts.setStatus('current') h3cIKETunInP2Exchgs = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 2, 1, 4), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKETunInP2Exchgs.setStatus('current') h3cIKETunInP2ExchgRejets = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 2, 1, 5), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKETunInP2ExchgRejets.setStatus('current') h3cIKETunInP2SaDelRequests = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 2, 1, 6), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKETunInP2SaDelRequests.setStatus('current') h3cIKETunInP1SaDelRequests = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 2, 1, 7), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKETunInP1SaDelRequests.setStatus('current') h3cIKETunInNotifys = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 2, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKETunInNotifys.setStatus('current') h3cIKETunOutOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 2, 1, 9), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKETunOutOctets.setStatus('current') h3cIKETunOutPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 2, 1, 10), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKETunOutPkts.setStatus('current') h3cIKETunOutDropPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 2, 1, 11), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKETunOutDropPkts.setStatus('current') h3cIKETunOutP2Exchgs = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 2, 1, 12), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKETunOutP2Exchgs.setStatus('current') h3cIKETunOutP2ExchgRejects = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 2, 1, 13), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKETunOutP2ExchgRejects.setStatus('current') h3cIKETunOutP2SaDelRequests = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 2, 1, 14), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKETunOutP2SaDelRequests.setStatus('current') h3cIKETunOutP1SaDelRequests = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 2, 1, 15), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKETunOutP1SaDelRequests.setStatus('current') h3cIKETunOutNotifys = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 2, 1, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKETunOutNotifys.setStatus('current') h3cIKEGlobalStats = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3)) h3cIKEGlobalActiveTunnels = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 1), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKEGlobalActiveTunnels.setStatus('current') h3cIKEGlobalInOctets = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 2), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKEGlobalInOctets.setStatus('current') h3cIKEGlobalInPkts = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 3), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKEGlobalInPkts.setStatus('current') h3cIKEGlobalInDropPkts = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 4), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKEGlobalInDropPkts.setStatus('current') h3cIKEGlobalInP2Exchgs = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 5), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKEGlobalInP2Exchgs.setStatus('current') h3cIKEGlobalInP2ExchgRejects = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 6), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKEGlobalInP2ExchgRejects.setStatus('current') h3cIKEGlobalInP2SaDelRequests = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 7), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKEGlobalInP2SaDelRequests.setStatus('current') h3cIKEGlobalInNotifys = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKEGlobalInNotifys.setStatus('current') h3cIKEGlobalOutOctets = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 9), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKEGlobalOutOctets.setStatus('current') h3cIKEGlobalOutPkts = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 10), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKEGlobalOutPkts.setStatus('current') h3cIKEGlobalOutDropPkts = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 11), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKEGlobalOutDropPkts.setStatus('current') h3cIKEGlobalOutP2Exchgs = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 12), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKEGlobalOutP2Exchgs.setStatus('current') h3cIKEGlobalOutP2ExchgRejects = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 13), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKEGlobalOutP2ExchgRejects.setStatus('current') h3cIKEGlobalOutP2SaDelRequests = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 14), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKEGlobalOutP2SaDelRequests.setStatus('current') h3cIKEGlobalOutNotifys = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKEGlobalOutNotifys.setStatus('current') h3cIKEGlobalInitTunnels = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKEGlobalInitTunnels.setStatus('current') h3cIKEGlobalInitTunnelFails = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 17), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKEGlobalInitTunnelFails.setStatus('current') h3cIKEGlobalRespTunnels = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 18), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKEGlobalRespTunnels.setStatus('current') h3cIKEGlobalRespTunnelFails = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 19), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKEGlobalRespTunnelFails.setStatus('current') h3cIKEGlobalAuthFails = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 20), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKEGlobalAuthFails.setStatus('current') h3cIKEGlobalNoSaFails = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 21), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKEGlobalNoSaFails.setStatus('current') h3cIKEGlobalInvalidCookieFails = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 22), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKEGlobalInvalidCookieFails.setStatus('current') h3cIKEGlobalAttrNotSuppFails = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 23), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKEGlobalAttrNotSuppFails.setStatus('current') h3cIKEGlobalNoProposalChosenFails = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 24), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKEGlobalNoProposalChosenFails.setStatus('current') h3cIKEGlobalUnsportExchTypeFails = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 25), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKEGlobalUnsportExchTypeFails.setStatus('current') h3cIKEGlobalInvalidIdFails = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 26), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKEGlobalInvalidIdFails.setStatus('current') h3cIKEGlobalInvalidProFails = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 27), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKEGlobalInvalidProFails.setStatus('current') h3cIKEGlobalCertTypeUnsuppFails = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 28), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKEGlobalCertTypeUnsuppFails.setStatus('current') h3cIKEGlobalInvalidCertAuthFails = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 29), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKEGlobalInvalidCertAuthFails.setStatus('current') h3cIKEGlobalInvalidSignFails = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 30), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKEGlobalInvalidSignFails.setStatus('current') h3cIKEGlobalCertUnavailableFails = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 31), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cIKEGlobalCertUnavailableFails.setStatus('current') h3cIKETrapObject = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 4)) h3cIKEProposalNumber = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 4, 1), Integer32()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: h3cIKEProposalNumber.setStatus('current') h3cIKEProposalSize = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 4, 2), Integer32()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: h3cIKEProposalSize.setStatus('current') h3cIKEIdInformation = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 4, 3), DisplayString()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: h3cIKEIdInformation.setStatus('current') h3cIKEProtocolNum = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 4, 4), Integer32()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: h3cIKEProtocolNum.setStatus('current') h3cIKECertInformation = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 4, 5), DisplayString()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: h3cIKECertInformation.setStatus('current') h3cIKETrapCntl = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 5)) h3cIKETrapGlobalCntl = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 5, 1), H3cTrapStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: h3cIKETrapGlobalCntl.setStatus('current') h3cIKETunnelStartTrapCntl = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 5, 2), H3cTrapStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: h3cIKETunnelStartTrapCntl.setStatus('current') h3cIKETunnelStopTrapCntl = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 5, 3), H3cTrapStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: h3cIKETunnelStopTrapCntl.setStatus('current') h3cIKENoSaTrapCntl = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 5, 4), H3cTrapStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: h3cIKENoSaTrapCntl.setStatus('current') h3cIKEEncryFailureTrapCntl = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 5, 5), H3cTrapStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: h3cIKEEncryFailureTrapCntl.setStatus('current') h3cIKEDecryFailureTrapCntl = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 5, 6), H3cTrapStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: h3cIKEDecryFailureTrapCntl.setStatus('current') h3cIKEInvalidProposalTrapCntl = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 5, 7), H3cTrapStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: h3cIKEInvalidProposalTrapCntl.setStatus('current') h3cIKEAuthFailTrapCntl = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 5, 8), H3cTrapStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: h3cIKEAuthFailTrapCntl.setStatus('current') h3cIKEInvalidCookieTrapCntl = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 5, 9), H3cTrapStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: h3cIKEInvalidCookieTrapCntl.setStatus('current') h3cIKEInvalidSpiTrapCntl = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 5, 10), H3cTrapStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: h3cIKEInvalidSpiTrapCntl.setStatus('current') h3cIKEAttrNotSuppTrapCntl = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 5, 11), H3cTrapStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: h3cIKEAttrNotSuppTrapCntl.setStatus('current') h3cIKEUnsportExchTypeTrapCntl = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 5, 12), H3cTrapStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: h3cIKEUnsportExchTypeTrapCntl.setStatus('current') h3cIKEInvalidIdTrapCntl = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 5, 13), H3cTrapStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: h3cIKEInvalidIdTrapCntl.setStatus('current') h3cIKEInvalidProtocolTrapCntl = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 5, 14), H3cTrapStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: h3cIKEInvalidProtocolTrapCntl.setStatus('current') h3cIKECertTypeUnsuppTrapCntl = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 5, 15), H3cTrapStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: h3cIKECertTypeUnsuppTrapCntl.setStatus('current') h3cIKEInvalidCertAuthTrapCntl = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 5, 16), H3cTrapStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: h3cIKEInvalidCertAuthTrapCntl.setStatus('current') h3cIKEInvalidSignTrapCntl = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 5, 17), H3cTrapStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: h3cIKEInvalidSignTrapCntl.setStatus('current') h3cIKECertUnavailableTrapCntl = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 5, 18), H3cTrapStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: h3cIKECertUnavailableTrapCntl.setStatus('current') h3cIKEProposalAddTrapCntl = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 5, 19), H3cTrapStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: h3cIKEProposalAddTrapCntl.setStatus('current') h3cIKEProposalDelTrapCntl = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 5, 20), H3cTrapStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: h3cIKEProposalDelTrapCntl.setStatus('current') h3cIKETrap = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 6)) h3cIKENotifications = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 6, 1)) h3cIKETunnelStart = NotificationType((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 6, 1, 1)).setObjects(("H3C-IKE-MONITOR-MIB", "h3cIKETunLocalAddr"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunRemoteAddr"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunLifeTime")) if mibBuilder.loadTexts: h3cIKETunnelStart.setStatus('current') h3cIKETunnelStop = NotificationType((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 6, 1, 2)).setObjects(("H3C-IKE-MONITOR-MIB", "h3cIKETunLocalAddr"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunRemoteAddr"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunActiveTime")) if mibBuilder.loadTexts: h3cIKETunnelStop.setStatus('current') h3cIKENoSaFailure = NotificationType((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 6, 1, 3)).setObjects(("H3C-IKE-MONITOR-MIB", "h3cIKETunLocalAddr"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunRemoteAddr")) if mibBuilder.loadTexts: h3cIKENoSaFailure.setStatus('current') h3cIKEEncryFailFailure = NotificationType((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 6, 1, 4)).setObjects(("H3C-IKE-MONITOR-MIB", "h3cIKETunLocalAddr"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunRemoteAddr")) if mibBuilder.loadTexts: h3cIKEEncryFailFailure.setStatus('current') h3cIKEDecryFailFailure = NotificationType((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 6, 1, 5)).setObjects(("H3C-IKE-MONITOR-MIB", "h3cIKETunLocalAddr"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunRemoteAddr")) if mibBuilder.loadTexts: h3cIKEDecryFailFailure.setStatus('current') h3cIKEInvalidProposalFailure = NotificationType((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 6, 1, 6)).setObjects(("H3C-IKE-MONITOR-MIB", "h3cIKETunLocalAddr"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunRemoteAddr")) if mibBuilder.loadTexts: h3cIKEInvalidProposalFailure.setStatus('current') h3cIKEAuthFailFailure = NotificationType((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 6, 1, 7)).setObjects(("H3C-IKE-MONITOR-MIB", "h3cIKETunLocalAddr"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunRemoteAddr")) if mibBuilder.loadTexts: h3cIKEAuthFailFailure.setStatus('current') h3cIKEInvalidCookieFailure = NotificationType((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 6, 1, 8)).setObjects(("H3C-IKE-MONITOR-MIB", "h3cIKETunLocalAddr"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunRemoteAddr")) if mibBuilder.loadTexts: h3cIKEInvalidCookieFailure.setStatus('current') h3cIKEAttrNotSuppFailure = NotificationType((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 6, 1, 9)).setObjects(("H3C-IKE-MONITOR-MIB", "h3cIKETunLocalAddr"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunRemoteAddr")) if mibBuilder.loadTexts: h3cIKEAttrNotSuppFailure.setStatus('current') h3cIKEUnsportExchTypeFailure = NotificationType((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 6, 1, 10)).setObjects(("H3C-IKE-MONITOR-MIB", "h3cIKETunLocalAddr"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunRemoteAddr")) if mibBuilder.loadTexts: h3cIKEUnsportExchTypeFailure.setStatus('current') h3cIKEInvalidIdFailure = NotificationType((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 6, 1, 11)).setObjects(("H3C-IKE-MONITOR-MIB", "h3cIKETunLocalAddr"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunRemoteAddr"), ("H3C-IKE-MONITOR-MIB", "h3cIKEIdInformation")) if mibBuilder.loadTexts: h3cIKEInvalidIdFailure.setStatus('current') h3cIKEInvalidProtocolFailure = NotificationType((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 6, 1, 12)).setObjects(("H3C-IKE-MONITOR-MIB", "h3cIKETunLocalAddr"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunRemoteAddr"), ("H3C-IKE-MONITOR-MIB", "h3cIKEProtocolNum")) if mibBuilder.loadTexts: h3cIKEInvalidProtocolFailure.setStatus('current') h3cIKECertTypeUnsuppFailure = NotificationType((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 6, 1, 13)).setObjects(("H3C-IKE-MONITOR-MIB", "h3cIKETunLocalAddr"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunRemoteAddr"), ("H3C-IKE-MONITOR-MIB", "h3cIKECertInformation")) if mibBuilder.loadTexts: h3cIKECertTypeUnsuppFailure.setStatus('current') h3cIKEInvalidCertAuthFailure = NotificationType((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 6, 1, 14)).setObjects(("H3C-IKE-MONITOR-MIB", "h3cIKETunLocalAddr"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunRemoteAddr"), ("H3C-IKE-MONITOR-MIB", "h3cIKECertInformation")) if mibBuilder.loadTexts: h3cIKEInvalidCertAuthFailure.setStatus('current') h3cIKElInvalidSignFailure = NotificationType((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 6, 1, 15)).setObjects(("H3C-IKE-MONITOR-MIB", "h3cIKETunLocalAddr"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunRemoteAddr"), ("H3C-IKE-MONITOR-MIB", "h3cIKECertInformation")) if mibBuilder.loadTexts: h3cIKElInvalidSignFailure.setStatus('current') h3cIKECertUnavailableFailure = NotificationType((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 6, 1, 16)).setObjects(("H3C-IKE-MONITOR-MIB", "h3cIKETunLocalAddr"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunRemoteAddr"), ("H3C-IKE-MONITOR-MIB", "h3cIKECertInformation")) if mibBuilder.loadTexts: h3cIKECertUnavailableFailure.setStatus('current') h3cIKEProposalAdd = NotificationType((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 6, 1, 17)).setObjects(("H3C-IKE-MONITOR-MIB", "h3cIKEProposalNumber"), ("H3C-IKE-MONITOR-MIB", "h3cIKEProposalSize")) if mibBuilder.loadTexts: h3cIKEProposalAdd.setStatus('current') h3cIKEProposalDel = NotificationType((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 6, 1, 18)).setObjects(("H3C-IKE-MONITOR-MIB", "h3cIKEProposalNumber"), ("H3C-IKE-MONITOR-MIB", "h3cIKEProposalSize")) if mibBuilder.loadTexts: h3cIKEProposalDel.setStatus('current') h3cIKEConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 2)) h3cIKECompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 2, 1)) h3cIKEGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 2, 2)) h3cIKECompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 2, 1, 1)).setObjects(("H3C-IKE-MONITOR-MIB", "h3cIKETunnelTableGroup"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunnelStatTableGroup"), ("H3C-IKE-MONITOR-MIB", "h3cIKEGlobalStatsGroup"), ("H3C-IKE-MONITOR-MIB", "h3cIKETrapObjectGroup"), ("H3C-IKE-MONITOR-MIB", "h3cIKETrapCntlGroup"), ("H3C-IKE-MONITOR-MIB", "h3cIKETrapGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): h3cIKECompliance = h3cIKECompliance.setStatus('current') h3cIKETunnelTableGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 2, 2, 1)).setObjects(("H3C-IKE-MONITOR-MIB", "h3cIKETunLocalType"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunLocalValue1"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunLocalValue2"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunLocalAddr"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunRemoteType"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunRemoteValue1"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunRemoteValue2"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunRemoteAddr"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunInitiator"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunNegoMode"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunDiffHellmanGrp"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunEncryptAlgo"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunHashAlgo"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunAuthMethod"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunLifeTime"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunActiveTime"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunRemainTime"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunTotalRefreshes"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunState"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunDpdIntervalTime"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunDpdTimeOut")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): h3cIKETunnelTableGroup = h3cIKETunnelTableGroup.setStatus('current') h3cIKETunnelStatTableGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 2, 2, 2)).setObjects(("H3C-IKE-MONITOR-MIB", "h3cIKETunInOctets"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunInPkts"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunInDropPkts"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunInP2Exchgs"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunInP2ExchgRejets"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunInP2SaDelRequests"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunInP1SaDelRequests"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunInNotifys"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunOutOctets"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunOutPkts"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunOutDropPkts"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunOutP2Exchgs"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunOutP2ExchgRejects"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunOutP2SaDelRequests"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunOutP1SaDelRequests"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunOutNotifys")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): h3cIKETunnelStatTableGroup = h3cIKETunnelStatTableGroup.setStatus('current') h3cIKEGlobalStatsGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 2, 2, 3)).setObjects(("H3C-IKE-MONITOR-MIB", "h3cIKEGlobalActiveTunnels"), ("H3C-IKE-MONITOR-MIB", "h3cIKEGlobalInOctets"), ("H3C-IKE-MONITOR-MIB", "h3cIKEGlobalInPkts"), ("H3C-IKE-MONITOR-MIB", "h3cIKEGlobalInDropPkts"), ("H3C-IKE-MONITOR-MIB", "h3cIKEGlobalInP2Exchgs"), ("H3C-IKE-MONITOR-MIB", "h3cIKEGlobalInP2ExchgRejects"), ("H3C-IKE-MONITOR-MIB", "h3cIKEGlobalInP2SaDelRequests"), ("H3C-IKE-MONITOR-MIB", "h3cIKEGlobalInNotifys"), ("H3C-IKE-MONITOR-MIB", "h3cIKEGlobalOutOctets"), ("H3C-IKE-MONITOR-MIB", "h3cIKEGlobalOutPkts"), ("H3C-IKE-MONITOR-MIB", "h3cIKEGlobalOutDropPkts"), ("H3C-IKE-MONITOR-MIB", "h3cIKEGlobalOutP2Exchgs"), ("H3C-IKE-MONITOR-MIB", "h3cIKEGlobalOutP2ExchgRejects"), ("H3C-IKE-MONITOR-MIB", "h3cIKEGlobalOutP2SaDelRequests"), ("H3C-IKE-MONITOR-MIB", "h3cIKEGlobalOutNotifys"), ("H3C-IKE-MONITOR-MIB", "h3cIKEGlobalInitTunnels"), ("H3C-IKE-MONITOR-MIB", "h3cIKEGlobalInitTunnelFails"), ("H3C-IKE-MONITOR-MIB", "h3cIKEGlobalRespTunnels"), ("H3C-IKE-MONITOR-MIB", "h3cIKEGlobalRespTunnelFails"), ("H3C-IKE-MONITOR-MIB", "h3cIKEGlobalAuthFails"), ("H3C-IKE-MONITOR-MIB", "h3cIKEGlobalNoSaFails"), ("H3C-IKE-MONITOR-MIB", "h3cIKEGlobalInvalidCookieFails"), ("H3C-IKE-MONITOR-MIB", "h3cIKEGlobalAttrNotSuppFails"), ("H3C-IKE-MONITOR-MIB", "h3cIKEGlobalNoProposalChosenFails"), ("H3C-IKE-MONITOR-MIB", "h3cIKEGlobalUnsportExchTypeFails"), ("H3C-IKE-MONITOR-MIB", "h3cIKEGlobalInvalidIdFails"), ("H3C-IKE-MONITOR-MIB", "h3cIKEGlobalInvalidProFails"), ("H3C-IKE-MONITOR-MIB", "h3cIKEGlobalCertTypeUnsuppFails"), ("H3C-IKE-MONITOR-MIB", "h3cIKEGlobalInvalidCertAuthFails"), ("H3C-IKE-MONITOR-MIB", "h3cIKEGlobalInvalidSignFails"), ("H3C-IKE-MONITOR-MIB", "h3cIKEGlobalCertUnavailableFails")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): h3cIKEGlobalStatsGroup = h3cIKEGlobalStatsGroup.setStatus('current') h3cIKETrapObjectGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 2, 2, 4)).setObjects(("H3C-IKE-MONITOR-MIB", "h3cIKEProposalNumber"), ("H3C-IKE-MONITOR-MIB", "h3cIKEProposalSize"), ("H3C-IKE-MONITOR-MIB", "h3cIKEIdInformation"), ("H3C-IKE-MONITOR-MIB", "h3cIKEProtocolNum"), ("H3C-IKE-MONITOR-MIB", "h3cIKECertInformation")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): h3cIKETrapObjectGroup = h3cIKETrapObjectGroup.setStatus('current') h3cIKETrapCntlGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 2, 2, 5)).setObjects(("H3C-IKE-MONITOR-MIB", "h3cIKETrapGlobalCntl"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunnelStartTrapCntl"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunnelStopTrapCntl"), ("H3C-IKE-MONITOR-MIB", "h3cIKENoSaTrapCntl"), ("H3C-IKE-MONITOR-MIB", "h3cIKEEncryFailureTrapCntl"), ("H3C-IKE-MONITOR-MIB", "h3cIKEDecryFailureTrapCntl"), ("H3C-IKE-MONITOR-MIB", "h3cIKEInvalidProposalTrapCntl"), ("H3C-IKE-MONITOR-MIB", "h3cIKEAuthFailTrapCntl"), ("H3C-IKE-MONITOR-MIB", "h3cIKEInvalidCookieTrapCntl"), ("H3C-IKE-MONITOR-MIB", "h3cIKEInvalidSpiTrapCntl"), ("H3C-IKE-MONITOR-MIB", "h3cIKEAttrNotSuppTrapCntl"), ("H3C-IKE-MONITOR-MIB", "h3cIKEUnsportExchTypeTrapCntl"), ("H3C-IKE-MONITOR-MIB", "h3cIKEInvalidIdTrapCntl"), ("H3C-IKE-MONITOR-MIB", "h3cIKEInvalidProtocolTrapCntl"), ("H3C-IKE-MONITOR-MIB", "h3cIKECertTypeUnsuppTrapCntl"), ("H3C-IKE-MONITOR-MIB", "h3cIKEInvalidCertAuthTrapCntl"), ("H3C-IKE-MONITOR-MIB", "h3cIKEInvalidSignTrapCntl"), ("H3C-IKE-MONITOR-MIB", "h3cIKECertUnavailableTrapCntl"), ("H3C-IKE-MONITOR-MIB", "h3cIKEProposalAddTrapCntl"), ("H3C-IKE-MONITOR-MIB", "h3cIKEProposalDelTrapCntl")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): h3cIKETrapCntlGroup = h3cIKETrapCntlGroup.setStatus('current') h3cIKETrapGroup = NotificationGroup((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 2, 2, 6)).setObjects(("H3C-IKE-MONITOR-MIB", "h3cIKETunnelStart"), ("H3C-IKE-MONITOR-MIB", "h3cIKETunnelStop"), ("H3C-IKE-MONITOR-MIB", "h3cIKENoSaFailure"), ("H3C-IKE-MONITOR-MIB", "h3cIKEEncryFailFailure"), ("H3C-IKE-MONITOR-MIB", "h3cIKEDecryFailFailure"), ("H3C-IKE-MONITOR-MIB", "h3cIKEInvalidProposalFailure"), ("H3C-IKE-MONITOR-MIB", "h3cIKEAuthFailFailure"), ("H3C-IKE-MONITOR-MIB", "h3cIKEInvalidCookieFailure"), ("H3C-IKE-MONITOR-MIB", "h3cIKEAttrNotSuppFailure"), ("H3C-IKE-MONITOR-MIB", "h3cIKEUnsportExchTypeFailure"), ("H3C-IKE-MONITOR-MIB", "h3cIKEInvalidIdFailure"), ("H3C-IKE-MONITOR-MIB", "h3cIKEInvalidProtocolFailure"), ("H3C-IKE-MONITOR-MIB", "h3cIKECertTypeUnsuppFailure"), ("H3C-IKE-MONITOR-MIB", "h3cIKEInvalidCertAuthFailure"), ("H3C-IKE-MONITOR-MIB", "h3cIKElInvalidSignFailure"), ("H3C-IKE-MONITOR-MIB", "h3cIKECertUnavailableFailure"), ("H3C-IKE-MONITOR-MIB", "h3cIKEProposalAdd"), ("H3C-IKE-MONITOR-MIB", "h3cIKEProposalDel")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): h3cIKETrapGroup = h3cIKETrapGroup.setStatus('current') mibBuilder.exportSymbols("H3C-IKE-MONITOR-MIB", h3cIKEGlobalInitTunnelFails=h3cIKEGlobalInitTunnelFails, h3cIKEAttrNotSuppFailure=h3cIKEAttrNotSuppFailure, h3cIKEGlobalCertUnavailableFails=h3cIKEGlobalCertUnavailableFails, h3cIKETunInitiator=h3cIKETunInitiator, h3cIKETunnelStatEntry=h3cIKETunnelStatEntry, h3cIKEGlobalOutDropPkts=h3cIKEGlobalOutDropPkts, h3cIKEGlobalInvalidCertAuthFails=h3cIKEGlobalInvalidCertAuthFails, h3cIKEProposalAddTrapCntl=h3cIKEProposalAddTrapCntl, h3cIKEInvalidProtocolTrapCntl=h3cIKEInvalidProtocolTrapCntl, h3cIKETunnelTable=h3cIKETunnelTable, h3cIKETunInPkts=h3cIKETunInPkts, h3cIKECertTypeUnsuppFailure=h3cIKECertTypeUnsuppFailure, h3cIKETrapCntlGroup=h3cIKETrapCntlGroup, h3cIKEGlobalInP2ExchgRejects=h3cIKEGlobalInP2ExchgRejects, h3cIKETunIndex=h3cIKETunIndex, H3cTrapStatus=H3cTrapStatus, h3cIKETunRemainTime=h3cIKETunRemainTime, h3cIKENoSaFailure=h3cIKENoSaFailure, h3cIKEGlobalAttrNotSuppFails=h3cIKEGlobalAttrNotSuppFails, h3cIKETunnelStop=h3cIKETunnelStop, H3cIKETunnelState=H3cIKETunnelState, H3cTrafficType=H3cTrafficType, h3cIKEConformance=h3cIKEConformance, h3cIKENotifications=h3cIKENotifications, h3cIKEGlobalOutOctets=h3cIKEGlobalOutOctets, h3cIKElInvalidSignFailure=h3cIKElInvalidSignFailure, PYSNMP_MODULE_ID=h3cIKEMonitor, h3cIKETunLocalValue2=h3cIKETunLocalValue2, h3cIKEInvalidCertAuthFailure=h3cIKEInvalidCertAuthFailure, h3cIKETunInP2SaDelRequests=h3cIKETunInP2SaDelRequests, h3cIKEGlobalInitTunnels=h3cIKEGlobalInitTunnels, h3cIKEProtocolNum=h3cIKEProtocolNum, h3cIKEInvalidProposalTrapCntl=h3cIKEInvalidProposalTrapCntl, h3cIKETunTotalRefreshes=h3cIKETunTotalRefreshes, h3cIKETunState=h3cIKETunState, h3cIKETrapCntl=h3cIKETrapCntl, h3cIKEAttrNotSuppTrapCntl=h3cIKEAttrNotSuppTrapCntl, h3cIKETrap=h3cIKETrap, h3cIKEGlobalInPkts=h3cIKEGlobalInPkts, h3cIKEInvalidCookieTrapCntl=h3cIKEInvalidCookieTrapCntl, h3cIKETunHashAlgo=h3cIKETunHashAlgo, h3cIKEUnsportExchTypeFailure=h3cIKEUnsportExchTypeFailure, H3cIKENegoMode=H3cIKENegoMode, h3cIKEInvalidProposalFailure=h3cIKEInvalidProposalFailure, h3cIKETunAuthMethod=h3cIKETunAuthMethod, h3cIKEGlobalRespTunnels=h3cIKEGlobalRespTunnels, h3cIKETunnelEntry=h3cIKETunnelEntry, h3cIKEProposalNumber=h3cIKEProposalNumber, h3cIKETrapObjectGroup=h3cIKETrapObjectGroup, H3cDiffHellmanGrp=H3cDiffHellmanGrp, h3cIKETunOutPkts=h3cIKETunOutPkts, h3cIKETunnelStart=h3cIKETunnelStart, h3cIKEInvalidSignTrapCntl=h3cIKEInvalidSignTrapCntl, h3cIKEInvalidCertAuthTrapCntl=h3cIKEInvalidCertAuthTrapCntl, h3cIKETunInNotifys=h3cIKETunInNotifys, h3cIKETrapGroup=h3cIKETrapGroup, h3cIKEGlobalStatsGroup=h3cIKEGlobalStatsGroup, h3cIKEGlobalActiveTunnels=h3cIKEGlobalActiveTunnels, h3cIKEGlobalOutPkts=h3cIKEGlobalOutPkts, h3cIKEMonitor=h3cIKEMonitor, h3cIKETunInOctets=h3cIKETunInOctets, h3cIKETunInDropPkts=h3cIKETunInDropPkts, h3cIKEAuthFailTrapCntl=h3cIKEAuthFailTrapCntl, h3cIKETunRemoteValue2=h3cIKETunRemoteValue2, h3cIKEProposalDelTrapCntl=h3cIKEProposalDelTrapCntl, h3cIKENoSaTrapCntl=h3cIKENoSaTrapCntl, h3cIKEGlobalNoSaFails=h3cIKEGlobalNoSaFails, h3cIKEGlobalOutP2SaDelRequests=h3cIKEGlobalOutP2SaDelRequests, h3cIKEGlobalStats=h3cIKEGlobalStats, h3cIKETunOutP1SaDelRequests=h3cIKETunOutP1SaDelRequests, h3cIKEProposalSize=h3cIKEProposalSize, h3cIKEEncryFailureTrapCntl=h3cIKEEncryFailureTrapCntl, h3cIKECertInformation=h3cIKECertInformation, h3cIKETrapObject=h3cIKETrapObject, h3cIKETunOutP2SaDelRequests=h3cIKETunOutP2SaDelRequests, h3cIKEDecryFailureTrapCntl=h3cIKEDecryFailureTrapCntl, h3cIKEProposalDel=h3cIKEProposalDel, h3cIKECertUnavailableFailure=h3cIKECertUnavailableFailure, h3cIKECertTypeUnsuppTrapCntl=h3cIKECertTypeUnsuppTrapCntl, h3cIKEObjects=h3cIKEObjects, h3cIKETunDpdTimeOut=h3cIKETunDpdTimeOut, h3cIKEGlobalAuthFails=h3cIKEGlobalAuthFails, h3cIKETunDpdIntervalTime=h3cIKETunDpdIntervalTime, h3cIKETunInP2ExchgRejets=h3cIKETunInP2ExchgRejets, h3cIKETunRemoteAddr=h3cIKETunRemoteAddr, h3cIKETunInP2Exchgs=h3cIKETunInP2Exchgs, h3cIKETunOutP2ExchgRejects=h3cIKETunOutP2ExchgRejects, h3cIKEGlobalNoProposalChosenFails=h3cIKEGlobalNoProposalChosenFails, h3cIKEEncryFailFailure=h3cIKEEncryFailFailure, h3cIKETunLocalType=h3cIKETunLocalType, H3cIKEAuthMethod=H3cIKEAuthMethod, h3cIKEInvalidCookieFailure=h3cIKEInvalidCookieFailure, h3cIKETunnelStatTable=h3cIKETunnelStatTable, h3cIKEDecryFailFailure=h3cIKEDecryFailFailure, h3cIKETunNegoMode=h3cIKETunNegoMode, h3cIKEGlobalInDropPkts=h3cIKEGlobalInDropPkts, H3cIKEIDType=H3cIKEIDType, H3cAuthAlgo=H3cAuthAlgo, h3cIKEInvalidIdTrapCntl=h3cIKEInvalidIdTrapCntl, h3cIKETunLocalValue1=h3cIKETunLocalValue1, h3cIKETunEncryptAlgo=h3cIKETunEncryptAlgo, h3cIKETunActiveTime=h3cIKETunActiveTime, h3cIKETunDiffHellmanGrp=h3cIKETunDiffHellmanGrp, h3cIKETunnelStatTableGroup=h3cIKETunnelStatTableGroup, h3cIKEGlobalRespTunnelFails=h3cIKEGlobalRespTunnelFails, h3cIKEGlobalInvalidCookieFails=h3cIKEGlobalInvalidCookieFails, h3cIKEIdInformation=h3cIKEIdInformation, h3cIKEInvalidSpiTrapCntl=h3cIKEInvalidSpiTrapCntl, h3cIKEGlobalOutP2Exchgs=h3cIKEGlobalOutP2Exchgs, h3cIKEGlobalInNotifys=h3cIKEGlobalInNotifys, h3cIKEGlobalOutP2ExchgRejects=h3cIKEGlobalOutP2ExchgRejects, h3cIKETunOutP2Exchgs=h3cIKETunOutP2Exchgs, h3cIKEGlobalInvalidProFails=h3cIKEGlobalInvalidProFails, h3cIKEProposalAdd=h3cIKEProposalAdd, h3cIKETunRemoteType=h3cIKETunRemoteType, h3cIKETunOutOctets=h3cIKETunOutOctets, h3cIKETunOutDropPkts=h3cIKETunOutDropPkts, h3cIKEInvalidProtocolFailure=h3cIKEInvalidProtocolFailure, H3cEncryptAlgo=H3cEncryptAlgo, h3cIKECertUnavailableTrapCntl=h3cIKECertUnavailableTrapCntl, h3cIKEUnsportExchTypeTrapCntl=h3cIKEUnsportExchTypeTrapCntl, H3cSaProtocol=H3cSaProtocol, h3cIKETunInP1SaDelRequests=h3cIKETunInP1SaDelRequests, h3cIKEInvalidIdFailure=h3cIKEInvalidIdFailure, h3cIKEGlobalInOctets=h3cIKEGlobalInOctets, h3cIKEGlobalInP2SaDelRequests=h3cIKEGlobalInP2SaDelRequests, h3cIKETrapGlobalCntl=h3cIKETrapGlobalCntl, h3cIKETunOutNotifys=h3cIKETunOutNotifys, h3cIKECompliance=h3cIKECompliance, h3cIKEGlobalUnsportExchTypeFails=h3cIKEGlobalUnsportExchTypeFails, h3cIKETunnelTableGroup=h3cIKETunnelTableGroup, h3cIKETunnelStartTrapCntl=h3cIKETunnelStartTrapCntl, h3cIKETunLocalAddr=h3cIKETunLocalAddr, h3cIKETunRemoteValue1=h3cIKETunRemoteValue1, h3cIKEGlobalInP2Exchgs=h3cIKEGlobalInP2Exchgs, h3cIKETunnelStopTrapCntl=h3cIKETunnelStopTrapCntl, h3cIKEGroups=h3cIKEGroups, h3cIKEAuthFailFailure=h3cIKEAuthFailFailure, h3cIKEGlobalOutNotifys=h3cIKEGlobalOutNotifys, h3cIKECompliances=h3cIKECompliances, h3cIKETunLifeTime=h3cIKETunLifeTime, h3cIKEGlobalInvalidSignFails=h3cIKEGlobalInvalidSignFails, h3cIKEGlobalCertTypeUnsuppFails=h3cIKEGlobalCertTypeUnsuppFails, h3cIKEGlobalInvalidIdFails=h3cIKEGlobalInvalidIdFails)
(object_identifier, integer, octet_string) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'Integer', 'OctetString') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (value_size_constraint, value_range_constraint, constraints_union, constraints_intersection, single_value_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueSizeConstraint', 'ValueRangeConstraint', 'ConstraintsUnion', 'ConstraintsIntersection', 'SingleValueConstraint') (h3c_common,) = mibBuilder.importSymbols('HUAWEI-3COM-OID-MIB', 'h3cCommon') (if_index,) = mibBuilder.importSymbols('IF-MIB', 'ifIndex') (object_group, notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'ObjectGroup', 'NotificationGroup', 'ModuleCompliance') (gauge32, bits, object_identity, integer32, time_ticks, module_identity, counter32, unsigned32, counter64, notification_type, mib_identifier, ip_address, mib_scalar, mib_table, mib_table_row, mib_table_column, iso) = mibBuilder.importSymbols('SNMPv2-SMI', 'Gauge32', 'Bits', 'ObjectIdentity', 'Integer32', 'TimeTicks', 'ModuleIdentity', 'Counter32', 'Unsigned32', 'Counter64', 'NotificationType', 'MibIdentifier', 'IpAddress', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'iso') (textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString') h3c_ike_monitor = module_identity((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30)) if mibBuilder.loadTexts: h3cIKEMonitor.setLastUpdated('200410260000Z') if mibBuilder.loadTexts: h3cIKEMonitor.setOrganization('Huawei-3COM Technologies Co., Ltd.') class H3Cikenegomode(TextualConvention, Integer32): status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(2, 4, 32)) named_values = named_values(('mainMode', 2), ('aggressiveMode', 4), ('quickMode', 32)) class H3Cikeauthmethod(TextualConvention, Integer32): status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 3)) named_values = named_values(('preSharedKey', 1), ('rsaSignatures', 3)) class H3Cdiffhellmangrp(TextualConvention, Integer32): status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 5, 14)) named_values = named_values(('modp768', 1), ('modp1024', 2), ('modp1536', 5), ('modp2048', 14)) class H3Cencryptalgo(TextualConvention, Integer32): status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10)) named_values = named_values(('none', 0), ('desCbc', 1), ('ideaCbc', 2), ('blowfishCbc', 3), ('rc5R16B64Cbc', 4), ('tripleDesCbc', 5), ('castCbc', 6), ('aesCbc', 7), ('aesCbc128', 8), ('aesCbc192', 9), ('aesCbc256', 10)) class H3Cauthalgo(TextualConvention, Integer32): status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2)) named_values = named_values(('none', 0), ('md5', 1), ('sha', 2)) class H3Csaprotocol(TextualConvention, Integer32): status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3, 4)) named_values = named_values(('reserved', 0), ('isakmp', 1), ('ah', 2), ('esp', 3), ('ipcomp', 4)) class H3Ctrapstatus(TextualConvention, Integer32): status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2)) named_values = named_values(('enabled', 1), ('disabled', 2)) class H3Cikeidtype(TextualConvention, Integer32): status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11)) named_values = named_values(('reserved', 0), ('ipv4Addr', 1), ('fqdn', 2), ('userFqdn', 3), ('ipv4AddrSubnet', 4), ('ipv6Addr', 5), ('ipv6AddrSubnet', 6), ('ipv4AddrRange', 7), ('ipv6AddrRange', 8), ('derAsn1Dn', 9), ('derAsn1Gn', 10), ('keyId', 11)) class H3Ctraffictype(TextualConvention, Integer32): status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 4, 5, 6, 7, 8)) named_values = named_values(('ipv4Addr', 1), ('ipv4AddrSubnet', 4), ('ipv6Addr', 5), ('ipv6AddrSubnet', 6), ('ipv4AddrRange', 7), ('ipv6AddrRange', 8)) class H3Ciketunnelstate(TextualConvention, Integer32): status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2)) named_values = named_values(('active', 1), ('timeout', 2)) h3c_ike_objects = mib_identifier((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1)) h3c_ike_tunnel_table = mib_table((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 1)) if mibBuilder.loadTexts: h3cIKETunnelTable.setStatus('current') h3c_ike_tunnel_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 1, 1)).setIndexNames((0, 'H3C-IKE-MONITOR-MIB', 'h3cIKETunIndex')) if mibBuilder.loadTexts: h3cIKETunnelEntry.setStatus('current') h3c_ike_tun_index = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647))) if mibBuilder.loadTexts: h3cIKETunIndex.setStatus('current') h3c_ike_tun_local_type = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 1, 1, 2), h3c_ikeid_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKETunLocalType.setStatus('current') h3c_ike_tun_local_value1 = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 1, 1, 3), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKETunLocalValue1.setStatus('current') h3c_ike_tun_local_value2 = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 1, 1, 4), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKETunLocalValue2.setStatus('current') h3c_ike_tun_local_addr = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 1, 1, 5), ip_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKETunLocalAddr.setStatus('current') h3c_ike_tun_remote_type = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 1, 1, 6), h3c_ikeid_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKETunRemoteType.setStatus('current') h3c_ike_tun_remote_value1 = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 1, 1, 7), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKETunRemoteValue1.setStatus('current') h3c_ike_tun_remote_value2 = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 1, 1, 8), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKETunRemoteValue2.setStatus('current') h3c_ike_tun_remote_addr = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 1, 1, 9), ip_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKETunRemoteAddr.setStatus('current') h3c_ike_tun_initiator = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 1, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('local', 1), ('remote', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKETunInitiator.setStatus('current') h3c_ike_tun_nego_mode = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 1, 1, 11), h3c_ike_nego_mode()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKETunNegoMode.setStatus('current') h3c_ike_tun_diff_hellman_grp = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 1, 1, 12), h3c_diff_hellman_grp()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKETunDiffHellmanGrp.setStatus('current') h3c_ike_tun_encrypt_algo = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 1, 1, 13), h3c_encrypt_algo()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKETunEncryptAlgo.setStatus('current') h3c_ike_tun_hash_algo = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 1, 1, 14), h3c_auth_algo()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKETunHashAlgo.setStatus('current') h3c_ike_tun_auth_method = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 1, 1, 15), h3c_ike_auth_method()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKETunAuthMethod.setStatus('current') h3c_ike_tun_life_time = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 1, 1, 16), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647))).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKETunLifeTime.setStatus('current') h3c_ike_tun_active_time = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 1, 1, 17), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647))).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKETunActiveTime.setStatus('current') h3c_ike_tun_remain_time = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 1, 1, 18), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647))).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKETunRemainTime.setStatus('current') h3c_ike_tun_total_refreshes = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 1, 1, 19), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKETunTotalRefreshes.setStatus('current') h3c_ike_tun_state = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 1, 1, 20), h3c_ike_tunnel_state()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKETunState.setStatus('current') h3c_ike_tun_dpd_interval_time = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 1, 1, 21), integer32().clone(10)).setUnits('second').setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKETunDpdIntervalTime.setStatus('current') h3c_ike_tun_dpd_time_out = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 1, 1, 22), integer32().clone(5)).setUnits('second').setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKETunDpdTimeOut.setStatus('current') h3c_ike_tunnel_stat_table = mib_table((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 2)) if mibBuilder.loadTexts: h3cIKETunnelStatTable.setStatus('current') h3c_ike_tunnel_stat_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 2, 1)).setIndexNames((0, 'H3C-IKE-MONITOR-MIB', 'h3cIKETunIndex')) if mibBuilder.loadTexts: h3cIKETunnelStatEntry.setStatus('current') h3c_ike_tun_in_octets = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 2, 1, 1), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKETunInOctets.setStatus('current') h3c_ike_tun_in_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 2, 1, 2), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKETunInPkts.setStatus('current') h3c_ike_tun_in_drop_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 2, 1, 3), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKETunInDropPkts.setStatus('current') h3c_ike_tun_in_p2_exchgs = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 2, 1, 4), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKETunInP2Exchgs.setStatus('current') h3c_ike_tun_in_p2_exchg_rejets = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 2, 1, 5), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKETunInP2ExchgRejets.setStatus('current') h3c_ike_tun_in_p2_sa_del_requests = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 2, 1, 6), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKETunInP2SaDelRequests.setStatus('current') h3c_ike_tun_in_p1_sa_del_requests = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 2, 1, 7), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKETunInP1SaDelRequests.setStatus('current') h3c_ike_tun_in_notifys = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 2, 1, 8), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKETunInNotifys.setStatus('current') h3c_ike_tun_out_octets = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 2, 1, 9), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKETunOutOctets.setStatus('current') h3c_ike_tun_out_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 2, 1, 10), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKETunOutPkts.setStatus('current') h3c_ike_tun_out_drop_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 2, 1, 11), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKETunOutDropPkts.setStatus('current') h3c_ike_tun_out_p2_exchgs = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 2, 1, 12), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKETunOutP2Exchgs.setStatus('current') h3c_ike_tun_out_p2_exchg_rejects = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 2, 1, 13), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKETunOutP2ExchgRejects.setStatus('current') h3c_ike_tun_out_p2_sa_del_requests = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 2, 1, 14), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKETunOutP2SaDelRequests.setStatus('current') h3c_ike_tun_out_p1_sa_del_requests = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 2, 1, 15), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKETunOutP1SaDelRequests.setStatus('current') h3c_ike_tun_out_notifys = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 2, 1, 16), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKETunOutNotifys.setStatus('current') h3c_ike_global_stats = mib_identifier((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3)) h3c_ike_global_active_tunnels = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 1), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKEGlobalActiveTunnels.setStatus('current') h3c_ike_global_in_octets = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 2), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKEGlobalInOctets.setStatus('current') h3c_ike_global_in_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 3), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKEGlobalInPkts.setStatus('current') h3c_ike_global_in_drop_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 4), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKEGlobalInDropPkts.setStatus('current') h3c_ike_global_in_p2_exchgs = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 5), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKEGlobalInP2Exchgs.setStatus('current') h3c_ike_global_in_p2_exchg_rejects = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 6), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKEGlobalInP2ExchgRejects.setStatus('current') h3c_ike_global_in_p2_sa_del_requests = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 7), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKEGlobalInP2SaDelRequests.setStatus('current') h3c_ike_global_in_notifys = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 8), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKEGlobalInNotifys.setStatus('current') h3c_ike_global_out_octets = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 9), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKEGlobalOutOctets.setStatus('current') h3c_ike_global_out_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 10), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKEGlobalOutPkts.setStatus('current') h3c_ike_global_out_drop_pkts = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 11), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKEGlobalOutDropPkts.setStatus('current') h3c_ike_global_out_p2_exchgs = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 12), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKEGlobalOutP2Exchgs.setStatus('current') h3c_ike_global_out_p2_exchg_rejects = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 13), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKEGlobalOutP2ExchgRejects.setStatus('current') h3c_ike_global_out_p2_sa_del_requests = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 14), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKEGlobalOutP2SaDelRequests.setStatus('current') h3c_ike_global_out_notifys = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 15), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKEGlobalOutNotifys.setStatus('current') h3c_ike_global_init_tunnels = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 16), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKEGlobalInitTunnels.setStatus('current') h3c_ike_global_init_tunnel_fails = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 17), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKEGlobalInitTunnelFails.setStatus('current') h3c_ike_global_resp_tunnels = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 18), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKEGlobalRespTunnels.setStatus('current') h3c_ike_global_resp_tunnel_fails = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 19), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKEGlobalRespTunnelFails.setStatus('current') h3c_ike_global_auth_fails = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 20), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKEGlobalAuthFails.setStatus('current') h3c_ike_global_no_sa_fails = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 21), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKEGlobalNoSaFails.setStatus('current') h3c_ike_global_invalid_cookie_fails = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 22), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKEGlobalInvalidCookieFails.setStatus('current') h3c_ike_global_attr_not_supp_fails = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 23), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKEGlobalAttrNotSuppFails.setStatus('current') h3c_ike_global_no_proposal_chosen_fails = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 24), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKEGlobalNoProposalChosenFails.setStatus('current') h3c_ike_global_unsport_exch_type_fails = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 25), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKEGlobalUnsportExchTypeFails.setStatus('current') h3c_ike_global_invalid_id_fails = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 26), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKEGlobalInvalidIdFails.setStatus('current') h3c_ike_global_invalid_pro_fails = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 27), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKEGlobalInvalidProFails.setStatus('current') h3c_ike_global_cert_type_unsupp_fails = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 28), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKEGlobalCertTypeUnsuppFails.setStatus('current') h3c_ike_global_invalid_cert_auth_fails = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 29), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKEGlobalInvalidCertAuthFails.setStatus('current') h3c_ike_global_invalid_sign_fails = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 30), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKEGlobalInvalidSignFails.setStatus('current') h3c_ike_global_cert_unavailable_fails = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 3, 31), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cIKEGlobalCertUnavailableFails.setStatus('current') h3c_ike_trap_object = mib_identifier((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 4)) h3c_ike_proposal_number = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 4, 1), integer32()).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: h3cIKEProposalNumber.setStatus('current') h3c_ike_proposal_size = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 4, 2), integer32()).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: h3cIKEProposalSize.setStatus('current') h3c_ike_id_information = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 4, 3), display_string()).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: h3cIKEIdInformation.setStatus('current') h3c_ike_protocol_num = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 4, 4), integer32()).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: h3cIKEProtocolNum.setStatus('current') h3c_ike_cert_information = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 4, 5), display_string()).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: h3cIKECertInformation.setStatus('current') h3c_ike_trap_cntl = mib_identifier((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 5)) h3c_ike_trap_global_cntl = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 5, 1), h3c_trap_status()).setMaxAccess('readwrite') if mibBuilder.loadTexts: h3cIKETrapGlobalCntl.setStatus('current') h3c_ike_tunnel_start_trap_cntl = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 5, 2), h3c_trap_status()).setMaxAccess('readwrite') if mibBuilder.loadTexts: h3cIKETunnelStartTrapCntl.setStatus('current') h3c_ike_tunnel_stop_trap_cntl = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 5, 3), h3c_trap_status()).setMaxAccess('readwrite') if mibBuilder.loadTexts: h3cIKETunnelStopTrapCntl.setStatus('current') h3c_ike_no_sa_trap_cntl = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 5, 4), h3c_trap_status()).setMaxAccess('readwrite') if mibBuilder.loadTexts: h3cIKENoSaTrapCntl.setStatus('current') h3c_ike_encry_failure_trap_cntl = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 5, 5), h3c_trap_status()).setMaxAccess('readwrite') if mibBuilder.loadTexts: h3cIKEEncryFailureTrapCntl.setStatus('current') h3c_ike_decry_failure_trap_cntl = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 5, 6), h3c_trap_status()).setMaxAccess('readwrite') if mibBuilder.loadTexts: h3cIKEDecryFailureTrapCntl.setStatus('current') h3c_ike_invalid_proposal_trap_cntl = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 5, 7), h3c_trap_status()).setMaxAccess('readwrite') if mibBuilder.loadTexts: h3cIKEInvalidProposalTrapCntl.setStatus('current') h3c_ike_auth_fail_trap_cntl = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 5, 8), h3c_trap_status()).setMaxAccess('readwrite') if mibBuilder.loadTexts: h3cIKEAuthFailTrapCntl.setStatus('current') h3c_ike_invalid_cookie_trap_cntl = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 5, 9), h3c_trap_status()).setMaxAccess('readwrite') if mibBuilder.loadTexts: h3cIKEInvalidCookieTrapCntl.setStatus('current') h3c_ike_invalid_spi_trap_cntl = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 5, 10), h3c_trap_status()).setMaxAccess('readwrite') if mibBuilder.loadTexts: h3cIKEInvalidSpiTrapCntl.setStatus('current') h3c_ike_attr_not_supp_trap_cntl = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 5, 11), h3c_trap_status()).setMaxAccess('readwrite') if mibBuilder.loadTexts: h3cIKEAttrNotSuppTrapCntl.setStatus('current') h3c_ike_unsport_exch_type_trap_cntl = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 5, 12), h3c_trap_status()).setMaxAccess('readwrite') if mibBuilder.loadTexts: h3cIKEUnsportExchTypeTrapCntl.setStatus('current') h3c_ike_invalid_id_trap_cntl = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 5, 13), h3c_trap_status()).setMaxAccess('readwrite') if mibBuilder.loadTexts: h3cIKEInvalidIdTrapCntl.setStatus('current') h3c_ike_invalid_protocol_trap_cntl = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 5, 14), h3c_trap_status()).setMaxAccess('readwrite') if mibBuilder.loadTexts: h3cIKEInvalidProtocolTrapCntl.setStatus('current') h3c_ike_cert_type_unsupp_trap_cntl = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 5, 15), h3c_trap_status()).setMaxAccess('readwrite') if mibBuilder.loadTexts: h3cIKECertTypeUnsuppTrapCntl.setStatus('current') h3c_ike_invalid_cert_auth_trap_cntl = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 5, 16), h3c_trap_status()).setMaxAccess('readwrite') if mibBuilder.loadTexts: h3cIKEInvalidCertAuthTrapCntl.setStatus('current') h3c_ike_invalid_sign_trap_cntl = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 5, 17), h3c_trap_status()).setMaxAccess('readwrite') if mibBuilder.loadTexts: h3cIKEInvalidSignTrapCntl.setStatus('current') h3c_ike_cert_unavailable_trap_cntl = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 5, 18), h3c_trap_status()).setMaxAccess('readwrite') if mibBuilder.loadTexts: h3cIKECertUnavailableTrapCntl.setStatus('current') h3c_ike_proposal_add_trap_cntl = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 5, 19), h3c_trap_status()).setMaxAccess('readwrite') if mibBuilder.loadTexts: h3cIKEProposalAddTrapCntl.setStatus('current') h3c_ike_proposal_del_trap_cntl = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 5, 20), h3c_trap_status()).setMaxAccess('readwrite') if mibBuilder.loadTexts: h3cIKEProposalDelTrapCntl.setStatus('current') h3c_ike_trap = mib_identifier((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 6)) h3c_ike_notifications = mib_identifier((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 6, 1)) h3c_ike_tunnel_start = notification_type((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 6, 1, 1)).setObjects(('H3C-IKE-MONITOR-MIB', 'h3cIKETunLocalAddr'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunRemoteAddr'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunLifeTime')) if mibBuilder.loadTexts: h3cIKETunnelStart.setStatus('current') h3c_ike_tunnel_stop = notification_type((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 6, 1, 2)).setObjects(('H3C-IKE-MONITOR-MIB', 'h3cIKETunLocalAddr'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunRemoteAddr'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunActiveTime')) if mibBuilder.loadTexts: h3cIKETunnelStop.setStatus('current') h3c_ike_no_sa_failure = notification_type((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 6, 1, 3)).setObjects(('H3C-IKE-MONITOR-MIB', 'h3cIKETunLocalAddr'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunRemoteAddr')) if mibBuilder.loadTexts: h3cIKENoSaFailure.setStatus('current') h3c_ike_encry_fail_failure = notification_type((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 6, 1, 4)).setObjects(('H3C-IKE-MONITOR-MIB', 'h3cIKETunLocalAddr'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunRemoteAddr')) if mibBuilder.loadTexts: h3cIKEEncryFailFailure.setStatus('current') h3c_ike_decry_fail_failure = notification_type((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 6, 1, 5)).setObjects(('H3C-IKE-MONITOR-MIB', 'h3cIKETunLocalAddr'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunRemoteAddr')) if mibBuilder.loadTexts: h3cIKEDecryFailFailure.setStatus('current') h3c_ike_invalid_proposal_failure = notification_type((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 6, 1, 6)).setObjects(('H3C-IKE-MONITOR-MIB', 'h3cIKETunLocalAddr'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunRemoteAddr')) if mibBuilder.loadTexts: h3cIKEInvalidProposalFailure.setStatus('current') h3c_ike_auth_fail_failure = notification_type((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 6, 1, 7)).setObjects(('H3C-IKE-MONITOR-MIB', 'h3cIKETunLocalAddr'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunRemoteAddr')) if mibBuilder.loadTexts: h3cIKEAuthFailFailure.setStatus('current') h3c_ike_invalid_cookie_failure = notification_type((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 6, 1, 8)).setObjects(('H3C-IKE-MONITOR-MIB', 'h3cIKETunLocalAddr'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunRemoteAddr')) if mibBuilder.loadTexts: h3cIKEInvalidCookieFailure.setStatus('current') h3c_ike_attr_not_supp_failure = notification_type((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 6, 1, 9)).setObjects(('H3C-IKE-MONITOR-MIB', 'h3cIKETunLocalAddr'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunRemoteAddr')) if mibBuilder.loadTexts: h3cIKEAttrNotSuppFailure.setStatus('current') h3c_ike_unsport_exch_type_failure = notification_type((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 6, 1, 10)).setObjects(('H3C-IKE-MONITOR-MIB', 'h3cIKETunLocalAddr'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunRemoteAddr')) if mibBuilder.loadTexts: h3cIKEUnsportExchTypeFailure.setStatus('current') h3c_ike_invalid_id_failure = notification_type((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 6, 1, 11)).setObjects(('H3C-IKE-MONITOR-MIB', 'h3cIKETunLocalAddr'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunRemoteAddr'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEIdInformation')) if mibBuilder.loadTexts: h3cIKEInvalidIdFailure.setStatus('current') h3c_ike_invalid_protocol_failure = notification_type((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 6, 1, 12)).setObjects(('H3C-IKE-MONITOR-MIB', 'h3cIKETunLocalAddr'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunRemoteAddr'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEProtocolNum')) if mibBuilder.loadTexts: h3cIKEInvalidProtocolFailure.setStatus('current') h3c_ike_cert_type_unsupp_failure = notification_type((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 6, 1, 13)).setObjects(('H3C-IKE-MONITOR-MIB', 'h3cIKETunLocalAddr'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunRemoteAddr'), ('H3C-IKE-MONITOR-MIB', 'h3cIKECertInformation')) if mibBuilder.loadTexts: h3cIKECertTypeUnsuppFailure.setStatus('current') h3c_ike_invalid_cert_auth_failure = notification_type((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 6, 1, 14)).setObjects(('H3C-IKE-MONITOR-MIB', 'h3cIKETunLocalAddr'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunRemoteAddr'), ('H3C-IKE-MONITOR-MIB', 'h3cIKECertInformation')) if mibBuilder.loadTexts: h3cIKEInvalidCertAuthFailure.setStatus('current') h3c_ik_el_invalid_sign_failure = notification_type((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 6, 1, 15)).setObjects(('H3C-IKE-MONITOR-MIB', 'h3cIKETunLocalAddr'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunRemoteAddr'), ('H3C-IKE-MONITOR-MIB', 'h3cIKECertInformation')) if mibBuilder.loadTexts: h3cIKElInvalidSignFailure.setStatus('current') h3c_ike_cert_unavailable_failure = notification_type((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 6, 1, 16)).setObjects(('H3C-IKE-MONITOR-MIB', 'h3cIKETunLocalAddr'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunRemoteAddr'), ('H3C-IKE-MONITOR-MIB', 'h3cIKECertInformation')) if mibBuilder.loadTexts: h3cIKECertUnavailableFailure.setStatus('current') h3c_ike_proposal_add = notification_type((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 6, 1, 17)).setObjects(('H3C-IKE-MONITOR-MIB', 'h3cIKEProposalNumber'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEProposalSize')) if mibBuilder.loadTexts: h3cIKEProposalAdd.setStatus('current') h3c_ike_proposal_del = notification_type((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 1, 6, 1, 18)).setObjects(('H3C-IKE-MONITOR-MIB', 'h3cIKEProposalNumber'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEProposalSize')) if mibBuilder.loadTexts: h3cIKEProposalDel.setStatus('current') h3c_ike_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 2)) h3c_ike_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 2, 1)) h3c_ike_groups = mib_identifier((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 2, 2)) h3c_ike_compliance = module_compliance((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 2, 1, 1)).setObjects(('H3C-IKE-MONITOR-MIB', 'h3cIKETunnelTableGroup'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunnelStatTableGroup'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEGlobalStatsGroup'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETrapObjectGroup'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETrapCntlGroup'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETrapGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): h3c_ike_compliance = h3cIKECompliance.setStatus('current') h3c_ike_tunnel_table_group = object_group((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 2, 2, 1)).setObjects(('H3C-IKE-MONITOR-MIB', 'h3cIKETunLocalType'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunLocalValue1'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunLocalValue2'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunLocalAddr'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunRemoteType'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunRemoteValue1'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunRemoteValue2'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunRemoteAddr'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunInitiator'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunNegoMode'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunDiffHellmanGrp'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunEncryptAlgo'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunHashAlgo'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunAuthMethod'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunLifeTime'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunActiveTime'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunRemainTime'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunTotalRefreshes'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunState'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunDpdIntervalTime'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunDpdTimeOut')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): h3c_ike_tunnel_table_group = h3cIKETunnelTableGroup.setStatus('current') h3c_ike_tunnel_stat_table_group = object_group((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 2, 2, 2)).setObjects(('H3C-IKE-MONITOR-MIB', 'h3cIKETunInOctets'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunInPkts'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunInDropPkts'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunInP2Exchgs'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunInP2ExchgRejets'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunInP2SaDelRequests'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunInP1SaDelRequests'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunInNotifys'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunOutOctets'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunOutPkts'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunOutDropPkts'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunOutP2Exchgs'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunOutP2ExchgRejects'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunOutP2SaDelRequests'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunOutP1SaDelRequests'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunOutNotifys')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): h3c_ike_tunnel_stat_table_group = h3cIKETunnelStatTableGroup.setStatus('current') h3c_ike_global_stats_group = object_group((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 2, 2, 3)).setObjects(('H3C-IKE-MONITOR-MIB', 'h3cIKEGlobalActiveTunnels'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEGlobalInOctets'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEGlobalInPkts'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEGlobalInDropPkts'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEGlobalInP2Exchgs'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEGlobalInP2ExchgRejects'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEGlobalInP2SaDelRequests'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEGlobalInNotifys'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEGlobalOutOctets'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEGlobalOutPkts'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEGlobalOutDropPkts'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEGlobalOutP2Exchgs'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEGlobalOutP2ExchgRejects'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEGlobalOutP2SaDelRequests'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEGlobalOutNotifys'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEGlobalInitTunnels'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEGlobalInitTunnelFails'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEGlobalRespTunnels'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEGlobalRespTunnelFails'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEGlobalAuthFails'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEGlobalNoSaFails'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEGlobalInvalidCookieFails'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEGlobalAttrNotSuppFails'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEGlobalNoProposalChosenFails'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEGlobalUnsportExchTypeFails'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEGlobalInvalidIdFails'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEGlobalInvalidProFails'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEGlobalCertTypeUnsuppFails'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEGlobalInvalidCertAuthFails'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEGlobalInvalidSignFails'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEGlobalCertUnavailableFails')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): h3c_ike_global_stats_group = h3cIKEGlobalStatsGroup.setStatus('current') h3c_ike_trap_object_group = object_group((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 2, 2, 4)).setObjects(('H3C-IKE-MONITOR-MIB', 'h3cIKEProposalNumber'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEProposalSize'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEIdInformation'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEProtocolNum'), ('H3C-IKE-MONITOR-MIB', 'h3cIKECertInformation')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): h3c_ike_trap_object_group = h3cIKETrapObjectGroup.setStatus('current') h3c_ike_trap_cntl_group = object_group((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 2, 2, 5)).setObjects(('H3C-IKE-MONITOR-MIB', 'h3cIKETrapGlobalCntl'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunnelStartTrapCntl'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunnelStopTrapCntl'), ('H3C-IKE-MONITOR-MIB', 'h3cIKENoSaTrapCntl'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEEncryFailureTrapCntl'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEDecryFailureTrapCntl'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEInvalidProposalTrapCntl'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEAuthFailTrapCntl'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEInvalidCookieTrapCntl'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEInvalidSpiTrapCntl'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEAttrNotSuppTrapCntl'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEUnsportExchTypeTrapCntl'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEInvalidIdTrapCntl'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEInvalidProtocolTrapCntl'), ('H3C-IKE-MONITOR-MIB', 'h3cIKECertTypeUnsuppTrapCntl'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEInvalidCertAuthTrapCntl'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEInvalidSignTrapCntl'), ('H3C-IKE-MONITOR-MIB', 'h3cIKECertUnavailableTrapCntl'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEProposalAddTrapCntl'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEProposalDelTrapCntl')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): h3c_ike_trap_cntl_group = h3cIKETrapCntlGroup.setStatus('current') h3c_ike_trap_group = notification_group((1, 3, 6, 1, 4, 1, 2011, 10, 2, 30, 2, 2, 6)).setObjects(('H3C-IKE-MONITOR-MIB', 'h3cIKETunnelStart'), ('H3C-IKE-MONITOR-MIB', 'h3cIKETunnelStop'), ('H3C-IKE-MONITOR-MIB', 'h3cIKENoSaFailure'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEEncryFailFailure'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEDecryFailFailure'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEInvalidProposalFailure'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEAuthFailFailure'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEInvalidCookieFailure'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEAttrNotSuppFailure'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEUnsportExchTypeFailure'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEInvalidIdFailure'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEInvalidProtocolFailure'), ('H3C-IKE-MONITOR-MIB', 'h3cIKECertTypeUnsuppFailure'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEInvalidCertAuthFailure'), ('H3C-IKE-MONITOR-MIB', 'h3cIKElInvalidSignFailure'), ('H3C-IKE-MONITOR-MIB', 'h3cIKECertUnavailableFailure'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEProposalAdd'), ('H3C-IKE-MONITOR-MIB', 'h3cIKEProposalDel')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): h3c_ike_trap_group = h3cIKETrapGroup.setStatus('current') mibBuilder.exportSymbols('H3C-IKE-MONITOR-MIB', h3cIKEGlobalInitTunnelFails=h3cIKEGlobalInitTunnelFails, h3cIKEAttrNotSuppFailure=h3cIKEAttrNotSuppFailure, h3cIKEGlobalCertUnavailableFails=h3cIKEGlobalCertUnavailableFails, h3cIKETunInitiator=h3cIKETunInitiator, h3cIKETunnelStatEntry=h3cIKETunnelStatEntry, h3cIKEGlobalOutDropPkts=h3cIKEGlobalOutDropPkts, h3cIKEGlobalInvalidCertAuthFails=h3cIKEGlobalInvalidCertAuthFails, h3cIKEProposalAddTrapCntl=h3cIKEProposalAddTrapCntl, h3cIKEInvalidProtocolTrapCntl=h3cIKEInvalidProtocolTrapCntl, h3cIKETunnelTable=h3cIKETunnelTable, h3cIKETunInPkts=h3cIKETunInPkts, h3cIKECertTypeUnsuppFailure=h3cIKECertTypeUnsuppFailure, h3cIKETrapCntlGroup=h3cIKETrapCntlGroup, h3cIKEGlobalInP2ExchgRejects=h3cIKEGlobalInP2ExchgRejects, h3cIKETunIndex=h3cIKETunIndex, H3cTrapStatus=H3cTrapStatus, h3cIKETunRemainTime=h3cIKETunRemainTime, h3cIKENoSaFailure=h3cIKENoSaFailure, h3cIKEGlobalAttrNotSuppFails=h3cIKEGlobalAttrNotSuppFails, h3cIKETunnelStop=h3cIKETunnelStop, H3cIKETunnelState=H3cIKETunnelState, H3cTrafficType=H3cTrafficType, h3cIKEConformance=h3cIKEConformance, h3cIKENotifications=h3cIKENotifications, h3cIKEGlobalOutOctets=h3cIKEGlobalOutOctets, h3cIKElInvalidSignFailure=h3cIKElInvalidSignFailure, PYSNMP_MODULE_ID=h3cIKEMonitor, h3cIKETunLocalValue2=h3cIKETunLocalValue2, h3cIKEInvalidCertAuthFailure=h3cIKEInvalidCertAuthFailure, h3cIKETunInP2SaDelRequests=h3cIKETunInP2SaDelRequests, h3cIKEGlobalInitTunnels=h3cIKEGlobalInitTunnels, h3cIKEProtocolNum=h3cIKEProtocolNum, h3cIKEInvalidProposalTrapCntl=h3cIKEInvalidProposalTrapCntl, h3cIKETunTotalRefreshes=h3cIKETunTotalRefreshes, h3cIKETunState=h3cIKETunState, h3cIKETrapCntl=h3cIKETrapCntl, h3cIKEAttrNotSuppTrapCntl=h3cIKEAttrNotSuppTrapCntl, h3cIKETrap=h3cIKETrap, h3cIKEGlobalInPkts=h3cIKEGlobalInPkts, h3cIKEInvalidCookieTrapCntl=h3cIKEInvalidCookieTrapCntl, h3cIKETunHashAlgo=h3cIKETunHashAlgo, h3cIKEUnsportExchTypeFailure=h3cIKEUnsportExchTypeFailure, H3cIKENegoMode=H3cIKENegoMode, h3cIKEInvalidProposalFailure=h3cIKEInvalidProposalFailure, h3cIKETunAuthMethod=h3cIKETunAuthMethod, h3cIKEGlobalRespTunnels=h3cIKEGlobalRespTunnels, h3cIKETunnelEntry=h3cIKETunnelEntry, h3cIKEProposalNumber=h3cIKEProposalNumber, h3cIKETrapObjectGroup=h3cIKETrapObjectGroup, H3cDiffHellmanGrp=H3cDiffHellmanGrp, h3cIKETunOutPkts=h3cIKETunOutPkts, h3cIKETunnelStart=h3cIKETunnelStart, h3cIKEInvalidSignTrapCntl=h3cIKEInvalidSignTrapCntl, h3cIKEInvalidCertAuthTrapCntl=h3cIKEInvalidCertAuthTrapCntl, h3cIKETunInNotifys=h3cIKETunInNotifys, h3cIKETrapGroup=h3cIKETrapGroup, h3cIKEGlobalStatsGroup=h3cIKEGlobalStatsGroup, h3cIKEGlobalActiveTunnels=h3cIKEGlobalActiveTunnels, h3cIKEGlobalOutPkts=h3cIKEGlobalOutPkts, h3cIKEMonitor=h3cIKEMonitor, h3cIKETunInOctets=h3cIKETunInOctets, h3cIKETunInDropPkts=h3cIKETunInDropPkts, h3cIKEAuthFailTrapCntl=h3cIKEAuthFailTrapCntl, h3cIKETunRemoteValue2=h3cIKETunRemoteValue2, h3cIKEProposalDelTrapCntl=h3cIKEProposalDelTrapCntl, h3cIKENoSaTrapCntl=h3cIKENoSaTrapCntl, h3cIKEGlobalNoSaFails=h3cIKEGlobalNoSaFails, h3cIKEGlobalOutP2SaDelRequests=h3cIKEGlobalOutP2SaDelRequests, h3cIKEGlobalStats=h3cIKEGlobalStats, h3cIKETunOutP1SaDelRequests=h3cIKETunOutP1SaDelRequests, h3cIKEProposalSize=h3cIKEProposalSize, h3cIKEEncryFailureTrapCntl=h3cIKEEncryFailureTrapCntl, h3cIKECertInformation=h3cIKECertInformation, h3cIKETrapObject=h3cIKETrapObject, h3cIKETunOutP2SaDelRequests=h3cIKETunOutP2SaDelRequests, h3cIKEDecryFailureTrapCntl=h3cIKEDecryFailureTrapCntl, h3cIKEProposalDel=h3cIKEProposalDel, h3cIKECertUnavailableFailure=h3cIKECertUnavailableFailure, h3cIKECertTypeUnsuppTrapCntl=h3cIKECertTypeUnsuppTrapCntl, h3cIKEObjects=h3cIKEObjects, h3cIKETunDpdTimeOut=h3cIKETunDpdTimeOut, h3cIKEGlobalAuthFails=h3cIKEGlobalAuthFails, h3cIKETunDpdIntervalTime=h3cIKETunDpdIntervalTime, h3cIKETunInP2ExchgRejets=h3cIKETunInP2ExchgRejets, h3cIKETunRemoteAddr=h3cIKETunRemoteAddr, h3cIKETunInP2Exchgs=h3cIKETunInP2Exchgs, h3cIKETunOutP2ExchgRejects=h3cIKETunOutP2ExchgRejects, h3cIKEGlobalNoProposalChosenFails=h3cIKEGlobalNoProposalChosenFails, h3cIKEEncryFailFailure=h3cIKEEncryFailFailure, h3cIKETunLocalType=h3cIKETunLocalType, H3cIKEAuthMethod=H3cIKEAuthMethod, h3cIKEInvalidCookieFailure=h3cIKEInvalidCookieFailure, h3cIKETunnelStatTable=h3cIKETunnelStatTable, h3cIKEDecryFailFailure=h3cIKEDecryFailFailure, h3cIKETunNegoMode=h3cIKETunNegoMode, h3cIKEGlobalInDropPkts=h3cIKEGlobalInDropPkts, H3cIKEIDType=H3cIKEIDType, H3cAuthAlgo=H3cAuthAlgo, h3cIKEInvalidIdTrapCntl=h3cIKEInvalidIdTrapCntl, h3cIKETunLocalValue1=h3cIKETunLocalValue1, h3cIKETunEncryptAlgo=h3cIKETunEncryptAlgo, h3cIKETunActiveTime=h3cIKETunActiveTime, h3cIKETunDiffHellmanGrp=h3cIKETunDiffHellmanGrp, h3cIKETunnelStatTableGroup=h3cIKETunnelStatTableGroup, h3cIKEGlobalRespTunnelFails=h3cIKEGlobalRespTunnelFails, h3cIKEGlobalInvalidCookieFails=h3cIKEGlobalInvalidCookieFails, h3cIKEIdInformation=h3cIKEIdInformation, h3cIKEInvalidSpiTrapCntl=h3cIKEInvalidSpiTrapCntl, h3cIKEGlobalOutP2Exchgs=h3cIKEGlobalOutP2Exchgs, h3cIKEGlobalInNotifys=h3cIKEGlobalInNotifys, h3cIKEGlobalOutP2ExchgRejects=h3cIKEGlobalOutP2ExchgRejects, h3cIKETunOutP2Exchgs=h3cIKETunOutP2Exchgs, h3cIKEGlobalInvalidProFails=h3cIKEGlobalInvalidProFails, h3cIKEProposalAdd=h3cIKEProposalAdd, h3cIKETunRemoteType=h3cIKETunRemoteType, h3cIKETunOutOctets=h3cIKETunOutOctets, h3cIKETunOutDropPkts=h3cIKETunOutDropPkts, h3cIKEInvalidProtocolFailure=h3cIKEInvalidProtocolFailure, H3cEncryptAlgo=H3cEncryptAlgo, h3cIKECertUnavailableTrapCntl=h3cIKECertUnavailableTrapCntl, h3cIKEUnsportExchTypeTrapCntl=h3cIKEUnsportExchTypeTrapCntl, H3cSaProtocol=H3cSaProtocol, h3cIKETunInP1SaDelRequests=h3cIKETunInP1SaDelRequests, h3cIKEInvalidIdFailure=h3cIKEInvalidIdFailure, h3cIKEGlobalInOctets=h3cIKEGlobalInOctets, h3cIKEGlobalInP2SaDelRequests=h3cIKEGlobalInP2SaDelRequests, h3cIKETrapGlobalCntl=h3cIKETrapGlobalCntl, h3cIKETunOutNotifys=h3cIKETunOutNotifys, h3cIKECompliance=h3cIKECompliance, h3cIKEGlobalUnsportExchTypeFails=h3cIKEGlobalUnsportExchTypeFails, h3cIKETunnelTableGroup=h3cIKETunnelTableGroup, h3cIKETunnelStartTrapCntl=h3cIKETunnelStartTrapCntl, h3cIKETunLocalAddr=h3cIKETunLocalAddr, h3cIKETunRemoteValue1=h3cIKETunRemoteValue1, h3cIKEGlobalInP2Exchgs=h3cIKEGlobalInP2Exchgs, h3cIKETunnelStopTrapCntl=h3cIKETunnelStopTrapCntl, h3cIKEGroups=h3cIKEGroups, h3cIKEAuthFailFailure=h3cIKEAuthFailFailure, h3cIKEGlobalOutNotifys=h3cIKEGlobalOutNotifys, h3cIKECompliances=h3cIKECompliances, h3cIKETunLifeTime=h3cIKETunLifeTime, h3cIKEGlobalInvalidSignFails=h3cIKEGlobalInvalidSignFails, h3cIKEGlobalCertTypeUnsuppFails=h3cIKEGlobalCertTypeUnsuppFails, h3cIKEGlobalInvalidIdFails=h3cIKEGlobalInvalidIdFails)
print("Hello World") print("Hello again.\n") print("Hello BCC!") print("My name is Andy.\n") print("single 'quotes' <-- in double quotes") print('double "quotes" <-- in single quotes\n') print("Python docs @ --> https://docs/python.org/3") print("Type --> python3 ex1.py <-- in terminal to run this program.\n") # print("If you're reading this, it's because I un-commented the line.")
print('Hello World') print('Hello again.\n') print('Hello BCC!') print('My name is Andy.\n') print("single 'quotes' <-- in double quotes") print('double "quotes" <-- in single quotes\n') print('Python docs @ --> https://docs/python.org/3') print('Type --> python3 ex1.py <-- in terminal to run this program.\n')
# # PySNMP MIB module Wellfleet-QOS-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Wellfleet-QOS-MIB # Produced by pysmi-0.3.4 at Wed May 1 15:41:23 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsUnion, ConstraintsIntersection, ValueSizeConstraint, SingleValueConstraint, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "ConstraintsIntersection", "ValueSizeConstraint", "SingleValueConstraint", "ValueRangeConstraint") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") TimeTicks, Integer32, MibIdentifier, ModuleIdentity, iso, ObjectIdentity, Counter64, NotificationType, Gauge32, IpAddress, MibScalar, MibTable, MibTableRow, MibTableColumn, Unsigned32, Counter32, Bits = mibBuilder.importSymbols("SNMPv2-SMI", "TimeTicks", "Integer32", "MibIdentifier", "ModuleIdentity", "iso", "ObjectIdentity", "Counter64", "NotificationType", "Gauge32", "IpAddress", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Unsigned32", "Counter32", "Bits") DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") wfServicePkgGroup, = mibBuilder.importSymbols("Wellfleet-COMMON-MIB", "wfServicePkgGroup") wfQosServPkgTable = MibTable((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 1), ) if mibBuilder.loadTexts: wfQosServPkgTable.setStatus('mandatory') if mibBuilder.loadTexts: wfQosServPkgTable.setDescription('This file describes the MIBS for managing Qos Templates') wfQosServPkgEntry = MibTableRow((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 1, 1), ).setIndexNames((0, "Wellfleet-QOS-MIB", "wfQosServPkgIndex")) if mibBuilder.loadTexts: wfQosServPkgEntry.setStatus('mandatory') if mibBuilder.loadTexts: wfQosServPkgEntry.setDescription('An entry in the Qos Base table') wfQosServPkgDelete = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 1, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("created", 1), ("deleted", 2))).clone('created')).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfQosServPkgDelete.setStatus('mandatory') if mibBuilder.loadTexts: wfQosServPkgDelete.setDescription('Create/Delete parameter') wfQosServPkgIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 1, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfQosServPkgIndex.setStatus('mandatory') if mibBuilder.loadTexts: wfQosServPkgIndex.setDescription('Instance ID, filled in by driver') wfQosServPkgServiceName = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 1, 1, 3), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfQosServPkgServiceName.setStatus('mandatory') if mibBuilder.loadTexts: wfQosServPkgServiceName.setDescription('Service Name given to this template') wfQosServPkgScheduling = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("round-robin", 1), ("strict-priority", 2))).clone('round-robin')).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfQosServPkgScheduling.setStatus('mandatory') if mibBuilder.loadTexts: wfQosServPkgScheduling.setDescription('Selects the scheduling method, Round Robbin or Strict Priority, to service the Tx Queues. In Round Robbin, each Queue is serviced according to the weights applied in the Queue Mib. In Strict Priority, the highest priority Queue with data is serviced.') wfQosServPkgNumQueues = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 1, 1, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfQosServPkgNumQueues.setStatus('mandatory') if mibBuilder.loadTexts: wfQosServPkgNumQueues.setDescription('Number of queues configured for this queue package') wfQosServPkgNumLines = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 1, 1, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfQosServPkgNumLines.setStatus('mandatory') if mibBuilder.loadTexts: wfQosServPkgNumLines.setDescription('Number of lines using this queue package') wfQosServPkgQueCfgTable = MibTable((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 2), ) if mibBuilder.loadTexts: wfQosServPkgQueCfgTable.setStatus('mandatory') if mibBuilder.loadTexts: wfQosServPkgQueCfgTable.setDescription('This file describes the MIBS for managing Qos Templates') wfQosServPkgQueCfgEntry = MibTableRow((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 2, 1), ).setIndexNames((0, "Wellfleet-QOS-MIB", "wfQosServPkgQueCfgServiceIndex"), (0, "Wellfleet-QOS-MIB", "wfQosServPkgQueCfgQueueIndex")) if mibBuilder.loadTexts: wfQosServPkgQueCfgEntry.setStatus('mandatory') if mibBuilder.loadTexts: wfQosServPkgQueCfgEntry.setDescription('An entry in the Qos Base table') wfQosServPkgQueCfgDelete = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 2, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("created", 1), ("deleted", 2))).clone('created')).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfQosServPkgQueCfgDelete.setStatus('mandatory') if mibBuilder.loadTexts: wfQosServPkgQueCfgDelete.setDescription('Create/Delete parameter') wfQosServPkgQueCfgServiceIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 2, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfQosServPkgQueCfgServiceIndex.setStatus('mandatory') if mibBuilder.loadTexts: wfQosServPkgQueCfgServiceIndex.setDescription('Instance Service ID, filled in by driver') wfQosServPkgQueCfgQueueIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 2, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfQosServPkgQueCfgQueueIndex.setStatus('mandatory') if mibBuilder.loadTexts: wfQosServPkgQueCfgQueueIndex.setDescription('Instance Queue ID, filled in by driver') wfQosServPkgQueCfgQueueName = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 2, 1, 4), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfQosServPkgQueCfgQueueName.setStatus('mandatory') if mibBuilder.loadTexts: wfQosServPkgQueCfgQueueName.setDescription('Queue Name given to this template') wfQosServPkgQueCfgState = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 2, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("up", 1), ("waitPkg", 2), ("misCfg", 3))).clone('waitPkg')).setMaxAccess("readonly") if mibBuilder.loadTexts: wfQosServPkgQueCfgState.setStatus('mandatory') if mibBuilder.loadTexts: wfQosServPkgQueCfgState.setDescription('State of this Queue, either Up, Waiting for a Service Package, or Misconfigured.') wfQosServPkgQueCfgClass = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 2, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 7)).clone(7)).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfQosServPkgQueCfgClass.setStatus('mandatory') if mibBuilder.loadTexts: wfQosServPkgQueCfgClass.setDescription('Class level for this queue, 0=highest, 7=lowest') wfQosServPkgQueCfgAcctRule = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 2, 1, 7), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfQosServPkgQueCfgAcctRule.setStatus('mandatory') if mibBuilder.loadTexts: wfQosServPkgQueCfgAcctRule.setDescription('Accounting Rule Template Index.') wfQosServPkgQueCfgRxCommitInfoRate = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 2, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 1536))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfQosServPkgQueCfgRxCommitInfoRate.setStatus('mandatory') if mibBuilder.loadTexts: wfQosServPkgQueCfgRxCommitInfoRate.setDescription('Commit Info Rate (CIR), in Kbits per second, configured for this template') wfQosServPkgQueCfgRxBurstRate = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 2, 1, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 1536))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfQosServPkgQueCfgRxBurstRate.setStatus('mandatory') if mibBuilder.loadTexts: wfQosServPkgQueCfgRxBurstRate.setDescription('Burst Rate (BR), in Kbits per second, configured for this template') wfQosServPkgQueCfgRxBurstSize = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 2, 1, 10), Integer32().clone(8000)).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfQosServPkgQueCfgRxBurstSize.setStatus('mandatory') if mibBuilder.loadTexts: wfQosServPkgQueCfgRxBurstSize.setDescription('Burst Size, in bytes, configured for this template') wfQosServPkgQueCfgRxBurstAction = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 2, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("none", 1), ("downgrade", 2), ("mark", 3), ("mark-downgrade", 4))).clone('none')).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfQosServPkgQueCfgRxBurstAction.setStatus('mandatory') if mibBuilder.loadTexts: wfQosServPkgQueCfgRxBurstAction.setDescription('Action when Burst Rate is exceeded') wfQosServPkgQueCfgTxDropThresh = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 2, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("none", 1), ("percent-83", 2), ("percent-66", 3), ("percent-50", 4))).clone('none')).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfQosServPkgQueCfgTxDropThresh.setStatus('mandatory') if mibBuilder.loadTexts: wfQosServPkgQueCfgTxDropThresh.setDescription('Hardware Threshold in percent to start dropping Output Packets for this queue. When set to none, all packets are accepted until the Queue Fills 100 percent.') wfQosServPkgQueCfgTxWeight = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 2, 1, 13), Integer32().clone(100)).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfQosServPkgQueCfgTxWeight.setStatus('mandatory') if mibBuilder.loadTexts: wfQosServPkgQueCfgTxWeight.setDescription('Weight in percentage for the Tx Queue when set to Round Robbin Priority Type.') wfQosServPkgQueCfgTxActualWeight = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 2, 1, 14), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfQosServPkgQueCfgTxActualWeight.setStatus('mandatory') if mibBuilder.loadTexts: wfQosServPkgQueCfgTxActualWeight.setDescription('Actual Weight, in percentage, given to this Tx Queue within its Service Package when set to Round Robbin Scheduling.') wfQueueStatTable = MibTable((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 3), ) if mibBuilder.loadTexts: wfQueueStatTable.setStatus('mandatory') if mibBuilder.loadTexts: wfQueueStatTable.setDescription('This file describes the MIBS for getting Queues Stats') wfQueueStatEntry = MibTableRow((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 3, 1), ).setIndexNames((0, "Wellfleet-QOS-MIB", "wfQueueStatPortLineNumber"), (0, "Wellfleet-QOS-MIB", "wfQueueStatLineIndex"), (0, "Wellfleet-QOS-MIB", "wfQueueStatQueueIndex")) if mibBuilder.loadTexts: wfQueueStatEntry.setStatus('mandatory') if mibBuilder.loadTexts: wfQueueStatEntry.setDescription('An entry in the Queue Base table') wfQueueStatPortLineNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 3, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfQueueStatPortLineNumber.setStatus('mandatory') if mibBuilder.loadTexts: wfQueueStatPortLineNumber.setDescription('Instance ID PortLineNumber') wfQueueStatLineIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 3, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfQueueStatLineIndex.setStatus('mandatory') if mibBuilder.loadTexts: wfQueueStatLineIndex.setDescription('Instance Line Number') wfQueueStatQueueIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 3, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfQueueStatQueueIndex.setStatus('mandatory') if mibBuilder.loadTexts: wfQueueStatQueueIndex.setDescription('Queue Index, matches that of wfQosServPkgQueCfgQueueIndex') wfQueueStatTxOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 3, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfQueueStatTxOctets.setStatus('mandatory') if mibBuilder.loadTexts: wfQueueStatTxOctets.setDescription('Number of Transmit Octets received without error') wfQueueStatTxPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 3, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfQueueStatTxPackets.setStatus('mandatory') if mibBuilder.loadTexts: wfQueueStatTxPackets.setDescription('Number of Transmit Packets received without error') wfQueueStatTxDrops = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 3, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfQueueStatTxDrops.setStatus('mandatory') if mibBuilder.loadTexts: wfQueueStatTxDrops.setDescription('Number of Transmit Packets Dropped') wfQueueStatRxBelowCirOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 3, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfQueueStatRxBelowCirOctets.setStatus('mandatory') if mibBuilder.loadTexts: wfQueueStatRxBelowCirOctets.setDescription('The number of octets received which were below the committed information rate (CIR).') wfQueueStatRxBelowCirPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 3, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfQueueStatRxBelowCirPackets.setStatus('mandatory') if mibBuilder.loadTexts: wfQueueStatRxBelowCirPackets.setDescription('The number of packets received which were below the committed information rate (CIR).') wfQueueStatRxAboveCirOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 3, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfQueueStatRxAboveCirOctets.setStatus('mandatory') if mibBuilder.loadTexts: wfQueueStatRxAboveCirOctets.setDescription('The number of octets received which exceeded the committed information rate, but which were within the allocated burst rate (BR).') wfQueueStatRxAboveCirPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 3, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfQueueStatRxAboveCirPackets.setStatus('mandatory') if mibBuilder.loadTexts: wfQueueStatRxAboveCirPackets.setDescription('The number of packets received which exceeded the committed information rate, but which were within the allocated burst rate (BR).') wfQueueStatRxAboveBrOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 3, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfQueueStatRxAboveBrOctets.setStatus('mandatory') if mibBuilder.loadTexts: wfQueueStatRxAboveBrOctets.setDescription('The number of octets received which exceeded the allocated burst rate (BR).') wfQueueStatRxAboveBrPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 3, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfQueueStatRxAboveBrPackets.setStatus('mandatory') if mibBuilder.loadTexts: wfQueueStatRxAboveBrPackets.setDescription('The number of packets received which exceeded the allocated burst rate (BR).') mibBuilder.exportSymbols("Wellfleet-QOS-MIB", wfQosServPkgNumLines=wfQosServPkgNumLines, wfQosServPkgQueCfgTxActualWeight=wfQosServPkgQueCfgTxActualWeight, wfQueueStatTxDrops=wfQueueStatTxDrops, wfQueueStatTxOctets=wfQueueStatTxOctets, wfQosServPkgQueCfgRxBurstRate=wfQosServPkgQueCfgRxBurstRate, wfQosServPkgServiceName=wfQosServPkgServiceName, wfQosServPkgQueCfgQueueName=wfQosServPkgQueCfgQueueName, wfQosServPkgTable=wfQosServPkgTable, wfQosServPkgQueCfgTable=wfQosServPkgQueCfgTable, wfQosServPkgQueCfgTxDropThresh=wfQosServPkgQueCfgTxDropThresh, wfQosServPkgQueCfgAcctRule=wfQosServPkgQueCfgAcctRule, wfQosServPkgQueCfgRxBurstAction=wfQosServPkgQueCfgRxBurstAction, wfQueueStatEntry=wfQueueStatEntry, wfQueueStatRxBelowCirOctets=wfQueueStatRxBelowCirOctets, wfQueueStatRxBelowCirPackets=wfQueueStatRxBelowCirPackets, wfQueueStatRxAboveBrOctets=wfQueueStatRxAboveBrOctets, wfQueueStatTxPackets=wfQueueStatTxPackets, wfQosServPkgEntry=wfQosServPkgEntry, wfQosServPkgQueCfgRxBurstSize=wfQosServPkgQueCfgRxBurstSize, wfQosServPkgQueCfgState=wfQosServPkgQueCfgState, wfQosServPkgQueCfgTxWeight=wfQosServPkgQueCfgTxWeight, wfQosServPkgQueCfgServiceIndex=wfQosServPkgQueCfgServiceIndex, wfQosServPkgScheduling=wfQosServPkgScheduling, wfQosServPkgIndex=wfQosServPkgIndex, wfQueueStatRxAboveCirOctets=wfQueueStatRxAboveCirOctets, wfQosServPkgQueCfgClass=wfQosServPkgQueCfgClass, wfQueueStatLineIndex=wfQueueStatLineIndex, wfQueueStatRxAboveBrPackets=wfQueueStatRxAboveBrPackets, wfQueueStatQueueIndex=wfQueueStatQueueIndex, wfQosServPkgQueCfgDelete=wfQosServPkgQueCfgDelete, wfQosServPkgQueCfgQueueIndex=wfQosServPkgQueCfgQueueIndex, wfQueueStatPortLineNumber=wfQueueStatPortLineNumber, wfQosServPkgQueCfgEntry=wfQosServPkgQueCfgEntry, wfQosServPkgQueCfgRxCommitInfoRate=wfQosServPkgQueCfgRxCommitInfoRate, wfQosServPkgNumQueues=wfQosServPkgNumQueues, wfQueueStatRxAboveCirPackets=wfQueueStatRxAboveCirPackets, wfQueueStatTable=wfQueueStatTable, wfQosServPkgDelete=wfQosServPkgDelete)
(object_identifier, integer, octet_string) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'Integer', 'OctetString') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_union, constraints_intersection, value_size_constraint, single_value_constraint, value_range_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsUnion', 'ConstraintsIntersection', 'ValueSizeConstraint', 'SingleValueConstraint', 'ValueRangeConstraint') (notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance') (time_ticks, integer32, mib_identifier, module_identity, iso, object_identity, counter64, notification_type, gauge32, ip_address, mib_scalar, mib_table, mib_table_row, mib_table_column, unsigned32, counter32, bits) = mibBuilder.importSymbols('SNMPv2-SMI', 'TimeTicks', 'Integer32', 'MibIdentifier', 'ModuleIdentity', 'iso', 'ObjectIdentity', 'Counter64', 'NotificationType', 'Gauge32', 'IpAddress', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Unsigned32', 'Counter32', 'Bits') (display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention') (wf_service_pkg_group,) = mibBuilder.importSymbols('Wellfleet-COMMON-MIB', 'wfServicePkgGroup') wf_qos_serv_pkg_table = mib_table((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 1)) if mibBuilder.loadTexts: wfQosServPkgTable.setStatus('mandatory') if mibBuilder.loadTexts: wfQosServPkgTable.setDescription('This file describes the MIBS for managing Qos Templates') wf_qos_serv_pkg_entry = mib_table_row((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 1, 1)).setIndexNames((0, 'Wellfleet-QOS-MIB', 'wfQosServPkgIndex')) if mibBuilder.loadTexts: wfQosServPkgEntry.setStatus('mandatory') if mibBuilder.loadTexts: wfQosServPkgEntry.setDescription('An entry in the Qos Base table') wf_qos_serv_pkg_delete = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 1, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('created', 1), ('deleted', 2))).clone('created')).setMaxAccess('readwrite') if mibBuilder.loadTexts: wfQosServPkgDelete.setStatus('mandatory') if mibBuilder.loadTexts: wfQosServPkgDelete.setDescription('Create/Delete parameter') wf_qos_serv_pkg_index = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 1, 1, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: wfQosServPkgIndex.setStatus('mandatory') if mibBuilder.loadTexts: wfQosServPkgIndex.setDescription('Instance ID, filled in by driver') wf_qos_serv_pkg_service_name = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 1, 1, 3), display_string()).setMaxAccess('readwrite') if mibBuilder.loadTexts: wfQosServPkgServiceName.setStatus('mandatory') if mibBuilder.loadTexts: wfQosServPkgServiceName.setDescription('Service Name given to this template') wf_qos_serv_pkg_scheduling = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 1, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('round-robin', 1), ('strict-priority', 2))).clone('round-robin')).setMaxAccess('readwrite') if mibBuilder.loadTexts: wfQosServPkgScheduling.setStatus('mandatory') if mibBuilder.loadTexts: wfQosServPkgScheduling.setDescription('Selects the scheduling method, Round Robbin or Strict Priority, to service the Tx Queues. In Round Robbin, each Queue is serviced according to the weights applied in the Queue Mib. In Strict Priority, the highest priority Queue with data is serviced.') wf_qos_serv_pkg_num_queues = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 1, 1, 5), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: wfQosServPkgNumQueues.setStatus('mandatory') if mibBuilder.loadTexts: wfQosServPkgNumQueues.setDescription('Number of queues configured for this queue package') wf_qos_serv_pkg_num_lines = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 1, 1, 6), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: wfQosServPkgNumLines.setStatus('mandatory') if mibBuilder.loadTexts: wfQosServPkgNumLines.setDescription('Number of lines using this queue package') wf_qos_serv_pkg_que_cfg_table = mib_table((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 2)) if mibBuilder.loadTexts: wfQosServPkgQueCfgTable.setStatus('mandatory') if mibBuilder.loadTexts: wfQosServPkgQueCfgTable.setDescription('This file describes the MIBS for managing Qos Templates') wf_qos_serv_pkg_que_cfg_entry = mib_table_row((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 2, 1)).setIndexNames((0, 'Wellfleet-QOS-MIB', 'wfQosServPkgQueCfgServiceIndex'), (0, 'Wellfleet-QOS-MIB', 'wfQosServPkgQueCfgQueueIndex')) if mibBuilder.loadTexts: wfQosServPkgQueCfgEntry.setStatus('mandatory') if mibBuilder.loadTexts: wfQosServPkgQueCfgEntry.setDescription('An entry in the Qos Base table') wf_qos_serv_pkg_que_cfg_delete = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 2, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('created', 1), ('deleted', 2))).clone('created')).setMaxAccess('readwrite') if mibBuilder.loadTexts: wfQosServPkgQueCfgDelete.setStatus('mandatory') if mibBuilder.loadTexts: wfQosServPkgQueCfgDelete.setDescription('Create/Delete parameter') wf_qos_serv_pkg_que_cfg_service_index = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 2, 1, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: wfQosServPkgQueCfgServiceIndex.setStatus('mandatory') if mibBuilder.loadTexts: wfQosServPkgQueCfgServiceIndex.setDescription('Instance Service ID, filled in by driver') wf_qos_serv_pkg_que_cfg_queue_index = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 2, 1, 3), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: wfQosServPkgQueCfgQueueIndex.setStatus('mandatory') if mibBuilder.loadTexts: wfQosServPkgQueCfgQueueIndex.setDescription('Instance Queue ID, filled in by driver') wf_qos_serv_pkg_que_cfg_queue_name = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 2, 1, 4), display_string()).setMaxAccess('readwrite') if mibBuilder.loadTexts: wfQosServPkgQueCfgQueueName.setStatus('mandatory') if mibBuilder.loadTexts: wfQosServPkgQueCfgQueueName.setDescription('Queue Name given to this template') wf_qos_serv_pkg_que_cfg_state = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 2, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('up', 1), ('waitPkg', 2), ('misCfg', 3))).clone('waitPkg')).setMaxAccess('readonly') if mibBuilder.loadTexts: wfQosServPkgQueCfgState.setStatus('mandatory') if mibBuilder.loadTexts: wfQosServPkgQueCfgState.setDescription('State of this Queue, either Up, Waiting for a Service Package, or Misconfigured.') wf_qos_serv_pkg_que_cfg_class = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 2, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(0, 7)).clone(7)).setMaxAccess('readwrite') if mibBuilder.loadTexts: wfQosServPkgQueCfgClass.setStatus('mandatory') if mibBuilder.loadTexts: wfQosServPkgQueCfgClass.setDescription('Class level for this queue, 0=highest, 7=lowest') wf_qos_serv_pkg_que_cfg_acct_rule = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 2, 1, 7), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: wfQosServPkgQueCfgAcctRule.setStatus('mandatory') if mibBuilder.loadTexts: wfQosServPkgQueCfgAcctRule.setDescription('Accounting Rule Template Index.') wf_qos_serv_pkg_que_cfg_rx_commit_info_rate = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 2, 1, 8), integer32().subtype(subtypeSpec=value_range_constraint(0, 1536))).setMaxAccess('readwrite') if mibBuilder.loadTexts: wfQosServPkgQueCfgRxCommitInfoRate.setStatus('mandatory') if mibBuilder.loadTexts: wfQosServPkgQueCfgRxCommitInfoRate.setDescription('Commit Info Rate (CIR), in Kbits per second, configured for this template') wf_qos_serv_pkg_que_cfg_rx_burst_rate = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 2, 1, 9), integer32().subtype(subtypeSpec=value_range_constraint(0, 1536))).setMaxAccess('readwrite') if mibBuilder.loadTexts: wfQosServPkgQueCfgRxBurstRate.setStatus('mandatory') if mibBuilder.loadTexts: wfQosServPkgQueCfgRxBurstRate.setDescription('Burst Rate (BR), in Kbits per second, configured for this template') wf_qos_serv_pkg_que_cfg_rx_burst_size = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 2, 1, 10), integer32().clone(8000)).setMaxAccess('readwrite') if mibBuilder.loadTexts: wfQosServPkgQueCfgRxBurstSize.setStatus('mandatory') if mibBuilder.loadTexts: wfQosServPkgQueCfgRxBurstSize.setDescription('Burst Size, in bytes, configured for this template') wf_qos_serv_pkg_que_cfg_rx_burst_action = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 2, 1, 11), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('none', 1), ('downgrade', 2), ('mark', 3), ('mark-downgrade', 4))).clone('none')).setMaxAccess('readwrite') if mibBuilder.loadTexts: wfQosServPkgQueCfgRxBurstAction.setStatus('mandatory') if mibBuilder.loadTexts: wfQosServPkgQueCfgRxBurstAction.setDescription('Action when Burst Rate is exceeded') wf_qos_serv_pkg_que_cfg_tx_drop_thresh = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 2, 1, 12), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('none', 1), ('percent-83', 2), ('percent-66', 3), ('percent-50', 4))).clone('none')).setMaxAccess('readwrite') if mibBuilder.loadTexts: wfQosServPkgQueCfgTxDropThresh.setStatus('mandatory') if mibBuilder.loadTexts: wfQosServPkgQueCfgTxDropThresh.setDescription('Hardware Threshold in percent to start dropping Output Packets for this queue. When set to none, all packets are accepted until the Queue Fills 100 percent.') wf_qos_serv_pkg_que_cfg_tx_weight = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 2, 1, 13), integer32().clone(100)).setMaxAccess('readwrite') if mibBuilder.loadTexts: wfQosServPkgQueCfgTxWeight.setStatus('mandatory') if mibBuilder.loadTexts: wfQosServPkgQueCfgTxWeight.setDescription('Weight in percentage for the Tx Queue when set to Round Robbin Priority Type.') wf_qos_serv_pkg_que_cfg_tx_actual_weight = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 2, 1, 14), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: wfQosServPkgQueCfgTxActualWeight.setStatus('mandatory') if mibBuilder.loadTexts: wfQosServPkgQueCfgTxActualWeight.setDescription('Actual Weight, in percentage, given to this Tx Queue within its Service Package when set to Round Robbin Scheduling.') wf_queue_stat_table = mib_table((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 3)) if mibBuilder.loadTexts: wfQueueStatTable.setStatus('mandatory') if mibBuilder.loadTexts: wfQueueStatTable.setDescription('This file describes the MIBS for getting Queues Stats') wf_queue_stat_entry = mib_table_row((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 3, 1)).setIndexNames((0, 'Wellfleet-QOS-MIB', 'wfQueueStatPortLineNumber'), (0, 'Wellfleet-QOS-MIB', 'wfQueueStatLineIndex'), (0, 'Wellfleet-QOS-MIB', 'wfQueueStatQueueIndex')) if mibBuilder.loadTexts: wfQueueStatEntry.setStatus('mandatory') if mibBuilder.loadTexts: wfQueueStatEntry.setDescription('An entry in the Queue Base table') wf_queue_stat_port_line_number = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 3, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: wfQueueStatPortLineNumber.setStatus('mandatory') if mibBuilder.loadTexts: wfQueueStatPortLineNumber.setDescription('Instance ID PortLineNumber') wf_queue_stat_line_index = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 3, 1, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: wfQueueStatLineIndex.setStatus('mandatory') if mibBuilder.loadTexts: wfQueueStatLineIndex.setDescription('Instance Line Number') wf_queue_stat_queue_index = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 3, 1, 3), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: wfQueueStatQueueIndex.setStatus('mandatory') if mibBuilder.loadTexts: wfQueueStatQueueIndex.setDescription('Queue Index, matches that of wfQosServPkgQueCfgQueueIndex') wf_queue_stat_tx_octets = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 3, 1, 4), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: wfQueueStatTxOctets.setStatus('mandatory') if mibBuilder.loadTexts: wfQueueStatTxOctets.setDescription('Number of Transmit Octets received without error') wf_queue_stat_tx_packets = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 3, 1, 5), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: wfQueueStatTxPackets.setStatus('mandatory') if mibBuilder.loadTexts: wfQueueStatTxPackets.setDescription('Number of Transmit Packets received without error') wf_queue_stat_tx_drops = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 3, 1, 6), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: wfQueueStatTxDrops.setStatus('mandatory') if mibBuilder.loadTexts: wfQueueStatTxDrops.setDescription('Number of Transmit Packets Dropped') wf_queue_stat_rx_below_cir_octets = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 3, 1, 7), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: wfQueueStatRxBelowCirOctets.setStatus('mandatory') if mibBuilder.loadTexts: wfQueueStatRxBelowCirOctets.setDescription('The number of octets received which were below the committed information rate (CIR).') wf_queue_stat_rx_below_cir_packets = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 3, 1, 8), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: wfQueueStatRxBelowCirPackets.setStatus('mandatory') if mibBuilder.loadTexts: wfQueueStatRxBelowCirPackets.setDescription('The number of packets received which were below the committed information rate (CIR).') wf_queue_stat_rx_above_cir_octets = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 3, 1, 9), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: wfQueueStatRxAboveCirOctets.setStatus('mandatory') if mibBuilder.loadTexts: wfQueueStatRxAboveCirOctets.setDescription('The number of octets received which exceeded the committed information rate, but which were within the allocated burst rate (BR).') wf_queue_stat_rx_above_cir_packets = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 3, 1, 10), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: wfQueueStatRxAboveCirPackets.setStatus('mandatory') if mibBuilder.loadTexts: wfQueueStatRxAboveCirPackets.setDescription('The number of packets received which exceeded the committed information rate, but which were within the allocated burst rate (BR).') wf_queue_stat_rx_above_br_octets = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 3, 1, 11), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: wfQueueStatRxAboveBrOctets.setStatus('mandatory') if mibBuilder.loadTexts: wfQueueStatRxAboveBrOctets.setDescription('The number of octets received which exceeded the allocated burst rate (BR).') wf_queue_stat_rx_above_br_packets = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 23, 1, 3, 1, 12), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: wfQueueStatRxAboveBrPackets.setStatus('mandatory') if mibBuilder.loadTexts: wfQueueStatRxAboveBrPackets.setDescription('The number of packets received which exceeded the allocated burst rate (BR).') mibBuilder.exportSymbols('Wellfleet-QOS-MIB', wfQosServPkgNumLines=wfQosServPkgNumLines, wfQosServPkgQueCfgTxActualWeight=wfQosServPkgQueCfgTxActualWeight, wfQueueStatTxDrops=wfQueueStatTxDrops, wfQueueStatTxOctets=wfQueueStatTxOctets, wfQosServPkgQueCfgRxBurstRate=wfQosServPkgQueCfgRxBurstRate, wfQosServPkgServiceName=wfQosServPkgServiceName, wfQosServPkgQueCfgQueueName=wfQosServPkgQueCfgQueueName, wfQosServPkgTable=wfQosServPkgTable, wfQosServPkgQueCfgTable=wfQosServPkgQueCfgTable, wfQosServPkgQueCfgTxDropThresh=wfQosServPkgQueCfgTxDropThresh, wfQosServPkgQueCfgAcctRule=wfQosServPkgQueCfgAcctRule, wfQosServPkgQueCfgRxBurstAction=wfQosServPkgQueCfgRxBurstAction, wfQueueStatEntry=wfQueueStatEntry, wfQueueStatRxBelowCirOctets=wfQueueStatRxBelowCirOctets, wfQueueStatRxBelowCirPackets=wfQueueStatRxBelowCirPackets, wfQueueStatRxAboveBrOctets=wfQueueStatRxAboveBrOctets, wfQueueStatTxPackets=wfQueueStatTxPackets, wfQosServPkgEntry=wfQosServPkgEntry, wfQosServPkgQueCfgRxBurstSize=wfQosServPkgQueCfgRxBurstSize, wfQosServPkgQueCfgState=wfQosServPkgQueCfgState, wfQosServPkgQueCfgTxWeight=wfQosServPkgQueCfgTxWeight, wfQosServPkgQueCfgServiceIndex=wfQosServPkgQueCfgServiceIndex, wfQosServPkgScheduling=wfQosServPkgScheduling, wfQosServPkgIndex=wfQosServPkgIndex, wfQueueStatRxAboveCirOctets=wfQueueStatRxAboveCirOctets, wfQosServPkgQueCfgClass=wfQosServPkgQueCfgClass, wfQueueStatLineIndex=wfQueueStatLineIndex, wfQueueStatRxAboveBrPackets=wfQueueStatRxAboveBrPackets, wfQueueStatQueueIndex=wfQueueStatQueueIndex, wfQosServPkgQueCfgDelete=wfQosServPkgQueCfgDelete, wfQosServPkgQueCfgQueueIndex=wfQosServPkgQueCfgQueueIndex, wfQueueStatPortLineNumber=wfQueueStatPortLineNumber, wfQosServPkgQueCfgEntry=wfQosServPkgQueCfgEntry, wfQosServPkgQueCfgRxCommitInfoRate=wfQosServPkgQueCfgRxCommitInfoRate, wfQosServPkgNumQueues=wfQosServPkgNumQueues, wfQueueStatRxAboveCirPackets=wfQueueStatRxAboveCirPackets, wfQueueStatTable=wfQueueStatTable, wfQosServPkgDelete=wfQosServPkgDelete)
def main(): n = int(input('Number to count to: ')) fizzbuzz(n) def fizzbuzz(n): for number in range(1, n + 1): if number % 5 == 0: if number % 3 == 0: print('FizzBuzz') if number % 3 == 0: print('Fizz') elif number % 5 == 0: print('Buzz') else: print(number) if __name__ == "__main__": main()
def main(): n = int(input('Number to count to: ')) fizzbuzz(n) def fizzbuzz(n): for number in range(1, n + 1): if number % 5 == 0: if number % 3 == 0: print('FizzBuzz') if number % 3 == 0: print('Fizz') elif number % 5 == 0: print('Buzz') else: print(number) if __name__ == '__main__': main()
## setup MQTT MQTT_BROKER = "" # Ip adress of the MQTT Broker MQTT_USERNAME = "" # Username MQTT_PASSWD = "" # Password MQTT_TOPIC = "" # MQTT Topic ## setup RGB NUMBER_OF_LEDS= 100 #int
mqtt_broker = '' mqtt_username = '' mqtt_passwd = '' mqtt_topic = '' number_of_leds = 100
# Copyright 2021 Nate Gay # # 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. "rules_kustomize" load("@bazel_skylib//lib:dicts.bzl", "dicts") load("@io_bazel_rules_docker//container:providers.bzl", "PushInfo") # https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/images/ ImageInfo = provider( doc = "Image modification information", fields = { "partial": "A yaml file containing kustomize image replacement info", }, ) def _impl(ctx): image_name = '{}/{}'.format(ctx.attr.image_details[PushInfo].registry, ctx.attr.image_details[PushInfo].repository) output = '\n'.join([ '\\055 name: {}'.format(image_name if ctx.attr.image_name == '' else ctx.attr.image_name), ' newName: {}'.format(image_name), ' digest: $(cat {})'.format(ctx.attr.image_details[PushInfo].digest.path), ]) ctx.actions.run_shell( inputs = [ctx.attr.image_details[PushInfo].digest], outputs = [ctx.outputs.partial], arguments = [], command = 'printf "{}\n" > "{}"'.format(output, ctx.outputs.partial.path), ) return [ImageInfo(partial = ctx.outputs.partial)] kustomize_image_ = rule( attrs = dicts.add({ "image_details": attr.label( doc = "A label containing the container_push output for an image.", cfg = "host", mandatory = True, allow_files = True, providers = [PushInfo] ), "image_name": attr.string( mandatory = False, default = "", doc = "The name of the image to be modified.", ), }), implementation = _impl, outputs = { "partial": "%{name}.yaml.partial", }, ) def kustomize_image(**kwargs): kustomize_image_(**kwargs)
"""rules_kustomize""" load('@bazel_skylib//lib:dicts.bzl', 'dicts') load('@io_bazel_rules_docker//container:providers.bzl', 'PushInfo') image_info = provider(doc='Image modification information', fields={'partial': 'A yaml file containing kustomize image replacement info'}) def _impl(ctx): image_name = '{}/{}'.format(ctx.attr.image_details[PushInfo].registry, ctx.attr.image_details[PushInfo].repository) output = '\n'.join(['\\055 name: {}'.format(image_name if ctx.attr.image_name == '' else ctx.attr.image_name), ' newName: {}'.format(image_name), ' digest: $(cat {})'.format(ctx.attr.image_details[PushInfo].digest.path)]) ctx.actions.run_shell(inputs=[ctx.attr.image_details[PushInfo].digest], outputs=[ctx.outputs.partial], arguments=[], command='printf "{}\n" > "{}"'.format(output, ctx.outputs.partial.path)) return [image_info(partial=ctx.outputs.partial)] kustomize_image_ = rule(attrs=dicts.add({'image_details': attr.label(doc='A label containing the container_push output for an image.', cfg='host', mandatory=True, allow_files=True, providers=[PushInfo]), 'image_name': attr.string(mandatory=False, default='', doc='The name of the image to be modified.')}), implementation=_impl, outputs={'partial': '%{name}.yaml.partial'}) def kustomize_image(**kwargs): kustomize_image_(**kwargs)
def parseFileTypes(rawTypes): out = [] for rtype in rawTypes: if isinstance(rtype, str): out.append({'name': rtype, 'ext': rtype}) else: assert 'name' in rtype assert 'ext' in rtype out.append({'name': rtype['name'], 'ext': rtype['ext']}) return out
def parse_file_types(rawTypes): out = [] for rtype in rawTypes: if isinstance(rtype, str): out.append({'name': rtype, 'ext': rtype}) else: assert 'name' in rtype assert 'ext' in rtype out.append({'name': rtype['name'], 'ext': rtype['ext']}) return out
keycode = { 'up': 72, 'down': 80, 'left': 75, 'right': 77, 'P': 25 }
keycode = {'up': 72, 'down': 80, 'left': 75, 'right': 77, 'P': 25}
''' Given two strings, determine if they share a common substring. A substring may be as small as one character. For example, the words "a", "and", "art" share the common substring . The words "be" and "cat" do not share a substring. ''' #this has the best runtime out of initial coding varieties def twoStrings(s1, s2): s1 = list(set(s1)) cache = {} for i in s1: cache[i] = 1 for i in s2: if i in cache.keys(): return 'YES' else: pass return 'NO'
""" Given two strings, determine if they share a common substring. A substring may be as small as one character. For example, the words "a", "and", "art" share the common substring . The words "be" and "cat" do not share a substring. """ def two_strings(s1, s2): s1 = list(set(s1)) cache = {} for i in s1: cache[i] = 1 for i in s2: if i in cache.keys(): return 'YES' else: pass return 'NO'
class Solution: def numJewelsInStones(self, J: str, S: str) -> int: ans = 0 for i in range(0, len(S)): if(J.find(S[i])!=-1): ans += 1 return ans
class Solution: def num_jewels_in_stones(self, J: str, S: str) -> int: ans = 0 for i in range(0, len(S)): if J.find(S[i]) != -1: ans += 1 return ans
# This is an Adventure Game about The Digital Sweet Shop # The program was written by Dr. Aung Win Htut # Date: 04-03-2022 # Green Hackers Online Traing Courses # 0-robot.py, 1-adgame3.py, 2-entershop.py, 3-ifelse2.py, 4-input.py, 5-ad62.py, 6-ad63.py # The next few lines give the introduction # Greetings my friend. if you want to go to the Digital Sweet Shop you must walk across # the long street and turn left at the traffic lights. There is a large shopping centre # on the corner. Turn left here and you will see the Digital Sweet Shop beside the flower # shop. The flowershop owner has a dog called Biscuit who barks all the time. Be careful # he can bite! playerlives = 3 chocolate = 2 bonus = 0 numbercorrect = 0 print() print() print() print(" Game Intro") print(" ===========") print("Greetings my friend. if you want to go to the Digital Sweet Shop you must walk across") print("the long street and turn left at the traffic lights. There is a large shopping centre") print("on the corner. Turn left here and you will see the Digital Sweet Shop beside the flower") print("shop. The flowershop owner has a dog called Biscuit who barks all the time. Be careful") print("he can bite!") print() print(" Welcome to the Digital Sweet Shop") print() print("You have been invited to take part in a competition in the shop.") print("You must find the cholote room where you will be asked a question") print("If you get it right you will receive letters which are part of a password and a clue.") print() print() print("At the end you must figure out the password and use it to open the ") print("treasure chest wich contains a year's supply of all your favourite sweets. ") print("You will meet two people - one is the sweet owner who wants to steal the password so he can keep the sweets ") print(" W E L C O M E T O T H E D I G I T A L S W E E T S H O P ") print() playername = input('What is your name: ') playerage = int(input('How old are you: ')) print('Your name is ' + playername) print('Your age is ' + str(playerage)) print() if playerage >= 8 and playerage <= 12: print("You can play the game!") print() print() print("You can give the two people in the story names ") ownername = input("Please enter owner name: ") robotname = input("Please enter robot name: ") print() print() # Enter the shop?? print("You walk up the steps to the shop....you open the door. There is nobody there") print("and the shop looks to be in bad repair. ") enterroom = input("Will you enter the room? : ") if enterroom == "Y" or enterroom == "y": print() print() print("You have reached the top of the stairs and you can go right or left") direction = input("Left or Right? : ") if direction == "R" or direction == "r": print() print() print("You have fallen through the hole in the floor and lost a life - ") print(" you must start again! GameOver") elif direction == "L" or direction == "l": print() print() print("You are standing at the door of the Chocolate room!") print() print() print("-----------------------------------------------------------------") print( "The door opens and someone is standing there. It is the robot " + robotname) print( "He tells you that you cannot enter unless you show that you know all about secure passwords.") print("He asks you a question") print() print() print("Hello " + playername + " Which of the following would be a good strong password?") print("If you answer correctly he will give two bars of chocolate") print("1 DigitalSweetShop, 2 Botty, 3 N*123MGx*") print() # enter a print statement which will tell the user to enter a number between 1 and 3 playerchoice = input("Please enter your choice: ") # enter an if statement to check if playeranswer is equal to 3 if playerchoice == "3": # enter an assignment statement to increase chocolate by 2 chocolate = chocolate + 2 # enter a print statement to say "You have got two bars of chocolate, open the wrappers to see the two letters" print() print() print( "You have got two bars of chocolate, open the wrappers to see the two letters") # enter another print statement to say "You have letters A and R - memorise these" print("You have letters A and R - memorise these") # MEETING THE OWNER print() print() print( "Welcome to the Chocolate Room. I am the owner of this sweet shop, my name is " + ownername) print("You must answer this question.") print() # add an input statement to ask the question on the next line and store the response in a variable called answer # "Which of the following could be used as a good password" # "1. Your pet's name. 2. Password123 3. A random collection of numbers and letters?" # HINT : User answer = int(input(.......)) print("Which of the following could be used as a good password") print( "1. Your pet's name. 2. Password123 3. A random collection of numbers and letters?") print() answer = int(input("Please Choose 1,2,3: ")) if answer == 3: chocolatebar = int( input("Do you want chocolate bar 1 or 2? ")) if chocolatebar == 1: print() print() print( "Hard luck, you lOse a life and there is no information in the wrapper. GameOver") playerlives = playerlives - 1 # add code to check if the chocolate bar is equal to 1 # ---> add code to print this message to the user "Hard luck, you lse a life and there is no information in the wrapper" # ---> add code to subtract 1 from the player lives elif chocolatebar == 2: print() print() print( "OK - you can have the chocolate bar and the letter in the wrapper is T") # the player must try to guess the password print("Now you must enter each letter that you remember ") print("You will be given 3 times") # add code here for a while loop using that counts from 1 to 3, so player has 3 guesses: i = 0 while i < 3: i = i + 1 letter = input("Try number " + str(i)+" : ") if letter == "A" or letter == "R" or letter == "T" or letter == "a" or letter == "r" or letter == "t": numbercorrect = numbercorrect + 1 print("CORRECT - welldone") else: print("Wrong - sorry") print() print() guess = input( "NOW try and guess the password **** - the clue is in this line four times. Use the letters you were gives to help : ") if guess == "star": print() print() print( "You are a star - you have opened the treasure chest of sweets and earned 1000 points") bonus = 1000 score = (chocolate * 50) + (playerlives * 60) + bonus # add code here to output playername # add code here to output the number of bars of chocolate the player has # add code here to output number of lives he player has # add code here to output number of bonus points the player has # add code here to output the player's score print("Finally you won the game!!!") print() print() print("Game Data") print("----------") print("Player Name : " + playername) print("Total Chocolate Bar = " + str(chocolate)) print("Playerlives = " + str(playerlives)) print("Bonus point = " + str(bonus)) print("Player's Score = " + str(score)) # you won the game !!!! # end else: print( "Wrong answer - you lose a life and all of your chocolate and GameOver") chocolate = 0 playerlives = playerlives - 1 # add code to set the chocolate value to 0 # add code to subtract 1 from player lives # enter else: else: # enter a print statement to say "You have not guessed correctly so you have lost a life" print("You have not guessed correctly so you have lost a life") playerlives = playerlives - 1 elif direction == "S" or direction == "s": print("wrong room!") else: print("You are a coward!!!...Goodbye, GameOver") else: print(playername+"You are not the correct age to play this game!!! Sorry !! ")
playerlives = 3 chocolate = 2 bonus = 0 numbercorrect = 0 print() print() print() print(' Game Intro') print(' ===========') print('Greetings my friend. if you want to go to the Digital Sweet Shop you must walk across') print('the long street and turn left at the traffic lights. There is a large shopping centre') print('on the corner. Turn left here and you will see the Digital Sweet Shop beside the flower') print('shop. The flowershop owner has a dog called Biscuit who barks all the time. Be careful') print('he can bite!') print() print(' Welcome to the Digital Sweet Shop') print() print('You have been invited to take part in a competition in the shop.') print('You must find the cholote room where you will be asked a question') print('If you get it right you will receive letters which are part of a password and a clue.') print() print() print('At the end you must figure out the password and use it to open the ') print("treasure chest wich contains a year's supply of all your favourite sweets. ") print('You will meet two people - one is the sweet owner who wants to steal the password so he can keep the sweets ') print(' W E L C O M E T O T H E D I G I T A L S W E E T S H O P ') print() playername = input('What is your name: ') playerage = int(input('How old are you: ')) print('Your name is ' + playername) print('Your age is ' + str(playerage)) print() if playerage >= 8 and playerage <= 12: print('You can play the game!') print() print() print('You can give the two people in the story names ') ownername = input('Please enter owner name: ') robotname = input('Please enter robot name: ') print() print() print('You walk up the steps to the shop....you open the door. There is nobody there') print('and the shop looks to be in bad repair. ') enterroom = input('Will you enter the room? : ') if enterroom == 'Y' or enterroom == 'y': print() print() print('You have reached the top of the stairs and you can go right or left') direction = input('Left or Right? : ') if direction == 'R' or direction == 'r': print() print() print('You have fallen through the hole in the floor and lost a life - ') print(' you must start again! GameOver') elif direction == 'L' or direction == 'l': print() print() print('You are standing at the door of the Chocolate room!') print() print() print('-----------------------------------------------------------------') print('The door opens and someone is standing there. It is the robot ' + robotname) print('He tells you that you cannot enter unless you show that you know all about secure passwords.') print('He asks you a question') print() print() print('Hello ' + playername + ' Which of the following would be a good strong password?') print('If you answer correctly he will give two bars of chocolate') print('1 DigitalSweetShop, 2 Botty, 3 N*123MGx*') print() playerchoice = input('Please enter your choice: ') if playerchoice == '3': chocolate = chocolate + 2 print() print() print('You have got two bars of chocolate, open the wrappers to see the two letters') print('You have letters A and R - memorise these') print() print() print('Welcome to the Chocolate Room. I am the owner of this sweet shop, my name is ' + ownername) print('You must answer this question.') print() print('Which of the following could be used as a good password') print("1. Your pet's name. 2. Password123 3. A random collection of numbers and letters?") print() answer = int(input('Please Choose 1,2,3: ')) if answer == 3: chocolatebar = int(input('Do you want chocolate bar 1 or 2? ')) if chocolatebar == 1: print() print() print('Hard luck, you lOse a life and there is no information in the wrapper. GameOver') playerlives = playerlives - 1 elif chocolatebar == 2: print() print() print('OK - you can have the chocolate bar and the letter in the wrapper is T') print('Now you must enter each letter that you remember ') print('You will be given 3 times') i = 0 while i < 3: i = i + 1 letter = input('Try number ' + str(i) + ' : ') if letter == 'A' or letter == 'R' or letter == 'T' or (letter == 'a') or (letter == 'r') or (letter == 't'): numbercorrect = numbercorrect + 1 print('CORRECT - welldone') else: print('Wrong - sorry') print() print() guess = input('NOW try and guess the password **** - the clue is in this line four times. Use the letters you were gives to help : ') if guess == 'star': print() print() print('You are a star - you have opened the treasure chest of sweets and earned 1000 points') bonus = 1000 score = chocolate * 50 + playerlives * 60 + bonus print('Finally you won the game!!!') print() print() print('Game Data') print('----------') print('Player Name : ' + playername) print('Total Chocolate Bar = ' + str(chocolate)) print('Playerlives = ' + str(playerlives)) print('Bonus point = ' + str(bonus)) print("Player's Score = " + str(score)) else: print('Wrong answer - you lose a life and all of your chocolate and GameOver') chocolate = 0 playerlives = playerlives - 1 else: print('You have not guessed correctly so you have lost a life') playerlives = playerlives - 1 elif direction == 'S' or direction == 's': print('wrong room!') else: print('You are a coward!!!...Goodbye, GameOver') else: print(playername + 'You are not the correct age to play this game!!! Sorry !! ')
class Solution: def longestPalindrome(self, s: 'str') -> 'str': if len(s) <= 1: return s start = end = 0 length = len(s) for i in range(length): max_len_1 = self.get_max_len(s, i, i + 1) max_len_2 = self.get_max_len(s, i, i) max_len = max(max_len_1, max_len_2) if max_len > end - start: start = i - (max_len - 1) // 2 end = i + max_len // 2 return s[start: end+1] def get_max_len(self, s: 'list', left: 'int', right: 'int') -> 'int': length = len(s) while left >= 0 and right < length and s[left] == s[right]: left -= 1 right += 1 return right - left - 1
class Solution: def longest_palindrome(self, s: 'str') -> 'str': if len(s) <= 1: return s start = end = 0 length = len(s) for i in range(length): max_len_1 = self.get_max_len(s, i, i + 1) max_len_2 = self.get_max_len(s, i, i) max_len = max(max_len_1, max_len_2) if max_len > end - start: start = i - (max_len - 1) // 2 end = i + max_len // 2 return s[start:end + 1] def get_max_len(self, s: 'list', left: 'int', right: 'int') -> 'int': length = len(s) while left >= 0 and right < length and (s[left] == s[right]): left -= 1 right += 1 return right - left - 1
class Patient: def __init__(self, pathology, gender, weight, height, images): self.pathology = pathology self.gender = gender self.weight = weight self.height = height self.images = images
class Patient: def __init__(self, pathology, gender, weight, height, images): self.pathology = pathology self.gender = gender self.weight = weight self.height = height self.images = images
def determinant_recursive(A, total=0): # Store indices in list for row referencing indices = list(range(len(A))) # When at 2x2, submatrices recursive calls end if len(A) == 2 and len(A[0]) == 2: val = A[0][0] * A[1][1] - A[1][0] * A[0][1] return val # Define submatrix for focus column and call this function for fc in indices: As = A As = As[1:] height = len(As) for i in range(height): As[i] = As[i][0:fc] + As[i][fc+1:] sign = (-1) ** (fc % 2) # Recursive Call for matrix without the focus column sub_det = determinant_recursive(As) # All returns from recursion total += sign * A[0][fc] * sub_det return total R = int(input("Enter the number of rows:")) C = int(input("Enter the number of columns:")) matrix = [] print("Enter the entries rowwise:") for i in range(R): # A for loop for row entries a = [] for j in range(C): # A for loop for column entries a.append(int(input())) matrix.append(a) if R==C: print(determinant_recursive(matrix)) else: print("Try Again!")
def determinant_recursive(A, total=0): indices = list(range(len(A))) if len(A) == 2 and len(A[0]) == 2: val = A[0][0] * A[1][1] - A[1][0] * A[0][1] return val for fc in indices: as = A as = As[1:] height = len(As) for i in range(height): As[i] = As[i][0:fc] + As[i][fc + 1:] sign = (-1) ** (fc % 2) sub_det = determinant_recursive(As) total += sign * A[0][fc] * sub_det return total r = int(input('Enter the number of rows:')) c = int(input('Enter the number of columns:')) matrix = [] print('Enter the entries rowwise:') for i in range(R): a = [] for j in range(C): a.append(int(input())) matrix.append(a) if R == C: print(determinant_recursive(matrix)) else: print('Try Again!')
__all__ = [ "_is_ltag", "_is_not_ltag", "_is_rtag", "_is_not_rtag", "_is_tag", "_is_not_tag", "_is_ltag_of", "_is_not_ltag_of", "_is_rtag_of", "_is_not_rtag_of", "_is_pair_of", "_is_not_pair_of", "_is_not_ltag_and_not_rtag_of" ] #### def _is_ltag(tag,tag_pairs): cond = (tag in tag_pairs) return(cond) def _is_not_ltag(tag,tag_pairs): return(not(_is_ltag(tag,tag_pairs))) def _is_rtag(tag,tag_pairs): cond = (tag in list(tag_pairs.values())) return(cond) def _is_not_rtag(tag,tag_pairs): return(not(_is_rtag(tag,tag_pairs))) def _is_tag(tag,tag_pairs): cond1 = (tag in tag_pairs) cond2 = (tag in list(tag_pairs.values())) return((cond1 or cond2)) def _is_not_tag(tag,tag_pairs): return(not(_is_tag(tag,tag_pairs))) def _is_ltag_of(tag1,tag2,tag_pairs): cond = (tag_pairs[tag1] == tag2) return(cond) def _is_not_ltag_of(tag1,tag2,tag_pairs): return(not(is_ltag_of(tag1,tag2,tag_pairs))) def _is_rtag_of(tag1,tag2,tag_pairs): cond = (tag_pairs[tag2] == tag1) return(cond) def _is_not_rtag_of(tag1,tag2,tag_pairs): return(not(_is_rtag_of(tag1,tag2,tag_pairs))) def _is_pair_of(tag1,tag2,tag_pairs): cond1 = _is_ltag_of(tag1,tag2,tag_pairs) cond2 = _is_rtag_of(tag1,tag2,tag_pairs) return((cond1 or cond2)) def _is_not_pair_of(tag1,tag2,tag_pairs): return(not(_is_pair_of(tag1,tag2,tag_pairs))) ##### def _is_not_ltag_and_not_rtag_of(tag1,tag2,tag_pairs): cond1 = _is_not_ltag(tag1,tag_pairs) cond2 = _is_not_rtag_of(tag1,tag2,tag_pairs) return((cond1 and cond2)) #####
__all__ = ['_is_ltag', '_is_not_ltag', '_is_rtag', '_is_not_rtag', '_is_tag', '_is_not_tag', '_is_ltag_of', '_is_not_ltag_of', '_is_rtag_of', '_is_not_rtag_of', '_is_pair_of', '_is_not_pair_of', '_is_not_ltag_and_not_rtag_of'] def _is_ltag(tag, tag_pairs): cond = tag in tag_pairs return cond def _is_not_ltag(tag, tag_pairs): return not _is_ltag(tag, tag_pairs) def _is_rtag(tag, tag_pairs): cond = tag in list(tag_pairs.values()) return cond def _is_not_rtag(tag, tag_pairs): return not _is_rtag(tag, tag_pairs) def _is_tag(tag, tag_pairs): cond1 = tag in tag_pairs cond2 = tag in list(tag_pairs.values()) return cond1 or cond2 def _is_not_tag(tag, tag_pairs): return not _is_tag(tag, tag_pairs) def _is_ltag_of(tag1, tag2, tag_pairs): cond = tag_pairs[tag1] == tag2 return cond def _is_not_ltag_of(tag1, tag2, tag_pairs): return not is_ltag_of(tag1, tag2, tag_pairs) def _is_rtag_of(tag1, tag2, tag_pairs): cond = tag_pairs[tag2] == tag1 return cond def _is_not_rtag_of(tag1, tag2, tag_pairs): return not _is_rtag_of(tag1, tag2, tag_pairs) def _is_pair_of(tag1, tag2, tag_pairs): cond1 = _is_ltag_of(tag1, tag2, tag_pairs) cond2 = _is_rtag_of(tag1, tag2, tag_pairs) return cond1 or cond2 def _is_not_pair_of(tag1, tag2, tag_pairs): return not _is_pair_of(tag1, tag2, tag_pairs) def _is_not_ltag_and_not_rtag_of(tag1, tag2, tag_pairs): cond1 = _is_not_ltag(tag1, tag_pairs) cond2 = _is_not_rtag_of(tag1, tag2, tag_pairs) return cond1 and cond2
int_const = 5 bool_const = True string_const = 'abc' unicode_const = u'abc' float_const = 1.23
int_const = 5 bool_const = True string_const = 'abc' unicode_const = u'abc' float_const = 1.23
''' https://practice.geeksforgeeks.org/problems/subarray-with-given-sum/0/?ref=self Given an unsorted array of non-negative integers, find a continuous sub-array which adds to a given number. Input: The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. Each test case consists of two lines. The first line of each test case is N and S, where N is the size of array and S is the sum. The second line of each test case contains N space separated integers denoting the array elements ''' def find_contiguous_adds_to(A, s): if len(A) == 0: return -1 elif len(A) == 1: return (0,0) if A[0] == s else -1 curSum = A[0] start = 0 end = 1 while start <= end and curSum <= s and end < len(A): if curSum + A[end] < s: curSum += A[end] end += 1 elif curSum + A[end] == s: curSum += A[end] return start + 1, end + 1 else: curSum -= A[start] start += 1 return -1 def find_contiguous_posneg_adds_to(A, s): if len(A) == 0: return -1 elif len(A) == 1: return (0,0) if A[0] == s else -1 sumMap = dict() curSum = 0 for i, num in enumerate(A): curSum += num if curSum == s: return (0, i) elif sumMap.get(curSum - s, None) is not None: return sumMap.get(curSum - s) + 1, i #if value of difference between current sum and s is in map, exclude that value (subtract it) #and return index of solution as 1+ index of subarray from 0..A[sumMap[curSum - s]] sumMap[curSum] = i if __name__ == '__main__': A = [1,2,-3, 3, 3, 7,5] s = 12 #print(find_contiguous_adds_to(A,s)) print(find_contiguous_posneg_adds_to(A,s))
""" https://practice.geeksforgeeks.org/problems/subarray-with-given-sum/0/?ref=self Given an unsorted array of non-negative integers, find a continuous sub-array which adds to a given number. Input: The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. Each test case consists of two lines. The first line of each test case is N and S, where N is the size of array and S is the sum. The second line of each test case contains N space separated integers denoting the array elements """ def find_contiguous_adds_to(A, s): if len(A) == 0: return -1 elif len(A) == 1: return (0, 0) if A[0] == s else -1 cur_sum = A[0] start = 0 end = 1 while start <= end and curSum <= s and (end < len(A)): if curSum + A[end] < s: cur_sum += A[end] end += 1 elif curSum + A[end] == s: cur_sum += A[end] return (start + 1, end + 1) else: cur_sum -= A[start] start += 1 return -1 def find_contiguous_posneg_adds_to(A, s): if len(A) == 0: return -1 elif len(A) == 1: return (0, 0) if A[0] == s else -1 sum_map = dict() cur_sum = 0 for (i, num) in enumerate(A): cur_sum += num if curSum == s: return (0, i) elif sumMap.get(curSum - s, None) is not None: return (sumMap.get(curSum - s) + 1, i) sumMap[curSum] = i if __name__ == '__main__': a = [1, 2, -3, 3, 3, 7, 5] s = 12 print(find_contiguous_posneg_adds_to(A, s))
messageResources = {} messageResources['it'] = { 'browse':'Sfoglia', 'play':'Play', 'open.file':'Apri file', 'file':'File', 'edit':'Modifica', 'audio':'Audio', 'video':'Video', 'open':'Apri...', 'quit':'Esci', 'clear.file.list':'Cancella la lista dei file', 'output.audio':'Uscita audio', 'hdmi':'HDMI', 'local':'Locale', 'both':'Entrambe', 'adjust.framerate':'Regola framerate/risoluzione allo schermo', 'background.black':'Imposta lo sfondo nero', } messageResources['en'] = { 'browse':'Browse', 'play':'Play', 'open.file':'Open file', 'file':'File', 'edit':'Edit', 'audio':'Audio', 'video':'Video', 'open':'Open', 'quit':'Quit', 'clear.file.list':'Clear file list', 'output.audio':'Output audio', 'hdmi':'HDMI', 'local':'local', 'both':'both', 'adjust.framerate':'Adjust framerate/resolution to video', 'background.black':'Set background to black', }
message_resources = {} messageResources['it'] = {'browse': 'Sfoglia', 'play': 'Play', 'open.file': 'Apri file', 'file': 'File', 'edit': 'Modifica', 'audio': 'Audio', 'video': 'Video', 'open': 'Apri...', 'quit': 'Esci', 'clear.file.list': 'Cancella la lista dei file', 'output.audio': 'Uscita audio', 'hdmi': 'HDMI', 'local': 'Locale', 'both': 'Entrambe', 'adjust.framerate': 'Regola framerate/risoluzione allo schermo', 'background.black': 'Imposta lo sfondo nero'} messageResources['en'] = {'browse': 'Browse', 'play': 'Play', 'open.file': 'Open file', 'file': 'File', 'edit': 'Edit', 'audio': 'Audio', 'video': 'Video', 'open': 'Open', 'quit': 'Quit', 'clear.file.list': 'Clear file list', 'output.audio': 'Output audio', 'hdmi': 'HDMI', 'local': 'local', 'both': 'both', 'adjust.framerate': 'Adjust framerate/resolution to video', 'background.black': 'Set background to black'}
def simple(request): return { 'simple': { 'boolean': True, 'list': [1, 2, 3], } } def is_authenticated(request): is_authenticated = request.user and request.user.is_authenticated if callable(is_authenticated): is_authenticated = is_authenticated() return { 'is_authenticated': is_authenticated, }
def simple(request): return {'simple': {'boolean': True, 'list': [1, 2, 3]}} def is_authenticated(request): is_authenticated = request.user and request.user.is_authenticated if callable(is_authenticated): is_authenticated = is_authenticated() return {'is_authenticated': is_authenticated}
class Generating: def __init__(self, node): self._node = node def generatetoaddress(self, nblocks, address, maxtries=1): # 01 return self._node._rpc.call("generatetoaddress", nblocks, address, maxtries)
class Generating: def __init__(self, node): self._node = node def generatetoaddress(self, nblocks, address, maxtries=1): return self._node._rpc.call('generatetoaddress', nblocks, address, maxtries)
n_h1=100 n_h2=100 n_h3=100 batch_size=20
n_h1 = 100 n_h2 = 100 n_h3 = 100 batch_size = 20
class URI: prefix = { 'dbpedia': 'http://dbpedia.org/page/', 'dbr': 'http://dbpedia.org/resource/', 'dbo': 'http://dbpedia.org/ontology/', 'rdfs': 'http://www.w3.org/2000/01/rdf-schema#', 'xsd': 'http://www.w3.org/2001/XMLSchema#', 'dt': 'http://dbpedia.org/datatype/', } def __init__(self, prefix, suffix): if prefix in URI.prefix: self.prefix = prefix else: raise Exception('Unknown prefix "{:s}"!'.format(prefix)) self.suffix = suffix @classmethod def parse(cls, uri, fallback_prefix=None): if uri.startswith('http://'): for prefix_short, prefix_long in URI.prefix.items(): if uri.startswith(prefix_long): suffix = uri.replace(prefix_long, '') return URI(prefix_short, suffix) else: raise Exception('Unknown prefix in "{:s}"!'.format(uri)) else: if ':' in uri: prefix, suffix = uri.split(':', 1) if prefix in URI.prefix: return URI(prefix, suffix) if fallback_prefix is None: raise Exception('Ambiguous URI "{:s}"!'.format(uri)) else: return URI(fallback_prefix, uri) def __str__(self): return self.short() def short(self): return '{:s}:{:s}'.format(self.prefix, self.suffix) def long(self): return '{:s}{:s}'.format( URI.prefix[self.prefix], self.suffix )
class Uri: prefix = {'dbpedia': 'http://dbpedia.org/page/', 'dbr': 'http://dbpedia.org/resource/', 'dbo': 'http://dbpedia.org/ontology/', 'rdfs': 'http://www.w3.org/2000/01/rdf-schema#', 'xsd': 'http://www.w3.org/2001/XMLSchema#', 'dt': 'http://dbpedia.org/datatype/'} def __init__(self, prefix, suffix): if prefix in URI.prefix: self.prefix = prefix else: raise exception('Unknown prefix "{:s}"!'.format(prefix)) self.suffix = suffix @classmethod def parse(cls, uri, fallback_prefix=None): if uri.startswith('http://'): for (prefix_short, prefix_long) in URI.prefix.items(): if uri.startswith(prefix_long): suffix = uri.replace(prefix_long, '') return uri(prefix_short, suffix) else: raise exception('Unknown prefix in "{:s}"!'.format(uri)) else: if ':' in uri: (prefix, suffix) = uri.split(':', 1) if prefix in URI.prefix: return uri(prefix, suffix) if fallback_prefix is None: raise exception('Ambiguous URI "{:s}"!'.format(uri)) else: return uri(fallback_prefix, uri) def __str__(self): return self.short() def short(self): return '{:s}:{:s}'.format(self.prefix, self.suffix) def long(self): return '{:s}{:s}'.format(URI.prefix[self.prefix], self.suffix)
class Solution: def myPow(self, x: float, n: int) -> float: if n < 0: val = 1 / self._myPow(x, -n) else: val = self._myPow(x, n) return val def _myPow(self, x: float, n: int) -> float: if n == 1: return x if n == 0: return 1 else: half = n // 2 remainder = n - 2 * half val = self._myPow(x, half) val *= val if remainder > 0: val *= x return val
class Solution: def my_pow(self, x: float, n: int) -> float: if n < 0: val = 1 / self._myPow(x, -n) else: val = self._myPow(x, n) return val def _my_pow(self, x: float, n: int) -> float: if n == 1: return x if n == 0: return 1 else: half = n // 2 remainder = n - 2 * half val = self._myPow(x, half) val *= val if remainder > 0: val *= x return val
#1. Idea is we use a stack, where each element in the stack is a list, the list contains the current string and current repeat value, we know it is the current string because we have not yet hit a closed bracket because once we hit the closed bracket we pop off. #2. Initialize a stack which contains an empty string and int 1. This is just our final element in the stack which we need to return. #3. Iterate through the string, we do k * 10 + int(i) because in this would be the best way to get values numerical values greater than 1 digit. #4. Next we see if we have a open bracket, if we do that means we start a new list and we will build the string in this list until we hit a closing bracket, we also add the k value, remember to reset the k value at this step also for each new list. #5. Finally, if we hit a closing bracket we assign two variables, one wil hold the string the other will hold the numerical value we will then mutliply that string and add it to our previous stack list element, this is how we continously build our string but adding the previous lists strings in the stack. #6. If we have simple character then just add it onto the current string portion of the list at the top of the stack. #7. Return the string portion of the last element in the stack which will hold the decoded list. def decodeString(self, s): stack = [["", 1]] k = 0 for i in s: if i.isdigit(): k = k * 10 + int(i) elif i == '[': stack.append(["", k]) k = 0 elif i == ']': char_string, repeat_val = stack.pop() stack[-1][0] += char_string * repeat_val else: stack[-1][0] += i return stack[-1][0]
def decode_string(self, s): stack = [['', 1]] k = 0 for i in s: if i.isdigit(): k = k * 10 + int(i) elif i == '[': stack.append(['', k]) k = 0 elif i == ']': (char_string, repeat_val) = stack.pop() stack[-1][0] += char_string * repeat_val else: stack[-1][0] += i return stack[-1][0]
T = int(input()) for _ in range(T): h = 1 for i in range(int(input())): if i % 2 == 0: h *= 2 else: h += 1 print(h)
t = int(input()) for _ in range(T): h = 1 for i in range(int(input())): if i % 2 == 0: h *= 2 else: h += 1 print(h)
class Queue(object): def __init__(self): self.queue = [] self.size = 0 def isEmpty(self): return self.queue == [] def enqueue(self, item): self.queue.insert(0, item) self.size += 1 def dequeu(self): if not self.isEmpty(): self.size -= 1 return self.queue.pop() else: return "The queue is already empty" def queue_size(self): return self.size
class Queue(object): def __init__(self): self.queue = [] self.size = 0 def is_empty(self): return self.queue == [] def enqueue(self, item): self.queue.insert(0, item) self.size += 1 def dequeu(self): if not self.isEmpty(): self.size -= 1 return self.queue.pop() else: return 'The queue is already empty' def queue_size(self): return self.size
#!/usr/bin/env python ord_numbers = [] for i in range(1,50): ord_numbers.append(i) print(ord_numbers) for j in ord_numbers: if j == 13: continue elif j > 39: break else: print(j)
ord_numbers = [] for i in range(1, 50): ord_numbers.append(i) print(ord_numbers) for j in ord_numbers: if j == 13: continue elif j > 39: break else: print(j)
doc(title="PaddlePaddle Use-Cases", underline_char="=", entries=[ "resnet50/paddle-resnet50.rst", "ssd/paddle-ssd.rst", "tsm/paddle-tsm.rst", ])
doc(title='PaddlePaddle Use-Cases', underline_char='=', entries=['resnet50/paddle-resnet50.rst', 'ssd/paddle-ssd.rst', 'tsm/paddle-tsm.rst'])
def generate_worklist(n, n_process, generate_mode="random", time_weights=None): works_type = {} works = [] if generate_mode == "random": minimum_time = 10 maximum_time = 300 reset_time_weights_prob = 0.05 time_weights = [random.randint(minimum_time, maximum_time) for i in range(n_process)] type_name = time.time() works_type[type_name] = {"time":time_weights, "sort":[[] for np in range(N_PROCESS-1)]} for i in range(n): work = {} work["type"] = type_name work["time"] = [] for tw in time_weights: tmp = np.random.normal(tw, np.log(tw)) if tmp < 0: tmp = 0 work["time"].append(tmp) if random.random() < reset_time_weights_prob: time_weights = [random.randint(minimum_time, maximum_time) for i in range(n_process)] type_name = time.time() works_type[type_name] = {"time":time_weights, "sort":[[] for np in range(N_PROCESS-1)]} works.append(work) return works, works_type def get_conveyor(works): n_work, n_process_seq = works.shape conveyor = np.zeros((n_work, n_process_seq+(n_work-1))) conveyor_mask = np.zeros((n_work, n_process_seq+(n_work-1))) index = np.zeros((n_work, n_process_seq)).astype(np.int32) index_process_seq = np.arange(n_process_seq) index_work = np.arange(n_work) index += index_process_seq index += index_work.reshape(-1, 1) conveyor[index_work.reshape(-1,1), index] += works conveyor_mask[index_work.reshape(-1, 1), index] += 1 return conveyor, conveyor_mask def cal_conveyor_time(conveyor): return sum(np.amax(conveyor, axis=0)) def cal_works_time(works): return cal_conveyor_time(get_conveyor(works))
def generate_worklist(n, n_process, generate_mode='random', time_weights=None): works_type = {} works = [] if generate_mode == 'random': minimum_time = 10 maximum_time = 300 reset_time_weights_prob = 0.05 time_weights = [random.randint(minimum_time, maximum_time) for i in range(n_process)] type_name = time.time() works_type[type_name] = {'time': time_weights, 'sort': [[] for np in range(N_PROCESS - 1)]} for i in range(n): work = {} work['type'] = type_name work['time'] = [] for tw in time_weights: tmp = np.random.normal(tw, np.log(tw)) if tmp < 0: tmp = 0 work['time'].append(tmp) if random.random() < reset_time_weights_prob: time_weights = [random.randint(minimum_time, maximum_time) for i in range(n_process)] type_name = time.time() works_type[type_name] = {'time': time_weights, 'sort': [[] for np in range(N_PROCESS - 1)]} works.append(work) return (works, works_type) def get_conveyor(works): (n_work, n_process_seq) = works.shape conveyor = np.zeros((n_work, n_process_seq + (n_work - 1))) conveyor_mask = np.zeros((n_work, n_process_seq + (n_work - 1))) index = np.zeros((n_work, n_process_seq)).astype(np.int32) index_process_seq = np.arange(n_process_seq) index_work = np.arange(n_work) index += index_process_seq index += index_work.reshape(-1, 1) conveyor[index_work.reshape(-1, 1), index] += works conveyor_mask[index_work.reshape(-1, 1), index] += 1 return (conveyor, conveyor_mask) def cal_conveyor_time(conveyor): return sum(np.amax(conveyor, axis=0)) def cal_works_time(works): return cal_conveyor_time(get_conveyor(works))
class Node: def __init__(self, item): self.item = item self.left = None self.right = None class BinaryTree: def __init__(self, root): self.root = root def insert(self, root, node): if node.item < root.item: if not root.left: root.left = node else: self.insert(root.left, node) else: if not root.right: root.right = node else: self.insert(root.right, node) def visit(self, node): print(node.item) def inorder(self, root): if root.left: self.inorder(root.left) self.visit(root) if root.right: self.inorder(root.right) def max_depth(self, root): # leaf node if not root: return 0 return 1 + max(self.max_depth(root.left), self.max_depth(root.right)) t = BinaryTree(Node(10)) t.insert(t.root, Node(11)) t.insert(t.root, Node(2)) t.insert(t.root, Node(-1)) t.insert(t.root, Node(7)) t.insert(t.root, Node(17)) t.inorder(t.root) print(t.max_depth(t.root))
class Node: def __init__(self, item): self.item = item self.left = None self.right = None class Binarytree: def __init__(self, root): self.root = root def insert(self, root, node): if node.item < root.item: if not root.left: root.left = node else: self.insert(root.left, node) elif not root.right: root.right = node else: self.insert(root.right, node) def visit(self, node): print(node.item) def inorder(self, root): if root.left: self.inorder(root.left) self.visit(root) if root.right: self.inorder(root.right) def max_depth(self, root): if not root: return 0 return 1 + max(self.max_depth(root.left), self.max_depth(root.right)) t = binary_tree(node(10)) t.insert(t.root, node(11)) t.insert(t.root, node(2)) t.insert(t.root, node(-1)) t.insert(t.root, node(7)) t.insert(t.root, node(17)) t.inorder(t.root) print(t.max_depth(t.root))
API_STAGE = 'dev' APP_FUNCTION = 'handler_for_events' APP_MODULE = 'tests.test_event_script_app' DEBUG = 'True' DJANGO_SETTINGS = None DOMAIN = 'api.example.com' ENVIRONMENT_VARIABLES = {} LOG_LEVEL = 'DEBUG' PROJECT_NAME = 'test_event_script_app' COGNITO_TRIGGER_MAPPING = {}
api_stage = 'dev' app_function = 'handler_for_events' app_module = 'tests.test_event_script_app' debug = 'True' django_settings = None domain = 'api.example.com' environment_variables = {} log_level = 'DEBUG' project_name = 'test_event_script_app' cognito_trigger_mapping = {}
AVAILABLE_OUTPUTS = [ (20, 'out 1'), (21, 'out 2') ]
available_outputs = [(20, 'out 1'), (21, 'out 2')]
# Definition for a binary tree node. class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = None class Solution: def isValidBST(self, root): def util(root, low, high): if not root: return True return low < root.val and root.val < high and util(root.left, low, root.val) and util(root.right, root.val, high) return util(root, -float("INF"), float("INF"))
class Treenode: def __init__(self, x): self.val = x self.left = None self.right = None class Solution: def is_valid_bst(self, root): def util(root, low, high): if not root: return True return low < root.val and root.val < high and util(root.left, low, root.val) and util(root.right, root.val, high) return util(root, -float('INF'), float('INF'))
#input # 28 # RP PP RR PS RP # PR PP SR PS SS RR RS RP # PR SP PR RS RP PP RS # RP PS PS PR SS RR PP PR SP SP RR PR PS PS SP # RS PS RR PR RP PR RS SR SR RR PP PP SR RS RP # RR RR RR SP PR RP RR PP SP PS RR RS SP # SS RP RP PP SS RR RP PS SP RR RS SR RS RS SS PS # SR SP SR RP RP SS SP PP SS SS SS SS RP # SR PP RP PP RP SS SR PP RR RP # RR SS RP SR RP RP SS PP RR SS SP PR SS PR RS SR RP # PR SS PR SS SS PP RP RS # PR PP RS PR SP # RR PP RR RP RR RR RS PR RS RP RP RS # RR SR SR PS PR RP PP SS SS SP PR SR # PP SS PR RP SR RS SR PS # SR SS SP SS RR SR PR PR # RP RR RS PP SR PP SS PR PR SR SP PR PP SP # SP RP PP PP RS PR PS RR PR SP RS # SR PR PP SP RR SP SR RP PR # SS SS RR RS SP PR RP SP RR RS RP PS RS # PR PP SR PS RP # SR SR PR SR PR PP SS RP # RP SS PR PP RS PP RS RP PP RP PP SS SP PP PR # SP SS RR RP PS RS RS # PP SS RR RR SS SP RR SR RR RS RR SS PP RP PR # RP RS SP SS PS PS SS SR SS RS RR PS # RS RS RS SP RS PP SR RP SS PP SP # PP RP SS PS RP RS PR PR RR PS SP SP def convert_sign(s): if (s == 'R'): return 0 elif (s == 'P'): return 1 else: return 2 def winner(seq): a = convert_sign(seq[0]) b = convert_sign(seq[1]) res = (a - b + 3) % 3 if res == 0: return -1 elif res == 1: return 0 else: return 1 def check_winner(s): player = [0,0] for i in range(0, len(s)): win = winner(s[i]) if win != -1: player[win] += 1 if player[0] > player[1]: return 0 elif player[0] < player[1]: return 1 else: return -1 def main(): n = int(input()) for i in range(0, n): seq = input().split() winner = check_winner(seq) if winner == -1: return print(winner + 1, "", end="") if __name__ == "__main__": main()
def convert_sign(s): if s == 'R': return 0 elif s == 'P': return 1 else: return 2 def winner(seq): a = convert_sign(seq[0]) b = convert_sign(seq[1]) res = (a - b + 3) % 3 if res == 0: return -1 elif res == 1: return 0 else: return 1 def check_winner(s): player = [0, 0] for i in range(0, len(s)): win = winner(s[i]) if win != -1: player[win] += 1 if player[0] > player[1]: return 0 elif player[0] < player[1]: return 1 else: return -1 def main(): n = int(input()) for i in range(0, n): seq = input().split() winner = check_winner(seq) if winner == -1: return print(winner + 1, '', end='') if __name__ == '__main__': main()
sum =0 n = 99 while n>0: sum = sum+n n=n-2 if n<10: break print(sum) #---------- for x in range(101): if x%2==0: continue else: print(x) #---------- y = 0 while True: print(y) y=y+1
sum = 0 n = 99 while n > 0: sum = sum + n n = n - 2 if n < 10: break print(sum) for x in range(101): if x % 2 == 0: continue else: print(x) y = 0 while True: print(y) y = y + 1
def imprimePorIdade(pDIct = dict()): sortedDict = sorted(pDIct.items(), key = lambda x: x[1], reverse=False) for i in sortedDict: print(i[0], i[1]) pass pass testDict = { "narto": 29, "leo": 13, "antonia": 45, "mimosa": 27, } imprimePorIdade(testDict)
def imprime_por_idade(pDIct=dict()): sorted_dict = sorted(pDIct.items(), key=lambda x: x[1], reverse=False) for i in sortedDict: print(i[0], i[1]) pass pass test_dict = {'narto': 29, 'leo': 13, 'antonia': 45, 'mimosa': 27} imprime_por_idade(testDict)
#sublist def sub_list(list): return list[1:3] result = sub_list([1,2,3,4,5]) print(result) #concatenation list1 = [1,2,4,5,6] list2 = [5,6,7,8,9] list3 = list1 + list2 print(list3) #traverse for element in list3: print(element) #list slicing def get_sublist(list): return [list[0:3], list[3:]] print(get_sublist([1,4,9,10,23])) print() #append at the end def append_to_end(list, num): list.append(num) return list result = append_to_end([1,2,4,5,6], 10) print(result) print() #average without using sum function def get_average(list): sum = 0 for element in list: sum += element return sum/len(list) print(get_average([1,2,3,4,5,6])) print() #average with sum function def get_average_with_sum_func(list): return sum(list)/len(list) result = get_average_with_sum_func([1,2,3,4,5,6]) print(result) print() #remove from list def remove_from_list(list, elements_to_remove): for element in elements_to_remove: list.remove(element) return list result = remove_from_list([1,2,3,4,5,6,7,8],[5,8]) print(result) print()
def sub_list(list): return list[1:3] result = sub_list([1, 2, 3, 4, 5]) print(result) list1 = [1, 2, 4, 5, 6] list2 = [5, 6, 7, 8, 9] list3 = list1 + list2 print(list3) for element in list3: print(element) def get_sublist(list): return [list[0:3], list[3:]] print(get_sublist([1, 4, 9, 10, 23])) print() def append_to_end(list, num): list.append(num) return list result = append_to_end([1, 2, 4, 5, 6], 10) print(result) print() def get_average(list): sum = 0 for element in list: sum += element return sum / len(list) print(get_average([1, 2, 3, 4, 5, 6])) print() def get_average_with_sum_func(list): return sum(list) / len(list) result = get_average_with_sum_func([1, 2, 3, 4, 5, 6]) print(result) print() def remove_from_list(list, elements_to_remove): for element in elements_to_remove: list.remove(element) return list result = remove_from_list([1, 2, 3, 4, 5, 6, 7, 8], [5, 8]) print(result) print()
# _*_ coding:utf-8 _*_ #!/usr/local/bin/python encrypted = [6,3,1,7,5,8,9,2,4] def decrypt(encryptedTxt): head = 0 tail = len(encryptedTxt)-1 decrypted = [] while len(encryptedTxt)>0: decrypted.append(encryptedTxt[0]) del encryptedTxt[0] print(encryptedTxt) if(len(encryptedTxt)<=0): break encryptedTxt.append(encryptedTxt[0]) del encryptedTxt[0] print(encryptedTxt) return decrypted if __name__ == "__main__": decrypted = decrypt(encrypted) print(decrypted)
encrypted = [6, 3, 1, 7, 5, 8, 9, 2, 4] def decrypt(encryptedTxt): head = 0 tail = len(encryptedTxt) - 1 decrypted = [] while len(encryptedTxt) > 0: decrypted.append(encryptedTxt[0]) del encryptedTxt[0] print(encryptedTxt) if len(encryptedTxt) <= 0: break encryptedTxt.append(encryptedTxt[0]) del encryptedTxt[0] print(encryptedTxt) return decrypted if __name__ == '__main__': decrypted = decrypt(encrypted) print(decrypted)
# https://www.codewars.com/kata/550554fd08b86f84fe000a58/train/python def in_array(array1, array2): result = [] array1 = list(set(array1)) for arr1_element in array1: for arr2_element in array2: if arr2_element.count(arr1_element) != 0: result.append(arr1_element) break return sorted(result)
def in_array(array1, array2): result = [] array1 = list(set(array1)) for arr1_element in array1: for arr2_element in array2: if arr2_element.count(arr1_element) != 0: result.append(arr1_element) break return sorted(result)
class MyCircularQueue: def __init__(self, k: int): self.q = [None] * k self.front_idx = -1 self.back_idx = -1 self.capacity = k def display_elements(self): print("The elements in the Queue are ") print_str = "" # add the elements to the print string for i in range(self.capacity): print_str += str(self.q[i]) + " " print(print_str) def enQueue(self, value: int) -> bool: # if the queue is full return false if self.isFull(): print("The queue is full..") return False # if the front index is negative, update its value to 0 if self.front_idx == -1: self.front_idx = 0 # increment the back index self.back_idx = (self.back_idx + 1) % self.capacity # update the queue value self.q[self.back_idx] = value return True def deQueue(self) -> bool: # if the queue is empty return false if self.front_idx == -1: print("The queue is empty..") return False self.q[self.front_idx] = None # if the front and back indices are the same reset the queue indices if self.front_idx == self.back_idx: self.front_idx = -1 self.back_idx = -1 else: # increment the front idx self.front_idx = (self.front_idx + 1) % self.capacity return True def Front(self) -> int: # if the front idx is -1 return -1 else the front value return -1 if self.front_idx == -1 else self.q[self.front_idx] def Rear(self) -> int: # if the rear idx is -1 return -1 else the back value return -1 if self.back_idx == -1 else self.q[self.back_idx] # check if queue is empty def isEmpty(self) -> bool: return self.front_idx == -1 # check if queue is full def isFull(self) -> bool: return (self.back_idx + 1) % self.capacity == self.front_idx def main(): Queue = MyCircularQueue(10) Queue.enQueue(20) Queue.enQueue(10) Queue.display_elements() Queue.deQueue() Queue.enQueue(20) Queue.enQueue(10) Queue.enQueue(20) Queue.enQueue(10) Queue.enQueue(20) Queue.enQueue(10) Queue.enQueue(20) Queue.enQueue(10) Queue.enQueue(20) Queue.enQueue(10) Queue.enQueue(20) Queue.enQueue(10) Queue.enQueue(20) Queue.enQueue(10) Queue.display_elements() print("The front element of the queue is " + str(Queue.Front())) print("The rear element of the queue is " + str(Queue.Rear())) Queue.deQueue() Queue.deQueue() Queue.deQueue() Queue.deQueue() Queue.deQueue() Queue.deQueue() Queue.deQueue() Queue.deQueue() Queue.deQueue() print("The front element of the queue is " + str(Queue.Front())) print("The rear element of the queue is " + str(Queue.Rear())) Queue.display_elements() if __name__ == "__main__": main()
class Mycircularqueue: def __init__(self, k: int): self.q = [None] * k self.front_idx = -1 self.back_idx = -1 self.capacity = k def display_elements(self): print('The elements in the Queue are ') print_str = '' for i in range(self.capacity): print_str += str(self.q[i]) + ' ' print(print_str) def en_queue(self, value: int) -> bool: if self.isFull(): print('The queue is full..') return False if self.front_idx == -1: self.front_idx = 0 self.back_idx = (self.back_idx + 1) % self.capacity self.q[self.back_idx] = value return True def de_queue(self) -> bool: if self.front_idx == -1: print('The queue is empty..') return False self.q[self.front_idx] = None if self.front_idx == self.back_idx: self.front_idx = -1 self.back_idx = -1 else: self.front_idx = (self.front_idx + 1) % self.capacity return True def front(self) -> int: return -1 if self.front_idx == -1 else self.q[self.front_idx] def rear(self) -> int: return -1 if self.back_idx == -1 else self.q[self.back_idx] def is_empty(self) -> bool: return self.front_idx == -1 def is_full(self) -> bool: return (self.back_idx + 1) % self.capacity == self.front_idx def main(): queue = my_circular_queue(10) Queue.enQueue(20) Queue.enQueue(10) Queue.display_elements() Queue.deQueue() Queue.enQueue(20) Queue.enQueue(10) Queue.enQueue(20) Queue.enQueue(10) Queue.enQueue(20) Queue.enQueue(10) Queue.enQueue(20) Queue.enQueue(10) Queue.enQueue(20) Queue.enQueue(10) Queue.enQueue(20) Queue.enQueue(10) Queue.enQueue(20) Queue.enQueue(10) Queue.display_elements() print('The front element of the queue is ' + str(Queue.Front())) print('The rear element of the queue is ' + str(Queue.Rear())) Queue.deQueue() Queue.deQueue() Queue.deQueue() Queue.deQueue() Queue.deQueue() Queue.deQueue() Queue.deQueue() Queue.deQueue() Queue.deQueue() print('The front element of the queue is ' + str(Queue.Front())) print('The rear element of the queue is ' + str(Queue.Rear())) Queue.display_elements() if __name__ == '__main__': main()
def binary_search(search_val, search_list): midpoint = (len(search_list)-1) // 2 if search_val == search_list[midpoint]: return True elif len(search_list) == 1 and search_val != search_list[0]: return False elif search_val > search_list[midpoint]: return binary_search(search_val, search_list[midpoint:]) else: return binary_search(search_val, search_list[:midpoint]) def main(): test_list = [7, 1, 16, 100, 5, 8, 101, 2, 6, 1560] test_list_sorted = sorted(test_list) search_val = 101 print(binary_search(search_val, test_list_sorted)) if __name__ == "__main__": main()
def binary_search(search_val, search_list): midpoint = (len(search_list) - 1) // 2 if search_val == search_list[midpoint]: return True elif len(search_list) == 1 and search_val != search_list[0]: return False elif search_val > search_list[midpoint]: return binary_search(search_val, search_list[midpoint:]) else: return binary_search(search_val, search_list[:midpoint]) def main(): test_list = [7, 1, 16, 100, 5, 8, 101, 2, 6, 1560] test_list_sorted = sorted(test_list) search_val = 101 print(binary_search(search_val, test_list_sorted)) if __name__ == '__main__': main()
matrix = [[0,0,0], [0,0,0], [0,0,0]] for l in range(0,3): for c in range(0,3): matrix[l][c] = int(input(f'digite um numero [{l}][{c}]: ')) print('-='*30) for l in range(0,3): for c in range(0,3): print(f'[{matrix[l][c]:^5}]', end='') print()
matrix = [[0, 0, 0], [0, 0, 0], [0, 0, 0]] for l in range(0, 3): for c in range(0, 3): matrix[l][c] = int(input(f'digite um numero [{l}][{c}]: ')) print('-=' * 30) for l in range(0, 3): for c in range(0, 3): print(f'[{matrix[l][c]:^5}]', end='') print()
# -*- coding: utf-8 -*- # Scrapy settings for FinalProject project # # For simplicity, this file contains only settings considered important or # commonly used. You can find more settings consulting the documentation: # # http://doc.scrapy.org/en/latest/topics/settings.html # http://scrapy.readthedocs.org/en/latest/topics/downloader-middleware.html # http://scrapy.readthedocs.org/en/latest/topics/spider-middleware.html BOT_NAME = 'FinalProject' SPIDER_MODULES = ['FinalProject.spiders'] NEWSPIDER_MODULE = 'FinalProject.spiders' # database connection parameters DBKWARGS = {'db': 'final_project', 'user': 'root', 'passwd': '', 'host': 'localhost', 'use_unicode': False, 'charset': 'utf8'} DB_TABLE = 'HouseRent_58' CRAWLERA_ENABLED = True CRAWLERA_APIKEY = '0ccaed0e66654294baf419f03c32344d' # CRAWLERA_PRESERVE_DELAY = True # Retry many times since proxies often fail RETRY_TIMES = 10 # Retry on most error codes since proxies fail for different reasons RETRY_HTTP_CODES = [500, 503, 504, 400, 403, 404, 408, 301, 302, 429] # Proxy list containing entries like # http://host1:port # http://username:password@host2:port # http://host3:port # ... PROXY_LIST = 'proxies.txt' # Proxy mode # 0 = Every requests have different proxy # 1 = Take only one proxy from the list and assign it to every requests # 2 = Put a custom proxy to use in the settings PROXY_MODE = 0 # Crawl responsibly by identifying yourself (and your website) on the user-agent USER_AGENT = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36" USER_AGENTS = [ "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; AcooBrowser; .NET CLR 1.1.4322; .NET CLR 2.0.50727)", "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Acoo Browser; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506)", "Mozilla/4.0 (compatible; MSIE 7.0; AOL 9.5; AOLBuild 4337.35; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)", "Mozilla/5.0 (Windows; U; MSIE 9.0; Windows NT 9.0; en-US)", "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET CLR 2.0.50727; Media Center PC 6.0)", "Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET CLR 1.0.3705; .NET CLR 1.1.4322)", "Mozilla/4.0 (compatible; MSIE 7.0b; Windows NT 5.2; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.2; .NET CLR 3.0.04506.30)", "Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN) AppleWebKit/523.15 (KHTML, like Gecko, Safari/419.3) Arora/0.3 (Change: 287 c9dfb30)", "Mozilla/5.0 (X11; U; Linux; en-US) AppleWebKit/527+ (KHTML, like Gecko, Safari/419.3) Arora/0.6", "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.2pre) Gecko/20070215 K-Ninja/2.1.1", "Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9) Gecko/20080705 Firefox/3.0 Kapiko/3.0", "Mozilla/5.0 (X11; Linux i686; U;) Gecko/20070322 Kazehakase/0.4.5", "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.8) Gecko Fedora/1.9.0.8-1.fc10 Kazehakase/0.5.6", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/535.20 (KHTML, like Gecko) Chrome/19.0.1036.7 Safari/535.20", "Opera/9.80 (Macintosh; Intel Mac OS X 10.6.8; U; fr) Presto/2.9.168 Version/11.52", ] # Obey robots.txt rules # ROBOTSTXT_OBEY = True # Configure maximum concurrent requests performed by Scrapy (default: 16) # CONCURRENT_REQUESTS = 32 # Configure a delay for requests for the same website (default: 0) # See http://scrapy.readthedocs.org/en/latest/topics/settings.html#download-delay # See also autothrottle settings and docs # DOWNLOAD_DELAY = 1 # RANDOMIZE_DOWNLOAD_DELAY = True # The download delay setting will honor only one of: # CONCURRENT_REQUESTS_PER_DOMAIN = 16 # CONCURRENT_REQUESTS_PER_IP = 16 # Disable cookies (enabled by default) # COOKIES_ENABLED = False # Disable Telnet Console (enabled by default) # TELNETCONSOLE_ENABLED = False # Override the default request headers: # DEFAULT_REQUEST_HEADERS = { # 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', # 'Accept-Language': 'en', # } # Enable or disable spider middlewares # See http://scrapy.readthedocs.org/en/latest/topics/spider-middleware.html # SPIDER_MIDDLEWARES = { # 'FinalProject.middlewares.FinalprojectSpiderMiddleware': 543, # } # Enable or disable downloader middlewares # See http://scrapy.readthedocs.org/en/latest/topics/downloader-middleware.html DOWNLOADER_MIDDLEWARES = { # 'scrapy.downloadermiddlewares.retry.RetryMiddleware': 90, # 'FinalProject.middlewares.RandomProxy': 100, # 'scrapy.downloadermiddlewares.httpproxy.HttpProxyMiddleware': 110, # 'FinalProject.middlewares.RandomUserAgent': 120, 'FinalProject.middlewares.CustomDownloaderMiddleware': 200, 'scrapy_crawlera.CrawleraMiddleware': 610 } # Enable or disable extensions # See http://scrapy.readthedocs.org/en/latest/topics/extensions.html # EXTENSIONS = { # 'scrapy.extensions.telnet.TelnetConsole': None, # } # Configure item pipelines # See http://scrapy.readthedocs.org/en/latest/topics/item-pipeline.html ITEM_PIPELINES = { # 'FinalProject.pipelines.CSVPipeline': 1000, 'FinalProject.pipelines.MysqlPipeline': 1000, } # Enable and configure the AutoThrottle extension (disabled by default) # See http://doc.scrapy.org/en/latest/topics/autothrottle.html # AUTOTHROTTLE_ENABLED = True # The initial download delay # AUTOTHROTTLE_START_DELAY = 5 # The maximum download delay to be set in case of high latencies # AUTOTHROTTLE_MAX_DELAY = 60 # The average number of requests Scrapy should be sending in parallel to # each remote server # AUTOTHROTTLE_TARGET_CONCURRENCY = 1.0 # Enable showing throttling stats for every response received: # AUTOTHROTTLE_DEBUG = False # Enable and configure HTTP caching (disabled by default) # See http://scrapy.readthedocs.org/en/latest/topics/downloader-middleware.html#httpcache-middleware-settings # HTTPCACHE_ENABLED = True # HTTPCACHE_EXPIRATION_SECS = 0 # HTTPCACHE_DIR = 'httpcache' # HTTPCACHE_IGNORE_HTTP_CODES = [] # HTTPCACHE_STORAGE = 'scrapy.extensions.httpcache.FilesystemCacheStorage'
bot_name = 'FinalProject' spider_modules = ['FinalProject.spiders'] newspider_module = 'FinalProject.spiders' dbkwargs = {'db': 'final_project', 'user': 'root', 'passwd': '', 'host': 'localhost', 'use_unicode': False, 'charset': 'utf8'} db_table = 'HouseRent_58' crawlera_enabled = True crawlera_apikey = '0ccaed0e66654294baf419f03c32344d' retry_times = 10 retry_http_codes = [500, 503, 504, 400, 403, 404, 408, 301, 302, 429] proxy_list = 'proxies.txt' proxy_mode = 0 user_agent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36' user_agents = ['Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; AcooBrowser; .NET CLR 1.1.4322; .NET CLR 2.0.50727)', 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Acoo Browser; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506)', 'Mozilla/4.0 (compatible; MSIE 7.0; AOL 9.5; AOLBuild 4337.35; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)', 'Mozilla/5.0 (Windows; U; MSIE 9.0; Windows NT 9.0; en-US)', 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET CLR 2.0.50727; Media Center PC 6.0)', 'Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET CLR 1.0.3705; .NET CLR 1.1.4322)', 'Mozilla/4.0 (compatible; MSIE 7.0b; Windows NT 5.2; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.2; .NET CLR 3.0.04506.30)', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN) AppleWebKit/523.15 (KHTML, like Gecko, Safari/419.3) Arora/0.3 (Change: 287 c9dfb30)', 'Mozilla/5.0 (X11; U; Linux; en-US) AppleWebKit/527+ (KHTML, like Gecko, Safari/419.3) Arora/0.6', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.2pre) Gecko/20070215 K-Ninja/2.1.1', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9) Gecko/20080705 Firefox/3.0 Kapiko/3.0', 'Mozilla/5.0 (X11; Linux i686; U;) Gecko/20070322 Kazehakase/0.4.5', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.8) Gecko Fedora/1.9.0.8-1.fc10 Kazehakase/0.5.6', 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/535.20 (KHTML, like Gecko) Chrome/19.0.1036.7 Safari/535.20', 'Opera/9.80 (Macintosh; Intel Mac OS X 10.6.8; U; fr) Presto/2.9.168 Version/11.52'] downloader_middlewares = {'FinalProject.middlewares.CustomDownloaderMiddleware': 200, 'scrapy_crawlera.CrawleraMiddleware': 610} item_pipelines = {'FinalProject.pipelines.MysqlPipeline': 1000}
class Solution: def stringMatching(self, words: List[str]) -> List[str]: words.sort(key=len) res = [] lps = [self._compute_lps(w) for w in words[:-1]] for i in range(len(words)): for j in range(i + 1, len(words)): if self._kmp(words[i], words[j], lps[i]): res.append(words[i]) break return res def _kmp(self, w, s, lps): i, j = 0, 0 c = 0 while i < len(s): if s[i] == w[j]: i += 1 j += 1 if j == len(w): return True else: if j != 0: j = lps[j-1] else: i += 1 return False def _compute_lps(self, w): n = len(w) lps = [0] * n i = 1 p = 0 while i < n: if w[i] == w[p]: p += 1 lps[i] = p i += 1 else: if p != 0: p = lps[p-1] else: p = 0 i += 1 return lps
class Solution: def string_matching(self, words: List[str]) -> List[str]: words.sort(key=len) res = [] lps = [self._compute_lps(w) for w in words[:-1]] for i in range(len(words)): for j in range(i + 1, len(words)): if self._kmp(words[i], words[j], lps[i]): res.append(words[i]) break return res def _kmp(self, w, s, lps): (i, j) = (0, 0) c = 0 while i < len(s): if s[i] == w[j]: i += 1 j += 1 if j == len(w): return True elif j != 0: j = lps[j - 1] else: i += 1 return False def _compute_lps(self, w): n = len(w) lps = [0] * n i = 1 p = 0 while i < n: if w[i] == w[p]: p += 1 lps[i] = p i += 1 elif p != 0: p = lps[p - 1] else: p = 0 i += 1 return lps
def char_concat(word): string = '' for i in range(int(len(word)/2)): string += word[i] + word[-i-1] + str(i+1) return string
def char_concat(word): string = '' for i in range(int(len(word) / 2)): string += word[i] + word[-i - 1] + str(i + 1) return string
def test_chain_web3_is_preconfigured_with_default_from(project): default_account = '0x0000000000000000000000000000000000001234' project.config['web3.Tester.eth.default_account'] = default_account with project.get_chain('tester') as chain: web3 = chain.web3 assert web3.eth.defaultAccount == default_account assert web3.eth.coinbase != default_account
def test_chain_web3_is_preconfigured_with_default_from(project): default_account = '0x0000000000000000000000000000000000001234' project.config['web3.Tester.eth.default_account'] = default_account with project.get_chain('tester') as chain: web3 = chain.web3 assert web3.eth.defaultAccount == default_account assert web3.eth.coinbase != default_account
#Ascending order n = int(input().strip()) a = list(map(int, input().strip().split(' '))) for i in range(n): for j in range(n-1): if(a[j]>a[j+1]): a[j],a[j+1]=a[j+1],a[j] print(a) #Descending order Data = [75,3,73,7,6,23,89,8] for i in range(len(Data)): for j in range(len(Data)-1): if(Data[j]<Data[j+1]): Data[j],Data[j+1]=Data[j+1],Data[j] print(Data)
n = int(input().strip()) a = list(map(int, input().strip().split(' '))) for i in range(n): for j in range(n - 1): if a[j] > a[j + 1]: (a[j], a[j + 1]) = (a[j + 1], a[j]) print(a) data = [75, 3, 73, 7, 6, 23, 89, 8] for i in range(len(Data)): for j in range(len(Data) - 1): if Data[j] < Data[j + 1]: (Data[j], Data[j + 1]) = (Data[j + 1], Data[j]) print(Data)
class Solution: def letterCasePermutation(self, S: str) -> List[str]: ans = [] self.dfs(S, 0, ans, []) return ans def dfs(self, S, i, ans, path): if i == len(S): ans.append(''.join(path)) return self.dfs(S, i+1, ans, path + [S[i]]) if S[i].isalpha(): self.dfs(S, i+1, ans, path + [S[i].swapcase()])
class Solution: def letter_case_permutation(self, S: str) -> List[str]: ans = [] self.dfs(S, 0, ans, []) return ans def dfs(self, S, i, ans, path): if i == len(S): ans.append(''.join(path)) return self.dfs(S, i + 1, ans, path + [S[i]]) if S[i].isalpha(): self.dfs(S, i + 1, ans, path + [S[i].swapcase()])
#!/usr/bin/env python3 def validate_user(username, minlen): if type(username) != str: raise TypeError("username must be a string") if len(username) < minlen: return False if not username.isalnum(): return False # Username can't begin with a number if username[0].isnumeric(): return False return True
def validate_user(username, minlen): if type(username) != str: raise type_error('username must be a string') if len(username) < minlen: return False if not username.isalnum(): return False if username[0].isnumeric(): return False return True
# # PySNMP MIB module HPN-ICF-DHCPRELAY-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HPN-ICF-DHCPRELAY-MIB # Produced by pysmi-0.3.4 at Wed May 1 13:37:51 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, SingleValueConstraint, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ValueSizeConstraint", "ConstraintsUnion", "SingleValueConstraint", "ValueRangeConstraint") hpnicfCommon, = mibBuilder.importSymbols("HPN-ICF-OID-MIB", "hpnicfCommon") ifIndex, = mibBuilder.importSymbols("IF-MIB", "ifIndex") InetAddressType, InetAddress = mibBuilder.importSymbols("INET-ADDRESS-MIB", "InetAddressType", "InetAddress") ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup") Gauge32, iso, Counter64, ModuleIdentity, TimeTicks, Integer32, NotificationType, MibScalar, MibTable, MibTableRow, MibTableColumn, Bits, MibIdentifier, IpAddress, ObjectIdentity, Unsigned32, Counter32 = mibBuilder.importSymbols("SNMPv2-SMI", "Gauge32", "iso", "Counter64", "ModuleIdentity", "TimeTicks", "Integer32", "NotificationType", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Bits", "MibIdentifier", "IpAddress", "ObjectIdentity", "Unsigned32", "Counter32") DisplayString, MacAddress, TextualConvention, TruthValue, RowStatus = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "MacAddress", "TextualConvention", "TruthValue", "RowStatus") hpnicfDhcpRelay = ModuleIdentity((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58)) hpnicfDhcpRelay.setRevisions(('2005-06-08 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: hpnicfDhcpRelay.setRevisionsDescriptions(('The initial version of this MIB module.',)) if mibBuilder.loadTexts: hpnicfDhcpRelay.setLastUpdated('200506080000Z') if mibBuilder.loadTexts: hpnicfDhcpRelay.setOrganization('') if mibBuilder.loadTexts: hpnicfDhcpRelay.setContactInfo('') if mibBuilder.loadTexts: hpnicfDhcpRelay.setDescription('DHCPR MIB') hpnicfDHCPRMibObject = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1)) hpnicfDHCPRIfSelectTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 1), ) if mibBuilder.loadTexts: hpnicfDHCPRIfSelectTable.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRIfSelectTable.setDescription('A table for configuring relay mode for interfaces. ') hpnicfDHCPRIfSelectEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex")) if mibBuilder.loadTexts: hpnicfDHCPRIfSelectEntry.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRIfSelectEntry.setDescription('An entry for configuring relay mode for an interface. ') hpnicfDHCPRIfSelectRelayMode = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 1, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("on", 1), ("off", 2))).clone('off')).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfDHCPRIfSelectRelayMode.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRIfSelectRelayMode.setDescription('If the value is on, the DHCP relay function would be enabled on this interface. ') hpnicfDHCPRIpToGroupTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 2), ) if mibBuilder.loadTexts: hpnicfDHCPRIpToGroupTable.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRIpToGroupTable.setDescription('A table for configuring ip addresses for DHCP server groups. ') hpnicfDHCPRIpToGroupEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 2, 1), ).setIndexNames((0, "HPN-ICF-DHCPRELAY-MIB", "hpnicfDHCPRIpToGroupGroupId"), (0, "HPN-ICF-DHCPRELAY-MIB", "hpnicfDHCPRIpToGroupServerIpType"), (0, "HPN-ICF-DHCPRELAY-MIB", "hpnicfDHCPRIpToGroupServerIp")) if mibBuilder.loadTexts: hpnicfDHCPRIpToGroupEntry.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRIpToGroupEntry.setDescription('An entry for configuring ip addresses for a DHCP server group. ') hpnicfDHCPRIpToGroupGroupId = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 19))) if mibBuilder.loadTexts: hpnicfDHCPRIpToGroupGroupId.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRIpToGroupGroupId.setDescription('Group identifier of DHCP server group. ') hpnicfDHCPRIpToGroupServerIpType = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 2, 1, 2), InetAddressType()) if mibBuilder.loadTexts: hpnicfDHCPRIpToGroupServerIpType.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRIpToGroupServerIpType.setDescription('Ip address type of DHCP server. ') hpnicfDHCPRIpToGroupServerIp = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 2, 1, 3), InetAddress().subtype(subtypeSpec=ValueSizeConstraint(1, 64))) if mibBuilder.loadTexts: hpnicfDHCPRIpToGroupServerIp.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRIpToGroupServerIp.setDescription('Ip address of DHCP server. ') hpnicfDHCPRIpToGroupRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 2, 1, 4), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hpnicfDHCPRIpToGroupRowStatus.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRIpToGroupRowStatus.setDescription('Operation status of this table entry. Three actions are used: active, createAndGo, destroy. ') hpnicfDHCPRIfToGroupTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 3), ) if mibBuilder.loadTexts: hpnicfDHCPRIfToGroupTable.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRIfToGroupTable.setDescription('A table for configuring DHCP server groups for interfaces. ') hpnicfDHCPRIfToGroupEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 3, 1), ).setIndexNames((0, "IF-MIB", "ifIndex")) if mibBuilder.loadTexts: hpnicfDHCPRIfToGroupEntry.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRIfToGroupEntry.setDescription('An entry for configuring DHCP server group for an interface. ') hpnicfDHCPRIfToGroupGroupId = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 3, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 19))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfDHCPRIfToGroupGroupId.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRIfToGroupGroupId.setDescription('The DHCP server group for this interface. ') hpnicfDHCPRIfToGroupRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 3, 1, 2), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hpnicfDHCPRIfToGroupRowStatus.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRIfToGroupRowStatus.setDescription('Operation status of this table entry. Three actions are used: active, createAndGo, destroy') hpnicfDHCPRAddrCheckTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 4), ) if mibBuilder.loadTexts: hpnicfDHCPRAddrCheckTable.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRAddrCheckTable.setDescription('A table containing the states of dhcp security address check switchs for interfaces. ') hpnicfDHCPRAddrCheckEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 4, 1), ).setIndexNames((0, "IF-MIB", "ifIndex")) if mibBuilder.loadTexts: hpnicfDHCPRAddrCheckEntry.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRAddrCheckEntry.setDescription('An entry containing the state of dhcp security address check switch for an interface. ') hpnicfDHCPRAddrCheckSwitch = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 4, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfDHCPRAddrCheckSwitch.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRAddrCheckSwitch.setDescription('The state of dhcp security address check switch for this interface. It has two defined values: enabled and disabled. If the value is enabled, the address check function would be enabled. The default value is disabled. ') hpnicfDHCPRSecurityTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 5), ) if mibBuilder.loadTexts: hpnicfDHCPRSecurityTable.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRSecurityTable.setDescription('A table containing the information of DHCP security. ') hpnicfDHCPRSecurityEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 5, 1), ).setIndexNames((0, "HPN-ICF-DHCPRELAY-MIB", "hpnicfDHCPRSecurityClientIpAddrType"), (0, "HPN-ICF-DHCPRELAY-MIB", "hpnicfDHCPRSecurityClientIpAddr")) if mibBuilder.loadTexts: hpnicfDHCPRSecurityEntry.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRSecurityEntry.setDescription('An entry containing the information of DHCP security. ') hpnicfDHCPRSecurityClientIpAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 5, 1, 1), InetAddressType()) if mibBuilder.loadTexts: hpnicfDHCPRSecurityClientIpAddrType.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRSecurityClientIpAddrType.setDescription("DHCP client's net ip address type") hpnicfDHCPRSecurityClientIpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 5, 1, 2), InetAddress().subtype(subtypeSpec=ValueSizeConstraint(1, 64))) if mibBuilder.loadTexts: hpnicfDHCPRSecurityClientIpAddr.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRSecurityClientIpAddr.setDescription("DHCP client's net ip address") hpnicfDHCPRSecurityClientMacAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 5, 1, 3), MacAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfDHCPRSecurityClientMacAddr.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRSecurityClientMacAddr.setDescription("DHCP client's mac address") hpnicfDHCPRSecurityClientProperty = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 5, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("static", 1), ("dynamic", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfDHCPRSecurityClientProperty.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRSecurityClientProperty.setDescription('Property of client address') hpnicfDHCPRSecurityClientRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 5, 1, 5), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hpnicfDHCPRSecurityClientRowStatus.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRSecurityClientRowStatus.setDescription('Operation status of this table entry. Three actions are used: active, createAndGo, destroy') hpnicfDHCPRStatisticsGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 6)) hpnicfDHCPRRxClientPktNum = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 6, 1), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnicfDHCPRRxClientPktNum.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRRxClientPktNum.setDescription('The total number of the packets received from DHCP clients by DHCP relay. ') hpnicfDHCPRTxClientPktNum = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 6, 2), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnicfDHCPRTxClientPktNum.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRTxClientPktNum.setDescription('The total number of the brodcast packets transmitted to DHCP clients by DHCP relay. ') hpnicfDHCPRRxServerPktNum = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 6, 3), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnicfDHCPRRxServerPktNum.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRRxServerPktNum.setDescription('The total number of the packets received from DHCP Servers by DHCP relay. ') hpnicfDHCPRTxServerPktNum = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 6, 4), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnicfDHCPRTxServerPktNum.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRTxServerPktNum.setDescription('The total number of the packets transmitted to DHCP Servers by DHCP relay. ') hpnicfDHCPRDiscoverPktNum = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 6, 5), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnicfDHCPRDiscoverPktNum.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRDiscoverPktNum.setDescription('The total number of the DHCP Discover packets handled by DHCP relay. ') hpnicfDHCPRRequestPktNum = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 6, 6), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnicfDHCPRRequestPktNum.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRRequestPktNum.setDescription('The total number of the DHCP Request packets handled by DHCP relay. ') hpnicfDHCPRDeclinePktNum = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 6, 7), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnicfDHCPRDeclinePktNum.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRDeclinePktNum.setDescription('The total number of the DHCP Decline packets handled by DHCP relay. ') hpnicfDHCPRReleasePktNum = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 6, 8), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnicfDHCPRReleasePktNum.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRReleasePktNum.setDescription('The total number of the DHCP Release packets handled by DHCP relay. ') hpnicfDHCPRInformPktNum = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 6, 9), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnicfDHCPRInformPktNum.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRInformPktNum.setDescription('The total number of the DHCP Inform packets handled by DHCP relay. ') hpnicfDHCPROfferPktNum = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 6, 10), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnicfDHCPROfferPktNum.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPROfferPktNum.setDescription('The total number of the DHCP Offer packets handled by DHCP relay. ') hpnicfDHCPRAckPktNum = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 6, 11), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnicfDHCPRAckPktNum.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRAckPktNum.setDescription('The total number of the DHCP Ack packets handled by DHCP relay. ') hpnicfDHCPRNakPktNum = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 6, 12), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnicfDHCPRNakPktNum.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRNakPktNum.setDescription('The total number of the DHCP Nak packets handled by DHCP relay. ') hpnicfDHCPRStatisticsReset = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 6, 13), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfDHCPRStatisticsReset.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRStatisticsReset.setDescription('This node only supports set operation. If the value is true,it will clear all of the packet statistics. ') hpnicfDHCPRCycleGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 7)) hpnicfDHCPRCycleStatus = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 7, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("on", 1), ("off", 2))).clone('off')).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfDHCPRCycleStatus.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRCycleStatus.setDescription('If the value is on, the cycle function would be enabled. ') hpnicfDHCPRConfigOption82Group = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 8)) hpnicfDHCPROption82Switch = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 8, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfDHCPROption82Switch.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPROption82Switch.setDescription('If the value is enabled, DHCP relay supporting option 82 function would be enabled. ') hpnicfDHCPROption82HandleStrategy = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 8, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("drop", 1), ("keep", 2), ("replace", 3))).clone('replace')).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfDHCPROption82HandleStrategy.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPROption82HandleStrategy.setDescription("The strategies of DHCP relay handling option 82. 'drop' indicates DHCP relay discarding the request packet including option 82. 'keep' indicates DHCP relay accepting the request packet without any change of the option 82. 'replace' indicates DHCP relay accepting the request packet on condition that it generates a new option 82 to replace the original one. ") hpnicfDHCPRConfigOption82IfTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 8, 3), ) if mibBuilder.loadTexts: hpnicfDHCPRConfigOption82IfTable.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRConfigOption82IfTable.setDescription('A table containing the information of DHCP option 82. This table depends on hpnicfDHCPRIfToGroupTable. An entry of this table will be created when an entry of hpnicfDHCPRIfToGroupTable is created. ') hpnicfDHCPRConfigOption82IfEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 8, 3, 1), ).setIndexNames((0, "IF-MIB", "ifIndex")) if mibBuilder.loadTexts: hpnicfDHCPRConfigOption82IfEntry.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRConfigOption82IfEntry.setDescription('An entry containing the information of DHCP option 82. ') hpnicfDHCPROption82IfSwitch = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 8, 3, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfDHCPROption82IfSwitch.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPROption82IfSwitch.setDescription("If DHCP relay supports option 82 functions, the value is 'enabled'. If DHCP relay does not support option 82 functions, the value is 'disabled'. ") hpnicfDHCPROption82IfStrategy = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 8, 3, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("drop", 1), ("keep", 2), ("replace", 3))).clone('replace')).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfDHCPROption82IfStrategy.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPROption82IfStrategy.setDescription("The strategies of DHCP relay handling option 82. 'drop' indicates DHCP relay discarding the request packet including option 82. 'keep' indicates DHCP relay accepting the request packet without any change of the option 82. 'replace' indicates DHCP relay accepting the request packet on condition that it generates a new option 82 to replace the original one. ") hpnicfDHCPROption82IfFormat = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 8, 3, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("normal", 1), ("verbose", 2))).clone('normal')).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfDHCPROption82IfFormat.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPROption82IfFormat.setDescription("The format of DHCP relay option 82. 'normal' is the standard format. 'verbose' is the detailed format. ") hpnicfDHCPROption82IfNodeType = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 8, 3, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("invalid", 1), ("mac", 2), ("sysname", 3), ("userdefine", 4))).clone('invalid')).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfDHCPROption82IfNodeType.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPROption82IfNodeType.setDescription("Property of DHCP relay option 82 verbose format. The value can be set by user only when the value of hpnicfDHCPROption82IfFormat is set with 'verbose'. If the value of hpnicfDHCPROption82IfFormat is 'normal', the value is automatically set with 'invalid'. the value can not be set with 'invalid' by user. 'mac' indicates the option 82 verbose format is filled in with the mac of DHCP relay input interface. If the value of hpnicfDHCPROption82IfFormat is set with 'verbose', the value is automatically set with 'mac'. 'sysname' indicates the option 82 verbose format is filled in with the name of the DHCP relay. 'userdefine' indicates the option 82 verbose format is filled in with the string defined by user. If the value is set with 'userdefine', the value of hpnicfDHCPROption82IfUsrDefString must be set simultaneously. ") hpnicfDHCPROption82IfUsrDefString = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 8, 3, 1, 5), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 256))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfDHCPROption82IfUsrDefString.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPROption82IfUsrDefString.setDescription("The string defined by user to fill in the option 82 verbose format. If the value of hpnicfDHCPROption82IfFormat is 'normal', or the value of hpnicfDHCPROption82IfNodeType is 'mac' or 'sysname', it is set with a null string automatically and can not be modified by user. It must be set with a non-zero length string when the value of hpnicfDHCPROption82IfNodeType is set with 'userdefine'. ") mibBuilder.exportSymbols("HPN-ICF-DHCPRELAY-MIB", hpnicfDHCPRSecurityClientRowStatus=hpnicfDHCPRSecurityClientRowStatus, hpnicfDHCPRRequestPktNum=hpnicfDHCPRRequestPktNum, hpnicfDHCPRInformPktNum=hpnicfDHCPRInformPktNum, hpnicfDHCPRIpToGroupServerIpType=hpnicfDHCPRIpToGroupServerIpType, hpnicfDHCPRSecurityEntry=hpnicfDHCPRSecurityEntry, hpnicfDHCPRDiscoverPktNum=hpnicfDHCPRDiscoverPktNum, hpnicfDHCPRReleasePktNum=hpnicfDHCPRReleasePktNum, hpnicfDHCPROption82IfNodeType=hpnicfDHCPROption82IfNodeType, hpnicfDHCPROption82IfUsrDefString=hpnicfDHCPROption82IfUsrDefString, hpnicfDHCPRIfSelectRelayMode=hpnicfDHCPRIfSelectRelayMode, hpnicfDHCPRMibObject=hpnicfDHCPRMibObject, hpnicfDHCPRConfigOption82IfTable=hpnicfDHCPRConfigOption82IfTable, hpnicfDhcpRelay=hpnicfDhcpRelay, hpnicfDHCPRSecurityClientIpAddrType=hpnicfDHCPRSecurityClientIpAddrType, hpnicfDHCPRAddrCheckTable=hpnicfDHCPRAddrCheckTable, hpnicfDHCPRRxClientPktNum=hpnicfDHCPRRxClientPktNum, hpnicfDHCPRAckPktNum=hpnicfDHCPRAckPktNum, hpnicfDHCPRTxServerPktNum=hpnicfDHCPRTxServerPktNum, hpnicfDHCPRDeclinePktNum=hpnicfDHCPRDeclinePktNum, hpnicfDHCPRConfigOption82IfEntry=hpnicfDHCPRConfigOption82IfEntry, hpnicfDHCPROption82IfSwitch=hpnicfDHCPROption82IfSwitch, hpnicfDHCPRIfToGroupRowStatus=hpnicfDHCPRIfToGroupRowStatus, hpnicfDHCPROption82IfFormat=hpnicfDHCPROption82IfFormat, hpnicfDHCPRIpToGroupTable=hpnicfDHCPRIpToGroupTable, hpnicfDHCPRSecurityClientProperty=hpnicfDHCPRSecurityClientProperty, hpnicfDHCPRSecurityClientIpAddr=hpnicfDHCPRSecurityClientIpAddr, hpnicfDHCPROption82Switch=hpnicfDHCPROption82Switch, hpnicfDHCPRIpToGroupServerIp=hpnicfDHCPRIpToGroupServerIp, hpnicfDHCPRIfSelectEntry=hpnicfDHCPRIfSelectEntry, hpnicfDHCPRIfSelectTable=hpnicfDHCPRIfSelectTable, hpnicfDHCPROption82HandleStrategy=hpnicfDHCPROption82HandleStrategy, hpnicfDHCPRIfToGroupTable=hpnicfDHCPRIfToGroupTable, hpnicfDHCPRCycleStatus=hpnicfDHCPRCycleStatus, hpnicfDHCPRStatisticsReset=hpnicfDHCPRStatisticsReset, hpnicfDHCPRStatisticsGroup=hpnicfDHCPRStatisticsGroup, hpnicfDHCPRCycleGroup=hpnicfDHCPRCycleGroup, hpnicfDHCPROfferPktNum=hpnicfDHCPROfferPktNum, hpnicfDHCPRIpToGroupGroupId=hpnicfDHCPRIpToGroupGroupId, hpnicfDHCPRConfigOption82Group=hpnicfDHCPRConfigOption82Group, hpnicfDHCPRIpToGroupRowStatus=hpnicfDHCPRIpToGroupRowStatus, hpnicfDHCPROption82IfStrategy=hpnicfDHCPROption82IfStrategy, hpnicfDHCPRAddrCheckSwitch=hpnicfDHCPRAddrCheckSwitch, hpnicfDHCPRTxClientPktNum=hpnicfDHCPRTxClientPktNum, hpnicfDHCPRIfToGroupEntry=hpnicfDHCPRIfToGroupEntry, hpnicfDHCPRSecurityClientMacAddr=hpnicfDHCPRSecurityClientMacAddr, hpnicfDHCPRIpToGroupEntry=hpnicfDHCPRIpToGroupEntry, hpnicfDHCPRIfToGroupGroupId=hpnicfDHCPRIfToGroupGroupId, PYSNMP_MODULE_ID=hpnicfDhcpRelay, hpnicfDHCPRNakPktNum=hpnicfDHCPRNakPktNum, hpnicfDHCPRRxServerPktNum=hpnicfDHCPRRxServerPktNum, hpnicfDHCPRSecurityTable=hpnicfDHCPRSecurityTable, hpnicfDHCPRAddrCheckEntry=hpnicfDHCPRAddrCheckEntry)
(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, single_value_constraint, value_range_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'ValueSizeConstraint', 'ConstraintsUnion', 'SingleValueConstraint', 'ValueRangeConstraint') (hpnicf_common,) = mibBuilder.importSymbols('HPN-ICF-OID-MIB', 'hpnicfCommon') (if_index,) = mibBuilder.importSymbols('IF-MIB', 'ifIndex') (inet_address_type, inet_address) = mibBuilder.importSymbols('INET-ADDRESS-MIB', 'InetAddressType', 'InetAddress') (module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup') (gauge32, iso, counter64, module_identity, time_ticks, integer32, notification_type, mib_scalar, mib_table, mib_table_row, mib_table_column, bits, mib_identifier, ip_address, object_identity, unsigned32, counter32) = mibBuilder.importSymbols('SNMPv2-SMI', 'Gauge32', 'iso', 'Counter64', 'ModuleIdentity', 'TimeTicks', 'Integer32', 'NotificationType', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Bits', 'MibIdentifier', 'IpAddress', 'ObjectIdentity', 'Unsigned32', 'Counter32') (display_string, mac_address, textual_convention, truth_value, row_status) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'MacAddress', 'TextualConvention', 'TruthValue', 'RowStatus') hpnicf_dhcp_relay = module_identity((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58)) hpnicfDhcpRelay.setRevisions(('2005-06-08 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: hpnicfDhcpRelay.setRevisionsDescriptions(('The initial version of this MIB module.',)) if mibBuilder.loadTexts: hpnicfDhcpRelay.setLastUpdated('200506080000Z') if mibBuilder.loadTexts: hpnicfDhcpRelay.setOrganization('') if mibBuilder.loadTexts: hpnicfDhcpRelay.setContactInfo('') if mibBuilder.loadTexts: hpnicfDhcpRelay.setDescription('DHCPR MIB') hpnicf_dhcpr_mib_object = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1)) hpnicf_dhcpr_if_select_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 1)) if mibBuilder.loadTexts: hpnicfDHCPRIfSelectTable.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRIfSelectTable.setDescription('A table for configuring relay mode for interfaces. ') hpnicf_dhcpr_if_select_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 1, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex')) if mibBuilder.loadTexts: hpnicfDHCPRIfSelectEntry.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRIfSelectEntry.setDescription('An entry for configuring relay mode for an interface. ') hpnicf_dhcpr_if_select_relay_mode = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 1, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('on', 1), ('off', 2))).clone('off')).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfDHCPRIfSelectRelayMode.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRIfSelectRelayMode.setDescription('If the value is on, the DHCP relay function would be enabled on this interface. ') hpnicf_dhcpr_ip_to_group_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 2)) if mibBuilder.loadTexts: hpnicfDHCPRIpToGroupTable.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRIpToGroupTable.setDescription('A table for configuring ip addresses for DHCP server groups. ') hpnicf_dhcpr_ip_to_group_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 2, 1)).setIndexNames((0, 'HPN-ICF-DHCPRELAY-MIB', 'hpnicfDHCPRIpToGroupGroupId'), (0, 'HPN-ICF-DHCPRELAY-MIB', 'hpnicfDHCPRIpToGroupServerIpType'), (0, 'HPN-ICF-DHCPRELAY-MIB', 'hpnicfDHCPRIpToGroupServerIp')) if mibBuilder.loadTexts: hpnicfDHCPRIpToGroupEntry.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRIpToGroupEntry.setDescription('An entry for configuring ip addresses for a DHCP server group. ') hpnicf_dhcpr_ip_to_group_group_id = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 2, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 19))) if mibBuilder.loadTexts: hpnicfDHCPRIpToGroupGroupId.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRIpToGroupGroupId.setDescription('Group identifier of DHCP server group. ') hpnicf_dhcpr_ip_to_group_server_ip_type = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 2, 1, 2), inet_address_type()) if mibBuilder.loadTexts: hpnicfDHCPRIpToGroupServerIpType.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRIpToGroupServerIpType.setDescription('Ip address type of DHCP server. ') hpnicf_dhcpr_ip_to_group_server_ip = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 2, 1, 3), inet_address().subtype(subtypeSpec=value_size_constraint(1, 64))) if mibBuilder.loadTexts: hpnicfDHCPRIpToGroupServerIp.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRIpToGroupServerIp.setDescription('Ip address of DHCP server. ') hpnicf_dhcpr_ip_to_group_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 2, 1, 4), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: hpnicfDHCPRIpToGroupRowStatus.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRIpToGroupRowStatus.setDescription('Operation status of this table entry. Three actions are used: active, createAndGo, destroy. ') hpnicf_dhcpr_if_to_group_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 3)) if mibBuilder.loadTexts: hpnicfDHCPRIfToGroupTable.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRIfToGroupTable.setDescription('A table for configuring DHCP server groups for interfaces. ') hpnicf_dhcpr_if_to_group_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 3, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex')) if mibBuilder.loadTexts: hpnicfDHCPRIfToGroupEntry.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRIfToGroupEntry.setDescription('An entry for configuring DHCP server group for an interface. ') hpnicf_dhcpr_if_to_group_group_id = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 3, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 19))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfDHCPRIfToGroupGroupId.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRIfToGroupGroupId.setDescription('The DHCP server group for this interface. ') hpnicf_dhcpr_if_to_group_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 3, 1, 2), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: hpnicfDHCPRIfToGroupRowStatus.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRIfToGroupRowStatus.setDescription('Operation status of this table entry. Three actions are used: active, createAndGo, destroy') hpnicf_dhcpr_addr_check_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 4)) if mibBuilder.loadTexts: hpnicfDHCPRAddrCheckTable.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRAddrCheckTable.setDescription('A table containing the states of dhcp security address check switchs for interfaces. ') hpnicf_dhcpr_addr_check_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 4, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex')) if mibBuilder.loadTexts: hpnicfDHCPRAddrCheckEntry.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRAddrCheckEntry.setDescription('An entry containing the state of dhcp security address check switch for an interface. ') hpnicf_dhcpr_addr_check_switch = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 4, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2))).clone('disabled')).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfDHCPRAddrCheckSwitch.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRAddrCheckSwitch.setDescription('The state of dhcp security address check switch for this interface. It has two defined values: enabled and disabled. If the value is enabled, the address check function would be enabled. The default value is disabled. ') hpnicf_dhcpr_security_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 5)) if mibBuilder.loadTexts: hpnicfDHCPRSecurityTable.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRSecurityTable.setDescription('A table containing the information of DHCP security. ') hpnicf_dhcpr_security_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 5, 1)).setIndexNames((0, 'HPN-ICF-DHCPRELAY-MIB', 'hpnicfDHCPRSecurityClientIpAddrType'), (0, 'HPN-ICF-DHCPRELAY-MIB', 'hpnicfDHCPRSecurityClientIpAddr')) if mibBuilder.loadTexts: hpnicfDHCPRSecurityEntry.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRSecurityEntry.setDescription('An entry containing the information of DHCP security. ') hpnicf_dhcpr_security_client_ip_addr_type = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 5, 1, 1), inet_address_type()) if mibBuilder.loadTexts: hpnicfDHCPRSecurityClientIpAddrType.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRSecurityClientIpAddrType.setDescription("DHCP client's net ip address type") hpnicf_dhcpr_security_client_ip_addr = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 5, 1, 2), inet_address().subtype(subtypeSpec=value_size_constraint(1, 64))) if mibBuilder.loadTexts: hpnicfDHCPRSecurityClientIpAddr.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRSecurityClientIpAddr.setDescription("DHCP client's net ip address") hpnicf_dhcpr_security_client_mac_addr = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 5, 1, 3), mac_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfDHCPRSecurityClientMacAddr.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRSecurityClientMacAddr.setDescription("DHCP client's mac address") hpnicf_dhcpr_security_client_property = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 5, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('static', 1), ('dynamic', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfDHCPRSecurityClientProperty.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRSecurityClientProperty.setDescription('Property of client address') hpnicf_dhcpr_security_client_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 5, 1, 5), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: hpnicfDHCPRSecurityClientRowStatus.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRSecurityClientRowStatus.setDescription('Operation status of this table entry. Three actions are used: active, createAndGo, destroy') hpnicf_dhcpr_statistics_group = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 6)) hpnicf_dhcpr_rx_client_pkt_num = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 6, 1), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnicfDHCPRRxClientPktNum.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRRxClientPktNum.setDescription('The total number of the packets received from DHCP clients by DHCP relay. ') hpnicf_dhcpr_tx_client_pkt_num = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 6, 2), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnicfDHCPRTxClientPktNum.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRTxClientPktNum.setDescription('The total number of the brodcast packets transmitted to DHCP clients by DHCP relay. ') hpnicf_dhcpr_rx_server_pkt_num = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 6, 3), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnicfDHCPRRxServerPktNum.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRRxServerPktNum.setDescription('The total number of the packets received from DHCP Servers by DHCP relay. ') hpnicf_dhcpr_tx_server_pkt_num = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 6, 4), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnicfDHCPRTxServerPktNum.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRTxServerPktNum.setDescription('The total number of the packets transmitted to DHCP Servers by DHCP relay. ') hpnicf_dhcpr_discover_pkt_num = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 6, 5), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnicfDHCPRDiscoverPktNum.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRDiscoverPktNum.setDescription('The total number of the DHCP Discover packets handled by DHCP relay. ') hpnicf_dhcpr_request_pkt_num = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 6, 6), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnicfDHCPRRequestPktNum.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRRequestPktNum.setDescription('The total number of the DHCP Request packets handled by DHCP relay. ') hpnicf_dhcpr_decline_pkt_num = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 6, 7), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnicfDHCPRDeclinePktNum.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRDeclinePktNum.setDescription('The total number of the DHCP Decline packets handled by DHCP relay. ') hpnicf_dhcpr_release_pkt_num = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 6, 8), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnicfDHCPRReleasePktNum.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRReleasePktNum.setDescription('The total number of the DHCP Release packets handled by DHCP relay. ') hpnicf_dhcpr_inform_pkt_num = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 6, 9), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnicfDHCPRInformPktNum.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRInformPktNum.setDescription('The total number of the DHCP Inform packets handled by DHCP relay. ') hpnicf_dhcpr_offer_pkt_num = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 6, 10), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnicfDHCPROfferPktNum.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPROfferPktNum.setDescription('The total number of the DHCP Offer packets handled by DHCP relay. ') hpnicf_dhcpr_ack_pkt_num = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 6, 11), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnicfDHCPRAckPktNum.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRAckPktNum.setDescription('The total number of the DHCP Ack packets handled by DHCP relay. ') hpnicf_dhcpr_nak_pkt_num = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 6, 12), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnicfDHCPRNakPktNum.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRNakPktNum.setDescription('The total number of the DHCP Nak packets handled by DHCP relay. ') hpnicf_dhcpr_statistics_reset = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 6, 13), truth_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfDHCPRStatisticsReset.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRStatisticsReset.setDescription('This node only supports set operation. If the value is true,it will clear all of the packet statistics. ') hpnicf_dhcpr_cycle_group = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 7)) hpnicf_dhcpr_cycle_status = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 7, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('on', 1), ('off', 2))).clone('off')).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfDHCPRCycleStatus.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRCycleStatus.setDescription('If the value is on, the cycle function would be enabled. ') hpnicf_dhcpr_config_option82_group = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 8)) hpnicf_dhcpr_option82_switch = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 8, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2))).clone('disabled')).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfDHCPROption82Switch.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPROption82Switch.setDescription('If the value is enabled, DHCP relay supporting option 82 function would be enabled. ') hpnicf_dhcpr_option82_handle_strategy = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 8, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('drop', 1), ('keep', 2), ('replace', 3))).clone('replace')).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfDHCPROption82HandleStrategy.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPROption82HandleStrategy.setDescription("The strategies of DHCP relay handling option 82. 'drop' indicates DHCP relay discarding the request packet including option 82. 'keep' indicates DHCP relay accepting the request packet without any change of the option 82. 'replace' indicates DHCP relay accepting the request packet on condition that it generates a new option 82 to replace the original one. ") hpnicf_dhcpr_config_option82_if_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 8, 3)) if mibBuilder.loadTexts: hpnicfDHCPRConfigOption82IfTable.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRConfigOption82IfTable.setDescription('A table containing the information of DHCP option 82. This table depends on hpnicfDHCPRIfToGroupTable. An entry of this table will be created when an entry of hpnicfDHCPRIfToGroupTable is created. ') hpnicf_dhcpr_config_option82_if_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 8, 3, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex')) if mibBuilder.loadTexts: hpnicfDHCPRConfigOption82IfEntry.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPRConfigOption82IfEntry.setDescription('An entry containing the information of DHCP option 82. ') hpnicf_dhcpr_option82_if_switch = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 8, 3, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2))).clone('disabled')).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfDHCPROption82IfSwitch.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPROption82IfSwitch.setDescription("If DHCP relay supports option 82 functions, the value is 'enabled'. If DHCP relay does not support option 82 functions, the value is 'disabled'. ") hpnicf_dhcpr_option82_if_strategy = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 8, 3, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('drop', 1), ('keep', 2), ('replace', 3))).clone('replace')).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfDHCPROption82IfStrategy.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPROption82IfStrategy.setDescription("The strategies of DHCP relay handling option 82. 'drop' indicates DHCP relay discarding the request packet including option 82. 'keep' indicates DHCP relay accepting the request packet without any change of the option 82. 'replace' indicates DHCP relay accepting the request packet on condition that it generates a new option 82 to replace the original one. ") hpnicf_dhcpr_option82_if_format = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 8, 3, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('normal', 1), ('verbose', 2))).clone('normal')).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfDHCPROption82IfFormat.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPROption82IfFormat.setDescription("The format of DHCP relay option 82. 'normal' is the standard format. 'verbose' is the detailed format. ") hpnicf_dhcpr_option82_if_node_type = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 8, 3, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('invalid', 1), ('mac', 2), ('sysname', 3), ('userdefine', 4))).clone('invalid')).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfDHCPROption82IfNodeType.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPROption82IfNodeType.setDescription("Property of DHCP relay option 82 verbose format. The value can be set by user only when the value of hpnicfDHCPROption82IfFormat is set with 'verbose'. If the value of hpnicfDHCPROption82IfFormat is 'normal', the value is automatically set with 'invalid'. the value can not be set with 'invalid' by user. 'mac' indicates the option 82 verbose format is filled in with the mac of DHCP relay input interface. If the value of hpnicfDHCPROption82IfFormat is set with 'verbose', the value is automatically set with 'mac'. 'sysname' indicates the option 82 verbose format is filled in with the name of the DHCP relay. 'userdefine' indicates the option 82 verbose format is filled in with the string defined by user. If the value is set with 'userdefine', the value of hpnicfDHCPROption82IfUsrDefString must be set simultaneously. ") hpnicf_dhcpr_option82_if_usr_def_string = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 58, 1, 8, 3, 1, 5), octet_string().subtype(subtypeSpec=value_size_constraint(0, 256))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfDHCPROption82IfUsrDefString.setStatus('current') if mibBuilder.loadTexts: hpnicfDHCPROption82IfUsrDefString.setDescription("The string defined by user to fill in the option 82 verbose format. If the value of hpnicfDHCPROption82IfFormat is 'normal', or the value of hpnicfDHCPROption82IfNodeType is 'mac' or 'sysname', it is set with a null string automatically and can not be modified by user. It must be set with a non-zero length string when the value of hpnicfDHCPROption82IfNodeType is set with 'userdefine'. ") mibBuilder.exportSymbols('HPN-ICF-DHCPRELAY-MIB', hpnicfDHCPRSecurityClientRowStatus=hpnicfDHCPRSecurityClientRowStatus, hpnicfDHCPRRequestPktNum=hpnicfDHCPRRequestPktNum, hpnicfDHCPRInformPktNum=hpnicfDHCPRInformPktNum, hpnicfDHCPRIpToGroupServerIpType=hpnicfDHCPRIpToGroupServerIpType, hpnicfDHCPRSecurityEntry=hpnicfDHCPRSecurityEntry, hpnicfDHCPRDiscoverPktNum=hpnicfDHCPRDiscoverPktNum, hpnicfDHCPRReleasePktNum=hpnicfDHCPRReleasePktNum, hpnicfDHCPROption82IfNodeType=hpnicfDHCPROption82IfNodeType, hpnicfDHCPROption82IfUsrDefString=hpnicfDHCPROption82IfUsrDefString, hpnicfDHCPRIfSelectRelayMode=hpnicfDHCPRIfSelectRelayMode, hpnicfDHCPRMibObject=hpnicfDHCPRMibObject, hpnicfDHCPRConfigOption82IfTable=hpnicfDHCPRConfigOption82IfTable, hpnicfDhcpRelay=hpnicfDhcpRelay, hpnicfDHCPRSecurityClientIpAddrType=hpnicfDHCPRSecurityClientIpAddrType, hpnicfDHCPRAddrCheckTable=hpnicfDHCPRAddrCheckTable, hpnicfDHCPRRxClientPktNum=hpnicfDHCPRRxClientPktNum, hpnicfDHCPRAckPktNum=hpnicfDHCPRAckPktNum, hpnicfDHCPRTxServerPktNum=hpnicfDHCPRTxServerPktNum, hpnicfDHCPRDeclinePktNum=hpnicfDHCPRDeclinePktNum, hpnicfDHCPRConfigOption82IfEntry=hpnicfDHCPRConfigOption82IfEntry, hpnicfDHCPROption82IfSwitch=hpnicfDHCPROption82IfSwitch, hpnicfDHCPRIfToGroupRowStatus=hpnicfDHCPRIfToGroupRowStatus, hpnicfDHCPROption82IfFormat=hpnicfDHCPROption82IfFormat, hpnicfDHCPRIpToGroupTable=hpnicfDHCPRIpToGroupTable, hpnicfDHCPRSecurityClientProperty=hpnicfDHCPRSecurityClientProperty, hpnicfDHCPRSecurityClientIpAddr=hpnicfDHCPRSecurityClientIpAddr, hpnicfDHCPROption82Switch=hpnicfDHCPROption82Switch, hpnicfDHCPRIpToGroupServerIp=hpnicfDHCPRIpToGroupServerIp, hpnicfDHCPRIfSelectEntry=hpnicfDHCPRIfSelectEntry, hpnicfDHCPRIfSelectTable=hpnicfDHCPRIfSelectTable, hpnicfDHCPROption82HandleStrategy=hpnicfDHCPROption82HandleStrategy, hpnicfDHCPRIfToGroupTable=hpnicfDHCPRIfToGroupTable, hpnicfDHCPRCycleStatus=hpnicfDHCPRCycleStatus, hpnicfDHCPRStatisticsReset=hpnicfDHCPRStatisticsReset, hpnicfDHCPRStatisticsGroup=hpnicfDHCPRStatisticsGroup, hpnicfDHCPRCycleGroup=hpnicfDHCPRCycleGroup, hpnicfDHCPROfferPktNum=hpnicfDHCPROfferPktNum, hpnicfDHCPRIpToGroupGroupId=hpnicfDHCPRIpToGroupGroupId, hpnicfDHCPRConfigOption82Group=hpnicfDHCPRConfigOption82Group, hpnicfDHCPRIpToGroupRowStatus=hpnicfDHCPRIpToGroupRowStatus, hpnicfDHCPROption82IfStrategy=hpnicfDHCPROption82IfStrategy, hpnicfDHCPRAddrCheckSwitch=hpnicfDHCPRAddrCheckSwitch, hpnicfDHCPRTxClientPktNum=hpnicfDHCPRTxClientPktNum, hpnicfDHCPRIfToGroupEntry=hpnicfDHCPRIfToGroupEntry, hpnicfDHCPRSecurityClientMacAddr=hpnicfDHCPRSecurityClientMacAddr, hpnicfDHCPRIpToGroupEntry=hpnicfDHCPRIpToGroupEntry, hpnicfDHCPRIfToGroupGroupId=hpnicfDHCPRIfToGroupGroupId, PYSNMP_MODULE_ID=hpnicfDhcpRelay, hpnicfDHCPRNakPktNum=hpnicfDHCPRNakPktNum, hpnicfDHCPRRxServerPktNum=hpnicfDHCPRRxServerPktNum, hpnicfDHCPRSecurityTable=hpnicfDHCPRSecurityTable, hpnicfDHCPRAddrCheckEntry=hpnicfDHCPRAddrCheckEntry)
# ============================================================================= # Author: Teerapat Jenrungrot - https://github.com/mjenrungrot/ # FileName: 10921.py # Description: UVa Online Judge - 10921 # ============================================================================= source = list("-1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ") target = list("-123456789022233344455566677778889999") mapping = dict(zip(source, target)) while True: try: line = input() except EOFError: break print("".join(list(map(lambda x: mapping[x], line))))
source = list('-1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ') target = list('-123456789022233344455566677778889999') mapping = dict(zip(source, target)) while True: try: line = input() except EOFError: break print(''.join(list(map(lambda x: mapping[x], line))))