content
stringlengths
7
1.05M
fixed_cases
stringlengths
1
1.28M
"""Exceptions""" class ModelException(Exception): pass
"""Exceptions""" class Modelexception(Exception): pass
nota_trabalhos = float(input()) nota_prova = float(input()) media = (nota_trabalhos + nota_prova) / 2 if media >= 6: print('aprovado') elif nota_trabalhos >= 2: print('talvez com a sub') else: print('reprovado')
nota_trabalhos = float(input()) nota_prova = float(input()) media = (nota_trabalhos + nota_prova) / 2 if media >= 6: print('aprovado') elif nota_trabalhos >= 2: print('talvez com a sub') else: print('reprovado')
def KthLSB(n, k): return (n>>(k-1))&1 if __name__ == '__main__': n = 10 k = 4 print(KthLSB(n, k))
def kth_lsb(n, k): return n >> k - 1 & 1 if __name__ == '__main__': n = 10 k = 4 print(kth_lsb(n, k))
# # PySNMP MIB module ERI-DNX-STM1-OC3-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ERI-DNX-STM1-OC3-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 18:51:49 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, ValueRangeConstraint, SingleValueConstraint, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "ConstraintsIntersection", "ValueRangeConstraint", "SingleValueConstraint", "ValueSizeConstraint") NestSlotAddress, trapSequence, OneByteField, LinkPortAddress, PortStatus, LinkCmdStatus, devices = mibBuilder.importSymbols("ERI-DNX-SMC-MIB", "NestSlotAddress", "trapSequence", "OneByteField", "LinkPortAddress", "PortStatus", "LinkCmdStatus", "devices") eriMibs, = mibBuilder.importSymbols("ERI-ROOT-SMI", "eriMibs") ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup") ObjectIdentity, NotificationType, Counter32, TimeTicks, ModuleIdentity, Gauge32, IpAddress, Counter64, Unsigned32, MibScalar, MibTable, MibTableRow, MibTableColumn, MibIdentifier, Integer32, iso, Bits = mibBuilder.importSymbols("SNMPv2-SMI", "ObjectIdentity", "NotificationType", "Counter32", "TimeTicks", "ModuleIdentity", "Gauge32", "IpAddress", "Counter64", "Unsigned32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "MibIdentifier", "Integer32", "iso", "Bits") DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") eriDNXStm1Oc3MIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 644, 3, 9)) eriDNXStm1Oc3MIB.setRevisions(('2003-05-05 00:00', '2003-02-27 00:00', '2002-04-19 00:00', '2002-04-12 00:00', '2002-03-01 00:00', '2002-01-04 00:00', '2001-11-12 00:00', '2001-08-30 00:00',)) if mibBuilder.loadTexts: eriDNXStm1Oc3MIB.setLastUpdated('200305050000Z') if mibBuilder.loadTexts: eriDNXStm1Oc3MIB.setOrganization('Eastern Research, Inc.') dnxStm1Oc3 = MibIdentifier((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7)) opticalConfig = MibIdentifier((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1)) opticalDiag = MibIdentifier((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2)) class PayLoadGroupType(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1)) namedValues = NamedValues(("e1", 0), ("t1", 1)) opticalDevConfigTable = MibTable((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 1), ) if mibBuilder.loadTexts: opticalDevConfigTable.setStatus('current') opticalDevConfigEntry = MibTableRow((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 1, 1), ).setIndexNames((0, "ERI-DNX-STM1-OC3-MIB", "optDevCfgAddr")) if mibBuilder.loadTexts: opticalDevConfigEntry.setStatus('current') optDevCfgAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 1, 1, 1), NestSlotAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: optDevCfgAddr.setStatus('current') optDevCfgResource = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 1, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: optDevCfgResource.setStatus('current') optDevType = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("stm1", 0), ("oc3", 1), ("stm1X", 2), ("oc3X", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: optDevType.setStatus('current') optDevMultiplexMode = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4))).clone(namedValues=NamedValues(("au3", 0), ("au4", 1), ("sts-3", 2), ("sts-3c", 3), ("au4-vc3-Seq", 4)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: optDevMultiplexMode.setStatus('current') optLineTiming = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("local", 0), ("loop", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: optLineTiming.setStatus('current') optDevPayload1 = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 1, 1, 6), PayLoadGroupType()).setMaxAccess("readwrite") if mibBuilder.loadTexts: optDevPayload1.setStatus('current') optDevPayload2 = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 1, 1, 7), PayLoadGroupType()).setMaxAccess("readwrite") if mibBuilder.loadTexts: optDevPayload2.setStatus('current') optDevPayload3 = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 1, 1, 8), PayLoadGroupType()).setMaxAccess("readwrite") if mibBuilder.loadTexts: optDevPayload3.setStatus('current') optDevCmdStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 1, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 101, 400, 402, 403, 414, 415, 416, 419, 421, 424, 427, 450, 500, 501, 502))).clone(namedValues=NamedValues(("ready-for-command", 0), ("update-config", 1), ("update-successful", 101), ("err-general-opt-config-error", 400), ("err-au4Seq-cannot-be-mixed-framing", 402), ("err-invalid-opt-dev-command", 403), ("err-device-is-protection-module", 414), ("err-invalid-multiplex-map", 415), ("err-invalid-payload-framing", 416), ("err-invalid-xlink-nest-num", 419), ("err-invalid-line-timing", 421), ("err-ts-alloc-not-applicable", 424), ("err-xlink-pair-not-applicable", 427), ("err-data-locked-by-another-user", 450), ("err-snmp-parse-failed", 500), ("err-invalid-snmp-type", 501), ("err-invalid-snmp-var-size", 502)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: optDevCmdStatus.setStatus('current') optDevTsAlloc = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 1, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("normal", 0), ("alternate", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: optDevTsAlloc.setStatus('current') optDevAssignedToNest = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 1, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(2, 8), ))).setMaxAccess("readwrite") if mibBuilder.loadTexts: optDevAssignedToNest.setStatus('current') optT1E1LinkConfigTable = MibTable((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 2), ) if mibBuilder.loadTexts: optT1E1LinkConfigTable.setStatus('current') optT1E1LinkConfigEntry = MibTableRow((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 2, 1), ).setIndexNames((0, "ERI-DNX-STM1-OC3-MIB", "optT1E1CfgLinkAddr")) if mibBuilder.loadTexts: optT1E1LinkConfigEntry.setStatus('current') optT1E1CfgLinkAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 2, 1, 1), LinkPortAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: optT1E1CfgLinkAddr.setStatus('current') optT1E1CfgResource = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 2, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: optT1E1CfgResource.setStatus('current') optT1E1CfgLinkName = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 2, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 20))).setMaxAccess("readwrite") if mibBuilder.loadTexts: optT1E1CfgLinkName.setStatus('current') optT1E1Status = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 2, 1, 4), PortStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: optT1E1Status.setStatus('current') optT1E1Clear = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 2, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("disabled", 0), ("framed", 1), ("unframed", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: optT1E1Clear.setStatus('current') optT1E1Framing = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 2, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("e1", 0), ("e1Crc", 1), ("e1Cas", 2), ("e1CasCrc", 3), ("e1Unframed", 4), ("t1Esf", 5), ("t1D4", 6), ("t1Unframed", 7)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: optT1E1Framing.setStatus('current') optT1E1RecoverTime = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 2, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(3, 10, 15))).clone(namedValues=NamedValues(("timeout-3-secs", 3), ("timeout-10-secs", 10), ("timeout-15-secs", 15)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: optT1E1RecoverTime.setStatus('current') optT1E1EsfFormat = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 2, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("att-54016", 0), ("ansi-t1-403", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: optT1E1EsfFormat.setStatus('current') optT1E1UnusedTSs = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 2, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("busy", 0), ("idle", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: optT1E1UnusedTSs.setStatus('current') optT1E1CfgCmdStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 2, 1, 10), LinkCmdStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: optT1E1CfgCmdStatus.setStatus('current') optT1E1NationalBits = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 2, 1, 11), OneByteField()).setMaxAccess("readwrite") if mibBuilder.loadTexts: optT1E1NationalBits.setStatus('current') optT1E1InterNational = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 2, 1, 12), OneByteField()).setMaxAccess("readwrite") if mibBuilder.loadTexts: optT1E1InterNational.setStatus('current') opticalTUStatusTable = MibTable((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 1), ) if mibBuilder.loadTexts: opticalTUStatusTable.setStatus('current') opticalTUStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 1, 1), ).setIndexNames((0, "ERI-DNX-STM1-OC3-MIB", "optTUStatusAddr")) if mibBuilder.loadTexts: opticalTUStatusEntry.setStatus('current') optTUStatusAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 1, 1, 1), LinkPortAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: optTUStatusAddr.setStatus('current') optTUStatusResrcId = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 1, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: optTUStatusResrcId.setStatus('current') optTUStatusLinkState = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 2, 8, 32, 64, 2048, 4096, 65535, 2097152, 4194304, 8388608, 6291456, 1073741824, 2147483647))).clone(namedValues=NamedValues(("ok", 0), ("yel", 2), ("ais", 8), ("lof", 32), ("los", 64), ("red", 2048), ("cfa", 4096), ("oos", 65535), ("txSlip", 2097152), ("rxSlip", 4194304), ("sef", 8388608), ("slip", 6291456), ("underTest", 1073741824), ("errors", 2147483647)))).setMaxAccess("readonly") if mibBuilder.loadTexts: optTUStatusLinkState.setStatus('current') optTUStatusErrSecs = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 1, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: optTUStatusErrSecs.setStatus('current') optTUStatusAisErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 1, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: optTUStatusAisErrs.setStatus('current') optTUStatusLopErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 1, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: optTUStatusLopErrs.setStatus('current') optTUStatusRdiTUErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 1, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: optTUStatusRdiTUErrs.setStatus('current') optTUStatusRfiTUErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 1, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: optTUStatusRfiTUErrs.setStatus('current') optTUStatusPSLMErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 1, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: optTUStatusPSLMErrs.setStatus('current') optTUStatusPSLUErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 1, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: optTUStatusPSLUErrs.setStatus('current') optTUStatusErrFreeSecs = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 1, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: optTUStatusErrFreeSecs.setStatus('current') opticalMapperStatusTable = MibTable((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 2), ) if mibBuilder.loadTexts: opticalMapperStatusTable.setStatus('current') opticalMapperStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 2, 1), ).setIndexNames((0, "ERI-DNX-STM1-OC3-MIB", "optMapperStatusAddr")) if mibBuilder.loadTexts: opticalMapperStatusEntry.setStatus('current') optMapperStatusAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 2, 1, 1), LinkPortAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: optMapperStatusAddr.setStatus('current') optMapperStatusResrcId = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 2, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: optMapperStatusResrcId.setStatus('current') optMapperState = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 2, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 2, 8, 16, 32, 64, 128, 2048, 4096, 65535, 2097152, 4194304, 8388608, 6291456, 1073741824, 2147483647))).clone(namedValues=NamedValues(("ok", 0), ("yel", 2), ("ais", 8), ("lop", 16), ("lof", 32), ("los", 64), ("rdi", 128), ("red", 2048), ("cfa", 4096), ("oos", 65535), ("txSlip", 2097152), ("rxSlip", 4194304), ("sef", 8388608), ("slip", 6291456), ("underTest", 1073741824), ("errors", 2147483647)))).setMaxAccess("readonly") if mibBuilder.loadTexts: optMapperState.setStatus('current') optMapperErrSecs = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 2, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: optMapperErrSecs.setStatus('current') optMapperErrFreeSecs = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 2, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: optMapperErrFreeSecs.setStatus('current') optMapperLoop = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 2, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 3))).clone(namedValues=NamedValues(("off", 0), ("local", 1), ("line", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: optMapperLoop.setStatus('current') optMapperPathLOPErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 2, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: optMapperPathLOPErrs.setStatus('current') optMapperPathAISErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 2, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: optMapperPathAISErrs.setStatus('current') optMapperPathRDIErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 2, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: optMapperPathRDIErrs.setStatus('current') optMapperCmdStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 2, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 14, 101, 114, 200, 202, 206, 500, 501, 502))).clone(namedValues=NamedValues(("ready-for-command", 0), ("updateTest", 1), ("clearErrors", 14), ("update-successful", 101), ("clear-successful", 114), ("err-general-test-error", 200), ("err-invalid-loop-type", 202), ("err-field-cannot-be-set", 206), ("err-snmp-parse-failed", 500), ("err-invalid-snmp-type", 501), ("err-invalid-snmp-var-size", 502)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: optMapperCmdStatus.setStatus('current') opticalTransportStatusTable = MibTable((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 3), ) if mibBuilder.loadTexts: opticalTransportStatusTable.setStatus('current') opticalTransportStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 3, 1), ).setIndexNames((0, "ERI-DNX-STM1-OC3-MIB", "optTransportStatusAddr")) if mibBuilder.loadTexts: opticalTransportStatusEntry.setStatus('current') optTransportStatusAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 3, 1, 1), NestSlotAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: optTransportStatusAddr.setStatus('current') optTransportStatusResrcId = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 3, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: optTransportStatusResrcId.setStatus('current') optTransportLaserState = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 3, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("off", 0), ("on", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: optTransportLaserState.setStatus('current') optTransportErrSecs = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 3, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: optTransportErrSecs.setStatus('current') optTransportErrFreeSecs = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 3, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: optTransportErrFreeSecs.setStatus('current') optTransportLoop = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 3, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("off", 0), ("terminal", 1), ("facility", 2), ("pathFacility", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: optTransportLoop.setStatus('current') optTransportLineAISErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 3, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: optTransportLineAISErrs.setStatus('current') optTransportLineRDIErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 3, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: optTransportLineRDIErrs.setStatus('current') optTransportLineOOFErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 3, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: optTransportLineOOFErrs.setStatus('current') optTransportLineLOFErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 3, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: optTransportLineLOFErrs.setStatus('current') optTransportLineLOSErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 3, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: optTransportLineLOSErrs.setStatus('current') optTransportCmdStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 3, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 14, 101, 114, 400, 402, 406, 500, 501, 502))).clone(namedValues=NamedValues(("ready-for-command", 0), ("updateTest", 1), ("clearErrors", 14), ("update-successful", 101), ("clear-successful", 114), ("err-general-test-error", 400), ("err-invalid-loop-type", 402), ("err-field-cannot-be-set", 406), ("err-snmp-parse-failed", 500), ("err-invalid-snmp-type", 501), ("err-invalid-snmp-var-size", 502)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: optTransportCmdStatus.setStatus('current') dnxStm1Oc3Enterprise = ObjectIdentity((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 0)) if mibBuilder.loadTexts: dnxStm1Oc3Enterprise.setStatus('current') optDevConfigTrap = NotificationType((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 0, 1)).setObjects(("ERI-DNX-SMC-MIB", "trapSequence"), ("ERI-DNX-STM1-OC3-MIB", "optDevCfgAddr"), ("ERI-DNX-STM1-OC3-MIB", "optDevCmdStatus")) if mibBuilder.loadTexts: optDevConfigTrap.setStatus('current') optT1E1ConfigTrap = NotificationType((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 0, 2)).setObjects(("ERI-DNX-SMC-MIB", "trapSequence"), ("ERI-DNX-STM1-OC3-MIB", "optT1E1CfgLinkAddr"), ("ERI-DNX-STM1-OC3-MIB", "optT1E1CfgCmdStatus")) if mibBuilder.loadTexts: optT1E1ConfigTrap.setStatus('current') mibBuilder.exportSymbols("ERI-DNX-STM1-OC3-MIB", optTransportLineLOFErrs=optTransportLineLOFErrs, dnxStm1Oc3=dnxStm1Oc3, optDevCmdStatus=optDevCmdStatus, optTransportErrSecs=optTransportErrSecs, opticalConfig=opticalConfig, optTUStatusRdiTUErrs=optTUStatusRdiTUErrs, optT1E1CfgLinkAddr=optT1E1CfgLinkAddr, optT1E1CfgLinkName=optT1E1CfgLinkName, optTUStatusLopErrs=optTUStatusLopErrs, optMapperPathAISErrs=optMapperPathAISErrs, opticalTUStatusTable=opticalTUStatusTable, optT1E1Clear=optT1E1Clear, optTransportErrFreeSecs=optTransportErrFreeSecs, optTUStatusErrSecs=optTUStatusErrSecs, optTransportLineAISErrs=optTransportLineAISErrs, optTransportLineOOFErrs=optTransportLineOOFErrs, optTransportLaserState=optTransportLaserState, optT1E1ConfigTrap=optT1E1ConfigTrap, opticalDiag=opticalDiag, optDevPayload1=optDevPayload1, optTUStatusPSLMErrs=optTUStatusPSLMErrs, optDevPayload3=optDevPayload3, optMapperStatusResrcId=optMapperStatusResrcId, optMapperCmdStatus=optMapperCmdStatus, optT1E1CfgCmdStatus=optT1E1CfgCmdStatus, optT1E1Framing=optT1E1Framing, optT1E1EsfFormat=optT1E1EsfFormat, optTUStatusPSLUErrs=optTUStatusPSLUErrs, optDevCfgAddr=optDevCfgAddr, optTUStatusErrFreeSecs=optTUStatusErrFreeSecs, optTransportStatusAddr=optTransportStatusAddr, optTransportLineLOSErrs=optTransportLineLOSErrs, PYSNMP_MODULE_ID=eriDNXStm1Oc3MIB, optDevType=optDevType, optTUStatusResrcId=optTUStatusResrcId, opticalMapperStatusEntry=opticalMapperStatusEntry, optMapperStatusAddr=optMapperStatusAddr, dnxStm1Oc3Enterprise=dnxStm1Oc3Enterprise, optT1E1NationalBits=optT1E1NationalBits, optDevTsAlloc=optDevTsAlloc, optT1E1UnusedTSs=optT1E1UnusedTSs, optT1E1InterNational=optT1E1InterNational, optT1E1LinkConfigTable=optT1E1LinkConfigTable, optTransportStatusResrcId=optTransportStatusResrcId, optLineTiming=optLineTiming, optTUStatusRfiTUErrs=optTUStatusRfiTUErrs, optT1E1Status=optT1E1Status, optTUStatusLinkState=optTUStatusLinkState, optTransportLineRDIErrs=optTransportLineRDIErrs, opticalDevConfigTable=opticalDevConfigTable, optTUStatusAddr=optTUStatusAddr, optDevCfgResource=optDevCfgResource, optTransportCmdStatus=optTransportCmdStatus, optDevPayload2=optDevPayload2, opticalTransportStatusTable=opticalTransportStatusTable, optDevMultiplexMode=optDevMultiplexMode, optDevAssignedToNest=optDevAssignedToNest, optMapperState=optMapperState, eriDNXStm1Oc3MIB=eriDNXStm1Oc3MIB, optMapperPathRDIErrs=optMapperPathRDIErrs, opticalDevConfigEntry=opticalDevConfigEntry, opticalTUStatusEntry=opticalTUStatusEntry, optTUStatusAisErrs=optTUStatusAisErrs, optT1E1RecoverTime=optT1E1RecoverTime, optMapperLoop=optMapperLoop, PayLoadGroupType=PayLoadGroupType, opticalMapperStatusTable=opticalMapperStatusTable, optMapperErrFreeSecs=optMapperErrFreeSecs, optDevConfigTrap=optDevConfigTrap, opticalTransportStatusEntry=opticalTransportStatusEntry, optMapperErrSecs=optMapperErrSecs, optTransportLoop=optTransportLoop, optT1E1CfgResource=optT1E1CfgResource, optMapperPathLOPErrs=optMapperPathLOPErrs, optT1E1LinkConfigEntry=optT1E1LinkConfigEntry)
(object_identifier, integer, octet_string) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'Integer', 'OctetString') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_union, constraints_intersection, value_range_constraint, single_value_constraint, value_size_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsUnion', 'ConstraintsIntersection', 'ValueRangeConstraint', 'SingleValueConstraint', 'ValueSizeConstraint') (nest_slot_address, trap_sequence, one_byte_field, link_port_address, port_status, link_cmd_status, devices) = mibBuilder.importSymbols('ERI-DNX-SMC-MIB', 'NestSlotAddress', 'trapSequence', 'OneByteField', 'LinkPortAddress', 'PortStatus', 'LinkCmdStatus', 'devices') (eri_mibs,) = mibBuilder.importSymbols('ERI-ROOT-SMI', 'eriMibs') (module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup') (object_identity, notification_type, counter32, time_ticks, module_identity, gauge32, ip_address, counter64, unsigned32, mib_scalar, mib_table, mib_table_row, mib_table_column, mib_identifier, integer32, iso, bits) = mibBuilder.importSymbols('SNMPv2-SMI', 'ObjectIdentity', 'NotificationType', 'Counter32', 'TimeTicks', 'ModuleIdentity', 'Gauge32', 'IpAddress', 'Counter64', 'Unsigned32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'MibIdentifier', 'Integer32', 'iso', 'Bits') (display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention') eri_dnx_stm1_oc3_mib = module_identity((1, 3, 6, 1, 4, 1, 644, 3, 9)) eriDNXStm1Oc3MIB.setRevisions(('2003-05-05 00:00', '2003-02-27 00:00', '2002-04-19 00:00', '2002-04-12 00:00', '2002-03-01 00:00', '2002-01-04 00:00', '2001-11-12 00:00', '2001-08-30 00:00')) if mibBuilder.loadTexts: eriDNXStm1Oc3MIB.setLastUpdated('200305050000Z') if mibBuilder.loadTexts: eriDNXStm1Oc3MIB.setOrganization('Eastern Research, Inc.') dnx_stm1_oc3 = mib_identifier((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7)) optical_config = mib_identifier((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1)) optical_diag = mib_identifier((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2)) class Payloadgrouptype(TextualConvention, Integer32): status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1)) named_values = named_values(('e1', 0), ('t1', 1)) optical_dev_config_table = mib_table((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 1)) if mibBuilder.loadTexts: opticalDevConfigTable.setStatus('current') optical_dev_config_entry = mib_table_row((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 1, 1)).setIndexNames((0, 'ERI-DNX-STM1-OC3-MIB', 'optDevCfgAddr')) if mibBuilder.loadTexts: opticalDevConfigEntry.setStatus('current') opt_dev_cfg_addr = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 1, 1, 1), nest_slot_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: optDevCfgAddr.setStatus('current') opt_dev_cfg_resource = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 1, 1, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: optDevCfgResource.setStatus('current') opt_dev_type = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 1, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3))).clone(namedValues=named_values(('stm1', 0), ('oc3', 1), ('stm1X', 2), ('oc3X', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: optDevType.setStatus('current') opt_dev_multiplex_mode = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 1, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4))).clone(namedValues=named_values(('au3', 0), ('au4', 1), ('sts-3', 2), ('sts-3c', 3), ('au4-vc3-Seq', 4)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: optDevMultiplexMode.setStatus('current') opt_line_timing = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 1, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('local', 0), ('loop', 1)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: optLineTiming.setStatus('current') opt_dev_payload1 = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 1, 1, 6), pay_load_group_type()).setMaxAccess('readwrite') if mibBuilder.loadTexts: optDevPayload1.setStatus('current') opt_dev_payload2 = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 1, 1, 7), pay_load_group_type()).setMaxAccess('readwrite') if mibBuilder.loadTexts: optDevPayload2.setStatus('current') opt_dev_payload3 = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 1, 1, 8), pay_load_group_type()).setMaxAccess('readwrite') if mibBuilder.loadTexts: optDevPayload3.setStatus('current') opt_dev_cmd_status = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 1, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 101, 400, 402, 403, 414, 415, 416, 419, 421, 424, 427, 450, 500, 501, 502))).clone(namedValues=named_values(('ready-for-command', 0), ('update-config', 1), ('update-successful', 101), ('err-general-opt-config-error', 400), ('err-au4Seq-cannot-be-mixed-framing', 402), ('err-invalid-opt-dev-command', 403), ('err-device-is-protection-module', 414), ('err-invalid-multiplex-map', 415), ('err-invalid-payload-framing', 416), ('err-invalid-xlink-nest-num', 419), ('err-invalid-line-timing', 421), ('err-ts-alloc-not-applicable', 424), ('err-xlink-pair-not-applicable', 427), ('err-data-locked-by-another-user', 450), ('err-snmp-parse-failed', 500), ('err-invalid-snmp-type', 501), ('err-invalid-snmp-var-size', 502)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: optDevCmdStatus.setStatus('current') opt_dev_ts_alloc = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 1, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('normal', 0), ('alternate', 1)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: optDevTsAlloc.setStatus('current') opt_dev_assigned_to_nest = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 1, 1, 11), integer32().subtype(subtypeSpec=constraints_union(value_range_constraint(0, 0), value_range_constraint(2, 8)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: optDevAssignedToNest.setStatus('current') opt_t1_e1_link_config_table = mib_table((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 2)) if mibBuilder.loadTexts: optT1E1LinkConfigTable.setStatus('current') opt_t1_e1_link_config_entry = mib_table_row((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 2, 1)).setIndexNames((0, 'ERI-DNX-STM1-OC3-MIB', 'optT1E1CfgLinkAddr')) if mibBuilder.loadTexts: optT1E1LinkConfigEntry.setStatus('current') opt_t1_e1_cfg_link_addr = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 2, 1, 1), link_port_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: optT1E1CfgLinkAddr.setStatus('current') opt_t1_e1_cfg_resource = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 2, 1, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: optT1E1CfgResource.setStatus('current') opt_t1_e1_cfg_link_name = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 2, 1, 3), display_string().subtype(subtypeSpec=value_size_constraint(0, 20))).setMaxAccess('readwrite') if mibBuilder.loadTexts: optT1E1CfgLinkName.setStatus('current') opt_t1_e1_status = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 2, 1, 4), port_status()).setMaxAccess('readwrite') if mibBuilder.loadTexts: optT1E1Status.setStatus('current') opt_t1_e1_clear = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 2, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('disabled', 0), ('framed', 1), ('unframed', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: optT1E1Clear.setStatus('current') opt_t1_e1_framing = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 2, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7))).clone(namedValues=named_values(('e1', 0), ('e1Crc', 1), ('e1Cas', 2), ('e1CasCrc', 3), ('e1Unframed', 4), ('t1Esf', 5), ('t1D4', 6), ('t1Unframed', 7)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: optT1E1Framing.setStatus('current') opt_t1_e1_recover_time = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 2, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(3, 10, 15))).clone(namedValues=named_values(('timeout-3-secs', 3), ('timeout-10-secs', 10), ('timeout-15-secs', 15)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: optT1E1RecoverTime.setStatus('current') opt_t1_e1_esf_format = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 2, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('att-54016', 0), ('ansi-t1-403', 1)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: optT1E1EsfFormat.setStatus('current') opt_t1_e1_unused_t_ss = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 2, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('busy', 0), ('idle', 1)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: optT1E1UnusedTSs.setStatus('current') opt_t1_e1_cfg_cmd_status = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 2, 1, 10), link_cmd_status()).setMaxAccess('readwrite') if mibBuilder.loadTexts: optT1E1CfgCmdStatus.setStatus('current') opt_t1_e1_national_bits = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 2, 1, 11), one_byte_field()).setMaxAccess('readwrite') if mibBuilder.loadTexts: optT1E1NationalBits.setStatus('current') opt_t1_e1_inter_national = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 1, 2, 1, 12), one_byte_field()).setMaxAccess('readwrite') if mibBuilder.loadTexts: optT1E1InterNational.setStatus('current') optical_tu_status_table = mib_table((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 1)) if mibBuilder.loadTexts: opticalTUStatusTable.setStatus('current') optical_tu_status_entry = mib_table_row((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 1, 1)).setIndexNames((0, 'ERI-DNX-STM1-OC3-MIB', 'optTUStatusAddr')) if mibBuilder.loadTexts: opticalTUStatusEntry.setStatus('current') opt_tu_status_addr = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 1, 1, 1), link_port_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: optTUStatusAddr.setStatus('current') opt_tu_status_resrc_id = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 1, 1, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: optTUStatusResrcId.setStatus('current') opt_tu_status_link_state = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 1, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 2, 8, 32, 64, 2048, 4096, 65535, 2097152, 4194304, 8388608, 6291456, 1073741824, 2147483647))).clone(namedValues=named_values(('ok', 0), ('yel', 2), ('ais', 8), ('lof', 32), ('los', 64), ('red', 2048), ('cfa', 4096), ('oos', 65535), ('txSlip', 2097152), ('rxSlip', 4194304), ('sef', 8388608), ('slip', 6291456), ('underTest', 1073741824), ('errors', 2147483647)))).setMaxAccess('readonly') if mibBuilder.loadTexts: optTUStatusLinkState.setStatus('current') opt_tu_status_err_secs = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 1, 1, 4), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: optTUStatusErrSecs.setStatus('current') opt_tu_status_ais_errs = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 1, 1, 5), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: optTUStatusAisErrs.setStatus('current') opt_tu_status_lop_errs = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 1, 1, 6), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: optTUStatusLopErrs.setStatus('current') opt_tu_status_rdi_tu_errs = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 1, 1, 7), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: optTUStatusRdiTUErrs.setStatus('current') opt_tu_status_rfi_tu_errs = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 1, 1, 8), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: optTUStatusRfiTUErrs.setStatus('current') opt_tu_status_pslm_errs = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 1, 1, 9), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: optTUStatusPSLMErrs.setStatus('current') opt_tu_status_pslu_errs = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 1, 1, 10), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: optTUStatusPSLUErrs.setStatus('current') opt_tu_status_err_free_secs = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 1, 1, 11), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: optTUStatusErrFreeSecs.setStatus('current') optical_mapper_status_table = mib_table((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 2)) if mibBuilder.loadTexts: opticalMapperStatusTable.setStatus('current') optical_mapper_status_entry = mib_table_row((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 2, 1)).setIndexNames((0, 'ERI-DNX-STM1-OC3-MIB', 'optMapperStatusAddr')) if mibBuilder.loadTexts: opticalMapperStatusEntry.setStatus('current') opt_mapper_status_addr = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 2, 1, 1), link_port_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: optMapperStatusAddr.setStatus('current') opt_mapper_status_resrc_id = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 2, 1, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: optMapperStatusResrcId.setStatus('current') opt_mapper_state = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 2, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 2, 8, 16, 32, 64, 128, 2048, 4096, 65535, 2097152, 4194304, 8388608, 6291456, 1073741824, 2147483647))).clone(namedValues=named_values(('ok', 0), ('yel', 2), ('ais', 8), ('lop', 16), ('lof', 32), ('los', 64), ('rdi', 128), ('red', 2048), ('cfa', 4096), ('oos', 65535), ('txSlip', 2097152), ('rxSlip', 4194304), ('sef', 8388608), ('slip', 6291456), ('underTest', 1073741824), ('errors', 2147483647)))).setMaxAccess('readonly') if mibBuilder.loadTexts: optMapperState.setStatus('current') opt_mapper_err_secs = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 2, 1, 4), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: optMapperErrSecs.setStatus('current') opt_mapper_err_free_secs = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 2, 1, 5), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: optMapperErrFreeSecs.setStatus('current') opt_mapper_loop = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 2, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 3))).clone(namedValues=named_values(('off', 0), ('local', 1), ('line', 3)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: optMapperLoop.setStatus('current') opt_mapper_path_lop_errs = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 2, 1, 7), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: optMapperPathLOPErrs.setStatus('current') opt_mapper_path_ais_errs = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 2, 1, 8), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: optMapperPathAISErrs.setStatus('current') opt_mapper_path_rdi_errs = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 2, 1, 9), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: optMapperPathRDIErrs.setStatus('current') opt_mapper_cmd_status = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 2, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 14, 101, 114, 200, 202, 206, 500, 501, 502))).clone(namedValues=named_values(('ready-for-command', 0), ('updateTest', 1), ('clearErrors', 14), ('update-successful', 101), ('clear-successful', 114), ('err-general-test-error', 200), ('err-invalid-loop-type', 202), ('err-field-cannot-be-set', 206), ('err-snmp-parse-failed', 500), ('err-invalid-snmp-type', 501), ('err-invalid-snmp-var-size', 502)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: optMapperCmdStatus.setStatus('current') optical_transport_status_table = mib_table((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 3)) if mibBuilder.loadTexts: opticalTransportStatusTable.setStatus('current') optical_transport_status_entry = mib_table_row((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 3, 1)).setIndexNames((0, 'ERI-DNX-STM1-OC3-MIB', 'optTransportStatusAddr')) if mibBuilder.loadTexts: opticalTransportStatusEntry.setStatus('current') opt_transport_status_addr = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 3, 1, 1), nest_slot_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: optTransportStatusAddr.setStatus('current') opt_transport_status_resrc_id = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 3, 1, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: optTransportStatusResrcId.setStatus('current') opt_transport_laser_state = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 3, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('off', 0), ('on', 1)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: optTransportLaserState.setStatus('current') opt_transport_err_secs = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 3, 1, 4), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: optTransportErrSecs.setStatus('current') opt_transport_err_free_secs = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 3, 1, 5), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: optTransportErrFreeSecs.setStatus('current') opt_transport_loop = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 3, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3))).clone(namedValues=named_values(('off', 0), ('terminal', 1), ('facility', 2), ('pathFacility', 3)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: optTransportLoop.setStatus('current') opt_transport_line_ais_errs = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 3, 1, 7), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: optTransportLineAISErrs.setStatus('current') opt_transport_line_rdi_errs = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 3, 1, 8), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: optTransportLineRDIErrs.setStatus('current') opt_transport_line_oof_errs = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 3, 1, 9), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: optTransportLineOOFErrs.setStatus('current') opt_transport_line_lof_errs = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 3, 1, 10), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: optTransportLineLOFErrs.setStatus('current') opt_transport_line_los_errs = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 3, 1, 11), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: optTransportLineLOSErrs.setStatus('current') opt_transport_cmd_status = mib_table_column((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 2, 3, 1, 12), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 14, 101, 114, 400, 402, 406, 500, 501, 502))).clone(namedValues=named_values(('ready-for-command', 0), ('updateTest', 1), ('clearErrors', 14), ('update-successful', 101), ('clear-successful', 114), ('err-general-test-error', 400), ('err-invalid-loop-type', 402), ('err-field-cannot-be-set', 406), ('err-snmp-parse-failed', 500), ('err-invalid-snmp-type', 501), ('err-invalid-snmp-var-size', 502)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: optTransportCmdStatus.setStatus('current') dnx_stm1_oc3_enterprise = object_identity((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 0)) if mibBuilder.loadTexts: dnxStm1Oc3Enterprise.setStatus('current') opt_dev_config_trap = notification_type((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 0, 1)).setObjects(('ERI-DNX-SMC-MIB', 'trapSequence'), ('ERI-DNX-STM1-OC3-MIB', 'optDevCfgAddr'), ('ERI-DNX-STM1-OC3-MIB', 'optDevCmdStatus')) if mibBuilder.loadTexts: optDevConfigTrap.setStatus('current') opt_t1_e1_config_trap = notification_type((1, 3, 6, 1, 4, 1, 644, 2, 4, 2, 7, 0, 2)).setObjects(('ERI-DNX-SMC-MIB', 'trapSequence'), ('ERI-DNX-STM1-OC3-MIB', 'optT1E1CfgLinkAddr'), ('ERI-DNX-STM1-OC3-MIB', 'optT1E1CfgCmdStatus')) if mibBuilder.loadTexts: optT1E1ConfigTrap.setStatus('current') mibBuilder.exportSymbols('ERI-DNX-STM1-OC3-MIB', optTransportLineLOFErrs=optTransportLineLOFErrs, dnxStm1Oc3=dnxStm1Oc3, optDevCmdStatus=optDevCmdStatus, optTransportErrSecs=optTransportErrSecs, opticalConfig=opticalConfig, optTUStatusRdiTUErrs=optTUStatusRdiTUErrs, optT1E1CfgLinkAddr=optT1E1CfgLinkAddr, optT1E1CfgLinkName=optT1E1CfgLinkName, optTUStatusLopErrs=optTUStatusLopErrs, optMapperPathAISErrs=optMapperPathAISErrs, opticalTUStatusTable=opticalTUStatusTable, optT1E1Clear=optT1E1Clear, optTransportErrFreeSecs=optTransportErrFreeSecs, optTUStatusErrSecs=optTUStatusErrSecs, optTransportLineAISErrs=optTransportLineAISErrs, optTransportLineOOFErrs=optTransportLineOOFErrs, optTransportLaserState=optTransportLaserState, optT1E1ConfigTrap=optT1E1ConfigTrap, opticalDiag=opticalDiag, optDevPayload1=optDevPayload1, optTUStatusPSLMErrs=optTUStatusPSLMErrs, optDevPayload3=optDevPayload3, optMapperStatusResrcId=optMapperStatusResrcId, optMapperCmdStatus=optMapperCmdStatus, optT1E1CfgCmdStatus=optT1E1CfgCmdStatus, optT1E1Framing=optT1E1Framing, optT1E1EsfFormat=optT1E1EsfFormat, optTUStatusPSLUErrs=optTUStatusPSLUErrs, optDevCfgAddr=optDevCfgAddr, optTUStatusErrFreeSecs=optTUStatusErrFreeSecs, optTransportStatusAddr=optTransportStatusAddr, optTransportLineLOSErrs=optTransportLineLOSErrs, PYSNMP_MODULE_ID=eriDNXStm1Oc3MIB, optDevType=optDevType, optTUStatusResrcId=optTUStatusResrcId, opticalMapperStatusEntry=opticalMapperStatusEntry, optMapperStatusAddr=optMapperStatusAddr, dnxStm1Oc3Enterprise=dnxStm1Oc3Enterprise, optT1E1NationalBits=optT1E1NationalBits, optDevTsAlloc=optDevTsAlloc, optT1E1UnusedTSs=optT1E1UnusedTSs, optT1E1InterNational=optT1E1InterNational, optT1E1LinkConfigTable=optT1E1LinkConfigTable, optTransportStatusResrcId=optTransportStatusResrcId, optLineTiming=optLineTiming, optTUStatusRfiTUErrs=optTUStatusRfiTUErrs, optT1E1Status=optT1E1Status, optTUStatusLinkState=optTUStatusLinkState, optTransportLineRDIErrs=optTransportLineRDIErrs, opticalDevConfigTable=opticalDevConfigTable, optTUStatusAddr=optTUStatusAddr, optDevCfgResource=optDevCfgResource, optTransportCmdStatus=optTransportCmdStatus, optDevPayload2=optDevPayload2, opticalTransportStatusTable=opticalTransportStatusTable, optDevMultiplexMode=optDevMultiplexMode, optDevAssignedToNest=optDevAssignedToNest, optMapperState=optMapperState, eriDNXStm1Oc3MIB=eriDNXStm1Oc3MIB, optMapperPathRDIErrs=optMapperPathRDIErrs, opticalDevConfigEntry=opticalDevConfigEntry, opticalTUStatusEntry=opticalTUStatusEntry, optTUStatusAisErrs=optTUStatusAisErrs, optT1E1RecoverTime=optT1E1RecoverTime, optMapperLoop=optMapperLoop, PayLoadGroupType=PayLoadGroupType, opticalMapperStatusTable=opticalMapperStatusTable, optMapperErrFreeSecs=optMapperErrFreeSecs, optDevConfigTrap=optDevConfigTrap, opticalTransportStatusEntry=opticalTransportStatusEntry, optMapperErrSecs=optMapperErrSecs, optTransportLoop=optTransportLoop, optT1E1CfgResource=optT1E1CfgResource, optMapperPathLOPErrs=optMapperPathLOPErrs, optT1E1LinkConfigEntry=optT1E1LinkConfigEntry)
class User: user = [] ''' this class creates new instance of user data ''' def __init__(self, username, password): ''' init method to define objects Args: username: to ask user a username password: to either generate or ask user for a password ''' self.username = username self.password = password def new_user(self): ''' Method that appends a user ''' User.user.append(self) def save_user(self): ''' Method that saves a new user ''' User.user.append(self) def delete_user(self): ''' Method that deletes a user ''' User.user.remove(self)
class User: user = [] '\n this class creates new instance of user data\n ' def __init__(self, username, password): """ init method to define objects Args: username: to ask user a username password: to either generate or ask user for a password """ self.username = username self.password = password def new_user(self): """ Method that appends a user """ User.user.append(self) def save_user(self): """ Method that saves a new user """ User.user.append(self) def delete_user(self): """ Method that deletes a user """ User.user.remove(self)
def gcd(a,b): if a==0: return b else: return gcd(b%a,a) c = gcd(100,35) # c = 5 print(c)
def gcd(a, b): if a == 0: return b else: return gcd(b % a, a) c = gcd(100, 35) print(c)
def debug(ctx,n): print("######### BEGIN DEBUG"+n+"################") print(ctx.getText()) print("######### END DEBUG ################") class ASTException(Exception): pass
def debug(ctx, n): print('######### BEGIN DEBUG' + n + '################') print(ctx.getText()) print('######### END DEBUG ################') class Astexception(Exception): pass
class QuadTree: """A class implementing a quadtree.""" def __init__(self, boundary, max_points=4, depth=0): """Initialize this node of the quadtree. boundary is a Rect object defining the region from which points are placed into this node; max_points is the maximum number of points the node can hold before it must divide (branch into four more nodes); depth keeps track of how deep into the quadtree this node lies. """ self.boundary = boundary self.max_points = max_points self.points = [] self.depth = depth # A flag to indicate whether this node has divided (branched) or not. self.divided = False def __str__(self): """Return a string representation of this node, suitably formatted.""" sp = ' ' * self.depth * 2 s = str(self.boundary) + '\n' s += sp + ', '.join(str(point) for point in self.points) if not self.divided: return s return s + '\n' + '\n'.join([ sp + 'nw: ' + str(self.nw), sp + 'ne: ' + str(self.ne), sp + 'se: ' + str(self.se), sp + 'sw: ' + str(self.sw)]) def divide(self): """Divide (branch) this node by spawning four children nodes.""" cx, cy = self.boundary.cx, self.boundary.cy w, h = self.boundary.w / 2, self.boundary.h / 2 # The boundaries of the four children nodes are "northwest", # "northeast", "southeast" and "southwest" quadrants within the # boundary of the current node. self.nw = QuadTree(Rect(cx - w/2, cy - h/2, w, h), self.max_points, self.depth + 1) self.ne = QuadTree(Rect(cx + w/2, cy - h/2, w, h), self.max_points, self.depth + 1) self.se = QuadTree(Rect(cx + w/2, cy + h/2, w, h), self.max_points, self.depth + 1) self.sw = QuadTree(Rect(cx - w/2, cy + h/2, w, h), self.max_points, self.depth + 1) self.divided = True def insert(self, point): """Try to insert Point point into this QuadTree.""" if not self.boundary.contains(point): # The point does not lie inside boundary: bail. return False if len(self.points) < self.max_points: # There's room for our point without dividing the QuadTree. self.points.append(point) return True # No room: divide if necessary, then try the sub-quads. if not self.divided: self.divide() return (self.ne.insert(point) or self.nw.insert(point) or self.se.insert(point) or self.sw.insert(point)) def query(self, boundary, found_points): """Find the points in the quadtree that lie within boundary.""" if not self.boundary.intersects(boundary): # If the domain of this node does not intersect the search # region, we don't need to look in it for points. return False # Search this node's points to see if they lie within boundary ... for point in self.points: if boundary.contains(point): found_points.append(point) # ... and if this node has children, search them too. if self.divided: self.nw.query(boundary, found_points) self.ne.query(boundary, found_points) self.se.query(boundary, found_points) self.sw.query(boundary, found_points) return found_points def query_circle(self, boundary, centre, radius, found_points): """Find the points in the quadtree that lie within radius of centre. boundary is a Rect object (a square) that bounds the search circle. There is no need to call this method directly: use query_radius. """ if not self.boundary.intersects(boundary): # If the domain of this node does not intersect the search # region, we don't need to look in it for points. return False # Search this node's points to see if they lie within boundary # and also lie within a circle of given radius around the centre point. for point in self.points: if (boundary.contains(point) and point.distance_to(centre) <= radius): found_points.append(point) # Recurse the search into this node's children. if self.divided: self.nw.query_circle(boundary, centre, radius, found_points) self.ne.query_circle(boundary, centre, radius, found_points) self.se.query_circle(boundary, centre, radius, found_points) self.sw.query_circle(boundary, centre, radius, found_points) return found_points def query_radius(self, centre, radius, found_points): """Find the points in the quadtree that lie within radius of centre.""" # First find the square that bounds the search circle as a Rect object. boundary = Rect(*centre, 2*radius, 2*radius) return self.query_circle(boundary, centre, radius, found_points) def __len__(self): """Return the number of points in the quadtree.""" npoints = len(self.points) if self.divided: npoints += len(self.nw)+len(self.ne)+len(self.se)+len(self.sw) return npoints def draw(self, ax): """Draw a representation of the quadtree on Matplotlib Axes ax.""" self.boundary.draw(ax) if self.divided: self.nw.draw(ax) self.ne.draw(ax) self.se.draw(ax) self.sw.draw(ax)
class Quadtree: """A class implementing a quadtree.""" def __init__(self, boundary, max_points=4, depth=0): """Initialize this node of the quadtree. boundary is a Rect object defining the region from which points are placed into this node; max_points is the maximum number of points the node can hold before it must divide (branch into four more nodes); depth keeps track of how deep into the quadtree this node lies. """ self.boundary = boundary self.max_points = max_points self.points = [] self.depth = depth self.divided = False def __str__(self): """Return a string representation of this node, suitably formatted.""" sp = ' ' * self.depth * 2 s = str(self.boundary) + '\n' s += sp + ', '.join((str(point) for point in self.points)) if not self.divided: return s return s + '\n' + '\n'.join([sp + 'nw: ' + str(self.nw), sp + 'ne: ' + str(self.ne), sp + 'se: ' + str(self.se), sp + 'sw: ' + str(self.sw)]) def divide(self): """Divide (branch) this node by spawning four children nodes.""" (cx, cy) = (self.boundary.cx, self.boundary.cy) (w, h) = (self.boundary.w / 2, self.boundary.h / 2) self.nw = quad_tree(rect(cx - w / 2, cy - h / 2, w, h), self.max_points, self.depth + 1) self.ne = quad_tree(rect(cx + w / 2, cy - h / 2, w, h), self.max_points, self.depth + 1) self.se = quad_tree(rect(cx + w / 2, cy + h / 2, w, h), self.max_points, self.depth + 1) self.sw = quad_tree(rect(cx - w / 2, cy + h / 2, w, h), self.max_points, self.depth + 1) self.divided = True def insert(self, point): """Try to insert Point point into this QuadTree.""" if not self.boundary.contains(point): return False if len(self.points) < self.max_points: self.points.append(point) return True if not self.divided: self.divide() return self.ne.insert(point) or self.nw.insert(point) or self.se.insert(point) or self.sw.insert(point) def query(self, boundary, found_points): """Find the points in the quadtree that lie within boundary.""" if not self.boundary.intersects(boundary): return False for point in self.points: if boundary.contains(point): found_points.append(point) if self.divided: self.nw.query(boundary, found_points) self.ne.query(boundary, found_points) self.se.query(boundary, found_points) self.sw.query(boundary, found_points) return found_points def query_circle(self, boundary, centre, radius, found_points): """Find the points in the quadtree that lie within radius of centre. boundary is a Rect object (a square) that bounds the search circle. There is no need to call this method directly: use query_radius. """ if not self.boundary.intersects(boundary): return False for point in self.points: if boundary.contains(point) and point.distance_to(centre) <= radius: found_points.append(point) if self.divided: self.nw.query_circle(boundary, centre, radius, found_points) self.ne.query_circle(boundary, centre, radius, found_points) self.se.query_circle(boundary, centre, radius, found_points) self.sw.query_circle(boundary, centre, radius, found_points) return found_points def query_radius(self, centre, radius, found_points): """Find the points in the quadtree that lie within radius of centre.""" boundary = rect(*centre, 2 * radius, 2 * radius) return self.query_circle(boundary, centre, radius, found_points) def __len__(self): """Return the number of points in the quadtree.""" npoints = len(self.points) if self.divided: npoints += len(self.nw) + len(self.ne) + len(self.se) + len(self.sw) return npoints def draw(self, ax): """Draw a representation of the quadtree on Matplotlib Axes ax.""" self.boundary.draw(ax) if self.divided: self.nw.draw(ax) self.ne.draw(ax) self.se.draw(ax) self.sw.draw(ax)
defines = { 'base00': '#F7B3DA', 'base01': '#f55050', 'base02': '#488214', 'base03': '#EEB422', 'base04': '#468dd4', 'base05': '#551a8b', 'base06': '#1b9e9e', 'base07': '#75616b', 'base08': '#9e8b95', 'base09': '#e06a26', 'base0A': '#f0dde6', 'base0B': '#b5a3ac', 'base0C': '#8a7680', 'base0D': '#3b2c33', 'base0E': '#d46a84', 'base0F': '#2b1d24', 'basefg': '#F0F0F0' } statements = { 'URxvt*color0': ' base00', 'URxvt*color1': ' base01', 'URxvt*color2': ' base02', 'URxvt*color3': ' base03', 'URxvt*color4': ' base04', 'URxvt*color5': ' base05', 'URxvt*color6': ' base06', 'URxvt*color7': ' base07', 'URxvt*color8': ' base08', 'URxvt*color9': ' base09', 'URxvt*color10': ' base0A', 'URxvt*color11': ' base0B', 'URxvt*color12': ' base0C', 'URxvt*color13': ' base0D', 'URxvt*color14': ' base0E', 'URxvt*color15': ' base0F', '*foreground': 'basefg', 'URxvt*inheritPixmap': 'true', 'URxvt*transparent': 'true', 'URxvt*shading': '20' } statements = {key.strip(): value.strip() for key, value in statements.items()}
defines = {'base00': '#F7B3DA', 'base01': '#f55050', 'base02': '#488214', 'base03': '#EEB422', 'base04': '#468dd4', 'base05': '#551a8b', 'base06': '#1b9e9e', 'base07': '#75616b', 'base08': '#9e8b95', 'base09': '#e06a26', 'base0A': '#f0dde6', 'base0B': '#b5a3ac', 'base0C': '#8a7680', 'base0D': '#3b2c33', 'base0E': '#d46a84', 'base0F': '#2b1d24', 'basefg': '#F0F0F0'} statements = {'URxvt*color0': ' base00', 'URxvt*color1': ' base01', 'URxvt*color2': ' base02', 'URxvt*color3': ' base03', 'URxvt*color4': ' base04', 'URxvt*color5': ' base05', 'URxvt*color6': ' base06', 'URxvt*color7': ' base07', 'URxvt*color8': ' base08', 'URxvt*color9': ' base09', 'URxvt*color10': ' base0A', 'URxvt*color11': ' base0B', 'URxvt*color12': ' base0C', 'URxvt*color13': ' base0D', 'URxvt*color14': ' base0E', 'URxvt*color15': ' base0F', '*foreground': 'basefg', 'URxvt*inheritPixmap': 'true', 'URxvt*transparent': 'true', 'URxvt*shading': '20'} statements = {key.strip(): value.strip() for (key, value) in statements.items()}
# -*- coding: utf-8 -*- """ Created on Sat Mar 13 11:40:13 2021 @author: Mayur """ """ Product class has all functinality related to adding/removing/displaying products """ class Product: name = "" price = 0 def __init__(self): self.all_products = [] def reset(self): self.all_products.clear() def add_product(self,name, price): new_prod = Product() new_prod.name = name new_prod.price = price self.all_products.append(new_prod) def remove_product(self,prod): for item in self.all_products: if(item.name == prod): self.all_products.remove(item) def display_all_products(self): print("List of all available products:\n*********************************") for item in self.all_products: print(item.name) print("******************************") """ Denomination class has all functinality related to adding/removing/displaying products """ class Denomination: def __init__(self): self.all_denomination = [] def add_denomination(self, denom): self.all_denomination.append(denom) def remove_denomination(self, denom): for item in self.all_denomination: if(item==denom): self.all_denomination.remove(item) def reset(self): self.all_denomination.clear() def display_all_denomination(self): print("Below are all Available denominations: \n") for item in self.all_denomination: print (item) print("\n") """ Cart class has all functinality related to adding/removing/displaying products in the cart, paying/placing/caceling order """ class Cart: def __init__(self): self.prod = [] self.cart_value = 0 def add_to_cart(self, item): self.prod.append(item) self.cart_value = self.cart_value + item.price def edit_order(self, remove_prod): for item in self.prod: if(item.name == remove_prod): self.prod.remove(item) self.cart_value = self.cart_value - item.price print("Product removed successfully") break def pay_order(self, denomination): try: print("Below is the Your Cart") cash_collected = 0 if len(self.prod)>0: for i, x in enumerate(self.prod): print(x.name + "\t") print("Total cart value is \t", self.cart_value) else: print("Cart is empty") return False if len(denomination.all_denomination)>0: while True: denomination.display_all_denomination() print("Type denominations you wish to pay cash in \n") selected_denomin = float(input()) for i, x in enumerate(denomination.all_denomination): if selected_denomin == x: if cash_collected < cash_collected + x: cash_collected = cash_collected + x print("Total cash collected is ",cash_collected) if cash_collected == self.cart_value: cancel_place = int(input("1. Cancel order and take refund \n2. Confirm Order\n")) if cancel_place == 1: self.cancel_order() return False elif cancel_place == 2: self.place_order() return False else: return False break else: print("Money paid is more than Cart value, pls select denominations correctly.") else: print("No Denmonations set, contact admin") return False except: print("Some error occured, please retry") def cancel_order(self): print("Your order is cancelled Successfully, please collect your cash of \t", self.cart_value) return False def place_order(self): print("Thanks for placing order with us. Don't forget to collect your Food...........") return False """ VendingMachine class is the main class which consumes all the classes like Product/Cart/Denomination """ class VendingMachine: def __init__(self): self.product = Product() self.denomination = Denomination() self.cart = Cart() while True: try: print("***************Welcome to Awesome Vending Machine****************") user_or_admin = int(input("Select your input:\n 1. Place Order\n 2. Admin Login \n")) if user_or_admin == 1: self.user_flow() pass elif user_or_admin == 2: self.admin_flow() else: print("Invalid input, exiting..") except: print("Some error occured, please retry") def reset_machine(self): self.product.reset() self.denomination.reset() def admin_flow(self): while True: try: admin_inp = int(input("Enter Your Choice\n1. Add Product\n2. Add Denomination \n3. Reset Machine \n4. Remove Denomination \n5. Remove Product \n6. Enter any key to go to main menu\n")) if admin_inp == 1: name = input("Enter Product name\t") price = float(input("Enter Product price \t")) self.product.add_product(name, price) elif admin_inp == 2: denom = float(input("Enter Denomination\t")) self.denomination.add_denomination(denom) elif admin_inp == 3: self.reset() elif admin_inp == 4: self.display_all_denomination() print("Type denomination to be deleted\n") denom = float(input("Enter Denomination\t")) self.denomination.remove_denomination(denom) elif admin_inp == 5: self.display_all_products() print("Type product to be deleted\n") prod = input("Enter Product to be deleted \t") self.product.remove_product(prod) else: return False except: print("Some unexpected error occured, please conatct admin for any quries") def user_flow(self): self.cart = Cart() while True: try: if len(self.product.all_products)==0: print("No products available, contact admin...") return False self.product.display_all_products() selected_prod = input("\n 1. Type Name of product you wish to select\n 2. Type pay to checkout\n 3. Type exit to got to main menu \n 4. Type remove for removing product from cart \n") if selected_prod=="exit": self.in_sub_menu = False return False if selected_prod=="pay": self.cart.pay_order(self.denomination) return False if selected_prod=="remove": remove_prod = input("Type name of product you wish to remove \n") self.cart.edit_order(remove_prod) for i, x in enumerate(self.product.all_products): if selected_prod == x.name: self.cart.add_to_cart(x) else: print("Invalid input\n") except: print("Some unexpected error occured, please conatct admin for any quries") if __name__ == '__main__': v = VendingMachine()
""" Created on Sat Mar 13 11:40:13 2021 @author: Mayur """ '\nProduct class has all functinality related to adding/removing/displaying products\n' class Product: name = '' price = 0 def __init__(self): self.all_products = [] def reset(self): self.all_products.clear() def add_product(self, name, price): new_prod = product() new_prod.name = name new_prod.price = price self.all_products.append(new_prod) def remove_product(self, prod): for item in self.all_products: if item.name == prod: self.all_products.remove(item) def display_all_products(self): print('List of all available products:\n*********************************') for item in self.all_products: print(item.name) print('******************************') '\nDenomination class has all functinality related to adding/removing/displaying products\n' class Denomination: def __init__(self): self.all_denomination = [] def add_denomination(self, denom): self.all_denomination.append(denom) def remove_denomination(self, denom): for item in self.all_denomination: if item == denom: self.all_denomination.remove(item) def reset(self): self.all_denomination.clear() def display_all_denomination(self): print('Below are all Available denominations: \n') for item in self.all_denomination: print(item) print('\n') '\nCart class has all functinality related to adding/removing/displaying products in the cart, paying/placing/caceling order\n' class Cart: def __init__(self): self.prod = [] self.cart_value = 0 def add_to_cart(self, item): self.prod.append(item) self.cart_value = self.cart_value + item.price def edit_order(self, remove_prod): for item in self.prod: if item.name == remove_prod: self.prod.remove(item) self.cart_value = self.cart_value - item.price print('Product removed successfully') break def pay_order(self, denomination): try: print('Below is the Your Cart') cash_collected = 0 if len(self.prod) > 0: for (i, x) in enumerate(self.prod): print(x.name + '\t') print('Total cart value is \t', self.cart_value) else: print('Cart is empty') return False if len(denomination.all_denomination) > 0: while True: denomination.display_all_denomination() print('Type denominations you wish to pay cash in \n') selected_denomin = float(input()) for (i, x) in enumerate(denomination.all_denomination): if selected_denomin == x: if cash_collected < cash_collected + x: cash_collected = cash_collected + x print('Total cash collected is ', cash_collected) if cash_collected == self.cart_value: cancel_place = int(input('1. Cancel order and take refund \n2. Confirm Order\n')) if cancel_place == 1: self.cancel_order() return False elif cancel_place == 2: self.place_order() return False else: return False break else: print('Money paid is more than Cart value, pls select denominations correctly.') else: print('No Denmonations set, contact admin') return False except: print('Some error occured, please retry') def cancel_order(self): print('Your order is cancelled Successfully, please collect your cash of \t', self.cart_value) return False def place_order(self): print("Thanks for placing order with us. Don't forget to collect your Food...........") return False '\nVendingMachine class is the main class which consumes all the classes like Product/Cart/Denomination\n' class Vendingmachine: def __init__(self): self.product = product() self.denomination = denomination() self.cart = cart() while True: try: print('***************Welcome to Awesome Vending Machine****************') user_or_admin = int(input('Select your input:\n 1. Place Order\n 2. Admin Login \n')) if user_or_admin == 1: self.user_flow() pass elif user_or_admin == 2: self.admin_flow() else: print('Invalid input, exiting..') except: print('Some error occured, please retry') def reset_machine(self): self.product.reset() self.denomination.reset() def admin_flow(self): while True: try: admin_inp = int(input('Enter Your Choice\n1. Add Product\n2. Add Denomination \n3. Reset Machine \n4. Remove Denomination \n5. Remove Product \n6. Enter any key to go to main menu\n')) if admin_inp == 1: name = input('Enter Product name\t') price = float(input('Enter Product price \t')) self.product.add_product(name, price) elif admin_inp == 2: denom = float(input('Enter Denomination\t')) self.denomination.add_denomination(denom) elif admin_inp == 3: self.reset() elif admin_inp == 4: self.display_all_denomination() print('Type denomination to be deleted\n') denom = float(input('Enter Denomination\t')) self.denomination.remove_denomination(denom) elif admin_inp == 5: self.display_all_products() print('Type product to be deleted\n') prod = input('Enter Product to be deleted \t') self.product.remove_product(prod) else: return False except: print('Some unexpected error occured, please conatct admin for any quries') def user_flow(self): self.cart = cart() while True: try: if len(self.product.all_products) == 0: print('No products available, contact admin...') return False self.product.display_all_products() selected_prod = input('\n 1. Type Name of product you wish to select\n 2. Type pay to checkout\n 3. Type exit to got to main menu \n 4. Type remove for removing product from cart \n') if selected_prod == 'exit': self.in_sub_menu = False return False if selected_prod == 'pay': self.cart.pay_order(self.denomination) return False if selected_prod == 'remove': remove_prod = input('Type name of product you wish to remove \n') self.cart.edit_order(remove_prod) for (i, x) in enumerate(self.product.all_products): if selected_prod == x.name: self.cart.add_to_cart(x) else: print('Invalid input\n') except: print('Some unexpected error occured, please conatct admin for any quries') if __name__ == '__main__': v = vending_machine()
""" ScriptList object (and friends). """ __all__ = ["ScriptList", "ScriptRecord", "ScriptCount", "LangSysRecord", "LangSysCount"] class ScriptList(object): __slots__ = ["ScriptCount", "ScriptRecord"] def __init__(self): self.ScriptCount = 0 self.ScriptRecord = None def loadFromFontTools(self, scriptList): self.ScriptCount = scriptList.ScriptCount self.ScriptRecord = [ScriptRecord().loadFromFontTools(record) for record in scriptList.ScriptRecord] return self class ScriptRecord(object): __slots__ = ["ScriptTag", "Script"] def __init__(self): self.ScriptTag = None self.Script = None def loadFromFontTools(self, scriptRecord): self.ScriptTag = scriptRecord.ScriptTag self.Script = Script().loadFromFontTools(scriptRecord.Script) return self class Script(object): __slots__ = ["DefaultLangSys", "LangSysCount", "LangSysRecord"] def __init__(self): self.DefaultLangSys = None self.LangSysCount = 0 self.LangSysRecord = [] def loadFromFontTools(self, script): self.DefaultLangSys = None if script.DefaultLangSys is not None: self.DefaultLangSys = LangSys().loadFromFontTools(script.DefaultLangSys) self.LangSysCount = script.LangSysCount self.LangSysRecord = [LangSysRecord().loadFromFontTools(record) for record in script.LangSysRecord] return self class LangSysRecord(object): __slots__ = ["LangSysTag", "LangSys"] def __init__(self): self.LangSysTag = None self.LangSys = None def loadFromFontTools(self, langSysRecord): self.LangSysTag = langSysRecord.LangSysTag self.LangSys = LangSys().loadFromFontTools(langSysRecord.LangSys) return self class LangSys(object): __slots__ = ["LookupOrder", "ReqFeatureIndex", "FeatureCount", "FeatureIndex"] def __init__(self): self.LookupOrder = None self.ReqFeatureIndex = None self.FeatureCount = 0 self.FeatureIndex = [] def loadFromFontTools(self, langSys): self.LookupOrder = langSys.LookupOrder # XXX? self.ReqFeatureIndex = langSys.ReqFeatureIndex self.FeatureCount = langSys.FeatureCount self.FeatureIndex = list(langSys.FeatureIndex) return self
""" ScriptList object (and friends). """ __all__ = ['ScriptList', 'ScriptRecord', 'ScriptCount', 'LangSysRecord', 'LangSysCount'] class Scriptlist(object): __slots__ = ['ScriptCount', 'ScriptRecord'] def __init__(self): self.ScriptCount = 0 self.ScriptRecord = None def load_from_font_tools(self, scriptList): self.ScriptCount = scriptList.ScriptCount self.ScriptRecord = [script_record().loadFromFontTools(record) for record in scriptList.ScriptRecord] return self class Scriptrecord(object): __slots__ = ['ScriptTag', 'Script'] def __init__(self): self.ScriptTag = None self.Script = None def load_from_font_tools(self, scriptRecord): self.ScriptTag = scriptRecord.ScriptTag self.Script = script().loadFromFontTools(scriptRecord.Script) return self class Script(object): __slots__ = ['DefaultLangSys', 'LangSysCount', 'LangSysRecord'] def __init__(self): self.DefaultLangSys = None self.LangSysCount = 0 self.LangSysRecord = [] def load_from_font_tools(self, script): self.DefaultLangSys = None if script.DefaultLangSys is not None: self.DefaultLangSys = lang_sys().loadFromFontTools(script.DefaultLangSys) self.LangSysCount = script.LangSysCount self.LangSysRecord = [lang_sys_record().loadFromFontTools(record) for record in script.LangSysRecord] return self class Langsysrecord(object): __slots__ = ['LangSysTag', 'LangSys'] def __init__(self): self.LangSysTag = None self.LangSys = None def load_from_font_tools(self, langSysRecord): self.LangSysTag = langSysRecord.LangSysTag self.LangSys = lang_sys().loadFromFontTools(langSysRecord.LangSys) return self class Langsys(object): __slots__ = ['LookupOrder', 'ReqFeatureIndex', 'FeatureCount', 'FeatureIndex'] def __init__(self): self.LookupOrder = None self.ReqFeatureIndex = None self.FeatureCount = 0 self.FeatureIndex = [] def load_from_font_tools(self, langSys): self.LookupOrder = langSys.LookupOrder self.ReqFeatureIndex = langSys.ReqFeatureIndex self.FeatureCount = langSys.FeatureCount self.FeatureIndex = list(langSys.FeatureIndex) return self
class Solution(object): def destCity(self, paths): """ :type paths: List[List[str]] :rtype: str """ record = {} all_cities = [] for cities in paths: record[cities[0]] = cities[1] for city in record.values(): if city not in record: return city return False
class Solution(object): def dest_city(self, paths): """ :type paths: List[List[str]] :rtype: str """ record = {} all_cities = [] for cities in paths: record[cities[0]] = cities[1] for city in record.values(): if city not in record: return city return False
#MenuTitle: Show Glyphs with this Anchor # -*- coding: utf-8 -*- __doc__=""" New Tab with all Glyphs that have the selected anchor. """ thisFont = Glyphs.font # frontmost font selectedLayer = thisFont.selectedLayers[0] selection = selectedLayer.selection editString = "" for i, anchor in enumerate(selection): if i > 0: editString += "\n\n" if type(anchor) == GSAnchor: anchorName = anchor.name editString += "%s:\n" % anchorName # add anchor name to the text string for glyph in thisFont.glyphs: thisLayer = glyph.layers[selectedLayer.associatedMasterId] if anchorName in thisLayer.anchors.keys(): editString += "/" + glyph.name if len(editString) > 0: thisFont.newTab(editString) ### Open Tab with all Characters
__doc__ = '\nNew Tab with all Glyphs that have the selected anchor.\n' this_font = Glyphs.font selected_layer = thisFont.selectedLayers[0] selection = selectedLayer.selection edit_string = '' for (i, anchor) in enumerate(selection): if i > 0: edit_string += '\n\n' if type(anchor) == GSAnchor: anchor_name = anchor.name edit_string += '%s:\n' % anchorName for glyph in thisFont.glyphs: this_layer = glyph.layers[selectedLayer.associatedMasterId] if anchorName in thisLayer.anchors.keys(): edit_string += '/' + glyph.name if len(editString) > 0: thisFont.newTab(editString)
"""715. Range Module https://leetcode.com/problems/range-module/ A Range Module is a module that tracks ranges of numbers. Your task is to design and implement the following interfaces in an efficient manner. addRange(int left, int right) Adds the half-open interval [left, right), tracking every real number in that interval. Adding an interval that partially overlaps with currently tracked numbers should add any numbers in the interval [left, right) that are not already tracked. queryRange(int left, int right) Returns true if and only if every real number in the interval [left, right) is currently being tracked. removeRange(int left, int right) Stops tracking every real number currently being tracked in the interval [left, right). Example 1: addRange(10, 20): null removeRange(14, 16): null queryRange(10, 14): true (Every number in [10, 14) is being tracked) queryRange(13, 15): false (Numbers like 14, 14.03, 14.17 in [13, 15) are not being tracked) queryRange(16, 17): true (The number 16 in [16, 17) is still being tracked, despite the remove operation) Note: A half open interval [left, right) denotes all real numbers left <= x < right. 0 < left < right < 10^9 in all calls to addRange, queryRange, removeRange. The total number of calls to addRange in a single test case is at most 1000. The total number of calls to queryRange in a single test case is at most 5000. The total number of calls to removeRange in a single test case is at most 1000. """ class RangeModule: def __init__(self): pass def add_range(self, left: int, right: int) -> None: pass def query_range(self, left: int, right: int) -> bool: pass def remove_range(self, left: int, right: int) -> None: pass # Your RangeModule object will be instantiated and called as such: # obj = RangeModule() # obj.addRange(left,right) # param_2 = obj.queryRange(left,right) # obj.removeRange(left,right)
"""715. Range Module https://leetcode.com/problems/range-module/ A Range Module is a module that tracks ranges of numbers. Your task is to design and implement the following interfaces in an efficient manner. addRange(int left, int right) Adds the half-open interval [left, right), tracking every real number in that interval. Adding an interval that partially overlaps with currently tracked numbers should add any numbers in the interval [left, right) that are not already tracked. queryRange(int left, int right) Returns true if and only if every real number in the interval [left, right) is currently being tracked. removeRange(int left, int right) Stops tracking every real number currently being tracked in the interval [left, right). Example 1: addRange(10, 20): null removeRange(14, 16): null queryRange(10, 14): true (Every number in [10, 14) is being tracked) queryRange(13, 15): false (Numbers like 14, 14.03, 14.17 in [13, 15) are not being tracked) queryRange(16, 17): true (The number 16 in [16, 17) is still being tracked, despite the remove operation) Note: A half open interval [left, right) denotes all real numbers left <= x < right. 0 < left < right < 10^9 in all calls to addRange, queryRange, removeRange. The total number of calls to addRange in a single test case is at most 1000. The total number of calls to queryRange in a single test case is at most 5000. The total number of calls to removeRange in a single test case is at most 1000. """ class Rangemodule: def __init__(self): pass def add_range(self, left: int, right: int) -> None: pass def query_range(self, left: int, right: int) -> bool: pass def remove_range(self, left: int, right: int) -> None: pass
a,b = input("Enter A(x1, y1): ").split() c,d = input("Enter B(x2, y2): ").split() distance = pow((pow((int(c)-int(a)),2) + pow((int(d)-int(b)),2)), 0.5) print("Distance between points A and B: ",distance)
(a, b) = input('Enter A(x1, y1): ').split() (c, d) = input('Enter B(x2, y2): ').split() distance = pow(pow(int(c) - int(a), 2) + pow(int(d) - int(b), 2), 0.5) print('Distance between points A and B: ', distance)
class FileReader: def __init__(self): pass def read_text_file(self, path): file = open(path, 'r') return file.read()
class Filereader: def __init__(self): pass def read_text_file(self, path): file = open(path, 'r') return file.read()
# -*- coding:utf-8 -*- BIND_HOST='0.0.0.0' BIND_PORT=9999 USER_HOME = '%s/var/users' %BASE_DIR USER_ACCOUNT={ 'alex':{'password':'123456', 'quotation':1000000,#1GB 'expire':'2017-01-22' } }
bind_host = '0.0.0.0' bind_port = 9999 user_home = '%s/var/users' % BASE_DIR user_account = {'alex': {'password': '123456', 'quotation': 1000000, 'expire': '2017-01-22'}}
# Created by MechAviv # Map ID :: 620100029 # Spaceship : In Front of the Shuttle sm.curNodeEventEnd(True) sm.setTemporarySkillSet(0) sm.setInGameDirectionMode(True, True, False, False) sm.setStandAloneMode(True) sm.forcedInput(0) OBJECT_1 = sm.sendNpcController(9270083, 2415, -134) sm.showNpcSpecialActionByObjectId(OBJECT_1, "summon", 0) sm.sendSessionValue("Ade", OBJECT_1) sm.forcedInput(1) sm.sendDelay(1000) sm.forcedInput(0) sm.showEffect("Effect/DirectionNewPirate.img/newPirate/balloonMsg2/2", 0, 0, -100, 0, OBJECT_1, False, 0) sm.sendDelay(2000) sm.showEffect("Effect/DirectionNewPirate.img/newPirate/balloonMsg2/1", 0, 0, -100, 0, OBJECT_1, False, 0) sm.sendDelay(1000) sm.setSpeakerID(9270083) sm.removeEscapeButton() sm.setPlayerAsSpeaker() sm.setSpeakerType(3) sm.sendNext("#p9270083#. You follow me outta here and then you disappear. They're after me, not you. ") sm.setSpeakerID(9270083) sm.removeEscapeButton() sm.flipSpeaker() sm.setSpeakerType(3) sm.sendSay("What are you talking about? We're... we're family. I won't let you face this on your own.") sm.setSpeakerID(9270083) sm.removeEscapeButton() sm.flipSpeaker() sm.setSpeakerType(3) sm.sendSay("Look, just get on the shuttle!") sm.sendDelay(1000) sm.setSpeakerID(9270083) sm.removeEscapeButton() sm.setPlayerAsSpeaker() sm.setSpeakerType(3) sm.sendNext("Burke... Thank you...") sm.sendDelay(2000) sm.chatScript("Follow the arrows to the portal.") sm.setTemporarySkillSet(0) sm.setInGameDirectionMode(False, True, False, False)
sm.curNodeEventEnd(True) sm.setTemporarySkillSet(0) sm.setInGameDirectionMode(True, True, False, False) sm.setStandAloneMode(True) sm.forcedInput(0) object_1 = sm.sendNpcController(9270083, 2415, -134) sm.showNpcSpecialActionByObjectId(OBJECT_1, 'summon', 0) sm.sendSessionValue('Ade', OBJECT_1) sm.forcedInput(1) sm.sendDelay(1000) sm.forcedInput(0) sm.showEffect('Effect/DirectionNewPirate.img/newPirate/balloonMsg2/2', 0, 0, -100, 0, OBJECT_1, False, 0) sm.sendDelay(2000) sm.showEffect('Effect/DirectionNewPirate.img/newPirate/balloonMsg2/1', 0, 0, -100, 0, OBJECT_1, False, 0) sm.sendDelay(1000) sm.setSpeakerID(9270083) sm.removeEscapeButton() sm.setPlayerAsSpeaker() sm.setSpeakerType(3) sm.sendNext("#p9270083#. You follow me outta here and then you disappear. They're after me, not you. ") sm.setSpeakerID(9270083) sm.removeEscapeButton() sm.flipSpeaker() sm.setSpeakerType(3) sm.sendSay("What are you talking about? We're... we're family. I won't let you face this on your own.") sm.setSpeakerID(9270083) sm.removeEscapeButton() sm.flipSpeaker() sm.setSpeakerType(3) sm.sendSay('Look, just get on the shuttle!') sm.sendDelay(1000) sm.setSpeakerID(9270083) sm.removeEscapeButton() sm.setPlayerAsSpeaker() sm.setSpeakerType(3) sm.sendNext('Burke... Thank you...') sm.sendDelay(2000) sm.chatScript('Follow the arrows to the portal.') sm.setTemporarySkillSet(0) sm.setInGameDirectionMode(False, True, False, False)
# # PySNMP MIB module WIRELESS-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/WIRELESS-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 21:29:45 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, ValueSizeConstraint, ConstraintsIntersection, ConstraintsUnion, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ValueSizeConstraint", "ConstraintsIntersection", "ConstraintsUnion", "ValueRangeConstraint") Timeticks, = mibBuilder.importSymbols("RFC1155-SMI", "Timeticks") MibScalar, MibTable, MibTableRow, MibTableColumn = mibBuilder.importSymbols("RFC1212", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn") ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup") enterprises, iso, Integer32, TimeTicks, Gauge32, ModuleIdentity, MibScalar, MibTable, MibTableRow, MibTableColumn, ObjectIdentity, Unsigned32, Counter64, MibIdentifier, IpAddress, Bits, NotificationType, Counter32 = mibBuilder.importSymbols("SNMPv2-SMI", "enterprises", "iso", "Integer32", "TimeTicks", "Gauge32", "ModuleIdentity", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "ObjectIdentity", "Unsigned32", "Counter64", "MibIdentifier", "IpAddress", "Bits", "NotificationType", "Counter32") DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") class MacAddress(OctetString): subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(6, 6) fixedLength = 6 ibm = MibIdentifier((1, 3, 6, 1, 4, 1, 2)) ibmProd = MibIdentifier((1, 3, 6, 1, 4, 1, 2, 6)) ibmwlan = MibIdentifier((1, 3, 6, 1, 4, 1, 2, 6, 10)) wrBase = MibIdentifier((1, 3, 6, 1, 4, 1, 2, 6, 10, 1)) wrRemote = MibIdentifier((1, 3, 6, 1, 4, 1, 2, 6, 10, 2)) baseName = MibScalar((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 1), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseName.setStatus('mandatory') baseNetworkName = MibScalar((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 2), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseNetworkName.setStatus('mandatory') baseAdminIPAddr = MibScalar((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 3), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseAdminIPAddr.setStatus('mandatory') wrBaseTable = MibTable((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 4), ) if mibBuilder.loadTexts: wrBaseTable.setStatus('mandatory') wrBaseEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 4, 1), ).setIndexNames((0, "WIRELESS-MIB", "baseIfIndex")) if mibBuilder.loadTexts: wrBaseEntry.setStatus('mandatory') baseIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 4, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseIfIndex.setStatus('mandatory') baseHDLCaddress = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 4, 1, 2), OctetString()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseHDLCaddress.setStatus('mandatory') baseNbOFRemote = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 4, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseNbOFRemote.setStatus('mandatory') baseCellIdentifier = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 4, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseCellIdentifier.setStatus('mandatory') baseAdapterStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 4, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("operational", 1), ("not-operational", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: baseAdapterStatus.setStatus('mandatory') baseEmittedPower = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 4, 1, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseEmittedPower.setStatus('mandatory') baseControllerCardDesc = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 4, 1, 7), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseControllerCardDesc.setStatus('mandatory') baseUnivAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 4, 1, 8), MacAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseUnivAddress.setStatus('mandatory') baseModemDesc = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 4, 1, 9), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseModemDesc.setStatus('mandatory') baseTopologyTrapActive = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 4, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("active", 1), ("inactive", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: baseTopologyTrapActive.setStatus('mandatory') wrBaseStatsTable = MibTable((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5), ) if mibBuilder.loadTexts: wrBaseStatsTable.setStatus('mandatory') wrBaseStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5, 1), ).setIndexNames((0, "WIRELESS-MIB", "baseStatsIfIndex")) if mibBuilder.loadTexts: wrBaseStatsEntry.setStatus('mandatory') baseStatsIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseStatsIfIndex.setStatus('mandatory') baseStatsXmit = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseStatsXmit.setStatus('mandatory') baseStatsRxmit = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseStatsRxmit.setStatus('mandatory') baseStatsNegAckRcv = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseStatsNegAckRcv.setStatus('mandatory') baseStatsRcv = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseStatsRcv.setStatus('mandatory') baseStatsLineErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseStatsLineErrors.setStatus('mandatory') baseStatsNegAckXmit = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseStatsNegAckXmit.setStatus('mandatory') baseStatsFramePurged = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseStatsFramePurged.setStatus('mandatory') baseStatsFreqDelete = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseStatsFreqDelete.setStatus('mandatory') baseStatsHopAdvance = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseStatsHopAdvance.setStatus('mandatory') baseStatsCLineErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseStatsCLineErrors.setStatus('mandatory') baseStatsRcvICRFrame = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseStatsRcvICRFrame.setStatus('mandatory') baseStatsXmitICRFrame = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5, 1, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseStatsXmitICRFrame.setStatus('mandatory') baseStatsNoICRBufferAvail = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5, 1, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseStatsNoICRBufferAvail.setStatus('mandatory') baseStatsNotRoutedICRFrame = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5, 1, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseStatsNotRoutedICRFrame.setStatus('mandatory') baseStatsNbCUserEst = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5, 1, 16), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: baseStatsNbCUserEst.setStatus('mandatory') wrRemoteTable = MibTable((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 1), ) if mibBuilder.loadTexts: wrRemoteTable.setStatus('mandatory') wrRemoteEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 1, 1), ).setIndexNames((0, "WIRELESS-MIB", "remIfIndex"), (0, "WIRELESS-MIB", "remIndex")) if mibBuilder.loadTexts: wrRemoteEntry.setStatus('mandatory') remIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 1, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: remIfIndex.setStatus('mandatory') remIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 1, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: remIndex.setStatus('mandatory') remMacAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 1, 1, 3), MacAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: remMacAddress.setStatus('mandatory') remName = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 1, 1, 4), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: remName.setStatus('mandatory') remControllerCardDesc = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 1, 1, 5), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: remControllerCardDesc.setStatus('mandatory') remUnivAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 1, 1, 6), MacAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: remUnivAddress.setStatus('mandatory') remModemDesc = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 1, 1, 7), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: remModemDesc.setStatus('mandatory') wrRemoteStatsTable = MibTable((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 2), ) if mibBuilder.loadTexts: wrRemoteStatsTable.setStatus('mandatory') wrRemStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 2, 1), ).setIndexNames((0, "WIRELESS-MIB", "remStatsIfIndex"), (0, "WIRELESS-MIB", "remStatsIndex")) if mibBuilder.loadTexts: wrRemStatsEntry.setStatus('mandatory') remStatsIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 2, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: remStatsIfIndex.setStatus('mandatory') remStatsIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 2, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: remStatsIndex.setStatus('mandatory') remStatsXmit = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 2, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: remStatsXmit.setStatus('mandatory') remStatsRxmit = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 2, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: remStatsRxmit.setStatus('mandatory') remStatsNegAckRcv = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 2, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: remStatsNegAckRcv.setStatus('mandatory') remStatsRcv = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 2, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: remStatsRcv.setStatus('mandatory') remStatsLineErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 2, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: remStatsLineErrors.setStatus('mandatory') remStatsNegAckXmit = MibTableColumn((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 2, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: remStatsNegAckXmit.setStatus('mandatory') mibBuilder.exportSymbols("WIRELESS-MIB", baseAdapterStatus=baseAdapterStatus, remIfIndex=remIfIndex, wrBaseStatsEntry=wrBaseStatsEntry, baseHDLCaddress=baseHDLCaddress, baseControllerCardDesc=baseControllerCardDesc, remStatsIfIndex=remStatsIfIndex, MacAddress=MacAddress, baseNbOFRemote=baseNbOFRemote, remStatsIndex=remStatsIndex, baseStatsFramePurged=baseStatsFramePurged, wrRemote=wrRemote, baseUnivAddress=baseUnivAddress, wrBaseEntry=wrBaseEntry, baseStatsNoICRBufferAvail=baseStatsNoICRBufferAvail, baseStatsNegAckRcv=baseStatsNegAckRcv, baseStatsHopAdvance=baseStatsHopAdvance, baseStatsNbCUserEst=baseStatsNbCUserEst, remUnivAddress=remUnivAddress, wrRemoteStatsTable=wrRemoteStatsTable, baseStatsXmit=baseStatsXmit, remStatsRxmit=remStatsRxmit, baseStatsCLineErrors=baseStatsCLineErrors, remStatsLineErrors=remStatsLineErrors, baseStatsRcvICRFrame=baseStatsRcvICRFrame, baseNetworkName=baseNetworkName, baseCellIdentifier=baseCellIdentifier, baseStatsRcv=baseStatsRcv, baseIfIndex=baseIfIndex, baseTopologyTrapActive=baseTopologyTrapActive, baseAdminIPAddr=baseAdminIPAddr, baseStatsNegAckXmit=baseStatsNegAckXmit, baseModemDesc=baseModemDesc, baseStatsLineErrors=baseStatsLineErrors, ibmwlan=ibmwlan, wrRemStatsEntry=wrRemStatsEntry, remControllerCardDesc=remControllerCardDesc, wrRemoteEntry=wrRemoteEntry, remIndex=remIndex, baseStatsFreqDelete=baseStatsFreqDelete, remMacAddress=remMacAddress, remName=remName, baseStatsXmitICRFrame=baseStatsXmitICRFrame, baseStatsIfIndex=baseStatsIfIndex, wrRemoteTable=wrRemoteTable, baseName=baseName, wrBaseTable=wrBaseTable, baseStatsNotRoutedICRFrame=baseStatsNotRoutedICRFrame, baseStatsRxmit=baseStatsRxmit, remModemDesc=remModemDesc, baseEmittedPower=baseEmittedPower, remStatsNegAckRcv=remStatsNegAckRcv, ibmProd=ibmProd, ibm=ibm, remStatsXmit=remStatsXmit, remStatsRcv=remStatsRcv, remStatsNegAckXmit=remStatsNegAckXmit, wrBase=wrBase, wrBaseStatsTable=wrBaseStatsTable)
(integer, octet_string, object_identifier) = mibBuilder.importSymbols('ASN1', 'Integer', 'OctetString', 'ObjectIdentifier') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (single_value_constraint, value_size_constraint, constraints_intersection, constraints_union, value_range_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'SingleValueConstraint', 'ValueSizeConstraint', 'ConstraintsIntersection', 'ConstraintsUnion', 'ValueRangeConstraint') (timeticks,) = mibBuilder.importSymbols('RFC1155-SMI', 'Timeticks') (mib_scalar, mib_table, mib_table_row, mib_table_column) = mibBuilder.importSymbols('RFC1212', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn') (module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup') (enterprises, iso, integer32, time_ticks, gauge32, module_identity, mib_scalar, mib_table, mib_table_row, mib_table_column, object_identity, unsigned32, counter64, mib_identifier, ip_address, bits, notification_type, counter32) = mibBuilder.importSymbols('SNMPv2-SMI', 'enterprises', 'iso', 'Integer32', 'TimeTicks', 'Gauge32', 'ModuleIdentity', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'ObjectIdentity', 'Unsigned32', 'Counter64', 'MibIdentifier', 'IpAddress', 'Bits', 'NotificationType', 'Counter32') (display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention') class Macaddress(OctetString): subtype_spec = OctetString.subtypeSpec + value_size_constraint(6, 6) fixed_length = 6 ibm = mib_identifier((1, 3, 6, 1, 4, 1, 2)) ibm_prod = mib_identifier((1, 3, 6, 1, 4, 1, 2, 6)) ibmwlan = mib_identifier((1, 3, 6, 1, 4, 1, 2, 6, 10)) wr_base = mib_identifier((1, 3, 6, 1, 4, 1, 2, 6, 10, 1)) wr_remote = mib_identifier((1, 3, 6, 1, 4, 1, 2, 6, 10, 2)) base_name = mib_scalar((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 1), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: baseName.setStatus('mandatory') base_network_name = mib_scalar((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 2), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: baseNetworkName.setStatus('mandatory') base_admin_ip_addr = mib_scalar((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 3), ip_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: baseAdminIPAddr.setStatus('mandatory') wr_base_table = mib_table((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 4)) if mibBuilder.loadTexts: wrBaseTable.setStatus('mandatory') wr_base_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 4, 1)).setIndexNames((0, 'WIRELESS-MIB', 'baseIfIndex')) if mibBuilder.loadTexts: wrBaseEntry.setStatus('mandatory') base_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 4, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: baseIfIndex.setStatus('mandatory') base_hdl_caddress = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 4, 1, 2), octet_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: baseHDLCaddress.setStatus('mandatory') base_nb_of_remote = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 4, 1, 3), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: baseNbOFRemote.setStatus('mandatory') base_cell_identifier = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 4, 1, 4), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: baseCellIdentifier.setStatus('mandatory') base_adapter_status = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 4, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('operational', 1), ('not-operational', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: baseAdapterStatus.setStatus('mandatory') base_emitted_power = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 4, 1, 6), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: baseEmittedPower.setStatus('mandatory') base_controller_card_desc = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 4, 1, 7), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: baseControllerCardDesc.setStatus('mandatory') base_univ_address = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 4, 1, 8), mac_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: baseUnivAddress.setStatus('mandatory') base_modem_desc = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 4, 1, 9), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: baseModemDesc.setStatus('mandatory') base_topology_trap_active = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 4, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('active', 1), ('inactive', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: baseTopologyTrapActive.setStatus('mandatory') wr_base_stats_table = mib_table((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5)) if mibBuilder.loadTexts: wrBaseStatsTable.setStatus('mandatory') wr_base_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5, 1)).setIndexNames((0, 'WIRELESS-MIB', 'baseStatsIfIndex')) if mibBuilder.loadTexts: wrBaseStatsEntry.setStatus('mandatory') base_stats_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: baseStatsIfIndex.setStatus('mandatory') base_stats_xmit = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5, 1, 2), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: baseStatsXmit.setStatus('mandatory') base_stats_rxmit = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5, 1, 3), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: baseStatsRxmit.setStatus('mandatory') base_stats_neg_ack_rcv = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5, 1, 4), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: baseStatsNegAckRcv.setStatus('mandatory') base_stats_rcv = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5, 1, 5), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: baseStatsRcv.setStatus('mandatory') base_stats_line_errors = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5, 1, 6), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: baseStatsLineErrors.setStatus('mandatory') base_stats_neg_ack_xmit = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5, 1, 7), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: baseStatsNegAckXmit.setStatus('mandatory') base_stats_frame_purged = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5, 1, 8), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: baseStatsFramePurged.setStatus('mandatory') base_stats_freq_delete = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5, 1, 9), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: baseStatsFreqDelete.setStatus('mandatory') base_stats_hop_advance = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5, 1, 10), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: baseStatsHopAdvance.setStatus('mandatory') base_stats_c_line_errors = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5, 1, 11), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: baseStatsCLineErrors.setStatus('mandatory') base_stats_rcv_icr_frame = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5, 1, 12), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: baseStatsRcvICRFrame.setStatus('mandatory') base_stats_xmit_icr_frame = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5, 1, 13), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: baseStatsXmitICRFrame.setStatus('mandatory') base_stats_no_icr_buffer_avail = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5, 1, 14), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: baseStatsNoICRBufferAvail.setStatus('mandatory') base_stats_not_routed_icr_frame = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5, 1, 15), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: baseStatsNotRoutedICRFrame.setStatus('mandatory') base_stats_nb_c_user_est = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 10, 1, 5, 1, 16), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: baseStatsNbCUserEst.setStatus('mandatory') wr_remote_table = mib_table((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 1)) if mibBuilder.loadTexts: wrRemoteTable.setStatus('mandatory') wr_remote_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 1, 1)).setIndexNames((0, 'WIRELESS-MIB', 'remIfIndex'), (0, 'WIRELESS-MIB', 'remIndex')) if mibBuilder.loadTexts: wrRemoteEntry.setStatus('mandatory') rem_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 1, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: remIfIndex.setStatus('mandatory') rem_index = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 1, 1, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: remIndex.setStatus('mandatory') rem_mac_address = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 1, 1, 3), mac_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: remMacAddress.setStatus('mandatory') rem_name = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 1, 1, 4), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: remName.setStatus('mandatory') rem_controller_card_desc = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 1, 1, 5), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: remControllerCardDesc.setStatus('mandatory') rem_univ_address = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 1, 1, 6), mac_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: remUnivAddress.setStatus('mandatory') rem_modem_desc = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 1, 1, 7), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: remModemDesc.setStatus('mandatory') wr_remote_stats_table = mib_table((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 2)) if mibBuilder.loadTexts: wrRemoteStatsTable.setStatus('mandatory') wr_rem_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 2, 1)).setIndexNames((0, 'WIRELESS-MIB', 'remStatsIfIndex'), (0, 'WIRELESS-MIB', 'remStatsIndex')) if mibBuilder.loadTexts: wrRemStatsEntry.setStatus('mandatory') rem_stats_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 2, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: remStatsIfIndex.setStatus('mandatory') rem_stats_index = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 2, 1, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: remStatsIndex.setStatus('mandatory') rem_stats_xmit = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 2, 1, 3), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: remStatsXmit.setStatus('mandatory') rem_stats_rxmit = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 2, 1, 4), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: remStatsRxmit.setStatus('mandatory') rem_stats_neg_ack_rcv = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 2, 1, 5), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: remStatsNegAckRcv.setStatus('mandatory') rem_stats_rcv = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 2, 1, 6), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: remStatsRcv.setStatus('mandatory') rem_stats_line_errors = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 2, 1, 7), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: remStatsLineErrors.setStatus('mandatory') rem_stats_neg_ack_xmit = mib_table_column((1, 3, 6, 1, 4, 1, 2, 6, 10, 2, 2, 1, 8), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: remStatsNegAckXmit.setStatus('mandatory') mibBuilder.exportSymbols('WIRELESS-MIB', baseAdapterStatus=baseAdapterStatus, remIfIndex=remIfIndex, wrBaseStatsEntry=wrBaseStatsEntry, baseHDLCaddress=baseHDLCaddress, baseControllerCardDesc=baseControllerCardDesc, remStatsIfIndex=remStatsIfIndex, MacAddress=MacAddress, baseNbOFRemote=baseNbOFRemote, remStatsIndex=remStatsIndex, baseStatsFramePurged=baseStatsFramePurged, wrRemote=wrRemote, baseUnivAddress=baseUnivAddress, wrBaseEntry=wrBaseEntry, baseStatsNoICRBufferAvail=baseStatsNoICRBufferAvail, baseStatsNegAckRcv=baseStatsNegAckRcv, baseStatsHopAdvance=baseStatsHopAdvance, baseStatsNbCUserEst=baseStatsNbCUserEst, remUnivAddress=remUnivAddress, wrRemoteStatsTable=wrRemoteStatsTable, baseStatsXmit=baseStatsXmit, remStatsRxmit=remStatsRxmit, baseStatsCLineErrors=baseStatsCLineErrors, remStatsLineErrors=remStatsLineErrors, baseStatsRcvICRFrame=baseStatsRcvICRFrame, baseNetworkName=baseNetworkName, baseCellIdentifier=baseCellIdentifier, baseStatsRcv=baseStatsRcv, baseIfIndex=baseIfIndex, baseTopologyTrapActive=baseTopologyTrapActive, baseAdminIPAddr=baseAdminIPAddr, baseStatsNegAckXmit=baseStatsNegAckXmit, baseModemDesc=baseModemDesc, baseStatsLineErrors=baseStatsLineErrors, ibmwlan=ibmwlan, wrRemStatsEntry=wrRemStatsEntry, remControllerCardDesc=remControllerCardDesc, wrRemoteEntry=wrRemoteEntry, remIndex=remIndex, baseStatsFreqDelete=baseStatsFreqDelete, remMacAddress=remMacAddress, remName=remName, baseStatsXmitICRFrame=baseStatsXmitICRFrame, baseStatsIfIndex=baseStatsIfIndex, wrRemoteTable=wrRemoteTable, baseName=baseName, wrBaseTable=wrBaseTable, baseStatsNotRoutedICRFrame=baseStatsNotRoutedICRFrame, baseStatsRxmit=baseStatsRxmit, remModemDesc=remModemDesc, baseEmittedPower=baseEmittedPower, remStatsNegAckRcv=remStatsNegAckRcv, ibmProd=ibmProd, ibm=ibm, remStatsXmit=remStatsXmit, remStatsRcv=remStatsRcv, remStatsNegAckXmit=remStatsNegAckXmit, wrBase=wrBase, wrBaseStatsTable=wrBaseStatsTable)
class DisjointSet: def __init__(self, *args): """Initializes the disjoint set :param args: any number of integers """ # the value implies the index of the root node of the index # e.g.: [0, 0, 1]; nodes 0 and 1 are in the same set with root = node 0 # {{0, 1}, 2} self.roots = list(args) self.ranks = [0] * len(args) def find(self, x): while x != self.roots[x]: x = self.roots[x] return x def merge(self, a, b): root_a = self.find(a) root_b = self.find(b) if self.ranks[root_a] > self.ranks[root_b]: self.roots[root_b] = root_a else: self.roots[root_a] = root_b # if they have the same root, they're in the same tree / set if self.ranks[root_a] == self.ranks[root_b]: self.ranks[root_b] += 1 def __len__(self): return len(self.roots) def __repr__(self): string = "" for index, value in enumerate(self.roots): string += "i={}, r={}".format(index, value) string += " | " if index < len(self.roots) - 1 else "\n" string += "ranks = {}".format(self.ranks) return string
class Disjointset: def __init__(self, *args): """Initializes the disjoint set :param args: any number of integers """ self.roots = list(args) self.ranks = [0] * len(args) def find(self, x): while x != self.roots[x]: x = self.roots[x] return x def merge(self, a, b): root_a = self.find(a) root_b = self.find(b) if self.ranks[root_a] > self.ranks[root_b]: self.roots[root_b] = root_a else: self.roots[root_a] = root_b if self.ranks[root_a] == self.ranks[root_b]: self.ranks[root_b] += 1 def __len__(self): return len(self.roots) def __repr__(self): string = '' for (index, value) in enumerate(self.roots): string += 'i={}, r={}'.format(index, value) string += ' | ' if index < len(self.roots) - 1 else '\n' string += 'ranks = {}'.format(self.ranks) return string
class Semester: def __init__(self, season:str, year:int, brother_id:int, amount:float): self.season = season self.year = year self.brother_id = brother_id self.amount = amount
class Semester: def __init__(self, season: str, year: int, brother_id: int, amount: float): self.season = season self.year = year self.brother_id = brother_id self.amount = amount
# -*- coding: utf-8 -*- def test_dataset_sizes(test_file): ds = test_file.dataset assert ds.sizes == {"ch": 2, "pixel": 1024, "Time": 50} def test_dataset_variables(test_file): ds = test_file.dataset for var in ["Count", "FilteredCount", "Rough_wavelength"]: assert var in ds def test_config(test_file): print(test_file.config) for key in [ "name", "shotno", "date", "dimno", "dimname", "dimsize", "dimunit", "valno", "valname", "valunit", ]: assert key in test_file.config["Parameters"] def test_description(test_file): assert test_file.description == "SOXMOSTestShot #66642069 @'02/04/2005 21:37'" def test_spectrogram_actually_plots(test_file, tmp_path): test_file.plot_spectrogram().fig.savefig(tmp_path / f"spectrogram.png") test_file.plot_spectrogram(vmax=1000).fig.savefig( tmp_path / f"spectrogram_max1000.png" ) def test_spectrum_actually_plots(test_file, tmp_path): for it in range(5, 45, 10): time = test_file.dataset.isel(Time=it).Time.item() test_file.plot_spectrum(time).fig.savefig(tmp_path / f"spectrum_t_{time}.png") def test_global_timetrace_actually_plots(test_file, tmp_path): test_file.plot_global_timetrace().fig.savefig(tmp_path / f"global_timetrace.png")
def test_dataset_sizes(test_file): ds = test_file.dataset assert ds.sizes == {'ch': 2, 'pixel': 1024, 'Time': 50} def test_dataset_variables(test_file): ds = test_file.dataset for var in ['Count', 'FilteredCount', 'Rough_wavelength']: assert var in ds def test_config(test_file): print(test_file.config) for key in ['name', 'shotno', 'date', 'dimno', 'dimname', 'dimsize', 'dimunit', 'valno', 'valname', 'valunit']: assert key in test_file.config['Parameters'] def test_description(test_file): assert test_file.description == "SOXMOSTestShot #66642069 @'02/04/2005 21:37'" def test_spectrogram_actually_plots(test_file, tmp_path): test_file.plot_spectrogram().fig.savefig(tmp_path / f'spectrogram.png') test_file.plot_spectrogram(vmax=1000).fig.savefig(tmp_path / f'spectrogram_max1000.png') def test_spectrum_actually_plots(test_file, tmp_path): for it in range(5, 45, 10): time = test_file.dataset.isel(Time=it).Time.item() test_file.plot_spectrum(time).fig.savefig(tmp_path / f'spectrum_t_{time}.png') def test_global_timetrace_actually_plots(test_file, tmp_path): test_file.plot_global_timetrace().fig.savefig(tmp_path / f'global_timetrace.png')
def append_node_to_dict(node1, node2, dict_connections): if not node1 in dict_connections: dict_connections[node1] = [node2] else: node_connections = dict_connections[node1] if not node2 in node_connections: node_connections.append(node2) dict_connections[node1] = node_connections return dict_connections def parse_connections(connection, dict_connections): splitted = connection.split('-') node1 = splitted[0] node2 = splitted[1] dict_connections = append_node_to_dict(node1, node2, dict_connections) dict_connections = append_node_to_dict(node2, node1, dict_connections) return dict_connections def find_paths(start, length, dict_connections, paths): for path in paths: last_node = path[-1] def can_visit(node, path): check = False if node.isupper(): check = True elif not node in path: check = True elif node.islower() and node != 'end' and node != 'start': lowercase_nodes = [node for node in path if node.islower()] set_lowercase_nodes = set(lowercase_nodes) if (len(lowercase_nodes) == len(set_lowercase_nodes)): check = True return check def find_paths(graph, start, end, path=[]): path = path + [start] if start == end: return [path] paths = [] for node in graph[start]: if can_visit(node, path): newpaths = find_paths(graph, node, end, path) for newpath in newpaths: paths.append(newpath) return paths if __name__ == '__main__': input = open('./day 12/Martijn - Python/input.txt').readlines() connections = [line.strip() for line in input] dict_connections = {} for x in range(0, len(connections)): dict_connections = parse_connections(connections[x], dict_connections) paths = find_paths(dict_connections, 'start', 'end') print(len(paths))
def append_node_to_dict(node1, node2, dict_connections): if not node1 in dict_connections: dict_connections[node1] = [node2] else: node_connections = dict_connections[node1] if not node2 in node_connections: node_connections.append(node2) dict_connections[node1] = node_connections return dict_connections def parse_connections(connection, dict_connections): splitted = connection.split('-') node1 = splitted[0] node2 = splitted[1] dict_connections = append_node_to_dict(node1, node2, dict_connections) dict_connections = append_node_to_dict(node2, node1, dict_connections) return dict_connections def find_paths(start, length, dict_connections, paths): for path in paths: last_node = path[-1] def can_visit(node, path): check = False if node.isupper(): check = True elif not node in path: check = True elif node.islower() and node != 'end' and (node != 'start'): lowercase_nodes = [node for node in path if node.islower()] set_lowercase_nodes = set(lowercase_nodes) if len(lowercase_nodes) == len(set_lowercase_nodes): check = True return check def find_paths(graph, start, end, path=[]): path = path + [start] if start == end: return [path] paths = [] for node in graph[start]: if can_visit(node, path): newpaths = find_paths(graph, node, end, path) for newpath in newpaths: paths.append(newpath) return paths if __name__ == '__main__': input = open('./day 12/Martijn - Python/input.txt').readlines() connections = [line.strip() for line in input] dict_connections = {} for x in range(0, len(connections)): dict_connections = parse_connections(connections[x], dict_connections) paths = find_paths(dict_connections, 'start', 'end') print(len(paths))
#!/usr/bin/env python3.8 """ given a string return list of all the possible permutations of the string and count of possible permutations """ count = 0 list = [] def permutation(string,prefix): global count if len(string)==0: count += 1 list.append(prefix) else: for i in range(len(string)): permutation(string[0:i]+string[i+1:], prefix+string[i]) def permutation1(string): out = [] if len(string) == 1: out = [string] else: for i, char in enumerate(string): for perm in permutation1(string[:i]+string[i+1:]): out += [char + perm] return out string = "ABC" permutation(string, "") print(list, count) list = permutation1(string) print(list, len(list))
""" given a string return list of all the possible permutations of the string and count of possible permutations """ count = 0 list = [] def permutation(string, prefix): global count if len(string) == 0: count += 1 list.append(prefix) else: for i in range(len(string)): permutation(string[0:i] + string[i + 1:], prefix + string[i]) def permutation1(string): out = [] if len(string) == 1: out = [string] else: for (i, char) in enumerate(string): for perm in permutation1(string[:i] + string[i + 1:]): out += [char + perm] return out string = 'ABC' permutation(string, '') print(list, count) list = permutation1(string) print(list, len(list))
""" Events, the fundamental message. """ class SpaceEvent(object): def __init__(self, data): self.data = data def __str__(self): return '<%s>: %s' % (self.__class__.__name__, self.data) class KernelEvent(SpaceEvent): """A special event.""" pass
""" Events, the fundamental message. """ class Spaceevent(object): def __init__(self, data): self.data = data def __str__(self): return '<%s>: %s' % (self.__class__.__name__, self.data) class Kernelevent(SpaceEvent): """A special event.""" pass
class TrieNode: def __init__(self): self.children: Dict[str, TrieNode] = defaultdict(TrieNode) self.deleted = False class Solution: def deleteDuplicateFolder(self, paths: List[List[str]]) -> List[List[str]]: ans = [] root = TrieNode() subtreeToNodes: Dict[str, List[TrieNode]] = defaultdict(list) # Construct the Trie for path in sorted(paths): node = root for s in path: node = node.children[s] # For each subtree, fill in the {subtree encoding: [root]} hash table def buildSubtreeToRoots(node: TrieNode) -> str: subtree = '(' + ''.join(s + buildSubtreeToRoots(node.children[s]) for s in node.children) + ')' if subtree != '()': subtreeToNodes[subtree].append(node) return subtree buildSubtreeToRoots(root) # Mark nodes that should be deleted for nodes in subtreeToNodes.values(): if len(nodes) > 1: for node in nodes: node.deleted = True # Construct the answer array for nodes that haven't been deleted def constructPath(node: TrieNode, path: List[str]) -> None: for s, child in node.children.items(): if not child.deleted: constructPath(child, path + [s]) if path: ans.append(path) constructPath(root, []) return ans
class Trienode: def __init__(self): self.children: Dict[str, TrieNode] = defaultdict(TrieNode) self.deleted = False class Solution: def delete_duplicate_folder(self, paths: List[List[str]]) -> List[List[str]]: ans = [] root = trie_node() subtree_to_nodes: Dict[str, List[TrieNode]] = defaultdict(list) for path in sorted(paths): node = root for s in path: node = node.children[s] def build_subtree_to_roots(node: TrieNode) -> str: subtree = '(' + ''.join((s + build_subtree_to_roots(node.children[s]) for s in node.children)) + ')' if subtree != '()': subtreeToNodes[subtree].append(node) return subtree build_subtree_to_roots(root) for nodes in subtreeToNodes.values(): if len(nodes) > 1: for node in nodes: node.deleted = True def construct_path(node: TrieNode, path: List[str]) -> None: for (s, child) in node.children.items(): if not child.deleted: construct_path(child, path + [s]) if path: ans.append(path) construct_path(root, []) return ans
# -*- coding: utf-8 -*- # TODO: doc """feelsbook """ __version__ = (0, 0, 0)
"""feelsbook """ __version__ = (0, 0, 0)
class Type1: def f1_1(): pass def test(t1): t1.f1_1() t2 = t1
class Type1: def f1_1(): pass def test(t1): t1.f1_1() t2 = t1
TABLE8 = [0] * 2 ** 8 for index in range(len(TABLE8)): TABLE8[index] = (index & 1) + TABLE8[index >> 1] class Solution: def hammingWeight(self, n: int) -> int: return TABLE8[n & 0xff] + TABLE8[(n >> 8) & 0xff] + TABLE8[(n >> 16) & 0xff] + TABLE8[n >> 24]
table8 = [0] * 2 ** 8 for index in range(len(TABLE8)): TABLE8[index] = (index & 1) + TABLE8[index >> 1] class Solution: def hamming_weight(self, n: int) -> int: return TABLE8[n & 255] + TABLE8[n >> 8 & 255] + TABLE8[n >> 16 & 255] + TABLE8[n >> 24]
class SensorReadError(Exception): pass class CommunicationErrorException(Exception): pass
class Sensorreaderror(Exception): pass class Communicationerrorexception(Exception): pass
# @time: 2022/1/10 5:31 PM # Author: pan # @File: study.py # @Software: PyCharm print("study py") name = "pan" age = 10 def study(): print("good good study, day day up!")
print('study py') name = 'pan' age = 10 def study(): print('good good study, day day up!')
class Response(object): def __init__(self, request=None): self.intent_name = request.intent_name if request else '' self.lang = request.lang if request else '' self.data = request.data if request else '' self._speech = '' self._text = '' @property def text(self): if self._text == '': return self._speech return self._text @text.setter def text(self, value): self._text = value @property def speech(self): if self._speech == '': return self._text return self._speech @speech.setter def speech(self, value): self._speech = value
class Response(object): def __init__(self, request=None): self.intent_name = request.intent_name if request else '' self.lang = request.lang if request else '' self.data = request.data if request else '' self._speech = '' self._text = '' @property def text(self): if self._text == '': return self._speech return self._text @text.setter def text(self, value): self._text = value @property def speech(self): if self._speech == '': return self._text return self._speech @speech.setter def speech(self, value): self._speech = value
''' math > ad-hoc difficulty: easy date: 09/Jun/2020 problem: how many bishops can be placed on a n x n chessboard without threatening each other? by: @brpapa ''' while (1): try: n = int(input()) ans = n + (n-2 if n > 2 else 0) print(ans) except EOFError: break
""" math > ad-hoc difficulty: easy date: 09/Jun/2020 problem: how many bishops can be placed on a n x n chessboard without threatening each other? by: @brpapa """ while 1: try: n = int(input()) ans = n + (n - 2 if n > 2 else 0) print(ans) except EOFError: break
ENCRYPTED_MESSAGE = 'MORA EVOCU ECCLESIA TUTIS AUT TIBI NISI OLIM OCIUS NOVEM' DECRYPTED_MESSAGE = 'MEETATNOON' CIPHER_OPTIONS = ['null','caesar','atbash'] cipher_used_in_this_example = CIPHER_OPTIONS[0] # replace with the index of the cipher used in this encryption
encrypted_message = 'MORA EVOCU ECCLESIA TUTIS AUT TIBI NISI OLIM OCIUS NOVEM' decrypted_message = 'MEETATNOON' cipher_options = ['null', 'caesar', 'atbash'] cipher_used_in_this_example = CIPHER_OPTIONS[0]
x1, x2, y1, y2 = 150, 193, -86, -136 def passes_through(vx, vy): nx, ny = 0, 0 points = [] while nx <= x2 and ny >= y2: nx, ny = nx + vx, ny + vy points += [[nx, ny]] if vx > 0: vx = vx - 1 vy = vy - 1 if x1 <= nx and nx <= x2 and y2 <= ny and ny <= y1: return 1 return 0 def max_y(vy): return sum(range(0, vy+1)) y_min, y_max = -200, 140 result = [[passes_through(x, y) for x in range(16, 200)] for y in range(y_min, y_max)] [print(str(y + y_min) + ' ' + str(result[y])) for y in range(0, abs(y_min) + y_max)] print(passes_through(17, 135)) print('part 1: %i' % max_y(135)) print('part 2: %i' % sum([sum(y) for y in result]))
(x1, x2, y1, y2) = (150, 193, -86, -136) def passes_through(vx, vy): (nx, ny) = (0, 0) points = [] while nx <= x2 and ny >= y2: (nx, ny) = (nx + vx, ny + vy) points += [[nx, ny]] if vx > 0: vx = vx - 1 vy = vy - 1 if x1 <= nx and nx <= x2 and (y2 <= ny) and (ny <= y1): return 1 return 0 def max_y(vy): return sum(range(0, vy + 1)) (y_min, y_max) = (-200, 140) result = [[passes_through(x, y) for x in range(16, 200)] for y in range(y_min, y_max)] [print(str(y + y_min) + ' ' + str(result[y])) for y in range(0, abs(y_min) + y_max)] print(passes_through(17, 135)) print('part 1: %i' % max_y(135)) print('part 2: %i' % sum([sum(y) for y in result]))
#Practical proof of fact, that numbers 2^x are almost perfect number #END = 30 END = int(input("End of loop")) for i in range(2,END): s = set([1]) n = 2**i for j in range(int(n/2+1),1,-1): if(n % j==0): s.add(j) print(n,end=" - ") print(sum(s)+1==n) #OUTPUT """ 4 - True 8 - True 16 - True 32 - True 64 - True 128 - True ... 2^i - True """
end = int(input('End of loop')) for i in range(2, END): s = set([1]) n = 2 ** i for j in range(int(n / 2 + 1), 1, -1): if n % j == 0: s.add(j) print(n, end=' - ') print(sum(s) + 1 == n) '\n4 - True\n8 - True\n16 - True\n32 - True\n64 - True\n128 - True\n...\n2^i - True\n'
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: def buildTree(self, inorder: 'List[int]', postorder: 'List[int]') -> 'TreeNode': if not inorder or not postorder: return root = TreeNode(postorder[-1]) i = 0 while inorder[i] != postorder[-1]: i += 1 root.left = self.buildTree(inorder[:i], postorder[:i]) root.right =self.buildTree(inorder[i+1:], postorder[i:-1]) return root # def buildTree(self, inorder: 'List[int]', postorder: 'List[int]') -> 'TreeNode': # if not inorder or not postorder: # return [] # root = TreeNode(postorder[-1]) # self._buildTree(root,inorder,postorder) # return root # def _buildTree(self, node, inorder, postorder) -> 'TreeNode': # rootIndex_inorder = inorder.index(postorder[-1]) # lenOfLeftSubTree = rootIndex_inorder # lenOfRightSubTree = len(inorder)-lenOfLeftSubTree-1 # if lenOfLeftSubTree > 0: # node.left = TreeNode(postorder[lenOfLeftSubTree-1]) # self._buildTree(node.left,inorder[0:rootIndex_inorder],postorder[0:lenOfLeftSubTree]) # if lenOfRightSubTree > 0: # node.right = TreeNode(postorder[lenOfLeftSubTree+lenOfRightSubTree-1]) # self._buildTree(node.right,inorder[rootIndex_inorder+1:],postorder[lenOfLeftSubTree:lenOfLeftSubTree+lenOfRightSubTree]) # return
class Solution: def build_tree(self, inorder: 'List[int]', postorder: 'List[int]') -> 'TreeNode': if not inorder or not postorder: return root = tree_node(postorder[-1]) i = 0 while inorder[i] != postorder[-1]: i += 1 root.left = self.buildTree(inorder[:i], postorder[:i]) root.right = self.buildTree(inorder[i + 1:], postorder[i:-1]) return root
expected_output = { "tag": { "1": { "topo_type": "unicast", "topo_name": "base", "tid": 0, "topo_id": "0x0", "flex_algo": { "None": { "prefix": { "4.4.4.4": { "prefix_attr": { "x_flag": False, "r_flag": False, "n_flag": True }, "subnet": "32", "source_router_id": "4.4.4.4", "algo": { 0: {}, 1: {} }, "via_interface": { "GigabitEthernet0/0/8": { "level": { "L2": { "source_ip": { "4.4.4.4": { "lsp": { "next_hop_lsp_index": 4, "rtp_lsp_index": 7, "rtp_lsp_version": 2651, "tpl_lsp_version": 2651 }, "distance": 115, "metric": 35, "via_ip": "23.23.23.1", "tag": "0", "filtered_out": False, "host": "asr1k-23.00-00", "prefix_attr": { "x_flag": False, "r_flag": False, "n_flag": True }, "algo": { 0: { "sid_index": 604, "flags": { "r_flag": False, "n_flag": True, "p_flag": False, "e_flag": False, "v_flag": False, "l_flag": False }, "label": "100604" }, 1: {} } } } } } } } } } } } } } }
expected_output = {'tag': {'1': {'topo_type': 'unicast', 'topo_name': 'base', 'tid': 0, 'topo_id': '0x0', 'flex_algo': {'None': {'prefix': {'4.4.4.4': {'prefix_attr': {'x_flag': False, 'r_flag': False, 'n_flag': True}, 'subnet': '32', 'source_router_id': '4.4.4.4', 'algo': {0: {}, 1: {}}, 'via_interface': {'GigabitEthernet0/0/8': {'level': {'L2': {'source_ip': {'4.4.4.4': {'lsp': {'next_hop_lsp_index': 4, 'rtp_lsp_index': 7, 'rtp_lsp_version': 2651, 'tpl_lsp_version': 2651}, 'distance': 115, 'metric': 35, 'via_ip': '23.23.23.1', 'tag': '0', 'filtered_out': False, 'host': 'asr1k-23.00-00', 'prefix_attr': {'x_flag': False, 'r_flag': False, 'n_flag': True}, 'algo': {0: {'sid_index': 604, 'flags': {'r_flag': False, 'n_flag': True, 'p_flag': False, 'e_flag': False, 'v_flag': False, 'l_flag': False}, 'label': '100604'}, 1: {}}}}}}}}}}}}}}}
"""/** * @author [Jai Miles] * @email [jaimiles23@gmail.com] * @create date 2020-05-05 13:56:45 * @modify date 2020-05-05 13:56:45 * @desc [ Data module for the fallback handler. ] */ """ ########## # Standard Fallback ########## MS_FALLBACK = "I can't help you with that right now." ########## # Did not understand answer ########## "Sorry, I didn't catch your answer. Can you please try again." MT_SORRY = ( "Sorry,", "Sorry,", "I'm sorry,", "", "", ) MT_DID_NOT_REGISTER_SLOT = ( "I didn't catch that.", "I didn't get your answer.", "I didn't quite hear you.", ) MT_TRY_AGAIN = ( "Please try again.", "Please retry.", "Can you please try again?", "Can you please retry?", ) MMT_NOT_UNDERSTAND = ( MT_SORRY, MT_DID_NOT_REGISTER_SLOT, MT_TRY_AGAIN, )
"""/** * @author [Jai Miles] * @email [jaimiles23@gmail.com] * @create date 2020-05-05 13:56:45 * @modify date 2020-05-05 13:56:45 * @desc [ Data module for the fallback handler. ] */ """ ms_fallback = "I can't help you with that right now." "Sorry, I didn't catch your answer. Can you please try again." mt_sorry = ('Sorry,', 'Sorry,', "I'm sorry,", '', '') mt_did_not_register_slot = ("I didn't catch that.", "I didn't get your answer.", "I didn't quite hear you.") mt_try_again = ('Please try again.', 'Please retry.', 'Can you please try again?', 'Can you please retry?') mmt_not_understand = (MT_SORRY, MT_DID_NOT_REGISTER_SLOT, MT_TRY_AGAIN)
# MIT License # (C) Copyright 2021 Hewlett Packard Enterprise Development LP. # # netFlow : ECOS Netflow configuration def get_net_flow_configuration( self, ne_id: str, cached: bool, ) -> dict: """Get netflow configurations from Edge Connect appliance .. list-table:: :header-rows: 1 * - Swagger Section - Method - Endpoint * - netFlow - GET - /netFlow/{neId} :param ne_id: Appliance id in the format of integer.NE e.g. ``3.NE`` :type ne_id: str :param cached: ``True`` retrieves last known value to Orchestrator, ``False`` retrieves values directly from Appliance :type cached: bool :return: Returns dictionary of netflow configuration information \n * keyword **active_timeout** (`int`): Specify NetFlow timeout (1..30) mins * keyword **ipfix_tmplt_rfrsh_t** (`int`): Specify IPFIX template refresh timeout (1..1440) mins * keyword **port1** (`int`): No description from Swagger * keyword **if_wan_tx** (`bool`): No description from Swagger * keyword **enable** (`bool`): No description from Swagger * keyword **ipaddr1** (`str`): valid ip address * keyword **if_lan_rx** (`bool`): No description from Swagger * keyword **if_lan_tx** (`bool`): No description from Swagger * keyword **ipaddr2** (`str`): valid ip address * keyword **if_wan_rx** (`bool`): No description from Swagger * keyword **port2** (`int`): No description from Swagger * keyword **optional_ies** (`dict, optional`): dictionary of optional IES \n * keyword **app_perf_ies** (`bool, optional`): app performance optional IES * keyword **zbf_ies** (`bool, optional`): zbf optional IES\n * keyword **collector_type1** (`str`): NetFlow or IPFIX collector type * keyword **collector_type2** (`str`): NetFlow or IPFIX collector type :rtype: dict """ return self._get("/netFlow/{}?cached={}".format(ne_id, cached))
def get_net_flow_configuration(self, ne_id: str, cached: bool) -> dict: """Get netflow configurations from Edge Connect appliance .. list-table:: :header-rows: 1 * - Swagger Section - Method - Endpoint * - netFlow - GET - /netFlow/{neId} :param ne_id: Appliance id in the format of integer.NE e.g. ``3.NE`` :type ne_id: str :param cached: ``True`` retrieves last known value to Orchestrator, ``False`` retrieves values directly from Appliance :type cached: bool :return: Returns dictionary of netflow configuration information * keyword **active_timeout** (`int`): Specify NetFlow timeout (1..30) mins * keyword **ipfix_tmplt_rfrsh_t** (`int`): Specify IPFIX template refresh timeout (1..1440) mins * keyword **port1** (`int`): No description from Swagger * keyword **if_wan_tx** (`bool`): No description from Swagger * keyword **enable** (`bool`): No description from Swagger * keyword **ipaddr1** (`str`): valid ip address * keyword **if_lan_rx** (`bool`): No description from Swagger * keyword **if_lan_tx** (`bool`): No description from Swagger * keyword **ipaddr2** (`str`): valid ip address * keyword **if_wan_rx** (`bool`): No description from Swagger * keyword **port2** (`int`): No description from Swagger * keyword **optional_ies** (`dict, optional`): dictionary of optional IES * keyword **app_perf_ies** (`bool, optional`): app performance optional IES * keyword **zbf_ies** (`bool, optional`): zbf optional IES * keyword **collector_type1** (`str`): NetFlow or IPFIX collector type * keyword **collector_type2** (`str`): NetFlow or IPFIX collector type :rtype: dict """ return self._get('/netFlow/{}?cached={}'.format(ne_id, cached))
#!/usr/bin/env python class Section: def has_item(self, item): return hasattr(self, item) def __getitem__(self, item): return self.__dict__[item] class ConfigReader(object): """ ConfgiReader - An improved config parser. """ def __init__(self): self.sections = [] def __load(self, lines): for line in filter(None, lines): if line.startswith("["): cursec = line.split("[")[-1].split("]")[0] self.sections.append(cursec) section = Section() setattr(self, cursec, section) elif line.startswith(";") or line.startswith("#"): next else: x = line.split("=") if len(x) > 1: delim = "=" else: x = line.split(":") delim = ":" key = x[0] value = delim.join(x[1:]) setattr(section, key.strip(), value.strip() % section) def read(self, cfg): """ read(configfile) -> This loads a configfile into the object """ try: f = open(cfg, 'rb') self.__load(map(lambda x: x.strip(), f.readlines())) f.close() except IOError: raise StandardError("Couldn't find config file: %s" % (cfg)) def get_sections(self): """ get_sections() -> Returns a list of the sections from the loaded config file. """ return self.sections def has_section(self, section='DEFAULT'): """ has_section(section_name) -> Returns a boolean for the presence of a section. If no section name is passed, it defaults to 'DEFAULT' as the section name. """ return section.strip() in self.sections def get_items(self, section='DEFAULT'): """ get_items(section_name) -> Returns the dictionary of items found with in the specified section. If no section name is passed, it defaults to 'DEFAULT' as the section name. """ return self.__dict__[section].__dict__ def __getitem__(self, item): return self.__dict__[item] if __name__ == "__main__": C = ConfigReader() #C.read("test.cfg") #print(C.get_items('TYPES')) #print(C.debug.level) C.read("OMQS.cfg") print(C.Global.MQURL) print (C.debug.level) # print(C.DEFAULT.name) # print(C.get_sections()) # print(C.DEFAULT['fname']) # print(C.testnames.t2) # print(C.get_items('test')) # print(C.test[';this']) # print(C.test.this) # print(C.DEFAULT.fname) # print(C['DEFAULT'].fname) # print(C['DEFAULT']['fname']) # defs = C.DEFAULT # print(getattr(defs, 'lname'))
class Section: def has_item(self, item): return hasattr(self, item) def __getitem__(self, item): return self.__dict__[item] class Configreader(object): """ ConfgiReader - An improved config parser. """ def __init__(self): self.sections = [] def __load(self, lines): for line in filter(None, lines): if line.startswith('['): cursec = line.split('[')[-1].split(']')[0] self.sections.append(cursec) section = section() setattr(self, cursec, section) elif line.startswith(';') or line.startswith('#'): next else: x = line.split('=') if len(x) > 1: delim = '=' else: x = line.split(':') delim = ':' key = x[0] value = delim.join(x[1:]) setattr(section, key.strip(), value.strip() % section) def read(self, cfg): """ read(configfile) -> This loads a configfile into the object """ try: f = open(cfg, 'rb') self.__load(map(lambda x: x.strip(), f.readlines())) f.close() except IOError: raise standard_error("Couldn't find config file: %s" % cfg) def get_sections(self): """ get_sections() -> Returns a list of the sections from the loaded config file. """ return self.sections def has_section(self, section='DEFAULT'): """ has_section(section_name) -> Returns a boolean for the presence of a section. If no section name is passed, it defaults to 'DEFAULT' as the section name. """ return section.strip() in self.sections def get_items(self, section='DEFAULT'): """ get_items(section_name) -> Returns the dictionary of items found with in the specified section. If no section name is passed, it defaults to 'DEFAULT' as the section name. """ return self.__dict__[section].__dict__ def __getitem__(self, item): return self.__dict__[item] if __name__ == '__main__': c = config_reader() C.read('OMQS.cfg') print(C.Global.MQURL) print(C.debug.level)
class AccidentData: """Clase base que tiene por objetivo darle contexto a los datos de accidentes""" def __init__(self): self.client = 0 self.client_name = "" self.client_contact = "" self.client_phone = "" self.data_origin = ""
class Accidentdata: """Clase base que tiene por objetivo darle contexto a los datos de accidentes""" def __init__(self): self.client = 0 self.client_name = '' self.client_contact = '' self.client_phone = '' self.data_origin = ''
{ "targets": [ { "target_name": "baseJump", "sources": [ "cc/baseJump.cc", "cc/BigInteger.cc", "cc/BigIntegerAlgorithms.cc", "cc/BigIntegerUtils.cc", "cc/BigUnsigned.cc", "cc/BigUnsignedInABase.cc" ], "include_dirs": [ "<!(node -e \"require('nan')\")" ], "cflags!": [ "-fno-exceptions" ], "cflags_cc!": [ "-fno-exceptions" ], "conditions": [ [ "OS==\"mac\"", { "xcode_settings": { "GCC_ENABLE_CPP_EXCEPTIONS": "YES" } } ] ] } ] }
{'targets': [{'target_name': 'baseJump', 'sources': ['cc/baseJump.cc', 'cc/BigInteger.cc', 'cc/BigIntegerAlgorithms.cc', 'cc/BigIntegerUtils.cc', 'cc/BigUnsigned.cc', 'cc/BigUnsignedInABase.cc'], 'include_dirs': ['<!(node -e "require(\'nan\')")'], 'cflags!': ['-fno-exceptions'], 'cflags_cc!': ['-fno-exceptions'], 'conditions': [['OS=="mac"', {'xcode_settings': {'GCC_ENABLE_CPP_EXCEPTIONS': 'YES'}}]]}]}
# 48. Rotate Image # ttungl@gmail.com # You are given an n x n 2D matrix representing an image. # Rotate the image by 90 degrees (clockwise). # Note: # You have to rotate the image in-place, which means you have to modify the input 2D matrix directly. DO NOT allocate another 2D matrix and do the rotation. # Example 1: # Given input matrix = # [ # [1,2,3], # [4,5,6], # [7,8,9] # ], # rotate the input matrix in-place such that it becomes: # [ # [7,4,1], # [8,5,2], # [9,6,3] # ] # Example 2: # Given input matrix = # [ # [ 5, 1, 9,11], # [ 2, 4, 8,10], # [13, 3, 6, 7], # [15,14,12,16] # ], # rotate the input matrix in-place such that it becomes: # [ # [15,13, 2, 5], # [14, 3, 4, 1], # [12, 6, 8, 9], # [16, 7,10,11] # ] class Solution(object): def rotate(self, matrix): """ :type matrix: List[List[int]] :rtype: void Do not return anything, modify matrix in-place instead. """ # sol 1 # use zip(*). # runtime: 40ms matrix[:] = zip(*matrix[::-1]) # sol 2: # runtime: 39ms matrix.reverse() for i in range(len(matrix)): for j in range(i): matrix[i][j], matrix[j][i] = matrix[j][i], matrix[i][j] # sol 3: # use flip-flop # runtime: 37ms for i in range(len(matrix)): # flip left-right for j in range(i): matrix[i][j], matrix[j][i] = matrix[j][i], matrix[i][j] for r in matrix: for c in range(len(matrix)/2): r[c], r[~c] = r[~c], r[c]
class Solution(object): def rotate(self, matrix): """ :type matrix: List[List[int]] :rtype: void Do not return anything, modify matrix in-place instead. """ matrix[:] = zip(*matrix[::-1]) matrix.reverse() for i in range(len(matrix)): for j in range(i): (matrix[i][j], matrix[j][i]) = (matrix[j][i], matrix[i][j]) for i in range(len(matrix)): for j in range(i): (matrix[i][j], matrix[j][i]) = (matrix[j][i], matrix[i][j]) for r in matrix: for c in range(len(matrix) / 2): (r[c], r[~c]) = (r[~c], r[c])
i = 0 while i < 3: print("i: ", i) j = 0 while j < 3: print("j: ", j) j += 1 i += 1
i = 0 while i < 3: print('i: ', i) j = 0 while j < 3: print('j: ', j) j += 1 i += 1
#!/usr/bin/env python3 # # Author: Vishwas K Singh # Email: vishwasks32@gmail.com # # Script to Program to find Sum, Diff, Prod, Avg, Div num1 = input("Enter the first Number: ") num2 = input("Enter the second Number: ") # Check if the user has entered the number itself try: # Convert the numbers to double always, which would handle integers # and also floating point numbers num1 = float(num1) num2 = float(num2) except ValueError: print("The entered input is not a number") exit(0) except TypeError: print("The entered input is not a number") exit(0) # Perform operation on numbers # Sum print("Sum of the two Numbers is: %.2f"%(num1+num2)) # Difference - always will positive print("Difference of two numbers is: %.2f"%(abs(num1-num2))) # average print("Average of two numbers is: %.2f"%((num1+num2)/2)) # product print("Product of the two numbers is %.2f"%(num1*num2)) # division if num2 == 0: print("Cannot perform division as second number is zero") else: print("Division of the two numbers is %.2f"%(num1/num2))
num1 = input('Enter the first Number: ') num2 = input('Enter the second Number: ') try: num1 = float(num1) num2 = float(num2) except ValueError: print('The entered input is not a number') exit(0) except TypeError: print('The entered input is not a number') exit(0) print('Sum of the two Numbers is: %.2f' % (num1 + num2)) print('Difference of two numbers is: %.2f' % abs(num1 - num2)) print('Average of two numbers is: %.2f' % ((num1 + num2) / 2)) print('Product of the two numbers is %.2f' % (num1 * num2)) if num2 == 0: print('Cannot perform division as second number is zero') else: print('Division of the two numbers is %.2f' % (num1 / num2))
class Bands: all_bands = [] def __init__(self, band_name, members): self.band_name = 'band_name' self.members = members self.__class__.all_bands.append(self) def to_list(self): return self.all_bands def __str__(self): return f'the band name is {self.band_name}' def __repr__(self): return f'band: {self.band_name}' class Musician: def __init__(self, name, insturment): self.name = name self.insturment = insturment def __str__(self): return f'I am the {self.insturment}' def __repr__(self): return f'band member is: {self.insturment}' class Guitarist(Musician): def __init__(self, name): super().__init__(name, 'guitarist') class Singer(Musician): def __init__(self, name): super().__init__(name, 'singer') class Drummer(Musician): def __init__(self, name): super().__init__(name, 'drummer')
class Bands: all_bands = [] def __init__(self, band_name, members): self.band_name = 'band_name' self.members = members self.__class__.all_bands.append(self) def to_list(self): return self.all_bands def __str__(self): return f'the band name is {self.band_name}' def __repr__(self): return f'band: {self.band_name}' class Musician: def __init__(self, name, insturment): self.name = name self.insturment = insturment def __str__(self): return f'I am the {self.insturment}' def __repr__(self): return f'band member is: {self.insturment}' class Guitarist(Musician): def __init__(self, name): super().__init__(name, 'guitarist') class Singer(Musician): def __init__(self, name): super().__init__(name, 'singer') class Drummer(Musician): def __init__(self, name): super().__init__(name, 'drummer')
# Author: btjanaka (Bryon Tjanaka) # Problem: (Leetcode) 1 # Title: Two Sum # Link: https://leetcode.com/problems/two-sum/ # Idea: The easy solution is to check every pair of elements, but this is # O(n^2). To achieve O(n), the basic idea is to use a set that keeps track of # which elements we have seen so far while iterating through the list. Then, for # the value x, we can check if we have (target - x) in the set. This is # efficient since lookups for a hash set are O(1). In this solution, we have to # use a dict / hash map instead of a set because we need to store the indices of # the numbers. # Difficulty: easy # Tags: set class Solution: def twoSum(self, nums: List[int], target: int) -> List[int]: prev_nums_with_indices = dict() for i in range(len(nums)): x = nums[i] if (target - x) in prev_nums_with_indices: prev_num_index = prev_nums_with_indices[target - x] return [prev_num_index, i] prev_nums_with_indices[x] = i # Technically not necessary, since the problem guarantees exactly one solution. return [-1, -1]
class Solution: def two_sum(self, nums: List[int], target: int) -> List[int]: prev_nums_with_indices = dict() for i in range(len(nums)): x = nums[i] if target - x in prev_nums_with_indices: prev_num_index = prev_nums_with_indices[target - x] return [prev_num_index, i] prev_nums_with_indices[x] = i return [-1, -1]
a = list(map(lambda i: ord(i) - 97, list(input()))) idx_array = [-1 for _ in range(26)] for i in range(len(a)): if idx_array[a[i]] == -1: idx_array[a[i]] = i for idx in idx_array: print(idx, end=' ')
a = list(map(lambda i: ord(i) - 97, list(input()))) idx_array = [-1 for _ in range(26)] for i in range(len(a)): if idx_array[a[i]] == -1: idx_array[a[i]] = i for idx in idx_array: print(idx, end=' ')
# https://leetcode.com/problems/kth-smallest-element-in-a-bst/ # # algorithms # Medium (49.79%) # Total Accepted: 199,308 # Total Submissions: 400,327 # beats 100.0% of python submissions # Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution(object): def kthSmallest(self, root, k): """ :type root: TreeNode :type k: int :rtype: int """ self.k = k self.res = None self.recursive(root) return self.res def recursive(self, node): if not node or self.res: return self.recursive(node.left) self.k -= 1 if self.k == 0: self.res = node.val return self.recursive(node.right)
class Solution(object): def kth_smallest(self, root, k): """ :type root: TreeNode :type k: int :rtype: int """ self.k = k self.res = None self.recursive(root) return self.res def recursive(self, node): if not node or self.res: return self.recursive(node.left) self.k -= 1 if self.k == 0: self.res = node.val return self.recursive(node.right)
# Complete the compareTriplets function below. def compareTriplets(a, b): al =0 bo=0 for i in range(3): if(a[i]>b[i]): al+=1 elif(b[i]>a[i]): bo+=1 return(al,bo) if __name__ == '__main__': fptr = open(os.environ['OUTPUT_PATH'], 'w') a = list(map(int, input().rstrip().split())) b = list(map(int, input().rstrip().split())) result = compareTriplets(a, b) fptr.write(' '.join(map(str, result))) fptr.write('\n') fptr.close()
def compare_triplets(a, b): al = 0 bo = 0 for i in range(3): if a[i] > b[i]: al += 1 elif b[i] > a[i]: bo += 1 return (al, bo) if __name__ == '__main__': fptr = open(os.environ['OUTPUT_PATH'], 'w') a = list(map(int, input().rstrip().split())) b = list(map(int, input().rstrip().split())) result = compare_triplets(a, b) fptr.write(' '.join(map(str, result))) fptr.write('\n') fptr.close()
def partition(top, end, array): pivot_index = top pivot = array[pivot_index] while top < end: while top < len(array) and array[top] <= pivot: top += 1 while array[end] > pivot: end -= 1 if(top < end): array[top], array[end] = array[end], array[top] array[end], array[pivot_index] = array[pivot_index], array[end] return end def quick_sort(top, end, array): if (top < end): p = partition(top, end, array) quick_sort(top, p - 1, array) quick_sort(p + 1, end, array) array = [ 10, 7, 8, 9, 1, 5 ] quick_sort(0, len(array) - 1, array) print(f'Sorted array: {array}')
def partition(top, end, array): pivot_index = top pivot = array[pivot_index] while top < end: while top < len(array) and array[top] <= pivot: top += 1 while array[end] > pivot: end -= 1 if top < end: (array[top], array[end]) = (array[end], array[top]) (array[end], array[pivot_index]) = (array[pivot_index], array[end]) return end def quick_sort(top, end, array): if top < end: p = partition(top, end, array) quick_sort(top, p - 1, array) quick_sort(p + 1, end, array) array = [10, 7, 8, 9, 1, 5] quick_sort(0, len(array) - 1, array) print(f'Sorted array: {array}')
def find_coordinates(x, y): # Get coordinates of mouse click return (x- x%10, y - y%10) def get_all_neighbours(cell): # get neighbours along with current cell (x,y) = cell return [(x-i,y-j) for i in range(-10,20,10) for j in range(-10,20,10)] def get_next_generation(cells): # Get next generation next_gen = {} which_cells_to_check = set() for curr_cell,_ in cells.items(): for xy in get_all_neighbours(curr_cell): which_cells_to_check.add(xy) for curr_cell in which_cells_to_check: curr_live_neighbours = 0 for xy in get_all_neighbours(curr_cell): curr_live_neighbours += 1 if (curr_cell != xy) and (cells.get(xy,None) is not None) else 0 if cells.get(curr_cell,None) is not None and ((curr_live_neighbours == 2) or (curr_live_neighbours == 3)): next_gen[curr_cell]=True if cells.get(curr_cell,None) is None and (curr_live_neighbours == 3): next_gen[curr_cell]=True return next_gen
def find_coordinates(x, y): return (x - x % 10, y - y % 10) def get_all_neighbours(cell): (x, y) = cell return [(x - i, y - j) for i in range(-10, 20, 10) for j in range(-10, 20, 10)] def get_next_generation(cells): next_gen = {} which_cells_to_check = set() for (curr_cell, _) in cells.items(): for xy in get_all_neighbours(curr_cell): which_cells_to_check.add(xy) for curr_cell in which_cells_to_check: curr_live_neighbours = 0 for xy in get_all_neighbours(curr_cell): curr_live_neighbours += 1 if curr_cell != xy and cells.get(xy, None) is not None else 0 if cells.get(curr_cell, None) is not None and (curr_live_neighbours == 2 or curr_live_neighbours == 3): next_gen[curr_cell] = True if cells.get(curr_cell, None) is None and curr_live_neighbours == 3: next_gen[curr_cell] = True return next_gen
# # PySNMP MIB module BIANCA-BRICK-PPP-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/BIANCA-BRICK-PPP-MIB # Produced by pysmi-0.3.4 at Wed May 1 11:37:58 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") SingleValueConstraint, ConstraintsUnion, ConstraintsIntersection, ValueRangeConstraint, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ConstraintsUnion", "ConstraintsIntersection", "ValueRangeConstraint", "ValueSizeConstraint") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") Gauge32, MibIdentifier, iso, ObjectIdentity, Unsigned32, ModuleIdentity, Integer32, NotificationType, Bits, MibScalar, MibTable, MibTableRow, MibTableColumn, Counter64, IpAddress, TimeTicks, Counter32 = mibBuilder.importSymbols("SNMPv2-SMI", "Gauge32", "MibIdentifier", "iso", "ObjectIdentity", "Unsigned32", "ModuleIdentity", "Integer32", "NotificationType", "Bits", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter64", "IpAddress", "TimeTicks", "Counter32") TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString") org = MibIdentifier((1, 3)) dod = MibIdentifier((1, 3, 6)) internet = MibIdentifier((1, 3, 6, 1)) private = MibIdentifier((1, 3, 6, 1, 4)) enterprises = MibIdentifier((1, 3, 6, 1, 4, 1)) bintec = MibIdentifier((1, 3, 6, 1, 4, 1, 272)) bibo = MibIdentifier((1, 3, 6, 1, 4, 1, 272, 4)) ppp = MibIdentifier((1, 3, 6, 1, 4, 1, 272, 4, 3)) dialmap = MibIdentifier((1, 3, 6, 1, 4, 1, 272, 4, 4)) class BitValue(Integer32): pass class Date(Integer32): pass biboPPPTable = MibTable((1, 3, 6, 1, 4, 1, 272, 4, 3, 1), ) if mibBuilder.loadTexts: biboPPPTable.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPTable.setDescription("The biboPPPTable contains configuration information for the PPP interfaces. Each time a new entry is made here, a corresponding entry is made in the ifTable. Creating entries: Entries are created by assigning a value to the biboPPPType object. Deleting entries: Entries are removed by setting an entry's biboPPPEncapsulation object to 'delete'.") biboPPPEntry = MibTableRow((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1), ).setIndexNames((0, "BIANCA-BRICK-PPP-MIB", "biboPPPType")) if mibBuilder.loadTexts: biboPPPEntry.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPEntry.setDescription('') biboPPPIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPIfIndex.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPIfIndex.setDescription('Correlating PPP interface index. This value is assigned automatically by the system.') biboPPPType = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 5))).clone(namedValues=NamedValues(("isdn-dialup", 1), ("leased", 2), ("isdn-dialin-only", 3), ("multiuser", 5)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPType.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPType.setDescription("The type of link. A new dialup link is created when this field is set to the value isdn-dialup(1), dialin-only(3) or multiuser(5). The maximum number of dialup links is limited by system memory. Each dialup link should have at least one corresponding entry in the biboDialTable to configure the remote ISDN telephone number(s). A leased line link, can not be created by setting this field to leased(2), but is automatically established when the IsdnChType field is set to either 'leased-dte' or 'leased-dce' (which doesn't make a difference for PPP, but must be set correctly for other encapsulation methods). Naturally, when the IsdnChType field is set to any other value, the biboPPPTable entry is removed. In both cases, a new entry in the biboPPPTable creates corre- corresponding entries in the ifTable (a new interface) and in the biboPPPStatTable (PPP statistics). Setting this object to multiuser(5), up to biboPPPMaxConn matching incoming connections (see biboPPPAuthentication, biboPPPAuthSecret, biboPPPAuthIdent) from different dialin partners will be accepted.") biboPPPEncapsulation = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17))).clone(namedValues=NamedValues(("ppp", 1), ("x25", 2), ("x25-ppp", 3), ("ip-lapb", 4), ("delete", 5), ("ip-hdlc", 6), ("mpr-lapb", 7), ("mpr-hdlc", 8), ("frame-relay", 9), ("x31-bchan", 10), ("x75-ppp", 11), ("x75btx-ppp", 12), ("x25-nosig", 13), ("x25-ppp-opt", 14), ("x25-pad", 15), ("x25-noconfig", 16), ("x25-noconfig-nosig", 17)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPEncapsulation.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPEncapsulation.setDescription("The layer 2 encapsulation of the link. The use of ppp(1) as described in RFC 1661 is the preferred encapsulation for point-to-point links. The encapsulation is set to x25(2) for X.25-only links and to x25-ppp(3) for concurrent use of X.25 and PPP. Mpr-lapb(7) and mpr-hdlc(8) are popular proprietary encapsulations. They both use the ethertype number for protocol multiplexing. The former is used when error correction or data compression (v42bis) is desired. The latter (mpr-hdlc) is compatible to Cisco's HDLC encapsulation. On IP-only links it is also possible to use the ISO LAPB protocol (ip-lapb(4)), also known as X.75, or raw hdlc framing (ip-hdlc(6)). The x75-ppp encapsulation provides a proprietary solution for using PPP encapsulation over X.75 (LAPB) framing, x75btx-ppp provides PPP over T.70 and LAPB framing including a BTX protocol header to access BTX services over ISDN links. The x25-nosig(13) encapsulation is used to establish X.25 connections over dialup links without specific signalling on the D-channel (pure data call). The x25-ppp-opt encapsulation provides a special kind of the x25-ppp encapsulation. Dialin partner will be authenticated either outband to establish an X.25 connection via ISDN or optional inband by using the point-to-point protocol (PPP). Concurrent use of X.25 and PPP encapsulation is excluded. The x25-noconfig(16) and x25-noconfig-nosig(17) encapsulations provide a solution fr establishing X.25 connections via ISDN. The dial number will be derived from X.25 destination address by using special rules. V42bis data compression can be enabled on LAPB links only, because v42bis requires an error free connection. Dialup links can be removed by setting this field to delete(5). This has no effect on permanent links.") biboPPPKeepalive = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("on", 1), ("off", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPKeepalive.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPKeepalive.setDescription('When set to on(1), keepalive packets are sent in regular intervals during the connection. Keepalive packets can not be sent using the ip-lapb or x25 encapsulation.') biboPPPTimeout = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(500, 10000))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPTimeout.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPTimeout.setDescription('The number of milliseconds waiting before retransmitting a PPP configure packet.') biboPPPCompression = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("none", 1), ("v42bis", 2), ("stac", 3), ("ms-stac", 4), ("mppc", 5)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPCompression.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPCompression.setDescription('The throughput can be enhanced up to factor three using the V42bis compression method or the Stac LZS compression algorithm. V42bis is currently supported with the ip-lapb and mpr-lapb encapsulation. Stac LZS compression algorithm is provided using PPP encapsulated links, stac(3) indicates support of Sequence checking, ms-stac(4) indicates support of Extended mode which is prefered by Microsoft. Both check modes are implemented according RFC 1974. When set to mppc(5), the Microsoft Point-to-Point Compression (MPPC) Protocol according RFC 2118 is negotiated. MPPC uses an LZ based algorithm with a sliding window history buffer.') biboPPPAuthentication = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8))).clone(namedValues=NamedValues(("none", 1), ("pap", 2), ("chap", 3), ("both", 4), ("radius", 5), ("ms-chap", 6), ("all", 7), ("ms-chapv2", 8)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPAuthentication.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPAuthentication.setDescription("The type of authentication used on the point-to-point link as described in RFC 1334. The authentication protocol supports pap(2) (Password Authentication Protocol), chap(3) (Challenge Handshake Authentication Protocol), or both(4). When set to both(4), the link must be successfully authenticated by either CHAP or PAP. The type ms-chap(6) and ms-chapv2(8) are Microsofts proprietary CHAP authentication procedures (using MD4 and DES encryption instead of MD5 encryption algorithm), all(7) includes PAP, CHAP and MS-CHAP. Another way to authenticate dial-in users is by using RADIUS (remote authentication dial in user service). Users can authenticate themselves either using PAP or CHAP (excluding MS-CHAP). In general the system creates PPP interfaces with this authentication itself, but it's also possible to take advance of the RADIUS dial-in services with pre-configured interfaces. See biboAdmRadiusServer for further details.") biboPPPAuthIdent = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 8), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPAuthIdent.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPAuthIdent.setDescription("The remote authentication identification string. The local authentication identification string is taken from the contents of the sysName field, up to the appearance of the first dot (e.g., the remote name would be `brick' if the content of the sysName field was `brick.bintec.de').") biboPPPAuthSecret = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 9), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPAuthSecret.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPAuthSecret.setDescription('The authentication secret, which is used symmetrically for both local and remote sides of the PPP link.') biboPPPIpAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("static", 1), ("dynamic-server", 2), ("dynamic-client", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPIpAddress.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPIpAddress.setDescription('The IP control protocol as described in RFC1332 has a means of negotiating IP-addresses. When this option is set to dynamic-server(2), an available IP-address found in biboPPPIpAddrTable is assigned as the remote IP-address and a temporary route is created during the uptime of the interface. When set to dynamic-client(3), the remote system is asked to tell us our own IP-address. A host route will be created during the uptime of the interface. In most cases this option will be set automatically by the network address translation option. In static(1) mode, address-negotiation is not forced.') biboPPPRetryTime = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 11), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 3600))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPRetryTime.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPRetryTime.setDescription('Time in seconds to wait before retrying a call; currently not used.') biboPPPBlockTime = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 12), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPBlockTime.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPBlockTime.setDescription('Time in seconds to wait after a connection failure (e.g. the number of biboPPPMaxRetries calls failed). When set to zero, the interface state is never set to blocked.') biboPPPMaxRetries = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 13), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPMaxRetries.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPMaxRetries.setDescription('The number of dialup retries before changing to the blocked state.') biboPPPShortHold = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 14), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1, 3600))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPShortHold.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPShortHold.setDescription('The time in seconds to wait, once the channel is silent, (that is, no data is being received or transmitted) before terminating the link. When set to zero the short hold mode is disabled, when set to -1 the short hold mode is disabled and the link will be reconnected when connection was lost.') biboPPPInitConn = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 15), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 250))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPInitConn.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPInitConn.setDescription(' The number of channels to initially set up for this interface.') biboPPPMaxConn = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 16), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 250))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPMaxConn.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPMaxConn.setDescription('The maximum number of channels bundled for this interface.') biboPPPMinConn = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 17), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 250))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPMinConn.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPMinConn.setDescription('The minimum number of channels bundled for this interface.') biboPPPCallback = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 18), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2), ("expected", 3), ("ppp-offered", 4), ("delayed", 5), ("ppp-callback-optional", 6)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPCallback.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPCallback.setDescription("If this object is enabled(1), and the call is recognized by the dialed number then calls are never accepted, and a callback is forced for incoming calls at once. The callback can be delayed for biboPPPRetryTime seconds by setting this entry to delayed(5). If the call is recognized by inband authentication (PAP or CHAP) then the actual connection is closed and a callback is performed at once. Setting this value to ppp-offered(4) allows a called peer to call back the calling site if offered by PPP negotiation. For PABX dialout a dialprefix is added to the number, if offered by the calling site (see isdnStkTable). If this object is set to expected(3), only one initial outgoing call is made expecting a callback. If this object is set to ppp-callback-optional(6), the CBCP option 'no callback' is also offered to the Windows client so that the user can decide wether he wants to be called back or not.") biboPPPLayer1Protocol = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 19), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23))).clone(namedValues=NamedValues(("data-64k", 1), ("data-56k", 2), ("modem", 3), ("dovb", 4), ("v110-1200", 5), ("v110-2400", 6), ("v110-4800", 7), ("v110-9600", 8), ("v110-14400", 9), ("v110-19200", 10), ("v110-38400", 11), ("modem-profile-1", 12), ("modem-profile-2", 13), ("modem-profile-3", 14), ("modem-profile-4", 15), ("modem-profile-5", 16), ("modem-profile-6", 17), ("modem-profile-7", 18), ("modem-profile-8", 19), ("pptp-pns", 20), ("pppoe", 21), ("aodi", 22), ("pptp-pac", 23)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPLayer1Protocol.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLayer1Protocol.setDescription('This entry is used to select the layer 1 protocol settings for this partner. Normally the correct entry is hdlc-64.') biboPPPLoginString = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 20), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPLoginString.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLoginString.setDescription('A textual string containing a login sequence (script) composed of fields in the format [expect send], comparable to chat scripts commonly used on other sytems. This script is required i.e. to establish an asynchronus PPP dialup connection to CompuServe.') biboPPPVJHeaderComp = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 21), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPVJHeaderComp.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPVJHeaderComp.setDescription('This entry is used to enable Van Jacobsen TCP/IP header compression, which reduces the size of TCP/IP packet headers and increases the efficiency of line utilization.') biboPPPLayer2Mode = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 22), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("auto", 1), ("dte", 2), ("dce", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPLayer2Mode.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLayer2Mode.setDescription('This object specifies the layer 2 mode to be used for a connection. It is only relevant, if the Encapsulation involves an LAPB protocol. This is the case for x25, x25-ppp, ip-lapb, lapb, x31-bchan, x75-ppp, x75btx-ppp, x25-nosig. The Default value of this object is auto. For dialup connection, the layer 2 mode will than be DTE, on the calling side and DCE on the called side. For permanent connections, the layer 2 mode is set at lower layers (for example isdnChType in the isdnChTable). When this object is set to dte or dce, the layer 2 mode will always be DTE or DCE, regardless of the call direction or the settings at the lower layer.') biboPPPDynShortHold = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 23), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPDynShortHold.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPDynShortHold.setDescription("Optimizes idle time disconnects depending on the charging information received during the connection. This value specifies the minimum inactivity time (channel is silent) in percents of the current charging interval length and is only used for outgoing connections. Incoming connections are disconnected after idle time according to the value biboPPPShortHold. Please note that this only works if your ISDN port has the AOCD service enabled (advice of charging during the call). For instance in Germany this is an extra paid service. (Even the 'Komfortanschluss' does only include AOCE [advice of charge at the end of the call], so AOCD has to be ordered and paid extra.)") biboPPPLocalIdent = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 24), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPLocalIdent.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLocalIdent.setDescription('This is the local identification string used for PPP authentication(PAP/CHAP). If this entry is empty the variable biboAdmLocalPPPIdent will be used.') biboPPPDNSNegotiation = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 25), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("disabled", 1), ("enabled", 2), ("dynamic-client", 3), ("dynamic-server", 4)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPDNSNegotiation.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPDNSNegotiation.setDescription('The IP control protocol extensions as described in RFC 1877 has a means of negotiating primary and secondary Domain Name System (DNS) server addresses. When this option is disabled(1), no DNS negotiation will be performed. If enabled(2), DNS negotiation behavier depends on biboPPPIpAddress switch (client or server mode). Setting to dynamic-client(3), the remote system is asked to tell us the IP-address(es) of primary and/or secondary DNS. Setting to dynamic_server(4), primary and/or secondary DNS IP-address(es) found in biboAdmNameServer or biboAdmNameServ2, if asked, will be send to remote.') biboPPPEncryption = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 26), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11))).clone(namedValues=NamedValues(("none", 1), ("mppe-40", 2), ("mppe-128", 3), ("des-56", 4), ("triple-des-168", 5), ("blowfish-168", 6), ("mppe-56", 7), ("mppev2-40", 8), ("mppev2-56", 9), ("mppev2-128", 10), ("blowfish-56", 11)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPEncryption.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPEncryption.setDescription("This field specifies the data encryption scheme for en(de)crypting PPP encapsulated multi-protocol datagrams. Setting to mppe-40(2), mppe-128(3) or mppe-56(7) the Microsoft Point to Point Encryption Protocol (MPPE) will be enabled, using a 40 bit, 128 bit respectively 56 bit session key for initializing encryption tables. Setting to mppev2-40(8), mppev2-56(9) or mppev2-128(10) the Microsoft Point to Point Encryption Protocol (MPPE) 'stateless mode' will be enabled, using a 40 bit, 56 bit respectively 128 bit session key.") biboPPPLQMonitoring = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 27), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("off", 1), ("on", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPLQMonitoring.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLQMonitoring.setDescription('This parameter enables (2) or disables (1) PPP Link Quality Monitoring (LQM) according RFC 1989. When set to on(2) LQM is added to the list of parameters used in LCP negotiation. If LQM is acknowledged by peer link quality reports will be generated and send periodically.') biboPPPIpPoolId = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 28), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPIpPoolId.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPIpPoolId.setDescription('Pool ID value to select an IP address pool for dynamic IP address assignment via IPCP. See also PPPIpAssignTable for further details.') biboPPPSessionTimeout = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 29), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPSessionTimeout.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPSessionTimeout.setDescription('Maximum number of seconds before termination the established PPP session, regardless there is any data throughput on the corresponding link(s). When set to 0, there no limit for the duration of the PPP session.') biboPPPStatTable = MibTable((1, 3, 6, 1, 4, 1, 272, 4, 3, 2), ) if mibBuilder.loadTexts: biboPPPStatTable.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPStatTable.setDescription('The biboPPPStatTable contains statistical connection- specific information. Only the system can add or delete entries to this table. Creating entries: Entries are created by the system each time a new PPP interface is created in the biboPPPTable. Deleting entries: Entries are removed by the system when the corresponding PPP interface is removed.') biboPPPStatEntry = MibTableRow((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1), ).setIndexNames((0, "BIANCA-BRICK-PPP-MIB", "biboPPPConnIfIndex")) if mibBuilder.loadTexts: biboPPPStatEntry.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPStatEntry.setDescription('') biboPPPConnIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPConnIfIndex.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPConnIfIndex.setDescription('Correlating PPP interface index.') biboPPPConnActive = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 250))).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPConnActive.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPConnActive.setDescription('The actual number of bundled channels.') biboPPPConnProtocols = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPConnProtocols.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPConnProtocols.setDescription('The bitwise ORed protocols successfully negotiated on this connection; currently the following protocols are supported: tcp/ip(1), ipx(2), bridge(4), bpdu(8), x25(16). These protocol values are most likely to change in future software releases.') biboPPPConnState = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("idle", 1), ("incoming", 2), ("outgoing", 3), ("connected", 4), ("dataxfer", 5), ("disconnect", 6)))).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPConnState.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPConnState.setDescription('The physical state of the link. This field is obsolete and will not be supported in a future release.') biboPPPConnDuration = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPConnDuration.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPConnDuration.setDescription('The current link duration on this interface in seconds.') biboPPPConnUnits = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPConnUnits.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPConnUnits.setDescription('The current costs on this interface for all member links.') biboPPPConnTransmitOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPConnTransmitOctets.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPConnTransmitOctets.setDescription("The octets transmitted on this interface since its last change to the 'up' state.") biboPPPConnReceivedOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPConnReceivedOctets.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPConnReceivedOctets.setDescription("The octets received since its last change to the `up' state.") biboPPPConnOutgoingCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPConnOutgoingCalls.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPConnOutgoingCalls.setDescription("The number of outgoing calls on this interface since its last change to the 'up' state.") biboPPPConnOutgoingFails = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPConnOutgoingFails.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPConnOutgoingFails.setDescription("The number of outgoing call failures on this interface since its last change to the 'up' state.") biboPPPConnIncomingCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPConnIncomingCalls.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPConnIncomingCalls.setDescription('The number of incoming calls on this interface since its last change to the up state.') biboPPPConnIncomingFails = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPConnIncomingFails.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPConnIncomingFails.setDescription('The number of incoming call failures on this interface since its last change to the up state.') biboPPPTotalDuration = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 13), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPTotalDuration.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPTotalDuration.setDescription('The total link duration in seconds.') biboPPPTotalUnits = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPTotalUnits.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPTotalUnits.setDescription('The total costs on this interface for all member links.') biboPPPTotalTransmitOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPTotalTransmitOctets.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPTotalTransmitOctets.setDescription('The total amount of octets transmitted.') biboPPPTotalReceivedOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPTotalReceivedOctets.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPTotalReceivedOctets.setDescription('The total amount of octets received.') biboPPPTotalOutgoingCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 17), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPTotalOutgoingCalls.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPTotalOutgoingCalls.setDescription('The total number of outgoing calls.') biboPPPTotalOutgoingFails = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 18), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPTotalOutgoingFails.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPTotalOutgoingFails.setDescription('The total number of outgoing call failures.') biboPPPTotalIncomingCalls = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 19), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPTotalIncomingCalls.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPTotalIncomingCalls.setDescription('The total number of incoming calls.') biboPPPTotalIncomingFails = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 20), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPTotalIncomingFails.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPTotalIncomingFails.setDescription('The total number of incoming call failures.') biboPPPThroughput = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 21), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPThroughput.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPThroughput.setDescription('The actual thoughput of the interface; updated every 5 seconds.') biboPPPCompressionMode = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 22), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("inactive", 1), ("active", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPCompressionMode.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPCompressionMode.setDescription('This object describes wether data compression is active for this interface. 42bis or Stac LZS compression algorithm can be enabled in the biboPPPTable.') biboPPPChargeInterval = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 23), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 3600))).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPChargeInterval.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPChargeInterval.setDescription('Describes the measured interval between charging info elements received from the ISDN network.') biboPPPIdleTime = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 24), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 3600))).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPIdleTime.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPIdleTime.setDescription('The currently measured connection inactivity time (channel is silent).') biboPPPConnCharge = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 25), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPConnCharge.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPConnCharge.setDescription('The current charge on this interface as 1/1000 of the respective currency.') biboPPPTotalCharge = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 26), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPTotalCharge.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPTotalCharge.setDescription('The total charge on this interface as 1/1000 of the respective currency.') pppSessionTable = MibTable((1, 3, 6, 1, 4, 1, 272, 4, 3, 10), ) if mibBuilder.loadTexts: pppSessionTable.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionTable.setDescription('The pppSessionTable contains statistical information for the PPP protocol. Only the system can add or delete entries to this table. Creating entries: Entries are created by the system each time a new PPP connection is created. Deleting entries: Entries are removed by the system when the corresponding PPP connection is terminated.') pppSessionEntry = MibTableRow((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1), ).setIndexNames((0, "BIANCA-BRICK-PPP-MIB", "pppSessionIfIndex")) if mibBuilder.loadTexts: pppSessionEntry.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionEntry.setDescription('') pppSessionIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppSessionIfIndex.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionIfIndex.setDescription('Correlating PPP interface index.') pppSessionMlp = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("none", 1), ("negotiated", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: pppSessionMlp.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionMlp.setDescription('Indicates negotiation of Multilink PPP.') pppSessionMru = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppSessionMru.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionMru.setDescription("Peer's MRU/MRRU LCP option.") pppSessionLcpCallback = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("none", 1), ("lcp", 2), ("cbcp", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: pppSessionLcpCallback.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionLcpCallback.setDescription('Callback option inside LCP negotiation.') pppSessionAuthProt = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("none", 1), ("pap", 2), ("chap", 3), ("ms-chapv1", 4), ("ms-chapv2", 5)))).setMaxAccess("readonly") if mibBuilder.loadTexts: pppSessionAuthProt.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionAuthProt.setDescription('The negotiated PPP authentication protocol.') pppSessionCompression = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("none", 1), ("stac", 2), ("ms-stac", 3), ("mppc", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: pppSessionCompression.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionCompression.setDescription('The negotiated CCP compression mode.') pppSessionEncryption = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11))).clone(namedValues=NamedValues(("none", 1), ("mppe-40", 2), ("mppe-128", 3), ("des-56", 4), ("triple-des-168", 5), ("blowfish-168", 6), ("mppe-56", 7), ("mppev2-40", 8), ("mppev2-56", 9), ("mppev2-128", 10), ("blowfish-56", 11)))).setMaxAccess("readonly") if mibBuilder.loadTexts: pppSessionEncryption.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionEncryption.setDescription('The negotiated CCP encryption mode.') pppSessionCbcpMode = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("none", 1), ("no-callback", 2), ("user-specified", 3), ("pre-specified", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: pppSessionCbcpMode.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionCbcpMode.setDescription('The negotiated Callback Control Protocol (CBCP) mode.') pppSessionCbcpDelay = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 60))).setMaxAccess("readonly") if mibBuilder.loadTexts: pppSessionCbcpDelay.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionCbcpDelay.setDescription('The negotiated (CBCP) callback delay in seconds.') pppSessionLocIpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 10), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppSessionLocIpAddr.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionLocIpAddr.setDescription('The negotiated local IP Address.') pppSessionRemIpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 11), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppSessionRemIpAddr.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionRemIpAddr.setDescription('The negotiated remote IP Address.') pppSessionDNS1 = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 12), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppSessionDNS1.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionDNS1.setDescription('The negotiated first name server IP address.') pppSessionDNS2 = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 13), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppSessionDNS2.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionDNS2.setDescription('The negotiated second name server IP address.') pppSessionWINS1 = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 14), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppSessionWINS1.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionWINS1.setDescription('The negotiated first NetBIOS name server (WINS) IP address.') pppSessionWINS2 = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 15), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppSessionWINS2.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionWINS2.setDescription('The negotiated second NetBIOS name server (WINS) IP address.') pppSessionVJHeaderComp = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 16), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("none", 1), ("negotiated", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: pppSessionVJHeaderComp.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionVJHeaderComp.setDescription('The negotiation of Van Jacobsen TCP/IP header compression option (IPCP).') pppSessionIpxcpNodeNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 17), OctetString().subtype(subtypeSpec=ValueSizeConstraint(6, 6)).setFixedLength(6)).setMaxAccess("readonly") if mibBuilder.loadTexts: pppSessionIpxcpNodeNumber.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionIpxcpNodeNumber.setDescription('Unique IPX Node Id dynamically assigned the client.') pppSessionBacpFavoredPeer = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 18), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("none", 1), ("local", 2), ("remote", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: pppSessionBacpFavoredPeer.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionBacpFavoredPeer.setDescription('The result of the BACP Favored-Peer negotiation.') biboPPPLinkTable = MibTable((1, 3, 6, 1, 4, 1, 272, 4, 3, 3), ) if mibBuilder.loadTexts: biboPPPLinkTable.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkTable.setDescription('The biboPPPLinkTable contains statistical information for each current PPP link on the system. Only the system can add or delete entries to this table. Creating entries: Entries are created by the system each time a new PPP interface is created in the biboPPPTable. Deleting entries: Entries are removed by the system when the corresponding PPP interface is removed.') biboPPPLinkEntry = MibTableRow((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1), ).setIndexNames((0, "BIANCA-BRICK-PPP-MIB", "biboPPPLinkIfIndex")) if mibBuilder.loadTexts: biboPPPLinkEntry.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkEntry.setDescription('') biboPPPLinkIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPLinkIfIndex.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkIfIndex.setDescription('Correlating PPP interface index.') biboPPPLinkEstablished = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 2), Date()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPLinkEstablished.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkEstablished.setDescription('Time when the link was established.') biboPPPLinkDirection = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("incoming-dce", 1), ("outgoing-dte", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPLinkDirection.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkDirection.setDescription('Direction of link, incoming(1) or outgoing(2). In case of permanent links, the meaning is dce(1) or dte(2).') biboPPPLinkProtocols = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPLinkProtocols.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkProtocols.setDescription('The bitwise ORed protocols successfully negotiated on this link; currently the following protocols are supported: tcp/ip(1), ipx(2), bridge(4), bpdu(8), x25(16). These protocol values are most likely to change in future software releases.') biboPPPLinkState = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("up", 1), ("down", 2), ("starting", 3), ("loopbacked", 4), ("dialing", 5), ("retry-wait", 6)))).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPLinkState.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkState.setDescription('The actual state of each link in a bundle. The link is fully operational in the up(1) state, and not operational in the down(2) state. The starting(3) state is an inter- mediate state when the link is physically established but PPP or other link negotation has not finished yet. The loopbacked(4) state is entered when the PPP keepalive mechanism detects a loopbacked link. The dialing(5) state shows that a dialup link is in its link establishment phase, dialing. If there is no answer to the call, the link enters the retry-wait(6) state for biboPPPRetryTime seconds. After waiting that time either a call retry will occur, or the ifOperStatus will enter the blocked state, depending on the amount of retries already done (biboPPPLinkRetries) and the value of the biboPPPMaxRetries field.') biboPPPLinkUnits = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPLinkUnits.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkUnits.setDescription('The costs for this link in units.') biboPPPLinkRetries = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPLinkRetries.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkRetries.setDescription('The amount of retries taken to establish the link.') biboPPPLinkKeepaliveSent = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPLinkKeepaliveSent.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkKeepaliveSent.setDescription('The amount of keepalive packets sent on the link.') biboPPPLinkKeepalivePending = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPLinkKeepalivePending.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkKeepalivePending.setDescription('The amount of keepalive answer packets waiting for since the last occurance of an echo reply packet.') biboPPPLinkDeviceIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 10), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPLinkDeviceIndex.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkDeviceIndex.setDescription('The underlying link device index.') biboPPPLinkSpeed = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 11), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPLinkSpeed.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkSpeed.setDescription('The speed of the link.') biboPPPLinkStkNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 13), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 31))).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPLinkStkNumber.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkStkNumber.setDescription('The stack number of the dialup link, correlating to the isdnStkNumber field in the isdnCallTable.') biboPPPLinkCallType = MibScalar((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 14), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("incoming", 1), ("outgoing", 2), ("undef", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPLinkCallType.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkCallType.setDescription('The call type of the dialup link, correlating to the isdnCallType field in the isdnCallTable.') biboPPPLinkCallReference = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 15), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPLinkCallReference.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkCallReference.setDescription('The call reference of the dialup link, correlating to the isdnCallReference field in the isdnCallTable.') biboPPPLinkCharge = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPLinkCharge.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkCharge.setDescription('The costs for this link as 1/1000 of the respective currency.') biboPPPLinkAccm = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 17), OctetString().subtype(subtypeSpec=ValueSizeConstraint(4, 4)).setFixedLength(4)).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPLinkAccm.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkAccm.setDescription('.') biboPPPLinkLqm = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 18), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("none", 1), ("negotiated", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPLinkLqm.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkLqm.setDescription('Indicates the successful negotiation of the Link Quality Protocol (LQM).') biboPPPLinkLcpComp = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 19), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("none", 1), ("addr", 2), ("prot", 3), ("both", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPLinkLcpComp.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkLcpComp.setDescription('Address- and Protocol-Field compression.') biboPPPLinkLocDiscr = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 20), OctetString().subtype(subtypeSpec=ValueSizeConstraint(6, 6)).setFixedLength(6)).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPLinkLocDiscr.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkLocDiscr.setDescription('Local LCP multilink endpoint discriminator.') biboPPPLinkRemDiscr = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 21), OctetString().subtype(subtypeSpec=ValueSizeConstraint(6, 6)).setFixedLength(6)).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPLinkRemDiscr.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkRemDiscr.setDescription("Peer's LCP multilink endpoint discriminator.") pppLqmTable = MibTable((1, 3, 6, 1, 4, 1, 272, 4, 3, 6), ) if mibBuilder.loadTexts: pppLqmTable.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmTable.setDescription('The pppLqmTable contains statistical information for each current PPP link on the system. Only the system can add or delete entries to this table. Creating entries: Entries are created by the system each time a new PPP link was established and LQM negotiated successful. Deleting entries: Entries are removed by the system when the corresponding PPP link is disconnected.') pppLqmEntry = MibTableRow((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1), ).setIndexNames((0, "BIANCA-BRICK-PPP-MIB", "pppLqmIfIndex")) if mibBuilder.loadTexts: pppLqmEntry.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmEntry.setDescription('') pppLqmIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppLqmIfIndex.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmIfIndex.setDescription('Correlating PPP interface index.') pppLqmCallReference = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppLqmCallReference.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmCallReference.setDescription('The call reference of the dialup link, correlating to the isdnCallReference field in the isdnCallTable.') pppLqmReportingPeriod = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppLqmReportingPeriod.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmReportingPeriod.setDescription('The LQMReportingPeriod field indicates the maximum time in hundredths of seconds between transmission of Link Quality Reports (LQR). The peer may transmit packets at a faster rate than that which was negotiated.') pppLqmOutLQRs = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppLqmOutLQRs.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmOutLQRs.setDescription('Number of transmitted Link Quality Reports (LQR) on this link.') pppLqmOutPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppLqmOutPackets.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmOutPackets.setDescription('Number of transmitted Packets on this link.') pppLqmOutOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppLqmOutOctets.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmOutOctets.setDescription('Number of transmitted Octets on this link, including framing data.') pppLqmInLQRs = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppLqmInLQRs.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmInLQRs.setDescription('Number of Link Quality Reports (LQR) received on this link.') pppLqmInPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppLqmInPackets.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmInPackets.setDescription('Number of Packets reveived on this link.') pppLqmInOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppLqmInOctets.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmInOctets.setDescription('Number of Octets reveived on this link, including framing data.') pppLqmInDiscards = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppLqmInDiscards.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmInDiscards.setDescription('Number of Packets received on this link, but discarded.') pppLqmInErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppLqmInErrors.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmInErrors.setDescription('Number of errorneous Packets received on this link.') pppLqmPeerOutLQRs = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppLqmPeerOutLQRs.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmPeerOutLQRs.setDescription('Number of Link Quality Reports (LQR) transmitted by remote on this link.') pppLqmPeerOutPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppLqmPeerOutPackets.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmPeerOutPackets.setDescription('Number of Packets transmitted by remote on this link.') pppLqmPeerOutOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppLqmPeerOutOctets.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmPeerOutOctets.setDescription('Number of Octets transmitted by remote on this link, including framing data.') pppLqmPeerInLQRs = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppLqmPeerInLQRs.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmPeerInLQRs.setDescription('Number of Link Quality Reports (LQR) received by remote on this link.') pppLqmPeerInPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppLqmPeerInPackets.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmPeerInPackets.setDescription('Number of Packets reveived by remote on this link.') pppLqmPeerInOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 17), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppLqmPeerInOctets.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmPeerInOctets.setDescription('Number of Octets reveived by remote on this link, including framing data.') pppLqmPeerInDiscards = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 18), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppLqmPeerInDiscards.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmPeerInDiscards.setDescription('Number of Packets received by remote on this link, but discarded.') pppLqmPeerInErrors = MibScalar((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 19), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppLqmPeerInErrors.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmPeerInErrors.setDescription('Number of errorneous Packets received by remote on this link.') pppLqmLostOutLQRs = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 20), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppLqmLostOutLQRs.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmLostOutLQRs.setDescription('Number of lost Link Quality Reports (LQR) transmitted on this link.') pppLqmLostOutPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 21), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppLqmLostOutPackets.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmLostOutPackets.setDescription('Number of lost Packets transmitted on this link.') pppLqmLostOutOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 22), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppLqmLostOutOctets.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmLostOutOctets.setDescription('Number of lost Octets transmitted on this link.') pppLqmLostPeerOutLQRs = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 23), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppLqmLostPeerOutLQRs.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmLostPeerOutLQRs.setDescription('Number of lost Link Quality Reports (LQR) transmitted by remote on this link.') pppLqmLostPeerOutPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 24), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppLqmLostPeerOutPkts.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmLostPeerOutPkts.setDescription('Number of lost Packets transmitted by remote on this link.') pppLqmLostPeerOutOcts = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 25), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppLqmLostPeerOutOcts.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmLostPeerOutOcts.setDescription('Number of lost Octets transmitted by remote on this link.') biboPPPIpAssignTable = MibTable((1, 3, 6, 1, 4, 1, 272, 4, 3, 4), ) if mibBuilder.loadTexts: biboPPPIpAssignTable.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPIpAssignTable.setDescription("The biboPPPIpAssignTable contains IP addresses used when dynamically assigning IP addresses; i.e. when the biboPPPIpAddress field is set to `dynamic'. Creating entries: Entries are created by assigning a value (IP address) to the biboPPPIpAssignAddress object. Deleting entries: An entry (address) can be removed by assigning the value `delete' to its biboPPPIpAssignState.") biboPPPIpAssignEntry = MibTableRow((1, 3, 6, 1, 4, 1, 272, 4, 3, 4, 1), ).setIndexNames((0, "BIANCA-BRICK-PPP-MIB", "biboPPPIpAssignAddress")) if mibBuilder.loadTexts: biboPPPIpAssignEntry.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPIpAssignEntry.setDescription('Pool of IP addresses for dynamic IP address assignment via IPCP. See the biboPPPIpAddress field for further explanation.') biboPPPIpAssignAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 4, 1, 1), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPIpAssignAddress.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPIpAssignAddress.setDescription('First IP address of this range.') biboPPPIpAssignState = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 4, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("unused", 1), ("assigned", 2), ("delete", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPIpAssignState.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPIpAssignState.setDescription('If an entry is currently in use, the state is set to as- signed(1). Otherwise it is set to unused(2). You may also delete this entry by changing it to delete(3).') biboPPPIpAssignPoolId = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 4, 1, 3), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPIpAssignPoolId.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPIpAssignPoolId.setDescription('Pool ID value.') biboPPPIpAssignRange = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 4, 1, 4), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPIpAssignRange.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPIpAssignRange.setDescription('Number of IP addresses that will be assigned starting from biboPPPIpAssignAddress. A range of 0 will disable this entry') pppIpInUseTable = MibTable((1, 3, 6, 1, 4, 1, 272, 4, 3, 7), ) if mibBuilder.loadTexts: pppIpInUseTable.setStatus('mandatory') if mibBuilder.loadTexts: pppIpInUseTable.setDescription('The pppIpUseTable contains dynamically assigned IP addresses.') pppIpInUseEntry = MibTableRow((1, 3, 6, 1, 4, 1, 272, 4, 3, 7, 1), ).setIndexNames((0, "BIANCA-BRICK-PPP-MIB", "pppIpInUseAddress")) if mibBuilder.loadTexts: pppIpInUseEntry.setStatus('mandatory') if mibBuilder.loadTexts: pppIpInUseEntry.setDescription('') pppIpInUseAddress = MibScalar((1, 3, 6, 1, 4, 1, 272, 4, 3, 7, 1, 1), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppIpInUseAddress.setStatus('mandatory') if mibBuilder.loadTexts: pppIpInUseAddress.setDescription('assigned IP address') pppIpInUsePoolId = MibScalar((1, 3, 6, 1, 4, 1, 272, 4, 3, 7, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppIpInUsePoolId.setStatus('mandatory') if mibBuilder.loadTexts: pppIpInUsePoolId.setDescription('Unique IP address pool ID') pppIpInUseIfIndex = MibScalar((1, 3, 6, 1, 4, 1, 272, 4, 3, 7, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppIpInUseIfIndex.setStatus('mandatory') if mibBuilder.loadTexts: pppIpInUseIfIndex.setDescription('Unique interface index') pppIpInUseIdent = MibScalar((1, 3, 6, 1, 4, 1, 272, 4, 3, 7, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: pppIpInUseIdent.setStatus('mandatory') if mibBuilder.loadTexts: pppIpInUseIdent.setDescription('The remote authentication identification string.') pppIpInUseState = MibScalar((1, 3, 6, 1, 4, 1, 272, 4, 3, 7, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("assigned", 1), ("reserved", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: pppIpInUseState.setStatus('mandatory') if mibBuilder.loadTexts: pppIpInUseState.setDescription('If an IP address is currently assigned, the state of this entry is set to assigned(1). Otherwise, after disconnect, it is set to reserved(2) until the same peer reconnects or this entry expires (see pppIpInUseAge).') pppIpInUseAge = MibScalar((1, 3, 6, 1, 4, 1, 272, 4, 3, 7, 1, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: pppIpInUseAge.setStatus('mandatory') if mibBuilder.loadTexts: pppIpInUseAge.setDescription('This object specifies the age of the entry after creation or after changing into state reserved(2). After expiration the IP address (see pppIpInUseAddress) is no longer reserved for peer specified by pppIpInUseIdent and this entry will be deleted.') biboPPPProfileTable = MibTable((1, 3, 6, 1, 4, 1, 272, 4, 3, 5), ) if mibBuilder.loadTexts: biboPPPProfileTable.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPProfileTable.setDescription('The biboPPPProfileTable contains PPP default parameters used for PPP negotiation with unknown dialin partners. For PPP connections, PPP profiles are asigned to incoming connections via the isdnDispatchTable. Currently no entries can be created or deleted by user.') biboPPPProfileEntry = MibTableRow((1, 3, 6, 1, 4, 1, 272, 4, 3, 5, 1), ).setIndexNames((0, "BIANCA-BRICK-PPP-MIB", "biboPPPProfileName")) if mibBuilder.loadTexts: biboPPPProfileEntry.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPProfileEntry.setDescription('') biboPPPProfileName = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 5, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("profile-1", 1), ("profile-2", 2), ("profile-3", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: biboPPPProfileName.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPProfileName.setDescription('The name of the PPP profile. Three profiles are available.') biboPPPProfileAuthProtocol = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 5, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 6, 7, 8))).clone(namedValues=NamedValues(("none", 1), ("pap", 2), ("chap", 3), ("both", 4), ("ms-chap", 6), ("all", 7), ("ms-chapv2", 8)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPProfileAuthProtocol.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPProfileAuthProtocol.setDescription('The type of authentication used on the point-to-point link as described in RFC 1334. See biboPPPAuthentication for further details.') biboPPPProfileAuthRadius = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 5, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("none", 1), ("inband", 2), ("outband", 3), ("both", 4), ("radius-only", 5)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPProfileAuthRadius.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPProfileAuthRadius.setDescription('This entry is used to configure possible RADIUS authentication on incoming calls. The default value is inband(2), only inband RADIUS requests (PAP, CHAP) are sent to the defined RADIUS server. Outband requests (CALLERID) are sent in outband(3) mode. If set to both(3), both requests are sent. To disable RADIUS requests in the profile set this value to none(1). To disable authentication attempts via the local data base set this value to radius-only(5).') biboPPPProfileLQMonitoring = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 5, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("off", 1), ("on", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPProfileLQMonitoring.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPProfileLQMonitoring.setDescription('This parameter enables (2) or disables (1) PPP Link Quality Monitoring (LQM) according RFC 1989. When set to on(2) LQM is added to the list of parameters acknowledged in LCP negotiation. Link quality reports (LQR) will be generated and send periodically.') biboPPPProfilePPPoEDevIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 5, 1, 5), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPProfilePPPoEDevIfIndex.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPProfilePPPoEDevIfIndex.setDescription('Specifies the device to be used for PPP over Ethernet (PPPoE) according RFC 2516.') biboPPPProfileCallbackNegotiation = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 5, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("disabled", 1), ("enabled", 2), ("cbcp-optional", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboPPPProfileCallbackNegotiation.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPProfileCallbackNegotiation.setDescription("Specifies wether callback negotiation (LCP/CBCP) is allowed or not. If set to disabled(1), no callback negotiation will be performed or accepted. If set to enabled(2), PPP callback negotation will be accepted on demand. If this object is set to cbcp-optional(3), the CBCP option 'no callback' is also offered to the Windows client so that the user can decide wether he wants to be called back or not.") pppExtIfTable = MibTable((1, 3, 6, 1, 4, 1, 272, 4, 3, 9), ) if mibBuilder.loadTexts: pppExtIfTable.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfTable.setDescription("The pppExtIfTable contains extended configuration and information related to the PPP interfaces on the system. Entries are optional for each interface and can be added or deleted by the user. Deleting entries: Entries are removed by setting an entry's pppExtIfBodMode object to 'delete'.") pppExtIfEntry = MibTableRow((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1), ).setIndexNames((0, "BIANCA-BRICK-PPP-MIB", "pppExtIfIndex")) if mibBuilder.loadTexts: pppExtIfEntry.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfEntry.setDescription('') pppExtIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 1), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: pppExtIfIndex.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfIndex.setDescription('Correlating PPP interface index.') pppExtIfBodMode = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9))).clone(namedValues=NamedValues(("disabled", 1), ("backup", 2), ("bod-active", 3), ("bod-passive", 4), ("bap-active", 5), ("bap-passive", 6), ("delete", 7), ("bap-both", 8), ("bap-first", 9)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: pppExtIfBodMode.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfBodMode.setDescription('Enables bandwidth on demand (BOD) mode for leased line and dialup interfaces when setting to bod-active (3) respectively bod-passive (4) or backup only mode for leased line connections like X.21. When set to disabled (1), neither bandwidth on demand (as specified by the pppExtIfTable) or backup mode is enabled. Four modes (bap-active (5), bap-passive (6), bap-both(7) and bap-first (8)) are available for BAP (Bandwidth Allocation Protocol) support to specify wether BAP Call-Requests and BAP Callback-Requests should be initiated and/or accepted.') pppExtIfAlgorithm = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("equal", 1), ("proportional", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: pppExtIfAlgorithm.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfAlgorithm.setDescription('The algorithm to use for weighting line utilization. Line utilization is determined by calculating the average load for each interface. When set to equal (1) all samples taken over the time interval (defined in pppExtIfInterval) will be given equal weight, when set to proportional (2) the weighting disproportional to the age of the sample.') pppExtIfInterval = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(5, 300))).setMaxAccess("readwrite") if mibBuilder.loadTexts: pppExtIfInterval.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfInterval.setDescription('The time interval (in seconds) to use for sampling and calculating of the average throughput of the interface. See also: pppExtIfLoad.') pppExtIfLoad = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly") if mibBuilder.loadTexts: pppExtIfLoad.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfLoad.setDescription('The actual throughput (in percent) of the total bandwidth of this interface (load). This value is updated once every second.') pppExtIfMlpFragmentation = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("proportional", 1), ("equal", 2), ("interleave", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: pppExtIfMlpFragmentation.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfMlpFragmentation.setDescription('The multilink PPP fragmentation mode. When set to proportional (1) packets will be divided into fragments proportional to the transmission rate of each link, when set to equal (2) packets will be divided into multiple equal fragments (equal to MlpFragSize) such that the number sent on each link is proportional to the transmission rate. When set to interleave (3), large datagrams will be fragmentated (maximum size determined by MlpFragSize) to reduce transmission delay of high-priority traffic on slower links.') pppExtIfMlpFragSize = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(30, 1500))).setMaxAccess("readwrite") if mibBuilder.loadTexts: pppExtIfMlpFragSize.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfMlpFragSize.setDescription('The multilink PPP fragment size. If MlpFragmentation is set to proportional (1) this value specifies the minimum size of the fragment in bytes. If MlpFragmentation is set to equal (2) this value specifies the maximum fragment size in bytes.') pppExtIfPPPoEService = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 8), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 63))).setMaxAccess("readwrite") if mibBuilder.loadTexts: pppExtIfPPPoEService.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfPPPoEService.setDescription('The PPPoE (PPP over Ethernet, RFC 2516) service name which indicates the requested service during PPPoE discovery stage. Examples of the use of the service name are to indicate an ISP name or a class or a quality of service.') pppExtIfPPPoEAcServer = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 9), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 63))).setMaxAccess("readwrite") if mibBuilder.loadTexts: pppExtIfPPPoEAcServer.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfPPPoEAcServer.setDescription('The PPPoE (PPP over Ethernet, RFC 2516) AC-Server name which determines the access concentrator during PPPoE discovery stage.') pppExtIfEncKeyNegotiation = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("static", 1), ("authentication", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: pppExtIfEncKeyNegotiation.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfEncKeyNegotiation.setDescription("This variable defines the specification of shared secrets (encryption keys) between the sender and receiver of encrypted data. If set to static (1), the keys specified in 'pppExtIfEncTxKey' and 'pppExtIfEncRxKey' will be used, if set to authentication (2), the key derivation is based on PPP authentication via CHAP or MS-CHAP.") pppExtIfEncTxKey = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 11), OctetString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: pppExtIfEncTxKey.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfEncTxKey.setDescription("Static (encryption) key used for transmission of encrypted data via PPP. It's size depends on the used encryption algorithm and the corresponding key length, e.g. 'des_56' or 'blowfish_168'.") pppExtIfEncRxKey = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 12), OctetString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: pppExtIfEncRxKey.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfEncRxKey.setDescription("Static (decryption) key used for decryption of encrypted data received on PPP connections. It's size depends on the used encryption algorithm and the corresponding key length, e.g. 'des_56' or 'blowfish_168'.") pppExtIfGearUpThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 13), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readwrite") if mibBuilder.loadTexts: pppExtIfGearUpThreshold.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfGearUpThreshold.setDescription('Gear up threshold for invoking current bandwidth. The measured throughput (in percent of the total bandwidth) of this interface (see pppExtIfLoad) is compared with this value once per second. If exceeded longer than 5 seconds an additional B-channel will be requested.') pppExtIfGearDownThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 14), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readwrite") if mibBuilder.loadTexts: pppExtIfGearDownThreshold.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfGearDownThreshold.setDescription('Gear down threshold for decreasing current bandwidth. The expected throughput (in percent of the total bandwidth) of this interface (see pppExtIfLoad) after dropping a B-channel is compared with this threshold value once per second. If the needed bandwidth falls below this threshold longer than 10 seconds, exactly one B-channel will be dropped.') pppExtIfAodiDChanQlen = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 15), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: pppExtIfAodiDChanQlen.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfAodiDChanQlen.setDescription('Upper threshold for the amount of data (in octets) waiting to be sent across the 9.6Kbit/sec D-channel. If exceeded, additional bandwidth will be invoked at once.') pppExtIfAodiGearDownTxRate = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 16), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: pppExtIfAodiGearDownTxRate.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfAodiGearDownTxRate.setDescription('Lower threshold for the amount of data in bits per second to be sent across the 64Kbit/sec B-channel. If the measured throughput becomes smaller than this value over a period of pppExtIfGearDownPersistance seconds, the remaining B-channel will be dropped.') pppExtIfGearUpPersistance = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 17), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readwrite") if mibBuilder.loadTexts: pppExtIfGearUpPersistance.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfGearUpPersistance.setDescription('Gear up persistence interval for invoking current bandwidth. The measured throughput (in percent of the total bandwidth) of this interface (see pppExtIfLoad) is compared with the current value of the variable pppExtIfGearUpThreshold once per second. If exceeded longer than pppExtIfGearUpPersistance seconds an additional B-channel will be requested.') pppExtIfGearDownPersistance = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 18), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readwrite") if mibBuilder.loadTexts: pppExtIfGearDownPersistance.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfGearDownPersistance.setDescription('Gear down persistence interval for decreasing current bandwidth. The measured throughput (in percent of the total bandwidth) of this interface (see pppExtIfLoad) is compared with the current value of pppExtIfGearDownThreshold once per second. If exceeded longer than pppExtIfGearDownPersistance seconds, exactly one B-channel will be dropped.') pppExtIfL1Speed = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 19), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: pppExtIfL1Speed.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfL1Speed.setDescription("This object contains the interface's nominal bandwidth in bits per second. Please note that this parameter may not represent the real available transmission rate. The current purpose is only informational for example for PPTP or PPPoE interfaces where no accurate information from the underlaying network is available.") pppExtIfCurrentRetryTime = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 20), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 36000))).setMaxAccess("readwrite") if mibBuilder.loadTexts: pppExtIfCurrentRetryTime.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfCurrentRetryTime.setDescription('Current time in seconds to wait before retrying a call when the smart retry algorithm is implemented.') pppExtIfMaxRetryTime = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 21), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 36000))).setMaxAccess("readwrite") if mibBuilder.loadTexts: pppExtIfMaxRetryTime.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfMaxRetryTime.setDescription('Maximum time in seconds to wait before retrying a call when the smart retry algorithm is implemented. When set to zero this algorithm is disabled.') pppExtIfMtu = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 22), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 8192))).setMaxAccess("readwrite") if mibBuilder.loadTexts: pppExtIfMtu.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfMtu.setDescription('Determines size of the largest datagram which can be sent on the interface, specified in octets (see ifMtu). When set to zero (default), the value of the variable ifMtu depends on the received LCP MRU/MRRU option.') pppExtIfMru = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 23), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 8192))).setMaxAccess("readwrite") if mibBuilder.loadTexts: pppExtIfMru.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfMru.setDescription('The maximum length for the PPP information field, including padding, but not including the protocol field, is termed the Maximum Receive Unit (MRU).') pppExtIfAuthMutual = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 24), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("disabled", 1), ("enabled", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: pppExtIfAuthMutual.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfAuthMutual.setDescription('This object enables mutual PPP authentication between the peers.') biboDialTable = MibTable((1, 3, 6, 1, 4, 1, 272, 4, 4, 1), ) if mibBuilder.loadTexts: biboDialTable.setStatus('mandatory') if mibBuilder.loadTexts: biboDialTable.setDescription("The biboDialTable contains configuration information for incoming and outgoing ISDN telephone numbers. Creating entries: Entries are created by assigning a value to the biboDialIfIndex object. Deleting entries: An entry can be removed by assigning the value `delete' to its biboDialType object.") biboDialEntry = MibTableRow((1, 3, 6, 1, 4, 1, 272, 4, 4, 1, 1), ).setIndexNames((0, "BIANCA-BRICK-PPP-MIB", "biboDialIfIndex")) if mibBuilder.loadTexts: biboDialEntry.setStatus('mandatory') if mibBuilder.loadTexts: biboDialEntry.setDescription('') biboDialIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 4, 1, 1, 1), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboDialIfIndex.setStatus('mandatory') if mibBuilder.loadTexts: biboDialIfIndex.setDescription('The correlating PPP interface index.') biboDialType = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 4, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8))).clone(namedValues=NamedValues(("isdn", 1), ("isdn-spv", 2), ("delete", 3), ("ppp-callback", 4), ("ppp-negotiated", 5), ("x25-dialout", 6), ("ip", 7), ("x25", 8)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboDialType.setStatus('mandatory') if mibBuilder.loadTexts: biboDialType.setDescription('The dialup type can be set to plain isdn(1), isdn-spv(2) semi-permanent links used by the German 1TR6 D-channel protocol, or to delete(3) to delete a biboDialTable entry. The types ppp-callback(4) and ppp-negotiated(5) are used for the LCP callback option.') biboDialDirection = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 4, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("incoming", 1), ("outgoing", 2), ("both", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboDialDirection.setStatus('mandatory') if mibBuilder.loadTexts: biboDialDirection.setDescription('The allowed dial direction is either incoming(1), outgoing(2), or both(3) calls. No call is ever set up when set to incoming(1). Incoming calls will not be identified when set to outoing(2). Furthermore, once PPP authentication succeeds and there is at least one incoming number defined but for which none matches, the call will not be accepted for security reasons.') biboDialNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 4, 1, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 63))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboDialNumber.setStatus('mandatory') if mibBuilder.loadTexts: biboDialNumber.setDescription("The defined dialing number. Used for either dialing or comparing to incoming calls or both, depending on the content of the biboDialDirection field. The wildcards '*', '?', '[', ']', '{', '}' may be used.") biboDialSubaddress = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 4, 1, 1, 5), OctetString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboDialSubaddress.setStatus('mandatory') if mibBuilder.loadTexts: biboDialSubaddress.setDescription('The defined dial subaddress, if any. Also, see the biboDialNumber field.') biboDialClosedUserGroup = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 4, 1, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 9999))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboDialClosedUserGroup.setStatus('mandatory') if mibBuilder.loadTexts: biboDialClosedUserGroup.setDescription('The defined closed user group, if any. Also, see the biboDialNumber field.') biboDialStkMask = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 4, 1, 1, 7), BitValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboDialStkMask.setStatus('mandatory') if mibBuilder.loadTexts: biboDialStkMask.setDescription('The defined stack mask. Each value of IsdnStkNumber represents a bit in this bitmask. A mask of 0 disables dialup completely, while a mask of -1 enables dialup on all available ISDN stacks.') biboDialScreening = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 4, 1, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("user", 1), ("user-verified", 2), ("user-failed", 3), ("network", 4), ("dont-care", 5)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboDialScreening.setStatus('mandatory') if mibBuilder.loadTexts: biboDialScreening.setDescription("The screening indicator of the biboDialNumber. The biboDialScreening field can be used to gauge the `trustworthiness' of the biboDialNumber field. (See isdnCallScreening) Indicators are ordered from highest to lowest as follows: indicator: CPN assigned: verification: `network' by network none `user-verified' by user verification successful `user' by user none `user-failed' by user verification failed Set this field to `dont-care' to accept all calls. Otherwise calls are accepted only if the screening indicator matches or is higher than the set value.") biboDialCallingSubaddress = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 4, 1, 1, 9), OctetString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboDialCallingSubaddress.setStatus('mandatory') if mibBuilder.loadTexts: biboDialCallingSubaddress.setDescription('The defined calling dial subaddress, if any. Also, see the biboDialNumber field.') biboDialTypeOfCallingSubAdd = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 4, 1, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("nsap", 1), ("user-specified", 2), ("reserved", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboDialTypeOfCallingSubAdd.setStatus('mandatory') if mibBuilder.loadTexts: biboDialTypeOfCallingSubAdd.setDescription('The type of calling party subaddress.') biboDialTypeOfCalledSubAdd = MibTableColumn((1, 3, 6, 1, 4, 1, 272, 4, 4, 1, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("nsap", 1), ("user-specified", 2), ("reserved", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: biboDialTypeOfCalledSubAdd.setStatus('mandatory') if mibBuilder.loadTexts: biboDialTypeOfCalledSubAdd.setDescription('The type of called party subaddress.') mibBuilder.exportSymbols("BIANCA-BRICK-PPP-MIB", pppExtIfAodiDChanQlen=pppExtIfAodiDChanQlen, biboDialTable=biboDialTable, pppSessionDNS1=pppSessionDNS1, biboPPPLinkTable=biboPPPLinkTable, pppLqmLostOutOctets=pppLqmLostOutOctets, biboPPPIpAssignPoolId=biboPPPIpAssignPoolId, bintec=bintec, pppSessionLocIpAddr=pppSessionLocIpAddr, biboPPPConnIfIndex=biboPPPConnIfIndex, biboPPPConnIncomingCalls=biboPPPConnIncomingCalls, biboPPPLinkEntry=biboPPPLinkEntry, biboPPPIfIndex=biboPPPIfIndex, biboPPPMinConn=biboPPPMinConn, pppLqmPeerInLQRs=pppLqmPeerInLQRs, pppLqmLostOutLQRs=pppLqmLostOutLQRs, pppSessionCompression=pppSessionCompression, pppExtIfLoad=pppExtIfLoad, biboPPPLinkKeepalivePending=biboPPPLinkKeepalivePending, biboPPPVJHeaderComp=biboPPPVJHeaderComp, biboPPPProfileCallbackNegotiation=biboPPPProfileCallbackNegotiation, dialmap=dialmap, biboPPPTotalIncomingCalls=biboPPPTotalIncomingCalls, biboDialCallingSubaddress=biboDialCallingSubaddress, biboPPPConnOutgoingFails=biboPPPConnOutgoingFails, biboPPPEncapsulation=biboPPPEncapsulation, biboDialNumber=biboDialNumber, biboPPPLinkKeepaliveSent=biboPPPLinkKeepaliveSent, biboPPPRetryTime=biboPPPRetryTime, dod=dod, pppLqmPeerInOctets=pppLqmPeerInOctets, pppExtIfPPPoEService=pppExtIfPPPoEService, biboPPPConnReceivedOctets=biboPPPConnReceivedOctets, biboPPPMaxRetries=biboPPPMaxRetries, biboPPPLinkState=biboPPPLinkState, biboPPPTotalTransmitOctets=biboPPPTotalTransmitOctets, biboPPPLinkIfIndex=biboPPPLinkIfIndex, pppLqmOutLQRs=pppLqmOutLQRs, pppLqmPeerInErrors=pppLqmPeerInErrors, pppIpInUseTable=pppIpInUseTable, biboPPPType=biboPPPType, pppLqmInOctets=pppLqmInOctets, pppSessionEntry=pppSessionEntry, pppIpInUseIfIndex=pppIpInUseIfIndex, biboPPPCallback=biboPPPCallback, biboPPPProfileAuthRadius=biboPPPProfileAuthRadius, biboDialScreening=biboDialScreening, pppSessionRemIpAddr=pppSessionRemIpAddr, ppp=ppp, biboPPPTotalCharge=biboPPPTotalCharge, biboPPPConnOutgoingCalls=biboPPPConnOutgoingCalls, biboPPPLinkLqm=biboPPPLinkLqm, biboPPPLinkCallType=biboPPPLinkCallType, biboPPPStatEntry=biboPPPStatEntry, private=private, pppSessionCbcpMode=pppSessionCbcpMode, biboDialDirection=biboDialDirection, biboPPPProfileAuthProtocol=biboPPPProfileAuthProtocol, pppLqmEntry=pppLqmEntry, pppExtIfEncTxKey=pppExtIfEncTxKey, biboPPPLinkCallReference=biboPPPLinkCallReference, biboPPPProfileEntry=biboPPPProfileEntry, biboPPPIpAddress=biboPPPIpAddress, biboPPPLinkLocDiscr=biboPPPLinkLocDiscr, pppSessionVJHeaderComp=pppSessionVJHeaderComp, pppExtIfTable=pppExtIfTable, pppExtIfGearUpThreshold=pppExtIfGearUpThreshold, biboPPPLinkLcpComp=biboPPPLinkLcpComp, biboPPPIpAssignEntry=biboPPPIpAssignEntry, internet=internet, pppIpInUseState=pppIpInUseState, biboPPPMaxConn=biboPPPMaxConn, pppLqmLostPeerOutOcts=pppLqmLostPeerOutOcts, pppLqmInErrors=pppLqmInErrors, biboPPPTotalUnits=biboPPPTotalUnits, pppExtIfAodiGearDownTxRate=pppExtIfAodiGearDownTxRate, pppExtIfAlgorithm=pppExtIfAlgorithm, pppLqmInPackets=pppLqmInPackets, pppLqmPeerOutLQRs=pppLqmPeerOutLQRs, biboPPPTotalReceivedOctets=biboPPPTotalReceivedOctets, biboPPPLocalIdent=biboPPPLocalIdent, biboPPPSessionTimeout=biboPPPSessionTimeout, pppSessionMlp=pppSessionMlp, biboPPPLinkCharge=biboPPPLinkCharge, pppSessionIfIndex=pppSessionIfIndex, biboPPPLinkSpeed=biboPPPLinkSpeed, pppLqmPeerOutOctets=pppLqmPeerOutOctets, biboPPPStatTable=biboPPPStatTable, pppSessionLcpCallback=pppSessionLcpCallback, pppLqmInDiscards=pppLqmInDiscards, pppLqmLostPeerOutLQRs=pppLqmLostPeerOutLQRs, pppIpInUseAge=pppIpInUseAge, pppExtIfAuthMutual=pppExtIfAuthMutual, biboDialStkMask=biboDialStkMask, biboPPPIpAssignRange=biboPPPIpAssignRange, pppLqmReportingPeriod=pppLqmReportingPeriod, pppExtIfIndex=pppExtIfIndex, pppExtIfBodMode=pppExtIfBodMode, pppLqmIfIndex=pppLqmIfIndex, biboDialClosedUserGroup=biboDialClosedUserGroup, biboPPPLayer2Mode=biboPPPLayer2Mode, pppSessionWINS2=pppSessionWINS2, biboPPPLinkRetries=biboPPPLinkRetries, biboPPPConnActive=biboPPPConnActive, enterprises=enterprises, pppExtIfEncKeyNegotiation=pppExtIfEncKeyNegotiation, pppLqmCallReference=pppLqmCallReference, pppExtIfEntry=pppExtIfEntry, pppExtIfMlpFragmentation=pppExtIfMlpFragmentation, pppExtIfMlpFragSize=pppExtIfMlpFragSize, pppLqmPeerInDiscards=pppLqmPeerInDiscards, biboPPPConnCharge=biboPPPConnCharge, pppLqmLostOutPackets=pppLqmLostOutPackets, pppLqmPeerInPackets=pppLqmPeerInPackets, pppLqmOutOctets=pppLqmOutOctets, pppIpInUsePoolId=pppIpInUsePoolId, biboPPPConnUnits=biboPPPConnUnits, biboDialIfIndex=biboDialIfIndex, pppExtIfGearDownPersistance=pppExtIfGearDownPersistance, biboPPPConnDuration=biboPPPConnDuration, pppLqmOutPackets=pppLqmOutPackets, pppSessionIpxcpNodeNumber=pppSessionIpxcpNodeNumber, biboPPPEntry=biboPPPEntry, pppLqmPeerOutPackets=pppLqmPeerOutPackets, biboPPPAuthentication=biboPPPAuthentication, biboPPPIdleTime=biboPPPIdleTime, pppExtIfGearUpPersistance=pppExtIfGearUpPersistance, pppExtIfEncRxKey=pppExtIfEncRxKey, biboPPPLinkEstablished=biboPPPLinkEstablished, pppExtIfMru=pppExtIfMru, biboPPPEncryption=biboPPPEncryption, pppSessionDNS2=pppSessionDNS2, bibo=bibo, biboPPPLinkAccm=biboPPPLinkAccm, biboPPPProfilePPPoEDevIfIndex=biboPPPProfilePPPoEDevIfIndex, biboPPPIpAssignTable=biboPPPIpAssignTable, pppSessionBacpFavoredPeer=pppSessionBacpFavoredPeer, biboPPPConnProtocols=biboPPPConnProtocols, Date=Date, biboPPPTotalDuration=biboPPPTotalDuration, pppSessionMru=pppSessionMru, biboPPPLinkProtocols=biboPPPLinkProtocols, biboPPPTable=biboPPPTable, biboPPPInitConn=biboPPPInitConn, biboPPPDynShortHold=biboPPPDynShortHold, pppLqmInLQRs=pppLqmInLQRs, pppExtIfL1Speed=pppExtIfL1Speed, pppSessionCbcpDelay=pppSessionCbcpDelay, pppIpInUseEntry=pppIpInUseEntry, biboPPPConnState=biboPPPConnState, biboPPPTotalOutgoingFails=biboPPPTotalOutgoingFails, biboPPPLinkDirection=biboPPPLinkDirection, biboPPPIpAssignAddress=biboPPPIpAssignAddress, biboPPPKeepalive=biboPPPKeepalive, biboPPPLinkUnits=biboPPPLinkUnits, biboPPPTotalOutgoingCalls=biboPPPTotalOutgoingCalls, biboPPPCompressionMode=biboPPPCompressionMode, pppExtIfCurrentRetryTime=pppExtIfCurrentRetryTime, biboPPPThroughput=biboPPPThroughput, biboPPPCompression=biboPPPCompression, pppExtIfGearDownThreshold=pppExtIfGearDownThreshold, biboPPPProfileName=biboPPPProfileName, BitValue=BitValue, biboPPPLinkDeviceIndex=biboPPPLinkDeviceIndex, biboPPPLoginString=biboPPPLoginString, biboPPPConnTransmitOctets=biboPPPConnTransmitOctets, biboPPPIpPoolId=biboPPPIpPoolId, biboPPPTimeout=biboPPPTimeout, biboPPPAuthIdent=biboPPPAuthIdent, biboDialEntry=biboDialEntry, biboPPPLQMonitoring=biboPPPLQMonitoring, biboDialSubaddress=biboDialSubaddress, pppExtIfMaxRetryTime=pppExtIfMaxRetryTime, biboDialTypeOfCalledSubAdd=biboDialTypeOfCalledSubAdd, biboDialTypeOfCallingSubAdd=biboDialTypeOfCallingSubAdd, biboPPPDNSNegotiation=biboPPPDNSNegotiation, pppIpInUseIdent=pppIpInUseIdent, pppSessionEncryption=pppSessionEncryption, biboPPPShortHold=biboPPPShortHold, biboPPPConnIncomingFails=biboPPPConnIncomingFails, pppLqmTable=pppLqmTable, biboPPPChargeInterval=biboPPPChargeInterval, biboPPPLinkStkNumber=biboPPPLinkStkNumber, biboPPPLayer1Protocol=biboPPPLayer1Protocol, biboPPPAuthSecret=biboPPPAuthSecret, pppIpInUseAddress=pppIpInUseAddress, pppExtIfMtu=pppExtIfMtu, pppExtIfInterval=pppExtIfInterval, biboPPPProfileLQMonitoring=biboPPPProfileLQMonitoring, pppExtIfPPPoEAcServer=pppExtIfPPPoEAcServer, pppSessionAuthProt=pppSessionAuthProt, biboPPPLinkRemDiscr=biboPPPLinkRemDiscr, org=org, pppLqmLostPeerOutPkts=pppLqmLostPeerOutPkts, pppSessionWINS1=pppSessionWINS1, pppSessionTable=pppSessionTable, biboPPPIpAssignState=biboPPPIpAssignState, biboDialType=biboDialType, biboPPPProfileTable=biboPPPProfileTable, biboPPPTotalIncomingFails=biboPPPTotalIncomingFails, biboPPPBlockTime=biboPPPBlockTime)
(object_identifier, octet_string, integer) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'OctetString', 'Integer') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (single_value_constraint, constraints_union, constraints_intersection, value_range_constraint, value_size_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'SingleValueConstraint', 'ConstraintsUnion', 'ConstraintsIntersection', 'ValueRangeConstraint', 'ValueSizeConstraint') (notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance') (gauge32, mib_identifier, iso, object_identity, unsigned32, module_identity, integer32, notification_type, bits, mib_scalar, mib_table, mib_table_row, mib_table_column, counter64, ip_address, time_ticks, counter32) = mibBuilder.importSymbols('SNMPv2-SMI', 'Gauge32', 'MibIdentifier', 'iso', 'ObjectIdentity', 'Unsigned32', 'ModuleIdentity', 'Integer32', 'NotificationType', 'Bits', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Counter64', 'IpAddress', 'TimeTicks', 'Counter32') (textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString') org = mib_identifier((1, 3)) dod = mib_identifier((1, 3, 6)) internet = mib_identifier((1, 3, 6, 1)) private = mib_identifier((1, 3, 6, 1, 4)) enterprises = mib_identifier((1, 3, 6, 1, 4, 1)) bintec = mib_identifier((1, 3, 6, 1, 4, 1, 272)) bibo = mib_identifier((1, 3, 6, 1, 4, 1, 272, 4)) ppp = mib_identifier((1, 3, 6, 1, 4, 1, 272, 4, 3)) dialmap = mib_identifier((1, 3, 6, 1, 4, 1, 272, 4, 4)) class Bitvalue(Integer32): pass class Date(Integer32): pass bibo_ppp_table = mib_table((1, 3, 6, 1, 4, 1, 272, 4, 3, 1)) if mibBuilder.loadTexts: biboPPPTable.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPTable.setDescription("The biboPPPTable contains configuration information for the PPP interfaces. Each time a new entry is made here, a corresponding entry is made in the ifTable. Creating entries: Entries are created by assigning a value to the biboPPPType object. Deleting entries: Entries are removed by setting an entry's biboPPPEncapsulation object to 'delete'.") bibo_ppp_entry = mib_table_row((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1)).setIndexNames((0, 'BIANCA-BRICK-PPP-MIB', 'biboPPPType')) if mibBuilder.loadTexts: biboPPPEntry.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPEntry.setDescription('') bibo_ppp_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: biboPPPIfIndex.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPIfIndex.setDescription('Correlating PPP interface index. This value is assigned automatically by the system.') bibo_ppp_type = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 5))).clone(namedValues=named_values(('isdn-dialup', 1), ('leased', 2), ('isdn-dialin-only', 3), ('multiuser', 5)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: biboPPPType.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPType.setDescription("The type of link. A new dialup link is created when this field is set to the value isdn-dialup(1), dialin-only(3) or multiuser(5). The maximum number of dialup links is limited by system memory. Each dialup link should have at least one corresponding entry in the biboDialTable to configure the remote ISDN telephone number(s). A leased line link, can not be created by setting this field to leased(2), but is automatically established when the IsdnChType field is set to either 'leased-dte' or 'leased-dce' (which doesn't make a difference for PPP, but must be set correctly for other encapsulation methods). Naturally, when the IsdnChType field is set to any other value, the biboPPPTable entry is removed. In both cases, a new entry in the biboPPPTable creates corre- corresponding entries in the ifTable (a new interface) and in the biboPPPStatTable (PPP statistics). Setting this object to multiuser(5), up to biboPPPMaxConn matching incoming connections (see biboPPPAuthentication, biboPPPAuthSecret, biboPPPAuthIdent) from different dialin partners will be accepted.") bibo_ppp_encapsulation = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17))).clone(namedValues=named_values(('ppp', 1), ('x25', 2), ('x25-ppp', 3), ('ip-lapb', 4), ('delete', 5), ('ip-hdlc', 6), ('mpr-lapb', 7), ('mpr-hdlc', 8), ('frame-relay', 9), ('x31-bchan', 10), ('x75-ppp', 11), ('x75btx-ppp', 12), ('x25-nosig', 13), ('x25-ppp-opt', 14), ('x25-pad', 15), ('x25-noconfig', 16), ('x25-noconfig-nosig', 17)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: biboPPPEncapsulation.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPEncapsulation.setDescription("The layer 2 encapsulation of the link. The use of ppp(1) as described in RFC 1661 is the preferred encapsulation for point-to-point links. The encapsulation is set to x25(2) for X.25-only links and to x25-ppp(3) for concurrent use of X.25 and PPP. Mpr-lapb(7) and mpr-hdlc(8) are popular proprietary encapsulations. They both use the ethertype number for protocol multiplexing. The former is used when error correction or data compression (v42bis) is desired. The latter (mpr-hdlc) is compatible to Cisco's HDLC encapsulation. On IP-only links it is also possible to use the ISO LAPB protocol (ip-lapb(4)), also known as X.75, or raw hdlc framing (ip-hdlc(6)). The x75-ppp encapsulation provides a proprietary solution for using PPP encapsulation over X.75 (LAPB) framing, x75btx-ppp provides PPP over T.70 and LAPB framing including a BTX protocol header to access BTX services over ISDN links. The x25-nosig(13) encapsulation is used to establish X.25 connections over dialup links without specific signalling on the D-channel (pure data call). The x25-ppp-opt encapsulation provides a special kind of the x25-ppp encapsulation. Dialin partner will be authenticated either outband to establish an X.25 connection via ISDN or optional inband by using the point-to-point protocol (PPP). Concurrent use of X.25 and PPP encapsulation is excluded. The x25-noconfig(16) and x25-noconfig-nosig(17) encapsulations provide a solution fr establishing X.25 connections via ISDN. The dial number will be derived from X.25 destination address by using special rules. V42bis data compression can be enabled on LAPB links only, because v42bis requires an error free connection. Dialup links can be removed by setting this field to delete(5). This has no effect on permanent links.") bibo_ppp_keepalive = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('on', 1), ('off', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: biboPPPKeepalive.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPKeepalive.setDescription('When set to on(1), keepalive packets are sent in regular intervals during the connection. Keepalive packets can not be sent using the ip-lapb or x25 encapsulation.') bibo_ppp_timeout = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(500, 10000))).setMaxAccess('readwrite') if mibBuilder.loadTexts: biboPPPTimeout.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPTimeout.setDescription('The number of milliseconds waiting before retransmitting a PPP configure packet.') bibo_ppp_compression = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('none', 1), ('v42bis', 2), ('stac', 3), ('ms-stac', 4), ('mppc', 5)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: biboPPPCompression.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPCompression.setDescription('The throughput can be enhanced up to factor three using the V42bis compression method or the Stac LZS compression algorithm. V42bis is currently supported with the ip-lapb and mpr-lapb encapsulation. Stac LZS compression algorithm is provided using PPP encapsulated links, stac(3) indicates support of Sequence checking, ms-stac(4) indicates support of Extended mode which is prefered by Microsoft. Both check modes are implemented according RFC 1974. When set to mppc(5), the Microsoft Point-to-Point Compression (MPPC) Protocol according RFC 2118 is negotiated. MPPC uses an LZ based algorithm with a sliding window history buffer.') bibo_ppp_authentication = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8))).clone(namedValues=named_values(('none', 1), ('pap', 2), ('chap', 3), ('both', 4), ('radius', 5), ('ms-chap', 6), ('all', 7), ('ms-chapv2', 8)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: biboPPPAuthentication.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPAuthentication.setDescription("The type of authentication used on the point-to-point link as described in RFC 1334. The authentication protocol supports pap(2) (Password Authentication Protocol), chap(3) (Challenge Handshake Authentication Protocol), or both(4). When set to both(4), the link must be successfully authenticated by either CHAP or PAP. The type ms-chap(6) and ms-chapv2(8) are Microsofts proprietary CHAP authentication procedures (using MD4 and DES encryption instead of MD5 encryption algorithm), all(7) includes PAP, CHAP and MS-CHAP. Another way to authenticate dial-in users is by using RADIUS (remote authentication dial in user service). Users can authenticate themselves either using PAP or CHAP (excluding MS-CHAP). In general the system creates PPP interfaces with this authentication itself, but it's also possible to take advance of the RADIUS dial-in services with pre-configured interfaces. See biboAdmRadiusServer for further details.") bibo_ppp_auth_ident = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 8), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readwrite') if mibBuilder.loadTexts: biboPPPAuthIdent.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPAuthIdent.setDescription("The remote authentication identification string. The local authentication identification string is taken from the contents of the sysName field, up to the appearance of the first dot (e.g., the remote name would be `brick' if the content of the sysName field was `brick.bintec.de').") bibo_ppp_auth_secret = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 9), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readwrite') if mibBuilder.loadTexts: biboPPPAuthSecret.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPAuthSecret.setDescription('The authentication secret, which is used symmetrically for both local and remote sides of the PPP link.') bibo_ppp_ip_address = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('static', 1), ('dynamic-server', 2), ('dynamic-client', 3)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: biboPPPIpAddress.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPIpAddress.setDescription('The IP control protocol as described in RFC1332 has a means of negotiating IP-addresses. When this option is set to dynamic-server(2), an available IP-address found in biboPPPIpAddrTable is assigned as the remote IP-address and a temporary route is created during the uptime of the interface. When set to dynamic-client(3), the remote system is asked to tell us our own IP-address. A host route will be created during the uptime of the interface. In most cases this option will be set automatically by the network address translation option. In static(1) mode, address-negotiation is not forced.') bibo_ppp_retry_time = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 11), integer32().subtype(subtypeSpec=value_range_constraint(0, 3600))).setMaxAccess('readwrite') if mibBuilder.loadTexts: biboPPPRetryTime.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPRetryTime.setDescription('Time in seconds to wait before retrying a call; currently not used.') bibo_ppp_block_time = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 12), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: biboPPPBlockTime.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPBlockTime.setDescription('Time in seconds to wait after a connection failure (e.g. the number of biboPPPMaxRetries calls failed). When set to zero, the interface state is never set to blocked.') bibo_ppp_max_retries = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 13), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readwrite') if mibBuilder.loadTexts: biboPPPMaxRetries.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPMaxRetries.setDescription('The number of dialup retries before changing to the blocked state.') bibo_ppp_short_hold = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 14), integer32().subtype(subtypeSpec=value_range_constraint(-1, 3600))).setMaxAccess('readwrite') if mibBuilder.loadTexts: biboPPPShortHold.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPShortHold.setDescription('The time in seconds to wait, once the channel is silent, (that is, no data is being received or transmitted) before terminating the link. When set to zero the short hold mode is disabled, when set to -1 the short hold mode is disabled and the link will be reconnected when connection was lost.') bibo_ppp_init_conn = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 15), integer32().subtype(subtypeSpec=value_range_constraint(1, 250))).setMaxAccess('readwrite') if mibBuilder.loadTexts: biboPPPInitConn.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPInitConn.setDescription(' The number of channels to initially set up for this interface.') bibo_ppp_max_conn = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 16), integer32().subtype(subtypeSpec=value_range_constraint(0, 250))).setMaxAccess('readwrite') if mibBuilder.loadTexts: biboPPPMaxConn.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPMaxConn.setDescription('The maximum number of channels bundled for this interface.') bibo_ppp_min_conn = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 17), integer32().subtype(subtypeSpec=value_range_constraint(0, 250))).setMaxAccess('readwrite') if mibBuilder.loadTexts: biboPPPMinConn.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPMinConn.setDescription('The minimum number of channels bundled for this interface.') bibo_ppp_callback = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 18), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2), ('expected', 3), ('ppp-offered', 4), ('delayed', 5), ('ppp-callback-optional', 6)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: biboPPPCallback.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPCallback.setDescription("If this object is enabled(1), and the call is recognized by the dialed number then calls are never accepted, and a callback is forced for incoming calls at once. The callback can be delayed for biboPPPRetryTime seconds by setting this entry to delayed(5). If the call is recognized by inband authentication (PAP or CHAP) then the actual connection is closed and a callback is performed at once. Setting this value to ppp-offered(4) allows a called peer to call back the calling site if offered by PPP negotiation. For PABX dialout a dialprefix is added to the number, if offered by the calling site (see isdnStkTable). If this object is set to expected(3), only one initial outgoing call is made expecting a callback. If this object is set to ppp-callback-optional(6), the CBCP option 'no callback' is also offered to the Windows client so that the user can decide wether he wants to be called back or not.") bibo_ppp_layer1_protocol = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 19), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23))).clone(namedValues=named_values(('data-64k', 1), ('data-56k', 2), ('modem', 3), ('dovb', 4), ('v110-1200', 5), ('v110-2400', 6), ('v110-4800', 7), ('v110-9600', 8), ('v110-14400', 9), ('v110-19200', 10), ('v110-38400', 11), ('modem-profile-1', 12), ('modem-profile-2', 13), ('modem-profile-3', 14), ('modem-profile-4', 15), ('modem-profile-5', 16), ('modem-profile-6', 17), ('modem-profile-7', 18), ('modem-profile-8', 19), ('pptp-pns', 20), ('pppoe', 21), ('aodi', 22), ('pptp-pac', 23)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: biboPPPLayer1Protocol.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLayer1Protocol.setDescription('This entry is used to select the layer 1 protocol settings for this partner. Normally the correct entry is hdlc-64.') bibo_ppp_login_string = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 20), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readwrite') if mibBuilder.loadTexts: biboPPPLoginString.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLoginString.setDescription('A textual string containing a login sequence (script) composed of fields in the format [expect send], comparable to chat scripts commonly used on other sytems. This script is required i.e. to establish an asynchronus PPP dialup connection to CompuServe.') bibo_pppvj_header_comp = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 21), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: biboPPPVJHeaderComp.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPVJHeaderComp.setDescription('This entry is used to enable Van Jacobsen TCP/IP header compression, which reduces the size of TCP/IP packet headers and increases the efficiency of line utilization.') bibo_ppp_layer2_mode = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 22), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('auto', 1), ('dte', 2), ('dce', 3)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: biboPPPLayer2Mode.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLayer2Mode.setDescription('This object specifies the layer 2 mode to be used for a connection. It is only relevant, if the Encapsulation involves an LAPB protocol. This is the case for x25, x25-ppp, ip-lapb, lapb, x31-bchan, x75-ppp, x75btx-ppp, x25-nosig. The Default value of this object is auto. For dialup connection, the layer 2 mode will than be DTE, on the calling side and DCE on the called side. For permanent connections, the layer 2 mode is set at lower layers (for example isdnChType in the isdnChTable). When this object is set to dte or dce, the layer 2 mode will always be DTE or DCE, regardless of the call direction or the settings at the lower layer.') bibo_ppp_dyn_short_hold = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 23), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readwrite') if mibBuilder.loadTexts: biboPPPDynShortHold.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPDynShortHold.setDescription("Optimizes idle time disconnects depending on the charging information received during the connection. This value specifies the minimum inactivity time (channel is silent) in percents of the current charging interval length and is only used for outgoing connections. Incoming connections are disconnected after idle time according to the value biboPPPShortHold. Please note that this only works if your ISDN port has the AOCD service enabled (advice of charging during the call). For instance in Germany this is an extra paid service. (Even the 'Komfortanschluss' does only include AOCE [advice of charge at the end of the call], so AOCD has to be ordered and paid extra.)") bibo_ppp_local_ident = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 24), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readwrite') if mibBuilder.loadTexts: biboPPPLocalIdent.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLocalIdent.setDescription('This is the local identification string used for PPP authentication(PAP/CHAP). If this entry is empty the variable biboAdmLocalPPPIdent will be used.') bibo_pppdns_negotiation = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 25), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('disabled', 1), ('enabled', 2), ('dynamic-client', 3), ('dynamic-server', 4)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: biboPPPDNSNegotiation.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPDNSNegotiation.setDescription('The IP control protocol extensions as described in RFC 1877 has a means of negotiating primary and secondary Domain Name System (DNS) server addresses. When this option is disabled(1), no DNS negotiation will be performed. If enabled(2), DNS negotiation behavier depends on biboPPPIpAddress switch (client or server mode). Setting to dynamic-client(3), the remote system is asked to tell us the IP-address(es) of primary and/or secondary DNS. Setting to dynamic_server(4), primary and/or secondary DNS IP-address(es) found in biboAdmNameServer or biboAdmNameServ2, if asked, will be send to remote.') bibo_ppp_encryption = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 26), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11))).clone(namedValues=named_values(('none', 1), ('mppe-40', 2), ('mppe-128', 3), ('des-56', 4), ('triple-des-168', 5), ('blowfish-168', 6), ('mppe-56', 7), ('mppev2-40', 8), ('mppev2-56', 9), ('mppev2-128', 10), ('blowfish-56', 11)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: biboPPPEncryption.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPEncryption.setDescription("This field specifies the data encryption scheme for en(de)crypting PPP encapsulated multi-protocol datagrams. Setting to mppe-40(2), mppe-128(3) or mppe-56(7) the Microsoft Point to Point Encryption Protocol (MPPE) will be enabled, using a 40 bit, 128 bit respectively 56 bit session key for initializing encryption tables. Setting to mppev2-40(8), mppev2-56(9) or mppev2-128(10) the Microsoft Point to Point Encryption Protocol (MPPE) 'stateless mode' will be enabled, using a 40 bit, 56 bit respectively 128 bit session key.") bibo_ppplq_monitoring = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 27), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('off', 1), ('on', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: biboPPPLQMonitoring.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLQMonitoring.setDescription('This parameter enables (2) or disables (1) PPP Link Quality Monitoring (LQM) according RFC 1989. When set to on(2) LQM is added to the list of parameters used in LCP negotiation. If LQM is acknowledged by peer link quality reports will be generated and send periodically.') bibo_ppp_ip_pool_id = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 28), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: biboPPPIpPoolId.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPIpPoolId.setDescription('Pool ID value to select an IP address pool for dynamic IP address assignment via IPCP. See also PPPIpAssignTable for further details.') bibo_ppp_session_timeout = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 1, 1, 29), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: biboPPPSessionTimeout.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPSessionTimeout.setDescription('Maximum number of seconds before termination the established PPP session, regardless there is any data throughput on the corresponding link(s). When set to 0, there no limit for the duration of the PPP session.') bibo_ppp_stat_table = mib_table((1, 3, 6, 1, 4, 1, 272, 4, 3, 2)) if mibBuilder.loadTexts: biboPPPStatTable.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPStatTable.setDescription('The biboPPPStatTable contains statistical connection- specific information. Only the system can add or delete entries to this table. Creating entries: Entries are created by the system each time a new PPP interface is created in the biboPPPTable. Deleting entries: Entries are removed by the system when the corresponding PPP interface is removed.') bibo_ppp_stat_entry = mib_table_row((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1)).setIndexNames((0, 'BIANCA-BRICK-PPP-MIB', 'biboPPPConnIfIndex')) if mibBuilder.loadTexts: biboPPPStatEntry.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPStatEntry.setDescription('') bibo_ppp_conn_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: biboPPPConnIfIndex.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPConnIfIndex.setDescription('Correlating PPP interface index.') bibo_ppp_conn_active = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 250))).setMaxAccess('readonly') if mibBuilder.loadTexts: biboPPPConnActive.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPConnActive.setDescription('The actual number of bundled channels.') bibo_ppp_conn_protocols = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 3), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: biboPPPConnProtocols.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPConnProtocols.setDescription('The bitwise ORed protocols successfully negotiated on this connection; currently the following protocols are supported: tcp/ip(1), ipx(2), bridge(4), bpdu(8), x25(16). These protocol values are most likely to change in future software releases.') bibo_ppp_conn_state = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6))).clone(namedValues=named_values(('idle', 1), ('incoming', 2), ('outgoing', 3), ('connected', 4), ('dataxfer', 5), ('disconnect', 6)))).setMaxAccess('readonly') if mibBuilder.loadTexts: biboPPPConnState.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPConnState.setDescription('The physical state of the link. This field is obsolete and will not be supported in a future release.') bibo_ppp_conn_duration = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 5), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: biboPPPConnDuration.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPConnDuration.setDescription('The current link duration on this interface in seconds.') bibo_ppp_conn_units = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 6), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: biboPPPConnUnits.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPConnUnits.setDescription('The current costs on this interface for all member links.') bibo_ppp_conn_transmit_octets = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 7), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: biboPPPConnTransmitOctets.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPConnTransmitOctets.setDescription("The octets transmitted on this interface since its last change to the 'up' state.") bibo_ppp_conn_received_octets = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 8), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: biboPPPConnReceivedOctets.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPConnReceivedOctets.setDescription("The octets received since its last change to the `up' state.") bibo_ppp_conn_outgoing_calls = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 9), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: biboPPPConnOutgoingCalls.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPConnOutgoingCalls.setDescription("The number of outgoing calls on this interface since its last change to the 'up' state.") bibo_ppp_conn_outgoing_fails = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 10), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: biboPPPConnOutgoingFails.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPConnOutgoingFails.setDescription("The number of outgoing call failures on this interface since its last change to the 'up' state.") bibo_ppp_conn_incoming_calls = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 11), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: biboPPPConnIncomingCalls.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPConnIncomingCalls.setDescription('The number of incoming calls on this interface since its last change to the up state.') bibo_ppp_conn_incoming_fails = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 12), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: biboPPPConnIncomingFails.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPConnIncomingFails.setDescription('The number of incoming call failures on this interface since its last change to the up state.') bibo_ppp_total_duration = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 13), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: biboPPPTotalDuration.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPTotalDuration.setDescription('The total link duration in seconds.') bibo_ppp_total_units = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 14), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: biboPPPTotalUnits.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPTotalUnits.setDescription('The total costs on this interface for all member links.') bibo_ppp_total_transmit_octets = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 15), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: biboPPPTotalTransmitOctets.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPTotalTransmitOctets.setDescription('The total amount of octets transmitted.') bibo_ppp_total_received_octets = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 16), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: biboPPPTotalReceivedOctets.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPTotalReceivedOctets.setDescription('The total amount of octets received.') bibo_ppp_total_outgoing_calls = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 17), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: biboPPPTotalOutgoingCalls.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPTotalOutgoingCalls.setDescription('The total number of outgoing calls.') bibo_ppp_total_outgoing_fails = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 18), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: biboPPPTotalOutgoingFails.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPTotalOutgoingFails.setDescription('The total number of outgoing call failures.') bibo_ppp_total_incoming_calls = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 19), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: biboPPPTotalIncomingCalls.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPTotalIncomingCalls.setDescription('The total number of incoming calls.') bibo_ppp_total_incoming_fails = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 20), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: biboPPPTotalIncomingFails.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPTotalIncomingFails.setDescription('The total number of incoming call failures.') bibo_ppp_throughput = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 21), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: biboPPPThroughput.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPThroughput.setDescription('The actual thoughput of the interface; updated every 5 seconds.') bibo_ppp_compression_mode = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 22), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('inactive', 1), ('active', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: biboPPPCompressionMode.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPCompressionMode.setDescription('This object describes wether data compression is active for this interface. 42bis or Stac LZS compression algorithm can be enabled in the biboPPPTable.') bibo_ppp_charge_interval = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 23), integer32().subtype(subtypeSpec=value_range_constraint(0, 3600))).setMaxAccess('readonly') if mibBuilder.loadTexts: biboPPPChargeInterval.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPChargeInterval.setDescription('Describes the measured interval between charging info elements received from the ISDN network.') bibo_ppp_idle_time = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 24), integer32().subtype(subtypeSpec=value_range_constraint(0, 3600))).setMaxAccess('readonly') if mibBuilder.loadTexts: biboPPPIdleTime.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPIdleTime.setDescription('The currently measured connection inactivity time (channel is silent).') bibo_ppp_conn_charge = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 25), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: biboPPPConnCharge.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPConnCharge.setDescription('The current charge on this interface as 1/1000 of the respective currency.') bibo_ppp_total_charge = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 2, 1, 26), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: biboPPPTotalCharge.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPTotalCharge.setDescription('The total charge on this interface as 1/1000 of the respective currency.') ppp_session_table = mib_table((1, 3, 6, 1, 4, 1, 272, 4, 3, 10)) if mibBuilder.loadTexts: pppSessionTable.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionTable.setDescription('The pppSessionTable contains statistical information for the PPP protocol. Only the system can add or delete entries to this table. Creating entries: Entries are created by the system each time a new PPP connection is created. Deleting entries: Entries are removed by the system when the corresponding PPP connection is terminated.') ppp_session_entry = mib_table_row((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1)).setIndexNames((0, 'BIANCA-BRICK-PPP-MIB', 'pppSessionIfIndex')) if mibBuilder.loadTexts: pppSessionEntry.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionEntry.setDescription('') ppp_session_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: pppSessionIfIndex.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionIfIndex.setDescription('Correlating PPP interface index.') ppp_session_mlp = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('none', 1), ('negotiated', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: pppSessionMlp.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionMlp.setDescription('Indicates negotiation of Multilink PPP.') ppp_session_mru = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 3), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: pppSessionMru.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionMru.setDescription("Peer's MRU/MRRU LCP option.") ppp_session_lcp_callback = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('none', 1), ('lcp', 2), ('cbcp', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: pppSessionLcpCallback.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionLcpCallback.setDescription('Callback option inside LCP negotiation.') ppp_session_auth_prot = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('none', 1), ('pap', 2), ('chap', 3), ('ms-chapv1', 4), ('ms-chapv2', 5)))).setMaxAccess('readonly') if mibBuilder.loadTexts: pppSessionAuthProt.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionAuthProt.setDescription('The negotiated PPP authentication protocol.') ppp_session_compression = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('none', 1), ('stac', 2), ('ms-stac', 3), ('mppc', 4)))).setMaxAccess('readonly') if mibBuilder.loadTexts: pppSessionCompression.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionCompression.setDescription('The negotiated CCP compression mode.') ppp_session_encryption = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11))).clone(namedValues=named_values(('none', 1), ('mppe-40', 2), ('mppe-128', 3), ('des-56', 4), ('triple-des-168', 5), ('blowfish-168', 6), ('mppe-56', 7), ('mppev2-40', 8), ('mppev2-56', 9), ('mppev2-128', 10), ('blowfish-56', 11)))).setMaxAccess('readonly') if mibBuilder.loadTexts: pppSessionEncryption.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionEncryption.setDescription('The negotiated CCP encryption mode.') ppp_session_cbcp_mode = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('none', 1), ('no-callback', 2), ('user-specified', 3), ('pre-specified', 4)))).setMaxAccess('readonly') if mibBuilder.loadTexts: pppSessionCbcpMode.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionCbcpMode.setDescription('The negotiated Callback Control Protocol (CBCP) mode.') ppp_session_cbcp_delay = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 9), integer32().subtype(subtypeSpec=value_range_constraint(0, 60))).setMaxAccess('readonly') if mibBuilder.loadTexts: pppSessionCbcpDelay.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionCbcpDelay.setDescription('The negotiated (CBCP) callback delay in seconds.') ppp_session_loc_ip_addr = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 10), ip_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: pppSessionLocIpAddr.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionLocIpAddr.setDescription('The negotiated local IP Address.') ppp_session_rem_ip_addr = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 11), ip_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: pppSessionRemIpAddr.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionRemIpAddr.setDescription('The negotiated remote IP Address.') ppp_session_dns1 = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 12), ip_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: pppSessionDNS1.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionDNS1.setDescription('The negotiated first name server IP address.') ppp_session_dns2 = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 13), ip_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: pppSessionDNS2.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionDNS2.setDescription('The negotiated second name server IP address.') ppp_session_wins1 = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 14), ip_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: pppSessionWINS1.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionWINS1.setDescription('The negotiated first NetBIOS name server (WINS) IP address.') ppp_session_wins2 = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 15), ip_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: pppSessionWINS2.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionWINS2.setDescription('The negotiated second NetBIOS name server (WINS) IP address.') ppp_session_vj_header_comp = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 16), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('none', 1), ('negotiated', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: pppSessionVJHeaderComp.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionVJHeaderComp.setDescription('The negotiation of Van Jacobsen TCP/IP header compression option (IPCP).') ppp_session_ipxcp_node_number = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 17), octet_string().subtype(subtypeSpec=value_size_constraint(6, 6)).setFixedLength(6)).setMaxAccess('readonly') if mibBuilder.loadTexts: pppSessionIpxcpNodeNumber.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionIpxcpNodeNumber.setDescription('Unique IPX Node Id dynamically assigned the client.') ppp_session_bacp_favored_peer = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 10, 1, 18), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('none', 1), ('local', 2), ('remote', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: pppSessionBacpFavoredPeer.setStatus('mandatory') if mibBuilder.loadTexts: pppSessionBacpFavoredPeer.setDescription('The result of the BACP Favored-Peer negotiation.') bibo_ppp_link_table = mib_table((1, 3, 6, 1, 4, 1, 272, 4, 3, 3)) if mibBuilder.loadTexts: biboPPPLinkTable.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkTable.setDescription('The biboPPPLinkTable contains statistical information for each current PPP link on the system. Only the system can add or delete entries to this table. Creating entries: Entries are created by the system each time a new PPP interface is created in the biboPPPTable. Deleting entries: Entries are removed by the system when the corresponding PPP interface is removed.') bibo_ppp_link_entry = mib_table_row((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1)).setIndexNames((0, 'BIANCA-BRICK-PPP-MIB', 'biboPPPLinkIfIndex')) if mibBuilder.loadTexts: biboPPPLinkEntry.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkEntry.setDescription('') bibo_ppp_link_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: biboPPPLinkIfIndex.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkIfIndex.setDescription('Correlating PPP interface index.') bibo_ppp_link_established = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 2), date()).setMaxAccess('readonly') if mibBuilder.loadTexts: biboPPPLinkEstablished.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkEstablished.setDescription('Time when the link was established.') bibo_ppp_link_direction = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('incoming-dce', 1), ('outgoing-dte', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: biboPPPLinkDirection.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkDirection.setDescription('Direction of link, incoming(1) or outgoing(2). In case of permanent links, the meaning is dce(1) or dte(2).') bibo_ppp_link_protocols = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 4), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: biboPPPLinkProtocols.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkProtocols.setDescription('The bitwise ORed protocols successfully negotiated on this link; currently the following protocols are supported: tcp/ip(1), ipx(2), bridge(4), bpdu(8), x25(16). These protocol values are most likely to change in future software releases.') bibo_ppp_link_state = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6))).clone(namedValues=named_values(('up', 1), ('down', 2), ('starting', 3), ('loopbacked', 4), ('dialing', 5), ('retry-wait', 6)))).setMaxAccess('readonly') if mibBuilder.loadTexts: biboPPPLinkState.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkState.setDescription('The actual state of each link in a bundle. The link is fully operational in the up(1) state, and not operational in the down(2) state. The starting(3) state is an inter- mediate state when the link is physically established but PPP or other link negotation has not finished yet. The loopbacked(4) state is entered when the PPP keepalive mechanism detects a loopbacked link. The dialing(5) state shows that a dialup link is in its link establishment phase, dialing. If there is no answer to the call, the link enters the retry-wait(6) state for biboPPPRetryTime seconds. After waiting that time either a call retry will occur, or the ifOperStatus will enter the blocked state, depending on the amount of retries already done (biboPPPLinkRetries) and the value of the biboPPPMaxRetries field.') bibo_ppp_link_units = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 6), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: biboPPPLinkUnits.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkUnits.setDescription('The costs for this link in units.') bibo_ppp_link_retries = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 7), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: biboPPPLinkRetries.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkRetries.setDescription('The amount of retries taken to establish the link.') bibo_ppp_link_keepalive_sent = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 8), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: biboPPPLinkKeepaliveSent.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkKeepaliveSent.setDescription('The amount of keepalive packets sent on the link.') bibo_ppp_link_keepalive_pending = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 9), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: biboPPPLinkKeepalivePending.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkKeepalivePending.setDescription('The amount of keepalive answer packets waiting for since the last occurance of an echo reply packet.') bibo_ppp_link_device_index = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 10), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: biboPPPLinkDeviceIndex.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkDeviceIndex.setDescription('The underlying link device index.') bibo_ppp_link_speed = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 11), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: biboPPPLinkSpeed.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkSpeed.setDescription('The speed of the link.') bibo_ppp_link_stk_number = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 13), integer32().subtype(subtypeSpec=value_range_constraint(0, 31))).setMaxAccess('readonly') if mibBuilder.loadTexts: biboPPPLinkStkNumber.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkStkNumber.setDescription('The stack number of the dialup link, correlating to the isdnStkNumber field in the isdnCallTable.') bibo_ppp_link_call_type = mib_scalar((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 14), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('incoming', 1), ('outgoing', 2), ('undef', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: biboPPPLinkCallType.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkCallType.setDescription('The call type of the dialup link, correlating to the isdnCallType field in the isdnCallTable.') bibo_ppp_link_call_reference = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 15), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: biboPPPLinkCallReference.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkCallReference.setDescription('The call reference of the dialup link, correlating to the isdnCallReference field in the isdnCallTable.') bibo_ppp_link_charge = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 16), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: biboPPPLinkCharge.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkCharge.setDescription('The costs for this link as 1/1000 of the respective currency.') bibo_ppp_link_accm = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 17), octet_string().subtype(subtypeSpec=value_size_constraint(4, 4)).setFixedLength(4)).setMaxAccess('readonly') if mibBuilder.loadTexts: biboPPPLinkAccm.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkAccm.setDescription('.') bibo_ppp_link_lqm = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 18), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('none', 1), ('negotiated', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: biboPPPLinkLqm.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkLqm.setDescription('Indicates the successful negotiation of the Link Quality Protocol (LQM).') bibo_ppp_link_lcp_comp = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 19), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('none', 1), ('addr', 2), ('prot', 3), ('both', 4)))).setMaxAccess('readonly') if mibBuilder.loadTexts: biboPPPLinkLcpComp.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkLcpComp.setDescription('Address- and Protocol-Field compression.') bibo_ppp_link_loc_discr = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 20), octet_string().subtype(subtypeSpec=value_size_constraint(6, 6)).setFixedLength(6)).setMaxAccess('readonly') if mibBuilder.loadTexts: biboPPPLinkLocDiscr.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkLocDiscr.setDescription('Local LCP multilink endpoint discriminator.') bibo_ppp_link_rem_discr = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 3, 1, 21), octet_string().subtype(subtypeSpec=value_size_constraint(6, 6)).setFixedLength(6)).setMaxAccess('readonly') if mibBuilder.loadTexts: biboPPPLinkRemDiscr.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPLinkRemDiscr.setDescription("Peer's LCP multilink endpoint discriminator.") ppp_lqm_table = mib_table((1, 3, 6, 1, 4, 1, 272, 4, 3, 6)) if mibBuilder.loadTexts: pppLqmTable.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmTable.setDescription('The pppLqmTable contains statistical information for each current PPP link on the system. Only the system can add or delete entries to this table. Creating entries: Entries are created by the system each time a new PPP link was established and LQM negotiated successful. Deleting entries: Entries are removed by the system when the corresponding PPP link is disconnected.') ppp_lqm_entry = mib_table_row((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1)).setIndexNames((0, 'BIANCA-BRICK-PPP-MIB', 'pppLqmIfIndex')) if mibBuilder.loadTexts: pppLqmEntry.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmEntry.setDescription('') ppp_lqm_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: pppLqmIfIndex.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmIfIndex.setDescription('Correlating PPP interface index.') ppp_lqm_call_reference = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: pppLqmCallReference.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmCallReference.setDescription('The call reference of the dialup link, correlating to the isdnCallReference field in the isdnCallTable.') ppp_lqm_reporting_period = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 3), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: pppLqmReportingPeriod.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmReportingPeriod.setDescription('The LQMReportingPeriod field indicates the maximum time in hundredths of seconds between transmission of Link Quality Reports (LQR). The peer may transmit packets at a faster rate than that which was negotiated.') ppp_lqm_out_lq_rs = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 4), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: pppLqmOutLQRs.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmOutLQRs.setDescription('Number of transmitted Link Quality Reports (LQR) on this link.') ppp_lqm_out_packets = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 5), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: pppLqmOutPackets.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmOutPackets.setDescription('Number of transmitted Packets on this link.') ppp_lqm_out_octets = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 6), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: pppLqmOutOctets.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmOutOctets.setDescription('Number of transmitted Octets on this link, including framing data.') ppp_lqm_in_lq_rs = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 7), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: pppLqmInLQRs.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmInLQRs.setDescription('Number of Link Quality Reports (LQR) received on this link.') ppp_lqm_in_packets = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 8), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: pppLqmInPackets.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmInPackets.setDescription('Number of Packets reveived on this link.') ppp_lqm_in_octets = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 9), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: pppLqmInOctets.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmInOctets.setDescription('Number of Octets reveived on this link, including framing data.') ppp_lqm_in_discards = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 10), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: pppLqmInDiscards.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmInDiscards.setDescription('Number of Packets received on this link, but discarded.') ppp_lqm_in_errors = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 11), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: pppLqmInErrors.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmInErrors.setDescription('Number of errorneous Packets received on this link.') ppp_lqm_peer_out_lq_rs = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 12), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: pppLqmPeerOutLQRs.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmPeerOutLQRs.setDescription('Number of Link Quality Reports (LQR) transmitted by remote on this link.') ppp_lqm_peer_out_packets = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 13), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: pppLqmPeerOutPackets.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmPeerOutPackets.setDescription('Number of Packets transmitted by remote on this link.') ppp_lqm_peer_out_octets = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 14), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: pppLqmPeerOutOctets.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmPeerOutOctets.setDescription('Number of Octets transmitted by remote on this link, including framing data.') ppp_lqm_peer_in_lq_rs = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 15), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: pppLqmPeerInLQRs.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmPeerInLQRs.setDescription('Number of Link Quality Reports (LQR) received by remote on this link.') ppp_lqm_peer_in_packets = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 16), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: pppLqmPeerInPackets.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmPeerInPackets.setDescription('Number of Packets reveived by remote on this link.') ppp_lqm_peer_in_octets = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 17), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: pppLqmPeerInOctets.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmPeerInOctets.setDescription('Number of Octets reveived by remote on this link, including framing data.') ppp_lqm_peer_in_discards = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 18), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: pppLqmPeerInDiscards.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmPeerInDiscards.setDescription('Number of Packets received by remote on this link, but discarded.') ppp_lqm_peer_in_errors = mib_scalar((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 19), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: pppLqmPeerInErrors.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmPeerInErrors.setDescription('Number of errorneous Packets received by remote on this link.') ppp_lqm_lost_out_lq_rs = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 20), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: pppLqmLostOutLQRs.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmLostOutLQRs.setDescription('Number of lost Link Quality Reports (LQR) transmitted on this link.') ppp_lqm_lost_out_packets = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 21), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: pppLqmLostOutPackets.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmLostOutPackets.setDescription('Number of lost Packets transmitted on this link.') ppp_lqm_lost_out_octets = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 22), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: pppLqmLostOutOctets.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmLostOutOctets.setDescription('Number of lost Octets transmitted on this link.') ppp_lqm_lost_peer_out_lq_rs = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 23), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: pppLqmLostPeerOutLQRs.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmLostPeerOutLQRs.setDescription('Number of lost Link Quality Reports (LQR) transmitted by remote on this link.') ppp_lqm_lost_peer_out_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 24), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: pppLqmLostPeerOutPkts.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmLostPeerOutPkts.setDescription('Number of lost Packets transmitted by remote on this link.') ppp_lqm_lost_peer_out_octs = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 6, 1, 25), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: pppLqmLostPeerOutOcts.setStatus('mandatory') if mibBuilder.loadTexts: pppLqmLostPeerOutOcts.setDescription('Number of lost Octets transmitted by remote on this link.') bibo_ppp_ip_assign_table = mib_table((1, 3, 6, 1, 4, 1, 272, 4, 3, 4)) if mibBuilder.loadTexts: biboPPPIpAssignTable.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPIpAssignTable.setDescription("The biboPPPIpAssignTable contains IP addresses used when dynamically assigning IP addresses; i.e. when the biboPPPIpAddress field is set to `dynamic'. Creating entries: Entries are created by assigning a value (IP address) to the biboPPPIpAssignAddress object. Deleting entries: An entry (address) can be removed by assigning the value `delete' to its biboPPPIpAssignState.") bibo_ppp_ip_assign_entry = mib_table_row((1, 3, 6, 1, 4, 1, 272, 4, 3, 4, 1)).setIndexNames((0, 'BIANCA-BRICK-PPP-MIB', 'biboPPPIpAssignAddress')) if mibBuilder.loadTexts: biboPPPIpAssignEntry.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPIpAssignEntry.setDescription('Pool of IP addresses for dynamic IP address assignment via IPCP. See the biboPPPIpAddress field for further explanation.') bibo_ppp_ip_assign_address = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 4, 1, 1), ip_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: biboPPPIpAssignAddress.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPIpAssignAddress.setDescription('First IP address of this range.') bibo_ppp_ip_assign_state = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 4, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('unused', 1), ('assigned', 2), ('delete', 3)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: biboPPPIpAssignState.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPIpAssignState.setDescription('If an entry is currently in use, the state is set to as- signed(1). Otherwise it is set to unused(2). You may also delete this entry by changing it to delete(3).') bibo_ppp_ip_assign_pool_id = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 4, 1, 3), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: biboPPPIpAssignPoolId.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPIpAssignPoolId.setDescription('Pool ID value.') bibo_ppp_ip_assign_range = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 4, 1, 4), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: biboPPPIpAssignRange.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPIpAssignRange.setDescription('Number of IP addresses that will be assigned starting from biboPPPIpAssignAddress. A range of 0 will disable this entry') ppp_ip_in_use_table = mib_table((1, 3, 6, 1, 4, 1, 272, 4, 3, 7)) if mibBuilder.loadTexts: pppIpInUseTable.setStatus('mandatory') if mibBuilder.loadTexts: pppIpInUseTable.setDescription('The pppIpUseTable contains dynamically assigned IP addresses.') ppp_ip_in_use_entry = mib_table_row((1, 3, 6, 1, 4, 1, 272, 4, 3, 7, 1)).setIndexNames((0, 'BIANCA-BRICK-PPP-MIB', 'pppIpInUseAddress')) if mibBuilder.loadTexts: pppIpInUseEntry.setStatus('mandatory') if mibBuilder.loadTexts: pppIpInUseEntry.setDescription('') ppp_ip_in_use_address = mib_scalar((1, 3, 6, 1, 4, 1, 272, 4, 3, 7, 1, 1), ip_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: pppIpInUseAddress.setStatus('mandatory') if mibBuilder.loadTexts: pppIpInUseAddress.setDescription('assigned IP address') ppp_ip_in_use_pool_id = mib_scalar((1, 3, 6, 1, 4, 1, 272, 4, 3, 7, 1, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: pppIpInUsePoolId.setStatus('mandatory') if mibBuilder.loadTexts: pppIpInUsePoolId.setDescription('Unique IP address pool ID') ppp_ip_in_use_if_index = mib_scalar((1, 3, 6, 1, 4, 1, 272, 4, 3, 7, 1, 3), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: pppIpInUseIfIndex.setStatus('mandatory') if mibBuilder.loadTexts: pppIpInUseIfIndex.setDescription('Unique interface index') ppp_ip_in_use_ident = mib_scalar((1, 3, 6, 1, 4, 1, 272, 4, 3, 7, 1, 4), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: pppIpInUseIdent.setStatus('mandatory') if mibBuilder.loadTexts: pppIpInUseIdent.setDescription('The remote authentication identification string.') ppp_ip_in_use_state = mib_scalar((1, 3, 6, 1, 4, 1, 272, 4, 3, 7, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('assigned', 1), ('reserved', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: pppIpInUseState.setStatus('mandatory') if mibBuilder.loadTexts: pppIpInUseState.setDescription('If an IP address is currently assigned, the state of this entry is set to assigned(1). Otherwise, after disconnect, it is set to reserved(2) until the same peer reconnects or this entry expires (see pppIpInUseAge).') ppp_ip_in_use_age = mib_scalar((1, 3, 6, 1, 4, 1, 272, 4, 3, 7, 1, 6), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: pppIpInUseAge.setStatus('mandatory') if mibBuilder.loadTexts: pppIpInUseAge.setDescription('This object specifies the age of the entry after creation or after changing into state reserved(2). After expiration the IP address (see pppIpInUseAddress) is no longer reserved for peer specified by pppIpInUseIdent and this entry will be deleted.') bibo_ppp_profile_table = mib_table((1, 3, 6, 1, 4, 1, 272, 4, 3, 5)) if mibBuilder.loadTexts: biboPPPProfileTable.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPProfileTable.setDescription('The biboPPPProfileTable contains PPP default parameters used for PPP negotiation with unknown dialin partners. For PPP connections, PPP profiles are asigned to incoming connections via the isdnDispatchTable. Currently no entries can be created or deleted by user.') bibo_ppp_profile_entry = mib_table_row((1, 3, 6, 1, 4, 1, 272, 4, 3, 5, 1)).setIndexNames((0, 'BIANCA-BRICK-PPP-MIB', 'biboPPPProfileName')) if mibBuilder.loadTexts: biboPPPProfileEntry.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPProfileEntry.setDescription('') bibo_ppp_profile_name = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 5, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('profile-1', 1), ('profile-2', 2), ('profile-3', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: biboPPPProfileName.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPProfileName.setDescription('The name of the PPP profile. Three profiles are available.') bibo_ppp_profile_auth_protocol = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 5, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 6, 7, 8))).clone(namedValues=named_values(('none', 1), ('pap', 2), ('chap', 3), ('both', 4), ('ms-chap', 6), ('all', 7), ('ms-chapv2', 8)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: biboPPPProfileAuthProtocol.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPProfileAuthProtocol.setDescription('The type of authentication used on the point-to-point link as described in RFC 1334. See biboPPPAuthentication for further details.') bibo_ppp_profile_auth_radius = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 5, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('none', 1), ('inband', 2), ('outband', 3), ('both', 4), ('radius-only', 5)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: biboPPPProfileAuthRadius.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPProfileAuthRadius.setDescription('This entry is used to configure possible RADIUS authentication on incoming calls. The default value is inband(2), only inband RADIUS requests (PAP, CHAP) are sent to the defined RADIUS server. Outband requests (CALLERID) are sent in outband(3) mode. If set to both(3), both requests are sent. To disable RADIUS requests in the profile set this value to none(1). To disable authentication attempts via the local data base set this value to radius-only(5).') bibo_ppp_profile_lq_monitoring = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 5, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('off', 1), ('on', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: biboPPPProfileLQMonitoring.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPProfileLQMonitoring.setDescription('This parameter enables (2) or disables (1) PPP Link Quality Monitoring (LQM) according RFC 1989. When set to on(2) LQM is added to the list of parameters acknowledged in LCP negotiation. Link quality reports (LQR) will be generated and send periodically.') bibo_ppp_profile_pp_po_e_dev_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 5, 1, 5), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: biboPPPProfilePPPoEDevIfIndex.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPProfilePPPoEDevIfIndex.setDescription('Specifies the device to be used for PPP over Ethernet (PPPoE) according RFC 2516.') bibo_ppp_profile_callback_negotiation = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 5, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('disabled', 1), ('enabled', 2), ('cbcp-optional', 3)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: biboPPPProfileCallbackNegotiation.setStatus('mandatory') if mibBuilder.loadTexts: biboPPPProfileCallbackNegotiation.setDescription("Specifies wether callback negotiation (LCP/CBCP) is allowed or not. If set to disabled(1), no callback negotiation will be performed or accepted. If set to enabled(2), PPP callback negotation will be accepted on demand. If this object is set to cbcp-optional(3), the CBCP option 'no callback' is also offered to the Windows client so that the user can decide wether he wants to be called back or not.") ppp_ext_if_table = mib_table((1, 3, 6, 1, 4, 1, 272, 4, 3, 9)) if mibBuilder.loadTexts: pppExtIfTable.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfTable.setDescription("The pppExtIfTable contains extended configuration and information related to the PPP interfaces on the system. Entries are optional for each interface and can be added or deleted by the user. Deleting entries: Entries are removed by setting an entry's pppExtIfBodMode object to 'delete'.") ppp_ext_if_entry = mib_table_row((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1)).setIndexNames((0, 'BIANCA-BRICK-PPP-MIB', 'pppExtIfIndex')) if mibBuilder.loadTexts: pppExtIfEntry.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfEntry.setDescription('') ppp_ext_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 1), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: pppExtIfIndex.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfIndex.setDescription('Correlating PPP interface index.') ppp_ext_if_bod_mode = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9))).clone(namedValues=named_values(('disabled', 1), ('backup', 2), ('bod-active', 3), ('bod-passive', 4), ('bap-active', 5), ('bap-passive', 6), ('delete', 7), ('bap-both', 8), ('bap-first', 9)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: pppExtIfBodMode.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfBodMode.setDescription('Enables bandwidth on demand (BOD) mode for leased line and dialup interfaces when setting to bod-active (3) respectively bod-passive (4) or backup only mode for leased line connections like X.21. When set to disabled (1), neither bandwidth on demand (as specified by the pppExtIfTable) or backup mode is enabled. Four modes (bap-active (5), bap-passive (6), bap-both(7) and bap-first (8)) are available for BAP (Bandwidth Allocation Protocol) support to specify wether BAP Call-Requests and BAP Callback-Requests should be initiated and/or accepted.') ppp_ext_if_algorithm = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('equal', 1), ('proportional', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: pppExtIfAlgorithm.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfAlgorithm.setDescription('The algorithm to use for weighting line utilization. Line utilization is determined by calculating the average load for each interface. When set to equal (1) all samples taken over the time interval (defined in pppExtIfInterval) will be given equal weight, when set to proportional (2) the weighting disproportional to the age of the sample.') ppp_ext_if_interval = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(5, 300))).setMaxAccess('readwrite') if mibBuilder.loadTexts: pppExtIfInterval.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfInterval.setDescription('The time interval (in seconds) to use for sampling and calculating of the average throughput of the interface. See also: pppExtIfLoad.') ppp_ext_if_load = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly') if mibBuilder.loadTexts: pppExtIfLoad.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfLoad.setDescription('The actual throughput (in percent) of the total bandwidth of this interface (load). This value is updated once every second.') ppp_ext_if_mlp_fragmentation = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('proportional', 1), ('equal', 2), ('interleave', 3)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: pppExtIfMlpFragmentation.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfMlpFragmentation.setDescription('The multilink PPP fragmentation mode. When set to proportional (1) packets will be divided into fragments proportional to the transmission rate of each link, when set to equal (2) packets will be divided into multiple equal fragments (equal to MlpFragSize) such that the number sent on each link is proportional to the transmission rate. When set to interleave (3), large datagrams will be fragmentated (maximum size determined by MlpFragSize) to reduce transmission delay of high-priority traffic on slower links.') ppp_ext_if_mlp_frag_size = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 7), integer32().subtype(subtypeSpec=value_range_constraint(30, 1500))).setMaxAccess('readwrite') if mibBuilder.loadTexts: pppExtIfMlpFragSize.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfMlpFragSize.setDescription('The multilink PPP fragment size. If MlpFragmentation is set to proportional (1) this value specifies the minimum size of the fragment in bytes. If MlpFragmentation is set to equal (2) this value specifies the maximum fragment size in bytes.') ppp_ext_if_pp_po_e_service = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 8), display_string().subtype(subtypeSpec=value_size_constraint(0, 63))).setMaxAccess('readwrite') if mibBuilder.loadTexts: pppExtIfPPPoEService.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfPPPoEService.setDescription('The PPPoE (PPP over Ethernet, RFC 2516) service name which indicates the requested service during PPPoE discovery stage. Examples of the use of the service name are to indicate an ISP name or a class or a quality of service.') ppp_ext_if_pp_po_e_ac_server = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 9), display_string().subtype(subtypeSpec=value_size_constraint(0, 63))).setMaxAccess('readwrite') if mibBuilder.loadTexts: pppExtIfPPPoEAcServer.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfPPPoEAcServer.setDescription('The PPPoE (PPP over Ethernet, RFC 2516) AC-Server name which determines the access concentrator during PPPoE discovery stage.') ppp_ext_if_enc_key_negotiation = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('static', 1), ('authentication', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: pppExtIfEncKeyNegotiation.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfEncKeyNegotiation.setDescription("This variable defines the specification of shared secrets (encryption keys) between the sender and receiver of encrypted data. If set to static (1), the keys specified in 'pppExtIfEncTxKey' and 'pppExtIfEncRxKey' will be used, if set to authentication (2), the key derivation is based on PPP authentication via CHAP or MS-CHAP.") ppp_ext_if_enc_tx_key = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 11), octet_string()).setMaxAccess('readwrite') if mibBuilder.loadTexts: pppExtIfEncTxKey.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfEncTxKey.setDescription("Static (encryption) key used for transmission of encrypted data via PPP. It's size depends on the used encryption algorithm and the corresponding key length, e.g. 'des_56' or 'blowfish_168'.") ppp_ext_if_enc_rx_key = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 12), octet_string()).setMaxAccess('readwrite') if mibBuilder.loadTexts: pppExtIfEncRxKey.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfEncRxKey.setDescription("Static (decryption) key used for decryption of encrypted data received on PPP connections. It's size depends on the used encryption algorithm and the corresponding key length, e.g. 'des_56' or 'blowfish_168'.") ppp_ext_if_gear_up_threshold = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 13), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readwrite') if mibBuilder.loadTexts: pppExtIfGearUpThreshold.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfGearUpThreshold.setDescription('Gear up threshold for invoking current bandwidth. The measured throughput (in percent of the total bandwidth) of this interface (see pppExtIfLoad) is compared with this value once per second. If exceeded longer than 5 seconds an additional B-channel will be requested.') ppp_ext_if_gear_down_threshold = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 14), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readwrite') if mibBuilder.loadTexts: pppExtIfGearDownThreshold.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfGearDownThreshold.setDescription('Gear down threshold for decreasing current bandwidth. The expected throughput (in percent of the total bandwidth) of this interface (see pppExtIfLoad) after dropping a B-channel is compared with this threshold value once per second. If the needed bandwidth falls below this threshold longer than 10 seconds, exactly one B-channel will be dropped.') ppp_ext_if_aodi_d_chan_qlen = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 15), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: pppExtIfAodiDChanQlen.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfAodiDChanQlen.setDescription('Upper threshold for the amount of data (in octets) waiting to be sent across the 9.6Kbit/sec D-channel. If exceeded, additional bandwidth will be invoked at once.') ppp_ext_if_aodi_gear_down_tx_rate = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 16), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: pppExtIfAodiGearDownTxRate.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfAodiGearDownTxRate.setDescription('Lower threshold for the amount of data in bits per second to be sent across the 64Kbit/sec B-channel. If the measured throughput becomes smaller than this value over a period of pppExtIfGearDownPersistance seconds, the remaining B-channel will be dropped.') ppp_ext_if_gear_up_persistance = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 17), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readwrite') if mibBuilder.loadTexts: pppExtIfGearUpPersistance.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfGearUpPersistance.setDescription('Gear up persistence interval for invoking current bandwidth. The measured throughput (in percent of the total bandwidth) of this interface (see pppExtIfLoad) is compared with the current value of the variable pppExtIfGearUpThreshold once per second. If exceeded longer than pppExtIfGearUpPersistance seconds an additional B-channel will be requested.') ppp_ext_if_gear_down_persistance = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 18), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readwrite') if mibBuilder.loadTexts: pppExtIfGearDownPersistance.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfGearDownPersistance.setDescription('Gear down persistence interval for decreasing current bandwidth. The measured throughput (in percent of the total bandwidth) of this interface (see pppExtIfLoad) is compared with the current value of pppExtIfGearDownThreshold once per second. If exceeded longer than pppExtIfGearDownPersistance seconds, exactly one B-channel will be dropped.') ppp_ext_if_l1_speed = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 19), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: pppExtIfL1Speed.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfL1Speed.setDescription("This object contains the interface's nominal bandwidth in bits per second. Please note that this parameter may not represent the real available transmission rate. The current purpose is only informational for example for PPTP or PPPoE interfaces where no accurate information from the underlaying network is available.") ppp_ext_if_current_retry_time = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 20), integer32().subtype(subtypeSpec=value_range_constraint(0, 36000))).setMaxAccess('readwrite') if mibBuilder.loadTexts: pppExtIfCurrentRetryTime.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfCurrentRetryTime.setDescription('Current time in seconds to wait before retrying a call when the smart retry algorithm is implemented.') ppp_ext_if_max_retry_time = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 21), integer32().subtype(subtypeSpec=value_range_constraint(0, 36000))).setMaxAccess('readwrite') if mibBuilder.loadTexts: pppExtIfMaxRetryTime.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfMaxRetryTime.setDescription('Maximum time in seconds to wait before retrying a call when the smart retry algorithm is implemented. When set to zero this algorithm is disabled.') ppp_ext_if_mtu = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 22), integer32().subtype(subtypeSpec=value_range_constraint(0, 8192))).setMaxAccess('readwrite') if mibBuilder.loadTexts: pppExtIfMtu.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfMtu.setDescription('Determines size of the largest datagram which can be sent on the interface, specified in octets (see ifMtu). When set to zero (default), the value of the variable ifMtu depends on the received LCP MRU/MRRU option.') ppp_ext_if_mru = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 23), integer32().subtype(subtypeSpec=value_range_constraint(0, 8192))).setMaxAccess('readwrite') if mibBuilder.loadTexts: pppExtIfMru.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfMru.setDescription('The maximum length for the PPP information field, including padding, but not including the protocol field, is termed the Maximum Receive Unit (MRU).') ppp_ext_if_auth_mutual = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 3, 9, 1, 24), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('disabled', 1), ('enabled', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: pppExtIfAuthMutual.setStatus('mandatory') if mibBuilder.loadTexts: pppExtIfAuthMutual.setDescription('This object enables mutual PPP authentication between the peers.') bibo_dial_table = mib_table((1, 3, 6, 1, 4, 1, 272, 4, 4, 1)) if mibBuilder.loadTexts: biboDialTable.setStatus('mandatory') if mibBuilder.loadTexts: biboDialTable.setDescription("The biboDialTable contains configuration information for incoming and outgoing ISDN telephone numbers. Creating entries: Entries are created by assigning a value to the biboDialIfIndex object. Deleting entries: An entry can be removed by assigning the value `delete' to its biboDialType object.") bibo_dial_entry = mib_table_row((1, 3, 6, 1, 4, 1, 272, 4, 4, 1, 1)).setIndexNames((0, 'BIANCA-BRICK-PPP-MIB', 'biboDialIfIndex')) if mibBuilder.loadTexts: biboDialEntry.setStatus('mandatory') if mibBuilder.loadTexts: biboDialEntry.setDescription('') bibo_dial_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 4, 1, 1, 1), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: biboDialIfIndex.setStatus('mandatory') if mibBuilder.loadTexts: biboDialIfIndex.setDescription('The correlating PPP interface index.') bibo_dial_type = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 4, 1, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8))).clone(namedValues=named_values(('isdn', 1), ('isdn-spv', 2), ('delete', 3), ('ppp-callback', 4), ('ppp-negotiated', 5), ('x25-dialout', 6), ('ip', 7), ('x25', 8)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: biboDialType.setStatus('mandatory') if mibBuilder.loadTexts: biboDialType.setDescription('The dialup type can be set to plain isdn(1), isdn-spv(2) semi-permanent links used by the German 1TR6 D-channel protocol, or to delete(3) to delete a biboDialTable entry. The types ppp-callback(4) and ppp-negotiated(5) are used for the LCP callback option.') bibo_dial_direction = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 4, 1, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('incoming', 1), ('outgoing', 2), ('both', 3)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: biboDialDirection.setStatus('mandatory') if mibBuilder.loadTexts: biboDialDirection.setDescription('The allowed dial direction is either incoming(1), outgoing(2), or both(3) calls. No call is ever set up when set to incoming(1). Incoming calls will not be identified when set to outoing(2). Furthermore, once PPP authentication succeeds and there is at least one incoming number defined but for which none matches, the call will not be accepted for security reasons.') bibo_dial_number = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 4, 1, 1, 4), display_string().subtype(subtypeSpec=value_size_constraint(0, 63))).setMaxAccess('readwrite') if mibBuilder.loadTexts: biboDialNumber.setStatus('mandatory') if mibBuilder.loadTexts: biboDialNumber.setDescription("The defined dialing number. Used for either dialing or comparing to incoming calls or both, depending on the content of the biboDialDirection field. The wildcards '*', '?', '[', ']', '{', '}' may be used.") bibo_dial_subaddress = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 4, 1, 1, 5), octet_string()).setMaxAccess('readwrite') if mibBuilder.loadTexts: biboDialSubaddress.setStatus('mandatory') if mibBuilder.loadTexts: biboDialSubaddress.setDescription('The defined dial subaddress, if any. Also, see the biboDialNumber field.') bibo_dial_closed_user_group = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 4, 1, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(0, 9999))).setMaxAccess('readwrite') if mibBuilder.loadTexts: biboDialClosedUserGroup.setStatus('mandatory') if mibBuilder.loadTexts: biboDialClosedUserGroup.setDescription('The defined closed user group, if any. Also, see the biboDialNumber field.') bibo_dial_stk_mask = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 4, 1, 1, 7), bit_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: biboDialStkMask.setStatus('mandatory') if mibBuilder.loadTexts: biboDialStkMask.setDescription('The defined stack mask. Each value of IsdnStkNumber represents a bit in this bitmask. A mask of 0 disables dialup completely, while a mask of -1 enables dialup on all available ISDN stacks.') bibo_dial_screening = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 4, 1, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('user', 1), ('user-verified', 2), ('user-failed', 3), ('network', 4), ('dont-care', 5)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: biboDialScreening.setStatus('mandatory') if mibBuilder.loadTexts: biboDialScreening.setDescription("The screening indicator of the biboDialNumber. The biboDialScreening field can be used to gauge the `trustworthiness' of the biboDialNumber field. (See isdnCallScreening) Indicators are ordered from highest to lowest as follows: indicator: CPN assigned: verification: `network' by network none `user-verified' by user verification successful `user' by user none `user-failed' by user verification failed Set this field to `dont-care' to accept all calls. Otherwise calls are accepted only if the screening indicator matches or is higher than the set value.") bibo_dial_calling_subaddress = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 4, 1, 1, 9), octet_string()).setMaxAccess('readwrite') if mibBuilder.loadTexts: biboDialCallingSubaddress.setStatus('mandatory') if mibBuilder.loadTexts: biboDialCallingSubaddress.setDescription('The defined calling dial subaddress, if any. Also, see the biboDialNumber field.') bibo_dial_type_of_calling_sub_add = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 4, 1, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('nsap', 1), ('user-specified', 2), ('reserved', 3)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: biboDialTypeOfCallingSubAdd.setStatus('mandatory') if mibBuilder.loadTexts: biboDialTypeOfCallingSubAdd.setDescription('The type of calling party subaddress.') bibo_dial_type_of_called_sub_add = mib_table_column((1, 3, 6, 1, 4, 1, 272, 4, 4, 1, 1, 11), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('nsap', 1), ('user-specified', 2), ('reserved', 3)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: biboDialTypeOfCalledSubAdd.setStatus('mandatory') if mibBuilder.loadTexts: biboDialTypeOfCalledSubAdd.setDescription('The type of called party subaddress.') mibBuilder.exportSymbols('BIANCA-BRICK-PPP-MIB', pppExtIfAodiDChanQlen=pppExtIfAodiDChanQlen, biboDialTable=biboDialTable, pppSessionDNS1=pppSessionDNS1, biboPPPLinkTable=biboPPPLinkTable, pppLqmLostOutOctets=pppLqmLostOutOctets, biboPPPIpAssignPoolId=biboPPPIpAssignPoolId, bintec=bintec, pppSessionLocIpAddr=pppSessionLocIpAddr, biboPPPConnIfIndex=biboPPPConnIfIndex, biboPPPConnIncomingCalls=biboPPPConnIncomingCalls, biboPPPLinkEntry=biboPPPLinkEntry, biboPPPIfIndex=biboPPPIfIndex, biboPPPMinConn=biboPPPMinConn, pppLqmPeerInLQRs=pppLqmPeerInLQRs, pppLqmLostOutLQRs=pppLqmLostOutLQRs, pppSessionCompression=pppSessionCompression, pppExtIfLoad=pppExtIfLoad, biboPPPLinkKeepalivePending=biboPPPLinkKeepalivePending, biboPPPVJHeaderComp=biboPPPVJHeaderComp, biboPPPProfileCallbackNegotiation=biboPPPProfileCallbackNegotiation, dialmap=dialmap, biboPPPTotalIncomingCalls=biboPPPTotalIncomingCalls, biboDialCallingSubaddress=biboDialCallingSubaddress, biboPPPConnOutgoingFails=biboPPPConnOutgoingFails, biboPPPEncapsulation=biboPPPEncapsulation, biboDialNumber=biboDialNumber, biboPPPLinkKeepaliveSent=biboPPPLinkKeepaliveSent, biboPPPRetryTime=biboPPPRetryTime, dod=dod, pppLqmPeerInOctets=pppLqmPeerInOctets, pppExtIfPPPoEService=pppExtIfPPPoEService, biboPPPConnReceivedOctets=biboPPPConnReceivedOctets, biboPPPMaxRetries=biboPPPMaxRetries, biboPPPLinkState=biboPPPLinkState, biboPPPTotalTransmitOctets=biboPPPTotalTransmitOctets, biboPPPLinkIfIndex=biboPPPLinkIfIndex, pppLqmOutLQRs=pppLqmOutLQRs, pppLqmPeerInErrors=pppLqmPeerInErrors, pppIpInUseTable=pppIpInUseTable, biboPPPType=biboPPPType, pppLqmInOctets=pppLqmInOctets, pppSessionEntry=pppSessionEntry, pppIpInUseIfIndex=pppIpInUseIfIndex, biboPPPCallback=biboPPPCallback, biboPPPProfileAuthRadius=biboPPPProfileAuthRadius, biboDialScreening=biboDialScreening, pppSessionRemIpAddr=pppSessionRemIpAddr, ppp=ppp, biboPPPTotalCharge=biboPPPTotalCharge, biboPPPConnOutgoingCalls=biboPPPConnOutgoingCalls, biboPPPLinkLqm=biboPPPLinkLqm, biboPPPLinkCallType=biboPPPLinkCallType, biboPPPStatEntry=biboPPPStatEntry, private=private, pppSessionCbcpMode=pppSessionCbcpMode, biboDialDirection=biboDialDirection, biboPPPProfileAuthProtocol=biboPPPProfileAuthProtocol, pppLqmEntry=pppLqmEntry, pppExtIfEncTxKey=pppExtIfEncTxKey, biboPPPLinkCallReference=biboPPPLinkCallReference, biboPPPProfileEntry=biboPPPProfileEntry, biboPPPIpAddress=biboPPPIpAddress, biboPPPLinkLocDiscr=biboPPPLinkLocDiscr, pppSessionVJHeaderComp=pppSessionVJHeaderComp, pppExtIfTable=pppExtIfTable, pppExtIfGearUpThreshold=pppExtIfGearUpThreshold, biboPPPLinkLcpComp=biboPPPLinkLcpComp, biboPPPIpAssignEntry=biboPPPIpAssignEntry, internet=internet, pppIpInUseState=pppIpInUseState, biboPPPMaxConn=biboPPPMaxConn, pppLqmLostPeerOutOcts=pppLqmLostPeerOutOcts, pppLqmInErrors=pppLqmInErrors, biboPPPTotalUnits=biboPPPTotalUnits, pppExtIfAodiGearDownTxRate=pppExtIfAodiGearDownTxRate, pppExtIfAlgorithm=pppExtIfAlgorithm, pppLqmInPackets=pppLqmInPackets, pppLqmPeerOutLQRs=pppLqmPeerOutLQRs, biboPPPTotalReceivedOctets=biboPPPTotalReceivedOctets, biboPPPLocalIdent=biboPPPLocalIdent, biboPPPSessionTimeout=biboPPPSessionTimeout, pppSessionMlp=pppSessionMlp, biboPPPLinkCharge=biboPPPLinkCharge, pppSessionIfIndex=pppSessionIfIndex, biboPPPLinkSpeed=biboPPPLinkSpeed, pppLqmPeerOutOctets=pppLqmPeerOutOctets, biboPPPStatTable=biboPPPStatTable, pppSessionLcpCallback=pppSessionLcpCallback, pppLqmInDiscards=pppLqmInDiscards, pppLqmLostPeerOutLQRs=pppLqmLostPeerOutLQRs, pppIpInUseAge=pppIpInUseAge, pppExtIfAuthMutual=pppExtIfAuthMutual, biboDialStkMask=biboDialStkMask, biboPPPIpAssignRange=biboPPPIpAssignRange, pppLqmReportingPeriod=pppLqmReportingPeriod, pppExtIfIndex=pppExtIfIndex, pppExtIfBodMode=pppExtIfBodMode, pppLqmIfIndex=pppLqmIfIndex, biboDialClosedUserGroup=biboDialClosedUserGroup, biboPPPLayer2Mode=biboPPPLayer2Mode, pppSessionWINS2=pppSessionWINS2, biboPPPLinkRetries=biboPPPLinkRetries, biboPPPConnActive=biboPPPConnActive, enterprises=enterprises, pppExtIfEncKeyNegotiation=pppExtIfEncKeyNegotiation, pppLqmCallReference=pppLqmCallReference, pppExtIfEntry=pppExtIfEntry, pppExtIfMlpFragmentation=pppExtIfMlpFragmentation, pppExtIfMlpFragSize=pppExtIfMlpFragSize, pppLqmPeerInDiscards=pppLqmPeerInDiscards, biboPPPConnCharge=biboPPPConnCharge, pppLqmLostOutPackets=pppLqmLostOutPackets, pppLqmPeerInPackets=pppLqmPeerInPackets, pppLqmOutOctets=pppLqmOutOctets, pppIpInUsePoolId=pppIpInUsePoolId, biboPPPConnUnits=biboPPPConnUnits, biboDialIfIndex=biboDialIfIndex, pppExtIfGearDownPersistance=pppExtIfGearDownPersistance, biboPPPConnDuration=biboPPPConnDuration, pppLqmOutPackets=pppLqmOutPackets, pppSessionIpxcpNodeNumber=pppSessionIpxcpNodeNumber, biboPPPEntry=biboPPPEntry, pppLqmPeerOutPackets=pppLqmPeerOutPackets, biboPPPAuthentication=biboPPPAuthentication, biboPPPIdleTime=biboPPPIdleTime, pppExtIfGearUpPersistance=pppExtIfGearUpPersistance, pppExtIfEncRxKey=pppExtIfEncRxKey, biboPPPLinkEstablished=biboPPPLinkEstablished, pppExtIfMru=pppExtIfMru, biboPPPEncryption=biboPPPEncryption, pppSessionDNS2=pppSessionDNS2, bibo=bibo, biboPPPLinkAccm=biboPPPLinkAccm, biboPPPProfilePPPoEDevIfIndex=biboPPPProfilePPPoEDevIfIndex, biboPPPIpAssignTable=biboPPPIpAssignTable, pppSessionBacpFavoredPeer=pppSessionBacpFavoredPeer, biboPPPConnProtocols=biboPPPConnProtocols, Date=Date, biboPPPTotalDuration=biboPPPTotalDuration, pppSessionMru=pppSessionMru, biboPPPLinkProtocols=biboPPPLinkProtocols, biboPPPTable=biboPPPTable, biboPPPInitConn=biboPPPInitConn, biboPPPDynShortHold=biboPPPDynShortHold, pppLqmInLQRs=pppLqmInLQRs, pppExtIfL1Speed=pppExtIfL1Speed, pppSessionCbcpDelay=pppSessionCbcpDelay, pppIpInUseEntry=pppIpInUseEntry, biboPPPConnState=biboPPPConnState, biboPPPTotalOutgoingFails=biboPPPTotalOutgoingFails, biboPPPLinkDirection=biboPPPLinkDirection, biboPPPIpAssignAddress=biboPPPIpAssignAddress, biboPPPKeepalive=biboPPPKeepalive, biboPPPLinkUnits=biboPPPLinkUnits, biboPPPTotalOutgoingCalls=biboPPPTotalOutgoingCalls, biboPPPCompressionMode=biboPPPCompressionMode, pppExtIfCurrentRetryTime=pppExtIfCurrentRetryTime, biboPPPThroughput=biboPPPThroughput, biboPPPCompression=biboPPPCompression, pppExtIfGearDownThreshold=pppExtIfGearDownThreshold, biboPPPProfileName=biboPPPProfileName, BitValue=BitValue, biboPPPLinkDeviceIndex=biboPPPLinkDeviceIndex, biboPPPLoginString=biboPPPLoginString, biboPPPConnTransmitOctets=biboPPPConnTransmitOctets, biboPPPIpPoolId=biboPPPIpPoolId, biboPPPTimeout=biboPPPTimeout, biboPPPAuthIdent=biboPPPAuthIdent, biboDialEntry=biboDialEntry, biboPPPLQMonitoring=biboPPPLQMonitoring, biboDialSubaddress=biboDialSubaddress, pppExtIfMaxRetryTime=pppExtIfMaxRetryTime, biboDialTypeOfCalledSubAdd=biboDialTypeOfCalledSubAdd, biboDialTypeOfCallingSubAdd=biboDialTypeOfCallingSubAdd, biboPPPDNSNegotiation=biboPPPDNSNegotiation, pppIpInUseIdent=pppIpInUseIdent, pppSessionEncryption=pppSessionEncryption, biboPPPShortHold=biboPPPShortHold, biboPPPConnIncomingFails=biboPPPConnIncomingFails, pppLqmTable=pppLqmTable, biboPPPChargeInterval=biboPPPChargeInterval, biboPPPLinkStkNumber=biboPPPLinkStkNumber, biboPPPLayer1Protocol=biboPPPLayer1Protocol, biboPPPAuthSecret=biboPPPAuthSecret, pppIpInUseAddress=pppIpInUseAddress, pppExtIfMtu=pppExtIfMtu, pppExtIfInterval=pppExtIfInterval, biboPPPProfileLQMonitoring=biboPPPProfileLQMonitoring, pppExtIfPPPoEAcServer=pppExtIfPPPoEAcServer, pppSessionAuthProt=pppSessionAuthProt, biboPPPLinkRemDiscr=biboPPPLinkRemDiscr, org=org, pppLqmLostPeerOutPkts=pppLqmLostPeerOutPkts, pppSessionWINS1=pppSessionWINS1, pppSessionTable=pppSessionTable, biboPPPIpAssignState=biboPPPIpAssignState, biboDialType=biboDialType, biboPPPProfileTable=biboPPPProfileTable, biboPPPTotalIncomingFails=biboPPPTotalIncomingFails, biboPPPBlockTime=biboPPPBlockTime)
def gcd(a,b): res = 1 for i in range(1, min(a,b)+1): if a % i == 0 and b % i == 0: res = i return res def solution(w,h): return w * h - (w + h - gcd(w,h))
def gcd(a, b): res = 1 for i in range(1, min(a, b) + 1): if a % i == 0 and b % i == 0: res = i return res def solution(w, h): return w * h - (w + h - gcd(w, h))
def markov_tweet(): #Created a nested dictionary with the 1st Key = a word second key = possible words that come after and value = counter words_dic = {} with open("prunedLyrics.txt", 'r', encoding="utf-8") as f: for line in f: line = line.replace("\n"," \n") words_list = line.split(" ") for index, word in enumerate(words_list): temp_kv_dic = {} #if we encounter a new line, move on to next line if word == "\n": break #check if a word exists in the dictionary, if not intialize with the {currentword: {the next word:1}} elif word not in words_dic: temp_kv_dic.update({words_list[index+1]:1}) words_dic.update({word:temp_kv_dic}) #if word is in dictionary, check if the following word is a key, if not intialize it, if it is update value elif word in words_dic: if words_list[index+1] in words_dic[word]: words_dic[word][words_list[index+1]] += 1 else: temp_kv_dic.update({words_list[index+1]:1}) words_dic[word].update(temp_kv_dic) print(words_dic) #words_dic contains a dictionary with the following format #{word:{nextword:appearances, anotherwordthatcomesafter:appearances}} markov_tweet()
def markov_tweet(): words_dic = {} with open('prunedLyrics.txt', 'r', encoding='utf-8') as f: for line in f: line = line.replace('\n', ' \n') words_list = line.split(' ') for (index, word) in enumerate(words_list): temp_kv_dic = {} if word == '\n': break elif word not in words_dic: temp_kv_dic.update({words_list[index + 1]: 1}) words_dic.update({word: temp_kv_dic}) elif word in words_dic: if words_list[index + 1] in words_dic[word]: words_dic[word][words_list[index + 1]] += 1 else: temp_kv_dic.update({words_list[index + 1]: 1}) words_dic[word].update(temp_kv_dic) print(words_dic) markov_tweet()
class Person: @property def full_name(self): return f"{self.first_name} {self.last_name}"
class Person: @property def full_name(self): return f'{self.first_name} {self.last_name}'
""" Setting for project """ logfile = "demo_project.log"
""" Setting for project """ logfile = 'demo_project.log'
chassis_900 = '192.168.65.36' chassis_910 = '192.168.65.21' linux_900 = '192.168.65.34:443' linux_910 = '192.168.65.23:443' windows_900 = 'localhost:11009' windows_910 = 'localhost:11009' cm_900 = '172.40.0.204:443' server_properties = {'linux_900': {'server': linux_900, 'locations': [f'{chassis_900}/1/1', f'{chassis_900}/1/2'], 'auth': ('admin', 'admin')}, 'linux_910': {'server': linux_910, 'locations': [f'{chassis_910}/1/1', f'{chassis_910}/1/2'], 'auth': ('admin', 'admin')}, 'windows_900': {'server': windows_900, 'locations': [f'{chassis_900}/1/1', f'{chassis_900}/1/2'], 'auth': None, 'install_dir': 'C:/Program Files (x86)/Ixia/IxNetwork/9.00.1915.16'}, 'windows_910': {'server': windows_910, 'locations': [f'{chassis_910}/1/1', f'{chassis_910}/1/2'], 'auth': None, 'install_dir': 'C:/Program Files (x86)/Ixia/IxNetwork/9.10.2007.7'}, 'cm_900': {'server': cm_900, 'locations': [f'{chassis_900}/1/1', f'{chassis_900}/1/2'], 'auth': None, 'install_dir': 'C:/Program Files (x86)/Ixia/IxNetwork/9.00.1915.16'}} license_servers = ['192.168.42.61'] # Default for options. api = ['rest'] server = ['linux_910']
chassis_900 = '192.168.65.36' chassis_910 = '192.168.65.21' linux_900 = '192.168.65.34:443' linux_910 = '192.168.65.23:443' windows_900 = 'localhost:11009' windows_910 = 'localhost:11009' cm_900 = '172.40.0.204:443' server_properties = {'linux_900': {'server': linux_900, 'locations': [f'{chassis_900}/1/1', f'{chassis_900}/1/2'], 'auth': ('admin', 'admin')}, 'linux_910': {'server': linux_910, 'locations': [f'{chassis_910}/1/1', f'{chassis_910}/1/2'], 'auth': ('admin', 'admin')}, 'windows_900': {'server': windows_900, 'locations': [f'{chassis_900}/1/1', f'{chassis_900}/1/2'], 'auth': None, 'install_dir': 'C:/Program Files (x86)/Ixia/IxNetwork/9.00.1915.16'}, 'windows_910': {'server': windows_910, 'locations': [f'{chassis_910}/1/1', f'{chassis_910}/1/2'], 'auth': None, 'install_dir': 'C:/Program Files (x86)/Ixia/IxNetwork/9.10.2007.7'}, 'cm_900': {'server': cm_900, 'locations': [f'{chassis_900}/1/1', f'{chassis_900}/1/2'], 'auth': None, 'install_dir': 'C:/Program Files (x86)/Ixia/IxNetwork/9.00.1915.16'}} license_servers = ['192.168.42.61'] api = ['rest'] server = ['linux_910']
n=int(input()) arr=list(map(int,input().split())) a=0 p=0 for k in range(0,n): a=a+arr[k] for j in range(0,n): d=(arr[j] - (a/n))**2 p=p+d sigma=float ((p/n)**(1/2)) print(sigma)
n = int(input()) arr = list(map(int, input().split())) a = 0 p = 0 for k in range(0, n): a = a + arr[k] for j in range(0, n): d = (arr[j] - a / n) ** 2 p = p + d sigma = float((p / n) ** (1 / 2)) print(sigma)
class Port: def __init__(self, path, vendor_id, product_id, serial_number): self.path = path self.vendor_id = vendor_id self.product_id = product_id self.serial_number = serial_number def __repr__(self): return f'<Port ' \ f'path={self.path} ' \ f'vendor_id={self.vendor_id} ' \ f'product_id={self.product_id} ' \ f'serial_number={self.serial_number} ' \ f'>'
class Port: def __init__(self, path, vendor_id, product_id, serial_number): self.path = path self.vendor_id = vendor_id self.product_id = product_id self.serial_number = serial_number def __repr__(self): return f'<Port path={self.path} vendor_id={self.vendor_id} product_id={self.product_id} serial_number={self.serial_number} >'
def less_or_equal(value): if value : # Change this line return "25 or less" elif value : # Change this line return "75 or less" else: return "More than 75" # Change the value 1 below to experiment with different values print(less_or_equal(1))
def less_or_equal(value): if value: return '25 or less' elif value: return '75 or less' else: return 'More than 75' print(less_or_equal(1))
# # @lc app=leetcode id=2 lang=python3 # # [2] Add Two Numbers # # https://leetcode.com/problems/add-two-numbers/description/ # # algorithms # Medium (30.66%) # Likes: 5024 # Dislikes: 1280 # Total Accepted: 848.6K # Total Submissions: 2.7M # Testcase Example: '[2,4,3]\n[5,6,4]' # # You are given two non-empty linked lists representing two non-negative # integers. The digits are stored in reverse order and each of their nodes # contain a single digit. Add the two numbers and return it as a linked list. # # You may assume the two numbers do not contain any leading zero, except the # number 0 itself. # # Example: # # # Input: (2 -> 4 -> 3) + (5 -> 6 -> 4) # Output: 7 -> 0 -> 8 # Explanation: 342 + 465 = 807. # # # # Definition for singly-linked list. # class ListNode: # def __init__(self, x): # self.val = x # self.next = None class Solution: def addTwoNumbers(self, l1: ListNode, l2: ListNode) -> ListNode: if not l1.next and l1.val == 0: return l2 if not l2.next and l2.val == 0: return l1 p1, p2 = l1, l2 sol = ListNode(0) head = sol head.next = None plus, sol.val = (p1.val + p2.val) // 10, (p1.val + p2.val) % 10 p1, p2 = p1.next, p2.next while p1 or p2: temp = ListNode(0) val1 = p1.val if p1 else 0 p1 = p1.next if p1 else p1 val2 = p2.val if p2 else 0 p2 = p2.next if p2 else p2 temp.next, temp.val = None, val1+val2+plus plus = temp.val // 10 temp.val %= 10 sol.next = temp sol = sol.next if plus != 0: temp = ListNode(0) temp.next, temp.val, sol.next = None, 1, temp return head
class Solution: def add_two_numbers(self, l1: ListNode, l2: ListNode) -> ListNode: if not l1.next and l1.val == 0: return l2 if not l2.next and l2.val == 0: return l1 (p1, p2) = (l1, l2) sol = list_node(0) head = sol head.next = None (plus, sol.val) = ((p1.val + p2.val) // 10, (p1.val + p2.val) % 10) (p1, p2) = (p1.next, p2.next) while p1 or p2: temp = list_node(0) val1 = p1.val if p1 else 0 p1 = p1.next if p1 else p1 val2 = p2.val if p2 else 0 p2 = p2.next if p2 else p2 (temp.next, temp.val) = (None, val1 + val2 + plus) plus = temp.val // 10 temp.val %= 10 sol.next = temp sol = sol.next if plus != 0: temp = list_node(0) (temp.next, temp.val, sol.next) = (None, 1, temp) return head
""" Tickle. The word "tickle" jitters when the cursor hovers over. Sometimes, it can be tickled off the screen. """ message = "tickle" # X and Y coordinates of text x = 0 y = 0 # horizontal and vertical radius of the text hr = 0 vr = 0 def setup(): global x, y, hr, vr size(640, 360) # Create the font textFont(createFont("Georgia", 36)) textAlign(CENTER, CENTER) hr = textWidth(message) / 2 vr = (textAscent() + textDescent()) / 2 noStroke() x = width / 2 y = height / 2 def draw(): global x, y # Instead of clearing the background, fade it by drawing # a semi-transparent rectangle on top fill(204, 120) rect(0, 0, width, height) # If the cursor is over the text, change the position if abs(mouseX - x) < hr and abs(mouseY - y) < vr: x += random(-5, 5) y += random(-5, 5) fill(0) text("tickle", x, y)
""" Tickle. The word "tickle" jitters when the cursor hovers over. Sometimes, it can be tickled off the screen. """ message = 'tickle' x = 0 y = 0 hr = 0 vr = 0 def setup(): global x, y, hr, vr size(640, 360) text_font(create_font('Georgia', 36)) text_align(CENTER, CENTER) hr = text_width(message) / 2 vr = (text_ascent() + text_descent()) / 2 no_stroke() x = width / 2 y = height / 2 def draw(): global x, y fill(204, 120) rect(0, 0, width, height) if abs(mouseX - x) < hr and abs(mouseY - y) < vr: x += random(-5, 5) y += random(-5, 5) fill(0) text('tickle', x, y)
# coding=utf-8 """ Package to manage Sentry for ESST """
""" Package to manage Sentry for ESST """
class Solution(object): def partitionDisjoint(self, nums): """ :type nums: List[int] :rtype: int """ now_min= 10^6 nearly_max= nums[0] last_time_max_value = nums[0] last_time_max= -1 record_list = [] for i, v in enumerate(nums): nearly_max= max(nearly_max, v) if v <= now_min: if v != now_min: record_list = [] last_time_max= -1 now_min= v record_list.append((i,v,nearly_max)) last_time_max_value= nearly_max elif v < last_time_max_value: last_time_max= i last_time_max_value= nearly_max if len(record_list) == 1: return max(record_list[0][0]+1, last_time_max+1) elif len(record_list) == 0: return max(1, last_time_max+1) elif record_list[0][1] == record_list[0][2]: return record_list[0][0]+1 else: return max(record_list[-1][0] + 1, last_time_max+1)
class Solution(object): def partition_disjoint(self, nums): """ :type nums: List[int] :rtype: int """ now_min = 10 ^ 6 nearly_max = nums[0] last_time_max_value = nums[0] last_time_max = -1 record_list = [] for (i, v) in enumerate(nums): nearly_max = max(nearly_max, v) if v <= now_min: if v != now_min: record_list = [] last_time_max = -1 now_min = v record_list.append((i, v, nearly_max)) last_time_max_value = nearly_max elif v < last_time_max_value: last_time_max = i last_time_max_value = nearly_max if len(record_list) == 1: return max(record_list[0][0] + 1, last_time_max + 1) elif len(record_list) == 0: return max(1, last_time_max + 1) elif record_list[0][1] == record_list[0][2]: return record_list[0][0] + 1 else: return max(record_list[-1][0] + 1, last_time_max + 1)
class ValueBlend: def _init_corners(self, **kwargs): # Corners is list of tuples: # [bottomleft, bottomright, topleft, topright] if 'corners' in kwargs: self.corners = kwargs['corners'] if len(self.corners) != 4 or \ any(len(v) != 2 for v in self.corners): raise ValueError("corner should be a list of four tuples, " "set either option 'corners' " "or options 'u_range' and 'v_range'") elif 'u_range' in kwargs and 'v_range' in kwargs: self.corners = [[kwargs['u_range'][0], kwargs['v_range'][0]], [kwargs['u_range'][1], kwargs['v_range'][0]], [kwargs['u_range'][0], kwargs['v_range'][1]], [kwargs['u_range'][1], kwargs['v_range'][1]]] else: raise ValueError("Must set either option " "'corners' or options 'u_range' and 'v_range'") def _blend_tuples(self, tuple1, tuple2, ratio): out = [None, None] for i in range(2): out[i] = (1 - ratio) * tuple1[i] + ratio * tuple2[i] return out def blend(self, ratio_u, ratio_v): uv0 = self._blend_tuples(self.corners[0], self.corners[1], ratio_u) uv1 = self._blend_tuples(self.corners[2], self.corners[3], ratio_u) return self._blend_tuples(uv0, uv1, ratio_v)
class Valueblend: def _init_corners(self, **kwargs): if 'corners' in kwargs: self.corners = kwargs['corners'] if len(self.corners) != 4 or any((len(v) != 2 for v in self.corners)): raise value_error("corner should be a list of four tuples, set either option 'corners' or options 'u_range' and 'v_range'") elif 'u_range' in kwargs and 'v_range' in kwargs: self.corners = [[kwargs['u_range'][0], kwargs['v_range'][0]], [kwargs['u_range'][1], kwargs['v_range'][0]], [kwargs['u_range'][0], kwargs['v_range'][1]], [kwargs['u_range'][1], kwargs['v_range'][1]]] else: raise value_error("Must set either option 'corners' or options 'u_range' and 'v_range'") def _blend_tuples(self, tuple1, tuple2, ratio): out = [None, None] for i in range(2): out[i] = (1 - ratio) * tuple1[i] + ratio * tuple2[i] return out def blend(self, ratio_u, ratio_v): uv0 = self._blend_tuples(self.corners[0], self.corners[1], ratio_u) uv1 = self._blend_tuples(self.corners[2], self.corners[3], ratio_u) return self._blend_tuples(uv0, uv1, ratio_v)
class Solution(object): def bulbSwitch(self, n): """ :type n: int :rtype: int """ num_of_facs = [1 for i in range(n)] for j in range(2, n + 1): for k in range(1, n / j + 1): num_of_facs[j * k - 1] += 1 res = 0 for num in num_of_facs: res += num % 2 return res
class Solution(object): def bulb_switch(self, n): """ :type n: int :rtype: int """ num_of_facs = [1 for i in range(n)] for j in range(2, n + 1): for k in range(1, n / j + 1): num_of_facs[j * k - 1] += 1 res = 0 for num in num_of_facs: res += num % 2 return res
str_1 = input() str_2 = input() str_3 = input() print([str_1, [str_2], [[str_3]]])
str_1 = input() str_2 = input() str_3 = input() print([str_1, [str_2], [[str_3]]])
class Dataset(object): def __init__(self, name=None): self.name = name def __str__(self): return self.name def get_instance_name(self, filepath, id): raise NotImplementedError("Abstract class") def import_model(self, filepath): raise NotImplementedError("Abstract class") def get_camera_position(self, filepath): raise NotImplementedError("Abstract class") def get_camera_position_generator(self, folder): raise NotImplementedError("Abstract class") def get_camera_rotation(self, degrees = 0): raise NotImplementedError("Abstract class") def get_camera_offset(self, direction, distance, degrees): raise NotImplementedError("Abstract class") def get_depth_output(self, output_path, base_filename, nodes, links, compositor): raise NotImplementedError("Abstract class") def get_color_output(self, output_path, base_filename, nodes, links, compositor): raise NotImplementedError("Abstract class") def get_emission_output(self, output_path, base_filename, nodes, links, compositor): raise NotImplementedError("Abstract class") def get_normals_output(self, output_path, base_filename, nodes, links, compositor): raise NotImplementedError("Abstract class") def get_normal_map_output(self, output_path, base_filename, nodes, links, compositor): raise NotImplementedError("Abstract class") def get_flow_map_output(self, output_path, base_filename, nodes, links, compositor): raise NotImplementedError("Abstract class") def get_semantic_map_output(self, labels_path, output_path, base_filename, nodes, links, compositor): raise NotImplementedError("Abstract class") def get_pretty_semantic_map_output(self, labels_path, output_path, base_filename, nodes, links, compositor): raise NotImplementedError("Abstract class") def set_render_settings(self): raise NotImplementedError("Abstract class")
class Dataset(object): def __init__(self, name=None): self.name = name def __str__(self): return self.name def get_instance_name(self, filepath, id): raise not_implemented_error('Abstract class') def import_model(self, filepath): raise not_implemented_error('Abstract class') def get_camera_position(self, filepath): raise not_implemented_error('Abstract class') def get_camera_position_generator(self, folder): raise not_implemented_error('Abstract class') def get_camera_rotation(self, degrees=0): raise not_implemented_error('Abstract class') def get_camera_offset(self, direction, distance, degrees): raise not_implemented_error('Abstract class') def get_depth_output(self, output_path, base_filename, nodes, links, compositor): raise not_implemented_error('Abstract class') def get_color_output(self, output_path, base_filename, nodes, links, compositor): raise not_implemented_error('Abstract class') def get_emission_output(self, output_path, base_filename, nodes, links, compositor): raise not_implemented_error('Abstract class') def get_normals_output(self, output_path, base_filename, nodes, links, compositor): raise not_implemented_error('Abstract class') def get_normal_map_output(self, output_path, base_filename, nodes, links, compositor): raise not_implemented_error('Abstract class') def get_flow_map_output(self, output_path, base_filename, nodes, links, compositor): raise not_implemented_error('Abstract class') def get_semantic_map_output(self, labels_path, output_path, base_filename, nodes, links, compositor): raise not_implemented_error('Abstract class') def get_pretty_semantic_map_output(self, labels_path, output_path, base_filename, nodes, links, compositor): raise not_implemented_error('Abstract class') def set_render_settings(self): raise not_implemented_error('Abstract class')
def isValid(s: str) -> bool: open_to_close = { '(': ')', '{': '}', '[': ']' } close_to_open = {v: k for k, v in open_to_close.items()} stack = [] for i in s: if i in open_to_close: stack.append(i) elif i in close_to_open: if len(stack) <= 0: return False last_open = stack.pop() if open_to_close[last_open] != i: return False return len(stack) == 0
def is_valid(s: str) -> bool: open_to_close = {'(': ')', '{': '}', '[': ']'} close_to_open = {v: k for (k, v) in open_to_close.items()} stack = [] for i in s: if i in open_to_close: stack.append(i) elif i in close_to_open: if len(stack) <= 0: return False last_open = stack.pop() if open_to_close[last_open] != i: return False return len(stack) == 0
client_id = 'Ch8pNOBOAYzASwSmKClKZJKts8VnKDsj' # your bot's client ID token = 'Mzc3MDU4MTc2MzUwMDI3Nzc3.DQ8csA.YRTHtBKENVulI8bk17-6gzGnScU' # your bot's token carbon_key = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySUQiOiIyMjA5NTkxNzg3NzkyNjI5ODYiLCJyYW5kIjozOTksImlhdCI6MTUxMjkzNTQ5NH0.1Al7nXx5HmvA7Lyc_ddc6V_czVxvD5K7dxPdrW0D1yE' # your bot's key on carbon's site bots_key = 'https://discordapp.com/oauth2/authorize?client_id=377058176350027777&scope=bot&permissions=268954750&response_type=code&redirect_uri=discord.gg' # your key on bots.discord.pw postgresql = 'postgres://sflxeqaxuvrkro:d9df02d2b497e0f23c6663de06cbf5a17a7f1a867e7a9a6208484d292cb57f61@ec2-54-195-248-0.eu-west-1.compute.amazonaws.com:5432/d4a6dsf7p8cp8e' # your postgresql info from above challonge_api_key = 'bU7HgqNbDQhVysppOgPp8zoRqGE82cWf2iM0Q2Ep' # for tournament cog
client_id = 'Ch8pNOBOAYzASwSmKClKZJKts8VnKDsj' token = 'Mzc3MDU4MTc2MzUwMDI3Nzc3.DQ8csA.YRTHtBKENVulI8bk17-6gzGnScU' carbon_key = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySUQiOiIyMjA5NTkxNzg3NzkyNjI5ODYiLCJyYW5kIjozOTksImlhdCI6MTUxMjkzNTQ5NH0.1Al7nXx5HmvA7Lyc_ddc6V_czVxvD5K7dxPdrW0D1yE' bots_key = 'https://discordapp.com/oauth2/authorize?client_id=377058176350027777&scope=bot&permissions=268954750&response_type=code&redirect_uri=discord.gg' postgresql = 'postgres://sflxeqaxuvrkro:d9df02d2b497e0f23c6663de06cbf5a17a7f1a867e7a9a6208484d292cb57f61@ec2-54-195-248-0.eu-west-1.compute.amazonaws.com:5432/d4a6dsf7p8cp8e' challonge_api_key = 'bU7HgqNbDQhVysppOgPp8zoRqGE82cWf2iM0Q2Ep'
"""Device module handling /device/ API calls.""" class Device(object): """Device class with /device/ API calls.""" def __init__(self, opensprinkler): """Device class initializer.""" self._opensprinkler = opensprinkler def _getOption(self, option): """Retrieve option""" (resp, content) = self._opensprinkler._request('jo') return content[option] def _getVariable(self, option): """Retrieve option""" (resp, content) = self._opensprinkler._request('jc') return content[option] def _setVariable(self, option, value): """Retrieve option""" params = {} params[option] = value (resp, content) = self._opensprinkler._request('cv', params) return content['result'] def getFirmwareVersion(self): """Retrieve firmware version""" return self._getOption('fwv') def getHardwareVersion(self): """Retrieve hardware version""" return self._getOption('hwv') def getLastRun(self): """Retrieve hardware version""" return self._getVariable('lrun')[3] def getRainDelay(self): """Retrieve rain delay""" return self._getVariable('rd') def getRainDelayStopTime(self): """Retrieve rain delay stop time""" return self._getVariable('rdst') def getRainSensor1(self): """Retrieve hardware version""" return self._getVariable('sn1') def getRainSensor2(self): """Retrieve hardware version""" return self._getVariable('sn2') def getRainSensorLegacy(self): """Retrieve hardware version""" return self._getVariable('rs') def getOperationEnabled(self): """Retrieve operation enabled""" return self._getVariable('en') def getWaterLevel(self): """Retrieve water level""" return self._getOption('wl') def enable(self): """Enable operation""" return self._setVariable('en', 1) def disable(self): """Disable operation""" return self._setVariable('en', 0)
"""Device module handling /device/ API calls.""" class Device(object): """Device class with /device/ API calls.""" def __init__(self, opensprinkler): """Device class initializer.""" self._opensprinkler = opensprinkler def _get_option(self, option): """Retrieve option""" (resp, content) = self._opensprinkler._request('jo') return content[option] def _get_variable(self, option): """Retrieve option""" (resp, content) = self._opensprinkler._request('jc') return content[option] def _set_variable(self, option, value): """Retrieve option""" params = {} params[option] = value (resp, content) = self._opensprinkler._request('cv', params) return content['result'] def get_firmware_version(self): """Retrieve firmware version""" return self._getOption('fwv') def get_hardware_version(self): """Retrieve hardware version""" return self._getOption('hwv') def get_last_run(self): """Retrieve hardware version""" return self._getVariable('lrun')[3] def get_rain_delay(self): """Retrieve rain delay""" return self._getVariable('rd') def get_rain_delay_stop_time(self): """Retrieve rain delay stop time""" return self._getVariable('rdst') def get_rain_sensor1(self): """Retrieve hardware version""" return self._getVariable('sn1') def get_rain_sensor2(self): """Retrieve hardware version""" return self._getVariable('sn2') def get_rain_sensor_legacy(self): """Retrieve hardware version""" return self._getVariable('rs') def get_operation_enabled(self): """Retrieve operation enabled""" return self._getVariable('en') def get_water_level(self): """Retrieve water level""" return self._getOption('wl') def enable(self): """Enable operation""" return self._setVariable('en', 1) def disable(self): """Disable operation""" return self._setVariable('en', 0)
def generate_concept_HTML(concept_title, concept_description): html_text_1 = ''' <div class="concept"> <div class="concept-title"> ''' + concept_title html_text_2 = ''' </div> <div class="concept-description"> ''' + concept_description html_text_3 = ''' </div> </div>''' full_html_text = html_text_1 + html_text_2 + html_text_3 return full_html_text def get_title(concept): start_location = concept.find('TITLE:') end_location = concept.find('DESCRIPTION:') title = concept[start_location+7 : end_location-1] return title def get_description(concept): start_location = concept.find('DESCRIPTION:') description = concept[start_location+13 :] return description def get_concept_by_number(text, concept_number): counter = 0 while counter < concept_number: counter = counter + 1 next_concept_start = text.find('TITLE:') next_concept_end = text.find('TITLE:', next_concept_start + 1) if next_concept_end >= 0: concept = text[next_concept_start:next_concept_end] else: next_concept_end = len(text) concept = text[next_concept_start:] text = text[next_concept_end:] return concept def generate_concept_HTML(concept_title, concept_description): html_text_1 = ''' <div class="concept"> <div class="concept-title"> ''' + concept_title html_text_2 = ''' </div> <div class="concept-description"> ''' + concept_description html_text_3 = ''' </div> </div>''' full_html_text = html_text_1 + html_text_2 + html_text_3 return full_html_text def make_HTML(concept): concept_title = concept[0] concept_description = concept[1] return generate_concept_HTML(concept_title, concept_description) # This is an example. EXAMPLE_LIST_OF_CONCEPTS = [ ['Python', 'Python is a Programming Language'], ['For Loop', 'For Loops allow you to iterate over lists'], ['Lists', 'Lists are sequences of data'] ] # This is the function you will write. def make_HTML_for_many_concepts(list_of_concepts): for concept in list_of_concepts: all_concepts = make_HTML(concept) all_concepts = all_concepts + make_HTML(concept) return all_concepts
def generate_concept_html(concept_title, concept_description): html_text_1 = '\n<div class="concept">\n <div class="concept-title">\n ' + concept_title html_text_2 = '\n </div>\n <div class="concept-description">\n ' + concept_description html_text_3 = '\n </div>\n</div>' full_html_text = html_text_1 + html_text_2 + html_text_3 return full_html_text def get_title(concept): start_location = concept.find('TITLE:') end_location = concept.find('DESCRIPTION:') title = concept[start_location + 7:end_location - 1] return title def get_description(concept): start_location = concept.find('DESCRIPTION:') description = concept[start_location + 13:] return description def get_concept_by_number(text, concept_number): counter = 0 while counter < concept_number: counter = counter + 1 next_concept_start = text.find('TITLE:') next_concept_end = text.find('TITLE:', next_concept_start + 1) if next_concept_end >= 0: concept = text[next_concept_start:next_concept_end] else: next_concept_end = len(text) concept = text[next_concept_start:] text = text[next_concept_end:] return concept def generate_concept_html(concept_title, concept_description): html_text_1 = '\n<div class="concept">\n <div class="concept-title">\n ' + concept_title html_text_2 = '\n </div>\n <div class="concept-description">\n ' + concept_description html_text_3 = '\n </div>\n</div>' full_html_text = html_text_1 + html_text_2 + html_text_3 return full_html_text def make_html(concept): concept_title = concept[0] concept_description = concept[1] return generate_concept_html(concept_title, concept_description) example_list_of_concepts = [['Python', 'Python is a Programming Language'], ['For Loop', 'For Loops allow you to iterate over lists'], ['Lists', 'Lists are sequences of data']] def make_html_for_many_concepts(list_of_concepts): for concept in list_of_concepts: all_concepts = make_html(concept) all_concepts = all_concepts + make_html(concept) return all_concepts
nop = b'\x00\x00' brk = b'\x00\xA0' ld1 = b'\x63\x25' # Load 0x25 into register V3 ld2 = b'\x64\x26' # Load 0x26 into register V4 sne = b'\x93\x40' # Skip next instruction if V3 != V4 with open("snevxvytest.bin", 'wb') as f: f.write(ld1) # 0x0200 <-- Load the byte 0x25 into register V3 f.write(ld2) # 0x0202 <-- Load the byte 0x25 into register V4 f.write(sne) # 0x0204 <-- Skip next instruction if V3 != V4 f.write(brk) # 0x0206 <-- If it worked, we should skip here. If it didn't, we'll break here. f.write(nop) # 0x0208 f.write(nop) # 0x020A f.write(brk) # 0x020C <-- If it worked, we should end up here after a few NOPs f.write(nop) # 0x020E
nop = b'\x00\x00' brk = b'\x00\xa0' ld1 = b'c%' ld2 = b'd&' sne = b'\x93@' with open('snevxvytest.bin', 'wb') as f: f.write(ld1) f.write(ld2) f.write(sne) f.write(brk) f.write(nop) f.write(nop) f.write(brk) f.write(nop)
''' Python program to remove two duplicate numbers from a given number of list. Sample Input: ([1,2,3,2,3,4,5]) ([1,2,3,2,4,5]) ([1,2,3,4,5]) Sample Output: [1, 4, 5] [1, 3, 4, 5] [1, 2, 3, 4, 5] ''' a = [10,20,30,20,10,50,60,40,80,50,40] dup_items = set() uniq_items = [] for x in a: if x not in dup_items: uniq_items.append(x) dup_items.add(x) print(dup_items)
""" Python program to remove two duplicate numbers from a given number of list. Sample Input: ([1,2,3,2,3,4,5]) ([1,2,3,2,4,5]) ([1,2,3,4,5]) Sample Output: [1, 4, 5] [1, 3, 4, 5] [1, 2, 3, 4, 5] """ a = [10, 20, 30, 20, 10, 50, 60, 40, 80, 50, 40] dup_items = set() uniq_items = [] for x in a: if x not in dup_items: uniq_items.append(x) dup_items.add(x) print(dup_items)
# optimal performance def copy_random_list(head): if not head: return head # copy each node and insert right after itself curr = head while curr: node_new = RandomListNode(curr.label) node_next = curr.next curr.next = node_new node_new.next = node_next curr = node_next # copy random reference curr = head while curr: if curr.random: curr.next.random = curr.random.next curr = curr.next.next # separate out new list curr = head dummy = RandomListNode(0) head_new = dummy while curr: node_new = curr.next node_next = node_new.next curr.next = node_next head_new.next = node_new curr = node_next head_new = node_new return dummy.next # O(n) time, O(1) space # similar to clone graph approach, not good enough in interview def copy_random_list_mapping(head): if not head: return head mapping = {} # original node => copied node curr = head while curr: mapping[curr] = RandomListNode(curr.label) curr = curr.next curr = head while curr: mapping[node].next = mapping[node.next] mapping[node].random = mapping[node.random] curr = curr.next return mapping[head] # O(n) time and space
def copy_random_list(head): if not head: return head curr = head while curr: node_new = random_list_node(curr.label) node_next = curr.next curr.next = node_new node_new.next = node_next curr = node_next curr = head while curr: if curr.random: curr.next.random = curr.random.next curr = curr.next.next curr = head dummy = random_list_node(0) head_new = dummy while curr: node_new = curr.next node_next = node_new.next curr.next = node_next head_new.next = node_new curr = node_next head_new = node_new return dummy.next def copy_random_list_mapping(head): if not head: return head mapping = {} curr = head while curr: mapping[curr] = random_list_node(curr.label) curr = curr.next curr = head while curr: mapping[node].next = mapping[node.next] mapping[node].random = mapping[node.random] curr = curr.next return mapping[head]
class CoinPaymentsProviderError(Exception): pass class TxInfoException(Exception): pass
class Coinpaymentsprovidererror(Exception): pass class Txinfoexception(Exception): pass
#!/usr/bin/env python # vi: set ft=python sts=4 ts=4 sw=4 et: ###################################################################### # # See COPYING file distributed along with the psignifit package for # the copyright and license terms # ###################################################################### __docformat__ = "restructuredtext" class NosamplesError ( Exception ): """An exception that is raised whenever we try to use samples but there are none""" def __init__ ( self, msg ): self.msg = msg def __str__(self): return repr(self.msg) class SamplingError ( Exception ): """An exception that is raised if some thing is wrong with the sampling""" def __init__ ( self, msg ): self.msg = msg def __str__ ( self ): return repr(self.msg)
__docformat__ = 'restructuredtext' class Nosampleserror(Exception): """An exception that is raised whenever we try to use samples but there are none""" def __init__(self, msg): self.msg = msg def __str__(self): return repr(self.msg) class Samplingerror(Exception): """An exception that is raised if some thing is wrong with the sampling""" def __init__(self, msg): self.msg = msg def __str__(self): return repr(self.msg)
current_number=0 while current_number <=5: current_number +=1 print(current_number)
current_number = 0 while current_number <= 5: current_number += 1 print(current_number)
#!/usr/bin/python3 def add_sub(shellcode: bytes, add_or_sub: bool=True, to_num: int=1, decode: bool=False) -> bytes: """Perform a add or sub encoding scheme on `shellcode`. :return: bytes object """ shellcode = bytearray(shellcode) encoded_payload = bytearray() calculated_num = (int(add_or_sub)*2-1) * to_num*(int(decode)*-2+1) for byte in shellcode: encoded_payload.append(byte + calculated_num) return bytes(encoded_payload) def right_left_rotation_bit(shellcode: bytes, right_or_left: bool=True, n: int=1) -> bytes: # print(bin(byte<<n>>8<<8), bin(byte<<n), bin((byte<<n)-(byte<<n>>8<<8)), bin(byte>>8-n), bin((byte<<n)-(byte<<n>>8<<8) + (byte>>(8-n)))) # print(bin(byte), bin(byte<<(8-n)), bin(byte>>n<<8), bin(byte>>n), bin((byte<<(8-n)) - (byte>>n<<8) + (byte>>n))) shellcode = bytearray(shellcode) encoded_payload = bytearray() for byte in shellcode: if right_or_left: encoded_payload.append((byte<<(8-n)) - (byte>>n<<8) + (byte>>n)) ## right else: ## left encoded_payload.append((byte<<n)-(byte<<n>>8<<8) + (byte>>(8-n))) return bytes(encoded_payload) def rolling_rotation(shellcode: bytes, right_or_left: bool=True, decode: bool=False) -> bytes: """ Perform a rolling xor encoding scheme on `shellcode`. :param shellcode: bytes object; data to be [en,de]coded :param decode: boolean, decrypt previously xor'd data :return: bytes object """ shellcode = bytearray(shellcode) if decode: shellcode.reverse() encoded_payload = bytearray() for i, byte in enumerate(shellcode): if i == len(shellcode) - 1: encoded_payload.append(shellcode[i]) # last byte doesn't need xor'd, common to system call Ox80 generally else: encoded_payload.append(shellcode[i] ^ shellcode[i + 1]) encoded_payload.reverse() else: encoded_payload = bytearray([shellcode.pop(0)]) # first byte left as is in the ciphertext for i, byte in enumerate(shellcode): encoded_payload+=bytearray(right_left_rotation_bit( bytes(byte), right_or_left, int(encoded_payload[i])%8)) return bytes(encoded_payload) def rolling_xor(shellcode: bytes, decode: bool=False) -> bytes: """ Perform a rolling xor encoding scheme on `shellcode`. :param shellcode: bytes object; data to be [en,de]coded :param decode: boolean, decrypt previously xor'd data :return: bytes object """ shellcode = bytearray(shellcode) if decode: shellcode.reverse() encoded_payload = bytearray() for i, byte in enumerate(shellcode): if i == len(shellcode) - 1: encoded_payload.append(shellcode[i]) # last byte doesn't need xor'd, common to system call Ox80 generally else: encoded_payload.append(shellcode[i] ^ shellcode[i + 1]) encoded_payload.reverse() else: encoded_payload = bytearray([shellcode.pop(0)]) # first byte left as is in the ciphertext for i, byte in enumerate(shellcode): encoded_payload.append(byte ^ encoded_payload[i]) return bytes(encoded_payload)
def add_sub(shellcode: bytes, add_or_sub: bool=True, to_num: int=1, decode: bool=False) -> bytes: """Perform a add or sub encoding scheme on `shellcode`. :return: bytes object """ shellcode = bytearray(shellcode) encoded_payload = bytearray() calculated_num = (int(add_or_sub) * 2 - 1) * to_num * (int(decode) * -2 + 1) for byte in shellcode: encoded_payload.append(byte + calculated_num) return bytes(encoded_payload) def right_left_rotation_bit(shellcode: bytes, right_or_left: bool=True, n: int=1) -> bytes: shellcode = bytearray(shellcode) encoded_payload = bytearray() for byte in shellcode: if right_or_left: encoded_payload.append((byte << 8 - n) - (byte >> n << 8) + (byte >> n)) else: encoded_payload.append((byte << n) - (byte << n >> 8 << 8) + (byte >> 8 - n)) return bytes(encoded_payload) def rolling_rotation(shellcode: bytes, right_or_left: bool=True, decode: bool=False) -> bytes: """ Perform a rolling xor encoding scheme on `shellcode`. :param shellcode: bytes object; data to be [en,de]coded :param decode: boolean, decrypt previously xor'd data :return: bytes object """ shellcode = bytearray(shellcode) if decode: shellcode.reverse() encoded_payload = bytearray() for (i, byte) in enumerate(shellcode): if i == len(shellcode) - 1: encoded_payload.append(shellcode[i]) else: encoded_payload.append(shellcode[i] ^ shellcode[i + 1]) encoded_payload.reverse() else: encoded_payload = bytearray([shellcode.pop(0)]) for (i, byte) in enumerate(shellcode): encoded_payload += bytearray(right_left_rotation_bit(bytes(byte), right_or_left, int(encoded_payload[i]) % 8)) return bytes(encoded_payload) def rolling_xor(shellcode: bytes, decode: bool=False) -> bytes: """ Perform a rolling xor encoding scheme on `shellcode`. :param shellcode: bytes object; data to be [en,de]coded :param decode: boolean, decrypt previously xor'd data :return: bytes object """ shellcode = bytearray(shellcode) if decode: shellcode.reverse() encoded_payload = bytearray() for (i, byte) in enumerate(shellcode): if i == len(shellcode) - 1: encoded_payload.append(shellcode[i]) else: encoded_payload.append(shellcode[i] ^ shellcode[i + 1]) encoded_payload.reverse() else: encoded_payload = bytearray([shellcode.pop(0)]) for (i, byte) in enumerate(shellcode): encoded_payload.append(byte ^ encoded_payload[i]) return bytes(encoded_payload)
def tree(length): if length>5: t.forward(length) t.right(20) tree(length-15) t.left(40) tree(length-15) t.right(20) t.backward(length) t.left(90) t.color("green") t.speed(1) tree(90)
def tree(length): if length > 5: t.forward(length) t.right(20) tree(length - 15) t.left(40) tree(length - 15) t.right(20) t.backward(length) t.left(90) t.color('green') t.speed(1) tree(90)
#!/usr/bin/env python ''' https://leetcode.com/problems/find-the-duplicate-number/ Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least one duplicate number must exist. Assume that there is only one duplicate number, find the duplicate one. Input: [1,3,4,2,2] Output: 2 Input: [3,1,3,4,2] Output: 3 ''' def find_dup(ns): if len(ns) <= 1: return -1 slow, fast = ns[0], ns[ns[0]] while slow != fast: slow = ns[slow] fast = ns[ns[fast]] fast = 0 while fast != slow: fast = ns[fast] slow = ns[slow] return slow
""" https://leetcode.com/problems/find-the-duplicate-number/ Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least one duplicate number must exist. Assume that there is only one duplicate number, find the duplicate one. Input: [1,3,4,2,2] Output: 2 Input: [3,1,3,4,2] Output: 3 """ def find_dup(ns): if len(ns) <= 1: return -1 (slow, fast) = (ns[0], ns[ns[0]]) while slow != fast: slow = ns[slow] fast = ns[ns[fast]] fast = 0 while fast != slow: fast = ns[fast] slow = ns[slow] return slow
cases = int(input()) for a in range(cases): tracks = int(input().split(" ")[0]) requests = input().split(" ") last = int(requests[0]) total = 0 for i in requests[1:]: next = int(i) total += min(tracks - ((next - last - 1) % tracks + tracks) % tracks, ((next - last - 1) % tracks + tracks) % tracks) last = next print(total)
cases = int(input()) for a in range(cases): tracks = int(input().split(' ')[0]) requests = input().split(' ') last = int(requests[0]) total = 0 for i in requests[1:]: next = int(i) total += min(tracks - ((next - last - 1) % tracks + tracks) % tracks, ((next - last - 1) % tracks + tracks) % tracks) last = next print(total)
def alternating_sums(a): even, odd = [], [] for i in range(len(a)): if i % 2 == 0: even.append(a[i]) else: odd.append(a[i]) return [sum(even), sum(odd)] def alternating_sums_short(a): return [ sum(a[::2]), sum(a[1::2]) ] if __name__ == '__main__': a = [50, 60, 60, 45, 70] alternating_sums(a) alternating_sums_short(a)
def alternating_sums(a): (even, odd) = ([], []) for i in range(len(a)): if i % 2 == 0: even.append(a[i]) else: odd.append(a[i]) return [sum(even), sum(odd)] def alternating_sums_short(a): return [sum(a[::2]), sum(a[1::2])] if __name__ == '__main__': a = [50, 60, 60, 45, 70] alternating_sums(a) alternating_sums_short(a)
# [h] close all fonts '''Close all open fonts.''' all_fonts = AllFonts() if len(all_fonts) > 0: for font in all_fonts: font.close()
"""Close all open fonts.""" all_fonts = all_fonts() if len(all_fonts) > 0: for font in all_fonts: font.close()
"""Implementation for directed graph.""" class GraphNode: def __init__(self, node_id): self.id = node_id self.data = None self.adj = set() class DirectedGraph: """Implements a directed graph. Nodes have unique ids. Attributes: nodes: A map of id to node object. """ def __init__(self): self.nodes = {} def has_node(self, node_id): return node_id in self.nodes def get_node_ids(self): node_ids = [] for node_id in self.nodes: node_ids.append(node_id) return node_ids def get_adj_node_ids(self, node_id): if node_id not in self.nodes: raise IndexError('Node id does not exist.') return list(self.nodes[node_id].adj) def add_node_id(self, node_id): """Adds a new node id if it does not aleardy exist.""" if node_id not in self.nodes: node = GraphNode(node_id) self.nodes.update({node_id: node}) def add_edge(self, from_id, to_id): """Adds an edge: from_id --> to_id""" if from_id == to_id: raise ValueError('A node may not have a self edge.') if (from_id not in self.nodes) or (to_id not in self.nodes): raise IndexError('Node with given id does not exist.') self.nodes[from_id].adj.add(to_id) def adjacency_to_graph(self, adj_map): """Creates a graph from an adjacency map of node ids. Overwrites any existing node id. Args: adj_map: A dictionary map from nodes to their adjacenet nodes. Example: {1: [2, 3], 2: [3, 4]} """ for node_id, adj_list in adj_map.items(): self.add_node_id(node_id) for adj_id in adj_list: self.add_node_id(adj_id) self.add_edge(node_id, adj_id) def graph_to_adjacency(self): """Returns an adjacency map representation of the graph. Example: The following graph 1 --> 2, 3 2 --> 3 will be shown as the following adjacency map: {1: {2, 3}, 2: {3}, 3: {}} """ adj_map = {} for node_id, node in self.nodes.items(): adj_map.update({node_id: list(node.adj)}) return adj_map
"""Implementation for directed graph.""" class Graphnode: def __init__(self, node_id): self.id = node_id self.data = None self.adj = set() class Directedgraph: """Implements a directed graph. Nodes have unique ids. Attributes: nodes: A map of id to node object. """ def __init__(self): self.nodes = {} def has_node(self, node_id): return node_id in self.nodes def get_node_ids(self): node_ids = [] for node_id in self.nodes: node_ids.append(node_id) return node_ids def get_adj_node_ids(self, node_id): if node_id not in self.nodes: raise index_error('Node id does not exist.') return list(self.nodes[node_id].adj) def add_node_id(self, node_id): """Adds a new node id if it does not aleardy exist.""" if node_id not in self.nodes: node = graph_node(node_id) self.nodes.update({node_id: node}) def add_edge(self, from_id, to_id): """Adds an edge: from_id --> to_id""" if from_id == to_id: raise value_error('A node may not have a self edge.') if from_id not in self.nodes or to_id not in self.nodes: raise index_error('Node with given id does not exist.') self.nodes[from_id].adj.add(to_id) def adjacency_to_graph(self, adj_map): """Creates a graph from an adjacency map of node ids. Overwrites any existing node id. Args: adj_map: A dictionary map from nodes to their adjacenet nodes. Example: {1: [2, 3], 2: [3, 4]} """ for (node_id, adj_list) in adj_map.items(): self.add_node_id(node_id) for adj_id in adj_list: self.add_node_id(adj_id) self.add_edge(node_id, adj_id) def graph_to_adjacency(self): """Returns an adjacency map representation of the graph. Example: The following graph 1 --> 2, 3 2 --> 3 will be shown as the following adjacency map: {1: {2, 3}, 2: {3}, 3: {}} """ adj_map = {} for (node_id, node) in self.nodes.items(): adj_map.update({node_id: list(node.adj)}) return adj_map
"""Top-level package for with-op script.""" __author__ = """Vince Broz""" __email__ = 'vince@broz.cc' __version__ = '1.1.1'
"""Top-level package for with-op script.""" __author__ = 'Vince Broz' __email__ = 'vince@broz.cc' __version__ = '1.1.1'
def adder(a:int, b:int) -> int: while b: _xor = a ^ b _and = (a & b) << 1 a = _xor b = _and return a if __name__ == "__main__": bin_digits = 8 for i in range(2 ** bin_digits): for ii in range(2 ** bin_digits): true = i + ii test = adder(i, ii) if true != test: print(f"Adding: {i:b} + {ii:b}") print(f"\tTrue: {true:b}") print(f"\tTest: {test:b}")
def adder(a: int, b: int) -> int: while b: _xor = a ^ b _and = (a & b) << 1 a = _xor b = _and return a if __name__ == '__main__': bin_digits = 8 for i in range(2 ** bin_digits): for ii in range(2 ** bin_digits): true = i + ii test = adder(i, ii) if true != test: print(f'Adding: {i:b} + {ii:b}') print(f'\tTrue: {true:b}') print(f'\tTest: {test:b}')
# calculate 10! @profile def factorial(num): if num == 1: return 1 else: print("Calculating " + str(num) + "!") return factorial(num -1) * num @profile def profiling_factorial(): value = 10 result = factorial(value) print("10!= " + str(result)) if __name__ == "__main__": profiling_factorial()
@profile def factorial(num): if num == 1: return 1 else: print('Calculating ' + str(num) + '!') return factorial(num - 1) * num @profile def profiling_factorial(): value = 10 result = factorial(value) print('10!= ' + str(result)) if __name__ == '__main__': profiling_factorial()
""" Holds utilities related with Earth plotting """ EARTH_PALETTE = { "land_color": "#9fc164", "ocean_color": "#b2d9ff", "lake_color": "#e9eff9", "dessert_color": "d8c596", } """ A color palette based on Earth colors """
""" Holds utilities related with Earth plotting """ earth_palette = {'land_color': '#9fc164', 'ocean_color': '#b2d9ff', 'lake_color': '#e9eff9', 'dessert_color': 'd8c596'} ' A color palette based on Earth colors '
BZX = Contract.from_abi("BZX", "0xc47812857a74425e2039b57891a3dfcf51602d5d", interface.IBZx.abi) TOKEN_REGISTRY = Contract.from_abi("TOKEN_REGISTRY", "0x2fA30fB75E08f5533f0CF8EBcbb1445277684E85", TokenRegistry.abi) list = TOKEN_REGISTRY.getTokens(0, 100) for l in list: iTokenTemp = Contract.from_abi("iTokenTemp", l[0], LoanTokenLogicStandard.abi) globals()[iTokenTemp.symbol()] = iTokenTemp underlyingTemp = Contract.from_abi("underlyingTemp", l[1], TestToken.abi) globals()[underlyingTemp.symbol()] = underlyingTemp CHI = Contract.from_abi("CHI", "0x0000000000004946c0e9F43F4Dee607b0eF1fA1c", TestToken.abi) CHEF = Contract.from_abi("CHEF", "0x1FDCA2422668B961E162A8849dc0C2feaDb58915", MasterChef_BSC.abi) HELPER = Contract.from_abi("HELPER", "0xE05999ACcb887D32c9bd186e8C9dfE0e1E7814dE", HelperImpl.abi) BGOV = Contract.from_abi("PGOV", "0xf8E026dC4C0860771f691EcFFBbdfe2fa51c77CF", GovToken.abi) CHEF = Contract.from_abi("CHEF", CHEF.address, interface.IMasterChef.abi) SWEEP_FEES = Contract.from_abi("STAKING", "0x5c9b515f05a0E2a9B14C171E2675dDc1655D9A1c", FeeExtractAndDistribute_BSC.abi)
bzx = Contract.from_abi('BZX', '0xc47812857a74425e2039b57891a3dfcf51602d5d', interface.IBZx.abi) token_registry = Contract.from_abi('TOKEN_REGISTRY', '0x2fA30fB75E08f5533f0CF8EBcbb1445277684E85', TokenRegistry.abi) list = TOKEN_REGISTRY.getTokens(0, 100) for l in list: i_token_temp = Contract.from_abi('iTokenTemp', l[0], LoanTokenLogicStandard.abi) globals()[iTokenTemp.symbol()] = iTokenTemp underlying_temp = Contract.from_abi('underlyingTemp', l[1], TestToken.abi) globals()[underlyingTemp.symbol()] = underlyingTemp chi = Contract.from_abi('CHI', '0x0000000000004946c0e9F43F4Dee607b0eF1fA1c', TestToken.abi) chef = Contract.from_abi('CHEF', '0x1FDCA2422668B961E162A8849dc0C2feaDb58915', MasterChef_BSC.abi) helper = Contract.from_abi('HELPER', '0xE05999ACcb887D32c9bd186e8C9dfE0e1E7814dE', HelperImpl.abi) bgov = Contract.from_abi('PGOV', '0xf8E026dC4C0860771f691EcFFBbdfe2fa51c77CF', GovToken.abi) chef = Contract.from_abi('CHEF', CHEF.address, interface.IMasterChef.abi) sweep_fees = Contract.from_abi('STAKING', '0x5c9b515f05a0E2a9B14C171E2675dDc1655D9A1c', FeeExtractAndDistribute_BSC.abi)
lowestPossible = 1 highestPossible = 999 num = 0 while True: enemy = hero.findNearest(hero.findEnemies()) if enemy: if enemy.type == "scout": lowestPossible = num elif enemy.type == "munchkin": highestPossible = num hero.attack(enemy) else: num = lowestPossible + Math.ceil((highestPossible - lowestPossible) / 2); hero.say(num)
lowest_possible = 1 highest_possible = 999 num = 0 while True: enemy = hero.findNearest(hero.findEnemies()) if enemy: if enemy.type == 'scout': lowest_possible = num elif enemy.type == 'munchkin': highest_possible = num hero.attack(enemy) else: num = lowestPossible + Math.ceil((highestPossible - lowestPossible) / 2) hero.say(num)
#!/usr/bin/env python # coding: utf-8 # Utility functions def get_image_size(model_prefix): if 'caffenet' in model_prefix: return 227 elif 'squeezenet' in model_prefix: return 227 elif 'alexnet' in model_prefix: return 227 elif 'googlenet' in model_prefix: return 299 elif 'inception-v3' in model_prefix: return 299 elif 'inception-v4' in model_prefix: return 299 elif 'inception-resnet-v2' in model_prefix: return 299 else: return 224
def get_image_size(model_prefix): if 'caffenet' in model_prefix: return 227 elif 'squeezenet' in model_prefix: return 227 elif 'alexnet' in model_prefix: return 227 elif 'googlenet' in model_prefix: return 299 elif 'inception-v3' in model_prefix: return 299 elif 'inception-v4' in model_prefix: return 299 elif 'inception-resnet-v2' in model_prefix: return 299 else: return 224
# variable = a container for a value. # Behaves as the value that it contains first_name = "Bro" last_name = "Code" full_name = first_name +" "+ last_name #name='Bro' print("Hello "+full_name) #print(type(name)) age = 21 age += 1 print("Your age is: "+str(age)) #print(age) #print(type(age)) height = 250.5 print("Your height is: "+str(height)+"cm") #print(height) #print(type(height)) human = True print("Are you a human: "+str(human)) #print(human) #print(type(human))
first_name = 'Bro' last_name = 'Code' full_name = first_name + ' ' + last_name print('Hello ' + full_name) age = 21 age += 1 print('Your age is: ' + str(age)) height = 250.5 print('Your height is: ' + str(height) + 'cm') human = True print('Are you a human: ' + str(human))
#!/usr/bin/python # Any system should have an sh capable of `command -v` # REQUIRES: command -v sh print("Oh, but it is!") # CHECK: This should never be compared
print('Oh, but it is!')
# CloudShell L1 resource autoload XML helper # # It should not be necessary to edit this file. # # - Generates the autoload XML resource format to return to CloudShell # - Subresources are also represented with nested instances of this class # - See example usage in <project>_l1_handler.py class L1DriverResourceInfo: def __init__(self, name, full_address, family, model, map_path=None, serial='-1'): """ :param name: str :param full_address: str :param family: str :param model: str :param map_path: str :param serial: str """ self.name = name self.address = full_address self.family = family self.model = model self.serial = serial self.map_path = map_path self.subresources = [] self.attrname2typevaluetuple = {} if False: self.subresources.append(L1DriverResourceInfo(None, None, None, None)) def add_subresource(self, subresource): """ :param subresource: L1DriverResourceInfo :return: None """ self.subresources.append(subresource) def set_attribute(self, name, value, typename='String'): """ :param name: str :param value: str :param typename: str: String, Lookup, :return: None """ self.attrname2typevaluetuple[name] = (typename, value) def get_attribute(self, name): """ :param name: str :return: str """ return self.attrname2typevaluetuple[name][1] def to_string(self, tabs=''): """ :param tabs: str :return: str """ def indent(t, s): return t + (('\n' + t).join(s.split('\n'))).strip() + '\n' return indent(tabs, '''<ResourceInfo Name="{name}" Address="{address}" ResourceFamilyName="{family}" ResourceModelName="{model}" SerialNumber="{serial}"> <ChildResources> {children} </ChildResources> <ResourceAttributes> {attributes} </ResourceAttributes> {mapping}</ResourceInfo>'''.format( name=self.name, address=self.address, family=self.family, model=self.model, serial=self.serial, children=''.join([x.to_string(tabs=tabs + ' ') for x in self.subresources]), attributes=''.join([''' <Attribute Name="{name}" Type="{type}" Value="{value}" />\n'''.format(name=attrname, type=type_value[0], value=type_value[1]) for attrname, type_value in self.attrname2typevaluetuple.iteritems() ]), mapping=''' <ResourceMapping><IncomingMapping>''' + self.map_path + '''</IncomingMapping></ResourceMapping>\n''' if self.map_path else '' ))
class L1Driverresourceinfo: def __init__(self, name, full_address, family, model, map_path=None, serial='-1'): """ :param name: str :param full_address: str :param family: str :param model: str :param map_path: str :param serial: str """ self.name = name self.address = full_address self.family = family self.model = model self.serial = serial self.map_path = map_path self.subresources = [] self.attrname2typevaluetuple = {} if False: self.subresources.append(l1_driver_resource_info(None, None, None, None)) def add_subresource(self, subresource): """ :param subresource: L1DriverResourceInfo :return: None """ self.subresources.append(subresource) def set_attribute(self, name, value, typename='String'): """ :param name: str :param value: str :param typename: str: String, Lookup, :return: None """ self.attrname2typevaluetuple[name] = (typename, value) def get_attribute(self, name): """ :param name: str :return: str """ return self.attrname2typevaluetuple[name][1] def to_string(self, tabs=''): """ :param tabs: str :return: str """ def indent(t, s): return t + ('\n' + t).join(s.split('\n')).strip() + '\n' return indent(tabs, '<ResourceInfo Name="{name}" Address="{address}" ResourceFamilyName="{family}" ResourceModelName="{model}" SerialNumber="{serial}">\n <ChildResources>\n{children} </ChildResources>\n <ResourceAttributes>\n{attributes} </ResourceAttributes>\n{mapping}</ResourceInfo>'.format(name=self.name, address=self.address, family=self.family, model=self.model, serial=self.serial, children=''.join([x.to_string(tabs=tabs + ' ') for x in self.subresources]), attributes=''.join([' <Attribute Name="{name}" Type="{type}" Value="{value}" />\n'.format(name=attrname, type=type_value[0], value=type_value[1]) for (attrname, type_value) in self.attrname2typevaluetuple.iteritems()]), mapping=' <ResourceMapping><IncomingMapping>' + self.map_path + '</IncomingMapping></ResourceMapping>\n' if self.map_path else ''))
class Solution: def intToRoman(self, num): symbols_list = [ ["M", "M", "M"], ["C", "D", "M"], ["X", "L", "C"], ["I", "V", "X"] ] pown_list = [1000, 100, 10, 1] def digitToRoman(digit, symbols): if digit < 4: return symbols[0] * digit elif digit == 4: return symbols[0] + symbols[1] elif digit < 9: return symbols[1] + (symbols[0] * (digit - 5)) else: return symbols[0] + symbols[2] buffer = "" for pown, symbols in zip(pown_list, symbols_list): buffer += digitToRoman(num // pown, symbols) num %= pown return buffer def test(): sol = Solution() cases = [3, 4, 5, 9, 58, 1994] for case in cases: print(case) print(sol.intToRoman(case)) if __name__ == '__main__': test()
class Solution: def int_to_roman(self, num): symbols_list = [['M', 'M', 'M'], ['C', 'D', 'M'], ['X', 'L', 'C'], ['I', 'V', 'X']] pown_list = [1000, 100, 10, 1] def digit_to_roman(digit, symbols): if digit < 4: return symbols[0] * digit elif digit == 4: return symbols[0] + symbols[1] elif digit < 9: return symbols[1] + symbols[0] * (digit - 5) else: return symbols[0] + symbols[2] buffer = '' for (pown, symbols) in zip(pown_list, symbols_list): buffer += digit_to_roman(num // pown, symbols) num %= pown return buffer def test(): sol = solution() cases = [3, 4, 5, 9, 58, 1994] for case in cases: print(case) print(sol.intToRoman(case)) if __name__ == '__main__': test()
# Copyright 2015 Ufora Inc. # # 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. """DefaultDict - dictionary with a default item DefaultDict overrides a normal dict. When created, give it a lambda function that takes a key and produces the 'zero' element for the dictionary for that key. """ class DefaultDict(dict): def __init__(self, defaultFunction): dict.__init__(self) self.defaultFunction = defaultFunction def __getitem__(self, x): if not self.has_key(x): dict.__setitem__(self, x, self.defaultFunction(x)) return dict.__getitem__(self,x)
"""DefaultDict - dictionary with a default item DefaultDict overrides a normal dict. When created, give it a lambda function that takes a key and produces the 'zero' element for the dictionary for that key. """ class Defaultdict(dict): def __init__(self, defaultFunction): dict.__init__(self) self.defaultFunction = defaultFunction def __getitem__(self, x): if not self.has_key(x): dict.__setitem__(self, x, self.defaultFunction(x)) return dict.__getitem__(self, x)
CLUSTERS_DB = 'complete_clusters.db' SAMPLE2PROTEIN_DB = 'sample2protein.db' SAMPLE2PATH = 'sample2path.tsv'
clusters_db = 'complete_clusters.db' sample2_protein_db = 'sample2protein.db' sample2_path = 'sample2path.tsv'